MobileBlur

Changes On Branch 6548f791b4509006
Login

Changes On Branch 6548f791b4509006

Changes In Branch develop Through [6548f791b4] Excluding Merge-Ins

This is equivalent to a diff from 9995851f7e to 6548f791b4

2011-11-20
18:36
Release 0.1- support for a single user, basic functionality works check-in: 56de658fd0 user: spiffy tags: trunk, v0.1
03:03
Moved newsblur library from urllib to Requests. Moved username storage to the DB. Store cookie in the DB. Centralize a login function that checks the DB for a user's cookie on each page load and logs the user in if there's no cookie. check-in: cbc0649388 user: spiffy tags: develop
2011-08-15
01:53
Mobileblur can log in for a user and get all feeds with unread content above a hardcoded threshold check-in: 6548f791b4 user: spiffy tags: develop
2011-08-08
04:53
Added web2py 1.98.2 check-in: eba4a35a21 user: spiffy tags: develop
04:52
Create new branch named "develop" check-in: 2ef92257d5 user: spiffy tags: develop
04:51
initial empty check-in check-in: 9995851f7e user: spiffy tags: trunk

Added ABOUT version [ea96ed160b].







1
2
3
4
5
6
+
+
+
+
+
+
web2py is an open source full-stack framework for agile development 
of secure database-driven web-based applications, written and programmable in 
Python. 

Created by Massimo Di Pierro <mdipierro@cs.depaul.edu>

Added LICENSE version [4719a3b620].










































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## Web2py License

Web2py is Licensed under the LGPL license version 3 
(http://www.gnu.org/licenses/lgpl.html)

Copyrighted (c) by Massimo Di Pierro (2007-2011)

### On Commercial Redistribution

In accordance with LGPL you may:
- redistribute web2py with your apps (including official web2py binary versions)
- release your applications which use official web2py libraries under any license you wish
But you must:
- make clear in the documentation that your application uses web2py
- release any modification of the web2py libraries under the LGPLv3 license

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 
NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT 
HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, 
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES 
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER 
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

(Earlier versions of web2py, 1.0.*-1.90.*, were released under the GPL2 license plus a
commercial exception which, for practical purposes, was very similar to the current LPGLv3)

### Licenses for third party contributed software

web2py contains third party software under the gluon/contrib/ folder.
Each file/module in contrib is distributed with web2py under its original license.
Here we list some of them.

#### gluon.contrib.simplejson LICENSE

Copyright (c) 2006 Bob Ippolito - 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.

#### gluon.contrib.rss2.py (originally PyRSS2Gen) LICENSE

This is copyright (c) by Dalke Scientific Software, LLC and released under the
BSD license.  See the file LICENSE in the distribution or 
<http://www.opensource.org/licenses/bsd-license.php> for details.

#### gluon.contrib.markdown (markdown2) LICENSE

MIT License from from <http://code.google.com/p/python-markdown2/>

#### gluon.contrib.feedparser LICENSE

Copyright (c) 2002-2005, Mark Pilgrim

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.

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.

#### gluon.wsgiserver.py LICENSE (borrowed from cherrypy)

Copyright (c) 2004, CherryPy Team (team@cherrypy.org)
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.
    * Neither the name of the CherryPy Team nor the names of its contributors 
      may 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.

#### gluon.contrib.pam LICENSE

Copyright (C) 2007-2009 Chris AtLee <chris@atlee.ca> Licensed under the MIT license

#### gluon.contrib.shell LICENSE

Copyright (C) by Google inc. Apache 2.0 Lincense

#### The javascript licenses are in the code itself

Added Makefile version [72d1f69846].



















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
clean:
	rm -f httpserver.log 
	rm -f parameters*.py 
	rm -f -r applications/*/compiled     	
	find ./ -name '*~' -exec rm -f {} \; 
	find ./ -name '#*' -exec rm -f {} \;
	find ./ -name 'Thumbs.db' -exec rm -f {} \; 
	find ./gluon/ -name '.*' -exec rm -f {} \;
	find ./gluon/ -name '*class' -exec rm -f {} \; 
	find ./applications/admin/ -name '.*' -exec rm -f {} \; 
	find ./applications/examples/ -name '.*' -exec rm -f {} \; 
	find ./applications/welcome/ -name '.*' -exec rm -f {} \; 
	find ./ -name '*.pyc' -exec rm -f {} \;
all:
	echo "The Makefile is used to build the distribution."
	echo "In order to run web2py you do not need to make anything."
	echo "just run web2py.py"
epydoc:
	### build epydoc
	rm -f -r applications/examples/static/epydoc/ 
	epydoc --config epydoc.conf
	cp applications/examples/static/title.png applications/examples/static/epydoc
tests:
	cd gluon/tests; ./test.sh 1>tests.log 2>&1 
src:
	echo 'Version 1.98.2 ('`date +%Y-%m-%d\ %H:%M:%S`')' > VERSION
	### rm -f all junk files
	make clean
	### clean up baisc apps
	rm -f routes.py 
	rm -f applications/*/sessions/*       
	rm -f applications/*/errors/* | echo 'too many files'
	rm -f applications/*/cache/*                  
	rm -f applications/admin/databases/*                 
	rm -f applications/welcome/databases/*               
	rm -f applications/examples/databases/*             
	rm -f applications/admin/uploads/*                 
	rm -f applications/welcome/uploads/*               
	rm -f applications/examples/uploads/*             
	### make admin layout and appadmin the default
	cp applications/admin/views/appadmin.html applications/welcome/views
	cp applications/admin/views/appadmin.html applications/examples/views
	cp applications/admin/controllers/appadmin.py applications/welcome/controllers
	cp applications/admin/controllers/appadmin.py applications/examples/controllers	
	### update the license
	cp ABOUT applications/admin/
	cp ABOUT applications/examples/
	cp LICENSE applications/admin/
	cp LICENSE applications/examples/
	### 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/gluon/*.py web2py/gluon/contrib/* web2py/splashlogo.gif web2py/*.py web2py/ABOUT  web2py/LICENSE web2py/README web2py/NEWINSTALL web2py/VERSION web2py/Makefile web2py/epydoc.css web2py/epydoc.conf web2py/app.example.yaml web2py/logging.example.conf web2py_exe.conf web2py/queue.example.yaml MANIFEST.in mkweb2pyenv startweb2py 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 epydoc
	make src
	make app
	make win
app:
	echo 'did you uncomment import_all in gluon/main.py?'
	python2.5 -c 'import compileall; compileall.compile_dir("gluon/")'
	#python web2py.py -S welcome -R __exit__.py
	find gluon -path '*.pyc' -exec cp {} ../web2py_osx/site-packages/{} \;
	cd ../web2py_osx/site-packages/; zip -r ../site-packages.zip *
	mv ../web2py_osx/site-packages.zip ../web2py_osx/web2py/web2py.app/Contents/Resources/lib/python2.5
	cp ABOUT ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp NEWINSTALL ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp LICENSE ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp VERSION ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp README ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp splashlogo.gif ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp options_std.py ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp routes.example.py ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp router.example.py ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp app.example.yaml ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp queue.example.yaml ../web2py_osx/web2py/web2py.app/Contents/Resources
	cp -r applications/admin ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
	cp -r applications/welcome ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
	cp -r applications/examples ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
	cp applications/__init__.py ../web2py_osx/web2py/web2py.app/Contents/Resources/applications
	cd ../web2py_osx; zip -r web2py_osx.zip web2py
	mv ../web2py_osx/web2py_osx.zip .
win:
	echo 'did you uncomment import_all in gluon/main.py?'
	python2.5 -c 'import compileall; compileall.compile_dir("gluon/")'
	find gluon -path '*.pyc' -exec cp {} ../web2py_win/library/{} \;
	cd ../web2py_win/library/; zip -r ../library.zip *
	mv ../web2py_win/library.zip ../web2py_win/web2py
	cp ABOUT ../web2py_win/web2py/
	cp NEWINSTALL ../web2py_win/web2py/
	cp LICENSE ../web2py_win/web2py/
	cp VERSION ../web2py_win/web2py/
	cp README ../web2py_win/web2py/
	cp splashlogo.gif ../web2py_win/web2py/
	cp options_std.py ../web2py_win/web2py/
	cp routes.example.py ../web2py_win/web2py/
	cp router.example.py ../web2py_win/web2py/
	cp app.example.yaml ../web2py_win/web2py/
	cp queue.example.yaml ../web2py_win/web2py/
	cp -r applications/admin ../web2py_win/web2py/applications
	cp -r applications/welcome ../web2py_win/web2py/applications
	cp -r applications/examples ../web2py_win/web2py/applications
	cp applications/__init__.py ../web2py_win/web2py/applications
	cd ../web2py_win; zip -r web2py_win.zip web2py
	mv ../web2py_win/web2py_win.zip .
run:
	python2.5 web2py.py -a hello
push:
	make src
	echo '' > NEWINSTALL
	hg push
	bzr push bzr+ssh://mdipierro@bazaar.launchpad.net/~mdipierro/web2py/devel --use-existing-dir

Added README version [b3e52ddfca].

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## INSTALLATION INSTRUCTION - IMPORTANT

To start web2py there is NO NEED to install it. Just unzip and do:

> python web2py.py

Thats is it!!!

## web2py file structure

start web2py with:
 
   python web2py.py

``
    \project
	README
	LICENSE
        TODO                               
        Makefile                   ## make all and make app
	web2py.py                  ## the startup script (*)
        parameters.py              ## created at startup 
        admin.tar                  ## the admin app (*)
        examples.tar               ## examples and documentation app (*)
        welcome.tar                ## the welcome app (entry point) (*)
	\gluon                     ## the core libraries (*)
        \deposit                   ## used for zip and install apps
        setup_app.py               ## used by py2app to make OSX executable
        setup_exe.py               ## used by py2app to make Winows executble
        wsgihandler.py             ## to use Gluon with mod_wsgi
        \dist                      ## used by py2app, py2exe
        \build                     ## used by py2app, py2exe
        \tests                     ## under development stuff
        \docs                      ## in progress documentation
	\applications              ## are the apps
		\welcome           ## application welcome, for example
			\models
			\views
			\controllers
			\sessions
			\errors
			\cache
			\static
                        \uploads
                        \modules
``

## EWF v1.5 -> v1.6 
- load and save .py in ascii, avoids problem with LF+CR on windows
- added path.join in compileapp, fixed problem with Windows compileapp

## EWF v1.6 -> v1.7
- in paths replace '\' with '/' to fix problem with windows paths
- using limitby in database administration
- replaced mime/miltupart with multipart/form-data to fix a windows problem

## EWF v1.7 -> Gluon v1.0
- Name change 
- Improved layout.html

## Gluon v1.0 -> v1.1
- bug in sqlhtml with JOINS queries

## Gluon v1.1 -> v1.2
- fixed some typos in examples
- IS_IN_SET now supports labels
- cleanup in sql.py does not cleanup, just checks valid field and table names

## Gluon v1.3
- added IS_IN_DB, IS_NOT_IN_DB and updated examples accordingly

## Gluon v1.4
- fixed problem with IS_INT_IN_RANGE and IS_FLOAT_IN_RANGE. Now an error in a validator is reported as a ticket. Good validators should not raise Exceptions.
- IS_IN_DB displays "label (id)"
- it can upload files without extension
- migration is now optional (define_table has migrate=False option)

## Gluon v1.5
- <form> -> <form method="post"> in errors.html
- replace('//','////') in sub in template.py

## Gluon v1.8
- no more chdir (thread unsafe)
- no more sys.stdout (thread unsafe)
- response.body is StringIO()
- admin/default/site informs about upgrade
- response.locker (optional)

## Gluon v1.9
- allow "count(*)" in select
- db.execute()
- fixed problem with continue and return in template
- removed try: ... except in sql.py
- fixed '\t'

## Gluon v1.10
- fixed concurrency problems with SQLDB._instances and SQLDB._folders, now use lock
- now, by default, edit SQLFORMs retain uploaded files

## Gluon v1.11
- appadmin allows to keep or delete uploaded files

## Gluon v1.12
- in sql.py 
- handles NULL values properly
- unicode support (data always stored in utf-8)
- 'date' -> datetime.date ,'time' -> datetime.time, 'datetime' -> datetime.datetime, 'boolean' -> True/False
- most types have default validators
- SQLField(...,required=True) option.
- SQLRows has __str__ that serializes in CSV and xml() that serializes in HTML
- SQLTable has import_from_csv_file(...)
- gluon.simplejson for AJAX
- in validators.py
- IS_IN_DB(db,..) -  db can be an SQLSet or an SQLDB
- better error messages
- in admin
- new import/export in csv, update and delete interface.
- in appadmin
- edit form allows to keep stored encrypted password
- in main.py
- http://host not defaults to http://host/init/default/index
- New third party modules
- gluon.simplejson(.dumps, .loads)
- gluon.pyrtf(.dumps)
- gluon.rss2(.dumps)

## Gluon v1.13
- (this is one of the biggest revisions ever)
- Improved sql.py has support MySQL, cxOracle (experimental), extract, like and better testing
- SQLDB.tables and SQLTable.fields are now SQLCalableList objects
- Fixed bug with editing integer fields storing zero
- Admin interface now says "insert new [tablename]" and display insert, select or update properly in the title.
- Added a cache mechamism. Works for data, controllers, views and SQLRows.
- main.py now uses a request.folder absolute path when not os.name in ['nt','posix']. Seems to work on windowsce devices, except no file locking has consequences.
- Now you can put modules in applications/[anyapp]/modules and import them with
- import applications.[anyapp].modules.[module] as [module]
- Fixed problem with init
- New applications/examples/controller/global.py controller for docs.

## Gluon v1.14
- Fixed a bug fix in URLs

## Gluon v1.15
- New try:... except. in gluon/main.py for when sessions cannot be saved
- Now validator/formatter method allows IS_DATE('%d/%m/%Y')

## web2py v1.16
- yes we changed the name! Turns out Gluon was trademarked by somebody else.
- Although we are not infringing the trademark since this is a non-commercial
- product we could have run into some issues. So we have been professional
- and changed the name to web2py.
- Now SQLFORMs and FORM can have a formname and multiple forms are allowed 
- per page.
- A new examples/default/index page.
- web2py.py instead of runme.py
- mysql sets utf8 encoding.
- input integer field values are automatically converted int().

## web2py v1.17
- I posted v1.16 too soon. v1.17 was released after 1h to fix some bugs.

## web2py v1.18
- removed vulnerability in accept_languages and session_id
- Minor bug fixes. Typos and cleanup cache. Textarea now clears.
- Support for PyAMF.
- T returns a class, not a string
- new template parser (faster?)
- got rid of sintaxhighlighter in favor of server side CODE
- fix problem with cacheondisk locking
- fix 'None' instead of NULL in IS_NOT_IN_DB (I think)
- gluon.contrib.markdown
- notnull and unique in SQLField now supported (tested on sqlite mysql and postgresql)
- Storage now has __getstate__ and __setstate__ needed for pickling.
- session files are now locked to make it work better with asynchronous requests
- cxoracle should work, apart for limitby
- .../examples is now mapped to .../examples/default/index etc.
- .../init is now mapped to .../welcome if init is not present

## web2py 1.19
- minor typos

## web2py 1.20
- new IFRAME, LABEL, FIELDSET validators 
- P(..cr2br=True) option
- FORM and SQLFORM have hidden=dict(...) option for REST
- testing framework.
- improved examples pages

## web2py 1.21
- replaced paste.httpserver with cherrypy.wsgi server
- temporary sessions are no longer saved
- widget has [stop] button and graph
- logging is done by main by appfactory
- fixed a bug in sql belongs

## web2py 1.22-1.25
- fixed minor bugs, added IS_NULL_OR

## web2py 1.26
- added shell.py (thanks Limodou!)
- added memcache support

## web2py 1.27
- IS_NULL_OR now works will all fields
- admin creates paths to static files
- wsgiserver options are passed to HttpServer
- faking limitby for oracle to make appadmin work
- all objects inherit from object
- fixed bug in app names with .
- fixed bug in created RestrictedError object on windows
- shell is now in gluon and accessible via web2py.py

## web2py 1.28
- fixed bug with belongs, faster sql.py
- included jquery.js
- minor aestetical fixes
- sortable.js is gone

## web2py 1.29
- Now selet mutliple works with get, so does is IS_LENGTH
- Added IS_LIST_OF
- fixed problem with admin from windows and localhost

## web2py 1.30
- added flv to contenttype
- added support for appengine

## web2py 1.31-1.41
- some bug fixes, mostly better appengine support
- mssql support
- firebird support
- widgets support
- connection pools

## 1.42
- fixed security issue by removing slash escape in mysql
- removed random everywhere
- use uuid for session and tickets
- use http_x_forward_for to figure out the client causing a ticket
- use longtext and longblob for mysql
- main now really catches all exceptions
- no more warnings on GAE

## 1.43-1.48
- html.py rewrite (better support for custom forms) (Bill Ferrett)
- new stickers in examples (thanks Mateusz)
- on windows can run in taskbar (Mark Larsen)
- in admin|edit page link to edit|controller (Nathan Freeze)
- better error codes and routes_onerror (Timothy Farrell)
- DAL support for groupy and having
- DAL support for expressions instead of values
- DAL has experimental Informix support
- fixed bug with non-printable chars in DAL
- 'text' fields limited to 2**16 (to avoid mysql problems)
- widget has -quiet and -debug (Attila Csipa)
- web2py_session uses BLOB instead of TEXT
- improved IS_URL
- Runs with python 2.6 (Tim)
- On GAE uses GAE for static files (Robin)


## 1.49
- fixed a bug with taskbar widget, thanks Mark
- fixed a bug with form.latest
- made many DIV methods private (_)


## 1.50
- Fixed some bugs introduced in 1.49

## 1.51
- Fixed more bugs introduced in 1.49 (sql _extra and html select)
- support for sqlite:memory:

## 1.52
- Fixed a minor bug with _extra[key] and key not str.
- check for upgrade via ajax

## 1.53
- On GAE upload data goes automatically in datastore (blob created automatically)
- New appadmin runs on GAE (most of it, not all)
- Martin Hufsky patch allow slicing of fields in DAL expressions

## 1.54
- fixed minor bugs

## 1.55?
- rowcount
- fixed bug when IS_IN_DB involved multiple fields on GAE
- T.set_current_languages
- better unittests
- response.custom_commit and response.custom_rollback
- you can next cache calls (like cache a controller that caches a select). Thanks Iceberg
- db(....id==None).select() no longer returns an error but an empty SQLRows on GAE
- db(...).delete(delete_uploads=True) and SQLFORM.accepts(....delete_uploads=True) will delete all referenced uploaded files
- DIV.element and DIV.update
- sqlrows.json()
- SQLFORM.widgets
- URL(r=request,args=0)
- IS_IN_DB(...,multiple=True) for Many2Many (sort of)
- In URL(...,f) f is url encoded
- In routes_in=[['a/b/c/','a/b/c/?var=value']]
- simplejson 2.0.7


## 1.56
- Consider the following table:

- db.define_table('cirlce',
-    db.Field('radius','double'),
-    db.Field('area','double'),
-    db.Field('modified_on','datetime'))

- now you can do:

##  add a comment in the forms
- db.circle.area.comment="(this is a comment)"

##  do not show area in create/edit forms
- db.circle.area.writable=False

-  ##  do not show now in display forms
- db.circle.modified_on.readable=False

##  automatically timestamp when record cretaed
- db.circle.modified_on.default=request.now

##  automatically timestamp when record is modified
- db.circle.modified_on.update=request.now

##  make the radius appear in bold in display and table
- db.circle.radius.represent=lambda value: B(value)

##  make a form that automatically computes area
- pi=3.1415
- form=SQLFOM(db.circle)
- if form.accepts(request.vars,
- onvalidation=lambda form: form.vars.area=pi*form.vars.radius**2): ...

##  make a create form in two possible ways:
- form=SQLFORM(db.circle)
- form=SQLFORM(db.circle,0)

##  make an update form in two possible ways:
- form=SQLFORM(db.circle,record)
- form=SQLFORM(db.circle,record_id)

##  make a display form in two possible ways:
- form=SQLFORM(db.circle,record,readonly=True)
- form=SQLFORM(db.circle,record_id,readonly=True)

##  so now you can do...

- form=SQLFORM(db.circle,request.args[-1])

- and you get a create form if the URL ends in /0, you get an update
- form if the URL ends in /[valid_record_id]

## you can also define once for all

- timestamp=SQLTable(None,'timestamp',
-             SQLField('created_on','datetime',
-                           writable=False,
-                           default=request.now),
-             SQLField('modified_on','datetime',
-                           writable=False,
-                           default=request.now,update=request.now))

## and use it in all your tables

- db.define_table('mytable',db.Field('somefield'),timestamp) 

## ## ## 

- One more feature in trunk....

-     db.define_table('image',SQLField('file','upload'))

-     db.image.file.authorize=lambda row: True or False

- then controller
-     def download(): return response.download(request,db)
- id' is now a hidden field sqlform
- gql references converted to long
- admin login has autofocus
- new notation proposed by Robin, db.table[id]
- new UploadWidget shows images
- new generic.html shows request, response, session
- new LEGEND helper (thanks Marcus)
- fixed doctests in sql (thanks Robin)
- new notation for DB

- record=db.table[id]
- db.table[id]=dict(...)
- del db.table[id]

- request.env.web2py_version
- new class gluon.storage.Settings has lock_keys, lock_values
- jquery 1.3.1
- PEP8 compliance
- new examples application
- runs on jython (no database drivers yet, thanks Phyo)
- fixed bugs in tests
- passes all unittest but test_rewite (not sure it should pass that one)

- Lots of patches from Fran Boone (about tools) and Dougla Soares de Andarde (Python 2.6 compliance, user use of hashlib instead of md5, new markdown2.py)

## 1.56.1-1.56.4
- fixing lots of small bugs with tool and languages
- jquery.1.3.2

## 1.57
- New ajax edit with keepalive (no longer logged out when editing code)
- Fixed conflict resolution page.
- Removed /user/bin/python from models/controllers

## 1.58
- Fixed some CRON bugs
- Fixed a bug with new ajax edit
- Experimental DB2 support in DAL
- Customizable font size in admin edit page
- New welcome/models/db.py shows how to memcache sessions on GAE with MEMDB
- More expressive titles in admin
- DB2 support. Thanks Denes!

## 1.59-1.60
- fixed lots of small bugs
- routes_in can filter by http_host

## 1.61
- fixed some typos
- auth.add_permissions(0,....) 0 indicates group of current user
- crud.update has deletable=True or False
- fixed issue with GAE detection -> gluon.settings.web2py_runtime -> request

## 1.62
- SQLFORMS and crud now show readble fields
- Better WingIDE support
- Languages are automatically translated
- T.force and lazyT works better, optional T.lazy=False
- gluon.storage.Messages are now translated without T
- if routes.py then request.env.web2py_original_uri
- db.table.field.isattachment = True
- internationalizaiton of admin by Yair
- admin.py by Alvaro
- new MENU helper
- new w2p file format
- new welcome app with auth, service and crud turned on

## 1.63-1.63.4
- no more import gluon.
- support for generic.xxx
- simplejson can handle datetime date and time

## 1.63.5
- You can do jQuery.noConflict() without breaking web2py_ajax
- Wigets can have attributes (thanks Hans)
- Lots of internal cleanup and better code reusage (thanks Hans)

## 1.64
- Models 2-3 times faster (thanks Alexey)
- Better LDAP support
- Works with Jython (including sqlite and postgresql with zxJDBC):

-   download jython-2.5rc3.jar
-   download qlite-jdbc-3.6.14.2.jar
-   java -jar jython-xxx.jar
-   export CLASSPATH=$CLASSPATH:/Users/mdipierro/jython2.5rc3/sqlite-jdbc-3.6.14.2.jar
-   cd web2py
-   ../jython2.5rc3/jython web2py.py

## 1.64.2
- New IS_COMPLEX validator, thank Mr. Freeze
- Experimental Informix support
- Autologin on registration

## 1.64.3
- Some bug fixes

## 1.64.4
- Som bug fixes
- Informix Support
- response.render(stream)
- SQLFORM.factory
- SQLFORM.widgets.radio and SQLFORM.widgets.checkboxes

## 1.65
- reST docstrings for Sphinx, thanks Hans
- gluon/conrtib/login_methods/gae_google_account.py for google CAS login on GAE, thanks Hans
- fixed problem with Auth and Firebird 'password' issue
- new auth.settings.create_user_groups
- tickets stored on datastore on GAE and also logged, thanks Hans
- imporved IS_LENGTH with max and min, thanks Mateusz
- improved IS_EMAIL with filters, thanks Mateusz
- new IS_IMAGE checks for format and size, thanks Mateusz
- new IS_IPV4, thanks Mateusz

## 1.65.1
- spreadsheet
- shell history, thanks sherdim
- crontab editor, thanks Angelo
- gluon/contrib/login_methods/cas_auth.py (thanks Hans)
- DAL(...) instead of SQLDB(...)
- DAL('gae') instead of GQLDB()
- Field instead of SQLField
- (the old syntax still works)

## 1.65.2
- Fixed some small auth bugs
- Field.store(...)

## 1.65.3-10
- Fixed some small bugs and typos in the docstrings
- Fixed AMF3 support

## 1.65.11
- Fixed a sqlhtml bug with image upload

## 1.65.12
- lables in auth auto-translate (thanks Alvaro)
- better ldap_auth (thanks Fran)
- auth chacks locally for blocked accounts even for alternate login methods (thanks Fran)

## 1.65.13
- request.url (thanks Jonathan)
- restored uploadfield_newfilename
- new examples layout nad logo (thanks Mateusz)

## 1.66
- new doctypes
- form.vars.newfilename
- new HTML and XHTML helpers
- better IS_LENGTH

## 1.67.0
- Python 2.4 support (again)
- New layout for welcome
- changed defauld field sizes to 512
- Field(uploadfolder="...")
- appadmin works on GAE (again, somehting got broken at some point)
- new wsgiserver 3.2.0 should fix recurrent broken download problems

## 1.67.1
- Bux fixed

## 1.67.2
- Security fix in markdown

## 1.68.1
- New official markdown with security fix
- rows.first()
- rows.last()
- New cron
- New hindi and spanish translation
- cached uploads allow for progress bars (thanks AndCycle)
- ingres support (thanks Chris)
- legacy database support for db2, mssql with non-int primary keys (thanks Denes)
- default setting of content-type (this may cause strange behavior in old apps when downloading images)
- IS_UPPER and IS_LOWER works with unicode
- CLENUP not takes regex of allowed/now allowed chartares
- New rewrite.py allows dynamic routes
- Better error messages for IS_INT_* and IS_FLOAT_*

## 1.68.2
- Fixing bug with admin and missing crontab
- Fixing bug with rewrite.load on GAE (thanks Willian Wang)

## 1.69.1
- Fixed a bug introduced in 1.68 about inserting unicode in DAL
- Fixed other small bugs
- Better support for legacy databases (thank Denes)
- response.meta replaces response.author, response.keywords, response.description
- response.files stets dependes in plugins
- better admin for packing/unpacking plugins
- reference fiels nor evaluate to DALRef with lazy evaluation (cool, thanks Mr Freeze)
- can insert a record in place of a reference
- record[e] instead of record._extra[e] (tentatively!)
- record.update_record() with no args
- rows.find()  (thanks Mr Freeze)
- rows.exclude()
- rows.sort()
- rows[:]

## 1.70.1
- Fixed bug with Rows.as_list and DALRef
- Added Rows.as_dict (thanks Mr Freeze and Thedeus)
- Added request.wsgi (thanks hcvst) allows running wsgi apps under web2py and applying wegi middleware to regular web2py actions that return strings.
- Experimental distributed transactions between postgresql, mysql and firebird
- Finally local_import is here!

## 1.71.1
- Complete rewrite of Rows
- renamed DALStorage->Rows, DALRef->Reference
- Experimental serializarion of Row and Rows (get serialized to dict and list of dict)
- DAL(...,folder) and template.render(content=, context=) make it more modular

## 1.72.1 - 1.72.3
- Better support for legacy databases

## 1.73.1
- Fixed problem with storage and comparison of Row objects
- Fixed problem with mail on GAE
- Fixed problem with T in IS_DATE(TIME) error_message and format
- Rows[i].delete_record()
- Even better support for legacy databases
- Experimantal support for non UTF8 encoding in DB
- Better IPV4 (thanks Thandeus)
- T.current_languages default to 'en' and new T.set_current_languages(...) (thanks Yarko)
- INPUT(...,hideerror=False) used to fix rare chechbox widget problem
- Admin allows change of admin password
- New gluon/contrib/populate.py
- Size of input/textarea set by CSS no more by jQuery  (thanks Iceberg)
- Customizable CSV  (thanks Thandeus)
- More bug fixed (thanks Thandeus)
- Better regex for template fixed Jython problem (thank Jonathan)

## 1.74.1
- Moved to mercurial
- Default validators use the new define_table(....,format='...')
- New get_vars and post_vars compatible in 2.5 and 2.6 (thanks Tim)
- Major rewrite of gql.py extends DAL syntax on GAE
- No more *.w2p, welcome.w2p is create automatically, base apps are always upgraded
- export_to_csv(delimiter = ',', quotechar = '"', quoting = csv.QUOTE_MINIMAL), thanks Thadeus 

## 1.74.2-4
- Fix bugs including including unicode in emails and blobs on GAE

## 1.74.5
- bug fixes
- restored python 2.4 support,thanks ont.rif
- support for native types on Google App Engine
- cache.ram usage statictics, thanks Thadus
- no more auth manu in scaffolding
- no more spash screen with -Q
- fixed doctest in html.py, thanks Anand Vaidya
- export_to_csv_file has represent, thanks Thadeus

## 1.74.6
- bug fixes
- IS_IN_DB(...,_and=IS_NOT_IN_DB)
- Smaller populate, thanks Piotr
- better slicing of fields, thanks Michael Fig
- Cache stats, thanks Thadeus
- Better gql.py
- IS_IN_DB and IS_IN_SET default to zero='', no longer zero=None

## 1.74.7
- request_password_reset and password reset verification
- python web2py.py -S app -M -R script.py -A arg1 arg2 arg3
- T("%(a)s") % dict(a="hello")

## 1.74.8
- IS_SLUG, thanks Gustavo and Jonathan
- web2py.py -nogui, thanks Jeff Bauer
- solved a problem with jython, thanks Tim Farrel
- login has "remember be option", thanks Piotr Banasziewicz
- fixed problem with keepvalue in update forms, thanks Miguel Lopez

## 1.74.9
- IS_IN_SET(((0,'label0'),(1,'label1'))), thanks Falko Krause
- SQLFORM(...).accpets stores True or False in boolean types no None, thanks Frederik Wagner
- SQLFORM.factory(...,table_name='no_table'), thanks Thedeus
- jQuery 1.4.1
- Fixed major problem with internationalization of multiple languages.
- Fixed a serius security issue with login
- Possibly fixed some issues with cron

## 1.75.1
- better cron
- better fetch
- logging of email failures
- new web2py.fedora.sh
- new setup-web2py-ubuntu.sh
- experimental autocomplete
- menus work on IE6

## 1.75.2
- fetch supports cache
- curd.update(....,onaccept=crud.archive) magic
- new UUID mechnism fixes session conflicts with cloned machine in cloud
- allow to upload app and overwrite existing old ones, thanks Jonathan
- print gluon.tools.prettydate(request.now,T), thanks Richard

## 1.75.3
- added support for PAM authentican for apps and for admin
- INTRODUCED MAJOR BUG IN BEAUTIFY (upgrade to 1.75.4) IMMEDIATELY

## 1.75.4
- customizable BEAUTIFY, thanks John

## 1.75.5
- fixed behaviour with languages.py, thanks Iceberg
- added chinese (thanks Iceberg) and Hungarian (thanks Gyuris)
- fixed problem with GAE deleted by id (thanks what_ho)
- fixed bug in LOAD with custom views, thanks vhang
- improved IS_IN_SET takes iterator, dict, list and list of tuples, thanks Iceberg
- Auth(...,controller='default')
- Fixed major bug in parsing repeated request.vars, thanks Ben
- IS_DATE and IS_DATETIME can now handle any 0<year
- allow to disable editarea onload, thanks Alex

## 1.76.1
- editarea 0.8.2 + zencoding
- new (better) cron locking meachnism
- no storing session cookies on session.forget(), thank you Alvaro
- routes_apps_raw allows disabling of request.args validation, thanks Jonathan and Denes
- fixed problem with edit_languages ad multiple tabs, thanks Iceberg
- crud captcha, thanks you Nathan
- softcron disabled by default in wsgihandler and fcgihandler

## 1.76.2-1.76.3
- major fix in cron (will I ever get this 100% right?)
- fix in delete for GAE
- auth.settings.login_captcha and auth.settings.register_captcha
- crud.settings.create_captcha and  crud.settings.update_captcha
- automatic update button in admin 

## 1.76.4
- SQLTABLE(db(db.auth_user.id>0).select(),headers='fieldname:capitalize')
- Oracle limitby improved (thanks Sergey)
- fixed migrations in Firebird, thanks Jose Jachuf
- gluon/contrib/login_methods/linkedin_account.py (to be tested)

## 1.76.5
- Fixed a typo in auth that created some registration problems

## 1.77.1
- Replaced CherryPy with Rocket web server, thanks Tim
- CacheOnDisk allows to specify a folder
- IS_DATE/DATETIME can handle any year since 0
- SQLTABLE(...,headers='fieldname:capitalize')
- Field().with_alias, thanks Nathan and Mengu
- has_membership(group=...,role=...), thank Jonathan
- db.define_table(username=True), thanks Jonathan
- gluon.tools.prettydate
- can specify hostname in routes_out (same syntax as routes in), thanks Martin
- db.table.bulk_insert([...records...]) now works on GAE, thanks Jon
- IS_EMAIL validates on 'localhost', thanks Jonathan
- welcome/views/layout.html uses ez.css, thanks Yarko
- mail attachments support utf8, thanks szimszon
- works with PyPy, thanks Joe
- better Firebird support, thanks Jose
- better Oracle support, thanks Gabriele
- cron supports days of week
- SQLFORM(...,formstyle="table3cols") or "table2cols" or "divs" or "ul"
- crud.settings.formstyle
- web2py.py -f folder allows to specify locations of applications, thanks Iceberg
- better/faster regex in template works in Jython
- fixed lots of small bugs

## 1.77.2
- fixed x-index in calendar
## 1.77.3
- some cleanup of code in compileapp

## 1.78.1
- new template system allows {{block name}}{{end}}, thanks Thadeus
- fixed mime headers in emails, included PGP in emails, thanks Gyuris
- automatic database retry connect when pooling and lost connections
- OPTGROUP helper, thanks Iceberg
- web2py_ajax_trap captures all form submissions, thank you Skiros
- multicolumn checkwidget and arbitrary chars in multiple is_in_set, thanks hy 
- Québécois for welcome, thanks Chris
- crud.search(), thanks Mr Freeze
- DAL(...migrate,fake_migrate), thanks Thadeus

## 1.78.3
- reverted temporarily to old template system because of backward compatibility issues

## 1.79.1
- x509 emails, thanks Gyuris
- attachment and html in Mail on GAE, thanks PanosJee
- fixed docstring in SQLTABLE, thanks aabelyakov
- TAG(html) parese html into helpers (experimental, still some problems with unicode, , thanks RobertVa for unicode help)
- DIV.elements(find=re.compile(....))
- DIV.flatten()
- DIV.elements('....') supports jQuery syntax in '....'
- better it-it.py and it.py, thanks Marcello Della Longa
- Many Bug fixes:
- improved support for DAL and joins in postgresql/oracle, thanks Nico de Groot
- bux fixex in html.py, thanks Ian
- fixed an issue with registration_key==None, thanks Jay Kelkar
- fixed bug in gql.py, thanks NoNoNo
- fixed problem with multiple and checkboxes, thanks MIchael Howden
- fixed bug in gae, thanks NoNoNo
- restored 2.4 compatibility, thanks Paolo Gasparello
- auth.update() when pictures in profile
- formstyle can be a function, thanks Howden
- escape in sanitizer, thanks Howes
- add missing settings, thanks Hamdy
- find and exclude return empty Rows instead of [], thanks iceberg
- simplejson 2.1.1 should fix compatibility problems
- added sms_utils and Authorize.net in contrib

## 1.79.2
- solved simplejson imcompatibility problem

## 1.80.1
- MARKMIN helper (no backward compatibility promise yet)
- self._last_reference, thanks Dave (no backward compatibility promise yet)
- IS_EQUAL_TO
- zh-tw and better internationalization page, thanks Daniel Lin and Iceberg
- better crud.search, thanks MrFreeze
- Rocket interfaces, thanks Nik Klever
- db.table.field.uploadseparate=True, thanks Gyuris
- SCOPE_IDENITY for MSSQL, thanks Jose
- fixed email attachment issue, thanks Bob_in_Comox
- fixed problem with groupby and IS_IN_DB
- other bug fixes
- new implementation for local_import
- ajax(..,...,null)
- fixed Chrome bug in calendar.js, thanks Iceberg
- experimental scrips/web2py-setup-fedora.sh
- generic.load, thanks Iceberg

## 1.81.1
- rpx (janrain) support out of the box, allows login with Facebook, MySpace, etc. Thanks Mr Freeze
- Increased security (escape  single and double quotes, thanks Craig"
- Fixed a bug with db.table.field.uploadseparate=True and autodelete
- New welcome app with superfish and jQuery 1.4.2
- Deleted openwysiwyg from admin
- In XML and xmlescape quote defaults to True. Both ' and " are escaped. Thanks Craig Younkins

## 1.81.2
- fixed bug in Auth

## 1.81.3
- fixed bug in label names in formstyle
- fixed id names in admin test.html page

## 1.81.4
- Fixed gluon.tools to work work with load and base.css to nowrap labels

## 1.81.5
- Fixed a few bugs. The most important bugs we fixed are in memcache (thanks Scott) and in a process starvation issue with Rocket (thanks Mike Ellis and Tim).

## 1.82.1
- request.ajax to detect if action is called via ajax, tahnks Jonathan and David Mako
- more captcha options, thanks Vidul
- openid and oauth2 thanks Michele and Keith
- better PluginManager and load components
- new template system, thanks Thadeus
- new db.table(id,[field=value]) and db.table(query) syntax
- URL('index') (no more r=request), thanks Thadeus
- mail.send(message='<html>...</html>', ....)
- DAL([....]) for load balancing
- @service.soap(...) with mysimplesoap, thanks Mariano
- hideerror

## 1.83.1
- New error reporting mechanism (thanks Mariano)
- New routing system with app level routing (thanks Jonathan)
- Integrated GAE appstat and GAE precompilation (thanks Scott)
- New Field types "list:string", "list:integer", "list:reference"
- request.cid, request.ajax, A(cid=request.cid), response.js

## 1.83.2
- mostly cleanup

## 1.84.1-4
- flash now stays put in the top right corner
- improved behavior for URL and T objects
- new app level logging with logging.conf (thanks Jonathan)
- improved OpenID (thanks Michele)
- web2py_ajax handles prepend, append, hide (thanks Juris)
- web2py_ajax also handels pre-validation of decimal fields
- ru-ru translation (thanks Michele)
- sk-sk translation (thanks Julius)
- migrations save .table only if changed and after each ALTER TABLE (no more mysql inconsistencies)
- fixed bugs in SQLCustomField, Field(default=...), IS_IMAGE, IS_DECIMAL_IN_RANGE and a few more.
- Better validators (IS_DECIMAL_IN_RANGE, IS_INT_IN_RANGE, etc) thanks Jonatham
- Polymmodel support on GAE
- Experimental ListWidget
- moved DAL and routes to thread.local (thanks Jonathan, again)
- scripts/extract_mysql_models.py, thanks Falko Krause and Ron McOuat 
- scripts/dbsessions2trash.py, thanks Scott

## 1.85.1-3
- fixed some bugs
- added pyfpdf, thank Mariano

## 1.86.1-1.86.3
- markmin2latex 
- markmin2pdf
- fixed some bugs
- Storage getfirst, getlast, getall by Kevin and Nathan
- db(db.table), db(db.table.id) both suported and equivalent to db(db.table.id>0)
- postresql ssl support
- less un-necessary logging and warnings on GAE
- IS_DECIMAL_IN_RANGE and IS_FLOAT_IN_RANGE support dot="," (dot="." is default)
- on_failed_authorization can be a function, thanks Niphold
- gluon/contrib/login_methods/cas_auth.py for integration between CAS and Auth.

## 1.86.3
- Error reporting on save, thanks Mariano
recalled

## 1.87.1-2
- new layout for examples, thanks Bruno and Martin
- admin allow ``DEMO_MODE=True`` and ``FILTER_APPS=['welcome']``
- fixed a possible problem with CRON and paths


## 1.87.3
- fixed a major bug introduced in 1.87.1 that prevents appadmin from working for new apps created with 1.87.1-2.
- upgraded to clockpick 1.28, thanks villas

## 1.88.1-2
- better list: string support, thanks Bob
- jquery 1.4.3
- scripts/autoroutes.py
- new admin wizard
- added retrieve_username to navbar (if username)
- internal rewrite for arbitrary paths (abspath), thanks Jonathan
- populate support for list: and decimal, thanks Chirstian
- markmin2latex has extra attribute
- better mercual admin allows list of files, versions and retrieve
- new error report system, thanks Thadeus and Selecta
- SQLFORM.accepts(detect_record_change).record_changed
- fixed cron for bytecode compiled apps, thanks Álvaro J. Iradier Muro
- other bugs fixes and pep8 compliant fixes

## 1.89.1-.5
- new admin layout (thanks Branko Vukelic)
- new admin search
- new admin language selector (thanks Yair)
- new Welcome app (thanks Martin Mulone)
- better wizard
- admin support for DEMO_MODE=True
- admin exposes GAE deployment button (always)
- MENU support None links (thanks Michael Wolfe)
- web2py.py -J for running cron (thanks Jonathan Lundell)
- fixed ~db.table.id on GAE (thanks MicLee)
- service.jsonrpc supports service.JsonRpcException (thanks Matt)
- bug fixes

## 1.90.1
- new DAL (complete rewrite of the web2py DAL is more modular)
- rewrite has fail safe reload, thanks Jonathan
- better CAS with v2 support, thanks Olivier ROCH VILATO
- better markmin2latex
- session.connect(separate=True) to handle many session files, thanks huaiyu wang
- changed bahvior of impersonate (more secure, can generate form or used as API)
- new rocket, thanks Tim
- new pyfpdf
- no more old style classes
- experimental couchdb support in new dal (only insert, select, update by id)
- mysql support out of the box via pymysql
- SQLITABLE(...,headers='labels') thanks Bruno
- optional: digitally signed URLs, thanks Brian Meredyk
- minor bug fixes

## 1.90.2-4
- pymysql no longer requires ssl (if not used)
- fixed bug with virtualfields
- fixed bug in truncate (new dal)
- fixed bug in select with alternate primary key (new dal)
- fixed bug with IS_IN_DB and self refences (also new dal)

## 1.90.5
- set poll = False in rocket because of poll python thread bug often unfixed, thanks Jonathan
- fixes issue with crud and reCaptcha

## 1.90.6
- fix issue with pickling new dal Row and Rows.

## 1.91.1
- LICENSE CHANGE FROM GPLv2 to LGPLv3
- URL(...,hash_vars=...) allows to specify which vars need to be signed
- fixed bug with aliasing in new DAL

## 1.91.2-1.91.5
- fixed a problem with deplyment on GAE
- other new dal bug fixes

## 1.91.6
- web2py comet via gluon/contrib/comet_messaging.py (html5 websockets) experimental
- fixed problem with services (broken in 1.91.5), thanks Vollrath
- customizable uploadwidget, thanks Fran
- fixed problem with mail unicode support, thanks Richard
- fixed problem with linkto=None and references fields in SQLTABLE, thanks villas
- no more upgrade button on windows since does not work
- better remember-me login, thanks Martin Weissenboeck
- support for recatcha options
- support for GAE namespaces via DAL('gae://namespace')
- new rocket (1.2.2), thanks Tim
- many other bug fixes and improvements (thanks Jonathan)

## 1.92.1
- much improved routing (thanks Jonathan)
- Expression.__mod__ (thanks Denes)
- admin has MULTI_USER_MODE (admin/models/0.py)
- support for count(distinct=...)
- has_permissions(...,group_id)
- IS_MATCH(...,strict=True)
- URL(...,scheme=,host=,port=), thanks Jonathan
- admin in Afrikaans, thanks Caleb
- auth.signature (experimental)
- many other bug fixes

## 1.93.1-2
- support for multiple interfaces, thanks Jonathan
- jquery 1.5.1
- simplejson 2.1.3
- customizable simplejson
- leaner app.yaml
- css3 buttons in welcome
- android support (experimental)
- Field(':hidden'), Field('.readonly'), Field('name=value')
- combined expressions print db.data.body.len().sum()
- wizard can download plugins
- better json serilization (object.custom_json)
- better xml serialization (object.custom_xml)
- better formstyle support
- better comet_messaging.py (needs more testing)
- many bug fixes

## 1.94.1
- moderniz 1.17
- web2py no longer saves session if no change, this makes it up up to 10x faster for simple actions
- experimental REST API
- better support for MSSQL NOT NULL
- small bug fixes

## 1.94.2
- reverted wrong behavior of auth.requires(condition) in 1.94.1

## 1.94.3
- fixed major bug in auth redirection

## 1.94.4
- removed debug print statement that caused problems on GAE and mod_wsgi

## 1.94.5
- fixed a major bug with session introdued in 1.94.1

## 1.94.6
- fixed a number of minor bugs including adding some missing files
- better session handling on session._unlock(..), thanks Jonathan
- added experimental pip support, thanks Lifeeth
- added experimental SAP DB support

## 1.95.1
- Google MySQL support (experimental)
- pip support, thanks lifeeth
- better setup_exe.py, thanks meredyk
- importved pyfpdf
- domain check in email_auth.py, thanks Gyuris
- added change_password_onvalidation and change_password_onaccept
- DAL(...,migrate_enabled=True)
- login_methods/loginza.py, thanks Vladimir
- bpython shell support, thanks Arun
- request.uuid and response.uuid (for a future toolbar)
- db._timings contains database query timing info
- efficient db(...).isempty()
- setup-web2py-nginx-uwsgi-ubuntu.sh
- Many bug fixes, thanks Jonathan

## 1.96.1

- "from gluon import *" imports in every python module a web2py environment (A, DIV,..SQLFORM, DAL, Field,...) including current.request, current.response, current.session, current.T, current.cache, thanks Jonathan.
- conditional models in 
  models/<controller>/a.py and models/<controller>/<function>/a.py
- from mymodule import *, looks for mymodule in applications/thisapp/modules first and then in sys.path. No more need for local_import. Thanks Pierre.
- usage of generic.* views is - by default - restricted to localhost for security. This can be changed in a granular way with: response.generic_patterns=['*']. This is a slight change of behavior for new app but a major security fix.

- all applications have cas 2.0 provider at http://.../user/cas/login
- all applications can delegate to login to external provider Auth(...,cas_provider='http://.../other_app/default/user/cas')
- A(...,callback=URL(...),larget='id') does Ajax
- URL(...,user_signature=True), LOAD(...,user_signature=True) can sign urls and @auth.requires_signature() will check the signature for any decorated action.

- DAL(...,migrate_enabled=False) to disable all migrations
- DAL(...,fake_migrate_all=True) to rebuild all corrupted metadata
- new DAL metadata format (databases/*.table)
- DAL(...,adapter_arg={}) allows support for alternate drivers
- DAL now allows circular table defintions
- DAL(..,auto_import=True) automatically imports tables from metadata without need to db.define_table(...)s.
- new alterante syntax for inner joins: db(...).select(join=...)
- experimental cubrid database support
- DAL 'request_tenant' fields are special, the altomatically filer all records based on their default value.
- db._common_fields.append(Field('owner')) allows to add fields to ALL tables
- DAL ignores repeated fields with same names

- web2py_ajax.html is more modular, thanks Anthony
- request.is_local
- request.is_http
- new sessions2trash.py thanks Jim Karsten
- corrupted cache files are automatically deleted
- new simpler API gluon.contrib.AuthorizeNet.procss(...)
- fixed recaptcha (as they released new API)
- messages in validators have default internationalization
- No more Auth(globals(),db), just Auth(db). Same for Crud and Service.
- scripts/access.wsgi allows apache+mod_wsgi to delegate authentication of any URL to any web2py app
- json now supports T(...) 
- scripts/setup-web2py-nginx-uwsgi-ubuntu.sh
- web2py HTTP responses now set: "X-Powered-By: web2py", thanks Bruno
- mostly fixed generic.pdf. You can view any page in PDF if you have pdflatex installed or if your html follows the pyfpdf convention.
- auth.settings.extra_fields['auth_user'].append(Field('country')) allows to extend auth_* tables without need of definiting a custom auth_* table. Must be placed before auth.define_tables()
- {{=response.toolbar()}} to help you debug applications
- web based shell now supports object modifications (but no redefinitions of non-serializable types)
- jQuery 1.6.1
- Lots of bug fixes

# 1.96.2-1.96.4
- bug fixes

# 1.97.1
- validate_and_update, thanks Bruno
- fixed problem with new custom import, thanks Mart
- fixed pyamf 0.6, thanks Alexei and Nickd
- fixed "+ =" bug in wizard
- fixed problem with allowed_patterns
- fixed problems with LOAD and vars and ajax
- closed lots of google code tickets
- checkboxes should now work with list:string
- web2py works on Android, thanks Corne Dickens
- new cpdb.py, thanks Mart
- improved translation (frech in particuler), thanks Pierre
- improved cas_auth.py, thanks Sergio
- IS_DATE and IS_DATETIME validators now work with native types
- better description of --shell, thanks Anthony
- extra SQLTABLE columns, thanks Martin
- fixed toolbar conflics, thanks Simon
- GAE password shows with ****

# 1.98.1
- fixed some problems with LOAD(ajax=False), thanks Anthony
- jquery 1.6.2
- gevent.pywsgi adds ssl support, thanks Vasile
- import/export of blobs are base64 encoded
- max number of login attemts in admin, thanks Ross
- fixed joins with alias tables
- new field.custom_delete attribute
- removed resctions on large 'text fields, thanks Martin
- field.represent = lambda value,record: .... (record is optional)
- FORM.validate() and FORM.process(), thanks Bruno
- faster visrtualfields, thanks Howsec
- mail has ssl support separate from tls, thanks Eric
- TAG objects are now pickable
- new CAT tag for no tags
- request.user_agent(), thanks Ross
- fixed fawps support
- SQLFORM(...,separator=': ') now customizable
- many small bug fixes

Added VERSION version [2164f2cc2a].


1
+
Version 1.98.2 (2011-08-04 00:47:09)

Added __init__.py version [adc83b19e7].


1
+

Added anyserver.py version [b44d99a317].


































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

This file is based, althought a rewrite, on MIT code from the Bottle web framework.
"""

import os, sys, optparse
path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]
import gluon.main
from gluon.fileutils import read_file, write_file

class Servers:
    @staticmethod
    def cgi(app, address=None, **options):
        from wsgiref.handlers import CGIHandler
        CGIHandler().run(app) # Just ignore host and port here

    @staticmethod
    def flup(app,address, **options):
        import flup.server.fcgi
        flup.server.fcgi.WSGIServer(app, bindAddress=address).run()

    @staticmethod
    def wsgiref(app,address,**options): # pragma: no cover
        from wsgiref.simple_server import make_server, WSGIRequestHandler
        class QuietHandler(WSGIRequestHandler):
            def log_request(*args, **kw): pass
        options['handler_class'] = QuietHandler
        srv = make_server(address[0],address[1],app,**options)
        srv.serve_forever()

    @staticmethod
    def cherrypy(app,address, **options):
        from cherrypy import wsgiserver
        server = wsgiserver.CherryPyWSGIServer(address, app)
        server.start()

    @staticmethod
    def rocket(app,address, **options):
        from gluon.rocket import CherryPyWSGIServer
        server = CherryPyWSGIServer(address, app)
        server.start()

    @staticmethod
    def rocket_with_repoze_profiler(app,address, **options):
        from gluon.rocket import CherryPyWSGIServer
        from repoze.profile.profiler import AccumulatingProfileMiddleware
        from gluon.settings import global_settings
        global_settings.web2py_crontype = 'none'
        wrapped = AccumulatingProfileMiddleware(
            app,
            log_filename='wsgi.prof',
            discard_first_request=True,
            flush_at_shutdown=True,
            path = '/__profile__'
            )
        server = CherryPyWSGIServer(address, wrapped)
        server.start()

    @staticmethod
    def paste(app,address,**options):
        from paste import httpserver
        from paste.translogger import TransLogger
        httpserver.serve(app, host=address[0], port=address[1], **options)

    @staticmethod
    def fapws(app,address, **options):
        import fapws._evwsgi as evwsgi
        from fapws import base
        evwsgi.start(address[0],str(address[1]))
        evwsgi.set_base_module(base)
        def app(environ, start_response):
            environ['wsgi.multiprocess'] = False
            return app(environ, start_response)
        evwsgi.wsgi_cb(('',app))
        evwsgi.run()


    @staticmethod
    def gevent(app,address, **options):
        from gevent import monkey; monkey.patch_all()
        from gevent import pywsgi
        from gevent.pool import Pool
        pywsgi.WSGIServer(address, app, spawn = 'workers' in options and Pool(int(option.workers)) or 'default').serve_forever()

    @staticmethod
    def bjoern(app,address, **options):
        import bjoern
        bjoern.run(app, *address)

    @staticmethod
    def tornado(app,address, **options):
        import tornado.wsgi
        import tornado.httpserver
        import tornado.ioloop
        container = tornado.wsgi.WSGIContainer(app)
        server = tornado.httpserver.HTTPServer(container)
        server.listen(address=address[0], port=address[1])
        tornado.ioloop.IOLoop.instance().start()

    @staticmethod
    def twisted(app,address, **options):
        from twisted.web import server, wsgi
        from twisted.python.threadpool import ThreadPool
        from twisted.internet import reactor
        thread_pool = ThreadPool()
        thread_pool.start()
        reactor.addSystemEventTrigger('after', 'shutdown', thread_pool.stop)
        factory = server.Site(wsgi.WSGIResource(reactor, thread_pool, app))
        reactor.listenTCP(address[1], factory, interface=address[0])
        reactor.run()

    @staticmethod
    def diesel(app,address, **options):
        from diesel.protocols.wsgi import WSGIApplication
        app = WSGIApplication(app, port=address[1])
        app.run()

    @staticmethod
    def gnuicorn(app,address, **options):
        import gunicorn.arbiter
        gunicorn.arbiter.Arbiter(address, 4, app).run()

    @staticmethod
    def eventlet(app,address, **options):
        from eventlet import wsgi, listen
        wsgi.server(listen(address), app)


def run(servername,ip,port,softcron=True,logging=False,profiler=None):
    if logging:
        application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
                                            logfilename='httpserver.log',
                                            profilerfilename=profiler)
    else:
        application = gluon.main.wsgibase
    if softcron:
        from gluon.settings import global_settings
        global_settings.web2py_crontype = 'soft'
    getattr(Servers,servername)(application,(ip,int(port)))

def main():
    usage = "python anyserver.py -s tornado -i 127.0.0.1 -p 8000 -l -P"
    try:
        version = read_file('VERSION')
    except IOError:
        version = ''
    parser = optparse.OptionParser(usage, None, optparse.Option, version)
    parser.add_option('-l',
                      '--logging',
                      action='store_true',
                      default=False,
                      dest='logging',
                      help='log into httpserver.log')
    parser.add_option('-P',
                      '--profiler',                      
                      default=False,
                      dest='profiler',
                      help='profiler filename')
    servers = ', '.join(x for x in dir(Servers) if not x[0]=='_')
    parser.add_option('-s',
                      '--server',
                      default='rocket',
                      dest='server',
                      help='server name (%s)' % servers)
    parser.add_option('-i',
                      '--ip',
                      default='127.0.0.1',
                      dest='ip',
                      help='ip address')
    parser.add_option('-p',
                      '--port',
                      default='8000',
                      dest='port',
                      help='port number')
    parser.add_option('-w',
                      '--workers',
                      default='',
                      dest='workers',
                      help='number of workers number')
    (options, args) = parser.parse_args()
    print 'starting %s on %s:%s...' % (options.server,options.ip,options.port)
    run(options.server,options.ip,options.port,logging=options.logging,profiler=options.profiler)

if __name__=='__main__':
    main()

Added app.example.yaml version [090b9f077a].

























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#  For Google App Engine deployment, copy this file to app.yaml
#  and edit as required
#  See http://code.google.com/appengine/docs/python/config/appconfig.html
#  and http://web2py.com/book/default/chapter/11?search=app.yaml

application: web2py
version: 1
api_version: 1
runtime: python

default_expiration: "24h"

derived_file_type:
- python_precompiled

handlers:

- url: /_ah/stats.*
  script: $PYTHON_LIB/google/appengine/ext/appstats/ui.py
  login: admin

- url: /(?P<a>.+?)/static/(?P<b>.+)
  static_files: applications/\1/static/\2
  upload: applications/(.+?)/static/(.+)
  secure: optional

- url: /favicon.ico
  static_files: applications/welcome/static/favicon.ico
  upload: applications/welcome/static/favicon.ico

- url: /robots.txt
  static_files: applications/welcome/static/robots.txt
  upload: applications/welcome/static/robots.txt

- url: /_ah/admin/.*
  script: $PYTHON_LIB/google/appengine/ext/admin
  login: admin

- url: /_ah/queue/default
  script: gaehandler.py
  login: admin

- url: .*
  script: gaehandler.py
  secure: optional

admin_console:
  pages:
  - name: Appstats
    url: /_ah/stats

skip_files: |
 ^(.*/)?(
 (app\.yaml)|
 (app\.yml)|
 (index\.yaml)|
 (index\.yml)|
 (#.*#)|
 (.*~)|
 (.*\.py[co])|
 (.*/RCS/.*)|
 (\..*)|
 (applications/(admin|examples)/.*)|
 ((admin|examples|welcome)\.(w2p|tar))|
 (applications/.*?/(cron|databases|errors|cache|sessions)/.*)|
 ((logs|scripts)/.*)|
 (anyserver\.py)|
 (web2py\.py)|
 ((cgi|fcgi|modpython|wsgi)handler\.py)|
 (epydoc\.(conf|css))|
 (httpserver\.log)|
 (logging\.example\.conf)|
 (route[rs]\.example\.py)|
 (setup_(app|exe)\.py)|
 (splashlogo\.gif)|
 (parameters_\d+\.py)|
 (options_std.py)|
 (gluon/tests/.*)|
 (gluon/(rocket|winservice)\.py)|
 (contrib/(gateways|markdown|memcache|pymysql)/.*)|
 (contrib/(populate|taskbar_widget)\.py)|
 (google_appengine/.*)|
 (.*\.(bak|orig))|
 )$

builtins:
- remote_api: on
- datastore_admin: on

Added appengine_config.py version [72d08f192b].





1
2
3
4
+
+
+
+
def webapp_add_wsgi_middleware(app):
    from google.appengine.ext.appstats import recording
    app = recording.appstats_wsgi_middleware(app)
    return app

Added applications/__init__.py version [da39a3ee5e].

Added applications/admin/ABOUT version [ea96ed160b].







1
2
3
4
5
6
+
+
+
+
+
+
web2py is an open source full-stack framework for agile development 
of secure database-driven web-based applications, written and programmable in 
Python. 

Created by Massimo Di Pierro <mdipierro@cs.depaul.edu>

Added applications/admin/LICENSE version [4719a3b620].










































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## Web2py License

Web2py is Licensed under the LGPL license version 3 
(http://www.gnu.org/licenses/lgpl.html)

Copyrighted (c) by Massimo Di Pierro (2007-2011)

### On Commercial Redistribution

In accordance with LGPL you may:
- redistribute web2py with your apps (including official web2py binary versions)
- release your applications which use official web2py libraries under any license you wish
But you must:
- make clear in the documentation that your application uses web2py
- release any modification of the web2py libraries under the LGPLv3 license

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 
NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT 
HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, 
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES 
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER 
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

(Earlier versions of web2py, 1.0.*-1.90.*, were released under the GPL2 license plus a
commercial exception which, for practical purposes, was very similar to the current LPGLv3)

### Licenses for third party contributed software

web2py contains third party software under the gluon/contrib/ folder.
Each file/module in contrib is distributed with web2py under its original license.
Here we list some of them.

#### gluon.contrib.simplejson LICENSE

Copyright (c) 2006 Bob Ippolito - 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.

#### gluon.contrib.rss2.py (originally PyRSS2Gen) LICENSE

This is copyright (c) by Dalke Scientific Software, LLC and released under the
BSD license.  See the file LICENSE in the distribution or 
<http://www.opensource.org/licenses/bsd-license.php> for details.

#### gluon.contrib.markdown (markdown2) LICENSE

MIT License from from <http://code.google.com/p/python-markdown2/>

#### gluon.contrib.feedparser LICENSE

Copyright (c) 2002-2005, Mark Pilgrim

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.

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.

#### gluon.wsgiserver.py LICENSE (borrowed from cherrypy)

Copyright (c) 2004, CherryPy Team (team@cherrypy.org)
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.
    * Neither the name of the CherryPy Team nor the names of its contributors 
      may 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.

#### gluon.contrib.pam LICENSE

Copyright (C) 2007-2009 Chris AtLee <chris@atlee.ca> Licensed under the MIT license

#### gluon.contrib.shell LICENSE

Copyright (C) by Google inc. Apache 2.0 Lincense

#### The javascript licenses are in the code itself

Added applications/admin/__init__.py version [da39a3ee5e].

Added applications/admin/controllers/appadmin.py version [1eb6fe022d].

























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################

import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils

# ## critical --- make a copy of the environment

global_env = copy.copy(globals())
global_env['datetime'] = datetime

http_host = request.env.http_host.split(':')[0]
remote_addr = request.env.remote_addr
try:
    hosts = (http_host, socket.gethostname(),
             socket.gethostbyname(http_host),
             '::1','127.0.0.1','::ffff:127.0.0.1')
except:
    hosts = (http_host, )

if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
     in ['https', 'HTTPS']:
    session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
    raise HTTP(200, T('appadmin is disabled because insecure channel'))

if (request.application=='admin' and not session.authorized) or \
        (request.application!='admin' and not gluon.fileutils.check_credentials(request)):
    redirect(URL('admin', 'default', 'index'))

ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
                 args=[request.application])], [T('db'), False,
                 URL('index')], [T('state'), False,
                 URL('state')], [T('cache'), False,
                 URL('ccache')]]

# ##########################################################
# ## auxiliary functions
# ###########################################################


def get_databases(request):
    dbs = {}
    for (key, value) in global_env.items():
        cond = False
        try:
            cond = isinstance(value, GQLDB)
        except:
            cond = isinstance(value, SQLDB)
        if cond:
            dbs[key] = value
    return dbs


databases = get_databases(None)


def eval_in_global_env(text):
    exec ('_ret=%s' % text, {}, global_env)
    return global_env['_ret']


def get_database(request):
    if request.args and request.args[0] in databases:
        return eval_in_global_env(request.args[0])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_table(request):
    db = get_database(request)
    if len(request.args) > 1 and request.args[1] in db.tables:
        return (db, request.args[1])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_query(request):
    try:
        return eval_in_global_env(request.vars.query)
    except Exception:
        return None


def query_by_table_type(tablename,db,request=request):
    keyed = hasattr(db[tablename],'_primarykey')
    if keyed:
        firstkey = db[tablename][db[tablename]._primarykey[0]]
        cond = '>0'
        if firstkey.type in ['string', 'text']:
            cond = '!=""'
        qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
    else:
        qry = '%s.%s.id>0' % tuple(request.args[:2])
    return qry



# ##########################################################
# ## list all databases and tables
# ###########################################################


def index():
    return dict(databases=databases)


# ##########################################################
# ## insert a new record
# ###########################################################


def insert():
    (db, table) = get_table(request)
    form = SQLFORM(db[table], ignore_rw=ignore_rw)
    if form.accepts(request.vars, session):
        response.flash = T('new record inserted')
    return dict(form=form,table=db[table])


# ##########################################################
# ## list all records in table and insert new record
# ###########################################################


def download():
    import os
    db = get_database(request)
    return response.download(request,db)

def csv():
    import gluon.contenttype
    response.headers['Content-Type'] = \
        gluon.contenttype.contenttype('.csv')
    db = get_database(request)
    query = get_query(request)
    if not query:
        return None
    response.headers['Content-disposition'] = 'attachment; filename=%s_%s.csv'\
         % tuple(request.vars.query.split('.')[:2])
    return str(db(query).select())


def import_csv(table, file):
    table.import_from_csv_file(file)

def select():
    import re
    db = get_database(request)
    dbname = request.args[0]
    regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
    if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
        regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
    if request.vars.query:
        match = regex.match(request.vars.query)
        if match:
            request.vars.query = '%s.%s.%s==%s' % (request.args[0],
                    match.group('table'), match.group('field'),
                    match.group('value'))
    else:
        request.vars.query = session.last_query
    query = get_query(request)
    if request.vars.start:
        start = int(request.vars.start)
    else:
        start = 0
    nrows = 0
    stop = start + 100
    table = None
    rows = []
    orderby = request.vars.orderby
    if orderby:
        orderby = dbname + '.' + orderby
        if orderby == session.last_orderby:
            if orderby[0] == '~':
                orderby = orderby[1:]
            else:
                orderby = '~' + orderby
    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 '',
                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',
                _class='delete', _type='checkbox', value=False), ''),
                TR('', '', INPUT(_type='submit', _value='submit'))),
                _action=URL(r=request,args=request.args))
    if request.vars.csvfile != None:
        try:
            import_csv(db[request.vars.table],
                       request.vars.csvfile.file)
            response.flash = T('data uploaded')
        except Exception, e:
            response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
    if form.accepts(request.vars, formname=None):
#         regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
        regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')

        match = regex.match(form.vars.query.strip())
        if match:
            table = match.group('table')
        try:
            nrows = db(query).count()
            if form.vars.update_check and form.vars.update_fields:
                db(query).update(**eval_in_global_env('dict(%s)'
                                  % form.vars.update_fields))
                response.flash = T('%s rows updated', nrows)
            elif form.vars.delete_check:
                db(query).delete()
                response.flash = T('%s rows deleted', nrows)
            nrows = db(query).count()
            if orderby:
                rows = db(query).select(limitby=(start, stop),
                        orderby=eval_in_global_env(orderby))
            else:
                rows = db(query).select(limitby=(start, stop))
        except Exception, e:
            (rows, nrows) = ([], 0)
            response.flash = DIV(T('Invalid Query'),PRE(str(e)))
    return dict(
        form=form,
        table=table,
        start=start,
        stop=stop,
        nrows=nrows,
        rows=rows,
        query=request.vars.query,
        )


# ##########################################################
# ## edit delete one record
# ###########################################################


def update():
    (db, table) = get_table(request)
    keyed = hasattr(db[table],'_primarykey')
    record = None
    if keyed:
        key = [f for f in request.vars if f in db[table]._primarykey]
        if key:
            record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
    else:
        record = db(db[table].id == request.args(2)).select().first()

    if not record:
        qry = query_by_table_type(table, db)
        session.flash = T('record does not exist')
        redirect(URL('select', args=request.args[:1],
                     vars=dict(query=qry)))

    if keyed:
        for k in db[table]._primarykey:
            db[table][k].writable=False

    form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
                   ignore_rw=ignore_rw and not keyed,
                   linkto=URL('select',
                   args=request.args[:1]), upload=URL(r=request,
                   f='download', args=request.args[:1]))

    if form.accepts(request.vars, session):
        session.flash = T('done!')
        qry = query_by_table_type(table, db)
        redirect(URL('select', args=request.args[:1],
                 vars=dict(query=qry)))
    return dict(form=form,table=db[table])


# ##########################################################
# ## get global variables
# ###########################################################


def state():
    return dict()

def ccache():
    form = FORM(
        P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
        P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
        P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
    )

    if form.accepts(request.vars, session):
        clear_ram = False
        clear_disk = False
        session.flash = ""
        if request.vars.yes:
            clear_ram = clear_disk = True
        if request.vars.ram:
            clear_ram = True
        if request.vars.disk:
            clear_disk = True

        if clear_ram:
            cache.ram.clear()
            session.flash += "Ram Cleared "
        if clear_disk:
            cache.disk.clear()
            session.flash += "Disk Cleared"

        redirect(URL(r=request))

    try:
        from guppy import hpy; hp=hpy()
    except ImportError:
        hp = False

    import shelve, os, copy, time, math
    from gluon import portalocker

    ram = {
        'bytes': 0,
        'objects': 0,
        'hits': 0,
        'misses': 0,
        'ratio': 0,
        'oldest': time.time()
    }
    disk = copy.copy(ram)
    total = copy.copy(ram)

    for key, value in cache.ram.storage.items():
        if isinstance(value, dict):
            ram['hits'] = value['hit_total'] - value['misses']
            ram['misses'] = value['misses']
            try:
                ram['ratio'] = ram['hits'] * 100 / value['hit_total']
            except (KeyError, ZeroDivisionError):
                ram['ratio'] = 0
        else:
            if hp:
                ram['bytes'] += hp.iso(value[1]).size
                ram['objects'] += hp.iso(value[1]).count

                if value[0] < ram['oldest']:
                    ram['oldest'] = value[0]

    locker = open(os.path.join(request.folder,
                                        'cache/cache.lock'), 'a')
    portalocker.lock(locker, portalocker.LOCK_EX)
    disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
    try:
        for key, value in disk_storage.items():
            if isinstance(value, dict):
                disk['hits'] = value['hit_total'] - value['misses']
                disk['misses'] = value['misses']
                try:
                    disk['ratio'] = disk['hits'] * 100 / value['hit_total']
                except (KeyError, ZeroDivisionError):
                    disk['ratio'] = 0
            else:
                if hp:
                    disk['bytes'] += hp.iso(value[1]).size
                    disk['objects'] += hp.iso(value[1]).count
                    if value[0] < disk['oldest']:
                        disk['oldest'] = value[0]
    finally:
        portalocker.unlock(locker)
        locker.close()
        disk_storage.close()

    total['bytes'] = ram['bytes'] + disk['bytes']
    total['objects'] = ram['objects'] + disk['objects']
    total['hits'] = ram['hits'] + disk['hits']
    total['misses'] = ram['misses'] + disk['misses']
    try:
        total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
    except (KeyError, ZeroDivisionError):
        total['ratio'] = 0

    if disk['oldest'] < ram['oldest']:
        total['oldest'] = disk['oldest']
    else:
        total['oldest'] = ram['oldest']

    def GetInHMS(seconds):
        hours = math.floor(seconds / 3600)
        seconds -= hours * 3600
        minutes = math.floor(seconds / 60)
        seconds -= minutes * 60
        seconds = math.floor(seconds)

        return (hours, minutes, seconds)

    ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
    disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
    total['oldest'] = GetInHMS(time.time() - total['oldest'])

    return dict(form=form, total=total,
                ram=ram, disk=disk)

Added applications/admin/controllers/default.py version [a84fa2354b].







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8

from gluon.admin import *
from gluon.fileutils import abspath, read_file, write_file
from glob import glob
import shutil
import platform

if DEMO_MODE and request.function in ['change_password','pack','pack_plugin','upgrade_web2py','uninstall','cleanup','compile_app','remove_compiled_app','delete','delete_plugin','create_file','upload_file','update_languages','reload_routes']:
    session.flash = T('disabled in demo mode')
    redirect(URL('site'))

if not is_manager() and request.function in ['change_password','upgrade_web2py']:
    session.flash = T('disabled in multi user mode')
    redirect(URL('site'))

if FILTER_APPS and request.args(0) and not request.args(0) in FILTER_APPS:
    session.flash = T('disabled in demo mode')
    redirect(URL('site'))

def safe_open(a,b):
    if DEMO_MODE and 'w' in b:
        class tmp:
            def write(self,data): pass
        return tmp()
    return open(a,b)

def safe_read(a, b='r'):
    safe_file = safe_open(a, b)
    try:
        return safe_file.read()
    finally:
        safe_file.close()

def safe_write(a, value, b='w'):
    safe_file = safe_open(a, b)
    try:
        safe_file.write(value)
    finally:
        safe_file.close()

def get_app(name=None):
    app = name or request.args(0)
    if app and (not MULTI_USER_MODE or db(db.app.name==app)(db.app.owner==auth.user.id).count()):
        return app
    session.flash = 'App does not exist or your are not authorized'
    redirect(URL('site'))

def index():
    """ Index handler """

    send = request.vars.send
    if DEMO_MODE:
        session.authorized = True
        session.last_time = t0
    if not send:
        send = URL('site')
    if session.authorized:
        redirect(send)
    elif request.vars.password:
        if verify_password(request.vars.password):
            session.authorized = True
            login_record(True)

            if CHECK_VERSION:
                session.check_version = True
            else:
                session.check_version = False

            session.last_time = t0
            if isinstance(send, list):  # ## why does this happen?
                send = str(send[0])

            redirect(send)
        else:
            times_denied = login_record(False)
            if times_denied >= allowed_number_of_attempts:
                response.flash = \
                    T('admin disabled because too many invalid login attempts')
            elif times_denied == allowed_number_of_attempts - 1:
                response.flash = \
                    T('You have one more login attempt before you are locked out')
            else:
                response.flash = T('invalid password.')
    return dict(send=send)


def check_version():
    """ Checks if web2py is up to date """

    session.forget()
    session._unlock(response)

    new_version, version_number = check_new_version(request.env.web2py_version,
                                    WEB2PY_VERSION_URL)

    if new_version == -1:
        return A(T('Unable to check for upgrades'), _href=WEB2PY_URL)
    elif new_version != True:
        return A(T('web2py is up to date'), _href=WEB2PY_URL)
    elif platform.system().lower() in ('windows','win32','win64') and os.path.exists("web2py.exe"):
        return SPAN('You should upgrade to version %s' % version_number)
    else:
        return sp_button(URL('upgrade_web2py'), T('upgrade now')) \
          + XML(' <strong class="upgrade_version">%s</strong>' % version_number)


def logout():
    """ Logout handler """
    session.authorized = None
    if MULTI_USER_MODE:
        redirect(URL('user/logout'))
    redirect(URL('index'))


def change_password():

    if session.pam_user:
        session.flash = T('PAM authenticated user, cannot change password here')
        redirect(URL('site'))
    form=SQLFORM.factory(Field('current_admin_password','password'),
                         Field('new_admin_password','password',requires=IS_STRONG()),
                         Field('new_admin_password_again','password'))
    if form.accepts(request.vars):
        if not verify_password(request.vars.current_admin_password):
            form.errors.current_admin_password = T('invalid password')
        elif form.vars.new_admin_password != form.vars.new_admin_password_again:
            form.errors.new_admin_password_again = T('no match')
        else:
            path = abspath('parameters_%s.py' % request.env.server_port)
            safe_write(path, 'password="%s"' % CRYPT()(request.vars.new_admin_password)[0])
            session.flash = T('password changed')
            redirect(URL('site'))
    return dict(form=form)

def site():
    """ Site handler """

    myversion = request.env.web2py_version

    # Shortcut to make the elif statements more legible
    file_or_appurl = 'file' in request.vars or 'appurl' in request.vars

    if DEMO_MODE:
        pass

    elif request.vars.filename and not 'file' in request.vars:
        # create a new application
        appname = cleanpath(request.vars.filename).replace('.', '_')
        if app_create(appname, request):
            if MULTI_USER_MODE:
                db.app.insert(name=appname,owner=auth.user.id)
            session.flash = T('new application "%s" created', appname)
            redirect(URL('design',args=appname))
        else:
            session.flash = \
                T('unable to create application "%s" (it may exist already)', request.vars.filename)
        redirect(URL(r=request))

    elif file_or_appurl and not request.vars.filename:
        # can't do anything without an app name
        msg = 'you must specify a name for the uploaded application'
        response.flash = T(msg)

    elif file_or_appurl and request.vars.filename:
        # fetch an application via URL or file upload
        f = None
        if request.vars.appurl is not '':
            try:
                f = urllib.urlopen(request.vars.appurl)
            except Exception, e:
                session.flash = DIV(T('Unable to download app because:'),PRE(str(e)))
                redirect(URL(r=request))
            fname = request.vars.appurl
        elif request.vars.file is not '':
            f = request.vars.file.file
            fname = request.vars.file.filename

        if f:
            appname = cleanpath(request.vars.filename).replace('.', '_')
            installed = app_install(appname, f, request, fname,
                                    overwrite=request.vars.overwrite_check)
        if f and installed:
            msg = 'application %(appname)s installed with md5sum: %(digest)s'
            session.flash = T(msg, dict(appname=appname,
                                        digest=md5_hash(installed)))
        elif f and request.vars.overwrite_check:
            msg = 'unable to install application "%(appname)s"'
            session.flash = T(msg, dict(appname=request.vars.filename))

        else:
            msg = 'unable to install application "%(appname)s"'
            session.flash = T(msg, dict(appname=request.vars.filename))

        redirect(URL(r=request))

    regex = re.compile('^\w+$')

    if is_manager():
        apps = [f for f in os.listdir(apath(r=request)) if regex.match(f)]
    else:
        apps = [f.name for f in db(db.app.owner==auth.user_id).select()]

    if FILTER_APPS:
        apps = [f for f in apps if f in FILTER_APPS]

    apps = sorted(apps,lambda a,b:cmp(a.upper(),b.upper()))

    return dict(app=None, apps=apps, myversion=myversion)


def pack():
    app = get_app()

    if len(request.args) == 1:
        fname = 'web2py.app.%s.w2p' % app
        filename = app_pack(app, request)
    else:
        fname = 'web2py.app.%s.compiled.w2p' % app
        filename = app_pack_compiled(app, request)

    if filename:
        response.headers['Content-Type'] = 'application/w2p'
        disposition = 'attachment; filename=%s' % fname
        response.headers['Content-Disposition'] = disposition
        return safe_read(filename, 'rb')
    else:
        session.flash = T('internal error')
        redirect(URL('site'))

def pack_plugin():
    app = get_app()
    if len(request.args) == 2:
        fname = 'web2py.plugin.%s.w2p' % request.args[1]
        filename = plugin_pack(app, request.args[1], request)
    if filename:
        response.headers['Content-Type'] = 'application/w2p'
        disposition = 'attachment; filename=%s' % fname
        response.headers['Content-Disposition'] = disposition
        return safe_read(filename, 'rb')
    else:
        session.flash = T('internal error')
        redirect(URL('plugin',args=request.args))

def upgrade_web2py():
    if 'upgrade' in request.vars:
        (success, error) = upgrade(request)
        if success:
            session.flash = T('web2py upgraded; please restart it')
        else:
            session.flash = T('unable to upgrade because "%s"', error)
        redirect(URL('site'))
    elif 'noupgrade' in request.vars:
        redirect(URL('site'))
    return dict()

def uninstall():
    app = get_app()
    if 'delete' in request.vars:
        if MULTI_USER_MODE:
            if is_manager() and db(db.app.name==app).delete():
                pass
            elif db(db.app.name==app)(db.app.owner==auth.user.id).delete():
                pass
            else:
                session.flash = T('no permission to uninstall "%s"', app)
                redirect(URL('site'))
        if app_uninstall(app, request):            
            session.flash = T('application "%s" uninstalled', app)
        else:
            session.flash = T('unable to uninstall "%s"', app)
        redirect(URL('site'))
    elif 'nodelete' in request.vars:
        redirect(URL('site'))
    return dict(app=app)


def cleanup():
    app = get_app()
    clean = app_cleanup(app, request)
    if not clean:
        session.flash = T("some files could not be removed")
    else:
        session.flash = T('cache, errors and sessions cleaned')

    redirect(URL('site'))


def compile_app():
    app = get_app()
    c = app_compile(app, request)
    if not c:
        session.flash = T('application compiled')
    else:
        session.flash = DIV(T('Cannot compile: there are errors in your app:'),
                              CODE(c))
    redirect(URL('site'))


def remove_compiled_app():
    """ Remove the compiled application """
    app = get_app()
    remove_compiled_application(apath(app, r=request))
    session.flash = T('compiled application removed')
    redirect(URL('site'))

def delete():
    """ Object delete handler """
    app = get_app()
    filename = '/'.join(request.args)
    sender = request.vars.sender

    if isinstance(sender, list):  # ## fix a problem with Vista
        sender = sender[0]

    if 'nodelete' in request.vars:
        redirect(URL(sender))
    elif 'delete' in request.vars:
        try:
            os.unlink(apath(filename, r=request))
            session.flash = T('file "%(filename)s" deleted',
                              dict(filename=filename))
        except Exception:
            session.flash = T('unable to delete file "%(filename)s"',
                              dict(filename=filename))
        redirect(URL(sender))
    return dict(filename=filename, sender=sender)

def peek():
    """ Visualize object code """
    app = get_app()
    filename = '/'.join(request.args)
    try:
        data = safe_read(apath(filename, r=request)).replace('\r','')
    except IOError:
        session.flash = T('file does not exist')
        redirect(URL('site'))

    extension = filename[filename.rfind('.') + 1:].lower()

    return dict(app=request.args[0],
                filename=filename,
                data=data,
                extension=extension)


def test():
    """ Execute controller tests """
    app = get_app()
    if len(request.args) > 1:
        file = request.args[1]
    else:
        file = '.*\.py'

    controllers = listdir(apath('%s/controllers/' % app, r=request), file + '$')

    return dict(app=app, controllers=controllers)

def keepalive():
    return ''

def search():
    keywords=request.vars.keywords or ''
    app = get_app()
    def match(filename,keywords):
        filename=os.path.join(apath(app, r=request),filename)
        if keywords in read_file(filename,'rb'):
            return True
        return False
    path = apath(request.args[0], r=request)
    files1 = glob(os.path.join(path,'*/*.py'))
    files2 = glob(os.path.join(path,'*/*.html'))
    files3 = glob(os.path.join(path,'*/*/*.html'))
    files=[x[len(path)+1:].replace('\\','/') for x in files1+files2+files3 if match(x,keywords)]
    return response.json({'files':files})

def edit():
    """ File edit handler """
    # Load json only if it is ajax edited...
    app = get_app()
    filename = '/'.join(request.args)
    # Try to discover the file type
    if filename[-3:] == '.py':
        filetype = 'python'
    elif filename[-5:] == '.html':
        filetype = 'html'
    elif filename[-5:] == '.load':
        filetype = 'html'
    elif filename[-4:] == '.css':
        filetype = 'css'
    elif filename[-3:] == '.js':
        filetype = 'js'
    else:
        filetype = 'html'

    # ## check if file is not there

    path = apath(filename, r=request)

    if request.vars.revert and os.path.exists(path + '.bak'):
        try:
            data = safe_read(path + '.bak')
            data1 = safe_read(path)
        except IOError:
            session.flash = T('Invalid action')
            if 'from_ajax' in request.vars:
                 return response.json({'error': str(T('Invalid action'))})
            else:
                redirect(URL('site'))

        safe_write(path, data)
        file_hash = md5_hash(data)
        saved_on = time.ctime(os.stat(path)[stat.ST_MTIME])
        safe_write(path + '.bak', data1)
        response.flash = T('file "%s" of %s restored', (filename, saved_on))
    else:
        try:
            data = safe_read(path)
        except IOError:
            session.flash = T('Invalid action')
            if 'from_ajax' in request.vars:
                return response.json({'error': str(T('Invalid action'))})
            else:
                redirect(URL('site'))

        file_hash = md5_hash(data)
        saved_on = time.ctime(os.stat(path)[stat.ST_MTIME])

        if request.vars.file_hash and request.vars.file_hash != file_hash:
            session.flash = T('file changed on disk')
            data = request.vars.data.replace('\r\n', '\n').strip() + '\n'
            safe_write(path + '.1', data)
            if 'from_ajax' in request.vars:
                return response.json({'error': str(T('file changed on disk')),
                                      'redirect': URL('resolve',
                                                      args=request.args)})
            else:
                redirect(URL('resolve', args=request.args))
        elif request.vars.data:
            safe_write(path + '.bak', data)
            data = request.vars.data.replace('\r\n', '\n').strip() + '\n'
            safe_write(path, data)
            file_hash = md5_hash(data)
            saved_on = time.ctime(os.stat(path)[stat.ST_MTIME])
            response.flash = T('file saved on %s', saved_on)

    data_or_revert = (request.vars.data or request.vars.revert)

    # Check compile errors
    highlight = None
    if filetype == 'python' and request.vars.data:
        import _ast
        try:
            code = request.vars.data.rstrip().replace('\r\n','\n')+'\n'
            compile(code, path, "exec", _ast.PyCF_ONLY_AST)
        except Exception, e:
            start = sum([len(line)+1 for l, line
                            in enumerate(request.vars.data.split("\n"))
                            if l < e.lineno-1])
            if e.text and e.offset:
                offset = e.offset - (len(e.text) - len(e.text.splitlines()[-1]))
            else:
                offset = 0
            highlight = {'start': start, 'end': start + offset + 1}
            try:
                ex_name = e.__class__.__name__
            except:
                ex_name = 'unknown exception!'
            response.flash = DIV(T('failed to compile file because:'), BR(),
                                 B(ex_name), T(' at line %s') % e.lineno,
                                 offset and T(' at char %s') % offset or '',
                                 PRE(str(e)))

    if data_or_revert and request.args[1] == 'modules':
        # Lets try to reload the modules
        try:
            mopath = '.'.join(request.args[2:])[:-3]
            exec 'import applications.%s.modules.%s' % (request.args[0], mopath)
            reload(sys.modules['applications.%s.modules.%s'
                    % (request.args[0], mopath)])
        except Exception, e:
            response.flash = DIV(T('failed to reload module because:'),PRE(str(e)))

    edit_controller = None
    editviewlinks = None
    view_link = None
    if filetype == 'html' and len(request.args) >= 3:
        cfilename = os.path.join(request.args[0], 'controllers',
                                 request.args[2] + '.py')
        if os.path.exists(apath(cfilename, r=request)):
            edit_controller = URL('edit', args=[cfilename])
            view = request.args[3].replace('.html','')
            view_link = URL(request.args[0],request.args[2],view)
    elif filetype == 'python' and request.args[1] == 'controllers':
        ## it's a controller file.
        ## Create links to all of the associated view files.
        app = get_app()
        viewname = os.path.splitext(request.args[2])[0]
        viewpath = os.path.join(app,'views',viewname)
        aviewpath = apath(viewpath, r=request)
        viewlist = []
        if os.path.exists(aviewpath):
            if os.path.isdir(aviewpath):
                viewlist = glob(os.path.join(aviewpath,'*.html'))
        elif os.path.exists(aviewpath+'.html'):
            viewlist.append(aviewpath+'.html')
        if len(viewlist):
            editviewlinks = []
            for v in viewlist:
                vf = os.path.split(v)[-1]
                vargs = "/".join([viewpath.replace(os.sep,"/"),vf])
                editviewlinks.append(A(T(vf.split(".")[0]),\
                    _href=URL('edit',args=[vargs])))

    if len(request.args) > 2 and request.args[1] == 'controllers':
        controller = (request.args[2])[:-3]
        functions = regex_expose.findall(data)
    else:
        (controller, functions) = (None, None)

    if 'from_ajax' in request.vars:
        return response.json({'file_hash': file_hash, 'saved_on': saved_on, 'functions':functions, 'controller': controller, 'application': request.args[0], 'highlight': highlight })
    else:

        editarea_preferences = {}
        editarea_preferences['FONT_SIZE'] = '10'
        editarea_preferences['FULL_SCREEN'] = 'false'
        editarea_preferences['ALLOW_TOGGLE'] = 'true'
        editarea_preferences['REPLACE_TAB_BY_SPACES'] = '4'
        editarea_preferences['DISPLAY'] = 'onload'
        for key in editarea_preferences:
            if globals().has_key(key):
                editarea_preferences[key]=globals()[key]
        return dict(app=request.args[0],
                    filename=filename,
                    filetype=filetype,
                    data=data,
                    edit_controller=edit_controller,
                    file_hash=file_hash,
                    saved_on=saved_on,
                    controller=controller,
                    functions=functions,
                    view_link=view_link,
                    editarea_preferences=editarea_preferences,
                    editviewlinks=editviewlinks)

def resolve():
    """
    """

    filename = '/'.join(request.args)
    # ## check if file is not there
    path = apath(filename, r=request)
    a = safe_read(path).split('\n')
    try:
        b = safe_read(path + '.1').split('\n')
    except IOError:
        session.flash = 'Other file, no longer there'
        redirect(URL('edit', args=request.args))

    d = difflib.ndiff(a, b)

    def leading(line):
        """  """

        # TODO: we really need to comment this
        z = ''
        for (k, c) in enumerate(line):
            if c == ' ':
                z += '&nbsp;'
            elif c == ' \t':
                z += '&nbsp;'
            elif k == 0 and c == '?':
                pass
            else:
                break

        return XML(z)

    def getclass(item):
        """ Determine item class """

        if item[0] == ' ':
            return 'normal'
        if item[0] == '+':
            return 'plus'
        if item[0] == '-':
            return 'minus'

    if request.vars:
        c = ''.join([item[2:] for (i, item) in enumerate(d) if item[0] \
                     == ' ' or 'line%i' % i in request.vars])
        safe_write(path, c)
        session.flash = 'files merged'
        redirect(URL('edit', args=request.args))
    else:
        # Making the short circuit compatible with <= python2.4
        gen_data = lambda index,item: not item[:1] in ['+','-'] and "" \
                   or INPUT(_type='checkbox',
                            _name='line%i' % index,
                            value=item[0] == '+')

        diff = TABLE(*[TR(TD(gen_data(i,item)),
                          TD(item[0]),
                          TD(leading(item[2:]),
                          TT(item[2:].rstrip())), _class=getclass(item))
                       for (i, item) in enumerate(d) if item[0] != '?'])

    return dict(diff=diff, filename=filename)


def edit_language():
    """ Edit language file """
    app = get_app()
    filename = '/'.join(request.args)
    from gluon.languages import read_dict, write_dict
    strings = read_dict(apath(filename, r=request))
    keys = sorted(strings.keys(),lambda x,y: cmp(x.lower(), y.lower()))
    rows = []
    rows.append(H2(T('Original/Translation')))

    for key in keys:
        name = md5_hash(key)
        if key==strings[key]:
            _class='untranslated'
        else:
            _class='translated'
        if len(key) <= 40:
            elem = INPUT(_type='text', _name=name,value=strings[key],
                         _size=70,_class=_class)
        else:
            elem = TEXTAREA(_name=name, value=strings[key], _cols=70,
                            _rows=5, _class=_class)

        # Making the short circuit compatible with <= python2.4
        k = (strings[key] != key) and key or B(key)

        rows.append(P(k, BR(), elem, TAG.BUTTON(T('delete'),
                            _onclick='return delkey("%s")' % name), _id=name))

    rows.append(INPUT(_type='submit', _value=T('update')))
    form = FORM(*rows)
    if form.accepts(request.vars, keepvalues=True):
        strs = dict()
        for key in keys:
            name = md5_hash(key)
            if form.vars[name]==chr(127): continue
            strs[key] = form.vars[name]
        write_dict(apath(filename, r=request), strs)
        session.flash = T('file saved on %(time)s', dict(time=time.ctime()))
        redirect(URL(r=request,args=request.args))
    return dict(app=request.args[0], filename=filename, form=form)


def about():
    """ Read about info """
    app = get_app()
    # ## check if file is not there
    about = safe_read(apath('%s/ABOUT' % app, r=request))
    license = safe_read(apath('%s/LICENSE' % app, r=request))
    return dict(app=app, about=MARKMIN(about), license=MARKMIN(license))


def design():
    """ Application design handler """
    app = get_app()

    if not response.flash and app == request.application:
        msg = T('ATTENTION: you cannot edit the running application!')
        response.flash = msg

    if request.vars.pluginfile!=None and not isinstance(request.vars.pluginfile,str):
        filename=os.path.basename(request.vars.pluginfile.filename)
        if plugin_install(app, request.vars.pluginfile.file,
                          request, filename):
            session.flash = T('new plugin installed')
            redirect(URL('design',args=app))
        else:
            session.flash = \
                T('unable to create application "%s"', request.vars.filename)
        redirect(URL(r=request))
    elif isinstance(request.vars.pluginfile,str):
        session.flash = T('plugin not specified')
        redirect(URL(r=request))


    # If we have only pyc files it means that
    # we cannot design
    if os.path.exists(apath('%s/compiled' % app, r=request)):
        session.flash = \
            T('application is compiled and cannot be designed')
        redirect(URL('site'))

    # Get all models
    models = listdir(apath('%s/models/' % app, r=request), '.*\.py$')
    models=[x.replace('\\','/') for x in models]
    defines = {}
    for m in models:
        data = safe_read(apath('%s/models/%s' % (app, m), r=request))
        defines[m] = regex_tables.findall(data)
        defines[m].sort()

    # Get all controllers
    controllers = sorted(listdir(apath('%s/controllers/' % app, r=request), '.*\.py$'))
    controllers = [x.replace('\\','/') for x in controllers]
    functions = {}
    for c in controllers:
        data = safe_read(apath('%s/controllers/%s' % (app, c), r=request))
        items = regex_expose.findall(data)
        functions[c] = items

    # Get all views
    views = sorted(listdir(apath('%s/views/' % app, r=request), '[\w/\-]+\.\w+$'))
    views = [x.replace('\\','/') for x in views]
    extend = {}
    include = {}
    for c in views:
        data = safe_read(apath('%s/views/%s' % (app, c), r=request))
        items = regex_extend.findall(data)

        if items:
            extend[c] = items[0][1]

        items = regex_include.findall(data)
        include[c] = [i[1] for i in items]

    # Get all modules
    modules = listdir(apath('%s/modules/' % app, r=request), '.*\.py$')
    modules = modules=[x.replace('\\','/') for x in modules]
    modules.sort()

    # Get all static files
    statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*')
    statics = [x.replace('\\','/') for x in statics]
    statics.sort()

    # Get all languages
    languages = listdir(apath('%s/languages/' % app, r=request), '[\w-]*\.py')

    #Get crontab
    cronfolder = apath('%s/cron' % app, r=request)
    if not os.path.exists(cronfolder): os.mkdir(cronfolder)
    crontab = apath('%s/cron/crontab' % app, r=request)
    if not os.path.exists(crontab):
        safe_write(crontab, '#crontab')

    plugins=[]
    def filter_plugins(items,plugins):
        plugins+=[item[7:].split('/')[0].split('.')[0] for item in items if item.startswith('plugin_')]
        plugins[:]=list(set(plugins))
        plugins.sort()
        return [item for item in items if not item.startswith('plugin_')]

    return dict(app=app,
                models=filter_plugins(models,plugins),
                defines=defines,
                controllers=filter_plugins(controllers,plugins),
                functions=functions,
                views=filter_plugins(views,plugins),
                modules=filter_plugins(modules,plugins),
                extend=extend,
                include=include,
                statics=filter_plugins(statics,plugins),
                languages=languages,
                crontab=crontab,
                plugins=plugins)

def delete_plugin():
    """ Object delete handler """
    app=request.args(0)
    plugin = request.args(1)
    plugin_name='plugin_'+plugin
    if 'nodelete' in request.vars:
        redirect(URL('design',args=app))
    elif 'delete' in request.vars:
        try:
            for folder in ['models','views','controllers','static','modules']:
                path=os.path.join(apath(app,r=request),folder)
                for item in os.listdir(path):
                    if item.startswith(plugin_name):
                        filename=os.path.join(path,item)
                        if os.path.isdir(filename):
                            shutil.rmtree(filename)
                        else:
                            os.unlink(filename)
            session.flash = T('plugin "%(plugin)s" deleted',
                              dict(plugin=plugin))
        except Exception:
            session.flash = T('unable to delete file plugin "%(plugin)s"',
                              dict(plugin=plugin))
        redirect(URL('design',args=request.args(0)))
    return dict(plugin=plugin)

def plugin():
    """ Application design handler """
    app = get_app()
    plugin = request.args(1)

    if not response.flash and app == request.application:
        msg = T('ATTENTION: you cannot edit the running application!')
        response.flash = msg

    # If we have only pyc files it means that
    # we cannot design
    if os.path.exists(apath('%s/compiled' % app, r=request)):
        session.flash = \
            T('application is compiled and cannot be designed')
        redirect(URL('site'))

    # Get all models
    models = listdir(apath('%s/models/' % app, r=request), '.*\.py$')
    models=[x.replace('\\','/') for x in models]
    defines = {}
    for m in models:
        data = safe_read(apath('%s/models/%s' % (app, m), r=request))
        defines[m] = regex_tables.findall(data)
        defines[m].sort()

    # Get all controllers
    controllers = sorted(listdir(apath('%s/controllers/' % app, r=request), '.*\.py$'))
    controllers = [x.replace('\\','/') for x in controllers]
    functions = {}
    for c in controllers:
        data = safe_read(apath('%s/controllers/%s' % (app, c), r=request))
        items = regex_expose.findall(data)
        functions[c] = items

    # Get all views
    views = sorted(listdir(apath('%s/views/' % app, r=request), '[\w/\-]+\.\w+$'))
    views = [x.replace('\\','/') for x in views]
    extend = {}
    include = {}
    for c in views:
        data = safe_read(apath('%s/views/%s' % (app, c), r=request))
        items = regex_extend.findall(data)
        if items:
            extend[c] = items[0][1]

        items = regex_include.findall(data)
        include[c] = [i[1] for i in items]

    # Get all modules
    modules = listdir(apath('%s/modules/' % app, r=request), '.*\.py$')
    modules = modules=[x.replace('\\','/') for x in modules]
    modules.sort()

    # Get all static files
    statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*')
    statics = [x.replace('\\','/') for x in statics]
    statics.sort()

    # Get all languages
    languages = listdir(apath('%s/languages/' % app, r=request), '[\w-]*\.py')

    #Get crontab
    crontab = apath('%s/cron/crontab' % app, r=request)
    if not os.path.exists(crontab):
        safe_write(crontab, '#crontab')

    def filter_plugins(items):
        regex=re.compile('^plugin_'+plugin+'(/.*|\..*)?$')
        return [item for item in items if regex.match(item)]

    return dict(app=app,
                models=filter_plugins(models),
                defines=defines,
                controllers=filter_plugins(controllers),
                functions=functions,
                views=filter_plugins(views),
                modules=filter_plugins(modules),
                extend=extend,
                include=include,
                statics=filter_plugins(statics),
                languages=languages,
                crontab=crontab)


def create_file():
    """ Create files handler """
    try:
        app = get_app(name=request.vars.location.split('/')[0])
        path = apath(request.vars.location, r=request)
        filename = re.sub('[^\w./-]+', '_', request.vars.filename)

        if path[-11:] == '/languages/':
            # Handle language files
            if len(filename) == 0:
                raise SyntaxError
            if not filename[-3:] == '.py':
                filename += '.py'
            app = path.split('/')[-3]
            path=os.path.join(apath(app, r=request),'languages',filename)
            if not os.path.exists(path):
                safe_write(path, '')
            findT(apath(app, r=request), filename[:-3])
            session.flash = T('language file "%(filename)s" created/updated',
                              dict(filename=filename))
            redirect(request.vars.sender)

        elif path[-8:] == '/models/':
            # Handle python models
            if not filename[-3:] == '.py':
                filename += '.py'

            if len(filename) == 3:
                raise SyntaxError

            text = '# coding: utf8\n'

        elif path[-13:] == '/controllers/':
            # Handle python controllers
            if not filename[-3:] == '.py':
                filename += '.py'

            if len(filename) == 3:
                raise SyntaxError

            text = '# coding: utf8\n# %s\ndef index(): return dict(message="hello from %s")'
            text = text % (T('try something like'), filename)

        elif path[-7:] == '/views/':
            if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
                filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
            # Handle template (html) views
            if filename.find('.')<0:
                filename += '.html'
            extension = filename.split('.')[-1].lower()

            if len(filename) == 5:
                raise SyntaxError

            msg = T('This is the %(filename)s template',
                    dict(filename=filename))            
            if extension == 'html':
                text = dedent("""
                   {{extend 'layout.html'}}
                   <h1>%s</h1>
                   {{=BEAUTIFY(response._vars)}}""" % msg)
            else:
                generic = os.path.join(path,'generic.'+extension)
                if os.path.exists(generic):
                    text = read_file(generic)
                else:
                    text = ''
                
        elif path[-9:] == '/modules/':
            if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
                filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
            # Handle python module files
            if not filename[-3:] == '.py':
                filename += '.py'

            if len(filename) == 3:
                raise SyntaxError

            text = dedent("""
                   #!/usr/bin/env python
                   # coding: utf8
                   from gluon import *\n""")

        elif path[-8:] == '/static/':
            if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
                filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
            text = ''
        else:
            redirect(request.vars.sender)

        full_filename = os.path.join(path, filename)
        dirpath = os.path.dirname(full_filename)

        if not os.path.exists(dirpath):
            os.makedirs(dirpath)

        if os.path.exists(full_filename):
            raise SyntaxError

        safe_write(full_filename, text)
        session.flash = T('file "%(filename)s" created',
                          dict(filename=full_filename[len(path):]))
        redirect(URL('edit',
                 args=[os.path.join(request.vars.location, filename)]))
    except Exception, e:
        if not isinstance(e,HTTP):
            session.flash = T('cannot create file')

    redirect(request.vars.sender)


def upload_file():
    """ File uploading handler """

    try:
        filename = None
        app = get_app(name=request.vars.location.split('/')[0])
        path = apath(request.vars.location, r=request)

        if request.vars.filename:
            filename = re.sub('[^\w\./]+', '_', request.vars.filename)
        else:
            filename = os.path.split(request.vars.file.filename)[-1]

        if path[-8:] == '/models/' and not filename[-3:] == '.py':
            filename += '.py'

        if path[-9:] == '/modules/' and not filename[-3:] == '.py':
            filename += '.py'

        if path[-13:] == '/controllers/' and not filename[-3:] == '.py':
            filename += '.py'

        if path[-7:] == '/views/' and not filename[-5:] == '.html':
            filename += '.html'

        if path[-11:] == '/languages/' and not filename[-3:] == '.py':
            filename += '.py'

        filename = os.path.join(path, filename)
        dirpath = os.path.dirname(filename)

        if not os.path.exists(dirpath):
            os.makedirs(dirpath)

        safe_write(filename, request.vars.file.file.read(), 'wb')
        session.flash = T('file "%(filename)s" uploaded',
                          dict(filename=filename[len(path):]))
    except Exception:
        if filename:
            d = dict(filename = filename[len(path):])
        else:
            d = dict(filename = 'unkown')
        session.flash = T('cannot upload file "%(filename)s"', d)

    redirect(request.vars.sender)


def errors():
    """ Error handler """
    import operator
    import os
    import pickle
    import hashlib

    app = get_app()

    method = request.args(1) or 'new'


    if method == 'new':
        errors_path = apath('%s/errors' % app, r=request)

        delete_hashes = []
        for item in request.vars:
            if item[:7] == 'delete_':
                delete_hashes.append(item[7:])

        hash2error = dict()

        for fn in listdir(errors_path, '^\w.*'):
            fullpath = os.path.join(errors_path, fn)
            if not os.path.isfile(fullpath): continue
            try:
                fullpath_file = open(fullpath, 'r')
                try:
                    error = pickle.load(fullpath_file)
                finally:
                    fullpath_file.close()
            except IOError:
                continue

            hash = hashlib.md5(error['traceback']).hexdigest()

            if hash in delete_hashes:
                os.unlink(fullpath)
            else:
                try:
                    hash2error[hash]['count'] += 1
                except KeyError:
                    error_lines = error['traceback'].split("\n")
                    last_line = error_lines[-2]
                    error_causer = os.path.split(error['layer'])[1]
                    hash2error[hash] = dict(count=1, pickel=error,
                                            causer=error_causer,
                                            last_line=last_line,
                                            hash=hash,ticket=fn)

        decorated = [(x['count'], x) for x in hash2error.values()]
        decorated.sort(key=operator.itemgetter(0), reverse=True)

        return dict(errors = [x[1] for x in decorated], app=app, method=method)
    else:
        for item in request.vars:
            if item[:7] == 'delete_':
                os.unlink(apath('%s/errors/%s' % (app, item[7:]), r=request))
        func = lambda p: os.stat(apath('%s/errors/%s' % \
                                           (app, p), r=request)).st_mtime
        tickets = sorted(listdir(apath('%s/errors/' % app, r=request), '^\w.*'),
                         key=func,
                         reverse=True)

        return dict(app=app, tickets=tickets, method=method)


def make_link(path):
    """ Create a link from a path """
    tryFile = path.replace('\\', '/')

    if os.path.isabs(tryFile) and os.path.isfile(tryFile):
        (folder, filename) = os.path.split(tryFile)
        (base, ext) = os.path.splitext(filename)
        app = get_app()

        editable = {'controllers': '.py', 'models': '.py', 'views': '.html'}
        for key in editable.keys():
            check_extension = folder.endswith("%s/%s" % (app,key))
            if ext.lower() == editable[key] and check_extension:
                return A('"' + tryFile + '"',
                         _href=URL(r=request,
                         f='edit/%s/%s/%s' % (app, key, filename))).xml()
    return ''


def make_links(traceback):
    """ Make links using the given traceback """

    lwords = traceback.split('"')

    # Making the short circuit compatible with <= python2.4
    result = (len(lwords) != 0) and lwords[0] or ''

    i = 1

    while i < len(lwords):
        link = make_link(lwords[i])

        if link == '':
            result += '"' + lwords[i]
        else:
            result += link

            if i + 1 < len(lwords):
                result += lwords[i + 1]
                i = i + 1

        i = i + 1

    return result


class TRACEBACK(object):
    """ Generate the traceback """

    def __init__(self, text):
        """ TRACEBACK constructor """

        self.s = make_links(CODE(text).xml())

    def xml(self):
        """ Returns the xml """

        return self.s


def ticket():
    """ Ticket handler """

    if len(request.args) != 2:
        session.flash = T('invalid ticket')
        redirect(URL('site'))

    app = get_app()
    myversion = request.env.web2py_version
    ticket = request.args[1]
    e = RestrictedError()
    e.load(request, app, ticket)

    return dict(app=app,
                ticket=ticket,
                output=e.output,
                traceback=(e.traceback and TRACEBACK(e.traceback)),
                snapshot=e.snapshot,
                code=e.code,
                layer=e.layer,
                myversion=myversion)

def error():
    """ Generate a ticket (for testing) """
    raise RuntimeError('admin ticket generator at your service')

def update_languages():
    """ Update available languages """

    app = get_app()
    update_all_languages(apath(app, r=request))
    session.flash = T('Language files (static strings) updated')
    redirect(URL('design',args=app))

def twitter():
    session.forget()
    session._unlock(response)
    import gluon.tools
    import gluon.contrib.simplejson as sj
    try:
        if TWITTER_HASH:
            page = gluon.tools.fetch('http://twitter.com/%s?format=json'%TWITTER_HASH)
            return sj.loads(page)['#timeline']
        else:
            return 'disabled'
    except Exception, e:
        return DIV(T('Unable to download because:'),BR(),str(e))

def user():
    if MULTI_USER_MODE:
        if not db(db.auth_user).count():
            auth.settings.registration_requires_approval = False            
        return dict(form=auth())
    else:
        return dict(form=T("Disabled"))

def reload_routes():
   """ Reload routes.py """
   gluon.rewrite.load()
   redirect(URL('site'))

Added applications/admin/controllers/gae.py version [482652b0a7].
























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
### this works on linux only

import re
try:
    import fcntl
    import subprocess
    import signal
    import os
    import shutil
    from gluon.fileutils import read_file, write_file    
except:
    session.flash='sorry, only on Unix systems'
    redirect(URL(request.application,'default','site'))

forever=10**8

def kill():
    p = cache.ram('gae_upload',lambda:None,forever)
    if not p or p.poll()!=None:
        return 'oops'
    os.kill(p.pid, signal.SIGKILL)
    cache.ram('gae_upload',lambda:None,-1)

class EXISTS(object):
    def __init__(self, error_message='file not found'):
        self.error_message = error_message
    def __call__(self, value):
        if os.path.exists(value):
            return (value,None)
        return (value,self.error_message)

def deploy():
    regex = re.compile('^\w+$')
    apps = sorted(file for file in os.listdir(apath(r=request)) if regex.match(file))
    form = SQLFORM.factory(
        Field('appcfg',default=GAE_APPCFG,label='Path to appcfg.py',
              requires=EXISTS(error_message=T('file not found'))),
        Field('google_application_id',requires=IS_ALPHANUMERIC()),
        Field('applications','list:string',
              requires=IS_IN_SET(apps,multiple=True),
              label=T('web2py apps to deploy')),
        Field('email',requires=IS_EMAIL(),label=T('GAE Email')),
        Field('password','password',requires=IS_NOT_EMPTY(),label=T('GAE Password')))
    cmd = output = errors= ""
    if form.accepts(request,session):
        try:
            kill()
        except:
            pass
        ignore_apps = [item for item in apps \
                           if not item in form.vars.applications]
        regex = re.compile('\(applications/\(.*')
        yaml = apath('../app.yaml', r=request)
        if not os.path.exists(yaml):
            example = apath('../app.example.yaml', r=request)
            shutil.copyfile(example,yaml)            
        data = read_file(yaml)
        data = re.sub('application:.*','application: %s' % form.vars.google_application_id,data)
        data = regex.sub('(applications/(%s)/.*)|' % '|'.join(ignore_apps),data)
        write_file(yaml, data)

        path = request.env.applications_parent
        cmd = '%s --email=%s --passin update %s' % \
            (form.vars.appcfg, form.vars.email, path)
        p = cache.ram('gae_upload',
                      lambda s=subprocess,c=cmd:s.Popen(c, shell=True,
                                                        stdin=s.PIPE,
                                                        stdout=s.PIPE,
                                                        stderr=s.PIPE, close_fds=True),-1)
        p.stdin.write(form.vars.password+'\n')
        fcntl.fcntl(p.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
        fcntl.fcntl(p.stderr.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
    return dict(form=form,command=cmd)

def callback():
    p = cache.ram('gae_upload',lambda:None,forever)
    if not p or p.poll()!=None:
        return '<done/>'
    try:
        output = p.stdout.read()
    except:
        output=''
    try:
        errors = p.stderr.read()
    except:
        errors=''
    return (output+errors).replace('\n','<br/>')

Added applications/admin/controllers/mercurial.py version [1de693f43a].



















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from gluon.fileutils import read_file, write_file

if DEMO_MODE or MULTI_USER_MODE:
    session.flash = T('disabled in demo mode')
    redirect(URL('default','site'))
if not have_mercurial:
    session.flash=T("Sorry, could not find mercurial installed")
    redirect(URL('default','design',args=request.args(0)))

_hgignore_content = """\
syntax: glob
*~
*.pyc
*.pyo
*.bak
*.bak2
cache/*
private/*
uploads/*
databases/*
sessions/*
errors/*
"""

def hg_repo(path):
    import os
    uio = ui.ui()
    uio.quiet = True
    if not os.environ.get('HGUSER') and not uio.config("ui", "username"):
        os.environ['HGUSER'] = 'web2py@localhost'
    try:
        repo = hg.repository(ui=uio, path=path)
    except:
        repo = hg.repository(ui=uio, path=path, create=True)
    hgignore = os.path.join(path, '.hgignore')
    if not os.path.exists(hgignore):
        write_file(hgignore, _hgignore_content)
    return repo

def commit():
    app = request.args(0)
    path = apath(app, r=request)
    repo = hg_repo(path)
    form = FORM('Comment:',INPUT(_name='comment',requires=IS_NOT_EMPTY()),
                INPUT(_type='submit',_value='Commit'))
    if form.accepts(request.vars,session):
        oldid = repo[repo.lookup('.')]
        cmdutil.addremove(repo)
        repo.commit(text=form.vars.comment)
        if repo[repo.lookup('.')] == oldid:
            response.flash = 'no changes'
    try:
        files = TABLE(*[TR(file) for file in repo[repo.lookup('.')].files()])
        changes = TABLE(TR(TH('revision'),TH('description')))
        for change in repo.changelog:
            ctx=repo.changectx(change)
            revision, description = ctx.rev(), ctx.description()
            changes.append(TR(A(revision,_href=URL('revision',
                                                   args=(app,revision))),
                              description))
    except:
        files = []
        changes = []
    return dict(form=form,files=files,changes=changes,repo=repo)

def revision():
    app = request.args(0)
    path = apath(app, r=request)
    repo = hg_repo(path)
    revision = request.args(1)
    ctx=repo.changectx(revision)
    form=FORM(INPUT(_type='submit',_value='revert'))
    if form.accepts(request.vars):
        hg.update(repo, revision)
        session.flash = "reverted to revision %s" % ctx.rev()
        redirect(URL('default','design',args=app))
    return dict(
        files=ctx.files(),
        rev=str(ctx.rev()),
        desc=ctx.description(),
        form=form
        )

Added applications/admin/controllers/shell.py version [45f3dbfd56].














































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import sys
import cStringIO
import gluon.contrib.shell
import code, thread
from gluon.shell import env

if DEMO_MODE or MULTI_USER_MODE:
    session.flash = T('disabled in demo mode')
    redirect(URL('default','site'))

FE=10**9

def index():
    app = request.args(0) or 'admin'
    reset()
    return dict(app=app)

def callback():
    app = request.args[0]
    command = request.vars.statement
    escape = command[:1]!='!'
    history = session['history:'+app] = session.get('history:'+app,gluon.contrib.shell.History())
    if not escape:
        command = command[1:]
    if command == '%reset':
        reset()
        return '*** reset ***'
    elif command[0] == '%':
        try:
            command=session['commands:'+app][int(command[1:])]
        except ValueError:
            return ''
    session['commands:'+app].append(command)
    environ=env(app,True)
    output = gluon.contrib.shell.run(history,command,environ)
    k = len(session['commands:'+app]) - 1
    #output = PRE(output)
    #return TABLE(TR('In[%i]:'%k,PRE(command)),TR('Out[%i]:'%k,output))
    return 'In [%i] : %s%s\n' % (k + 1, command, output)

def reset():
    app = request.args(0) or 'admin'
    session['commands:'+app] = []
    session['history:'+app] = gluon.contrib.shell.History()
    return 'done'

Added applications/admin/controllers/toolbar.py version [f7ea6cbe56].






























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import os
from gluon.settings import global_settings, read_file
#

def index():
    app = request.args(0)
    return dict(app=app)

def profiler():
    """
    to use the profiler start web2py with -F profiler.log
    """
    KEY = 'web2py_profiler_size'
    filename = global_settings.cmd_options.profiler_filename
    data = 'profiler disabled'
    if filename:
        if  KEY in request.cookies:
            size = int(request.cookies[KEY].value)
        else:
            size = 0
        if os.path.exists(filename):
            data = read_file('profiler.log','rb')
            if size<len(data): 
                data = data[size:]
            else: 
                size=0
            size += len(data)
            response.cookies[KEY] = size
    return data

Added applications/admin/controllers/wizard.py version [60791b7dca].










































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

import os, uuid, re, pickle, urllib, glob
from gluon.admin import app_create, plugin_install
from gluon.fileutils import abspath, read_file, write_file

def reset(session):
    session.app={
        'name':'',
        'params':[('title','My New App'),
                  ('subtitle','powered by web2py'),
                  ('author','you'),
                  ('author_email','you@example.com'),
                  ('keywords',''),
                  ('description',''),
                  ('layout_theme','Default'),
                  ('database_uri','sqlite://storage.sqlite'),
                  ('security_key',str(uuid.uuid4())),
                  ('email_server','localhost'),
                  ('email_sender','you@example.com'),
                  ('email_login',''),
                  ('login_method','local'),
                  ('login_config',''),
                  ('plugins',[])],
        'tables':['auth_user'],
        'table_auth_user':['username','first_name','last_name','email','password'],
        'pages':['index','error'],
        'page_index':'# Welcome to my new app',
        'page_error':'# Error: the document does not exist',
        }

if not session.app: reset(session)

def listify(x):
    if not isinstance(x,(list,tuple)):
        return x and [x] or []
    return x

def clean(name):
    return re.sub('\W+','_',name.strip().lower())

def index():
    response.view='wizard/step.html'
    reset(session)
    apps=os.listdir(os.path.join(request.folder,'..'))
    form=SQLFORM.factory(Field('name',requires=[IS_NOT_EMPTY(),IS_ALPHANUMERIC()]))
    if form.accepts(request.vars):
        app = form.vars.name
        session.app['name'] = app
        if MULTI_USER_MODE and db(db.app.name==app)(db.app.owner!=auth.user.id).count():
            session.flash = 'App belongs already to other user'
        elif app in apps:
            meta = os.path.normpath(\
                os.path.join(os.path.normpath(request.folder),
                             '..',app,'wizard.metadata'))
            if os.path.exists(meta):
                try:
                    metafile = open(meta,'rb')
                    try:
                        session.app = pickle.load(metafile)
                    finally:
                        metafile.close()
                    session.flash = "The app exists, was created by wizard, continue to overwrite!"
                except:
                    session.flash = "The app exists, was NOT created by wizard, continue to overwrite!"
        redirect(URL('step1'))
    return dict(step='Start',form=form)


def step1():
    from gluon.contrib.simplejson import loads
    import urllib
    if not session.themes:
        url=LAYOUTS_APP+'/default/layouts.json'
        try:
            data = urllib.urlopen(url).read()
            session.themes = ['Default'] + loads(data)['layouts']
        except:
            session.themes = ['Default']
    themes = session.themes
    if not session.plugins:
        url = PLUGINS_APP+'/default/plugins.json'
        try:
            data = urllib.urlopen(url).read()
            session.plugins = loads(data)['plugins']
        except:
            session.plugins = []
    plugins = [x.split('.')[2] for x in session.plugins]
    response.view='wizard/step.html'
    params = dict(session.app['params'])
    form=SQLFORM.factory(
                Field('title',default=params.get('title',None),
                                      requires=IS_NOT_EMPTY()),
                Field('subtitle',default=params.get('subtitle',None)),
                Field('author',default=params.get('author',None)),
                Field('author_email',default=params.get('author_email',None)),
                Field('keywords',default=params.get('keywords',None)),
                Field('description','text',
                      default=params.get('description',None)),
                Field('layout_theme',requires=IS_IN_SET(themes),
                      default=params.get('layout_theme',themes[0])),
                Field('database_uri',default=params.get('database_uri',None)),
                Field('security_key',default=params.get('security_key',None)),
                Field('email_server',default=params.get('email_server',None)),
                Field('email_sender',default=params.get('email_sender',None)),
                Field('email_login',default=params.get('email_login',None)),
                Field('login_method',requires=IS_IN_SET(('local','janrain')),
                      default=params.get('login_method','local')),
                Field('login_config',default=params.get('login_config',None)),
                Field('plugins','list:string',requires=IS_IN_SET(plugins,multiple=True)))

    if form.accepts(request.vars):
        session.app['params']=[(key,form.vars.get(key,None))
                               for key,value in session.app['params']]
        redirect(URL('step2'))
    return dict(step='1: Setting Parameters',form=form)

def step2():
    response.view='wizard/step.html'
    form=SQLFORM.factory(Field('table_names','list:string',
                               default=session.app['tables']))
    if form.accepts(request.vars):
        table_names = [clean(t) for t in listify(form.vars.table_names) if t.strip()]
        if [t for t in table_names if t.startswith('auth_') and not t=='auth_user']:
            form.error.table_names = T('invalid table names (auth_* tables already defined)')
        else:
            session.app['tables']=table_names
            for table in session.app['tables']:
                if not 'table_'+table in session.app:
                    session.app['table_'+table]=['name']
                if not table=='auth_user':
                    for key in ['create','read','update','select','search']:
                        name = table+'_'+key
                        if not name in session.app['pages']:
                            session.app['pages'].append(name)
                            session.app['page_'+name]='## %s %s' % (key.capitalize(),table)
            if session.app['tables']:
                redirect(URL('step3',args=0))
            else:
                redirect(URL('step4'))
    return dict(step='2: Tables',form=form)

def step3():
    response.view='wizard/step.html'
    n=int(request.args(0) or 0)
    m=len(session.app['tables'])
    if n>=m: redirect(URL('step2'))
    table=session.app['tables'][n]
    form=SQLFORM.factory(Field('field_names','list:string',
                               default=session.app.get('table_'+table,[])))
    if form.accepts(request.vars) and form.vars.field_names:
        fields=listify(form.vars.field_names)
        if table=='auth_user':
            for field in ['first_name','last_name','username','email','password']:
                if not field in fields:
                    fields.append(field)
        session.app['table_'+table]=[t.strip().lower()
                                       for t in listify(form.vars.field_names)
                                       if t.strip()]
        try:
            tables=sort_tables(session.app['tables'])
        except RuntimeError:
            response.flash=T('invalid circual reference')
        else:
            if n<m-1:
                redirect(URL('step3',args=n+1))
            else:
                redirect(URL('step4'))
    return dict(step='3: Fields for table "%s" (%s of %s)' % (table,n+1,m),table=table,form=form)

def step4():
    response.view='wizard/step.html'
    form=SQLFORM.factory(Field('pages','list:string',
                               default=session.app['pages']))
    if form.accepts(request.vars):
        session.app['pages']=[clean(t)
                              for t in listify(form.vars.pages)
                              if t.strip()]
        if session.app['pages']:
            redirect(URL('step5',args=0))
        else:
            redirect(URL('step6'))
    return dict(step='4: Pages',form=form)

def step5():
    response.view='wizard/step.html'
    n=int(request.args(0) or 0)
    m=len(session.app['pages'])
    if n>=m: redirect(URL('step4'))
    page=session.app['pages'][n]
    markmin_url='http://web2py.com/examples/static/markmin.html'
    form=SQLFORM.factory(Field('content','text',
                               default=session.app.get('page_'+page,[]),
                               comment=A('use markmin',_href=markmin_url,_target='_blank')),
                         formstyle='table2cols')
    if form.accepts(request.vars):
        session.app['page_'+page]=form.vars.content
        if n<m-1:
            redirect(URL('step5',args=n+1))
        else:
            redirect(URL('step6'))
    return dict(step='5: View for page "%s" (%s of %s)' % (page,n+1,m),form=form)

def step6():
    response.view='wizard/step.html'
    params = dict(session.app['params'])
    app = session.app['name']
    form=SQLFORM.factory(
        Field('generate_model','boolean',default=True),
        Field('generate_controller','boolean',default=True),
        Field('generate_views','boolean',default=True),
        Field('generate_menu','boolean',default=True),
        Field('apply_layout','boolean',default=True),
        Field('erase_database','boolean',default=True),
        Field('populate_database','boolean',default=True))
    if form.accepts(request.vars):
        if DEMO_MODE:
            session.flash = T('Application cannot be generated in demo mode')
            redirect(URL('index'))
        create(form.vars)
        session.flash = 'Application %s created' % app
        redirect(URL('generated'))
    return dict(step='6: Generate app "%s"' % app,form=form)

def generated():
    return dict(app=session.app['name'])

def sort_tables(tables):
    import re
    regex = re.compile('(%s)' % '|'.join(tables))
    is_auth_user = 'auth_user' in tables
    d={}
    for table in tables:
        d[table]=[]
        for field in session.app['table_%s' % table]:
            d[table]+=regex.findall(field)
    tables=[]
    if is_auth_user:
        tables.append('auth_user')
    def append(table,trail=[]):
        if table in trail:
            raise RuntimeError
        for t in d[table]: append(t,trail=trail+[table])
        if not table in tables: tables.append(table)
    for table in d: append(table)
    return tables

def make_table(table,fields):
    rawtable=table
    if table!='auth_user': table='t_'+table
    s=''
    s+='\n'+'#'*40+'\n'
    s+="db.define_table('%s',\n" % table
    s+="    Field('id','id',\n"
    s+="          represent=lambda id:SPAN(id,' ',A('view',_href=URL('%s_read',args=id)))),\n"%rawtable
    first_field='id'
    for field in fields:
        items=[x.lower() for x in field.split()]
        has = {}
        keys = []
        for key in ['notnull','unique','integer','double','boolean','float',
                    'boolean', 'date','time','datetime','text','wiki',
                    'html','file','upload','image','true',
                    'hidden','readonly','writeonly','multiple',
                    'notempty','required']:
            if key in items[1:]:
                keys.append(key)
                has[key] = True
        tables = session.app['tables']
        refs = [t for t in tables if t in items]
        items = items[:1] + [x for x in items[1:] if not x in keys and not x in tables]
        barename = name = '_'.join(items)
        if table[:2]=='t_': name='f_'+name
        if first_field=='id': first_field=name

        ### determine field type
        ftype='string'
        deftypes={'integer':'integer','double':'double','boolean':'boolean',
                  'float':'double','bool':'boolean',
                  'date':'date','time':'time','datetime':'datetime',
                  'text':'text','file':'upload','image':'upload','upload':'upload',
                  'wiki':'text', 'html':'text'}
        for key,t in deftypes.items():
            if key in has:                
                ftype = t
        if refs:
            key = refs[0]
            if not key=='auth_user': key='t_'+key
            if 'multiple' in has:
                ftype='list:reference %s' % key
            else:
                ftype='reference %s' % key
        if ftype=='string' and 'multiple' in has:
            ftype='list:string'
        elif ftype=='integer' and 'multiple' in has:
            ftype='list:integer'
        elif name=='password':
            ftype='password'
        s+="    Field('%s', type='%s'" % (name, ftype)

        ### determine field attributes
        if 'notnull' in has or 'notempty' in has or 'required' in has:
            s+=', notnull=True'
        if 'unique' in has:
            s+=', unique=True'
        if ftype=='boolean' and 'true' in has:
            s+=",\n          default=True"

        ### determine field representation
        if 'image' in has:
            s+=",\n          represent=lambda x: x and IMG(_alt='image',_src=URL('download',args=x), _width='200px') or ''"
        elif ftype in ('file','upload'):
            s+=",\n          represent=lambda x: x and A('download',_href=URL('download',args=x)) or ''"
        elif 'wiki' in has:
            s+=",\n          represent=lambda x: MARKMIN(x)"
            s+=",\n          comment='WIKI (markmin)'"
        elif 'html' in has:
            s+=",\n          represent=lambda x: XML(x,sanitize=True)"
            s+=",\n          comment='HTML (sanitized)'"
        ### determine field access
        if name=='password' or 'writeonly' in has:
            s+=",\n          readable=False"
        elif 'hidden' in has:
            s+=",\n          writable=False, readable=False"
        elif 'readonly' in has:
            s+=",\n          writable=False"

        ### make up a label
        s+=",\n          label=T('%s')),\n" % \
            ' '.join(x.capitalize() for x in barename.split('_'))
    if table!='auth_user':
        s+="    Field('is_active','boolean',default=True,\n"
        s+="          label=T('Active'),writable=False,readable=False),\n"
    s+="    Field('created_on','datetime',default=request.now,\n"
    s+="          label=T('Created On'),writable=False,readable=False),\n"
    s+="    Field('modified_on','datetime',default=request.now,\n"
    s+="          label=T('Modified On'),writable=False,readable=False,\n"
    s+="          update=request.now),\n"
    if not table=='auth_user' and 'auth_user' in session.app['tables']:
        s+="    Field('created_by',db.auth_user,default=auth.user_id,\n"
        s+="          label=T('Created By'),writable=False,readable=False),\n"
        s+="    Field('modified_by',db.auth_user,default=auth.user_id,\n"
        s+="          label=T('Modified By'),writable=False,readable=False,\n"
        s+="          update=auth.user_id),\n"
    elif table=='auth_user':
        s+="    Field('registration_key',default='',\n"
        s+="          writable=False,readable=False),\n"
        s+="    Field('reset_password_key',default='',\n"
        s+="          writable=False,readable=False),\n"
        s+="    Field('registration_id',default='',\n"
        s+="          writable=False,readable=False),\n"
    s+="    format='%("+first_field+")s',\n"
    s+="    migrate=settings.migrate)\n\n"
    if table=='auth_user':
        s+="""
db.auth_user.first_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
db.auth_user.last_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
db.auth_user.password.requires = CRYPT(key=auth.settings.hmac_key)
db.auth_user.username.requires = IS_NOT_IN_DB(db, db.auth_user.username)
db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, db.auth_user.registration_id)
db.auth_user.email.requires = (IS_EMAIL(error_message=auth.messages.invalid_email),
                               IS_NOT_IN_DB(db, db.auth_user.email))
"""
    else:
        s+="db.define_table('%s_archive',db.%s,Field('current_record','reference %s'))\n" % (table,table,table)
    return s


def fix_db(filename):
    params = dict(session.app['params'])
    content = read_file(filename,'rb')
    if 'auth_user' in session.app['tables']:
        auth_user = make_table('auth_user',session.app['table_auth_user'])
        content = content.replace('sqlite://storage.sqlite',
                                params['database_uri'])
        content = content.replace('auth.define_tables()',\
            auth_user+'auth.define_tables(migrate = settings.migrate)')
    content += """
mail.settings.server = settings.email_server
mail.settings.sender = settings.email_sender
mail.settings.login = settings.email_login
"""
    if params['login_method']=='janrain':
        content+="""
from gluon.contrib.login_methods.rpx_account import RPXAccount
auth.settings.actions_disabled=['register','change_password','request_reset_password']
auth.settings.login_form = RPXAccount(request,
    api_key = settings.login_config.split(':')[-1],
    domain = settings.login_config.split(':')[0],
    url = "http://%s/%s/default/user/login" % (request.env.http_host,request.application))
"""
    write_file(filename, content, 'wb')

def make_menu(pages):
    s="""
response.title = settings.title
response.subtitle = settings.subtitle
response.meta.author = '%s <%s>' % (settings.author, settings.author_email)
response.meta.keywords = settings.keywords
response.meta.description = settings.description
response.menu = [
"""
    for page in pages:
        if not page.endswith('_read') and \
                not page.endswith('_update') and \
                not page.endswith('_search') and \
                not page.startswith('_') and not page.startswith('error'):
            s+="    (T('%s'),URL('default','%s')==URL(),URL('default','%s'),[]),\n" % \
                (' '.join(x.capitalize() for x in page.split('_')),page,page)
    s+=']'
    return s

def make_page(page,contents):
    if 'auth_user' in session.app['tables'] and not page in ('index','error'):
        s="@auth.requires_login()\ndef %s():\n" % page
    else:
        s="def %s():\n" % page
    items=page.rsplit('_',1)
    if items[0] in session.app['tables'] and len(items)==2:
        t=items[0]
        if items[1]=='read':
            s+="    record = db.t_%s(request.args(0)) or redirect(URL('error'))\n" % t
            s+="    form=crud.read(db.t_%s,record)\n" % t
            s+="    return dict(form=form)\n\n"
        elif items[1]=='update':
            s+="    record = db.t_%s(request.args(0),is_active=True) or redirect(URL('error'))\n" % t
            s+="    form=crud.update(db.t_%s,record,next='%s_read/[id]',\n"  % (t,t)
            s+="                     ondelete=lambda form: redirect(URL('%s_select')),\n" % t
            s+="                     onaccept=crud.archive)\n"
            s+="    return dict(form=form)\n\n"
        elif items[1]=='create':
            s+="    form=crud.create(db.t_%s,next='%s_read/[id]')\n" % (t,t)
            s+="    return dict(form=form)\n\n"
        elif items[1]=='select':
            s+="    f,v=request.args(0),request.args(1)\n"
            s+="    try: query=f and db.t_%s[f]==v or db.t_%s\n" % (t,t)
            s+="    except: redirect(URL('error'))\n"
            s+="    rows=db(query)(db.t_%s.is_active==True).select()\n" % t
            s+="    return dict(rows=rows)\n\n"
        elif items[1]=='search':
            s+="    form, rows=crud.search(db.t_%s,query=db.t_%s.is_active==True)\n" % (t,t)
            s+="    return dict(form=form, rows=rows)\n\n"
        else:
            t=None
    else:
        t=None
    if not t:
        s+="    return dict()\n\n"
    return s

def make_view(page,contents):
    s="{{extend 'layout.html'}}\n\n"
    s+=str(MARKMIN(contents))
    items=page.rsplit('_',1)
    if items[0] in session.app['tables'] and len(items)==2:
        t=items[0]
        if items[1]=='read':
            s+="\n{{=A(T('edit %s'),_href=URL('%s_update',args=request.args(0)))}}\n<br/>\n"%(t,t)
            s+='\n{{=form}}\n'
            s+="{{for t,f in db.t_%s._referenced_by:}}{{if not t[-8:]=='_archive':}}" % t
            s+="[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,form.record.id)))}}]"
            s+='{{pass}}{{pass}}'
        elif items[1]=='create':
            s+="\n{{=A(T('select %s'),_href=URL('%s_select'))}}\n<br/>\n"%(t,t)
            s+='\n{{=form}}\n'
        elif items[1]=='update':
            s+="\n{{=A(T('show %s'),_href=URL('%s_read',args=request.args(0)))}}\n<br/>\n"%(t,t)
            s+='\n{{=form}}\n'
        elif items[1]=='select':
            s+="\n{{if request.args:}}<h3>{{=T('For %s #%s' % (request.args(0)[2:],request.args(1)))}}</h3>{{pass}}\n"
            s+="\n{{=A(T('create new %s'),_href=URL('%s_create'))}}\n<br/>\n"%(t,t)
            s+="\n{{=A(T('search %s'),_href=URL('%s_search'))}}\n<br/>\n"%(t,t)
            s+="\n{{if rows:}}"
            s+="\n  {{headers=dict((str(k),k.label) for k in db.t_%s)}}" % t
            s+="\n  {{=SQLTABLE(rows,headers=headers)}}"
            s+="\n{{else:}}"
            s+="\n  {{=TAG.blockquote(T('No Data'))}}"
            s+="\n{{pass}}\n"
        elif items[1]=='search':
            s+="\n{{=A(T('create new %s'),_href=URL('%s_create'))}}\n<br/>\n"%(t,t)
            s+='\n{{=form}}\n'
            s+="\n{{if rows:}}"
            s+="\n  {{headers=dict((str(k),k.label) for k in db.t_%s)}}" % t
            s+="\n  {{=SQLTABLE(rows,headers=headers)}}"
            s+="\n{{else:}}"
            s+="\n  {{=TAG.blockquote(T('No Data'))}}"
            s+="\n{{pass}}\n"
    return s

def populate(tables):

    s = 'from gluon.contrib.populate import populate\n'
    s+= 'if not db(db.auth_user).count():\n'
    for table in sort_tables(tables):
        t=table=='auth_user' and 'auth_user' or 't_'+table
        s+="     populate(db.%s,10)\n" % t
    return s

def create(options):
    if DEMO_MODE:
        session.flash = T('disabled in demo mode')
        redirect(URL('step6'))
    params = dict(session.app['params'])
    app = session.app['name']
    if not app_create(app,request,force=True,key=params['security_key']):
        session.flash = 'Failure to create application'
        redirect(URL('step6'))

    ### save metadata in newapp/wizard.metadata
    try:
        meta = os.path.join(request.folder,'..',app,'wizard.metadata')
        file=open(meta,'wb')
        pickle.dump(session.app,file)
        file.close()
    except IOError:
        session.flash = 'Failure to write wizard metadata'
        redirect(URL('step6'))

    ### apply theme
    if options.apply_layout and params['layout_theme']!='Default':
        try:
            fn = 'web2py.plugin.layout_%s.w2p' % params['layout_theme']
            theme = urllib.urlopen(LAYOUTS_APP+'/static/plugin_layouts/plugins/'+fn)
            plugin_install(app, theme, request, fn)
        except: 
            session.flash = T("unable to download layout")

    ### apply plugins
    for plugin in params['plugins']:
        try:
            plugin_name = 'web2py.plugin.'+plugin+'.w2p'
            stream = urllib.urlopen(PLUGINS_APP+'/static/'+plugin_name)
            plugin_install(app, stream, request, plugin_name)
        except Exception, e: 
            session.flash = T("unable to download plugin: %s" % plugin)
                    
    ### write configuration file into newapp/models/0.py
    model = os.path.join(request.folder,'..',app,'models','0.py')
    file = open(model, 'wb')
    try:
        file.write("from gluon.storage import Storage\n")
        file.write("settings = Storage()\n\n")
        file.write("settings.migrate = True\n")
        for key,value in session.app['params']:
            file.write("settings.%s = %s\n" % (key,repr(value)))
    finally:
        file.close()

    ### write configuration file into newapp/models/menu.py
    if options.generate_menu:
        model = os.path.join(request.folder,'..',app,'models','menu.py')
        file = open(model,'wb')
        try:
            file.write(make_menu(session.app['pages']))
        finally:
            file.close()

    ### customize the auth_user table
    model = os.path.join(request.folder,'..',app,'models','db.py')
    fix_db(model)

    ### create newapp/models/db_wizard.py
    if options.generate_model:
        model = os.path.join(request.folder,'..',app,'models','db_wizard.py')
        file = open(model,'wb')
        try:
            file.write('### we prepend t_ to tablenames and f_ to fieldnames for disambiguity\n\n')
            tables = sort_tables(session.app['tables'])
            for table in tables:
                if table=='auth_user': continue
                file.write(make_table(table,session.app['table_'+table]))
        finally:
            file.close()

    model = os.path.join(request.folder,'..',app,
                         'models','db_wizard_populate.py')
    if os.path.exists(model): os.unlink(model)
    if options.populate_database and session.app['tables']:
        file = open(model,'wb')
        try:
            file.write(populate(session.app['tables']))
        finally:
            file.close()

    ### create newapp/controllers/default.py
    if options.generate_controller:
        controller = os.path.join(request.folder,'..',app,'controllers','default.py')
        file = open(controller,'wb')
        try:
            file.write("""# -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call():
    session.forget()
    return service()
### end requires
""")
            for page in session.app['pages']:
                file.write(make_page(page,session.app.get('page_'+page,'')))
        finally:
            file.close()

    ### create newapp/views/default/*.html
    if options.generate_views:
        for page in session.app['pages']:
            view = os.path.join(request.folder,'..',app,'views','default',page+'.html')
            file = open(view,'wb')
            try:
                file.write(make_view(page,session.app.get('page_'+page,'')))
            finally:
                file.close()

    if options.erase_database:
        path = os.path.join(request.folder,'..',app,'databases','*')
        for file in glob.glob(path): 
            os.unlink(file)

Added applications/admin/cron/crontab version [51acb7e26c].


1
+
10	*	*	*	*	root **applications/admin/cron/expire_sessions.py

Added applications/admin/languages/af.py version [6394eb18fe].
























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'(requires internet access)': '(vereis internet toegang)',
'(something like "it-it")': '(iets soos "it-it")',
'About': 'Oor',
'About application': 'Oor program',
'Additional code for your application': 'Additionele kode vir u application',
'Admin language': 'Admin taal',
'Application name:': 'Program naam:',
'Controllers': 'Beheerders',
'Deploy on Google App Engine': 'Stuur na Google App Engine toe',
'Edit application': 'Wysig program',
'Installed applications': 'Geinstalleerde apps',
'Languages': 'Tale',
'License for': 'Lisensie vir',
'Models': 'Modelle',
'Modules': 'Modules',
'New application wizard': 'Nuwe app wizard',
'New simple application': 'Nuwe eenvoudige app',
'Plugins': 'Plugins',
'Powered by': 'Aangedryf deur',
'Searching:': 'Soek:',
'Static files': 'Static files',
'Sure you want to delete this object?': 'Is jy seker jy will hierde object verwyder?',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no plugins': 'Daar is geen plugins',
'These files are served without processing, your images go here': 'Hierdie lêre is sonder veranderinge geserved, jou images gaan hier',
'To create a plugin, name a file/folder plugin_[name]': 'Om ''n plugin te skep, noem ''n lêer/gids plugin_[name]',
'Translation strings for the application': 'Vertaling woorde vir die program',
'Upload & install packed application': 'Oplaai & install gepakte program',
'Upload a package:': 'Oplaai ''n package:',
'Use an url:': 'Gebruik n url:',
'Views': 'Views',
'about': 'oor',
'administrative interface': 'administrative interface',
'and rename it:': 'en verander die naam:',
'change admin password': 'verander admin wagwoord',
'check for upgrades': 'soek vir upgrades',
'clean': 'maak skoon',
'collapse/expand all': 'collapse/expand all',
'compile': 'kompileer',
'controllers': 'beheerders',
'create': 'skep',
'create file with filename:': 'skep lêer met naam:',
'created by': 'geskep deur',
'crontab': 'crontab',
'currently running': 'loop tans',
'database administration': 'database administration',
'deploy': 'deploy',
'direction: ltr': 'direction: ltr',
'download layouts': 'aflaai layouts',
'download plugins': 'aflaai plugins',
'edit': 'wysig',
'errors': 'foute',
'exposes': 'exposes',
'extends': 'extends',
'files': 'lêre',
'filter': 'filter',
'help': 'hulp',
'includes': 'includes',
'install': 'installeer',
'languages': 'tale',
'loading...': 'laai...',
'logout': 'logout',
'models': 'modelle',
'modules': 'modules',
'overwrite installed app': 'skryf oor geinstalleerde program',
'pack all': 'pack alles',
'plugins': 'plugins',
'shell': 'shell',
'site': 'site',
'start wizard': 'start wizard',
'static': 'static',
'test': 'toets',
'uninstall': 'verwyder',
'update all languages': 'update all languages',
'upload': 'oplaai',
'upload file:': 'oplaai lêer:',
'upload plugin file:': 'upload plugin lêer:',
'versioning': 'versioning',
'views': 'views',
'web2py Recent Tweets': 'web2py Onlangse Tweets',
}

Added applications/admin/languages/bg-bg.py version [7882283c41].






















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s записите бяха изтрити',
'%s rows updated': '%s записите бяха обновени',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(something like "it-it")',
'A new version of web2py is available': 'A new version of web2py is available',
'A new version of web2py is available: %s': 'A new version of web2py is available: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.',
'ATTENTION: you cannot edit the running application!': 'ATTENTION: you cannot edit the running application!',
'About': 'About',
'About application': 'About application',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin is disabled because insecure channel',
'Admin is disabled because unsecure channel': 'Admin is disabled because unsecure channel',
'Admin language': 'Admin language',
'Administrator Password:': 'Administrator Password:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Are you sure you want to delete file "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Are you sure you want to uninstall application "%s"',
'Are you sure you want to uninstall application "%s"?': 'Are you sure you want to uninstall application "%s"?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Check to delete',
'Checking for upgrades...': 'Checking for upgrades...',
'Controllers': 'Controllers',
'Create new simple application': 'Create new simple application',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'DESIGN': 'DESIGN',
'Date and Time': 'Date and Time',
'Delete': 'Delete',
'Delete:': 'Delete:',
'Deploy on Google App Engine': 'Deploy on Google App Engine',
'Design for': 'Design for',
'EDIT': 'EDIT',
'Edit application': 'Edit application',
'Edit current record': 'Edit current record',
'Editing Language file': 'Editing Language file',
'Editing file': 'Editing file',
'Editing file "%s"': 'Editing file "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Error logs for "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Functions with no doctests will result in [passed] tests.',
'Hello World': 'Здравей, свят',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Import/Export',
'Installed applications': 'Installed applications',
'Internal State': 'Internal State',
'Invalid Query': 'Невалидна заявка',
'Invalid action': 'Invalid action',
'Language files (static strings) updated': 'Language files (static strings) updated',
'Languages': 'Languages',
'Last saved on:': 'Last saved on:',
'License for': 'License for',
'Login': 'Login',
'Login to the Administrative Interface': 'Login to the Administrative Interface',
'Models': 'Models',
'Modules': 'Modules',
'NO': 'NO',
'New Record': 'New Record',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'No databases in this application',
'Original/Translation': 'Original/Translation',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Peeking at file',
'Plugin "%s" in application': 'Plugin "%s" in application',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Query:': 'Query:',
'Resolve Conflict file': 'Resolve Conflict file',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Saved file hash:': 'Saved file hash:',
'Searching:': 'Searching:',
'Static files': 'Static files',
'Sure you want to delete this object?': 'Сигурен ли си, че искаш да изтриеш този обект?',
'TM': 'TM',
'Testing application': 'Testing application',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'There are no controllers',
'There are no models': 'There are no models',
'There are no modules': 'There are no modules',
'There are no plugins': 'There are no plugins',
'There are no static files': 'There are no static files',
'There are no translators, only default language is supported': 'There are no translators, only default language is supported',
'There are no views': 'There are no views',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'This is the %(filename)s template',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Unable to check for upgrades',
'Unable to download': 'Unable to download',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Update:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'Upload existing application',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'Use an url:': 'Use an url:',
'Version': 'Version',
'Views': 'Views',
'Welcome to web2py': 'Добре дошъл в web2py',
'YES': 'YES',
'about': 'about',
'additional code for your application': 'additional code for your application',
'admin disabled because no admin password': 'admin disabled because no admin password',
'admin disabled because not supported on google app engine': 'admin disabled because not supported on google apps engine',
'admin disabled because unable to access password file': 'admin disabled because unable to access password file',
'administrative interface': 'administrative interface',
'and rename it (required):': 'and rename it (required):',
'and rename it:': 'and rename it:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'application "%s" uninstalled': 'application "%s" uninstalled',
'application compiled': 'application compiled',
'application is compiled and cannot be designed': 'application is compiled and cannot be designed',
'arguments': 'arguments',
'back': 'back',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errors and sessions cleaned',
'cannot create file': 'cannot create file',
'cannot upload file "%(filename)s"': 'cannot upload file "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'check all',
'check for upgrades': 'check for upgrades',
'clean': 'clean',
'click here for online examples': 'щракни тук за онлайн примери',
'click here for the administrative interface': 'щракни тук за административния интерфейс',
'click to check for upgrades': 'click to check for upgrades',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'compile',
'compiled application removed': 'compiled application removed',
'controllers': 'controllers',
'create': 'create',
'create file with filename:': 'create file with filename:',
'create new application:': 'create new application:',
'created by': 'created by',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'currently saved or',
'data uploaded': 'данните бяха качени',
'database': 'database',
'database %s select': 'database %s select',
'database administration': 'database administration',
'db': 'дб',
'defines tables': 'defines tables',
'delete': 'delete',
'delete all checked': 'delete all checked',
'delete plugin': 'delete plugin',
'deploy': 'deploy',
'design': 'дизайн',
'direction: ltr': 'direction: ltr',
'done!': 'готово!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'edit',
'edit controller': 'edit controller',
'edit views:': 'edit views:',
'errors': 'errors',
'export as csv file': 'export as csv file',
'exposes': 'exposes',
'extends': 'extends',
'failed to reload module': 'failed to reload module',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'file "%(filename)s" created',
'file "%(filename)s" deleted': 'file "%(filename)s" deleted',
'file "%(filename)s" uploaded': 'file "%(filename)s" uploaded',
'file "%(filename)s" was not deleted': 'file "%(filename)s" was not deleted',
'file "%s" of %s restored': 'file "%s" of %s restored',
'file changed on disk': 'file changed on disk',
'file does not exist': 'file does not exist',
'file saved on %(time)s': 'file saved on %(time)s',
'file saved on %s': 'file saved on %s',
'files': 'files',
'filter': 'filter',
'help': 'help',
'htmledit': 'htmledit',
'includes': 'includes',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'install': 'install',
'internal error': 'internal error',
'invalid password': 'invalid password',
'invalid request': 'невалидна заявка',
'invalid ticket': 'invalid ticket',
'language file "%(filename)s" created/updated': 'language file "%(filename)s" created/updated',
'languages': 'languages',
'languages updated': 'languages updated',
'loading...': 'loading...',
'login': 'login',
'logout': 'logout',
'merge': 'merge',
'models': 'models',
'modules': 'modules',
'new application "%s" created': 'new application "%s" created',
'new plugin installed': 'new plugin installed',
'new record inserted': 'новият запис беше добавен',
'next 100 rows': 'next 100 rows',
'no match': 'no match',
'or import from csv file': 'or import from csv file',
'or provide app url:': 'or provide app url:',
'or provide application url:': 'or provide application url:',
'overwrite installed app': 'overwrite installed app',
'pack all': 'pack all',
'pack compiled': 'pack compiled',
'pack plugin': 'pack plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
'plugins': 'plugins',
'previous 100 rows': 'previous 100 rows',
'record': 'record',
'record does not exist': 'записът не съществува',
'record id': 'record id',
'remove compiled': 'remove compiled',
'restore': 'restore',
'revert': 'revert',
'save': 'save',
'selected': 'selected',
'session expired': 'session expired',
'shell': 'shell',
'site': 'site',
'some files could not be removed': 'some files could not be removed',
'start wizard': 'start wizard',
'state': 'състояние',
'static': 'static',
'submit': 'submit',
'table': 'table',
'test': 'test',
'the application logic, each URL path is mapped in one exposed function in the controller': 'the application logic, each URL path is mapped in one exposed function in the controller',
'the data representation, define database tables and sets': 'the data representation, define database tables and sets',
'the presentations layer, views are also known as templates': 'the presentations layer, views are also known as templates',
'these files are served without processing, your images go here': 'these files are served without processing, your images go here',
'to  previous version.': 'to  previous version.',
'translation strings for the application': 'translation strings for the application',
'try': 'try',
'try something like': 'try something like',
'unable to create application "%s"': 'unable to create application "%s"',
'unable to delete file "%(filename)s"': 'unable to delete file "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
'unable to parse csv file': 'не е възможна обработката на csv файла',
'unable to uninstall "%s"': 'unable to uninstall "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'uncheck all',
'uninstall': 'uninstall',
'update': 'update',
'update all languages': 'update all languages',
'upgrade web2py now': 'upgrade web2py now',
'upload': 'upload',
'upload application:': 'upload application:',
'upload file:': 'upload file:',
'upload plugin file:': 'upload plugin file:',
'variables': 'variables',
'versioning': 'versioning',
'view': 'view',
'views': 'views',
'web2py Recent Tweets': 'web2py Recent Tweets',
'web2py is up to date': 'web2py is up to date',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}

Added applications/admin/languages/de-de.py version [d326e7c06f].





















































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s Zeilen gelöscht',
'%s rows updated': '%s Zeilen aktualisiert',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(so etwas wie "it-it")',
'A new version of web2py is available': 'Eine neue Version von web2py ist verfügbar',
'A new version of web2py is available: %s': 'Eine neue Version von web2py ist verfügbar: %s',
'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\n': 'Eine neue Version von web2py ist verfügbar: Version 1.85.3 (2010-09-18 07:07:46)\n',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ACHTUNG: Die Einwahl benötigt eine sichere (HTTPS) Verbindung. Es sei denn sie läuft Lokal(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ACHTUNG: Testen ist nicht threadsicher. Führen sie also nicht mehrere Tests gleichzeitig aus.',
'ATTENTION: This is an experimental feature and it needs more testing.': 'ACHTUNG: Dies ist eine experimentelle Funktion und benötigt noch weitere Tests.',
'ATTENTION: you cannot edit the running application!': 'ACHTUNG: Eine laufende Anwendung kann nicht editiert werden!',
'About': 'Über',
'About application': 'Über die Anwendung',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
'Admin is disabled because unsecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
'Admin language': 'Admin language',
'Administrator Password:': 'Administrator Passwort:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Sind Sie sich sicher, dass Sie diese Datei löschen wollen "%s"?',
'Are you sure you want to uninstall application "%s"': 'Sind Sie sich sicher, dass Sie diese Anwendung deinstallieren wollen "%s"',
'Are you sure you want to uninstall application "%s"?': 'Sind Sie sich sicher, dass Sie diese Anwendung deinstallieren wollen "%s"?',
'Are you sure you want to upgrade web2py now?': 'Sind Sie sich sicher, dass Sie web2py jetzt upgraden möchten?',
'Authentication': 'Authentifizierung',
'Available databases and tables': 'Verfügbare Datenbanken und Tabellen',
'Cannot be empty': 'Darf nicht leer sein',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'Nicht Kompilierbar:Es sind Fehler in der Anwendung. Beseitigen Sie die Fehler und versuchen Sie es erneut.',
'Change Password': 'Passwort ändern',
'Check to delete': 'Markiere zum löschen',
'Checking for upgrades...': 'Auf Updates überprüfen...',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Controllers': 'Controller',
'Copyright': 'Urheberrecht',
'Create new simple application': 'Erzeuge neue Anwendung',
'Current request': 'Aktuelle Anfrage (request)',
'Current response': 'Aktuelle Antwort (response)',
'Current session': 'Aktuelle Sitzung (session)',
'DB Model': 'DB Modell',
'DESIGN': 'design',
'Database': 'Datenbank',
'Date and Time': 'Datum und Uhrzeit',
'Delete': 'Löschen',
'Delete:': 'Löschen:',
'Deploy on Google App Engine': 'Auf Google App Engine installieren',
'Description': 'Beschreibung',
'Design for': 'Design für',
'E-mail': 'E-mail',
'EDIT': 'BEARBEITEN',
'Edit': 'Bearbeiten',
'Edit Profile': 'Bearbeite Profil',
'Edit This App': 'Bearbeite diese Anwendung',
'Edit application': 'Bearbeite Anwendung',
'Edit current record': 'Bearbeite aktuellen Datensatz',
'Editing Language file': 'Sprachdatei bearbeiten',
'Editing file': 'Bearbeite Datei',
'Editing file "%s"': 'Bearbeite Datei "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Fehlerprotokoll für "%(app)s"',
'Exception instance attributes': 'Atribute der Ausnahmeinstanz',
'Expand Abbreviation': 'Kürzel erweitern',
'First name': 'Vorname',
'Functions with no doctests will result in [passed] tests.': 'Funktionen ohne doctests erzeugen [passed] in Tests',
'Go to Matching Pair': 'gehe zum übereinstimmenden Paar',
'Group ID': 'Gruppen ID',
'Hello World': 'Hallo Welt',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Falls der obere Test eine Fehler-Ticketnummer enthält deutet das auf einen Fehler in der Ausführung des Controllers hin, noch bevor der Doctest ausgeführt werden konnte. Gewöhnlich führen fehlerhafte Einrückungen oder fehlerhafter Code ausserhalb der Funktion zu solchen Fehlern. Ein grüner Titel deutet darauf hin, dass alle Test(wenn sie vorhanden sind) erfolgreich durchlaufen wurden. In diesem Fall werden die Testresultate nicht angezeigt.',
'If you answer "yes", be patient, it may take a while to download': '',
'If you answer yes, be patient, it may take a while to download': 'If you answer yes, be patient, it may take a while to download',
'Import/Export': 'Importieren/Exportieren',
'Index': 'Index',
'Installed applications': 'Installierte Anwendungen',
'Internal State': 'interner Status',
'Invalid Query': 'Ungültige Abfrage',
'Invalid action': 'Ungültige Aktion',
'Invalid email': 'Ungültige Email',
'Key bindings': 'Tastenbelegungen',
'Key bindings for ZenConding Plugin': 'Tastenbelegungen für das ZenConding Plugin',
'Language files (static strings) updated': 'Sprachdatei (statisch Strings) aktualisiert',
'Languages': 'Sprachen',
'Last name': 'Nachname',
'Last saved on:': 'Zuletzt gespeichert am:',
'Layout': 'Layout',
'License for': 'Lizenz für',
'Login': 'Anmelden',
'Login to the Administrative Interface': 'An das Administrations-Interface anmelden',
'Logout': 'Abmeldung',
'Lost Password': 'Passwort vergessen',
'Main Menu': 'Menú principal',
'Match Pair': 'Paare finden',
'Menu Model': 'Menü Modell',
'Merge Lines': 'Zeilen zusammenfügen',
'Models': 'Modelle',
'Modules': 'Module',
'NO': 'NEIN',
'Name': 'Name',
'New Record': 'Neuer Datensatz',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'Next Edit Point': 'nächster Bearbeitungsschritt',
'No databases in this application': 'Keine Datenbank in dieser Anwendung',
'Origin': 'Herkunft',
'Original/Translation': 'Original/Übersetzung',
'Password': 'Passwort',
'Peeking at file': 'Dateiansicht',
'Plugin "%s" in application': 'Plugin "%s" in Anwendung',
'Plugins': 'Plugins',
'Powered by': 'Unterstützt von',
'Previous Edit Point': 'vorheriger Bearbeitungsschritt',
'Query:': 'Abfrage:',
'Record ID': 'Datensatz ID',
'Register': 'registrieren',
'Registration key': 'Registrierungsschlüssel',
'Reset Password key': 'Passwortschlüssel zurücksetzen',
'Resolve Conflict file': 'bereinige Konflikt-Datei',
'Role': 'Rolle',
'Rows in table': 'Zeilen in Tabelle',
'Rows selected': 'Zeilen ausgewählt',
'Save via Ajax': 'via Ajax sichern',
'Saved file hash:': 'Gespeicherter Datei-Hash:',
'Searching:': 'Searching:',
'Static files': 'statische Dateien',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Wollen Sie das Objekt wirklich löschen?',
'TM': 'TM',
'Table name': 'Tabellen Name',
'Testing application': 'Teste die Anwendung',
'Testing controller': 'teste Controller',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'Die "query" ist eine Bedingung wie "db.table1.field1 == \'Wert\'". Etwas wie "db.table1.field1 db.table2.field2 ==" führt zu einem SQL JOIN.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The output of the file is a dictionary that was rendered by the view': 'The output of the file is a dictionary that was rendered by the view',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'Keine Controller vorhanden',
'There are no models': 'Keine Modelle vorhanden',
'There are no modules': 'Keine Module vorhanden',
'There are no plugins': 'There are no plugins',
'There are no static files': 'Keine statischen Dateien vorhanden',
'There are no translators, only default language is supported': 'Keine Übersetzungen vorhanden, nur die voreingestellte Sprache wird unterstützt',
'There are no views': 'Keine Views vorhanden',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is a copy of the scaffolding application': 'Dies ist eine Kopie einer Grundgerüst-Anwendung',
'This is the %(filename)s template': 'Dies ist das Template %(filename)s',
'Ticket': 'Ticket',
'Timestamp': 'Timestamp',
'To create a plugin, name a file/folder plugin_[name]': 'Um ein Plugin zu erstellen benennen Sie eine(n) Datei/Ordner plugin_[Name]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'überprüfen von Upgrades nicht möglich',
'Unable to download': 'herunterladen nicht möglich',
'Unable to download app': 'herunterladen der Anwendung nicht möglich',
'Update:': 'Aktualisiere:',
'Upload & install packed application': 'Verpackte Anwendung hochladen und installieren',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'lade existierende Anwendung hoch',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Benutze (...)&(...) für AND, (...)|(...) für OR, und ~(...) für NOT, um komplexe Abfragen zu erstellen.',
'Use an url:': 'Use an url:',
'User ID': 'Benutzer ID',
'Version': 'Version',
'View': 'View',
'Views': 'Views',
'Welcome %s': 'Willkommen %s',
'Welcome to web2py': 'Willkommen zu web2py',
'Which called the function': 'Which called the function',
'Wrap with Abbreviation': 'mit Kürzel einhüllen',
'YES': 'JA',
'You are successfully running web2py': 'web2by wird erfolgreich ausgeführt',
'You can modify this application and adapt it to your needs': 'Sie können diese Anwendung verändern und Ihren Bedürfnissen anpassen',
'You visited the url': 'Sie besuchten die URL',
'about': 'Über',
'additional code for your application': 'zusätzlicher Code für Ihre Anwendung',
'admin disabled because no admin password': ' admin ist deaktiviert, weil kein Admin-Passwort gesetzt ist',
'admin disabled because not supported on google apps engine': 'admin ist deaktiviert, es existiert dafür keine Unterstützung auf der google apps engine',
'admin disabled because unable to access password file': 'admin ist deaktiviert, weil kein Zugriff auf die Passwortdatei besteht',
'administrative interface': 'administrative interface',
'and rename it (required):': 'und benenne sie um (erforderlich):',
'and rename it:': ' und benenne sie um:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
'application "%s" uninstalled': 'Anwendung "%s" deinstalliert',
'application compiled': 'Anwendung kompiliert',
'application is compiled and cannot be designed': 'Die Anwendung ist kompiliert kann deswegen nicht mehr geändert werden',
'arguments': 'arguments',
'back': 'zurück',
'beautify': 'beautify',
'cache': 'Cache',
'cache, errors and sessions cleaned': 'Zwischenspeicher (cache), Fehler und Sitzungen (sessions) gelöscht',
'call': 'call',
'cannot create file': 'Kann Datei nicht erstellen',
'cannot upload file "%(filename)s"': 'Kann Datei nicht Hochladen "%(filename)s"',
'change admin password': 'Administrator-Passwort ändern',
'change password': 'Passwort ändern',
'check all': 'alles auswählen',
'check for upgrades': 'check for upgrades',
'clean': 'löschen',
'click here for online examples': 'hier klicken für online Beispiele',
'click here for the administrative interface': 'hier klicken für die Administrationsoberfläche ',
'click to check for upgrades': 'hier klicken um nach Upgrades zu suchen',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'kompilieren',
'compiled application removed': 'kompilierte Anwendung gelöscht',
'controllers': 'Controllers',
'create': 'erstellen',
'create file with filename:': 'erzeuge Datei mit Dateinamen:',
'create new application:': 'erzeuge neue Anwendung:',
'created by': 'created by',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'des derzeit gespeicherten oder',
'customize me!': 'pass mich an!',
'data uploaded': 'Daten hochgeladen',
'database': 'Datenbank',
'database %s select': 'Datenbank %s ausgewählt',
'database administration': 'Datenbankadministration',
'db': 'db',
'defines tables': 'definiere Tabellen',
'delete': 'löschen',
'delete all checked': 'lösche alle markierten',
'delete plugin': 'Plugin löschen',
'deploy': 'deploy',
'design': 'design',
'direction: ltr': 'direction: ltr',
'documentation': 'Dokumentation',
'done!': 'fertig!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'bearbeiten',
'edit controller': 'Bearbeite Controller',
'edit profile': 'bearbeite Profil',
'edit views:': 'Views bearbeiten:',
'errors': 'Fehler',
'escape': 'escape',
'export as csv file': 'Exportieren als CSV-Datei',
'exposes': 'stellt zur Verfügung',
'extends': 'erweitert',
'failed to reload module': 'neu laden des Moduls fehlgeschlagen',
'file "%(filename)s" created': 'Datei "%(filename)s" erstellt',
'file "%(filename)s" deleted': 'Datei "%(filename)s" gelöscht',
'file "%(filename)s" uploaded': 'Datei "%(filename)s" hochgeladen',
'file "%(filename)s" was not deleted': 'Datei "%(filename)s" wurde nicht gelöscht',
'file "%s" of %s restored': 'Datei "%s" von %s wiederhergestellt',
'file changed on disk': 'Datei auf Festplatte geändert',
'file does not exist': 'Datei existiert nicht',
'file saved on %(time)s': 'Datei gespeichert am %(time)s',
'file saved on %s': 'Datei gespeichert auf %s',
'files': 'files',
'filter': 'filter',
'help': 'Hilfe',
'htmledit': 'htmledit',
'includes': 'Einfügen',
'index': 'index',
'insert new': 'neu einfügen',
'insert new %s': 'neu einfügen %s',
'install': 'installieren',
'internal error': 'interner Fehler',
'invalid password': 'Ungültiges Passwort',
'invalid request': 'ungültige Anfrage',
'invalid ticket': 'ungültiges Ticket',
'language file "%(filename)s" created/updated': 'Sprachdatei "%(filename)s" erstellt/aktualisiert',
'languages': 'Sprachen',
'languages updated': 'Sprachen aktualisiert',
'loading...': 'lade...',
'located in the file': 'located in Datei',
'login': 'anmelden',
'logout': 'abmelden',
'lost password?': 'Passwort vergessen?',
'merge': 'verbinden',
'models': 'Modelle',
'modules': 'Module',
'new application "%s" created': 'neue Anwendung "%s" erzeugt',
'new record inserted': 'neuer Datensatz eingefügt',
'next 100 rows': 'nächsten 100 Zeilen',
'or import from csv file': 'oder importieren von cvs Datei',
'or provide app url:': 'oder geben Sie eine Anwendungs-URL an:',
'or provide application url:': 'oder geben Sie eine Anwendungs-URL an:',
'overwrite installed app': 'installierte Anwendungen überschreiben',
'pack all': 'verpacke alles',
'pack compiled': 'Verpacke kompiliert',
'pack plugin': 'Plugin verpacken',
'please wait!': 'bitte warten!',
'plugins': 'plugins',
'previous 100 rows': 'vorherige 100 zeilen',
'record': 'Datensatz',
'record does not exist': 'Datensatz existiert nicht',
'record id': 'Datensatz id',
'register': 'Registrierung',
'remove compiled': 'kompilat gelöscht',
'restore': 'wiederherstellen',
'revert': 'zurückkehren',
'save': 'sichern',
'selected': 'ausgewählt(e)',
'session expired': 'Sitzung Abgelaufen',
'shell': 'shell',
'site': 'Seite',
'some files could not be removed': 'einige Dateien konnten nicht gelöscht werden',
'start wizard': 'start wizard',
'state': 'Status',
'static': 'statische Dateien',
'submit': 'Absenden',
'table': 'Tabelle',
'test': 'Test',
'test_def': 'test_def',
'test_for': 'test_for',
'test_if': 'test_if',
'test_try': 'test_try',
'the application logic, each URL path is mapped in one exposed function in the controller': 'Die Logik der Anwendung, jeder URL-Pfad wird auf eine Funktion abgebildet die der Controller zur Verfügung stellt',
'the data representation, define database tables and sets': 'Die Datenrepräsentation definiert Mengen von Tabellen und Datenbanken ',
'the presentations layer, views are also known as templates': 'Die Präsentationsschicht, Views sind auch bekannt als Vorlagen/Templates',
'these files are served without processing, your images go here': 'Diese Dateien werden ohne Verarbeitung ausgeliefert. Beispielsweise Bilder kommen hier hin.',
'to  previous version.': 'zu einer früheren Version.',
'translation strings for the application': 'Übersetzungs-Strings für die Anwendung',
'try': 'versuche',
'try something like': 'versuche so etwas wie',
'unable to create application "%s"': 'erzeugen von Anwendung "%s" nicht möglich',
'unable to delete file "%(filename)s"': 'löschen von Datein "%(filename)s" nicht möglich',
'unable to parse csv file': 'analysieren der cvs Datei nicht möglich',
'unable to uninstall "%s"': 'deinstallieren von "%s" nicht möglich',
'uncheck all': 'alles demarkieren',
'uninstall': 'deinstallieren',
'update': 'aktualisieren',
'update all languages': 'aktualisiere alle Sprachen',
'upgrade web2py now': 'jetzt web2py upgraden',
'upload': 'upload',
'upload application:': 'lade Anwendung hoch:',
'upload file:': 'lade Datei hoch:',
'upload plugin file:': 'Plugin-Datei hochladen:',
'user': 'user',
'variables': 'variables',
'versioning': 'Versionierung',
'view': 'View',
'views': 'Views',
'web2py Recent Tweets': 'neuste Tweets von web2py',
'web2py is up to date': 'web2py ist auf dem neuesten Stand',
'xml': 'xml',
}

Added applications/admin/languages/es-es.py version [677aa3fba3].



























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s filas eliminadas',
'%s rows updated': '%s filas actualizadas',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENCION: Inicio de sesión requiere una conexión segura (HTTPS) o localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENCION: NO EJECUTE VARIAS PRUEBAS SIMULTANEAMENTE, NO SON THREAD SAFE.',
'ATTENTION: you cannot edit the running application!': 'ATENCION: no puede modificar la aplicación que se ejecuta!',
'About': 'Acerca de',
'About application': 'Acerca de la aplicación',
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
'Administrator Password:': 'Contraseña del Administrador:',
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
'Are you sure you want to delete plugin "%s"?': '¿Está seguro que quiere eliminar el plugin "%s"?',
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
'Are you sure you want to upgrade web2py now?': '¿Está seguro que desea actualizar web2py ahora?',
'Available databases and tables': 'Bases de datos y tablas disponibles',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'Cannot compile: there are errors in your app:': 'No se puede compilar: hay errores en su aplicación:',
'Change Password': 'Cambie Contraseña',
'Check to delete': 'Marque para eliminar',
'Checking for upgrades...': 'Buscando actulizaciones...',
'Click row to expand traceback': 'Click row to expand traceback',
'Client IP': 'IP del Cliente',
'Controllers': 'Controladores',
'Count': 'Count',
'Create new application using the Wizard': 'Create new application using the Wizard',
'Create new simple application': 'Cree una nueva aplicación',
'Current request': 'Solicitud en curso',
'Current response': 'Respuesta en curso',
'Current session': 'Sesión en curso',
'DESIGN': 'DISEÑO',
'Date and Time': 'Fecha y Hora',
'Delete': 'Elimine',
'Delete:': 'Elimine:',
'Deploy on Google App Engine': 'Instale en Google App Engine',
'Description': 'Descripción',
'Design for': 'Diseño para',
'E-mail': 'Correo electrónico',
'EDIT': 'EDITAR',
'Edit Profile': 'Editar Perfil',
'Edit application': 'Editar aplicación',
'Edit current record': 'Edite el registro actual',
'Editing Language file': 'Editando archivo de lenguaje',
'Editing file': 'Editando archivo',
'Editing file "%s"': 'Editando archivo "%s"',
'Enterprise Web Framework': 'Armazón Empresarial para Internet',
'Error': 'Error',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
'Exception instance attributes': 'Atributos de la instancia de Excepción',
'File': 'File',
'First name': 'Nombre',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Group ID': 'ID de Grupo',
'Hello World': 'Hola Mundo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Si el reporte anterior contiene un número de tiquete este indica un falla en la ejecución del controlador, antes de cualquier intento de ejecutat doctests. Esto generalmente se debe a un error en la indentación o un error por fuera del código de la función.\r\nUn titulo verde indica que todas las pruebas pasaron (si existen). En dicho caso los resultados no se muestran.',
'Import/Export': 'Importar/Exportar',
'Installed applications': 'Aplicaciones instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Acción inválida',
'Invalid email': 'Correo inválido',
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
'Languages': 'Lenguajes',
'Last name': 'Apellido',
'Last saved on:': 'Guardado en:',
'License for': 'Licencia para',
'Login': 'Inicio de sesión',
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
'Logout': 'Fin de sesión',
'Lost Password': 'Contraseña perdida',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NO',
'Name': 'Nombre',
'New Record': 'Registro nuevo',
'No databases in this application': 'No hay bases de datos en esta aplicación',
'Origin': 'Origen',
'Original/Translation': 'Original/Traducción',
'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, no puede cambiar la contraseña aquí',
'Password': 'Contraseña',
'Peeking at file': 'Visualizando archivo',
'Plugin "%s" in application': 'Plugin "%s" en aplicación',
'Plugins': 'Plugins',
'Powered by': 'Este sitio usa',
'Query:': 'Consulta:',
'Record ID': 'ID de Registro',
'Register': 'Registrese',
'Registration key': 'Contraseña de Registro',
'Resolve Conflict file': 'archivo Resolución de Conflicto',
'Role': 'Rol',
'Rows in table': 'Filas en la tabla',
'Rows selected': 'Filas seleccionadas',
'Saved file hash:': 'Hash del archivo guardado:',
'Static files': 'Archivos estáticos',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
'TM': 'MR',
'Table name': 'Nombre de la tabla',
'Testing application': 'Probando aplicación',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
'There are no controllers': 'No hay controladores',
'There are no models': 'No hay modelos',
'There are no modules': 'No hay módulos',
'There are no static files': 'No hay archivos estáticos',
'There are no translators, only default language is supported': 'No hay traductores, sólo el lenguaje por defecto es soportado',
'There are no views': 'No hay vistas',
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
'Ticket': 'Tiquete',
'Timestamp': 'Timestamp',
'To create a plugin, name a file/folder plugin_[name]': 'Para crear un plugin, nombre un archivo/carpeta plugin_[nombre]',
'Unable to check for upgrades': 'No es posible verificar la existencia de actualizaciones',
'Unable to download': 'No es posible la descarga',
'Unable to download app': 'No es posible descargar la aplicación',
'Unable to download app because:': 'No es posible descargar la aplicación porque:',
'Unable to download because': 'No es posible descargar porque',
'Update:': 'Actualice:',
'Upload & install packed application': 'Suba e instale aplicación empaquetada',
'Upload existing application': 'Suba esta aplicación',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
'User ID': 'ID de Usuario',
'Version': 'Versión',
'Views': 'Vistas',
'Welcome to web2py': 'Bienvenido a web2py',
'YES': 'SI',
'about': 'acerca de',
'additional code for your application': 'código adicional para su aplicación',
'admin disabled because no admin password': ' por falta de contraseña',
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
'and rename it (required):': 'y renombrela (requerido):',
'and rename it:': ' y renombrelo:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application compiled': 'aplicación compilada',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'arguments': 'argumentos',
'back': 'atrás',
'browse': 'buscar',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'cannot create file': 'no es posible crear archivo',
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
'change admin password': 'cambie contraseña admin',
'check all': 'marcar todos',
'clean': 'limpiar',
'click here for online examples': 'haga clic aquí para ver ejemplos en línea',
'click here for the administrative interface': 'haga clic aquí para usar la interfaz administrativa',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'click to open': 'click to open',
'code': 'código',
'commit (mercurial)': 'commit (mercurial)',
'compile': 'compilar',
'compiled application removed': 'aplicación compilada removida',
'controllers': 'controladores',
'create': 'crear',
'create file with filename:': 'cree archivo con nombre:',
'create new application:': 'nombre de la nueva aplicación:',
'created by': 'creado por',
'crontab': 'crontab',
'currently saved or': 'actualmente guardado o',
'customize me!': 'Adaptame!',
'data uploaded': 'datos subidos',
'database': 'base de datos',
'database %s select': 'selección en base de datos %s',
'database administration': 'administración base de datos',
'db': 'db',
'defines tables': 'define tablas',
'delete': 'eliminar',
'delete all checked': 'eliminar marcados',
'delete plugin': 'eliminar plugin',
'design': 'modificar',
'direction: ltr': 'direction: ltr',
'done!': 'listo!',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit views:': 'editar vistas:',
'errors': 'errores',
'export as csv file': 'exportar como archivo CSV',
'exposes': 'expone',
'extends': 'extiende',
'failed to reload module': 'recarga del módulo ha fallado',
'failed to reload module because:': 'no es posible recargar el módulo por:',
'file "%(filename)s" created': 'archivo "%(filename)s" creado',
'file "%(filename)s" deleted': 'archivo "%(filename)s" eliminado',
'file "%(filename)s" uploaded': 'archivo "%(filename)s" subido',
'file "%(filename)s" was not deleted': 'archivo "%(filename)s" no fué eliminado',
'file "%s" of %s restored': 'archivo "%s" de %s restaurado',
'file changed on disk': 'archivo modificado en el disco',
'file does not exist': 'archivo no existe',
'file saved on %(time)s': 'archivo guardado %(time)s',
'file saved on %s': 'archivo guardado %s',
'help': 'ayuda',
'htmledit': 'htmledit',
'includes': 'incluye',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'install': 'instalar',
'internal error': 'error interno',
'invalid password': 'contraseña inválida',
'invalid request': 'solicitud inválida',
'invalid ticket': 'tiquete inválido',
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
'languages': 'lenguajes',
'languages updated': 'lenguajes actualizados',
'loading...': 'cargando...',
'login': 'inicio de sesión',
'logout': 'fin de sesión',
'manage': 'manage',
'merge': 'combinar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nueva aplicación "%s" creada',
'new plugin installed': 'nuevo plugin instalado',
'new record inserted': 'nuevo registro insertado',
'next 100 rows': '100 filas siguientes',
'no match': 'no encontrado',
'or import from csv file': 'o importar desde archivo CSV',
'or provide app url:': 'o provea URL de la aplicación:',
'or provide application url:': 'o provea URL de la aplicación:',
'overwrite installed app': 'sobreescriba aplicación instalada',
'pack all': 'empaquetar todo',
'pack compiled': 'empaquete compiladas',
'pack plugin': 'empaquetar plugin',
'password changed': 'contraseña cambiada',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
'previous 100 rows': '100 filas anteriores',
'record': 'registro',
'record does not exist': 'el registro no existe',
'record id': 'id de registro',
'remove compiled': 'eliminar compiladas',
'restore': 'restaurar',
'revert': 'revertir',
'save': 'guardar',
'selected': 'seleccionado(s)',
'session expired': 'sesión expirada',
'shell': 'shell',
'site': 'sitio',
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'state': 'estado',
'static': 'estáticos',
'submit': 'enviar',
'table': 'tabla',
'test': 'probar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
'the presentations layer, views are also known as templates': 'la capa de presentación, las vistas también son llamadas plantillas',
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
'to  previous version.': 'a la versión previa.',
'translation strings for the application': 'cadenas de caracteres de traducción para la aplicación',
'try': 'intente',
'try something like': 'intente algo como',
'unable to create application "%s"': 'no es posible crear la aplicación "%s"',
'unable to delete file "%(filename)s"': 'no es posible eliminar el archivo "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'no es posible eliminar plugin "%(plugin)s"',
'unable to parse csv file': 'no es posible analizar el archivo CSV',
'unable to uninstall "%s"': 'no es posible instalar "%s"',
'unable to upgrade because "%s"': 'no es posible actualizar porque "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'actualizar',
'update all languages': 'actualizar todos los lenguajes',
'upgrade web2py now': 'actualize web2py ahora',
'upload application:': 'subir aplicación:',
'upload file:': 'suba archivo:',
'upload plugin file:': 'suba archivo de plugin:',
'variables': 'variables',
'versioning': 'versiones',
'view': 'vista',
'views': 'vistas',
'web2py Recent Tweets': 'Tweets Recientes de web2py',
'web2py is up to date': 'web2py está actualizado',
'web2py upgraded; please restart it': 'web2py actualizado; favor reiniciar',
}

Added applications/admin/languages/fr-fr.py version [ed6f3ea1be].
























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression en option tels que "field1 = \'newvalue\'". Vous ne pouvez pas mettre à jour ou supprimer les résultats d\'une jointure "a JOIN"',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'%s rows deleted': 'lignes %s supprimé',
'%s rows updated': 'lignes %s mis à jour',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(quelque chose comme "it-it") ',
'A new version of web2py is available: %s': 'Une nouvelle version de web2py est disponible: %s ',
'A new version of web2py is available: Version 1.68.2 (2009-10-21 09:59:29)\n': 'Une nouvelle version de web2py est disponible: Version 1.68.2 (2009-10-21 09:59:29)\r\n',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATTENTION: nécessite une connexion sécurisée (HTTPS) ou être en localhost. ',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: les tests ne sont pas thread-safe DONC NE PAS EFFECTUER DES TESTS MULTIPLES SIMULTANÉMENT.',
'ATTENTION: you cannot edit the running application!': "ATTENTION: vous ne pouvez pas modifier l'application qui tourne!",
'About': 'À propos',
'About application': "A propos de l'application",
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin est désactivé parce que canal non sécurisé',
'Admin language': 'Admin language',
'Administrator Password:': 'Mot de passe Administrateur:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Etes-vous sûr de vouloir supprimer le fichier «%s»?',
'Are you sure you want to delete plugin "%s"?': 'Etes-vous sûr de vouloir effacer le plugin "%s"?',
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
'Are you sure you want to uninstall application "%s"?': "Êtes-vous sûr de vouloir désinstaller l'application «%s»?",
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Bases de données et tables disponible',
'Cannot be empty': 'Ne peut pas être vide',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'Ne peut pas compiler: il y a des erreurs dans votre application. corriger les erreurs et essayez à nouveau.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Cocher pour supprimer',
'Checking for upgrades...': 'Vérification des mises à jour ... ',
'Controllers': 'Contrôleurs',
'Create new simple application': 'Créer une nouvelle application',
'Current request': 'Requête actuel',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'Date and Time': 'Date et heure',
'Delete': 'Supprimer',
'Delete this file (you will be asked to confirm deletion)': 'Delete this file (you will be asked to confirm deletion)',
'Delete:': 'Supprimer:',
'Deploy on Google App Engine': 'Déployer sur Google App Engine',
'EDIT': 'MODIFIER',
'Edit application': "Modifier l'application",
'Edit current record': 'Modifier cet entrée',
'Editing Language file': 'Modifier le fichier de langue',
'Editing file': 'Modifier le fichier',
'Editing file "%s"': 'Modifier le fichier "% s" ',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Journal d\'erreurs pour "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Des fonctions sans doctests entraînera tests [passed] .',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': "Si le rapport ci-dessus contient un numéro de ticket, cela indique une défaillance dans l'exécution du contrôleur, avant toute tentative d'exécuter les doctests. Cela est généralement dû à une erreur d'indentation ou une erreur à l'extérieur du code de la fonction.\r\nUn titre verte indique que tous les tests (si définie) passed. Dans ce cas, les résultats des essais ne sont pas affichées.",
'Import/Export': 'Importer/Exporter',
'Installed applications': 'Les applications installées',
'Internal State': 'État Interne',
'Invalid Query': 'Requête non valide',
'Invalid action': 'Action non valide',
'Language files (static strings) updated': 'Fichiers de langue (static strings) Mise à jour ',
'Languages': 'Langues',
'Last saved on:': 'Dernière sauvegarde le:',
'License for': 'Licence pour',
'Login': 'Connexion',
'Login to the Administrative Interface': "Se connecter à l'interface d'administration",
'Models': 'Modèles',
'Modules': 'Modules',
'NO': 'NON',
'New Record': 'Nouvel Entrée',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Aucune base de données dans cette application',
'Original/Translation': 'Original / Traduction',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Jeter un oeil au fichier',
'Plugin "%s" in application': 'Plugin "%s" dans l\'application',
'Plugins': 'Plugins',
'Powered by': 'Propulsé par',
'Query:': 'Requête: ',
'Resolve Conflict file': 'Résoudre les conflits de fichiers',
'Rows in table': 'Lignes de la table',
'Rows selected': 'Lignes sélectionnées',
"Run tests in this file (to run all files, you may also use the button labelled 'test')": "Run tests in this file (to run all files, you may also use the button labelled 'test')",
'Save': 'Save',
'Saved file hash:': 'Hash du Fichier enregistré:',
'Searching:': 'Searching:',
'Static files': 'Fichiers statiques',
'Sure you want to delete this object?': 'Vous êtes sûr de vouloir supprimer cet objet? ',
'TM': 'MD',
'Testing application': "Test de l'application",
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "requête" est une condition comme "db.table1.field1==\'value\'". Quelque chose comme "db.table1.field1==db.table2.field2" aboutit à un JOIN SQL.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': "Il n'existe pas de contrôleurs",
'There are no models': "Il n'existe pas de modèles",
'There are no modules': "Il n'existe pas de modules",
'There are no plugins': 'There are no plugins',
'There are no static files': "Il n'existe pas de fichiers statiques",
'There are no translators, only default language is supported': "Il n'y a pas de traducteurs, est prise en charge uniquement la langue par défaut",
'There are no views': "Il n'existe pas de vues",
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'Ceci est le modèle %(filename)s ',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'Pour créer un plugin, créer un fichier /dossier plugin_[nom]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Impossible de vérifier les mises à niveau',
'Unable to download': 'Impossible de télécharger',
'Unable to download app': 'Impossible de télécharger app',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Mise à jour:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'charger une application existante',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Utilisez (...)&(...) pour AND, (...)|(...) pour OR, et ~(...) pour NOT et construire des requêtes plus complexes. ',
'Use an url:': 'Use an url:',
'Version': 'Version',
'Views': 'Vues',
'Web Framework': 'Web Framework',
'YES': 'OUI',
'about': 'à propos',
'additional code for your application': 'code supplémentaire pour votre application',
'admin disabled because no admin password': 'admin désactivé car aucun mot de passe admin',
'admin disabled because not supported on google app engine': 'admin désactivé car non pris en charge sur Google Apps engine',
'admin disabled because unable to access password file': "admin désactivé car incapable d'accéder au fichier mot de passe",
'administrative interface': 'administrative interface',
'and rename it (required):': 'et renommez-la (obligatoire):',
'and rename it:': 'et renommez-le:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'appadmin est désactivé parce que canal non sécurisé',
'application "%s" uninstalled': 'application "%s" désinstallé',
'application %(appname)s installed with md5sum: %(digest)s': 'application %(appname)s installed with md5sum: %(digest)s',
'application compiled': 'application compilée',
'application is compiled and cannot be designed': "l'application est compilée et ne peut être désigné",
'arguments': 'arguments',
'back': 'retour',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, erreurs et sessions nettoyé',
'cannot create file': 'ne peu pas créer de fichier',
'cannot upload file "%(filename)s"': 'ne peu pas charger le fichier "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'tous vérifier ',
'check for upgrades': 'check for upgrades',
'clean': 'nettoyer',
'click to check for upgrades': 'Cliquez pour vérifier les mises à niveau',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'compiler',
'compiled application removed': 'application compilée enlevé',
'controllers': 'contrôleurs',
'create': 'create',
'create file with filename:': 'créer un fichier avec nom de fichier:',
'create new application:': 'créer une nouvelle application:',
'created by': 'créé par',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'actuellement enregistrés ou',
'data uploaded': 'données chargées',
'database': 'base de données',
'database %s select': 'base de données  %s sélectionner',
'database administration': 'administration base de données',
'db': 'db',
'defines tables': 'définit les tables',
'delete': 'supprimer',
'delete all checked': 'supprimer tout ce qui est cocher',
'delete plugin': ' supprimer plugin',
'deploy': 'deploy',
'design': 'conception',
'direction: ltr': 'direction: ltr',
'docs': 'docs',
'done!': 'fait!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'modifier',
'edit controller': 'modifier contrôleur',
'edit views:': 'edit views:',
'errors': 'erreurs',
'export as csv file': 'exportation au format CSV',
'exposes': 'expose',
'exposes:': 'exposes:',
'extends': 'étend',
'failed to reload module': 'impossible de recharger le module',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'fichier "%(filename)s" créé',
'file "%(filename)s" deleted': 'fichier "%(filename)s" supprimé',
'file "%(filename)s" uploaded': 'fichier "%(filename)s" chargé',
'file "%s" of %s restored': 'fichier "%s" de %s restauré',
'file changed on disk': 'fichier modifié sur le disque',
'file does not exist': "fichier n'existe pas",
'file saved on %(time)s': 'fichier enregistré le %(time)s',
'file saved on %s': 'fichier enregistré le %s',
'files': 'files',
'filter': 'filter',
'help': 'aide',
'htmledit': 'edition html',
'includes': 'inclus',
'index': 'index',
'insert new': 'insérer nouveau',
'insert new %s': 'insérer nouveau %s',
'install': 'install',
'internal error': 'erreur interne',
'invalid password': 'mot de passe invalide',
'invalid request': 'Demande incorrecte',
'invalid ticket': 'ticket non valide',
'language file "%(filename)s" created/updated': 'fichier de langue "%(filename)s" créé/mis à jour',
'languages': 'langues',
'loading...': 'Chargement ...',
'login': 'connexion',
'logout': 'déconnexion',
'merge': 'fusionner',
'models': 'modèles',
'modules': 'modules',
'new application "%s" created': 'nouvelle application "%s" créée',
'new plugin installed': 'nouveau plugin installé',
'new record inserted': 'nouvelle entrée inséré',
'next 100 rows': '100 lignes suivantes',
'no match': 'no match',
'or import from csv file': 'ou importer depuis un fichier CSV ',
'or provide app url:': 'or provide app url:',
'or provide application url:': "ou fournir l'URL de l'application:",
'overwrite installed app': 'overwrite installed app',
'pack all': 'tout empaqueter',
'pack compiled': 'paquet compilé',
'pack plugin': 'paquet plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" supprimé',
'plugins': 'plugins',
'previous 100 rows': '100 lignes précédentes',
'record': 'entrée',
'record does not exist': "l'entrée n'existe pas",
'record id': 'id entrée',
'remove compiled': 'retirer compilé',
'restore': 'restaurer',
'revert': 'revenir',
'save': 'sauver',
'selected': 'sélectionnés',
'session expired': 'la session a expiré ',
'shell': 'shell',
'site': 'site',
'some files could not be removed': 'certains fichiers ne peuvent pas être supprimés',
'start wizard': 'start wizard',
'state': 'état',
'static': 'statiques',
'submit': 'envoyer',
'table': 'table',
'test': 'tester',
'the application logic, each URL path is mapped in one exposed function in the controller': "la logique de l'application, chaque route URL est mappé dans une fonction exposée dans le contrôleur",
'the data representation, define database tables and sets': 'la représentation des données, défini les tables de bases de données et sets',
'the presentations layer, views are also known as templates': 'la couche des présentations, les vues sont également connus en tant que modèles',
'these files are served without processing, your images go here': 'ces fichiers sont servis sans transformation, vos images vont ici',
'to  previous version.': 'à la version précédente.',
'translation strings for the application': "chaînes de traduction de l'application",
'try': 'essayer',
'try something like': 'essayez quelque chose comme',
'unable to create application "%s"': 'impossible de créer l\'application  "%s"',
'unable to delete file "%(filename)s"': 'impossible de supprimer le fichier "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'impossible de supprimer le plugin "%(plugin)s"',
'unable to parse csv file': "impossible d'analyser les fichiers CSV",
'unable to uninstall "%s"': 'impossible de désinstaller "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'tout décocher',
'uninstall': 'désinstaller',
'update': 'mettre à jour',
'update all languages': 'mettre à jour toutes les langues',
'upgrade now': 'upgrade now',
'upgrade web2py now': 'upgrade web2py now',
'upload': 'upload',
'upload application:': "charger l'application:",
'upload file:': 'charger le fichier:',
'upload plugin file:': 'charger fichier plugin:',
'user': 'user',
'variables': 'variables',
'versioning': 'versioning',
'view': 'vue',
'views': 'vues',
'web2py Recent Tweets': 'web2py Tweets récentes',
'web2py is up to date': 'web2py est à jour',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}

Added applications/admin/languages/he.py version [f3c994794b].















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"עדכן" הוא ביטוי אופציונאלי, כגון "field1=newvalue". אינך יוכל להשתמש בjoin, בעת שימוש ב"עדכן" או "מחק".',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s רשומות נמחקו',
'%s rows updated': '%s רשומות עודכנו',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(למשל "it-it")',
'A new version of web2py is available: %s': 'גירסא חדשה של web2py זמינה: %s',
'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\n': 'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\r\n',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'לתשומת ליבך: ניתן להתחבר רק בערוץ מאובטח (HTTPS) או מlocalhost',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'לתשומת ליבך: אין לערוך מספר בדיקות במקביל, שכן הן עשויות להפריע זו לזו',
'ATTENTION: you cannot edit the running application!': 'לתשומת ליבך: לא ניתן לערוך אפליקציה בזמן הרצתה',
'About': 'אודות',
'About application': 'אודות אפליקציה',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'ממשק האדמין נוטרל בשל גישה לא מאובטחת',
'Admin language': 'Admin language',
'Administrator Password:': 'סיסמת מנהל',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'האם אתה בטוח שברצונך למחוק את הקובץ "%s"?',
'Are you sure you want to delete plugin "%s"?': 'האם אתה בטוח שברצונך למחוק את התוסף "%s"?',
'Are you sure you want to uninstall application "%s"?': 'האם אתה בטוח שברצונך להסיר את האפליקציה "%s"?',
'Are you sure you want to upgrade web2py now?': 'האם אתה בטוח שאתה רוצה לשדרג את web2py עכשיו?',
'Available databases and tables': 'מסדי נתונים וטבלאות זמינים',
'Cannot be empty': 'אינו יכול להישאר ריק',
'Cannot compile: there are errors in your app:': 'לא ניתן לקמפל: ישנן שגיאות באפליקציה שלך:',
'Check to delete': 'סמן כדי למחוק',
'Checking for upgrades...': 'מחפש עדכונים',
'Controllers': 'בקרים',
'Create new simple application': 'צור אפליקציה חדשה',
'Current request': 'בקשה נוכחית',
'Current response': 'מענה נוכחי',
'Current session': 'סשן זה',
'Date and Time': 'תאריך ושעה',
'Delete': 'מחק',
'Delete:': 'מחק:',
'Deploy on Google App Engine': 'העלה ל Google App Engine',
'Detailed traceback description': 'Detailed traceback description',
'EDIT': 'ערוך!',
'Edit application': 'ערוך אפליקציה',
'Edit current record': 'ערוך רשומה נוכחית',
'Editing Language file': 'עורך את קובץ השפה',
'Editing file "%s"': 'עורך את הקובץ "%s"',
'Enterprise Web Framework': 'סביבת הפיתוח לרשת',
'Error logs for "%(app)s"': 'דו"ח שגיאות עבור אפליקציה "%(app)s"',
'Error snapshot': 'Error snapshot',
'Error ticket': 'Error ticket',
'Exception instance attributes': 'נתוני החריגה',
'Frames': 'Frames',
'Functions with no doctests will result in [passed] tests.': 'פונקציות שלא הוגדר להן doctest ירשמו כבדיקות ש[עברו בהצלחה].',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'אם בדו"ח לעיל מופיע מספר דו"ח שגיאה, זה מצביע על שגיאה בבקר, עוד לפני שניתן היה להריץ את הdoctest. לרוב מדובר בשגיאת הזחה, או שגיאה שאינה בקוד של הפונקציה.\r\nכותרת ירוקה מצביע על כך שכל הבדיקות (אם הוגדרו) עברו בהצלחה, במידה ותוצאות הבדיקה אינן מופיעות.',
'Import/Export': 'יבא\יצא',
'Installed applications': 'אפליקציות מותקנות',
'Internal State': 'מצב מובנה',
'Invalid Query': 'שאילתה לא תקינה',
'Invalid action': 'הוראה לא קיימת',
'Language files (static strings) updated': 'קובץ השפה (מחרוזות סטאטיות) עודכן',
'Languages': 'שפות',
'Last saved on:': 'לאחרונה נשמר בתאריך:',
'License for': 'רשיון עבור',
'Login': 'התחבר',
'Login to the Administrative Interface': 'התחבר לממשק המנהל',
'Models': 'מבני נתונים',
'Modules': 'מודולים',
'NO': 'לא',
'New Record': 'רשומה חדשה',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'אין מסדי נתונים לאפליקציה זו',
'Original/Translation': 'מקור\תרגום',
'PAM authenticated user, cannot change password here': 'שינוי סיסמא באמצעות PAM אינו יכול להתבצע כאן',
'Peeking at file': 'מעיין בקובץ',
'Plugin "%s" in application': 'פלאגין "%s" של אפליקציה',
'Plugins': 'תוספים',
'Powered by': 'מופעל ע"י',
'Query:': 'שאילתה:',
'Resolve Conflict file': 'הסר קובץ היוצר קונפליקט',
'Rows in table': 'רשומות בטבלה',
'Rows selected': 'רשומות נבחרו',
'Saved file hash:': 'גיבוב הקובץ השמור:',
'Static files': 'קבצים סטאטיים',
'Sure you want to delete this object?': 'האם אתה בטוח שברצונך למחוק אובייקט זה?',
'TM': 'סימן רשום',
'Testing application': 'בודק את האפליקציה',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"שאליתה" היא תנאי כגון "db1.table1.filed1=\'value\'" ביטוי כמו db.table1.field1=db.table2.field1 יחולל join',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'אין בקרים',
'There are no models': 'אין מבני נתונים',
'There are no modules': 'אין מודולים',
'There are no plugins': 'There are no plugins',
'There are no static files': 'אין קבצים סטאטיים',
'There are no translators, only default language is supported': 'אין תרגומים. רק שפת ברירת המחדל נתמכת',
'There are no views': 'אין קבצי תצוגה',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'זוהי תבנית הקובץ %(filename)s ',
'Ticket': 'דו"ח שגיאה',
'Ticket ID': 'Ticket ID',
'To create a plugin, name a file/folder plugin_[name]': 'כדי ליצור תוסף, קרא לקובץ או סיפריה בשם לפי התבנית plugin_[name]',
'Traceback': 'Traceback',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'לא ניתן היה לבדוק אם יש שדרוגים',
'Unable to download app because:': 'לא ניתן היה להוריד את האפליקציה כי:',
'Unable to download because': 'לא הצלחתי להוריד כי',
'Update:': 'עדכן:',
'Upload & install packed application': 'העלה והתקן אפליקציה ארוזה',
'Upload a package:': 'Upload a package:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'השתמש ב (...)&(...) עבור תנאי AND, (...)|(...) עבור תנאי OR ו~(...) עבור תנאי NOT ליצירת שאילתות מורכבות',
'Use an url:': 'Use an url:',
'Version': 'גירסא',
'Views': 'מראה',
'YES': 'כן',
'about': 'אודות',
'additional code for your application': 'קוד נוסף עבור האפליקציה שלך',
'admin disabled because no admin password': 'ממשק המנהל מנוטרל כי לא הוגדרה סיסמת מנהל',
'admin disabled because not supported on google app engine': 'ממשק המנהל נוטרל, כי אין תמיכה בGoogle app engine',
'admin disabled because unable to access password file': 'ממשק מנהל נוטרל, כי לא ניתן לגשת לקובץ הסיסמאות',
'administrative interface': 'administrative interface',
'and rename it (required):': 'ושנה את שמו (חובה):',
'and rename it:': 'ושנה את שמו:',
'appadmin': 'מנהל מסד הנתונים',
'appadmin is disabled because insecure channel': 'מנהל מסד הנתונים נוטרל בשל ערוץ לא מאובטח',
'application "%s" uninstalled': 'אפליקציה "%s" הוסרה',
'application compiled': 'אפליקציה קומפלה',
'application is compiled and cannot be designed': 'לא ניתן לערוך אפליקציה מקומפלת',
'arguments': 'פרמטרים',
'back': 'אחורה',
'cache': 'מטמון',
'cache, errors and sessions cleaned': 'מטמון, שגיאות וסשן נוקו',
'cannot create file': 'לא מצליח ליצור קובץ',
'cannot upload file "%(filename)s"': 'לא הצלחתי להעלות את הקובץ "%(filename)s"',
'change admin password': 'סיסמת מנהל שונתה',
'check all': 'סמן הכל',
'check for upgrades': 'check for upgrades',
'clean': 'נקה',
'click to check for upgrades': 'לחץ כדי לחפש עדכונים',
'code': 'קוד',
'collapse/expand all': 'collapse/expand all',
'compile': 'קמפל',
'compiled application removed': 'אפליקציה מקומפלת הוסרה',
'controllers': 'בקרים',
'create': 'צור',
'create file with filename:': 'צור קובץ בשם:',
'create new application:': 'צור אפליקציה חדשה:',
'created by': 'נוצר ע"י',
'crontab': 'משימות מתוזמנות',
'currently running': 'currently running',
'currently saved or': 'נשמר כעת או',
'data uploaded': 'המידע הועלה',
'database': 'מסד נתונים',
'database %s select': 'מסד הנתונים %s נבחר',
'database administration': 'ניהול מסד נתונים',
'db': 'מסד נתונים',
'defines tables': 'הגדר טבלאות',
'delete': 'מחק',
'delete all checked': 'סמן הכל למחיקה',
'delete plugin': 'מחק תוסף',
'deploy': 'deploy',
'design': 'עיצוב',
'direction: ltr': 'direction: rtl',
'done!': 'הסתיים!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'ערוך',
'edit controller': 'ערוך בקר',
'edit views:': 'ערוך קיבצי תצוגה:',
'errors': 'שגיאות',
'export as csv file': 'יצא לקובץ csv',
'exposes': 'חושף את',
'extends': 'הרחבה של',
'failed to reload module because:': 'נכשל בטעינה חוזרת של מודול בגלל:',
'file "%(filename)s" created': 'הקובץ "%(filename)s" נוצר',
'file "%(filename)s" deleted': 'הקובץ "%(filename)s" נמחק',
'file "%(filename)s" uploaded': 'הקובץ "%(filename)s" הועלה',
'file "%s" of %s restored': 'הקובץ "%s" of %s שוחזר',
'file changed on disk': 'קובץ שונה על גבי הדיסק',
'file does not exist': 'קובץ לא נמצא',
'file saved on %(time)s': 'הקובץ נשמר בשעה %(time)s',
'file saved on %s': 'הקובץ נשמר ב%s',
'filter': 'filter',
'help': 'עזרה',
'htmledit': 'עורך ויזואלי',
'includes': 'מכיל',
'insert new': 'הכנס נוסף',
'insert new %s': 'הכנס %s נוסף',
'inspect attributes': 'inspect attributes',
'install': 'התקן',
'internal error': 'שגיאה מובנית',
'invalid password': 'סיסמא שגויה',
'invalid request': 'בקשה לא תקינה',
'invalid ticket': 'דו"ח שגיאה לא קיים',
'language file "%(filename)s" created/updated': 'קובץ השפה "%(filename)s" נוצר\עודכן',
'languages': 'שפות',
'loading...': 'טוען...',
'locals': 'locals',
'login': 'התחבר',
'logout': 'התנתק',
'merge': 'מזג',
'models': 'מבני נתונים',
'modules': 'מודולים',
'new application "%s" created': 'האפליקציה "%s" נוצרה',
'new plugin installed': 'פלאגין חדש הותקן',
'new record inserted': 'הרשומה נוספה',
'next 100 rows': '100 הרשומות הבאות',
'no match': 'לא נמצאה התאמה',
'or import from csv file': 'או יבא מקובץ csv',
'or provide app url:': 'או ספק כתובת url של אפליקציה',
'overwrite installed app': 'התקן על גבי אפלקציה מותקנת',
'pack all': 'ארוז הכל',
'pack compiled': 'ארוז מקומפל',
'pack plugin': 'ארוז תוסף',
'password changed': 'סיסמא שונתה',
'plugin "%(plugin)s" deleted': 'תוסף "%(plugin)s" נמחק',
'plugins': 'plugins',
'previous 100 rows': '100 הרשומות הקודמות',
'record': 'רשומה',
'record does not exist': 'הרשומה אינה קיימת',
'record id': 'מזהה רשומה',
'remove compiled': 'הסר מקומפל',
'request': 'request',
'response': 'response',
'restore': 'שחזר',
'revert': 'חזור לגירסא קודמת',
'selected': 'נבחרו',
'session': 'session',
'session expired': 'תם הסשן',
'shell': 'שורת פקודה',
'site': 'אתר',
'some files could not be removed': 'לא ניתן היה להסיר חלק מהקבצים',
'start wizard': 'start wizard',
'state': 'מצב',
'static': 'קבצים סטאטיים',
'submit': 'שלח',
'table': 'טבלה',
'test': 'בדיקות',
'the application logic, each URL path is mapped in one exposed function in the controller': 'הלוגיקה של האפליקציה, כל url ממופה לפונקציה חשופה בבקר',
'the data representation, define database tables and sets': 'ייצוג המידע, בו מוגדרים טבלאות ומבנים',
'the presentations layer, views are also known as templates': 'שכבת התצוגה, המכונה גם template',
'these files are served without processing, your images go here': 'אלו הם קבצים הנשלחים מהשרת ללא עיבוד. הכנס את התמונות כאן',
'to  previous version.': 'אין גירסא קודמת',
'translation strings for the application': 'מחרוזות תרגום עבור האפליקציה',
'try': 'נסה',
'try something like': 'נסה משהו כמו',
'unable to create application "%s"': 'נכשל ביצירת האפליקציה "%s"',
'unable to delete file "%(filename)s"': 'נכשל במחיקת הקובץ "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'נכשל במחיקת התוסף "%(plugin)s"',
'unable to parse csv file': 'לא הצלחתי לנתח את הקלט של קובץ csv',
'unable to uninstall "%s"': 'לא ניתן להסיר את "%s"',
'unable to upgrade because "%s"': 'לא ניתן היה לשדרג כי "%s"',
'uncheck all': 'הסר סימון מהכל',
'uninstall': 'הסר התקנה',
'update': 'עדכן',
'update all languages': 'עדכן את כלל קיבצי השפה',
'upgrade now': 'upgrade now',
'upgrade web2py now': 'שדרג את web2py עכשיו',
'upload': 'upload',
'upload application:': 'העלה אפליקציה:',
'upload file:': 'העלה קובץ:',
'upload plugin file:': 'העלה קובץ תוסף:',
'variables': 'משתנים',
'versioning': 'מנגנון גירסאות',
'view': 'הצג',
'views': 'מראה',
'web2py Recent Tweets': 'ציוצים אחרונים של web2py',
'web2py is up to date': 'web2py מותקנת בגירסתה האחרונה',
'web2py upgraded; please restart it': 'web2py שודרגה; נא אתחל אותה',
}

Added applications/admin/languages/it-it.py version [f838859834].









































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(qualcosa simile a "it-it")',
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': "ATTENZIONE: L'accesso richiede una connessione sicura (HTTPS) o l'esecuzione di web2py in locale (connessione su localhost)",
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTZIONE: NON ESEGUIRE PIÙ TEST IN PARALLELO (I TEST NON SONO "THREAD SAFE")',
'ATTENTION: you cannot edit the running application!': "ATTENZIONE: non puoi modificare l'applicazione correntemente in uso ",
'About': 'Informazioni',
'About application': "Informazioni sull'applicazione",
'Admin is disabled because insecure channel': 'amministrazione disabilitata: comunicazione non sicura',
'Administrator Password:': 'Password Amministratore:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Confermi di voler cancellare il file "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Confermi di voler cancellare il plugin "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Confermi di voler disinstallare l\'applicazione "%s"?',
'Are you sure you want to upgrade web2py now?': 'Confermi di voler aggiornare web2py ora?',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
'Check to delete': 'Seleziona per cancellare',
'Checking for upgrades...': 'Controllo aggiornamenti in corso...',
'Controller': 'Controller',
'Controllers': 'Controllers',
'Copyright': 'Copyright',
'Create new simple application': 'Crea nuova applicazione',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Date and Time': 'Data and Ora',
'Delete': 'Cancella',
'Delete:': 'Cancella:',
'Deploy on Google App Engine': 'Installa su Google App Engine',
'EDIT': 'MODIFICA',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit application': 'Modifica applicazione',
'Edit current record': 'Modifica record corrente',
'Editing Language file': 'Modifica file linguaggio',
'Editing file "%s"': 'Modifica del file "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Log degli errori per "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
'Hello World': 'Salve Mondo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Installed applications': 'Applicazioni installate',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid action': 'Azione non valida',
'Language files (static strings) updated': 'Linguaggi (documenti con stringhe statiche) aggiornati',
'Languages': 'Linguaggi',
'Last saved on:': 'Ultimo salvataggio:',
'Layout': 'Layout',
'License for': 'Licenza relativa a',
'Login': 'Accesso',
'Login to the Administrative Interface': "Accesso all'interfaccia amministrativa",
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Models': 'Modelli',
'Modules': 'Moduli',
'NO': 'NO',
'New Record': 'Nuovo elemento (record)',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Original/Translation': 'Originale/Traduzione',
'PAM authenticated user, cannot change password here': 'utente autenticato tramite PAM, impossibile modificare password qui',
'Peeking at file': 'Uno sguardo al file',
'Plugin "%s" in application': 'Plugin "%s" nell\'applicazione',
'Plugins': 'I Plugins',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Resolve Conflict file': 'File di risoluzione conflitto',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Saved file hash:': 'Hash del file salvato:',
'Static files': 'Files statici',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'TM': 'TM',
'Testing application': 'Test applicazione in corsg',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio  "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'There are no controllers': 'Non ci sono controller',
'There are no models': 'Non ci sono modelli',
'There are no modules': 'Non ci sono moduli',
'There are no static files': 'Non ci sono file statici',
'There are no translators, only default language is supported': 'Non ci sono traduzioni, viene solo supportato il linguaggio di base',
'There are no views': 'Non ci sono viste ("view")',
'This is the %(filename)s template': 'Questo è il template %(filename)s',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]',
'Unable to check for upgrades': 'Impossibile controllare presenza di aggiornamenti',
'Unable to download app because:': 'Impossibile scaricare applicazione perché',
'Unable to download because': 'Impossibile scaricare perché',
'Update:': 'Aggiorna:',
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
'Upload a package:': 'Upload a package:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'Use an url:': 'Use an url:',
'Version': 'Versione',
'View': 'Vista',
'Views': 'viste',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'YES': 'SI',
'about': 'informazioni',
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
'admin disabled because no admin password': 'amministrazione disabilitata per mancanza di password amministrativa',
'admin disabled because not supported on google app engine': 'amministrazione non supportata da Google Apps Engine',
'admin disabled because unable to access password file': 'amministrazione disabilitata per impossibilità di leggere il file delle password',
'administrative interface': 'administrative interface',
'and rename it (required):': 'e rinominala (obbligatorio):',
'and rename it:': 'e rinominala:',
'appadmin': 'appadmin ',
'appadmin is disabled because insecure channel': 'amministrazione app (appadmin) disabilitata: comunicazione non sicura',
'application "%s" uninstalled': 'applicazione "%s" disinstallata',
'application compiled': 'applicazione compilata',
'application is compiled and cannot be designed': "l'applicazione è compilata e non si può modificare",
'arguments': 'arguments',
'back': 'indietro',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
'cannot create file': 'impossibile creare il file',
'cannot upload file "%(filename)s"': 'impossibile caricare il file "%(filename)s"',
'change admin password': 'change admin password',
'change password': 'cambia password',
'check all': 'controlla tutto',
'check for upgrades': 'check for upgrades',
'clean': 'pulisci',
'click here for online examples': 'clicca per vedere gli esempi',
'click here for the administrative interface': "clicca per l'interfaccia amministrativa",
'click to check for upgrades': 'clicca per controllare presenza di aggiornamenti',
'code': 'code',
'compile': 'compila',
'compiled application removed': "rimosso il codice compilato dell'applicazione",
'controllers': 'controllers',
'create': 'crea',
'create file with filename:': 'crea un file col nome:',
'create new application:': 'create new application:',
'created by': 'creato da',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'attualmente salvato o',
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'database administration': 'amministrazione database',
'db': 'db',
'defines tables': 'defininisce le tabelle',
'delete': 'Cancella',
'delete all checked': 'cancella tutti i selezionati',
'delete plugin': 'cancella plugin',
'deploy': 'deploy',
'design': 'progetta',
'direction: ltr': 'direction: ltr',
'done!': 'fatto!',
'edit': 'modifica',
'edit controller': 'modifica controller',
'edit profile': 'modifica profilo',
'edit views:': 'modifica viste (view):',
'errors': 'errori',
'export as csv file': 'esporta come file CSV',
'exposes': 'espone',
'extends': 'estende',
'failed to reload module because:': 'ricaricamento modulo fallito perché:',
'file "%(filename)s" created': 'creato il file "%(filename)s"',
'file "%(filename)s" deleted': 'cancellato il file "%(filename)s"',
'file "%(filename)s" uploaded': 'caricato il file "%(filename)s"',
'file "%s" of %s restored': 'ripristinato "%(filename)s"',
'file changed on disk': 'il file ha subito una modifica su disco',
'file does not exist': 'file inesistente',
'file saved on %(time)s': "file salvato nell'istante %(time)s",
'file saved on %s': 'file salvato: %s',
'help': 'aiuto',
'htmledit': 'modifica come html',
'includes': 'include',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'install': 'installa',
'internal error': 'errore interno',
'invalid password': 'password non valida',
'invalid request': 'richiesta non valida',
'invalid ticket': 'ticket non valido',
'language file "%(filename)s" created/updated': 'file linguaggio "%(filename)s" creato/aggiornato',
'languages': 'linguaggi',
'loading...': 'caricamento...',
'login': 'accesso',
'logout': 'uscita',
'merge': 'unisci',
'models': 'modelli',
'modules': 'moduli',
'new application "%s" created': 'creata la nuova applicazione "%s"',
'new plugin installed': 'installato nuovo plugin',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'no match': 'nessuna corrispondenza',
'or import from csv file': 'oppure importa da file CSV',
'or provide app url:': "oppure fornisci url dell'applicazione:",
'overwrite installed app': 'sovrascrivi applicazione installata',
'pack all': 'crea pacchetto',
'pack compiled': 'crea pacchetto del codice compilato',
'pack plugin': 'crea pacchetto del plugin',
'password changed': 'password modificata',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" cancellato',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'ID del record',
'register': 'registrazione',
'remove compiled': 'rimozione codice compilato',
'restore': 'ripristino',
'revert': 'versione precedente',
'selected': 'selezionato',
'session expired': 'sessions scaduta',
'shell': 'shell',
'site': 'sito',
'some files could not be removed': 'non è stato possibile rimuovere alcuni files',
'start wizard': 'start wizard',
'state': 'stato',
'static': 'statico',
'submit': 'invia',
'table': 'tabella',
'test': 'test',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logica dell\'applicazione, ogni percorso "URL" corrisponde ad una funzione esposta da un controller',
'the data representation, define database tables and sets': 'rappresentazione dei dati, definizione di tabelle di database e di "set" ',
'the presentations layer, views are also known as templates': 'Presentazione dell\'applicazione, viste (views, chiamate anche "templates")',
'these files are served without processing, your images go here': 'questi files vengono serviti così come sono, le immagini vanno qui',
'to  previous version.': 'torna a versione precedente',
'translation strings for the application': "stringhe di traduzioni per l'applicazione",
'try': 'prova',
'try something like': 'prova qualcosa come',
'unable to create application "%s"': 'impossibile creare applicazione "%s"',
'unable to delete file "%(filename)s"': 'impossibile rimuovere file "%(plugin)s"',
'unable to delete file plugin "%(plugin)s"': 'impossibile rimuovere file di plugin "%(plugin)s"',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
'unable to uninstall "%s"': 'impossibile disinstallare "%s"',
'unable to upgrade because "%s"': 'impossibile aggiornare perché "%s"',
'uncheck all': 'smarca tutti',
'uninstall': 'disinstalla',
'update': 'aggiorna',
'update all languages': 'aggiorna tutti i linguaggi',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': 'carica applicazione:',
'upload file:': 'carica file:',
'upload plugin file:': 'carica file di plugin:',
'variables': 'variables',
'versioning': 'sistema di versioni',
'view': 'vista',
'views': 'viste',
'web2py Recent Tweets': 'Tweets recenti per web2py',
'web2py is up to date': 'web2py è aggiornato',
'web2py upgraded; please restart it': 'web2py aggiornato; prego riavviarlo',
}

Added applications/admin/languages/it.py version [bef6439651].











































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(qualcosa simile a "it-it")',
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': "ATTENZIONE: L'accesso richiede una connessione sicura (HTTPS) o l'esecuzione di web2py in locale (connessione su localhost)",
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTZIONE: NON ESEGUIRE PIÙ TEST IN PARALLELO (I TEST NON SONO "THREAD SAFE")',
'ATTENTION: you cannot edit the running application!': "ATTENZIONE: non puoi modificare l'applicazione correntemente in uso ",
'About': 'Informazioni',
'About application': "Informazioni sull'applicazione",
'Admin is disabled because insecure channel': 'amministrazione disabilitata: comunicazione non sicura',
'Admin language': 'Admin language',
'Administrator Password:': 'Password Amministratore:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Confermi di voler cancellare il file "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Confermi di voler cancellare il plugin "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Confermi di voler disinstallare l\'applicazione "%s"?',
'Are you sure you want to upgrade web2py now?': 'Confermi di voler aggiornare web2py ora?',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
'Check to delete': 'Seleziona per cancellare',
'Checking for upgrades...': 'Controllo aggiornamenti in corso...',
'Controller': 'Controller',
'Controllers': 'Controllers',
'Copyright': 'Copyright',
'Create new simple application': 'Crea nuova applicazione',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Date and Time': 'Data and Ora',
'Delete': 'Cancella',
'Delete:': 'Cancella:',
'Deploy on Google App Engine': 'Installa su Google App Engine',
'EDIT': 'MODIFICA',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit application': 'Modifica applicazione',
'Edit current record': 'Modifica record corrente',
'Editing Language file': 'Modifica file linguaggio',
'Editing file "%s"': 'Modifica del file "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Log degli errori per "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
'Hello World': 'Salve Mondo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Installed applications': 'Applicazioni installate',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid action': 'Azione non valida',
'Language files (static strings) updated': 'Linguaggi (documenti con stringhe statiche) aggiornati',
'Languages': 'Linguaggi',
'Last saved on:': 'Ultimo salvataggio:',
'Layout': 'Layout',
'License for': 'Licenza relativa a',
'Login': 'Accesso',
'Login to the Administrative Interface': "Accesso all'interfaccia amministrativa",
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Models': 'Modelli',
'Modules': 'Moduli',
'NO': 'NO',
'New Record': 'Nuovo elemento (record)',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Original/Translation': 'Originale/Traduzione',
'PAM authenticated user, cannot change password here': 'utente autenticato tramite PAM, impossibile modificare password qui',
'Peeking at file': 'Uno sguardo al file',
'Plugin "%s" in application': 'Plugin "%s" nell\'applicazione',
'Plugins': 'I Plugins',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Resolve Conflict file': 'File di risoluzione conflitto',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Saved file hash:': 'Hash del file salvato:',
'Static files': 'Files statici',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'TM': 'TM',
'Testing application': 'Test applicazione in corsg',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio  "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'There are no controllers': 'Non ci sono controller',
'There are no models': 'Non ci sono modelli',
'There are no modules': 'Non ci sono moduli',
'There are no static files': 'Non ci sono file statici',
'There are no translators, only default language is supported': 'Non ci sono traduzioni, viene solo supportato il linguaggio di base',
'There are no views': 'Non ci sono viste ("view")',
'This is the %(filename)s template': 'Questo è il template %(filename)s',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]',
'Unable to check for upgrades': 'Impossibile controllare presenza di aggiornamenti',
'Unable to download app because:': 'Impossibile scaricare applicazione perché',
'Unable to download because': 'Impossibile scaricare perché',
'Unable to download because:': 'Unable to download because:',
'Update:': 'Aggiorna:',
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
'Upload a package:': 'Upload a package:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'Use an url:': 'Use an url:',
'Version': 'Versione',
'View': 'Vista',
'Views': 'viste',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'YES': 'SI',
'about': 'informazioni',
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
'admin disabled because no admin password': 'amministrazione disabilitata per mancanza di password amministrativa',
'admin disabled because not supported on google app engine': 'amministrazione non supportata da Google Apps Engine',
'admin disabled because unable to access password file': 'amministrazione disabilitata per impossibilità di leggere il file delle password',
'administrative interface': 'administrative interface',
'and rename it (required):': 'e rinominala (obbligatorio):',
'and rename it:': 'e rinominala:',
'appadmin': 'appadmin ',
'appadmin is disabled because insecure channel': 'amministrazione app (appadmin) disabilitata: comunicazione non sicura',
'application "%s" uninstalled': 'applicazione "%s" disinstallata',
'application compiled': 'applicazione compilata',
'application is compiled and cannot be designed': "l'applicazione è compilata e non si può modificare",
'arguments': 'arguments',
'back': 'indietro',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
'cannot create file': 'impossibile creare il file',
'cannot upload file "%(filename)s"': 'impossibile caricare il file "%(filename)s"',
'change admin password': 'change admin password',
'change password': 'cambia password',
'check all': 'controlla tutto',
'check for upgrades': 'check for upgrades',
'clean': 'pulisci',
'click here for online examples': 'clicca per vedere gli esempi',
'click here for the administrative interface': "clicca per l'interfaccia amministrativa",
'click to check for upgrades': 'clicca per controllare presenza di aggiornamenti',
'code': 'code',
'compile': 'compila',
'compiled application removed': "rimosso il codice compilato dell'applicazione",
'controllers': 'controllers',
'create': 'crea',
'create file with filename:': 'crea un file col nome:',
'create new application:': 'create new application:',
'created by': 'creato da',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'attualmente salvato o',
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'database administration': 'amministrazione database',
'db': 'db',
'defines tables': 'defininisce le tabelle',
'delete': 'Cancella',
'delete all checked': 'cancella tutti i selezionati',
'delete plugin': 'cancella plugin',
'deploy': 'deploy',
'design': 'progetta',
'direction: ltr': 'direction: ltr',
'done!': 'fatto!',
'edit': 'modifica',
'edit controller': 'modifica controller',
'edit profile': 'modifica profilo',
'edit views:': 'modifica viste (view):',
'errors': 'errori',
'export as csv file': 'esporta come file CSV',
'exposes': 'espone',
'extends': 'estende',
'failed to reload module because:': 'ricaricamento modulo fallito perché:',
'file "%(filename)s" created': 'creato il file "%(filename)s"',
'file "%(filename)s" deleted': 'cancellato il file "%(filename)s"',
'file "%(filename)s" uploaded': 'caricato il file "%(filename)s"',
'file "%s" of %s restored': 'ripristinato "%(filename)s"',
'file changed on disk': 'il file ha subito una modifica su disco',
'file does not exist': 'file inesistente',
'file saved on %(time)s': "file salvato nell'istante %(time)s",
'file saved on %s': 'file salvato: %s',
'help': 'aiuto',
'htmledit': 'modifica come html',
'includes': 'include',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'install': 'installa',
'internal error': 'errore interno',
'invalid password': 'password non valida',
'invalid request': 'richiesta non valida',
'invalid ticket': 'ticket non valido',
'language file "%(filename)s" created/updated': 'file linguaggio "%(filename)s" creato/aggiornato',
'languages': 'linguaggi',
'loading...': 'caricamento...',
'login': 'accesso',
'logout': 'uscita',
'merge': 'unisci',
'models': 'modelli',
'modules': 'moduli',
'new application "%s" created': 'creata la nuova applicazione "%s"',
'new plugin installed': 'installato nuovo plugin',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'no match': 'nessuna corrispondenza',
'or import from csv file': 'oppure importa da file CSV',
'or provide app url:': "oppure fornisci url dell'applicazione:",
'overwrite installed app': 'sovrascrivi applicazione installata',
'pack all': 'crea pacchetto',
'pack compiled': 'crea pacchetto del codice compilato',
'pack plugin': 'crea pacchetto del plugin',
'password changed': 'password modificata',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" cancellato',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'ID del record',
'register': 'registrazione',
'remove compiled': 'rimozione codice compilato',
'restore': 'ripristino',
'revert': 'versione precedente',
'selected': 'selezionato',
'session expired': 'sessions scaduta',
'shell': 'shell',
'site': 'sito',
'some files could not be removed': 'non è stato possibile rimuovere alcuni files',
'start wizard': 'start wizard',
'state': 'stato',
'static': 'statico',
'submit': 'invia',
'table': 'tabella',
'test': 'test',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logica dell\'applicazione, ogni percorso "URL" corrisponde ad una funzione esposta da un controller',
'the data representation, define database tables and sets': 'rappresentazione dei dati, definizione di tabelle di database e di "set" ',
'the presentations layer, views are also known as templates': 'Presentazione dell\'applicazione, viste (views, chiamate anche "templates")',
'these files are served without processing, your images go here': 'questi files vengono serviti così come sono, le immagini vanno qui',
'to  previous version.': 'torna a versione precedente',
'translation strings for the application': "stringhe di traduzioni per l'applicazione",
'try': 'prova',
'try something like': 'prova qualcosa come',
'unable to create application "%s"': 'impossibile creare applicazione "%s"',
'unable to delete file "%(filename)s"': 'impossibile rimuovere file "%(plugin)s"',
'unable to delete file plugin "%(plugin)s"': 'impossibile rimuovere file di plugin "%(plugin)s"',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
'unable to uninstall "%s"': 'impossibile disinstallare "%s"',
'unable to upgrade because "%s"': 'impossibile aggiornare perché "%s"',
'uncheck all': 'smarca tutti',
'uninstall': 'disinstalla',
'update': 'aggiorna',
'update all languages': 'aggiorna tutti i linguaggi',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': 'carica applicazione:',
'upload file:': 'carica file:',
'upload plugin file:': 'carica file di plugin:',
'variables': 'variables',
'versioning': 'sistema di versioni',
'view': 'vista',
'views': 'viste',
'web2py Recent Tweets': 'Tweets recenti per web2py',
'web2py is up to date': 'web2py è aggiornato',
'web2py upgraded; please restart it': 'web2py aggiornato; prego riavviarlo',
}

Added applications/admin/languages/pl-pl.py version [4ff0dcf09e].







































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuniętych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(coś podobnego do "it-it")',
'A new version of web2py is available': 'Nowa wersja web2py jest dostępna',
'A new version of web2py is available: %s': 'A new version of web2py is available: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'UWAGA: Wymagane jest bezpieczne (HTTPS) połączenie lub połączenia z lokalnego adresu.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.',
'ATTENTION: you cannot edit the running application!': 'UWAGA: nie można edytować uruchomionych aplikacji!',
'About': 'Informacje o',
'About application': 'Informacje o aplikacji',
'Admin is disabled because insecure channel': 'Admin is disabled because insecure channel',
'Admin is disabled because unsecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
'Admin language': 'Admin language',
'Administrator Password:': 'Hasło administratora:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Czy na pewno chcesz usunąć plik "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Czy na pewno chcesz usunąć aplikację "%s"',
'Are you sure you want to uninstall application "%s"?': 'Czy na pewno chcesz usunąć aplikację "%s"?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Dostępne bazy danych i tabele',
'Cannot be empty': 'Nie może być puste',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'Nie można skompilować: w Twojej aplikacji są błędy .        Znajdź je, popraw a następnie spróbój ponownie.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Zaznacz aby usunąć',
'Checking for upgrades...': 'Checking for upgrades...',
'Controllers': 'Kontrolery',
'Create new simple application': 'Utwórz nową aplikację',
'Current request': 'Aktualne żądanie',
'Current response': 'Aktualna odpowiedź',
'Current session': 'Aktualna sesja',
'DESIGN': 'PROJEKTUJ',
'Date and Time': 'Data i godzina',
'Delete': 'Usuń',
'Delete:': 'Usuń:',
'Deploy on Google App Engine': 'Umieść na Google App Engine',
'Design for': 'Projekt dla',
'EDIT': 'EDYTUJ',
'Edit application': 'Edycja aplikacji',
'Edit current record': 'Edytuj aktualny rekord',
'Editing Language file': 'Editing Language file',
'Editing file': 'Edycja pliku',
'Editing file "%s"': 'Edycja pliku "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Wpisy błędów dla "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Functions with no doctests will result in [passed] tests.',
'Hello World': 'Witaj Świecie',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Importuj/eksportuj',
'Installed applications': 'Zainstalowane aplikacje',
'Internal State': 'Stan wewnętrzny',
'Invalid Query': 'Błędne zapytanie',
'Invalid action': 'Błędna akcja',
'Language files (static strings) updated': 'Language files (static strings) updated',
'Languages': 'Tłumaczenia',
'Last saved on:': 'Ostatnio zapisany:',
'License for': 'Licencja dla',
'Login': 'Zaloguj',
'Login to the Administrative Interface': 'Logowanie do panelu administracyjnego',
'Models': 'Modele',
'Modules': 'Moduły',
'NO': 'NIE',
'New Record': 'Nowy rekord',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Original/Translation': 'Oryginał/tłumaczenie',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Podgląd pliku',
'Plugin "%s" in application': 'Plugin "%s" in application',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Query:': 'Zapytanie:',
'Resolve Conflict file': 'Resolve Conflict file',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wierszy wybranych',
'Saved file hash:': 'Suma kontrolna zapisanego pliku:',
'Static files': 'Pliki statyczne',
'Sure you want to delete this object?': 'Czy na pewno chcesz usunąć ten obiekt?',
'TM': 'TM',
'Testing application': 'Testing application',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'wartość\'". Takie coś jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'There are no controllers': 'Brak kontrolerów',
'There are no models': 'Brak modeli',
'There are no modules': 'Brak modułów',
'There are no static files': 'Brak plików statycznych',
'There are no translators, only default language is supported': 'Brak plików tłumaczeń, wspierany jest tylko domyślny język',
'There are no views': 'Brak widoków',
'This is the %(filename)s template': 'To jest szablon %(filename)s',
'Ticket': 'Bilet',
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
'Unable to check for upgrades': 'Nie można sprawdzić aktualizacji',
'Unable to download': 'Nie można ściągnąć',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Uaktualnij:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'Wyślij istniejącą aplikację',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Użyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...)  jako NOT do tworzenia bardziej skomplikowanych zapytań.',
'Use an url:': 'Use an url:',
'Version': 'Version',
'Views': 'Widoki',
'Welcome to web2py': 'Witaj w web2py',
'YES': 'TAK',
'about': 'informacje',
'additional code for your application': 'dodatkowy kod Twojej aplikacji',
'admin disabled because no admin password': 'panel administracyjny wyłączony z powodu braku hasła administracyjnego',
'admin disabled because not supported on google app engine': 'admin disabled because not supported on google apps engine',
'admin disabled because unable to access password file': 'panel administracyjny wyłączony z powodu braku dostępu do pliku z hasłem',
'administrative interface': 'administrative interface',
'and rename it (required):': 'i nadaj jej nową nazwę (wymagane):',
'and rename it:': 'i nadaj mu nową nazwę:',
'appadmin': 'administracja aplikacji',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'application "%s" uninstalled': 'aplikacja "%s" została odinstalowana',
'application compiled': 'aplikacja została skompilowana',
'application is compiled and cannot be designed': 'aplikacja jest skompilowana i nie może być projektowana',
'arguments': 'arguments',
'back': 'back',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pamięć podręczna, bilety błędów oraz pliki sesji zostały wyczyszczone',
'cannot create file': 'nie można utworzyć pliku',
'cannot upload file "%(filename)s"': 'nie można wysłać pliku "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'zaznacz wszystko',
'check for upgrades': 'check for upgrades',
'clean': 'oczyść',
'click here for online examples': 'kliknij aby przejść do interaktywnych przykładów',
'click here for the administrative interface': 'kliknij aby przejść do panelu administracyjnego',
'click to check for upgrades': 'kliknij aby sprawdzić aktualizacje',
'code': 'code',
'compile': 'skompiluj',
'compiled application removed': 'skompilowana aplikacja została usunięta',
'controllers': 'kontrolery',
'create': 'create',
'create file with filename:': 'utwórz plik o nazwie:',
'create new application:': 'utwórz nową aplikację:',
'created by': 'created by',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'aktualnie zapisany lub',
'data uploaded': 'dane wysłane',
'database': 'baza danych',
'database %s select': 'wybór z bazy danych %s',
'database administration': 'administracja bazy danych',
'db': 'baza danych',
'defines tables': 'zdefiniuj tabele',
'delete': 'usuń',
'delete all checked': 'usuń wszystkie zaznaczone',
'delete plugin': 'delete plugin',
'deploy': 'deploy',
'design': 'projektuj',
'direction: ltr': 'direction: ltr',
'done!': 'zrobione!',
'edit': 'edytuj',
'edit controller': 'edytuj kontroler',
'edit views:': 'edit views:',
'errors': 'błędy',
'export as csv file': 'eksportuj jako plik csv',
'exposes': 'eksponuje',
'extends': 'rozszerza',
'failed to reload module': 'nie udało się przeładować modułu',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'plik "%(filename)s" został utworzony',
'file "%(filename)s" deleted': 'plik "%(filename)s" został usunięty',
'file "%(filename)s" uploaded': 'plik "%(filename)s" został wysłany',
'file "%(filename)s" was not deleted': 'plik "%(filename)s" nie został usunięty',
'file "%s" of %s restored': 'plik "%s" z %s został odtworzony',
'file changed on disk': 'plik na dysku został zmieniony',
'file does not exist': 'plik nie istnieje',
'file saved on %(time)s': 'plik zapisany o %(time)s',
'file saved on %s': 'plik zapisany o %s',
'help': 'pomoc',
'htmledit': 'edytuj HTML',
'includes': 'zawiera',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'install': 'install',
'internal error': 'wewnętrzny błąd',
'invalid password': 'błędne hasło',
'invalid request': 'błędne zapytanie',
'invalid ticket': 'błędny bilet',
'language file "%(filename)s" created/updated': 'plik tłumaczeń "%(filename)s" został utworzony/uaktualniony',
'languages': 'pliki tłumaczeń',
'languages updated': 'pliki tłumaczeń zostały uaktualnione',
'loading...': 'wczytywanie...',
'login': 'zaloguj',
'logout': 'wyloguj',
'merge': 'merge',
'models': 'modele',
'modules': 'moduły',
'new application "%s" created': 'nowa aplikacja "%s" została utworzona',
'new plugin installed': 'new plugin installed',
'new record inserted': 'nowy rekord został wstawiony',
'next 100 rows': 'następne 100 wierszy',
'no match': 'no match',
'or import from csv file': 'lub zaimportuj z pliku csv',
'or provide app url:': 'or provide app url:',
'or provide application url:': 'lub podaj url aplikacji:',
'overwrite installed app': 'overwrite installed app',
'pack all': 'spakuj wszystko',
'pack compiled': 'spakuj skompilowane',
'pack plugin': 'pack plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'record',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'remove compiled': 'usuń skompilowane',
'restore': 'odtwórz',
'revert': 'przywróć',
'save': 'zapisz',
'selected': 'zaznaczone',
'session expired': 'sesja wygasła',
'shell': 'powłoka',
'site': 'strona główna',
'some files could not be removed': 'niektóre pliki nie mogły zostać usunięte',
'start wizard': 'start wizard',
'state': 'stan',
'static': 'pliki statyczne',
'submit': 'submit',
'table': 'tabela',
'test': 'testuj',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logika aplikacji, każda ścieżka URL jest mapowana na jedną z funkcji eksponowanych w kontrolerze',
'the data representation, define database tables and sets': 'reprezentacja danych, definicje zbiorów i tabel bazy danych',
'the presentations layer, views are also known as templates': 'warstwa prezentacji, widoki zwane są również szablonami',
'these files are served without processing, your images go here': 'pliki obsługiwane bez interpretacji, to jest miejsce na Twoje obrazy',
'to  previous version.': 'do  poprzedniej wersji.',
'translation strings for the application': 'ciągi tłumaczeń dla aplikacji',
'try': 'spróbój',
'try something like': 'spróbój czegos takiego jak',
'unable to create application "%s"': 'nie można utworzyć aplikacji "%s"',
'unable to delete file "%(filename)s"': 'nie można usunąć pliku "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
'unable to parse csv file': 'nie można sparsować pliku csv',
'unable to uninstall "%s"': 'nie można odinstalować "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'odznacz wszystko',
'uninstall': 'odinstaluj',
'update': 'uaktualnij',
'update all languages': 'uaktualnij wszystkie pliki tłumaczeń',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': 'wyślij plik aplikacji:',
'upload file:': 'wyślij plik:',
'upload plugin file:': 'upload plugin file:',
'variables': 'variables',
'versioning': 'versioning',
'view': 'widok',
'views': 'widoki',
'web2py Recent Tweets': 'najnowsze tweety web2py',
'web2py is up to date': 'web2py jest aktualne',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}

Added applications/admin/languages/pl.py version [83ac10247b].






















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuniętych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(coś podobnego do "it-it")',
'A new version of web2py is available': 'Nowa wersja web2py jest dostępna',
'A new version of web2py is available: %s': 'Nowa wersja web2py jest dostępna: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'UWAGA: Wymagane jest bezpieczne (HTTPS) połączenie lub połączenie z lokalnego adresu.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'UWAGA: TESTOWANIE NIE JEST BEZPIECZNE W ŚRODOWISKU WIELOWĄTKOWYM, TAK WIĘC NIE URUCHAMIAJ WIELU TESTÓW JEDNOCZEŚNIE.',
'ATTENTION: you cannot edit the running application!': 'UWAGA: nie można edytować uruchomionych aplikacji!',
'About': 'Informacje o',
'About application': 'Informacje o aplikacji',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
'Admin is disabled because unsecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
'Administrator Password:': 'Hasło administratora:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Czy na pewno chcesz usunąć plik "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Czy na pewno chcesz usunąć wtyczkę "%s"?',
'Are you sure you want to uninstall application "%s"': 'Czy na pewno chcesz usunąć aplikację "%s"',
'Are you sure you want to uninstall application "%s"?': 'Czy na pewno chcesz usunąć aplikację "%s"?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Dostępne bazy danych i tabele',
'Cannot be empty': 'Nie może być puste',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'Nie można skompilować: w Twojej aplikacji są błędy .        Znajdź je, popraw a następnie spróbój ponownie.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Zaznacz aby usunąć',
'Checking for upgrades...': 'Sprawdzanie aktualizacji...',
'Controllers': 'Kontrolery',
'Create new simple application': 'Utwórz nową aplikację',
'Current request': 'Aktualne żądanie',
'Current response': 'Aktualna odpowiedź',
'Current session': 'Aktualna sesja',
'DESIGN': 'PROJEKTUJ',
'Date and Time': 'Data i godzina',
'Delete': 'Usuń',
'Delete:': 'Usuń:',
'Deploy on Google App Engine': 'Umieść na Google App Engine',
'Design for': 'Projekt dla',
'EDIT': 'EDYTUJ',
'Edit application': 'Edycja aplikacji',
'Edit current record': 'Edytuj aktualny rekord',
'Editing Language file': 'Edytuj plik tłumaczeń',
'Editing file': 'Edycja pliku',
'Editing file "%s"': 'Edycja pliku "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Wpisy błędów dla "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Funkcje bez doctestów będą dołączone do [zaliczonych] testów.',
'Hello World': 'Witaj Świecie',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Jeżeli powyższy raport zawiera numer biletu błędu, oznacza to błąd podczas wykonywania kontrolera przez próbą uruchomienia doctestów. Zazwyczaj jest to spowodowane nieprawidłowymi wcięciami linii kodu lub błędami w module poza ciałem funkcji.\nTytuł w kolorze zielonym oznacza, ze wszystkie (zdefiniowane) testy zakończyły się sukcesem. W tej sytuacji ich wyniki nie są pokazane.',
'Import/Export': 'Importuj/eksportuj',
'Installed applications': 'Zainstalowane aplikacje',
'Internal State': 'Stan wewnętrzny',
'Invalid Query': 'Błędne zapytanie',
'Invalid action': 'Błędna akcja',
'Language files (static strings) updated': 'Pliki tłumaczeń (ciągi statyczne) zostały uaktualnione',
'Languages': 'Tłumaczenia',
'Last saved on:': 'Ostatnio zapisany:',
'License for': 'Licencja dla',
'Login': 'Zaloguj',
'Login to the Administrative Interface': 'Logowanie do panelu administracyjnego',
'Models': 'Modele',
'Modules': 'Moduły',
'NO': 'NIE',
'New Record': 'Nowy rekord',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Original/Translation': 'Oryginał/tłumaczenie',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Podgląd pliku',
'Plugin "%s" in application': 'Wtyczka "%s" w aplikacji',
'Plugins': 'Wtyczki',
'Powered by': 'Zasilane przez',
'Query:': 'Zapytanie:',
'Resolve Conflict file': 'Rozwiąż konflikt plików',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wierszy wybranych',
'Saved file hash:': 'Suma kontrolna zapisanego pliku:',
'Searching:': 'Searching:',
'Static files': 'Pliki statyczne',
'Sure you want to delete this object?': 'Czy na pewno chcesz usunąć ten obiekt?',
'TM': 'TM',
'Testing application': 'Testowanie aplikacji',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'wartość\'". Takie coś jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'Brak kontrolerów',
'There are no models': 'Brak modeli',
'There are no modules': 'Brak modułów',
'There are no plugins': 'There are no plugins',
'There are no static files': 'Brak plików statycznych',
'There are no translators, only default language is supported': 'Brak plików tłumaczeń, wspierany jest tylko domyślny język',
'There are no views': 'Brak widoków',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'To jest szablon %(filename)s',
'Ticket': 'Bilet',
'To create a plugin, name a file/folder plugin_[name]': 'Aby utworzyć wtyczkę, nazwij plik/katalog plugin_[nazwa]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Nie można sprawdzić aktualizacji',
'Unable to download': 'Nie można ściągnąć',
'Unable to download app': 'Nie można ściągnąć aplikacji',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Uaktualnij:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'Wyślij istniejącą aplikację',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Użyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...)  jako NOT do tworzenia bardziej skomplikowanych zapytań.',
'Use an url:': 'Use an url:',
'Version': 'Wersja',
'Views': 'Widoki',
'Welcome to web2py': 'Witaj w web2py',
'YES': 'TAK',
'about': 'informacje',
'additional code for your application': 'dodatkowy kod Twojej aplikacji',
'admin disabled because no admin password': 'panel administracyjny wyłączony z powodu braku hasła administracyjnego',
'admin disabled because not supported on google app engine': 'panel administracyjny wyłączony z powodu braku wsparcia na google apps engine',
'admin disabled because unable to access password file': 'panel administracyjny wyłączony z powodu braku dostępu do pliku z hasłem',
'administrative interface': 'administrative interface',
'and rename it (required):': 'i nadaj jej nową nazwę (wymagane):',
'and rename it:': 'i nadaj mu nową nazwę:',
'appadmin': 'administracja aplikacji',
'appadmin is disabled because insecure channel': 'administracja aplikacji wyłączona z powodu braku bezpiecznego połączenia',
'application "%s" uninstalled': 'aplikacja "%s" została odinstalowana',
'application compiled': 'aplikacja została skompilowana',
'application is compiled and cannot be designed': 'aplikacja jest skompilowana i nie może być projektowana',
'arguments': 'arguments',
'back': 'wstecz',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pamięć podręczna, bilety błędów oraz pliki sesji zostały wyczyszczone',
'cannot create file': 'nie można utworzyć pliku',
'cannot upload file "%(filename)s"': 'nie można wysłać pliku "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'zaznacz wszystko',
'check for upgrades': 'check for upgrades',
'clean': 'oczyść',
'click here for online examples': 'kliknij aby przejść do interaktywnych przykładów',
'click here for the administrative interface': 'kliknij aby przejść do panelu administracyjnego',
'click to check for upgrades': 'kliknij aby sprawdzić aktualizacje',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'skompiluj',
'compiled application removed': 'skompilowana aplikacja została usunięta',
'controllers': 'kontrolery',
'create': 'create',
'create file with filename:': 'utwórz plik o nazwie:',
'create new application:': 'utwórz nową aplikację:',
'created by': 'utworzone przez',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'aktualnie zapisany lub',
'data uploaded': 'dane wysłane',
'database': 'baza danych',
'database %s select': 'wybór z bazy danych %s',
'database administration': 'administracja bazy danych',
'db': 'baza danych',
'defines tables': 'zdefiniuj tabele',
'delete': 'usuń',
'delete all checked': 'usuń wszystkie zaznaczone',
'delete plugin': 'usuń wtyczkę',
'deploy': 'deploy',
'design': 'projektuj',
'direction: ltr': 'direction: ltr',
'done!': 'zrobione!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'edytuj',
'edit controller': 'edytuj kontroler',
'edit views:': 'edit views:',
'errors': 'błędy',
'export as csv file': 'eksportuj jako plik csv',
'exposes': 'eksponuje',
'extends': 'rozszerza',
'failed to reload module': 'nie udało się przeładować modułu',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'plik "%(filename)s" został utworzony',
'file "%(filename)s" deleted': 'plik "%(filename)s" został usunięty',
'file "%(filename)s" uploaded': 'plik "%(filename)s" został wysłany',
'file "%(filename)s" was not deleted': 'plik "%(filename)s" nie został usunięty',
'file "%s" of %s restored': 'plik "%s" z %s został odtworzony',
'file changed on disk': 'plik na dysku został zmieniony',
'file does not exist': 'plik nie istnieje',
'file saved on %(time)s': 'plik zapisany o %(time)s',
'file saved on %s': 'plik zapisany o %s',
'files': 'files',
'filter': 'filter',
'help': 'pomoc',
'htmledit': 'edytuj HTML',
'includes': 'zawiera',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'install': 'install',
'internal error': 'wewnętrzny błąd',
'invalid password': 'błędne hasło',
'invalid request': 'błędne zapytanie',
'invalid ticket': 'błędny bilet',
'language file "%(filename)s" created/updated': 'plik tłumaczeń "%(filename)s" został utworzony/uaktualniony',
'languages': 'pliki tłumaczeń',
'languages updated': 'pliki tłumaczeń zostały uaktualnione',
'loading...': 'wczytywanie...',
'login': 'zaloguj',
'logout': 'wyloguj',
'merge': 'zespól',
'models': 'modele',
'modules': 'moduły',
'new application "%s" created': 'nowa aplikacja "%s" została utworzona',
'new plugin installed': 'nowa wtyczka została zainstalowana',
'new record inserted': 'nowy rekord został wstawiony',
'next 100 rows': 'następne 100 wierszy',
'no match': 'no match',
'or import from csv file': 'lub zaimportuj z pliku csv',
'or provide app url:': 'or provide app url:',
'or provide application url:': 'lub podaj url aplikacji:',
'overwrite installed app': 'overwrite installed app',
'pack all': 'spakuj wszystko',
'pack compiled': 'spakuj skompilowane',
'pack plugin': 'spakuj wtyczkę',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'wtyczka "%(plugin)s" została usunięta',
'plugins': 'plugins',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'rekord',
'record does not exist': 'rekord nie istnieje',
'record id': 'ID rekordu',
'remove compiled': 'usuń skompilowane',
'restore': 'odtwórz',
'revert': 'przywróć',
'save': 'zapisz',
'selected': 'zaznaczone',
'session expired': 'sesja wygasła',
'shell': 'powłoka',
'site': 'strona główna',
'some files could not be removed': 'niektóre pliki nie mogły zostać usunięte',
'start wizard': 'start wizard',
'state': 'stan',
'static': 'pliki statyczne',
'submit': 'wyślij',
'table': 'tabela',
'test': 'testuj',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logika aplikacji, każda ścieżka URL jest mapowana na jedną z funkcji eksponowanych w kontrolerze',
'the data representation, define database tables and sets': 'reprezentacja danych, definicje zbiorów i tabel bazy danych',
'the presentations layer, views are also known as templates': 'warstwa prezentacji, widoki zwane są również szablonami',
'these files are served without processing, your images go here': 'pliki obsługiwane bez interpretacji, to jest miejsce na Twoje obrazy',
'to  previous version.': 'do  poprzedniej wersji.',
'translation strings for the application': 'ciągi tłumaczeń dla aplikacji',
'try': 'spróbój',
'try something like': 'spróbój czegos takiego jak',
'unable to create application "%s"': 'nie można utworzyć aplikacji "%s"',
'unable to delete file "%(filename)s"': 'nie można usunąć pliku "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'nie można usunąc pliku wtyczki "%(plugin)s"',
'unable to parse csv file': 'nie można sparsować pliku csv',
'unable to uninstall "%s"': 'nie można odinstalować "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'odznacz wszystko',
'uninstall': 'odinstaluj',
'update': 'uaktualnij',
'update all languages': 'uaktualnij wszystkie pliki tłumaczeń',
'upgrade web2py now': 'upgrade web2py now',
'upload': 'upload',
'upload application:': 'wyślij plik aplikacji:',
'upload file:': 'wyślij plik:',
'upload plugin file:': 'wyślij plik wtyczki:',
'variables': 'variables',
'versioning': 'versioning',
'view': 'widok',
'views': 'widoki',
'web2py Recent Tweets': 'najnowsze tweety web2py',
'web2py is up to date': 'web2py jest aktualne',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}

Added applications/admin/languages/pt-br.py version [33973b63ad].

































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um JOIN',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s registros apagados',
'%s rows updated': '%s registros atualizados',
'(requires internet access)': '(requer acesso a internet)',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Está disponível uma nova versão do web2py',
'A new version of web2py is available: %s': 'Está disponível uma nova versão do web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENÇÃO o login requer uma conexão segura (HTTPS) ou executar de localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENÇÃO OS TESTES NÃO THREAD SAFE, NÃO EFETUE MÚLTIPLOS TESTES AO MESMO TEMPO.',
'ATTENTION: you cannot edit the running application!': 'ATENÇÃO: Não pode modificar a aplicação em execução!',
'About': 'Sobre',
'About application': 'Sobre a aplicação',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin desabilitado pois o canal não é seguro',
'Admin is disabled because unsecure channel': 'Admin desabilitado pois o canal não é seguro',
'Admin language': 'Linguagem do Admin',
'Administrator Password:': 'Senha de administrador:',
'Application name:': 'Nome da aplicação:',
'Are you sure you want to delete file "%s"?': 'Tem certeza que deseja apagar o arquivo "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Tem certeza que deseja apagar o plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Tem certeza que deseja apagar a aplicação "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Tem certeza que deseja apagar a aplicação "%s"?',
'Are you sure you want to upgrade web2py now?': 'Tem certeza que deseja atualizar o web2py agora?',
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
'Cannot be empty': 'Não pode ser vazio',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'Não é possível compilar: Existem erros em sua aplicação.       Depure, corrija os errros e tente novamente',
'Cannot compile: there are errors in your app:': 'Não é possível compilar: Existem erros em sua aplicação',
'Change Password': 'Trocar Senha',
'Check to delete': 'Marque para apagar',
'Checking for upgrades...': 'Buscando atualizações...',
'Click row to expand traceback': 'Clique em uma coluna para expandir o log do erro',
'Client IP': 'IP do cliente',
'Controllers': 'Controladores',
'Count': 'Contagem',
'Create new application using the Wizard': 'Criar nova aplicação utilizando o assistente',
'Create new simple application': 'Crie uma nova aplicação',
'Current request': 'Requisição atual',
'Current response': 'Resposta atual',
'Current session': 'Sessão atual',
'DESIGN': 'Projeto',
'Date and Time': 'Data e Hora',
'Delete': 'Apague',
'Delete:': 'Apague:',
'Deploy on Google App Engine': 'Publicar no Google App Engine',
'Description': 'Descrição',
'Design for': 'Projeto de',
'Detailed traceback description': 'Detailed traceback description',
'E-mail': 'E-mail',
'EDIT': 'EDITAR',
'Edit Profile': 'Editar Perfil',
'Edit application': 'Editar aplicação',
'Edit current record': 'Editar o registro atual',
'Editing Language file': 'Editando arquivo de linguagem',
'Editing file': 'Editando arquivo',
'Editing file "%s"': 'Editando arquivo "%s"',
'Enterprise Web Framework': 'Framework web empresarial',
'Error': 'Erro',
'Error logs for "%(app)s"': 'Logs de erro para "%(app)s"',
'Error snapshot': 'Error snapshot',
'Error ticket': 'Error ticket',
'Exception instance attributes': 'Atributos da instancia de excessão',
'File': 'Arquivo',
'First name': 'Nome',
'Frames': 'Frames',
'Functions with no doctests will result in [passed] tests.': 'Funções sem doctests resultarão em testes [aceitos].',
'Group ID': 'ID do Grupo',
'Hello World': 'Olá Mundo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Se o relatório acima contém um número de ticket, isso indica uma falha no controlador em execução, antes de tantar executar os doctests. Isto acontece geralmente por erro de endentação ou erro fora do código da função.\nO titulo em verde indica que os testes (se definidos) passaram. Neste caso os testes não são mostrados.',
'Import/Export': 'Importar/Exportar',
'Installed applications': 'Aplicações instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Ação inválida',
'Invalid email': 'E-mail inválido',
'Language files (static strings) updated': 'Arquivos de linguagem (textos estáticos) atualizados',
'Languages': 'Linguagens',
'Last name': 'Sobrenome',
'Last saved on:': 'Salvo em:',
'License for': 'Licença para',
'Login': 'Entrar',
'Login to the Administrative Interface': 'Entrar na interface adminitrativa',
'Logout': 'Sair',
'Lost Password': 'Senha perdida',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NÃO',
'Name': 'Nome',
'New Record': 'Novo registro',
'New application wizard': 'Assistente para novas aplicações ',
'New simple application': 'Nova aplicação básica',
'No databases in this application': 'Não existem bancos de dados nesta aplicação',
'Origin': 'Origem',
'Original/Translation': 'Original/Tradução',
'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, não pode alterar a senha por aqui',
'Password': 'Senha',
'Peeking at file': 'Visualizando arquivo',
'Plugin "%s" in application': 'Plugin "%s" na aplicação',
'Plugins': 'Plugins',
'Powered by': 'Este site utiliza',
'Query:': 'Consulta:',
'Record ID': 'ID do Registro',
'Register': 'Registrar-se',
'Registration key': 'Chave de registro',
'Resolve Conflict file': 'Arquivo de resolução de conflito',
'Role': 'Papel',
'Rows in table': 'Registros na tabela',
'Rows selected': 'Registros selecionados',
'Saved file hash:': 'Hash do arquivo salvo:',
'Searching:': 'Searching:',
'Static files': 'Arquivos estáticos',
'Sure you want to delete this object?': 'Tem certeza que deseja apaagr este objeto?',
'TM': 'MR',
'Table name': 'Nome da tabela',
'Testing application': 'Testando a aplicação',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "consulta" é uma condição como "db.tabela.campo1==\'valor\'". Algo como "db.tabela1.campo1==db.tabela2.campo2" resulta em um JOIN SQL.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'Não existem controllers',
'There are no models': 'Não existem modelos',
'There are no modules': 'Não existem módulos',
'There are no plugins': 'There are no plugins',
'There are no static files': 'Não existem arquicos estáticos',
'There are no translators, only default language is supported': 'Não há traduções, somente a linguagem padrão é suportada',
'There are no views': 'Não existem visões',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'Este é o template %(filename)s',
'Ticket': 'Ticket',
'Ticket ID': 'Ticket ID',
'Timestamp': 'Data Atual',
'To create a plugin, name a file/folder plugin_[name]': 'Para criar um plugin, nomeio um arquivo/pasta como plugin_[nome]',
'Traceback': 'Traceback',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Não é possível checar as atualizações',
'Unable to download': 'Não é possível efetuar o download',
'Unable to download app': 'Não é possível baixar a aplicação',
'Unable to download app because:': 'Não é possível baixar a aplicação porque:',
'Unable to download because': 'Não é possível baixar porque',
'Update:': 'Atualizar:',
'Upload & install packed application': 'Faça upload e instale uma aplicação empacotada',
'Upload a package:': 'Faça upload de um pacote:',
'Upload existing application': 'Faça upload de uma aplicação existente',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para criar consultas mais complexas.',
'Use an url:': 'Use uma url:',
'User ID': 'ID do Usuario',
'Version': 'Versão',
'Views': 'Visões',
'Welcome to web2py': 'Bem-vindo ao web2py',
'YES': 'SIM',
'about': 'sobre',
'additional code for your application': 'código adicional para sua aplicação',
'admin disabled because no admin password': ' admin desabilitado por falta de senha definida',
'admin disabled because not supported on google app engine': 'admin dehabilitado, não é soportado no GAE',
'admin disabled because unable to access password file': 'admin desabilitado, não foi possível ler o arquivo de senha',
'administrative interface': 'interface administrativa',
'and rename it (required):': 'e renomeie (requerido):',
'and rename it:': ' e renomeie:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin desabilitado, canal inseguro',
'application "%s" uninstalled': 'aplicação "%s" desinstalada',
'application compiled': 'aplicação compilada',
'application is compiled and cannot be designed': 'A aplicação está compilada e não pode ser modificada',
'arguments': 'argumentos',
'back': 'voltar',
'browse': 'buscar',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, erros e sessões eliminadas',
'cannot create file': 'Não é possível criar o arquivo',
'cannot upload file "%(filename)s"': 'não é possível fazer upload do arquivo "%(filename)s"',
'change admin password': 'mudar senha de administrador',
'check all': 'marcar todos',
'check for upgrades': 'checar por atualizações',
'clean': 'limpar',
'click here for online examples': 'clique para ver exemplos online',
'click here for the administrative interface': 'Clique aqui para acessar a interface administrativa',
'click to check for upgrades': 'clique aqui para checar por atualizações',
'click to open': 'clique para abrir',
'code': 'código',
'collapse/expand all': 'collapse/expand all',
'commit (mercurial)': 'commit (mercurial)',
'compile': 'compilar',
'compiled application removed': 'aplicação compilada removida',
'controllers': 'controladores',
'create': 'criar',
'create file with filename:': 'criar um arquivo com o nome:',
'create new application:': 'nome da nova aplicação:',
'created by': 'criado por',
'crontab': 'crontab',
'currently running': 'Executando',
'currently saved or': 'Atualmente salvo ou',
'customize me!': 'Modifique-me',
'data uploaded': 'Dados enviados',
'database': 'banco de dados',
'database %s select': 'Seleção no banco de dados %s',
'database administration': 'administração de banco de dados',
'db': 'db',
'defines tables': 'define as tabelas',
'delete': 'apagar',
'delete all checked': 'apagar marcados',
'delete plugin': 'apagar plugin',
'deploy': 'publicar',
'design': 'modificar',
'direction: ltr': 'direção: ltr',
'done!': 'feito!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit views:': 'editar visões:',
'errors': 'erros',
'export as csv file': 'exportar como arquivo CSV',
'exposes': 'expõe',
'extends': 'estende',
'failed to reload module': 'Falha ao recarregar o módulo',
'failed to reload module because:': 'falha ao recarregar o módulo por:',
'file "%(filename)s" created': 'arquivo "%(filename)s" criado',
'file "%(filename)s" deleted': 'arquivo "%(filename)s" apagado',
'file "%(filename)s" uploaded': 'arquivo "%(filename)s" enviado',
'file "%(filename)s" was not deleted': 'arquivo "%(filename)s" não foi apagado',
'file "%s" of %s restored': 'arquivo "%s" de %s restaurado',
'file changed on disk': 'arquivo modificado no disco',
'file does not exist': 'arquivo não existe',
'file saved on %(time)s': 'arquivo salvo em %(time)s',
'file saved on %s': 'arquivo salvo em %s',
'files': 'files',
'filter': 'filter',
'help': 'ajuda',
'htmledit': 'htmledit',
'includes': 'inclui',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'inspect attributes': 'inspect attributes',
'install': 'instalar',
'internal error': 'erro interno',
'invalid password': 'senha inválida',
'invalid request': 'solicitação inválida',
'invalid ticket': 'ticket inválido',
'language file "%(filename)s" created/updated': 'arquivo de linguagem "%(filename)s" criado/atualizado',
'languages': 'linguagens',
'languages updated': 'linguagens atualizadas',
'loading...': 'carregando...',
'locals': 'locals',
'login': 'inicio de sessão',
'logout': 'finalizar sessão',
'manage': 'gerenciar',
'merge': 'juntar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nova aplicação "%s" criada',
'new plugin installed': 'novo plugin instalado',
'new record inserted': 'novo registro inserido',
'next 100 rows': 'próximos 100 registros',
'no match': 'não encontrado',
'or import from csv file': 'ou importar de um arquivo CSV',
'or provide app url:': 'ou forneça a url de uma aplicação:',
'or provide application url:': 'ou forneça a url de uma aplicação:',
'overwrite installed app': 'sobrescrever aplicação instalada',
'pack all': 'criar pacote',
'pack compiled': 'criar pacote compilado',
'pack plugin': 'empacotar plugin',
'password changed': 'senha alterada',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
'plugins': 'plugins',
'previous 100 rows': '100 registros anteriores',
'record': 'registro',
'record does not exist': 'o registro não existe',
'record id': 'id do registro',
'remove compiled': 'eliminar compilados',
'request': 'request',
'response': 'response',
'restore': 'restaurar',
'revert': 'reverter',
'save': 'salvar',
'selected': 'selecionado(s)',
'session': 'session',
'session expired': 'sessão expirada',
'shell': 'Terminal',
'site': 'site',
'some files could not be removed': 'alguns arquicos não puderam ser removidos',
'start wizard': 'iniciar assistente',
'state': 'estado',
'static': 'estáticos',
'submit': 'enviar',
'table': 'tabela',
'test': 'testar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'A lógica da aplicação, cada URL é mapeada para uma função exposta pelo controlador',
'the data representation, define database tables and sets': 'A representação dos dadps, define tabelas e estruturas de dados',
'the presentations layer, views are also known as templates': 'A camada de apresentação, As visões também são chamadas de templates',
'these files are served without processing, your images go here': 'Estes arquivos são servidos sem processamento, suas imagens ficam aqui',
'to  previous version.': 'para a versão anterior.',
'translation strings for the application': 'textos traduzidos para a aplicação',
'try': 'tente',
'try something like': 'tente algo como',
'unable to create application "%s"': 'não é possível criar a aplicação "%s"',
'unable to delete file "%(filename)s"': 'não é possível criar o arquico "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'não é possível criar o plugin "%(plugin)s"',
'unable to parse csv file': 'não é possível analisar o arquivo CSV',
'unable to uninstall "%s"': 'não é possível instalar "%s"',
'unable to upgrade because "%s"': 'não é possível atualizar porque "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'atualizar',
'update all languages': 'atualizar todas as linguagens',
'upgrade web2py now': 'atualize o web2py agora',
'upload': 'upload',
'upload application:': 'Fazer upload de uma aplicação:',
'upload file:': 'Enviar arquivo:',
'upload plugin file:': 'Enviar arquivo de plugin:',
'variables': 'variáveis',
'versioning': 'versionamento',
'view': 'visão',
'views': 'visões',
'web2py Recent Tweets': 'Tweets Recentes de @web2py',
'web2py is up to date': 'web2py está atualizado',
'web2py upgraded; please restart it': 'web2py atualizado; favor reiniciar',
}

Added applications/admin/languages/zh-cn.py version [d9ae1038f2].



































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"browse"': '游览',
'"save"': '"保存"',
'"submit"': '"提交"',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新"是可配置项 如 "field1=\'newvalue\'",你无法在JOIN 中更新或删除',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s 行已删',
'%s rows updated': '%s 行更新',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(就酱 "it-it")',
'A new version of web2py is available': '新版本web2py已经可用',
'A new version of web2py is available: %s': '新版本web2py已经可用: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '',
'ATTENTION: you cannot edit the running application!': '注意: 不能修改正在运行中的应用!',
'About': '关于',
'About application': '关于这个应用',
'Admin is disabled because insecure channel': '管理因不安全通道而关闭',
'Admin is disabled because unsecure channel': '管理因不稳定通道而关闭',
'Admin language': 'Admin language',
'Administrator Password:': '管理员密码:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': '你真想删除文件"%s"?',
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
'Are you sure you want to uninstall application "%s"': '你真确定要卸载应用 "%s"',
'Are you sure you want to uninstall application "%s"?': '你真确定要卸载应用 "%s" ?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': '可用数据库/表',
'Cannot be empty': '不能不填',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': '无法编译: 应用中有错误,请修订后再试.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Change Password': '修改密码',
'Check to delete': '检验删除',
'Checking for upgrades...': '是否有升级版本检查ing...',
'Client IP': '客户端IP',
'Controllers': '控制器s',
'Create new simple application': '创建一个新应用',
'Current request': '当前请求',
'Current response': '当前返回',
'Current session': '当前会话',
'DESIGN': '设计',
'Date and Time': '时间日期',
'Delete': '删除',
'Delete:': '删除:',
'Deploy on Google App Engine': '部署到GAE',
'Description': '描述',
'Design for': '设计:',
'E-mail': '邮箱:',
'EDIT': '编辑',
'Edit Profile': '修订配置',
'Edit application': '修订应用',
'Edit current record': '修订当前记录',
'Editing Language file': '修订语言文件',
'Editing file': '修订文件',
'Editing file "%s"': '修订文件 %s',
'Enterprise Web Framework': '强悍的网络开发框架',
'Error logs for "%(app)s"': '"%(app)s" 的错误日志',
'Exception instance attributes': 'Exception instance attributes',
'First name': '姓',
'Functions with no doctests will result in [passed] tests.': '',
'Group ID': '组ID',
'Hello World': '道可道,非常道;名可名,非常名',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': '导入/导出',
'Installed applications': '已安装的应用',
'Internal State': '内部状态',
'Invalid Query': '无效查询',
'Invalid action': '无效动作',
'Invalid email': '无效的email',
'Language files (static strings) updated': '语言文件(静态部分)已更新',
'Languages': '语言',
'Last name': '名',
'Last saved on:': '最后保存于:',
'License for': '许可证',
'Login': '登录',
'Login to the Administrative Interface': '登录到管理员界面',
'Logout': '注销',
'Lost Password': '忘记密码',
'Models': '模型s',
'Modules': '模块s',
'NO': '不',
'Name': '姓名',
'New Record': '新记录',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': '这应用没有数据库',
'Origin': '起源',
'Original/Translation': '原始文件/翻译文件',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Password': '密码',
'Peeking at file': '选个文件',
'Plugin "%s" in application': 'Plugin "%s" in application',
'Plugins': 'Plugins',
'Powered by': '',
'Query:': '查询',
'Record ID': '记录ID',
'Register': '注册',
'Registration key': '注册密匙',
'Resolve Conflict file': '解决冲突文件',
'Role': '角色',
'Rows in table': '表行',
'Rows selected': '行选择',
'Saved file hash:': '已存文件Hash:',
'Static files': '静态文件',
'Sure you want to delete this object?': '真的要删除这个对象?',
'TM': '',
'Table name': '表名',
'Testing application': '应用测试',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '',
'There are no controllers': '冇控制器',
'There are no models': '冇模型s',
'There are no modules': '冇模块s',
'There are no static files': '冇静态文件',
'There are no translators, only default language is supported': '没有找到相应翻译,只能使用默认语言',
'There are no views': '冇视图',
'This is the %(filename)s template': '这是 %(filename)s 模板',
'Ticket': '传票',
'Timestamp': '时间戳',
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
'Unable to check for upgrades': '无法检查是否需要升级',
'Unable to download': '无法下载',
'Unable to download app': '无法下载应用',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': '更新:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': '上传已有应用',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': '',
'Use an url:': 'Use an url:',
'User ID': '用户ID',
'Version': '版本',
'Views': '视图',
'Welcome to web2py': '欢迎使用web2py',
'YES': '是',
'about': '关于',
'additional code for your application': '给你的应用附加代码',
'admin disabled because no admin password': '管理员需要设定密码,否则无法管理',
'admin disabled because not supported on google app engine': '未支持GAE,无法管理',
'admin disabled because unable to access password file': '需要可以操作密码文件,否则无法进行管理',
'administrative interface': 'administrative interface',
'and rename it (required):': '重命名为 (必须):',
'and rename it:': ' 重命名为:',
'appadmin': '应用管理',
'appadmin is disabled because insecure channel': '应用管理因非法通道失效',
'application "%s" uninstalled': '应用"%s" 已被卸载',
'application compiled': '应用已编译完',
'application is compiled and cannot be designed': '应用已编译完无法设计',
'arguments': 'arguments',
'back': 'back',
'cache': 'cache',
'cache, errors and sessions cleaned': '缓存、错误、sesiones已被清空',
'cannot create file': '无法创建文件',
'cannot upload file "%(filename)s"': '无法上传文件 "%(filename)s"',
'change admin password': 'change admin password',
'check all': '检查所有',
'check for upgrades': 'check for upgrades',
'clean': '清除',
'click here for online examples': '猛击此处,查看在线实例',
'click here for the administrative interface': '猛击此处,进入管理界面',
'click to check for upgrades': '猛击查看是否有升级版本',
'code': 'code',
'compile': '编译',
'compiled application removed': '已编译应用已移走',
'controllers': '控制器',
'create': 'create',
'create file with filename:': '创建文件用这名:',
'create new application:': '创建新应用:',
'created by': '创建自',
'crontab': '定期事务',
'currently running': 'currently running',
'currently saved or': '保存当前的或',
'customize me!': '定制俺!',
'data uploaded': '数据已上传',
'database': '数据库',
'database %s select': '数据库 %s 选择',
'database administration': '数据库管理',
'db': '',
'defines tables': '已定义表',
'delete': '删除',
'delete all checked': '删除所有选择的',
'delete plugin': 'delete plugin',
'deploy': 'deploy',
'design': '设计',
'direction: ltr': 'direction: ltr',
'done!': '搞定!',
'edit': '修改',
'edit controller': '修订控制器',
'edit views:': 'edit views:',
'errors': '错误',
'export as csv file': '导出为CSV文件',
'exposes': '暴露',
'extends': '扩展',
'failed to reload module': '重新加载模块失败',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': '文件 "%(filename)s" 已创建',
'file "%(filename)s" deleted': '文件 "%(filename)s" 已删除',
'file "%(filename)s" uploaded': '文件 "%(filename)s" 已上传',
'file "%(filename)s" was not deleted': '文件 "%(filename)s" 没删除',
'file "%s" of %s restored': '文件"%s" 有关 %s 已重存',
'file changed on disk': '硬盘上的文件已经修改',
'file does not exist': '文件并不存在',
'file saved on %(time)s': '文件保存于 %(time)s',
'file saved on %s': '文件保存在 %s',
'help': '帮助',
'htmledit': 'html编辑',
'includes': '包含',
'insert new': '新插入',
'insert new %s': '新插入 %s',
'install': 'install',
'internal error': '内部错误',
'invalid password': '无效密码',
'invalid request': '无效请求',
'invalid ticket': '无效传票',
'language file "%(filename)s" created/updated': '语言文件 "%(filename)s"被创建/更新',
'languages': '语言',
'languages updated': '语言已被刷新',
'loading...': '载入中...',
'login': '登录',
'logout': '注销',
'merge': '合并',
'models': '模型s',
'modules': '模块s',
'new application "%s" created': '新应用 "%s"已被创建',
'new plugin installed': 'new plugin installed',
'new record inserted': '新记录被插入',
'next 100 rows': '后100行',
'no match': 'no match',
'or import from csv file': '或者,从csv文件导入',
'or provide app url:': 'or provide app url:',
'or provide application url:': '或者,提供应用所在地址链接:',
'overwrite installed app': 'overwrite installed app',
'pack all': '全部打包',
'pack compiled': '包编译完',
'pack plugin': 'pack plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
'previous 100 rows': '前100行',
'record': 'record',
'record does not exist': '记录并不存在',
'record id': '记录ID',
'remove compiled': '已移除',
'restore': '重存',
'revert': '恢复',
'save': '保存',
'selected': '已选',
'session expired': '会话过期',
'shell': '',
'site': '总站',
'some files could not be removed': '有些文件无法被移除',
'start wizard': 'start wizard',
'state': '状态',
'static': '静态文件',
'submit': '提交',
'table': '表',
'test': '测试',
'the application logic, each URL path is mapped in one exposed function in the controller': '应用逻辑:每个URL由控制器暴露的函式完成映射',
'the data representation, define database tables and sets': '数据表达式,定义数据库/表',
'the presentations layer, views are also known as templates': '提交层/视图都在模板中可知',
'these files are served without processing, your images go here': '',
'to  previous version.': 'to  previous version.',
'to  previous version.': '退回前一版本',
'translation strings for the application': '应用的翻译字串',
'try': '尝试',
'try something like': '尝试',
'unable to create application "%s"': '无法创建应用 "%s"',
'unable to delete file "%(filename)s"': '无法删除文件 "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
'unable to parse csv file': '无法生成 cvs',
'unable to uninstall "%s"': '无法卸载 "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': '反选全部',
'uninstall': '卸载',
'update': '更新',
'update all languages': '更新所有语言',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': '提交已有的应用:',
'upload file:': '提交文件:',
'upload plugin file:': 'upload plugin file:',
'variables': 'variables',
'versioning': '版本',
'view': '视图',
'views': '视图s',
'web2py Recent Tweets': 'twitter上的web2py进展实播',
'web2py is up to date': 'web2py现在已经是最新的版本了',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}

Added applications/admin/languages/zh-tw.py version [599934d534].















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '已刪除 %s 筆',
'%s rows updated': '已更新 %s 筆',
'(something like "it-it")': '(格式類似 "zh-tw")',
'A new version of web2py is available': '新版的 web2py 已發行',
'A new version of web2py is available: %s': '新版的 web2py 已發行: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '注意: 登入管理帳號需要安全連線(HTTPS)或是在本機連線(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '注意: 因為在測試模式不保證多執行緒安全性,也就是說不可以同時執行多個測試案例',
'ATTENTION: you cannot edit the running application!': '注意:不可編輯正在執行的應用程式!',
'About': '關於',
'About application': '關於本應用程式',
'Admin is disabled because insecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Admin is disabled because unsecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Administrator Password:': '管理員密碼:',
'Are you sure you want to delete file "%s"?': '確定要刪除檔案"%s"?',
'Are you sure you want to delete plugin "%s"?': '確定要刪除插件 "%s"?',
'Are you sure you want to uninstall application "%s"': '確定要移除應用程式 "%s"',
'Are you sure you want to uninstall application "%s"?': '確定要移除應用程式 "%s"',
'Are you sure you want to upgrade web2py now?': '確定現在要升級 web2py?',
'Authentication': '驗證',
'Available databases and tables': '可提供的資料庫和資料表',
'Cannot be empty': '不可空白',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': '無法編譯:應用程式中含有錯誤,請除錯後再試一次.',
'Cannot compile: there are errors in your app:': '無法編譯: 在你的應用程式存在錯誤:',
'Change Password': '變更密碼',
'Check to delete': '打勾代表刪除',
'Check to delete:': '打勾代表刪除:',
'Checking for upgrades...': '檢查新版本中...',
'Client IP': '客戶端網址(IP)',
'Controller': '控件',
'Controllers': '控件',
'Copyright': '版權所有',
'Create new simple application': '創建應用程式',
'Current request': '目前網路資料要求(request)',
'Current response': '目前網路資料回應(response)',
'Current session': '目前網路連線資訊(session)',
'DB Model': '資料庫模組',
'DESIGN': '設計',
'Database': '資料庫',
'Date and Time': '日期和時間',
'Delete': '刪除',
'Delete:': '刪除:',
'Deploy on Google App Engine': '配置到 Google App Engine',
'Description': '描述',
'Design for': '設計為了',
'E-mail': '電子郵件',
'EDIT': '編輯',
'Edit': '編輯',
'Edit Profile': '編輯設定檔',
'Edit This App': '編輯本應用程式',
'Edit application': '編輯應用程式',
'Edit current record': '編輯當前紀錄',
'Editing Language file': '編輯語言檔案',
'Editing file': '編輯檔案',
'Editing file "%s"': '編輯檔案"%s"',
'Enterprise Web Framework': '企業網站平台',
'Error logs for "%(app)s"': '"%(app)s"的錯誤紀錄',
'Exception instance attributes': 'Exception instance attributes',
'First name': '名',
'Functions with no doctests will result in [passed] tests.': '沒有 doctests 的函式會顯示 [passed].',
'Group ID': '群組編號',
'Hello World': '嗨! 世界',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': '匯入/匯出',
'Index': '索引',
'Installed applications': '已安裝應用程式',
'Internal State': '內部狀態',
'Invalid Query': '不合法的查詢',
'Invalid action': '不合法的動作(action)',
'Invalid email': '不合法的電子郵件',
'Language files (static strings) updated': '語言檔已更新',
'Languages': '各國語言',
'Last name': '姓',
'Last saved on:': '最後儲存時間:',
'Layout': '網頁配置',
'License for': '許可證',
'Login': '登入',
'Login to the Administrative Interface': '登入到管理員介面',
'Logout': '登出',
'Lost Password': '密碼遺忘',
'Main Menu': '主選單',
'Menu Model': '選單模組(menu)',
'Models': '資料模組',
'Modules': '程式模組',
'NO': '否',
'Name': '名字',
'New Record': '新紀錄',
'No databases in this application': '這應用程式不含資料庫',
'Origin': '原文',
'Original/Translation': '原文/翻譯',
'PAM authenticated user, cannot change password here': 'PAM 授權使用者, 無法在此變更密碼',
'Password': '密碼',
"Password fields don't match": '密碼欄不匹配',
'Peeking at file': '選個文件',
'Plugin "%s" in application': '在應用程式的插件 "%s"',
'Plugins': '插件',
'Powered by': '基於以下技術構建:',
'Query:': '查詢:',
'Record ID': '紀錄編號',
'Register': '註冊',
'Registration key': '註冊金鑰',
'Remember me (for 30 days)': '記住帳號(30 天)',
'Reset Password key': '重設密碼',
'Resolve Conflict file': '解決衝突檔案',
'Role': '角色',
'Rows in table': '在資料表裏的資料',
'Rows selected': '筆資料被選擇',
'Saved file hash:': '檔案雜湊值已紀錄:',
'Static files': '靜態檔案',
'Stylesheet': '網頁風格檔',
'Submit': '傳送',
'Sure you want to delete this object?': '確定要刪除此物件?',
'TM': 'TM',
'Table name': '資料表名稱',
'Testing application': '測試中的應用程式',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"查詢"是一個像 "db.表1.欄位1==\'值\'" 的條件式. 以"db.表1.欄位1==db.表2.欄位2"方式則相當於執行 JOIN SQL.',
'There are no controllers': '沒有控件(controllers)',
'There are no models': '沒有資料庫模組(models)',
'There are no modules': '沒有程式模組(modules)',
'There are no static files': '沒有靜態檔案',
'There are no translators, only default language is supported': '沒有翻譯檔,只支援原始語言',
'There are no views': '沒有視圖',
'This is the %(filename)s template': '這是%(filename)s檔案的樣板(template)',
'Ticket': '問題單',
'Timestamp': '時間標記',
'To create a plugin, name a file/folder plugin_[name]': '檔案或目錄名稱以 plugin_開頭來創建插件',
'Unable to check for upgrades': '無法做升級檢查',
'Unable to download': '無法下載',
'Unable to download app': '無法下載應用程式',
'Unable to download app because:': '無法下載應用程式因為:',
'Unable to download because': '因為下列原因無法下載:',
'Update:': '更新:',
'Upload & install packed application': '上傳並安裝已打包的應用程式',
'Upload existing application': '更新存在的應用程式',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': '使用下列方式來組合更複雜的條件式, (...)&(...) 代表同時存在的條件, (...)|(...) 代表擇一的條件, ~(...)則代表反向條件.',
'User %(id)s Logged-in': '使用者 %(id)s 已登入',
'User %(id)s Registered': '使用者 %(id)s 已註冊',
'User ID': '使用者編號',
'Verify Password': '驗證密碼',
'Version': '版本',
'View': '視圖',
'Views': '視圖',
'Welcome %s': '歡迎 %s',
'Welcome to web2py': '歡迎使用 web2py',
'YES': '是',
'about': '關於',
'additional code for your application': '應用程式額外的程式碼',
'admin disabled because no admin password': '管理介面關閉原因是沒有設定管理員密碼 ',
'admin disabled because not supported on google app engine': '管理介面關閉原因是不支援在google apps engine環境下運作',
'admin disabled because unable to access password file': '管理介面關閉原因是無法存取密碼檔',
'amy_ajax': 'amy_ajax',
'and rename it (required):': '同時更名為(必要的):',
'and rename it:': '同時更名為:',
'appadmin': '應用程式管理員',
'appadmin is disabled because insecure channel': '管理介面關閉理由是連線方式不安全',
'application "%s" uninstalled': '已移除應用程式 "%s"',
'application compiled': '已編譯應用程式',
'application is compiled and cannot be designed': '應用程式已經編譯無法重新設計',
'arguments': 'arguments',
'back': '回復(back)',
'cache': '快取記憶體',
'cache, errors and sessions cleaned': '快取記憶體,錯誤紀錄,連線紀錄已清除',
'cannot create file': '無法創建檔案',
'cannot upload file "%(filename)s"': '無法上傳檔案 "%(filename)s"',
'change admin password': 'change admin password',
'change_password': '變更密碼',
'check all': '全選',
'clean': '清除',
'click here for online examples': '點此處進入線上範例',
'click here for the administrative interface': '點此處進入管理介面',
'click to check for upgrades': '點擊打勾以便升級',
'code': 'code',
'compile': '編譯',
'compiled application removed': '已移除已編譯的應用程式',
'controllers': '控件',
'create': '創建',
'create file with filename:': '創建檔案:',
'create new application:': '創建新應用程式:',
'created by': '創建自',
'crontab': '定時執行表',
'currently saved or': '現在存檔或',
'customize me!': '請調整我!',
'data uploaded': '資料已上傳',
'database': '資料庫',
'database %s select': '已選擇 %s 資料庫',
'database administration': '資料庫管理',
'db': 'db',
'defines tables': '定義資料表',
'delete': '刪除',
'delete all checked': '刪除所有已選擇項目',
'delete plugin': '刪除插件',
'delete_plugin': '刪除插件',
'design': '設計',
'direction: ltr': 'direction: ltr',
'done!': '完成!',
'edit': '編輯',
'edit controller': '編輯控件',
'edit views:': '編輯視圖',
'edit_language': '編輯語言檔',
'errors': '錯誤紀錄',
'export as csv file': '以逗號分隔檔(csv)格式匯出',
'exposes': '外顯',
'extends': '擴展',
'failed to reload module because:': '因為下列原因無法重新載入程式模組:',
'file "%(filename)s" created': '檔案 "%(filename)s" 已創建',
'file "%(filename)s" deleted': '檔案 "%(filename)s" 已刪除',
'file "%(filename)s" uploaded': '檔案 "%(filename)s" 已上傳',
'file "%s" of %s restored': '檔案 %s 的 "%s" 已回存',
'file changed on disk': '在磁碟上檔案已改變',
'file does not exist': '檔案不存在',
'file saved on %(time)s': '檔案已於 %(time)s 儲存',
'file saved on %s': '檔案在 %s 已儲存',
'help': '說明檔',
'htmledit': 'html編輯',
'includes': '包含',
'index': '索引',
'insert new': '插入新資料',
'insert new %s': '插入新資料 %s',
'install': '安裝',
'internal error': '內部錯誤',
'invalid password': '密碼錯誤',
'invalid request': '不合法的網路要求(request)',
'invalid ticket': '不合法的問題單號',
'language file "%(filename)s" created/updated': '語言檔"%(filename)s"已創建或更新',
'languages': '語言檔',
'loading...': '載入中...',
'login': '登入',
'logout': '登出',
'merge': '合併',
'models': '資料庫模組',
'modules': '程式模組',
'new application "%s" created': '已創建新的應用程式 "%s"',
'new plugin installed': '已安裝新插件',
'new record inserted': '已新增新紀錄',
'next 100 rows': '往後 100 筆',
'no match': '無法匹配',
'or import from csv file': '或是從逗號分隔檔(CSV)匯入',
'or provide app url:': '或是提供應用程式的安裝網址:',
'overwrite installed app': '覆蓋已安裝的應用程式',
'pack all': '全部打包',
'pack compiled': '打包已編譯資料',
'pack plugin': '打包插件',
'password changed': '密碼已變更',
'peek': '選取',
'plugin': '插件',
'plugin "%(plugin)s" deleted': '已刪除插件"%(plugin)s"',
'previous 100 rows': '往前 100 筆',
'record': '紀錄',
'record does not exist': '紀錄不存在',
'record id': '紀錄編號',
'register': '註冊',
'remove compiled': '編譯檔案已移除',
'resolve': '解決',
'restore': '回存',
'revert': '反向恢復',
'save': '儲存',
'selected': '已選擇',
'session expired': '連線(session)已過時',
'shell': '命令列操作介面',
'site': '網站',
'some files could not be removed': '部份檔案無法移除',
'state': '狀態',
'static': '靜態檔案',
'submit': '傳送',
'table': '資料表',
'test': '測試',
'the application logic, each URL path is mapped in one exposed function in the controller': '應用程式邏輯 - 每個網址路徑對應到一個控件的函式',
'the data representation, define database tables and sets': '資料展現層 - 用來定義資料表和集合',
'the presentations layer, views are also known as templates': '外觀展現層 - 視圖有時也被稱為樣板',
'these files are served without processing, your images go here': '這些檔案保留未經處理,你的影像檔在此',
'ticket': '問題單',
'to  previous version.': '到前一個版本',
'translation strings for the application': '翻譯此應用程式的字串',
'try': '嘗試',
'try something like': '嘗試如',
'unable to create application "%s"': '無法創建應用程式 "%s"',
'unable to delete file "%(filename)s"': '無法刪除檔案 "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': '無法刪查插件檔 "%(plugin)s"',
'unable to parse csv file': '無法解析逗號分隔檔(csv)',
'unable to uninstall "%s"': '無法移除安裝 "%s"',
'unable to upgrade because "%s"': '無法升級因為 "%s"',
'uncheck all': '全不選',
'uninstall': '解除安裝',
'update': '更新',
'update all languages': '將程式中待翻譯語句更新到所有的語言檔',
'upgrade web2py now': 'upgrade web2py now',
'upgrade_web2py': '升級 web2py',
'upload application:': '上傳應用程式:',
'upload file:': '上傳檔案:',
'upload plugin file:': '上傳插件檔:',
'variables': 'variables',
'versioning': '版本管理',
'view': '視圖',
'views': '視圖',
'web2py Recent Tweets': 'web2py 最近的 Tweets',
'web2py is up to date': 'web2py 已經是最新版',
'web2py upgraded; please restart it': '已升級 web2py ; 請重新啟動',
}

Added applications/admin/models/0.py version [2f774cf077].


































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
EXPIRATION = 60 * 60  # logout after 60 minutes of inactivity
CHECK_VERSION = True
WEB2PY_URL = 'http://web2py.com'
WEB2PY_VERSION_URL = WEB2PY_URL+'/examples/default/version'

###########################################################################
# Preferences for EditArea
# the user-interface feature that allows you to edit files in your web
# browser.

## Default editor
TEXT_EDITOR = 'edit_area' or 'amy'

### edit_area
# The default font size, measured in 'points'. The value must be an integer > 0
FONT_SIZE = 10

# Displays the editor in full screen mode. The value must be 'true' or 'false'
FULL_SCREEN = 'false'

# Display a check box under the editor to allow the user to switch
# between the editor and a simple
# HTML text area. The value must be 'true' or 'false'
ALLOW_TOGGLE = 'true'

# Replaces tab characters with space characters.
# The value can be 'false' (meaning that tabs are not replaced),
# or an integer > 0 that specifies the number of spaces to replace a tab with.
REPLACE_TAB_BY_SPACES = 4

# Toggle on/off the code editor instead of textarea on startup
DISPLAY = "onload" or "later"

# if demo mode is True then admin works readonly and does not require login
DEMO_MODE = False

# if visible_apps is not empty only listed apps will be accessible
FILTER_APPS = []

# To upload on google app engine this has to point to the proper appengine
# config file
import os
# extract google_appengine_x.x.x.zip to web2py root directory
#GAE_APPCFG = os.path.abspath(os.path.join('appcfg.py'))
# extract google_appengine_x.x.x.zip to applications/admin/private/
GAE_APPCFG = os.path.abspath(os.path.join('/usr/local/bin/appcfg.py'))

# To use web2py as a teaching tool, set MULTI_USER_MODE to True
MULTI_USER_MODE = False

# configurable twitterbox, set to None/False to suppress
TWITTER_HASH = "web2py"

# parameter for downloading LAYOUTS
LAYOUTS_APP = 'http://web2py.com/layouts'
#LAYOUTS_APP = 'http://127.0.0.1:8000/layouts'


# parameter for downloading PLUGINS
PLUGINS_APP = 'http://web2py.com/plugins'
#PLUGINS_APP = 'http://127.0.0.1:8000/plugins'

# set the language
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
    T.force(request.cookies['adminLanguage'].value)

Added applications/admin/models/0_imports.py version [f31d8a5e98].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import time
import os
import sys
import re
import urllib
import cgi
import difflib
import shutil
import stat
import socket

from textwrap import dedent

try:
    from mercurial import ui, hg, cmdutil
    have_mercurial = True
except ImportError:
    have_mercurial = False

from gluon.utils import md5_hash
from gluon.fileutils import listdir, cleanpath, up
from gluon.fileutils import tar, tar_compiled, untar, fix_newlines
from gluon.languages import findT, update_all_languages
from gluon.myregex import *
from gluon.restricted import *
from gluon.compileapp import compile_application, remove_compiled_application

Added applications/admin/models/access.py version [b01ffcca56].



















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import os, time
from gluon import portalocker
from gluon.admin import apath
from gluon.fileutils import read_file
# ###########################################################
# ## make sure administrator is on localhost or https
# ###########################################################

http_host = request.env.http_host.split(':')[0]

if request.env.web2py_runtime_gae:
    session_db = DAL('gae')
    session.connect(request, response, db=session_db)
    hosts = (http_host, )

if request.env.http_x_forwarded_for or request.is_https:
    session.secure()
elif not request.is_local and not DEMO_MODE:
    raise HTTP(200, T('Admin is disabled because insecure channel'))

try:
    _config = {}
    port = int(request.env.server_port or 0)
    restricted(read_file(apath('../parameters_%i.py' % port, request)), _config)

    if not 'password' in _config or not _config['password']:
        raise HTTP(200, T('admin disabled because no admin password'))
except IOError:
    import gluon.fileutils
    if request.env.web2py_runtime_gae:
        if gluon.fileutils.check_credentials(request):
            session.authorized = True
            session.last_time = time.time()
        else:
            raise HTTP(200,
                       T('admin disabled because not supported on google app engine'))
    else:
        raise HTTP(200, T('admin disabled because unable to access password file'))


def verify_password(password):
    session.pam_user = None
    if DEMO_MODE:
        return True
    elif not 'password' in _config:
        return False
    elif _config['password'].startswith('pam_user:'):
        session.pam_user = _config['password'][9:].strip()
        import gluon.contrib.pam
        return gluon.contrib.pam.authenticate(session.pam_user,password)
    else:
        return _config['password'] == CRYPT()(password)[0]


# ###########################################################
# ## handle brute-force login attacks
# ###########################################################

deny_file = os.path.join(request.folder, 'private', 'hosts.deny')
allowed_number_of_attempts = 5
expiration_failed_logins = 3600

def read_hosts_deny():
    import datetime
    hosts = {}
    if os.path.exists(deny_file):
        hosts = {}
        f = open(deny_file, 'r')
        portalocker.lock(f, portalocker.LOCK_SH)
        for line in f.readlines():
            if not line.strip() or line.startswith('#'):
                continue
            fields = line.strip().split()
            if len(fields) > 2:
                hosts[fields[0].strip()] = ( # ip
                    int(fields[1].strip()),  # n attemps
                    int(fields[2].strip())   # last attempts
                    )
        portalocker.unlock(f)
        f.close()  
    return hosts
        
def write_hosts_deny(denied_hosts):
    f = open(deny_file, 'w')
    portalocker.lock(f, portalocker.LOCK_EX)
    for key, val in denied_hosts.items():
        if time.time()-val[1] < expiration_failed_logins:
            line = '%s %s %s\n' % (key, val[0], val[1])
            f.write(line)
    portalocker.unlock(f)
    f.close()        

def login_record(success=True):
    denied_hosts = read_hosts_deny()
    val = (0,0)
    if success and request.client in denied_hosts:
        del denied_hosts[request.client]
    elif not success and not request.is_local:
        val = denied_hosts.get(request.client,(0,0))
        if time.time()-val[1]<expiration_failed_logins \
            and val[0] >= allowed_number_of_attempts:
            return val[0] # locked out
        time.sleep(2**val[0])
        val = (val[0]+1,int(time.time()))        
        denied_hosts[request.client] = val
    write_hosts_deny(denied_hosts)
    return val[0]
        

# ###########################################################
# ## session expiration
# ###########################################################

t0 = time.time()
if session.authorized:

    if session.last_time and session.last_time < t0 - EXPIRATION:
        session.flash = T('session expired')
        session.authorized = False
    else:
        session.last_time = t0

if not session.authorized and not \
    (request.controller == 'default' and \
     request.function in ('index','user')):

    if request.env.query_string:
        query_string = '?' + request.env.query_string
    else:
        query_string = ''

    if request.env.web2py_original_uri:
        url = request.env.web2py_original_uri
    else:
        url = request.env.path_info + query_string
    redirect(URL(request.application, 'default', 'index', vars=dict(send=url)))
elif session.authorized and \
     request.controller == 'default' and \
     request.function == 'index':
    redirect(URL(request.application, 'default', 'site'))


if request.controller=='appadmin' and DEMO_MODE:
    session.flash = 'Appadmin disabled in demo mode'
    redirect(URL('default','sites'))

Added applications/admin/models/buttons.py version [697f589af3].
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Template helpers

import os

def button(href, label):
  return A(SPAN(label),_class='button',_href=href)

def sp_button(href, label):
  return A(SPAN(label),_class='button special',_href=href)

def helpicon():
  return IMG(_src=URL('static', 'images/help.png'), _alt='help')

def searchbox(elementid):
  return TAG[''](LABEL(IMG(_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))

Added applications/admin/models/db.py version [864d15dc7c].









































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

if MULTI_USER_MODE:
    db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or other DB
    from gluon.tools import *
    mail = Mail()                                  # mailer
    auth = Auth(globals(),db)                      # authentication/authorization
    crud = Crud(globals(),db)                      # for CRUD helpers using auth
    service = Service(globals())                   # for json, xml, jsonrpc, xmlrpc, amfrpc
    plugins = PluginManager()
    
    mail.settings.server = 'logging' or 'smtp.gmail.com:587'  # your SMTP server
    mail.settings.sender = 'you@gmail.com'         # your email
    mail.settings.login = 'username:password'      # your credentials or None

    auth.settings.hmac_key = '<your secret key>'   # before define_tables()
    auth.define_tables()                           # creates all needed tables
    auth.settings.mailer = mail                    # for user email verification
    auth.settings.registration_requires_verification = False
    auth.settings.registration_requires_approval = True
    auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
    auth.settings.reset_password_requires_verification = True
    auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'

    db.define_table('app',Field('name'),Field('owner',db.auth_user))

if not session.authorized and MULTI_USER_MODE:
    if auth.user and not request.function=='user':
        session.authorized = True
    elif not request.function=='user':
        redirect(URL('default','user/login'))

def is_manager():
    if not MULTI_USER_MODE:
        return True
    elif auth.user and auth.user.id==1:
        return True
    else:
        return False

Added applications/admin/models/menu.py version [cbe8ab5af6].

































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# ###########################################################
# ## generate menu
# ###########################################################

_a = request.application
_c = request.controller
_f = request.function
response.title = '%s %s' % (_f, '/'.join(request.args))
response.subtitle = 'admin'
response.menu = [(T('site'), _f == 'site', URL(_a,'default','site'))]

if request.args:
    _t = request.args[0]
    response.menu.append((T('edit'), _c == 'default' and _f == 'design',
                         URL(_a,'default','design',args=_t)))
    response.menu.append((T('about'), _c == 'default' and _f == 'about',
                         URL(_a,'default','about',args=_t)))
    response.menu.append((T('errors'), _c == 'default' and _f == 'errors',
                         URL(_a,'default','errors',args=_t)))

    response.menu.append((T('versioning'),
                          _c == 'mercurial' and _f == 'commit',
                          URL(_a,'mercurial','commit',args=_t)))

if not session.authorized:
    response.menu = [(T('login'), True, '')]
else:
    response.menu.append((T('logout'), False,
                          URL(_a,'default',f='logout')))

response.menu.append((T('help'), False, URL('examples','default','index')))

Added applications/admin/models/plugin_multiselect.py version [ad61f332ac].





1
2
3
4
+
+
+
+
response.files.append(URL('static','plugin_multiselect/jquery.dimensions.js'))
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.js'))
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.css'))
response.files.append(URL('static','plugin_multiselect/start.js'))

Added applications/admin/modules/__init__.py version [da39a3ee5e].

Added applications/admin/static/css/calendar.css version [be94f02d8c].





1
2
3
4
+
+
+
+
.calendar{z-index:99;position:relative;display:none;border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar table{border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar .button{text-align:center;padding:1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar .nav{background:transparent}.calendar thead .title{font-weight:bold;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar thead .name{border-bottom:1px solid #000;padding:2px;text-align:center;background:#f4f0e8;}.calendar thead .weekend{color:#f00;}.calendar thead .hilite{border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;padding:0;background-color:#e4e0d8;}.calendar thead .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;background-color:#c4c0b8;}.calendar tbody .day{width:2em;text-align:right;padding:2px 4px 2px 2px;}.calendar tbody .day.othermonth{font-size:80%;color:#aaa;}.calendar tbody .day.othermonth.oweekend{color:#faa;}.calendar table .wn{padding:2px 3px 2px 2px;border-right:1px solid #000;background:#f4f0e8;}.calendar tbody .rowhilite td{background:#e4e0d8;}.calendar tbody .rowhilite td.wn{background:#d4d0c8;}.calendar tbody td.hilite{padding:1px 3px 1px 1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar tbody td.active{padding:2px 2px 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar tbody td.selected{font-weight:bold;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;padding:2px 2px 0 2px;background:#e4e0d8;}.calendar tbody td.weekend{color:#f00;}.calendar tbody td.today{font-weight:bold;color:#00f;}.calendar tbody .disabled{color:#999;}.calendar tbody .emptycell{visibility:hidden;}.calendar tbody .emptyrow{display:none;}.calendar tfoot .ttip{background:#f4f0e8;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar tfoot .hilite{border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;padding:1px;background:#e4e0d8;}.calendar tfoot .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo{position:absolute;display:none;width:4em;top:0;left:0;cursor:default;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;background:#e4e0d8;font-size:90%;padding:1px;z-index:100;}.calendar .combo .label,.calendar .combo .label-IEfix{text-align:center;padding:1px;}.calendar .combo .label-IEfix{width:4em;}.calendar .combo .active{background:#c4c0b8;padding:0;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo .hilite{background:#048;color:#fea;}.calendar td.time{border-top:1px solid #000;padding:1px 0;text-align:center;background-color:#f4f0e8;}.calendar td.time .hour,.calendar td.time .minute,.calendar td.time .ampm{padding:0 3px 0 4px;border:1px solid #889;font-weight:bold;background-color:#fff;}.calendar td.time .ampm{text-align:center;}.calendar td.time .colon{padding:0 2px 0 3px;font-weight:bold;}.calendar td.time span.hilite{border-color:#000;background-color:#766;color:#fff;}.calendar td.time span.active{border-color:#f00;background-color:#000;color:#0f0;}

#CP_hourcont {z-index:99;padding: 0px;position:absolute;border:1px dashed #bbbbbb;background-color:#dddddd;display:none;} #CP_minutecont {z-index:99;background-color:#dddddd;padding: 0px;position:absolute;width:45px;border: 1px dashed #cccccc;display:none;} .floatleft {float:left;} .CP_hour {z-index:99;padding:1px;font-family: Arial, Helvetica, sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;margin:1px;background-color:#eeeeee;} .CP_minute {z-index:99;padding:1px;background-color:#eeeeee;font-family: Arial, Helvetica, sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;margin:1px;} .CP_over {z-index:99;background-color:#ffffff;}

Added applications/admin/static/css/jqueryMultiSelect.css version [b85dc28a02].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
.multiSelect {
	width: 200px;
	border: solid 1px #BBB;
	background: #FFF right center no-repeat;
	padding: 2px 4px;
	padding-right: 20px;
	display: inline;
}

.multiSelect.hover {
	background: right center no-repeat;
}

.multiSelect.active, 
.multiSelect.focus {
	border: inset 1px #000;
}

.multiSelect.active {
	background: right center no-repeat;
}

.multiSelectOptions {
	width: 500px;
	max-height: 150px;
	margin-top: -1px;
	overflow: auto;
	border: solid 1px #B2B2B2;
	background: #FFF;
}

.multiSelectOptions LABEL {
	padding: 2px 5px;
	display: block;
}

.multiSelectOptions LABEL.checked {
	background: #E6E6E6;
}

.multiSelectOptions LABEL.selectAll {
	border-bottom: dotted 1px #CCC;
}

.multiSelectOptions LABEL.hover {
	background: #CFCFCF;
}

Added applications/admin/static/css/styles.css version [4a1e9c06c6].










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
* cSans v0.6.3
* 2009 Copyright A navalla suíza http://anavallasuiza.com
* cSans is released under the GNU Affero GPL version 3 - more information at http://www.fsf.org/licensing/licenses/agpl-3.0.html
*/

/* 1. RESET */
html,body,div,span,object,iframe,
h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,code,
del,dfn,em,img,q,dl,dt,dd,ol,ul,li,
fieldset,form,label,legend,textarea,
table,caption,tbody,tfoot,thead,tr,th,td {
	margin:0;
	padding:0;
	border:0;
}
textarea,select,input { font-size:1em; }
html,body { height:100%; }
body {
	font-family:Arial,Helvetica,"Liberation Sans",Sans,sans-serif;
	font-size: 12pt;
	line-height:1.25em;
	text-align:center;
	background:#fff;
	color:#000;
}
.page,.expanded-page { text-align:left; }

/* 2. DEBUG: Show borders to stress an element */
.omg-red,.omg-yellow,.omg-blue,.omg-green,.omg-black,.omg-white {
	border-top:dotted 3px;
	border-bottom:dotted 3px;
}
.omg-red { border-color:red; }
.omg-yellow { border-color:yellow; }
.omg-blue { border-color:blue; }
.omg-green { border-color:green; }
.omg-black { border-color:black; }
.omg-white { border-color:white; }

/* 3. BASIC STYLES */
/* 3.1. Titles */
h1,h2,h3,h4,h5,h6 {
	font-weight:bold;
	line-height:1em;
	margin:1em 0 0.5em 0;
}
h1 { font-size:2em; }
h2 { font-size:1.75em; }
h3 { font-size:1.5em; }
h4 { font-size:1.125em; }
h5 { font-size:1em; }
h6 { font-size:1em; font-weight:normal; }

/* 3.2. Lists */
ul,dd { margin-left:1em; }
ol { list-style-type:decimal; margin-left:1.5em; }
dl dt { font-weight:bold; }

/* 3.3. Tables */
table { border-collapse:collapse; border-spacing:0; }
caption,th { font-weight:bold; }
th,td { text-align:left; padding:0; border:1px solid #ccc; }
tfoot { font-style:italic; }

/* 3.4. Images */
a img { border:none; }
img.right { margin-left:1em; }
img.left { margin-right:1em; }

/* 3.5. Forms */
fieldset { border:1px solid #ccc; }
legend { font-weight:bold; font-size:1.2em; }
input { margin:0; }
input.text,input.password { overflow-y:visible; }
textarea { width:400px; height:100px; border:1px solid #ccc; overflow-y: auto; }
select { margin:0; font-size:1em; }
input,textarea,select { font-family:Arial,sans-serif; font-size: 1em; }

/* 3.6. Monospace elements */
pre,code,tt { font-family:"Courier New", Courier, monospace; line-height:1.5; }
pre,code { white-space:pre; }
tt { display:block; line-height:1.5; }

/* 3.7. Block elements */
p,form,table,address,blockquote,pre,code,tt,ul,ol,dl { margin-bottom:1em; }

/* 3.8. Inline elements */
em,dfn { font-style:italic; }

/* 3.9. HR element */
hr {
	background:none;
	visibility:hidden;
	clear:both;
	float:none;
	width:100%;
	height:1px;
	border:none;
	margin:-1px 0;
}

/* 3.10. Flash objects */
object { outline:none; }

/* 4. UTILS */
/* 4.1. Images with link and without link must overwrite background, width and height properties in your css */
.image a,.image li,.image {
	background-repeat:no-repeat;
	background-color:transparent;
	margin:0;
	padding:0;
	outline:none;
	font-size:0px !important;
	line-height:0em !important;
	letter-spacing:-20px;
	text-indent: -2px;
	display:block;
	overflow:hidden;
	text-align:left;
	border: none;
}
.image a {
	display:block;
	width:100%;
	height:100%;
	height:inherit;
}
ol.image,ul.image {
	background:none;
	width:100%;
	height:auto;
	float:left;
}
.image li {
	float:left;
}
span.image,strong.image,em.image,a.image {
	display:inline-block;
	vertical-align:bottom;
}
input.image { cursor:pointer; }

/* 4.2. Simple tabs system. You can overwrite background and text styles */
.tabs {
	list-style:none;
	padding:0;
	margin:0;
	float:left;
	width:100%;
}
.tabs li {
	float:left;
	margin:0 1px 0 0;
}
.tabs li span,
.tabs li a {
	float: left;
	padding:2px 5px;
	white-space:nowrap;
	text-align:center;
	cursor:pointer;
	outline:0;
	text-decoration:none;
}
.tabs li span { cursor:default; }
.tabs .select a,.tabs a:hover {
	background:#ddd;
}

/* 4.3. Convert a block element (like a fieldset) into a inline element */
.inline {
	border:none;
	margin:0;
	padding:0;
	display:inline;
}
fieldset.inline {
	display:block;
	float:left;
	width: 100%;
}
	
/* 4.4. Inline-block element must content any element inside (div, p, etc) for the correct visualization in FF<3 */
.inline-block-top,.inline-block-middle,.inline-block-bottom {
	float:none !important;
	display:inline-block;
}
.inline-block-top { vertical-align:top !important; }
.inline-block-middle { vertical-align:middle !important; }
.inline-block-bottom { vertical-align:bottom !important; }

/* 4.5. Float elements */
.left { float:left !important; }
.right,.right-right { float:right !important; }
.right-right { text-align:right !important; }
.right-full { width:100%; text-align:right !important; }

/* 4.6. Clear */
.clear,.content,.page,.expanded-page { display:block; }
.clear:after,.tabs:after,.content:after,.page:after,.expanded-page:after {
	content:" ";
	display:block;
	height:0;
	clear:both;
	visibility:hidden;
	font-size:0;
}

/* 4.7. Destroy margin collapse */
.no-collapse { padding-top:1px; }

/* 4.8. Hide an element */
.hide { display:none; }

/* 5. LAYOUT */
/* 5.1. Row */
.row {
	float:left;
	width:100%;
	margin:0;
	padding:0;
	border:none;
}

/* 5.2. Last column in a row */
.last { margin-right:0 !important; }

/* 5.3. Content */
.content {
	padding:0;
	margin:0;
}

/* 6. HACKS */
img	{ -ms-interpolation-mode:bicubic; } /* IE */
.clear,.tabs,.content,.page,.expanded-page {
	*overflow-y:auto; /* IE7 */
	*overflow-x:hidden; /* IE7 */
	_height:1%; /* IE6 */
	_overflow-y:visible; /* IE6 */
	_overflow-x:visible; /* IE6 */
}
a.image,span.image,strong.image,em.image,.inline-block-top,.inline-block-middle,.inline-block-bottom {
	display:-moz-inline-box; /* FF<3 */
	-moz-box-orient:vertical; /* FF<3 */
	*display:inline; /* IE */
}

/**
* cSans Button plugin v0.3.1
* 2009 Copyright A navalla suíza http://anavallasuiza.com
* cSans is released under the GNU Affero GPL version 3 - more information at http://www.fsf.org/licensing/licenses/agpl-3.0.html
*/

/* 1. BASIC STYLES */

ul.button {
	list-style: none;
	padding: 0;
	margin: 0;
	display:block;
	}
ul.button {
	overflow-y: auto;
	overflow-x: hidden;
	}
ul.button li {
	float: left;
	margin: 0;
	}
ul.button li a {
	display: block;
	z-index: 2;
	}
a.button {
	display: inline-block;
	vertical-align: middle;
	}

/* 1.1. Normal status */
a.button,
ul.button li a {
	background-position: 100% 0;
	background-repeat: no-repeat;
	white-space: nowrap;
	text-align: center;
	cursor: pointer;
	outline: 0;
	}
a.button span,
ul.button li a span {
	display: block;
	background-position: 0 0;
	background-repeat: no-repeat;
	}

/* 1.2. Hover/selected status */
a.button:hover,
a.button.select,
ul.button li a:hover,
ul.button li.select a {
	background-position: 100% -70px !important;
	}
a.button:hover span,
a.button.select span,
ul.button li a:hover span,
ul.button li.select a span {
	background-position: 0 -70px !important;
	}

/* 2. EDITABLE STYLES */

/* 2.1. Image background used */
a.button,
.button a,
.button span {
	background-image: url(../images/button.png);
	}

/* 2.2. Normal status (Example for padding 10px) */
a.button,
.button a {
	padding: 0 10px 0 0; /* Padding-right: 10px */
	margin: 0 1px 0 10px; /* Margin-left: 10px */
	text-decoration: none;
	}
.button span {
	padding: 4px 0 6px 10px; /*Padding-left: 10px */
	margin: 0 0 0 -10px; /* Margin-left: -10px */
	}
	
/* 3. HACKS */

ul.button {
	_height: 1%; /* IE6 */
	_overflow-y: visible; /* IE6 */
	_overflow-x: visible; /* IE6 */
	}
a.button span {
	_float: left; /* Only IE6 */
	_position: relative; /* Only IE6 */
	}
a.button {
	display: -moz-inline-box; /* FF<3 */
	display: inline-block; /* FF<3 */
	-moz-box-orient: vertical; /* FF<3 */
	*display: inline; /* IE */
	}
	
/**
* cSans Tooltip pluging v0.1
* 2009 Copyright A navalla suíza http://anavallasuiza.com
* cSans is released under the GNU Affero GPL version 3 - more information at http://www.fsf.org/licensing/licenses/agpl-3.0.html
*/

/* BASIC STYLES */

.tooltip:hover {
	background:transparent;
	text-decoration:none;
	}
.tooltip span {
	display:none;
	padding:5px;
	margin-left:10px;
	width:150px;
	}
.tooltip:hover span {
	cursor: default;
	display:inline;
	position:absolute;
	}
	
/**
* cSans Flexible v0.1
* 2009 Copyright A navalla suíza http://anavallasuiza.com
* cSans is released under the GNU Affero GPL version 3 - more information at http://www.fsf.org/licensing/licenses/agpl-3.0.html
*/

/* 1. BASIC STYLES */
/* 1.1 Widths */
.f10 { width:10%; }
.f20 { width:20%; }
.f25 { width:25%; }
.f30 { width:30%; }
.f33 { width:33.33%; }
.f40 { width:40%; }
.f50 { width:50%; }
.f60 { width:60%; }
.f66 { width:66.66%; }
.f70 { width:70%; }
.f75 { width:75%; }
.f80 { width:80%; }
.f90 { width:90%; }
.f100 { width:100%; }

.f10,.f20,.f25,.f30,.f33,.f40,.f50,.f60,.f66,.f70,.f75,.f80,.f90,.f100 {
	float:left;
	overflow:hidden;
}

/* 1.2 Margin-left */
.fl10 { margin-left:10%; }
.fl20 { margin-left:20%; }
.fl25 { margin-left:25%; }
.fl30 { margin-left:30%; }
.fl33 { margin-left:33.33%; }
.fl40 { margin-left:40%; }
.fl50 { margin-left:50%; }
.fl60 { margin-left:60%; }
.fl66 { margin-left:66.66%; }
.fl70 { margin-left:70%; }
.fl75 { margin-left:75%; }
.fl80 { margin-left:80%; }
.fl90 { margin-left:90%; }
.fl100 { margin-left:100%; }

/* 1.3 Margin-right */
.fr10 { margin-right:10%; }
.fr20 { margin-right:20%; }
.fr25 { margin-right:25%; }
.fr30 { margin-right:30%; }
.fr33 { margin-right:33.33%; }
.fr40 { margin-right:40%; }
.fr50 { margin-right:50%; }
.fr60 { margin-right:60%; }
.fr66 { margin-right:66.66%; }
.fr70 { margin-right:70%; }
.fr75 { margin-right:75%; }
.fr80 { margin-right:80%; }
.fr90 { margin-right:90%; }
.fr100 { margin-right:100%; }

/* 2. HACKS */
.f10,.f20,.f25,.f30,.f33,.f40,.f50,.f60,.f66,.f70,.f75,.f80,.f90,.f100 {
	_display:inline; /* IE5-6 */
	*margin-left:-1px; /* IE5-7 */
}

/**
* web2py Nuovo Theme
* ------------------
**/

/* Basics */

html, body {
  font-size: 13px;
  text-align: left;
  color: #333;
  padding: 0;
  margin: 0;
  background: #fff url(../images/header_shadow.png) repeat-x left 33px;
}

a {
  color: #e8953c;
  text-decoration: none;
}

label {
  color: #777;
  font-weight: bold;
  font-size: 100%;
}

img {
  vertical-align: baseline;
}

td, th {
  border: none;
}

.center {
  text-align: center;
}

.centerblock {
  margin: 0 auto;
}

.clear {
  clear: both;
}

.att {
  color: #d22;
}

/* General */

h3 {
  padding-left: 18px;
  background: url(../images/sidebar_bullet.gif) no-repeat;
  color: #555;
  font-weight: normal;
  font-size: 130%;
}

.formfield {
  padding: 0.7em 0.5em;
  -moz-border-radius: 0.3em;
  border-radius: 0.3em;
  margin: 1em 0;
  border: 1px solid #ddd;
}

.buttongroup {
  padding: 0.7em 0.5em;
}

.formfield {
  background: #eee;
}

.flash {
  position: fixed;
  top: 2em;
  right: 2em;
  background: #e8953c;
  color: #fff;
  border: 2px solid #fff;
  -moz-border-radius: 0.7em;
  border-radius: 0.7em;
  padding: 0.5em 1em;
}

.tooltip span {
  background: #9fb364;
  color: #eef1d9;
  border: 1px solid #eef1d9;
  font-style: italic;
  width: 20%;
  padding: 0.3em;
  -moz-border-radius: 0.5em;
  border-radius: 0.5em;
  font-size: 13px;
  text-transform: none;
}

.help {
  width: 60%;
  font-size: 1em;
  padding: 0.3em;
  -moz-border-radius: 0.5em;
  border-radius: 0.5em;
  background: #eef1d9;
  color: #9fb364;
  font-style: italic;
  text-transform: none;
}

.help h3 {
  color: #9fb364;
  font-size: 1.2em;
  background: transparent;
  font-weight: bold;
}

.icon img {
  vertical-align: middle;
  cursor: pointer;
}

.form td {
  padding: 0.2em 1em 0.2em 0;
}

/* Buttons */

.controls a.button,
.controls a.button span {
  background-image: url(../images/small_button.png);
}

.controls a.button span {
  padding-top: 2px;
}

.controls a.button {
  color: #333;
}

.controls a.special,
.controls a.special span {
  background-image: url(../images/small_special_button.png);
}

.controls a.special {
  color: #ddd;
}

/* Header */

#header {
  background: #292929 url(../images/header_bg.png) repeat-x;
  height: 33px;
  overflow: hidden;
}

/* Home button */

#start {
  position: absolute;
  top: 2px;
  left: 13px;
  margin: 0;
}

#start a.button {
  display: block;
}

#start a.button,
#start a.button span {
  background-image: url(../images/start.png);
}

#start a {
  text-indent: -999px;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

#start a.button span {
  width: 112px;
  height: 36px;
  padding: 0;
  margin: 0;
}

/* Menu */

#menu {
  float: right;
  margin: 3px 13px 0 0;
}

#menu li {
  float: left;
  list-style: none;
  margin-right: 0.4em;
}

#menu a.button,
#menu a.button span {
  background-image: url(../images/menu.png);
}

#menu a.button {
  padding-right: 1em;
}

#menu a.button span {
  padding-left: 1em;
}

#menu a {
  color: #333;
}

/* Main area */

#main {
  padding: 2em 1em 5em;
  position: relative;
}

#main h2 {
  margin-top: 0;
  font-weight: normal;
  text-transform: uppercase;
  border-bottom: 1px dotted #aaa;
  padding-left: 18px;
  background: transparent url(../images/section_bullet.png) no-repeat left 3px;
  color: #aaa;
}

/* Applist */

.applist h3 {
  color: #aaa;
  font-weight: normal;
}

.applist ul {
  margin: 0;
}

.applist li {
  list-style: none;
  padding: 0;
}

h3.editableapp,
h3.currentapp {
  padding: 5px 0 5px 54px;
}

h3.editableapp {
  background: #fff url(../images/folder.png) no-repeat;
}

h3.currentapp {
  background: #fff url(../images/folder_locked.png) no-repeat;
}

.applist .controls {
  margin-left: 1.5em;
}


/* Site sidebar */

.sidebar_inner {
  margin: 0 1em 0;
  -moz-border-radius: 0.5em;
  border-radius: 0.5em;
  border: 1px solid #ddd;
  min-width:400px;
}

.sidebar h4 {
  color: #888;
}

.pwdchange {
  padding: 1em;
  float: right !important;
}

.sidebar .box {
  clear: right;
  margin-top: 2em;
  border-top: 1px solid #eee;
  padding: 0 1em;
}

.sidebar .box {
  background: url(../images/sidebar_background.jpg) no-repeat;
}

.sidebar .upgrade_version {
  color: #71c837;
}

/* Tweets */

#tweets ol {
  margin: 1em 0;
}

#tweets ol li {
  background: #ebe8d0;
  list-style: none;
  -moz-border-radius: 0.5em;
  border-radius: 0.5em;
  padding: 0.5em;
  margin: 1em 0;
  border: 1px solid #aaa;
}

#tweets .entry-date {
  font-weight: bold;
  display: block;
}

/* Design/Plugin page */

.component {
  cursor: pointer;
}

.component_contents {
  padding-left: 20px;
}

.component_contents li {
  list-style: none;
}

.component_contents div.comptools {
  margin-bottom: 1em;
  padding-bottom: 0.5em;
}

.component_contents div.formfield form {
  margin-bottom: 0.2em;
  margin-top: 0.2em;
}

.file {
  font-weight: bold;
}

.folder {
  display: block;
  padding: 4px 0 4px 40px;
  background: url(../images/folder_sm.png) no-repeat;
  margin: 0.5em 0;
}

.folder .file {
  font-weight: bold;
}

.sublist {
  margin-left: 0;
  border-left: 1px dotted #aaa;
  padding-left: 0.5em;
  margin-top: 0.5em;
  margin-bottom: 0.0em;
}

/* About */

.legalese {
  background: #eee url(../images/embossed.png) repeat-y;
  padding: 1em 1em 1em 2em;
}

/* Wizard */

.step li {
  list-style: none;
  margin-left: 1em;
  margin-top: 0.5em;
}

.step #wizard_nav .box {
  border-bottom: 1px dotted #aaa;
  padding: 0.5em;
}

.step #wizard_form {
  padding: 0.5em 0 2em 2em;
}

/* Editor */

.edit #body {
  height: auto;
  width: 100%;
}

.edit .help li {
  list-style: none;
  padding: 0.5em 0;
}

.edit .help tt {
  font-weight: bold;
  font-style: normal;
  display: inline; /* Rest cSans base style */
  border: 1px solid #999;
  background: #333;
  color: #ddd;
  padding: 0.3em;
  -moz-border-radius: 0.3em;
  border-radius: 0.3em;
}

/* Ticket */

ul#snapshot > li {
  list-style: none;
}

.inspect td,
.versions td,
.inspect th,
.versions th {
  padding: 0.3em;
  // border: 1px solid #aaa;
}

.inspect th,
.versions th {
  background: #ddd;
  color: #777;
}

.ticket h3 {
  margin-top: 0.5em;
  background: url(../images/ticket_section.png) no-repeat;
  padding: 30px;
  text-transform: uppercase;
}


.ticket .inspect li {
  list-style: none;
}

#frames ul {
  margin: 0;
}

#frames li {
  margin: 0.5em 0;
  padding: 0;
  list-style: none;
}

/* Errors */

.errors table.sortable th {
  background: url(../images/header_bg.png) repeat-x;
  color: #eee;
  //  border-right: 1px solid #eee;
  padding-top: 0.5em;
}

.errors table.sortable td {
  border-bottom: 1px dotted #ddd;
  padding: 0.4em 0.2em;
}

/* Tests */

.test h3.failed {
  background-image: url(../images/red_bullet.gif);
}

.test h3.nodoctests {
  background-image: url(../images/dim_bullet.gif);
}

/* Footer */

#footer {
  padding: 1em 0 0;
  color: #eee;
  text-align: center;
  background: #292929 url(../images/header_bg.png) repeat-x;
  height: 45px;
  overflow: hidden;
  clear: both;
}

/* Shell */

.shell #wrapper {
  margin: 0 auto;
}

.shell #output {
  width: 75%;
  height:30em;
}

.shell #output,
.shell #output pre {
  color: #e8953c;
  background: white;
  border: 1px solid #333;  
}

.shell .prompt, 
.shell #output, 
.shell pre,
.shell #caret {
  font-family: monospace;
}

.shell .prompt, 
.shell #output,
.shell #caret {
  font-size: 10pt;
  padding: 6px;
  padding-right: 0em;
}

.shell #shellwrapper {
  background: white;
  border: 1px solid #333;  
  color: #e8953c;
  width: 75%;
  // padding: 6px;
  //  -moz-border-radius: 1em;
  // border-radius: 1em;
  margin: 1em 0
}

.shell #caret {
  border: 0;
  float: left;
}

.shell .prompt {
  color: #e8953c;
  width: 85%;
  height: 4em;
  border: 0;
}

.shell .prompt, .shell #output {
  overflow: auto;
}

.shell table, tr, td {
  text-align: left;
  vertical-align: top;
}

.shell pre {
  border: 0;
  padding: 0;
  margin: 0;
  color: #333333;
}

.shell .message {
  width: 100%;
  color: #8AD;
  font-weight: bold;
  font-style: italic;
}

.shell .error {
  color: #F44;
}

.shell .username {
  font-weight: bold;
}

.shell dd{
  color: #000033;
}

.shell dt{
  color: #333333;
}

.shell #ajax-status {
  font-weight: bold;
}

.shell .processing {
  background-image: url('../images/spinner.gif');
}

.shell #caret {
  width: 2.5em;
  margin-right: 0px;
  padding-right: 0px;
  border-right: 0px;
}


/* ie7 hacks */

.sublist {
  zoom: 1;
}

.untranslated { background-color: #FFCC00; }
.translated { background-color: white; }
.ui-multiselect { border: 1px solid #ccc; width:400px;}
#editor_area textarea { height: 400px; width: 100% }

Added applications/admin/static/eamy/bundle_markup.js version [b7691207fb].






































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 * eAmy.Offline - Amy Editor embedded for offline use.
 * http://www.april-child.com/amy
 *
 * Published under MIT License.
 * Copyright (c) 2007-2008 Petr Krontorád, April-Child.com

 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.
  
 *
 *
 * This file is auto-generated from original Fry Framework and Amy Editor sources..
 */


// Generated from theme definition file.
$class('ac.chap.theme.EAmy < ac.chap.Theme');

	ac.chap.theme.EAmy.prototype.initDefinition = function()
	{
//		$call(this, 'ac.chap.Theme.initDefinition');this.cssId = 'black';
//this.background = '#072240';
//this.textColor = '#DFEFFF';
//this.caretColor = 'lime';
//this.caretRowStyleActive = '#041629';
//this.selectionStyle = '#86553b';
//this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#0084FF;font-style:italic';
//this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#0084FF;font-style:italic';
//this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#00DF00';
//this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#00DF00';
//this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#FF9D00';
//this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#FF5B8C';
//this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#FF9D00;';
//this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#FFF177';
//this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#54FFB8';
//this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#FFE000';
//this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#71E5B6';
//this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#FF78E5';

		$call(this, 'ac.chap.Theme.initDefinition');this.cssId = 'twilight';
this.background = '#141414';
this.textColor = '#F8F8F8';
this.caretColor = '#A7A7A7';
this.caretRowStyleActive = '#1B1B1B';
this.selectionStyle = '#3C4043';
this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#605A60;font-style:italic';
this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#605A60;font-style:italic';
this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#8B9F67';
this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#D4F29E';
this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#D2A964';
this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#DE6848';
this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#EFC25A;';
this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#ABC4DC';
this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#A0849E';
this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#DAD280';
this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#7286A8';
this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#A55C29';
}


// Generated from bundle keymap definition file.
ac.chap.KeyMap.prototype.initDefinition = function()
	{
		var _ = '\n';
		this.compile
		(""+_+ "KEY: 0"
+_+ "	insert(character:true)"
+_+ "KEY: -37"
+_+ "	caret(move:'left')"
+_+ "KEY: -37+shift"
+_+ "	caret(move:'left')"
+_+ "	selection(add:true)"
+_+ "KEY: -37+ctrl"
+_+ "	caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
+_+ "KEY: -37+alt"
+_+ "	caret(move:'prev_word')"
+_+ "KEY: -37+ctrl+shift"
+_+ "	caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
+_+ "	selection(add:true)"
+_+ "KEY: -37+alt+shift"
+_+ "	caret(move:'prev_word')"
+_+ "	selection(add:true)"
+_+ "KEY: -37+meta"
+_+ "	caret(move:'row_start')"
+_+ "KEY: -37+meta+shift"
+_+ "	caret(move:'row_start')"
+_+ "	selection(add:true)"
+_+ "KEY: -39"
+_+ "	caret(move:'right')"
+_+ "KEY: -39+shift"
+_+ "	caret(move:'right')"
+_+ "	selection(add:true)"
+_+ "KEY: -39+ctrl"
+_+ "	caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
+_+ "KEY: -39+alt"
+_+ "	caret(move:'next_word')"
+_+ "KEY: -39+ctrl+shift"
+_+ "	caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
+_+ "	selection(add:true)"
+_+ "KEY: -39+alt+shift"
+_+ "	caret(move:'next_word')"
+_+ "	selection(add:true)"
+_+ "KEY: -39+meta"
+_+ "	caret(move:'row_end')"
+_+ "KEY: -39+meta+shift"
+_+ "	caret(move:'row_end')"
+_+ "	selection(add:true)"
+_+ "KEY: -38"
+_+ "	caret(move:'up')"
+_+ "KEY: -38+shift"
+_+ "	caret(move:'up')"
+_+ "	selection(add:true)"
+_+ "KEY: -40"
+_+ "	caret(move:'down')"
+_+ "KEY: -40+shift"
+_+ "	caret(move:'down')"
+_+ "	selection(add:true)"
+_+ "KEY: -13"
+_+ "	insert(row:true)"
+_+ "KEY: -8"
+_+ "	delete(character:true)"
+_+ "KEY: -46"
+_+ "	delete(character:false)"
+_+ "KEY: 75+ctrl+shift"
+_+ "	delete(row:true)"
+_+ "KEY: -27"
+_+ "	custom(action:'WordComplete', direction:true)"
+_+ "KEY: -27+shift"
+_+ "	custom(action:'WordComplete', direction:false)"
+_+ "KEY: -9"
+_+ "	custom(action:'SnippetComplete')"
+_+ "KEY: 123"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:'}')"
+_+ "KEY: 34"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:'\"')"
+_+ "KEY: 91"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:']')"
+_+ "KEY: 40"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:')')"
+_+ "KEY: -36"
+_+ "	caret(move:'doc_start')"
+_+ "KEY: -36+shift"
+_+ "	caret(move:'doc_start')"
+_+ "	selection(add:true)"
+_+ "KEY: -35"
+_+ "	caret(move:'doc_end')"
+_+ "KEY: -35+shift"
+_+ "	caret(move:'doc_end')"
+_+ "	selection(add:true)"
+_+ "KEY: -34+meta"
+_+ "	caret(move:'page_down')"
+_+ "KEY: -34+meta+shift"
+_+ "	caret(move:'page_down')"
+_+ "	selection(add:true)"
+_+ "KEY: -33+meta"
+_+ "	caret(move:'page_up')"
+_+ "KEY: -33+meta+shift"
+_+ "	caret(move:'page_down')"
+_+ "	selection(add:true)"
+_+ "KEY: 99+meta"
+_+ "	clipboard(copy:true)"
+_+ "KEY: 120+meta"
+_+ "	clipboard(cut:true)"
+_+ "KEY: 122+meta"
+_+ "	undo()"
+_+ "KEY: 90+meta+shift"
+_+ "	redo()"
+_+ "KEY: 97+meta"
+_+ "	selection(all:true)"
+_+ "KEY: 97+ctrl"
+_+ "	selection(all:true)"
+_+ "KEY: -113"
+_+ "	custom(action:'GoToBookmark', direction:1)"
+_+ "KEY: -113+shift"
+_+ "	custom(action:'GoToBookmark', direction:-1)"
+_+ "KEY: -113+meta"
+_+ "	custom(action:'ToggleBookmark')"
+_+ "KEY: 91+meta"
+_+ "	custom(action:'Indent', direction:'left')"
+_+ "KEY: 93+meta"
+_+ "	custom(action:'Indent', direction:'right')"
+_+ "KEY: 47+meta"
+_+ "	custom(action:'Comment')"
+_+ "KEY: 43+meta"
+_+ "	custom(action:'RuntimeOption', key:'font.size', value:'bigger')"
+_+ "KEY: 45+meta"
+_+ "	custom(action:'RuntimeOption', key:'font.size', value:'smaller')"
+_+ "KEY: 101+meta"
+_+ "	custom(action:'SetSearchKeyword')"
+_+ "KEY: 103+meta"
+_+ "	custom(action:'SearchKeyword', direction:'down')"
+_+ "KEY: 71+shift+meta"
+_+ "	custom(action:'SearchKeyword', direction:'up')"
+_+ "KEY: 102+ctrl"
+_+ "	custom(action:'SearchInteractive')"
+_+ "KEY: 83+ctrl+shift"
+_+ "	custom(action:'SearchInteractive')"
+_+ "KEY: 102+meta"
+_+ "	custom(action:'SearchInteractive')"
+_+ "KEY: -13"
+_+ "	custom(action:'SmartIndent', split_line:true, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
+_+ "KEY: -13+meta"
+_+ "	custom(action:'SmartIndent', split_line:false, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
+_+ "KEY: 39"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:'\\'')"
)};

$class('ac.chap.lang.EAmy < ac.chap.Language');

	ac.chap.lang.EAmy.prototype.initDefinition = function()
	{
		$call(this, 'ac.chap.Language.initDefinition');
this.singleQuoteStringMarker = "'";
this.singleQuoteStringMarkerException = "\\";
this.doubleQuoteStringMarker = "\"";
this.doubleQuoteStringMarkerException = "\\"
this.wordDelimiter = /[\w\.\d]/;
this.indentIgnoreMarker = /[\.]/;
this.foldingStartMarkers = [/^\s*<(div)\b.*>/i, /^\s*<(ul)\b.*>/i];
this.foldingParityMarkers = [/^\s*<(div)\b.*>/i, /^\s*<(ul)\b.*>/i];
this.foldingStopMarkers = [/^\s*<\/(div)>/i, /^\s*<\/(ul)>/i];
this.singleRowCommentStartMarkers = [];
this.multiRowCommentStartMarker = "<!--";
this.multiRowCommentEndMarker = "-->";
this.chunkRules.push([/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER])
this.chunkRules.push([/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR])
this.chunkRules.push([/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS])
this.chunkRules.push([/((<|<\/)([\w-_\:]*)([ >]))/i, 3, ac.chap.CHUNK_KEYWORD])
this.chunkRules.push([/(([ \t])([\w-_\:]*)(=$))/i, 3, ac.chap.CHUNK_KEYWORD_CUSTOM])
this.chunkRules.push([/(([^\w]|^)(!DOCTYPE)([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY])
this.chunkRules.push([/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER])
this.chunkRules.push([/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR])
this.chunkRules.push([/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS])
this.chunkRules.push([/((<|<\/)([\w-_\:]*)([ >]))/i, 3, ac.chap.CHUNK_KEYWORD])
this.chunkRules.push([/(([ \t])([\w-_\:]*)(=$))/i, 3, ac.chap.CHUNK_KEYWORD_CUSTOM])
this.chunkRules.push([/(([^\w]|^)(!DOCTYPE)([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY])
}
var snippet = {};
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ie6', code: '<!--[if IE 6]>${1:${AMY_SELECTED_TEXT:     IE Conditional Comment: Internet Explorer 6 only   }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'iegte7', code: '<!--[if gte IE 7]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 7 and above }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ie5', code: '<!--[if IE 5.5]>${1:${AMY_SELECTED_TEXT:   IE Conditional Comment: Internet Explorer 5.5 only }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ie', code: '<!--[if IE]>${1:${AMY_SELECTED_TEXT:       IE Conditional Comment: Internet Explorer          }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ienot', code: '<!--[if !IE]><!-->${1:${AMY_SELECTED_TEXT:  IE Conditional Comment: NOT Internet Explorer      }}<!-- <![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ielte6', code: '<!--[if lte IE 6]>${1:${AMY_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 and below }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: '<!--[if IE 5.0]>${1:${AMY_SELECTED_TEXT:   IE Conditional Comment: Internet Explorer 5.0 only }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ielt6', code: '<!--[if lt IE 6]>${1:${AMY_SELECTED_TEXT:  IE Conditional Comment: Internet Explorer 5.x      }}<![endif]-->$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: '${0:${AMY_SELECTED_TEXT/\A<em>(.*)<\/em>\z|.*/(?1:$1:<em>$0<\/em>)/m}}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: '${0:${AMY_SELECTED_TEXT/\A<strong>(.*)<\/strong>\z|.*/(?1:$1:<strong>$0<\/strong>)/m}}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'left', code: '&#x2190;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'backtab', code: '&#x21E4;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'enter', code: '&#x2305;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'arrow', code: '&#x2192;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'option', code: '&#x2325;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'shift', code: '&#x21E7;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: '&nbsp;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'delete', code: '&#x2326;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'backspace', code: '&#x232B;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'escape', code: '&#x238B;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'tab', code: '&#x21E5;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'up', code: '&#x2191;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'control', code: '&#x2303;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'return', code: '&#x21A9;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'down', code: '&#x2193;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'command', code: '&#x2318;'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'doctype', code: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n	"http://www.w3.org/TR/html4/strict.dtd">\n'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'doctype', code: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n	"http://www.w3.org/TR/html4/loose.dtd">\n'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'doctypexf', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\n	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'doctypext', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'doctypex', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'doctypexs', code: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 't', code: '<{${1:tag_name}}>$0</{$1}>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'body', code: '<body id="${1:${AMY_FILENAME/(.*)\..*/\L$1/}}"${2: onload="$3"}>\n	$0\n</body>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'textarea', code: '<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">$0</textarea>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'div', code: '<div${1: id="${2:name}"}>\n	${0:$AMY_SELECTED_TEXT}\n</div>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: '<br>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'title', code: '<title>${1:${AMY_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}}</title>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'movie', code: '<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n	<param name="src" value="$1">\n	<param name="controller" value="$4">\n	<param name="autoplay" value="$5">\n	<embed src="${1:movie.mov}"\n		width="${2:320}" height="${3:240}"\n		controller="${4:true}" autoplay="${5:true}"\n		scale="tofit" cache="true"\n		pluginspage="http://www.apple.com/quicktime/download/"\n	>\n</object>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'input', code: '<input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="$3"${4: id="${5:$2}"}>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'head', code: '<head>\n	<meta http-equiv="Content-type" content="text/html; charset=utf-8">\n	<title>${1:${AMY_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}}</title>\n	$0\n</head>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'meta', code: '<meta name="${1:name}" content="${2:content}">'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'h1', code: '<h1 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:$AMY_SELECTED_TEXT}</h1>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'form', code: '<form action="${1:${AMY_FILENAME/(.*?)\..*/$1_submit/}}" method="${2:get}" accept-charset="utf-8">\n	$0\n\n	<p><input type="submit" value="Continue &rarr;"></p>\n</form>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'link', code: '<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" title="${4:no title}" charset="${5:utf-8}">'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'style', code: '<style type="text/css" media="screen">\n	$0\n</style>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'table', code: '<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>\n	<tr><th>${5:Header}</th></tr>\n	<tr><td>${0:Data}</td></tr>\n</table>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'base', code: '<base href="$1"${2: target="$3"}>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'scriptsrc', code: '<script src="$1" type="text/javascript" charset="${3:utf-8}"></script>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'mailto', code: '<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'script', code: '<script type="text/javascript" charset="utf-8">\n	$0\n</script>'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'c', code: 'class="$1"'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'i', code: 'id="$1"'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'p', code: '{{pass}}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ex', code: '{{extend \'${1:layout.html}\'}}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'for', code: '{{for ${1:bar} in ${2:foo}:}}\n	$0\n{{pass}}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'if', code: '{{if ${1:foo} ${2:==/!=/=>/=</>/<} ${3:bar}:}}\n	$0\n{{pass}}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '=', code: '{{=$0}}'};
eamy.snippets.push(snippet);


Added applications/admin/static/eamy/bundle_python.js version [3ba44b1cf2].









































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 * eAmy.Offline - Amy Editor embedded for offline use.
 * http://www.april-child.com/amy
 *
 * Published under MIT License.
 * Copyright (c) 2007-2008 Petr Krontorád, April-Child.com

 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.
  
 *
 *
 * This file is auto-generated from original Fry Framework and Amy Editor sources..
 */


// Generated from theme definition file.
$class('ac.chap.theme.EAmy < ac.chap.Theme');

	ac.chap.theme.EAmy.prototype.initDefinition = function()
	{
//		$call(this, 'ac.chap.Theme.initDefinition');this.cssId = 'black';
//this.background = '#072240';
//this.textColor = '#DFEFFF';
//this.caretColor = 'lime';
//this.caretRowStyleActive = '#041629';
//this.selectionStyle = '#86553b';
//this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#0084FF;font-style:italic';
//this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#0084FF;font-style:italic';
//this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#00DF00';
//this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#00DF00';
//this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#FF9D00';
//this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#FF5B8C';
//this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#FF9D00;';
//this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#FFF177';
//this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#54FFB8';
//this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#FFE000';
//this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#71E5B6';
//this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#FF78E5';
//
		$call(this, 'ac.chap.Theme.initDefinition');
this.cssId = 'twilight';
this.background = '#141414';
this.textColor = '#F8F8F8';
this.caretColor = '#A7A7A7';
this.caretRowStyleActive = '#1B1B1B';
this.selectionStyle = '#3C4043';
this.colorScheme[ac.chap.TOKEN_MULTIROW_COMMENT] = 'color:#605A60;font-style:italic';
this.colorScheme[ac.chap.TOKEN_SINGLEROW_COMMENT] = 'color:#605A60;font-style:italic';
this.colorScheme[ac.chap.TOKEN_SINGLE_QUOTED] = 'color:#8B9F67';
this.colorScheme[ac.chap.TOKEN_DOUBLE_QUOTED] = 'color:#D4F29E';
this.colorScheme[ac.chap.CHUNK_KEYWORD] = 'color:#D2A964';
this.colorScheme[ac.chap.CHUNK_NUMBER] = 'color:#DE6848';
this.colorScheme[ac.chap.CHUNK_OPERATOR] = 'color:#EFC25A;';
this.colorScheme[ac.chap.CHUNK_PARENTHESIS] = 'color:#ABC4DC';
this.colorScheme[ac.chap.CHUNK_KEYWORD_CUSTOM] = 'color:#A0849E';
this.colorScheme[ac.chap.CHUNK_FUNCTION_NAME] = 'color:#DAD280';
this.colorScheme[ac.chap.CHUNK_LIBRARY] = 'color:#7286A8';
this.colorScheme[ac.chap.CHUNK_LIBRARY_CUSTOM] = 'color:#A55C29';
}



// Generated from bundle keymap definition file.
ac.chap.KeyMap.prototype.initDefinition = function()
	{
		var _ = '\n';
		this.compile
		(""+_+ "KEY: 0"
+_+ "	insert(character:true)"
+_+ "KEY: -37"
+_+ "	caret(move:'left')"
+_+ "KEY: -37+shift"
+_+ "	caret(move:'left')"
+_+ "	selection(add:true)"
+_+ "KEY: -37+ctrl"
+_+ "	caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
+_+ "KEY: -37+alt"
+_+ "	caret(move:'prev_word')"
+_+ "KEY: -37+ctrl+shift"
+_+ "	caret(move:'prev_regexp', re:'[^|._A-Z ,|(|);]*$')"
+_+ "	selection(add:true)"
+_+ "KEY: -37+alt+shift"
+_+ "	caret(move:'prev_word')"
+_+ "	selection(add:true)"
+_+ "KEY: -37+meta"
+_+ "	caret(move:'row_start')"
+_+ "KEY: -37+meta+shift"
+_+ "	caret(move:'row_start')"
+_+ "	selection(add:true)"
+_+ "KEY: -39"
+_+ "	caret(move:'right')"
+_+ "KEY: -39+shift"
+_+ "	caret(move:'right')"
+_+ "	selection(add:true)"
+_+ "KEY: -39+ctrl"
+_+ "	caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
+_+ "KEY: -39+alt"
+_+ "	caret(move:'next_word')"
+_+ "KEY: -39+ctrl+shift"
+_+ "	caret(move:'next_regexp', re:'^[^|._A-Z ,|(|);]*')"
+_+ "	selection(add:true)"
+_+ "KEY: -39+alt+shift"
+_+ "	caret(move:'next_word')"
+_+ "	selection(add:true)"
+_+ "KEY: -39+meta"
+_+ "	caret(move:'row_end')"
+_+ "KEY: -39+meta+shift"
+_+ "	caret(move:'row_end')"
+_+ "	selection(add:true)"
+_+ "KEY: -38"
+_+ "	caret(move:'up')"
+_+ "KEY: -38+shift"
+_+ "	caret(move:'up')"
+_+ "	selection(add:true)"
+_+ "KEY: -40"
+_+ "	caret(move:'down')"
+_+ "KEY: -40+shift"
+_+ "	caret(move:'down')"
+_+ "	selection(add:true)"
+_+ "KEY: -13"
+_+ "	insert(row:true)"
+_+ "KEY: -8"
+_+ "	delete(character:true)"
+_+ "KEY: -46"
+_+ "	delete(character:false)"
+_+ "KEY: 75+ctrl+shift"
+_+ "	delete(row:true)"
+_+ "KEY: -27"
+_+ "	custom(action:'WordComplete', direction:true)"
+_+ "KEY: -27+shift"
+_+ "	custom(action:'WordComplete', direction:false)"
+_+ "KEY: -9"
+_+ "	custom(action:'SnippetComplete')"
+_+ "KEY: 123"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:'}')"
+_+ "KEY: 34"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:'\"')"
+_+ "KEY: 91"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:']')"
+_+ "KEY: 40"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:')')"
+_+ "KEY: -36"
+_+ "	caret(move:'doc_start')"
+_+ "KEY: -36+shift"
+_+ "	caret(move:'doc_start')"
+_+ "	selection(add:true)"
+_+ "KEY: -35"
+_+ "	caret(move:'doc_end')"
+_+ "KEY: -35+shift"
+_+ "	caret(move:'doc_end')"
+_+ "	selection(add:true)"
+_+ "KEY: -34+meta"
+_+ "	caret(move:'page_down')"
+_+ "KEY: -34+meta+shift"
+_+ "	caret(move:'page_down')"
+_+ "	selection(add:true)"
+_+ "KEY: -33+meta"
+_+ "	caret(move:'page_up')"
+_+ "KEY: -33+meta+shift"
+_+ "	caret(move:'page_down')"
+_+ "	selection(add:true)"
+_+ "KEY: 99+meta"
+_+ "	clipboard(copy:true)"
+_+ "KEY: 120+meta"
+_+ "	clipboard(cut:true)"
+_+ "KEY: 122+meta"
+_+ "	undo()"
+_+ "KEY: 90+meta+shift"
+_+ "	redo()"
+_+ "KEY: 97+meta"
+_+ "	selection(all:true)"
+_+ "KEY: 97+ctrl"
+_+ "	selection(all:true)"
+_+ "KEY: -113"
+_+ "	custom(action:'GoToBookmark', direction:1)"
+_+ "KEY: -113+shift"
+_+ "	custom(action:'GoToBookmark', direction:-1)"
+_+ "KEY: -113+meta"
+_+ "	custom(action:'ToggleBookmark')"
+_+ "KEY: 91+meta"
+_+ "	custom(action:'Indent', direction:'left')"
+_+ "KEY: 93+meta"
+_+ "	custom(action:'Indent', direction:'right')"
+_+ "KEY: 47+meta"
+_+ "	custom(action:'Comment')"
+_+ "KEY: 43+meta"
+_+ "	custom(action:'RuntimeOption', key:'font.size', value:'bigger')"
+_+ "KEY: 45+meta"
+_+ "	custom(action:'RuntimeOption', key:'font.size', value:'smaller')"
+_+ "KEY: 101+meta"
+_+ "	custom(action:'SetSearchKeyword')"
+_+ "KEY: 103+meta"
+_+ "	custom(action:'SearchKeyword', direction:'down')"
+_+ "KEY: 71+shift+meta"
+_+ "	custom(action:'SearchKeyword', direction:'up')"
+_+ "KEY: 102+ctrl"
+_+ "	custom(action:'SearchInteractive')"
+_+ "KEY: 83+ctrl+shift"
+_+ "	custom(action:'SearchInteractive')"
+_+ "KEY: 102+meta"
+_+ "	custom(action:'SearchInteractive')"
+_+ "KEY: -13"
+_+ "	custom(action:'SmartIndent', split_line:true, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
+_+ "KEY: -13+meta"
+_+ "	custom(action:'SmartIndent', split_line:false, indent_tab_when_starts:'class module def if else unless rescue ensure while do __class__')"
+_+ "KEY: 39"
+_+ "	custom(action:'AutoComplete', use_selection:true, text:'\\'')"
)};

$class('ac.chap.lang.EAmy < ac.chap.Language');

	ac.chap.lang.EAmy.prototype.initDefinition = function()
	{
		$call(this, 'ac.chap.Language.initDefinition');
this.singleQuoteStringMarker = "'";
this.singleQuoteStringMarkerException = "\\";
this.doubleQuoteStringMarker = "\"";
this.doubleQuoteStringMarkerException = "\\";
this.wordDelimiter = /[\w\d]/;
this.indentIgnoreMarker = /[\t \s]/;
this.foldingStartMarkers = [/^\s*def|class/i];
this.foldingParityMarkers = [/do|(^\s*if)|(^\s*def)|(^\s*class)/i];
this.foldingStopMarkers = [/^\s{0,1}$/i];
this.singleRowCommentStartMarkers = ['#'];
this.multiRowCommentStartMarker = "\"\"\"";
this.multiRowCommentEndMarker = "\"\"\"";
this.stringInterpolation = ['(#\{[^\}]*\})', 1];
this.chunkRules.push([/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER])
this.chunkRules.push([/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR])
this.chunkRules.push([/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS])
this.chunkRules.push([/(([^\w]|^)(elif|else|except|finally|for|if|try|while|with)([^\w]|$))/i, 3, ac.chap.CHUNK_KEYWORD])
this.chunkRules.push([/(([^\w]|^)(@[\w]*|break|continue|pass|raise|return|yield|and|in|is|not|or|as|assert|del|exec|print)([^\w]|$))/i, 3, ac.chap.CHUNK_KEYWORD_CUSTOM])
this.chunkRules.push([/((def[ ]{1,})([\w]{1,}))/i, 3, ac.chap.CHUNK_FUNCTION_NAME])
this.chunkRules.push([/(([^\w]|^)(__import__|all|abs|any|apply|callable|chr|cmp|coerce|compile|delattr|dir|divmod|eval|execfile|filter|getattr|globals|hasattr|hash|hex|id|input|intern|isinstance|issubclass|iter|len|locals|map|max|min|oct|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|sorted|sum|unichr|vars|zip|basestring|bool|buffer|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|object|open|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY])
this.chunkRules.push([/(([^\w]|^)((__(all|bases|class|debug|dict|doc|file|members|metaclass|methods|name|slots|weakref)__)|(import|from|                        abs|add|and|call|cmp|coerce|complex|contains|del|delattr|delete|delitem|delslice|div|divmod|enter|eq|exit|float|floordiv|ge|get|getattr|getattribute|getitem|getslice|gt|hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|long|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|setslice|str|sub|truediv|unicode|xor))([^\w]|$))/i, 3, ac.chap.CHUNK_LIBRARY_CUSTOM])
}
var snippet = {};
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ifmain', code: 'if __name__ == '+"'"+'__main__'+"'"+':\n	${1:main()}$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'try', code: 'try:\n	${1:pass}\nexcept ${2:Exception}, ${3:e}:\n	${4:raise e}\nelse:\n	${5:pass}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'property', code: 'def ${1:foo}():\n    doc = "${2:The $1 property.}"\n    def fget(self):\n        ${3:return self._$1}\n    def fset(self, value):\n        ${4:self._$1 = value}\n    def fdel(self):\n        ${5:del self._$1}\n    return locals()\n$1 = property(**$1())$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
snippet = {tab_activation: '__', code: '__${1:init}__'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '.', code: 'self.'};
eamy.snippets.push(snippet);
snippet = {tab_activation: '', code: ''};
eamy.snippets.push(snippet);
//snippet = {tab_activation: 'def', code: 'def ${1:fname}(${2:`if [ "$TM_CURRENT_LINE" != "" ]\n				# poor man'+"'"+'s way ... check if there is an indent or not\n				# (cuz we would have lost the class scope by this point)\n				then\n					echo "self"\n				fi`}):\n	${3/.+/"""/}${3:docstring for $1}${3/.+/"""\n/}${3/.+/\t/}${0:pass}'};
//eamy.snippets.push(snippet);
snippet = {tab_activation: 'def', code: 'def ${1:fname}(${2:`if [ "$TM_CURRENT_LINE" != "" ]\n				# poor man'+"'"+'s way ... check if there is an indent or not\n				# (cuz we would have lost the class scope by this point)\n				then\n					echo "self"\n				fi`}):\n	${3:}\n 	${0:return dict()}'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'class', code: 'class ${1:ClassName}(${2:object}):\n	${3/.+/"""/}${3:docstring for $1}${3/.+/"""\n/}${3/.+/\t/}def __init__(self${4/([^,])?(.*)/(?1:, )/}${4:arg}):\n		${5:super($1, self).__init__()}\n${4/(\A\s*,\s*\Z)|,?\s*([A-Za-z_][a-zA-Z0-9_]*)\s*(=[^,]*)?(,\s*|$)/(?2:\t\tself.$2 = $2\n)/g}		$0'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'aurm', code: '@auth.requires_membership(\'$0\'):'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'dbt', code: '${1:db_name}.define_table("${2:table_name}",\n	SQLField("${3:field_name}", "${4:string/text/password/blob/upload/boolean/integer/double/time/date/datetime/db.reference_table}", ${5:length=$6}, ${7:default="$8"}),$9\n)'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'dbf', code: 'SQLField("${1:field_name}", "${2:string/text/password/blob/upload/boolean/integer/double/time/date/datetime/db.reference_table}", ${3:length=$4}, ${5:default="$6"}),$7'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'dbi', code: '${1:db_name}.${2:table_name}.insert(\n	${3:field_name}="$4" $5\n)'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 't', code: 'T("$0")'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'rev', code: 'response.view=\'$0\''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'ref', code: 'response.flash=\'$0\''};
eamy.snippets.push(snippet);
snippet = {tab_activation: 're', code: 'redirect(\'$0\')'};
eamy.snippets.push(snippet);
snippet = {tab_activation: 'rej', code: 'response.json=\'$0\''};
eamy.snippets.push(snippet);

Added applications/admin/static/eamy/chap-bg-sidebar.gif version [9e95c89e6d].

cannot compute difference between binary files

Added applications/admin/static/eamy/chap-bookmark-default.gif version [ddbe132559].

cannot compute difference between binary files

Added applications/admin/static/eamy/chap-folding-expand-inner.gif version [f0df085fd1].

cannot compute difference between binary files

Added applications/admin/static/eamy/chap-folding-expand.gif version [2dcb780ffa].

cannot compute difference between binary files

Added applications/admin/static/eamy/chap-folding-start.gif version [06f1038e75].

cannot compute difference between binary files

Added applications/admin/static/eamy/chap-folding-stop.gif version [0f952c6663].

cannot compute difference between binary files

Added applications/admin/static/eamy/chap-wrapped-row.gif version [3bae3b1bbf].

cannot compute difference between binary files

Added applications/admin/static/eamy/eamy.js version [62634f7a78].
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 * eAmy.Offline - Amy Editor embedded for offline use.
 * http://www.april-child.com/amy
 *
 * Published under MIT License.
 * Copyright (c) 2007-2008 Petr Krontorád, April-Child.com

 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.
  
 *
 *
 * This file is auto-generated from original Fry Framework and Amy Editor sources..
 */





/*
 * AC Fry - JavaScript Framework v1.0
 * (c)2006 Petr Krontorad, April-Child.com
 * Portions of code based on WHOA Bender Framework, (c)2002-2005 Petr Krontorad, WHOA Group.
 * http://www.april-child.com. All rights reserved.
 * See the license/license.txt for additional details regarding the license.
 * Special thanks to Matt Groening and David X. Cohen for all the robots.
 */

/* Reserving global `fry` object */
var fry = 
{
	version:1.0,
	__production_mode:false
};

// String prototype enhancements
String.prototype.camelize = function()
{
	return this.replace( /([-_].)/g, function(){ return arguments[0].substr(1).toUpperCase();} );
}

String.prototype.decamelize = function()
{
	return this.replace( /([A-Z])/g, function(){ return '-'+arguments[0].toLowerCase();} );
}

String.prototype.trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, '' );
}

String.prototype.stripLines = function()
{
	return this.replace( /\n/g, '' );
}

String.prototype.stripMarkup = function()
{
	return this.replace( /<(.|\n)+?>/g, '' );
}

String.prototype.replaceMarkup = function( charRep )
{
	return this.replace( /(<(.|\n)+?>)/g, function()
	{
		var t = '';
		for ( var i=0; i<arguments[0].length; i++ )
		{
			t += charRep;
		}
		return t;
	} );
}

String.prototype.encodeMarkup = function()
{
	return this.replace( /&/g, '&amp;' ).replace( />/g, '&gt;' ).replace( /</g, '&lt;' );
}

String.prototype.decodeMarkup = function()
{
	return this.replace( /&lt;/g, '<' ).replace( /&gt;/g, '>' ).replace( /&amp;/g, '&' );
}

String.prototype.surround = function(t, side)
{
	side = side || 3;
	return (1==1&side?t:'')+this+(2==2&side?t:'');
}

String.prototype.surroundTag = function(t)
{
	return '<'+t+'>'+this+'</'+t+'>';
}

// example of use: var pattern = '? is ?; alert(pattern.embed('Decin', 'sunny')); pattern = '@city is @weather'; alert(pattern.embed({weather:'cloudy', city:'Decin'}))
String.prototype.embed = function()
{
	var t = this;
	if ( 1 == arguments.length && 'object' == typeof arguments[0] )
	{
		// named placeholders
		for ( var i in arguments[0] )
		{
			eval('var re=/@'+i+'/g;');
			t = t.replace(re, arguments[0][i]);
		}
	}
	else
	{
		// anonymous placeholders `?`
		for ( var i=0; i<arguments.length; i++ )
		{
			var ix = t.indexOf('?');
			if ( -1 != ix )
			{
				t = t.substr(0,ix)+arguments[i]+t.substr(ix+1);
				continue;
			}
			break;
		}
	}
	return t;
}

// Tuning helpers - dealing with user-agent differences
var $__tune = 
{
	__prop:{},
	isIE:('function' == typeof window.ActiveXObject),
	isSafari:-1!=navigator.appVersion.indexOf('AppleWebKit'),
	isOpera:-1!=navigator.appName.indexOf('pera'),
	isMac:-1!=navigator.appVersion.indexOf('intosh'),
	isGecko:false,
	node:
	{
		getOpacity:function(node)
		{
		    if ( !node || !node.style )
		    {
		        return 1.0;
		    }
			if ( $__tune.isIE )
			{
				var f = node.style.filter;
				if ( !f || -1 == f.indexOf('alpha') )
				{
					return 1.0;
				}
				return 1.0;
			}
			return parseFloat(node.style[$__tune.isGecko?'MozOpacity':'opacity'] || 1.0);
		},
		setOpacity:function(node, opacity)
		{
		    if ( !node || !node.style )
		    {
		        return;
		    }
		    if ( 0 > opacity )
		    {
		        opacity = 0;
		    }
		    if ( 1 < opacity )
		    {
		        opacity = 1;
		    }
			if ( $__tune.isIE )
			{
				node.style.filter = 'alpha(opacity='+(100*opacity)+')';
			}
			else
			{
				node.style.opacity = opacity;
				node.style.MozOpacity = opacity;
			}
		},
		getPageScrollPosition:function()
		{
			var d = document.documentElement;
			if ( d && d.scrollTop) 
			{
				return [d.scrollLeft, d.scrollTop];
			} 
			else if (document.body) 
			{
				return [document.body.scrollLeft, document.body.scrollTop];
			}
			else
			{
				return [0, 0];
			}
		}
	},
	event:
	{
		get:function(evt, type)
		{
			if ( $notset(evt.target) )
			{
				evt.target = evt.srcElement;
				evt.stopPropagation = function()
				{
					window.event.cancelBubble = true;
				};
			}
			evt.stop = function()
			{
				evt.stopPropagation();
				evt.stopped = true;
			}
			evt.$ = $(evt.target);
			if ( $notset(evt.pageX) )
			{
				evt.pageX = evt.clientX + document.body.scrollLeft;
				evt.pageY = evt.clientY + document.body.scrollTop;
			}
			evt.getOffsetX = function()
			{
				if ( $notset(evt.offsetX) )
				{
					var pos = evt.$.abspos();
					evt.offsetX = evt.pageX - pos.x;
					evt.offsetY = evt.pageY - pos.y;
				}
				return evt.offsetX;
			}
			evt.getOffsetY = function()
			{
				if ( $notset(evt.offsetY) )
				{
					var pos = evt.$.abspos();
					evt.offsetX = evt.pageX - pos.x;
					evt.offsetY = evt.pageY - pos.y;
				}
				return evt.offsetY;				
			}
			evt.isAnyControlKeyPressed = function()
			{
				return evt.metaKey||evt.ctrlKey||evt.altKey||evt.shiftKey;
			}
			evt.KEY_ESCAPE = 27;
			evt.KEY_ENTER = 13;
			evt.KEY_ARR_RIGHT = 39;
			evt.KEY_ARR_LEFT = 37;
			evt.KEY_ARR_UP = 38;
			evt.KEY_ARR_DOWN = 40;
			return evt;
		},
		addListener:function(node, type, listener)
		{
			if ( $__tune.isIE && node.attachEvent )
			{
                node.attachEvent('on'+type, listener);
			}
			else
			{
				node.addEventListener(type, listener, false);
			}
		},
		removeListener:function(node, type, listener)
		{
			if ( node.detachEvent )
			{
                node.detachEvent('on'+type, listener);
                node['on'+type] = null;
			}
			else if ( node.removeEventListener )
			{
				node.removeEventListener(type, listener, false);
			}				
		}		
	},
	behavior:
	{
		disablePageScroll:function()
		{
			if ( $notset($__tune.__prop.page_scroll) )
			{
				$__tune.__prop.page_scroll = [$().s().overflow, $().ga('scroll')];
			}
			$().s('overflow:hidden').sa('scroll', 'no');
		},
		enablePageScroll:function()
		{
			$().s('overflow:auto').sa('scroll', 'yes');
		},
		disableCombos:function()
		{
			$().g('select', function(node)
			{
				node.sa('__dis_combo', node.s().visibility);
				$(node).v(false);
			});
		},
		enableCombos:function()
		{
			$().g('select', function(node)
			{
				node.s({visibility:node.ga('__dis_combo') || 'visible'});
			});
		},
		clearSelection:function()
		{
			try
			{
				if ( window.getSelection )
				{
					if ( $__tune.isSafari )
					{
						window.getSelection().collapse();
					}
					else
					{
						window.getSelection().removeAllRanges();
					}
				}
				else
				{
					if ( document.selection )
					{
						if ( document.selection.empty )
						{
							document.selection.empty();
						}
						else
						{
							if ( document.selection.clear )
							{
								document.selection.clear();
							}
						}
					}
				}
			}
			catch (e) {}
		},
		makeBodyUnscrollable:function()
		{
			$().s('position:fixed').w(fry.ui.info.page.width);
		}
	},
	ui:
	{
		scrollbarWidth:-1!=navigator.appVersion.indexOf('intosh')?15:17
	},
	selection:
	{
		setRange:function(el, selectionStart, selectionEnd)
		{
			if (el.setSelectionRange)
			{
				el.focus();
				el.setSelectionRange(selectionStart, selectionEnd);
			}
			else if (el.createTextRange)
			{
				var range = el.createTextRange();
				range.collapse(true);
				range.moveEnd('character', selectionEnd);
				range.moveStart('character', selectionStart);
				range.select();
			}
		}
	}
}
// some browsers masks its presence having Gecko string somewhere inside its userAgent field...
$__tune.isGecko = !$__tune.isSafari&&!$__tune.isIE&&-1!=navigator.userAgent.indexOf('ecko');
$__tune.isSafari2 = $__tune.isSafari && -1 != navigator.appVersion.indexOf('Kit/4');
$__tune.isSafari3 = $__tune.isSafari && -1 != navigator.appVersion.indexOf('Kit/5');


// Node manipulations

function ACNode(node)
{
	this.$ = node;
	if ( node )
	{
		node.setAttribute('fryis', '1');		
	}
}
// `$$` creates new node
ACNode.prototype.$$ = function(tagName)
{
	return $$(tagName);
}
// *is* - tells whether node is a part of the active DOM tree (that is displayed on page). Node may exist only in memory before appending or after removing when references, in which case node.is() will return false.
ACNode.prototype.is = function()
{
	return this.$ && null != this.$.parentNode;
}
// *i*d
ACNode.prototype.i = function(id)
{
	if ( 'undefined' == typeof id )
	{
		return this.$.id||'';
	}
	this.$.id = id;
	return this;
}
// class *n*ame
ACNode.prototype.n = function(n)
{
	if ( 'undefined' == typeof n)
	{
		return this.$.className||'';
	}
	this.$.className = n;
	return this;
}
// *e*vent listener, if called with one argument only, previously registered listeners are removed
ACNode.prototype.e = function(t, c, oneUseOnly)
{
	var ser_type_id = 'fryse-'+t;
	if ( !c )
	{
		if ( null != this.$.getAttribute(ser_type_id) )
		{
			var ser_listeners = this.$.getAttribute(ser_type_id).split(',');
	//		console.log('*E* removing listeners for %s, listeners: %s', t, ser_listeners);
			for ( var i=0; i<ser_listeners.length; i++ )
			{
				$__tune.event.removeListener(this.$, t, self[ser_listeners[i]]);
				self[ser_listeners[i]] = null;
			}
			this.$['on'+t] = null;
			this.$.removeAttribute(ser_type_id);
		}
		return this;
	}
	var hash = t+(''+Math.random()).substr(2);
	var ser_listeners = null != this.$.getAttribute(ser_type_id) ? this.$.getAttribute(ser_type_id).split(',') : [];
	ser_listeners.push(hash);
	this.$.setAttribute(ser_type_id, ser_listeners.join(','));
//	console.log('*E* add listener self.%s for %s', hash, t);
	self[hash] = function(evt)
	{
		evt.removeListener = function()
		{
			$__tune.event.removeListener(evt.$.$, t, self[hash]);
//			console.log('*E* remove listener self.%s for %s', hash, t);
			c = null;
			evt = null;
			self[hash] = null;
		}
		evt = evt || self.event;
		if ( null != c )
		{
			c($__tune.event.get(evt));			
		}
		if ( null != evt )
		{
			if ( oneUseOnly )
			{
				evt.removeListener();
				return;
			}
			else if ( evt.stopped )
			{
//				console.log('*E* stop self.%s for %s', hash, t);
				evt = null;				
			}
		}
	};
	this.$.setAttribute('fryhe', 1);
	$__tune.event.addListener(this.$, t, self[hash]);
	return this;
}

function __fry_esupressed(evt)
{
	evt = evt || self.event;
	if ( !evt.stopPropagation )
	{
		evt.cancelBubble = true;
	}
	else
	{
		evt.stopPropagation();
	}
	evt = null;
	return false;
}
// *e*vent *s*upressed - special case when you want to receive an event, do nothing about it and stop it from propagating
ACNode.prototype.es = function(t)
{
	if ( $__tune.isIE && this.$.attachEvent )
	{
        this.$.attachEvent('on'+t, __fry_esupressed);
	}
	else if ( this.$.addEventListener )
	{
		this.$.addEventListener(t, __fry_esupressed, false);
	}
}
// *x* coordinate
ACNode.prototype.x = function(x)
{
	if ( 'undefined' == typeof x )
	{
		return parseInt(this.$.style.left||0);
	}
	this.$.style.left = x+'px';
	return this;
}
// *y* coordinate
ACNode.prototype.y = function(y)
{
	if ( 'undefined' == typeof y )
	{
		return parseInt(this.$.style.top||0);
	}
	this.$.style.top = y+'px';
	return this;
}
// *abs*olute page *pos*ition coordinates (you can optionally specify node to which the position is calculated), returns {x:, y:} coordinates
ACNode.prototype.abspos = function(n)
{
	if ( document.getBoxObjectFor )
	{
		var p = document.getBoxObjectFor(this.$);
		return {x:p.x, y:p.y};
	}
	if ( this.$.getBoundingClientRect )
	{
		var p = this.$.getBoundingClientRect();
		return {x:p.left+(document.documentElement.scrollLeft || document.body.scrollLeft), y:p.top+(document.documentElement.scrollTop || document.body.scrollTop)};
	}
	var p = {x:0, y:0};
	var n2 = this.$;
	while ( document.body != n2 && document != n2 && n != n2 )
	{
		p.x += n2.offsetLeft - n2.scrollLeft;
		p.y += n2.offsetTop - n2.scrollTop;
		if ( n2.offsetParent )
		{
			n2 = n2.offsetParent;
		}
		else
		{
			n2 = n2.parentNode;
		}
	}
	return p;
}
// *pos*ition, if true - absolute, false - relative
ACNode.prototype.pos = function(p)
{
	if ( 'undefined' == typeof p )
	{
		return 'absolute' == this.$.style.position;
	}
	this.$.style.position = p ? 'absolute' : 'relative';
	return this;
}
// *z*-index coordinate
ACNode.prototype.z = function(z)
{
	if ( 'undefined' == typeof z )
	{
		return parseInt(this.$.style.zIndex||0);
	}
	this.$.style.zIndex = z;
	return this;
}
// *w*idth
ACNode.prototype.w = function(w)
{
	if ( 'undefined' == typeof w )
	{
		return parseInt(this.$.style.width||this.$.offsetWidth);
	}
	this.$.style.width = w+'px';
	return this;
}
// *h*eight
ACNode.prototype.h = function(h)
{
	if ( 'undefined' == typeof h )
	{
		return parseInt(this.$.style.height||this.$.offsetHeight);
	}
	this.$.style.height = h+'px';
	if ( $__tune.isIE && 8 > h )
	{
		this.$.style.fontSize = '1px';
	}
	return this;
}
// *s*tyle information - argument can be either "{color:'red', backgroundColor:'blue'}" or "'color:red;background-color:blue'"
ACNode.prototype.s = function(s)
{
	if ( 'undefined' == typeof s )
	{
		return this.$.style;
	}
	if ( 'object' == typeof s )
	{
		for ( var n in s )
		{
			this.$.style[n] = s[n];
		}
	}
	else if ( 'string' == typeof s )
	{
		if ( '' != s )
		{
			var styles = s.split(';');
			for ( var i=0; i<styles.length; i++ )
			{
				var style = styles[i].split(':');
				if ( 2 == style.length )
				{
					this.$.style[style[0].trim().camelize()] = style[1].trim();
				}
			}
		}
	}
	return this;
}
// *o*pacity
ACNode.prototype.o = function(o)
{
	if ( 'undefined' == typeof o )
	{
		return $__tune.node.getOpacity(this.$);
	}
	$__tune.node.setOpacity(this.$, o);
	return this;
}
// *d*isplay
ACNode.prototype.d = function(d)
{
	if ( 'undefined' == typeof d )
	{
		return 'none' != this.$.style.display;
	}
	this.$.style.display = d ? 'block' : 'none';
	return this;						
}
// *v*isibility
ACNode.prototype.v = function(v)
{
	if ( 'undefined' == typeof v )
	{
		return 'hidden' != this.$.style.visibility;
	}
	this.$.style.visibility = v ? 'visible' : 'hidden';
	return this;			
}
// H*T*ML source (equivalent to infamous innerHTML, remember innerHTML is not considered *evil* here - see the KISS principle, plus it's actually faster than DOM)
ACNode.prototype.t = function(t)
{
	if ( 'undefined' == typeof t )
	{
		return this.$.innerHTML;
	}
	this.rc();
	this.$.innerHTML = t;
	return this;
}
// *p*arent node
ACNode.prototype.p = function(p)
{
	if ( 'undefined' == typeof p )
	{
		return $(this.$.parentNode);
	}
	return $(p).a(this);
}
// *g*et child node(s), the format of a query might be either `[['table',0],['tr',2],['td',4]]`, `['table',['tr',2],['td',4]]`, 'table:0/tr:2/td:4' or 'table/tr:2/td:4'. you can use `*` in path for any node
ACNode.prototype.g = function(q)
{
	var lst = [];
	if ( 'string' == typeof q )
	{
		var qt = q.split('/');
		q = [];
		for ( var i=0; i<qt.length; i++ )
		{
			var qtt = qt[i].split(':');
			q[q.length] = qtt;
		}
	}
	var lookup = function(node, qIndex)
	{
		if ( !node )
		{
			return;
		}
		var qq = q[qIndex];
		var is_final_index = q.length-1 == qIndex;
		var ls = node.getElementsByTagName(qq[0]);
		var num = ls.length;
		if ( 2 == qq.length )
		{
			// specific node required
			if ( is_final_index )
			{
				// store results
				lst.push($(ls.item(parseInt(qq[1]))));
			}
			else
			{
				lookup(ls.item(parseInt(qq[1])), qIndex+1);
			}
		}
		else
		{
			// all nodes required
			for ( var i=0; i<num; i++ )
			{
				if ( is_final_index )
				{
					lst.push($(ls.item(i)));
				}
				else
				{
					lookup(ls.item(i), qIndex+1);
				}
			}
		}
		ls = null;
	}
	lookup(this.$, 0);
	lookup = null;
	var num = lst.length;
	if ( 1 == num )
	{
		return lst[0];
	}
	else if ( 0 == num )
	{
		lst = null;
	}
	return lst;
}
// *g*et *p*arent node at some path - allows for returning grand-grand-grand...parent node. imagine node tree: `div>div>table>tbody>tr>td>` and node at `td`
// to return second div you would call `gp('tr/tbody/table/div')` or `tr/table/div:1`, first div could be acquired using `table/div:2` etc. you can use `*` for any node.
ACNode.prototype.gp = function(q)
{
	if ( 'string' == typeof q )
	{
		q = q.split('/');
	}
	var fq = [];
	for ( var i=0; i<q.length; i++ )
	{
		if ( -1 != q[i].indexOf(':') )
		{
			q[i] = q[i].split(':');
			for ( var ii=0; ii<q[i][1]; ii++ )
			{
				fq.push(q[i][0]);
			}
		}
		else
		{
			fq.push(q[i]);
		}
	}
	var c = 0;
	var p = this.$;
	while ( p && c < fq.length)
	{
		p = p.parentNode;
		if ( '*' == fq[c] || fq[c] == p.tagName.toLowerCase() )
		{
			c++;
		}
	}
	return $(p);
}
// *a*ppends child node
ACNode.prototype.a = function(n)
{
	if ( 'undefined' != typeof n['$'] )
	{
		n = n.$;
	}
	return $(this.$.appendChild(n));
}
// *a*ppend H*T*ML code - adds innerHTML to existing node code
ACNode.prototype.at = function(t)
{
	var ht = this.$.innerHTML;
	this.$.innerHTML = ht + t;
	return this;
}
// *r*emoves child node
ACNode.prototype.r = function(n)
{
	n = $(n);
	if ( null != n && n.is() )
	{
		n.rs();
	}
	return this;
}
// *r*emove *c*hildren
ACNode.prototype.rc = function()
{
	if ( !this.$ )
	{
		return this;
	}
	__fry_gcnode(this.$, true);
	return this;
}
// *r*emoves *s*elf - ! does not return self - therefor the call to .rs() must always be the last in a pipe
ACNode.prototype.rs = function()
{
	if ( !this.$ )
	{
		return;
	}
	__fry_gcnode(this.$);
	this.$ = null;
}
// *i*nserts *c*hild node before specific referenced node (rn)
ACNode.prototype.ib = function(n, rn)
{
	if ( 'undefined' != typeof n['$'] )
	{
		n = n.$;
	}
	if ( 'undefined' != typeof rn['$'] )
	{
		rn = rn.$;
	}
	return $(this.$.insertBefore(n,rn));
}
// *i*nserts *c*hild node after specific referenced node (rn)
ACNode.prototype.ia = function(n, rn)
{
	if ( 'undefined' != typeof n['$'] )
	{
		n = n.$;
	}
	if ( null == $(rn).ns() )
	{
		return $(this.$.appendChild(n));
	}
	else
	{
		return $(this.$.insertBefore(n,($(rn).ns()).$));
	}
}
// *f*irst *c*hild of the node - always returns first $-ed node (ignoring text, comment etc. nodes)
ACNode.prototype.fc = function()
{
	if ( !this.$ )
	{
		return null;
	}
	var n = this.$.firstChild;
	while ( null != n && 1 != n.nodeType )
	{
		n = n.nextSibling;
	}
	return null != n ? $(n) : null;
}
// *l*ast *c*hild of the node - always returns last $-ed node (ignoring text, comment etc. nodes)
ACNode.prototype.lc = function()
{
	if ( !this.$ )
	{
		return null;
	}
	var n = this.$.lastChild;
	while ( null != n && 1 != n.nodeType )
	{
		n = n.previousSibling;
	}
	return null != n ? $(n) : null;			
}
// *n*ext *s*ibling of the node - always returns first $-ed node (ignoring text, comment etc. nodes)
ACNode.prototype.ns = function()
{
	var n = this.$.nextSibling;
	while ( null != n && 1 != n.nodeType )
	{
		n = n.nextSibling;
	}
	return null != n ? $(n) : null;
}
// *p*revious *s*ibling of the node - always returns last $-ed node (ignoring text, comment etc. nodes)
ACNode.prototype.ps = function()
{
	var n = this.$.previousSibling;
	while ( null != n && 1 != n.nodeType )
	{
		n = n.previousSibling;
	}
	return null != n ? $(n) : null;			
}
// *g*et *a*ttribute
ACNode.prototype.ga = function(n)
{
    if ( !this.$ )
    {
        return null;
    }
	return this.$.getAttribute(n);
}
// *s*et *a*ttribute
ACNode.prototype.sa = function(n, v)
{
	this.$.setAttribute(n, v);
	return this;
}
// *r*emove *a*ttribute
ACNode.prototype.ra = function(n)
{
	this.$.removeAttribute(n);
	return this;
}
// *dup*licate node
ACNode.prototype.dup = function()
{
	return $(this.$.cloneNode(true));
}

// `$_` converts any value into string - useful for numeric values before calling for String enhanced methods.
var $_ = function(t)
{
	return ''+t;
}

// `$$` creates new node with specified tag name, returns $-ed node
var $$ = function(n)
{
	return $(document.createElement(n||'div'));
}

// returns $-ed node for existing node, argument can be either ID string or node itself (standard or $-ed). If argument is omitted, returns the body node
var $ = function(id)
{
	if ( 'undefined' == typeof id )
	{
		return $(document.body || document.getElementsByTagName('body').item(0));
	}
	if ( 'undefined' == id || null == id )
	{
		return null;
	}
	if ( 'object' != typeof id )
	{
		return new ACNode(document.getElementById(id));
	}
	else
	{
		if ( id instanceof ACNode )
		{
			return id;
		}
		if ( 1 != id.nodeType )
		{
			return null;
		}
		return new ACNode(id);
	}
}

// Language constructs

/*  $class
	======
	Creates new class, multiple class inheritance is allowed.
	Usage:
	
	$class('AClass',
	{
		construct:function(a)
		{
			this.a = a || '';
		},
		destruct:function()
		{
			$delete(this.a);
		}
	});
	AClass.prototype.hello = function(msg)
	{
		alert(msg + this.a);
	}
	$class('BClass < AClass',
	{
		construct:function(a, b)
		{
			this.b = b || '';
		}
	});
	$class('CClass');
	$class('DClass < BClass, CClass');
	DClass.prototype.hello = function(msg, msg2)
	{
		$call(this, 'AClass.hello', msg);
		alert(msg2 + this.b);
	}
*/
var $class = function(className, methods)
{
	if ( 'string' != typeof className )
	{
		throw new FryException(29, 'Class inheritance error. Undefined class name.');
	}
	var n = className.split('<');
	className = n[0].replace(/ /g, '');
	var bases = [];
	if ( 1 == n.length )
	{
		// no inheritance, will inherit from `Object`
		bases[0] = 'Object';
	}
	else
	{
		// defined inheritance, might be multiple eg. `ClassA < ClassB, ClassC`
		bases = n[1].split(',');
	}
	var getSource = function(s)
	{
		s = ''+s;
		return s.substring(s.indexOf('{')+1, s.lastIndexOf('}'));
	}
	var getParams = function(s, p)
	{
		p = p || {};
		s = ''+s;
		s = s.substring(s.indexOf('(')+1, s.indexOf(')')).split(',');
		for ( var i in s )
		{
			var n = s[i].replace(/ /g, '');
			if ( !p[n] && '' != n )
			{
				p[n] = true;
			}
		}
		return p;
	}
	var preprocessSource = function(s, cn)
	{
		// parsing source code and replacing calls to base constructor or methods
		eval('var re = /'+cn+'\.([^\\(]*)\\(([\\)]*)/g;');		
		s = s.replace(re, function()
		{
			return 'this.__'+cn+'_'+arguments[1]+'.call(this'+(''==arguments[2].replace(/ /g, '')?',':'')+arguments[2];
		});
		eval('re = /'+cn+'[^\\(]*\\(([\\)]*)/g;');
		s = s.replace(re, function()
		{
			return 'this.__'+cn+'_construct.call(this'+(''==arguments[1].replace(/ /g, '')?',':'')+arguments[1];
		});
		return s;
	}	
	methods = methods || {};
	var c_code = '';
	var d_code = '';
	var params = {};
	for ( var i in bases )
	{
		bases[i] = bases[i].replace(/ /g, '');
		if ( 'Object' == bases[i] )
		{
			continue;
		}
		eval('var b_code='+bases[i]+';');
		params = getParams(b_code, params);
		b_code = getSource(b_code);
		c_code += b_code+';';
		eval('var d_code='+bases[i]+'.prototype.destruct||"{}";');
		d_code = getSource(d_code);
		d_code += d_code+';';
	}
	params = getParams(methods.construct||'', params);
	var p = [];
	for ( var i in params)
	{
		p.push(i);
	}
	if ( methods.construct )
	{
		// own constructor defined
		oc_code = getSource(methods.construct);
		for ( var i in bases )
		{
			if ( 'Object' != bases[i] )
			{
				oc_code = preprocessSource(oc_code, bases[i]);				
			}
		}
		c_code += oc_code;
	}	
	d_code += methods.destruct ? getSource(methods.destruct) : '';
	try
	{
		eval('var newClass=function('+p.join(',')+'){'+c_code+'};');		
	}
	catch (e)
	{
		throw new FryException(30, 'Class inheritance error. Class `?`, constructor: `?`, error message: `?`.'.embed(className, c_code, e));
	}
	newClass.prototype = new Object();
	for ( var i in bases )
	{
		if ( 'Object' == bases[i] )
		{
			continue;
		}
		// creating links to base class methods
		var p_base = bases[i].replace(/\./g, '_');
		eval('for(var m in '+bases[i]+'.prototype){newClass.prototype[m]='+bases[i]+'.prototype[m]; if ("__" !=m.substr(0,2)) {newClass.prototype["__'+p_base+'_"+m]='+bases[i]+'.prototype[m];}}');
	}
	// creating class metadata for reflection
	newClass.prototype.__class_name = className;
	newClass.prototype.__base_class_names = bases;
	eval('newClass.prototype.construct=function('+p.join(',')+'){'+c_code+'};')
	eval('newClass.prototype.destruct=function(){'+d_code+'};')
	eval(className+'=newClass');
}


// $new
// ====
// Creates new object.
// Usage: $new(ClassName, [arguments])
var $new = function()
{
	if ( !arguments[0] )
	{
		throw new FryException(31, 'Object instantiation error. Invalid class provided `?`.'.embed(arguments[0]));
	}
	var arg_list = [];
	for ( var i=1; i<arguments.length; i++ )
	{
		arg_list.push('arguments['+i+']');
	}
	try
	{
		eval('var obj = new arguments[0]('+arg_list.join(',')+');');
	}
	catch(e)
	{
		throw new FryException(32, 'Object instantiation error. Class: `?`, num arguments: `?`, error message: `?`.'.embed(arguments[0].prototype.__class_name, arg_list.length, e));
	}
	return obj;
}

// $delete
// =======
// Safely deletes object (destructors of each base class are called automatically).
// Usage: $delete(object)
var $delete = function(object)
{
	if ( 'object' != typeof object )
	{
		return;
	}
	try
	{
		if ( 'string' == typeof object.__base_class_names )
		{
			var bases = object.__base_class_names.split(',');
			for ( var i in bases )
			{
				if ( 'Object' != bases[i] )
				{
					$call(object, bases[i]+'.destruct()');				
				}
			}
		}
		if ( object.destruct )
		{
			object.destruct();
		}
		delete object;
	}
	catch(e)
	{
	}
}

// $call
// =====
// Calls a method/function of specific object, typically used from within method to call some base class method.
// Usage: $call(this, 'AClass.aMethod', [arguments])
var $call = function()
{
	caller = arguments[0];
	var arg_list = [];
	for ( var i=2; i<arguments.length; i++ )
	{
		arg_list.push('arguments['+i+']');
	}
	try
	{
		eval('var r = caller.__'+arguments[1].replace(/\./g, '_')+'.call(caller'+(0!=arg_list.length?',':'')+arg_list.join(',')+');');
	}
	catch (e)
	{
		throw new FryException(32, 'Function call error. Function `?`, num arguments: ?, error: `?`.'.embed(arguments[1], arguments.length-2, e));
	}
	return r;
}

// $runafter
// =========
// Runs embedded code after specified interval (in miliseconds, value 1000 means 1 second).
/* Usage:
	$runafter(100, function()
	{
		// your code
	})
*/
var $runafter = function(t, c)
{
	setTimeout(c, t);
}
// $runinterval
// ============
// Runs embedded code from step `from` to the `to` step, each step is delayed for specified interval.
/* Usage:
	$runinterval(1, 10, 100, function(step)
	{
		// your code that will repeat ten times
	})
*/
var $runinterval = function(from, to, interval, c)
{
	var i = from;
	var control = 
	{
		from:from,
		to:to,
		stopped:false,
		stop:function()
		{
			this.stopped = true;
		}
	}
	var t = self.setInterval(function()
	{
		if ( i > to && to>=from )
		{
			self.clearInterval(t);
		}
		else
		{
			c(i, control);
			if ( control.stopped )
			{
				self.clearInterval(t);
			}
		}
		i++;
	}, interval);
}
// $dotimes
// ========
// Repeats embedded code n times.
/* Usage:
	$dotimes(20, function(i)
	{
		// your code, i is the counter parameter
	})
*/
var $dotimes = function(n, c)
{
	for ( var i=0; i<n; i++ )
	{
		c(i);
	}
}
// $foreach
// ========
// Iterates through any kind of collection - it can be practically anything you might need, from arrays, serialized XML, DOM nodes, remote results etc.
/* Usage:
	$foreach ( node.g('table/tr'), function(tr, i, control)
	{
		if ( 5 > i )
		{
			control.skip();
			return;
		}
		tr.n(0==i%2 ? 'even' : 'odd');
		if ( 20 < i )
		{
			control.stop();
		}
	})
*/
var $foreach = function(o, c)
{
	if ( !o )
	{
		c = null;
		return;
	}
	if ( 'undefined' == typeof o.length && 'function' != typeof o.__length )
	{
		c = null;
		return;
	}
	var n = 'function' == typeof o.__length ? o.__length() : o.length;
	var control = 
	{
		stopped:false,
		stop:function()
		{
			this.stopped = true;
		},
		skipped:false,
		skip:function()
		{
			this.skipped = true;
		},
		removed:false,
		remove:function(stopAfterwards)
		{
			this.removed = true;
			this.stopped = true == stopAfterwards;
		}
	}
	// cannot just extend Array.prototype for `item()` method due bug in IE6 iteration mechanism. Some day (>2010 :) this might get fixed and will become obsolete
	for ( var i=0; i<n; i++ )
	{
		var item = null;
		if ( 'function' == typeof o.item )
		{
			item = o.item(i);
		}
		else if ( 'function' == typeof o.__item )
		{
			item = o.__item(i);
		}
		else
		{
			if ( 'undefined' == typeof o[i] )
			{
				continue;
			}
			item = o[i];
		}
		c(item, 'function' == typeof o.__key ? o.__key(i) : i, control);
		if ( control.removed )
		{
			control.removed = false;
			if ( 'undefined' != typeof o[i] )
			{
				delete o[i];
			}
			else
			{
				if ( 'function' == typeof o.removeItem )
				{
					o.removeItem(i);
				}
				else if ( 'function' == typeof o.__remove )
				{
					o.remove(i);
				}
			}
		}
		if ( control.stopped )
		{
			break;
		}
		if ( control.skipped )
		{
			control.skipped = false;
			continue;
		}
	}
	control = null;
	c = null;	
}
var $notset = function(value)
{
	return ( 'undefined' == typeof value || 'undefined' == value || null == value );
}
var $isset = function(value)
{
	return ( 'undefined' != typeof value && 'undefined' != value && null != value );
}
var $getdef = function(value, defaultValue)
{
	if ( 'undefined' == typeof value || 'undefined' == value || null == value )
	{
		return defaultValue;
	}
	return value;
}

var $combofill = function(n, c)
{
	var i = -1;
	n = $(n);
	while (-1<++i)
	{
		var v = c(i);
		if ( 'object' != typeof v )
		{
			break;
		}
		var option = n.a($$('option')).t(v[1]);
		option.$.value = v[0];
		if ( v[2] )
		{
			option.sa('selected', 'selected');
		}
	}
	return n;
}
var $comboget = function(n)
{
	var v = [];
	var options = $(n).$.options;
	for ( var i=0; i<options.length; i++ )
	{
		if ( '' != options[i].selected )
		{
			v[v.length] = options[i].value;
		}
	}
	if ( 1 == v.length )
	{
		return v[0];
	}
	if ( 0 == v.length && 0 < options.length )
	{
		return options[0].value;
	}
	return v;
}
var $comboset = function(n, v)
{
	var options = $(n).$.options;
	try
	{
		for ( var i=0; i<options.length; i++ )
		{
			if ( options[i].value == v )
			{
				options[i].selected = 'selected';
			}
		}
	}
	catch(e)
	{
	}
	return $(n);
}





/* Generic exception object */
function FryException(code, message)
{
	this.code = code;
	this.message = message;
}
FryException.prototype.toString = function()
{
	return 'Fry Exception: code[?] message[?]'.embed(this.code, this.message);
}

/* Remote call support (AJAX) */
fry.remote =
{
	support:
	{
		getRequestObject: function()
		{
			var obj = null;
			try
			{
				if ( $__tune.isIE )
				{
					$foreach ( ['MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'], function(progid, index, control)
					{
						try
						{
							obj = new ActiveXObject(progid);
							control.stop();
						}
						catch(e){}
					});
				}
				else
				{
					obj = new XMLHttpRequest();
				}
			}
			catch(e){}
			return obj;
		}
	},
	/* Loosely based (especially status handling code) on YUI Library */
	post:function(callback, pars, httpMethod, url)
	{
		url = url || client.conf.fry.backendURL;
		if ( !url )
		{
			throw new FryException(1, 'Undefined backend URL specified in client.conf. Use client.conf.fry.backendURL=\'{YOUR_BACKEND_SCRIPT_URL}\'; to set it.');
		}
		var obj = fry.remote.support.getRequestObject();
		if ( !obj )
		{
			throw new FryException(2, 'Unable to acquire HTTP request object. Check to see if your browser is among supported browsers.');
		}
		if ( -1 != url.indexOf('?') )
		{
			url = url.embed(pars['a']);
			delete pars['a'];
		}
		obj.open(httpMethod||'POST', url, true);
		obj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		var postData = '';
		for ( var name in pars )
		{
			var value = pars[name];
			if ( 'object' == typeof value )
			{
				if ( value.join )
				{
					// array
					var n = value.length;
					for ( var i=0; i<n; i++ )
					{
						value[i] = (''+value[i]).replace(/\],\[/g, '`§~§[]§~§`');
					}
					value = '['+value.join('],[')+']';
					name += '(a)';
				}
				else
				{
					// object
					var values = '[';
					for ( var i in value )
					{
						values += i+'='+(''+value[i]).replace(/\],\[/g, '`§~§[]§~§`')+'],[';
					}
					value = '[' == values ? '' : values.substring(0, values.length-2);
					name += '(o)';
				}
			}
			postData += encodeURIComponent(name)+'='+encodeURIComponent(value)+'&';
		}
		obj.send(postData);
		var poll = window.setInterval
		(
			function()
			{
				if ( 4 == obj.readyState )
				{
					window.clearInterval(poll);
					callback(obj);
				}
			},
			150
		);
	},	
	result:function(s, callbackOk, callbackError)
	{
		var httpStatus;
		var responseObject;	
		try
		{
			httpStatus = s.status;
		}
		catch(e)
		{
			httpStatus = 13030;
		}
		if ( 200 == httpStatus )
		{
			// parsing response
			var r = null;
			var headers = s.getAllResponseHeaders();
			var contentType = (-1 != headers.indexOf('/xml') && s.responseXML) ? 'text/xml' : 'text/html';
			if ( 'text/xml' == contentType )
			{
				// text/xml
				try
				{
					r = $xmlserialize(s.responseText);
				}
				catch(e)
				{
					callbackError('Error while serializing remote-side response. Probably corrupted data. Error: `?`. Sent data `?`.'.embed(e.message, s.responseText));
				}
				try
				{
					callbackOk(r);					
				}
				catch(e)
				{
					throw new FryException(45, 'fry/remote: Error while executing callback after successful remote call. Error: `?`.'.embed(e.message));
				}
			}
			else
			{
				// text/html
				var code = s.responseText.substring(0,3);
				if ( '#S#' == code )
				{
					r = s.responseText.substr(3);
					callbackOk( r );
				}
				else
				{
					if ( '' == s.responseText )
					{
						callbackError('No data returned from remote side.');
					}
					else
					{
						callbackError('Invalid data returned from remote side: `?`.'.embed(s.responseText.substr('#E#'==code?3:0)));
					}					
				}
			}
		}
		else
		{
			switch (httpStatus)
			{
				// The following case labels are wininet.dll error codes that may be encountered.
				// Server timeout
				case 12002:
				// 12029 to 12031 correspond to dropped connections.
				case 12029:
				case 12030:
				case 12031:
				// Connection closed by server.
				case 12152:
				// See above comments for variable status.
				case 13030:
				default:
				{
					if ( callbackError )
					{
						callbackError('Connection ended up with status: '+httpStatus);
					}
				};break;
			}
		}
		delete s;
	},
	upload:
	{
		lastAdapter:null,
		// using SWFUpload component
		perform:function(adapter)
		{
			var url = client.conf.fry.backendURL;
			if ( !url )
			{
				throw new FryException(19, 'Undefined backend URL specified in client.conf. Use client.conf.fry.backendURL=\'{YOUR_BACKEND_SCRIPT_URL}\'; to set it.');
			}

			fry.remote.upload.lastAdapter = adapter;
			if ( null != $('SWFUpload') )
			{
				$('SWFUpload').rs();
			}
			$().a($$()).i('SWFUpload');
			mmSWFUpload.init
			({
				thirdPartyPath : client.conf.fry.path+'3rdparty',
				upload_backend : url+'?a='+adapter.onGetRemoteActionName(),
				target : 'SWFUpload',
				allowed_filesize : adapter.allowedFileSizeInKBytes,
				allowed_filetypes : adapter.allowedFileTypes,
				upload_start_callback : 'fry_remote_upload_onStart',
				upload_progress_callback : 'fry_remote_upload_onProgress',
				upload_complete_callback : 'fry_remote_upload_onComplete',
				upload_error_callback : 'fry_remote_upload_onError',
				upload_cancel_callback : 'fry_remote_upload_onCancel',
				upload_queue_complete_callback : 'fry_remote_upload_onQueueComplete'
			});
			$('SWFUpload').pos(true).x(1).y(1).w(1).h(1);
			mmSWFUpload.callSWF();
		}
	}
};

function fry_remote_upload_onStart(f)
{
	fry.remote.upload.lastAdapter.onStart(f);
}
function fry_remote_upload_onProgress(f, b)
{
	fry.remote.upload.lastAdapter.onProgress(f, b);
}
function fry_remote_upload_onComplete(f)
{
	fry.remote.upload.lastAdapter.onEnd(false, false, f);
}
function fry_remote_upload_onError(e)
{
	fry.remote.upload.lastAdapter.onEnd(false, true, e);
}
function fry_remote_upload_onCancel()
{
	fry.remote.upload.lastAdapter.onEnd(true);
}
function fry_remote_upload_onQueueComplete()
{
	fry.remote.upload.lastAdapter.onQueueEnd();
}



$class('fry.remote.upload.Adapter',
{
	construct:function(allowedFileSizeInKBytes, allowedFileTypes, additionalRemoteActionParams)
	{
		this.allowedFileSizeInKBytes = allowedFileSizeInKBytes || 2000;
		this.allowedFileTypes = allowedFileTypes || '*';
		this.additionalRemoteActionParams = additionalRemoteActionParams || '';
	}
});
fry.remote.upload.Adapter.prototype.onStart = function(fileObj)
{
}
fry.remote.upload.Adapter.prototype.onProgress = function(fileObj, bytesLoaded)
{
}
fry.remote.upload.Adapter.prototype.onEnd = function(wasCanceled, wasError, result)
{
}
fry.remote.upload.Adapter.prototype.onQueueEnd = function()
{
}
fry.remote.upload.Adapter.prototype.onGetRemoteActionName = function()
{
	return 'upload?'.embed(this.additionalRemoteActionParams ? ',?'.embed(this.additionalRemoteActionParams) : '');
}


/*  ---------------------------------------------------------------- 
	fry.cookie namespace
*/

fry.cookie =
{
	get:function(name)
	{
		//http://www.webreference.com/js/column8/functions.html
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1) 
		{
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		} 
		else
		{
			begin += 2;			
		}
		var end = document.cookie.indexOf(";", begin);
		if (end == -1)
		{
			end = dc.length;
		}
		return unescape( dc.substring(begin + prefix.length, end) );
	},
	remove:function(name, path, domain)
	{
		if (getCookie(name)) 
		{
			document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	},
	set:function(name, value, expires, path, domain, secure)
	{
		var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
		document.cookie = curCookie;
	}
}


var $post = fry.remote.post;
var $result = fry.remote.result;
var $rpost = function(params, callbackOk, callbackError, method, url)
{
	method = method || 'POST';
	url = url || client.conf.fry.backendURL;
	$post( function(s) { $result( s, 
		function(r) 
		{
			callbackOk(r);
		},
		function(e) 
		{
			// result Error
			callbackError(e);
		}
		) },
		params, method, url
	);
}
var $upload = function(adapter)
{
	fry.remote.upload.perform(adapter);
}



// Fry Garbage Collector mechanism
var __gc_trash_node = null;
var __gc_running = false;
var __gc_scheduled_timers = [];
var __gc_started_at = 0;

function __fry_gcnode_inner(inode)
{
	if ( null != inode.getAttribute('frydrag') )
	{
		$(inode).removeDrag();
	}
	if ( null != inode.getAttribute('frydnd') )
	{
		$(inode).removeDnD();
	}
	if ( null == inode.getAttribute('fryis') || null == inode.getAttribute('fryhe') )
	{
		inode = null;
		return;
	}
	inode.removeAttribute('fryhe');
	var lst = inode.attributes;
	var num = lst.length;
	for ( var i=0; i<num; i++ )
	{
		var attr_name = lst.item(i).name;
		if ( attr_name && 'fryse' == attr_name.substr(0,5) )
		{
			var type = attr_name.substr(6);
			var listeners = lst.item(i).value.split(',');
			for ( var ii=0; ii<listeners.length; ii++ )
			{
				$__tune.event.removeListener(inode, type, self[listeners[ii]]);
				inode['on'+type] = null;
				self[listeners[ii]] = null;
			}
		}
		attr = null;
	}
	lst = null;
	for ( var i in inode )
	{
		if ( 'on' == i.substr(0,2) && 'function' == typeof inode[i] )
		{
			inode[i] = null;
		}
	}
	inode = null;
}

function __fry_precaunode(node)
{
	var lst = node.getElementsByTagName('*');
	for ( var i=0; i<lst.length; i++ )
	{
		if ( '' != lst.item(i).id )
		{
			lst.item(i).id = '';
		}
	}
	lst = null;
	node.id = '';
	return node;
}

function __fry_gcnode(node, skipSelf)
{
	if ( null == __gc_trash_node )
	{
		// GC not available at the moment
		if ( skipSelf )
		{
			node.innerHTML = '';
		}
		else
		{
			if ( node.parentNode )
			{
				node.parentNode.removeChild(node);
			}
		}
		return;
	}
	if ( skipSelf )
	{
		try
		{
			while ( null != node.firstChild )
			{
				__gc_trash_node.appendChild(__fry_precaunode(node.firstChild));
			}
		}
		catch(e){}
	}
	else
	{
		try
		{
			__gc_trash_node.appendChild(__fry_precaunode(node));
		}
		catch(e){}
	}
//	console.log('GC scheduled.');
	__gc_scheduled_timers[__gc_scheduled_timers.length] = setTimeout('__fry_gc_recycle()', 10000+Math.floor(10000*Math.random()));
}

function __fry_gc_time()
{
	var d = new Date();
	return 60000*d.getMinutes()+1000*d.getSeconds()+d.getMilliseconds();
}

function __fry_gc_recycle()
{
	var n = __gc_scheduled_timers.length;
	for ( var i=0; i<n; i++ )
	{
		clearTimeout(__gc_scheduled_timers[i]);
	}
	__gc_scheduled_timers = [];
	if ( __gc_running )
	{
//		console.log('GC already running.');
		return;
	}
	__gc_running = true;
	__gc_started_at = __fry_gc_time();
//	console.log('GC running for %s nodes. Started at %s', __gc_trash_node.childNodes.length, __gc_started_at);
	while ( null != __gc_trash_node.firstChild )
	{
		var node = __gc_trash_node.firstChild;
		if ( 1 == node.nodeType )
		{
			var lst = node.getElementsByTagName('*');
			var num = lst.length;
			if ( __gc_started_at < __fry_gc_time() - 2000 )
			{
//				console.log('GC did not finish on time. Stopped at %s after %s msecs of running. Number of remaining nodes: %s.', __fry_gc_time(), __fry_gc_time()-__gc_started_at, __gc_trash_node.childNodes.length);
				__gc_running = false;
				__gc_scheduled_timers[__gc_scheduled_timers.length] = setTimeout('__fry_gc_recycle()', 7000+Math.floor(7000*Math.random()));
				return;
			}
			for ( var ii=0; ii<num; ii++ )
			{
				__fry_gcnode_inner(lst.item(ii));
			}
			lst = null;
		}
		__gc_trash_node.removeChild(node);
		node = null;
	}
//	console.log('GC finished');
	__gc_running = false;
}


$__tune.event.addListener(self, 'load', function(evt)
{
	__gc_trash_node = document.getElementsByTagName('body').item(0).appendChild(document.createElement('div'));
	__gc_trash_node.style.display = 'none';		
});
$__tune.event.addListener(self, 'unload', function(evt)
{
	__gc_trash_node = $().$;
	__fry_gc_recycle();
});
/*
 * Advanced keyboard handling
 */

/*--------*/

fry.keyboard = 
{
	initialized:false,
	last_down_evt: null,
	ignore_further_events: false,
	stopped:true,
	paste: {was:false, none:function(){}},
	down: {none:function(){}},
	press: {none:function(){}},
	shared:{},
	buffer: [],
	listener: null,
	clipboard:{node:null, ie:{node:null}, pastedContent:'', copiedContent:'', content:''},
	CONTROL_CODE:1,
	ALT_KEY:2,
	CTRL_KEY: 4,
	SHIFT_KEY:8,
	META_KEY:16,
	COPY: 128,
	CUT: 256,
	PASTE: 512,
	SIG_CLIPBOARD_GET:1024
}

fry.keyboard.initialize = function()
{
	if (fry.keyboard.initialized)
	{
		fry.keyboard.start();
		return;
	}
	var react_as = 'none';
	
	if ($__tune.isGecko)
	{
		react_as = 'ff_' + ($__tune.isMac ? 'mac' : 'win');
	}
	else if ($__tune.isSafari)
	{
		react_as = 'webkit';
	}
	else if ($__tune.isIE)
	{
		react_as = 'ie';
	}
	else if ($__tune.isOpera)
	{
		react_as = 'opera';
	}
	// following scroll listeners will accomplish movement of helper textareas if page scrolls. Due focusing, page would scroll up when pressing paste combination.
	document.onscroll = function(evt)
	{
		if (fry.keyboard.clipboard.node)
		{
			fry.keyboard.clipboard.node.style.top = ($__tune.isSafari? document.body.scrollTop : document.documentElement.scrollTop) + 'px';
		}
	}
	if ($__tune.isIE)
	{
		document.body.onscroll = function(evt)
		{
			if (fry.keyboard.clipboard.node)
			{
				fry.keyboard.clipboard.node.style.top = document.documentElement.scrollTop + 'px';
			}
			if (fry.keyboard.clipboard.ie.node)
			{
				fry.keyboard.clipboard.ie.node.style.top = document.documentElement.scrollTop + 'px';
			}
		}
	}
	var code = "document.onkeydown = function(evt) {\n";
	code += "if (fry.keyboard.stopped) { return; }\n";
	code += "fry.keyboard.ignore_further_events = false;\n";
	code += "var result = null;\n";
	code += $__tune.isIE ? 'evt = event;\n' : '';
	code += (''+fry.keyboard.paste[react_as]).replace(/function[ ]+\(evt\)/, '').replace(/return /g, 'result=').replace(/^[^{]*{/, '').replace(/\}\s*$/, '').replace('fry.keyboard.shared.copy(evt);', (''+fry.keyboard.shared.copy).replace(/function[ ]+\(evt\)/, '').replace(/return /g, 'result=').replace(/^[^{]*{/, '').replace(/\}\s*$/, ''));
	code += "if (fry.keyboard.ignore_further_events) {	return;	}\n";
	code += "if (result) { fry.keyboard.prepareClipboard();	fry.keyboard.paste.was = true; fry.keyboard.clipboard.node.value = ''; fry.keyboard.clipboard.node.focus();	return true; }\n";
	code += "else { ";
	code += $__tune.isIE ? "if (86 == event.keyCode && event.ctrlKey){ fry.keyboard.clipboard.ie.node.value = ''; fry.keyboard.clipboard.ie.node.focus(); }\n" : "";
	code += "}\n";
	code += (''+fry.keyboard.down[react_as]).replace(/function[ ]+\(evt\)/, '').replace(/^[^{]*{/, '').replace(/\}\s*$/, '') + "\n}"
	code = code.replace(/fry\.keyboard\.([A-Z_]+)/g, function() {return fry.keyboard[arguments[1]];});
    // alert(code);
	eval(code);
	
	code = "document.onkeypress = function(evt)	{\n";
	code += "if (fry.keyboard.stopped || fry.keyboard.ignore_further_events) { return; }\n";
	code += "if (fry.keyboard.paste.was) {\n";
	if (!$__tune.isIE)
	{
	    code += "setTimeout(function() {\n";
		if ($__tune.isSafari)
		{
		    // bug in WebKit - append \n if inserted value ends with \n causing double \n as resulting read value
		    code += "var v = fry.keyboard.clipboard.node.value; if ('\\n\\n' == v.substr(v.length-2,2)) {v = v.substr(0, v.length-1);}fry.keyboard.clipboard.node.value = v;\n";
		}
		code += "fry.keyboard.pushKey(fry.keyboard.clipboard.node.value, fry.keyboard.CONTROL_CODE | fry.keyboard.PASTE); fry.keyboard.clipboard.node.blur(); fry.keyboard.paste.was = false;	}, 20);\n";
	}
	code += "return; }\n";
	if ($__tune.isIE)
	{
    	code += "evt = event;\n"
	}
	code += (''+fry.keyboard.press[react_as]).replace(/function[ ]+\(evt\)/, '').replace(/^[^{]*{/, '').replace(/\}\s*$/, '') + "\n}"
	code = code.replace(/fry\.keyboard\.([A-Z_]+)/g, function() {return fry.keyboard[arguments[1]];});
    // alert(code);
	eval(code);
	
	document.onkeydown2 = function(evt)
	{
		if (fry.keyboard.stopped)
		{
			return;
		}
		fry.keyboard.ignore_further_events = false;
		var result = fry.keyboard.paste[react_as](evt || event);
		if (fry.keyboard.ignore_further_events)
		{
			return;
		}
		if (result)
		{
			fry.keyboard.prepareClipboard();
			fry.keyboard.paste.was = true;
			fry.keyboard.clipboard.node.value = '';
			fry.keyboard.clipboard.node.focus();
			return true;
		}
		else
		{
			if ($__tune.isIE)
			{
				if (86 == event.keyCode && event.ctrlKey)
				{
					fry.keyboard.clipboard.ie.node.value = '';
					fry.keyboard.clipboard.ie.node.focus();
				}
			}			
		}
		return fry.keyboard.down[react_as](evt || event);
	}
	document.onkeypress2 = function(evt)
	{
		if (fry.keyboard.stopped || fry.keyboard.ignore_further_events)
		{
			return;
		}
		if (fry.keyboard.paste.was)
		{
			if (!$__tune.isIE)
			{
				setTimeout(function()
				{
					if ($__tune.isSafari)
					{
						// bug in WebKit - append \n if inserted value ends with \n causing double \n as resulting read value
						var v = fry.keyboard.clipboard.node.value;
						if ('\n\n' == v.substr(v.length-2,2))
						{
							v = v.substr(0, v.length-1);
						}
						fry.keyboard.clipboard.node.value = v;
					}
					fry.keyboard.pushKey(fry.keyboard.clipboard.node.value, fry.keyboard.CONTROL_CODE | fry.keyboard.PASTE);
					fry.keyboard.clipboard.node.blur();
					fry.keyboard.paste.was = false;
				}, 20);
			}
			return;
		}
		return fry.keyboard.press[react_as](evt || event);
	}
	if ($__tune.isIE)
	{
		fry.keyboard.prepareClipboard();
		fry.keyboard.clipboard.ie = {node:$().a($$('textarea')).pos(true).x(-2000).y(document.documentElement.scrollTop).w(20).h(20).e('paste', function(evt)
		{
			if (fry.keyboard.stopped)
			{
				return;
			}
			setTimeout(function(){
				fry.keyboard.paste.was = false;
				fry.keyboard.pushKey(fry.keyboard.clipboard.ie.node.value, fry.keyboard.CONTROL_CODE | fry.keyboard.PASTE);
			}, 10);
		}).$};
	}
	if ($__tune.isGecko && $__tune.isMac)
	{
		document.onkeyup = function(evt)
		{
			if (evt.metaKey && !evt.ctrlKey && !evt.altKey && !evt.shiftKey && 65 <= evt.keyCode && 128 >= evt.keyCode)
			{
				fry.keyboard.pushKey(evt.keyCode + 32, fry.keyboard.META_KEY);
				evt.preventDefault();
				return true;
			}
		}
	}
	fry.keyboard.initialized = true;
	fry.keyboard.start();
}

fry.keyboard.start = function()
{
	fry.keyboard.stopped = false;
}

fry.keyboard.stop = function()
{
	fry.keyboard.stopped = true;
}

fry.keyboard.disableTextfieldsEditation = function()
{
	fry.keyboard.allowTextfieldsEditation(true);
}

fry.keyboard.allowTextfieldsEditation = function(disable)
{
	var lst = document.getElementsByTagName('input');
	var n = lst.length;
	for (var i=0; i<n; i++)
	{
		var item = lst.item(i);
		if ('text' == item.type || 'password' == item.type)
		{
			if (disable)
			{
				item.onfocus = null;
				item.onblur = null;
				item.onkeydown = null;
				item.onkeypress = null;
				item.onkeyup = null;
				continue;
			}
			$(item).e('keydown', function(evt){evt.stopPropagation();}).e('keypress', function(evt){evt.stopPropagation();}).e('keyup', function(evt){evt.stopPropagation();});
			item.onfocus = function(evt)
			{
				fry.keyboard.stop();
			}
			item.onblur = function(evt)
			{
				fry.keyboard.start();
			}
		}
	}
	lst = document.getElementsByTagName('textarea');
	var n = lst.length;
	for (var i=0; i<n; i++)
	{
		var item = lst.item(i);
		if (disable)
		{
			item.onfocus = null;
			item.onblur = null;
			item.onkeydown = null;
			item.onkeypress = null;
			item.onkeyup = null;
			continue;
		}
		$(item).e('keydown', function(evt){evt.stopPropagation();}).e('keypress', function(evt){evt.stopPropagation();});
		item.onfocus = function(evt)
		{
			fry.keyboard.stop();
		}
		item.onblur = function(evt)
		{
			fry.keyboard.start();
		}
	}
}

fry.keyboard.prepareClipboard = function()
{
	if (fry.keyboard.clipboard.node)
	{
		return;
	}
	fry.keyboard.clipboard.node = $().a($$('textarea')).w(20).h(20).pos(true).x(-2000).y($__tune.isSafari? document.body.scrollTop : document.documentElement.scrollTop).$;
}

fry.keyboard.shared.copy = function(evt)
{
	fry.keyboard.prepareClipboard();
	// acquiring clipboard content to be copied into system clipboard
	fry.keyboard.clipboard.copiedContent = '';
	if (fry.keyboard.listener)
	{
		var content = fry.keyboard.listener(0, fry.keyboard.CONTROL_CODE | fry.keyboard.SIG_CLIPBOARD_GET);
		if ('string' == typeof content)
		{
			fry.keyboard.clipboard.copiedContent = content;
		}
	}
	fry.keyboard.clipboard.node.value = fry.keyboard.clipboard.copiedContent;
	fry.keyboard.clipboard.node.select();
	fry.keyboard.clipboard.node.focus();
	setTimeout('fry.keyboard.clipboard.node.blur()', 200);
	fry.keyboard.clipboard.content = fry.keyboard.clipboard.copiedContent;
	fry.keyboard.ignore_further_events = true;
	// sending control code
	fry.keyboard.pushKey(0, fry.keyboard.CONTROL_CODE | (88 == evt.keyCode ? fry.keyboard.CUT : fry.keyboard.COPY));
	return false;
}

fry.keyboard.paste.ff_win = function(evt)
{
	return 86 == evt.keyCode && 0 == evt.charCode && 86 == evt.which && evt.ctrlKey;
}

fry.keyboard.down.ff_win = function(evt)
{
	fry.keyboard.last_down_evt = evt;
	return true;
}

fry.keyboard.press.ff_win = function(evt)
{
	if (null != fry.keyboard.last_down_evt)
	{
		var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
		var code = !evt.keyCode ? evt.charCode : evt.keyCode;
		if (evt.keyCode == evt.charCode && evt.keyCode == fry.keyboard.last_down_evt.charCode)
		{
			code = fry.keyboard.last_down_evt.keyCode;
		}
		if (evt.keyCode == fry.keyboard.last_down_evt.keyCode && (0 == evt.which || 32 > evt.keyCode))
		{
			// control code
			mask++;
		}
		if (!fry.keyboard.pushKey(code, mask))
		{
			return true;
		}
	}
	evt.preventDefault();
	evt.stopPropagation();
	return false;
}

fry.keyboard.paste.ff_mac = function(evt)
{
	fry.keyboard.last_down_evt = null;
	// catching Command+C, Command+X, it's a FF.mac hack
	if (evt.metaKey && ((67 == evt.keyCode && 0 == evt.charCode && 67 == evt.which) || (88 == evt.keyCode && 0 == evt.charCode && 88 == evt.which)))
	{
		return fry.keyboard.shared.copy(evt);
	}
	else
	{
    	return 86 == evt.keyCode && 0 == evt.charCode && 86 == evt.which && evt.metaKey;
	}
}

fry.keyboard.down.ff_mac = function(evt)
{
	return false;
}

fry.keyboard.press.ff_mac = function(evt)
{
	if (null != fry.keyboard.last_down_evt)
	{
		return;
	}
	var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
	if (!evt.charCode || (evt.charCode == evt.keyCode))
	{
		// control code
		fry.keyboard.pushKey(evt.keyCode, 1 + mask);
	}
	else
	{
		if (!fry.keyboard.pushKey(evt.charCode, mask))
		{
			return true;
		}
	}
	evt.preventDefault();
	evt.stopPropagation();
	return false;
}

fry.keyboard.paste.webkit = function(evt)
{
	if ($__tune.isMac)
	{
		return (86 == evt.keyCode && (0 == evt.charCode || 118 == evt.charCode) && evt.metaKey);
	}
	else
	{
		return (86 == evt.keyCode && (0 == evt.charCode || 118 == evt.charCode) && evt.ctrlKey);
	}
}

fry.keyboard.down.webkit = function(evt)
{
	if (0 != evt.keyCode && (48 > evt.keyCode || (111 < evt.keyCode && 128 > evt.keyCode) || 60000 < evt.charCode))
	{
		var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
		if (!evt.charCode || 111 < evt.keyCode || 32 > evt.charCode || 60000 < evt.charCode)
		{
			// control code
			fry.keyboard.pushKey(evt.keyCode, 1 + mask);
		}
		else
		{
			if (!fry.keyboard.pushKey(evt.charCode, mask))
			{
				return true;
			}
		}
		evt.preventDefault();
		evt.stopPropagation();
		fry.keyboard.last_down_evt = null;
		return false;
	}
	fry.keyboard.last_down_evt = evt;
	return true;
}

fry.keyboard.press.webkit = function(evt)
{
	if (null != fry.keyboard.last_down_evt)
	{
		var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
		var code = !evt.keyCode ? evt.charCode : evt.keyCode;
		if (evt.keyCode == evt.charCode && evt.keyCode == fry.keyboard.last_down_evt.charCode && evt.keyCode > 60000)
		{
			code = fry.keyboard.last_down_evt.keyCode;
		}
		if (evt.keyCode == fry.keyboard.last_down_evt.keyCode && 48 > evt.keyCode)
		{
			// control code
			mask++;
		}
		else
		{
			var r_mask = fry.keyboard.SHIFT_KEY + fry.keyboard.META_KEY;
			if (r_mask == (mask & r_mask) && 97 <= code && 122 >= code)
			{
				code -= 32;
			}
		}
		if (!fry.keyboard.pushKey(code, mask))
		{
			return true;
		}
	}
	evt.preventDefault();
	evt.stopPropagation();
	return false;			
}

fry.keyboard.paste.ie = function(evt)
{
	if (evt.ctrlKey && (67 == evt.keyCode || 88 == evt.keyCode))
	{
		// ctrl+c, ctrl+x
		return fry.keyboard.shared.copy(evt);
	}
	else
	{
    	return false;
	}
}

fry.keyboard.down.ie = function(evt)
{
	fry.keyboard.last_down_evt = evt;
	if (48 > evt.keyCode || (111 < evt.keyCode && 128 > evt.keyCode))
	{
		// control code for IE
		var mask = 1 + (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
		return !fry.keyboard.pushKey(evt.keyCode, mask)
	}
	else
	{
		var code = evt.keyCode;
		// disabling some other keys (A, F, N, R, S, T)
		if (82 == evt.keyCode || 65 == evt.keyCode || 83 == evt.keyCode || 70 == evt.keyCode || 78 == evt.keyCode || 84 == evt.keyCode)
		{
			if (!evt.shiftKey)
			{
				code += 32;
			}
			var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
			return !fry.keyboard.pushKey(code, mask);
		}
	}
	return true;			
}

fry.keyboard.press.ie = function(evt)
{
	if (null != fry.keyboard.last_down_evt)
	{
		var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
		return !fry.keyboard.pushKey(evt.keyCode, mask);
	}
	return false;			
}


fry.keyboard.paste.opera = function(evt)
{
	return 86 == evt.keyCode && 86 == evt.which && evt.ctrlKey;
}

fry.keyboard.down.opera = function(evt)
{
	fry.keyboard.last_down_evt = evt;
	return false;
}

fry.keyboard.press.opera = function(evt)
{
	var e = fry.keyboard.last_down_evt;
	var mask = (evt.altKey ? 2 : 0) + (evt.ctrlKey ? 4 : 0) + (evt.shiftKey ? 8 : 0) + (evt.metaKey ? 16 : 0);
	var prev_mask = (e.altKey ? 2 : 0) + (e.ctrlKey ? 4 : 0) + (e.shiftKey ? 8 : 0) + (e.metaKey ? 16 : 0);
	if ((evt.keyCode == fry.keyboard.last_down_evt.keyCode || 0 == e.keyCode) && (0 == evt.which || 48 > e.keyCode || 111 < e.keyCode))
	{
		mask++;
	}
	if (!fry.keyboard.pushKey(evt.keyCode, mask))
	{
		return true;
	}
	evt.preventDefault();
	evt.stopPropagation();
	return false;
}

fry.keyboard.addListener = function(listener)
{
	fry.keyboard.listener = listener;
}

fry.keyboard.removeListener = function(listener)
{
    fry.keyboard.listener = null;
}


fry.keyboard.pushKey = function(code, mask)
{
	if (32 == code)
	{
		mask = mask & 65534;
	}
	var was_clipboard_copy = false;
	var was_clipboard_cut = false;
	if ($__tune.isMac)
	{
		was_clipboard_copy = (99 == code) && (fry.keyboard.META_KEY == (mask & fry.keyboard.META_KEY));
		was_clipboard_cut = (120 == code) && (fry.keyboard.META_KEY == (mask & fry.keyboard.META_KEY));
	}
	else
	{
		was_clipboard_copy = (1 == code || 99 == code) && (fry.keyboard.CTRL_KEY == (mask & fry.keyboard.CTRL_KEY));
		was_clipboard_cut = (24 == code || 120 == code) && (fry.keyboard.CTRL_KEY == (mask & fry.keyboard.CTRL_KEY));
	}
	if (was_clipboard_copy || was_clipboard_cut)
	{
		fry.keyboard.prepareClipboard();
		fry.keyboard.clipboard.copiedContent = '';
		var was_custom_content = false;
		if (fry.keyboard.listener)
		{
			var content = fry.keyboard.listener(0, fry.keyboard.CONTROL_CODE | fry.keyboard.SIG_CLIPBOARD_GET);
			if ('string' == typeof content)
			{
				was_custom_content = true;
				fry.keyboard.clipboard.copiedContent = content;
			}
		}
		if (was_custom_content)
		{
			fry.keyboard.clipboard.node.value = fry.keyboard.clipboard.copiedContent;
			fry.keyboard.clipboard.node.select();
			fry.keyboard.clipboard.node.focus();
		}
		fry.keyboard.pushKey(0, fry.keyboard.CONTROL_CODE | (was_clipboard_cut ? fry.keyboard.CUT : fry.keyboard.COPY));
		fry.keyboard.clipboard.content = fry.keyboard.clipboard.copiedContent;
		// returning false will enforce propagation
		return !was_custom_content;
	}
	if (fry.keyboard.PASTE == (mask & fry.keyboard.PASTE))
	{
		fry.keyboard.clipboard.pastedContent = code;
		fry.keyboard.clipboard.content = fry.keyboard.clipboard.pastedContent;
		code = 0;
	}
	// filtering out solo-keys Ctrl, Shift, Alt that are triggered by some browsers.
	if ((17 == code && 5 == (mask & 5)) || (16 == code && 9 == (mask & 9)) || (18 == code && 3 == (mask & 3)))
	{
		return true;
	}
	// filtering out Command+V on FF.mac
	if (118 == code && 16 == mask)
	{
		return true;
	}
	if (fry.keyboard.listener)
	{
        // console.info(code);
	    if (13 != code && 0 != (mask & (fry.keyboard.CONTROL_CODE + fry.keyboard.META_KEY + fry.keyboard.CTRL_KEY)))
	    {
	        // some keystroke occured that we really want to know about the listener result, we have to call it immediatelly
			return fry.keyboard.listener(code, mask);
	    }
	    else
	    {
	        // let's ease the pain of the browser
            setTimeout('fry.keyboard.listener('+code+','+mask+')', 10);
	    }
	}
	else
	{
		fry.keyboard.buffer.unshift([code, mask]);
	}
	return true;
}

fry.keyboard.popKey = function()
{
	return fry.keyboard.buffer.pop();
}

fry.keyboard.getClipboardContent = function()
{
	return fry.keyboard.clipboard.content;
}


/*--------*/
var client = {conf:{fry:{backendURL:''}}};
var eamy = 
{
	snippets:[],
	instances:[]
};

/*
 * ac.Chap - Text Editing Component - Core
 */

if ( 'undefined' == typeof ac )
{
	var ac = {chap:{}};
}

ac.chap = 
{
	state:
	{
		active:null
	},

	TOKEN_MULTIROW_COMMENT:0,
	TOKEN_SINGLEROW_COMMENT:1,
	TOKEN_SINGLE_QUOTED:2,
	TOKEN_DOUBLE_QUOTED:3,
	TOKEN_NEWROW:4,
	TOKEN_WHITESPACE:5,
	
	ROWSTATE_NONE:0,
	ROWSTATE_FOLD_START:1,
	ROWSTATE_FOLD_STOP:2,
	ROWSTATE_FOLD_EXPAND:4,
	ROWSTATE_FOLD_COLLAPSED:8,
	ROWSTATE_SELECTION:16,
	ROWSTATE_BOOKMARK:32,
	
	CHUNK_KEYWORD:4,
	CHUNK_NUMBER:5,
	CHUNK_OPERATOR:6,
	CHUNK_PARENTHESIS:7,
	CHUNK_KEYWORD_CUSTOM:8,
	CHUNK_FUNCTION_NAME:9,
	CHUNK_LIBRARY:10,
	CHUNK_LIBRARY_CUSTOM:11,
	
	ACTION_CARET:1,
	ACTION_SELECTION:2,
	ACTION_INSERT:3,
	ACTION_UPDATE:4,
	ACTION_DELETE:5,
	ACTION_CLIPBOARD:6,
	ACTION_UNDO:7,
	ACTION_REDO:8,
	ACTION_CUSTOM:9,
	
	ACTION_RES_REDRAWCARET:1,
	ACTION_RES_REDRAWTEXT:2,
	ACTION_RES_SELECTIONCHANGED:4,
	ACTION_RES_SCROLLTOCARET:8,
	
	CKEY_NONE:0,
	CKEY_ALT:2,
	CKEY_CTRL:4,
	CKEY_SHIFT:8,
	CKEY_META:16,
	
	TRANSLOG_TYPE_INSERT:1,
	TRANSLOG_TYPE_REMOVE:2,
	
	ACTION_LISTENER_BEFORE:1,
	ACTION_LISTENER_AFTER:2,
	ACTION_LISTENER_BOTH:3
	
}



ac.chap.activeComponent = null;
ac.chap.instanceId = 1;

ac.chap.getActiveComponent = function()
{
	return ac.chap.activeComponent;
}

ac.chap.setActiveComponent = function(component)
{
	fry.keyboard.initialize();
	if (null != ac.chap.activeComponent)
	{
		ac.chap.activeComponent.blur();
	}
	ac.chap.activeComponent = component;
	if (null != component)
	{
		if (ac.widget)
		{
			ac.widget.focus(component);
		}
		ac.chap.activeComponent.focus();
	}
	else
	{
		if (!ac.widget)
		{
			fry.keyboard.stop();
		}
	}
}

ac.chap.route = function(type, windowId, viewIndex, pars)
{
	if ( null == ac.chap.activeComponent )
	{
		return;
	}
	if ( 'undefined' == typeof ac.chap.activeComponent.views[viewIndex] )
	{
		return;
	}
	switch ( type )
	{
		case 'expand-folding':
		{
			ac.chap.activeComponent.expandFolding(pars);
		}
	}
}

ac.chap.caretThread = setInterval(function()
{
	if (null != ac.chap.activeComponent)
	{
		ac.chap.activeComponent.showCaret(true, true);
	}
}, 600);

$(document.documentElement).e($__tune.isSafari2?'mousedown':'click', function(evt)
{
	var elem = evt.$.$;
	while ( null != elem && document.documentElement != elem )
	{
		if ( 'true' == elem.getAttribute('chap-view') )
		{
			evt.stop();
			return;
		}
		elem = elem.parentNode;
	}
	ac.chap.setActiveComponent(null);
});


ac.chap.keyboardListener = function(code, mask)
{
	if (null == ac.chap.activeComponent)
	{
		return;
	}
	return ac.chap.activeComponent.standaloneKeyboardListener(code, mask);
}
if ('undefined' == typeof ac['widget'])
{
	// chap is not a part of Fry MVC, must handle keyboardListener itself
	fry.keyboard.addListener(ac.chap.keyboardListener);
}

$class('ac.chap.Window',
{
	construct:function(options, userId)
	{
		this.instanceId = ac.chap.instanceId++;
		this.ident = 'ac-chap-' + this.instanceId;
		this.userId = userId | 0;
		this.caret = null;
		this.options = null;
		this.state = null;
		
		this.views = [];
		this.activeView = null;
		this.viewLayoutNodes = [];

		this.char_map = [];
		this.row_id_map = [];
		this.syntax_map = [];
		this.style_map = [];

		this.row_id_sequence = 1;
		
		this.language = null;
		this.keymap = null;
		this.snippets = [];
		this.commands = [];
		
		this.selection = null;
		this.transaction_log = [];
		this.redo_log = [];
		
		this.setOptions(options||{});
		this.setState();
	},
	destruct:function()
	{
	    $delete(this.state);
	    $delete(this.options);
	    $delete(this.char_map);
	    $delete(this.row_id_map);
	    $delete(this.syntax_map);
	    $delete(this.style_map);
		this.hide();
	    $delete(this.activeView);
	}
});

ac.chap.Window.prototype.focus = function()
{
	this.showCaret();
}

ac.chap.Window.prototype.blur = function()
{
	this.hideCaret();
}

// compatibility layer with AC Fry Widget library
ac.chap.Window.prototype.onFocus = function()
{
	ac.chap.setActiveComponent(this);
	this.focus();
}

ac.chap.Window.prototype.onBlur = function()
{
	ac.chap.setActiveComponent(null);
	this.blur();
}

ac.chap.Window.prototype.onResize = function(width, height)
{
}

ac.chap.Window.prototype.onSystemClipboardCopy = function()
{
	return this.getSelection();
}

ac.chap.Window.prototype.onSystemClipboardCut = function()
{
	this.runAction(ac.chap.ACTION_CLIPBOARD, {cut:true});
	return this.processActionResult(true, true);
}

ac.chap.Window.prototype.onSystemClipboardPaste = function(content)
{
	this.runAction(ac.chap.ACTION_CLIPBOARD, {paste:true, content:content});
	return this.processActionResult(true, true);
}

ac.chap.Window.prototype.hasKeyboardListenerActive = function()
{
	return true;
}
ac.chap.Window.prototype.onCut = function(selection, callbackOk)
{
}

ac.chap.Window.prototype.onPaste = function(selection, wasCut)
{
}

ac.chap.Window.prototype.setOptions = function(options)
{
	this.options = 
	{
		initialCaretPosition:[0,0],
		tokenizerLazyLaunch:900,
		syntaxHighlightingEnabled:true,
		remoteBackendURL:'',
		font:{
			size:11,
			family: $__tune.isMac ? "Consolas, 'Bitstream Vera Sans mono', 'Courier', 'Monaco', monospaced" : "Consolas, 'Courier New', 'Courier', monospaced",
			allowedSizes: [8, 9, 10, 11, 12, 13, 14, 17, 21, 24, 27, 30, 34, 38, 42]
		}
	};
	if ( $isset(options.initial_caret_position) )
	{
		this.options.initialCaretPosition = [options.initial_caret_position[0], options.initial_caret_position[1]];
	}
	if ( $isset(options.language) )
	{
		this.language = $new(options.language);
	}
	else
	{
		this.language = $new(ac.chap.Language);
	}
	if ( $isset(options.keymap) )
	{
		this.keymap = $new(options.keymap);
	}
	else
	{
		this.keymap = $new(ac.chap.KeyMap);
	}
	if ( $isset(options.syntaxHighlightingEnabled) )
	{
		this.options.syntaxHighlightingEnabled = options.syntaxHighlightingEnabled;
	}
	if ( $isset(options.remoteBackendURL) )
	{
		this.options.remoteBackendURL = options.remoteBackendURL;
	}
	else
	{
	    if ( client && client.conf && client.conf.fry )
	    {
	        this.options.remoteBackendURL = client.conf.fry.backendURL;
	    }
	}
	if ($isset(options.font))
	{
		if ($isset(options.font['size']))
		{
			this.options.font.size = options.font.size;			
		}
		if ($isset(options.font['family']))
		{
			this.options.font.family = options.font.family;
		}
	}
}

ac.chap.Window.prototype.setState = function()
{
	this.state =
	{
		lastKeyTimePressed:0,
		caretPhase:1,
		lastKeyCode:0,
		lastControlKey:0,
		lastCaretPosition:[],
		tokenizerTimer:null,
		scheduledTokenizerTime:0,
		transactionLogStopped:false,
		actionListeners:[],
		actionListenersStopped:false,
		caretListener:null,
		commandListener:null,
		transactionListener:[null,800],
		passThroughKeysListener:null
	}
	this.caret = 
	{
		position:[this.options.initialCaretPosition[0], this.options.initialCaretPosition[1]],
		mode:1 // 1 normal, 2 overwrite
	}
}

ac.chap.Window.prototype.addView = function(layoutNode, options, renderAfter)
{
	var view_index = this.views.length;
	this.viewLayoutNodes.push(layoutNode);
	this.views.push($new(ac.chap.View, this, view_index, options||{}));
	this.row_id_map[view_index] = [];
	if ( 0 < view_index )
	{
//		console.log(view_index);
		// creating duplicate
		var n = this.row_id_map[0].length;
		for ( var i=0; i<n; i++ )
		{
			var row = this.row_id_map[0][i];
			this.row_id_map[view_index][i] = [row[0], false, row[2], [], [], []];
		}
		//this.row_id_map[view_index] = [].concat(this.row_id_map[0].slice(0));
	}
	if ( renderAfter )
	{
		this.views[view_index].recalculateVisibleRows();
		this.views[view_index].render(this.viewLayoutNodes[view_index]);
		this.tokenize(0);
		this.renderText();
	}
//	console.log('%o', this.row_id_map[view_index]);
	return view_index;
}

ac.chap.Window.prototype.resizeView = function(viewIndex)
{
	if ( this.views[viewIndex] )
	{
		this.views[viewIndex].resize();
	}
}

ac.chap.Window.prototype.edit = function(text, setAsActive)
{
	this.char_map = [];
	for ( var i=0; i<this.views.length; i++ )
	{
//		this.row_id_map.push([]);
	}
	this.syntax_map = [];
	this.style_map = [];
	this.row_id_sequence = 1;
	this.transaction_log = [];
	this.redo_log = [];
	
	this.insertIntoCharacterMap(text, 0, 0);
	this.tokenize(0);
	this.renderText();
	setAsActive = setAsActive || true;
	if ( setAsActive )
	{
		ac.chap.setActiveComponent(this);
		if (0 < this.views.length)
		{
			this.activeView = this.views[0];
		}
	}
}

ac.chap.Window.prototype.hide = function()
{
	this.hideCaret();
	var n = this.views.length
	for ( var i=0; i<n; i++ )
	{
		this.views[i].hide();
    	$delete(this.views[i]);
	}
	$delete(this.views);
	ac.chap.setActiveComponent(null);
}

ac.chap.Window.prototype.show = function()
{
	this.render();
	ac.chap.setActiveComponent(this);
}

ac.chap.Window.prototype.showInteractiveSearch = function()
{
	if (this.activeView)
	{
		this.activeView.showInteractiveSearch();
	}
}

ac.chap.Window.prototype.hideInteractiveSearch = function()
{
	for (var i=0; i<this.views.length; i++)
	{
		this.views[i].hideInteractiveSearch();
	}
}

ac.chap.Window.prototype.toggleBookmark = function(rowIndex)
{
	var rowIndex = rowIndex || this.caret.position[0];
	for ( var i=0; i<this.views.length; i++ )
	{
		if ( 'undefined' == typeof this.row_id_map[i][rowIndex] )
		{
			return;
		}
		// marking as changed
		this.row_id_map[i][rowIndex][1] = false;
		var row_state = this.row_id_map[i][rowIndex][2];
		if ( ac.chap.ROWSTATE_BOOKMARK == (row_state & ac.chap.ROWSTATE_BOOKMARK) )
		{
			// already bookmarked
			this.row_id_map[i][rowIndex][2] &= (65535-ac.chap.ROWSTATE_BOOKMARK);
		}
		else
		{
			this.row_id_map[i][rowIndex][2] |= ac.chap.ROWSTATE_BOOKMARK;
		}
	}
}

ac.chap.Window.prototype.setRuntimeOption = function(key, value)
{
	var font_sizes = this.options.font.allowedSizes;
	var font_size = this.options.font.size;
	var redraw = false;
	if ('font' == key)
	{
		if ($isset(value['size']))
		{
			if (font_sizes[0] <= value.size && value.size <= font_sizes[font_sizes.length-1])
			{
				font_size = value.size;
				redraw = true;
			}
		}
		if ($isset(value['family']))
		{
			this.options.font.family = value.family;
		}
	}
	else if ('font.size' == key)
	{
		if ('bigger' == value)
		{
			for (var i=0; i<font_sizes.length; i++)
			{
				if (font_size < font_sizes[i])
				{
					font_size = font_sizes[i];
					break;
				}
			}
		}
		else if ('smaller' == value)
		{
			for (var i=font_sizes.length-1; i>= 0; i--)
			{
				if (font_size > font_sizes[i])
				{
					font_size = font_sizes[i];
					break;
				}
			}
		}
		else
		{
			if (font_sizes[0] <= value && value <= font_sizes[font_sizes.length-1])
			{
				font_size = value;
			}
		}
		this.options.font.size = font_size;
		redraw = true;
	}
	else if ('font.family' == key)
	{
		this.options.font.family = value;
		redraw = true;
	}
	else if ('word.wrap' == key)
	{
		if (this.activeView)
		{
			this.hideCaret();
			this.activeView.options.wordWrap = value;
			this.activeView.reloadOptions();
			this.showCaret();
		}
	}
	if (redraw)
	{
		this.hideCaret();
		var num_views = this.views.length;
		for (var i=0; i<num_views; i++)
		{
			this.views[i].reloadOptions();
		}
		this.showCaret();
	}
}

ac.chap.Window.prototype.scrollToBookmark = function(rowIndex, directionOffset)
{
	rowIndex = rowIndex || this.caret.position[0];
	var view = this.activeView;
	if (null == view)
	{
		return;
	}
	var num_rows = this.row_id_map[view.index].length;
	if (0 == num_rows)
	{
		return;
	}
	var start_index = rowIndex + directionOffset;
	if (1 == directionOffset)
	{
		num_rows = num_rows - start_index;
	}
	else
	{
		num_rows = rowIndex;
	}
	if (!this.findAndScrollToBookmark(view, start_index, num_rows, directionOffset))
	{
		// not found, try the other half reversed search
		if (1 == directionOffset)
		{
			start_index = 0;
			num_rows = rowIndex;
		}
		else
		{
			num_rows = this.row_id_map[view.index].length;
			start_index = num_rows - 1;
			num_rows -= rowIndex;
		}
		this.findAndScrollToBookmark(view, start_index, num_rows, directionOffset);
	}
}

ac.chap.Window.prototype.findAndScrollToBookmark = function(view, startIndex, numRowsToSearch, directionOffset)
{
	var i = 0;
	var active_index = startIndex;
	// console.log(startIndex, numRowsToSearch, directionOffset);
	while (i<numRowsToSearch)
	{
		// console.warn(i, active_index);
		var row_state = this.row_id_map[view.index][active_index][2];
		if (ac.chap.ROWSTATE_BOOKMARK == (row_state & ac.chap.ROWSTATE_BOOKMARK))
		{
			// found a bookmark
			view.scrollToRow(active_index, true);
			return true;
		}
		active_index += directionOffset;
		i++;
	}
	return false;
}

ac.chap.Window.prototype.setEditMode = function(mode)
{
	this.caret.mode = mode;
	ac.chap.setActiveComponent(this);
	this.tokenize();
	this.renderText();
}

ac.chap.Window.prototype.setTheme = function(theme)
{
	for ( var i=0; i<this.views.length; i++ )
	{
		this.views[i].setTheme(theme);
	}
}

ac.chap.Window.prototype.setLanguage = function(language)
{
	this.language = $new(language);
	this.tokenize();
	this.foldingize();
	this.renderText();
	this.showCaret();
}

ac.chap.Window.prototype.setSnippets = function(snippets)
{
	this.snippets = snippets;
	this.keymap.importSnippets(snippets);
}

ac.chap.Window.prototype.setCommands = function(commands)
{
	this.commands = commands;
	this.keymap.importCommands(commands);
}

ac.chap.Window.prototype.getTabelator = function(tabelator)
{
	if (0 < this.views.length)
	{
		return this.views[0].options.tabelator;
	}
	return '\t';
}

ac.chap.Window.prototype.setTabelator = function(tabelator)
{
	for ( var i=0; i<this.views.length; i++ )
	{
		this.views[i].options.tabelator = tabelator;
	}
}

ac.chap.Window.prototype.render = function()
{
	for ( var i=0; i<this.views.length; i++ )
	{
		this.views[i].render(this.viewLayoutNodes[i]);
	}
}


ac.chap.Window.prototype.getTimestamp = function()
{
	var d = new Date();
	return 60000*d.getMinutes()+1000*d.getSeconds()+d.getMilliseconds();
}

ac.chap.Window.prototype.keyboardListener = function(code, mask)
{
	var redraw_text = false;
	var redraw_caret = false;
	var scroll_to_caret = false;
	var selection_changed = false;
	this.state.lastKeyTimePressed = new Date().getTime();

	var key_code = code;
	var control_key = mask & 30;
	if (this.state.passThroughKeysListener && this.state.passThroughKeysListener(key_code, control_key))
	{
		return true;
	}
	var definition = $getdef(this.keymap.definition[key_code], this.keymap.definition[0]);
	definition = $getdef(definition[control_key], definition[ac.chap.CKEY_NONE]);
	if ( 'undefined' == typeof definition )
	{
		definition = this.keymap.definition[0][ac.chap.CKEY_NONE];
	}
	if (fry.keyboard.COPY == (mask & fry.keyboard.COPY))
	{
		return true;
	}
	// console.log(code, mask);
    var me = this;
	var num_actions = definition.length;
	for (var i=0; i<num_actions; i+=2)
	{
		var action_type = definition[i];
		var params = definition[i+1];
		params.keyCode = key_code;
		params.controlKey = control_key;
		if (!this.state.actionListenersStopped)
		{
		    var caret_row = this.caret.position[0];
		    var caret_col = this.caret.position[1];
			for (var ii in this.state.actionListeners)
			{
				var listener = this.state.actionListeners[ii];
				if (ac.chap.ACTION_LISTENER_BEFORE == (listener[0] & ac.chap.ACTION_LISTENER_BEFORE))
				{
				    if (!listener[3])
				    {
				        // synchronous
						listener[2](me, listener[1], ac.chap.ACTION_LISTENER_BEFORE, 0, action_type, params, caret_row, caret_col);
				    }
				    else
				    {
				        setTimeout(function(){listener[2](me, listener[1], ac.chap.ACTION_LISTENER_BEFORE, 0, action_type, params, caret_row, caret_col);}, 300);
				    }
				}
			}
		}
		var result = this.runAction(action_type, params);
		if  (!this.state.actionListenersStopped)
		{
		    var caret_row = this.caret.position[0];
		    var caret_col = this.caret.position[1];
			for (var ii in this.state.actionListeners)
			{
				var listener = this.state.actionListeners[ii];
				if (ac.chap.ACTION_LISTENER_AFTER == (listener[0] & ac.chap.ACTION_LISTENER_AFTER))
				{
				    if (!listener[3])
				    {
				        // synchronous
						listener[2](me, listener[1], ac.chap.ACTION_LISTENER_AFTER, result, action_type, params, caret_row, caret_col);
				    }
				    else
				    {
				        setTimeout(function(){listener[2](me, listener[1], ac.chap.ACTION_LISTENER_AFTER, result, action_type, params, caret_row, caret_col);}, 300);						        
				    }
				}
			}
		}
		if (!redraw_caret)
		{
			redraw_caret = ac.chap.ACTION_RES_REDRAWCARET == (result & ac.chap.ACTION_RES_REDRAWCARET);
		}
		if (!redraw_text)
		{
			redraw_text = ac.chap.ACTION_RES_REDRAWTEXT == (result & ac.chap.ACTION_RES_REDRAWTEXT);
		}
		if (!selection_changed)
		{
			selection_changed = ac.chap.ACTION_RES_SELECTIONCHANGED == (result & ac.chap.ACTION_RES_SELECTIONCHANGED);
		}
		if (!scroll_to_caret)
		{
			scroll_to_caret = ac.chap.ACTION_RES_SCROLLTOCARET == (result & ac.chap.ACTION_RES_SCROLLTOCARET);
		}
	}
	if (selection_changed)
	{
		redraw_caret = false;
		this.hideCaret();
	}
	else
	{
		this.state.lastCaretPosition = [this.caret.position[0], this.caret.position[1]];
		if (this.removeSelection())
		{
			redraw_text = true;
			redraw_caret = true;
		}
	}
	this.state.lastKeyCode = key_code;
	this.state.lastControlKey = control_key;
	if (scroll_to_caret)
	{
		// console.log('scroll to caret: '+this.caret.position[0]);
		this.activeView.scrollToRow(this.caret.position[0], false, true);
	}
	this.processActionResult(redraw_text, redraw_caret);
	// disabling further key actions
	return true;
}

// called if chap is not a part of Fry MVC 
ac.chap.Window.prototype.standaloneKeyboardListener = function(code, mask)
{
	if (fry.keyboard.CONTROL_CODE == (mask & fry.keyboard.CONTROL_CODE))
	{
		if (fry.keyboard.PASTE == (mask & fry.keyboard.PASTE))
		{
			// pasted text from clipboard received
			return this.onSystemClipboardPaste(fry.keyboard.getClipboardContent());
		}
		else if (fry.keyboard.CUT == (mask & fry.keyboard.CUT))
		{
			// cut, let's clear selection if it exists
			return this.onSystemClipboardCut();
		}
		else if (fry.keyboard.SIG_CLIPBOARD_GET == (mask & fry.keyboard.SIG_CLIPBOARD_GET))
		{
			// need to return selected content
			return this.onSystemClipboardCopy();
		}
		else
		{
			code = -code;
		}
	}
	return this.keyboardListener(code, mask);
}

ac.chap.Window.prototype.processActionResult = function(redrawText, redrawCaret)
{
	if ( redrawText )
	{
		var t = this.getTimestamp();
		if ( this.state.tokenizerTimer )
		{
			clearTimeout(this.state.tokenizerTimer);
		}
		if  ( this.state.scheduledTokenizerTime < t - this.options.tokenizerLazyLaunch )
		{
//			console.log('Tokenizer launched DIRECTLY at: '+this.getTimestamp());
			this.tokenize(0);
			this.state.scheduledTokenizerTime = this.getTimestamp() + this.options.tokenizerLazyLaunch;
		}
		else
		{
			var me = this;
			this.state.tokenizerTimer = setTimeout(function()
			{
//				console.log('Tokenizer launched at: '+me.getTimestamp());
				me.tokenize(0);
				me.state.scheduledTokenizerTime = me.getTimestamp();
				me.renderText();
				delete me;

			}, this.options.tokenizerLazyLaunch);
		}
		this.renderText();
	}
	if ( redrawCaret )
	{
		this.showCaret();
	}
}

ac.chap.Window.prototype.setUserId = function(userId)
{
    this.userId = userId;
    // console.info('User ID set to: %s', userId);
}

ac.chap.Window.prototype.addCaretListener = function(callback)
{
	this.state.caretListener = callback;
}

ac.chap.Window.prototype.removeCaretListener = function(callback)
{
	this.state.caretListener = null;
}

ac.chap.Window.prototype.addCommandListener = function(callback)
{
    this.state.commandListener = callback;
}

ac.chap.Window.prototype.removeCommandListener = function(callback)
{
    this.state.commandListener = null;
}

ac.chap.Window.prototype.addPassThroughKeysListener = function(callback)
{
	this.state.passThroughKeysListener = callback;
}

ac.chap.Window.prototype.removePassThroughKeysListener = function()
{
	this.state.passThroughKeysListener = null;
}

ac.chap.Window.prototype.addTransactionListener = function(callback, lazyRunMsecs)
{
    this.state.transactionListener = [callback, $getdef(lazyRunMsecs, 800)];
}

ac.chap.Window.prototype.hasTransactionListener = function()
{
	return null != this.state.transactionListener && null != this.state.transactionListener[0];
}

ac.chap.Window.prototype.removeTransactionListener = function(callback)
{
    this.state.transactionListener = null;
}

ac.chap.Window.prototype.addActionListener = function(type, action, callback, asynchronous)
{
	callbackIndex = this.state.actionListeners.length;
	this.state.actionListeners[callbackIndex] = [type, action, callback, asynchronous];
	return callbackIndex;
}

ac.chap.Window.prototype.removeActionListener = function(callbackIndex)
{
	delete this.state.actionListeners[callbackIndex];
}

ac.chap.Window.prototype.stopActionListeners = function()
{
	this.state.actionListenersStopped = true;
}

ac.chap.Window.prototype.startActionListeners = function()
{
	this.state.actionListenersStopped = false;
}

ac.chap.Window.prototype.getVariableValue = function(varName, defaultValue)
{
	var value = '';
	if ( 'CHAP_SELECTED_TEXT' == varName )
	{
		value = this.getSelection();
	}
	else if ( 'CHAP_CLIPBOARD_TEXT' == varName )
	{
		value = fry.keyboard.getClipboardContent();
	}
	else if ( 'CHAP_PREV_WORD' == varName )
	{
		value = this.getWordAt(this.caret.position[0], this.caret.position[1], -1);
	}
	else if ( 'CHAP_NEXT_WORD' == varName )
	{
		value = this.getWordAt(this.caret.position[0], this.caret.position[1], 1);
	}
	else if ( 0 == varName.indexOf('CHAP_WORD') )
	{
		words = [''];
		if ( !isNaN(varName.substr(9)) )
		{
			words = this.getWordAt(this.caret.position[0], this.caret.position[1], parseInt(varName.substr(9)));
			if ( 'string' == typeof words )
			{
				words = [words];
			}
		}
		value = words[words.length-1];
	}
	if ( '' == value || null == value )
	{
		value = defaultValue || '';
	}
	return value;
}

ac.chap.Window.prototype.runCommand = function(keyCode, controlKeysMask, caretRow, caretCol, command, params)
{
    if ( null == this.state.commandListener )
    {
        console.warn('There is no command listener defined.');
        return 0;
    }
    return this.state.commandListener(this, keyCode, controlKeysMask, caretRow, caretCol, command, params);
}

ac.chap.Window.prototype.runAction = function(actionType, params)
{
	var caret_row = this.caret.position[0];
	var caret_col = this.caret.position[1];
	var key_code = params.keyCode;
	var control_key = params.controlKey;
//	console.log('action_type:%s, params:%o', actionType, params);
	
	switch ( actionType )
	{
		case ac.chap.ACTION_CARET:
		{
			if ( $isset(params.store) )
			{
				this.state.lastCaretPosition = [caret_row, caret_col];
			}
			else if ( $isset(params.move) )
			{
				var direction = params.move;
				if ( 'left' == direction )
				{
					if ( 0 < caret_col )
					{
						caret_col--;
					}
					else
					{
						if ( 0 < caret_row )
						{
							caret_row--;
							caret_col = this.char_map[caret_row].length;
						}
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'right' == direction )
				{
					if ( this.char_map[caret_row].length > caret_col )
					{
						caret_col++;
					}
					else
					{
						if ( 'undefined' != typeof this.char_map[caret_row+1] )
						{
							caret_row++;
							caret_col = 0;
						}
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'up' == direction )
				{
					if ( 0 < caret_row )
					{
						var move_end = this.char_map[caret_row].length == caret_col;
						if ( move_end )
						{
							caret_col = this.char_map[caret_row-1].length;
						}
						else
						{
							caret_col = Math.min(this.char_map[caret_row-1].length, caret_col);
						}
						this.setCaretPosition(caret_row-1, caret_col);
						return ac.chap.ACTION_RES_REDRAWCARET;
					}
				}
				else if ( 'down' == direction )
				{
					if ( 'undefined' != typeof this.char_map[caret_row+1] )
					{
						var move_end = this.char_map[caret_row].length == caret_col;
						if ( move_end )
						{
							caret_col = this.char_map[caret_row+1].length;
						}
						else
						{
							caret_col = Math.min(this.char_map[caret_row+1].length, caret_col);
						}
						this.setCaretPosition(caret_row+1, caret_col);
						return ac.chap.ACTION_RES_REDRAWCARET;
					}					
				}
				else if ( 'prev_word' == direction )
				{
					if ( 0 < caret_col )
					{
						var ch = this.char_map[caret_row].charAt(caret_col-1);
						var re = this.language.wordDelimiter;
						var look_for_wch = re.test(ch);
						while ( 0 != caret_col )
						{
							ch = this.char_map[caret_row].charAt(caret_col-1);
							if ( look_for_wch != re.test(ch) )
							{
								break;
							}
							caret_col--;
						}
					}
					else
					{
						if ( 0 < caret_row )
						{
							caret_row--;
							caret_col = this.char_map[caret_row].length;
						}
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;					
				}
				else if ( 'next_word' == direction )
				{
					if ( this.char_map[caret_row].length > caret_col )
					{
						var ch = this.char_map[caret_row].charAt(caret_col);
						var re = this.language.wordDelimiter;
						var look_for_wch = re.test(ch);
						while ( this.char_map[caret_row].length > caret_col )
						{
							ch = this.char_map[caret_row].charAt(caret_col);
							if ( look_for_wch != re.test(ch) )
							{
								break;
							}
							caret_col++;
						}
					}
					else
					{
						if ( 'undefined' != typeof this.char_map[caret_row+1] )
						{
							caret_row++;
							caret_col = 0;
						}
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'prev_regexp' == direction )
				{
					if ( 0 < caret_col )
					{
						var row = this.char_map[caret_row].substring(0, caret_col);
						var re = new RegExp(params['re'].replace('|', '\\'));
						var matches = re.exec(row);
						if (0 == matches.length)
						{
							console.warning('Invalid RE definition for `prev_regexp\' direction in ACTION_CARET.move action in keymap.');
							caret_col--;
						}
						else
						{
							caret_col -= matches[0].length + 1;
						}
					}
					else
					{
						if ( 0 < caret_row )
						{
							caret_row--;
							caret_col = this.char_map[caret_row].length;
						}
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'next_regexp' == direction )
				{
					if ( this.char_map[caret_row].length > caret_col )
					{
						var row = this.char_map[caret_row].substr(caret_col + 1);
						var re = new RegExp(params['re'].replace('|', '\\'));
						var matches = re.exec(row);
						if (0 == matches.length)
						{
							console.warning('Invalid RE definition for `next_regexp\' direction in ACTION_CARET.move action in keymap.');
							caret_col++;
						}
						else
						{
							caret_col += matches[0].length + 1;
						}
					}
					else
					{
						if ( 'undefined' != typeof this.char_map[caret_row+1] )
						{
							caret_row++;
							caret_col = 0;
						}
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'row_start' == direction )
				{
					if ( 0 < caret_col )
					{
						caret_col = 0;
						this.setCaretPosition(caret_row, caret_col);				
						return ac.chap.ACTION_RES_REDRAWCARET;
					}
				}
				else if ( 'row_end' == direction )
				{
					if ( this.char_map[caret_row].length > caret_col )
					{
						caret_col = this.char_map[caret_row].length;
						this.setCaretPosition(caret_row, caret_col);				
						return ac.chap.ACTION_RES_REDRAWCARET;
					}
				}
				else if ( 'page_up' == direction )
				{
					if (this.activeView)
					{
						var row = caret_row - this.activeView.numRows;
						if (0 > row)
						{
							row = 0;
						}
						this.setCaretPosition(row, 0 != caret_col ? this.char_map[row].length : 0);
						return ac.chap.ACTION_RES_REDRAWCARET;
					}
					return 0;
				}
				else if ( 'page_down' == direction )
				{
					if (this.activeView)
					{
						var row = caret_row + this.activeView.numRows;
						if (this.char_map.length <= row)
						{
							row = this.char_map.length-1;
						}
						this.setCaretPosition(row, 0 != caret_col ? this.char_map[row].length : 0);
						return ac.chap.ACTION_RES_REDRAWCARET;
					}
					return 0;
				}
				else if ( 'doc_start' == direction )
				{
					this.setCaretPosition(0,0);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'doc_end' == direction )
				{
					var last_index = this.char_map.length-1
					this.setCaretPosition(last_index, this.char_map[last_index].length-1);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
			}
			else if ( $isset(params.moveBy) )
			{
				var offset = params.moveBy;
				if ( 'column' == offset )
				{
					//move by params.value columns, newlines are counted as column, params.value may be negative indication caret moving to the left
					if ( 0 < params.value )
					{
						var range_source = (this.char_map[caret_row].substr(caret_col)+'\n'+this.char_map.slice(caret_row+1).join('\n')).substr(0, params.value);
						range_source = range_source.split('\n');
						caret_row += range_source.length-1;
						caret_col = range_source[range_source.length-1].length + (1==range_source.length ? caret_col : 0);
					}
					else
					{
						var range_source = (this.char_map.slice(0, caret_row).join('\n')+'\n'+this.char_map[caret_row].substr(0, caret_col));
						range_source = range_source.substr(range_source.length+params.value);
						range_source = range_source.split('\n');
						caret_row -= (range_source.length-1);
						caret_col = (1==range_source.length ? caret_col : this.char_map[caret_row].length) - range_source[0].length;
					}
					this.setCaretPosition(caret_row, caret_col);
					return ac.chap.ACTION_RES_REDRAWCARET;
				}
				else if ( 'row' == offset )
				{
					// move by params.value rows
				}
				else if ( 'page' == offset )
				{
					// move by params.value pages
				}
			}
			else if ( $isset(params.moveTo) )
			{
				// move to params.moveTo[0], params.moveTo[1]
				this.setCaretPosition(params.moveTo[0], params.moveTo[1]);
				return ac.chap.ACTION_RES_REDRAWCARET;
			}
		};break;
		case ac.chap.ACTION_SELECTION:
		{
			if ( $isset(params.remove) )
			{
				var changed = this.removeSelection();
				return ac.chap.ACTION_RES_REDRAWCARET | (changed ? ac.chap.ACTION_RES_REDRAWTEXT : 0);
			}
			else if ( $isset(params.add) )
			{
				this.addSelection([caret_row, caret_col], this.state.lastCaretPosition);
				this.renderSelection();
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_SELECTIONCHANGED;
			}
			else if ( $isset(params.all) )
			{
				$__tune.behavior.clearSelection();
				this.addAllSelection();
				this.renderSelection();
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_SELECTIONCHANGED;
			}
		};break;
		case ac.chap.ACTION_INSERT:
		{
			var str = null;
			if ( $isset(params.row) )
			{
				var ins_content = '\n';
				caret_col = 0;
				// if ( 0 < caret_row )
				// {
				// 	// indenting by previous row
				// 	var t = this.char_map[caret_row];
				// 	var n = t.length;
				// 	var re = this.language.indentIgnoreMarker;
				// 	while ( caret_col<n )
				// 	{
				// 		var ch = t.charAt(caret_col);
				// 		if ( !re.test(ch) )
				// 		{
				// 			break;
				// 		}
				// 		caret_col++;
				// 	}
				// 	ins_content += t.substr(0, caret_col);
				// }
				this.insertIntoCharacterMap(ins_content);
				this.setCaretPosition(caret_row+1, caret_col);
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;				
			}
			else if ( $isset(params.character) )
			{
				if ( 31 < key_code || -9 == key_code )
				{
					// getting string character
					str = -9 == key_code ? '\t' : String.fromCharCode(key_code);
				}
			}
			else if ( $isset(params.string) )
			{
				str = params.string;
			}
			// inserting string if specified
			if ( null != str )
			{
				if ( null != this.selection )
				{
					// inserting into selection, first, let's remove selected chunk
					var range_from = [this.selection.startPosition[0], this.selection.startPosition[1]];
					var range_to = [this.selection.endPosition[0], this.selection.endPosition[1]];
					var switched = false;
					if ( (range_to[0] < range_from[0]) || (range_to[0] == range_from[0] && range_to[1] < range_from[1]) )
					{
						var r = range_from;
						range_from = range_to;
						range_to = r;
						switched = true;
					}
					this.removeFromCharacterMap(range_from[0], range_from[1]+(switched?0:0), range_to[0], range_to[1]+(switched?0:1));
					this.setCaretPosition(range_from[0], range_from[1]);
					caret_row = range_from[0];
//					caret_col = range_from[1] - str.length + 1;
					caret_col = range_from[1];
					this.removeSelection();
				}
				else if ( 2 == this.caret.mode )
				{
					this.removeFromCharacterMap(caret_row, caret_col);
				}
				// console.log('inserting: `%s`', str.replace(/\n/g, '$'));
				this.insertIntoCharacterMap(str);
				if ( !params.skipCaretChange )
				{
					if ( -1 == str.indexOf('\n') )
					{
						caret_col += str.length;					
					}
					else
					{
						caret_row += str.length - str.replace(/\n/g, '').length;
						caret_col = str.length - str.lastIndexOf('\n') - 1;					
					}
					this.setCaretPosition(caret_row, caret_col);					
				}
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
			}			
		};break;
		case ac.chap.ACTION_UPDATE:
		{
			
		};break;
		case ac.chap.ACTION_DELETE:
		{
			if ( $isset(params.row) )
			{
				if (this.getNumRows() == caret_row+1)
				{
					if (0 == caret_row)
					{
						this.removeFromCharacterMap(caret_row, 0, caret_row, this.char_map[caret_row].length);
						this.setCaretPosition(0, 0);
					}
					else
					{
						this.removeFromCharacterMap(caret_row-1, this.char_map[caret_row-1].length, caret_row, this.char_map[caret_row].length);
						this.setCaretPosition(caret_row-1, this.char_map[caret_row-1].length);						
					}
				}
				else
				{
					this.removeFromCharacterMap(caret_row, 0, caret_row+1, 0);
				}
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
			}
			else if ( $isset(params.character) )
			{
				var after_caret = !params.character;
				var proceed_delete = true;
				if ( null != this.selection )
				{
					// removing selection
					var range_from = [this.selection.startPosition[0], this.selection.startPosition[1]];
					var range_to = [this.selection.endPosition[0], this.selection.endPosition[1]];
//					var range_to = [caret_row, caret_col];
					var switched = false;
					if ( (range_to[0] < range_from[0]) || (range_to[0] == range_from[0] && range_to[1] < range_from[1]) )
					{
						var r = range_from;
						range_from = range_to;
						range_to = r;
						switched = true;
					}
					this.removeFromCharacterMap(range_from[0], range_from[1], range_to[0], range_to[1]+(switched?0:1));
					caret_row = range_from[0];
					caret_col = range_from[1]+(after_caret?0:1);
					this.removeSelection();
				}
				else
				{
					var range_from = [caret_row, caret_col];
					var range_to = [caret_row, caret_col];
					if ( after_caret )
					{
						if ( caret_col == this.char_map[range_from[0]].length )
						{
							if ( this.char_map.length-1 == caret_row )
							{
								proceed_delete = false;
							}
							else
							{
								range_to[0]++;
								range_to[1] = 0;
							}
						}
						else
						{
							range_to[1]++;
						}
					}
					else
					{
						if ( 0 == caret_col )
						{
							if ( 0 == caret_row )
							{
								proceed_delete = false;
							}
							else
							{
								range_from[0]--;
								range_from[1] = this.char_map[range_from[0]].length;
							}
						}
						else
						{
							range_from[1]--;
						}
						caret_row = range_from[0];
						caret_col = range_from[1]+1;
					}
					if ( proceed_delete )
					{
//						console.log('%o - %o', range_from, range_to);
						this.removeFromCharacterMap(range_from[0], range_from[1], range_to[0], range_to[1]);
						this.removeSelection();
					}
				}
				if ( proceed_delete )
				{
					this.setCaretPosition(caret_row, caret_col-(after_caret?0:1));
					return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;				
				}
			}
		};break;
		case ac.chap.ACTION_CLIPBOARD:
		{
			if ( $isset(params.cut) )
			{
				if (null != this.selection)
				{
					return this.runAction(ac.chap.ACTION_DELETE, {character:true});
				}
			}
			else if ( $isset(params.paste) )
			{
				this.runAction(ac.chap.ACTION_INSERT, {string:params.content})
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;					
			}
		};break;
		case ac.chap.ACTION_UNDO:
		{
			//console.log('UNDO');
			var num_trecords = this.transaction_log.length;
			if ( 3 < num_trecords ) // ignoring first operation since it's the original source inserted using edit() method
			{
				var operation_type = this.transaction_log[num_trecords-3];
				var params = this.transaction_log[num_trecords-2];
				var source = this.transaction_log[num_trecords-1];
				if ( ac.chap.TRANSLOG_TYPE_INSERT == operation_type )
				{
					var range_from = [params[0], params[1]];
					var range_to = [params[0], params[1]];
					range_to[0] += (source.length - source.replace(/\n/g, '').length);
					var ix = source.lastIndexOf('\n');
					range_to[1] = -1 == ix ? (range_from[1]+source.length) : (source.length - ix);
					
//					this.removeFromCharacterMap(range_from[0], range_from[1], range_to[0], range_to[1], this.redo_log);
					this.removeFromCharacterMap(range_from[0], range_from[1], range_to[0], range_to[1]);//, this.redo_log);
					caret_row = range_from[0];
					caret_col = range_from[1];
					
				}
				else if ( ac.chap.TRANSLOG_TYPE_REMOVE == operation_type )
				{
					this.insertIntoCharacterMap(source, params[0], params[1]);
					caret_row = params[2];
					caret_col = params[3];
				}
				this.setCaretPosition(caret_row, caret_col);
				this.removeSelection();
				
				this.redo_log = [].concat(this.redo_log, this.transaction_log.slice(num_trecords-3, num_trecords));
				this.transaction_log = [].concat(this.transaction_log.slice(0, num_trecords-3));

				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
			}
		};break;
		case ac.chap.ACTION_REDO:
		{
			var num_trecords = this.redo_log.length;
			if ( 0 < num_trecords )
			{
				var operation_type = this.redo_log[num_trecords-3];
				var params = this.redo_log[num_trecords-2];
				var source = this.redo_log[num_trecords-1];
				this.redo_log = [].concat(this.redo_log.slice(0, num_trecords-3));
				if ( ac.chap.TRANSLOG_TYPE_REMOVE == operation_type )
				{
					this.removeFromCharacterMap(params[0], params[1], params[2], params[3]);
					caret_row = params[0];
					caret_col = params[1];

					this.setCaretPosition(caret_row, caret_col);
					this.removeSelection();
				}
				else if ( ac.chap.TRANSLOG_TYPE_INSERT == operation_type )
				{
					this.runAction(ac.chap.ACTION_INSERT, {string:source});
				}
				return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
			}
		};break;
		case ac.chap.ACTION_CUSTOM:
		{
			var action_name = 'action_?'.embed($getdef(params.action, 'NotDefined'));
			if ( !this.keymap[action_name] )
			{
				console.warn('Action `%s` not defined in the keymap.', params.action);
				action_name = 'action_NotDefined';
			}
			return this.keymap[action_name](key_code, control_key, caret_row, caret_col, this, params);
		};break;
	}
	return 0;
}

ac.chap.Window.prototype.getActiveViewIndex = function()
{
	if ( null == this.activeView )
	{
		return -1;
	}
	return this.activeView.index;
}

ac.chap.Window.prototype.getCharAt = function(row, column)
{
	row = $getdef(row, this.caret.position[0]);
	column = $getdef(column, this.caret.position[1]);
	return this.char_map[row].charAt(column);
}

ac.chap.Window.prototype.getStringAt = function(row, column, width)
{
	row = $getdef(row, this.caret.position[0]);
	column = $getdef(column, this.caret.position[1]);
	width = $getdef(width, -1);
	// defaults to string before caret
//	console.log('getStringAt: %s, %s, %s', row, column, width);
	var source = '';
	if ( 0 > width )
	{
		// will go before [row,column]
		source = this.char_map.slice(0, row).join('\n')+'\n'+this.char_map[row].substr(0, column);
		return source.substr(source.length+width);
	}
	else
	{
		// will go after [row,column]
		source = this.char_map.slice(row).join('\n').substr(column);
		return source.substr(0, width);
	}
}

ac.chap.Window.prototype.getWordAt = function(row, column, numWords)
{
	// if numWords <0 returns words before otherwise after position. if omitted, default value is -1 that is word before caret
	// also, if more than one word is required, returns array of words as result
	row = $getdef(row, this.caret.position[0]);
	column = $getdef(column, this.caret.position[1]);
	numWords = $getdef(numWords, -1);
	var words = [];
	var re = this.language.wordDelimiter;
	var required_words = numWords;
	var direction_after = 0 < numWords;
	var next_word = true;
	required_words = Math.abs(-numWords);
	if ( !direction_after )
	{
		column--;
		if ( -1 == column )
		{
			row--;
			if ( -1 == row )
			{
				return words;
			}
			column = this.char_map[row].length-1;
		}
	}
	while (true)
	{
		var ch = this.char_map[row].charAt(column)
		if ( re.test(ch) )
		{
			if ( next_word )
			{
				words.push('');
				next_word = false;
			}
			// word character found
			if ( direction_after )
			{
				words[words.length-1] += ch;				
			}
			else
			{
				words[words.length-1] = ch + words[words.length-1];
			}
		}
		else
		{
			if ( required_words == words.length )
			{
				break;				
			}
			next_word = true;
		}
		
		column += (direction_after ? 1 : -1);
		if ( 0 > column )
		{
			row--;
			if ( -1 == row )
			{
				break;
			}
			next_word = true;
			column = this.char_map[row].length-1;				
		}
		else if ( this.char_map[row].length <= column )
		{
			row++;
			if ( this.char_map.length == row )
			{
				break;
			}
			next_word = true;
			column = 0;
		}
	}
	if ( 1 == required_words )
	{
		return words[0] ? words[0] : false;
	}
	return words;
}

ac.chap.Window.prototype.getLineAt = function(row)
{
    return this.char_map[row];
}

ac.chap.Window.prototype.getText = function()
{
	return this.char_map.join('\n');
}

ac.chap.Window.prototype.getNumRows = function()
{
    return this.char_map.length;
}

ac.chap.Window.prototype.getSyntaxHighlightingSource = function()
{
	if (null != this.activeView)
	{
		return this.activeView.getSyntaxHighlightingSource();
	}
	return 'ni';
}

ac.chap.Window.prototype.getCaretAbsolutePosition = function()
{
	if ( null != this.activeView )
	{
        var pos = this.activeView.getRenderedCharPosition(this.caret.position[0], this.caret.position[1]);
    	if ( null != pos )
    	{
    	    var root_pos = this.activeView.nodeScrollArea.abspos();
    	    return [pos[0]+root_pos.x+this.activeView.options.colWidth, pos[1]+root_pos.y+this.activeView.options.rowHeight];
    	}
    }
    return null;
}

ac.chap.Window.prototype.stopTransactionLog = function()
{
	this.state.transactionLogStopped = true;
}

ac.chap.Window.prototype.startTransactionLog = function()
{
	this.state.transactionLogStopped = false;
}

ac.chap.Window.prototype.addAllSelection = function()
{
	var num_rows = this.char_map.length;
	var num_views = this.views.length;
	for ( var i=0; i<num_rows; i++ )
	{
		for ( var ii=0; ii<num_views; ii++ )
		{
			this.row_id_map[ii][i][2] = this.row_id_map[ii][i][2] | ac.chap.ROWSTATE_SELECTION;
			this.row_id_map[ii][i][5][0] = 0;
			this.row_id_map[ii][i][5][1] = this.char_map[i].length;
		}
	}
	this.selection = 
	{
		startPosition: [0, 0],
		endPosition: [num_rows-1, this.char_map[num_rows-1].length]
	}
	// var me = this;
	// $runafter(300, function()
	// {
	// 	ac.chap.nodeClipboard.$.value = me.getSelection();
	// 	delete me;
	// });
}

ac.chap.Window.prototype.addSelection = function(range_to, range_from)
{
	// console.log('Adding selection: [%i, %i]', range_to, range_from);
	var num_views = this.views.length;
	if ( null == this.selection )
	{
		// no previous selection
		range_from = range_from || range_to;		
		this.selection = {};
		this.selection.startPosition = [range_from[0], range_from[1]];
	}
	else
	{
		var start_offset = Math.min(this.selection.startPosition[0], this.selection.endPosition[0]);
		var end_offset = Math.max(this.selection.startPosition[0], this.selection.endPosition[0]);
		for ( var i=start_offset; i<=end_offset; i++ )
		{
			for ( var ii=0; ii<num_views; ii++ )
			{
				this.row_id_map[ii][i][2] = (this.row_id_map[ii][i][2] & (65535-ac.chap.ROWSTATE_SELECTION));
			}
		}
		range_from = [this.selection.startPosition[0], this.selection.startPosition[1]];
	}
	if ( (range_to[0] < range_from[0]) || (range_to[0] == range_from[0] && range_to[1] < range_from[1]) )
	{
		range_from[1]--;
	}
	else
	{
		range_to[1]--;		
	}
	this.selection.endPosition = [range_to[0], range_to[1]];
	if ( (range_to[0] < range_from[0]) || (range_to[0] == range_from[0] && range_to[1] < range_from[1]) )
	{
		var r = range_from;
		range_from = range_to;
		range_to = r;
	}
	// console.log('%o - %o', range_from, range_to);
	for ( var i=0; i<num_views; i++ )
	{
		for ( var ii=range_from[0]; ii<=range_to[0]; ii++ )
		{
//			this.row_id_map[i][ii][1] = false;
			this.row_id_map[i][ii][2] = ac.chap.ROWSTATE_SELECTION;
			var range = [0, this.char_map[ii].length];
			if ( range_from[0] == ii )
			{
				range[0] = range_from[1];
			}
			if ( range_to[0] == ii )
			{
				range[1] = range_to[1];
			}
			this.row_id_map[i][ii][5][0] = range[0];
			this.row_id_map[i][ii][5][1] = range[1];
		}
	}
	// console.log('SELECTION ranges: %o - %o', this.selection.startPosition, this.selection.endPosition);
	// console.log('CARET: %o', this.caret.position);
}

ac.chap.Window.prototype.removeSelection = function(rowIndex, colIndex)
{
	var num_views = this.views.length;
	var num_rows = this.char_map.length;
	var changed = false;
	for ( var i=0; i<num_views; i++ )
	{
		for ( var ii=0; ii<num_rows; ii++ )
		{
			var row_state = this.row_id_map[i][ii][2];
			if ( ac.chap.ROWSTATE_SELECTION == (row_state & ac.chap.ROWSTATE_SELECTION) )
			{
				this.row_id_map[i][ii][1] = false;
				this.row_id_map[i][ii][2] = row_state & (65535-ac.chap.ROWSTATE_SELECTION);
				this.row_id_map[i][ii][5][0] = null;
				this.row_id_map[i][ii][5][1] = null;
				changed = true;
			}
		}
	}
	this.selection = null;
	return changed;
}

ac.chap.Window.prototype.getSelection = function()
{
	var selection_text = '';
	if ( null != this.selection )
	{
		var range_from = [this.selection.startPosition[0], this.selection.startPosition[1]];
		var range_to = [this.selection.endPosition[0], this.selection.endPosition[1]];
		if ( (range_to[0] < range_from[0]) || (range_to[0] == range_from[0] && range_to[1] < range_from[1]) )
		{
			var r = range_from;
			range_from = range_to;
			range_to = r;			
		}
		if ( range_from[0] == range_to[0] )
		{
			selection_text = this.char_map[range_from[0]].substring(range_from[1], range_to[1]+1);
		}
		else
		{
			selection_text = this.char_map[range_from[0]].substr(range_from[1]);
			selection_text = [].concat(selection_text, this.char_map.slice(range_from[0]+1, range_to[0]), this.char_map[range_to[0]].substr(0, range_to[1]+1)).join('\n');
		}
		// console.log('SELECTION: `%s`', selection_text.replace(/\n/g, '$'));
	}
	return selection_text;	
}

ac.chap.Window.prototype.getCaretPosition = function()
{
	return [this.caret.position[0], this.caret.position[1]];
}

ac.chap.Window.prototype.setCaretPosition = function(row, column)
{
	this.caret.position[0] = parseInt(row);
	this.caret.position[1] = parseInt(column);
}

ac.chap.Window.prototype.renderText = function(forceCompleteRedraw)
{
	var num_views = this.views.length;
	for ( var i=0; i<num_views; i++ )
	{
		this.views[i].renderText(forceCompleteRedraw);
	}
}

ac.chap.Window.prototype.renderSelection = function()
{
	var num_views = this.views.length;
	for ( var i=0; i<num_views; i++ )
	{
		this.views[i].renderSelection();
	}
}

ac.chap.Window.prototype.showCaret = function(skipScroll, whenAnimating)
{
	if (new Date().getTime() - 500 < this.state.lastKeyTimePressed)
	{
		this.state.caretPhase = 1;
	}
	var num_views = this.views.length;
	for ( var i=0; i<num_views; i++ )
	{
		if ( this.activeView == this.views[i] && null == this.selection )
		{
			this.views[i].showCaret(skipScroll?true:false);
			if (null != this.state.caretListener && !whenAnimating)
			{
				// this.state.caretListener(this.caret.position[0], this.caret.position[1]);
				var listener = this.state.caretListener;
				var r = this.caret.position[0];
				var c = this.caret.position[1];
				$runafter(30, function()
				{
					listener(r, c);
					delete listener;
				});
			}
		}
		else
		{
			this.views[i].hideCaret();
		}
	}
	this.state.caretPhase = ++this.state.caretPhase & 1;
}

ac.chap.Window.prototype.hideCaret = function()
{
	var num_views = this.views.length;
	for ( var i=0; i<num_views; i++ )
	{
		this.views[i].hideCaret();
	}
}

ac.chap.Window.prototype.captureEditAreaClick = function(evt, view)
{
	evt.stop();
	this.hideInteractiveSearch();
	this.activeView = view;
	
	var pos = evt.$.abspos();
	var offset_x = evt.pageX - pos.x;
	var offset_y = evt.pageY - pos.y + ($__tune.isGecko ? view.nodeScrollArea.$.scrollTop : 0);
	var target  = evt.$.$;
	var used = false;
	while ( null != target && target.tagName && 'pre' != target.tagName.toLowerCase() )
	{
		if ( !$__tune.isOpera )
		{
			offset_x += target.offsetLeft;
			offset_y += target.offsetTop;
			used = true;
		}
		target = target.parentNode;
	}
	var row_index = this.char_map.length-1;
	if ( target.tagName && used )
	{
		offset_y -= target.offsetTop;
	}
	if ( null == target )
	{
		return;
	}
	
	var row_index = target.getAttribute ? parseInt(target.getAttribute('row-index')) : row_index;
	var num_subrows = 1;
	var col_index = 0;
	if ( view.options.wordWrap )
	{
		num_subrows = 1 + Math.floor(offset_y/view.options.rowHeight);
//		console.log(num_subrows);
	}
	var i = 0;
	var num_chars = this.char_map[row_index].length;
	var mid_char_w = view.getRenderedCharDimension()[0] / 2;
	var subrow = 0;
	var subrow_offset = 0;
//	offset_y -=
//	console.log('offsets [%s x %s]', offset_x, offset_y);
	var w = view.options.colWidth * view.numCols;
	while ( i<num_chars )
	{
		var dim = view.getRenderedStringDimension(row_index, 0, i);
		if ( (Math.floor(dim[0]/w) + 1) == num_subrows )
		{
			if ( dim[0] % w > offset_x - mid_char_w )
			{
				col_index = i;
				break;
			}
			else if ( w - mid_char_w < offset_x && (dim[0] % w + 2*mid_char_w >= offset_x))
			{
				// last char
				col_index = i+1;
				break;
			}			
		}
		i++;
	}
//	console.log('%s, %s', row_index, col_index);
	if ( i == num_chars )
	{
		col_index = i;
	}
//	console.log('CHANGE CARET to: %s', col_index);
	this.hideCaret();
	if ( evt.shiftKey )
	{
		this.addSelection([row_index, col_index], this.state.lastCaretPosition);
		this.renderText();
	}
	else
	{
		this.setCaretPosition(row_index, col_index);
		this.state.caretPhase = 1;
		view.showCaret();
		this.state.lastCaretPosition = [this.caret.position[0], this.caret.position[1]];
		if ( this.removeSelection() )
		{
			this.renderText();
		}
	}
	ac.chap.setActiveComponent(this);
}

ac.chap.Window.prototype.foldingize = function()
{
	var startRowIndex = 0;

	var source_rows = this.char_map.slice(startRowIndex);

	// creating folding info
	var n = source_rows.length;
	var foldings = [];
	var foldings_index = -1;
	for ( var i=0; i<this.language.foldingStartMarkers.length; i++ )
	{
		var re_start = this.language.foldingStartMarkers[i];
		var re_parity = this.language.foldingParityMarkers[i];
		var re_stop = this.language.foldingStopMarkers[i];


		for ( var ii=startRowIndex; ii<n; ii++ )
		{
			if ( re_start.test(this.char_map[ii]) )
			{
//				console.log('START: #%s', ii);
				foldings.push([ii, -1, 0]);
				foldings_index = foldings.length-1;
			}

			if ( null != re_parity && re_parity.exec(this.char_map[ii]) )
			{
//				console.log('PARITY: #%s', ii);
				var ix = foldings_index;
				while ( 0 <= ix )
				{
					if ( -1 == foldings[ix][1] )
					{
						foldings[ix][2]++;
						break;
					}
					ix--;
				}
//				foldings[foldings_index][2]++;
			}

			if ( re_stop.exec(this.char_map[ii]) )
			{
//				console.log('STOP: #%s', ii);
				var ix = foldings_index;
				while ( 0 <= ix )
				{
					if ( -1 == foldings[ix][1] )
					{
						foldings[ix][2]--;
						if ( 0 == foldings[ix][2] )
						{
							foldings[ix][1] = ii;							
						}
						break;
					}
					ix--;
				}
			}
		}
	}

//	console.log('%o', foldings);
	n = foldings.length;
	for ( i=0; i<n; i++ )
	{
		var fold = foldings[i];
		if ( fold[0] == fold[1] || -1 == fold[1] )
		{
			continue;
		}
		for ( var ii=0; ii<this.views.length; ii++ )
		{
			this.row_id_map[ii][fold[0]][2] |= ac.chap.ROWSTATE_FOLD_START;
			this.row_id_map[ii][fold[0]][3][0] = 0;
			this.row_id_map[ii][fold[0]][3][1] = fold[1];
			this.row_id_map[ii][fold[1]][2] |= ac.chap.ROWSTATE_FOLD_STOP;
			this.row_id_map[ii][fold[1]][3][0] = 0
			this.row_id_map[ii][fold[1]][3][1] = fold[0];
		}
	}	
}

ac.chap.Window.prototype.tokenize = function()
{
	if ( !this.options.syntaxHighlightingEnabled )
	{
		return;
	}
	var startRowIndex = 0;
	this.foldingize();
	var source = this.char_map.slice(startRowIndex).join('\n');

	var total_rows = this.char_map.length;
	var syntax_map = [];

	var ml_start = this.language.multiRowCommentStartMarker;
	var ml_end = this.language.multiRowCommentEndMarker;
//	console.log(ml_end);
	var sq = this.language.singleQuoteStringMarker;	
	var sq_exception = this.language.singleQuoteStringMarkerException;
	var dq = this.language.doubleQuoteStringMarker;
	var dq_exception = this.language.doubleQuoteStringMarkerException;
	var sl_markers = this.language.singleRowCommentStartMarkers;
	
	var cursor = {row:startRowIndex, col:0};
	var col_offset = 0;
	
	var fillRowTokens = function(tokenType, fromRowIndex, toRowIndex, pars)
	{
		pars = pars || '';
		if ( -1 == toRowIndex )
		{
			toRowIndex = total_rows;
		}
		for ( var i=fromRowIndex; i<toRowIndex; i++ )
		{
			if ( 'undefined' == typeof syntax_map[i] )
			{
				syntax_map[i] = [];
			}
			syntax_map[i] = [[tokenType, -1, -1, pars]];
		}
	}
	var ixs = [
		[ac.chap.TOKEN_MULTIROW_COMMENT, -1, ml_start, ml_end, ''],
		[ac.chap.TOKEN_SINGLE_QUOTED, -1, sq, sq, sq_exception],
		[ac.chap.TOKEN_DOUBLE_QUOTED, -1, dq, dq, dq_exception]
	];
	for ( i=0; i<sl_markers.length; i++ )
	{
		ixs.push([ac.chap.TOKEN_SINGLEROW_COMMENT, -1, sl_markers[i], '\n', '']);
	}

	while ( true )
	{
		if ( '' != ml_start )
		{
			ixs[0][1] = source.indexOf(ml_start);
		}
		if ( '' != sq )
		{
			ixs[1][1] = source.indexOf(sq);
		}
		if ( '' != dq )
		{
			ixs[2][1] = source.indexOf(dq);
		}
		for ( i=0; i<sl_markers.length; i++ )
		{
			if ( '' != sl_markers[i] )
			{
				ixs[3+i][1] = source.indexOf(sl_markers[i]);
			}
		}
		var found_marker_index = -1;
		var lowest = source.length;
		for ( i=0; i<ixs.length; i++ )
		{
			if ( -1 != ixs[i][1] )
			{
				if ( lowest > ixs[i][1] )
				{
					found_marker_index = i;
					lowest = ixs[i][1];
				}
			}
		}
		if ( -1 == found_marker_index )
		{
			break;
		}
		var start_index = ixs[found_marker_index][1];
		var skipped_source = source.substr(0, start_index);
		var num_skipped_rows = skipped_source.split('\n').length;
		cursor.row += num_skipped_rows - 1;
		cursor.col = (1 == num_skipped_rows ? col_offset : 0) + skipped_source.length - ('\n'+skipped_source).lastIndexOf('\n');
		
		if ( 'undefined' == typeof syntax_map[cursor.row] )
		{
			syntax_map[cursor.row] = [];
		}
		
		var start_marker_len = ixs[found_marker_index][2].length;
		var end_marker_len = ixs[found_marker_index][3].length;
		source = source.substr(start_index+start_marker_len);

		var token_type = ixs[found_marker_index][0];
		
		var end_index = source.indexOf(ixs[found_marker_index][3]);
		var sub_source = source;
		var end_index_offset = 0;
		var except = false;
		while ( 0 < end_index && '' != ixs[found_marker_index][4] && ixs[found_marker_index][4] == sub_source.charAt(end_index-end_marker_len) )
		{
			except = true;
			end_index_offset += end_index + end_marker_len;
			sub_source = sub_source.substr(end_index+end_marker_len);
			end_index = sub_source.indexOf(ixs[found_marker_index][3]);
		}
		if ( except && -1 != end_index )
		{
			end_index += end_index_offset;
		}
		if ( -1 == end_index )
		{
			syntax_map[cursor.row].push([token_type, cursor.col, -1, '']);
			fillRowTokens(token_type, cursor.row+1, -1);
			break;
		}
		else
		{
			var block_source = source.substr(0, end_index);
			var num_block_rows = '\n' == ixs[found_marker_index][3] ? 1 : block_source.split('\n').length;
			var cursor_col_end = block_source.length - ('\n'+block_source).lastIndexOf('\n');

			syntax_map[cursor.row].push([token_type, cursor.col, 1 == num_block_rows ? (cursor.col+end_index+start_marker_len+end_marker_len) : -1, ixs[found_marker_index][2]]);
			fillRowTokens(token_type, cursor.row+1, cursor.row+num_block_rows-1);
			if ( 1 == num_block_rows )
			{
			    col_offset = cursor.col + end_index + start_marker_len + end_marker_len;
				if ( '\n' == ixs[found_marker_index][3] )
				{
					cursor.row++;
					col_offset = 0;
				}
			}
			else
			{
				if ( 'undefined' == typeof syntax_map[cursor.row+num_block_rows] )
				{
					syntax_map[cursor.row+num_block_rows-1] = [];
				}
				syntax_map[cursor.row+num_block_rows-1].push([token_type, -1, cursor_col_end + end_marker_len, '']);
//				var a = block_source.split('\n');
				col_offset = cursor_col_end + end_marker_len;
				cursor.row += num_block_rows -1;
			}
//			console.log(num_block_rows);
			source = source.substr(end_index+end_marker_len);
		}
	}
	delete ixs;
	delete source;

	var n = Math.max(syntax_map.length, this.syntax_map.length);
	for ( i=0; i<n; i++ )
	{
		if ( 'undefined' != typeof syntax_map[i] )
		{
			if ( 'undefined' != typeof this.syntax_map[i] )
			{
				// looking for change
				if ( syntax_map[i].length == this.syntax_map[i].length )
				{
					var changed = false;
					for ( var ii=0; ii<syntax_map[i].length; ii++ )
					{
						if ( syntax_map[i][ii].length != this.syntax_map[i][ii].length )
						{
							changed = true;
							break;
						}
						if ( syntax_map[i][ii][0] != this.syntax_map[i][ii][0] || syntax_map[i][ii][1] != this.syntax_map[i][ii][1] || syntax_map[i][ii][2] != this.syntax_map[i][ii][2] || syntax_map[i][ii][3] != this.syntax_map[i][ii][3] )
						{
							changed = true;
							break;
						}
					}
					if ( !changed )
					{
						continue;
					}
				}
			}
			this.syntax_map[i] = syntax_map[i];
		}
		else
		{
			if ( 'undefined' != typeof this.syntax_map[i] )
			{
				delete this.syntax_map[i];
			}
			else
			{
				// no change
				continue;
			}
		}
		for ( var ii=0; ii<this.views.length; ii++ )
		{
			// marking row as changed
			if (this.row_id_map[ii] && this.row_id_map[ii][i])
			{
				this.row_id_map[ii][i][1] = false;
			}
		}
		// console.log('%s marked as changed.', i);
	}
	
	delete syntax_map;
	delete fillRowTokens;
}

ac.chap.Window.prototype.expandFolding = function(rowIndex)
{
	var n = this.views.length;
	for ( var i=0; i<n; i++ )
	{
		this.views[i].expandFolding(rowIndex);
	}
}

ac.chap.Window.prototype.insertIntoCharacterMap = function(source, atRow, atColumn, skipLog, userId)
{
	if ( $notset(atRow) )
	{
		atRow = this.caret.position[0];
	}
	if ( $notset(atColumn) )
	{
		atColumn = this.caret.position[1];
	}
	userId = userId|this.userId;

	if ( !skipLog && !this.state.transactionLogStopped )
	{
		this.transaction_log.push(ac.chap.TRANSLOG_TYPE_INSERT);
		this.transaction_log.push([atRow, atColumn, userId]);
		this.transaction_log.push(source);
	}
	
	var num_existing_rows = this.char_map.length;
	var new_rows = source.split('\n');
	var num_new_rows = new_rows.length;
	var num_views = this.views.length;
//	console.log('NUMVIEWS: %s', num_views);
    if ( this.hasTransactionListener() )
    {
        var me = this;
        setTimeout(function()
        {
            me.state.transactionListener[0](me, ac.chap.TRANSLOG_TYPE_INSERT, userId, atRow, atColumn, num_existing_rows, num_new_rows, source);
            me = null;
        }, this.state.transactionListener[1]);
    }
	
	var i = ii = 0;
	
	if ( 'undefined' == typeof this.char_map[atRow] )
	{
		this.char_map = this.char_map.concat(new_rows);
		for ( i=0; i<num_new_rows; i++ )
		{
			for ( ii=0; ii<num_views; ii++ )
			{
				this.row_id_map[ii][atRow+i] = [this.row_id_sequence, false, ac.chap.ROWSTATE_NONE, [], [], []];
			}
			this.row_id_sequence++;
		}
	}
	else
	{
		if ( this.char_map[atRow].length < atColumn )
		{
			atColumn = this.char_map[atRow].length;
		}
		for ( i=0; i<num_views; i++ )
		{
			this.row_id_map[i][atRow][1] = false;
		}
		if ( 1 == num_new_rows )
		{
			this.char_map[atRow] = this.char_map[atRow].substr(0, atColumn) + new_rows[0] + this.char_map[atRow].substr(atColumn);
		}
		else
		{
			var end_snippet = this.char_map[atRow].substr(atColumn);
			// console.log('end snippet: `%s`', end_snippet);
			this.char_map[atRow] = this.char_map[atRow].substr(0, atColumn) + new_rows[0];
			var last_row_index = atRow + (num_new_rows-1);
			this.char_map = [].concat(this.char_map.slice(0, atRow+1), new_rows.slice(1), this.char_map.slice(atRow+1));
			var ins_map = [];
			var start_sequence = this.row_id_sequence;
			for ( i=0; i<num_views; i++ )
			{
				ins_map[i] = [];
				start_sequence = this.row_id_sequence;
				for ( ii=1; ii<num_new_rows; ii++ )
				{
					ins_map[i][ii-1] = [start_sequence++, false, ac.chap.ROWSTATE_NONE, [], [], []];
				}
			}
			this.row_id_sequence = start_sequence;
			for ( i=0; i<num_views; i++ )
			{			
				this.row_id_map[i] = [].concat(this.row_id_map[i].slice(0, atRow+1), ins_map[i], this.row_id_map[i].slice(atRow+1));
			}
			this.char_map[last_row_index] += end_snippet;
			for ( i=0; i<num_views; i++ )
			{
				this.row_id_map[i][last_row_index][1] = false;	
			}
		}
	}
	// console.log('%o', this.char_map);
	if ( 1 < num_new_rows )
	{
		for ( i=0; i<num_views; i++ )
		{
			this.views[i].numVisibleRows += (num_new_rows-1);
		}		
	}
}

ac.chap.Window.prototype.removeFromCharacterMap = function(startRow, startCol, endRow, endCol, skipLog, userId)
{
	if ( 'undefined' == typeof endRow )
	{
		endRow = startRow;
		endCol = startCol+1;
	}
	userId = userId|this.userId;

	var source = '';
	var i = 0;
	var num_views = this.views.length;
	if ( startRow == endRow )
	{
		source = this.char_map[startRow].substring(startCol, endCol);
		this.char_map[startRow] = this.char_map[startRow].substr(0, startCol)+this.char_map[startRow].substr(endCol);
		for ( i=0; i<num_views; i++ )
		{			
			this.row_id_map[i][startRow][1] = false;
		}
	}
	else
	{
		source = this.char_map[startRow].substr(startCol) + '\n'+this.char_map.slice(startRow+1, endRow).join('\n') + '\n' + this.char_map[endRow].substr(0, endCol);

		this.char_map[startRow] = this.char_map[startRow].substr(0, startCol)+this.char_map[endRow].substr(endCol);
		this.char_map = [].concat(this.char_map.slice(0, startRow+1), this.char_map.slice(endRow+1));
		for ( i=0; i<num_views; i++ )
		{
			this.row_id_map[i][startRow][1] = false;
			this.row_id_map[i] = [].concat(this.row_id_map[i].slice(0, startRow), this.row_id_map[i].slice(endRow));
			if ( startRow < this.row_id_map[i].length-1 )
			{
				this.row_id_map[i][startRow+1][1] = false;
			}
			this.views[i].numVisibleRows -= (endRow-startRow);
		}
	}
	if ( !skipLog && !this.state.transactionLogStopped )
	{
		this.transaction_log.push(ac.chap.TRANSLOG_TYPE_REMOVE);
		this.transaction_log.push([startRow, startCol, endRow, endCol, userId|this.userId]);
		this.transaction_log.push(source);
	}
    if ( this.hasTransactionListener() )
    {
        var me = this;
        setTimeout(function()
        {
            me.state.transactionListener[0](me, ac.chap.TRANSLOG_TYPE_REMOVE, userId, startRow, startCol, endRow, endCol, source);
            me = null;
        }, this.state.transactionListener[1]);
    }
	return source;
}



/*
 * ac.Chap - Text Editing Component - Views
 */

if ( 'undefined' == typeof ac )
{
	var ac = {chap:{}};
}


$class('ac.chap.View',
{
	construct:function(window, index, options)
	{
		this.window = window;
		this.index = index;

		this.nodeScrollArea = null;
		this.nodeFillArea = null;
		this.nodeEditArea = null;
		this.nodeEditAreaCache = null;
		this.nodeCaret = null;
		this.nodeCaretRow = null;
		
		this.renderingRunning = false;
		
		this.numRows = 0;
		this.numCols = 0;
		this.wrapWidth = 0;
		this.wrapHeight = 0;

		this.startRow = 0;
		this.startCol = 0;
		
		this.startRowOffset = 0;
		this.numVisibleRows = 0;
		
		this.state = {lastCaretPosition:[-1,-1], lastCaretRenderedPosition:null};
		
		this.theme = null;
		
		this.setOptions(options);
	},
	destruct:function()
	{
		clearInterval(this.caretAnimInterval);
		$delete(this.options);
		$delete(this.theme);
	}
});

ac.chap.View.prototype.setOptions = function(options)
{
	this.options = 
	{
		tabelator:'  ',
		wordWrap:false,
		colWidth:0,
		rowHeight:0,
		caretThreadTimeout:450
	}
	if ( $isset(options.wordWrap) )
	{
		this.options.wordWrap = options.wordWrap;
	}
	if ( $isset(options.tabelator) )
	{
		this.options.tabelator = options.tabelator;
	}
	// getting column width and height
	this.calculateColRowDim();
	if ($isset(options.theme))
	{
		this.theme = $new(options.theme);
	}
	else
	{
		this.theme = $new(ac.chap.Theme);
	}
}

ac.chap.View.prototype.calculateColRowDim = function()
{
	var font_size = this.window.options.font.size;
	var node = $().a($$('span')).s('font:?px ?'.embed(font_size, this.window.options.font.family)).t('a');
	this.options.colWidth = node.$.offsetWidth;
	node.rs();
	this.options.rowHeight = font_size + Math.ceil(font_size/10);
	var row_node = document.createElement('pre');
	row_node.style.minHeight = this.options.rowHeight+'px';
	row_node.style.font = this.window.options.font.size + 'px ' + this.window.options.font.family;
	row_node.style.lineHeight = this.options.rowHeight + 'px';
	row_node.style.margin = 0;
	row_node.style.padding = 0;
	row_node.style.border = 0;
	this.options.rowTemplate = row_node;
}

ac.chap.View.prototype.setTheme = function(theme)
{
	this.theme = $new(theme);
	this.nodeRoot.s('background:?'.embed(this.theme.background));
	this.nodeScrollArea.fc().s('background:?'.embed(this.theme.background));
	$(this.nodeEditArea).s('color:?'.embed(this.theme.textColor));
	this.renderText(true);
}

ac.chap.View.prototype.getSyntaxHighlightingSource = function()
{
	function get_inner(node)
	{
		var ht = '';
		var child_nodes = node.childNodes;
		for (var i=0; i<child_nodes.length; i++)
		{
			var inner_node = child_nodes.item(i);
			if (3 == inner_node.nodeType)
			{
				ht += inner_node.data;
			}
			else if(1 == inner_node.nodeType)
			{
				ht += '<span style="color:?;background:?;font-style:?;font-weight:?;text-decoration:?;">'.embed(inner_node.style.color, inner_node.style.background, inner_node.style.fontStyle, inner_node.style.fontWeight, inner_node.style.textDecoration) + get_inner(inner_node) + '</span>';
			}
		}
		return ht;
	}
	var nodes = this.nodeEditArea.childNodes;
	var ht = '';
	for (var i=0; i<nodes.length; i++)
	{
		var pre = nodes.item(i);
		if (1 != pre.nodeType && 'pre' != node.tagName.toLowerCase())
		{
			continue;
		}
		ht += '<pre style="min-height=?">?</pre>'.embed(pre.style.minHeight, get_inner(pre));
	}
	return ht;
}

function ch_encode_markup(str)
{
    if ( -1 != str.indexOf('&') )
    {
        str = str.replace(/&/g, '&amp;');
    }
    if ( -1 != str.indexOf('>') )
    {
        str = str.replace(/>/g, '&gt;');
    }
    if ( -1 != str.indexOf('<') )
    {
        str = str.replace( /</g, '&lt;' );
    }
    /*
    if ( -1 != str.indexOf(' ') )
    {
       str = str.replace(/ /g, '&nbsp;');
    }
    */
    return str;
}

// replaces all spaces EXCEPT for those existing in inside tag definitions to &nbsp; Eg. <a href="dsds"> 1 2 3</a> = <a href="dsds">&nbsp;1&nbsp;2&nbsp;3</a>
function ch_encode_markup_spaces(str)
{
	var n = str.length - str.replace(/ /g, '').length;
	for ( var i=0; i<n; i++ )
	{
		str = str.replace(/([^ ]*) /i, function()
		{
			var is_inside = -1 != arguments[1].indexOf('<');
			is_inside = is_inside && (arguments[1].replace(/</g, '').length != arguments[1].replace(/>/g, '').length);
			return arguments[1]+(is_inside?'~`~`~`~`':'&nbsp;');
		});		
	}
	return str.replace(/~`~`~`~`/g, ' ');
}


ac.chap.View.prototype.getRenderedCharDimension = function(rowIndex, colIndex)
{
	return [this.options.colWidth, this.options.rowHeight];
}

ac.chap.View.prototype.getRenderedStringDimension = function(rowIndex, colIndex, width)
{
	if ( 'undefined' != typeof this.window.char_map[rowIndex] )
	{
		if ( colIndex < this.window.char_map[rowIndex].length )
		{
			var str = this.window.char_map[rowIndex].substr(colIndex, width);
			var ix = 0;
			var tab = this.options.tabelator;
			while ( -1 != ix )
			{
				ix = str.indexOf('\t');
				if ( -1 != ix )
				{
					str = str.substr(0,ix)+tab.substr(0, tab.length-(ix % tab.length))+str.substr(ix+1);
				}
			}
//			console.log('(getrenderedstringdimension) = [%s], ix:%s w:%s %s', this.options.colWidth*str.length, colIndex, width, str);
			return [this.options.colWidth*str.length, this.options.rowHeight];
		}
	}
	return [0,0];
}

ac.chap.View.prototype.getVirtualStringDimension = function(row, colIndex, width)
{
	if ( colIndex < row.length )
	{
		var str = row.substr(colIndex, width);
		var ix = 0;
		var tab = this.options.tabelator;
		while ( -1 != ix )
		{
			ix = str.indexOf('\t');
			if ( -1 != ix )
			{
				str = str.substr(0,ix)+tab.substr(0, tab.length-(ix % tab.length))+str.substr(ix+1);
			}
		}
//		console.log('(getrenderedstringdimension) = [%s], ix:%s w:%s %s', this.options.colWidth*str.length, colIndex, width, str);
		return [this.options.colWidth*str.length, this.options.rowHeight];
	}
	return [0,0];
}

ac.chap.View.prototype.getRenderedCharPosition = function(rowIndex, colIndex)
{
	var node_row = this.getRowNode(rowIndex);
	if ( null != node_row && null != node_row.parentNode )
	{
		var offset_x = this.getRenderedStringDimension(rowIndex, 0, colIndex)[0];
		var offset_y = 0;
		var dim = this.getRenderedCharDimension(rowIndex, colIndex);
		offset_x -= dim[0];
		if ( this.options.wordWrap )
		{
			if ( 0 < colIndex )
			{
				var w = this.options.colWidth * (this.numCols);
				offset_y = this.options.rowHeight * (Math.floor(offset_x/w));
				offset_x = (offset_x) % w;
			}
		}
		return [offset_x, node_row.offsetTop+offset_y, node_row];
	}
	return null;
}

ac.chap.View.prototype.getRowNode = function(rowIndex)
{
	return document.getElementById('row-'+this.window.instanceId+'-'+this.index+'-'+rowIndex);
}

ac.chap.View.prototype.getVirtualCharPosition = function(nodeRow, row, colIndex)
{
	var offset_x = this.getVirtualStringDimension(row, 0, colIndex)[0];
	var offset_y = 0;
	var dim = this.getRenderedCharDimension(0, colIndex);
	offset_x -= dim[0];
	if ( this.options.wordWrap )
	{
		if ( 0 < colIndex )
		{
			var w = this.options.colWidth * (this.numCols);
			offset_y = this.options.rowHeight * (Math.floor(offset_x/w));
			offset_x = (offset_x) % w;
		}
	}
	return [offset_x, nodeRow.offsetTop+offset_y];
}

ac.chap.View.prototype.showCaret = function(skipScroll)
{
	var caret_row = this.window.caret.position[0];
	var caret_col = this.window.caret.position[1];
	
	pos = this.getRenderedCharPosition(caret_row, caret_col);
	if ( null != pos )
	{
		// caret is visible
		var node_row = pos[2];
		var node = document.getElementById('ac-chap-caret-'+this.window.instanceId);
		if ( null != node )
		{
			node.parentNode.removeChild(node);
		}
		if ( 1 == this.window.state.caretPhase )
		{
			// displaying caret
			node = document.createElement('div');
			node.id = 'ac-chap-caret-'+this.window.instanceId;
			node.style.position = 'absolute';
			node.style.font = '1px arial'; // IE
			node.style.width = this.options.colWidth + 'px';
			node.style.height = this.options.rowHeight + 'px';
			pos[2] = this.options.colWidth;
			pos[3] = this.options.rowHeight;
			pos = this.theme.adjustCaretPosition(this.window.caret.mode, pos);
			node.style.left = pos[0]+'px';
			node.style.top = pos[1]+'px';
			this.theme.renderCaret(this.window.caret.mode, node);
			this.nodeCaret = node_row.appendChild(node);
			node_row.style.background = this.theme.caretRowStyleActive;
			
			if ( !skipScroll )
			{
				// might be out of borders, at least partially
				if ( 0 > node_row.offsetTop - (this.nodeScrollArea.$.scrollTop % this.options.rowHeight) )
				{
					// top margin overlay, first rendered row is partially hidden
					this.scrollToRow(caret_row);
				}
				else if ( node_row.offsetTop > this.options.rowHeight*(this.numRows-1)-$__tune.ui.scrollbarWidth )
				{
					// bottom margin overlay
					this.scrollToRow(caret_row-Math.floor(this.numRows/2));
				}
			}
			this.nodeCaretRow = node_row;
		}
		if ('undefined' != typeof this.state.lastCaretRowIndex && this.state.lastCaretRowIndex != caret_row)
		{
			var last_node_row = this.getRowNode(this.state.lastCaretRowIndex);
			if (last_node_row)
			{
				last_node_row.style.background = 'transparent';
			}
		}
		this.state.lastCaretRowIndex = caret_row;
	}
	else
	{
		if ( !skipScroll )
		{
			// scrolling into view
			this.scrollToRow(caret_row - Math.floor(this.numRows/2));			
		}
	}
}

ac.chap.View.prototype.hideCaret = function(skipCaretRow)
{
	if ( null != this.nodeCaret && null != this.nodeCaret.parentNode )
	{
		this.nodeCaret.parentNode.removeChild(this.nodeCaret);
		this.nodeCaret = null;
	}
	if ( !skipCaretRow && null != this.nodeCaretRow )
	{
//		console.log('off(hide) caret line background for %s', this.nodeCaretRow.id);
		this.nodeCaretRow.style.background = 'transparent';
	}
//	console.log('hide caret');
}

ac.chap.View.prototype.scrollToRow = function(rowIndex, setCaretToo, dontRefreshCaret)
{
	this.nodeScrollArea.$.scrollTop = this.options.rowHeight * rowIndex - Math.floor(this.nodeRoot.$.offsetHeight/3);
	if (setCaretToo)
	{
		this.window.runAction(ac.chap.ACTION_CARET, {moveTo:[rowIndex, 0]});
		this.window.runAction(ac.chap.ACTION_CARET, {move:'row_end'});
	}
	if (!dontRefreshCaret)
	{
		this.window.state.caretPhase = 1;
		this.showCaret(true);
	}
}

ac.chap.View.prototype.expandFolding = function(rowIndex)
{
	if ( 'undefined' == typeof this.window.row_id_map[this.index][rowIndex] )
	{
		return;
	}
	var row_state = this.window.row_id_map[this.index][rowIndex][2];
	if (0 == (ac.chap.ROWSTATE_FOLD_EXPAND & row_state))
	{
		return;
	}
	var end_row_index = this.window.row_id_map[this.index][rowIndex][3][1];
	this.window.row_id_map[this.index][rowIndex][2] &= (65535 - ac.chap.ROWSTATE_FOLD_EXPAND);
	this.window.row_id_map[this.index][rowIndex][1] = false;
	for ( var i=rowIndex+1; i<=end_row_index; i++ )
	{
		this.window.row_id_map[this.index][i][1] = false;
		this.window.row_id_map[this.index][i][2] &= (65535 - ac.chap.ROWSTATE_FOLD_COLLAPSED);
	}
	this.recalculateVisibleRows();
	var me = this;
	// console.log('expanding: %i, start: %i', rowIndex, end_row_index);
	$runafter(40, function(){me.renderText(true)});
}

ac.chap.View.prototype.resize = function()
{
	var h = this.nodeRoot.p().h();
	this.nodeRoot.h(h);
	$(this.nodeSidebar).h(h);
	this.nodeScrollArea.h(h);
	this.nodeFillArea.h(h-$__tune.ui.scrollbarWidth);
	$(this.nodeSelectionArea).h(h-$__tune.ui.scrollbarWidth+this.options.rowHeight);
	this.recalculateNumRows();
	this.recalculateVisibleRows();
	this.renderText(true);
}

ac.chap.View.prototype.reloadOptions = function()
{
	this.calculateColRowDim();
	this.recalculateNumCols(false, true);
	this.recalculateNumRows();
	this.recalculateVisibleRows();
	this.renderSidebarStub();
	this.renderText(true);	
}

ac.chap.View.prototype.recalculateNumCols = function(node, withoutScrollbar)
{
	node = node || this.nodeRoot;
	var w = node.$.offsetWidth;
	if (withoutScrollbar)
	{
		w -= $__tune.ui.scrollbarWidth+61;
	}
	this.numCols = Math.floor(w/this.options.colWidth);
}

ac.chap.View.prototype.recalculateNumRows = function(node)
{
	node = node || this.nodeRoot;
	this.numRows = Math.floor(node.$.offsetHeight/this.options.rowHeight);
}

ac.chap.View.prototype.showInteractiveSearch = function()
{
	this.hideInteractiveSearch();
	var pos = this.nodeRoot.abspos();
	var node = $().a($$()).pos(true).x(pos.x+58).y(pos.y).z(2000).w(this.nodeRoot.w()-$__tune.ui.scrollbarWidth-61).h(24).o(0.8);
	node.s('background:#000;border:1px solid #777;border-top:0;');
	var search_key_id = 'is_key_?'.embed(this.window.ident);
	var ht = '<table align="right" cellpadding="0" cellspacing="0" style="height:24px"><tbody><tr><td width="96%" align="right" valign="middle" style="padding-right:20px;color:#fff"></td><td valign="middle" width="2%"><input type="text" onfocus="fry.keyboard.stop()" onblur="fry.keyboard.start()" id="' + search_key_id + '" style="height:12px;padding:1px;padding-left:3px;border:1px solid #777"/></td><td valign="middle"><img src="/mm/i/theme/apple/tabpane.button.close_invert.gif" width="14" height="14" title="Close" style="margin-left:4px;margin-right:4px"/></td></tr></tbody></table>';
	node.t(ht);
	var me = this;
	var status_node = node.g('td:0');
	var search_key_node = node.g('input:0');
	var original_caret_pos = [me.window.caret.position[0], me.window.caret.position[1]];
	var last_keyword = '';
	var selection = me.window.getSelection();
	search_key_node.e('keydown', function(evt)
	{
		evt.stopPropagation();
		if (40 == evt.keyCode)
		{
			me.window.runAction(ac.chap.ACTION_CUSTOM, {action:'SearchKeyword', direction:'down'});
			me.scrollToRow(me.window.caret.position[0], false, true);
			me.window.processActionResult(true, true);
			evt.preventDefault();
			return true;
		}
		else if (38 == evt.keyCode)
		{
			me.window.runAction(ac.chap.ACTION_CUSTOM, {action:'SearchKeyword', direction:'up'});
			me.scrollToRow(me.window.caret.position[0], false, true);
			me.window.processActionResult(true, true);
			evt.preventDefault();
			return true;
		}
		else if (27 == evt.keyCode)
		{
			finish(true);
			evt.preventDefault();
			return true;
		}
		else if (13 == evt.keyCode)
		{
			finish();
			evt.preventDefault();
			return true;
		}
	}).e('keyup', function(evt)
	{
		evt.stopPropagation();
		search();
		
	}).$.focus();
	node.g('img:0').e('click', function(evt)
	{
		evt.stopPropagation();
		finish(true);
	});
	
	function finish(canceled)
	{
		if (canceled)
		{
			me.window.removeSelection();
			me.window.runAction(ac.chap.ACTION_CARET, {moveTo:[original_caret_pos[0], original_caret_pos[1]]});
			me.scrollToRow(me.window.caret.position[0], false, true);
			me.window.processActionResult(true, true);
		}
		ac.chap.setActiveComponent(me.window);
		me.hideInteractiveSearch();
	}
	
	function update_status(numFound)
	{
		status_node.t('Found <strong>?</strong> results.'.embed(numFound));
	}
	
	function search()
	{
		var keyword = search_key_node.$.value.trim();
		if ('' == keyword || last_keyword == keyword)
		{
			if ('' == keyword)
			{
				update_status(0);
			}
			return;
		}
		update_status(me.window.getText().split(keyword).length - 1);
		last_keyword = keyword;
		me.window.removeSelection();
		me.window.runAction(ac.chap.ACTION_CARET, {moveTo:[original_caret_pos[0], original_caret_pos[1]]});
		me.window.runAction(ac.chap.ACTION_CUSTOM, {action:'SetSearchKeyword', keyword:keyword});
		me.window.runAction(ac.chap.ACTION_CUSTOM, {action:'SearchKeyword', direction:'down'});
		me.scrollToRow(me.window.caret.position[0], false, true);
		me.window.processActionResult(true, true);
	}	
	
	if (null != selection)
	{
		search_key_node.$.value = selection;
		search_key_node.$.select();
		search_key_node.$.focus();
		search();
	}

	
	
	this.interactiveSearchNode = node;
}

ac.chap.View.prototype.hideInteractiveSearch = function()
{
	if (this.interactiveSearchNode && this.interactiveSearchNode.is())
	{
		this.interactiveSearchNode.rs();
	}
}

ac.chap.View.prototype.render = function(node)
{
	var w = node.$.offsetWidth;
	var h = node.$.offsetHeight;
	this.recalculateNumRows(node);
	this.recalculateNumCols(node);
	node.sa('chap-view', 'true');
	var me = this;
	this.nodeRoot = node.a($$()).pos(true).w(w).h(h).n('acw-chap').s('background:?'.embed(this.theme.background));
	this.interactiveSearchNode = null;
	
	var w_rows = 58;
	w -= w_rows;
	this.nodeSidebar = this.nodeRoot.a($$()).pos(true).x(0).y(0).w(w_rows).h(h).s('overflow:hidden').n('sidebar');

	// rendering sidebar stub
	this.renderSidebarStub();


	this.nodeScrollArea = this.nodeRoot.a($$()).pos(true).x(w_rows).y(0).w(w).h(h).n('scroll-area').s('overflow:auto');
	this.nodeScrollArea.e('scroll', function(evt)
	{
		var offset = Math.floor(me.nodeScrollArea.$.scrollTop/me.options.rowHeight);
		var map = me.window.row_id_map[me.index];
		var row_index = 0;
		for ( var i=0; i<map.length; i++ )
		{
			if ( row_index == offset )
			{
				row_index = i;
				break;
			}
//			if ( ac.chap.ROWSTATE_FOLD_EXPAND == (ac.chap.ROWSTATE_FOLD_EXPAND & map[i][2]) )
			if ( ac.chap.ROWSTATE_FOLD_EXPAND == (ac.chap.ROWSTATE_FOLD_EXPAND & map[i][2]) )
			{
				i = map[i][3][3];
			}
			row_index++;
		}
//		console.log('OFFSET %s  ROWINDEX %s', offset, row_index);
		me.startRow = row_index;
		me.startRowOffset = offset;
		if ( me == me.window.activeView )
		{
			me.hideCaret();
		}
		me.renderText();
		if ( me == me.window.activeView && me.startRow < me.window.caret.position[0] )
		{
			if ( null == me.window.selection )
			{
				me.showCaret(true);					
			}
		}
	});

	h -= $__tune.ui.scrollbarWidth;
	w -= $__tune.ui.scrollbarWidth+3;

	this.wrapWidth = w;
	this.wrapHeight = h;
	this.numCols = Math.floor(w/this.options.colWidth);

	this.nodeFillArea = this.nodeScrollArea.a($$()).pos(true).x(3).y(0).h(h).w((this.options.wordWrap?w:2000)-3).n('fill-area').s('overflow:hidden;background:?'.embed(this.theme.background));

	this.editAreaWidth = w;
	this.editAreaHeight = h;

	this.nodeSelectionArea = this.nodeFillArea.a($$()).pos(true).x(0).w(this.nodeFillArea.w()).y(0).h(h+this.options.rowHeight).n('selection-area').s('overflow:hidden').$;

	this.nodeEditArea = this.nodeFillArea.a($$()).pos(true).x(0).y(0).h(h+this.options.rowHeight).n('edit-area').s('overflow:hidden; color:?'.embed(this.theme.textColor)).e('click', function(evt)
	{
		me.window.captureEditAreaClick(evt, me);
	}).$;

	this.nodeEditAreaCache = node.a($$()).pos(true).x(-700).y(-1700).w(300).h(500).v(false).s('overflow:hidden').$;
}

ac.chap.View.prototype.renderSidebarStub = function()
{
	var node = this.nodeRoot;
	var h = node.$.offsetHeight;
	var w_rows = 58;
	
	this.nodeSidebar = $(this.nodeSidebar).rc();
	var node_sidebar_scroll = this.nodeSidebar.a($$()).pos(true).w(w_rows).h(h).x(0).y(0).s('overflow:hidden');
	var bar_offset = 0;
	var bookmark_off_y = Math.max(1, Math.floor(this.options.rowHeight - 11)/2);
	var me = this;
	for ( var i=0; i<=this.numRows; i++ )
	{
//		var bar_node = node_sidebar_scroll.a($$()).pos(true).x(10).y(bar_offset).w(30).s("font-family:'Lucida Grande', Tahoma, Arial, helvetica, sans-serif; font-size:9px; text-align:right; padding-top:1px; color:#777");
		var bar_node = node_sidebar_scroll.a($$()).w(w_rows).h(this.options.rowHeight).a($$()).pos(true).x(10).w(30).s('text-align:right;font-size:?px;color:#999;'.embed(this.window.options.font.size-2));
		bar_node.a($$('span')).s('font-size:?px;padding-top:1px'.embed(this.window.options.font.size-2));
		bar_node.a($$()).pos(true).x(-8).y(bookmark_off_y).w(11).h(11).n('void').e('click', function(evt)
		{
			evt.stop();
			var row_index = parseInt(evt.$.p().ga('row-index'));
			me.window.toggleBookmark(row_index);
			// for ( var i=0; i<me.window.views.length; i++ )
			// {
			// 	if ( 'undefined' == typeof me.window.row_id_map[i][row_index] )
			// 	{
			// 		return;
			// 	}
			// 	// marking as changed
			// 	me.window.row_id_map[i][row_index][1] = false;
			// 	var row_state = me.window.row_id_map[i][row_index][2];
			// 	if ( ac.chap.ROWSTATE_BOOKMARK == (row_state & ac.chap.ROWSTATE_BOOKMARK) )
			// 	{
			// 		// already bookmarked
			// 		me.window.row_id_map[i][row_index][2] &= (65535-ac.chap.ROWSTATE_BOOKMARK);
			// 	}
			// 	else
			// 	{
			// 		me.window.row_id_map[i][row_index][2] |= ac.chap.ROWSTATE_BOOKMARK;
			// 	}
			// }
			$runafter(100, function(){me.window.renderText()});
		});
		bar_node.a($$()).pos(true).x(34).y(bookmark_off_y-1).w(12).h(11).n('void').e('click', function(evt)
		{
			evt.stop();
			var row_index = parseInt(evt.$.p().ga('row-index'));
			for ( var i=0; i<me.window.views.length; i++ )
			{
				if ( 'undefined' == typeof me.window.row_id_map[i][row_index] )
				{
					return;
				}
//				me.window.row_id_map[i][row_index][1] = false;
				var row_state = me.window.row_id_map[i][row_index][2];
				if ( ac.chap.ROWSTATE_FOLD_EXPAND == (row_state & ac.chap.ROWSTATE_FOLD_EXPAND) )
				{
					// was collapsed, will expand
					me.window.views[i].expandFolding(row_index);
				}
				else
				{
					if ( ac.chap.ROWSTATE_FOLD_STOP == (row_state & ac.chap.ROWSTATE_FOLD_STOP) )
					{
						// end marker, getting referenced index
						row_index = me.window.row_id_map[i][row_index][3][1];
					}
					var end_row_index = me.window.row_id_map[i][row_index][3][1];
					me.window.row_id_map[i][row_index][2] |= ac.chap.ROWSTATE_FOLD_EXPAND;
					for ( var ii=row_index; ii<=end_row_index; ii++ )
					{
						me.window.row_id_map[i][ii][1] = false;
						if ( ii != row_index ) //&& ii != end_row_index )
						{
							if ( 0 == ( me.window.row_id_map[i][ii][2] & ac.chap.ROWSTATE_FOLD_COLLAPSED ) )
							{
								me.window.row_id_map[i][ii][2] |= ac.chap.ROWSTATE_FOLD_COLLAPSED;
							}
						}
					}
					me.window.views[i].recalculateVisibleRows();
//					me.window.views[i].numVisibleRows -= (end_row_index-row_index);
//					alert(me.numVisibleRows);
				}
			}
			$runafter(100, function(){me.window.renderText(true)});
		});
		bar_offset += this.options.rowHeight;
	}
	this.nodeSidebar = this.nodeSidebar.$;
}

ac.chap.View.prototype.renderChunk = function(chunk)
{
	var tokens = [];
	var n = this.window.language.chunkRules.length;
	if ( this.window.options.syntaxHighlightingEnabled )
	{
		for ( var i=0; i<n; i++ )
		{
			var m = true;
			var r_offset = 0;
			var r_chunk = chunk;
			var re = this.window.language.chunkRules[i][0];
			var result_index = this.window.language.chunkRules[i][1];
			var token_type = this.window.language.chunkRules[i][2];
			var infinite_check = 200;
			while ( '' != r_chunk && null != m )
			{
				if ( 0 == infinite_check-- )
				{
					console.warn('Error in RegExp definition (chunk): %s for: %s.', re, r_chunk);
					break;
				}
				// console.log(r_chunk);
				m = re.exec(r_chunk);
				if ( null != m)
				{
					if (!m[result_index])
					{
						console.warn('Error in RegExp definition (invalid result index: %i): %s for: %s', result_index, re, r_chunk);
						continue;
					}
					var index = m.index + m[0].indexOf(m[result_index]);
					tokens[r_offset + index] = [token_type, m[result_index]];
					r_offset += index + m[result_index].length;
					r_chunk = r_chunk.substr(index+m[result_index].length);
					// console.log('%o, index:%s, len:%s, %s', m, index, m[result_index].length, m[result_index]);
				}
			}
		}
	}
	//console.log(tokens);
	n = tokens.length;
	var font_style = ';font:' + this.window.options.font.size + 'px ' + this.window.options.font.family;
	if ( 0 < n )
	{
		var rend_chunk = '';
		var offset = 0;
		for ( i=0; i<n; i++ )
		{
			if ( 'undefined' == typeof tokens[i] || '' == tokens[i][1] )
			{
				continue;
			}
			var token = tokens[i];
			rend_chunk += ch_encode_markup(chunk.substr(offset, i-offset));
			if ( this.theme.colorScheme[token[0]] )
			{
				rend_chunk += '<span style="' + this.theme.colorScheme[token[0]] + font_style + '">' + ch_encode_markup(token[1]) + '</span>';				
			}
			else
			{
				rend_chunk += ch_encode_markup(token[1]);
			}
			i += token[1].length - 1;
			// offset = i + token[1].length;
			offset = i + 1;
			// console.log(token, offset, rend_chunk);
		}
		rend_chunk += ch_encode_markup(chunk.substr(offset));
		chunk = rend_chunk;
	}
	else
	{
		chunk = ch_encode_markup(chunk);
	}
	return chunk;
}

ac.chap.View.prototype.renderTextRow = function(node, rowIndex, renderedPreviously)
{
	var row = this.window.char_map[rowIndex];
	var rendered_row = '';
	var offset = 0;
	var font_style = ';font:' + this.window.options.font.size + 'px ' + this.window.options.font.family;
	var interpolation = this.window.language.stringInterpolation;

	var row_state = this.window.row_id_map[this.index][rowIndex][2];

	if ( 'undefined' != typeof this.window.syntax_map[rowIndex] && 0 < this.window.syntax_map[rowIndex].length )
	{
		// console.log(this.window.syntax_map[rowIndex]);
		var n = this.window.syntax_map[rowIndex].length;
		for ( var i=0; i<n; i++ )
		{
			var row_syntax = this.window.syntax_map[rowIndex][i];
			var token_type = row_syntax[0];
			var start_offset = row_syntax[1];
			if ( -1 == start_offset )
			{
				start_offset = 0;
			}
			var end_offset = row_syntax[2]

			rendered_row += this.renderChunk(row.substr(offset, start_offset-offset));
			var chunk = -1 == end_offset ? row.substr(start_offset) : row.substr(start_offset, end_offset-start_offset);
			if ( this.theme.colorScheme[token_type] )
			{
				if (interpolation && ac.chap.TOKEN_DOUBLE_QUOTED == token_type )
				{
					// console.log('interpolate: %s', chunk);
					var re = new RegExp(interpolation[0], 'i');
					var m = null;
					var new_chunk = '';
					while (true)
					{
						// console.info('passing: %s', chunk);
						m = re.exec(chunk);
						if (!m)
						{
							// console.log('nada');
							break;
						}
						// for (var i in m)
						// {
						// 	console.debug(i + ':' + m[i]);
						// }
						new_chunk += '<span style="' + this.theme.colorScheme[token_type] + font_style + '">' + ch_encode_markup(chunk.substring(0, m.index)) + '</span>';
						new_chunk += this.renderChunk(chunk.substr(m.index, m[interpolation[1]].length));
						chunk = chunk.substr(m.index + m[interpolation[1]].length);
						// console.warn(chunk);
					}
					new_chunk += '<span style="' + this.theme.colorScheme[token_type] + font_style + '">' + ch_encode_markup(chunk) + '</span>';
					// console.info(new_chunk);
					rendered_row += new_chunk;
				}
				else
				{
					rendered_row += '<span style="' + this.theme.colorScheme[token_type] + font_style + '">'+ch_encode_markup(chunk)+'</span>';					
					// console.log(rendered_row);
				}
			}
			else
			{
				rendered_row += ch_encode_markup(chunk);
			}
			offset = -1 == end_offset ? row.length : end_offset;
		}		
	}
	rendered_row += this.renderChunk(row.substr(offset));
	// console.log(rendered_row);
	// rendering custom selection (search results, errors and such)
	// !!!!!!!!!!
	// NOT USED NOW !!!!!
	// !!!!!!!!!!
	// !!!!!!!!!!
	// !!!!!!!!!!
	// !!!!!!!!!!
	if ( false && ac.chap.ROWSTATE_SELECTION == (row_state & ac.chap.ROWSTATE_SELECTION) )
	{
		var range = this.window.row_id_map[this.index][rowIndex][5];
		if ( 0 == range[0] && this.window.char_map[rowIndex].length == range[1] )
		{
			rendered_row = '<span style="width:auto;display:block;'+(''==rendered_row ? ('height:'+this.options.rowHeight+'px;'):'')+this.theme.selectionStyle+'">'+rendered_row+'</span>';
		}
		else
		{
	//		console.log(range);
			var raw = rendered_row;
			var n = raw.length;
			var col_index = 0;
			var selection_started = false;
			var offset = 0;
		//	console.log('before: %s', raw);
			for ( var i=0; i<n; i++ )
			{
				//console.log('step %s: %s', i, rendered_row);
				var ch = raw.charAt(i);
				if ( '<' == ch )
				{
					if ( selection_started )
					{
						var c = '</span>';
						rendered_row = rendered_row.substr(0, i+offset)+c+rendered_row.substr(i+offset);
						offset += c.length;
					}
					var ix = raw.substr(i).indexOf('>');
					i += ix;
		//			console.log('ix: %s', ix);

					if ( selection_started )
					{
						var c = '<span style="'+this.theme.selectionStyle+'">';
						rendered_row = rendered_row.substr(0, i+offset+1)+c+rendered_row.substr(i+offset+1);
						offset += c.length;
					}
					continue;
				}
				if ( range[0] == col_index )
				{
					selection_started = true;
					var c = '<span style="'+this.theme.selectionStyle+'">';
					rendered_row = rendered_row.substr(0, i+offset)+c+rendered_row.substr(i+offset);
					offset += c.length;
				}
				if ( selection_started && range[1]-1 < col_index )
				{
					selection_started = false;
					var c = '</span>';
					rendered_row = rendered_row.substr(0, i+offset)+c+rendered_row.substr(i+offset);
					break;
				}
				if ( '&' == ch )
				{
					if ( '&lt;' == raw.substr(i, 4) || '&gt;' == raw.substr(i, 4) )
					{
						i += 3;
					}
					else if ( '&amp;' == raw.substr(i, 5) )
					{
						i += 4;
					}
				}
				col_index++;
			}
			if ( selection_started )
			{
				rendered_row += '</span>';
			}
		}
	}
//	console.log(rendered_row);
	// making intelligent tabelators - note, using simple replace of \t doesn't work
	var ix = 0;
	var tab = this.options.tabelator;
	var raw = this.window.char_map[rowIndex];
	var tab_stack = [];
	while ( -1 != ix )
	{
		ix = raw.indexOf('\t');
		if ( -1 != ix )
		{
			var tab_length = tab.length - (ix % tab.length);
			raw = raw.substr(0,ix)+tab.substr(0, tab_length)+raw.substr(ix+1);
			tab_stack.push(tab_length);
		}
	}
	for ( var i=0; i<tab_stack.length; i++ )
	{
		rendered_row = rendered_row.replace(/\t/, tab.substr(0, tab_stack[i]));
	}
	// word wrap
	var num_subrows = 1;
	if ( this.options.wordWrap && this.numCols < raw.length )
	{
		var raw = rendered_row;

		var printable = '';
		var n = rendered_row.length;
		var offset = 1;
		for ( i=0; i<n; i++ )
		{
			var ch = rendered_row.charAt(i);
			if ( '<' == ch && 'b' != rendered_row.charAt(i+1) )
			{
				ix = rendered_row.substr(i).indexOf('>');
				if ( -1 == ix )
				{
					break;
				}
				i += ix;
				continue;
			}
			var n_ch = 0;
			if ( '&' == ch )
			{
				if ( '&lt;' == rendered_row.substr(i,4) || '&gt;' == rendered_row.substr(i,4) )
				{
					n_ch = 3;
				}
				else if ( '&amp;' == rendered_row.substr(i,5) )
				{
					n_ch = 4;
				}
			}
			printable += ch.charAt(0);
			if ( this.numCols == printable.length )
			{
				raw = raw.substr(0, i+offset+n_ch)+'<br>'+raw.substr(i+offset+n_ch);
				num_subrows++;
				offset += 4;
				printable = '';
			}
			i += n_ch;
		}
		rendered_row = raw;
	}
	if ( ac.chap.ROWSTATE_FOLD_EXPAND == (row_state & ac.chap.ROWSTATE_FOLD_EXPAND) )
	{
		var end_index = this.window.row_id_map[this.index][rowIndex][3][1];
		var content = ch_encode_markup(this.window.char_map.slice(rowIndex, end_index+1).join('\n').replace(/"/ig, "''"));
		rendered_row += '<a href="javascript:ac.chap.route(\'expand-folding\', \'window-id\', '+this.index+', '+rowIndex+')"><div class="folding-expand-inner" style="position:absolute" title="?"></div></a>'.embed(content);
	}
	node.setAttribute('num-subrows', num_subrows);
	
	if ( $__tune.isIE )
	{
		// IE trims input source in innerHTML
	    rendered_row = ch_encode_markup_spaces(rendered_row);
	}
	node.innerHTML = rendered_row;
}

ac.chap.View.prototype.recalculateVisibleRows = function()
{
	var map = this.window.row_id_map[this.index];
	var n = map.length;
	var i = 0;
	var num_visibles = 0;
	while ( i < n )
	{
		var state = map[i][2];
		if ( 0 == (ac.chap.ROWSTATE_FOLD_COLLAPSED & state) )
		{
			num_visibles++;
		}
		i++;
	}
	this.numVisibleRows = num_visibles;
}

ac.chap.View.prototype.getVisibleRowIndices = function()
{
	var map = this.window.row_id_map[this.index];
	var i = 0;
	var index = this.startRow;
	var indices = [];
	while ( i++ <= this.numRows )
	{
		if ( 'undefined' == typeof this.window.row_id_map[this.index][index] )
		{
			break;
		}
		var state = this.window.row_id_map[this.index][index][2];
		if ( ac.chap.ROWSTATE_FOLD_COLLAPSED == (ac.chap.ROWSTATE_FOLD_COLLAPSED & state) )
		{
			// collapsed
			i--;
			index++;
			continue;
		}
		indices.push(index);
		if ( ac.chap.ROWSTATE_FOLD_EXPAND == (state & ac.chap.ROWSTATE_FOLD_EXPAND) )
		{
			// collapsed folding
			var refered_row_index = this.window.row_id_map[this.index][index][3][1];
			index = refered_row_index + 1;
		}
		else
		{
			index++;
		}
	}
	return indices;
}

ac.chap.View.prototype.renderRowSidebar = function(position, rowIndex, rowNode, forceCompleteRedraw)
{
	if (!this.nodeSidebar.firstChild.childNodes.item(position))
	{
		return;
	}
	var bar_node = this.nodeSidebar.firstChild.childNodes.item(position).firstChild;
	if ( 0 == rowNode.offsetHeight )
	{
		rowNode.style.height = this.options.rowHeight;
	}
	var num_subrows = parseInt(rowNode.getAttribute('num-subrows'));
	var cache_id = forceCompleteRedraw ? 'none' : (num_subrows+':'+this.window.row_id_map[this.index][rowIndex].join('-'));
	if (bar_node.getAttribute('sidebar-cache-id') == cache_id && 'none' != cache_id)
	{
		return;
	}
	if ('none' != cache_id)
	{
		bar_node.setAttribute('sidebar-cache-id', cache_id);
		bar_node.firstChild.style.fontSize = (this.window.options.font.size-2) + 'px';
	}
	// console.log(cache_id);
	
	var row_height = num_subrows * this.options.rowHeight;
	bar_node.parentNode.style.height = row_height + 'px';
	if (forceCompleteRedraw)
	{
		bar_node.firstChild.style.fontSize = (this.window.options.font.size-2) + 'px';		
	}
	var ht = rowIndex+1;
	if ( this.options.wordWrap )
	{
		var htt = '<div style="height:'+this.options.rowHeight+'px;" class="wrapped-row"></div>';
		for ( var i=1; i<num_subrows; i++ )
		{
			ht += htt;
		}
	}
	bar_node.firstChild.innerHTML = ht;
	bar_node.setAttribute('row-index', rowIndex);

	var row_state = this.window.row_id_map[this.index][rowIndex][2];
	var fold_marker = (ac.chap.ROWSTATE_FOLD_START == (row_state & ac.chap.ROWSTATE_FOLD_START)) || (ac.chap.ROWSTATE_FOLD_STOP == (row_state & ac.chap.ROWSTATE_FOLD_STOP));
	if ( !fold_marker )
	{
		bar_node.lastChild.className = 'void';
	}
	else
	{
		bar_node.lastChild.style.display = 'block';
		if ( ac.chap.ROWSTATE_FOLD_EXPAND == (row_state & ac.chap.ROWSTATE_FOLD_EXPAND) )
		{
			// folding may expand
			bar_node.lastChild.className = 'folding-expand';
		}
		else
		{			
			if ( ac.chap.ROWSTATE_FOLD_START == (row_state & ac.chap.ROWSTATE_FOLD_START) )
			{
				// folding starts
				bar_node.lastChild.className = 'folding-start';
			}

			if ( ac.chap.ROWSTATE_FOLD_STOP == (row_state & ac.chap.ROWSTATE_FOLD_STOP) )
			{
				// folding stops
				bar_node.lastChild.className = 'folding-stop';
			}				
		}
	}
	if ( ac.chap.ROWSTATE_BOOKMARK == (row_state & ac.chap.ROWSTATE_BOOKMARK) )
	{
		// bookmark
		bar_node.firstChild.nextSibling.className = 'bookmark-default';
	}
	else
	{
		bar_node.firstChild.nextSibling.className = 'void';
	}	
}

ac.chap.View.prototype.renderSelection = function()
{
	var row_indices = this.getVisibleRowIndices();
	var num_rows = row_indices.length;
	var node_cache = document.createElement('div');
	var tab = this.options.tabelator;
	// console.log('RENDER SELECTION for: ');
	for ( var i=0; i<num_rows; i++ )
	{
		var row_index = row_indices[i];
		if (!this.window.row_id_map[this.index][row_index])
		{
			continue;
		}
		// console.log('row: %o', this.window.row_id_map[this.index][row_index]);
		var row_state = this.window.row_id_map[this.index][row_index][2];
		if ( ac.chap.ROWSTATE_SELECTION == (row_state & ac.chap.ROWSTATE_SELECTION) )
		{
			var node_row = document.getElementById('row-'+this.window.instanceId+'-'+this.index+'-'+row_index);
			if ( null == node_row )
			{
				continue;
			}
			var range = [this.window.row_id_map[this.index][row_index][5][0], this.window.row_id_map[this.index][row_index][5][1]];
			// console.log('selection range: %o', range);
//			console.log(range);
			if ( -1 == range[1] )
			{
				continue;
			}
			var render_whole_row = false;
			if ( 0 == range[0] && this.window.char_map[row_index].length == range[1] )
			{
				render_whole_row = ( this.window.row_id_map[this.index][row_index+1] && ac.chap.ROWSTATE_SELECTION == (this.window.row_id_map[this.index][row_index+1][2] & ac.chap.ROWSTATE_SELECTION) );
			}
			var cachid = range[0]+'-'+range[1];
			var node_id = 'rsel-'+this.window.instanceId+'-'+this.index+'-'+row_index;
			var node_row_selection = document.getElementById(node_id);
			if ( null != node_row_selection && node_row_selection.getAttribute('cachid') == cachid)
			{
				node_row_selection.style.top = node_row.offsetTop + 'px';
				node_cache.appendChild(node_row_selection);
			}
			else
			{
				node_row_selection = node_cache.appendChild(document.createElement('div'));
				node_row_selection.id = node_id;
				node_row_selection.style.background = this.theme.selectionStyle;
				node_row_selection.style.position = 'absolute';
				node_row_selection.style.top = node_row.offsetTop + 'px';
				node_row_selection.setAttribute('cachid', cachid);
				node_row_selection.style.height = this.options.rowHeight + 'px';
				if ( render_whole_row )
				{
					node_row_selection.style.left = '0px';
					node_row_selection.style.width = node_row.offsetWidth + 'px';
					node_row_selection.style.height = node_row.offsetHeight + 'px';
				}
				else
				{
					if ( this.options.wordWrap )
					{
						var raw_row = this.window.char_map[row_index];
						var ix_c = 0;
						var ix_r = 0;
						var offset = [0,-1, 0,-1];
						for ( var ii=0; ii<raw_row.length; ii++ )
						{
							var ch = raw_row.charAt(ii);
							if ( ii == range[0] )
							{
								offset[0] = ix_r;
								offset[1] = ix_c;
							}
							if ( '\t' == ch )
							{
								var tab_length = tab.length - (ix_c % tab.length);
								ix_c += tab_length;
							}
							else
							{
								ix_c++;
							}
							if ( ix_c > this.numCols )
							{
								ix_r++;
								ix_c -= this.numCols;
							}
							if ( ii == range[1] )
							{
								offset[2] = ix_r;
								offset[3] = ix_c;
								break;
							}
						}
						if ( -1 == offset[3] )
						{
							offset[2] = ix_r+1;//offset[0]+1;
						}
						node_row_selection.style.top = (node_row.offsetTop + this.options.rowHeight*offset[0]) + 'px';
//						console.log('%o', offset);
						if ( offset[0] == offset[2] )
						{
							// selection stays non-wrapped
							node_row_selection.style.left = offset[1]*this.options.colWidth + 'px';
							node_row_selection.style.width = ((offset[3]-offset[1])*this.options.colWidth) + 'px';
//							console.log(node_row_selection.style.width);
						}
						else
						{
							// finishing current node
							if ( -1 == offset[1] )
							{
								// caret stays on the end of the row
								node_row_selection.style.left = (ix_c*this.options.colWidth) + 'px';
								node_row_selection.style.width = (node_row.offsetWidth - (ix_c*this.options.colWidth)) + 'px';								
							}
							else
							{
								node_row_selection.style.left = (offset[1]*this.options.colWidth) + 'px';
								node_row_selection.style.width = (node_row.offsetWidth - (offset[1]*this.options.colWidth)) + 'px';								
							}
							// marking as non-cacheable
							node_row_selection.removeAttribute('cachid');
							// creating additional ones
							for ( ii=offset[0]+1; ii<=offset[2]; ii++ )
							{
								node_row_selection = node_cache.appendChild(document.createElement('div'));
								node_row_selection.style.background = this.theme.selectionStyle;
								node_row_selection.style.position = 'absolute';
								node_row_selection.style.left = '0px';
								node_row_selection.style.top = (node_row.offsetTop+ii*this.options.rowHeight) + 'px';
								node_row_selection.style.height = this.options.rowHeight + 'px';
								if ( ii != offset[2] )
								{
									node_row_selection.style.width = node_row.offsetWidth + 'px';									
								}
								else
								{
									node_row_selection.style.width = ((offset[3])*this.options.colWidth) + 'px';
								}
							}
						}
						
					}
					else
					{
						var offset_x1 = this.getRenderedStringDimension(row_index, 0, range[0])[0];
						var offset_x2 = this.getRenderedStringDimension(row_index, 0, range[1]+1)[0];
						node_row_selection.style.left = offset_x1 + 'px';
						node_row_selection.style.width = (offset_x2 - offset_x1) + 'px';
					}
				}
			}
			// console.log('selection after range: %o', this.window.row_id_map[this.index][row_index][3]);
			
		}
	}
	// console.log('%o', this.window.row_id_map[this.index][0]);
	var ht = node_cache.innerHTML;
	this.nodeSelectionArea.innerHTML = ht;
}

ac.chap.View.prototype.renderText = function(forceCompleteRedraw)
{
	var row_indices = this.getVisibleRowIndices();
	var num_rows = row_indices.length;
//	console.log('view: %s - row indices: %o', this.index, row_indices);

//	console.log('view: %s - num rows x cols [%s x %s]', this.index, this.numRows, this.numCols);
	// checking to see if only one row changed - the most usual case
	var changed_row_index = -1;
	var changed_row_position = -1;
	for ( var i=0; i<num_rows; i++ )
	{
		var row_index = row_indices[i];
		if ( !this.window.row_id_map[this.index][row_index][1] )
		{
			// changed
			if (-1 == changed_row_index)
			{
				changed_row_index = row_index;
				changed_row_position = i;
			}
			else
			{
				// more than two rows changed
//				console.log('changed on '+row_index);
				changed_row_index = -2;
				break;
			}
		}
	}
//	console.log('changed row: %s', changed_row_index);
//	console.log('rendered for %s ? %s', this.index, this.window.row_id_map[this.index][2][1] ? 'YES' : 'NO');
	var scroll_hash = this.index+'-'+row_indices.length+'-'+this.window.row_id_map[this.index][row_indices[0]][0]+'-'+this.window.row_id_map[this.index][row_indices[row_indices.length-1]][0]+'-'+this.nodeScrollArea.$.scrollHeight+'-'+Math.floor(this.nodeScrollArea.$.scrollTop/this.options.rowHeight);
//	console.log('hash: %s  changed index: %s', scroll_hash, changed_row_index);
	var already_rendered = -2 != changed_row_index && (null != this.nodeEditArea.getAttribute('last-scroll')) && (this.nodeEditArea.getAttribute('last-scroll') == scroll_hash);
	this.nodeEditArea.setAttribute('last-scroll', scroll_hash);

	if ( already_rendered && 0 <= changed_row_index )
	{
		// one row change
		var row_node = document.getElementById('row-'+this.window.instanceId+'-'+this.index+'-'+changed_row_index);
		if ( null != row_node && null != row_node.parentNode && this.window.row_id_map[this.index][changed_row_index][0] == row_node.getAttribute('row-id') )
		{
			this.renderTextRow(row_node, changed_row_index);
			if ( '' == row_node.innerHTML )
			{
				row_node.style.height = this.options.rowHeight+'px';
			}
			else
			{
				row_node.style.height = null;
			}
			this.renderRowSidebar(changed_row_position, changed_row_index, row_node);

			this.window.row_id_map[this.index][changed_row_index][1] = true;
			already_rendered = true;
//			console.log('view: %s, one row only %s', this.index, changed_row_index);
		}
	}
	var top_offset = - this.nodeScrollArea.$.scrollTop % this.options.rowHeight;
	var row_width = (this.options.wordWrap ? this.wrapWidth : this.nodeFillArea.$.offsetWidth)+'px';
	if ( forceCompleteRedraw || !already_rendered )
	{
//		var num_rendered_subrows = 0;
		for ( i=0; i<num_rows; i++ )
		{
			var row_index = row_indices[i];

			var is_row_changed = !this.window.row_id_map[this.index][row_index][1];

			// marking row as unchanged
			this.window.row_id_map[this.index][row_index][1] = true;
			
			var row_node = document.getElementById('row-'+this.window.instanceId+'-'+this.index+'-'+row_index);
			if ( !is_row_changed )
			{
				is_row_changed = (null == row_node) || (null == row_node.parentNode) || (row_node.getAttribute('row-id') != this.window.row_id_map[this.index][row_index][0]);
			}
			if ( null == row_node || null == row_node.parentNode )
			{
				is_row_changed = true;
				
				// console.log(this.options.rowTemplate);
				row_node = this.options.rowTemplate.cloneNode(false);
				row_node.id = 'row-'+this.window.instanceId+'-'+this.index+'-'+row_index;
				row_node.style.width = row_width;
				row_node.setAttribute('row-index', row_index);
			}
			if ( forceCompleteRedraw || is_row_changed )
			{
				row_node.setAttribute('row-id', this.window.row_id_map[this.index][row_index][0]);
				if (forceCompleteRedraw)
				{
					row_node.style.minHeight = this.options.rowTemplate.style.minHeight;
					row_node.style.lineHeight = this.options.rowTemplate.style.lineHeight;
					row_node.style.font = this.options.rowTemplate.style.font;
				}
				this.renderTextRow(row_node, row_index);
			}
			if ( '' == row_node.innerHTML )
			{
				row_node.style.height = this.options.rowHeight+'px';
			}
			else
			{
				row_node.style.height = null;
			}
			this.nodeEditAreaCache.appendChild(row_node);

			// rendering side bar
			this.renderRowSidebar(i, row_index, row_node, forceCompleteRedraw);
			//num_rendered_subrows += parseInt(row_node.getAttribute('num-subrows'));
		}
		// clearing remaining sidebar rows
		for ( i=num_rows; i<this.numRows; i++ )
		{
			if (this.nodeSidebar.firstChild.childNodes.item(i) && this.nodeSidebar.firstChild.childNodes.item(i).firstChild)
			{
				var bar_node = this.nodeSidebar.firstChild.childNodes.item(i).firstChild;
				bar_node.lastChild.className = 'void';
				bar_node.firstChild.nextSibling.className = 'void';
				bar_node.firstChild.innerHTML = '';
			}
		}

		this.nodeEditArea.style.top = this.nodeSelectionArea.style.top = (this.startRowOffset*this.options.rowHeight)+'px';
		if ( $__tune.isSafari )
		{
			// Safari is extremely fast when doing DOM
			this.nodeEditArea.innerHTML = '';
			while ( this.nodeEditAreaCache.firstChild )
			{
				this.nodeEditArea.appendChild(this.nodeEditAreaCache.firstChild);
			}
		}
		else
		{
			// other browsers are a bit lazy..
			var ht = this.nodeEditAreaCache.innerHTML
			this.nodeEditArea.innerHTML = ht;
			this.nodeEditAreaCache.innerHTML = '';
		}

// TODO: NNN is the number of subrows in WHOLE document.. hard to calculate on-the-fly (too slow), affects word-wrapped documents only..
//		var fill_area_h = (this.numVisibleRows+NNN)*this.options.rowHeight;
//		console.log('num visible for view :%s = %s, row_id.len = %s', this.index, this.numVisibleRows, this.window.row_id_map[this.index].length);

		var fill_area_h = (this.numVisibleRows+2)*this.options.rowHeight;
		if ( this.nodeRoot.h()-$__tune.ui.scrollbarWidth > fill_area_h )
		{
			fill_area_h = this.nodeRoot.h()-$__tune.ui.scrollbarWidth;
		}
		this.nodeFillArea.h(fill_area_h);
		
	}
	else
	{
		this.nodeEditAreaCache.innerHTML = '';
	}
	if ( parseInt(this.nodeSidebar.firstChild.style.top) != top_offset )
	{
		this.nodeSidebar.firstChild.style.top  = (top_offset)+'px';
		this.nodeSidebar.firstChild.style.height  = (this.nodeSidebar.offsetHeight - $__tune.ui.scrollbarWidth - top_offset)+'px';		
	}
	this.renderSelection();
}



/*
 * ac.Chap - Text Editing Component widget - Settings file
 */

if ( 'undefined' == typeof ac )
{
	var ac = {chap:{}};
}


$class('ac.chap.KeyMap',
{
	construct:function()
	{
		this.definition = {};
		this.isMac = true;
		this.wordCompleteCache = null;
		this.snippetCompleteCache = null;
		this.searchKeyword = '';
		this.initDefinition();
	}
});

ac.chap.KeyMap.prototype.initDefinition = function()
{
}

ac.chap.KeyMap.prototype.importCommands = function(commands)
{
	var n = commands.length;
	for ( var i=0; i<n; i++ )
	{
		var command = commands[i];
		if ( $isset(command.key_activation) )
		{
//			console.debug('Compiling key `?` for snippet #?'.embed(snippet.key_activation, i));
			this.compile("KEY: ?\ncustom(action:'RunCommand', commandIndex:?)\n".embed(command.key_activation, i));
		}
	}
}

ac.chap.KeyMap.prototype.importSnippets = function(snippets)
{
	var n = snippets.length;
	for ( var i=0; i<n; i++ )
	{
		var snippet = snippets[i];
		if ( $isset(snippet.key_activation) )
		{
//			console.debug('Compiling key `?` for snippet #?'.embed(snippet.key_activation, i));
			this.compile("KEY: ?\ncustom(action:'RunSnippet', snippetIndex:?)\n".embed(snippet.key_activation, i));
		}
	}
//	console.debug('%o',this.definition);
}

ac.chap.KeyMap.prototype.action_NotDefined = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	console.warn('There is no custom action defined for key code: %s and control keys mask: %s.', keyCode, controlKeysMask);
}

ac.chap.KeyMap.prototype.action_RunCommand = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	var command = $getdef(component.commands[params.commandIndex], null);
	if ( null == command )
	{
		console.warn('There is no command at index `%s`.', params.commandIndex);
		return;
	}
	return component.runCommand(keyCode, controlKeysMask, caretRow, caretCol, command, params);
}

ac.chap.KeyMap.prototype.action_RunSnippet = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	var snippet = $getdef(component.snippets[params.snippetIndex], null);
	if ( null == snippet )
	{
		console.warn('There is no snippet at index `%s`.', params.snippetIndex);
		return;
	}
	return this.snippetInit(snippet, component, caretRow, caretCol, true);
}

ac.chap.KeyMap.prototype.action_RunVirtualSnippet = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	var result = this.snippetInit(params.snippet, component, caretRow, caretCol, true);
	return result;
}


ac.chap.KeyMap.prototype.action_ToggleBookmark = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	component.toggleBookmark(caretRow);
	$runafter(100, function(){component.renderText()});
	return 0;
}

ac.chap.KeyMap.prototype.action_GoToBookmark = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	component.scrollToBookmark(caretRow, params['direction']);
	return 0;
}

ac.chap.KeyMap.prototype.action_WordComplete = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	if ( !component.language.wordDelimiter.test(component.getCharAt(caretRow, caretCol-1)) )
	{
		// no word char before caret
		return;
	}
	var wcc = this.wordCompleteCache;
	if ( !wcc )
	{
		wcc = {position:[-1,-1], results:[], index:-1};
	}
	var proceed_complete = false;
	if ( wcc.position[0] != caretRow || wcc.position[1] != caretCol )
	{
		// new search
		var max_words = 300;
		var words_prev = component.getWordAt(caretRow, caretCol, -max_words-1);
		var words_next = component.getWordAt(caretRow, caretCol, max_words);
		var looking_for = words_prev[0];
		var looking_for_len = looking_for.length;
//		console.log('new search for: %s', looking_for);
		var found_words = [looking_for];
		var found_words_index = '';
		for ( var i=0; i<max_words; i++ )
		{
			if ( words_prev[i+1] && words_prev[i+1].length > looking_for_len && words_prev[i+1].substr(0, looking_for_len) == looking_for )
			{
				if ( -1 == found_words_index.indexOf(' '+words_prev[i+1]) )
				{
					found_words.push(words_prev[i+1]);
					found_words_index += ' '+words_prev[i+1];
				}
			}
			if ( words_next[i] && words_next[i].length > looking_for_len && words_next[i].substr(0, looking_for_len) == looking_for )
			{
				if ( -1 == found_words_index.indexOf(' '+words_next[i]) )
				{					
					found_words.push(words_next[i]);
					found_words_index += ' '+words_next[i];
				}
			}
		}
		if ( 1 < found_words.length )
		{
//			console.log('results found: %o', found_words);
			wcc.results = found_words;
			wcc.index = 0;
			proceed_complete = true;
		}
	}
	else
	{
		proceed_complete = true;
	}
	var num_results = wcc.results.length;
	if ( proceed_complete && 0 < num_results )
	{
		var index = wcc.index;
		index += params.direction ? 1 : -1;
		if ( num_results <= index )
		{
			index = 0;
		}
		else if ( 0 > index )
		{
			index = num_results-1;
		}
//		console.log('n:%s i:%s', num_results, index);
		// let's not add the following operation to the transaction/undo log
		component.stopTransactionLog();
		component.runAction(ac.chap.ACTION_CARET, {move:'prev_word'});
		component.runAction(ac.chap.ACTION_SELECTION, {add:true});
		component.runAction(ac.chap.ACTION_DELETE, {character:false});
		component.runAction(ac.chap.ACTION_INSERT, {string:wcc.results[index]});
		component.startTransactionLog();
		wcc.index = index;
		wcc.position = [component.caret.position[0], component.caret.position[1]];
	}
	else
	{
		wcc.results = [];
	}
	this.wordCompleteCache = wcc;
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
}

ac.chap.KeyMap.prototype.getAffectedRows = function(component, caretRow)
{
	var from_row = caretRow;
	var to_row = caretRow;
	if (null != component.selection)
	{
		var start_pos = component.selection.startPosition[0];
		var end_pos = component.selection.endPosition[0];
		if (-1 == component.selection.endPosition[1])
		{
			end_pos--;
		}
		from_row = Math.min(start_pos, end_pos);
		to_row = Math.max(start_pos, end_pos);
	}
	return [from_row, to_row];
}

ac.chap.KeyMap.prototype.action_Indent = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	var affected_rows = this.getAffectedRows(component, caretRow);
	var tab = component.getTabelator();
	for (var i=affected_rows[0]; i<=affected_rows[1]; i++)
	{
		if ('right' == params.direction)
		{
			component.insertIntoCharacterMap(tab, i, 0);			
		}
		else
		{
			var row = component.char_map[i];
			var index = 0;
			while (('\t' == row.charAt(index) || ' ' == row.charAt(index)) && (row.length > index) && (tab.length > index)) index++;
			if (0 < index)
			{
				component.removeFromCharacterMap(i, 0, i, index);
			}
		}
	}
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT | ac.chap.ACTION_RES_SELECTIONCHANGED;	
}

ac.chap.KeyMap.prototype.action_Comment = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	if (!component.language)
	{
		return 0;
	}
	var markers = component.language.singleRowCommentStartMarkers;
	if (0 == markers.length)
	{
		return 0;
	}
	var marker = markers[0];
	var tab = component.getTabelator();
	var affected_rows = this.getAffectedRows(component, caretRow);
	var tab = component.getTabelator();
	var prepend_text = marker + ' ';
	for (var i=affected_rows[0]; i<=affected_rows[1]; i++)
	{
		var row = component.char_map[i];
		var index = row.indexOf(marker);
		if (-1 != index && 0 == row.substring(0, index).replace(tab, '').replace(' ', ''))
		{
			// was commented
			component.removeFromCharacterMap(i, 0, i, index+marker.length);
		}
		else
		{
			// will be commented
			component.insertIntoCharacterMap(marker, i, 0);
		}
	}
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT | ac.chap.ACTION_RES_SELECTIONCHANGED;	
}

ac.chap.KeyMap.prototype.action_RuntimeOption = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	component.setRuntimeOption(params['key'], params['value']);
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT | ac.chap.ACTION_RES_SELECTIONCHANGED;	
}

ac.chap.KeyMap.prototype.action_SearchInteractive = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	component.showInteractiveSearch();
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_SELECTIONCHANGED;
}

ac.chap.KeyMap.prototype.action_SetSearchKeyword = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	if (params['keyword'])
	{
		this.searchKeyword = params['keyword'];
		return 0;
	}
	if (component.selection && component.selection.startPosition[0] == component.selection.endPosition[0])
	{
		this.searchKeyword = component.getSelection();
		return ac.chap.ACTION_RES_SELECTIONCHANGED;
	}
	return 0;
}

ac.chap.KeyMap.prototype.action_SearchKeyword = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	if ('' == this.searchKeyword)
	{
		return 0;
	}
	row_index = caretRow;
	var index = 0;
	var search_down = 'down' == params['direction'];
	do
	{
		var row = component.char_map[row_index];
		var offset = 0;
		console.log(ac.chap.activeComponent.activeView);
		if (row_index == caretRow)
		{
			if (search_down)
			{
				// if (row.substring(caretCol, this.searchKeyword.length) == this.searchKeyword)
				// {
				// 	// offset = this.searchKeyword.length;
				// }
				row = row.substr(caretCol)
				offset += caretCol;
			}
			else
			{
				if (row.substring(caretCol-this.searchKeyword.length, caretCol))
				{
					offset = this.searchKeyword.length;
				}
				row = row.substring(0, caretCol - offset);
				offset = 0;
			}
		}
		index = search_down ? row.indexOf(this.searchKeyword) : row.lastIndexOf(this.searchKeyword);
		if (-1 != index)
		{
			index += offset;
			component.runAction(ac.chap.ACTION_SELECTION, {remove:true});
			component.runAction(ac.chap.ACTION_CARET, {moveTo:[row_index, index]});
			component.runAction(ac.chap.ACTION_CARET, {store:true});
			component.runAction(ac.chap.ACTION_CARET, {moveTo:[row_index, index+this.searchKeyword.length]});
			component.runAction(ac.chap.ACTION_SELECTION, {add:true});
			return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_SELECTIONCHANGED | ac.chap.ACTION_RES_SCROLLTOCARET;
		}
		row_index += search_down ? 1 : -1;
		if (search_down && row_index == component.char_map.length)
		{
			row_index = 0;
		}
		else if (!search_down && -1 == row_index)
		{
			row_index = component.char_map.length-1;
		}
	}
	while (caretRow != row_index);
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_SELECTIONCHANGED;
}

ac.chap.KeyMap.prototype.action_SmartIndent = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	// console.log(params);
	var line = component.getLineAt(caretRow);
	var m = params['indent_tab_when_ends'] ? line.match(/^([ \t]*)(.*)$/) : line.match(/^([ \t]*)([^ \t]*)/);
	// console.log(m);
	var prepend_text = m[1];
	if (params['indent_tab_when_ends'] || params['indent_tab_when_starts'])
	{
		m[2] = m[2].trim();
		var indent_when_values = params['indent_tab_when_ends'] ? params['indent_tab_when_ends'].split(' ') : params['indent_tab_when_starts'].split(' ');
		for (var i=0; i<indent_when_values.length; i++)
		{
			if ((params['indent_tab_when_ends'] && indent_when_values[i] == m[2].substr(m[2].length-indent_when_values[i].length)) || (params['indent_tab_when_starts'] && indent_when_values[i] == m[2].substr(0, indent_when_values[i].length)))
			{
				prepend_text += component.getTabelator();
				break;
			}
		}
	}
	// console.log(prepend_text);
	if (params['split_line'])
	{
		component.runAction(ac.chap.ACTION_INSERT, {row:true});		
	}
	else
	{
		component.runAction(ac.chap.ACTION_CARET, {move:'row_end'});
		prepend_text = (params['set_char_at_end'] ? params['set_char_at_end'] : '') + '\n' + prepend_text;
	}
	// console.log('prepend_text: %s', prepend_text);
	component.runAction(ac.chap.ACTION_INSERT, {string:prepend_text});
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
}

ac.chap.KeyMap.prototype.action_SmartUnindent = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	if (!params['starts_with'])
	{
		console.warn('Missing starts_with parameter for SmartUnindent.');
		return 0;
	}
	if (!params['ends_with'])
	{
		console.warn('Missing ends_with parameter for SmartUnindent.');
		return 0;
	}
	// console.log(params);
	var line = component.getLineAt(caretRow);
	var starts_with = params['starts_with'].split(' ');
	var ends_with = params['ends_with'].split(' ');
	if (starts_with.length != ends_with.length)
	{
		console.warn('Non-matching start and end tokens for SmartUnindent.');
		return 0;
	}
	var trim_line = line.trim() + String.fromCharCode(keyCode);
	var proceed = false;
	for (var i=0; i<ends_with.length; i++)
	{
		if (ends_with[i] == trim_line)
		{
			proceed = true;
			break;
		}				
	}
	var prepend_text = null;
	if (proceed)
	{
		var row = caretRow - 1;
		var need_nth_match = 0;
		var match_from_end = 'end' == params['match_from'];
		while (0 <= row && null == prepend_text)
		{
			line = component.getLineAt(row);
			var m = match_from_end ? line.match(/^([ \t]*)(.*)$/) : line.match(/([ \t]*)([^ \t]*)/);
			m[2] = m[2].trim();
			
			
			for (i=0; i<ends_with.length; i++)
			{
				if ((match_from_end && ends_with[i] == m[2].substr(m[2].length-ends_with[i].length)) || (!match_from_end && ends_with[i] == m[2].substr(0, ends_with[i].length)))
				{
					need_nth_match++;
					trim_line = line.trim();
					break;
				}				
			}
			for (i=0; i<starts_with.length; i++)
			{
				if ((match_from_end && starts_with[i] == m[2].substr(m[2].length-starts_with[i].length)) || (!match_from_end && starts_with[i] == m[2].substr(0, starts_with[i].length)))
				{
					if (0 == need_nth_match)
					{
						prepend_text = m[1] + trim_line;
					}
					need_nth_match--;
					break;
				}				
			}
			// console.log('row: %i, %o', row, m);
			row--;
		}
	}
	// console.log(prepend_text);
	if (null != prepend_text)
	{
		component.runAction(ac.chap.ACTION_CARET, {move:'row_start'});
		component.runAction(ac.chap.ACTION_SELECTION, {add:true});
		component.runAction(ac.chap.ACTION_DELETE, {'char':true});
		component.runAction(ac.chap.ACTION_INSERT, {string:prepend_text});
		component.runAction(ac.chap.ACTION_CARET, {move:'row_end'});
	}
	else
	{
		component.runAction(ac.chap.ACTION_INSERT, {string:String.fromCharCode(keyCode)});
	}
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
}

ac.chap.KeyMap.prototype.action_AutoComplete = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	var selected_text = component.getSelection();
	var inserted_text = params.text;
	if ('' != selected_text)
	{
		component.runAction(ac.chap.ACTION_DELETE, {character:true});
		if (params['use_selection'])
		{
			inserted_text = selected_text + params.text;
		}
	}
	component.runAction(ac.chap.ACTION_INSERT, {string:String.fromCharCode(keyCode)});
	component.runAction(ac.chap.ACTION_INSERT, {string:inserted_text, skipCaretChange:'' == selected_text});
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
}

ac.chap.KeyMap.prototype.action_SnippetComplete = function(keyCode, controlKeysMask, caretRow, caretCol, component, params)
{
	var scc = this.snippetCompleteCache;
	var proceed_as_normal_tab = null == scc;
	var selection_changed = false;
	var tab_activation = null;

	if ( proceed_as_normal_tab )
	{
		if ( null != component.selection )
		{
			tab_activation = '';
		}
		else
		{
			if ( component.language.wordDelimiter.test(component.getCharAt(caretRow, caretCol-1)) )
			{
				tab_activation = component.getWordAt(caretRow, caretCol, -1);
			}
		}
	}

	if ( proceed_as_normal_tab && null != tab_activation )
	{
//		console.log(tab_activation);
		var snippets = component.snippets;
//		console.log('%o', snippets);
		var found_snippets = [];
		for ( var i=0; i<snippets.length; i++ )
		{
			var snippet = snippets[i];
			if ( snippet.tab_activation == tab_activation )
			{
				found_snippets.push(snippet);
			}
		}
//		console.log(found_snippets);
		if ( 0 < found_snippets.length)
		{
			return this.snippetInit(found_snippets[0], component, caretRow, caretCol, ''==tab_activation, tab_activation);
		}
	}
	if ( proceed_as_normal_tab )
	{
		if ( null != scc )
		{
			component.removeActionListener(scc.callbackIndex);
			component.removeSelection();
		}
		component.runAction(ac.chap.ACTION_INSERT, {string:'\t'});
	}
	else
	{
		// changing to next tabstop
		// stopping current listener
		component.removeActionListener(scc.callbackIndex);
		component.removeSelection();
		if ( 0 != scc.activeTabStopIndex )
		{
			// there is another possible tabstop
			var found = false;
			for ( var i=scc.activeTabStopIndex+1; i<scc.tabstops.length; i++ )
			{
				if ( scc.tabstops[i] )
				{
					scc.activeTabStopIndex = i;
					found = true;
					break;
				}
			}
			if ( !found )
			{
				// let's activate last $0 tabstop
				scc.activeTabStopIndex = 0;
			}
			// move caret to the tabstop position
			var tabstop = scc.tabstops[scc.activeTabStopIndex];
//			console.log('new active #%s', scc.activeTabStopIndex);
			for ( var tab_id in scc.tabstops )
			{
				var placeholder = scc.tabstops[tab_id];
//				console.log('#%s : %o', tab_id, placeholder);
			}
			
			component.runAction(ac.chap.ACTION_SELECTION, {remove:true});
			component.runAction(ac.chap.ACTION_CARET, {moveTo:scc.insertCaretPosition});
			component.runAction(ac.chap.ACTION_CARET, {moveBy:'column', value:tabstop[2]-(scc.wasSelection?0:scc.tabActivation.length)});

			if ( '' != tabstop[1] )
			{
				component.runAction(ac.chap.ACTION_CARET, {store:true});
				component.runAction(ac.chap.ACTION_CARET, {moveBy:'column', value:tabstop[1].length});
				component.runAction(ac.chap.ACTION_SELECTION, {add:true});
				selection_changed = true;
			}
			
			if ( 0 != scc.activeTabStopIndex )
			{
				scc.firstInitialized = true;
				// adding new listener
				scc.callbackIndex = component.addActionListener(ac.chap.ACTION_LISTENER_BOTH, this, this.snippetCompleteActionListener);
//				console.log('activating next tabstop: %s', scc.activeTabStopIndex);
			}
			else
			{
//				console.log('END at $0');
				scc = null;
			}
			this.snippetCompleteCache = scc;
		}
	}
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT | (selection_changed ? ac.chap.ACTION_RES_SELECTIONCHANGED : 0);
}

ac.chap.KeyMap.prototype.snippetInit = function(snippet, component, caretRow, caretCol, wasSelection, tabActivation)
{
	tabActivation = tabActivation || '';
	var code = snippet.code;
	var code_chunks = [];
	var re = '';
	var m = [];
	var selection_changed = false;

	// [preprocessing - indentation]
	var indent_line = component.char_map[component.getCaretPosition()[0]];
	var indent_string = indent_line.match(/[\s]*/)[0];
	code = code.replace(/\n/g, "\n" + indent_string);

	// [preprocessing - escape]
	code = code.replace(/\\\$/g, '\0');

	// [preprocessing - simple variables]
	re = /(^|[^\\])(\${1,2})([a-zA-Z][\w_\-\+]*)/;
	while ( true )
	{
		m = re.exec(code);
		if ( null == m )
		{
			break;
		}
		var is_escaped = 2 == m[2].length;
		var var_name = m[3];
		var value = component.getVariableValue(var_name);
//debug		value = "'"+value+"\n'";
		if ( is_escaped )
		{
			value = value.replace(/'/g, "\\'").replace(/\n/g, "\\n");
		}
//		console.log('found %s = %s', var_name, value);
		code = code.substr(0, m.index+m[1].length)+value+code.substr(m.index+m[0].length);
	}

	// [preprocessing - variables with default values]
	re = /(^|[^\\])(\${1,2})\{([a-zA-Z][\w_\-\+]*)\:([^\}]*)\}/;
	while ( true )
	{
		m = re.exec(code);
		if ( null == m )
		{
			break;
		}
		var is_escaped = 2 == m[2].length;		
		var var_name = m[3];
		var default_value = m[4];
		var value = component.getVariableValue(var_name, default_value);
//debug		value = "'"+value+"\n'";
		if ( is_escaped )
		{
			value = value.replace(/'/g, "\\'").replace(/\n/g, "\\n");
		}
//		console.log('found %s (def:%s) = %s', var_name, default_value, value);
		code = code.substr(0, m.index+m[1].length)+value+code.substr(m.index+m[0].length);
	}
	
	// [preprocessing - variables with regular transformations]
	re = /(^|[^\\])(\${1,2})\{([a-zA-Z][\w_\-\+]*)\/([^\/]*)\/([^\/]*)\/([^\}]*)\}/;
	while ( true )
	{
		m = re.exec(code);
		if ( null == m )
		{
			break;
		}
		var is_escaped = 2 == m[2].length;		
		var var_name = m[3];
		var pattern = m[4];
		var replacement = m[5];
		var options = m[6];
		var value = component.getVariableValue(var_name);
//		console.log('found %s (pattern:%s  repl:%s  opt:%s) = %s', var_name, pattern, replacement, options, value);
		try
		{
			eval('value = value.replace(/?/?, "?");'.embed(pattern, options, replacement.replace(/"/g, '\"')));			
		}
		catch (e)
		{
			console.error('Snippet runtime error. Regular transformation for variable `%s`, pattern `%s`, replacement `%s` and options `%s` failed. Error: `%s`.', var_name, pattern, replacement, options, e);
		}
//		console.log('result: %s', value);
//debug		value = "'"+value+"\n'";
		if ( is_escaped )
		{
			value = value.replace(/'/g, "\\'").replace(/\n/g, "\\n");
		}
		code = code.substr(0, m.index+m[1].length)+value+code.substr(m.index+m[0].length);
	}
	
	// [preprocessing - variables with custom transformations]
	re = /(^|[^\\])(\${1,2})\{([a-zA-Z][\w_\-\+]*)\|([^\}]*)\}/;
	while ( true )
	{
		m = re.exec(code);
		if ( null == m )
		{
			break;
		}
		var is_escaped = 2 == m[2].length;
		var var_name = m[3];
		var transformation = m[4];
		var value = component.getVariableValue(var_name);
//		console.log('found %s (transformation:%s) = %s', var_name, transformation, value);
		try
		{
			if ( '.' == transformation.charAt(0) )
			{
				eval('value = value?'.embed(transformation));
			}
			else
			{
				eval('value = this.snippetTransform_?(value, component)'.embed(transformation));
			}
		}
		catch (e)
		{
			console.error('Snippet runtime error. Custom transformation for variable `%s` and transformation `%s` failed. Error: `%s`.', var_name, transformation, e);
		}
//		console.log('result: %s', value);
//debug		value = "'"+value+"\n'";
		if ( is_escaped )
		{
			value = value.replace(/'/g, "\\'").replace(/\n/g, "\\n");
		}
		code = code.substr(0, m.index+m[1].length)+value+code.substr(m.index+m[0].length);
	}	

	if ( wasSelection && null != component.selection)
	{
		component.runAction(ac.chap.ACTION_DELETE, {character:false});
		caretRow = component.caret.position[0];
		caretCol = component.caret.position[1];
	}
	
	// [executing backsticks]
	var execution_scheduled = false;

	re = /`(([^`]|\\`)*)`/;
	while ( true )
	{
		m = re.exec(code);
		if ( null == m )
		{
			break;
		}
		var exec_code = m[1];
		var code_rows = exec_code.split('\n');
		if ( 1 == code_rows )
		{
			console.warn('Snippet definition error. Backstick code too short. You might be missing declaration or there is no code body. Further execution terminated. Source: `%s`', exec_code);
			break;
		}
		var declaration = exec_code.split('\n')[0].trim();
		var body = code_rows.slice(1).join('\n');
		var output = '';
//		console.log('execute: declaration: %s body: %s', declaration, body);
		if ( '/local/javascript' == declaration )
		{
			// executing local code
//			console.log('local code');
			try
			{
				eval(body);
			}
			catch (e)
			{
				console.error('Snippet runtime error. Backstick execution of local code for declaration `%s` and source code `%s` failed. Error: `%s`.', declaration, body, e);
				break;
			}
		}
		else if ( '/remote/post' == declaration )
		{
			// executing remote post
			var action = '';
			var params = {};
			try
			{
				eval(body);
			}
			catch (e)
			{
				console.error('Snippet runtime error #01. Backstick execution of remote code for declaration `%s` and source code `%s` failed. Error: `%s`.', declaration, body, e);
				break;
			}
//			console.log('remote call');
			params.a = action;
			$rpost( params,
				function(output)
				{
					// creating virtual snippet
					var v_snippet = {};
					if ( snippet.tab_activation )
					{
						v_snippet.tab_activation = snippet.tab_activation;
					}
					if ( snippet.key_activation )
					{
						v_snippet.key_activation = snippet.key_activation;
					}
					v_snippet.code = code.substr(0, m.index)+output+code.substr(m.index+m[0].length);
					v_snippet.name = snippet.name;
//					console.log('v-snippet: %o', v_snippet);
					var result = component.runAction(ac.chap.ACTION_CUSTOM, {action:'RunVirtualSnippet', snippet:v_snippet});
					component.processActionResult(ac.chap.ACTION_RES_REDRAWTEXT==(result & ac.chap.ACTION_RES_REDRAWTEXT), ac.chap.ACTION_RES_REDRAWCARET==(result & ac.chap.ACTION_RES_REDRAWCARET));
					if ( ac.chap.ACTION_RES_SELECTIONCHANGED==(result & ac.chap.ACTION_RES_SELECTIONCHANGED) )
					{
						component.hideCaret();
					}
				},
				function(e)
				{
					console.error('Snippet runtime error #02. Backstick execution of remote code for declaration `%s` and source code `%s` failed. Error: `%s`.', declaration, body, e);
				},
				'POST', ac.chap.activeComponent.options.remoteBackendURL
			);
			execution_scheduled = true;

			if ( !wasSelection )
			{
				component.runAction(ac.chap.ACTION_CARET, {move:'prev_word'});
				component.runAction(ac.chap.ACTION_SELECTION, {add:true});
				component.runAction(ac.chap.ACTION_DELETE, {character:true});
//				selection_changed = true;
			}

			break;
		}
		code = code.substr(0, m.index)+output+code.substr(m.index+m[0].length);
	}

	if ( !execution_scheduled )
	{
		var tabstops = [];

		// [getting tabstops/placeholders]
		re = /(^|[^\\\{])\$\{(\d)\:([^\}\{]*)\}/;
		var any_change = true;
		var tab_id = 0;
		// two cycles to bypass classical recursion for nested tabstops
		while ( any_change )
		{
			any_change = false;
			code_chunks = [];
			while ( true )
			{
				m = re.exec(code);
//				console.log(code);
//				console.log(m);
				if ( null != m )
				{
					if ( m[0])
					var start_ix = m.index + m[1].length;
					tab_id = m[2];
					tabstops[tab_id] = ['ph', m[3], -1, -1];
					code_chunks.push(code.substr(0, start_ix)+'#<CHAP_PLACEHOLDER_BEGIN:'+tab_id+'>#');
					code = code.substr(start_ix+4, m[3].length)+'#<CHAP_PLACEHOLDER_END:'+tab_id+'>#'+code.substr(start_ix+m[0].length-m[1].length);
					any_change = true;
				}
				else
				{
					break;
				}
			}
			code_chunks.push(code);
			code = code_chunks.join('');
		}
		re = /#<CHAP_PLACEHOLDER_BEGIN\:(\d)>#/;
		while ( true )
		{
			m = re.exec(code)
			if ( null == m )
			{
				break;
			}
			tabstops[m[1]][1] = tabstops[m[1]][1].replace(/#<CHAP_PLACEHOLDER_(BEGIN|END):\d>#/g, '');
			tabstops[m[1]][2] = m.index;
			tabstops[m[1]][3] = tabstops[m[1]][1].length;
			code = code.substr(0, m.index)+code.substr(m.index+m[0].length).replace('#<CHAP_PLACEHOLDER_END:'+m[1]+'>#', '');
		}

		// [getting mirrors]
		re = /\{\$\{(\d)\:([^\}]*)\}\}/;
		while ( true )
		{
			m = re.exec(code)
			if ( null == m )
			{
				break;
			}
			code = code.substr(0, m.index)+m[2]+code.substr(m.index+m[0].length);
			var ix_end = code.indexOf('{$'+m[1]+'}');
			if ( -1 == ix_end )
			{
				console.error('Invalid snippet definition. Mirror `?` does not have `{$?}` mirrored location specified.'.embed(m[1], m[1]));
				break;
			}
			tabstops[m[1]] = ['mi', m[2], m.index, m[2].length, ix_end];
			if ( m.index > ix_end )
			{
				console.error('Unsupported feature. Mirror `?` should have mirrored location positioned AFTER itself.'.embed(m[1]));
			}
			code = code.substr(0, ix_end)+code.substr(ix_end+4);
		}

		// [getting tabstops]
		re = /(^|[^\\])\$(\d)/;
		while (true)
		{
			m = re.exec(code);
			if ( null == m )
			{
				break;
			}
			tab_id = m[2];
			if ( tabstops[tab_id] )
			{
				console.error('Invalid snippet definition. Tabstop `?` already defined as placeholder at position `?`. Snippet source: `?`.'.embed(tab_id, m.index, code));
				break;
			}
			var start_ix = m.index+m[1].length;
			tabstops[tab_id] = ['ts', '', start_ix, 0];
			code = code.substr(0, start_ix)+code.substr(start_ix+2);
			var offset = m[1].length + 2;
			for ( var tab_id in tabstops )
			{
				// console.log('adjusting: %s, %s < %s', tab_id, start_ix, tabstops[tab_id][2]);
				if ( 'mi' == tabstops[tab_id][0] )
				{
					if ( start_ix < tabstops[tab_id][2] )
					{
						tabstops[tab_id][2] -= offset;								
					}
					if ( start_ix < tabstops[tab_id][4] )
					{
						tabstops[tab_id][4] -= offset;								
					}
				}
				else if ( 'ph' == tabstops[tab_id][0] && start_ix < tabstops[tab_id][2] )
				{
					tabstops[tab_id][2] -= offset;
				}
			}
		}
		// $0 not defined, will be at the end of the snippet by default
		if ( !tabstops[0] )
		{
			tabstops[0] = ['ts', '', code.length, 0];
		}
	
		// [postprocessing - unescape]
		code = code.replace(/\0/g, '$');


		for ( var tab_id in tabstops )
		{
			var placeholder = tabstops[tab_id];
//			console.log('#%s : %o', tab_id, placeholder);
		}
		var scc = 
		{
			firstInitialized:true,
			insertCaretPosition:[caretRow, caretCol],
			tabstops: tabstops,
			callbackIndex: -1,
			activeTabStopIndex:tabstops[1] ? 1 : 0,
			activeTabStopRange:[],
			activeTabStopContent:'',
			activeTabStopNested:[],
			wasSelection:wasSelection,
			tabActivation:tabActivation
		}

		if ( !scc.wasSelection )
		{
			component.runAction(ac.chap.ACTION_CARET, {move:'prev_word'});
			component.runAction(ac.chap.ACTION_SELECTION, {add:true});
			component.runAction(ac.chap.ACTION_DELETE, {character:true});
		}

		var tabstop = tabstops[scc.activeTabStopIndex];
		

		component.runAction(ac.chap.ACTION_INSERT, {string:code.substr(0, tabstop[2])});
		component.runAction(ac.chap.ACTION_INSERT, {string:code.substr(tabstop[2]), skipCaretChange:true});

		// selecting default value
		var selection_changed = false;
		if ( '' != tabstop[1] )
		{
			component.runAction(ac.chap.ACTION_CARET, {store:true});
			component.runAction(ac.chap.ACTION_CARET, {moveBy:'column', value:tabstop[1].length});
			component.runAction(ac.chap.ACTION_SELECTION, {add:true});
			selection_changed = true;
		}

		if ( 0 != scc.activeTabStopIndex )
		{
			// starting action listener
			this.snippetCompleteCache = scc;					
			this.snippetCompleteCache.callbackIndex = component.addActionListener(ac.chap.ACTION_LISTENER_BOTH, this, this.snippetCompleteActionListener);
		}
	}
	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT | (selection_changed ? ac.chap.ACTION_RES_SELECTIONCHANGED : 0);
//	return ac.chap.ACTION_RES_REDRAWCARET | ac.chap.ACTION_RES_REDRAWTEXT;
}

ac.chap.KeyMap.prototype.snippetCompleteActionListener = function(component, action, type, actionResult, actionType, params, caretRow, caretCol)
{
	var scc = action.snippetCompleteCache;

	if ( ac.chap.ACTION_LISTENER_BEFORE == type && !scc.firstInitialized )
	{
		// before action listener
		// check if we are still in the tabstop range
//		var offset = component.char_map[caretRow].substr()
		// console.log('activeTabStopRange: %o', scc.activeTabStopRange);
		if ( caretRow < scc.activeTabStopRange[0] || caretRow > scc.activeTabStopRange[2] || caretCol < scc.activeTabStopRange[1] || caretCol > scc.activeTabStopRange[3] )
		{
			// out of range, canceling whole snippet logic
			component.removeActionListener(scc.callbackIndex);
			component.removeSelection();
			delete action.snippetCompleteCache;
			// console.log('CANCELED');
			return;
		}
//		console.log('before: %s - [%s,%s]', actionType, caretRow, caretCol);
	}
	else
	{
		// after action listener
		if ( scc.firstInitialized )
		{
			scc.firstInitialized = false;
			var tabstop = scc.tabstops[scc.activeTabStopIndex];
			caretCol -= tabstop[1].length;
			var code_rows = tabstop[1].split('\n');
			var num_code_rows = code_rows.length;
			var to_caret_row = caretRow + num_code_rows - 1;
			var to_caret_col = (to_caret_row == caretRow ? caretCol : 0) + code_rows[num_code_rows-1].length;
			scc.activeTabStopRange = [caretRow, caretCol, to_caret_row, to_caret_col];
			scc.stopMarker = component.char_map[to_caret_row].substr(to_caret_col);
			// creating list of nested tabstops
			for ( var i in scc.tabstops )
			{
				if ( i == scc.activeTabStopIndex )
				{
					continue;
				}
				var c_tabstop = scc.tabstops[i];
				if ( c_tabstop[2] >= tabstop[2] && (c_tabstop[2] + c_tabstop[3] <= tabstop[2] + tabstop[3]) )
				{
					scc.activeTabStopNested[i] = true;
				}
			}
			if ( 'mi' != tabstop[0] )
			{
				scc.activeTabStopContent = tabstop[1];
			}
			scc.firstRealRun = false;
			
//			action.snippetCompletePostInit(component, caretRow, caretCol);
			// console.log('firstRealRun: %o', scc.activeTabStopRange);
		}
		else
		{
			// console.log('next: %o', scc.activeTabStopRange);
			// adjust the range by finding the stop marker
			var n = component.char_map.length;
			var i = scc.activeTabStopRange[0];
			var found = false;
			var max_iter = 50;
//			var offset_range = [scc.activeTabStopRange[2], scc.activeTabStopRange[3]];
			var new_content = '';
			var old_content = scc.activeTabStopContent;
			while ( i<n && 0 < max_iter-- )
			{
				var ix = '' == scc.stopMarker ? component.char_map[i].length : component.char_map[i].indexOf(scc.stopMarker);
				if ( -1 != ix )
				{
					scc.activeTabStopRange[2] = i;
					scc.activeTabStopRange[3] = ix;
					// console.log('setting [3] to %i, stop marker: `%s`', ix, scc.stopMarker);
					new_content += (i==scc.activeTabStopRange[0]?component.char_map[i].substring(scc.activeTabStopRange[1], ix) : component.char_map[i].substr(0, ix));
					scc.activeTabStopContent = new_content;
					found = true;
					break;
				}
				new_content += (i==scc.activeTabStopRange[0]?component.char_map[i].substr(scc.activeTabStopRange[1]) : component.char_map[i])+'\n';
				i++;
			}
			if ( !scc.firstRealRun )
			{
				scc.activeTabStopContent = new_content;				
			}
			if ( !found )
			{
				// could not find stop marker, canceling whole snippet logic
				component.removeActionListener(scc.callbackIndex);
				component.removeSelection();
				delete action.snippetCompleteCache;
				// console.log('COULD NOT FIND STOPMARKER');
				return;
			}
			
			var offset = new_content.length - old_content.length;
			if ( 'mi' == scc.tabstops[scc.activeTabStopIndex][0] )
			{
				// mirror
//				console.log('Offset: %s OLD: %s NEW: %s will move: ', offset, old_content, new_content, scc.tabstops[scc.activeTabStopIndex][4]-scc.tabstops[scc.activeTabStopIndex][2]-scc.tabstops[scc.activeTabStopIndex][3]);
				//scc.tabstops[scc.activeTabStopIndex][4] += offset;
				var current_caret_pos = [component.caret.position[0], component.caret.position[1]];
				// disabling listeners
				component.stopActionListeners();
				// removing potential selection
				component.runAction(ac.chap.ACTION_SELECTION, {remove:true});
				// moving where it started
				component.runAction(ac.chap.ACTION_CARET, {moveTo:[scc.activeTabStopRange[0], scc.activeTabStopRange[1]]});
				// moving by offset and length of new content
				component.runAction(ac.chap.ACTION_CARET, {moveBy:'column', value:(1 + scc.tabstops[scc.activeTabStopIndex][4]-scc.tabstops[scc.activeTabStopIndex][2]-scc.tabstops[scc.activeTabStopIndex][3]+new_content.length)});
				if ( 0 < old_content.length )
				{
					// storing position
					component.runAction(ac.chap.ACTION_CARET, {store:true});
					// moving by old content length
//					console.log('move before delete:'+old_content.length);
					component.runAction(ac.chap.ACTION_CARET, {moveBy:'column', value:old_content.length});
					// selecting
					component.runAction(ac.chap.ACTION_SELECTION, {add:true});
					// deleting
					component.runAction(ac.chap.ACTION_DELETE, {character:false});
				}
				// inserting new content
				component.runAction(ac.chap.ACTION_INSERT, {string:new_content});
				// returning back to caret
				component.runAction(ac.chap.ACTION_CARET, {moveTo:current_caret_pos});
				// enabling listeners
				component.startActionListeners();
				//adjusting stopmarker for mirrored placeholder AFTER original
				if ( 0 < scc.tabstops[scc.activeTabStopIndex][4] )
				{
					scc.stopMarker = component.char_map[scc.activeTabStopRange[2]].substr(scc.activeTabStopRange[3]);					
				}
			}
			if ( !scc.firstRealRun )
			{
				scc.firstRealRun = true;
				if ( 'mi' == scc.tabstops[scc.activeTabStopIndex][0] && '' != scc.tabstops[scc.activeTabStopIndex][1] )
				{
					offset = new_content.length - scc.tabstops[scc.activeTabStopIndex][1].length;
				}
			}
			
//			console.log('offset: %s', offset);
			var active_offset = scc.tabstops[scc.activeTabStopIndex][2];
			if ( 0 != offset )
			{
				// changed, readjusting tabstops after this and killing all nested
				for ( i in scc.tabstops )
				{
					if ( i == scc.activeTabStopIndex )
					{
						continue;
					}
					var tabstop = scc.tabstops[i];
					if ( tabstop[2] > active_offset )
					{
						if ( scc.activeTabStopNested[i] )
						{
							// nested
							delete scc.tabstops[i];
						}
						else
						{
							tabstop[2] += offset;
							// console.log('ADJUSTING: #%s by %s, new: %s', i, offset, tabstop[2]);
						}
					}
				}
			}
		}
		// console.log('after %s(%s, %s) : %o', actionType, caretRow, caretCol, scc.activeTabStopRange);
	}
}


ac.chap.KeyMap.prototype.compile = function(source)
{
	/* example:
	
		KEY: -13+shift
			selection(add:true)
			caret(move:'up')
			
		KEY: -27
			caret(move:'row_end')
			
		...
		..
		.
	*/
	var rows = source.split('\n');
	var n =  rows.length;
	var re_definition = /^KEY\:\s*[-\d]*[\+\w\s]*$/;
	var re_chain = /^[^\(]*\(.*\)\s*$/;
	var src = '';
	var chain = [];
	var last_key_code = null;
	for ( var i=0; i<n; i++ )
	{
		rows[i] = rows[i].trim();
		if ( re_definition.test(rows[i]) )
		{
			if ( null != last_key_code )
			{
				src += chain.join(',\n');
				src += '\n];\n'
				chain = [];
			}
			var s = rows[i].split(':')[1].split('+');
			var key_code = parseInt(s[0]);
			var control_keys = ['ac.chap.CKEY_NONE'];
			for ( var ii=1; ii<s.length; ii++ )
			{
				control_keys.push('ac.chap.CKEY_'+s[ii].trim().toUpperCase());
			}
			src += "\nif('undefined'==typeof this.definition['?']) {this.definition['?']=[];}\n".embed(key_code, key_code);
			src += "this.definition['?'][?] = [\n".embed(key_code, control_keys.join('|'));
			last_key_code = key_code;
		}
		if ( re_chain.test(rows[i]) )
		{
			var ix = rows[i].indexOf('(');
			var action_type = 'ac.chap.ACTION_'+rows[i].substr(0,ix).trim().toUpperCase();
			var params = rows[i].substring(ix+1, rows[i].length-1).replace(/\:CR/g, '\\n');
			chain.push( action_type+', {'+params+'}' );
		}
	}
	if ( null != last_key_code )
	{
		src += chain.join(',\n');
		src += '\n];\n'
		chain = [];
	}
	var result = true;
	try
	{
		eval(src);
	}
	catch(e)
	{
		result = e;
		console.error('Error while compiling Chap keymap definition: %o. Compiled source: %s', e, src);
	}
	return result;
}

ac.chap.keymap = {};




$class('ac.chap.Theme',
{
	construct:function()
	{
		this.colorScheme = [];
		this.initDefinition();
	}
});

ac.chap.Theme.prototype.initDefinition = function()
{
	this.cssId = '';
	this.background = '#fff';
	this.textColor = '#000';
	this.caretRowStyleActive = '#ededed';
	this.selectionStyle = '#c4dbff';
	this.caretColor = '#000';
}

ac.chap.Theme.prototype.renderCaret = function(caretMode, node)
{
	if ( 1 == caretMode )
	{
		node.style.borderRight = '1px solid '+this.caretColor;
	}
	else
	{
		node.style.height = (parseInt(node.style.height)-1)+'px';
		node.style.borderBottom = '1px solid '+this.caretColor;
	}
}

ac.chap.Theme.prototype.adjustCaretPosition = function(caretMode, pos)
{
	if ( 1 == caretMode )
	{
		pos[0]++;
	}
	else
	{
		pos[0] += pos[2];
	}
	return pos;
}

ac.chap.theme = {};



$class('ac.chap.Language',
{
	construct:function()
	{
		this.foldingStartMarkers = [];
		this.foldingStopMarkers = [];
		this.singleRowCommentStartMarkers = [];
		this.multiRowCommentStartMarker = '';
		this.multiRowCommentEndMarker = '';
		this.initDefinition();
	}
});

ac.chap.Language.prototype.initDefinition = function()
{
	this.singleQuoteStringMarker = "'";
	this.singleQuoteStringMarkerException = '\\';
	this.doubleQuoteStringMarker = '"';
	this.doubleQuoteStringMarkerException = '\\';
	this.chunkRules = 
	[
		[/(([^\w]|^)(\d{1,}[\d\.Ee]*)([^w]|$))/i, 3, ac.chap.CHUNK_NUMBER],
		[/(\+|\-|\*|\/|\=|\!|\^|\%|\||\&|\<|\>)/i, 0, ac.chap.CHUNK_OPERATOR],
		[/(\(|\)|\[|\]|\{|\})/i, 0, ac.chap.CHUNK_PARENTHESIS]
	];
	this.wordDelimiter = /[\w\.\d]/;
	this.indentIgnoreMarker = /[\.]/;
}


ac.chap.lang = {};






/* loader stuff - you are free to modify as needed */


// !! Make sure, bundle_*.js is loaded prior launching this function - the bundle defines ac.chap.langEAmy, EAmyJavaScript etc.
function showEditor(templateNode)
{
	var source = templateNode.value;
	templateNode = $(templateNode);
	var w = templateNode.w();
	var h = templateNode.h();
	
	var node = templateNode.p().ib($$(), templateNode).w(w).h(h);
	templateNode.d(false);
	
	var language = ac.chap.lang.JavaScript;
	var keymap = ac.chap.keymap.EAmyJavaScript;

	var instance = $new(ac.chap.Window, {language:ac.chap.lang.EAmy, keymap:ac.chap.Keymap});
	instance.addView(node, {theme:ac.chap.theme.EAmy, rowHeight:11, colWidth:7, wordWrap:true, tabelator:'    '});

	instance.show();
	instance.setSnippets(eamy.snippets);
	instance.keymap.importSnippets(eamy.snippets);
	instance.edit(source);
	eamy.instances.push(instance);

}

// !! Remove from here and include in your <head> section if you want.
// document.write('<link rel="stylesheet" href="eamy/style.css" type="text/css" media="screen" title="no title" charset="utf-8" />');


// Performed upon loading the page. You are free to remove it and call the showEditor() (or modified version of it) in order to launch the editing component. Code of the showEditor should give you enough clue.
$__tune.event.addListener(self, 'load', function(evt)
{
    // this is basically a search for any <textarea> with -amy-enabled attribute, which is replaced by editing component
	var lst = document.getElementsByTagName('textarea');
	for (var i=0; i<lst.length; i++)
	{
		var node = lst.item(i);
		if ('true' == node.getAttribute('-amy-enabled'))
		{
			showEditor(node);
			var form_node = node;
			while (document != form_node.parentNode)
			{
				if ('form' == form_node.tagName.toLowerCase())
				{
					// changing the submit handler
					eamy.action = form_node.action;
					eamy.form = form_node;
					eamy.textarea = node;
					form_node.action = null;
					form_node.onsubmit = function() {setTimeout('eamy.submit()', 50); return false;}
				}
				form_node = form_node.parentNode;
			}
			break;
		}
	}		
});


// this is called upon submitting the form, feel free to use the code as a reference for your own handling. The important thing is actually only getting the component and retrieving its content: var edited_source = eamy.instances[0].getText();  // that's it :), the rest you can change as you wish (posting via AJAX or whatever..)
eamy.submit = function()
{
	eamy.form.action = eamy.action;
	eamy.form.onsubmit = null;
	if ($__tune.isSafari2)
	{
		eamy.textarea.innerHTML = eamy.instances[0].getText();
	}
	else
	{
		eamy.textarea.value = eamy.instances[0].getText();
	}
	eamy.form.submit();
}

if (!self['console'])
{
	var console = {info:function(){}};
	console.log = console.error = console.warn = console.info;
	
}


Added applications/admin/static/eamy/style.css version [ddb33f7246].

























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*.acw-chap pre, .acw-chap pre span,  span.acw-char-check, .acw-chap .selection-area div
{
    font:11px 'Courier', monospaced;
    line-height:11px;
    margin:0;
    padding:0;
    border:0;
}
*/
.acw-chap .wrapped-row
{
	background-image:url('chap-wrapped-row.gif');
	background-repeat:no-repeat;
	background-position:25px 4px;
}
.acw-chap .sidebar
{
	background-image:url('chap-bg-sidebar.gif');
	line-height:11px;	
}
/*.acw-chap .sidebar .row-number
{
    text-align:right;
    font-size:9px;
    font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
    color:#999;
}
*/
.acw-chap .folding-expand-inner
{
	width:14px;
	height:10px;
	margin-left:2px;
	display:inline;
	background-image:url('chap-folding-expand-inner.gif');
}
.acw-chap .folding-expand
{
	background-image:url('chap-folding-expand.gif');
}
.acw-chap .folding-start
{
	background-image:url('chap-folding-start.gif');
}
.acw-chap .folding-stop
{
	background-image:url('chap-folding-stop.gif');
}
.acw-chap .bookmark-default
{
	background-image:url('chap-bookmark-default.gif');
}
.acw-chap .void
{
	background-image:url('void.gif');	
}

Added applications/admin/static/eamy/void.gif version [bb926bd942].

cannot compute difference between binary files

Added applications/admin/static/edit_area/autocompletion.js version [fb4e2a7332].












































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
 * Autocompletion class
 * 
 * An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
 * 
 * Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
 * But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
 * and add a too important feature that many people would miss if included as a plugin
 * 
 * - init param: autocompletion_start
 * - Button name: "autocompletion"
 */  

var EditArea_autocompletion= {
	
	/**
	 * Get called once this file is loaded (editArea still not initialized)
	 *
	 * @return nothing	 
	 */	 	 	
	init: function(){	
		//	alert("test init: "+ this._someInternalFunction(2, 3));
		
		if(editArea.settings["autocompletion"])
			this.enabled= true;
		else
			this.enabled= false;
		this.current_word		= false;
		this.shown				= false;
		this.selectIndex		= -1;
		this.forceDisplay		= false;
		this.isInMiddleWord		= false;
		this.autoSelectIfOneResult	= false;
		this.delayBeforeDisplay	= 100;
		this.checkDelayTimer	= false;
		this.curr_syntax_str	= '';
		
		this.file_syntax_datas	= {};
	}
	/**
	 * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
	 * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
	 * Language variables such as {$lang_somekey} will also be replaced with contents from
	 * the language packs.
	 * 
	 * @param {string} ctrl_name: the name of the control to add	  
	 * @return HTML code for a specific control or false.
	 * @type string	or boolean
	 */	
	/*,get_control_html: function(ctrl_name){
		switch( ctrl_name ){
			case 'autocompletion':
				// Control id, button img, command
				return parent.editAreaLoader.get_button_html('autocompletion_but', 'autocompletion.gif', 'toggle_autocompletion', false, this.baseURL);
				break;
		}
		return false;
	}*/
	/**
	 * Get called once EditArea is fully loaded and initialised
	 *	 
	 * @return nothing
	 */	 	 	
	,onload: function(){ 
		if(this.enabled)
		{
			var icon= document.getElementById("autocompletion");
			if(icon)
				editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
		}
		
		this.container	= document.createElement('div');
		this.container.id	= "auto_completion_area";
		editArea.container.insertBefore( this.container, editArea.container.firstChild );
		
		// add event detection for hiding suggestion box
		parent.editAreaLoader.add_event( document, "click", function(){ editArea.plugins['autocompletion']._hide();} );
		parent.editAreaLoader.add_event( editArea.textarea, "blur", function(){ editArea.plugins['autocompletion']._hide();} );
		
	}
	
	/**
	 * Is called each time the user touch a keyboard key.
	 *	 
	 * @param (event) e: the keydown event
	 * @return true - pass to next handler in chain, false - stop chain execution
	 * @type boolean	 
	 */
	,onkeydown: function(e){
		if(!this.enabled)
			return true;
			
		if (EA_keys[e.keyCode])
			letter=EA_keys[e.keyCode];
		else
			letter=String.fromCharCode(e.keyCode);	
		// shown
		if( this._isShown() )
		{	
			// if escape, hide the box
			if(letter=="Esc")
			{
				this._hide();
				return false;
			}
			// Enter
			else if( letter=="Entrer")
			{
				var as	= this.container.getElementsByTagName('A');
				// select a suggested entry
				if( this.selectIndex >= 0 && this.selectIndex < as.length )
				{
					as[ this.selectIndex ].onmousedown();
					return false
				}
				// simply add an enter in the code
				else
				{
					this._hide();
					return true;
				}
			}
			else if( letter=="Tab" || letter=="Down")
			{
				this._selectNext();
				return false;
			}
			else if( letter=="Up")
			{
				this._selectBefore();
				return false;
			}
		}
		// hidden
		else
		{
			
		}
		
		// show current suggestion list and do autoSelect if possible (no matter it's shown or hidden)
		if( letter=="Space" && CtrlPressed(e) )
		{
			//parent.console.log('SHOW SUGGEST');
			this.forceDisplay 			= true;
			this.autoSelectIfOneResult	= true;
			this._checkLetter();
			return false;
		}
		
		// wait a short period for check that the cursor isn't moving
		setTimeout("editArea.plugins['autocompletion']._checkDelayAndCursorBeforeDisplay();", editArea.check_line_selection_timer +5 );
		this.checkDelayTimer = false;
		return true;
	}	
	/**
	 * Executes a specific command, this function handles plugin commands.
	 *
	 * @param {string} cmd: the name of the command being executed
	 * @param {unknown} param: the parameter of the command	 
	 * @return true - pass to next handler in chain, false - stop chain execution
	 * @type boolean	
	 */
	,execCommand: function(cmd, param){
		switch( cmd ){
			case 'toggle_autocompletion':
				var icon= document.getElementById("autocompletion");
				if(!this.enabled)
				{
					if(icon != null){
						editArea.restoreClass(icon);
						editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
					}
					this.enabled= true;
				}
				else
				{
					this.enabled= false;
					if(icon != null)
						editArea.switchClassSticky(icon, 'editAreaButtonNormal', false);
				}
				return true;
		}
		return true;
	}
	,_checkDelayAndCursorBeforeDisplay: function()
	{
		this.checkDelayTimer = setTimeout("if(editArea.textarea.selectionStart == "+ editArea.textarea.selectionStart +") EditArea_autocompletion._checkLetter();",  this.delayBeforeDisplay - editArea.check_line_selection_timer - 5 );
	}
	// hide the suggested box
	,_hide: function(){
		this.container.style.display="none";
		this.selectIndex	= -1;
		this.shown	= false;
		this.forceDisplay	= false;
		this.autoSelectIfOneResult = false;
	}
	// display the suggested box
	,_show: function(){
		if( !this._isShown() )
		{
			this.container.style.display="block";
			this.selectIndex	= -1;
			this.shown	= true;
		}
	}
	// is the suggested box displayed?
	,_isShown: function(){
		return this.shown;
	}
	// setter and getter
	,_isInMiddleWord: function( new_value ){
		if( typeof( new_value ) == "undefined" )
			return this.isInMiddleWord;
		else
			this.isInMiddleWord	= new_value;
	}
	// select the next element in the suggested box
	,_selectNext: function()
	{
		var as	= this.container.getElementsByTagName('A');
		
		// clean existing elements
		for( var i=0; i<as.length; i++ )
		{
			if( as[i].className )
				as[i].className	= as[i].className.replace(/ focus/g, '');
		}
		
		this.selectIndex++;	
		this.selectIndex	= ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? 0 : this.selectIndex;
		as[ this.selectIndex ].className	+= " focus";
	}
	// select the previous element in the suggested box
	,_selectBefore: function()
	{
		var as	= this.container.getElementsByTagName('A');
		
		// clean existing elements
		for( var i=0; i<as.length; i++ )
		{
			if( as[i].className )
				as[i].className	= as[ i ].className.replace(/ focus/g, '');
		}
		
		this.selectIndex--;
		
		this.selectIndex	= ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? as.length-1 : this.selectIndex;
		as[ this.selectIndex ].className	+= " focus";
	}
	,_select: function( content )
	{
		cursor_forced_position	= content.indexOf( '{@}' );
		content	= content.replace(/{@}/g, '' );
		editArea.getIESelection();
		
		// retrive the number of matching characters
		var start_index	= Math.max( 0, editArea.textarea.selectionEnd - content.length );
		
		line_string	= 	editArea.textarea.value.substring( start_index, editArea.textarea.selectionEnd + 1);
		limit	= line_string.length -1;
		nbMatch	= 0;
		for( i =0; i<limit ; i++ )
		{
			if( line_string.substring( limit - i - 1, limit ) == content.substring( 0, i + 1 ) )
				nbMatch = i + 1;
		}
		// if characters match, we should include them in the selection that will be replaced
		if( nbMatch > 0 )
			parent.editAreaLoader.setSelectionRange(editArea.id, editArea.textarea.selectionStart - nbMatch , editArea.textarea.selectionEnd);
		
		parent.editAreaLoader.setSelectedText(editArea.id, content );
		range= parent.editAreaLoader.getSelectionRange(editArea.id);
		
		if( cursor_forced_position != -1 )
			new_pos	= range["end"] - ( content.length-cursor_forced_position );
		else
			new_pos	= range["end"];	
		parent.editAreaLoader.setSelectionRange(editArea.id, new_pos, new_pos);
		this._hide();
	}
	
	
	/**
	 * Parse the AUTO_COMPLETION part of syntax definition files
	 */
	,_parseSyntaxAutoCompletionDatas: function(){
		//foreach syntax loaded
		for(var lang in parent.editAreaLoader.load_syntax)
		{
			if(!parent.editAreaLoader.syntax[lang]['autocompletion'])	// init the regexp if not already initialized
			{
				parent.editAreaLoader.syntax[lang]['autocompletion']= {};
				// the file has auto completion datas
				if(parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
				{
					// parse them
					for(var i in parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
					{
						datas	= parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'][i];
						tmp	= {};
						if(datas["CASE_SENSITIVE"]!="undefined" && datas["CASE_SENSITIVE"]==false)
							tmp["modifiers"]="i";
						else
							tmp["modifiers"]="";
						tmp["prefix_separator"]= datas["REGEXP"]["prefix_separator"];
						tmp["match_prefix_separator"]= new RegExp( datas["REGEXP"]["prefix_separator"] +"$", tmp["modifiers"]);
						tmp["match_word"]= new RegExp("(?:"+ datas["REGEXP"]["before_word"] +")("+ datas["REGEXP"]["possible_words_letters"] +")$", tmp["modifiers"]);
						tmp["match_next_letter"]= new RegExp("^("+ datas["REGEXP"]["letter_after_word_must_match"] +")$", tmp["modifiers"]);
						tmp["keywords"]= {};
						//console.log( datas["KEYWORDS"] );
						for( var prefix in datas["KEYWORDS"] )
						{
							tmp["keywords"][prefix]= {
								prefix: prefix,
								prefix_name: prefix,
								prefix_reg: new RegExp("(?:"+ parent.editAreaLoader.get_escaped_regexp( prefix ) +")(?:"+ tmp["prefix_separator"] +")$", tmp["modifiers"] ),
								datas: []
							};
							for( var j=0; j<datas["KEYWORDS"][prefix].length; j++ )
							{
								tmp["keywords"][prefix]['datas'][j]= {
									is_typing: datas["KEYWORDS"][prefix][j][0],
									// if replace with is empty, replace with the is_typing value
									replace_with: datas["KEYWORDS"][prefix][j][1] ? datas["KEYWORDS"][prefix][j][1].replace('', datas["KEYWORDS"][prefix][j][0] ) : '',
									comment: datas["KEYWORDS"][prefix][j][2] ? datas["KEYWORDS"][prefix][j][2] : '' 
								};
								
								// the replace with shouldn't be empty
								if( tmp["keywords"][prefix]['datas'][j]['replace_with'].length == 0 )
									tmp["keywords"][prefix]['datas'][j]['replace_with'] = tmp["keywords"][prefix]['datas'][j]['is_typing'];
								
								// if the comment is empty, display the replace_with value
								if( tmp["keywords"][prefix]['datas'][j]['comment'].length == 0 )
									 tmp["keywords"][prefix]['datas'][j]['comment'] = tmp["keywords"][prefix]['datas'][j]['replace_with'].replace(/{@}/g, '' );
							}
								
						}
						tmp["max_text_length"]= datas["MAX_TEXT_LENGTH"];
						parent.editAreaLoader.syntax[lang]['autocompletion'][i]	= tmp;
					}
				}
			}
		}
	}
	
	,_checkLetter: function(){
		// check that syntax hasn't changed
		if( this.curr_syntax_str != editArea.settings['syntax'] )
		{
			if( !parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'] )
				this._parseSyntaxAutoCompletionDatas();
			this.curr_syntax= parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'];
			this.curr_syntax_str = editArea.settings['syntax'];
			//console.log( this.curr_syntax );
		}
		
		if( editArea.is_editable )
		{
			time=new Date;
			t1= time.getTime();
			editArea.getIESelection();
			this.selectIndex	= -1;
			start=editArea.textarea.selectionStart;
			var str	= editArea.textarea.value;
			var results= [];
			
			
			for(var i in this.curr_syntax)
			{
				var last_chars	= str.substring(Math.max(0, start-this.curr_syntax[i]["max_text_length"]), start);
				var matchNextletter	= str.substring(start, start+1).match( this.curr_syntax[i]["match_next_letter"]);
				// if not writting in the middle of a word or if forcing display
				if( matchNextletter || this.forceDisplay )
				{
					// check if the last chars match a separator
					var match_prefix_separator = last_chars.match(this.curr_syntax[i]["match_prefix_separator"]);
			
					// check if it match a possible word
					var match_word= last_chars.match(this.curr_syntax[i]["match_word"]);
					
					//console.log( match_word );
					if( match_word )
					{
						var begin_word= match_word[1];
						var match_curr_word= new RegExp("^"+ parent.editAreaLoader.get_escaped_regexp( begin_word ), this.curr_syntax[i]["modifiers"]);
						//console.log( match_curr_word );
						for(var prefix in this.curr_syntax[i]["keywords"])
						{
						//	parent.console.log( this.curr_syntax[i]["keywords"][prefix] );
							for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
							{
						//		parent.console.log( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'] );
								// the key word match or force display 
								if( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'].match(match_curr_word) )
								{
							//		parent.console.log('match');
									hasMatch = false;
									var before = last_chars.substr( 0, last_chars.length - begin_word.length );
									
									// no prefix to match => it's valid
									if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
									{
										if( ! before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
											hasMatch = true;
									}
									// we still need to check the prefix if there is one
									else if( this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
									{
										if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
											hasMatch = true;
									}
									
									if( hasMatch )
										results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
								}	
							}
						}
					}
					// it doesn't match any possible word but we want to display something
					// we'll display to list of all available words
					else if( this.forceDisplay || match_prefix_separator )
					{
						for(var prefix in this.curr_syntax[i]["keywords"])
						{
							for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
							{
								hasMatch = false;
								// no prefix to match => it's valid
								if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
								{
									hasMatch	= true;
								}
								// we still need to check the prefix if there is one
								else if( match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
								{
									var before = last_chars; //.substr( 0, last_chars.length );
									if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
										hasMatch = true;
								}	
									
								if( hasMatch )
									results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];	
							}
						}
					}
				}
			}
			
			// there is only one result, and we can select it automatically
			if( results.length == 1 && this.autoSelectIfOneResult )
			{
			//	console.log( results );
				this._select( results[0][1]['replace_with'] );
			}
			else if( results.length == 0 )
			{
				this._hide();
			}
			else
			{
				// build the suggestion box content
				var lines=[];
				for(var i=0; i<results.length; i++)
				{
					var line= "<li><a href=\"#\" class=\"entry\" onmousedown=\"EditArea_autocompletion._select('"+ results[i][1]['replace_with'].replace(new RegExp('"', "g"), "&quot;") +"');return false;\">"+ results[i][1]['comment'];
					if(results[i][0]['prefix_name'].length>0)
						line+='<span class="prefix">'+ results[i][0]['prefix_name'] +'</span>';
					line+='</a></li>';
					lines[lines.length]=line;
				}
				// sort results
				this.container.innerHTML		= '<ul>'+ lines.sort().join('') +'</ul>';
				
				var cursor	= _$("cursor_pos");
				this.container.style.top		= ( cursor.cursor_top + editArea.lineHeight ) +"px";
				this.container.style.left		= ( cursor.cursor_left + 8 ) +"px";
				this._show();
			}
				
			this.autoSelectIfOneResult = false;
			time=new Date;
			t2= time.getTime();
		
			//parent.console.log( begin_word +"\n"+ (t2-t1) +"\n"+ html );
		}
	}
};

// Load as a plugin
editArea.settings['plugins'][ editArea.settings['plugins'].length ] = 'autocompletion';
editArea.add_plugin('autocompletion', EditArea_autocompletion);

Added applications/admin/static/edit_area/edit_area.css version [adedb957ec].



















































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
body, html{
	margin: 0; 
	padding: 0;
	height: 100%;
	border: none;
	overflow: hidden;
	background-color: #FFF;
}

body, html, table, form, textarea{
	font: 12px monospace, sans-serif;
}

#editor{
	border: solid #888 1px;
	overflow: hidden;
}

#result{
	z-index: 4; 
	overflow-x: auto;
	overflow-y: scroll;
	border-top: solid #888 1px;
	border-bottom: solid #888 1px;
	position: relative;
	clear: both;
}

#result.empty{
	overflow: hidden;
}

#container{
	overflow: hidden;
	border: solid blue 0;
	position: relative; 
	z-index: 10;
	padding: 0 5px 0 45px;
	/*padding-right: 5px;*/ 
}

#textarea{
	position: relative; 
	top: 0; 
	left: 0;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%; 
	overflow: hidden;  
	z-index: 7; 
	border-width: 0;
	background-color: transparent;
	resize: none;
}

#textarea, #textarea:hover{
	outline: none;	/* safari outline fix */
}

#content_highlight{
	white-space: pre;
	margin: 0;
	padding: 0;
	position : absolute; 
	z-index: 4; 
	overflow: visible;
}


#selection_field, #selection_field_text{
	margin: 0; 
	background-color: #E1F2F9; 
/*	height: 1px; */  
	position: absolute;
	z-index: 5;
	top: -100px;
	padding: 0;
	white-space: pre;
	overflow: hidden;
}

#selection_field.show_colors {
	z-index: 3;
	background-color:#EDF9FC;
	
}

#selection_field strong{
	font-weight:normal;
}

#selection_field.show_colors *, #selection_field_text * {
	visibility: hidden;
}

#selection_field_text{
	background-color:transparent;
}

#selection_field_text strong{
	font-weight:normal;
	background-color:#3399FE;
	color: #FFF;
	visibility:visible;
}

#container.word_wrap #content_highlight,
#container.word_wrap #selection_field,
#container.word_wrap #selection_field_text,
#container.word_wrap #test_font_size{
	white-space: pre-wrap;       /* css-3 */
	white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
	white-space: -pre-wrap;      /* Opera 4-6 */
	white-space: -o-pre-wrap;    /* Opera 7 */
	word-wrap: break-word;       /* Internet Explorer 5.5+ */
	width: 99%;
}

#line_number{
	position: absolute;
	overflow: hidden;
	border-right: solid black 1px;
	z-index:8;
	width: 38px;
	padding: 0 5px 0 0;
	margin: 0 0 0 -45px;
	text-align: right;
	color: #AAAAAA;
}

#test_font_size{
	padding: 0; 
	margin: 0; 
	visibility: hidden;
	position: absolute;
	white-space: pre;
}

pre{
	margin: 0;
	padding: 0;
}

.hidden{
	opacity: 0.2; 
	filter:alpha(opacity=20);
}

#result .edit_area_cursor{
	position: absolute; 
	z-index:6; 
	background-color: #FF6633;
	top: -100px;
	margin: 0;
}

#result .edit_area_selection_field .overline{
	background-color: #996600;
}


/* area popup */
.editarea_popup{
	border: solid 1px #888888;
	background-color: #ECE9D8; 
	width: 250px; 
	padding: 4px; 
	position: absolute;
	visibility: hidden; 
	z-index: 15;
	top: -500px;
}

.editarea_popup, .editarea_popup table{
	font-family: sans-serif;
	font-size: 10pt;
}

.editarea_popup img{
	border: 0;
}

.editarea_popup .close_popup{
	float: right; 
	line-height: 16px; 
	border: 0; 
	padding: 0;
}

.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{
	margin: 0;
	padding: 0;
}

.editarea_popup .copyright{
	text-align: right;
}	

/* Area_search */
div#area_search_replace{
	/*width: 250px;*/
}

div#area_search_replace img{
	border: 0;
}

div#area_search_replace div.button{
	text-align: center;
	line-height: 1.7em;
}

div#area_search_replace .button a{
	cursor: pointer;
	border: solid 1px #888888;
	background-color: #DEDEDE;
	text-decoration: none;
	padding: 0 2px;
	color: #000000;	
	white-space: nowrap;
}

div#area_search_replace a:hover{	
	/*border: solid 1px #888888;*/
	background-color: #EDEDED;
}

div#area_search_replace  #move_area_search_replace{
	cursor: move; 
	border: solid 1px #888;
}

div#area_search_replace  #close_area_search_replace{
	text-align: right; 
	vertical-align: top; 
	white-space: nowrap;
}

div#area_search_replace  #area_search_msg{
	height: 18px; 
	overflow: hidden; 
	border-top: solid 1px #888; 
	margin-top: 3px;
}

/* area help */
#edit_area_help{
	width: 350px;
}

#edit_area_help div.close_popup{
	float: right;
}

/* area_toolbar */
.area_toolbar{
	/*font: 11px sans-serif;*/
	width: 100%; 
	/*height: 21px; */
	margin: 0; 
	padding: 0;
	background-color: #ECE9D8;
	text-align: center;
}

.area_toolbar, .area_toolbar table{
	font: 11px sans-serif;
}

.area_toolbar img{
	border: 0;
	vertical-align: middle;
}

.area_toolbar input{
	margin: 0;
	padding: 0;
}

.area_toolbar select{
    font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;
    font-size: 7pt;
    font-weight: normal;
    margin: 2px 0 0 0 ;
    padding: 0;
    vertical-align: top;
    background-color: #F0F0EE;
}

table.statusbar{
	width: 100%;
}

.area_toolbar td.infos{
	text-align: center;
	width: 130px;
	border-right: solid 1px #888;
	border-width: 0 1px 0 0;
	padding: 0;
}

.area_toolbar td.total{
	text-align: right;
	width: 50px;
	padding: 0;
}

.area_toolbar td.resize{
	text-align: right;
}
/*
.area_toolbar span{
	line-height: 1px;
	padding: 0;
	margin: 0;
}*/

.area_toolbar span#resize_area{
	cursor: nw-resize;
	visibility: hidden;
}

/* toolbar buttons */
.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {
	border: 0; margin: 0; padding: 0; background: transparent;
	margin-top: 0;
	margin-left: 1px;
	padding: 0;
}

.editAreaButtonNormal {
	border: 1px solid #ECE9D8 !important;
	cursor: pointer;
}

.editAreaButtonOver {
	border: 1px solid #0A246A !important;
	cursor: pointer;
	background-color: #B6BDD2;
}

.editAreaButtonDown {
	cursor: pointer;
	border: 1px solid #0A246A !important;
	background-color: #8592B5;
}

.editAreaButtonSelected {
	border: 1px solid #C0C0BB !important;
	cursor: pointer;
	background-color: #F4F2E8;
}

.editAreaButtonDisabled {
	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
	-moz-opacity:0.3;
	opacity: 0.3;
	border: 1px solid #F0F0EE !important;
	cursor: pointer;
}

.editAreaSeparatorLine {
	margin: 1px 2px;
	background-color: #C0C0BB;
	width: 2px;
	height: 18px;
}

/* waiting screen */
#processing{
	display: none; 
	background-color:#ECE9D8; 
	border: solid #888 1px;
	position: absolute; 
	top: 0; 
	left: 0;
	width: 100%; 
	height: 100%; 
	z-index: 100; 
	text-align: center;
}

#processing_text{
	position:absolute;
	left: 50%;
	top: 50%;
	width: 200px;
	height: 20px; 
	margin-left: -100px;
	margin-top: -10px;
	text-align: center;
}
/* end */


/**** tab browsing area ****/
#tab_browsing_area{
	display: none;
	background-color: #CCC9A8;
	border-top: 1px solid #888;
	text-align: left;
	margin: 0;
}

#tab_browsing_list {
	padding: 0; 
	margin: 0; 
	list-style-type: none;
	white-space: nowrap;
}
#tab_browsing_list li {
	float: left;
	margin: -1px;
}
#tab_browsing_list a {
	position: relative;
	display: block; 
	text-decoration: none; 
	float: left; 
	cursor: pointer;
	line-height:14px;
}

#tab_browsing_list a span {
	display: block; 
	color: #000; 
	background: #ECE9D8; 
	border:	1px solid #888; 
	border-width: 1px 1px 0; 
	text-align: center; 
	padding: 2px 2px 1px 4px; 
	position: relative;	/*IE 6 hack */
}

#tab_browsing_list a b {
	display: block; 
	border-bottom: 2px solid #617994;
}

#tab_browsing_list a .edited {
	display: none;
}

#tab_browsing_list a.edited .edited {
	display: inline;
}

#tab_browsing_list a img{
	margin-left: 7px;
}

#tab_browsing_list a.edited img{
	margin-left: 3px;
}

#tab_browsing_list a:hover span {
	background: #F4F2E8;
	border-color: #0A246A;
}

#tab_browsing_list .selected a span{
	background: #046380;
	color: #FFF;
}


#no_file_selected{
	height: 100%;
	width: 150%; /* Opera need more than 100% */
	background: #CCC;
	display: none;
	z-index: 20;
	position: absolute;
}


/*** Non-editable mode ***/
.non_editable #editor
{
	border-width: 0 1px;
}

.non_editable .area_toolbar
{
	display: none;
}

/*** Auto completion ***/
#auto_completion_area
{
	background:	#FFF;
	border:		solid 1px #888;
	position:	absolute;
	z-index:	15;
	width:	280px;
	height:	180px;
	overflow: auto;
	display:none;
}

#auto_completion_area a, #auto_completion_area a:visited
{
	display:	block;
	padding:	0 2px 1px;
	color:		#000;
	text-decoration:none;
}

#auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus
{
	background:	#D6E1FE;
	text-decoration:none;
}

#auto_completion_area ul
{
	margin:	0;
	padding: 0;
	list-style: none inside;
}
#auto_completion_area li
{
	padding:	0;
}
#auto_completion_area .prefix
{
	font-style: italic;
	padding: 0 3px;
}

Added applications/admin/static/edit_area/edit_area.js version [5942f9aa95].
















































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/******
 *
 *	EditArea 
 * 	Developped by Christophe Dolivet
 *	Released under LGPL, Apache and BSD licenses (use the one you want)
 *
******/

	function EditArea(){
		var t=this;
		t.error= false;	// to know if load is interrrupt
		
		t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"},
									{popup_id: "edit_area_help", icon_id: "help"}];
		t.plugins= {};
	
		t.line_number=0;
		
		parent.editAreaLoader.set_browser_infos(t); 	// navigator identification
		// fix IE8 detection as we run in IE7 emulate mode through X-UA <meta> tag
		if( t.isIE >= 8 )
			t.isIE	= 7;
		
		t.last_selection={};		
		t.last_text_to_highlight="";
		t.last_hightlighted_text= "";
		t.syntax_list= [];
		t.allready_used_syntax= {};
		t.check_line_selection_timer= 50;	// the timer delay for modification and/or selection change detection
		
		t.textareaFocused= false;
		t.highlight_selection_line= null;
		t.previous= [];
		t.next= [];
		t.last_undo="";
		t.files= {};
		t.filesIdAssoc= {};
		t.curr_file= '';
		//t.loaded= false;
		t.assocBracket={};
		t.revertAssocBracket= {};		
		// bracket selection init 
		t.assocBracket["("]=")";
		t.assocBracket["{"]="}";
		t.assocBracket["["]="]";		
		for(var index in t.assocBracket){
			t.revertAssocBracket[t.assocBracket[index]]=index;
		}
		t.is_editable= true;
		
		
		/*t.textarea="";	
		
		t.state="declare";
		t.code = []; // store highlight syntax for languagues*/
		// font datas
		t.lineHeight= 16;
		/*t.default_font_family= "monospace";
		t.default_font_size= 10;*/
		t.tab_nb_char= 8;	//nb of white spaces corresponding to a tabulation
		if(t.isOpera)
			t.tab_nb_char= 6;

		t.is_tabbing= false;
		
		t.fullscreen= {'isFull': false};
		
		t.isResizing=false;	// resize var
		
		// init with settings and ID (area_id is a global var defined by editAreaLoader on iframe creation
		t.id= area_id;
		t.settings= editAreas[t.id]["settings"];
		
		if((""+t.settings['replace_tab_by_spaces']).match(/^[0-9]+$/))
		{
			t.tab_nb_char= t.settings['replace_tab_by_spaces'];
			t.tabulation="";
			for(var i=0; i<t.tab_nb_char; i++)
				t.tabulation+=" ";
		}else{
			t.tabulation="\t";
		}
			
		// retrieve the init parameter for syntax
		if(t.settings["syntax_selection_allow"] && t.settings["syntax_selection_allow"].length>0)
			t.syntax_list= t.settings["syntax_selection_allow"].replace(/ /g,"").split(",");
		
		if(t.settings['syntax'])
			t.allready_used_syntax[t.settings['syntax']]=true;
		
		
	};
	EditArea.prototype.init= function(){
		var t=this, a, s=t.settings;
		t.textarea			= _$("textarea");
		t.container			= _$("container");
		t.result			= _$("result");
		t.content_highlight	= _$("content_highlight");
		t.selection_field	= _$("selection_field");
		t.selection_field_text= _$("selection_field_text");
		t.processing_screen	= _$("processing");
		t.editor_area		= _$("editor");
		t.tab_browsing_area	= _$("tab_browsing_area");
		t.test_font_size	= _$("test_font_size");
		a = t.textarea;
		
		if(!s['is_editable'])
			t.set_editable(false);
		
		t.set_show_line_colors( s['show_line_colors'] );
		
		if(syntax_selec= _$("syntax_selection"))
		{
			// set up syntax selection lsit in the toolbar
			for(var i=0; i<t.syntax_list.length; i++) {
				var syntax= t.syntax_list[i];
				var option= document.createElement("option");
				option.value= syntax;
				if(syntax==s['syntax'])
					option.selected= "selected";
				dispSyntax	= parent.editAreaLoader.syntax_display_name[ syntax ];
				option.innerHTML= typeof( dispSyntax ) == 'undefined' ? syntax.substring( 0, 1 ).toUpperCase() + syntax.substring( 1 ) : dispSyntax;//t.get_translation("syntax_" + syntax, "word");
				syntax_selec.appendChild(option);
			}
		}
		
		// add plugins buttons in the toolbar
		spans= parent.getChildren(_$("toolbar_1"), "span", "", "", "all", -1);
		
		for(var i=0; i<spans.length; i++){
		
			id=spans[i].id.replace(/tmp_tool_(.*)/, "$1");
			if(id!= spans[i].id){
				for(var j in t.plugins){
					if(typeof(t.plugins[j].get_control_html)=="function" ){
						html=t.plugins[j].get_control_html(id);
						if(html!=false){
							html= t.get_translation(html, "template");
							var new_span= document.createElement("span");
							new_span.innerHTML= html;				
							var father= spans[i].parentNode;
							spans[i].parentNode.replaceChild(new_span, spans[i]);	
							break; // exit the for loop					
						}
					}
				}
			}
		}
		
		// init datas
		//a.value	= 'a';//editAreas[t.id]["textarea"].value;
	
		if(s["debug"])
		{
			t.debug=parent.document.getElementById("edit_area_debug_"+t.id);
		}
		// init size		
		//this.update_size();
		
		if(_$("redo") != null)
			t.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
		
		// insert css rules for highlight mode		
		if(typeof(parent.editAreaLoader.syntax[s["syntax"]])!="undefined"){
			for(var i in parent.editAreaLoader.syntax){
				if (typeof(parent.editAreaLoader.syntax[i]["styles"]) != "undefined"){
					t.add_style(parent.editAreaLoader.syntax[i]["styles"]);
				}
			}
		}
	
		// init key events
		if(t.isOpera)
			_$("editor").onkeypress	= keyDown;
		else
			_$("editor").onkeydown	= keyDown;

		for(var i=0; i<t.inlinePopup.length; i++){
			if(t.isOpera)
				_$(t.inlinePopup[i]["popup_id"]).onkeypress	= keyDown;
			else
				_$(t.inlinePopup[i]["popup_id"]).onkeydown	= keyDown;
		}
		
		if(s["allow_resize"]=="both" || s["allow_resize"]=="x" || s["allow_resize"]=="y")
			t.allow_resize(true);
		
		parent.editAreaLoader.toggle(t.id, "on");
		//a.focus();
		// line selection init
		t.change_smooth_selection_mode(editArea.smooth_selection);
		// highlight
		t.execCommand("change_highlight", s["start_highlight"]);
	
		// get font size datas		
		t.set_font(editArea.settings["font_family"], editArea.settings["font_size"]);
		
		// set unselectable text
		children= parent.getChildren(document.body, "", "selec", "none", "all", -1);
		for(var i=0; i<children.length; i++){
			if(t.isIE)
				children[i].unselectable = true; // IE
			else
				children[i].onmousedown= function(){return false};
		/*	children[i].style.MozUserSelect = "none"; // Moz
			children[i].style.KhtmlUserSelect = "none";  // Konqueror/Safari*/
		}
		
		a.spellcheck= s["gecko_spellcheck"];
	
		/** Browser specific style fixes **/
		
		// fix rendering bug for highlighted lines beginning with no tabs
		if( t.isFirefox >= '3' ) {
			t.content_highlight.style.paddingLeft= "1px";
			t.selection_field.style.paddingLeft= "1px";
			t.selection_field_text.style.paddingLeft= "1px";
		}
		
		if(t.isIE && t.isIE < 8 ){
			a.style.marginTop= "-1px";
		}
		/*
		if(t.isOpera){
			t.editor_area.style.position= "absolute";
		}*/
		
		if( t.isSafari ){
			t.editor_area.style.position	= "absolute";
			a.style.marginLeft		="-3px";
			if( t.isSafari < 3.2 ) // Safari 3.0 (3.1?)
				a.style.marginTop	="1px";
		}
		
		// si le textarea n'est pas grand, un click sous le textarea doit provoquer un focus sur le textarea
		parent.editAreaLoader.add_event(t.result, "click", function(e){ if((e.target || e.srcElement)==editArea.result) { editArea.area_select(editArea.textarea.value.length, 0);}  });
		
		if(s['is_multi_files']!=false)
			t.open_file({'id': t.curr_file, 'text': ''});
	
		t.set_word_wrap( s['word_wrap'] );
		
		setTimeout("editArea.focus();editArea.manage_size();editArea.execCommand('EA_load');", 10);		
		//start checkup routine
		t.check_undo();
		t.check_line_selection(true);
		t.scroll_to_view();
		
		for(var i in t.plugins){
			if(typeof(t.plugins[i].onload)=="function")
				t.plugins[i].onload();
		}
		if(s['fullscreen']==true)
			t.toggle_full_screen(true);
	
		parent.editAreaLoader.add_event(window, "resize", editArea.update_size);
		parent.editAreaLoader.add_event(parent.window, "resize", editArea.update_size);
		parent.editAreaLoader.add_event(top.window, "resize", editArea.update_size);
		parent.editAreaLoader.add_event(window, "unload", function(){
			// in case where editAreaLoader have been already cleaned
			if( parent.editAreaLoader )
			{
				parent.editAreaLoader.remove_event(parent.window, "resize", editArea.update_size);
		  		parent.editAreaLoader.remove_event(top.window, "resize", editArea.update_size);
			}
			if(editAreas[editArea.id] && editAreas[editArea.id]["displayed"]){
				editArea.execCommand("EA_unload");
			}
		});
		
		
		/*date= new Date();
		alert(date.getTime()- parent.editAreaLoader.start_time);*/
	};
	
	
	
	//called by the toggle_on
	EditArea.prototype.update_size= function(){
		var d=document,pd=parent.document,height,width,popup,maxLeft,maxTop;
		
		if( typeof editAreas != 'undefined' && editAreas[editArea.id] && editAreas[editArea.id]["displayed"]==true){
			if(editArea.fullscreen['isFull']){	
				pd.getElementById("frame_"+editArea.id).style.width		= pd.getElementsByTagName("html")[0].clientWidth + "px";
				pd.getElementById("frame_"+editArea.id).style.height	= pd.getElementsByTagName("html")[0].clientHeight + "px";
			}
			
			if(editArea.tab_browsing_area.style.display=='block' && ( !editArea.isIE || editArea.isIE >= 8 ) )
			{
				editArea.tab_browsing_area.style.height	= "0px";
				editArea.tab_browsing_area.style.height	= (editArea.result.offsetTop - editArea.tab_browsing_area.offsetTop -1)+"px";
			}
			
			height	= d.body.offsetHeight - editArea.get_all_toolbar_height() - 4;
			editArea.result.style.height	= height +"px";
			
			width	= d.body.offsetWidth -2;
			editArea.result.style.width		= width+"px";
			//alert("result h: "+ height+" w: "+width+"\ntoolbar h: "+this.get_all_toolbar_height()+"\nbody_h: "+document.body.offsetHeight);
			
			// check that the popups don't get out of the screen
			for( i=0; i < editArea.inlinePopup.length; i++ )
			{
				popup	= _$(editArea.inlinePopup[i]["popup_id"]);
				maxLeft	= d.body.offsetWidth - popup.offsetWidth;
				maxTop	= d.body.offsetHeight - popup.offsetHeight;
				if( popup.offsetTop > maxTop )
					popup.style.top		= maxTop+"px";
				if( popup.offsetLeft > maxLeft )
					popup.style.left	= maxLeft+"px";
			}
			
			editArea.manage_size( true );
			editArea.fixLinesHeight( editArea.textarea.value, 0,-1);
		}		
	};
	
	
	EditArea.prototype.manage_size= function(onlyOneTime){
		if(!editAreas[this.id])
			return false;
			
		if(editAreas[this.id]["displayed"]==true && this.textareaFocused)
		{
			var area_height,resized= false;
			
			//1) Manage display width
			//1.1) Calc the new width to use for display
			if( !this.settings['word_wrap'] )
			{
				var area_width= this.textarea.scrollWidth;
				area_height= this.textarea.scrollHeight;
				// bug on old opera versions
				if(this.isOpera && this.isOpera < 9.6 ){
					area_width=10000; 								
				}
				//1.2) the width is not the same, we must resize elements
				if(this.textarea.previous_scrollWidth!=area_width)
				{	
					this.container.style.width= area_width+"px";
					this.textarea.style.width= area_width+"px";
					this.content_highlight.style.width= area_width+"px";	
					this.textarea.previous_scrollWidth=area_width;
					resized=true;
				}
			}
			// manage wrap width
			if( this.settings['word_wrap'] )
			{
				newW=this.textarea.offsetWidth;
				if( this.isFirefox || this.isIE )
					newW-=2;
				if( this.isSafari )
					newW-=6;
				this.content_highlight.style.width=this.selection_field_text.style.width=this.selection_field.style.width=this.test_font_size.style.width=newW+"px";
			}
			
			//2) Manage display height
			//2.1) Calc the new height to use for display
			if( this.isOpera || this.isFirefox || this.isSafari ) { 
				area_height= this.getLinePosTop( this.last_selection["nb_line"] + 1 );
			} else {
				area_height = this.textarea.scrollHeight;
			}	
			//2.2) the width is not the same, we must resize elements 
			if(this.textarea.previous_scrollHeight!=area_height)	
			{	
				this.container.style.height= (area_height+2)+"px";
				this.textarea.style.height= area_height+"px";
				this.content_highlight.style.height= area_height+"px";	
				this.textarea.previous_scrollHeight= area_height;
				resized=true;
			}
		
			//3) if there is new lines, we add new line numbers in the line numeration area
			if(this.last_selection["nb_line"] >= this.line_number)
			{
				var newLines= '', destDiv=_$("line_number"), start=this.line_number, end=this.last_selection["nb_line"]+100;
				for( i = start+1; i < end; i++ )
				{
					newLines+='<div id="line_'+ i +'">'+i+"</div>";
					this.line_number++;
				}
				destDiv.innerHTML= destDiv.innerHTML + newLines;
				if(this.settings['word_wrap']){
					this.fixLinesHeight( this.textarea.value, start, -1 );
				}
			}
		
			//4) be sure the text is well displayed
			this.textarea.scrollTop="0px";
			this.textarea.scrollLeft="0px";
			if(resized==true){
				this.scroll_to_view();
			}
		}
		
		if(!onlyOneTime)
			setTimeout("editArea.manage_size();", 100);
	};
	
	EditArea.prototype.execCommand= function(cmd, param){
		
		for(var i in this.plugins){
			if(typeof(this.plugins[i].execCommand)=="function"){
				if(!this.plugins[i].execCommand(cmd, param))
					return;
			}
		}
		switch(cmd){
			case "save":
				if(this.settings["save_callback"].length>0)
					eval("parent."+this.settings["save_callback"]+"('"+ this.id +"', editArea.textarea.value);");
				break;
			case "load":
				if(this.settings["load_callback"].length>0)
					eval("parent."+this.settings["load_callback"]+"('"+ this.id +"');");
				break;
			case "onchange":
				if(this.settings["change_callback"].length>0)
					eval("parent."+this.settings["change_callback"]+"('"+ this.id +"');");
				break;		
			case "EA_load":
				if(this.settings["EA_load_callback"].length>0)
					eval("parent."+this.settings["EA_load_callback"]+"('"+ this.id +"');");
				break;
			case "EA_unload":
				if(this.settings["EA_unload_callback"].length>0)
					eval("parent."+this.settings["EA_unload_callback"]+"('"+ this.id +"');");
				break;
			case "toggle_on":
				if(this.settings["EA_toggle_on_callback"].length>0)
					eval("parent."+this.settings["EA_toggle_on_callback"]+"('"+ this.id +"');");
				break;
			case "toggle_off":
				if(this.settings["EA_toggle_off_callback"].length>0)
					eval("parent."+this.settings["EA_toggle_off_callback"]+"('"+ this.id +"');");
				break;
			case "re_sync":
				if(!this.do_highlight)
					break;
			case "file_switch_on":
				if(this.settings["EA_file_switch_on_callback"].length>0)
					eval("parent."+this.settings["EA_file_switch_on_callback"]+"(param);");
				break;
			case "file_switch_off":
				if(this.settings["EA_file_switch_off_callback"].length>0)
					eval("parent."+this.settings["EA_file_switch_off_callback"]+"(param);");
				break;
			case "file_close":
				if(this.settings["EA_file_close_callback"].length>0)
					return eval("parent."+this.settings["EA_file_close_callback"]+"(param);");
				break;
			
			default:
				if(typeof(eval("editArea."+cmd))=="function")
				{
					if(this.settings["debug"])
						eval("editArea."+ cmd +"(param);");
					else
						try{eval("editArea."+ cmd +"(param);");}catch(e){};
				}
		}
	};
	
	EditArea.prototype.get_translation= function(word, mode){
		if(mode=="template")
			return parent.editAreaLoader.translate(word, this.settings["language"], mode);
		else
			return parent.editAreaLoader.get_word_translation(word, this.settings["language"]);
	};
	
	EditArea.prototype.add_plugin= function(plug_name, plug_obj){
		for(var i=0; i<this.settings["plugins"].length; i++){
			if(this.settings["plugins"][i]==plug_name){
				this.plugins[plug_name]=plug_obj;
				plug_obj.baseURL=parent.editAreaLoader.baseURL + "plugins/" + plug_name + "/";
				if( typeof(plug_obj.init)=="function" )
					plug_obj.init();
			}
		}
	};
	
	EditArea.prototype.load_css= function(url){
		try{
			link = document.createElement("link");
			link.type = "text/css";
			link.rel= "stylesheet";
			link.media="all";
			link.href = url;
			head = document.getElementsByTagName("head");
			head[0].appendChild(link);
		}catch(e){
			document.write("<link href='"+ url +"' rel='stylesheet' type='text/css' />");
		}
	};
	
	EditArea.prototype.load_script= function(url){
		try{
			script = document.createElement("script");
			script.type = "text/javascript";
			script.src  = url;
			script.charset= "UTF-8";
			head = document.getElementsByTagName("head");
			head[0].appendChild(script);
		}catch(e){
			document.write("<script type='text/javascript' src='" + url + "' charset=\"UTF-8\"><"+"/script>");
		}
	};
	
	// add plugin translation to language translation array
	EditArea.prototype.add_lang= function(language, values){
		if(!parent.editAreaLoader.lang[language])
			parent.editAreaLoader.lang[language]={};
		for(var i in values)
			parent.editAreaLoader.lang[language][i]= values[i];
	};
	
	// short cut for document.getElementById()
	function _$(id){return document.getElementById( id );};

	var editArea = new EditArea();	
	parent.editAreaLoader.add_event(window, "load", init);
	
	function init(){		
		setTimeout("editArea.init();  ", 10);
	};

Added applications/admin/static/edit_area/edit_area_compressor.php version [6bb612358c].













































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?php
	/******
	 *
	 *	EditArea PHP compressor
	 * 	Developped by Christophe Dolivet
	 *	Released under LGPL, Apache and BSD licenses
	 *	v1.1.3 (2007/01/18)	 
	 *
	******/
	
	// CONFIG
	$param['cache_duration']= 3600 * 24 * 10;		// 10 days util client cache expires
	$param['compress'] = true;						// enable the code compression, should be activated but it can be usefull to desactivate it for easier error retrieving (true or false)
	$param['debug'] = false;						// Enable this option if you need debuging info
	$param['use_disk_cache']= true;					// If you enable this option gzip files will be cached on disk.
	$param['use_gzip']= true;						// Enable gzip compression
	// END CONFIG
	
	$compressor= new Compressor($param);
	
	class Compressor{
	
		
		function compressor($param)
		{
			$this->__construct($param);
		}
		
		function __construct($param)
		{
			$this->start_time= $this->get_microtime();
			$this->file_loaded_size=0;
			$this->param= $param;
			$this->script_list="";
			$this->path= dirname(__FILE__)."/";
			if(isset($_GET['plugins'])){
				$this->load_all_plugins= true;
				$this->full_cache_file= $this->path."edit_area_full_with_plugins.js";
				$this->gzip_cache_file= $this->path."edit_area_full_with_plugins.gz";
			}else{
				$this->load_all_plugins= false;
				$this->full_cache_file= $this->path."edit_area_full.js";
				$this->gzip_cache_file= $this->path."edit_area_full.gz";
			}
			
			$this->check_gzip_use();
			$this->send_headers();
			$this->check_cache();
			$this->load_files();
			$this->send_datas();
		}
		
		function send_headers()
		{
			header("Content-type: text/javascript; charset: UTF-8");
			header("Vary: Accept-Encoding"); // Handle proxies
			header(sprintf("Expires: %s GMT", gmdate("D, d M Y H:i:s", time() + $this->param['cache_duration'])) );
			if($this->use_gzip)
				header("Content-Encoding: ".$this->gzip_enc_header);
		}
		
		function check_gzip_use()
		{
			$encodings = array();
			$desactivate_gzip=false;
					
			if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
				$encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));
			
			// desactivate gzip for IE version < 7
			if(preg_match("/(?:msie )([0-9.]+)/i", $_SERVER['HTTP_USER_AGENT'], $ie))
			{
				if($ie[1]<7)
					$desactivate_gzip=true;	
			}
			
			// Check for gzip header or northon internet securities
			if (!$desactivate_gzip && $this->param['use_gzip'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
				$this->gzip_enc_header= in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
				$this->use_gzip=true;
				$this->cache_file=$this->gzip_cache_file;
			}else{
				$this->use_gzip=false;
				$this->cache_file=$this->full_cache_file;
			}
		}
		
		function check_cache()
		{
			// Only gzip the contents if clients and server support it
			if (file_exists($this->cache_file)) {
				// check if cache file must be updated
				$cache_date=0;				
				if ($dir = opendir($this->path)) {
					while (($file = readdir($dir)) !== false) {
						if(is_file($this->path.$file) && $file!="." && $file!="..")
							$cache_date= max($cache_date, filemtime($this->path.$file));
					}
					closedir($dir);
				}
				if($this->load_all_plugins){
					$plug_path= $this->path."plugins/";
					if (($dir = @opendir($plug_path)) !== false)
					{
						while (($file = readdir($dir)) !== false)
						{
							if ($file !== "." && $file !== "..")
							{
								if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
									$cache_date= max($cache_date, filemtime("plugins/".$file."/".$file.".js"));
							}
						}
						closedir($dir);
					}
				}

				if(filemtime($this->cache_file) >= $cache_date){
					// if cache file is up to date
					$last_modified = gmdate("D, d M Y H:i:s",filemtime($this->cache_file))." GMT";
					if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && strcasecmp($_SERVER["HTTP_IF_MODIFIED_SINCE"], $last_modified) === 0)
					{
						header("HTTP/1.1 304 Not Modified");
						header("Last-modified: ".$last_modified);
						header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
						header("Pragma:"); // Tells HTTP 1.0 clients to cache
					}
					else
					{
						header("Last-modified: ".$last_modified);
						header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
						header("Pragma:"); // Tells HTTP 1.0 clients to cache
						header('Content-Length: '.filesize($this->cache_file));
						echo file_get_contents($this->cache_file);
					}				
					die;
				}
			}
			return false;
		}
		
		function load_files()
		{
			$loader= $this->get_content("edit_area_loader.js")."\n";
			
			// get the list of other files to load
	    	$loader= preg_replace("/(t\.scripts_to_load=\s*)\[([^\]]*)\];/e"
						, "\$this->replace_scripts('script_list', '\\1', '\\2')"
						, $loader);
		
			$loader= preg_replace("/(t\.sub_scripts_to_load=\s*)\[([^\]]*)\];/e"
						, "\$this->replace_scripts('sub_script_list', '\\1', '\\2')"
						, $loader);

			// replace languages names
			$reg_path= $this->path."reg_syntax/";
			$a_displayName	= array();
			if (($dir = @opendir($reg_path)) !== false)
			{
				while (($file = readdir($dir)) !== false)
				{
					if( $file !== "." && $file !== ".." && ( $pos = strpos( $file, '.js' ) ) !== false )
					{
						$jsContent	= $this->file_get_contents( $reg_path.$file );
						if( preg_match( '@(\'|")DISPLAY_NAME\1\s*:\s*(\'|")(.*)\2@', $jsContent, $match ) )
						{
							$a_displayName[] = "'". substr( $file, 0, $pos ) ."':'". htmlspecialchars( $match[3], ENT_QUOTES ) ."'";
						}
					}
				}
				closedir($dir);
			}
			$loader	= str_replace( '/*syntax_display_name_AUTO-FILL-BY-COMPRESSOR*/', implode( ",", $a_displayName ), $loader );
						
			$this->datas= $loader;
			$this->compress_javascript($this->datas);
			
			// load other scripts needed for the loader
			preg_match_all('/"([^"]*)"/', $this->script_list, $match);
			foreach($match[1] as $key => $value)
			{
				$content= $this->get_content(preg_replace("/\\|\//i", "", $value).".js");
				$this->compress_javascript($content);
				$this->datas.= $content."\n";
			}
			//$this->datas);
			//$this->datas= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $this->datas);
			
			// improved compression step 1/2	
			$this->datas= preg_replace(array("/(\b)EditAreaLoader(\b)/", "/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/"), array("EAL", "eAL", "eAs"), $this->datas);
			//$this->datas= str_replace(array("EditAreaLoader", "editAreaLoader", "editAreas"), array("EAL", "eAL", "eAs"), $this->datas);
			$this->datas.= "var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;";
		
			// load sub scripts
			$sub_scripts="";
			$sub_scripts_list= array();
			preg_match_all('/"([^"]*)"/', $this->sub_script_list, $match);
			foreach($match[1] as $value){
				$sub_scripts_list[]= preg_replace("/\\|\//i", "", $value).".js";
			}
		
			if($this->load_all_plugins){
				// load plugins scripts
				$plug_path= $this->path."plugins/";
				if (($dir = @opendir($plug_path)) !== false)
				{
					while (($file = readdir($dir)) !== false)
					{
						if ($file !== "." && $file !== "..")
						{
							if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
								$sub_scripts_list[]= "plugins/".$file."/".$file.".js";
						}
					}
					closedir($dir);
				}
			}
							
			foreach($sub_scripts_list as $value){
				$sub_scripts.= $this->get_javascript_content($value);
			}
			// improved compression step 2/2	
			$sub_scripts= preg_replace(array("/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/", "/(\b)editArea(\b)/", "/(\b)EditArea(\b)/"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
		//	$sub_scripts= str_replace(array("editAreaLoader", "editAreas", "editArea", "EditArea"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
			$sub_scripts.= "var editArea= eA;EditArea=EA;";
			
			
			// add the scripts
		//	$this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\";\n", $sub_scripts);
		
		
			// add the script and use a last compression 
			if( $this->param['compress'] )
			{
				$last_comp	= array( 'Á' => 'this',
								 'Â' => 'textarea',
								 'Ã' => 'function',
								 'Ä' => 'prototype',
								 'Å' => 'settings',
								 'Æ' => 'length',
								 'Ç' => 'style',
								 'È' => 'parent',
								 'É' => 'last_selection',
								 'Ê' => 'value',
								 'Ë' => 'true',
								 'Ì' => 'false'
								 /*,
									'Î' => '"',
								 'Ï' => "\n",
								 'À' => "\r"*/);
			}
			else
			{
				$last_comp	= array();
			}
			
			$js_replace= '';
			foreach( $last_comp as $key => $val )
				$js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')";
			
			$this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\"%s;\n",
								str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ), 
								$js_replace);
			
			if($this->load_all_plugins)
				$this->datas.="editAreaLoader.all_plugins_loaded=true;\n";
		
			
			// load the template
			$this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html"));
			// load the css
			$this->datas.= sprintf("editAreaLoader.iframe_css= \"<style>%s</style>\";\n", $this->get_css_content("edit_area.css"));
					
		//	$this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();";
					
		}
		
		function send_datas()
		{
			if($this->param['debug']){
				$header=sprintf("/* USE PHP COMPRESSION\n");
				$header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas));
				if($this->use_gzip){
					$gzip_datas=  gzencode($this->datas, 9, FORCE_GZIP);				
					$header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas));
					$ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0);			
				}else{
					$ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0);
				}
				$header.=sprintf(", reduced by %s%%\n", $ratio);
				$header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time); 
				$header.=sprintf("%s\n", implode("\n", $this->infos));
				$header.=sprintf("*/\n");
				$this->datas= $header.$this->datas;	
			}
			$mtime= time(); // ensure that the 2 disk files will have the same update time
			// generate gzip file and cahce it if using disk cache
			if($this->use_gzip){
				$this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);
				if($this->param['use_disk_cache'])
					$this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime);
			}
			
			// generate full js file and cache it if using disk cache			
			if($this->param['use_disk_cache'])
				$this->file_put_contents($this->full_cache_file, $this->datas, $mtime);
			
			// generate output
			if($this->use_gzip)
				echo $this->gzip_datas;
			else
				echo $this->datas;
				
//			die;
		}
				
		
		function get_content($end_uri)
		{
			$end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security)
			$file= $this->path.$end_uri;
			if(file_exists($file)){
				$this->infos[]=sprintf("'%s' loaded", $end_uri);
				/*$fd = fopen($file, 'rb');
				$content = fread($fd, filesize($file));
				fclose($fd);
				return $content;*/
				return $this->file_get_contents($file);
			}else{
				$this->infos[]=sprintf("'%s' not loaded", $end_uri);
				return "";
			}
		}
		
		function get_javascript_content($end_uri)
		{
			$val=$this->get_content($end_uri);
	
			$this->compress_javascript($val);
			$this->prepare_string_for_quotes($val);
			return $val;
		}
		
		function compress_javascript(&$code)
		{
			if($this->param['compress'])
			{
				// remove all comments
				//	(\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))
				$code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
				// remove line return, empty line and tabulation
				$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
				// add line break before "else" otherwise navigators can't manage to parse the file
				$code= preg_replace('/(\b(else)\b)/', "\n$1", $code);
				// remove unnecessary spaces
				$code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code);
			}
		}
		
		function get_css_content($end_uri){
			$code=$this->get_content($end_uri);
			// remove comments
			$code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code);
			// remove spaces
			$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code);
			// remove spaces
			$code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code);
		
			$this->prepare_string_for_quotes($code);
			return $code;
		}
		
		function get_html_content($end_uri){
			$code=$this->get_content($end_uri);
			//$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
			$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
			$this->prepare_string_for_quotes($code);
			return $code;
		}
		
		function prepare_string_for_quotes(&$str){
			// prepare the code to be putted into quotes 
			/*$pattern= array("/(\\\\)?\"/", '/\\\n/'	, '/\\\r/'	, "/(\r?\n)/");
			$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r'	, '\\\n"$1+"');*/
			$pattern= array("/(\\\\)?\"/", '/\\\n/'	, '/\\\r/'	, "/(\r?\n)/");
			if($this->param['compress'])
				$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r'	, '\n');
			else
				$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r'	, "\\n\"\n+\"");
			$str= preg_replace($pattern, $replace, $str);
		}
		
		function replace_scripts($var, $param1, $param2)
		{
			$this->$var=stripslashes($param2);
	        return $param1."[];";
		}

		/* for php version that have not thoses functions */
		function file_get_contents($file)
		{
			$fd = fopen($file, 'rb');
			$content = fread($fd, filesize($file));
			fclose($fd);
			$this->file_loaded_size+= strlen($content);
			return $content;				
		}
		
		function file_put_contents($file, &$content, $mtime=-1)
		{
			if($mtime==-1)
				$mtime=time();
			$fp = @fopen($file, "wb");
			if ($fp) {
				fwrite($fp, $content);
				fclose($fp);
				touch($file, $mtime);
				return true;
			}
			return false;
		}
		
		function get_microtime()
		{
		   list($usec, $sec) = explode(" ", microtime());
		   return ((float)$usec + (float)$sec);
		}
	}	
?>

Added applications/admin/static/edit_area/edit_area_full.gz version [c2b0e8cddf].

cannot compute difference between binary files

Added applications/admin/static/edit_area/edit_area_full.js version [126aeeb5d1].

cannot compute difference between binary files

Added applications/admin/static/edit_area/edit_area_full_with_plugins.js version [781fbd12f6].

cannot compute difference between binary files

Added applications/admin/static/edit_area/edit_area_functions.js version [6a06ff9a69].



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	//replace tabulation by the good number of white spaces
	EditArea.prototype.replace_tab= function(text){
		return text.replace(/((\n?)([^\t\n]*)\t)/gi, editArea.smartTab);		// slower than simple replace...	
	};
	
	// call by the replace_tab function
	EditArea.prototype.smartTab= function(){
		val="                   ";
		return EditArea.prototype.smartTab.arguments[2] + EditArea.prototype.smartTab.arguments[3] + val.substr(0, editArea.tab_nb_char - (EditArea.prototype.smartTab.arguments[3].length)%editArea.tab_nb_char);
	};
	
	EditArea.prototype.show_waiting_screen= function(){
		width	= this.editor_area.offsetWidth;
		height	= this.editor_area.offsetHeight;
		if( !(this.isIE && this.isIE<6) )
		{
			width	-= 2;
			height	-= 2;
		}
		this.processing_screen.style.display= "block";
		this.processing_screen.style.width	= width+"px";
		this.processing_screen.style.height	= height+"px";
		this.waiting_screen_displayed		= true;
	};
	
	EditArea.prototype.hide_waiting_screen= function(){
		this.processing_screen.style.display="none";
		this.waiting_screen_displayed= false;
	};
	
	EditArea.prototype.add_style= function(styles){
		if(styles.length>0){
			newcss = document.createElement("style");
			newcss.type="text/css";
			newcss.media="all";
			if(newcss.styleSheet){ // IE
				newcss.styleSheet.cssText = styles;
			} else { // W3C
				newcss.appendChild(document.createTextNode(styles));
			}
			document.getElementsByTagName("head")[0].appendChild(newcss);
		}
	};
	
	EditArea.prototype.set_font= function(family, size){
		var t=this, a=this.textarea, s=this.settings, elem_font, i, elem;
		// list all elements concerned by font changes
		var elems= ["textarea", "content_highlight", "cursor_pos", "end_bracket", "selection_field", "selection_field_text", "line_number"];
		
		if(family && family!="")
			s["font_family"]= family;
		if(size && size>0)
			s["font_size"]	= size;
		if( t.isOpera && t.isOpera < 9.6 )	// opera<9.6 can't manage non monospace font
			s['font_family']="monospace";
			
		// update the select tag
		if( elem_font = _$("area_font_size") )
		{	
			for( i = 0; i < elem_font.length; i++ )
			{
				if( elem_font.options[i].value && elem_font.options[i].value == s["font_size"] )
					elem_font.options[i].selected=true;
			}
		}
		
		/*
		 * somethimes firefox has rendering mistake with non-monospace font for text width in textarea vs in div for changing font size (eg: verdana change between 11pt to 12pt)
		 * => looks like a browser internal random bug as text width can change while content_highlight is updated
		 * we'll check if the font-size produce the same text width inside textarea and div and if not, we'll increment the font-size
		 * 
		 * This is an ugly fix 
		 */ 
		if( t.isFirefox )
		{
			var nbTry = 3;
			do {
				var div1 = document.createElement( 'div' ), text1 = document.createElement( 'textarea' );
				var styles = {
					width:		'40px',
					overflow:	'scroll',
					zIndex: 	50,
					visibility:	'hidden',
					fontFamily:	s["font_family"],
					fontSize:	s["font_size"]+"pt",
					lineHeight:	t.lineHeight+"px",
					padding:	'0',
					margin:		'0',
					border:		'none',
					whiteSpace:	'nowrap'
				};
				var diff, changed = false;
				for( i in styles )
				{
					div1.style[ i ]		= styles[i];
					text1.style[ i ]	= styles[i];
				}
				// no wrap for this text
				text1.wrap = 'off';
				text1.setAttribute('wrap', 'off');
				t.container.appendChild( div1 );
				t.container.appendChild( text1 );
				// try to make FF to bug
				div1.innerHTML 		= text1.value	= 'azertyuiopqsdfghjklm';
				div1.innerHTML 		= text1.value	= text1.value+'wxcvbn^p*ù$!:;,,';
				diff	=  text1.scrollWidth - div1.scrollWidth;
				
				// firefox return here a diff of 1 px between equals scrollWidth (can't explain)
				if( Math.abs( diff ) >= 2 )
				{
					s["font_size"]++;
					changed	= true;
				}
				t.container.removeChild( div1 );
				t.container.removeChild( text1 );
				nbTry--;
			}while( changed && nbTry > 0 );
		}
		
		
		// calc line height
		elem					= t.test_font_size;
		elem.style.fontFamily	= ""+s["font_family"];
		elem.style.fontSize		= s["font_size"]+"pt";				
		elem.innerHTML			= "0";		
		t.lineHeight			= elem.offsetHeight;

		// update font for all concerned elements
		for( i=0; i<elems.length; i++)
		{
			elem	= _$(elems[i]);	
			elem.style.fontFamily	= s["font_family"];
			elem.style.fontSize		= s["font_size"]+"pt";
			elem.style.lineHeight	= t.lineHeight+"px";
		}
		// define a css for <pre> tags
		t.add_style("pre{font-family:"+s["font_family"]+"}");
		
		// old opera and IE>=8 doesn't update font changes to the textarea
		if( ( t.isOpera && t.isOpera < 9.6 ) || t.isIE >= 8 )
		{
			var parNod = a.parentNode, nxtSib = a.nextSibling, start= a.selectionStart, end= a.selectionEnd;
			parNod.removeChild(a);
			parNod.insertBefore(a, nxtSib);
			t.area_select(start, end-start);
		}
		
		// force update of selection field
		this.focus();
		this.update_size();
		this.check_line_selection();
	};
	
	EditArea.prototype.change_font_size= function(){
		var size=_$("area_font_size").value;
		if(size>0)
			this.set_font("", size);			
	};
	
	
	EditArea.prototype.open_inline_popup= function(popup_id){
		this.close_all_inline_popup();
		var popup= _$(popup_id);		
		var editor= _$("editor");
		
		// search matching icon
		for(var i=0; i<this.inlinePopup.length; i++){
			if(this.inlinePopup[i]["popup_id"]==popup_id){
				var icon= _$(this.inlinePopup[i]["icon_id"]);
				if(icon){
					this.switchClassSticky(icon, 'editAreaButtonSelected', true);			
					break;
				}
			}
		}
		// check size
		popup.style.height="auto";
		popup.style.overflow= "visible";
			
		if(document.body.offsetHeight< popup.offsetHeight){
			popup.style.height= (document.body.offsetHeight-10)+"px";
			popup.style.overflow= "auto";
		}
		
		if(!popup.positionned){
			var new_left= editor.offsetWidth /2 - popup.offsetWidth /2;
			var new_top= editor.offsetHeight /2 - popup.offsetHeight /2;
			//var new_top= area.offsetHeight /2 - popup.offsetHeight /2;
			//var new_left= area.offsetWidth /2 - popup.offsetWidth /2;
			//alert("new_top: ("+new_top+") = calculeOffsetTop(area) ("+calculeOffsetTop(area)+") + area.offsetHeight /2("+ area.offsetHeight /2+") - popup.offsetHeight /2("+popup.offsetHeight /2+") - scrollTop: "+document.body.scrollTop);
			popup.style.left= new_left+"px";
			popup.style.top= new_top+"px";
			popup.positionned=true;
		}
		popup.style.visibility="visible";
		
		//popup.style.display="block";
	};

	EditArea.prototype.close_inline_popup= function(popup_id){
		var popup= _$(popup_id);		
		// search matching icon
		for(var i=0; i<this.inlinePopup.length; i++){
			if(this.inlinePopup[i]["popup_id"]==popup_id){
				var icon= _$(this.inlinePopup[i]["icon_id"]);
				if(icon){
					this.switchClassSticky(icon, 'editAreaButtonNormal', false);			
					break;
				}
			}
		}
		
		popup.style.visibility="hidden";	
	};
	
	EditArea.prototype.close_all_inline_popup= function(e){
		for(var i=0; i<this.inlinePopup.length; i++){
			this.close_inline_popup(this.inlinePopup[i]["popup_id"]);		
		}
		this.textarea.focus();
	};
	
	EditArea.prototype.show_help= function(){
		
		this.open_inline_popup("edit_area_help");
		
	};
			
	EditArea.prototype.new_document= function(){
		this.textarea.value="";
		this.area_select(0,0);
	};
	
	EditArea.prototype.get_all_toolbar_height= function(){
		var area= _$("editor");
		var results= parent.getChildren(area, "div", "class", "area_toolbar", "all", "0");	// search only direct children
		//results= results.concat(getChildren(area, "table", "class", "area_toolbar", "all", "0"));
		var height=0;
		for(var i=0; i<results.length; i++){			
			height+= results[i].offsetHeight;
		}
		//alert("toolbar height: "+height);
		return height;
	};
	
	EditArea.prototype.go_to_line= function(line){	
		if(!line)
		{	
			var icon= _$("go_to_line");
			if(icon != null){
				this.restoreClass(icon);
				this.switchClassSticky(icon, 'editAreaButtonSelected', true);
			}
			
			line= prompt(this.get_translation("go_to_line_prompt"));
			if(icon != null)
				this.switchClassSticky(icon, 'editAreaButtonNormal', false);
		}
		if(line && line!=null && line.search(/^[0-9]+$/)!=-1){
			var start=0;
			var lines= this.textarea.value.split("\n");
			if(line > lines.length)
				start= this.textarea.value.length;
			else{
				for(var i=0; i<Math.min(line-1, lines.length); i++)
					start+= lines[i].length + 1;
			}
			this.area_select(start, 0);
		}
		
		
	};
	
	
	EditArea.prototype.change_smooth_selection_mode= function(setTo){
		//alert("setTo: "+setTo);
		if(this.do_highlight)
			return;
			
		if(setTo != null){
			if(setTo === false)
				this.smooth_selection=true;
			else
				this.smooth_selection=false;
		}
		var icon= _$("change_smooth_selection");
		this.textarea.focus();
		if(this.smooth_selection===true){
			//setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
			/*setAttribute(icon, "oldClassName", "editAreaButtonNormal" );
			setAttribute(icon, "className", "editAreaButtonNormal" );*/
			//this.restoreClass(icon);
			//this.restoreAndSwitchClass(icon,'editAreaButtonNormal');
			this.switchClassSticky(icon, 'editAreaButtonNormal', false);
			
			this.smooth_selection=false;
			this.selection_field.style.display= "none";
			_$("cursor_pos").style.display= "none";
			_$("end_bracket").style.display= "none";
		}else{
			//setAttribute(icon, "class", getAttribute(icon, "class") + " selected");
			//this.switchClass(icon,'editAreaButtonSelected');
			this.switchClassSticky(icon, 'editAreaButtonSelected', false);
			this.smooth_selection=true;
			this.selection_field.style.display= "block";
			_$("cursor_pos").style.display= "block";
			_$("end_bracket").style.display= "block";
		}	
	};
	
	// the auto scroll of the textarea has some lacks when it have to show cursor in the visible area when the textarea size change
	// show specifiy whereas it is the "top" or "bottom" of the selection that is showned
	EditArea.prototype.scroll_to_view= function(show){
		var zone, lineElem;
		if(!this.smooth_selection)
			return;
		zone= _$("result");
		
		// manage height scroll
		var cursor_pos_top= _$("cursor_pos").cursor_top;
		if(show=="bottom")
		{
			//cursor_pos_top+=  (this.last_selection["line_nb"]-1)* this.lineHeight;
			cursor_pos_top+= this.getLinePosTop( this.last_selection['line_start'] + this.last_selection['line_nb'] - 1 );
		}
			
		var max_height_visible= zone.clientHeight + zone.scrollTop;
		var miss_top	= cursor_pos_top + this.lineHeight - max_height_visible;
		if(miss_top>0){
			//alert(miss_top);
			zone.scrollTop=  zone.scrollTop + miss_top;
		}else if( zone.scrollTop > cursor_pos_top){
			// when erase all the content -> does'nt scroll back to the top
			//alert("else: "+cursor_pos_top);
			zone.scrollTop= cursor_pos_top;	 
		}
		
		// manage left scroll
		//var cursor_pos_left= parseInt(_$("cursor_pos").style.left.replace("px",""));
		var cursor_pos_left= _$("cursor_pos").cursor_left;
		var max_width_visible= zone.clientWidth + zone.scrollLeft;
		var miss_left= cursor_pos_left + 10 - max_width_visible;
		if(miss_left>0){			
			zone.scrollLeft= zone.scrollLeft + miss_left + 50;
		}else if( zone.scrollLeft > cursor_pos_left){
			zone.scrollLeft= cursor_pos_left ;
		}else if( zone.scrollLeft == 45){
			// show the line numbers if textarea align to it's left
			zone.scrollLeft=0;
		}
	};
	
	EditArea.prototype.check_undo= function(only_once){
		if(!editAreas[this.id])
			return false;
		if(this.textareaFocused && editAreas[this.id]["displayed"]==true){
			var text=this.textarea.value;
			if(this.previous.length<=1)
				this.switchClassSticky(_$("undo"), 'editAreaButtonDisabled', true);
		
			if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1]["text"] != text){
				this.previous.push({"text": text, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd});
				if(this.previous.length > this.settings["max_undo"]+1)
					this.previous.shift();
				
			}
			if(this.previous.length >= 2)
				this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);		
		}

		if(!only_once)
			setTimeout("editArea.check_undo()", 3000);
	};
	
	EditArea.prototype.undo= function(){
		//alert("undo"+this.previous.length);
		if(this.previous.length > 0)
		{
			this.getIESelection();
		//	var pos_cursor=this.textarea.selectionStart;
			this.next.push( { "text": this.textarea.value, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd } );
			var prev= this.previous.pop();
			if( prev["text"] == this.textarea.value && this.previous.length > 0 )
				prev	=this.previous.pop();						
			this.textarea.value	= prev["text"];
			this.last_undo		= prev["text"];
			this.area_select(prev["selStart"], prev["selEnd"]-prev["selStart"]);
			this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);
			this.resync_highlight(true);
			//alert("undo"+this.previous.length);
			this.check_file_changes();
		}
	};
	
	EditArea.prototype.redo= function(){
		if(this.next.length > 0)
		{
			/*this.getIESelection();*/
			//var pos_cursor=this.textarea.selectionStart;
			var next= this.next.pop();
			this.previous.push(next);
			this.textarea.value= next["text"];
			this.last_undo= next["text"];
			this.area_select(next["selStart"], next["selEnd"]-next["selStart"]);
			this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);
			this.resync_highlight(true);
			this.check_file_changes();
		}
		if(	this.next.length == 0)
			this.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
	};
	
	EditArea.prototype.check_redo= function(){
		if(editArea.next.length == 0 || editArea.textarea.value!=editArea.last_undo){
			editArea.next= [];	// undo the ability to use "redo" button
			editArea.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
		}
		else
		{
			this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);
		}
	};
	
	
	// functions that manage icons roll over, disabled, etc...
	EditArea.prototype.switchClass = function(element, class_name, lock_state) {
		var lockChanged = false;
	
		if (typeof(lock_state) != "undefined" && element != null) {
			element.classLock = lock_state;
			lockChanged = true;
		}
	
		if (element != null && (lockChanged || !element.classLock)) {
			element.oldClassName = element.className;
			element.className = class_name;
		}
	};
	
	EditArea.prototype.restoreAndSwitchClass = function(element, class_name) {
		if (element != null && !element.classLock) {
			this.restoreClass(element);
			this.switchClass(element, class_name);
		}
	};
	
	EditArea.prototype.restoreClass = function(element) {
		if (element != null && element.oldClassName && !element.classLock) {
			element.className = element.oldClassName;
			element.oldClassName = null;
		}
	};
	
	EditArea.prototype.setClassLock = function(element, lock_state) {
		if (element != null)
			element.classLock = lock_state;
	};
	
	EditArea.prototype.switchClassSticky = function(element, class_name, lock_state) {
		var lockChanged = false;
		if (typeof(lock_state) != "undefined" && element != null) {
			element.classLock = lock_state;
			lockChanged = true;
		}
	
		if (element != null && (lockChanged || !element.classLock)) {
			element.className = class_name;
			element.oldClassName = class_name;
		}
	};
	
	//make the "page up" and "page down" buttons works correctly
	EditArea.prototype.scroll_page= function(params){
		var dir= params["dir"], shift_pressed= params["shift"];
		var lines= this.textarea.value.split("\n");		
		var new_pos=0, length=0, char_left=0, line_nb=0, curLine=0;
		var toScrollAmount	= _$("result").clientHeight -30;
		var nbLineToScroll	= 0, diff= 0;
		
		if(dir=="up"){
			nbLineToScroll	= Math.ceil( toScrollAmount / this.lineHeight );
			
			// fix number of line to scroll
			for( i = this.last_selection["line_start"]; i - diff > this.last_selection["line_start"] - nbLineToScroll ; i-- )
			{
				if( elem = _$('line_'+ i) )
				{
					diff +=  Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );
				}
			}
			nbLineToScroll	-= diff;
			
			if(this.last_selection["selec_direction"]=="up"){
				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]-nbLineToScroll, lines.length); line_nb++){
					new_pos+= lines[line_nb].length + 1;
				}
				char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);
				if(shift_pressed)
					length=this.last_selection["selectionEnd"]-new_pos-char_left;	
				this.area_select(new_pos+char_left, length);
				view="top";
			}else{			
				view="bottom";
				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-1-nbLineToScroll, lines.length); line_nb++){
					new_pos+= lines[line_nb].length + 1;
				}
				char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);
				if(shift_pressed){
					//length=this.last_selection["selectionEnd"]-new_pos-char_left;	
					start= Math.min(this.last_selection["selectionStart"], new_pos+char_left);
					length= Math.max(new_pos+char_left, this.last_selection["selectionStart"] )- start ;
					if(new_pos+char_left < this.last_selection["selectionStart"])
						view="top";
				}else
					start=new_pos+char_left;
				this.area_select(start, length);
				
			}
		}
		else
		{
			var nbLineToScroll= Math.floor( toScrollAmount / this.lineHeight );
			// fix number of line to scroll
			for( i = this.last_selection["line_start"]; i + diff < this.last_selection["line_start"] + nbLineToScroll ; i++ )
			{
				if( elem = _$('line_'+ i) )
				{
					diff +=  Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );
				}
			}
			nbLineToScroll	-= diff;
				
			if(this.last_selection["selec_direction"]=="down"){
				view="bottom";
				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-2+nbLineToScroll, lines.length); line_nb++){
					if(line_nb==this.last_selection["line_start"]-1)
						char_left= this.last_selection["selectionStart"] -new_pos;
					new_pos+= lines[line_nb].length + 1;
									
				}
				if(shift_pressed){
					length=Math.abs(this.last_selection["selectionStart"]-new_pos);	
					length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]);
					//length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);
					this.area_select(Math.min(this.last_selection["selectionStart"], new_pos), length);
				}else{
					this.area_select(new_pos+char_left, 0);
				}
				
			}else{
				view="top";
				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+nbLineToScroll-1, lines.length, lines.length); line_nb++){
					if(line_nb==this.last_selection["line_start"]-1)
						char_left= this.last_selection["selectionStart"] -new_pos;
					new_pos+= lines[line_nb].length + 1;									
				}
				if(shift_pressed){
					length=Math.abs(this.last_selection["selectionEnd"]-new_pos-char_left);	
					length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"])- char_left-1;
					//length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);
					this.area_select(Math.min(this.last_selection["selectionEnd"], new_pos+char_left), length);
					if(new_pos+char_left > this.last_selection["selectionEnd"])
						view="bottom";
				}else{
					this.area_select(new_pos+char_left, 0);
				}
				
			}
		}
		//console.log( new_pos, char_left, length, nbLineToScroll, toScrollAmount, _$("result").clientHeigh );
		this.check_line_selection();
		this.scroll_to_view(view);
	};
	
	EditArea.prototype.start_resize= function(e){
		parent.editAreaLoader.resize["id"]		= editArea.id;		
		parent.editAreaLoader.resize["start_x"]	= (e)? e.pageX : event.x + document.body.scrollLeft;		
		parent.editAreaLoader.resize["start_y"]	= (e)? e.pageY : event.y + document.body.scrollTop;
		if(editArea.isIE)
		{
			editArea.textarea.focus();
			editArea.getIESelection();
		}
		parent.editAreaLoader.resize["selectionStart"]	= editArea.textarea.selectionStart;
		parent.editAreaLoader.resize["selectionEnd"]	= editArea.textarea.selectionEnd;
		parent.editAreaLoader.start_resize_area();
	};
	
	EditArea.prototype.toggle_full_screen= function(to){
		var t=this, p=parent, a=t.textarea, html, frame, selStart, selEnd, old, icon;
		if(typeof(to)=="undefined")
			to= !t.fullscreen['isFull'];
		old			= t.fullscreen['isFull'];
		t.fullscreen['isFull']= to;
		icon		= _$("fullscreen");
		selStart	= t.textarea.selectionStart;
		selEnd		= t.textarea.selectionEnd;
		html		= p.document.getElementsByTagName("html")[0];
		frame		= p.document.getElementById("frame_"+t.id);
		
		if(to && to!=old)
		{	// toogle on fullscreen		
			
			t.fullscreen['old_overflow']	= p.get_css_property(html, "overflow");
			t.fullscreen['old_height']		= p.get_css_property(html, "height");
			t.fullscreen['old_width']		= p.get_css_property(html, "width");
			t.fullscreen['old_scrollTop']	= html.scrollTop;
			t.fullscreen['old_scrollLeft']	= html.scrollLeft;
			t.fullscreen['old_zIndex']		= p.get_css_property(frame, "z-index");
			if(t.isOpera){
				html.style.height	= "100%";
				html.style.width	= "100%";	
			}
			html.style.overflow	= "hidden";
			html.scrollTop		= 0;
			html.scrollLeft		= 0;
			
			frame.style.position	= "absolute";
			frame.style.width		= html.clientWidth+"px";
			frame.style.height		= html.clientHeight+"px";
			frame.style.display		= "block";
			frame.style.zIndex		= "999999";
			frame.style.top			= "0px";
			frame.style.left		= "0px";
			
			// if the iframe was in a div with position absolute, the top and left are the one of the div, 
			// so I fix it by seeing at witch position the iframe start and correcting it
			frame.style.top			= "-"+p.calculeOffsetTop(frame)+"px";
			frame.style.left		= "-"+p.calculeOffsetLeft(frame)+"px";
			
		//	parent.editAreaLoader.execCommand(t.id, "update_size();");
		//	var body=parent.document.getElementsByTagName("body")[0];
		//	body.appendChild(frame);
			
			t.switchClassSticky(icon, 'editAreaButtonSelected', false);
			t.fullscreen['allow_resize']= t.resize_allowed;
			t.allow_resize(false);
	
			//t.area_select(selStart, selEnd-selStart);
			
		
			// opera can't manage to do a direct size update
			if(t.isFirefox){
				p.editAreaLoader.execCommand(t.id, "update_size();");
				t.area_select(selStart, selEnd-selStart);
				t.scroll_to_view();
				t.focus();
			}else{
				setTimeout("parent.editAreaLoader.execCommand('"+ t.id +"', 'update_size();');editArea.focus();", 10);
			}	
			
	
		}
		else if(to!=old)
		{	// toogle off fullscreen
			frame.style.position="static";
			frame.style.zIndex= t.fullscreen['old_zIndex'];
		
			if(t.isOpera)
			{
				html.style.height	= "auto"; 
				html.style.width	= "auto";
				html.style.overflow	= "auto";
			}
			else if(t.isIE && p!=top)
			{	// IE doesn't manage html overflow in frames like in normal page... 
				html.style.overflow	= "auto";
			}
			else
			{
				html.style.overflow	= t.fullscreen['old_overflow'];
			}
			html.scrollTop	= t.fullscreen['old_scrollTop'];
			html.scrollLeft	= t.fullscreen['old_scrollLeft'];
		
			p.editAreaLoader.hide(t.id);
			p.editAreaLoader.show(t.id);
			
			t.switchClassSticky(icon, 'editAreaButtonNormal', false);
			if(t.fullscreen['allow_resize'])
				t.allow_resize(t.fullscreen['allow_resize']);
			if(t.isFirefox){
				t.area_select(selStart, selEnd-selStart);
				setTimeout("editArea.scroll_to_view();", 10);
			}			
			
			//p.editAreaLoader.remove_event(p.window, "resize", editArea.update_size);
		}
		
	};
	
	EditArea.prototype.allow_resize= function(allow){
		var resize= _$("resize_area");
		if(allow){
			
			resize.style.visibility="visible";
			parent.editAreaLoader.add_event(resize, "mouseup", editArea.start_resize);
		}else{
			resize.style.visibility="hidden";
			parent.editAreaLoader.remove_event(resize, "mouseup", editArea.start_resize);
		}
		this.resize_allowed= allow;
	};
	
	
	EditArea.prototype.change_syntax= function(new_syntax, is_waiting){
	//	alert("cahnge to "+new_syntax);
		// the syntax is the same
		if(new_syntax==this.settings['syntax'])
			return true;
		
		// check that the syntax is one allowed
		var founded= false;
		for(var i=0; i<this.syntax_list.length; i++)
		{
			if(this.syntax_list[i]==new_syntax)
				founded= true;
		}
		
		if(founded==true)
		{
			// the reg syntax file is not loaded
			if(!parent.editAreaLoader.load_syntax[new_syntax])
			{
				// load the syntax file and wait for file loading
				if(!is_waiting)
					parent.editAreaLoader.load_script(parent.editAreaLoader.baseURL + "reg_syntax/" + new_syntax + ".js");
				setTimeout("editArea.change_syntax('"+ new_syntax +"', true);", 100);
				this.show_waiting_screen();
			}
			else
			{
				if(!this.allready_used_syntax[new_syntax])
				{	// the syntax has still not been used
					// rebuild syntax definition for new languages
					parent.editAreaLoader.init_syntax_regexp();
					// add style to the new list
					this.add_style(parent.editAreaLoader.syntax[new_syntax]["styles"]);
					this.allready_used_syntax[new_syntax]=true;
				}
				// be sure that the select option is correctly updated
				var sel= _$("syntax_selection");
				if(sel && sel.value!=new_syntax)
				{
					for(var i=0; i<sel.length; i++){
						if(sel.options[i].value && sel.options[i].value == new_syntax)
							sel.options[i].selected=true;
					}
				}
				
			/*	if(this.settings['syntax'].length==0)
				{
					this.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', false);
					this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);
					this.change_highlight(true);
				}
				*/
				this.settings['syntax']= new_syntax;
				this.resync_highlight(true);
				this.hide_waiting_screen();
				return true;
			}
		}
		return false;
	};
	
	
	// check if the file has changed
	EditArea.prototype.set_editable= function(is_editable){
		if(is_editable)
		{
			document.body.className= "";
			this.textarea.readOnly= false;
			this.is_editable= true;
		}
		else
		{
			document.body.className= "non_editable";
			this.textarea.readOnly= true;
			this.is_editable= false;
		}
		
		if(editAreas[this.id]["displayed"]==true)
			this.update_size();
	};
	
	/***** Wrap mode *****/
	
	// toggling function for set_wrap_mode
	EditArea.prototype.toggle_word_wrap= function(){
		this.set_word_wrap( !this.settings['word_wrap'] );
	};
	
	
	// open a new tab for the given file
	EditArea.prototype.set_word_wrap= function(to){
		var t=this, a= t.textarea;
		if( t.isOpera && t.isOpera < 9.8 )
		{
			this.settings['word_wrap']= false;
			t.switchClassSticky( _$("word_wrap"), 'editAreaButtonDisabled', true );
			return false;
		}
		
		if( to )
		{
			wrap_mode = 'soft';
			this.container.className+= ' word_wrap';
			this.container.style.width="";
			this.content_highlight.style.width="";
			a.style.width="100%";
			if( t.isIE && t.isIE < 7 )	// IE 6 count 50 px too much
			{
				a.style.width	= ( a.offsetWidth-5 )+"px";
			}
			
			t.switchClassSticky( _$("word_wrap"), 'editAreaButtonSelected', false );
		}
		else
		{
			wrap_mode = 'off';
			this.container.className	= this.container.className.replace(/word_wrap/g, '');
			t.switchClassSticky( _$("word_wrap"), 'editAreaButtonNormal', true );
		}
		this.textarea.previous_scrollWidth = '';
		this.textarea.previous_scrollHeight = '';
		
		a.wrap= wrap_mode;
		a.setAttribute('wrap', wrap_mode);
		// only IE can change wrap mode on the fly without element reloading
		if(!this.isIE)
		{
			var start=a.selectionStart, end= a.selectionEnd;
			var parNod = a.parentNode, nxtSib = a.nextSibling;
			parNod.removeChild(a);
			parNod.insertBefore(a, nxtSib);
			this.area_select(start, end-start);
		}
		// reset some optimisation
		this.settings['word_wrap']	= to;
		this.focus();
		this.update_size();
		this.check_line_selection();
	};	
	/***** tabbed files managing functions *****/
	
	// open a new tab for the given file
	EditArea.prototype.open_file= function(settings){
		
		if(settings['id']!="undefined")
		{
			var id= settings['id'];
			// create a new file object with defautl values
			var new_file= {};
			new_file['id']			= id;
			new_file['title']		= id;
			new_file['text']		= "";
			new_file['last_selection']	= "";		
			new_file['last_text_to_highlight']	= "";
			new_file['last_hightlighted_text']	= "";
			new_file['previous']	= [];
			new_file['next']		= [];
			new_file['last_undo']	= "";
			new_file['smooth_selection']	= this.settings['smooth_selection'];
			new_file['do_highlight']= this.settings['start_highlight'];
			new_file['syntax']		= this.settings['syntax'];
			new_file['scroll_top']	= 0;
			new_file['scroll_left']	= 0;
			new_file['selection_start']= 0;
			new_file['selection_end']= 0;
			new_file['edited']		= false;
			new_file['font_size']	= this.settings["font_size"];
			new_file['font_family']	= this.settings["font_family"];
			new_file['word_wrap']	= this.settings["word_wrap"];
			new_file['toolbar']		= {'links':{}, 'selects': {}};
			new_file['compare_edited_text']= new_file['text'];
			
			
			this.files[id]= new_file;
			this.update_file(id, settings);
			this.files[id]['compare_edited_text']= this.files[id]['text'];
			
			
			var html_id= 'tab_file_'+encodeURIComponent(id);
			this.filesIdAssoc[html_id]= id;
			this.files[id]['html_id']= html_id;
		
			if(!_$(this.files[id]['html_id']) && id!="")
			{
				// be sure the tab browsing area is displayed
				this.tab_browsing_area.style.display= "block";
				var elem= document.createElement('li');
				elem.id= this.files[id]['html_id'];
				var close= "<img src=\""+ parent.editAreaLoader.baseURL +"images/close.gif\" title=\""+ this.get_translation('close_tab', 'word') +"\" onclick=\"editArea.execCommand('close_file', editArea.filesIdAssoc['"+ html_id +"']);return false;\" class=\"hidden\" onmouseover=\"this.className=''\" onmouseout=\"this.className='hidden'\" />";
				elem.innerHTML= "<a onclick=\"javascript:editArea.execCommand('switch_to_file', editArea.filesIdAssoc['"+ html_id +"']);\" selec=\"none\"><b><span><strong class=\"edited\">*</strong>"+ this.files[id]['title'] + close +"</span></b></a>";
				_$('tab_browsing_list').appendChild(elem);
				var elem= document.createElement('text');
				this.update_size();
			}
			
			// open file callback (for plugin)
			if(id!="")
				this.execCommand('file_open', this.files[id]);
			
			this.switch_to_file(id, true);
			return true;
		}
		else
			return false;
	};
	
	// close the given file
	EditArea.prototype.close_file= function(id){
		if(this.files[id])
		{
			this.save_file(id);
			
			// close file callback
			if(this.execCommand('file_close', this.files[id])!==false)
			{
				// remove the tab in the toolbar
				var li= _$(this.files[id]['html_id']);
				li.parentNode.removeChild(li);
				// select a new file
				if(id== this.curr_file)
				{
					var next_file= "";
					var is_next= false;
					for(var i in this.files)
					{
						if( is_next )
						{
							next_file	= i;
							break;
						}
						else if( i == id )
							is_next		= true;
						else
							next_file	= i;
					}
					// display the next file
					this.switch_to_file(next_file);
				}
				// clear datas
				delete (this.files[id]);
				this.update_size();
			}	
		}
	};
	
	// backup current file datas
	EditArea.prototype.save_file= function(id){
		var t= this, save, a_links, a_selects, save_butt, img, i;
		if(t.files[id])
		{
			var save= t.files[id];
			save['last_selection']			= t.last_selection;		
			save['last_text_to_highlight']	= t.last_text_to_highlight;
			save['last_hightlighted_text']	= t.last_hightlighted_text;
			save['previous']				= t.previous;
			save['next']					= t.next;
			save['last_undo']				= t.last_undo;
			save['smooth_selection']		= t.smooth_selection;
			save['do_highlight']			= t.do_highlight;
			save['syntax']					= t.settings['syntax'];
			save['text']					= t.textarea.value;
			save['scroll_top']				= t.result.scrollTop;
			save['scroll_left']				= t.result.scrollLeft;
			save['selection_start']			= t.last_selection["selectionStart"];
			save['selection_end']			= t.last_selection["selectionEnd"];
			save['font_size']				= t.settings["font_size"];
			save['font_family']				= t.settings["font_family"];
			save['word_wrap']				= t.settings["word_wrap"];
			save['toolbar']					= {'links':{}, 'selects': {}};
			
			// save toolbar buttons state for fileSpecific buttons
			a_links= _$("toolbar_1").getElementsByTagName("a");
			for( i=0; i<a_links.length; i++ )
			{
				if( a_links[i].getAttribute('fileSpecific') == 'yes' )
				{
					save_butt	= {};
					img			= a_links[i].getElementsByTagName('img')[0];
					save_butt['classLock']		= img.classLock;
					save_butt['className']		= img.className;
					save_butt['oldClassName']	= img.oldClassName;
					
					save['toolbar']['links'][a_links[i].id]= save_butt;
				}
			}
			
			// save toolbar select state for fileSpecific buttons
			a_selects= _$("toolbar_1").getElementsByTagName("select");
			for( i=0; i<a_selects.length; i++)
			{
				if(a_selects[i].getAttribute('fileSpecific')=='yes')
				{
					save['toolbar']['selects'][a_selects[i].id]= a_selects[i].value;
				}
			}
				
			t.files[id]= save;
			
			return save;
		}
		
		return false;
	};
	
	// update file_datas
	EditArea.prototype.update_file= function(id, new_values){
		for(var i in new_values)
		{
			this.files[id][i]= new_values[i];
		}
	};
	
	// display file datas
	EditArea.prototype.display_file= function(id){
		var t = this, a= t.textarea, new_file, a_lis, a_selects, a_links, a_options, i, j;
		
		// we're showing the empty file
		if(id=='')
		{
			a.readOnly= true;
			t.tab_browsing_area.style.display= "none";
			_$("no_file_selected").style.display= "block";
			t.result.className= "empty";
			// clear current datas
			if(!t.files[''])
			{
				t.open_file({id: ''});
			}
		}
		// we try to show a non existent file, so we left
		else if( typeof( t.files[id] ) == 'undefined' )
		{
			return false;
		}
		// display a normal file
		else
		{
			t.result.className= "";
			a.readOnly= !t.is_editable;
			_$("no_file_selected").style.display= "none";
			t.tab_browsing_area.style.display= "block";
		}
		
		// ensure to have last state for undo/redo actions
		t.check_redo(true);
		t.check_undo(true);
		t.curr_file= id;
		
		// replace selected tab file
		a_lis= t.tab_browsing_area.getElementsByTagName('li');
		for( i=0; i<a_lis.length; i++)
		{
			if(a_lis[i].id == t.files[id]['html_id'])
				a_lis[i].className='selected';
			else
				a_lis[i].className='';
		}
		
		// replace next files datas
		new_file= t.files[id];
	
		// restore text content
		a.value= new_file['text'];
		
		// restore font-size
		t.set_font(new_file['font_family'], new_file['font_size']);
		
		// restore selection and scroll
		t.area_select(new_file['selection_start'], new_file['selection_end'] - new_file['selection_start']);
		t.manage_size(true);
		t.result.scrollTop= new_file['scroll_top'];
		t.result.scrollLeft= new_file['scroll_left'];
		
		// restore undo, redo
		t.previous=	new_file['previous'];
		t.next=	new_file['next'];
		t.last_undo=	new_file['last_undo'];
		t.check_redo(true);
		t.check_undo(true);
		
		// restore highlight
		t.execCommand("change_highlight", new_file['do_highlight']);
		t.execCommand("change_syntax", new_file['syntax']);
		
		// smooth mode
		t.execCommand("change_smooth_selection_mode", new_file['smooth_selection']);
		
		// word_wrap
		t.execCommand("set_word_wrap", new_file['word_wrap']);
			
		// restore links state in toolbar
		a_links= new_file['toolbar']['links'];
		for( i in a_links)
		{
			if( img =  _$(i).getElementsByTagName('img')[0] )
			{
				img.classLock	= a_links[i]['classLock'];
				img.className	= a_links[i]['className'];
				img.oldClassName= a_links[i]['oldClassName'];
			}
		}
		
		// restore select state in toolbar
		a_selects = new_file['toolbar']['selects'];
		for( i in a_selects)
		{
			a_options	= _$(i).options;
			for( j=0; j<a_options.length; j++)
			{
				if( a_options[j].value == a_selects[i] )
					_$(i).options[j].selected=true;
			}
		}
	
	};

	// change tab for displaying a new one
	EditArea.prototype.switch_to_file= function(file_to_show, force_refresh){
		if(file_to_show!=this.curr_file || force_refresh)
		{
			this.save_file(this.curr_file);
			if(this.curr_file!='')
				this.execCommand('file_switch_off', this.files[this.curr_file]);
			this.display_file(file_to_show);
			if(file_to_show!='')
				this.execCommand('file_switch_on', this.files[file_to_show]);
		}
	};

	// get all infos for the given file
	EditArea.prototype.get_file= function(id){
		if(id==this.curr_file)
			this.save_file(id);
		return this.files[id];
	};
	
	// get all available files infos
	EditArea.prototype.get_all_files= function(){
		tmp_files= this.files;
		this.save_file(this.curr_file);
		if(tmp_files[''])
			delete(this.files['']);
		return tmp_files;
	};
	
	
	// check if the file has changed
	EditArea.prototype.check_file_changes= function(){
	
		var id= this.curr_file;
		if(this.files[id] && this.files[id]['compare_edited_text']!=undefined)
		{
			if(this.files[id]['compare_edited_text'].length==this.textarea.value.length && this.files[id]['compare_edited_text']==this.textarea.value)
			{
				if(this.files[id]['edited']!= false)
					this.set_file_edited_mode(id, false);
			}
			else
			{
				if(this.files[id]['edited']!= true)
					this.set_file_edited_mode(id, true);
			}
		}
	};
	
	// set if the file is edited or not
	EditArea.prototype.set_file_edited_mode= function(id, to){
		// change CSS for edited tab
		if(this.files[id] && _$(this.files[id]['html_id']))
		{
			var link= _$(this.files[id]['html_id']).getElementsByTagName('a')[0];
			if(to==true)
			{
				link.className= 'edited';
			}
			else
			{
				link.className= '';
				if(id==this.curr_file)
					text= this.textarea.value;
				else
					text= this.files[id]['text'];
				this.files[id]['compare_edited_text']= text;
			}
				
			this.files[id]['edited']= to;
		}
	};

	EditArea.prototype.set_show_line_colors = function(new_value){
		this.show_line_colors = new_value;
		
		if( new_value )
			this.selection_field.className	+= ' show_colors';
		else
			this.selection_field.className	= this.selection_field.className.replace( / show_colors/g, '' );
	};

Added applications/admin/static/edit_area/edit_area_loader.js version [b580ef6a4d].


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/******
 *
 *	EditArea 
 * 	Developped by Christophe Dolivet
 *	Released under LGPL, Apache and BSD licenses (use the one you want)
 *
******/

function EditAreaLoader(){
	var t=this;
	t.version= "0.8.2";
	date= new Date();
	t.start_time=date.getTime();
	t.win= "loading";	// window loading state
	t.error= false;	// to know if load is interrrupt
	t.baseURL="";
	//t.suffix="";
	t.template="";
	t.lang= {};	// array of loaded speech language
	t.load_syntax= {};	// array of loaded syntax language for highlight mode
	t.syntax= {};	// array of initilized syntax language for highlight mode
	t.loadedFiles= [];
	t.waiting_loading= {}; 	// files that must be loaded in order to allow the script to really start
	// scripts that must be loaded in the iframe
	t.scripts_to_load= ["elements_functions", "resize_area", "reg_syntax"];
	t.sub_scripts_to_load= ["edit_area", "manage_area" ,"edit_area_functions", "keyboard", "search_replace", "highlight", "regexp"];
	t.syntax_display_name= { /*syntax_display_name_AUTO-FILL-BY-COMPRESSOR*/ };
	
	t.resize= []; // contain resizing datas
	t.hidden= {};	// store datas of the hidden textareas
	
	t.default_settings= {
		//id: "src"	// id of the textarea to transform
		debug: false
		,smooth_selection: true
		,font_size: "10"		// not for IE
		,font_family: "monospace"	// can be "verdana,monospace". Allow non monospace font but Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... 
		,start_highlight: false	// if start with highlight
		,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, word_wrap, |, help"
		,begin_toolbar: ""		//  "new_document, save, load, |"
		,end_toolbar: ""		// or end_toolbar
		,is_multi_files: false		// enable the multi file mode (the textarea content is ignored)
		,allow_resize: "both"	// possible values: "no", "both", "x", "y"
		,show_line_colors: false	// if the highlight is disabled for the line currently beeing edited (if enabled => heavy CPU use)
		,min_width: 400
		,min_height: 125
		,replace_tab_by_spaces: false
		,allow_toggle: true		// true or false
		,language: "en"
		,syntax: ""
		,syntax_selection_allow: "basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml"
		,display: "onload" 		// onload or later
		,max_undo: 30
		,browsers: "known"	// all or known
		,plugins: "" // comma separated plugin list
		,gecko_spellcheck: false	// enable/disable by default the gecko_spellcheck
		,fullscreen: false
		,is_editable: true
		,cursor_position: "begin"
		,word_wrap: false		// define if the text is wrapped of not in the textarea
		,autocompletion: false	// NOT IMPLEMENTED			
		,load_callback: ""		// click on load button (function name)
		,save_callback: ""		// click on save button (function name)
		,change_callback: ""	// textarea onchange trigger (function name)
		,submit_callback: ""	// form submited (function name)
		,EA_init_callback: ""	// EditArea initiliazed (function name)
		,EA_delete_callback: ""	// EditArea deleted (function name)
		,EA_load_callback: ""	// EditArea fully loaded and displayed (function name)
		,EA_unload_callback: ""	// EditArea delete while being displayed (function name)
		,EA_toggle_on_callback: ""	// EditArea toggled on (function name)
		,EA_toggle_off_callback: ""	// EditArea toggled off (function name)
		,EA_file_switch_on_callback: ""	// a new tab is selected (called for the newly selected file)
		,EA_file_switch_off_callback: ""	// a new tab is selected (called for the previously selected file)
		,EA_file_close_callback: ""		// close a tab
	};
	
	t.advanced_buttons = [
			// id, button img, command (it will try to find the translation of "id"), is_file_specific
			['new_document', 'newdocument.gif', 'new_document', false],
			['search', 'search.gif', 'show_search', false],
			['go_to_line', 'go_to_line.gif', 'go_to_line', false],
			['undo', 'undo.gif', 'undo', true],
			['redo', 'redo.gif', 'redo', true],
			['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true],
			['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true],
			['highlight', 'highlight.gif','change_highlight', true],
			['help', 'help.gif', 'show_help', false],
			['save', 'save.gif', 'save', false],
			['load', 'load.gif', 'load', false],
			['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false],
			['word_wrap', 'word_wrap.gif', 'toggle_word_wrap', true],
			['autocompletion', 'autocompletion.gif', 'toggle_autocompletion', true]
		];
			
	// navigator identification
	t.set_browser_infos(t);

	if(t.isIE>=6 || t.isGecko || ( t.isWebKit && !t.isSafari<3 ) || t.isOpera>=9  || t.isCamino )
		t.isValidBrowser=true;
	else
		t.isValidBrowser=false;

	t.set_base_url();		
	
	for(var i=0; i<t.scripts_to_load.length; i++){
		setTimeout("editAreaLoader.load_script('"+t.baseURL + t.scripts_to_load[i]+ ".js');", 1);	// let the time to Object editAreaLoader to be created before loading additionnal scripts
		t.waiting_loading[t.scripts_to_load[i]+ ".js"]= false;
	}
	t.add_event(window, "load", EditAreaLoader.prototype.window_loaded);
};
	
EditAreaLoader.prototype ={
	has_error : function(){
		this.error= true;
		// set to empty all EditAreaLoader functions
		for(var i in EditAreaLoader.prototype){
			EditAreaLoader.prototype[i]=function(){};		
		}
	},
	
	// add browser informations to the object passed in parameter
	set_browser_infos : function(o){
		ua= navigator.userAgent;
		
		// general detection
		o.isWebKit	= /WebKit/.test(ua);
		o.isGecko	= !o.isWebKit && /Gecko/.test(ua);
		o.isMac		= /Mac/.test(ua);
		
		o.isIE	= (navigator.appName == "Microsoft Internet Explorer");
		if(o.isIE){
			o.isIE = ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/, "$1");
			if(o.isIE<6)
				o.has_error();
		}

		if(o.isOpera = (ua.indexOf('Opera') != -1)){	
			o.isOpera= ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");
			if(o.isOpera<9)
				o.has_error();
			o.isIE=false;			
		}

		if(o.isFirefox =(ua.indexOf('Firefox') != -1))
			o.isFirefox = ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");
		// Firefox clones 	
		if( ua.indexOf('Iceweasel') != -1 )
			o.isFirefox	= ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");
		if( ua.indexOf('GranParadiso') != -1 )
			o.isFirefox	= ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i, "$1");
		if( ua.indexOf('BonEcho') != -1 )
			o.isFirefox	= ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i, "$1");
		if( ua.indexOf('SeaMonkey') != -1)
			o.isFirefox = (ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i, "$1") ) + 1;
			
		if(o.isCamino =(ua.indexOf('Camino') != -1))
			o.isCamino = ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");
			
		if(o.isSafari =(ua.indexOf('Safari') != -1))
			o.isSafari= ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1");
	
		if(o.isChrome =(ua.indexOf('Chrome') != -1)) {
			o.isChrome = ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i, "$1");
			o.isSafari	= false;
		}
		
	},
	
	window_loaded : function(){
		editAreaLoader.win="loaded";
		
		// add events on forms
		if (document.forms) {
			for (var i=0; i<document.forms.length; i++) {
				var form = document.forms[i];
				form.edit_area_replaced_submit=null;
				try {
					
					form.edit_area_replaced_submit = form.onsubmit;
					form.onsubmit="";
				} catch (e) {// Do nothing
				}
				editAreaLoader.add_event(form, "submit", EditAreaLoader.prototype.submit);
				editAreaLoader.add_event(form, "reset", EditAreaLoader.prototype.reset);
			}
		}
		editAreaLoader.add_event(window, "unload", function(){for(var i in editAreas){editAreaLoader.delete_instance(i);}});	// ini callback
	},
	
	// init the checkup of the selection of the IE textarea
	init_ie_textarea : function(id){
		var a=document.getElementById(id);
		try{
			if(a && typeof(a.focused)=="undefined"){
				a.focus();
				a.focused=true;
				a.selectionStart= a.selectionEnd= 0;			
				get_IE_selection(a);
				editAreaLoader.add_event(a, "focus", IE_textarea_focus);
				editAreaLoader.add_event(a, "blur", IE_textarea_blur);
				
			}
		}catch(ex){}
	},
		
	init : function(settings){
		var t=this,s=settings,i;
		
		if(!s["id"])
			t.has_error();
		if(t.error)
			return;
		// if an instance of the editor already exists for this textarea => delete the previous one
		if(editAreas[s["id"]])
			t.delete_instance(s["id"]);
	
		// init settings
		for(i in t.default_settings){
			if(typeof(s[i])=="undefined")
				s[i]=t.default_settings[i];
		}
		
		if(s["browsers"]=="known" && t.isValidBrowser==false){
			return;
		}
		
		if(s["begin_toolbar"].length>0)
			s["toolbar"]= s["begin_toolbar"] +","+ s["toolbar"];
		if(s["end_toolbar"].length>0)
			s["toolbar"]= s["toolbar"] +","+ s["end_toolbar"];
		s["tab_toolbar"]= s["toolbar"].replace(/ /g,"").split(",");
		
		s["plugins"]= s["plugins"].replace(/ /g,"").split(",");
		for(i=0; i<s["plugins"].length; i++){
			if(s["plugins"][i].length==0)
				s["plugins"].splice(i,1);
		}
	//	alert(settings["plugins"].length+": "+ settings["plugins"].join(","));
		t.get_template();
		t.load_script(t.baseURL + "langs/"+ s["language"] + ".js");
		
		if(s["syntax"].length>0){
			s["syntax"]=s["syntax"].toLowerCase();
			t.load_script(t.baseURL + "reg_syntax/"+ s["syntax"] + ".js");
		}
		//alert(this.template);
		
		editAreas[s["id"]]= {"settings": s};
		editAreas[s["id"]]["displayed"]=false;
		editAreas[s["id"]]["hidden"]=false;
		
		//if(settings["display"]=="onload")
		t.start(s["id"]);
	},
	
	// delete an instance of an EditArea
	delete_instance : function(id){
		var d=document,fs=window.frames,span,iframe;
		editAreaLoader.execCommand(id, "EA_delete");
		if(fs["frame_"+id] && fs["frame_"+id].editArea)
		{
			if(editAreas[id]["displayed"])
				editAreaLoader.toggle(id, "off");
			fs["frame_"+id].editArea.execCommand("EA_unload");
		}

		// remove toggle infos and debug textarea
		span= d.getElementById("EditAreaArroundInfos_"+id);
		if(span)
			span.parentNode.removeChild(span);

		// remove the iframe
		iframe= d.getElementById("frame_"+id);
		if(iframe){
			iframe.parentNode.removeChild(iframe);
			//delete iframe;
			try {
				delete fs["frame_"+id];
			} catch (e) {// Do nothing
			}
		}	

		delete editAreas[id];
	},

	
	start : function(id){
		var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;
		
		// check that the window is loaded
		if(t.win!="loaded"){
			setTimeout("editAreaLoader.start('"+id+"');", 50);
			return;
		}
		
		// check that all needed scripts are loaded
		for( i in t.waiting_loading){
			if(t.waiting_loading[i]!="loaded" && typeof(t.waiting_loading[i])!="function"){
				setTimeout("editAreaLoader.start('"+id+"');", 50);
				return;
			}
		}
		
		// wait until language and syntax files are loaded
		if(!t.lang[editAreas[id]["settings"]["language"]] || (editAreas[id]["settings"]["syntax"].length>0 && !t.load_syntax[editAreas[id]["settings"]["syntax"]]) ){
			setTimeout("editAreaLoader.start('"+id+"');", 50);
			return;
		}
		// init the regexp for syntax highlight
		if(editAreas[id]["settings"]["syntax"].length>0)
			t.init_syntax_regexp();
		
			
		// display toggle option and debug area
		if(!d.getElementById("EditAreaArroundInfos_"+id) && (editAreas[id]["settings"]["debug"] || editAreas[id]["settings"]["allow_toggle"]))
		{
			span= d.createElement("span");
			span.id= "EditAreaArroundInfos_"+id;
			if(editAreas[id]["settings"]["allow_toggle"]){
				checked=(editAreas[id]["settings"]["display"]=="onload")?"checked='checked'":"";
				html+="<div id='edit_area_toggle_"+i+"'>";
				html+="<input id='edit_area_toggle_checkbox_"+ id +"' class='toggle_"+ id +"' type='checkbox' onclick='editAreaLoader.toggle(\""+ id +"\");' accesskey='e' "+checked+" />";
				html+="<label for='edit_area_toggle_checkbox_"+ id +"'>{$toggle}</label></div>";	
			}
			if(editAreas[id]["settings"]["debug"])
				html+="<textarea id='edit_area_debug_"+ id +"' spellcheck='off' style='z-index: 20; width: 100%; height: 120px;overflow: auto; border: solid black 1px;'></textarea><br />";				
			html= t.translate(html, editAreas[id]["settings"]["language"]);				
			span.innerHTML= html;				
			father= d.getElementById(id).parentNode;
			next= d.getElementById(id).nextSibling;
			if(next==null)
				father.appendChild(span);
			else
				father.insertBefore(span, next);
		}
		
		if(!editAreas[id]["initialized"])
		{
			t.execCommand(id, "EA_init");	// ini callback
			if(editAreas[id]["settings"]["display"]=="later"){
				editAreas[id]["initialized"]= true;
				return;
			}
		}
		
		if(t.isIE){	// launch IE selection checkup
			t.init_ie_textarea(id);
		}
				
		// get toolbar content
		var area=editAreas[id];
		
		for(i=0; i<area["settings"]["tab_toolbar"].length; i++){
		//	alert(this.tab_toolbar[i]+"\n"+ this.get_control_html(this.tab_toolbar[i]));
			html_toolbar_content+= t.get_control_html(area["settings"]["tab_toolbar"][i], area["settings"]["language"]);
		}
		// translate toolbar text here for chrome 2
		html_toolbar_content = t.translate(html_toolbar_content, area["settings"]["language"], "template"); 
		
		
		// create javascript import rules for the iframe if the javascript has not been already loaded by the compressor
		if(!t.iframe_script){
			t.iframe_script="";
			for(i=0; i<t.sub_scripts_to_load.length; i++)
				t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + t.sub_scripts_to_load[i] +'.js"></script>';
		}
		
		// add plugins scripts if not already loaded by the compressor (but need to load language in all the case)
		for(i=0; i<area["settings"]["plugins"].length; i++){
			//if(typeof(area["settings"]["plugins"][i])=="function") continue;
			if(!t.all_plugins_loaded)
				t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/' + area["settings"]["plugins"][i] +'.js"></script>';
			t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/langs/' + area["settings"]["language"] +'.js"></script>';
		}
	
		
		// create css link for the iframe if the whole css text has not been already loaded by the compressor
		if(!t.iframe_css){
			t.iframe_css="<link href='"+ t.baseURL +"edit_area.css' rel='stylesheet' type='text/css' />";
		}
		
		
		// create template
		template= t.template.replace(/\[__BASEURL__\]/g, t.baseURL);
		template= template.replace("[__TOOLBAR__]",html_toolbar_content);
			
		
		// fill template with good language sentences
		template= t.translate(template, area["settings"]["language"], "template");
		
		// add css_code
		template= template.replace("[__CSSRULES__]", t.iframe_css);				
		// add js_code
		template= template.replace("[__JSCODE__]", t.iframe_script);
		
		// add version_code
		template= template.replace("[__EA_VERSION__]", t.version);
		//template=template.replace(/\{\$([^\}]+)\}/gm, this.traduc_template);
		
		//editAreas[area["settings"]["id"]]["template"]= template;
		
		area.textarea=d.getElementById(area["settings"]["id"]);
		editAreas[area["settings"]["id"]]["textarea"]=area.textarea;
	
		// if removing previous instances from DOM before (fix from Marcin)
		if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined') 
			delete window.frames["frame_"+area["settings"]["id"]];
		
		// insert template in the document after the textarea
		father= area.textarea.parentNode;
	/*	var container= document.createElement("div");
		container.id= "EditArea_frame_container_"+area["settings"]["id"];
	*/	
		content= d.createElement("iframe");
		content.name= "frame_"+area["settings"]["id"];
		content.id= "frame_"+area["settings"]["id"];
		content.style.borderWidth= "0px";
		setAttribute(content, "frameBorder", "0"); // IE
		content.style.overflow="hidden";
		content.style.display="none";

		
		next= area.textarea.nextSibling;
		if(next==null)
			father.appendChild(content);
		else
			father.insertBefore(content, next) ;		
		f=window.frames["frame_"+area["settings"]["id"]];
		f.document.open();
		f.editAreas=editAreas;
		f.area_id= area["settings"]["id"];	
		f.document.area_id= area["settings"]["id"];	
		f.document.write(template);
		f.document.close();

	//	frame.editAreaLoader=this;
		//editAreas[area["settings"]["id"]]["displayed"]=true;
		
	},
	
	toggle : function(id, toggle_to){

	/*	if((editAreas[id]["displayed"]==true  && toggle_to!="on") || toggle_to=="off"){
			this.toggle_off(id);
		}else if((editAreas[id]["displayed"]==false  && toggle_to!="off") || toggle_to=="on"){
			this.toggle_on(id);
		}*/
		if(!toggle_to)
			toggle_to= (editAreas[id]["displayed"]==true)?"off":"on";
		if(editAreas[id]["displayed"]==true  && toggle_to=="off"){
			this.toggle_off(id);
		}else if(editAreas[id]["displayed"]==false  && toggle_to=="on"){
			this.toggle_on(id);
		}
	
		return false;
	},
	
	// static function
	toggle_off : function(id){
		var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;
		if(fs["frame_"+id])
		{	
			f	= fs["frame_"+id];
			t	= editAreas[id]["textarea"];
			if(f.editArea.fullscreen['isFull'])
				f.editArea.toggle_full_screen(false);
			editAreas[id]["displayed"]=false;
			
			// set wrap to off to keep same display mode (some browser get problem with this, so it need more complex operation		
			t.wrap = "off";	// for IE
			setAttribute(t, "wrap", "off");	// for Firefox	
			parNod = t.parentNode;
			nxtSib = t.nextSibling;
			parNod.removeChild(t); 
			parNod.insertBefore(t, nxtSib);
			
			// restore values
			t.value= f.editArea.textarea.value;
			selStart	= f.editArea.last_selection["selectionStart"];
			selEnd		= f.editArea.last_selection["selectionEnd"];
			scrollTop	= f.document.getElementById("result").scrollTop;
			scrollLeft	= f.document.getElementById("result").scrollLeft;
			
			
			document.getElementById("frame_"+id).style.display='none';
		
			t.style.display="inline";

			try{	// IE will give an error when trying to focus an invisible or disabled textarea
				t.focus();
			} catch(e){};
			if(this.isIE){
				t.selectionStart= selStart;
				t.selectionEnd	= selEnd;
				t.focused		= true;
				set_IE_selection(t);
			}else{
				if(this.isOpera && this.isOpera < 9.6 ){	// Opera bug when moving selection start and selection end
					t.setSelectionRange(0, 0);
				}
				try{
					t.setSelectionRange(selStart, selEnd);
				} catch(e) {};
			}
			t.scrollTop= scrollTop;
			t.scrollLeft= scrollLeft;
			f.editArea.execCommand("toggle_off");

		}
	},	
	
	// static function
	toggle_on : function(id){
		var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;
			
		if(fs["frame_"+id])
		{
			f	= fs["frame_"+id];
			t	= editAreas[id]["textarea"];
			area= f.editArea;
			area.textarea.value= t.value;
			
			// store display values;
			curPos	= editAreas[id]["settings"]["cursor_position"];

			if(t.use_last==true)
			{
				selStart	= t.last_selectionStart;
				selEnd		= t.last_selectionEnd;
				scrollTop	= t.last_scrollTop;
				scrollLeft	= t.last_scrollLeft;
				t.use_last=false;
			}
			else if( curPos == "auto" )
			{
				try{
					selStart	= t.selectionStart;
					selEnd		= t.selectionEnd;
					scrollTop	= t.scrollTop;
					scrollLeft	= t.scrollLeft;
					//alert(scrollTop);
				}catch(ex){}
			}
			
			// set to good size
			this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));
			t.style.display="none";			
			document.getElementById("frame_"+id).style.display="inline";
			area.execCommand("focus"); // without this focus opera doesn't manage well the iframe body height
			
			
			// restore display values
			editAreas[id]["displayed"]=true;
			area.execCommand("update_size");
			
			f.document.getElementById("result").scrollTop= scrollTop;
			f.document.getElementById("result").scrollLeft= scrollLeft;
			area.area_select(selStart, selEnd-selStart);
			area.execCommand("toggle_on");

			
		}
		else
		{
		/*	if(this.isIE)
				get_IE_selection(document.getElementById(id));	*/	
			elem= document.getElementById(id);	
			elem.last_selectionStart= elem.selectionStart;
			elem.last_selectionEnd= elem.selectionEnd;
			elem.last_scrollTop= elem.scrollTop;
			elem.last_scrollLeft= elem.scrollLeft;
			elem.use_last=true;
			editAreaLoader.start(id);
		}
	},	
	
	set_editarea_size_from_textarea : function(id, frame){	
		var elem,width,height;
		elem	= document.getElementById(id);
		
		width	= Math.max(editAreas[id]["settings"]["min_width"], elem.offsetWidth)+"px";
		height	= Math.max(editAreas[id]["settings"]["min_height"], elem.offsetHeight)+"px";
		if(elem.style.width.indexOf("%")!=-1)
			width	= elem.style.width;
		if(elem.style.height.indexOf("%")!=-1)
			height	= elem.style.height;
		//alert("h: "+height+" w: "+width);
	
		frame.style.width= width;
		frame.style.height= height;
	},
		
	set_base_url : function(){
		var t=this,elems,i,docBasePath;

		if( !this.baseURL ){
			elems = document.getElementsByTagName('script');
	
			for( i=0; i<elems.length; i++ ){
				if (elems[i].src && elems[i].src.match(/edit_area_[^\\\/]*$/i) ) {
					var src = unescape( elems[i].src ); // use unescape for utf-8 encoded urls
					src = src.substring(0, src.lastIndexOf('/'));
					this.baseURL = src;
					this.file_name= elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);
					break;
				}
			}
		}
		
		docBasePath	= document.location.href;
		if (docBasePath.indexOf('?') != -1)
			docBasePath	= docBasePath.substring(0, docBasePath.indexOf('?'));
		docBasePath	= docBasePath.substring(0, docBasePath.lastIndexOf('/'));
	
		// If not HTTP absolute
		if (t.baseURL.indexOf('://') == -1 && t.baseURL.charAt(0) != '/') {
			// If site absolute
			t.baseURL = docBasePath + "/" + t.baseURL;
		}
		t.baseURL	+="/";	
	},
	
	get_button_html : function(id, img, exec, isFileSpecific, baseURL) {
		var cmd,html;
		if(!baseURL)
			baseURL= this.baseURL;
		cmd	= 'editArea.execCommand(\'' + exec + '\')';
		html	= '<a id="a_'+ id +'" href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self" fileSpecific="'+ (isFileSpecific?'yes':'no') +'">';
		html	+= '<img id="' + id + '" src="'+ baseURL +'images/' + img + '" title="{$' + id + '}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';
		return html;
	},

	get_control_html : function(button_name, lang) {		
		var t=this,i,but,html,si;
		for (i=0; i<t.advanced_buttons.length; i++)
		{
			but = t.advanced_buttons[i];			
			if (but[0] == button_name)
			{
				return t.get_button_html(but[0], but[1], but[2], but[3]);
			}	
		}		
				
		switch (button_name){
			case "*":
			case "return":
				return "<br />";
			case "|":
		  	case "separator":
				return '<img src="'+ t.baseURL +'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';
			case "select_font":
				html= "<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";
				html+="<option value='-1'>{$font_size}</option>";
				si=[8,9,10,11,12,14];
				for( i=0;i<si.length;i++){
					html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";
				}
				html+="</select>";
				return html;
			case "syntax_selection":
				html= "<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\", this.value)' fileSpecific='yes'>";
				html+="<option value='-1'>{$syntax_selection}</option>";
				html+="</select>";
				return html;
		}
		
		return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";		
	},
	
	
	get_template : function(){
		if(this.template=="")
		{
			var xhr_object = null; 
			if(window.XMLHttpRequest) // Firefox 
				xhr_object = new XMLHttpRequest(); 
			else if(window.ActiveXObject) // Internet Explorer 
				xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
			else { // XMLHttpRequest not supported
				alert("XMLHTTPRequest not supported. EditArea not loaded"); 
				return; 
			} 
			 
			xhr_object.open("GET", this.baseURL+"template.html", false); 
			xhr_object.send(null); 
			if(xhr_object.readyState == 4) 
				this.template=xhr_object.responseText;
			else
				this.has_error();
		}
	},
	
	// translate text
	translate : function(text, lang, mode){
		if(mode=="word")
			text=editAreaLoader.get_word_translation(text, lang);
		else if(mode="template"){
			editAreaLoader.current_language= lang;
			text=text.replace(/\{\$([^\}]+)\}/gm, editAreaLoader.translate_template);
		}
		return text;
	},
	
	translate_template : function(){
		return editAreaLoader.get_word_translation(EditAreaLoader.prototype.translate_template.arguments[1], editAreaLoader.current_language);
	},
	
	get_word_translation : function(val, lang){
		var i;
		
		for( i in editAreaLoader.lang[lang]){
			if(i == val)
				return editAreaLoader.lang[lang][i];
		}
		return "_"+val;
	},
	
	load_script : function(url){
		var t=this,d=document,script,head;
		
		if( t.loadedFiles[url] )
			return;	
		//alert("load: "+url);
		try{
			script= d.createElement("script");
			script.type= "text/javascript";
			script.src= url;
			script.charset= "UTF-8";
			d.getElementsByTagName("head")[0].appendChild(script);
		}catch(e){
			d.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '" charset="UTF-8"></sc'+'ript>');
		}
		
		t.loadedFiles[url] = true;
	},
	
	add_event : function(obj, name, handler) {
		try{
			if (obj.attachEvent) {
				obj.attachEvent("on" + name, handler);
			} else{
				obj.addEventListener(name, handler, false);
			}
		}catch(e){}
	},
	
	remove_event : function(obj, name, handler){
		try{
			if (obj.detachEvent)
				obj.detachEvent("on" + name, handler);
			else
				obj.removeEventListener(name, handler, false);
		}catch(e){}
	},


	// reset all the editareas in the form that have been reseted
	reset : function(e){
		var formObj,is_child,i,x;
		
		formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;
		if(formObj.tagName!='FORM')
			formObj= formObj.form;
		
		for( i in editAreas ){			
			is_child= false;
			for( x=0;x<formObj.elements.length;x++ ) {
				if(formObj.elements[x].id == i)
					is_child=true;
			}
			
			if(window.frames["frame_"+i] && is_child && editAreas[i]["displayed"]==true){
			
				var exec= 'window.frames["frame_'+ i +'"].editArea.textarea.value= document.getElementById("'+ i +'").value;';
				exec+= 'window.frames["frame_'+ i +'"].editArea.execCommand("focus");';
				exec+= 'window.frames["frame_'+ i +'"].editArea.check_line_selection();';
				exec+= 'window.frames["frame_'+ i +'"].editArea.execCommand("reset");';
				window.setTimeout(exec, 10);
			}
		}		
		return;
	},
	
	
	// prepare all the textarea replaced by an editarea to be submited
	submit : function(e){		
		var formObj,is_child,fs=window.frames,i,x;
		formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;
		if(formObj.tagName!='FORM')
			formObj= formObj.form;
		
		for( i in editAreas){
			is_child= false;
			for( x=0;x<formObj.elements.length;x++ ) {
				if(formObj.elements[x].id == i)
					is_child=true;
			}
		
			if(is_child)
			{
				if(fs["frame_"+i] && editAreas[i]["displayed"]==true)
					document.getElementById(i).value= fs["frame_"+ i].editArea.textarea.value;
				editAreaLoader.execCommand(i,"EA_submit");
			}
		}				
		if( typeof(formObj.edit_area_replaced_submit) == "function" ){
			res= formObj.edit_area_replaced_submit();
			if(res==false){
				if(editAreaLoader.isIE)
					return false;
				else
					e.preventDefault();
			}
		}
		return;
	},
	
	// allow to get the value of the editarea
	getValue : function(id){
        if(window.frames["frame_"+id] && editAreas[id]["displayed"]==true){
            return window.frames["frame_"+ id].editArea.textarea.value;       
        }else if(elem=document.getElementById(id)){
        	return elem.value;
        }
        return false;
    },
    
    // allow to set the value of the editarea
    setValue : function(id, new_val){
    	var fs=window.frames;
    	
        if( ( f=fs["frame_"+id] ) && editAreas[id]["displayed"]==true){
			f.editArea.textarea.value= new_val;     
			f.editArea.execCommand("focus"); 
			f.editArea.check_line_selection(false);  
			f.editArea.execCommand("onchange");
        }else if(elem=document.getElementById(id)){
        	elem.value= new_val;
        }
    },
	    
    // allow to get infos on the selection: array(start, end)
    getSelectionRange : function(id){
    	var sel,eA,fs=window.frames;
    	
    	sel= {"start": 0, "end": 0};
        if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
        	eA= fs["frame_"+ id].editArea;

			sel["start"]	= eA.textarea.selectionStart;
			sel["end"]		= eA.textarea.selectionEnd;
		
        }else if( elem=document.getElementById(id) ){
        	sel= getSelectionRange(elem);
        }
        return sel;
    },
    
    // allow to set the selection with the given start and end positions
    setSelectionRange : function(id, new_start, new_end){
    	var fs=window.frames;
    	
        if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
            fs["frame_"+ id].editArea.area_select(new_start, new_end-new_start);  
			// make an auto-scroll to the selection
			if(!this.isIE){
				fs["frame_"+ id].editArea.check_line_selection(false); 
				fs["frame_"+ id].editArea.scroll_to_view();
			}   
        }else if(elem=document.getElementById(id)){
        	setSelectionRange(elem, new_start, new_end);
        }
    },
    
    getSelectedText : function(id){
    	var sel= this.getSelectionRange(id);
    	
        return this.getValue(id).substring(sel["start"], sel["end"]);
    },
	
	setSelectedText : function(id, new_val){
		var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;
		
		new_val	= new_val.replace(/\r/g, ""); 
		sel		= this.getSelectionRange(id);
		text	= this.getValue(id);
		if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
			scrollTop	= fs["frame_"+ id].document.getElementById("result").scrollTop;
			scrollLeft	= fs["frame_"+ id].document.getElementById("result").scrollLeft;
		}else{
			scrollTop	= d.getElementById(id).scrollTop;
			scrollLeft	= d.getElementById(id).scrollLeft;
		}
		
		text	= text.substring(0, sel["start"])+ new_val +text.substring(sel["end"]);
		this.setValue(id, text);
		new_sel_end	= sel["start"]+ new_val.length;
		this.setSelectionRange(id, sel["start"], new_sel_end);
		
		
		// fix \r problem for selection length count on IE & Opera
		if(new_val != this.getSelectedText(id).replace(/\r/g, "")){
			this.setSelectionRange(id, sel["start"], new_sel_end+ new_val.split("\n").length -1);
		}
		// restore scrolling position
		if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
			fs["frame_"+ id].document.getElementById("result").scrollTop= scrollTop;
			fs["frame_"+ id].document.getElementById("result").scrollLeft= scrollLeft;
			fs["frame_"+ id].editArea.execCommand("onchange");
		}else{
			d.getElementById(id).scrollTop= scrollTop;
			d.getElementById(id).scrollLeft= scrollLeft;
		}
    },
    
    insertTags : function(id, open_tag, close_tag){
    	var old_sel,new_sel;
    	
    	old_sel	= this.getSelectionRange(id);
    	text	= open_tag + this.getSelectedText(id) + close_tag;
    	 
		editAreaLoader.setSelectedText(id, text);
		
    	new_sel	= this.getSelectionRange(id);
    	if(old_sel["end"] > old_sel["start"])	// if text was selected, cursor at the end
    		this.setSelectionRange(id, new_sel["end"], new_sel["end"]);
    	else // cursor in the middle
    		this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);
    },
    
    // hide both EditArea and normal textarea
	hide : function(id){
		var fs= window.frames,d=document,t=this,scrollTop,scrollLeft,span;
		if(d.getElementById(id) && !t.hidden[id])
		{
			t.hidden[id]= {};
			t.hidden[id]["selectionRange"]= t.getSelectionRange(id);
			if(d.getElementById(id).style.display!="none")
			{
				t.hidden[id]["scrollTop"]= d.getElementById(id).scrollTop;
				t.hidden[id]["scrollLeft"]= d.getElementById(id).scrollLeft;
			}
					
			if(fs["frame_"+id])
			{
				t.hidden[id]["toggle"]= editAreas[id]["displayed"];
				
				if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
					scrollTop	= fs["frame_"+ id].document.getElementById("result").scrollTop;
					scrollLeft	= fs["frame_"+ id].document.getElementById("result").scrollLeft;
				}else{
					scrollTop	= d.getElementById(id).scrollTop;
					scrollLeft	= d.getElementById(id).scrollLeft;
				}
				t.hidden[id]["scrollTop"]= scrollTop;
				t.hidden[id]["scrollLeft"]= scrollLeft;
				
				if(editAreas[id]["displayed"]==true)
					editAreaLoader.toggle_off(id);
			}
			
			// hide toggle button and debug box
			span= d.getElementById("EditAreaArroundInfos_"+id);
			if(span){
				span.style.display='none';
			}
			
			// hide textarea
			d.getElementById(id).style.display= "none";
		}
	},
	
	// restore hidden EditArea and normal textarea
	show : function(id){
		var fs= window.frames,d=document,t=this,span;
		if((elem=d.getElementById(id)) && t.hidden[id])
		{
			elem.style.display= "inline";
			elem.scrollTop= t.hidden[id]["scrollTop"];
			elem.scrollLeft= t.hidden[id]["scrollLeft"];
			span= d.getElementById("EditAreaArroundInfos_"+id);
			if(span){
				span.style.display='inline';
			}
			
			if(fs["frame_"+id])
			{
								
				// restore toggle button and debug box
			
				
				// restore textarea
				elem.style.display= "inline";
				
				// restore EditArea
				if(t.hidden[id]["toggle"]==true)
					editAreaLoader.toggle_on(id);
				
				scrollTop	= t.hidden[id]["scrollTop"];
				scrollLeft	= t.hidden[id]["scrollLeft"];
				
				if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
					fs["frame_"+ id].document.getElementById("result").scrollTop	= scrollTop;
					fs["frame_"+ id].document.getElementById("result").scrollLeft	= scrollLeft;
				}else{
					elem.scrollTop	= scrollTop;
					elem.scrollLeft	= scrollLeft;
				}
			
			}
			// restore selection
			sel	= t.hidden[id]["selectionRange"];
			t.setSelectionRange(id, sel["start"], sel["end"]);
			delete t.hidden[id];	
		}
	},
	
	// get the current file datas (for multi file editing mode)
	getCurrentFile : function(id){
		return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));
	},
	
	// get the given file datas (for multi file editing mode)
	getFile : function(id, file_id){
		return this.execCommand(id, 'get_file', file_id);
	},
	
	// get all the openned files datas (for multi file editing mode)
	getAllFiles : function(id){
		return this.execCommand(id, 'get_all_files()');
	},
	
	// open a file (for multi file editing mode)
	openFile : function(id, file_infos){
		return this.execCommand(id, 'open_file', file_infos);
	},
	
	// close the given file (for multi file editing mode)
	closeFile : function(id, file_id){
		return this.execCommand(id, 'close_file', file_id);
	},
	
	// close the given file (for multi file editing mode)
	setFileEditedMode : function(id, file_id, to){
		var reg1,reg2;
		reg1	= new RegExp('\\\\', 'g');
		reg2	= new RegExp('"', 'g');
		return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');
	},
	
	
	// allow to access to editarea functions and datas (for advanced users only)
	execCommand : function(id, cmd, fct_param){
		switch(cmd){
			case "EA_init":
				if(editAreas[id]['settings']["EA_init_callback"].length>0)
					eval(editAreas[id]['settings']["EA_init_callback"]+"('"+ id +"');");
				break;
			case "EA_delete":
				if(editAreas[id]['settings']["EA_delete_callback"].length>0)
					eval(editAreas[id]['settings']["EA_delete_callback"]+"('"+ id +"');");
				break;
			case "EA_submit":
				if(editAreas[id]['settings']["submit_callback"].length>0)
					eval(editAreas[id]['settings']["submit_callback"]+"('"+ id +"');");
				break;
		}
        if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){
			if(fct_param!=undefined)
				return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');
			else
				return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');       
        }
        return false;
    }
};
	
	var editAreaLoader= new EditAreaLoader();
	var editAreas= {};

Added applications/admin/static/edit_area/elements_functions.js version [20da3b578f].

















































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/****
 * This page contains some general usefull functions for javascript
 *
 ****/  
	
	
	// need to redefine this functiondue to IE problem
	function getAttribute( elm, aName ) {
		var aValue,taName,i;
		try{
			aValue = elm.getAttribute( aName );
		}catch(exept){}
		
		if( ! aValue ){
			for( i = 0; i < elm.attributes.length; i ++ ) {
				taName = elm.attributes[i] .name.toLowerCase();
				if( taName == aName ) {
					aValue = elm.attributes[i] .value;
					return aValue;
				}
			}
		}
		return aValue;
	};
	
	// need to redefine this function due to IE problem
	function setAttribute( elm, attr, val ) {
		if(attr=="class"){
			elm.setAttribute("className", val);
			elm.setAttribute("class", val);
		}else{
			elm.setAttribute(attr, val);
		}
	};
	
	/* return a child element
		elem: element we are searching in
		elem_type: type of the eleemnt we are searching (DIV, A, etc...)
		elem_attribute: attribute of the searched element that must match
		elem_attribute_match: value that elem_attribute must match
		option: "all" if must return an array of all children, otherwise return the first match element
		depth: depth of search (-1 or no set => unlimited)
	*/
	function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth)
	{           
		if(!option)
			var option="single";
		if(!depth)
			var depth=-1;
		if(elem){
			var children= elem.childNodes;
			var result=null;
			var results= [];
			for (var x=0;x<children.length;x++) {
				strTagName = new String(children[x].tagName);
				children_class="?";
				if(strTagName!= "undefined"){
					child_attribute= getAttribute(children[x],elem_attribute);
					if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){
						if(option=="all"){
							results.push(children[x]);
						}else{
							return children[x];
						}
					}
					if(depth!=0){
						result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);
						if(option=="all"){
							if(result.length>0){
								results= results.concat(result);
							}
						}else if(result!=null){                                                                          
							return result;
						}
					}
				}
			}
			if(option=="all")
			   return results;
		}
		return null;
	};       
	
	function isChildOf(elem, parent){
		if(elem){
			if(elem==parent)
				return true;
			while(elem.parentNode != 'undefined'){
				return isChildOf(elem.parentNode, parent);
			}
		}
		return false;
	};
	
	function getMouseX(e){

		if(e!=null && typeof(e.pageX)!="undefined"){
			return e.pageX;
		}else{
			return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;
		}
	};
	
	function getMouseY(e){
		if(e!=null && typeof(e.pageY)!="undefined"){
			return e.pageY;
		}else{
			return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;
		}
	};
	
	function calculeOffsetLeft(r){
		return calculeOffset(r,"offsetLeft")
	};
	
	function calculeOffsetTop(r){
		return calculeOffset(r,"offsetTop")
	};
	
	function calculeOffset(element,attr){
		var offset=0;
		while(element){
			offset+=element[attr];
			element=element.offsetParent
		}
		return offset;
	};
	
	/** return the computed style
	 *	@param: elem: the reference to the element
	 *	@param: prop: the name of the css property	 
	 */
	function get_css_property(elem, prop)
	{
		if(document.defaultView)
		{
			return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
		}
		else if(elem.currentStyle)
		{
			var prop = prop.replace(/-\D/gi, function(sMatch)
			{
				return sMatch.charAt(sMatch.length - 1).toUpperCase();
			});
			return elem.currentStyle[prop];
		}
		else return null;
	}
	
/****
 * Moving an element 
 ***/  
	
	var _mCE;	// currently moving element
	
	/* allow to move an element in a window
		e: the event
		id: the id of the element
		frame: the frame of the element 
		ex of use:
			in html:	<img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["this_frame_id"]);' .../>  
		or
			in javascript: document.getElementById("my_div").onmousedown= start_move_element
	*/
	function start_move_element(e, id, frame){
		var elem_id=(e.target || e.srcElement).id;
		if(id)
			elem_id=id;		
		if(!frame)
			frame=window;
		if(frame.event)
			e=frame.event;
			
		_mCE= frame.document.getElementById(elem_id);
		_mCE.frame=frame;
		frame.document.onmousemove= move_element;
		frame.document.onmouseup= end_move_element;
		/*_mCE.onmousemove= move_element;
		_mCE.onmouseup= end_move_element;*/
		
		//alert(_mCE.frame.document.body.offsetHeight);
		
		mouse_x= getMouseX(e);
		mouse_y= getMouseY(e);
		//window.status=frame+ " elem: "+elem_id+" elem: "+ _mCE + " mouse_x: "+mouse_x;
		_mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px","") || calculeOffsetLeft(_mCE));
		_mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px","") || calculeOffsetTop(_mCE));
		return false;
	};
	
	function end_move_element(e){
		_mCE.frame.document.onmousemove= "";
		_mCE.frame.document.onmouseup= "";		
		_mCE=null;
	};
	
	function move_element(e){
		var newTop,newLeft,maxLeft;

		if( _mCE.frame && _mCE.frame.event )
			e=_mCE.frame.event;
		newTop	= getMouseY(e) - _mCE.start_pos_y;
		newLeft	= getMouseX(e) - _mCE.start_pos_x;
		
		maxLeft	= _mCE.frame.document.body.offsetWidth- _mCE.offsetWidth;
		max_top	= _mCE.frame.document.body.offsetHeight- _mCE.offsetHeight;
		newTop	= Math.min(Math.max(0, newTop), max_top);
		newLeft	= Math.min(Math.max(0, newLeft), maxLeft);
		
		_mCE.style.top	= newTop+"px";
		_mCE.style.left	= newLeft+"px";		
		return false;
	};
	
/***
 * Managing a textarea (this part need the navigator infos from editAreaLoader
 ***/ 
	
	var nav= editAreaLoader.nav;
	
	// allow to get infos on the selection: array(start, end)
	function getSelectionRange(textarea){
		return {"start": textarea.selectionStart, "end": textarea.selectionEnd};
	};
	
	// allow to set the selection
	function setSelectionRange(t, start, end){
		t.focus();
		
		start	= Math.max(0, Math.min(t.value.length, start));
		end		= Math.max(start, Math.min(t.value.length, end));
	
		if( nav.isOpera && nav.isOpera < 9.6 ){	// Opera bug when moving selection start and selection end
			t.selectionEnd = 1;	
			t.selectionStart = 0;			
			t.selectionEnd = 1;	
			t.selectionStart = 0;		
		}
		t.selectionStart	= start;
		t.selectionEnd		= end;		
		//textarea.setSelectionRange(start, end);
		
		if(nav.isIE)
			set_IE_selection(t);
	};

	
	// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task
	function get_IE_selection(t){
		var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;
		if(t && t.focused)
		{	
			if(!t.ea_line_height)
			{	// calculate the lineHeight
				div= d.createElement("div");
				div.style.fontFamily= get_css_property(t, "font-family");
				div.style.fontSize= get_css_property(t, "font-size");
				div.style.visibility= "hidden";			
				div.innerHTML="0";
				d.body.appendChild(div);
				t.ea_line_height= div.offsetHeight;
				d.body.removeChild(div);
			}
			//t.focus();
			range = d.selection.createRange();
			try
			{
				stored_range = range.duplicate();
				stored_range.moveToElementText( t );
				stored_range.setEndPoint( 'EndToEnd', range );
				if(stored_range.parentElement() == t){
					// the range don't take care of empty lines in the end of the selection
					elem		= t;
					scrollTop	= 0;
					while(elem.parentNode){
						scrollTop+= elem.scrollTop;
						elem	= elem.parentNode;
					}
				
				//	var scrollTop= t.scrollTop + document.body.scrollTop;
					
				//	var relative_top= range.offsetTop - calculeOffsetTop(t) + scrollTop;
					relative_top= range.offsetTop - calculeOffsetTop(t)+ scrollTop;
				//	alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(t) +"\nrelativeTop: "+ relative_top);
					line_start	= Math.round((relative_top / t.ea_line_height) +1);
					
					line_nb		= Math.round(range.boundingHeight / t.ea_line_height);
					
					range_start	= stored_range.text.length - range.text.length;
					tab	= t.value.substr(0, range_start).split("\n");			
					range_start	+= (line_start - tab.length)*2;		// add missing empty lines to the selection
					t.selectionStart = range_start;
					
					range_end	= t.selectionStart + range.text.length;
					tab	= t.value.substr(0, range_start + range.text.length).split("\n");			
					range_end	+= (line_start + line_nb - 1 - tab.length)*2;
					t.selectionEnd = range_end;
				}
			}
			catch(e){}
		}
		if( t && t.id )
		{
			setTimeout("get_IE_selection(document.getElementById('"+ t.id +"'));", 50);
		}
	};
	
	function IE_textarea_focus(){
		event.srcElement.focused= true;
	}
	
	function IE_textarea_blur(){
		event.srcElement.focused= false;
	}
	
	// select the text for IE (take into account the \r difference)
	function set_IE_selection( t ){
		var nbLineStart,nbLineStart,nbLineEnd,range;
		if(!window.closed){ 
			nbLineStart=t.value.substr(0, t.selectionStart).split("\n").length - 1;
			nbLineEnd=t.value.substr(0, t.selectionEnd).split("\n").length - 1;
			try
			{
				range = document.selection.createRange();
				range.moveToElementText( t );
				range.setEndPoint( 'EndToStart', range );
				range.moveStart('character', t.selectionStart - nbLineStart);
				range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart)  );
				range.select();
			}
			catch(e){}
		}
	};
	
	
	editAreaLoader.waiting_loading["elements_functions.js"]= "loaded";

Added applications/admin/static/edit_area/highlight.js version [87b655f5ee].
























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	// change_to: "on" or "off"
	EditArea.prototype.change_highlight= function(change_to){
		if(this.settings["syntax"].length==0 && change_to==false){
			this.switchClassSticky(_$("highlight"), 'editAreaButtonDisabled', true);
			this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
			return false;
		}
		
		if(this.do_highlight==change_to)
			return false;
	
			
		this.getIESelection();
		var pos_start= this.textarea.selectionStart;
		var pos_end= this.textarea.selectionEnd;
		
		if(this.do_highlight===true || change_to==false)
			this.disable_highlight();
		else
			this.enable_highlight();
		this.textarea.focus();
		this.textarea.selectionStart = pos_start;
		this.textarea.selectionEnd = pos_end;
		this.setIESelection();
				
	};
	
	EditArea.prototype.disable_highlight= function(displayOnly){
		var t= this, a=t.textarea, new_Obj, old_class, new_class;
			
		t.selection_field.innerHTML="";
		t.selection_field_text.innerHTML="";
		t.content_highlight.style.visibility="hidden";
		// replacing the node is far more faster than deleting it's content in firefox
		new_Obj= t.content_highlight.cloneNode(false);
		new_Obj.innerHTML= "";			
		t.content_highlight.parentNode.insertBefore(new_Obj, t.content_highlight);
		t.content_highlight.parentNode.removeChild(t.content_highlight);	
		t.content_highlight= new_Obj;
		old_class= parent.getAttribute( a,"class" );
		if(old_class){
			new_class= old_class.replace( "hidden","" );
			parent.setAttribute( a, "class", new_class );
		}
	
		a.style.backgroundColor="transparent";	// needed in order to see the bracket finders
		
		//var icon= document.getElementById("highlight");
		//setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
		//t.restoreClass(icon);
		//t.switchClass(icon,'editAreaButtonNormal');
		t.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', true);
		t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
	
		t.do_highlight=false;
	
		t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonSelected', true);
		if(typeof(t.smooth_selection_before_highlight)!="undefined" && t.smooth_selection_before_highlight===false){
			t.change_smooth_selection_mode(false);
		}
		
	//	this.textarea.style.backgroundColor="#FFFFFF";
	};

	EditArea.prototype.enable_highlight= function(){
		var t=this, a=t.textarea, new_class;
		t.show_waiting_screen();
			
		t.content_highlight.style.visibility="visible";
		new_class	=parent.getAttribute(a,"class")+" hidden";
		parent.setAttribute( a, "class", new_class );
		
		// IE can't manage mouse click outside text range without this
		if( t.isIE )
			a.style.backgroundColor="#FFFFFF";	

		t.switchClassSticky(_$("highlight"), 'editAreaButtonSelected', false);
		t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);
		
		t.smooth_selection_before_highlight=t.smooth_selection;
		if(!t.smooth_selection)
			t.change_smooth_selection_mode(true);
		t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonDisabled', true);
		
		
		t.do_highlight=true;
		t.resync_highlight();
					
		t.hide_waiting_screen();	
	};
	
	/**
	 * Ask to update highlighted text
	 * @param Array infos - Array of datas returned by EditArea.get_selection_infos()
	 */
	EditArea.prototype.maj_highlight= function(infos){
		// for speed mesure
		var debug_opti="",tps_start= new Date().getTime(), tps_middle_opti=new Date().getTime();
		var t=this, hightlighted_text, updated_highlight;	
		var textToHighlight=infos["full_text"], doSyntaxOpti = false, doHtmlOpti = false, stay_begin="", stay_end="", trace_new , trace_last;
		
		if(t.last_text_to_highlight==infos["full_text"] && t.resync_highlight!==true)
			return;
					
		//  OPTIMISATION: will search to update only changed lines
		if(t.reload_highlight===true){
			t.reload_highlight=false;
		}else if(textToHighlight.length==0){
			textToHighlight="\n ";
		}else{
			// get text change datas
			changes = t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);
			
			// check if it can only reparse the changed text
			trace_new		= t.get_syntax_trace(changes.newTextLine).replace(/\r/g, '');
			trace_last		= t.get_syntax_trace(changes.lastTextLine).replace(/\r/g, '');
			doSyntaxOpti	= ( trace_new == trace_last );
			
			// check if the difference comes only from a new line created 
			// => we have to remember that the editor can automaticaly add tabulation or space after the new line) 
			if( !doSyntaxOpti && trace_new == "\n"+trace_last && /^[ \t\s]*\n[ \t\s]*$/.test( changes.newText.replace(/\r/g, '') ) && changes.lastText =="" )
			{
				doSyntaxOpti	= true;
			}
			
			// we do the syntax optimisation
			if( doSyntaxOpti ){
						
				tps_middle_opti=new Date().getTime();	
			
				stay_begin= t.last_hightlighted_text.split("\n").slice(0, changes.lineStart).join("\n");
				if(changes.lineStart>0)
					stay_begin+= "\n";
				stay_end= t.last_hightlighted_text.split("\n").slice(changes.lineLastEnd+1).join("\n");
				if(stay_end.length>0)
					stay_end= "\n"+stay_end;
					
				// Final check to see that we're not in the middle of span tags
				if( stay_begin.split('<span').length != stay_begin.split('</span').length 
					|| stay_end.split('<span').length != stay_end.split('</span').length )
				{
					doSyntaxOpti	= false;
					stay_end		= '';
					stay_begin		= '';
				}
				else
				{
					if(stay_begin.length==0 && changes.posLastEnd==-1)
						changes.newTextLine+="\n";
					textToHighlight=changes.newTextLine;
				}
			}
			if(t.settings["debug"]){
				var ch =changes;
				debug_opti= ( doSyntaxOpti?"Optimisation": "No optimisation" )
					+" start: "+ch.posStart +"("+ch.lineStart+")"
					+" end_new: "+ ch.posNewEnd+"("+ch.lineNewEnd+")"
					+" end_last: "+ ch.posLastEnd+"("+ch.lineLastEnd+")"
					+"\nchanged_text: "+ch.newText+" => trace: "+trace_new
					+"\nchanged_last_text: "+ch.lastText+" => trace: "+trace_last
					//debug_opti+= "\nchanged: "+ infos["full_text"].substring(ch.posStart, ch.posNewEnd);
					+ "\nchanged_line: "+ch.newTextLine
					+ "\nlast_changed_line: "+ch.lastTextLine
					+"\nstay_begin: "+ stay_begin.slice(-100)
					+"\nstay_end: "+ stay_end.substr( 0, 100 );
					//debug_opti="start: "+stay_begin_len+ "("+nb_line_start_unchanged+") end: "+ (stay_end_len)+ "("+(splited.length-nb_line_end_unchanged)+") ";
					//debug_opti+="changed: "+ textToHighlight.substring(stay_begin_len, textToHighlight.length-stay_end_len)+" \n";
					
					//debug_opti+="changed: "+ stay_begin.substr(stay_begin.length-200)+ "----------"+ textToHighlight+"------------------"+ stay_end.substr(0,200) +"\n";
					+"\n";
			}
	
			
			// END OPTIMISATION
		}

		tps_end_opti	= new Date().getTime();	
				
		// apply highlight
		updated_highlight	= t.colorize_text(textToHighlight);
		tpsAfterReg			= new Date().getTime();
		
		/***
		 * see if we can optimize for updating only the required part of the HTML code
		 * 
		 * The goal here will be to find the text node concerned by the modification and to update it
		 */
		//-------------------------------------------
		
		// disable latest optimization tricks (introduced in 0.8.1 and removed in 0.8.2), TODO: check for another try later
		doSyntaxOpti	= doHtmlOpti = false;
		if( doSyntaxOpti )
		{
			try
			{
				var replacedBloc, i, nbStart = '', nbEnd = '', newHtml, lengthOld, lengthNew;
				replacedBloc		= t.last_hightlighted_text.substring( stay_begin.length, t.last_hightlighted_text.length - stay_end.length );
				
				lengthOld	= replacedBloc.length;
				lengthNew	= updated_highlight.length;
				
				// find the identical caracters at the beginning
				for( i=0; i < lengthOld && i < lengthNew && replacedBloc.charAt(i) == updated_highlight.charAt(i) ; i++ )
				{
				}
				nbStart = i;
				// find the identical caracters at the end
				for( i=0; i + nbStart < lengthOld && i + nbStart < lengthNew && replacedBloc.charAt(lengthOld-i-1) == updated_highlight.charAt(lengthNew-i-1) ; i++ )
				{
				}
				nbEnd	= i;
				//console.log( nbStart, nbEnd, replacedBloc, updated_highlight );
				// get the changes
				lastHtml	= replacedBloc.substring( nbStart, lengthOld - nbEnd );
				newHtml		= updated_highlight.substring( nbStart, lengthNew - nbEnd );
				
				// We can do the optimisation only if we havn't touch to span elements
				if( newHtml.indexOf('<span') == -1 && newHtml.indexOf('</span') == -1 
					&& lastHtml.indexOf('<span') == -1 && lastHtml.indexOf('</span') == -1 )
				{
					var beginStr, nbOpendedSpan, nbClosedSpan, nbUnchangedChars, span, textNode;
					doHtmlOpti		= true;
					beginStr		= t.last_hightlighted_text.substr( 0, stay_begin.length + nbStart );
					// fix special chars
					newHtml			= newHtml.replace( /&lt;/g, '<').replace( /&gt;/g, '>').replace( /&amp;/g, '&');
		
					nbOpendedSpan	= beginStr.split('<span').length - 1;
					nbClosedSpan	= beginStr.split('</span').length - 1;
					// retrieve the previously opened span (Add 1 for the first level span?)
					span 			= t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];
					
					//--------[
					// get the textNode to update
					
					// if we're inside a span, we'll take the one that is opened (can be a parent of the current span)
					parentSpan		= span;
					maxStartOffset	= maxEndOffset = 0;
					
					// it will be in the child of the root node 
					if( nbOpendedSpan == nbClosedSpan )
					{
						while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' )
						{
							parentSpan	= parentSpan.parentNode;
						}
					}
					// get the last opened span
					else
					{
						maxStartOffset	= maxEndOffset = beginStr.length + 1;
						// move to parent node for each closed span found after the lastest open span
						nbClosed = beginStr.substr( Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ).split('</span').length - 1;
						while( nbClosed > 0 )
						{
							nbClosed--;
							parentSpan = parentSpan.parentNode;
						}
						
						// find the position of the last opended tag
						while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' && ( tmpMaxStartOffset = Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ) < ( tmpMaxEndOffset = Math.max( 0, beginStr.lastIndexOf( '</span', maxEndOffset - 1 ) ) ) )
						{
							maxStartOffset	= tmpMaxStartOffset;
							maxEndOffset	= tmpMaxEndOffset;
						}
					}
					// Note: maxEndOffset is no more used but maxStartOffset will be used
					
					if( parentSpan.parentNode == t.content_highlight || parentSpan.parentNode.tagName == 'PRE' )
					{
						maxStartOffset	= Math.max( 0, beginStr.indexOf( '<span' ) );
					}
					
					// find the matching text node (this will be one that will be at the end of the beginStr
					if( maxStartOffset == beginStr.length )
					{
						nbSubSpanBefore	= 0;
					}
					else
					{
						lastEndPos 				= Math.max( 0, beginStr.lastIndexOf( '>', maxStartOffset ) );
		
						// count the number of sub spans
						nbSubSpanBefore			= beginStr.substr( lastEndPos ).split('<span').length-1;
					}
					
					// there is no sub-span before
					if( nbSubSpanBefore == 0 )
					{
						textNode	= parentSpan.firstChild;
					}
					// we need to find where is the text node modified
					else
					{
						// take the last direct child (no sub-child)
						lastSubSpan	= parentSpan.getElementsByTagName('span')[ nbSubSpanBefore - 1 ];
						while( lastSubSpan.parentNode != parentSpan )
						{
							lastSubSpan	= lastSubSpan.parentNode;
						}

						// associate to next text node following the last sub span
						if( lastSubSpan.nextSibling == null || lastSubSpan.nextSibling.nodeType != 3 )
						{
							textNode	= document.createTextNode('');
							lastSubSpan.parentNode.insertBefore( textNode, lastSubSpan.nextSibling );
						}
						else
						{
							textNode	= lastSubSpan.nextSibling;
						}
					}
					//--------]
					
					
					//--------[
					// update the textNode content
					
					// number of caracters after the last opened of closed span
					//nbUnchangedChars = ( lastIndex = beginStr.lastIndexOf( '>' ) ) == -1 ? beginStr.length : beginStr.length - ( lastIndex + 1 );
					//nbUnchangedChars =  ? beginStr.length : beginStr.substr( lastIndex + 1 ).replace( /&lt;/g, '<').replace( /&gt;/g, '>').replace( /&amp;/g, '&').length;
					
					if( ( lastIndex = beginStr.lastIndexOf( '>' ) ) == -1 )
					{
						nbUnchangedChars	= beginStr.length;
					}
					else
					{
						nbUnchangedChars	= beginStr.substr( lastIndex + 1 ).replace( /&lt;/g, '<').replace( /&gt;/g, '>').replace( /&amp;/g, '&').length; 	
						//nbUnchangedChars	+= beginStr.substr( ).replace( /&/g, '&amp;').replace( /</g, '&lt;').replace( />/g, '&gt;').length - beginStr.length;
					}
					//alert( nbUnchangedChars );
					//	console.log( span, textNode, nbOpendedSpan,nbClosedSpan,  span.nextSibling, textNode.length, nbUnchangedChars, lastHtml, lastHtml.length, newHtml, newHtml.length );
					//	alert( textNode.parentNode.className +'-'+ textNode.parentNode.tagName+"\n"+ textNode.data +"\n"+ nbUnchangedChars +"\n"+ lastHtml.length +"\n"+ newHtml +"\n"+ newHtml.length  );
				//	console.log( nbUnchangedChars, lastIndex, beginStr.length, beginStr.replace(/&/g, '&amp;'), lastHtml.length, '|', newHtml.replace( /\t/g, 't').replace( /\n/g, 'n').replace( /\r/g, 'r'), lastHtml.replace( /\t/g, 't').replace( /\n/g, 'n').replace( /\r/, 'r') );
				//	console.log( textNode.data.replace(/&/g, '&amp;') );
					// IE only manage \r for cariage return in textNode and not \n or \r\n
					if( t.isIE )
					{
						nbUnchangedChars	-= ( beginStr.substr( beginStr.length - nbUnchangedChars ).split("\n").length - 1 );
						//alert( textNode.data.replace(/\r/g, '_r').replace(/\n/g, '_n')); 
						textNode.replaceData( nbUnchangedChars, lastHtml.replace(/\n/g, '').length, newHtml.replace(/\n/g, '') );
					}
					else
					{
						textNode.replaceData( nbUnchangedChars, lastHtml.length, newHtml );
					}
					//--------]
				}
			}
			// an exception shouldn't occured but if replaceData failed at least it won't break everything
			catch( e )
			{
		//		throw e;
			//	console.log( e );
				doHtmlOpti	= false;
			}
			
		}
	
		/*** END HTML update's optimisation ***/
		// end test
		
	//			console.log(  (TPS6-TPS5), (TPS5-TPS4), (TPS4-TPS3), (TPS3-TPS2), (TPS2-TPS1), _CPT );
		// get the new highlight content
		tpsAfterOpti2		= new Date().getTime();
		hightlighted_text	= stay_begin + updated_highlight + stay_end;
		if( !doHtmlOpti )
		{
			// update the content of the highlight div by first updating a clone node (as there is no display in the same time for t node it's quite faster (5*))
			var new_Obj= t.content_highlight.cloneNode(false);
			if( ( t.isIE && t.isIE < 8 ) || ( t.isOpera && t.isOpera < 9.6 ) )
				new_Obj.innerHTML= "<pre><span class='"+ t.settings["syntax"] +"'>" + hightlighted_text + "</span></pre>";	
			else
				new_Obj.innerHTML= "<span class='"+ t.settings["syntax"] +"'>"+ hightlighted_text +"</span>";
	
			t.content_highlight.parentNode.replaceChild(new_Obj, t.content_highlight);
		
			t.content_highlight= new_Obj;
		}
		
		t.last_text_to_highlight= infos["full_text"];
		t.last_hightlighted_text= hightlighted_text;
		
		tps3=new Date().getTime();
	
		if(t.settings["debug"]){
			//lineNumber=tab_text.length;
			//t.debug.value+=" \nNB char: "+_$("src").value.length+" Nb line: "+ lineNumber;
		
			t.debug.value= "Tps optimisation "+(tps_end_opti-tps_start)
				+" | tps reg exp: "+ (tpsAfterReg-tps_end_opti)
				+" | tps opti HTML : "+ (tpsAfterOpti2-tpsAfterReg) + ' '+ ( doHtmlOpti ? 'yes' : 'no' )
				+" | tps update highlight content: "+ (tps3-tpsAfterOpti2)
				+" | tpsTotal: "+ (tps3-tps_start)
				+ "("+tps3+")\n"+ debug_opti;
		//	t.debug.value+= "highlight\n"+hightlighted_text;*/
		}
		
	};
	
	EditArea.prototype.resync_highlight= function(reload_now){
		this.reload_highlight=true;
		this.last_text_to_highlight="";
		this.focus();		
		if(reload_now)
			this.check_line_selection(false); 
	};	

Added applications/admin/static/edit_area/images/autocompletion.gif version [39ad3380fa].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/close.gif version [e15ed176c0].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/fullscreen.gif version [6ff89674cf].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/go_to_line.gif version [9c327e4d81].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/help.gif version [49ec88da13].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/highlight.gif version [3b5c0d156b].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/load.gif version [b9680c212c].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/move.gif version [80529a439c].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/newdocument.gif version [f802ecb5a1].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/opacity.png version [fde62fa8aa].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/processing.gif version [a49d766bc8].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/redo.gif version [a0b5f2e257].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/reset_highlight.gif version [b9a50f3b47].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/save.gif version [4cf395a3b6].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/search.gif version [3bc07c60d1].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/smooth_selection.gif version [be4e9d7f73].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/spacer.gif version [67a69b5842].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/statusbar_resize.gif version [a3b70d6078].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/undo.gif version [fc17dfae57].

cannot compute difference between binary files

Added applications/admin/static/edit_area/images/word_wrap.gif version [48bbb4a6c3].

cannot compute difference between binary files

Added applications/admin/static/edit_area/keyboard.js version [e8bfa9e0e6].


















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};



function keyDown(e){
	if(!e){	// if IE
		e=event;
	}
	
	// send the event to the plugins
	for(var i in editArea.plugins){
		if(typeof(editArea.plugins[i].onkeydown)=="function"){
			if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging
				if(editArea.isIE)
					e.keyCode=0;
				return false;
			}
		}
	}

	var target_id=(e.target || e.srcElement).id;
	var use=false;
	if (EA_keys[e.keyCode])
		letter=EA_keys[e.keyCode];
	else
		letter=String.fromCharCode(e.keyCode);
	
	var low_letter= letter.toLowerCase();
			
	if(letter=="Page up" && !AltPressed(e) && !editArea.isOpera){
		editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)});
		use=true;
	}else if(letter=="Page down" && !AltPressed(e) && !editArea.isOpera){
		editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)});
		use=true;
	}else if(editArea.is_editable==false){
		// do nothing but also do nothing else (allow to navigate with page up and page down)
		return true;
	}else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){	
		if(ShiftPressed(e))
			editArea.execCommand("invert_tab_selection");
		else
			editArea.execCommand("tab_selection");
		
		use=true;
		if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) )	// opera && firefox mac can't cancel tabulation events...
			setTimeout("editArea.execCommand('focus');", 1);
	}else if(letter=="Entrer" && target_id=="textarea"){
		if(editArea.press_enter())
			use=true;
	}else if(letter=="Entrer" && target_id=="area_search"){
		editArea.execCommand("area_search");
		use=true;
	}else  if(letter=="Esc"){
		editArea.execCommand("close_all_inline_popup", e);
		use=true;
	}else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){
		switch(low_letter){
			case "f":				
				editArea.execCommand("area_search");
				use=true;
				break;
			case "r":
				editArea.execCommand("area_replace");
				use=true;
				break;
			case "q":
				editArea.execCommand("close_all_inline_popup", e);
				use=true;
				break;
			case "h":
				editArea.execCommand("change_highlight");			
				use=true;
				break;
			case "g":
				setTimeout("editArea.execCommand('go_to_line');", 5);	// the prompt stop the return false otherwise
				use=true;
				break;
			case "e":
				editArea.execCommand("show_help");
				use=true;
				break;
			case "z":
				use=true;
				editArea.execCommand("undo");
				break;
			case "y":
				use=true;
				editArea.execCommand("redo");
				break;
			default:
				break;			
		}		
	}		
	
	// check to disable the redo possibility if the textarea content change
	if(editArea.next.length > 0){
		setTimeout("editArea.check_redo();", 10);
	}
	
	setTimeout("editArea.check_file_changes();", 10);
	
	
	if(use){
		// in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action
		if(editArea.isIE)
			e.keyCode=0;
		return false;
	}
	//alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e));
	
	return true;
	
};


// return true if Alt key is pressed
function AltPressed(e) {
	if (window.event) {
		return (window.event.altKey);
	} else {
		if(e.modifiers)
			return (e.altKey || (e.modifiers % 2));
		else
			return e.altKey;
	}
};

// return true if Ctrl key is pressed
function CtrlPressed(e) {
	if (window.event) {
		return (window.event.ctrlKey);
	} else {
		return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));
	}
};

// return true if Shift key is pressed
function ShiftPressed(e) {
	if (window.event) {
		return (window.event.shiftKey);
	} else {
		return (e.shiftKey || (e.modifiers>3));
	}
};

Added applications/admin/static/edit_area/langs/bg.js version [4fb2ec892f].























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 *	Bulgarian translation
 *	Author:		Valentin Hristov
 *	Company:	SOFTKIT Bulgarian
 *	Site:		http://www.softkit-bg.com
 */
editAreaLoader.lang["bg"]={
new_document: "нов документ",
search_button: "търсене и замяна",
search_command: "търси следващия / отвори прозорец с търсачка",
search: "търсене",
replace: "замяна",
replace_command: "замяна / отвори прозорец с търсачка",
find_next: "намери следващия",
replace_all: "замени всички",
reg_exp: "реголярни изрази",
match_case: "чуствителен към регистъра",
not_found: "няма резултат.",
occurrence_replaced: "замяната е осъществена.",
search_field_empty: "Полето за търсене е празно",
restart_search_at_begin: "До края на документа. Почни с началото.",
move_popup: "премести прозореца с търсачката",
font_size: "--Размер на шрифта--",
go_to_line: "премени към реда",
go_to_line_prompt: "премени към номера на реда:",
undo: "отмени",
redo: "върни",
change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)",
highlight: "превключване на оцветяване на синтаксиса включена/изключена",
reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)",
word_wrap: "режим на пренасяне на дълги редове",
help: "за програмата",
save: "съхрани",
load: "зареди",
line_abbr: "Стр",
char_abbr: "Стлб",
position: "Позиция",
total: "Всичко",
close_popup: "затвори прозореца",
shortcuts: "Бързи клавиши",
add_tab: "добави табулация в текста",
remove_tab: "премахни табулацията в текста",
about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове",
toggle: "Превключи редактор",
accesskey: "Бърз клавиш",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Зареждане...",
fullscreen: "на цял екран",
syntax_selection: "--Синтаксис--",
close_tab: "Затвори файла"
};

Added applications/admin/static/edit_area/langs/cs.js version [d88a95f384].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["cs"]={
new_document: "Nový dokument",
search_button: "Najdi a nahraď",
search_command: "Hledej další / otevři vyhledávací pole",
search: "Hledej",
replace: "Nahraď",
replace_command: "Nahraď / otevři vyhledávací pole",
find_next: "Najdi další",
replace_all: "Nahraď vše",
reg_exp: "platné výrazy",
match_case: "vyhodnocené výrazy",
not_found: "nenalezené.",
occurrence_replaced: "výskyty nahrazené.",
search_field_empty: "Pole vyhledávání je prázdné",
restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
move_popup: "Přesuň vyhledávací okno",
font_size: "--Velikost textu--",
go_to_line: "Přejdi na řádek",
go_to_line_prompt: "Přejdi na řádek:",
undo: "krok zpět",
redo: "znovu",
change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
highlight: "Zvýrazňování syntaxe zap./vyp.",
reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
word_wrap: "toggle word wrapping mode",
help: "O programu",
save: "Uložit",
load: "Otevřít",
line_abbr: "Ř.",
char_abbr: "S.",
position: "Pozice",
total: "Celkem",
close_popup: "Zavřít okno",
shortcuts: "Zkratky",
add_tab: "Přidat tabulování textu",
remove_tab: "Odtsranit tabulování textu",
about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
toggle: "Přepnout editor",
accesskey: "Přístupová klávesa",
tab: "Záložka",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Zpracovávám ...",
fullscreen: "Celá obrazovka",
syntax_selection: "--vyber zvýrazňovač--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/de.js version [eb5531562f].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["de"]={
new_document: "Neues Dokument",
search_button: "Suchen und Ersetzen",
search_command: "Weitersuchen / &ouml;ffne Suchfeld",
search: "Suchen",
replace: "Ersetzen",
replace_command: "Ersetzen / &ouml;ffne Suchfeld",
find_next: "Weitersuchen",
replace_all: "Ersetze alle Treffer",
reg_exp: "regul&auml;re Ausdr&uuml;cke",
match_case: "passt auf den Begriff<br />",
not_found: "Nicht gefunden.",
occurrence_replaced: "Die Vorkommen wurden ersetzt.",
search_field_empty: "Leeres Suchfeld",
restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
move_popup: "Suchfenster bewegen",
font_size: "--Schriftgr&ouml;&szlig;e--",
go_to_line: "Gehe zu Zeile",
go_to_line_prompt: "Gehe zu Zeilennummmer:",
undo: "R&uuml;ckg&auml;ngig",
redo: "Wiederherstellen",
change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
highlight: "Syntax Highlighting an- und ausschalten",
reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",
word_wrap: "Toggle word wrapping mode",
help: "Info",
save: "Speichern",
load: "&Ouml;ffnen",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Gesamt",
close_popup: "Popup schlie&szlig;en",
shortcuts: "Shortcuts",
add_tab: "Tab zum Text hinzuf&uuml;gen",
remove_tab: "Tab aus Text entfernen",
about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",
toggle: "Editor an- und ausschalten",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "In Bearbeitung...",
fullscreen: "Full-Screen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/dk.js version [37d12d163b].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["dk"]={
new_document: "nyt tomt dokument",
search_button: "s&oslash;g og erstat",
search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",
search: "s&oslash;g",
replace: "erstat",
replace_command: "erstat / &aring;ben s&oslash;gefelt",
find_next: "find n&aelig;ste",
replace_all: "erstat alle",
reg_exp: "regular expressions",
match_case: "forskel på store/sm&aring; bogstaver<br />",
not_found: "not found.",
occurrence_replaced: "occurences replaced.",
search_field_empty: "Search field empty",
restart_search_at_begin: "End of area reached. Restart at begin.",
move_popup: "flyt søgepopup",
font_size: "--Skriftstørrelse--",
go_to_line: "g&aring; til linie",
go_to_line_prompt: "gå til linienummer:",
undo: "fortryd",
redo: "gentag",
change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",
highlight: "sl&aring; syntax highlight til/fra",
reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
word_wrap: "toggle word wrapping mode",
help: "om",
save: "gem",
load: "hent",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Total",
close_popup: "luk popup",
shortcuts: "Genveje",
add_tab: "tilf&oslash;j tabulation til tekst",
remove_tab: "fjern tabulation fra tekst",
about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",
toggle: "Sl&aring; editor til / fra",
accesskey: "Accesskey",
tab: "Tab",
shift: "Skift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Processing...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/en.js version [a5cb18929b].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["en"]={
new_document: "new empty document",
search_button: "search and replace",
search_command: "search next / open search area",
search: "search",
replace: "replace",
replace_command: "replace / open search area",
find_next: "find next",
replace_all: "replace all",
reg_exp: "regular expressions",
match_case: "match case",
not_found: "not found.",
occurrence_replaced: "occurences replaced.",
search_field_empty: "Search field empty",
restart_search_at_begin: "End of area reached. Restart at begin.",
move_popup: "move search popup",
font_size: "--Font size--",
go_to_line: "go to line",
go_to_line_prompt: "go to line number:",
undo: "undo",
redo: "redo",
change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
highlight: "toggle syntax highlight on/off",
reset_highlight: "reset highlight (if desyncronized from text)",
word_wrap: "toggle word wrapping mode",
help: "about",
save: "save",
load: "load",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Total",
close_popup: "close popup",
shortcuts: "Shortcuts",
add_tab: "add tabulation to text",
remove_tab: "remove tabulation to text",
about_notice: "Notice: syntax highlight function is only for small text",
toggle: "Toggle editor",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Processing...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/eo.js version [8f4e3fbd9d].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["eo"]={
new_document: "nova dokumento (vakigas la enhavon)",
search_button: "ser&#265;i / anstata&#365;igi",
search_command: "pluser&#265;i / malfermi la ser&#265;o-fenestron",
search: "ser&#265;i",
replace: "anstata&#365;igi",
replace_command: "anstata&#365;igi / malfermi la ser&#265;o-fenestron",
find_next: "ser&#265;i",
replace_all: "anstata&#365;igi &#265;ion",
reg_exp: "regula esprimo",
match_case: "respekti la usklecon",
not_found: "ne trovita.",
occurrence_replaced: "anstata&#365;igoj plenumitaj.",
search_field_empty: "La kampo estas malplena.",
restart_search_at_begin: "Fino de teksto &#285;isrirata, &#265;u da&#365;rigi el la komenco?",
move_popup: "movi la ser&#265;o-fenestron",
font_size: "--Tipara grando--",
go_to_line: "iri al la linio",
go_to_line_prompt: "iri al la linio numero:",
undo: "rezigni",
redo: "refari",
change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da &#349;ar&#285;o de la &#265;eforgano)",
highlight: "ebligi/malebligi la sintaksan kolorigon",
reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",
word_wrap: "toggle word wrapping mode",
help: "pri",
save: "registri",
load: "&#349;ar&#285;i",
line_abbr: "Ln",
char_abbr: "Sg",
position: "Pozicio",
total: "Sumo",
close_popup: "fermi la &#349;prucfenestron",
shortcuts: "Fulmoklavo",
add_tab: "aldoni tabon en la tekston",
remove_tab: "forigi tablon el la teksto",
about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",
toggle: "baskuligi la redaktilon",
accesskey: "Fulmoklavo",
tab: "Tab",
shift: "Maj",
ctrl: "Ktrl",
esc: "Esk",
processing: "&#349;argante...",
fullscreen: "plenekrane",
syntax_selection: "--Sintakso--",
close_tab: "Fermi la dosieron"
};

Added applications/admin/static/edit_area/langs/es.js version [9ebdb8bfc0].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["es"]={
new_document: "nuevo documento vacío",
search_button: "buscar y reemplazar",
search_command: "buscar siguiente / abrir área de búsqueda",
search: "buscar",
replace: "reemplazar",
replace_command: "reemplazar / abrir área de búsqueda",
find_next: "encontrar siguiente",
replace_all: "reemplazar todos",
reg_exp: "expresiones regulares",
match_case: "coincidir capitalización",
not_found: "no encontrado.",
occurrence_replaced: "ocurrencias reemplazadas.",
search_field_empty: "Campo de búsqueda vacío",
restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",
move_popup: "mover la ventana de búsqueda",
font_size: "--Tamaño de la fuente--",
go_to_line: "ir a la línea",
go_to_line_prompt: "ir a la línea número:",
undo: "deshacer",
redo: "rehacer",
change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",
highlight: "intercambiar resaltado de sintaxis",
reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
word_wrap: "toggle word wrapping mode",
help: "acerca",
save: "guardar",
load: "cargar",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Posición",
total: "Total",
close_popup: "recuadro de cierre",
shortcuts: "Atajos",
add_tab: "añadir tabulado al texto",
remove_tab: "borrar tabulado del texto",
about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",
toggle: "Cambiar editor",
accesskey: "Tecla de acceso",
tab: "Tab",
shift: "Mayúsc",
ctrl: "Ctrl",
esc: "Esc",
processing: "Procesando...",
fullscreen: "pantalla completa",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/fi.js version [4229d34f42].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["fi"]={
new_document: "uusi tyhjä dokumentti",
search_button: "etsi ja korvaa",
search_command: "etsi seuraava / avaa etsintävalikko",
search: "etsi",
replace: "korvaa",
replace_command: "korvaa / avaa etsintävalikko",
find_next: "etsi seuraava",
replace_all: "korvaa kaikki",
reg_exp: "säännölliset lausekkeet",
match_case: "täsmää kirjainkokoon",
not_found: "ei löytynyt.",
occurrence_replaced: "esiintymää korvattu.",
search_field_empty: "Haettava merkkijono on tyhjä",
restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.",
move_popup: "siirrä etsintävalikkoa",
font_size: "--Fontin koko--",
go_to_line: "siirry riville",
go_to_line_prompt: "mene riville:",
undo: "peruuta",
redo: "tee uudelleen",
change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)",
highlight: "kytke syntaksikorostus päälle/pois",
reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)",
word_wrap: "toggle word wrapping mode",
help: "tietoja",
save: "tallenna",
load: "lataa",
line_abbr: "Rv",
char_abbr: "Pos",
position: "Paikka",
total: "Yhteensä",
close_popup: "sulje valikko",
shortcuts: "Pikatoiminnot",
add_tab: "lisää sisennys tekstiin",
remove_tab: "poista sisennys tekstistä",
about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille",
toggle: "Kytke editori",
accesskey: "Pikanäppäin",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Odota...",
fullscreen: "koko ruutu",
syntax_selection: "--Syntaksi--",
close_tab: "Sulje tiedosto"
};

Added applications/admin/static/edit_area/langs/fr.js version [ca224391fe].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["fr"]={
new_document: "nouveau document (efface le contenu)",
search_button: "rechercher / remplacer",
search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",
search: "rechercher",
replace: "remplacer",
replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",
find_next: "rechercher",
replace_all: "tout remplacer",
reg_exp: "expr. r&eacute;guli&egrave;re",
match_case: "respecter la casse",
not_found: "pas trouv&eacute;.",
occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",
search_field_empty: "Le champ de recherche est vide.",
restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",
move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",
font_size: "--Taille police--",
go_to_line: "aller &agrave; la ligne",
go_to_line_prompt: "aller a la ligne numero:",
undo: "annuler",
redo: "refaire",
change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
highlight: "activer/d&eacute;sactiver la coloration syntaxique",
reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",
word_wrap: "activer/d&eacute;sactiver les retours &agrave; la ligne automatiques",
help: "&agrave; propos",
save: "sauvegarder",
load: "charger",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Total",
close_popup: "fermer le popup",
shortcuts: "Racourcis clavier",
add_tab: "ajouter une tabulation dans le texte",
remove_tab: "retirer une tabulation dans le texte",
about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",
toggle: "basculer l'&eacute;diteur",
accesskey: "Accesskey",
tab: "Tab",
shift: "Maj",
ctrl: "Ctrl",
esc: "Esc",
processing: "chargement...",
fullscreen: "plein &eacute;cran",
syntax_selection: "--Syntaxe--",
close_tab: "Fermer le fichier"
};

Added applications/admin/static/edit_area/langs/hr.js version [1dd36d6a0f].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["hr"]={
new_document: "Novi dokument",
search_button: "Traži i izmijeni",
search_command: "Traži dalje / Otvori prozor za traženje",
search: "Traži",
replace: "Izmijeni",
replace_command: "Izmijeni / Otvori prozor za traženje",
find_next: "Traži dalje",
replace_all: "Izmjeni sve",
reg_exp: "Regularni izrazi",
match_case: "Bitna vel. slova",
not_found: "nije naðeno.",
occurrence_replaced: "izmjenjenih.",
search_field_empty: "Prazno polje za traženje!",
restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
move_popup: "Pomakni prozor",
font_size: "--Velièina teksta--",
go_to_line: "Odi na redak",
go_to_line_prompt: "Odi na redak:",
undo: "Vrati natrag",
redo: "Napravi ponovo",
change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
highlight: "Ukljuèi/iskljuèi bojanje sintakse",
reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
word_wrap: "toggle word wrapping mode",
help: "O edit_area",
save: "Spremi",
load: "Uèitaj",
line_abbr: "Ln",
char_abbr: "Zn",
position: "Pozicija",
total: "Ukupno",
close_popup: "Zatvori prozor",
shortcuts: "Kratice",
add_tab: "Dodaj tabulaciju",
remove_tab: "Makni tabulaciju",
about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
toggle: "Prebaci naèin ureðivanja",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Procesiram...",
fullscreen: "Cijeli prozor",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/it.js version [a552601e3e].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["it"]={
new_document: "nuovo documento vuoto",
search_button: "cerca e sostituisci",
search_command: "trova successivo / apri finestra di ricerca",
search: "cerca",
replace: "sostituisci",
replace_command: "sostituisci / apri finestra di ricerca",
find_next: "trova successivo",
replace_all: "sostituisci tutti",
reg_exp: "espressioni regolari",
match_case: "confronta maiuscole/minuscole<br />",
not_found: "non trovato.",
occurrence_replaced: "occorrenze sostituite.",
search_field_empty: "Campo ricerca vuoto",
restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
move_popup: "sposta popup di ricerca",
font_size: "-- Dimensione --",
go_to_line: "vai alla linea",
go_to_line_prompt: "vai alla linea numero:",
undo: "annulla",
redo: "ripeti",
change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
highlight: "abilita/disabilita colorazione della sintassi",
reset_highlight: "aggiorna colorazione (se non sincronizzata)",
word_wrap: "toggle word wrapping mode",
help: "informazioni su...",
save: "salva",
load: "carica",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Posizione",
total: "Totale",
close_popup: "chiudi popup",
shortcuts: "Scorciatoie",
add_tab: "aggiungi tabulazione",
remove_tab: "rimuovi tabulazione",
about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
toggle: "Abilita/disabilita editor",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "In corso...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/ja.js version [f505f20d18].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["ja"]={
new_document: "新規作成",
search_button: "検索・置換",
search_command: "次を検索 / 検索窓を表示",
search: "検索",
replace: "置換",
replace_command: "置換 / 置換窓を表示",
find_next: "次を検索",
replace_all: "全置換",
reg_exp: "正規表現",
match_case: "大文字小文字の区別",
not_found: "見つかりません。",
occurrence_replaced: "置換しました。",
search_field_empty: "検索対象文字列が空です。",
restart_search_at_begin: "終端に達しました、始めに戻ります",
move_popup: "検索窓を移動",
font_size: "--フォントサイズ--",
go_to_line: "指定行へ移動",
go_to_line_prompt: "指定行へ移動します:",
undo: "元に戻す",
redo: "やり直し",
change_smooth_selection: "スムース表示の切り替え(CPUを使います)",
highlight: "構文強調表示の切り替え",
reset_highlight: "構文強調表示のリセット",
word_wrap: "toggle word wrapping mode",
help: "ヘルプを表示",
save: "保存",
load: "読み込み",
line_abbr: "行",
char_abbr: "文字",
position: "位置",
total: "合計",
close_popup: "ポップアップを閉じる",
shortcuts: "ショートカット",
add_tab: "タブを挿入する",
remove_tab: "タブを削除する",
about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
toggle: "テキストエリアとeditAreaの切り替え",
accesskey: "アクセスキー",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "処理中です...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/mk.js version [092a25d823].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["mk"]={
new_document: "Нов документ",
search_button: "Најди и замени",
search_command: "Барај следно / Отвори нов прозорец за пребарување",
search: "Барај",
replace: "Замени",
replace_command: "Замени / Отвори прозорец за пребарување",
find_next: "најди следно",
replace_all: "Замени ги сите",
reg_exp: "Регуларни изрази",
match_case: "Битна е големината на буквите",
not_found: "не е пронајдено.",
occurrence_replaced: "замени.",
search_field_empty: "Полето за пребарување е празно",
restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
move_popup: "Помести го прозорецот",
font_size: "--Големина на текстот--",
go_to_line: "Оди на линија",
go_to_line_prompt: "Оди на линија со број:",
undo: "Врати",
redo: "Повтори",
change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
highlight: "Вклучи/исклучи осветлување на синтакса",
reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
word_wrap: "toggle word wrapping mode",
help: "За",
save: "Зачувај",
load: "Вчитај",
line_abbr: "Лн",
char_abbr: "Зн",
position: "Позиција",
total: "Вкупно",
close_popup: "Затвори го прозорецот",
shortcuts: "Кратенки",
add_tab: "Додај табулација на текстот",
remove_tab: "Отстрани ја табулацијата",
about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
toggle: "Смени начин на уредување",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Обработувам...",
fullscreen: "Цел прозорец",
syntax_selection: "--Синтакса--",
close_tab: "Избери датотека"
};

Added applications/admin/static/edit_area/langs/nl.js version [f0a5256145].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["nl"]={
new_document: "nieuw leeg document",
search_button: "zoek en vervang",
search_command: "zoek volgende / zoekscherm openen",
search: "zoek",
replace: "vervang",
replace_command: "vervang / zoekscherm openen",
find_next: "volgende vinden",
replace_all: "alles vervangen",
reg_exp: "reguliere expressies",
match_case: "hoofdletter gevoelig",
not_found: "niet gevonden.",
occurrence_replaced: "object vervangen.",
search_field_empty: "Zoek veld leeg",
restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
move_popup: "versleep zoek scherm",
font_size: "--Letter grootte--",
go_to_line: "Ga naar regel",
go_to_line_prompt: "Ga naar regel nummer:",
undo: "Ongedaan maken",
redo: "Opnieuw doen",
change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
highlight: "zet syntax highlight aan/uit",
reset_highlight: "reset highlight (indien gedesynchronizeerd)",
word_wrap: "toggle word wrapping mode",
help: "informatie",
save: "opslaan",
load: "laden",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Positie",
total: "Totaal",
close_popup: "Popup sluiten",
shortcuts: "Snelkoppelingen",
add_tab: "voeg tabs toe in tekst",
remove_tab: "verwijder tabs uit tekst",
about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
toggle: "geavanceerde bewerkingsopties",
accesskey: "Accessknop",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Verwerken...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/pl.js version [76852189c3].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["pl"]={
new_document: "nowy dokument",
search_button: "znajdź i zamień",
search_command: "znajdź następny",
search: "znajdź",
replace: "zamień",
replace_command: "zamień",
find_next: "następny",
replace_all: "zamień wszystko",
reg_exp: "wyrażenie regularne",
match_case: "uwzględnij wielkość liter<br />",
not_found: "nie znaleziono.",
occurrence_replaced: "wystąpień zamieniono.",
search_field_empty: "Nie wprowadzono tekstu",
restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
move_popup: "przesuń okienko wyszukiwania",
font_size: "Rozmiar",
go_to_line: "idź do linii",
go_to_line_prompt: "numer linii:",
undo: "cofnij",
redo: "przywróć",
change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
highlight: "włącz/wyłącz podświetlanie składni",
reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
word_wrap: "toggle word wrapping mode",
help: "o programie",
save: "zapisz",
load: "otwórz",
line_abbr: "Ln",
char_abbr: "Zn",
position: "Pozycja",
total: "W sumie",
close_popup: "zamknij okienko",
shortcuts: "Skróty klawiaturowe",
add_tab: "dodaj wcięcie do zaznaczonego tekstu",
remove_tab: "usuń wcięcie",
about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
toggle: "Włącz/wyłącz edytor",
accesskey: "Alt+",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Przetwarzanie...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/pt.js version [526b6bd472].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["pt"]={
new_document: "Novo documento",
search_button: "Localizar e substituir",
search_command: "Localizar próximo",
search: "Localizar",
replace: "Substituir",
replace_command: "Substituir",
find_next: "Localizar",
replace_all: "Subst. tudo",
reg_exp: "Expressões regulares",
match_case: "Diferenciar maiúsculas e minúsculas",
not_found: "Não encontrado.",
occurrence_replaced: "Ocorrências substituidas",
search_field_empty: "Campo localizar vazio.",
restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
move_popup: "Mover janela",
font_size: "--Tamanho da fonte--",
go_to_line: "Ir para linha",
go_to_line_prompt: "Ir para a linha:",
undo: "Desfazer",
redo: "Refazer",
change_smooth_selection: "Opções visuais",
highlight: "Cores de sintaxe",
reset_highlight: "Resetar cores (se não sincronizado)",
word_wrap: "toggle word wrapping mode",
help: "Sobre",
save: "Salvar",
load: "Carregar",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Posição",
total: "Total",
close_popup: "Fechar",
shortcuts: "Shortcuts",
add_tab: "Adicionar tabulação",
remove_tab: "Remover tabulação",
about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
toggle: "Exibir editor",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Processando...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/ru.js version [67d169c26b].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["ru"]={
new_document: "новый пустой документ",
search_button: "поиск и замена",
search_command: "искать следующий / открыть панель поиска",
search: "поиск",
replace: "замена",
replace_command: "заменить / открыть панель поиска",
find_next: "найти следующее",
replace_all: "заменить все",
reg_exp: "регулярное выражение",
match_case: "учитывать регистр",
not_found: "не найдено.",
occurrence_replaced: "вхождение заменено.",
search_field_empty: "Поле поиска пустое",
restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
move_popup: "переместить окно поиска",
font_size: "--Размер шрифта--",
go_to_line: "перейти к строке",
go_to_line_prompt: "перейти к строке номер:",
undo: "отменить",
redo: "вернуть",
change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
highlight: "переключить подсветку синтаксиса включена/выключена",
reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
word_wrap: "toggle word wrapping mode",
help: "о программе",
save: "сохранить",
load: "загрузить",
line_abbr: "Стр",
char_abbr: "Стлб",
position: "Позиция",
total: "Всего",
close_popup: "закрыть всплывающее окно",
shortcuts: "Горячие клавиши",
add_tab: "добавить табуляцию в текст",
remove_tab: "убрать табуляцию из текста",
about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
toggle: "Переключить редактор",
accesskey: "Горячая клавиша",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Обработка...",
fullscreen: "полный экран",
syntax_selection: "--Синтакс--",
close_tab: "Закрыть файл"
};

Added applications/admin/static/edit_area/langs/sk.js version [7a1d003bf4].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["sk"]={
new_document: "nový prázdy dokument",
search_button: "vyhľadaj a nahraď",
search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
search: "hľadaj",
replace: "nahraď",
replace_command: "nahraď / otvor vyhľadávacie pole",
find_next: "nájdi ďalšie",
replace_all: "nahraď všetko",
reg_exp: "platné výrazy",
match_case: "zhodujúce sa výrazy",
not_found: "nenájdené.",
occurrence_replaced: "výskyty nahradené.",
search_field_empty: "Pole vyhľadávanie je prádzne",
restart_search_at_begin: "End of area reached. Restart at begin.",
move_popup: "presuň vyhľadávacie okno",
font_size: "--Veľkosť textu--",
go_to_line: "prejdi na riadok",
go_to_line_prompt: "prejdi na riadok:",
undo: "krok späť",
redo: "prepracovať",
change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje  väčšie zaťaženie procesora CPU)",
highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",
reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",
word_wrap: "toggle word wrapping mode",
help: "o programe",
save: "uložiť",
load: "načítať",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Pozícia",
total: "Spolu",
close_popup: "zavrieť okno",
shortcuts: "Skratky",
add_tab: "pridať tabulovanie textu",
remove_tab: "odstrániť tabulovanie textu",
about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",
toggle: "Prepnúť editor",
accesskey: "Accesskey",
tab: "Záložka",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Spracúvam...",
fullscreen: "cel=a obrazovka",
syntax_selection: "--Vyber Syntax--",
close_tab: "Close file"
};

Added applications/admin/static/edit_area/langs/zh.js version [21201ae416].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.lang["zh"]={
new_document: "新建空白文档",
search_button: "查找与替换",
search_command: "查找下一个 / 打开查找框",
search: "查找",
replace: "替换",
replace_command: "替换 / 打开查找框",
find_next: "查找下一个",
replace_all: "全部替换",
reg_exp: "正则表达式",
match_case: "匹配大小写",
not_found: "未找到.",
occurrence_replaced: "处被替换.",
search_field_empty: "查找框没有内容",
restart_search_at_begin: "已到到文档末尾. 从头重新查找.",
move_popup: "移动查找对话框",
font_size: "--字体大小--",
go_to_line: "转到行",
go_to_line_prompt: "转到行:",
undo: "恢复",
redo: "重做",
change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)",
highlight: "启用/禁止语法高亮",
reset_highlight: "重置语法高亮(当文本显示不同步时)",
word_wrap: "toggle word wrapping mode",
help: "关于",
save: "保存",
load: "加载",
line_abbr: "行",
char_abbr: "字符",
position: "位置",
total: "总计",
close_popup: "关闭对话框",
shortcuts: "快捷键",
add_tab: "添加制表符(Tab)",
remove_tab: "移除制表符(Tab)",
about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)",
toggle: "切换编辑器",
accesskey: "快捷键",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "正在处理中...",
fullscreen: "全屏编辑",
syntax_selection: "--语法--",
close_tab: "关闭文件"
};

Added applications/admin/static/edit_area/license.txt version [da39a3ee5e].

Added applications/admin/static/edit_area/license_apache.txt version [e83aa00b23].








1
2
3
4
5
6
7
+
+
+
+
+
+
+
Copyright 2008 Christophe Dolivet

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Added applications/admin/static/edit_area/license_bsd.txt version [faf3f028af].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
Copyright (c) 2008, Christophe Dolivet
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.
    * Neither the name of EditArea nor the names of its contributors may 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.

Added applications/admin/static/edit_area/license_lgpl.txt version [5d8d918fb0].











































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
		  GNU LESSER GENERAL PUBLIC LICENSE
		       Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

		  GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.
  
  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

			    NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

		     END OF TERMS AND CONDITIONS

Added applications/admin/static/edit_area/manage_area.js version [20e946967d].
















































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	EditArea.prototype.focus = function() {
		this.textarea.focus();
		this.textareaFocused=true;
	};


	EditArea.prototype.check_line_selection= function(timer_checkup){
		var changes, infos, new_top, new_width,i;
		
		var t1=t2=t2_1=t3=tLines=tend= new Date().getTime();
		// l'editeur n'existe plus => on quitte
		if(!editAreas[this.id])
			return false;
		
		if(!this.smooth_selection && !this.do_highlight)
		{
			//do nothing
		}
		else if(this.textareaFocused && editAreas[this.id]["displayed"]==true && this.isResizing==false)
		{
			infos	= this.get_selection_infos();
			changes	= this.checkTextEvolution( typeof( this.last_selection['full_text'] ) == 'undefined' ? '' : this.last_selection['full_text'], infos['full_text'] );
		
			t2= new Date().getTime();
			
			// if selection change
			if(this.last_selection["line_start"] != infos["line_start"] || this.last_selection["line_nb"] != infos["line_nb"] || infos["full_text"] != this.last_selection["full_text"] || this.reload_highlight || this.last_selection["selectionStart"] != infos["selectionStart"] || this.last_selection["selectionEnd"] != infos["selectionEnd"] || !timer_checkup )
			{
				// move and adjust text selection elements
				new_top		= this.getLinePosTop( infos["line_start"] );
				new_width	= Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);
				this.selection_field.style.top=this.selection_field_text.style.top=new_top+"px";
				if(!this.settings['word_wrap']){	
					this.selection_field.style.width=this.selection_field_text.style.width=this.test_font_size.style.width=new_width+"px";
				}
				
				// usefull? => _$("cursor_pos").style.top=new_top+"px";	
		
				if(this.do_highlight==true)
				{
					// fill selection elements
					var curr_text	= infos["full_text"].split("\n");
					var content		= "";
					//alert("length: "+curr_text.length+ " i: "+ Math.max(0,infos["line_start"]-1)+ " end: "+Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1)+ " line: "+infos["line_start"]+" [0]: "+curr_text[0]+" [1]: "+curr_text[1]);
					var start		= Math.max(0,infos["line_start"]-1);
					var end			= Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1);
					
					//curr_text[start]= curr_text[start].substr(0,infos["curr_pos"]-1) +"¤_overline_¤"+ curr_text[start].substr(infos["curr_pos"]-1);
					for(i=start; i< end; i++){
						content+= curr_text[i]+"\n";	
					}
					
					// add special chars arround selected characters
					selLength	= infos['selectionEnd'] - infos['selectionStart'];
					content		= content.substr( 0, infos["curr_pos"] - 1 ) + "\r\r" + content.substr( infos["curr_pos"] - 1, selLength ) + "\r\r" + content.substr( infos["curr_pos"] - 1 + selLength );
					content		= '<span>'+ content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace("\r\r", '</span><strong>').replace("\r\r", '</strong><span>') +'</span>';
					
					if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
						this.selection_field.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
					} else {
						this.selection_field.innerHTML= content;
					}
					this.selection_field_text.innerHTML = this.selection_field.innerHTML;
					t2_1 = new Date().getTime();
					// check if we need to update the highlighted background 
					if(this.reload_highlight || (infos["full_text"] != this.last_text_to_highlight && (this.last_selection["line_start"]!=infos["line_start"] || this.show_line_colors || this.settings['word_wrap'] || this.last_selection["line_nb"]!=infos["line_nb"] || this.last_selection["nb_line"]!=infos["nb_line"]) ) )
					{
						this.maj_highlight(infos);
					}
				}		
			}
			t3= new Date().getTime();
			
			// manage line heights
			if( this.settings['word_wrap'] && infos["full_text"] != this.last_selection["full_text"])
			{
				// refresh only 1 line if text change concern only one line and that the total line number has not changed
				if( changes.newText.split("\n").length == 1 && this.last_selection['nb_line'] && infos['nb_line'] == this.last_selection['nb_line'] )
				{
					this.fixLinesHeight( infos['full_text'], changes.lineStart, changes.lineStart );
				}
				else
				{
					this.fixLinesHeight( infos['full_text'], changes.lineStart, -1 );
				}
			}
		
			tLines= new Date().getTime();
			// manage bracket finding
			if( infos["line_start"] != this.last_selection["line_start"] || infos["curr_pos"] != this.last_selection["curr_pos"] || infos["full_text"].length!=this.last_selection["full_text"].length || this.reload_highlight || !timer_checkup )
			{
				// move _cursor_pos
				var selec_char= infos["curr_line"].charAt(infos["curr_pos"]-1);
				var no_real_move=true;
				if(infos["line_nb"]==1 && (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]) ){
					
					no_real_move=false;					
					//findEndBracket(infos["line_start"], infos["curr_pos"], selec_char);
					if(this.findEndBracket(infos, selec_char) === true){
						_$("end_bracket").style.visibility	="visible";
						_$("cursor_pos").style.visibility	="visible";
						_$("cursor_pos").innerHTML			= selec_char;
						_$("end_bracket").innerHTML			= (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]);
					}else{
						_$("end_bracket").style.visibility	="hidden";
						_$("cursor_pos").style.visibility	="hidden";
					}
				}else{
					_$("cursor_pos").style.visibility	="hidden";
					_$("end_bracket").style.visibility	="hidden";
				}
				//alert("move cursor");
				this.displayToCursorPosition("cursor_pos", infos["line_start"], infos["curr_pos"]-1, infos["curr_line"], no_real_move);
				if(infos["line_nb"]==1 && infos["line_start"]!=this.last_selection["line_start"])
					this.scroll_to_view();
			}
			this.last_selection=infos;
		}
		
		tend= new Date().getTime();
		//if( (tend-t1) > 7 )
		//	console.log( "tps total: "+ (tend-t1) + " tps get_infos: "+ (t2-t1)+ " tps selec: "+ (t2_1-t2)+ " tps highlight: "+ (t3-t2_1) +" tps lines: "+ (tLines-t3) +" tps cursor+lines: "+ (tend-tLines)+" \n" );
		
		
		if(timer_checkup){
			setTimeout("editArea.check_line_selection(true)", this.check_line_selection_timer);
		}
	};


	EditArea.prototype.get_selection_infos= function(){
		var sel={}, start, end, len, str;
	
		this.getIESelection();
		start	= this.textarea.selectionStart;
		end		= this.textarea.selectionEnd;		
		
		if( this.last_selection["selectionStart"] == start && this.last_selection["selectionEnd"] == end && this.last_selection["full_text"] == this.textarea.value )
		{	
			return this.last_selection;
		}
			
		if(this.tabulation!="\t" && this.textarea.value.indexOf("\t")!=-1) 
		{	// can append only after copy/paste 
			len		= this.textarea.value.length;
			this.textarea.value	= this.replace_tab(this.textarea.value);
			start	= end	= start+(this.textarea.value.length-len);
			this.area_select( start, 0 );
		}
		
		sel["selectionStart"]	= start;
		sel["selectionEnd"]		= end;		
		sel["full_text"]		= this.textarea.value;
		sel["line_start"]		= 1;
		sel["line_nb"]			= 1;
		sel["curr_pos"]			= 0;
		sel["curr_line"]		= "";
		sel["indexOfCursor"]	= 0;
		sel["selec_direction"]	= this.last_selection["selec_direction"];

		//return sel;	
		var splitTab= sel["full_text"].split("\n");
		var nbLine	= Math.max(0, splitTab.length);		
		var nbChar	= Math.max(0, sel["full_text"].length - (nbLine - 1));	// (remove \n caracters from the count)
		if( sel["full_text"].indexOf("\r") != -1 )
			nbChar	= nbChar - ( nbLine - 1 );		// (remove \r caracters from the count)
		sel["nb_line"]	= nbLine;		
		sel["nb_char"]	= nbChar;
	
		if(start>0){
			str					= sel["full_text"].substr(0,start);
			sel["curr_pos"]		= start - str.lastIndexOf("\n");
			sel["line_start"]	= Math.max(1, str.split("\n").length);
		}else{
			sel["curr_pos"]=1;
		}
		if(end>start){
			sel["line_nb"]=sel["full_text"].substring(start,end).split("\n").length;
		}
		sel["indexOfCursor"]=start;		
		sel["curr_line"]=splitTab[Math.max(0,sel["line_start"]-1)];
	
		// determine in which direction the selection grow
		if(sel["selectionStart"] == this.last_selection["selectionStart"]){
			if(sel["selectionEnd"]>this.last_selection["selectionEnd"])
				sel["selec_direction"]= "down";
			else if(sel["selectionEnd"] == this.last_selection["selectionStart"])
				sel["selec_direction"]= this.last_selection["selec_direction"];
		}else if(sel["selectionStart"] == this.last_selection["selectionEnd"] && sel["selectionEnd"]>this.last_selection["selectionEnd"]){
			sel["selec_direction"]= "down";
		}else{
			sel["selec_direction"]= "up";
		}
		
		_$("nbLine").innerHTML	= nbLine;		
		_$("nbChar").innerHTML	= nbChar;		
		_$("linePos").innerHTML	= sel["line_start"];
		_$("currPos").innerHTML	= sel["curr_pos"];

		return sel;		
	};
	
	// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd)
	EditArea.prototype.getIESelection= function(){
		var selectionStart, selectionEnd, range, stored_range;
		
		if( !this.isIE )
			return false;
			
		// make it work as nowrap mode (easier for range manipulation with lineHeight)
		if( this.settings['word_wrap'] )
			this.textarea.wrap='off';
			
		try{
			range			= document.selection.createRange();
			stored_range	= range.duplicate();
			stored_range.moveToElementText( this.textarea );
			stored_range.setEndPoint( 'EndToEnd', range );
			if( stored_range.parentElement() != this.textarea )
				throw "invalid focus";
				
			// the range don't take care of empty lines in the end of the selection
			var scrollTop	= this.result.scrollTop + document.body.scrollTop;
			var relative_top= range.offsetTop - parent.calculeOffsetTop(this.textarea) + scrollTop;
			var line_start	= Math.round((relative_top / this.lineHeight) +1);
			var line_nb		= Math.round( range.boundingHeight / this.lineHeight );
						
			selectionStart	= stored_range.text.length - range.text.length;		
			selectionStart	+= ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length)*2;		// count missing empty \r to the selection
			selectionStart	-= ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length ) * 2;
			
			selectionEnd	= selectionStart + range.text.length;		
			selectionEnd	+= (line_start + line_nb - 1 - this.textarea.value.substr(0, selectionEnd ).split("\n").length)*2;			
		
			this.textarea.selectionStart	= selectionStart;
			this.textarea.selectionEnd		= selectionEnd;
		}
		catch(e){}
		
		// restore wrap mode
		if( this.settings['word_wrap'] )
			this.textarea.wrap='soft';
	};
	
	// select the text for IE (and take care of \r caracters)
	EditArea.prototype.setIESelection= function(){
		var a = this.textarea, nbLineStart, nbLineEnd, range;
		
		if( !this.isIE )
			return false;
		
		nbLineStart	= a.value.substr(0, a.selectionStart).split("\n").length - 1;
		nbLineEnd 	= a.value.substr(0, a.selectionEnd).split("\n").length - 1;
		range		= document.selection.createRange();
		range.moveToElementText( a );
		range.setEndPoint( 'EndToStart', range );
		
		range.moveStart('character', a.selectionStart - nbLineStart);
		range.moveEnd('character', a.selectionEnd - nbLineEnd - (a.selectionStart - nbLineStart)  );
		range.select();
	};
	
	
	
	EditArea.prototype.checkTextEvolution=function(lastText,newText){
		// ch will contain changes datas
		var ch={},baseStep=200, cpt=0, end, step,tStart=new Date().getTime();
	
		end		= Math.min(newText.length, lastText.length);
        step	= baseStep;
        // find how many chars are similar at the begin of the text						
		while( cpt<end && step>=1 ){
            if(lastText.substr(cpt, step) == newText.substr(cpt, step)){
                cpt+= step;
            }else{
                step= Math.floor(step/2);
            }
		}
		
		ch.posStart	= cpt;
		ch.lineStart= newText.substr(0, ch.posStart).split("\n").length -1;						
		
		cpt_last	= lastText.length;
        cpt			= newText.length;
        step		= baseStep;			
        // find how many chars are similar at the end of the text						
		while( cpt>=0 && cpt_last>=0 && step>=1 ){
            if(lastText.substr(cpt_last-step, step) == newText.substr(cpt-step, step)){
                cpt-= step;
                cpt_last-= step;
            }else{
                step= Math.floor(step/2);
            }
		}
		
		ch.posNewEnd	= cpt;
		ch.posLastEnd	= cpt_last;
		if(ch.posNewEnd<=ch.posStart){
			if(lastText.length < newText.length){
				ch.posNewEnd= ch.posStart + newText.length - lastText.length;
				ch.posLastEnd= ch.posStart;
			}else{
				ch.posLastEnd= ch.posStart + lastText.length - newText.length;
				ch.posNewEnd= ch.posStart;
			}
		} 
		ch.newText		= newText.substring(ch.posStart, ch.posNewEnd);
		ch.lastText		= lastText.substring(ch.posStart, ch.posLastEnd);			            
		
		ch.lineNewEnd	= newText.substr(0, ch.posNewEnd).split("\n").length -1;
		ch.lineLastEnd	= lastText.substr(0, ch.posLastEnd).split("\n").length -1;
		
		ch.newTextLine	= newText.split("\n").slice(ch.lineStart, ch.lineNewEnd+1).join("\n");
		ch.lastTextLine	= lastText.split("\n").slice(ch.lineStart, ch.lineLastEnd+1).join("\n");
		//console.log( ch );
		return ch;	
	};
	
	EditArea.prototype.tab_selection= function(){
		if(this.is_tabbing)
			return;
		this.is_tabbing=true;
		//infos=getSelectionInfos();
		//if( document.selection ){
		this.getIESelection();
		/* Insertion du code de formatage */
		var start = this.textarea.selectionStart;
		var end = this.textarea.selectionEnd;
		var insText = this.textarea.value.substring(start, end);
		
		/* Insert tabulation and ajust cursor position */
		var pos_start=start;
		var pos_end=end;
		if (insText.length == 0) {
			// if only one line selected
			this.textarea.value = this.textarea.value.substr(0, start) + this.tabulation + this.textarea.value.substr(end);
			pos_start = start + this.tabulation.length;
			pos_end=pos_start;
		} else {
			start= Math.max(0, this.textarea.value.substr(0, start).lastIndexOf("\n")+1);
			endText=this.textarea.value.substr(end);
			startText=this.textarea.value.substr(0, start);
			tmp= this.textarea.value.substring(start, end).split("\n");
			insText= this.tabulation+tmp.join("\n"+this.tabulation);
			this.textarea.value = startText + insText + endText;
			pos_start = start;
			pos_end= this.textarea.value.indexOf("\n", startText.length + insText.length);
			if(pos_end==-1)
				pos_end=this.textarea.value.length;
			//pos = start + repdeb.length + insText.length + ;
		}
		this.textarea.selectionStart = pos_start;
		this.textarea.selectionEnd = pos_end;
		
		//if( document.selection ){
		if(this.isIE)
		{
			this.setIESelection();
			setTimeout("editArea.is_tabbing=false;", 100);	// IE can't accept to make 2 tabulation without a little break between both
		}
		else
		{ 
			this.is_tabbing=false;
		}	
		
  	};
	
	EditArea.prototype.invert_tab_selection= function(){
		var t=this, a=this.textarea;
		if(t.is_tabbing)
			return;
		t.is_tabbing=true;
		//infos=getSelectionInfos();
		//if( document.selection ){
		t.getIESelection();
		
		var start	= a.selectionStart;
		var end		= a.selectionEnd;
		var insText	= a.value.substring(start, end);
		
		/* Tab remove and cursor seleciton adjust */
		var pos_start=start;
		var pos_end=end;
		if (insText.length == 0) {
			if(a.value.substring(start-t.tabulation.length, start)==t.tabulation)
			{
				a.value		= a.value.substr(0, start-t.tabulation.length) + a.value.substr(end);
				pos_start	= Math.max(0, start-t.tabulation.length);
				pos_end		= pos_start;
			}	
			/*
			a.value = a.value.substr(0, start) + t.tabulation + insText + a.value.substr(end);
			pos_start = start + t.tabulation.length;
			pos_end=pos_start;*/
		} else {
			start		= a.value.substr(0, start).lastIndexOf("\n")+1;
			endText		= a.value.substr(end);
			startText	= a.value.substr(0, start);
			tmp			= a.value.substring(start, end).split("\n");
			insText		= "";
			for(i=0; i<tmp.length; i++){				
				for(j=0; j<t.tab_nb_char; j++){
					if(tmp[i].charAt(0)=="\t"){
						tmp[i]=tmp[i].substr(1);
						j=t.tab_nb_char;
					}else if(tmp[i].charAt(0)==" ")
						tmp[i]=tmp[i].substr(1);
				}		
				insText+=tmp[i];
				if(i<tmp.length-1)
					insText+="\n";
			}
			//insText+="_";
			a.value		= startText + insText + endText;
			pos_start	= start;
			pos_end		= a.value.indexOf("\n", startText.length + insText.length);
			if(pos_end==-1)
				pos_end=a.value.length;
			//pos = start + repdeb.length + insText.length + ;
		}
		a.selectionStart = pos_start;
		a.selectionEnd = pos_end;
		
		//if( document.selection ){
		if(t.isIE){
			// select the text for IE
			t.setIESelection();
			setTimeout("editArea.is_tabbing=false;", 100);	// IE can accept to make 2 tabulation without a little break between both
		}else
			t.is_tabbing=false;
  	};
	
	EditArea.prototype.press_enter= function(){		
		if(!this.smooth_selection)
			return false;
		this.getIESelection();
		var scrollTop= this.result.scrollTop;
		var scrollLeft= this.result.scrollLeft;
		var start=this.textarea.selectionStart;
		var end= this.textarea.selectionEnd;
		var start_last_line= Math.max(0 , this.textarea.value.substring(0, start).lastIndexOf("\n") + 1 );
		var begin_line= this.textarea.value.substring(start_last_line, start).replace(/^([ \t]*).*/gm, "$1");
		var lineStart = this.textarea.value.substring(0, start).split("\n").length;
		if(begin_line=="\n" || begin_line=="\r" || begin_line.length==0)
		{
			return false;
		}
			
		if(this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ){
			begin_line="\r\n"+ begin_line;
		}else{
			begin_line="\n"+ begin_line;
		}	
		//alert(start_last_line+" strat: "+start +"\n"+this.textarea.value.substring(start_last_line, start)+"\n_"+begin_line+"_")
		this.textarea.value= this.textarea.value.substring(0, start) + begin_line + this.textarea.value.substring(end);
		
		this.area_select(start+ begin_line.length ,0);
		// during this process IE scroll back to the top of the textarea
		if(this.isIE){
			this.result.scrollTop	= scrollTop;
			this.result.scrollLeft	= scrollLeft;
		}
		return true;
		
	};
	
	EditArea.prototype.findEndBracket= function(infos, bracket){
			
		var start=infos["indexOfCursor"];
		var normal_order=true;
		//curr_text=infos["full_text"].split("\n");
		if(this.assocBracket[bracket])
			endBracket=this.assocBracket[bracket];
		else if(this.revertAssocBracket[bracket]){
			endBracket=this.revertAssocBracket[bracket];
			normal_order=false;
		}	
		var end=-1;
		var nbBracketOpen=0;
		
		for(var i=start; i<infos["full_text"].length && i>=0; ){
			if(infos["full_text"].charAt(i)==endBracket){				
				nbBracketOpen--;
				if(nbBracketOpen<=0){
					//i=infos["full_text"].length;
					end=i;
					break;
				}
			}else if(infos["full_text"].charAt(i)==bracket)
				nbBracketOpen++;
			if(normal_order)
				i++;
			else
				i--;
		}
		
		//end=infos["full_text"].indexOf("}", start);
		if(end==-1)
			return false;	
		var endLastLine=infos["full_text"].substr(0, end).lastIndexOf("\n");			
		if(endLastLine==-1)
			line=1;
		else
			line= infos["full_text"].substr(0, endLastLine).split("\n").length + 1;
					
		var curPos= end - endLastLine - 1;
		var endLineLength	= infos["full_text"].substring(end).split("\n")[0].length;
		this.displayToCursorPosition("end_bracket", line, curPos, infos["full_text"].substring(endLastLine +1, end + endLineLength));
		return true;
	};
	
	EditArea.prototype.displayToCursorPosition= function(id, start_line, cur_pos, lineContent, no_real_move){
		var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;	

		elem		= this.test_font_size;
		dest		= _$(id);
		content		= "<span id='test_font_size_inner'>"+lineContent.substr(0, cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span><span id='endTestFont'>"+lineContent.substr(cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span>";
		if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
			elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
		} else {
			elem.innerHTML= content;
		}
		

		endElem		= _$('endTestFont');
		topOffset	= endElem.offsetTop;
		fixPadding	= parseInt( this.content_highlight.style.paddingLeft.replace("px", "") );
		posLeft 	= 45 + endElem.offsetLeft + ( !isNaN( fixPadding ) && topOffset > 0 ? fixPadding : 0 );
		posTop		= this.getLinePosTop( start_line ) + topOffset;// + Math.floor( ( endElem.offsetHeight - 1 ) / this.lineHeight ) * this.lineHeight;
	
		// detect the case where the span start on a line but has no display on it
		if( this.isIE && cur_pos > 0 && endElem.offsetLeft == 0 )
		{
			posTop	+=	this.lineHeight;
		}
		if(no_real_move!=true){	// when the cursor is hidden no need to move him
			dest.style.top=posTop+"px";
			dest.style.left=posLeft+"px";	
		}
		// usefull for smarter scroll
		dest.cursor_top=posTop;
		dest.cursor_left=posLeft;	
	//	_$(id).style.marginLeft=posLeft+"px";
	};
	
	EditArea.prototype.getLinePosTop= function(start_line){
		var elem= _$('line_'+ start_line), posTop=0;
		if( elem )
			posTop	= elem.offsetTop;
		else
			posTop	= this.lineHeight * (start_line-1);
		return posTop;
	};
	
	
	// return the dislpayed height of a text (take word-wrap into account)
	EditArea.prototype.getTextHeight= function(text){
		var t=this,elem,height;
		elem		= t.test_font_size;
		content		= text.replace(/&/g,"&amp;").replace(/</g,"&lt;");
		if( t.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
			elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
		} else {
			elem.innerHTML= content;
		}
		height	= elem.offsetHeight;
		height	= Math.max( 1, Math.floor( elem.offsetHeight / this.lineHeight ) ) * this.lineHeight;
		return height;
	};

	/**
	 * Fix line height for the given lines
	 * @param Integer linestart
	 * @param Integer lineEnd End line or -1 to cover all lines
	 */
	EditArea.prototype.fixLinesHeight= function( textValue, lineStart,lineEnd ){
		var aText = textValue.split("\n");
		if( lineEnd == -1 )
			lineEnd	= aText.length-1;
		for( var i = Math.max(0, lineStart); i <= lineEnd; i++ )
		{
			if( elem = _$('line_'+ ( i+1 ) ) )
			{
				elem.style.height= typeof( aText[i] ) != "undefined" ? this.getTextHeight( aText[i] )+"px" : this.lineHeight;
			}
		}
	};
	
	EditArea.prototype.area_select= function(start, length){
		this.textarea.focus();
		
		start	= Math.max(0, Math.min(this.textarea.value.length, start));
		end		= Math.max(start, Math.min(this.textarea.value.length, start+length));

		if(this.isIE)
		{
			this.textarea.selectionStart	= start;
			this.textarea.selectionEnd		= end;		
			this.setIESelection();
		}
		else
		{
			// Opera bug when moving selection start and selection end
			if(this.isOpera && this.isOpera < 9.6 )
			{	
				this.textarea.setSelectionRange(0, 0);
			}
			this.textarea.setSelectionRange(start, end);
		}
		this.check_line_selection();
	};
	
	
	EditArea.prototype.area_get_selection= function(){
		var text="";
		if( document.selection ){
			var range = document.selection.createRange();
			text=range.text;
		}else{
			text= this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd);
		}
		return text;			
	};

Added applications/admin/static/edit_area/plugins/charmap/charmap.js version [011f83b4db].



























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
 * Charmap plugin
 * by Christophe Dolivet
 * v0.1 (2006/09/22)
 * 
 *    
 * This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text.
 * 
 * - plugin name to add to the plugin list: "charmap"
 * - plugin name to add to the toolbar list: "charmap" 
 * - possible parameters to add to EditAreaLoader.init(): 
 * 		"charmap_default": (String) define the name of the default character range displayed on popup display
 * 							(default: "arrows")
 * 
 * 
 */
   
var EditArea_charmap= {
	/**
	 * Get called once this file is loaded (editArea still not initialized)
	 *
	 * @return nothing	 
	 */	 	 	
	init: function(){	
		this.default_language="Arrows";
	}
	
	/**
	 * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
	 * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
	 * Language variables such as {$lang_somekey} will also be replaced with contents from
	 * the language packs.
	 * 
	 * @param {string} ctrl_name: the name of the control to add	  
	 * @return HTML code for a specific control or false.
	 * @type string	or boolean
	 */	
	,get_control_html: function(ctrl_name){
		switch(ctrl_name){
			case "charmap":
				// Control id, button img, command
				return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL);
		}
		return false;
	}
	/**
	 * Get called once EditArea is fully loaded and initialised
	 *	 
	 * @return nothing
	 */	 	 	
	,onload: function(){ 
		if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0)
			this.default_language= editArea.settings["charmap_default"];
	}
	
	/**
	 * Is called each time the user touch a keyboard key.
	 *	 
	 * @param (event) e: the keydown event
	 * @return true - pass to next handler in chain, false - stop chain execution
	 * @type boolean	 
	 */
	,onkeydown: function(e){
		
	}
	
	/**
	 * Executes a specific command, this function handles plugin commands.
	 *
	 * @param {string} cmd: the name of the command being executed
	 * @param {unknown} param: the parameter of the command	 
	 * @return true - pass to next handler in chain, false - stop chain execution
	 * @type boolean	
	 */
	,execCommand: function(cmd, param){
		// Handle commands
		switch(cmd){
			case "charmap_press":
				win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes");
				win.focus();
				return false;
		}
		// Pass to next handler in chain
		return true;
	}
	
};

// Adds the plugin class to the list of available EditArea plugins
editArea.add_plugin("charmap", EditArea_charmap);

Added applications/admin/static/edit_area/plugins/charmap/css/charmap.css version [79dc1ee5b0].

































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
body{
	background-color: #F0F0EE; 
	font: 12px monospace, sans-serif;
}

select{
	background-color: #F9F9F9;
	border: solid 1px #888888;
}

h1, h2, h3, h4, h5, h6{
	margin: 0;
	padding: 0;
	color: #2B6FB6;
}

h1{
	font-size: 1.5em;
}

div#char_list{
	height: 200px;
	overflow: auto;
	padding: 1px;
	border: 1px solid #0A246A;
	background-color: #F9F9F9;
	clear: both;
	margin-top: 5px;
}

a.char{
	display: block;
	float: left;
	width: 20px;
	height: 20px;
	line-height: 20px;
	margin: 1px;
	border: solid 1px #888888;
	text-align: center;
	cursor: pointer;
}

a.char:hover{
	background-color: #CCCCCC;
}

.preview{
	border: solid 1px #888888;
	width: 50px;
	padding: 2px 5px;
	height: 35px;
	line-height: 35px;
	text-align:center;	 
	background-color: #CCCCCC;
	font-size: 2em;
	float: right;
	font-weight: bold;
	margin: 0 0 5px 5px;
}

#preview_code{
	font-size: 1.1em;
	width: 70px;
}

Added applications/admin/static/edit_area/plugins/charmap/images/charmap.gif version [625fdb70da].

cannot compute difference between binary files

Added applications/admin/static/edit_area/plugins/charmap/jscripts/map.js version [b4ba1e9585].






















































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
var editArea;


/**
 *  UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec 
 */  
 

/*
var char_range_list={
"Basic Latin":"0021,007F",
"Latin-1 Supplement":"0080,00FF",
"Latin Extended-A":"0100,017F",
"Latin Extended-B":"0180,024F",
"IPA Extensions":"0250,02AF",
"Spacing Modifier Letters":"02B0,02FF",

"Combining Diacritical Marks":"0300,036F",
"Greek and Coptic":"0370,03FF",
"Cyrillic":"0400,04FF",
"Cyrillic Supplement":"0500,052F",
"Armenian":"0530,058F",
"Hebrew":"0590,05FF",
"Arabic":"0600,06FF",
"Syriac":"0700,074F",
"Arabic Supplement":"0750,077F",

"Thaana":"0780,07BF",
"Devanagari":"0900,097F",
"Bengali":"0980,09FF",
"Gurmukhi":"0A00,0A7F",
"Gujarati":"0A80,0AFF",
"Oriya":"0B00,0B7F",
"Tamil":"0B80,0BFF",
"Telugu":"0C00,0C7F",
"Kannada":"0C80,0CFF",

"Malayalam":"0D00,0D7F",
"Sinhala":"0D80,0DFF",
"Thai":"0E00,0E7F",
"Lao":"0E80,0EFF",
"Tibetan":"0F00,0FFF",
"Myanmar":"1000,109F",
"Georgian":"10A0,10FF",
"Hangul Jamo":"1100,11FF",
"Ethiopic":"1200,137F",

"Ethiopic Supplement":"1380,139F",
"Cherokee":"13A0,13FF",
"Unified Canadian Aboriginal Syllabics":"1400,167F",
"Ogham":"1680,169F",
"Runic":"16A0,16FF",
"Tagalog":"1700,171F",
"Hanunoo":"1720,173F",
"Buhid":"1740,175F",
"Tagbanwa":"1760,177F",

"Khmer":"1780,17FF",
"Mongolian":"1800,18AF",
"Limbu":"1900,194F",
"Tai Le":"1950,197F",
"New Tai Lue":"1980,19DF",
"Khmer Symbols":"19E0,19FF",
"Buginese":"1A00,1A1F",
"Phonetic Extensions":"1D00,1D7F",
"Phonetic Extensions Supplement":"1D80,1DBF",

"Combining Diacritical Marks Supplement":"1DC0,1DFF",
"Latin Extended Additional":"1E00,1EFF",
"Greek Extended":"1F00,1FFF",
"General Punctuation":"2000,206F",
"Superscripts and Subscripts":"2070,209F",
"Currency Symbols":"20A0,20CF",
"Combining Diacritical Marks for Symbols":"20D0,20FF",
"Letterlike Symbols":"2100,214F",
"Number Forms":"2150,218F",

"Arrows":"2190,21FF",
"Mathematical Operators":"2200,22FF",
"Miscellaneous Technical":"2300,23FF",
"Control Pictures":"2400,243F",
"Optical Character Recognition":"2440,245F",
"Enclosed Alphanumerics":"2460,24FF",
"Box Drawing":"2500,257F",
"Block Elements":"2580,259F",
"Geometric Shapes":"25A0,25FF",

"Miscellaneous Symbols":"2600,26FF",
"Dingbats":"2700,27BF",
"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
"Supplemental Arrows-A":"27F0,27FF",
"Braille Patterns":"2800,28FF",
"Supplemental Arrows-B":"2900,297F",
"Miscellaneous Mathematical Symbols-B":"2980,29FF",
"Supplemental Mathematical Operators":"2A00,2AFF",
"Miscellaneous Symbols and Arrows":"2B00,2BFF",

"Glagolitic":"2C00,2C5F",
"Coptic":"2C80,2CFF",
"Georgian Supplement":"2D00,2D2F",
"Tifinagh":"2D30,2D7F",
"Ethiopic Extended":"2D80,2DDF",
"Supplemental Punctuation":"2E00,2E7F",
"CJK Radicals Supplement":"2E80,2EFF",
"Kangxi Radicals":"2F00,2FDF",
"Ideographic Description Characters":"2FF0,2FFF",

"CJK Symbols and Punctuation":"3000,303F",
"Hiragana":"3040,309F",
"Katakana":"30A0,30FF",
"Bopomofo":"3100,312F",
"Hangul Compatibility Jamo":"3130,318F",
"Kanbun":"3190,319F",
"Bopomofo Extended":"31A0,31BF",
"CJK Strokes":"31C0,31EF",
"Katakana Phonetic Extensions":"31F0,31FF",

"Enclosed CJK Letters and Months":"3200,32FF",
"CJK Compatibility":"3300,33FF",
"CJK Unified Ideographs Extension A":"3400,4DBF",
"Yijing Hexagram Symbols":"4DC0,4DFF",
"CJK Unified Ideographs":"4E00,9FFF",
"Yi Syllables":"A000,A48F",
"Yi Radicals":"A490,A4CF",
"Modifier Tone Letters":"A700,A71F",
"Syloti Nagri":"A800,A82F",

"Hangul Syllables":"AC00,D7AF",
"High Surrogates":"D800,DB7F",
"High Private Use Surrogates":"DB80,DBFF",
"Low Surrogates":"DC00,DFFF",
"Private Use Area":"E000,F8FF",
"CJK Compatibility Ideographs":"F900,FAFF",
"Alphabetic Presentation Forms":"FB00,FB4F",
"Arabic Presentation Forms-A":"FB50,FDFF",
"Variation Selectors":"FE00,FE0F",

"Vertical Forms":"FE10,FE1F",
"Combining Half Marks":"FE20,FE2F",
"CJK Compatibility Forms":"FE30,FE4F",
"Small Form Variants":"FE50,FE6F",
"Arabic Presentation Forms-B":"FE70,FEFF",
"Halfwidth and Fullwidth Forms":"FF00,FFEF",
"Specials":"FFF0,FFFF",
"Linear B Syllabary":"10000,1007F",
"Linear B Ideograms":"10080,100FF",

"Aegean Numbers":"10100,1013F",
"Ancient Greek Numbers":"10140,1018F",
"Old Italic":"10300,1032F",
"Gothic":"10330,1034F",
"Ugaritic":"10380,1039F",
"Old Persian":"103A0,103DF",
"Deseret":"10400,1044F",
"Shavian":"10450,1047F",
"Osmanya":"10480,104AF",

"Cypriot Syllabary":"10800,1083F",
"Kharoshthi":"10A00,10A5F",
"Byzantine Musical Symbols":"1D000,1D0FF",
"Musical Symbols":"1D100,1D1FF",
"Ancient Greek Musical Notation":"1D200,1D24F",
"Tai Xuan Jing Symbols":"1D300,1D35F",
"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
"CJK Unified Ideographs Extension B":"20000,2A6DF",
"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
"Tags":"E0000,E007F",
"Variation Selectors Supplement":"E0100,E01EF"
};
*/
var char_range_list={
"Aegean Numbers":"10100,1013F",
"Alphabetic Presentation Forms":"FB00,FB4F",
"Ancient Greek Musical Notation":"1D200,1D24F",
"Ancient Greek Numbers":"10140,1018F",
"Arabic":"0600,06FF",
"Arabic Presentation Forms-A":"FB50,FDFF",
"Arabic Presentation Forms-B":"FE70,FEFF",
"Arabic Supplement":"0750,077F",
"Armenian":"0530,058F",
"Arrows":"2190,21FF",
"Basic Latin":"0020,007F",
"Bengali":"0980,09FF",
"Block Elements":"2580,259F",
"Bopomofo Extended":"31A0,31BF",
"Bopomofo":"3100,312F",
"Box Drawing":"2500,257F",
"Braille Patterns":"2800,28FF",
"Buginese":"1A00,1A1F",
"Buhid":"1740,175F",
"Byzantine Musical Symbols":"1D000,1D0FF",
"CJK Compatibility Forms":"FE30,FE4F",
"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
"CJK Compatibility Ideographs":"F900,FAFF",
"CJK Compatibility":"3300,33FF",
"CJK Radicals Supplement":"2E80,2EFF",
"CJK Strokes":"31C0,31EF",
"CJK Symbols and Punctuation":"3000,303F",
"CJK Unified Ideographs Extension A":"3400,4DBF",
"CJK Unified Ideographs Extension B":"20000,2A6DF",
"CJK Unified Ideographs":"4E00,9FFF",
"Cherokee":"13A0,13FF",
"Combining Diacritical Marks Supplement":"1DC0,1DFF",
"Combining Diacritical Marks for Symbols":"20D0,20FF",
"Combining Diacritical Marks":"0300,036F",
"Combining Half Marks":"FE20,FE2F",
"Control Pictures":"2400,243F",
"Coptic":"2C80,2CFF",
"Currency Symbols":"20A0,20CF",
"Cypriot Syllabary":"10800,1083F",
"Cyrillic Supplement":"0500,052F",
"Cyrillic":"0400,04FF",
"Deseret":"10400,1044F",
"Devanagari":"0900,097F",
"Dingbats":"2700,27BF",
"Enclosed Alphanumerics":"2460,24FF",
"Enclosed CJK Letters and Months":"3200,32FF",
"Ethiopic Extended":"2D80,2DDF",
"Ethiopic Supplement":"1380,139F",
"Ethiopic":"1200,137F",
"General Punctuation":"2000,206F",
"Geometric Shapes":"25A0,25FF",
"Georgian Supplement":"2D00,2D2F",
"Georgian":"10A0,10FF",
"Glagolitic":"2C00,2C5F",
"Gothic":"10330,1034F",
"Greek Extended":"1F00,1FFF",
"Greek and Coptic":"0370,03FF",
"Gujarati":"0A80,0AFF",
"Gurmukhi":"0A00,0A7F",
"Halfwidth and Fullwidth Forms":"FF00,FFEF",
"Hangul Compatibility Jamo":"3130,318F",
"Hangul Jamo":"1100,11FF",
"Hangul Syllables":"AC00,D7AF",
"Hanunoo":"1720,173F",
"Hebrew":"0590,05FF",
"High Private Use Surrogates":"DB80,DBFF",
"High Surrogates":"D800,DB7F",
"Hiragana":"3040,309F",
"IPA Extensions":"0250,02AF",
"Ideographic Description Characters":"2FF0,2FFF",
"Kanbun":"3190,319F",
"Kangxi Radicals":"2F00,2FDF",
"Kannada":"0C80,0CFF",
"Katakana Phonetic Extensions":"31F0,31FF",
"Katakana":"30A0,30FF",
"Kharoshthi":"10A00,10A5F",
"Khmer Symbols":"19E0,19FF",
"Khmer":"1780,17FF",
"Lao":"0E80,0EFF",
"Latin Extended Additional":"1E00,1EFF",
"Latin Extended-A":"0100,017F",
"Latin Extended-B":"0180,024F",
"Latin-1 Supplement":"0080,00FF",
"Letterlike Symbols":"2100,214F",
"Limbu":"1900,194F",
"Linear B Ideograms":"10080,100FF",
"Linear B Syllabary":"10000,1007F",
"Low Surrogates":"DC00,DFFF",
"Malayalam":"0D00,0D7F",
"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
"Mathematical Operators":"2200,22FF",
"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
"Miscellaneous Mathematical Symbols-B":"2980,29FF",
"Miscellaneous Symbols and Arrows":"2B00,2BFF",
"Miscellaneous Symbols":"2600,26FF",
"Miscellaneous Technical":"2300,23FF",
"Modifier Tone Letters":"A700,A71F",
"Mongolian":"1800,18AF",
"Musical Symbols":"1D100,1D1FF",
"Myanmar":"1000,109F",
"New Tai Lue":"1980,19DF",
"Number Forms":"2150,218F",
"Ogham":"1680,169F",
"Old Italic":"10300,1032F",
"Old Persian":"103A0,103DF",
"Optical Character Recognition":"2440,245F",
"Oriya":"0B00,0B7F",
"Osmanya":"10480,104AF",
"Phonetic Extensions Supplement":"1D80,1DBF",
"Phonetic Extensions":"1D00,1D7F",
"Private Use Area":"E000,F8FF",
"Runic":"16A0,16FF",
"Shavian":"10450,1047F",
"Sinhala":"0D80,0DFF",
"Small Form Variants":"FE50,FE6F",
"Spacing Modifier Letters":"02B0,02FF",
"Specials":"FFF0,FFFF",
"Superscripts and Subscripts":"2070,209F",
"Supplemental Arrows-A":"27F0,27FF",
"Supplemental Arrows-B":"2900,297F",
"Supplemental Mathematical Operators":"2A00,2AFF",
"Supplemental Punctuation":"2E00,2E7F",
"Syloti Nagri":"A800,A82F",
"Syriac":"0700,074F",
"Tagalog":"1700,171F",
"Tagbanwa":"1760,177F",
"Tags":"E0000,E007F",
"Tai Le":"1950,197F",
"Tai Xuan Jing Symbols":"1D300,1D35F",
"Tamil":"0B80,0BFF",
"Telugu":"0C00,0C7F",
"Thaana":"0780,07BF",
"Thai":"0E00,0E7F",
"Tibetan":"0F00,0FFF",
"Tifinagh":"2D30,2D7F",
"Ugaritic":"10380,1039F",
"Unified Canadian Aboriginal Syllabics":"1400,167F",
"Variation Selectors Supplement":"E0100,E01EF",
"Variation Selectors":"FE00,FE0F",
"Vertical Forms":"FE10,FE1F",
"Yi Radicals":"A490,A4CF",
"Yi Syllables":"A000,A48F",
"Yijing Hexagram Symbols":"4DC0,4DFF"
};

var insert="charmap_insert";

function map_load(){
	editArea=opener.editArea;
	// translate the document
	insert= editArea.get_translation(insert, "word");
	//alert(document.title);
	document.title= editArea.get_translation(document.title, "template");
	document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template");
	//document.title= editArea.get_translation(document.getElementBytitle, "template");
	
	var selected_lang=opener.EditArea_charmap.default_language.toLowerCase();
	var selected=0;
	
	var select= document.getElementById("select_range")
	for(var i in char_range_list){
		if(i.toLowerCase()==selected_lang)
			selected=select.options.length;
		select.options[select.options.length]=new Option(i, char_range_list[i]);
	}
	select.options[selected].selected=true;
/*	start=0;
	end=127;
	content="";
	for(var i=start; i<end; i++){
		content+="&#"+i+"; ";
	}
	document.getElementById("char_list").innerHTML=content;*/
	renderCharMapHTML();
}


function renderCharMapHTML() {
	range= document.getElementById("select_range").value.split(",");

	start= parseInt(range[0],16);
	end= parseInt(range[1],16);
	var charsPerRow = 20, tdWidth=20, tdHeight=20;
	html="";
	for (var i=start; i<end; i++) {
		html+="<a class='char' onmouseover='previewChar(\""+ i + "\");' onclick='insertChar(\""+ i + "\");' title='"+ insert +"'>"+ String.fromCharCode(i) +"</a>";
	}
	document.getElementById("char_list").innerHTML= html;
	document.getElementById("preview_char").innerHTML="";
}

function previewChar(i){
	document.getElementById("preview_char").innerHTML= String.fromCharCode(i);
	document.getElementById("preview_code").innerHTML= "&amp;#"+ i +";";
}

function insertChar(i){
	opener.parent.editAreaLoader.setSelectedText(editArea.id, String.fromCharCode( i));
	range= opener.parent.editAreaLoader.getSelectionRange(editArea.id);
	opener.parent.editAreaLoader.setSelectionRange(editArea.id, range["end"], range["end"]);
	window.focus();
}

Added applications/admin/static/edit_area/plugins/charmap/langs/bg.js version [5142522331].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
/*
 *	Bulgarian translation
 *	Author:		Valentin Hristov
 *	Company:	SOFTKIT Bulgarian
 *	Site:		http://www.softkit-bg.com
 */
editArea.add_lang("bg",{
charmap_but: "Виртуална клавиатура",
charmap_title: "Виртуална клавиатура",
charmap_choose_block: "избери езиков блок",
charmap_insert:"постави този символ"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/cs.js version [ee6ca5cb5f].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("cs",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/de.js version [8dc0fe9682].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("de",{
charmap_but: "Sonderzeichen",
charmap_title: "Sonderzeichen",
charmap_choose_block: "Bereich ausw&auml;hlen",
charmap_insert: "dieses Zeichen einf&uuml;gen"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/dk.js version [aba2f4dccb].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("dk",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/en.js version [7e68ab4aaa].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("en",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/eo.js version [15f6fb46b9].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("eo",{
charmap_but: "Ekranklavaro",
charmap_title: "Ekranklavaro",
charmap_choose_block: "Elekto de lingvo",
charmap_insert:"enmeti tiun signaron"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/es.js version [84387aab60].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("es",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/fr.js version [4e2980a4e6].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("fr",{
charmap_but: "Clavier visuel",
charmap_title: "Clavier visuel",
charmap_choose_block: "choix du language",
charmap_insert:"ins&eacute;rer ce caract&egrave;re"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/hr.js version [cf9da94573].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("hr",{
charmap_but: "Virtualna tipkovnica",
charmap_title: "Virtualna tipkovnica",
charmap_choose_block: "Odaberi blok s jezikom",
charmap_insert:"Ubaci taj znak"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/it.js version [1f985685cb].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("it",{
charmap_but: "Tastiera visuale",
charmap_title: "Tastiera visuale",
charmap_choose_block: "seleziona blocco",
charmap_insert:"inserisci questo carattere"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/ja.js version [f6827a9f44].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("ja",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/mk.js version [6a98ca45d6].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("mkn",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/nl.js version [121108946f].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("nl",{
charmap_but: "Visueel toetsenbord",
charmap_title: "Visueel toetsenbord",
charmap_choose_block: "Kies een taal blok",
charmap_insert:"Voeg dit symbool in"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/pl.js version [2ec42e392f].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("pl",{
charmap_but: "Klawiatura ekranowa",
charmap_title: "Klawiatura ekranowa",
charmap_choose_block: "wybierz grupę znaków",
charmap_insert:"wstaw ten znak"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/pt.js version [1a368e70eb].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("pt",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/ru.js version [4cd0ddc2dd].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("ru",{
charmap_but: "Визуальная клавиатура",
charmap_title: "Визуальная клавиатура",
charmap_choose_block: "выбрать языковой блок",
charmap_insert:"вставить этот символ"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/sk.js version [c79585d787].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("sk",{
charmap_but: "Vizuálna klávesnica",
charmap_title: "Vizuálna klávesnica",
charmap_choose_block: "vyber jazykový blok",
charmap_insert: "vlož tento znak"
});

Added applications/admin/static/edit_area/plugins/charmap/langs/zh.js version [e6521b516d].







1
2
3
4
5
6
+
+
+
+
+
+
editArea.add_lang("zh",{
charmap_but: "软键盘",
charmap_title: "软键盘",
charmap_choose_block: "选择一个语言块",
charmap_insert:"插入此字符"
});

Added applications/admin/static/edit_area/plugins/charmap/popup.html version [c52b1f6f2a].

























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{$charmap_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/charmap.css" />
<script language="Javascript" type="text/javascript" src="jscripts/map.js">
</script>
</head>
<body onload='map_load()'>
<div id='preview_code' class='preview'></div>
<div id='preview_char' class='preview'></div>
<h1>{$charmap_title}:</h1>
<select id='select_range' onchange='renderCharMapHTML()' title='{$charmap_choose_block}'>
</select>
<div id='char_list'>

</div>



</body>
</html>

Added applications/admin/static/edit_area/plugins/test/css/test.css version [d3f222bab9].




1
2
3
+
+
+
select#test_select{
	background-color: #FF0000;
}

Added applications/admin/static/edit_area/plugins/test/images/test.gif version [d23a2dcf10].

cannot compute difference between binary files

Added applications/admin/static/edit_area/plugins/test/langs/bg.js version [85b665d8fc].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
/*
 *	Bulgarian translation
 *	Author:		Valentin Hristov
 *	Company:	SOFTKIT Bulgarian
 *	Site:		http://www.softkit-bg.com
 */
editArea.add_lang("bg",{
test_select: "избери таг",
test_but: "тествай копието"
});

Added applications/admin/static/edit_area/plugins/test/langs/cs.js version [6bc0133024].





1
2
3
4
+
+
+
+
editArea.add_lang("cs",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/de.js version [c79a511851].





1
2
3
4
+
+
+
+
editArea.add_lang("de",{
test_select: "Tag ausw&auml;hlen",
test_but: "Test Button"
});

Added applications/admin/static/edit_area/plugins/test/langs/dk.js version [cf9aa52c8b].





1
2
3
4
+
+
+
+
editArea.add_lang("dk",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/en.js version [96741b2002].





1
2
3
4
+
+
+
+
editArea.add_lang("en",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/eo.js version [fc7d356783].





1
2
3
4
+
+
+
+
editArea.add_lang("eo",{
test_select:"elekto de marko",
test_but: "provo-butono"
});

Added applications/admin/static/edit_area/plugins/test/langs/es.js version [23ec7d0f44].





1
2
3
4
+
+
+
+
editArea.add_lang("es",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/fr.js version [98e4b645ee].





1
2
3
4
+
+
+
+
editArea.add_lang("fr",{
test_select:"choix balise",
test_but: "bouton de test"
});

Added applications/admin/static/edit_area/plugins/test/langs/hr.js version [7e1673a671].





1
2
3
4
+
+
+
+
editArea.add_lang("hr",{
test_select: "Odaberi tag",
test_but: "Probna tipka"
});

Added applications/admin/static/edit_area/plugins/test/langs/it.js version [a9642c6266].





1
2
3
4
+
+
+
+
editArea.add_lang("it",{
test_select: "seleziona tag",
test_but: "pulsante di test"
});

Added applications/admin/static/edit_area/plugins/test/langs/ja.js version [cb03182eac].





1
2
3
4
+
+
+
+
editArea.add_lang("ja",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/mk.js version [b491808366].





1
2
3
4
+
+
+
+
editArea.add_lang("mk",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/nl.js version [a5641089db].





1
2
3
4
+
+
+
+
editArea.add_lang("nl",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/pl.js version [d3bd3470e4].





1
2
3
4
+
+
+
+
editArea.add_lang("pl",{
test_select: "wybierz tag",
test_but: "test"
});

Added applications/admin/static/edit_area/plugins/test/langs/pt.js version [5cf4f799f0].





1
2
3
4
+
+
+
+
editArea.add_lang("pt",{
test_select: "select tag",
test_but: "test button"
});

Added applications/admin/static/edit_area/plugins/test/langs/ru.js version [5c8d634521].





1
2
3
4
+
+
+
+
editArea.add_lang("ru",{
test_select: "выбрать тэг",
test_but: "тестировать кнопку"
});

Added applications/admin/static/edit_area/plugins/test/langs/sk.js version [8a1b448fea].





1
2
3
4
+
+
+
+
editArea.add_lang("sk",{
test_select: "vyber tag",
test_but: "testovacie tlačidlo"
});

Added applications/admin/static/edit_area/plugins/test/langs/zh.js version [08015bbeaf].





1
2
3
4
+
+
+
+
editArea.add_lang("zh",{
test_select: "选择标签",
test_but: "测试按钮"
});

Added applications/admin/static/edit_area/plugins/test/test.js version [4636a7446d].















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
 * Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.
 * This plugin also disable the "f" key in the editarea, and load a CSS and a JS file
 */  
var EditArea_test= {
	/**
	 * Get called once this file is loaded (editArea still not initialized)
	 *
	 * @return nothing	 
	 */	 	 	
	init: function(){	
		//	alert("test init: "+ this._someInternalFunction(2, 3));
		editArea.load_css(this.baseURL+"css/test.css");
		editArea.load_script(this.baseURL+"test2.js");
	}
	/**
	 * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
	 * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
	 * Language variables such as {$lang_somekey} will also be replaced with contents from
	 * the language packs.
	 * 
	 * @param {string} ctrl_name: the name of the control to add	  
	 * @return HTML code for a specific control or false.
	 * @type string	or boolean
	 */	
	,get_control_html: function(ctrl_name){
		switch(ctrl_name){
			case "test_but":
				// Control id, button img, command
				return parent.editAreaLoader.get_button_html('test_but', 'test.gif', 'test_cmd', false, this.baseURL);
			case "test_select":
				html= "<select id='test_select' onchange='javascript:editArea.execCommand(\"test_select_change\")' fileSpecific='no'>"
					+"			<option value='-1'>{$test_select}</option>"
					+"			<option value='h1'>h1</option>"
					+"			<option value='h2'>h2</option>"
					+"			<option value='h3'>h3</option>"
					+"			<option value='h4'>h4</option>"
					+"			<option value='h5'>h5</option>"
					+"			<option value='h6'>h6</option>"
					+"		</select>";
				return html;
		}
		return false;
	}
	/**
	 * Get called once EditArea is fully loaded and initialised
	 *	 
	 * @return nothing
	 */	 	 	
	,onload: function(){ 
		alert("test load");
	}
	
	/**
	 * Is called each time the user touch a keyboard key.
	 *	 
	 * @param (event) e: the keydown event
	 * @return true - pass to next handler in chain, false - stop chain execution
	 * @type boolean	 
	 */
	,onkeydown: function(e){
		var str= String.fromCharCode(e.keyCode);
		// desactivate the "f" character
		if(str.toLowerCase()=="f"){
			return true;
		}
		return false;
	}
	
	/**
	 * Executes a specific command, this function handles plugin commands.
	 *
	 * @param {string} cmd: the name of the command being executed
	 * @param {unknown} param: the parameter of the command	 
	 * @return true - pass to next handler in chain, false - stop chain execution
	 * @type boolean	
	 */
	,execCommand: function(cmd, param){
		// Handle commands
		switch(cmd){
			case "test_select_change":
				var val= document.getElementById("test_select").value;
				if(val!=-1)
					parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", "</"+val+">");
				document.getElementById("test_select").options[0].selected=true; 
				return false;
			case "test_cmd":
				alert("user clicked on test_cmd");
				return false;
		}
		// Pass to next handler in chain
		return true;
	}
	
	/**
	 * This is just an internal plugin method, prefix all internal methods with a _ character.
	 * The prefix is needed so they doesn't collide with future EditArea callback functions.
	 *
	 * @param {string} a Some arg1.
	 * @param {string} b Some arg2.
	 * @return Some return.
	 * @type unknown
	 */
	,_someInternalFunction : function(a, b) {
		return a+b;
	}
};

// Adds the plugin class to the list of available EditArea plugins
editArea.add_plugin("test", EditArea_test);

Added applications/admin/static/edit_area/plugins/test/test2.js version [923e45e0e6].


1
+
alert("test2.js is loaded from test plugin");

Added applications/admin/static/edit_area/plugins/zencoding/core.js version [b1483b4949].





1
2
3
4
+
+
+
+
var zen_settings={"variables":{"lang":"en","locale":"en-US","charset":"UTF-8","profile":"xhtml","indentation":"\t"},"css":{"snippets":{"@i":"@import url(|);","@m":"@media print {\n\t|\n}","@f":"@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}","!":"!important","pos":"position:|;","pos:s":"position:static;","pos:a":"position:absolute;","pos:r":"position:relative;","pos:f":"position:fixed;","t":"top:|;","t:a":"top:auto;","r":"right:|;","r:a":"right:auto;","b":"bottom:|;","b:a":"bottom:auto;","l":"left:|;","l:a":"left:auto;","z":"z-index:|;","z:a":"z-index:auto;","fl":"float:|;","fl:n":"float:none;","fl:l":"float:left;","fl:r":"float:right;","cl":"clear:|;","cl:n":"clear:none;","cl:l":"clear:left;","cl:r":"clear:right;","cl:b":"clear:both;","d":"display:|;","d:n":"display:none;","d:b":"display:block;","d:ib":"display:inline;","d:li":"display:list-item;","d:ri":"display:run-in;","d:cp":"display:compact;","d:tb":"display:table;","d:itb":"display:inline-table;","d:tbcp":"display:table-caption;","d:tbcl":"display:table-column;","d:tbclg":"display:table-column-group;","d:tbhg":"display:table-header-group;","d:tbfg":"display:table-footer-group;","d:tbr":"display:table-row;","d:tbrg":"display:table-row-group;","d:tbc":"display:table-cell;","d:rb":"display:ruby;","d:rbb":"display:ruby-base;","d:rbbg":"display:ruby-base-group;","d:rbt":"display:ruby-text;","d:rbtg":"display:ruby-text-group;","v":"visibility:|;","v:v":"visibility:visible;","v:h":"visibility:hidden;","v:c":"visibility:collapse;","ov":"overflow:|;","ov:v":"overflow:visible;","ov:h":"overflow:hidden;","ov:s":"overflow:scroll;","ov:a":"overflow:auto;","ovx":"overflow-x:|;","ovx:v":"overflow-x:visible;","ovx:h":"overflow-x:hidden;","ovx:s":"overflow-x:scroll;","ovx:a":"overflow-x:auto;","ovy":"overflow-y:|;","ovy:v":"overflow-y:visible;","ovy:h":"overflow-y:hidden;","ovy:s":"overflow-y:scroll;","ovy:a":"overflow-y:auto;","ovs":"overflow-style:|;","ovs:a":"overflow-style:auto;","ovs:s":"overflow-style:scrollbar;","ovs:p":"overflow-style:panner;","ovs:m":"overflow-style:move;","ovs:mq":"overflow-style:marquee;","zoo":"zoom:1;","cp":"clip:|;","cp:a":"clip:auto;","cp:r":"clip:rect(|);","bxz":"box-sizing:|;","bxz:cb":"box-sizing:content-box;","bxz:bb":"box-sizing:border-box;","bxsh":"box-shadow:|;","bxsh:n":"box-shadow:none;","bxsh:w":"-webkit-box-shadow:0 0 0 #000;","bxsh:m":"-moz-box-shadow:0 0 0 0 #000;","m":"margin:|;","m:a":"margin:auto;","m:0":"margin:0;","m:2":"margin:0 0;","m:3":"margin:0 0 0;","m:4":"margin:0 0 0 0;","mt":"margin-top:|;","mt:a":"margin-top:auto;","mr":"margin-right:|;","mr:a":"margin-right:auto;","mb":"margin-bottom:|;","mb:a":"margin-bottom:auto;","ml":"margin-left:|;","ml:a":"margin-left:auto;","p":"padding:|;","p:0":"padding:0;","p:2":"padding:0 0;","p:3":"padding:0 0 0;","p:4":"padding:0 0 0 0;","pt":"padding-top:|;","pr":"padding-right:|;","pb":"padding-bottom:|;","pl":"padding-left:|;","w":"width:|;","w:a":"width:auto;","h":"height:|;","h:a":"height:auto;","maw":"max-width:|;","maw:n":"max-width:none;","mah":"max-height:|;","mah:n":"max-height:none;","miw":"min-width:|;","mih":"min-height:|;","o":"outline:|;","o:n":"outline:none;","oo":"outline-offset:|;","ow":"outline-width:|;","os":"outline-style:|;","oc":"outline-color:#000;","oc:i":"outline-color:invert;","bd":"border:|;","bd+":"border:1px solid #000;","bd:n":"border:none;","bdbk":"border-break:|;","bdbk:c":"border-break:close;","bdcl":"border-collapse:|;","bdcl:c":"border-collapse:collapse;","bdcl:s":"border-collapse:separate;","bdc":"border-color:#000;","bdi":"border-image:url(|);","bdi:n":"border-image:none;","bdi:w":"-webkit-border-image:url(|) 0 0 0 0 stretch stretch;","bdi:m":"-moz-border-image:url(|) 0 0 0 0 stretch stretch;","bdti":"border-top-image:url(|);","bdti:n":"border-top-image:none;","bdri":"border-right-image:url(|);","bdri:n":"border-right-image:none;","bdbi":"border-bottom-image:url(|);","bdbi:n":"border-bottom-image:none;","bdli":"border-left-image:url(|);","bdli:n":"border-left-image:none;","bdci":"border-corner-image:url(|);","bdci:n":"border-corner-image:none;","bdci:c":"border-corner-image:continue;","bdtli":"border-top-left-image:url(|);","bdtli:n":"border-top-left-image:none;","bdtli:c":"border-top-left-image:continue;","bdtri":"border-top-right-image:url(|);","bdtri:n":"border-top-right-image:none;","bdtri:c":"border-top-right-image:continue;","bdbri":"border-bottom-right-image:url(|);","bdbri:n":"border-bottom-right-image:none;","bdbri:c":"border-bottom-right-image:continue;","bdbli":"border-bottom-left-image:url(|);","bdbli:n":"border-bottom-left-image:none;","bdbli:c":"border-bottom-left-image:continue;","bdf":"border-fit:|;","bdf:c":"border-fit:clip;","bdf:r":"border-fit:repeat;","bdf:sc":"border-fit:scale;","bdf:st":"border-fit:stretch;","bdf:ow":"border-fit:overwrite;","bdf:of":"border-fit:overflow;","bdf:sp":"border-fit:space;","bdl":"border-length:|;","bdl:a":"border-length:auto;","bdsp":"border-spacing:|;","bds":"border-style:|;","bds:n":"border-style:none;","bds:h":"border-style:hidden;","bds:dt":"border-style:dotted;","bds:ds":"border-style:dashed;","bds:s":"border-style:solid;","bds:db":"border-style:double;","bds:dtds":"border-style:dot-dash;","bds:dtdtds":"border-style:dot-dot-dash;","bds:w":"border-style:wave;","bds:g":"border-style:groove;","bds:r":"border-style:ridge;","bds:i":"border-style:inset;","bds:o":"border-style:outset;","bdw":"border-width:|;","bdt":"border-top:|;","bdt+":"border-top:1px solid #000;","bdt:n":"border-top:none;","bdtw":"border-top-width:|;","bdts":"border-top-style:|;","bdts:n":"border-top-style:none;","bdtc":"border-top-color:#000;","bdr":"border-right:|;","bdr+":"border-right:1px solid #000;","bdr:n":"border-right:none;","bdrw":"border-right-width:|;","bdrs":"border-right-style:|;","bdrs:n":"border-right-style:none;","bdrc":"border-right-color:#000;","bdb":"border-bottom:|;","bdb+":"border-bottom:1px solid #000;","bdb:n":"border-bottom:none;","bdbw":"border-bottom-width:|;","bdbs":"border-bottom-style:|;","bdbs:n":"border-bottom-style:none;","bdbc":"border-bottom-color:#000;","bdl":"border-left:|;","bdl+":"border-left:1px solid #000;","bdl:n":"border-left:none;","bdlw":"border-left-width:|;","bdls":"border-left-style:|;","bdls:n":"border-left-style:none;","bdlc":"border-left-color:#000;","bdrs":"border-radius:|;","bdtrrs":"border-top-right-radius:|;","bdtlrs":"border-top-left-radius:|;","bdbrrs":"border-bottom-right-radius:|;","bdblrs":"border-bottom-left-radius:|;","bg":"background:|;","bg+":"background:#FFF url(|) 0 0 no-repeat;","bg:n":"background:none;","bg:ie":"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='|x.png');","bgc":"background-color:#FFF;","bgi":"background-image:url(|);","bgi:n":"background-image:none;","bgr":"background-repeat:|;","bgr:n":"background-repeat:no-repeat;","bgr:x":"background-repeat:repeat-x;","bgr:y":"background-repeat:repeat-y;","bga":"background-attachment:|;","bga:f":"background-attachment:fixed;","bga:s":"background-attachment:scroll;","bgp":"background-position:0 0;","bgpx":"background-position-x:|;","bgpy":"background-position-y:|;","bgbk":"background-break:|;","bgbk:bb":"background-break:bounding-box;","bgbk:eb":"background-break:each-box;","bgbk:c":"background-break:continuous;","bgcp":"background-clip:|;","bgcp:bb":"background-clip:border-box;","bgcp:pb":"background-clip:padding-box;","bgcp:cb":"background-clip:content-box;","bgcp:nc":"background-clip:no-clip;","bgo":"background-origin:|;","bgo:pb":"background-origin:padding-box;","bgo:bb":"background-origin:border-box;","bgo:cb":"background-origin:content-box;","bgz":"background-size:|;","bgz:a":"background-size:auto;","bgz:ct":"background-size:contain;","bgz:cv":"background-size:cover;","c":"color:#000;","tbl":"table-layout:|;","tbl:a":"table-layout:auto;","tbl:f":"table-layout:fixed;","cps":"caption-side:|;","cps:t":"caption-side:top;","cps:b":"caption-side:bottom;","ec":"empty-cells:|;","ec:s":"empty-cells:show;","ec:h":"empty-cells:hide;","lis":"list-style:|;","lis:n":"list-style:none;","lisp":"list-style-position:|;","lisp:i":"list-style-position:inside;","lisp:o":"list-style-position:outside;","list":"list-style-type:|;","list:n":"list-style-type:none;","list:d":"list-style-type:disc;","list:c":"list-style-type:circle;","list:s":"list-style-type:square;","list:dc":"list-style-type:decimal;","list:dclz":"list-style-type:decimal-leading-zero;","list:lr":"list-style-type:lower-roman;","list:ur":"list-style-type:upper-roman;","lisi":"list-style-image:|;","lisi:n":"list-style-image:none;","q":"quotes:|;","q:n":"quotes:none;","q:ru":"quotes:'\00AB' '\00BB' '\201E' '\201C';","q:en":"quotes:'\201C' '\201D' '\2018' '\2019';","ct":"content:|;","ct:n":"content:normal;","ct:oq":"content:open-quote;","ct:noq":"content:no-open-quote;","ct:cq":"content:close-quote;","ct:ncq":"content:no-close-quote;","ct:a":"content:attr(|);","ct:c":"content:counter(|);","ct:cs":"content:counters(|);","coi":"counter-increment:|;","cor":"counter-reset:|;","va":"vertical-align:|;","va:sup":"vertical-align:super;","va:t":"vertical-align:top;","va:tt":"vertical-align:text-top;","va:m":"vertical-align:middle;","va:bl":"vertical-align:baseline;","va:b":"vertical-align:bottom;","va:tb":"vertical-align:text-bottom;","va:sub":"vertical-align:sub;","ta":"text-align:|;","ta:l":"text-align:left;","ta:c":"text-align:center;","ta:r":"text-align:right;","tal":"text-align-last:|;","tal:a":"text-align-last:auto;","tal:l":"text-align-last:left;","tal:c":"text-align-last:center;","tal:r":"text-align-last:right;","td":"text-decoration:|;","td:n":"text-decoration:none;","td:u":"text-decoration:underline;","td:o":"text-decoration:overline;","td:l":"text-decoration:line-through;","te":"text-emphasis:|;","te:n":"text-emphasis:none;","te:ac":"text-emphasis:accent;","te:dt":"text-emphasis:dot;","te:c":"text-emphasis:circle;","te:ds":"text-emphasis:disc;","te:b":"text-emphasis:before;","te:a":"text-emphasis:after;","th":"text-height:|;","th:a":"text-height:auto;","th:f":"text-height:font-size;","th:t":"text-height:text-size;","th:m":"text-height:max-size;","ti":"text-indent:|;","ti:-":"text-indent:-9999px;","tj":"text-justify:|;","tj:a":"text-justify:auto;","tj:iw":"text-justify:inter-word;","tj:ii":"text-justify:inter-ideograph;","tj:ic":"text-justify:inter-cluster;","tj:d":"text-justify:distribute;","tj:k":"text-justify:kashida;","tj:t":"text-justify:tibetan;","to":"text-outline:|;","to+":"text-outline:0 0 #000;","to:n":"text-outline:none;","tr":"text-replace:|;","tr:n":"text-replace:none;","tt":"text-transform:|;","tt:n":"text-transform:none;","tt:c":"text-transform:capitalize;","tt:u":"text-transform:uppercase;","tt:l":"text-transform:lowercase;","tw":"text-wrap:|;","tw:n":"text-wrap:normal;","tw:no":"text-wrap:none;","tw:u":"text-wrap:unrestricted;","tw:s":"text-wrap:suppress;","tsh":"text-shadow:|;","tsh+":"text-shadow:0 0 0 #000;","tsh:n":"text-shadow:none;","lh":"line-height:|;","whs":"white-space:|;","whs:n":"white-space:normal;","whs:p":"white-space:pre;","whs:nw":"white-space:nowrap;","whs:pw":"white-space:pre-wrap;","whs:pl":"white-space:pre-line;","whsc":"white-space-collapse:|;","whsc:n":"white-space-collapse:normal;","whsc:k":"white-space-collapse:keep-all;","whsc:l":"white-space-collapse:loose;","whsc:bs":"white-space-collapse:break-strict;","whsc:ba":"white-space-collapse:break-all;","wob":"word-break:|;","wob:n":"word-break:normal;","wob:k":"word-break:keep-all;","wob:l":"word-break:loose;","wob:bs":"word-break:break-strict;","wob:ba":"word-break:break-all;","wos":"word-spacing:|;","wow":"word-wrap:|;","wow:nm":"word-wrap:normal;","wow:n":"word-wrap:none;","wow:u":"word-wrap:unrestricted;","wow:s":"word-wrap:suppress;","lts":"letter-spacing:|;","f":"font:|;","f+":"font:1em Arial,sans-serif;","fw":"font-weight:|;","fw:n":"font-weight:normal;","fw:b":"font-weight:bold;","fw:br":"font-weight:bolder;","fw:lr":"font-weight:lighter;","fs":"font-style:|;","fs:n":"font-style:normal;","fs:i":"font-style:italic;","fs:o":"font-style:oblique;","fv":"font-variant:|;","fv:n":"font-variant:normal;","fv:sc":"font-variant:small-caps;","fz":"font-size:|;","fza":"font-size-adjust:|;","fza:n":"font-size-adjust:none;","ff":"font-family:|;","ff:s":"font-family:serif;","ff:ss":"font-family:sans-serif;","ff:c":"font-family:cursive;","ff:f":"font-family:fantasy;","ff:m":"font-family:monospace;","fef":"font-effect:|;","fef:n":"font-effect:none;","fef:eg":"font-effect:engrave;","fef:eb":"font-effect:emboss;","fef:o":"font-effect:outline;","fem":"font-emphasize:|;","femp":"font-emphasize-position:|;","femp:b":"font-emphasize-position:before;","femp:a":"font-emphasize-position:after;","fems":"font-emphasize-style:|;","fems:n":"font-emphasize-style:none;","fems:ac":"font-emphasize-style:accent;","fems:dt":"font-emphasize-style:dot;","fems:c":"font-emphasize-style:circle;","fems:ds":"font-emphasize-style:disc;","fsm":"font-smooth:|;","fsm:a":"font-smooth:auto;","fsm:n":"font-smooth:never;","fsm:aw":"font-smooth:always;","fst":"font-stretch:|;","fst:n":"font-stretch:normal;","fst:uc":"font-stretch:ultra-condensed;","fst:ec":"font-stretch:extra-condensed;","fst:c":"font-stretch:condensed;","fst:sc":"font-stretch:semi-condensed;","fst:se":"font-stretch:semi-expanded;","fst:e":"font-stretch:expanded;","fst:ee":"font-stretch:extra-expanded;","fst:ue":"font-stretch:ultra-expanded;","op":"opacity:|;","op:ie":"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);","op:ms":"-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';","rz":"resize:|;","rz:n":"resize:none;","rz:b":"resize:both;","rz:h":"resize:horizontal;","rz:v":"resize:vertical;","cur":"cursor:|;","cur:a":"cursor:auto;","cur:d":"cursor:default;","cur:c":"cursor:crosshair;","cur:ha":"cursor:hand;","cur:he":"cursor:help;","cur:m":"cursor:move;","cur:p":"cursor:pointer;","cur:t":"cursor:text;","pgbb":"page-break-before:|;","pgbb:au":"page-break-before:auto;","pgbb:al":"page-break-before:always;","pgbb:l":"page-break-before:left;","pgbb:r":"page-break-before:right;","pgbi":"page-break-inside:|;","pgbi:au":"page-break-inside:auto;","pgbi:av":"page-break-inside:avoid;","pgba":"page-break-after:|;","pgba:au":"page-break-after:auto;","pgba:al":"page-break-after:always;","pgba:l":"page-break-after:left;","pgba:r":"page-break-after:right;","orp":"orphans:|;","wid":"widows:|;"}},"html":{"snippets":{"cc:ie6":"<!--[if lte IE 6]>\n\t${child}|\n<![endif]-->","cc:ie":"<!--[if IE]>\n\t${child}|\n<![endif]-->","cc:noie":"<!--[if !IE]><!-->\n\t${child}|\n<!--<![endif]-->","html:4t":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'+'<html lang="${lang}">\n'+"<head>\n"+"	<title></title>\n"+'	<meta http-equiv="Content-Type" content="text/html;charset=${charset}">\n'+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:4s":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n'+'<html lang="${lang}">\n'+"<head>\n"+"	<title></title>\n"+'	<meta http-equiv="Content-Type" content="text/html;charset=${charset}">\n'+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:xt":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n'+"<head>\n"+"	<title></title>\n"+'	<meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n'+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:xs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n'+"<head>\n"+"	<title></title>\n"+'	<meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n'+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:xxs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n'+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n'+"<head>\n"+"	<title></title>\n"+'	<meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n'+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:5":"<!DOCTYPE HTML>\n"+'<html lang="${locale}">\n'+"<head>\n"+"	<title></title>\n"+'	<meta charset="${charset}">\n'+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>"},"abbreviations":{"a":'<a href=""></a>',"a:link":'<a href="http://|"></a>',"a:mail":'<a href="mailto:|"></a>',"abbr":'<abbr title=""></abbr>',"acronym":'<acronym title=""></acronym>',"base":'<base href="" />',"bdo":'<bdo dir=""></bdo>',"bdo:r":'<bdo dir="rtl"></bdo>',"bdo:l":'<bdo dir="ltr"></bdo>',"link:css":'<link rel="stylesheet" type="text/css" href="|style.css" media="all" />',"link:print":'<link rel="stylesheet" type="text/css" href="|print.css" media="print" />',"link:favicon":'<link rel="shortcut icon" type="image/x-icon" href="|favicon.ico" />',"link:touch":'<link rel="apple-touch-icon" href="|favicon.png" />',"link:rss":'<link rel="alternate" type="application/rss+xml" title="RSS" href="|rss.xml" />',"link:atom":'<link rel="alternate" type="application/atom+xml" title="Atom" href="atom.xml" />',"meta:utf":'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />',"meta:win":'<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />',"meta:compat":'<meta http-equiv="X-UA-Compatible" content="IE=7" />',"style":'<style type="text/css"></style>',"script":'<script type="text/javascript"><\/script>',"script:src":'<script type="text/javascript" src=""><\/script>',"img":'<img src="" alt="" />',"iframe":'<iframe src="" frameborder="0"></iframe>',"embed":'<embed src="" type="" />',"object":'<object data="" type=""></object>',"param":'<param name="" value="" />',"map":'<map name=""></map>',"area":'<area shape="" coords="" href="" alt="" />',"area:d":'<area shape="default" href="" alt="" />',"area:c":'<area shape="circle" coords="" href="" alt="" />',"area:r":'<area shape="rect" coords="" href="" alt="" />',"area:p":'<area shape="poly" coords="" href="" alt="" />',"link":'<link rel="stylesheet" href="" />',"form":'<form action=""></form>',"form:get":'<form action="" method="get"></form>',"form:post":'<form action="" method="post"></form>',"label":'<label for=""></label>',"input":'<input type="" />',"input:hidden":'<input type="hidden" name="" />',"input:h":'<input type="hidden" name="" />',"input:text":'<input type="text" name="" id="" />',"input:t":'<input type="text" name="" id="" />',"input:search":'<input type="search" name="" id="" />',"input:email":'<input type="email" name="" id="" />',"input:url":'<input type="url" name="" id="" />',"input:password":'<input type="password" name="" id="" />',"input:p":'<input type="password" name="" id="" />',"input:datetime":'<input type="datetime" name="" id="" />',"input:date":'<input type="date" name="" id="" />',"input:datetime-local":'<input type="datetime-local" name="" id="" />',"input:month":'<input type="month" name="" id="" />',"input:week":'<input type="week" name="" id="" />',"input:time":'<input type="time" name="" id="" />',"input:number":'<input type="number" name="" id="" />',"input:color":'<input type="color" name="" id="" />',"input:checkbox":'<input type="checkbox" name="" id="" />',"input:c":'<input type="checkbox" name="" id="" />',"input:radio":'<input type="radio" name="" id="" />',"input:r":'<input type="radio" name="" id="" />',"input:range":'<input type="range" name="" id="" />',"input:file":'<input type="file" name="" id="" />',"input:f":'<input type="file" name="" id="" />',"input:submit":'<input type="submit" value="" />',"input:s":'<input type="submit" value="" />',"input:image":'<input type="image" src="" alt="" />',"input:i":'<input type="image" src="" alt="" />',"input:reset":'<input type="reset" value="" />',"input:button":'<input type="button" value="" />',"input:b":'<input type="button" value="" />',"select":'<select name="" id=""></select>',"option":'<option value=""></option>',"textarea":'<textarea name="" id="" cols="30" rows="10"></textarea>',"menu:context":'<menu type="context"></menu>',"menu:c":'<menu type="context"></menu>',"menu:toolbar":'<menu type="toolbar"></menu>',"menu:t":'<menu type="toolbar"></menu>',"video":'<video src=""></video>',"audio":'<audio src=""></audio>',"html:xml":'<html xmlns="http://www.w3.org/1999/xhtml"></html>',"bq":"<blockquote></blockquote>","acr":"<acronym></acronym>","fig":"<figure></figure>","ifr":"<iframe></iframe>","emb":"<embed></embed>","obj":"<object></object>","src":"<source></source>","cap":"<caption></caption>","colg":"<colgroup></colgroup>","fst":"<fieldset></fieldset>","btn":"<button></button>","optg":"<optgroup></optgroup>","opt":"<option></option>","tarea":"<textarea></textarea>","leg":"<legend></legend>","sect":"<section></section>","art":"<article></article>","hdr":"<header></header>","ftr":"<footer></footer>","adr":"<address></address>","dlg":"<dialog></dialog>","str":"<strong></strong>","prog":"<progress></progress>","fset":"<fieldset></fieldset>","datag":"<datagrid></datagrid>","datal":"<datalist></datalist>","kg":"<keygen></keygen>","out":"<output></output>","det":"<details></details>","cmd":"<command></command>","ol+":"ol>li","ul+":"ul>li","dl+":"dl>dt+dd","map+":"map>area","table+":"table>tr>td","colgroup+":"colgroup>col","colg+":"colgroup>col","tr+":"tr>td","select+":"select>option","optgroup+":"optgroup>option","optg+":"optgroup>option"},"element_types":{"empty":"area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command","block_level":"address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6","inline_level":"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"}},"xsl":{"extends":"html","abbreviations":{"tm":'<xsl:template match="" mode=""></xsl:template>',"tmatch":"tm","tn":'<xsl:template name=""></xsl:template>',"tname":"tn","xsl:when":'<xsl:when test=""></xsl:when>',"wh":"xsl:when","var":'<xsl:variable name="">|</xsl:variable>',"vare":'<xsl:variable name="" select=""/>',"if":'<xsl:if test=""></xsl:if>',"call":'<xsl:call-template name=""/>',"attr":'<xsl:attribute name=""></xsl:attribute>',"wp":'<xsl:with-param name="" select=""/>',"par":'<xsl:param name="" select=""/>',"val":'<xsl:value-of select=""/>',"co":'<xsl:copy-of select=""/>',"each":'<xsl:for-each select=""></xsl:for-each>',"ap":'<xsl:apply-templates select="" mode=""/>',"choose+":"xsl:choose>xsl:when+xsl:otherwise"}}};
var zen_coding=(function(){var l=/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/;var r="zen-tag",n="zen-expando",w="zen-reference",q="{%::zen-content::%}";var v={tag_case:"lower",attr_case:"lower",attr_quotes:"double",tag_nl:"decide",place_cursor:true,indent:true,self_closing_tag:"xhtml"};var k={};function g(A){var z=A.charCodeAt(0),y="#.>+*:$-_!@";return(z>64&&z<91)||(z>96&&z<123)||(z>47&&z<58)||y.indexOf(A)!=-1;}function j(){return zen_coding.getNewline();}function f(C,B){var z=j(),y=C.split(new RegExp("\\r?\\n|\\n\\r|\\r|"+z));if(B){for(var A=y.length;A>=0;A--){if(!t(y[A])){y.splice(A,1);}}}return y;}function t(y){return(y||"").replace(/^\s+|\s+$/g,"");}function s(z){var y={};for(var A in v){y[A]=(A in z)?z[A]:v[A];}return y;}function b(z,y){k[z.toLowerCase()]=s(y||{});}function u(B){var A={},y=B.split(",");for(var z=0;z<y.length;z++){A[y[z]]=true;}return A;}function x(E,z,A){var D="",G="";if(typeof(z)=="number"){for(var C=0;C<z;C++){D+=zen_settings.variables.indentation;}}else{D=z;}var F=f(E),y=j();G+=F[0];for(var B=1;B<F.length;B++){G+=y+D+F[B];}return G;}function c(y,z){return p(z,y)?true:false;}function o(y){return l.test(y);}function a(z,y){if(z&&z.element_types){return z.element_types[y]||{};}else{return{};}}function e(z,y){y=y||zen_settings.variables;return z.replace(/\$\{([\w\-]+)\}/g,function(B,A){return(A in y)?y[A]:B;});}function h(A,E,D){A=A.toLowerCase();D=D||"html";var z=i(D,A);if(z&&z.type==w){z=i(D,z.value);}this.name=(z)?z.value.name:A;this.count=E||1;this.children=[];this.attributes=[];this._attr_hash={};this._abbr=z;this._res=zen_settings[D];this._content="";this.repeat_by_lines=false;if(this._abbr&&this._abbr.value.attributes){var C=this._abbr.value.attributes;if(C){for(var B=0;B<C.length;B++){var y=C[B];this.addAttribute(y.name,y.value);}}}}h.prototype={addChild:function(y){this.children.push(y);},addAttribute:function(z,A){var y;if(z in this._attr_hash){y=this._attr_hash[z];if(z=="class"){y.value+=((y.value)?" ":"")+A;}else{y.value=A;}}else{y={name:z,value:A};this._attr_hash[z]=y;this.attributes.push(y);}},isEmpty:function(){return(this._abbr&&this._abbr.value.is_empty)||(this.name in a(this._res,"empty"));},isInline:function(){return(this.name in a(this._res,"inline_level"));},isBlock:function(){return(this.name in a(this._res,"block_level"));},hasTagsInContent:function(){return this.getContent()&&l.test(this.getContent());},hasBlockChildren:function(){if(this.hasTagsInContent()&&this.isBlock()){return true;}for(var y=0;y<this.children.length;y++){if(this.children[y].isBlock()){return true;}}return false;},setContent:function(y){this._content=y;},getContent:function(){return this._content;},findDeepestChild:function(){if(!this.children.length){return null;}var y=this;while(true){y=y.children[y.children.length-1];if(!y.children.length){break;}}return y;},toString:function(D){var E=[],A=(D in k)?k[D]:k["plain"],H="",J="",z="",O="",B=A.place_cursor?"|":"",G="",T=A.attr_quotes=="single"?"'":'"',I;if(A.self_closing_tag=="xhtml"){G=" /";}else{if(A.self_closing_tag===true){G="/";}}function F(U){return(A.tag_nl===true||(A.tag_nl=="decide"&&U.isBlock()));}for(var M=0;M<this.attributes.length;M++){var S=this.attributes[M];I=(A.attr_case=="upper")?S.name.toUpperCase():S.name.toLowerCase();H+=" "+I+"="+T+(S.value||B)+T;}var N=this.findDeepestChild();if(!this.isEmpty()){if(N&&this.repeat_by_lines){N.setContent(q);}for(var K=0;K<this.children.length;K++){J+=this.children[K].toString(D);if((K!=this.children.length-1)&&(F(this.children[K])||F(this.children[K+1]))){J+=j();}}}if(this.name){var Q=(A.tag_case=="upper")?this.name.toUpperCase():this.name.toLowerCase();if(this.isEmpty()){z="<"+Q+H+G+">";}else{z="<"+Q+H+">";O="</"+Q+">";}}if(A.tag_nl!==false){if(this.name&&(A.tag_nl===true||this.hasBlockChildren())){if(O){z+=j()+zen_settings.variables.indentation;O=j()+O;}else{}}if(this.name){if(J){J=x(J,A.indent?1:0);}else{if(!this.isEmpty()){z+=B;}}}}var R="";if(this.repeat_by_lines){var y=f(t(this.getContent()),true);for(var K=0;K<y.length;K++){R=N?"":q;if(J&&!N){R+=j();}var C=z.replace(/\$/g,K+1)+R+J+O;E.push(C.replace(q,t(y[K])));}}if(!E.length){if(this.getContent()){var P=(A.tag_nl===true||(this.hasTagsInContent()&&this.isBlock()))?1:0;J=x(this.getContent(),P)+J;}for(var M=0;M<this.count;M++){E.push(z.replace(/\$/g,M+1)+J+O);}}var L="";if(F(this)){L=j();}return E.join(L);}};function m(y,A,z){this.name=y;this.count=A||1;this.children=[];this._content="";this.repeat_by_lines=false;this.attributes={"id":"|","class":"|"};this.value=p(z,y);}m.prototype={addChild:function(y){this.children.push(y);},addAttribute:function(y,z){this.attributes[y]=z;},isBlock:function(){return true;},setContent:function(y){this._content=y;},getContent:function(){return this._content;},findDeepestChild:function(){if(!this.children.length){return null;}var y=this;while(true){y=y.children[y.children.length-1];if(!y.children.length){break;}}return y;},toString:function(I){var J="",B=(I in k)?k[I]:k["plain"],M=[],G=this.value,z="",C="",K="",H="${child}";
if(G){if(B.tag_nl!==false){var y=j();G=G.replace(/\n/g,y);var L=G.split(y),A;for(var E=0;E<L.length;E++){if(L[E].indexOf(H)!=-1){K=(A=L[E].match(/(^\s+)/))?A[1]:"";break;}}}var D=G.split(H);z=D[0]||"";C=D[1]||"";}for(var F=0;F<this.children.length;F++){J+=this.children[F].toString(I);if(F!=this.children.length-1&&(B.tag_nl===true||(B.tag_nl=="decide"&&this.children[F].isBlock()))){J+=j();}}if(K){J=x(J,K);}z=e(z,this.attributes);C=e(C,this.attributes);if(this.getContent()){J=x(this.getContent(),1)+J;}for(var F=0;F<this.count;F++){M.push(z+J+C);}return M.join((B.tag_nl!==false)?j():"");}};function i(z,y){return d(z,y,"abbreviations");}function p(z,y){return d(z,y,"snippets");}function d(A,y,C){var B=zen_settings[A];if(B){if(C in B&&y in B[C]){return B[C][y];}else{if("extends" in B){for(var z=0;z<B["extends"].length;z++){var A=B["extends"][z];if(zen_settings[A]&&zen_settings[A][C]&&zen_settings[A][C][y]){return zen_settings[A][C][y];}}}}}return null;}b("xhtml");b("html",{self_closing_tag:false});b("xml",{self_closing_tag:true,tag_nl:true});b("plain",{tag_nl:false,indent:false,place_cursor:false});return{expandAbbreviation:function(z,B,A){var y=this.parseIntoTree(z,B||"html");return e(y?y.toString(A):"");},extractAbbreviation:function(B){var z=B.length,y=-1;while(true){z--;if(z<0){y=0;break;}var A=B.charAt(z);if(!g(A)||(A==">"&&o(B.substring(0,z+1)))){y=z+1;break;}}if(y!=-1){return B.substring(y);}else{return"";}},parseIntoTree:function(z,D){D=D||"html";var y=new h("",1,D),C=y,E=null,F=null,A=zen_settings[D],B=/([\+>])?([a-z@\!][a-z0-9:\-]*)(#[\w\-\$]+)?((?:\.[\w\-\$]+)*)(\*(\d*))?/ig;if(!z){return null;}z=z.replace(/([a-z][\w\:\-]*)\+$/i,function(H){var G=i(D,H);return G?G.value:H;});z=z.replace(B,function(L,I,H,G,J,N,O){var M=(N&&!O);O=O?parseInt(O):1;var K=c(H,D)?new m(H,O,D):new h(H,O,D);if(G){K.addAttribute("id",G.substr(1));}if(J){K.addAttribute("class",J.substr(1).replace(/\./g," "));}if(I==">"&&E){C=E;}C.addChild(K);E=K;if(M){F=K;}return"";});y.last=E;y.multiply_elem=F;return(!z)?y:null;},padString:x,setupProfile:b,getNewline:function(){return"\n";},getPairRange:function(C,A){var B={},z=[],y=null;function F(H,G){return A>H&&A<G;}var D={start:function(J,I,G,K,H){if(G&&F(K,H)){y={start:K,end:H};this.stop=true;}else{if(!B.hasOwnProperty(J)){B[J]=[];}B[J].push(K);}},end:function(H,I,G){if(B.hasOwnProperty(H)){var J=B[H].pop();if(F(J,G)){z.push({start:J,end:G});}}},comment:function(H,I,G){if(F(I,G)){y={start:I,end:G};this.stop=true;}}};try{HTMLParser(C,D);}catch(E){}if(!y&&z.length){y=z.sort(function(H,G){return(H.end-H.start)-(G.end-G.start);})[0];}return y;},wrapWithAbbreviation:function(z,D,C,B){var y=this.parseIntoTree(z,C||"html");if(y){var A=y.multiply_elem||y.last;A.setContent(D);A.repeat_by_lines=!!y.multiply_elem;return y.toString(B);}else{return null;}},splitByLines:f,isInsideTag:function(B,A){var z=/^<\/?\w[\w\:\-]*.*?>/;var C=A;while(C>-1){if(B.charAt(C)=="<"){break;}C--;}if(C!=-1){var y=z.exec(B.substring(C));if(y&&A>C&&A<C+y[0].length){return true;}}return false;},settings_parser:(function(){function z(F,E,G){return{type:F,key:E,value:G};}var y=/^<(\w+\:?[\w\-]*)((?:\s+[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,D=/([\w\-]+)\s*=\s*(['"])(.*?)\2/g;function A(E,F){return z(n,E,F);}function C(I,J,H,G){var F={name:J,is_empty:Boolean(G)};if(H){var E;F.attributes=[];while(E=D.exec(H)){F.attributes.push({name:E[1],value:E[3]});}}return z(r,I,F);}function B(H){for(var F in H){var G=H[F],E;F=t(F);if(F.substr(-1)=="+"){H[F]=A(F,G);}else{if(E=y.exec(G)){H[F]=C(F,E[1],E[2],E[4]=="/");}else{H[F]=z(w,F,G);}}}}return{parse:function(G){for(var H in G){if(H=="abbreviations"){B(G[H]);}else{if(H=="extends"){var E=G[H].split(",");for(var F=0;F<E.length;F++){E[F]=t(E[F]);}G[H]=E;}else{if(typeof(G[H])=="object"){arguments.callee(G[H]);}}}}},extend:function(E,G){for(var F in G){if(typeof(G[F])=="object"&&E.hasOwnProperty(F)){arguments.callee(E[F],G[F]);}else{E[F]=G[F];}}},createMaps:function(G){for(var F in G){if(F=="element_types"){for(var E in G[F]){G[F][E]=u(G[F][E]);}}else{if(typeof(G[F])=="object"){arguments.callee(G[F]);}}}},TYPE_ABBREVIATION:r,TYPE_EXPANDO:n,TYPE_REFERENCE:w};})()};})();if("zen_settings" in this){zen_coding.settings_parser.createMaps(zen_settings);if("my_zen_settings" in this){zen_coding.settings_parser.createMaps(my_zen_settings);zen_coding.settings_parser.extend(zen_settings,my_zen_settings);}zen_coding.settings_parser.parse(zen_settings);}(function(){var k=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,a=/^<\/([\w\:\-]+)[^>]*>/,f=/([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;var e=c("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");var b=c("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");var g=c("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
var h=c("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");function l(o,m){var n=o[1].toLowerCase();return{name:n,full_tag:o[0],start:m,end:m+o[0].length,unary:Boolean(o[3])||(n in e),type:"tag",close_self:(n in h)};}function d(n,m){return{start:n,end:m,type:"comment"};}var j=this.HTMLPairMatcher=function(s,w){var z=[],v=[],C=null,y=null,t=null,B=s.length,q,p,x;z.last=v.last=function(){return this[this.length-1];};function u(m,D){if(arguments.length==1){D=p;}return s.substr(D,m.length)==m;}function r(m){while(m--){if(s.charAt(m)=="<"&&u("<!--",m)){break;}}return m;}p=w;while(p--&&p>=0){var n=s.charAt(p);if(n=="<"){var A=s.substring(p,B);if((q=A.match(a))){x=l(q,p);if(x.start<w&&x.end>w){y=x;}else{v.push(x);}}else{if((q=A.match(k))){x=l(q,p);if(x.unary){if(x.start<w&&x.end>w){return i(x,null,w);}}else{if(v.last()&&v.last().name==x.name){v.pop();}else{C=x;break;}}}else{if(A.indexOf("<!--")==0){var o=A.search("-->")+p+3;if(p<w&&o>=w){return i(d(p,o));}}}}}else{if(n=="-"&&u("-->")){p=r(p);}}}if(!C){return i(null);}if(!y){for(p=w;p<B;p++){var n=s.charAt(p);if(n=="<"){var A=s.substring(p,B);if((q=A.match(k))){x=l(q,p);if(!x.unary){z.push(x);}}else{if((q=A.match(a))){var x=l(q,p);if(z.last()&&z.last().name==x.name){z.pop();}else{y=x;break;}}else{if(u("<!--")){p+=A.search("-->")+3;}}}}else{if(n=="-"&&u("-->")){if(!z.last()||z.last().type!="comment"){var o=p+3;return i(d(r(p),o));}}}}}return i(C,y,w);};j.start_tag=k;j.end_tag=a;j.last_match={opening_tag:null,closing_tag:null,start_ix:-1,end_ix:-1};function i(n,p,m){var o=j.last_match;o.opening_tag=n;o.closing_tag=p;if(n&&!p){o.start_ix=n.start;o.end_ix=n.end;}else{if(n&&p){if((n.start<m&&n.end>m)||(p.start<=m&&p.end>m)){o.start_ix=n.start;o.end_ix=p.end;}else{o.start_ix=n.end;o.end_ix=p.start;}}else{o.start_ix=o.end_ix=-1;}}return o.start_ix!=-1?[o.start_ix,o.end_ix]:null;}function c(p){var o={},m=p.split(",");for(var n=0;n<m.length;n++){o[m[n]]=true;}return o;}})();

Added applications/admin/static/edit_area/plugins/zencoding/langs/en.js version [50f08dd62c].





1
2
3
4
+
+
+
+
/**
 * @author Sergey Chikuyonok (serge.che@gmail.com)
 * @link http://chikuyonok.ru
 */

Added applications/admin/static/edit_area/plugins/zencoding/zencoding.js version [d1e34a48ac].





































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
 * Layer that binds Zen Coding's actions to editArea
 *
 * @author Sergey Chikuyonok (serge.che@gmail.com)
 * @link http://chikuyonok.ru
 *
 * @include "zen_coding.js"
 * @include "html_matcher.js"
 */

var EditArea_zencoding = (function() {
	/** @type {EditArea}  Current editor's instance */
	var editor = null,
		editor_id = 0,
		is_mac = (/mac\s+os/i.test(navigator.userAgent));

	/**
	 * Return true if Alt key is pressed
	 * @param {Event} evt
	 * @return {Boolean}
	 */
	function AltPressed(e) {
		if (window.event)
			return (window.event.altKey);
		else
			return e.modifiers ? (e.altKey || (e.modifiers % 2)) : e.altKey;
	};

	/**
	 * Return true if Ctrl key is pressed
	 * @return {Boolean}
	 */
	function CtrlPressed(e) {
		// as usual, Opera brings few "suprises" here
		if (window.event && !is_mac) {
			return (window.event.ctrlKey);
		} else {
			return (e.ctrlKey || (e.metaKey && window.opera) || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));
		}
	};

	/**
	 * Return true if Shift key is pressed
	 * @return {Boolean}
	 */
	function ShiftPressed(e) {
		if (window.event) {
			return (window.event.shiftKey);
		} else {
			return (e.shiftKey || (e.modifiers>3));
		}
	};

	/**
	 * Finds abbreviation in cucrrent editor and returns it
	 * @return {String|null}
	 */
	function findAbbreviation() {
		var range = editor.getSelectionRange(editor_id);
		if (range.start != range.end) {
			// abbreviation is selected by user
			return editor.getSelectedText(editor_id);
		} else {
			var content = editor.getValue(editor_id);
			return zen_coding.extractAbbreviation(content.substring(0, range.start));
		}
	}

	/**
	 * Returns full line on text for passed character position
	 */
	function getLine(char_pos) {
		var content = editor.getValue(editor_id),
			start_ix = char_pos,
			end_ix,
			ch;

		function isNewline(ch) {
			return ch == '\n' || ch == '\r';
		}

		// find the beginnig of the line
		while (start_ix--) {
			if (isNewline(content.charAt(start_ix))) {
				start_ix++;
				break;
			}
		}

		// find the end of the line
		for (end_ix = char_pos; end_ix < content.length; end_ix++) {
			if (isNewline(content.charAt(end_ix)))
				break;
		}

		return content.substring(start_ix, end_ix);
	}

	/**
	 * Returns padding of current editor's line
	 * @return {String}
	 */
	function getCurrentLinePadding() {
		var range = editor.getSelectionRange(editor_id),
			cur_line = getLine(range.start);

		return (cur_line.match(/^(\s+)/) || [''])[0];
	}

	/**
	 * Replaces current editor's substring with new content. Multiline content
	 * will be automatically padded
	 *
	 * @param {String} editor_str Current editor's substring
	 * @param {String} content New content
	 */
	function replaceEditorContent(editor_str, content) {
		if (!content)
			return;

		// add padding for current line
		content = zen_coding.padString(content, getCurrentLinePadding());

		// get char index where we need to place cursor
		var range = editor.getSelectionRange(editor_id);
		var start_pos = range.end - editor_str.length;
		var cursor_pos = content.indexOf('|');
		content = content.replace(/\|/g, '');

		// replace content in editor
		editor.setSelectionRange(editor_id, start_pos, start_pos + editor_str.length);
		editor.setSelectedText(editor_id, content);

		// place cursor
		if (cursor_pos != -1)
			editor.setSelectionRange(editor_id, start_pos + cursor_pos, start_pos + cursor_pos);
	}

	/**
	 * Search for the new edit point
	 * @param {Number} Search direction: -1 — left, 1 — right
	 * @param {Number} Initial offset from the current caret position
	 * @return {Number} Returns -1 if edit point wasn't found
	 */
	function findNewEditPoint(inc, offset) {
		inc = inc || 1;
		offset = offset || 0;
		var content = editor.getValue(editor_id),
			cur_point = editor.getSelectionRange(editor_id).start + offset,
			max_len = content.length,
			next_point = -1;

		function ch(ix) {
			return content.charAt(ix);
		}

		while (cur_point < max_len && cur_point > 0) {
			cur_point += inc;
			var cur_char = ch(cur_point),
				next_char = ch(cur_point + 1),
				prev_char = ch(cur_point - 1);

			switch (cur_char) {
				case '"':
				case '\'':
					if (next_char == cur_char && prev_char == '=') {
						// empty attribute
						next_point = cur_point + 1;
					}
					break;
				case '>':
					if (next_char == '<') {
						// between tags
						next_point = cur_point + 1;
					}
					break;
			}

			if (next_point != -1)
				break;
		}

		return next_point;
	}

	/**
	 * Unindent content, thus preparing text for tag wrapping
	 * @param {String} text
	 * @return {String}
	 */
	function unindent(text) {
		var pad = getCurrentLinePadding();
		var lines = zen_coding.splitByLines(text);
		for (var i = 0; i < lines.length; i++) {
			if (lines[i].search(pad) == 0)
				lines[i] = lines[i].substr(pad.length);
		}

		return lines.join(zen_coding.getNewline());
	}

	/**
	 * Wraps content with abbreviation
	 * @param {String} editor_type
	 * @param {String} profile_name
	 */
	function mainWrapWithAbbreviation(editor_type, profile_name) {
		profile_name = profile_name || 'xhtml';

		var range = editor.getSelectionRange(editor_id),
			content = editor.getValue(editor_id),
			start_offset = range.start,
			end_offset = range.end,

			abbr = prompt('Enter abbreviation');

		if (!abbr)
			return null;

		if (start_offset == end_offset) {
			// no selection, find tag pair
			var range = HTMLPairMatcher(content, Math.max(start_offset, end_offset));

			if (!range || range[0] == -1) // nothing to wrap
				return null;
				
			start_offset = range[0];
			end_offset = range[1];
				
			// narrow down selection until first non-space character
			var re_space = /\s|\n|\r/;
			function isSpace(ch) {
				return re_space.test(ch);
			}
			
			while (start_offset < end_offset) {
				if (!isSpace(content.charAt(start_offset)))
					break;
					
				start_offset++;
			}
			
			while (end_offset > start_offset) {
				end_offset--;
				if (!isSpace(content.charAt(end_offset))) {
					end_offset++;
					break;
				}
			}
		}

		var content = content.substring(start_offset, end_offset),
			result = zen_coding.wrapWithAbbreviation(abbr, unindent(content), editor_type, profile_name);

		if (result) {
			editor.setSelectionRange(editor_id, end_offset, end_offset);
			replaceEditorContent(content, result);
		}
	}

	/**
	 * Performs Zen Coding action on keydown event
	 * @param {Event} evt
	 */
	function keyDown(evt) {
		evt = evt || window.event;
		var letter = String.fromCharCode(evt.keyCode).toLowerCase(),
			stop_event = false;

		if (CtrlPressed(evt) && !AltPressed(evt) && !ShiftPressed(evt)) {
			switch (evt.keyCode) {
				case 188: // Ctrl+, — expand abbreviation
				case 44:
					var abbr = findAbbreviation();
					if (abbr) {
						var profile_name = 'xhtml',
							syntax = (editArea.current_code_lang in zen_settings) ? editArea.current_code_lang : 'html';

						var content = zen_coding.expandAbbreviation(abbr, syntax, profile_name);
						replaceEditorContent(abbr, content);
					}
					stop_event = true;
					break;
				case 77: // Ctrl+M — match pair
				case 109:
					var selection = editor.getSelectionRange(editor_id),
						range = HTMLPairMatcher(editor.getValue(editor_id), Math.max(selection.start, selection.end));

					if (range && range[0] != -1)
						editor.setSelectionRange(editor_id, range[0], range[1]);

					stop_event = true;
					break;
				case 72: // Ctrl+H — wrap with abbreviation
					mainWrapWithAbbreviation('html', 'xhtml');

					stop_event = true;
					break;
			}
		}

		if (CtrlPressed(evt) && !AltPressed(evt) && ShiftPressed(evt)) {
			switch (evt.keyCode) {
				case 37: // Ctrl+Shift+LEFT_ARROW – prev edit point
					var new_point = findNewEditPoint(-1),
						range = editor.getSelectionRange(editor_id);


					if (new_point == range.start)
						// returned to the current position, start searching from the new one
						new_point = findNewEditPoint(-1, -2);

					if (new_point != -1)
						editor.setSelectionRange(editor_id, new_point, new_point);

					stop_event = true;
					break;

				case 39: // Shift+Ctrl+RIGHT_ARROW – next edit point
					var new_point = findNewEditPoint(1);
					if (new_point != -1)
						editor.setSelectionRange(editor_id, new_point, new_point);

					stop_event = true;
					break;

				case 38: // Shift+Ctrl+UP_ARROW – go to matching pair
					var caret_pos = editor.getSelectionRange(editor_id).start,
						content = editor.getValue(editor_id);

					if (content.charAt(caret_pos) == '<')
						// looks like caret is outside of tag pair
						caret_pos++;

					var range = HTMLPairMatcher(content, caret_pos);

					if (range && range[0] != -1) {
						// match found
						var open_tag = HTMLPairMatcher.last_match.opening_tag,
							close_tag = HTMLPairMatcher.last_match.closing_tag;

						if (close_tag) { // exclude unary tags
							var new_pos = -1;
							if (open_tag.start <= caret_pos && open_tag.end >= caret_pos)
								new_pos = close_tag.start
							else if (close_tag.start <= caret_pos && close_tag.end >= caret_pos)
								new_pos = open_tag.start;

							if (new_pos != -1)
								editor.setSelectionRange(editor_id, new_pos, new_pos);
						}
					}

					stop_event = true;
					break;

				case 77: // Shift+Ctrl+M — merge lines
					var range = editor.getSelectionRange(editor_id),
						content = editor.getValue(editor_id),
						start_ix = range.start,
						end_ix = range.end;

					if (start_ix == end_ix) {
						// find matching tag
						var pair = HTMLPairMatcher(content, start_ix);
						if (pair) {
							start_ix = pair[0];
							end_ix = pair[1];
						}
					}

					if (start_ix != end_ix) {
						// got range, merge lines
						var text = content.substring(start_ix, end_ix),
							old_text = text;

						var lines = text.split(/(\r|\n)/);

						for (var i = 1; i < lines.length; i++) {
							lines[i] = lines[i].replace(/^\s+/, '');
						}

						text = lines.join('').replace(/\s{2,}/, ' ');

						editor.setSelectionRange(editor_id, end_ix, end_ix);
						replaceEditorContent(old_text, text);
					}

					stop_event = true;
					break;

			}
		}

		if(stop_event){
			// in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action
			if(window.event) evt.keyCode = 0;

			return false;
		}

		return true;

	}

	return {
		init: function() {
			editArea.load_script(this.baseURL+"core.js");
		},

		onkeydown: function(evt) {
			editor = parent.editAreaLoader;
			editor_id = editArea.id;

			return keyDown(evt);
		}
	}
})();

editArea.add_plugin("zencoding", EditArea_zencoding);

Added applications/admin/static/edit_area/reg_syntax.js version [f32a38f443].







































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	EditAreaLoader.prototype.get_regexp= function(text_array){
		//res="( |=|\\n|\\r|\\[|\\(|µ|)(";
		res="(\\b)(";
		for(i=0; i<text_array.length; i++){
			if(i>0)
				res+="|";
			//res+="("+ tab_text[i] +")";
			//res+=tab_text[i].replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\{|\})/g, "\\$1");
			res+=this.get_escaped_regexp(text_array[i]);
		}
		//res+=")( |\\.|:|\\{|\\(|\\)|\\[|\\]|\'|\"|\\r|\\n|\\t|$)";
		res+=")(\\b)";
		reg= new RegExp(res);
		
		return res;
	};
	
	
	EditAreaLoader.prototype.get_escaped_regexp= function(str){
		return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");
	};
	
	EditAreaLoader.prototype.init_syntax_regexp= function(){
		var lang_style= {};	
		for(var lang in this.load_syntax){
			if(!this.syntax[lang])	// init the regexp if not already initialized
			{
				this.syntax[lang]= {};
				this.syntax[lang]["keywords_reg_exp"]= {};
				this.keywords_reg_exp_nb=0;
			
				if(this.load_syntax[lang]['KEYWORDS']){
					param="g";
					if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)
						param+="i";
					for(var i in this.load_syntax[lang]['KEYWORDS']){
						if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;
						this.syntax[lang]["keywords_reg_exp"][i]= new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);
						this.keywords_reg_exp_nb++;
					}
				}
				
				if(this.load_syntax[lang]['OPERATORS']){
					var str="";
					var nb=0;
					for(var i in this.load_syntax[lang]['OPERATORS']){
						if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;
						if(nb>0)
							str+="|";				
						str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);
						nb++;
					}
					if(str.length>0)
						this.syntax[lang]["operators_reg_exp"]= new RegExp("("+str+")","g");
				}
				
				if(this.load_syntax[lang]['DELIMITERS']){
					var str="";
					var nb=0;
					for(var i in this.load_syntax[lang]['DELIMITERS']){
						if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;
						if(nb>0)
							str+="|";
						str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);
						nb++;
					}
					if(str.length>0)
						this.syntax[lang]["delimiters_reg_exp"]= new RegExp("("+str+")","g");
				}
				
				
		//		/(("(\\"|[^"])*"?)|('(\\'|[^'])*'?)|(//(.|\r|\t)*\n)|(/\*(.|\n|\r|\t)*\*/)|(<!--(.|\n|\r|\t)*-->))/gi
				var syntax_trace=[];
				
		//		/("(?:[^"\\]*(\\\\)*(\\"?)?)*("|$))/g
				
				this.syntax[lang]["quotes"]={};
				var quote_tab= [];
				if(this.load_syntax[lang]['QUOTEMARKS']){
					for(var i in this.load_syntax[lang]['QUOTEMARKS']){	
						if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;			
						var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);
						this.syntax[lang]["quotes"][x]=x;
						//quote_tab[quote_tab.length]="("+x+"(?:\\\\"+x+"|[^"+x+"])*("+x+"|$))";
						//previous working : quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";
						quote_tab[quote_tab.length]="("+ x +"(\\\\.|[^"+ x +"])*(?:"+ x +"|$))";
						
						syntax_trace.push(x);			
					}			
				}
						
				this.syntax[lang]["comments"]={};
				if(this.load_syntax[lang]['COMMENT_SINGLE']){
					for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){	
						if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;						
						var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);
						quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";
						syntax_trace.push(x);
						this.syntax[lang]["comments"][x]="\n";
					}			
				}		
				// (/\*(.|[\r\n])*?\*/)
				if(this.load_syntax[lang]['COMMENT_MULTI']){
					for(var i in this.load_syntax[lang]['COMMENT_MULTI']){
						if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;							
						var start=this.get_escaped_regexp(i);
						var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);
						quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";
						syntax_trace.push(start);
						syntax_trace.push(end);
						this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];
					}			
				}		
				if(quote_tab.length>0)
					this.syntax[lang]["comment_or_quote_reg_exp"]= new RegExp("("+quote_tab.join("|")+")","gi");
				
				if(syntax_trace.length>0) //   /((.|\n)*?)(\\*("|'|\/\*|\*\/|\/\/|$))/g
					this.syntax[lang]["syntax_trace_regexp"]= new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");
				
				if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){
					this.syntax[lang]["script_delimiters"]= {};
					for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){
						if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;							
						this.syntax[lang]["script_delimiters"][i]= this.load_syntax[lang]['SCRIPT_DELIMITERS'];
					}			
				}
				
				this.syntax[lang]["custom_regexp"]= {};
				if(this.load_syntax[lang]['REGEXPS']){
					for(var i in this.load_syntax[lang]['REGEXPS']){
						if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;
						var val= this.load_syntax[lang]['REGEXPS'][i];
						if(!this.syntax[lang]["custom_regexp"][val['execute']])
							this.syntax[lang]["custom_regexp"][val['execute']]= {};
						this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers'])
																			, 'class' : val['class']};
					}
				}
				
				if(this.load_syntax[lang]['STYLES']){							
					lang_style[lang]= {};
					for(var i in this.load_syntax[lang]['STYLES']){
						if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;
						if(typeof(this.load_syntax[lang]['STYLES'][i]) != "string"){
							for(var j in this.load_syntax[lang]['STYLES'][i]){							
								lang_style[lang][j]= this.load_syntax[lang]['STYLES'][i][j];
							}
						}else{
							lang_style[lang][i]= this.load_syntax[lang]['STYLES'][i];
						}
					}
				}
				// build style string
				var style="";		
				for(var i in lang_style[lang]){
					if(lang_style[lang][i].length>0){
						style+= "."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";
						style+= "."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";				
					}
				}
				this.syntax[lang]["styles"]=style;
			}
		}				
	};
	
	editAreaLoader.waiting_loading["reg_syntax.js"]= "loaded";

Added applications/admin/static/edit_area/reg_syntax/basic.js version [3a6a15fc56].







































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["basic"] = {
	'DISPLAY_NAME' : 'Basic'
	,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'}
	,'COMMENT_MULTI' : { }
	,'QUOTEMARKS' : {1: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'statements' : [
			'if','then','for','wend','while',
			'else','elseif','select','case','end select',
			'until','next','step','to','end if', 'call'
		]
		,'keywords' : [
			'sub', 'end sub', 'function', 'end function', 'exit',
			'exit function', 'dim', 'redim', 'shared', 'const',
			'is', 'absolute', 'access', 'any', 'append', 'as',
			'base', 'beep', 'binary', 'bload', 'bsave', 'chain',
			'chdir', 'circle', 'clear', 'close', 'cls', 'color',
			'com', 'common', 'data', 'date', 'declare', 'def',
			'defdbl', 'defint', 'deflng', 'defsng', 'defstr',
			'double', 'draw', 'environ', 'erase', 'error', 'field',
			'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key',
			'kill', 'let', 'line', 'list', 'locate', 'lock', 'long',
			'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open',
			'option', 'out', 'output', 'paint', 'palette', 'pcopy',
			'poke', 'preset', 'print', 'pset', 'put', 'random',
			'randomize', 'read', 'reset', 'restore', 'resume',
			'return', 'rmdir', 'rset', 'run', 'screen', 'seg',
			'shell', 'single', 'sleep', 'sound', 'static', 'stop',
			'strig', 'string', 'swap', 'system', 'time', 'timer',
			'troff', 'tron', 'type', 'unlock', 'using', 'view',
			'wait', 'width', 'window', 'write'
	        ]
		,'functions' : [
			'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng',
			'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl',
			'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp',
			'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey',
			'inp', 'input', 'instr', 'int', 'ioctl', 'lbound',
			'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos',
			'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks',
			'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point',
			'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin',
			'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan',
			'ubound', 'ucase', 'val', 'varptr', 'varseg'
		]
		,'operators' : [
			'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '!', '&'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'STYLES' : {
		'COMMENTS': 'color: #99CC00;'
		,'QUOTESMARKS': 'color: #333399;'
		,'KEYWORDS' : {
			'keywords' : 'color: #3366FF;'
			,'functions' : 'color: #0000FF;'
			,'statements' : 'color: #3366FF;'
			,'operators' : 'color: #FF0000;'
			}
		,'OPERATORS' : 'color: #FF0000;'
		,'DELIMITERS' : 'color: #0000FF;'

	}
};

Added applications/admin/static/edit_area/reg_syntax/brainfuck.js version [31e51e27c6].














































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["brainfuck"] = {
	'DISPLAY_NAME' : 'Brainfuck'
	,'COMMENT_SINGLE' : {}
	,'COMMENT_MULTI' : {}
	,'QUOTEMARKS' : {}
	,'KEYWORD_CASE_SENSITIVE' : true
	,'OPERATORS' :[
		'+', '-'
	]
	,'DELIMITERS' :[
		'[', ']'
	]
	,'REGEXPS' : {
		'bfispis' : {
			'search' : '()(\\.)()'
			,'class' : 'bfispis'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}
		,'bfupis' : {
			'search' : '()(\\,)()'
			,'class' : 'bfupis'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}
		,'bfmemory' : {
			'search' : '()([<>])()'
			,'class' : 'bfmemory'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'OPERATORS' : 'color: #88AA00;'
		,'DELIMITERS' : 'color: #00C138;'
		,'REGEXPS' : {
			'bfispis' : 'color: #EE0000;'
			,'bfupis' : 'color: #4455ee;'
			,'bfmemory' : 'color: #DD00DD;'
		}
	}
};

Added applications/admin/static/edit_area/reg_syntax/c.js version [bba1b3db92].
































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["c"] = {
	'DISPLAY_NAME' : 'C'
	,'COMMENT_SINGLE' : {1 : '//'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : true
	,'KEYWORDS' : {
		'constants' : [
			'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true'
		]
		,'types' : [
			'FILE', 'auto', 'char', 'const', 'double',
			'extern', 'float', 'inline', 'int', 'long', 'register',
			'short', 'signed', 'size_t', 'static', 'struct',
			'time_t', 'typedef', 'union', 'unsigned', 'void',
			'volatile'
		]
		,'statements' : [
			'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof',
			'switch', 'while'
		]
 		,'keywords' : [
			'break', 'case', 'continue', 'default', 'delete',
			'return'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		'precompiler' : {
			'search' : '()(#[^\r\n]*)()'
			,'class' : 'precompiler'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}
/*		,'precompilerstring' : {
			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
			,'class' : 'precompilerstring'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}*/
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			'constants' : 'color: #EE0000;'
			,'types' : 'color: #0000EE;'
			,'statements' : 'color: #60CA00;'
			,'keywords' : 'color: #48BDDF;'
		}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #0038E1;'
		,'REGEXPS' : {
			'precompiler' : 'color: #009900;'
			,'precompilerstring' : 'color: #994400;'
		}
	}
};

Added applications/admin/static/edit_area/reg_syntax/coldfusion.js version [a90a753603].

























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["coldfusion"] = {
	'DISPLAY_NAME' : 'Coldfusion'
	,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
	,'COMMENT_MULTI' : {'<!--' : '-->'}
	,'COMMENT_MULTI2' : {'<!---' : '--->'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
		,'KEYWORDS' : {
		'statements' : [
			'include', 'require', 'include_once', 'require_once',
			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
            'endif', 'switch', 'case', 'endswitch',
			'return', 'break', 'continue'
		]
		,'reserved' : [
			'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', 
			'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', 
			'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', 
			'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', 
			'while', 'XOR'
		]
		,'functions' : [
			'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', 
			'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', 
			'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', 
			'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', 
			'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', 
			'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', 
			'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', 
			'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', 
			'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', 
			'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', 
			'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', 
			'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', 
			'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', 
			'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', 
			'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', 
			'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', 
			'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', 
			'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', 
			'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', 
			'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', 
			'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', 
			'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', 
			'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', 
			'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', 
			'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', 
			'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', 
			'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', 
			'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', 
			'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', 
			'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', 
			'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', 
			'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', 
			'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', 
			'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', 
			'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', 
			'XMLFormat', 'Year', 'YesNoFormat'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '%', '!', '&&', '||'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		'doctype' : {
			'search' : '()(<!DOCTYPE[^>]*>)()'
			,'class' : 'doctype'
			,'modifiers' : ''
			,'execute' : 'before' // before or after
		}
		,'cftags' : {
			'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)'
			,'class' : 'cftags'
			,'modifiers' : 'gi'
			,'execute' : 'before' // before or after
		}
		,'cftags2' : {
			'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)'
			,'class' : 'cftags2'
			,'modifiers' : 'gi'
			,'execute' : 'before' // before or after
		}
		,'tags' : {
			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
			,'class' : 'tags'
			,'modifiers' : 'gi'
			,'execute' : 'before' // before or after
		}
		,'attributes' : {
			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
			,'class' : 'attributes'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			'reserved' : 'color: #48BDDF;'
			,'functions' : 'color: #0000FF;'
			,'statements' : 'color: #60CA00;'
			}
		,'OPERATORS' : 'color: #E775F0;'
		,'DELIMITERS' : ''
		,'REGEXPS' : {
			'attributes': 'color: #990033;'
			,'cftags': 'color: #990033;'
			,'cftags2': 'color: #990033;'
			,'tags': 'color: #000099;'
			,'doctype': 'color: #8DCFB5;'
			,'test': 'color: #00FF00;'
		}	
	}		
};

 	  	 

Added applications/admin/static/edit_area/reg_syntax/cpp.js version [04eb650b2b].



































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["cpp"] = {
	'DISPLAY_NAME' : 'CPP'
	,'COMMENT_SINGLE' : {1 : '//'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : true
	,'KEYWORDS' : {
		'constants' : [
			'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr',
			'true'
		]
		,'types' : [
			'FILE', 'auto', 'char', 'class', 'const', 'double',
			'extern', 'float', 'friend', 'inline', 'int',
			'iterator', 'long', 'map', 'operator', 'queue',
			'register', 'short', 'signed', 'size_t', 'stack',
			'static', 'string', 'struct', 'time_t', 'typedef',
			'union', 'unsigned', 'vector', 'void', 'volatile'
		]
		,'statements' : [
			'catch', 'do', 'else', 'enum', 'for', 'goto', 'if',
			'sizeof', 'switch', 'this', 'throw', 'try', 'while'
		]
 		,'keywords' : [
			'break', 'case', 'continue', 'default', 'delete',
			'namespace', 'new', 'private', 'protected', 'public',
			'return', 'using'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		'precompiler' : {
			'search' : '()(#[^\r\n]*)()'
			,'class' : 'precompiler'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}
/*		,'precompilerstring' : {
			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
			,'class' : 'precompilerstring'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}*/
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			'constants' : 'color: #EE0000;'
			,'types' : 'color: #0000EE;'
			,'statements' : 'color: #60CA00;'
			,'keywords' : 'color: #48BDDF;'
		}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #0038E1;'
		,'REGEXPS' : {
			'precompiler' : 'color: #009900;'
			,'precompilerstring' : 'color: #994400;'
		}
	}
};

Added applications/admin/static/edit_area/reg_syntax/css.js version [c08218f0aa].






















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["css"] = {
	'DISPLAY_NAME' : 'CSS'
	,'COMMENT_SINGLE' : {1 : '@'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : ['"', "'"]
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'attributes' : [
			'aqua', 'azimuth', 'background-attachment', 'background-color',
			'background-image', 'background-position', 'background-repeat',
			'background', 'border-bottom-color', 'border-bottom-style',
			'border-bottom-width', 'border-left-color', 'border-left-style',
			'border-left-width', 'border-right', 'border-right-color',
			'border-right-style', 'border-right-width', 'border-top-color',
			'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
			'border-left', 'border-width', 'border-color', 'border-spacing',
			'border-style', 'border-top', 'border',  'caption-side',
			'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
			'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
			'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
			'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
			'font-weight', 'font', 'height', 'letter-spacing', 'line-height',
			'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
			'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
			'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
			'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',
			'outline-width', 'overflow', 'padding-bottom', 'padding-left',
			'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
			'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
			'pause', 'pitch', 'pitch-range',  'play-during', 'position', 'quotes',
			'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
			'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
			'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
			'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
			'width', 'word-spacing', 'z-index', 'bottom', 'left'
		]
		,'values' : [
			'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
			'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',
			'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 
            'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
			'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
			'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
			'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
			'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
			'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
			'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
			'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
			'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
			'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
			'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
			'pointer', 'portrait', 'purple', 'px',
			'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
			's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
			'static', 'status-bar', 'super', 'sw-resize',
			'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
			'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
			'visible',
			'w-resize', 'wait', 'white', 'wider',
			'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
			'yellow', 'yes'
		]
		,'specials' : [
			'important'
		]
	}
	,'OPERATORS' :[
		':', ';', '!', '.', '#'
	]
	,'DELIMITERS' :[
		'{', '}'
	]
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			'attributes' : 'color: #48BDDF;'
			,'values' : 'color: #2B60FF;'
			,'specials' : 'color: #FF0000;'
			}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #60CA00;'
				
	}
};

Added applications/admin/static/edit_area/reg_syntax/html.js version [4c455c0095].




















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
* last update: 2006-08-24
*/

editAreaLoader.load_syntax["html"] = {
	'DISPLAY_NAME' : 'HTML'
	,'COMMENT_SINGLE' : {}
	,'COMMENT_MULTI' : {'<!--' : '-->'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
	}
	,'OPERATORS' :[
	]
	,'DELIMITERS' :[
	]
	,'REGEXPS' : {
		'doctype' : {
			'search' : '()(<!DOCTYPE[^>]*>)()'
			,'class' : 'doctype'
			,'modifiers' : ''
			,'execute' : 'before' // before or after
		}
		,'tags' : {
			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
			,'class' : 'tags'
			,'modifiers' : 'gi'
			,'execute' : 'before' // before or after
		}
		,'attributes' : {
			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
			,'class' : 'attributes'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			}
		,'OPERATORS' : 'color: #E775F0;'
		,'DELIMITERS' : ''
		,'REGEXPS' : {
			'attributes': 'color: #B1AC41;'
			,'tags': 'color: #E62253;'
			,'doctype': 'color: #8DCFB5;'
			,'test': 'color: #00FF00;'
		}	
	}		
};

Added applications/admin/static/edit_area/reg_syntax/java.js version [3325e80431].


























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["java"] = {
	'DISPLAY_NAME' : 'Java'
	,'COMMENT_SINGLE': { 1: '//', 2: '@' }
	, 'COMMENT_MULTI': { '/*': '*/' }
	, 'QUOTEMARKS': { 1: "'", 2: '"' }
	, 'KEYWORD_CASE_SENSITIVE': true
	, 'KEYWORDS': {
	    'constants': [
			'null', 'false', 'true'
		]
		, 'types': [
			'String', 'int', 'short', 'long', 'char', 'double', 'byte',
			'float', 'static', 'void', 'private', 'boolean', 'protected',
			'public', 'const', 'class', 'final', 'abstract', 'volatile',
			'enum', 'transient', 'interface'
		]
		, 'statements': [
            'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally',
            'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements',
            'break', 'case', 'default', 'goto'
		]
 		, 'keywords': [
           'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized',
           'instanceof', 'strictfp'
		]
	}
	, 'OPERATORS': [
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
	]
	, 'DELIMITERS': [
		'(', ')', '[', ']', '{', '}'
	]
	, 'REGEXPS': {
	    'precompiler': {
	        'search': '()(#[^\r\n]*)()'
			, 'class': 'precompiler'
			, 'modifiers': 'g'
			, 'execute': 'before'
	    }
	}
	, 'STYLES': {
	    'COMMENTS': 'color: #AAAAAA;'
		, 'QUOTESMARKS': 'color: #6381F8;'
		, 'KEYWORDS': {
		    'constants': 'color: #EE0000;'
			, 'types': 'color: #0000EE;'
			, 'statements': 'color: #60CA00;'
			, 'keywords': 'color: #48BDDF;'
		}
		, 'OPERATORS': 'color: #FF00FF;'
		, 'DELIMITERS': 'color: #0038E1;'
		, 'REGEXPS': {
		    'precompiler': 'color: #009900;'
			, 'precompilerstring': 'color: #994400;'
		}
	}
};

Added applications/admin/static/edit_area/reg_syntax/js.js version [f07286a168].































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["js"] = {
	'DISPLAY_NAME' : 'Javascript'
	,'COMMENT_SINGLE' : {1 : '//'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'statements' : [
			'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
			'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
			'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
			'while', 'write', 'with'
		]
 		,'keywords' : [
			'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
			'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
			'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',		
			// the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
			'Link ', 'outerHeight ', 'Anchor', 'FileUpload', 
			'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', 
			'arguments', 'locationbar', 'pageXoffset', 'Form', 
			'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', 
			'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', 
			'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', 
			'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', 
			'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', 
			'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', 
			'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', 
			'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', 
			'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', 
			'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', 
			'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', 
			'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'			
		]
    	,'functions' : [
			// common functions for Window object
			'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
			'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
			'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
			'stop' 
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '%', '!'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			'statements' : 'color: #60CA00;'
			,'keywords' : 'color: #48BDDF;'
			,'functions' : 'color: #2B60FF;'
		}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #0038E1;'
				
	}
	,'AUTO_COMPLETION' :  {
		"default": {	// the name of this definition group. It's posisble to have different rules inside the same definition file
			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
						,"possible_words_letters": "[a-zA-Z0-9_]+"
						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
						,"prefix_separator": "\\."
					}
			,"CASE_SENSITIVE": true
			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
			,"KEYWORDS": {
				'': [	// the prefix of thoses items
						/**
						 * 0 : the keyword the user is typing
						 * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
						 * 		If empty the keyword will be displayed
						 * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
						 */
						 ['Array', '§()', '']
			    		,['alert', '§({@})', 'alert(String message)']
			    		,['document']
			    		,['window']
			    	]
		    	,'window' : [
			    		 ['location']
			    		,['document']
			    		,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)']
					]
		    	,'location' : [
			    		 ['href']
					]
			}
		}
	}
};

Added applications/admin/static/edit_area/reg_syntax/pas.js version [741a24d898].




















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["pas"] = {
	'DISPLAY_NAME' : 'Pascal'
	,'COMMENT_SINGLE' : {}
	,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'}
	,'QUOTEMARKS' : {1: '"', 2: "'"}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'constants' : [
			'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red',
			'Magenta', 'Brown', 'LightGray', 'DarkGray',
			'LightBlue', 'LightGreen', 'LightCyan', 'LightRed',
			'LightMagenta', 'Yellow', 'White', 'MaxSIntValue',
			'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint',
			'erroraddr', 'errorcode', 'LineEnding'
		]
		,'keywords' : [
			'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor',
			'pow', 'is', 'not','Absolute', 'And_then', 'Array',
			'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto',
			'Else', 'End', 'Export', 'File', 'For', 'Function',
			'Goto', 'If', 'Import', 'Implementation', 'Inherited',
			'Inline', 'Interface', 'Label', 'Module', 'Nil',
			'Object', 'Of', 'Only', 'Operator', 'Or_else',
			'Otherwise', 'Packed', 'Procedure', 'Program',
			'Protected', 'Qualified', 'Record', 'Repeat',
			'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit',
			'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While',
			'With'
		]
		,'functions' : [
			'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign',
			'Assigned', 'BinStr', 'Blockread', 'Blockwrite',
			'Break', 'Chdir', 'Chr', 'Close', 'CompareByte',
			'CompareChar', 'CompareDWord', 'CompareWord', 'Concat',
			'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete',
			'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude',
			'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte',
			'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac',
			'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager',
			'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include',
			'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord',
			'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult',
			'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase',
			'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move',
			'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord',
			'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred',
			'Ptr', 'Random', 'Randomize', 'Read', 'Readln',
			'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite',
			'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof',
			'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp',
			'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf',
			'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar',
			'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val',
			'Write', 'WriteLn'
		]
		,'types' : [
			'Integer', 'Shortint', 'SmallInt', 'Longint',
			'Longword', 'Int64', 'Byte', 'Word', 'Cardinal',
			'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char',
			'Real', 'Single', 'Double', 'Extended', 'Comp',
			'String', 'ShortString', 'AnsiString', 'PChar'
		]
	}
	,'OPERATORS' :[
		'@', '*', '+', '-', '/', '^', ':=', '<', '=', '>'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']'
	]
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			'specials' : 'color: #EE0000;'
			,'constants' : 'color: #654321;'
			,'keywords' : 'color: #48BDDF;'
			,'functions' : 'color: #449922;'
			,'types' : 'color: #2B60FF;'
			}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #60CA00;'
	}
};

Added applications/admin/static/edit_area/reg_syntax/perl.js version [53339b3213].

























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/***************************************************************************
 * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.
 *
 * You may choose any license of the current release or any future release
 * of editarea to use, modify and/or redistribute this file.
 *
 * This language specification file supports for syntax checking on
 * a large subset of Perl 5.x.
 * The basic common syntax of Perl is fully supported, but as for
 * the highlighting of built-in operations, it's mainly designed
 * to support for hightlighting Perl code in a Safe environment (compartment)
 * as used by CoMaNet for evaluation of administrative scripts. This Safe
 * compartment basically allows for all of Opcode's :default operations,
 * but little others. See http://perldoc.perl.org/Opcode.html to learn
 * more.
 ***************************************************************************/

editAreaLoader.load_syntax["perl"] = {
	'DISPLAY_NAME' : 'Perl',
	'COMMENT_SINGLE' : {1 : '#'},
	'QUOTEMARKS' : {1: "'", 2: '"'},
	'KEYWORD_CASE_SENSITIVE' : true,
	'KEYWORDS' :
	{
		'core' :
			[ "if", "else", "elsif", "while", "for", "each", "foreach",
				"next", "last", "goto", "exists", "delete", "undef",
				"my", "our", "local", "use", "require", "package", "keys", "values",
				"sub", "bless", "ref", "return" ],
		'functions' :
			[
				//from :base_core
				"int", "hex", "oct", "abs", "substr", "vec", "study", "pos",
				"length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst",
				"uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice",
				"push", "pop", "shift", "unshift", "reverse", "and", "or", "dor",
				"xor", "warn", "die", "prototype",
				//from :base_mem
				"concat", "repeat", "join", "range",
				//none from :base_loop, as we'll see them as basic statements...
				//from :base_orig
				"sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime",
				//others
				"print", "open", "close"
			]
	},
	'OPERATORS' :
		[ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&',
			' eq ', ' ne ', '=~' ],
	'DELIMITERS' :
		[ '(', ')', '[', ']', '{', '}' ],
	'REGEXPS' :
	{
		'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()',
			'class' : 'scopingnames',
			'modifiers' : 'g', 'execute' : 'before' },
		'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()',
			'class' : 'scopingnames',
			'modifiers' : 'g', 'execute' : 'before' },
		'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()',
			'class' : 'vars',
			'modifiers' : 'g', 'execute' : 'after' },
		'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()',
			'class' : 'vars',
			'modifiers' : 'g', 'execute' : 'after' },
		'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()',
			'class' : 'vars',
			'modifiers' : 'g', 'execute' : 'after' },
	},

	'STYLES' :
	{
		'COMMENTS': 'color: #AAAAAA;',
		'QUOTESMARKS': 'color: #DC0000;',
		'KEYWORDS' :
		{
			'core' : 'color: #8aca00;',
			'functions' : 'color: #2B60FF;'
		},
		'OPERATORS' : 'color: #8aca00;',
		'DELIMITERS' : 'color: #0038E1;',
		'REGEXPS':
		{
			'scopingnames' : 'color: #ff0000;',
			'vars' : 'color: #00aaaa;',
		}
	} //'STYLES'
};

Added applications/admin/static/edit_area/reg_syntax/php.js version [dbdf8e2c3b].






























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["php"] = {
	'DISPLAY_NAME' : 'Php'
	,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'statements' : [
			'include', 'require', 'include_once', 'require_once',
			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
            'endif', 'switch', 'case', 'endswitch',
			'return', 'break', 'continue'
		]
		,'reserved' : [
			'_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',
			'null', '__LINE__', '__FILE__',
			'false', '&lt;?php', '?&gt;', '&lt;?',
			'&lt;script language', '&lt;/script&gt;',
			'true', 'var', 'default',
			'function', 'class', 'new', '&amp;new', 'this',
			'__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
			'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
			'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
			'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
			'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
			'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
			'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
			
		]
		,'functions' : [
			'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
			'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
			'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
			'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
			'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
			'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
			'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
			'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
			'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
			'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
			'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
			'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
			'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'

		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		// highlight all variables ($...)
		'variables' : {
			'search' : '()(\\$\\w+)()'
			,'class' : 'variables'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #879EFA;'
		,'KEYWORDS' : {
			'reserved' : 'color: #48BDDF;'
			,'functions' : 'color: #0040FD;'
			,'statements' : 'color: #60CA00;'
			}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #2B60FF;'
		,'REGEXPS' : {
			'variables' : 'color: #E0BD54;'
		}		
	}
	,'AUTO_COMPLETION' :  {
		"default": {	// the name of this definition group. It's posisble to have different rules inside the same definition file
			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
						,"possible_words_letters": "[a-zA-Z0-9_\$]+"
						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
						,"prefix_separator": "\\-\\>|\\:\\:"
					}
			,"CASE_SENSITIVE": true
			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
			,"KEYWORDS": {
					'': [	// the prefix of thoses items
						/**
						 * 0 : the keyword the user is typing
						 * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
						 * 		If empty the keyword will be displayed
						 * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
						 */
						 ['$_POST']
			    		,['$_GET']
			    		,['$_SESSION']
			    		,['$_SERVER']
			    		,['$_FILES']
			    		,['$_ENV']
			    		,['$_COOKIE']
			    		,['$_REQUEST']
			    		// magic methods
			    		,['__construct', '§( {@} )']
			    		,['__destruct', '§( {@} )']
			    		,['__sleep', '§( {@} )']
			    		,['__wakeup', '§( {@} )']
			    		,['__toString', '§( {@} )']
			    		// include
			    		,['include', '§ "{@}";']
			    		,['include_once', '§ "{@}";']
			    		,['require', '§ "{@}";']
			    		,['require_once', '§ "{@}";']
			    		// statements
			    		,['for', '§( {@} )']
			    		,['foreach', '§( {@} )']
			    		,['if', '§( {@} )']
			    		,['elseif', '§( {@} )']
			    		,['while', '§( {@} )']
			    		,['switch', '§( {@} )']
			    		,['break']
			    		,['case']
			    		,['continue']
			    		,['do']
			    		,['else']
			    		,['endif']
			    		,['endswitch']
			    		,['endwhile']
			    		,['return']
			    		// function
			    		,['unset', '§( {@} )']
					]
				}
			}
		,"live": {	
			
			// class NAME: /class\W+([a-z]+)\W+/gi
			// method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi
			// static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi 
			// attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi 
			// 		v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi 
			// var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi 
			
			
			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
						,"possible_words_letters": "[a-zA-Z0-9_\$]+"
						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
						,"prefix_separator": "\\-\\>"
					}
			,"CASE_SENSITIVE": true
			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
			,"KEYWORDS": {
					'$this': [	// the prefix of thoses items
						['test']
					]
				}
			}
	}
};

Added applications/admin/static/edit_area/reg_syntax/python.js version [beef80a942].


















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
 * Python syntax v 1.1 
 * 
 * v1.1 by Andre Roberge (2006/12/27)
 *   
**/
editAreaLoader.load_syntax["python"] = {
	'DISPLAY_NAME' : 'Python'
	,'COMMENT_SINGLE' : {1 : '#'}
	,'COMMENT_MULTI' : {}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : true
	,'KEYWORDS' : {
		/*
		** Set 1: reserved words
		** http://python.org/doc/current/ref/keywords.html
		** Note: 'as' and 'with' have been added starting with Python 2.5
		*/
		'reserved' : [
			'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif',
			'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 
			'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise',
			'return', 'try', 'while', 'with', 'yield'
			//the following are *almost* reserved; we'll treat them as such
			, 'False', 'True', 'None'
		]
		/*
		** Set 2: builtins
		** http://python.org/doc/current/lib/built-in-funcs.html
		*/	
		,'builtins' : [
			'__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', 
			'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 
			'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',
			'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',
			'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',
			'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
			'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 
			'vars', 'xrange', 'zip',
			// Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html
			//'False', 'True', 'None' have been included in 'reserved'
			'NotImplemented', 'Ellipsis',
			// Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html
			'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',
			'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',
			'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',
			'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',
			'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',
			'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',
			'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',
			'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',
			'RuntimeWarning', 'FutureWarning',		
			// we will include the string methods as well
			// http://python.org/doc/current/lib/string-methods.html
			'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',
			'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle',
			'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',
			'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
			'translate', 'upper', 'zfill'
		]
		/*
		** Set 3: standard library
		** http://python.org/doc/current/lib/modindex.html
		*/
		,'stdlib' : [
			'__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',
			'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',
			'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',
			'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
			'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler',
			'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',
			'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',
			'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',
			'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',
			'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',
			'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',
			'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',
			'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',
			'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',
			'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',
			'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',
			'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',
			'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',
			'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',
			're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter',
			'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',
			'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',
			'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',
			'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',
			'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',
			'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',
			'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',
			'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',
			'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',
			'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib'

		]
		/*
		** Set 4: special methods
		** http://python.org/doc/current/ref/specialnames.html
		*/
		,'special' : [
			// Basic customization: http://python.org/doc/current/ref/customization.html
			'__new__', '__init__', '__del__', '__repr__', '__str__', 
			'__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',
			'__hash__', '__nonzero__', '__unicode__', '__dict__',
			// Attribute access: http://python.org/doc/current/ref/attribute-access.html
			'__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',
			'__delete__', '__slots__',
			// Class creation, callable objects
			'__metaclass__', '__call__', 
			// Container types: http://python.org/doc/current/ref/sequence-types.html
			'__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',
			'__getslice__', '__setslice__', '__delslice__',
			// Numeric types: http://python.org/doc/current/ref/numeric-types.html
			'__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',
			'__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',
			'__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',
			'__long__','__lshift__',
			'__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',
			'__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
			'__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',
			'__sub__','__xor__'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #660066;'
		,'KEYWORDS' : {
			'reserved' : 'color: #0000FF;'
			,'builtins' : 'color: #009900;'
			,'stdlib' : 'color: #009900;'
			,'special': 'color: #006666;'
			}
		,'OPERATORS' : 'color: #993300;'
		,'DELIMITERS' : 'color: #993300;'
				
	}
};

Added applications/admin/static/edit_area/reg_syntax/robotstxt.js version [fb0a12b921].


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["robotstxt"] = {
	'DISPLAY_NAME' : 'Robots txt',
	'COMMENT_SINGLE' : {1 : '#'},
	'COMMENT_MULTI' : {},
	'QUOTEMARKS' : [],
	'KEYWORD_CASE_SENSITIVE' : false,
	'KEYWORDS' : {
		'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'],
		'values' : ['*'],
		'specials' : ['*']
	},
	'OPERATORS' :[':'],
	'DELIMITERS' :[],
	'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;',
		'QUOTESMARKS': 'color: #6381F8;',
		'KEYWORDS' : {
			'attributes' : 'color: #48BDDF;',
			'values' : 'color: #2B60FF;',
			'specials' : 'color: #FF0000;'
			},
	'OPERATORS' : 'color: #FF00FF;',
	'DELIMITERS' : 'color: #60CA00;'			
	}
};

Added applications/admin/static/edit_area/reg_syntax/ruby.js version [6878a39eed].





































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
 * Ruby syntax v 1.0 
 * 
 * v1.0 by Patrice De Saint Steban (2007/01/03)
 *   
**/
editAreaLoader.load_syntax["ruby"] = {
	'DISPLAY_NAME' : 'Ruby'
	,'COMMENT_SINGLE' : {1 : '#'}
	,'COMMENT_MULTI' : {}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : true
	,'KEYWORDS' : {
		'reserved' : [
			'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else',
			'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', 
			'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry',
			'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		'constants' : {
			'search' : '()([A-Z]\\w*)()'
			,'class' : 'constants'
			,'modifiers' : 'g'
			,'execute' : 'before' 
		}
		,'variables' : {
			'search' : '()([\$\@\%]+\\w+)()'
			,'class' : 'variables'
			,'modifiers' : 'g'
			,'execute' : 'before' 
		}
		,'numbers' : {
			'search' : '()(-?[0-9]+)()'
			,'class' : 'numbers'
			,'modifiers' : 'g'
			,'execute' : 'before' 
		}
		,'symbols' : {
			'search' : '()(:\\w+)()'
			,'class' : 'symbols'
			,'modifiers' : 'g'
			,'execute' : 'before'
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #660066;'
		,'KEYWORDS' : {
			'reserved' : 'font-weight: bold; color: #0000FF;'
			}
		,'OPERATORS' : 'color: #993300;'
		,'DELIMITERS' : 'color: #993300;'
		,'REGEXPS' : {
			'variables' : 'color: #E0BD54;'
			,'numbers' : 'color: green;'
			,'constants' : 'color: #00AA00;'
			,'symbols' : 'color: #879EFA;'
		}	
	}
};

Added applications/admin/static/edit_area/reg_syntax/sql.js version [e99186faeb].

























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["sql"] = {
	'DISPLAY_NAME' : 'SQL'
	,'COMMENT_SINGLE' : {1 : '--'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'statements' : [
			'select', 'SELECT', 'where', 'order', 'by',
			'insert', 'from', 'update', 'grant', 'left join', 'right join', 
            'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'
		]
		,'reserved' : [
			'null', 'enum', 'int', 'boolean', 'add', 'varchar'
			
		]
		,'functions' : [
   'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',
'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',
'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',
'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',
'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',
'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',
'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'
		]
	}
	,'OPERATORS' :[
     'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		// highlight all variables (@...)
		'variables' : {
			'search' : '()(\\@\\w+)()'
			,'class' : 'variables'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #879EFA;'
		,'KEYWORDS' : {
			'reserved' : 'color: #48BDDF;'
			,'functions' : 'color: #0040FD;'
			,'statements' : 'color: #60CA00;'
			}
		,'OPERATORS' : 'color: #FF00FF;'
		,'DELIMITERS' : 'color: #2B60FF;'
		,'REGEXPS' : {
			'variables' : 'color: #E0BD54;'
		}		
	}
};

Added applications/admin/static/edit_area/reg_syntax/tsql.js version [2084ec70ed].

























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["tsql"] = {
	'DISPLAY_NAME' : 'T-SQL'
	,'COMMENT_SINGLE' : {1 : '--'}
	,'COMMENT_MULTI' : {'/*' : '*/'}
	,'QUOTEMARKS' : {1: "'" }
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'statements': [
		    'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION',
		    'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC',
		    'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR',
		    'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE',
		    'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY',
		    'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN',
		    'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK',
		    'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE', 
		    'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX',
		    'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET',
		    'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME',
		    'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE',
		    'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO',
		    'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK', 
		    'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE',
		    'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE',
		    'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN',
		    'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP', 
		    'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE',
		    'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT'
		],
		'functions': [
		    'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER',
			'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX',
			'@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT',
			'@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL',
			'@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS',
			'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR',
			'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT',
			'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS',
			'@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL',
			'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME',
			'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME',
			'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY',
			'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER',
			'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME',
			'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER',
			'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP',
			'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR',
			'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT',
			'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME',
			'@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ',
			'@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR'
		],
		'reserved': [
			'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER'
		]
	}
	,'OPERATORS' :[
		'+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'REGEXPS' : {
		// highlight all variables (@...)
		'variables' : {
			'search' : '()(\\@\\w+)()'
			,'class' : 'variables'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #008000;'
		,'QUOTESMARKS': 'color: #FF0000;'
		,'KEYWORDS' : {
			'reserved' : 'color: #808080;'
			,'functions' : 'color: #FF00FF;'
			,'statements' : 'color: #0000FF;'
			}
		,'OPERATORS' : 'color: #808080;'
		,'DELIMITERS' : 'color: #FF8000;'
		,'REGEXPS' : {
			'variables' : 'color: #E0BD54;'
		}		
	}
};

 	  	 

Added applications/admin/static/edit_area/reg_syntax/vb.js version [63e9753680].






















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
editAreaLoader.load_syntax["vb"] = {
	'DISPLAY_NAME' : 'Visual Basic'
	,'COMMENT_SINGLE' : {1 : "'"}
	,'COMMENT_MULTI' : { }
	,'QUOTEMARKS' : {1: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
		'statements' : [
	        'if','then','for','each','while','do','loop',
            'else','elseif','select','case','end select',
            'until','next','step','to','in','end if'
		]
		,'keywords' : [
            'empty','isempty','nothing','null','isnull','true','false',
            'set','call',
            'sub','end sub','function','end function','exit','exit function',
            'dim','Mod','In','private','public','shared','const'
        ]

		,'functions' : [
			'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime',
            'Hour','IsDate','Minute','Month',
            'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year',
            'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency',
            'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct',
            'Rnd','Sgn','Sin','Sqr','Tan',
            'Array','Filter','IsArray','Join','LBound','Split','UBound',
            'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp',
            'String','StrReverse','UCase',
            'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric',
            'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion',
            'ScriptEngineMinorVersion','SetLocale','TypeName','VarType'
		]
	}
	,'OPERATORS' :[
		'+', '-', '/', '*', '=', '<', '>', '!', '&'
	]
	,'DELIMITERS' :[
		'(', ')', '[', ']', '{', '}'
	]
	,'STYLES' : {
		'COMMENTS': 'color: #99CC00;'
		,'QUOTESMARKS': 'color: #333399;'
		,'KEYWORDS' : {
			'keywords' : 'color: #3366FF;'
			,'functions' : 'color: #0000FF;'
			,'statements' : 'color: #3366FF;'
			}
		,'OPERATORS' : 'color: #FF0000;'
		,'DELIMITERS' : 'color: #0000FF;'

	}
};

Added applications/admin/static/edit_area/reg_syntax/xml.js version [94e1af4c20].


























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
* last update: 2006-08-24
*/

editAreaLoader.load_syntax["xml"] = {
	'DISPLAY_NAME' : 'XML'
	,'COMMENT_SINGLE' : {}
	,'COMMENT_MULTI' : {'<!--' : '-->'}
	,'QUOTEMARKS' : {1: "'", 2: '"'}
	,'KEYWORD_CASE_SENSITIVE' : false
	,'KEYWORDS' : {
	}
	,'OPERATORS' :[
	]
	,'DELIMITERS' :[
	]
	,'REGEXPS' : {
		'xml' : {
			'search' : '()(<\\?[^>]*?\\?>)()'
			,'class' : 'xml'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
		,'cdatas' : {
			'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'
			,'class' : 'cdata'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
		,'tags' : {
			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
			,'class' : 'tags'
			,'modifiers' : 'gi'
			,'execute' : 'before' // before or after
		}
		,'attributes' : {
			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
			,'class' : 'attributes'
			,'modifiers' : 'g'
			,'execute' : 'before' // before or after
		}
	}
	,'STYLES' : {
		'COMMENTS': 'color: #AAAAAA;'
		,'QUOTESMARKS': 'color: #6381F8;'
		,'KEYWORDS' : {
			}
		,'OPERATORS' : 'color: #E775F0;'
		,'DELIMITERS' : ''
		,'REGEXPS' : {
			'attributes': 'color: #B1AC41;'
			,'tags': 'color: #E62253;'
			,'xml': 'color: #8DCFB5;'
			,'cdata': 'color: #50B020;'
		}	
	}		
};

Added applications/admin/static/edit_area/regexp.js version [2f01ca545d].












































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	/*EditArea.prototype.comment_or_quotes= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){
		new_class="quotes";
		if(v6 && v6 != undefined && v6!="")
			new_class="comments";
		return "µ__"+ new_class +"__µ"+v0+"µ_END_µ";

	};*/
	
/*	EditArea.prototype.htmlTag= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){
		res="<span class=htmlTag>"+v2;
		alert("v2: "+v2+" v3: "+v3);
		tab=v3.split("=");
		attributes="";
		if(tab.length>1){
			attributes="<span class=attribute>"+tab[0]+"</span>=";
			for(i=1; i<tab.length-1; i++){
				cut=tab[i].lastIndexOf("&nbsp;");				
				attributes+="<span class=attributeVal>"+tab[i].substr(0,cut)+"</span>";
				attributes+="<span class=attribute>"+tab[i].substr(cut)+"</span>=";
			}
			attributes+="<span class=attributeVal>"+tab[tab.length-1]+"</span>";
		}		
		res+=attributes+v5+"</span>";
		return res;		
	};*/
	
	// determine if the selected text if a comment or a quoted text
	EditArea.prototype.comment_or_quote= function(){
		var new_class="", close_tag="", sy, arg, i;
		sy 		= parent.editAreaLoader.syntax[editArea.current_code_lang];
		arg		= EditArea.prototype.comment_or_quote.arguments[0];
		
		for( i in sy["quotes"] ){
			if(arg.indexOf(i)==0){
				new_class="quotesmarks";
				close_tag=sy["quotes"][i];
			}
		}
		if(new_class.length==0)
		{
			for(var i in sy["comments"]){
				if( arg.indexOf(i)==0 ){
					new_class="comments";
					close_tag=sy["comments"][i];
				}
			}
		}
		// for single line comment the \n must not be included in the span tags
		if(close_tag=="\n"){
			return "µ__"+ new_class +"__µ"+ arg.replace(/(\r?\n)?$/m, "µ_END_µ$1");
		}else{
			// the closing tag must be set only if the comment or quotes is closed 
			reg= new RegExp(parent.editAreaLoader.get_escaped_regexp(close_tag)+"$", "m");
			if( arg.search(reg)!=-1 )
				return "µ__"+ new_class +"__µ"+ arg +"µ_END_µ";
			else
				return "µ__"+ new_class +"__µ"+ arg;
		}
	};
	
/*
	// apply special tags arround text to highlight
	EditArea.prototype.custom_highlight= function(){
		res= EditArea.prototype.custom_highlight.arguments[1]+"µ__"+ editArea.reg_exp_span_tag +"__µ" + EditArea.prototype.custom_highlight.arguments[2]+"µ_END_µ";
		if(EditArea.prototype.custom_highlight.arguments.length>5)
			res+= EditArea.prototype.custom_highlight.arguments[ EditArea.prototype.custom_highlight.arguments.length-3 ];
		return res;
	};
	*/
	
	// return identication that allow to know if revalidating only the text line won't make the syntax go mad
	EditArea.prototype.get_syntax_trace= function(text){
		if(this.settings["syntax"].length>0 && parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"])
			return text.replace(parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"], "$3");
	};
	
		
	EditArea.prototype.colorize_text= function(text){
		//text="<div id='result' class='area' style='position: relative; z-index: 4; height: 500px; overflow: scroll;border: solid black 1px;'> ";
	  /*		
		if(this.isOpera){	
			// opera can't use pre element tabulation cause a tab=6 chars in the textarea and 8 chars in the pre 
			text= this.replace_tab(text);
		}*/
		
		text= " "+text; // for easier regExp
		
		/*if(this.do_html_tags)
			text= text.replace(/(<[a-z]+ [^>]*>)/gi, '[__htmlTag__]$1[_END_]');*/
		if(this.settings["syntax"].length>0)
			text= this.apply_syntax(text, this.settings["syntax"]);

		// remove the first space added
		return text.substr(1).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/µ_END_µ/g,"</span>").replace(/µ__([a-zA-Z0-9]+)__µ/g,"<span class='$1'>");
	};
	
	EditArea.prototype.apply_syntax= function(text, lang){
		var sy;
		this.current_code_lang=lang;
	
		if(!parent.editAreaLoader.syntax[lang])
			return text;
			
		sy = parent.editAreaLoader.syntax[lang];
		if(sy["custom_regexp"]['before']){
			for( var i in sy["custom_regexp"]['before']){
				var convert="$1µ__"+ sy["custom_regexp"]['before'][i]['class'] +"__µ$2µ_END_µ$3";
				text= text.replace(sy["custom_regexp"]['before'][i]['regexp'], convert);
			}
		}
		
		if(sy["comment_or_quote_reg_exp"]){
			//setTimeout("_$('debug_area').value=editArea.comment_or_quote_reg_exp;", 500);
			text= text.replace(sy["comment_or_quote_reg_exp"], this.comment_or_quote);
		}
		
		if(sy["keywords_reg_exp"]){
			for(var i in sy["keywords_reg_exp"]){	
				text= text.replace(sy["keywords_reg_exp"][i], 'µ__'+i+'__µ$2µ_END_µ');
			}			
		}
		
		if(sy["delimiters_reg_exp"]){
			text= text.replace(sy["delimiters_reg_exp"], 'µ__delimiters__µ$1µ_END_µ');
		}		
		
		if(sy["operators_reg_exp"]){
			text= text.replace(sy["operators_reg_exp"], 'µ__operators__µ$1µ_END_µ');
		}
		
		if(sy["custom_regexp"]['after']){
			for( var i in sy["custom_regexp"]['after']){
				var convert="$1µ__"+ sy["custom_regexp"]['after'][i]['class'] +"__µ$2µ_END_µ$3";
				text= text.replace(sy["custom_regexp"]['after'][i]['regexp'], convert);			
			}
		}
			
		return text;
	};

Added applications/admin/static/edit_area/resize_area.js version [faaa3500bb].










































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	
	EditAreaLoader.prototype.start_resize_area= function(){
		var d=document,a,div,width,height,father;
		
		d.onmouseup= editAreaLoader.end_resize_area;
		d.onmousemove= editAreaLoader.resize_area;
		editAreaLoader.toggle(editAreaLoader.resize["id"]);		
		
		a	= editAreas[editAreaLoader.resize["id"]]["textarea"];
		div	= d.getElementById("edit_area_resize");
		if(!div){
			div= d.createElement("div");
			div.id="edit_area_resize";
			div.style.border="dashed #888888 1px";
		}
		width	= a.offsetWidth -2;
		height	= a.offsetHeight -2;
		
		div.style.display	= "block";
		div.style.width		= width+"px";
		div.style.height	= height+"px";
		father= a.parentNode;
		father.insertBefore(div, a);
		
		a.style.display="none";
				
		editAreaLoader.resize["start_top"]= calculeOffsetTop(div);
		editAreaLoader.resize["start_left"]= calculeOffsetLeft(div);		
	};
	
	EditAreaLoader.prototype.end_resize_area= function(e){
		var d=document,div,a,width,height;
		
		d.onmouseup="";
		d.onmousemove="";		
		
		div		= d.getElementById("edit_area_resize");		
		a= editAreas[editAreaLoader.resize["id"]]["textarea"];
		width	= Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);
		height	= Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);
		if(editAreaLoader.isIE==6){
			width-=2;
			height-=2;	
		}
		a.style.width		= width+"px";
		a.style.height		= height+"px";
		div.style.display	= "none";
		a.style.display		= "inline";
		a.selectionStart	= editAreaLoader.resize["selectionStart"];
		a.selectionEnd		= editAreaLoader.resize["selectionEnd"];
		editAreaLoader.toggle(editAreaLoader.resize["id"]);
		
		return false;
	};
	
	EditAreaLoader.prototype.resize_area= function(e){		
		var allow,newHeight,newWidth;
		allow	= editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"];
		if(allow=="both" || allow=="y")
		{
			newHeight	= Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]);
			document.getElementById("edit_area_resize").style.height= newHeight+"px";
		}
		if(allow=="both" || allow=="x")
		{
			newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]);
			document.getElementById("edit_area_resize").style.width= newWidth+"px";
		}
		
		return false;
	};
	
	editAreaLoader.waiting_loading["resize_area.js"]= "loaded";

Added applications/admin/static/edit_area/search_replace.js version [0532ecc3a0].















































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	EditArea.prototype.show_search = function(){
		if(_$("area_search_replace").style.visibility=="visible"){
			this.hidden_search();
		}else{
			this.open_inline_popup("area_search_replace");
			var text= this.area_get_selection();
			var search= text.split("\n")[0];
			_$("area_search").value= search;
			_$("area_search").focus();
		}
	};
	
	EditArea.prototype.hidden_search= function(){
		/*_$("area_search_replace").style.visibility="hidden";
		this.textarea.focus();
		var icon= _$("search");
		setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );*/
		this.close_inline_popup("area_search_replace");
	};
	
	EditArea.prototype.area_search= function(mode){
		
		if(!mode)
			mode="search";
		_$("area_search_msg").innerHTML="";		
		var search=_$("area_search").value;		
		
		this.textarea.focus();		
		this.textarea.textareaFocused=true;
		
		var infos= this.get_selection_infos();	
		var start= infos["selectionStart"];
		var pos=-1;
		var pos_begin=-1;
		var length=search.length;
		
		if(_$("area_search_replace").style.visibility!="visible"){
			this.show_search();
			return;
		}
		if(search.length==0){
			_$("area_search_msg").innerHTML=this.get_translation("search_field_empty");
			return;
		}
		// advance to the next occurence if no text selected
		if(mode!="replace" ){
			if(_$("area_search_reg_exp").checked)
				start++;
			else
				start+= search.length;
		}
		
		//search
		if(_$("area_search_reg_exp").checked){
			// regexp search
			var opt="m";
			if(!_$("area_search_match_case").checked)
				opt+="i";
			var reg= new RegExp(search, opt);
			pos= infos["full_text"].substr(start).search(reg);
			pos_begin= infos["full_text"].search(reg);
			if(pos!=-1){
				pos+=start;
				length=infos["full_text"].substr(start).match(reg)[0].length;
			}else if(pos_begin!=-1){
				length=infos["full_text"].match(reg)[0].length;
			}
		}else{
			if(_$("area_search_match_case").checked){
				pos= infos["full_text"].indexOf(search, start); 
				pos_begin= infos["full_text"].indexOf(search); 
			}else{
				pos= infos["full_text"].toLowerCase().indexOf(search.toLowerCase(), start); 
				pos_begin= infos["full_text"].toLowerCase().indexOf(search.toLowerCase()); 
			}		
		}
		
		// interpret result
		if(pos==-1 && pos_begin==-1){
			_$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+this.get_translation("not_found");
			return;
		}else if(pos==-1 && pos_begin != -1){
			begin= pos_begin;
			_$("area_search_msg").innerHTML=this.get_translation("restart_search_at_begin");
		}else
			begin= pos;
		
		//_$("area_search_msg").innerHTML+="<strong>"+search+"</strong> found at "+begin+" strat at "+start+" pos "+pos+" curs"+ infos["indexOfCursor"]+".";
		if(mode=="replace" && pos==infos["indexOfCursor"]){
			var replace= _$("area_replace").value;
			var new_text="";			
			if(_$("area_search_reg_exp").checked){
				var opt="m";
				if(!_$("area_search_match_case").checked)
					opt+="i";
				var reg= new RegExp(search, opt);
				new_text= infos["full_text"].substr(0, begin) + infos["full_text"].substr(start).replace(reg, replace);
			}else{
				new_text= infos["full_text"].substr(0, begin) + replace + infos["full_text"].substr(begin + length);
			}
			this.textarea.value=new_text;
			this.area_select(begin, length);
			this.area_search();
		}else
			this.area_select(begin, length);
	};
	
	
	
	
	EditArea.prototype.area_replace= function(){		
		this.area_search("replace");
	};
	
	EditArea.prototype.area_replace_all= function(){
	/*	this.area_select(0, 0);
		_$("area_search_msg").innerHTML="";
		while(_$("area_search_msg").innerHTML==""){
			this.area_replace();
		}*/
	
		var base_text= this.textarea.value;
		var search= _$("area_search").value;		
		var replace= _$("area_replace").value;
		if(search.length==0){
			_$("area_search_msg").innerHTML=this.get_translation("search_field_empty");
			return ;
		}
		
		var new_text="";
		var nb_change=0;
		if(_$("area_search_reg_exp").checked){
			// regExp
			var opt="mg";
			if(!_$("area_search_match_case").checked)
				opt+="i";
			var reg= new RegExp(search, opt);
			nb_change= infos["full_text"].match(reg).length;
			new_text= infos["full_text"].replace(reg, replace);
			
		}else{
			
			if(_$("area_search_match_case").checked){
				var tmp_tab=base_text.split(search);
				nb_change= tmp_tab.length -1 ;
				new_text= tmp_tab.join(replace);
			}else{
				// case insensitive
				var lower_value=base_text.toLowerCase();
				var lower_search=search.toLowerCase();
				
				var start=0;
				var pos= lower_value.indexOf(lower_search);				
				while(pos!=-1){
					nb_change++;
					new_text+= this.textarea.value.substring(start , pos)+replace;
					start=pos+ search.length;
					pos= lower_value.indexOf(lower_search, pos+1);
				}
				new_text+= this.textarea.value.substring(start);				
			}
		}			
		if(new_text==base_text){
			_$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+this.get_translation("not_found");
		}else{
			this.textarea.value= new_text;
			_$("area_search_msg").innerHTML="<strong>"+nb_change+"</strong> "+this.get_translation("occurrence_replaced");
			// firefox and opera doesn't manage with the focus if it's done directly
			//editArea.textarea.focus();editArea.textarea.textareaFocused=true;
			setTimeout("editArea.textarea.focus();editArea.textarea.textareaFocused=true;", 100);
		}
		
		
	};

Added applications/admin/static/edit_area/template.html version [a289be8fcc].





































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
	<title>EditArea</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
	[__CSSRULES__]
	[__JSCODE__]
</head>
<body>
	<div id='editor'>
		<div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div>
		<div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div>
		<div id='result'>
			<div id='no_file_selected'></div>
			<div id='container'>
				<div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div>
				<div id='end_bracket' class='edit_area_cursor'>&nbsp;</div>
				<div id='selection_field'></div>
				<div id='line_number' selec='none'></div>
				<div id='content_highlight'></div>
				<div id='test_font_size'></div>
				<div id='selection_field_text'></div>
				<textarea id='textarea' wrap='off' onchange='editArea.execCommand("onchange");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'>
				</textarea>
				
			</div>
		</div>
		<div class='area_toolbar' id='toolbar_2'>
			<table class='statusbar' cellspacing='0' cellpadding='0'>
				<tr>
					<td class='total' selec='none'>{$position}:</td>
					<td class='infos' selec='none'>
						{$line_abbr} <span  id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span>
					</td>
					<td class='total' selec='none'>{$total}:</td>
					<td class='infos' selec='none'>
						{$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span>
					</td>
					<td class='resize'>
						<span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div id='processing'>
		<div id='processing_text'>
			{$processing}
		</div>
	</div>

	<div id='area_search_replace' class='editarea_popup'>
		<table cellspacing='2' cellpadding='0' style='width: 100%'>
			<tr>
				<td selec='none'>{$search}</td>
				<td><input type='text' id='area_search' /></td>
				<td id='close_area_search_replace'>
					<a onclick='Javascript:editArea.execCommand("hidden_search")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br />
			</tr><tr>
				<td selec='none'>{$replace}</td>
				<td><input type='text' id='area_replace' /></td>
				<td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["frame_"+editArea.id]);'  src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td>
			</tr>
		</table>
		<div class='button'>
			<input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label>
			<input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label>
			<br />
			<a onclick='Javascript:editArea.execCommand("area_search")' selec='none'>{$find_next}</a>
			<a onclick='Javascript:editArea.execCommand("area_replace")' selec='none'>{$replace}</a>
			<a onclick='Javascript:editArea.execCommand("area_replace_all")' selec='none'>{$replace_all}</a><br />
		</div>
		<div id='area_search_msg' selec='none'></div>
	</div>
	<div id='edit_area_help' class='editarea_popup'>
		<div class='close_popup'>
			<a onclick='Javascript:editArea.execCommand("close_all_inline_popup")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a>
		</div>
		<div><h2>Editarea [__EA_VERSION__]</h2><br />
			<h3>{$shortcuts}:</h3>
				{$tab}: {$add_tab}<br />
				{$shift}+{$tab}: {$remove_tab}<br />
				{$ctrl}+f: {$search_command}<br />
				{$ctrl}+r: {$replace_command}<br />
				{$ctrl}+h: {$highlight}<br />
				{$ctrl}+g: {$go_to_line}<br />
				{$ctrl}+z: {$undo}<br />
				{$ctrl}+y: {$redo}<br />
				{$ctrl}+e: {$help}<br />
				{$ctrl}+q, {$esc}: {$close_popup}<br />
				{$accesskey} E: {$toggle}<br />
			<br />
			<em>{$about_notice}</em>
			<br /><div class='copyright'>&copy; Christophe Dolivet 2007-2010</div>
		</div>
	</div>
</body>
</html>

Added applications/admin/static/images/delete_icon.png version [d573cfdeee].

cannot compute difference between binary files

Added applications/admin/static/images/dim_bullet.gif version [d53e9d0a2a].

cannot compute difference between binary files

Added applications/admin/static/images/embossed.png version [168974e82f].

cannot compute difference between binary files

Added applications/admin/static/images/folder.png version [1c17d74b7a].

cannot compute difference between binary files

Added applications/admin/static/images/folder_locked.png version [dd391b7de5].

cannot compute difference between binary files

Added applications/admin/static/images/folder_sm.png version [d40f7c66fa].

cannot compute difference between binary files

Added applications/admin/static/images/header_bg.png version [6b1529a9a0].

cannot compute difference between binary files

Added applications/admin/static/images/header_shadow.png version [4a01bfceaa].

cannot compute difference between binary files

Added applications/admin/static/images/help.png version [7a6350f490].

cannot compute difference between binary files

Added applications/admin/static/images/menu.png version [0bb3f931fb].

cannot compute difference between binary files

Added applications/admin/static/images/red_bullet.gif version [5e995602bf].

cannot compute difference between binary files

Added applications/admin/static/images/save_icon.png version [0f41eb9082].

cannot compute difference between binary files

Added applications/admin/static/images/search.png version [e2438b26a3].

cannot compute difference between binary files

Added applications/admin/static/images/section_bullet.png version [487e05277c].

cannot compute difference between binary files

Added applications/admin/static/images/sidebar_background.jpg version [850be3c7af].

cannot compute difference between binary files

Added applications/admin/static/images/sidebar_bullet.gif version [72190be424].

cannot compute difference between binary files

Added applications/admin/static/images/sidebar_bullet.png version [739794c462].

cannot compute difference between binary files

Added applications/admin/static/images/small_button.png version [b47945c789].

cannot compute difference between binary files

Added applications/admin/static/images/small_special_button.png version [12e24c2221].

cannot compute difference between binary files

Added applications/admin/static/images/spinner.gif version [9a73135f6a].

cannot compute difference between binary files

Added applications/admin/static/images/start.png version [dd22b44162].

cannot compute difference between binary files

Added applications/admin/static/images/test_icon.png version [1dd6e5df38].

cannot compute difference between binary files

Added applications/admin/static/images/ticket_section.png version [dccc07cb6f].

cannot compute difference between binary files

Added applications/admin/static/js/ajax_editor.js version [590e8cbb3d].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function prepareDataForSave(name,data) {
    var obj = new Object();
    obj.Name = name;
    obj.Data = data;
    return obj;
}

function prepareMultiPartPOST(data) {
    // var boundary = 'sPlItME' + Math.floor(Math.random()*10000);
    var boundary = '' + Math.floor(Math.random()*10000);
    var reqdata = '--' + boundary + '\r\n';
    //console.log(data.length);
    for (var i=0;i < data.length;i++)
	{
	    reqdata += 'content-disposition: form-data; name="' + data[i].Name + '"';
	    reqdata += "\r\n\r\n" ;
	    reqdata +=  data[i].Data;
	    reqdata += "\r\n" ;
	    reqdata += '--' + boundary + '\r\n';
	}
    return new Array(reqdata,boundary);
}

function on_error() {
    jQuery("input[name='saved_on']").attr('style','background-color:red');
    jQuery("input[name='saved_on']").val('communication error');
}

function doClickSave() {
    try {
	var data = eamy.instances[0].getText();
    } catch(e) {
	var data = area.textarea.value;
    }
    var dataForPost = prepareMultiPartPOST(new Array(
	prepareDataForSave('data', data),
	prepareDataForSave('file_hash', jQuery("input[name='file_hash']").val()),
	prepareDataForSave('saved_on', jQuery("input[name='saved_on']").val()),
	prepareDataForSave('from_ajax','true')));
    // console.info(area.textarea.value);
        jQuery("input[name='saved_on']").attr('style','background-color:yellow');
	jQuery("input[name='saved_on']").val('saving now...')
	jQuery.ajax({
	  type: "POST",
	  contentType: 'multipart/form-data;boundary="' + dataForPost[1] + '"',
	  url: self.location.href,
	  dataType: "json",
	  data: dataForPost[0],
	  timeout: 5000,
      beforeSend: function(xhr) {
            xhr.setRequestHeader('web2py-component-location',document.location);
            xhr.setRequestHeader('web2py-component-element','doClickSave');},
	  success: function(json,text,xhr){
	  
	        // show flash message (if any)
	        var flash=xhr.getResponseHeader('web2py-component-flash');
            if (flash) jQuery('.flash').html(flash).slideDown();
            else jQuery('.flash').hide();

            // reenable disabled submit button
		    var t=jQuery("input[name='save']");
		    t.attr('class','');
            t.attr('disabled','');

		    try {
			if (json.error) {
			    window.location.href=json.redirect;
			} else {
			    // console.info( json.file_hash );
			    jQuery("input[name='file_hash']").val(json.file_hash);
			    jQuery("input[name='saved_on']").val(json.saved_on);
			    if (json.highlight) {
			        editAreaLoader.setSelectionRange('body', json.highlight.start, json.highlight.end);
			    } else {
			        jQuery("input[name='saved_on']").attr('style','background-color:#99FF99');
			        jQuery(".flash").delay(1000).fadeOut('slow'); 
			    }
			    // console.info(jQuery("input[name='file_hash']").val());
			    
			    var output = '<b>exposes:</b> ';
			    for ( var i in json.functions) {
				output += ' <a href="/' + json.application + '/' + json.controller + '/' + json.functions[i] + '">' + json.functions[i] + '</a>,'; 
			    }
			    if(output!='<b>exposes:</b> ') {
				jQuery("#exposed").html( output.substring(0, output.length-1));
			    }
			}
                    } catch(e) {
			on_error();
		    }
		},
	  error: function(json) { on_error(); } 
	});
	return false;
}

function keepalive(url) {
	jQuery.ajax({
	  type: "GET",
	  url: url,
	  timeout: 1000,
	  success: function(){},
	  error: function(x) { on_error(); } });
}

Added applications/admin/static/js/calendar.js version [dabf984f8c].

cannot compute difference between binary files

Added applications/admin/static/js/jquery.hotkeys.js version [c9e0a0a1a4].





















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
(c) Copyrights 2007 - 2008

Original idea by by Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
 
jQuery Plugin by Tzury Bar Yochay 
tzury.by@gmail.com
http://evalinux.wordpress.com
http://facebook.com/profile.php?id=513676303

Project's sites: 
http://code.google.com/p/js-hotkeys/
http://github.com/tzuryby/hotkeys/tree/master

License: same as jQuery license. 

USAGE:
    // simple usage
    $(document).bind('keydown', 'Ctrl+c', function(){ alert('copy anyone?');});
    
    // special options such as disableInIput
    $(document).bind('keydown', {combi:'Ctrl+x', disableInInput: true} , function() {});
    
Note:
    This plugin wraps the following jQuery methods: $.fn.find, $.fn.bind and $.fn.unbind
    
*/


(function (jQuery){
    // keep reference to the original $.fn.bind and $.fn.unbind
    jQuery.fn.__bind__ = jQuery.fn.bind;
    jQuery.fn.__unbind__ = jQuery.fn.unbind;
    jQuery.fn.__find__ = jQuery.fn.find;
    
    var hotkeys = {
        version: '0.7.8',
        override: /keydown|keypress|keyup/g,
        triggersMap: {},
        
        specialKeys: { 27: 'esc', 9: 'tab', 32:'space', 13: 'return', 8:'backspace', 145: 'scroll', 
            20: 'capslock', 144: 'numlock', 19:'pause', 45:'insert', 36:'home', 46:'del',
            35:'end', 33: 'pageup', 34:'pagedown', 37:'left', 38:'up', 39:'right',40:'down', 
            112:'f1',113:'f2', 114:'f3', 115:'f4', 116:'f5', 117:'f6', 118:'f7', 119:'f8', 
            120:'f9', 121:'f10', 122:'f11', 123:'f12' },
        
        shiftNums: { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", 
            "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", 
            ".":">",  "/":"?",  "\\":"|" },
        
        newTrigger: function (type, combi, callback) { 
            // i.e. {'keyup': {'ctrl': {cb: callback, disableInInput: false}}}
            var result = {};
            result[type] = {};
            result[type][combi] = {cb: callback, disableInInput: false};
            return result;
        }
    };
    // add firefox num pad char codes
    if (jQuery.browser.mozilla){
        hotkeys.specialKeys = jQuery.extend(hotkeys.specialKeys, { 96: '0', 97:'1', 98: '2', 99: 
            '3', 100: '4', 101: '5', 102: '6', 103: '7', 104: '8', 105: '9' });
    }
    
    // a wrapper around of $.fn.find 
    // see more at: http://groups.google.com/group/jquery-en/browse_thread/thread/18f9825e8d22f18d
    jQuery.fn.find = function( selector ) {
        this.query=selector;
        return jQuery.fn.__find__.apply(this, arguments);
	};
    
    jQuery.fn.unbind = function (type, combi, fn){
        if (jQuery.isFunction(combi)){
            fn = combi;
            combi = null;
        }
        if (combi && typeof combi === 'string'){
            var selectorId = ((this.prevObject && this.prevObject.query) || (this[0].id && this[0].id) || this[0]).toString();
            var hkTypes = type.split(' ');
            for (var x=0; x<hkTypes.length; x++){
                delete hotkeys.triggersMap[selectorId][hkTypes[x]][combi];
            }
        }
        // call jQuery original unbind
        return  this.__unbind__(type, fn);
    };
    
    jQuery.fn.bind = function(type, data, fn){
        // grab keyup,keydown,keypress
        var handle = type.match(hotkeys.override);
        
        if (jQuery.isFunction(data) || !handle){
            // call jQuery.bind only
            return this.__bind__(type, data, fn);
        }
        else{
            // split the job
            var result = null,            
            // pass the rest to the original $.fn.bind
            pass2jq = jQuery.trim(type.replace(hotkeys.override, ''));
            
            // see if there are other types, pass them to the original $.fn.bind
            if (pass2jq){
                // call original jQuery.bind()
                result = this.__bind__(pass2jq, data, fn);
            }            
            
            if (typeof data === "string"){
                data = {'combi': data};
            }
            if(data.combi){
                for (var x=0; x < handle.length; x++){
                    var eventType = handle[x];
                    var combi = data.combi.toLowerCase(),
                        trigger = hotkeys.newTrigger(eventType, combi, fn),
                        selectorId = ((this.prevObject && this.prevObject.query) || (this[0].id && this[0].id) || this[0]).toString();
                        
                    //trigger[eventType][combi].propagate = data.propagate;
                    trigger[eventType][combi].disableInInput = data.disableInInput;
                    
                    // first time selector is bounded
                    if (!hotkeys.triggersMap[selectorId]) {
                        hotkeys.triggersMap[selectorId] = trigger;
                    }
                    // first time selector is bounded with this type
                    else if (!hotkeys.triggersMap[selectorId][eventType]) {
                        hotkeys.triggersMap[selectorId][eventType] = trigger[eventType];
                    }
                    // make trigger point as array so more than one handler can be bound
                    var mapPoint = hotkeys.triggersMap[selectorId][eventType][combi];
                    if (!mapPoint){
                        hotkeys.triggersMap[selectorId][eventType][combi] = [trigger[eventType][combi]];
                    }
                    else if (mapPoint.constructor !== Array){
                        hotkeys.triggersMap[selectorId][eventType][combi] = [mapPoint];
                    }
                    else {
                        hotkeys.triggersMap[selectorId][eventType][combi][mapPoint.length] = trigger[eventType][combi];
                    }
                    
                    // add attribute and call $.event.add per matched element
                    this.each(function(){
                        // jQuery wrapper for the current element
                        var jqElem = jQuery(this);
                        
                        // element already associated with another collection
                        if (jqElem.attr('hkId') && jqElem.attr('hkId') !== selectorId){
                            selectorId = jqElem.attr('hkId') + ";" + selectorId;
                        }
                        jqElem.attr('hkId', selectorId);
                    });
                    result = this.__bind__(handle.join(' '), data, hotkeys.handler)
                }
            }
            return result;
        }
    };
    // work-around for opera and safari where (sometimes) the target is the element which was last 
    // clicked with the mouse and not the document event it would make sense to get the document
    hotkeys.findElement = function (elem){
        if (!jQuery(elem).attr('hkId')){
            if (jQuery.browser.opera || jQuery.browser.safari){
                while (!jQuery(elem).attr('hkId') && elem.parentNode){
                    elem = elem.parentNode;
                }
            }
        }
        return elem;
    };
    // the event handler
    hotkeys.handler = function(event) {
        var target = hotkeys.findElement(event.currentTarget), 
            jTarget = jQuery(target),
            ids = jTarget.attr('hkId');
        
        if(ids){
            ids = ids.split(';');
            var code = event.which,
                type = event.type,
                special = hotkeys.specialKeys[code],
                // prevent f5 overlapping with 't' (or f4 with 's', etc.)
                character = !special && String.fromCharCode(code).toLowerCase(),
                shift = event.shiftKey,
                ctrl = event.ctrlKey,            
                // patch for jquery 1.2.5 && 1.2.6 see more at:  
                // http://groups.google.com/group/jquery-en/browse_thread/thread/83e10b3bb1f1c32b
                alt = event.altKey || event.originalEvent.altKey,
                mapPoint = null;

            for (var x=0; x < ids.length; x++){
                if (hotkeys.triggersMap[ids[x]][type]){
                    mapPoint = hotkeys.triggersMap[ids[x]][type];
                    break;
                }
            }
            
            //find by: id.type.combi.options            
            if (mapPoint){ 
                var trigger;
                // event type is associated with the hkId
                if(!shift && !ctrl && !alt) { // No Modifiers
                    trigger = mapPoint[special] ||  (character && mapPoint[character]);
                }
                else{
                    // check combinations (alt|ctrl|shift+anything)
                    var modif = '';
                    if(alt) modif +='alt+';
                    if(ctrl) modif+= 'ctrl+';
                    if(shift) modif += 'shift+';
                    
                    // modifiers + special keys or modifiers + character or modifiers + shift character or just shift character
                    trigger = mapPoint[modif+special];
                    if (!trigger){
                        if (character){
                            trigger = mapPoint[modif+character] 
                                || mapPoint[modif+hotkeys.shiftNums[character]]
                                // '$' can be triggered as 'Shift+4' or 'Shift+$' or just '$'
                                || (modif === 'shift+' && mapPoint[hotkeys.shiftNums[character]]);
                        }
                    }
                }
                if (trigger){
                    var result = false;
                    for (var x=0; x < trigger.length; x++){
                        if(trigger[x].disableInInput){
                            // double check event.currentTarget and event.target
                            var elem = jQuery(event.target);
                            if (jTarget.is("input") || jTarget.is("textarea") 
                                || elem.is("input") || elem.is("textarea")) {
                                return true;
                            }
                        }
                        // call the registered callback function
                        result = result || trigger[x].cb.apply(this, [event]);
                    }
                    return result;
                }
            }
        }
    };
    // place it under window so it can be extended and overridden by others
    window.hotkeys = hotkeys;
    return jQuery;
})(jQuery);

Added applications/admin/static/js/jquery.js version [7622c9ac23].

cannot compute difference between binary files

Added applications/admin/static/js/jquery.timeentry.js version [76d26ba919].



























































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
   http://keith-wood.name/timeEntry.html
   Time entry for jQuery v1.4.8.
   Written by Keith Wood (kbwood{at}iinet.com.au) June 2007.
   Minor changes by Massimo Di Pierro Nov 2010 (simplified and changed behavior)
   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. 
   Please attribute the author if you use it.

   Turn an input field into an entry point for a time value.
   The time can be entered via directly typing the value,
   via the arrow keys.
   It is configurable to show 12 or 24-hour time, to show or hide seconds,
   to enforce a minimum and/or maximum time, to change the spinner image.

   Example:  jQuery('input.time').timeEntry();
*/

(function(jQuery) { // Hide scope, no jQuery conflict

    var PROP_NAME = 'timeEntry';
    
    /* TimeEntry manager.
       Use the singleton instance of this class, jQuery.timeEntry, to interact with the time entry
       functionality. Settings for (groups of) fields are maintained in an instance object
       (TimeEntryInstance), allowing multiple different settings on the same page. 
    */
    
    function TimeEntry() {
	this._disabledInputs = []; // List of time entry inputs that have been disabled
	this._defaults = {
	    showSeconds: true, // True to show seconds as well, false for hours/minutes only
	    defaultTime: null, // The time to use if none has been set, leave at null for now
	    minTime: null, // The earliest selectable time, or null for no limit
	    maxTime: null, // The latest selectable time, or null for no limit
	    show24Hours: true, // True to use 24 hour time, false for 12 hour (AM/PM)
	    ampmNames: ['am', 'pm'] // Names of morning/evening markers
	};
	jQuery.extend(this._defaults);
    }
    
    jQuery.extend(TimeEntry.prototype, {
	    /* 
	       Class name added to elements to indicate already configured with time entry. 
	     */
	    markerClassName: 'hasTimeEntry',
		
	    /* Override the default settings for all instances of the time entry.
	       @param  options  (object) the new settings to use as defaults (anonymous object)
	       @return  (DateEntry) this object 
	    */
	    setDefaults: function(options) {
		extendRemove(this._defaults, options || {});
		return this;
	    },
		
	    /* Attach the time entry handler to an input field.
	       @param  target   (element) the field to attach to
	       @param  options  (object) custom settings for this instance 
	    */
	    _connectTimeEntry: function(target, options) {
		var input = jQuery(target);
		if (input.hasClass(this.markerClassName)) {
		    return;
		}
		var inst = {};
		inst.options = jQuery.extend({}, options);
		inst._selectedHour = 0; // The currently selected hour
		inst._selectedMinute = 0; // The currently selected minute
		inst._selectedSecond = 0; // The currently selected second
		inst._field = 0; // The selected subfield
		inst.input = jQuery(target); // The attached input field
		jQuery.data(target, PROP_NAME, inst);
		input.addClass(this.markerClassName).bind('focus.timeEntry', this._doFocus).
		    bind('blur.timeEntry', this._doBlur).bind('click.timeEntry', this._doClick).
		    bind('keydown.timeEntry', this._doKeyDown).bind('keypress.timeEntry', this._doKeyPress);
		// Check pastes
		if (jQuery.browser.mozilla)
		    input.bind('input.timeEntry', function(event) { jQuery.timeEntry._parseTime(inst); });
		if (jQuery.browser.msie)
		    input.bind('paste.timeEntry', function(event) { setTimeout(function() { jQuery.timeEntry._parseTime(inst); }, 1); });
	    },
		
		
	    /* Check whether an input field has been disabled.
	       @param  input  (element) input field to check
	       @return  (boolean) true if this field has been disabled, false if it is enabled 
	    */
	    _isDisabledTimeEntry: function(input) {
		return jQuery.inArray(input, this._disabledInputs) > -1;
	    },
		
	    /* Reconfigure the settings for a time entry field.
	       @param  input    (element) input field to change
	       @param  options  (object) new settings to add or
	       (string) an individual setting name
	       @param  value    (any) the individual setting's value 
	    */
	    _changeTimeEntry: function(input, options, value) {
		var inst = jQuery.data(input, PROP_NAME);
		if (inst) {
		    if (typeof options == 'string') {
			var name = options;
			options = {};
			options[name] = value;
		    }
		    var currentTime = this._extractTime(inst);
		    extendRemove(inst.options, options || {});
		    if (currentTime)
			this._setTime(inst, new Date(0, 0, 0,
						     currentTime[0], currentTime[1], currentTime[2]));
		}
		jQuery.data(input, PROP_NAME, inst);
	    },
		
	    /* Remove the time entry functionality from an input.
	       @param  input  (element) input field to affect 
	    */
	    _destroyTimeEntry: function(input) {
		jQueryinput = jQuery(input);
		if (!jQueryinput.hasClass(this.markerClassName)) return;
		jQueryinput.removeClass(this.markerClassName).unbind('.timeEntry');		
		this._disabledInputs = jQuery.map(this._disabledInputs, function(value) { return (value == input ? null : value); }); // Delete entry
		jQueryinput.parent().replaceWith(jQueryinput);
		jQuery.removeData(input, PROP_NAME);
	    },
		
	    /* Initialise the current time for a time entry input field.
	       @param  input  (element) input field to update
	       @param  time   (Date) the new time (year/month/day ignored) or null for now 
	    */
	    _setTimeTimeEntry: function(input, time) {
		var inst = jQuery.data(input, PROP_NAME);
		if (inst) this._setTime(inst, time ? (typeof time == 'object' ? new Date(time.getTime()) : time) : null);
	    },
		
	    /* Retrieve the current time for a time entry input field.
	       @param  input  (element) input field to examine
	       @return  (Date) current time (year/month/day zero) or null if none 
	    */
	    _getTimeTimeEntry: function(input) {
		var inst = jQuery.data(input, PROP_NAME);
		var currentTime = (inst ? this._extractTime(inst) : null);
		return (!currentTime ? null : new Date(0, 0, 0, currentTime[0], currentTime[1], currentTime[2]));
	    },
		
	    /* Retrieve the millisecond offset for the current time.
	       @param  input  (element) input field to examine
	       @return  (number) the time as milliseconds offset or zero if none 
	    */
	    _getOffsetTimeEntry: function(input) {
		var inst = jQuery.data(input, PROP_NAME);
		var currentTime = (inst ? this._extractTime(inst) : null);
		return (!currentTime ? 0 : (currentTime[0] * 3600 + currentTime[1] * 60 + currentTime[2]) * 1000);
	    },
		
	    /* Initialise time entry.
	       @param  target  (element) the input field or (event) the focus event 
	    */
	    _doFocus: function(target) {
		var input = (target.nodeName && target.nodeName.toLowerCase() == 'input' ? target : this);
		if (jQuery.timeEntry._lastInput == input || jQuery.timeEntry._isDisabledTimeEntry(input)) {
		    jQuery.timeEntry._focussed = false;
		    return;
		}
		var inst = jQuery.data(input, PROP_NAME);
		jQuery.timeEntry._focussed = true;
		jQuery.timeEntry._lastInput = input;
		jQuery.timeEntry._blurredInput = null;
		jQuery.data(input, PROP_NAME, inst);
		jQuery.timeEntry._parseTime(inst);
		setTimeout(function() { jQuery.timeEntry._showField(inst); }, 10);
	    },
		
	    /* Note that the field has been exited.
	       @param  event  (event) the blur event 
	    */
	    _doBlur: function(event) {
		jQuery.timeEntry._blurredInput = jQuery.timeEntry._lastInput;
		jQuery.timeEntry._lastInput = null;
	    },
		
	    /* Select appropriate field portion on click, if already in the field.
	       @param  event  (event) the click event 
	    */
	    _doClick: function(event) {
		var input = event.target;
		var inst = jQuery.data(input, PROP_NAME);
		if (!jQuery.timeEntry._focussed) {
		    var fieldSize = 3;
		    inst._field = 0;
		    if (input.selectionStart != null) { // Use input select range
			for (var field = 0; field <= Math.max(1, inst._secondField, inst._ampmField); field++) {
			    var end = (field != inst._ampmField ? (field * fieldSize) + 2 : (inst._ampmField * fieldSize) + 2);
			    inst._field = field;
			    if (input.selectionStart < end) break;
			}
		    } else if (input.createTextRange) { // Check against bounding boxes
			var src = jQuery(event.srcElement);
			var range = input.createTextRange();
			var convert = function(value) {
			    return {thin: 2, medium: 4, thick: 6}[value] || value;
			};
			var offsetX = event.clientX + document.documentElement.scrollLeft -
			    (src.offset().left + parseInt(convert(src.css('border-left-width')), 10)) -
			    range.offsetLeft; // Position - left edge - alignment
			for (var field = 0; field <= Math.max(1, inst._secondField, inst._ampmField); field++) {
			    var end = (field != inst._ampmField ? (field * fieldSize) + 2 : (inst._ampmField * fieldSize) + 2);
			    range.collapse();
			    range.moveEnd('character', end);
			    inst._field = field;
			    if (offsetX < range.boundingWidth) break; // And compare
			}
		    }
		}
		jQuery.data(input, PROP_NAME, inst);
		jQuery.timeEntry._showField(inst);
		jQuery.timeEntry._focussed = false;
	    },
		
	    /* Handle keystrokes in the field.
	       @param  event  (event) the keydown event
	       @return  (boolean) true to continue, false to stop processing 
	    */
	    _doKeyDown: function(event) {
		if (event.keyCode >= 48) return true;
		var inst = jQuery.data(event.target, PROP_NAME);
		
		switch (event.keyCode) {		
		case 9: 
		    var its = jQuery(':input');
		    its.eq(its.index(this)+(event.shiftKey?-1:+1)).focus();
		    break;
		case 37: jQuery.timeEntry._changeField(inst, -1, false); break; // Previous field on left		    
		case 38: jQuery.timeEntry._adjustField(inst, -1); break; // Increment time field on down
		case 16: if(!event.shiftKey) jQuery.timeEntry._changeField(inst, +1, false); break; // Next field on right
		case 39: jQuery.timeEntry._changeField(inst, +1, false); break; // Next field on right
		case 40: jQuery.timeEntry._adjustField(inst, +1); break; // Decrement time field on up
		case 32: case 46: jQuery.timeEntry._setValue(inst, ''); break; // Clear time on delete
		}
		return false;
	    },
		
	    /* Disallow unwanted characters.
	       @param  event  (event) the keypress event
	       @return  (boolean) true to continue, false to stop processing 
	    */
	    _doKeyPress: function(event) {
		var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
		if (chr < ' ') return true;
		var inst = jQuery.data(event.target, PROP_NAME);
		jQuery.timeEntry._handleKeyPress(inst, chr);
		return false;
	    },
		
	    /* Get a setting value, defaulting if necessary.
	       @param  inst  (object) the instance settings
	       @param  name  (string) the setting name
	       @return  (any) the setting value 
	    */
	    _get: function(inst, name) {
		return (inst.options[name] != null ? inst.options[name] : jQuery.timeEntry._defaults[name]);
	    },
		
	    /* Extract the time value from the input field, or default to now.
	       @param  inst  (object) the instance settings 
	    */
	    _parseTime: function(inst) {
		var currentTime = this._extractTime(inst);
		var showSeconds = this._get(inst, 'showSeconds');
		if (currentTime) {
		    inst._selectedHour = currentTime[0];
		    inst._selectedMinute = currentTime[1];
		    inst._selectedSecond = currentTime[2];
		}
		else {
		    var now = this._constrainTime(inst);
		    inst._selectedHour = now[0];
		    inst._selectedMinute = now[1];
		    inst._selectedSecond = (showSeconds ? now[2] : 0);
		}
		inst._secondField = (showSeconds ? 2 : -1);
		inst._ampmField = (this._get(inst, 'show24Hours') ? -1 : (showSeconds ? 3 : 2));
		inst._lastChr = '';
		inst._field = Math.max(0, Math.min(Math.max(1, inst._secondField, inst._ampmField), 0));
		if (inst.input.val() != '') this._showTime(inst);
	    },
		
	    /* Extract the time value from a string as an array of values, or default to null.
	       @param  inst   (object) the instance settings
	       @param  value  (string) the time value to parse
	       @return  (number[3]) the time components (hours, minutes, seconds)
	       or null if no value 
	    */
	    _extractTime: function(inst, value) {
		value = value || inst.input.val();
		var currentTime = value.split(':');
		var ampmNames = this._get(inst, 'ampmNames');
		var show24Hours = this._get(inst, 'show24Hours');
		if (currentTime.length >= 2) {
		    var isAM = !show24Hours && (value.indexOf(ampmNames[0]) > -1);
		    var isPM = !show24Hours && (value.indexOf(ampmNames[1]) > -1);
		    var hour = parseInt(currentTime[0], 10);
		    hour = (isNaN(hour) ? 0 : hour);
		    hour = ((isAM || isPM) && hour == 12 ? 0 : hour) + (isPM ? 12 : 0);
		    var minute = parseInt(currentTime[1], 10);
		    minute = (isNaN(minute) ? 0 : minute);
		    var second = (currentTime.length >= 3 ?
				  parseInt(currentTime[2], 10) : 0);
		    second = (isNaN(second) || !this._get(inst, 'showSeconds') ? 0 : second);
		    return this._constrainTime(inst, [hour, minute, second]);
		} 
		return null;
	    },
		
	    /* Constrain the given/current time to the time steps.
	       @param  inst    (object) the instance settings
	       @param  fields  (number[3]) the current time components (hours, minutes, seconds)
	       @return  (number[3]) the constrained time components (hours, minutes, seconds) 
	    */
	    _constrainTime: function(inst, fields) {
		var specified = (fields != null);
		if (!specified) {
		    var now = this._determineTime(inst, this._get(inst, 'defaultTime')) || new Date();
		    fields = [now.getHours(), now.getMinutes(), now.getSeconds()];
		}
		return fields;
	    },
		
	    /* Set the selected time into the input field.
	       @param  inst  (object) the instance settings 
	    */
	    _showTime: function(inst) {
		var show24Hours = this._get(inst, 'show24Hours');
		var currentTime = (this._formatNumber(show24Hours ? inst._selectedHour :
						      ((inst._selectedHour + 11) % 12) + 1) + ':' +
				   this._formatNumber(inst._selectedMinute) +
				   (this._get(inst, 'showSeconds') ? ':' +
				    this._formatNumber(inst._selectedSecond) : '') +
				   (show24Hours ?  '' : this._get(inst, 'ampmNames')[(inst._selectedHour < 12 ? 0 : 1)]));
		this._setValue(inst, currentTime);
		this._showField(inst);
	    },
		
	    /* Highlight the current time field.
	       @param  inst  (object) the instance settings 
	    */
	    _showField: function(inst) {
		var input = inst.input[0];
		if (inst.input.is(':hidden') || jQuery.timeEntry._lastInput != input) return;
		var fieldSize = 3;
		var start = (inst._field == inst._ampmField ? (inst._ampmField * fieldSize) - 1 : (inst._field * fieldSize));
		var end = start + (inst._field == inst._ampmField ? 2 : 2);
		if (input.setSelectionRange) { // Mozilla
		    input.setSelectionRange(start, end);
		}
		else if (input.createTextRange) { // IE
		    var range = input.createTextRange();
		    range.moveStart('character', start);
		    range.moveEnd('character', end - inst.input.val().length);
		    range.select();
		}
		if (!input.disabled) input.focus();
	    },
		
	    /* Ensure displayed single number has a leading zero.
	       @param  value  (number) current value
	       @return  (string) number with at least two digits 
	    */
	    _formatNumber: function(value) {
		return (value < 10 ? '0' : '') + value;
	    },
		
	    /* Update the input field and notify listeners.
	       @param  inst   (object) the instance settings
	       @param  value  (string) the new value 
	    */
	    _setValue: function(inst, value) {
		if (value != inst.input.val()) inst.input.val(value).trigger('change');
	    },
		
	    /* Move to previous/next field, or out of field altogether if appropriate.
	       @param  inst     (object) the instance settings
	       @param  offset   (number) the direction of change (-1, +1)
	       @param  moveOut  (boolean) true if can move out of the field
	       @return  (boolean) true if exitting the field, false if not 
	    */
	    _changeField: function(inst, offset, moveOut) {
		var atFirstLast = (inst.input.val() == '' || inst._field == (offset == -1 ? 0 : Math.max(1, inst._secondField, inst._ampmField)));
		if (!atFirstLast) inst._field += offset;
		this._showField(inst);
		inst._lastChr = '';
		jQuery.data(inst.input[0], PROP_NAME, inst);
		return (atFirstLast && moveOut);
	    },
		
	    /* Update the current field in the direction indicated.
	       @param  inst    (object) the instance settings
	       @param  offset  (number) the amount to change by 
	    */
	    _adjustField: function(inst, offset) {
		if (inst.input.val() == '') offset = 0;
		this._setTime(inst, new Date(0, 0, 0,
					     inst._selectedHour + (inst._field == 0 ? offset : 0) +
					     (inst._field == inst._ampmField ? offset * 12 : 0),
					     inst._selectedMinute + (inst._field == 1 ? offset : 0),
					     inst._selectedSecond + (inst._field == inst._secondField ? offset : 0)));
	    },
		
	    /* Check against minimum/maximum and display time.
	       @param  inst  (object) the instance settings
	       @param  time  (Date) an actual time or
	       (number) offset in seconds from now or
	       (string) units and periods of offsets from now 
	    */
	    _setTime: function(inst, time) {
		time = this._determineTime(inst, time);
		var fields = this._constrainTime(inst, time ?
						 [time.getHours(), time.getMinutes(), time.getSeconds()] : null);
		time = new Date(0, 0, 0, fields[0], fields[1], fields[2]);
		// Normalise to base date
		var time = this._normaliseTime(time);
		var minTime = this._normaliseTime(this._determineTime(inst, this._get(inst, 'minTime')));
		var maxTime = this._normaliseTime(this._determineTime(inst, this._get(inst, 'maxTime')));
		// Ensure it is within the bounds set
		time = (minTime && time < minTime ? minTime :
			(maxTime && time > maxTime ? maxTime : time));
		inst._selectedHour = time.getHours();
		inst._selectedMinute = time.getMinutes();
		inst._selectedSecond = time.getSeconds();
		this._showTime(inst);
		jQuery.data(inst.input[0], PROP_NAME, inst);
	    },

		/* Normalise time object to a common date.
		   @param  time  (Date) the original time
		   @return  (Date) the normalised time 
		*/
		_normaliseTime: function(time) {
		if (!time) return null;
		time.setFullYear(1900);
		time.setMonth(0);
		time.setDate(0);
		return time;
	    },
		
	    /* A time may be specified as an exact value or a relative one.
	       @param  inst     (object) the instance settings
	       @param  setting  (Date) an actual time or
	       (number) offset in seconds from now or
	       (string) units and periods of offsets from now
	       @return  (Date) the calculated time 
	    */
	    _determineTime: function(inst, setting) {
		var offsetNumeric = function(offset) { // E.g. +300, -2
		    var time = new Date();
		    time.setTime(time.getTime() + offset * 1000);
		    return time;
		};
		var offsetString = function(offset) { // E.g. '+2m', '-4h', '+3h +30m' or '12:34:56PM'
		    var fields = jQuery.timeEntry._extractTime(inst, offset); // Actual time?
		    var time = new Date();
		    var hour = (fields ? fields[0] : time.getHours());
		    var minute = (fields ? fields[1] : time.getMinutes());
		    var second = (fields ? fields[2] : time.getSeconds());
		    if (!fields) {
			var pattern = /([+-]?[0-9]+)\s*(s|S|m|M|h|H)?/g;
			var matches = pattern.exec(offset);
			while (matches) {
			    switch (matches[2] || 's') {
			    case 's' : case 'S' : second += parseInt(matches[1], 10); break;
			    case 'm' : case 'M' : minute += parseInt(matches[1], 10); break;
			    case 'h' : case 'H' : hour += parseInt(matches[1], 10); break;
			    }
			    matches = pattern.exec(offset);
			}
		    }
		    time = new Date(0, 0, 10, hour, minute, second, 0);
		    if (/^!/.test(offset)) { // No wrapping
			if (time.getDate() > 10)
			    time = new Date(0, 0, 10, 23, 59, 59);
			else if (time.getDate() < 10)
			    time = new Date(0, 0, 10, 0, 0, 0);
		    }
		    return time;
		};
		return (setting ? (typeof setting == 'string' ? offsetString(setting) :
				   (typeof setting == 'number' ? offsetNumeric(setting) : setting)) : null);
	    },
		
	    /* Update time based on keystroke entered.
	       @param  inst  (object) the instance settings
	       @param  chr   (ch) the new character 
	    */
	    _handleKeyPress: function(inst, chr) {
		if (chr == ':') this._changeField(inst, +1, false);
		else if (chr >= '0' && chr <= '9') { // Allow direct entry of time
		    var key = parseInt(chr, 10);
		    var value = parseInt(inst._lastChr + chr, 10);
		    var show24Hours = this._get(inst, 'show24Hours');
		    var hour = (inst._field != 0 ? inst._selectedHour :
				(show24Hours ? (value < 24 ? value : key) :
				 (value >= 1 && value <= 12 ? value :
				  (key > 0 ? key : inst._selectedHour)) % 12 +
				 (inst._selectedHour >= 12 ? 12 : 0)));
		    var minute = (inst._field != 1 ? inst._selectedMinute :
				  (value < 60 ? value : key));
		    var second = (inst._field != inst._secondField ? inst._selectedSecond :
				  (value < 60 ? value : key));
		    var fields = this._constrainTime(inst, [hour, minute, second]);
		    this._setTime(inst, new Date(0, 0, 0, fields[0], fields[1], fields[2]));
		    inst._lastChr = chr;
		}
		else if (!this._get(inst, 'show24Hours')) { // Set am/pm based on first char of names
		    chr = chr.toLowerCase();
		    var ampmNames = this._get(inst, 'ampmNames');
		    if ((chr == ampmNames[0].substring(0, 1).toLowerCase() && inst._selectedHour >= 12) ||
			(chr == ampmNames[1].substring(0, 1).toLowerCase() && inst._selectedHour < 12)) {
			var saveField = inst._field;
			inst._field = inst._ampmField;
			this._adjustField(inst, +1);
			inst._field = saveField;
			this._showField(inst);
		    }
		}
	    }
	});
    
    /* jQuery extend now ignores nulls!
       @param  target  (object) the object to update
       @param  props   (object) the new settings 
       @return  (object) the updated object 
    */
    function extendRemove(target, props) {
	jQuery.extend(target, props);
	for (var name in props) if (props[name] == null) target[name] = null;
	return target;
    }
    
    // Commands that don't return a jQuery object
    var getters = ['getOffset', 'getTime', 'isDisabled'];
    
    /* Attach the time entry functionality to a jQuery selection.
       @param  command  (string) the command to run (optional, default 'attach')
       @param  options  (object) the new settings to use for these countdown instances (optional)
       @return  (jQuery) for chaining further calls 
    */
    jQuery.fn.timeEntry = function(options) {
	var otherArgs = Array.prototype.slice.call(arguments, 1);
	if (typeof options == 'string' && jQuery.inArray(options, getters) > -1) {
	    return jQuery.timeEntry['_' + options + 'TimeEntry'].apply(jQuery.timeEntry, [this[0]].concat(otherArgs));
	}
	return this.each(function() {
		var nodeName = this.nodeName.toLowerCase();
		if (nodeName == 'input') {
		    if (typeof options == 'string')
			jQuery.timeEntry['_' + options + 'TimeEntry'].apply(jQuery.timeEntry, [this].concat(otherArgs));
		    else {
			// Check for settings on the control itself
			var inlineSettings = (jQuery.fn.metadata ? jQuery(this).metadata() : {});
			jQuery.timeEntry._connectTimeEntry(this, jQuery.extend(inlineSettings, options));
		    }
		} 
	    });
    };
    
    /* Initialise the time entry functionality. */
    jQuery.timeEntry = new TimeEntry(); // Singleton instance
    
})(jQuery);

Added applications/admin/static/js/jqueryMultiSelect.js version [be362ceaa5].















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
// jQuery multiSelect
//
// Version 1.0 beta
//
// Cory S.N. LaViska
// A Beautiful Site (http://abeautifulsite.net/)
// 06 April 2008
//
// Visit http://abeautifulsite.net/notebook.php?article=62 for more information
//
// Usage: $('#control_id').multiSelect( options, callback )
//
// Options:  selectAll          - whether or not to display the Select All option; true/false, default = true
//           selectAllText      - text to display for selecting/unselecting all options simultaneously
//           noneSelected       - text to display when there are no selected items in the list
//           oneOrMoreSelected  - text to display when there are one or more selected items in the list
//                                (note: you can use % as a placeholder for the number of items selected).
//                                Use * to show a comma separated list of all selected; default = '% selected'
//
// Dependencies:  jQuery 1.2 or higher (http://jquery.com/)
//                the jQuery Dimensions plugin (http://plugins.jquery.com/project/dimensions)
//
// Licensing & Terms of Use
// 
// jQuery File Tree is licensed under a Creative Commons License and is copyrighted (C)2008 by Cory S.N. LaViska.
// For details, visit http://creativecommons.org/licenses/by/3.0/us/
//	
*/
if(jQuery) (function($){
	
	$.extend($.fn, {
		multiSelect: function(o, callback) {
			// Default options
			if( !o ) var o = {};
			if( o.selectAll == undefined ) o.selectAll = true;
			if( o.selectAllText == undefined ) o.selectAllText = "Select All";
			if( o.noneSelected == undefined ) o.noneSelected = 'Select options';
			if( o.oneOrMoreSelected == undefined ) o.oneOrMoreSelected = '% selected';
			
			// Initialize each multiSelect
			$(this).each( function() {
				var select = $(this);
				var html = '<input type="text" readonly="readonly" class="multiSelect" value="" style="cursor: default;" />';
				html += '<div class="multiSelectOptions" style="position: absolute; z-index: 99999; display: none;">';
				if( o.selectAll ) html += '<label class="selectAll"><input type="checkbox" class="selectAll" />' + o.selectAllText + '</label>';
				$(select).find('OPTION').each( function() {
					if( $(this).val() != '' ) {
						html += '<label><input type="checkbox" name="' + $(select).attr('name') + '" value="' + $(this).val() + '"';
						if( $(this).attr('selected') ) html += ' checked="checked"';
						html += ' />' + $(this).html() + '</label>';
					}
				});
				html += '</div>';
				$(select).after(html);
				
				// Events
				$(select).next('.multiSelect').mouseover( function() {
					$(this).addClass('hover');
				}).mouseout( function() {
					$(this).removeClass('hover');
				}).click( function() {
					// Show/hide on click
					if( $(this).hasClass('active') ) {
						$(this).multiSelectOptionsHide();
					} else {
						$(this).multiSelectOptionsShow();
					}
					return false;
				}).focus( function() {
					// So it can be styled with CSS
					$(this).addClass('focus');
				}).blur( function() {
					// So it can be styled with CSS
					$(this).removeClass('focus');
				});
				
				// Determine if Select All should be checked initially
				if( o.selectAll ) {
					var sa = true;
					$(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT:checkbox').not('.selectAll').each( function() {
						if( !$(this).attr('checked') ) sa = false;
					});
					if( sa ) $(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT.selectAll').attr('checked', true).parent().addClass('checked');
				}
				
				// Handle Select All
				$(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT.selectAll').click( function() {
					if( $(this).attr('checked') == true ) $(this).parent().parent().find('INPUT:checkbox').attr('checked', true).parent().addClass('checked'); else $(this).parent().parent().find('INPUT:checkbox').attr('checked', false).parent().removeClass('checked');
				});
				
				// Handle checkboxes
				$(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT:checkbox').click( function() {
					$(this).parent().parent().multiSelectUpdateSelected(o);
					$(this).parent().parent().find('LABEL').removeClass('checked').find('INPUT:checked').parent().addClass('checked');
					$(this).parent().parent().prev('.multiSelect').focus();
					if( !$(this).attr('checked') ) $(this).parent().parent().find('INPUT:checkbox.selectAll').attr('checked', false).parent().removeClass('checked');
					if( callback ) callback($(this));
				});
				
				// Initial display
				$(select).next('.multiSelect').next('.multiSelectOptions').each( function() {
					$(this).multiSelectUpdateSelected(o);
					$(this).find('INPUT:checked').parent().addClass('checked');
				});
				
				// Handle hovers
				$(select).next('.multiSelect').next('.multiSelectOptions').find('LABEL').mouseover( function() {
					$(this).parent().find('LABEL').removeClass('hover');
					$(this).addClass('hover');
				}).mouseout( function() {
					$(this).parent().find('LABEL').removeClass('hover');
				});
				
				// Keyboard
				$(select).next('.multiSelect').keydown( function(e) {
					// Is dropdown visible?
					if( $(this).next('.multiSelectOptions').is(':visible') ) {
						// Dropdown is visible
						// Tab
						if( e.keyCode == 9 ) {
							$(this).addClass('focus').trigger('click'); // esc, left, right - hide
							$(this).focus().next(':input').focus();
							return true;
						}
						
						// ESC, Left, Right
						if( e.keyCode == 27 || e.keyCode == 37 || e.keyCode == 39 ) {
							// Hide dropdown
							$(this).addClass('focus').trigger('click');
						}
						// Down
						if( e.keyCode == 40 ) {
							if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
								// Default to first item
								$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
							} else {
								// Move down, cycle to top if on bottom
								$(this).next('.multiSelectOptions').find('LABEL.hover').removeClass('hover').next('LABEL').addClass('hover');
								if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
									$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
								}
							}
							return false;
						}
						// Up
						if( e.keyCode == 38 ) {
							if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
								// Default to first item
								$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
							} else {
								// Move up, cycle to bottom if on top
								$(this).next('.multiSelectOptions').find('LABEL.hover').removeClass('hover').prev('LABEL').addClass('hover');
								if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
									$(this).next('.multiSelectOptions').find('LABEL:last').addClass('hover');
								}
							}
							return false;
						}
						// Enter, Space
						if( e.keyCode == 13 || e.keyCode == 32 ) {
							// Select All
							if( $(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').hasClass('selectAll') ) {
								if( $(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked') ) {
									// Uncheck all
									$(this).next('.multiSelectOptions').find('INPUT:checkbox').attr('checked', false).parent().removeClass('checked');
								} else {
									// Check all
									$(this).next('.multiSelectOptions').find('INPUT:checkbox').attr('checked', true).parent().addClass('checked');
								}
								$(this).next('.multiSelectOptions').multiSelectUpdateSelected(o);
								if( callback ) callback($(this));
								return false;
							}
							// Other checkboxes
							if( $(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked') ) {
								// Uncheck
								$(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked', false);
								$(this).next('.multiSelectOptions').multiSelectUpdateSelected(o);
								$(this).next('.multiSelectOptions').find('LABEL').removeClass('checked').find('INPUT:checked').parent().addClass('checked');
								// Select all status can't be checked at this point
								$(this).next('.multiSelectOptions').find('INPUT:checkbox.selectAll').attr('checked', false).parent().removeClass('checked');
								if( callback ) callback($(this));
							} else {
								// Check
								$(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked', true);
								$(this).next('.multiSelectOptions').multiSelectUpdateSelected(o);
								$(this).next('.multiSelectOptions').find('LABEL').removeClass('checked').find('INPUT:checked').parent().addClass('checked');
								if( callback ) callback($(this));
							}
						}
						return false;
					} else {
						// Dropdown is not visible
						if( e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 13 || e.keyCode == 32 ) { // down, enter, space - show
							// Show dropdown
							$(this).removeClass('focus').trigger('click');
							$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
							return false;
						}
						//  Tab key
						if( e.keyCode == 9 ) {
							// Shift focus to next INPUT element on page
							$(this).focus().next(':input').focus();
							return true;
						}
					}
					// Prevent enter key from submitting form
					if( e.keyCode == 13 ) return false;
				});
				
				// Eliminate the original form element
				$(select).remove();
			});
			
		},
		
		// Hide the dropdown
		multiSelectOptionsHide: function() {
			$(this).removeClass('active').next('.multiSelectOptions').hide();
		},
		
		// Show the dropdown
		multiSelectOptionsShow: function() {
			// Hide any open option boxes
			$('.multiSelect').multiSelectOptionsHide();
			$(this).next('.multiSelectOptions').find('LABEL').removeClass('hover');
			$(this).addClass('active').next('.multiSelectOptions').show();
			
			// Position it
			var offset = $(this).offset();
			$(this).next('.multiSelectOptions').css({ top:  offset.top + $(this).outerHeight() + 'px' });
			$(this).next('.multiSelectOptions').css({ left: offset.left + 'px' });
			
			// Disappear on hover out
			multiSelectCurrent = $(this);
			var timer = '';
			$(this).next('.multiSelectOptions').hover( function() {
				clearTimeout(timer);
			}, function() {
				timer = setTimeout('$(multiSelectCurrent).multiSelectOptionsHide(); $(multiSelectCurrent).unbind("hover");', 250);
			});
			
		},
		
		// Update the textbox with the total number of selected items
		multiSelectUpdateSelected: function(o) {
			var i = 0, s = '';
			$(this).find('INPUT:checkbox:checked').not('.selectAll').each( function() {
				i++;
			})
			if( i == 0 ) {
				$(this).prev('INPUT.multiSelect').val( o.noneSelected );
			} else {
				if( o.oneOrMoreSelected == '*' ) {
					var display = '';
					$(this).find('INPUT:checkbox:checked').each( function() {
						if( $(this).parent().text() != o.selectAllText ) display = display + $(this).parent().text() + ', ';
					});
					display = display.substr(0, display.length - 2);
					$(this).prev('INPUT.multiSelect').val( display );
				} else {
					$(this).prev('INPUT.multiSelect').val( o.oneOrMoreSelected.replace('%', i) );
				}
			}
		}
		
	});
	
})(jQuery);

Added applications/admin/static/js/web2py_ajax.js version [7f2851f561].


































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function popup(url) {
  newwindow=window.open(url,'name','height=400,width=600');
  if (window.focus) newwindow.focus();
  return false;
}
function collapse(id) { jQuery('#'+id).slideToggle(); }
function fade(id,value) { if(value>0) jQuery('#'+id).hide().fadeIn('slow'); else jQuery('#'+id).show().fadeOut('slow'); }
function ajax(u,s,t) {
    query = '';
    if (typeof s == "string") {
        d = jQuery(s).serialize();
        if(d){ query = d; }
    } else {
        pcs = [];
        for(i=0; i<s.length; i++) {
            q = jQuery("[name="+s[i]+"]").serialize();
            if(q){pcs.push(q);}
        }
        if (pcs.length>0){query = pcs.join("&");}
    }
    jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); 
}

String.prototype.reverse = function () { return this.split('').reverse().join('');};
function web2py_ajax_init() {
  jQuery('.hidden').hide();
  jQuery('.error').hide().slideDown('slow');
  jQuery('.flash').click(function() { jQuery(this).fadeOut('slow'); return false; });
  // jQuery('input[type=submit]').click(function(){var t=jQuery(this);t.hide();t.after('<input class="submit_disabled" disabled="disabled" type="submit" name="'+t.attr("name")+'_dummy" value="'+t.val()+'">')});
  jQuery('input.integer').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
  jQuery('input.double,input.decimal').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();});
  var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') ? w2p_ajax_confirm_message : "Are you sure you want to delete this object?";
  jQuery("input[type='checkbox'].delete").live('click', function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; });
  var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
  try {jQuery("input.date").live('focus',function() {Calendar.setup({
     inputField:this, ifFormat:date_format, showsTime:false
  }); }); } catch(e) {};
  var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
  try { jQuery("input.datetime").live('focus', function() {Calendar.setup({
     inputField:this, ifFormat:datetime_format, showsTime: true,timeFormat: "24"
  }); }); } catch(e) {};

  jQuery("input.time").live('focus', function() { var el = jQuery(this); 
          if (!el.hasClass('hasTimeEntry')) try { el.timeEntry(); } catch(e) {}; 
  });
};

jQuery(function() {   
   var flash = jQuery('.flash');
   flash.hide();
   if(flash.html()) flash.slideDown();
   web2py_ajax_init();
});
function web2py_trap_form(action,target) {
   jQuery('#'+target+' form').each(function(i){
      var form=jQuery(this);
      if(!form.hasClass('no_trap'))
        form.submit(function(obj){
         jQuery('.flash').hide().html('');
         web2py_ajax_page('post',action,form.serialize(),target);
         return false;
      });
   });
}
function web2py_ajax_page(method,action,data,target) {
  jQuery.ajax({'type':method,'url':action,'data':data,
    'beforeSend':function(xhr) {
      xhr.setRequestHeader('web2py-component-location',document.location);
      xhr.setRequestHeader('web2py-component-element',target);},
    'complete':function(xhr,text){
      var html=xhr.responseText;
      var content=xhr.getResponseHeader('web2py-component-content'); 
      var command=xhr.getResponseHeader('web2py-component-command');
      var flash=xhr.getResponseHeader('web2py-component-flash');
      var t = jQuery('#'+target);
      if(content=='prepend') t.prepend(html); 
      else if(content=='append') t.append(html);
      else if(content!='hide') t.html(html);  
      web2py_trap_form(action,target);
      web2py_ajax_init();      
      if(command) eval(command);
      if(flash) jQuery('.flash').html(flash).slideDown();
      }
    });
}
function web2py_component(action,target) {
  jQuery(function(){ web2py_ajax_page('get',action,null,target); });
}
function web2py_comet(url,onmessage,onopen,onclose) {
  if ("WebSocket" in window) {
    var ws = new WebSocket(url);
    ws.onopen = onopen?onopen:(function(){});
    ws.onmessage = onmessage;
    ws.onclose = onclose?onclose:(function(){});
    return true; // supported
  } else return false; // not supported
}

Added applications/admin/static/plugin_multiselect/jquery.dimensions.js version [28cf4b0abb].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4257 $
 *
 * Version: 1.2
 *
 * Requires: jQuery 1.2+
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.19={P:\'1.2\'};$.u([\'j\',\'w\'],5(i,d){$.q[\'O\'+d]=5(){p(!3[0])6;g a=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';6 3.B(\':y\')?3[0][\'L\'+d]:4(3,d.x())+4(3,\'n\'+a)+4(3,\'n\'+e)};$.q[\'I\'+d]=5(b){p(!3[0])6;g c=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';b=$.F({t:Z},b||{});g a=3.B(\':y\')?3[0][\'8\'+d]:4(3,d.x())+4(3,\'E\'+c+\'w\')+4(3,\'E\'+e+\'w\')+4(3,\'n\'+c)+4(3,\'n\'+e);6 a+(b.t?(4(3,\'t\'+c)+4(3,\'t\'+e)):0)}});$.u([\'m\',\'s\'],5(i,b){$.q[\'l\'+b]=5(a){p(!3[0])6;6 a!=W?3.u(5(){3==h||3==r?h.V(b==\'m\'?a:$(h)[\'U\'](),b==\'s\'?a:$(h)[\'T\']()):3[\'l\'+b]=a}):3[0]==h||3[0]==r?S[(b==\'m\'?\'R\':\'Q\')]||$.N&&r.M[\'l\'+b]||r.A[\'l\'+b]:3[0][\'l\'+b]}});$.q.F({z:5(){g a=0,f=0,o=3[0],8,9,7,v;p(o){7=3.7();8=3.8();9=7.8();8.f-=4(o,\'K\');8.k-=4(o,\'J\');9.f+=4(7,\'H\');9.k+=4(7,\'Y\');v={f:8.f-9.f,k:8.k-9.k}}6 v},7:5(){g a=3[0].7;G(a&&(!/^A|10$/i.16(a.15)&&$.14(a,\'z\')==\'13\'))a=a.7;6 $(a)}});5 4(a,b){6 12($.11(a.17?a[0]:a,b,18))||0}})(X);',62,72,'|||this|num|function|return|offsetParent|offset|parentOffset|||||borr|top|var|window||Height|left|scroll|Left|padding|elem|if|fn|document|Top|margin|each|results|Width|toLowerCase|visible|position|body|is|Right|Bottom|border|extend|while|borderTopWidth|outer|marginLeft|marginTop|client|documentElement|boxModel|inner|version|pageYOffset|pageXOffset|self|scrollTop|scrollLeft|scrollTo|undefined|jQuery|borderLeftWidth|false|html|curCSS|parseInt|static|css|tagName|test|jquery|true|dimensions'.split('|'),0,{}))

Added applications/admin/static/plugin_multiselect/jquery.multiselect.css version [cccd107d78].


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
.ui-multiselect { font-weight:normal !important; display:-moz-inline-block; display:inline-block; cursor:default; text-decoration:none !important; padding:0 }
.ui-multiselect input { float:left; padding:3px 0 3px 6px; margin:0; border:none !important /* important fixes bug when inside ui-widget-content */; cursor:default; background:transparent }
.ui-multiselect span { float:right; margin-top:-18px; }

.ui-multiselect-header { margin-bottom:3px; padding:3px 0 3px 6px }
.ui-multiselect-header ul { font-size:0.9em }
.ui-multiselect-header ul li { float:left; padding:0 10px 0 0 }
.ui-multiselect-header a { text-decoration:none }
.ui-multiselect-header a:hover { text-decoration:underline }
.ui-multiselect-header .ui-icon { float:left }
.ui-multiselect-header li.ui-multiselect-close { float:right; text-align:right; padding-right:0 }

.ui-multiselect-options { display:none; padding:3px; position:relative; z-index:10000; background: white; border: 1px solid #666666;}
.ui-multiselect-checkboxes { position:relative /* fixes bug in IE6/7 */; overflow-y:scroll }
.ui-multiselect-checkboxes label { cursor:default; display:block; border:1px solid transparent; padding:3px }
.ui-multiselect-checkboxes label input { position:relative; top:1px }
.ui-multiselect-checkboxes li { clear:both; font-size:0.9em; padding-right:3px }
.ui-multiselect-checkboxes li.ui-multiselect-optgroup-label { text-align:center; font-weight:bold; border-bottom:1px solid }
.ui-multiselect-checkboxes li.ui-multiselect-optgroup-label a { display:block; padding:3px; margin:1px 0; text-decoration:none }

/* remove label borders in IE6 because IE6 does not support transparency */
* html .ui-multiselect-checkboxes label { border:none }

/* shadow effect */
.ui-multiselect-shadow { box-shadow:0 0 10px #777; -moz-box-shadow:0 0 10px #777; -webkit-box-shadow:0 0 10px #777; -ms-filter: "progid:DXImageTransform.Microsoft.Glow(color=#666666,strength=3) progid:DXImageTransform.Microsoft.Shadow(color=#777777,direction=135,strength=3)"; filter: progid:DXImageTransform.Microsoft.Glow(color=#666666,strength=3) progid:DXImageTransform.Microsoft.Shadow(color=#777777,direction=135,strength=3); }

Added applications/admin/static/plugin_multiselect/jquery.multiselect.js version [6bd5944c98].

























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 * jQuery MultiSelect Plugin 0.6
 * Copyright (c) 2010 Eric Hynds
 *
 * http://www.erichynds.com/jquery/jquery-multiselect-plugin-with-themeroller-support/
 * Inspired by Cory S.N. LaViska's implementation, A Beautiful Site (http://abeautifulsite.net/) 2009
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
*/
(function(f){f.fn.multiSelect=function(i){i=f.extend({},f.fn.multiSelect.defaults,i);return this.each(function(){return new w(this,i)})};var x=0,w=function(i,a){var g=$original=f(i),e,l,k,h=[],s=[];l=g.is(":disabled");var t=i.id||"ui-multiselect-"+x++;h.push('<a id="'+t+'" class="ui-multiselect ui-widget ui-state-default ui-corner-all'+(l||a.disabled?" ui-state-disabled":"")+'">');h.push('<input readonly="readonly" type="text" class="ui-state-default" value="'+a.noneSelectedText+'" title="'+i.title+
'" /><span class="ui-icon ui-icon-triangle-1-s"></span></a>');h.push('<div class="ui-multiselect-options'+(a.shadow?" ui-multiselect-shadow":"")+' ui-widget ui-widget-content ui-corner-all">');if(a.showHeader){h.push('<div class="ui-widget-header ui-helper-clearfix ui-corner-all ui-multiselect-header">');h.push('<ul class="ui-helper-reset">');h.push('<li><a class="ui-multiselect-all" href=""><span class="ui-icon ui-icon-check"></span>'+a.checkAllText+"</a></li>");h.push('<li><a class="ui-multiselect-none" href=""><span class="ui-icon ui-icon-closethick"></span>'+
a.unCheckAllText+"</a></li>");h.push('<li class="ui-multiselect-close"><a href="" class="ui-multiselect-close ui-icon ui-icon-circle-close"></a></li>');h.push("</ul>");h.push("</div>")}h.push('<ul class="ui-multiselect-checkboxes ui-helper-reset">');l&&g.removeAttr("disabled");g.find("option").each(function(b){var c=f(this),d=c.html(),m=this.value;b=this.id||"ui-multiselect-"+t+"-option-"+b;var j=c.parent(),n=j.is("optgroup"),o=c.is(":disabled"),u=["ui-corner-all"];if(n){j=j.attr("label");if(f.inArray(j,
s)===-1){h.push('<li class="ui-multiselect-optgroup-label"><a href="#">'+j+"</a></li>");s.push(j)}}if(m.length>0){o&&u.push("ui-state-disabled");h.push('<li class="'+(o?"ui-multiselect-disabled":"")+'">');h.push('<label for="'+b+'" class="'+u.join(" ")+'"><input id="'+b+'" type="'+(a.multiple?"checkbox":"radio")+'" name="'+i.name+'" value="'+m+'" title="'+d+'"');c.is(":selected")&&h.push(' checked="checked"');o&&h.push(' disabled="disabled"');h.push(" />"+d+"</label></li>")}});h.push("</ul></div>");
g=g.after(h.join("")).next("a.ui-multiselect");e=g.next("div.ui-multiselect-options");l=e.find("div.ui-multiselect-header");k=e.find("label").not(".ui-state-disabled");var v=g.find("span.ui-icon").outerWidth(),p=$original.outerWidth(),q=p+v;if(/\d/.test(a.minWidth)&&q<a.minWidth){p=a.minWidth-v;q=a.minWidth}g.width(q).find("input").width(p);a.showHeader&&l.find("a").click(function(b){var c=f(this);if(c.hasClass("ui-multiselect-close"))e.trigger("close");else{c=c.hasClass("ui-multiselect-all");e.trigger("toggleChecked",
[c?true:false]);a[c?"onCheckAll":"onUncheckAll"].call(this)}b.preventDefault()});var r=function(){var b=k.find("input"),c=b.filter(":checked"),d="";d=c.length;d=d===0?a.noneSelectedText:f.isFunction(a.selectedText)?a.selectedText.call(this,d,b.length,c.get()):/\d/.test(a.selectedList)&&a.selectedList>0&&d<=a.selectedList?c.map(function(){return this.title}).get().join(", "):a.selectedText.replace("#",d).replace("#",b.length);g.find("input").val(d);return d};g.bind({click:function(){e.trigger("toggle")},
keypress:function(b){switch(b.keyCode){case 27:case 38:e.trigger("close");break;case 40:case 0:e.trigger("toggle");break}},mouseenter:function(){g.hasClass("ui-state-disabled")||f(this).addClass("ui-state-hover")},mouseleave:function(){f(this).removeClass("ui-state-hover")},focus:function(){g.hasClass("ui-state-disabled")||f(this).addClass("ui-state-focus")},blur:function(){f(this).removeClass("ui-state-focus")}});e.bind({close:function(b,c){c=c||false;if(c===true)f("div.ui-multiselect-options").filter(":visible").fadeOut(a.fadeSpeed).prev("a.ui-multiselect").removeClass("ui-state-active").trigger("mouseout");
else{g.removeClass("ui-state-active").trigger("mouseout");e.fadeOut(a.fadeSpeed)}},open:function(b,c){if(!g.hasClass("ui-state-disabled")){var d=g.position(),m=e.find("ul:last"),j,n;g.addClass("ui-state-active");if(c||typeof c==="undefined")e.trigger("close",[true]);j=a.position==="middle"?d.top+g.height()/2-e.outerHeight()/2:a.position==="top"?d.top-e.outerHeight():d.top+g.outerHeight();n=g.width()-parseInt(e.css("padding-left"),10)-parseInt(e.css("padding-right"),10);k.filter("label:first").trigger("mouseenter").trigger("focus");
e.css({position:"absolute",top:j+"px",left:d.left+"px",width:n+"px"}).show();m.scrollTop(0);a.maxHeight&&m.css("height",a.maxHeight);a.onOpen.call(e[0])}},toggle:function(){e.trigger(f(this).is(":hidden")?"open":"close")},traverse:function(b,c,d){b=f(c);d=d===38||d===37?true:false;b=b.parent()[d?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)")[d?"last":"first"]();if(b.length)b.find("label").trigger("mouseenter");else{b=e.find("ul:last");e.find("label")[d?"last":
"first"]().trigger("mouseover");b.scrollTop(d?b.height():0)}},toggleChecked:function(b,c,d){(d&&d.length?d:k.find("input")).not(":disabled").attr("checked",c?"checked":"");r()}}).find("li.ui-multiselect-optgroup-label a").click(function(b){var c=f(this).parent().nextUntil("li.ui-multiselect-optgroup-label").find("input");e.trigger("toggleChecked",[c.filter(":checked").length===c.length?false:true,c]);a.onOptgroupToggle.call(this,c.get());b.preventDefault()});k.bind({mouseenter:function(){k.removeClass("ui-state-hover");
f(this).addClass("ui-state-hover").find("input").focus()},keyup:function(b){switch(b.keyCode){case 27:e.trigger("close");break;case 38:case 40:case 37:case 39:e.trigger("traverse",[this,b.keyCode]);break;case 13:b.preventDefault();f(this).click();break}}}).find("input").bind("click",function(){a.onCheck.call(this);r()});$original.remove();f.fn.bgiframe&&e.bgiframe();a.state==="open"&&e.trigger("open",[false]);g.find("input")[0].defaultValue=r();return g};f(document).bind("click",function(i){i=f(i.target);
!i.closest("div.ui-multiselect-options").length&&!i.parent().hasClass("ui-multiselect")&&f("div.ui-multiselect-options").trigger("close",[true])});f.fn.multiSelect.defaults={showHeader:true,maxHeight:175,minWidth:215,checkAllText:"Check all",unCheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,position:"bottom",shadow:false,fadeSpeed:200,disabled:false,state:"closed",multiple:true,onCheck:function(){},onOpen:function(){},onCheckAll:function(){},onUncheckAll:function(){},
onOptgroupToggle:function(){}}})(jQuery);

Added applications/admin/static/plugin_multiselect/start.js version [ee10d93613].


1
+
jQuery(document).ready(function(){jQuery('[multiple]').multiSelect({maxHeight:200});});

Added applications/admin/views/appadmin.html version [3b13f939eb].







































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script><!--
jQuery(document).ready(function(){
  jQuery("table.sortable tbody tr").mouseover( function() {
     jQuery(this).addClass("highlight"); }).mouseout( function() { 
     jQuery(this).removeClass("highlight"); });
  jQuery('table.sortable tbody tr:odd').addClass('odd');
  jQuery('table.sortable tbody tr:even').addClass('even');
});
//--></script>

{{if request.function=='index':}}
  <h1>{{=T("Available databases and tables")}}</h1>
  {{if not databases:}}{{=T("No databases in this application")}}{{pass}}
  {{for db in sorted(databases):}}
    {{for table in databases[db].tables:}}
      {{qry='%s.%s.id>0'%(db,table)}}
      {{tbl=databases[db][table]}}
      {{if hasattr(tbl,'_primarykey'):}}
        {{if tbl._primarykey:}}
            {{firstkey=tbl[tbl._primarykey[0]]}}
            {{if firstkey.type in ['string','text']:}}
              {{qry='%s.%s.%s!=""'%(db,table,firstkey.name)}}
            {{else:}}
              {{qry='%s.%s.%s>0'%(db,table,firstkey.name)}}
            {{pass}}
        {{else:}}
             {{qry=''}}
             {{pass}}
      {{pass}}
      <h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</h2>
      [ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
    <br /><br />
    {{pass}}
  {{pass}}

{{elif request.function=='select':}}
  <h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
  </h1>
   {{if table:}}
  [ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
    <h2>{{=T("Rows in table")}}</h2><br/>
   {{else:}}
    <h2>{{=T("Rows selected")}}</h2><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/>
      {{=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/>
    <h3>{{=nrows}} {{=T("selected")}}</h3>
    {{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
    {{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}    
    {{if rows:}}
       <div style="overflow: auto;" width="80%">
       {{linkto=URL('update',args=request.args[0])}}
       {{upload=URL('download',args=request.args[0])}}    
       {{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
       </div>
    {{pass}}
    <br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
    [ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
  {{if table:}}
    {{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
  {{pass}}


{{elif request.function=='insert':}}  
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=table._primarykey[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
    {{else:}}  
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
    {{pass}}
  </h1>
  <h2>{{=T("New Record")}}</h2><br/>
  {{=form}}



{{elif request.function=='update':}}
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=request.vars.keys()[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}      
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
      {{=T("record")}} {{=A('%s=%s'%request.vars.items()[0],_href=URL('update',args=request.args[:2],vars=request.vars))}}
    {{else:}}
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
      {{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
    {{pass}}
  </h1>
  <h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}



{{elif request.function=='state':}}
  <h1>{{=T("Internal State")}}</h1>
  <h2>{{=T("Current request")}}</h2>
  {{=BEAUTIFY(request)}}
  <br/><h2>{{=T("Current response")}}</h2>
  {{=BEAUTIFY(response)}}
  <br/><h2>{{=T("Current session")}}</h2>
  {{=BEAUTIFY(session)}}


{{elif request.function == 'ccache':}}
<h2>Cache</h2>
<div class="wrapper">
<div class="list">
    <div class="list-header">
        Statistics
    </div>
    <div class="content">
        <h3>Overview</h3>
        <p>
            Hit Ratio: 
            <strong>{{=total['ratio']}}%</strong> 
            (<strong>{{=total['hits']}}</strong> hits 
            and <strong>{{=total['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=total['objects']}}</strong> items, 
            <strong>{{=total['bytes']}}</strong> bytes 
            {{if total['bytes'] > 524287:}}
                (<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
            {{pass}}
        </p>
        <p>
            Cache contains items up to 
            <strong>{{="%02d" % total['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % total['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>RAM</h3>
        <p>
            Hit Ratio: 
            <strong>{{=ram['ratio']}}%</strong> 
            (<strong>{{=ram['hits']}}</strong> hits 
            and <strong>{{=ram['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=ram['objects']}}</strong> items, 
            <strong>{{=ram['bytes']}}</strong> bytes 
            {{if ram['bytes'] > 524287:}}
                (<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            RAM contains items up to 
            <strong>{{="%02d" % ram['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>DISK</h3>
        <p>
            Hit Ratio: 
            <strong>{{=disk['ratio']}}%</strong> 
            (<strong>{{=disk['hits']}}</strong> hits 
            and <strong>{{=disk['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=disk['objects']}}</strong> items, 
            <strong>{{=disk['bytes']}}</strong> bytes 
            {{if disk['bytes'] > 524287:}}
                (<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            DISK contains items up to 
            <strong>{{="%02d" % disk['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
        </p>
    </div>
    
    <div class="list-header">
    Manage Cache
    </div>
    <div class="content">
    <p>
        {{=form}}
    </p>
    </div>
</div>
<div class="clear"></div>
</div>
{{pass}}

Added applications/admin/views/debug/index.html version [3b19e1aff8].
































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}shell{{end}}
<!--style type="text/css">

.prompt, #output {
  width: 45em;
  border: 1px solid #CCCCCC;
  font-size: 10pt;
  margin: 0.5em;
  padding: 0.5em;
  padding-right: 0em;
  overflow: auto;
  wrap: hard;
}

#output {
  height:250px;overflow:auto;
}

#toolbar {
  margin-left: 0.5em;
  padding-left: 0.5em;
}

#caret {
  width: 2.5em;
  margin-right: 0px;
  padding-right: 0px;
  border-right: 0px;
}

#statement {
  width: 43em;
  margin-left: -1em;
  padding-left: 0px;
  border-left: 0px;
  background-position: top right;
  background-repeat: no-repeat;
}

.processing {
  background-image: url("{{=URL('static','images/spinner.gif')}}");
}

#ajax-status {
  font-weight: bold;
}

.message {
  color: #8AD;
  font-weight: bold;
  font-style: italic;
}

.error {
  color: #F44;
}

.username {
  font-weight: bold;
}

</style-->

<div id="wrapper">
  <textarea id="output" readonly="readonly">web2py Debugger {{=request.env.web2py_version}}{{=data}}</textarea>

  <form id="form" action="{{=URL(r=request,f='callback',args=app)}}" method="get">
    <div id="shellwrapper">
      <div id="caret">&gt;&gt;&gt;</div>
      <div class="tooltip">
        <textarea class="prompt" name="statement" id="statement"></textarea>
        <span>Type PDB debugger command in here and hit Return (Enter) to execute it.</span>
      </div>
    </div>
  </form>
</div>

<div class="help">
  <ul>
    <li>Using the shell may lock the database to other users of this app.</li>
  </ul>
</div>

<script type="text/javascript">
var bShellScrolling=0
jQuery(document).ready(function(){
  jQuery('#statement').focus();

  jQuery('#statement').keyup(function(event){ 
    var t=jQuery(this),
    s=t.val(),
    o=jQuery('#output'),
    RETURN = 38;
    if(s=='\n') t.val('');
    if(s.length>1 && s.substr(s.length-1,1)=='\n' && s.substr(s.length-2,1)!=':' &&
    (s.indexOf(':\n ')<0 || s.substr(s.length-2,1)=='\n')) {
      t.val('');
      jQuery.post("{{=URL(r=request,f='callback',args=app)}}",
      {statement:s},function(data){o.html(o.html()+data).attr('scrollTop',o.attr('scrollHeight'));});
    } else { };
    if(event.keyCode==RETURN){
      var i=s.length
      if(i==0){
        var s=o.find('table:last pre:first').text();
        bShellScrolling=o.find('table').length;
      }else if(bShellScrolling){
        var i=bShellScrolling
        if(i<1){
          return
        }else{
          i--
          var s=o.find('table:nth-child('+(i)+') pre:first').text();
          bShellScrolling=i
        }
      }else if(s.indexOf('\n')<0){
        var oo=o.find('tr:first-child pre:contains("'+s+'")')
        if(oo.length==0){
          return
        }else if(oo.length==1){
          s=oo.text();
        }else{
          sVar=oo.text();
          o.html(o.html()+'<dd>'+s+' ?</dd><dt>'+sVar+'</dt>').attr('scrollTop',o.attr('scrollHeight'))
          return
        }
      }else{
        //multistring expr
        return;
      }
      //  if(s.slice(s.length-1)=='\n'){
      s=s.slice(0,s.length-1)
      //	}
      t.val(s);
    }
    if(bShellScrolling && event.keyCode==40){
      var i=bShellScrolling
      i++
      var s=o.find('table:nth-child('+i+') tr:first-child pre').text();
      if(s){
        s=s.slice(0,s.length-1)
        t.val(s);
        bShellScrolling=i
      }else{
        bShellScrolling=0
        t.val('')
      }
    };
    if(bShellScrolling && (event.keyCode==37 || event.keyCode==39)){
      bShellScrolling=0;
    };
    if(event.keyCode==27){
      bShellScrolling=0;
      t.val('');
    };
  });
});
</script>

Added applications/admin/views/default/about.html version [f977b1a453].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}about{{end}}

<h2>{{=T("About application")}} "{{=app}}"</h2>
<h3>{{=T("About")}} {{=app}}</h3>
<p class="controls">{{=button(URL('edit/%s/ABOUT' % (app)), T('edit'))}}</p>
<div class="about_text legalese">{{=about}}</div>
<h3>{{=T('License for')}} {{=app}}</h3>
<p class="controls">{{=button(URL('edit/%s/LICENSE' % (app)), T('edit'))}}</p>
<div class="license_text legalese">{{=license}}</div>
</ul>

Added applications/admin/views/default/amy_ajax.html version [22efd644f9].













































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<style>
.acw-chap pre, .acw-chap pre span,  span.acw-char-check, .acw-chap .selection-area div
{
    font:11px 'Courier', monospaced;
    line-height:11px;
    margin:0;
    padding:0;
    border:0;
}

.acw-chap .wrapped-row
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-wrapped-row.gif');
	background-repeat:no-repeat;
	background-position:25px 4px;
}
.acw-chap .sidebar
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bg-sidebar.gif');
	line-height:11px;	
}
.acw-chap .sidebar .row-number
{
    text-align:right;
    font-size:9px;
    font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
    color:#999;
}

.acw-chap .folding-expand-inner
{
	width:14px;
	height:10px;
	margin-left:2px;
	display:inline;
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand-inner.gif');
}
.acw-chap .folding-expand
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand.gif');
}
.acw-chap .folding-start
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-start.gif');
}
.acw-chap .folding-stop
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-stop.gif');
}
.acw-chap .bookmark-default
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bookmark-default.gif');
}
.acw-chap .void
{
	background-image:url('{{=URL(r=request,c='static',f='eamy')}}/void.gif');	
}
</style>
<script src="{{=URL(r=request,c='static',f='eamy/eamy.js')}}" type="text/javascript"></script>
<script src="{{=URL(r=request,c='static',f='js/jquery.hotkeys.js')}}" type="text/javascript" charset="utf-8"></script>
{{if request.args[1]=="views":}}
<script src="{{=URL(r=request,c='static',f='eamy/bundle_markup.js')}}" type="text/javascript"></script>
{{else:}}
<script src="{{=URL(r=request,c='static',f='eamy/bundle_python.js')}}" type="text/javascript"></script>
{{pass}}
<script language="Javascript" type="text/javascript" src="/{{=request.application}}/static/js/ajax_editor.js"></script>

<script language="Javascript" type="text/javascript">
jQuery(document).ready(function(){
   setTimeout("keepalive('{{=URL('keepalive')}}')",10000);

});
jQuery(document).bind('keydown', 'alt+f1',function (evt){
        doClickSave();
});
</script>

Added applications/admin/views/default/change_password.html version [96d9af7786].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}change_password{{end}}

<h2>Change Admin Password</h2>

<div class="pwform">
  {{=form}}
</div>

Added applications/admin/views/default/delete.html version [25ef71c61b].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}delete{{end}}

<div class="center">
<h2>{{=T('Are you sure you want to delete file "%s"?', filename)}}</h2>
<p>{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('Abort')),INPUT(_type='hidden',_name='sender',_value=sender), _class="inline")}}{{=FORM(INPUT(_type='submit',_name='delete',_value=T('Delete')),INPUT(_type='hidden',_name='sender',_value=sender), _class="inline")}}</p>
</div>

Added applications/admin/views/default/delete_plugin.html version [63e5e95a3d].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}delete_plugin{{end}}

<div class="center">
<h2>{{=T('Are you sure you want to delete plugin "%s"?', plugin)}}</h2>
<p>{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('NO')))}}</p>
<p>{{=FORM(INPUT(_type='submit',_name='delete',_value=T('YES')))}}</p>
</div>

Added applications/admin/views/default/design.html version [f9b44e4321].


























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{
def all(items):
    return reduce(lambda a,b:a and b,items,True)
def peekfile(path,file):
    return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))  
def editfile(path,file):
    return A(SPAN(T('edit')),_class='button editbutton',_href=URL('edit', args=(app, path, file)))  
def testfile(path,file):
    return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')), SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))), _class='icon test tooltip',_href=URL('test', args=(app, file))) 
def editlanguagefile(path,file):
    return A(SPAN(T('edit')),_class='button editbutton',_href=URL('edit_language', args=(app, path, file))) 
def file_upload_form(location):
    form=FORM(T("upload file:")," ",
              INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
              INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
              INPUT(_type="hidden",_name="location",_value=location),
              INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)),
              INPUT(_type="submit",_value=T("upload")),_action=URL('upload_file'))
    return form  
def file_create_form(location):
    form=FORM(T("create file with filename:")," ",
              INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
              INPUT(_type="hidden",_name="location",_value=location),
              INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)),
              INPUT(_type="submit",_value=T("create")),_action=URL('create_file'))
    return form
def upload_plugin_form(app):
    form=FORM(T("upload plugin file:")," ",
              INPUT(_type="file",_name="pluginfile"),
              INPUT(_type="submit",_value=T("upload")))
    return form
def deletefile(arglist):
  return A(TAG[''](IMG(_src=URL('static', 'images/delete_icon.png')), SPAN(T('Delete this file (you will be asked to confirm deletion)'))), _class='icon delete tooltip', _href=URL('delete',args=arglist,vars=dict(sender=request.function+'/'+app)))
}}

{{block sectionclass}}design{{end}}

<h2>{{=T("Edit application")}} "{{=A(app,_href=URL(app,'default','index'),_target="_blank")}}"</h2>

<!-- COLLAPSE/JUMP-TO BUTTONS -->
<div class="right-full controls">
  <p>
    {{=searchbox('search')}}
    <a class="button special" href="#" onclick="jQuery('h3').click();return false"><span>{{=T("collapse/expand all")}}</span></a>
    <span class="buttongroup">
    {{=button('#models', T("models"))}}
    {{=button('#controllers', T("controllers"))}}
    {{=button('#views', T("views"))}}
    {{=button('#languages', T("languages"))}}
    {{=button('#static', T("static"))}}
    {{=button('#modules', T("modules"))}}
    {{=button('#plugins', T("plugins"))}}
    </span>
  </p>
</div>

<!-- MODELS -->

<h3 id="models" onclick="collapse('models_inner');" class="component">
  {{=T("Models")}} 
  <span class="tooltip">{{=helpicon()}} <span>{{=T("The data representation, define database tables and sets")}}</span></span>
</h3>
<div id="models_inner" class="component_contents">
  {{if not models:}}<p><strong>{{=T("There are no models")}}</strong></p>{{else:}}
  <div class="controls comptools">
    {{=button(URL(a=app,c='appadmin',f='index'), T('database administration'))}}
    {{if os.access(os.path.join(request.folder,'..',app,'databases','sql.log'),os.R_OK):}}
      {{=button(URL('peek/%s/databases/sql.log'%app), 'sql.log')}}
    {{pass}}
  </div>
  {{pass}}

  <ul>
    {{for m in models:}}
    <li id="models__{{=m.replace('.','__')}}">
    <span class="filetools controls">
      {{=editfile('models',m)}}
      {{=deletefile([app, 'models', m])}}
    </span>
    <span class="file">
      {{=peekfile('models',m)}}
    </span>
    <span class="extras">
      {{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}}
    </span>
    </li>
    {{pass}}
  </ul>
  <div class="controls formfield">{{=file_create_form('%s/models/' % app)}}</div>
</div>

<!-- FIND CONTROLLER FUNCTIONS -->
{{
controller_functions=[]
for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functions[c]]
}}

<!-- CONTROLLERS -->

<h3 id="controllers" onclick="collapse('controllers_inner');" class="component">
  {{=T("Controllers")}} 
  <span class="tooltip">{{=helpicon()}} <span>{{=T("The application logic, each URL path is mapped in one exposed function in the controller")}}</span></span>
</h3>
<div id="controllers_inner" class="component_contents">
  {{if not controllers:}}<p><strong>{{=T("There are no controllers")}}</strong></p>{{else:}}
  <div class="controls comptools">
      {{=button(URL(r=request,c='shell',f='index',args=app), T("shell"))}}
      {{=button(URL('test',args=app), T("test"))}}
      {{=button(URL('edit',args=[app,'cron','crontab']), T("crontab"))}}
  </div>
  {{pass}}
  <ul>
    {{for c in controllers:}}
    <li id="controllers__{{=c.replace('.','__')}}">
    <span class="filetools controls">
      {{=editfile('controllers',c)}}
      {{=deletefile([app, 'controllers', c])}}
      {{=testfile('controllers',c)}}
    </span>
    <span class="file">
      {{=peekfile('controllers',c)}}
    </span>
    <span class="extras">
      {{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
    </span>
    </li>
    {{pass}}
  </ul>
  <div class="controls formfield">{{=file_create_form('%s/controllers/' % app)}}</div>
</div>

<!-- VIEWS -->

<h3 id="views" onclick="collapse('views_inner');" class="component">
  {{=T("Views")}}
  <span class="tooltip">{{=helpicon()}} <span>{{=T("The presentations layer, views are also known as templates")}}</span></span>
</h3>
<div id="views_inner" class="component_contents">
  <div class="controls comptools">
    {{=button(LAYOUTS_APP, T("download layouts"))}}
  </div>
  {{if not views:}}<p><strong>{{=T("There are no views")}}</strong></p>{{pass}}
  <ul>
    {{for c in views:}}
    <li id="views__{{=c.replace('/','__').replace('.','__')}}">
    <span class="filetools controls">
      {{=editfile('views',c)}}
      {{=deletefile([app, 'views', c])}}
    </span>
    <span class="file">
      {{=peekfile('views',c)}}
    </span>
    <span class="extras">
      {{if extend.has_key(c):}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
      {{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}}
    </span>
    </li>
    {{pass}}
  </ul>
  <div class="controls formfield">{{=file_create_form('%s/views/' % app)}}</div>
</div>

<!-- LANGUAGES -->

<h3 id="languages" onclick="collapse('languages_inner');" class="component">
  {{=T("Languages")}}
  <span class="tooltip">{{=helpicon()}} <span>{{=T("Translation strings for the application")}}</span></span>
</h3>
<div id="languages_inner" class="component_contents">
  <div class="controls comptools">
    {{=button(URL('update_languages/'+app), T('update all languages'))}}
  </div>
  {{if not languages:}}<p><strong>{{=T("There are no translators, only default language is supported")}}</strong></p>{{pass}}
  <ul>
    {{for file in languages:}}
    <li id="languages__{{=file.replace('.','__')}}">
    <span class="filetools controls">
      {{=editlanguagefile('languages',file)}}
      {{=deletefile([app, 'languages', file])}}
    </span>
    <span class="file">
      {{=peekfile('languages',file)}}
    </span>
    </li>
    {{pass}}
  </ul>
  <div class="controls formfield">{{=file_create_form('%s/languages/' % app)}}{{=T('(something like "it-it")')}}</div>
</div>

<!-- STATIC -->

<h3 id="static" onclick="collapse('static_inner');" class="component">
  {{=T("Static files")}}
  <span class="tooltip">{{=helpicon()}} <span>{{=T("These files are served without processing, your images go here")}}</span></span>
</h3>
<div id="static_inner" class="component_contents">
  <div class="controls comptools">
  </div>
  {{if not statics:}}<p><strong>{{=T("There are no static files")}}</strong></p>{{pass}}
  <ul>
    {{
    path=[]
    for file in statics+['']:
      items=file.split('/')
      file_path=items[:-1]
      filename=items[-1]
      while path!=file_path:          
          if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
              path.append(file_path[len(path)])
              thispath='static__'+'__'.join(path)
    }}
    <li class="folder">
    <a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
    <ul id="{{=thispath}}" style="display: none;" class="sublist">{{
          else:
              path = path[:-1]
      }}
    </ul></li>
    {{
              pass
          pass
      if filename:
      }}<li>
      <span class="filetools controls">
	{{=editfile('static',file)}} {{=deletefile([app,'static',file])}}
      </span>
      <span class="file">
	<a href="{{=URL(a=app,c='static',f=file)}}">{{=filename}}</a>
      </span>
    </li>{{
          pass
      pass
    }}
    {{pass}}
  </ul>
  <div class="controls formfield">{{=file_create_form('%s/static/' % app)}}
  {{=file_upload_form('%s/static/' % app)}}</div>
</div>

<!-- MODULES -->

<h3 id="modules" onclick="collapse('modules_inner');" class="component">
  {{=T("Modules")}}
  <span class="tooltip">{{=helpicon()}} <span>{{=T("Additional code for your application")}}</span></span>
</h3>
<div id="modules_inner" class="component_contents">
  <div class="controls comptools">
  </div>
  {{if not modules:}}<p><strong>{{=T("There are no modules")}}</strong></p>{{pass}}
  <ul>
    {{for m in modules:}}
    <li id="modules__{{=m.replace('/','__').replace('.','__')}}">
    <span class="filetols controls">
      {{=editfile('modules',m)}}
      {{if m!='__init__.py':}}{{=deletefile([app, 'modules', m])}}{{pass}}
    </span>
    <span class="file">
      {{=peekfile('modules',m)}}
    </span>
    </li>
    {{pass}}
  </ul>
  <div class="controls formfield">{{=file_create_form('%s/modules/' % app)}}
  {{=file_upload_form('%s/modules/' % app)}}</div>
</div>

<!-- PLUGINS -->

<h3 id="plugins" onclick="collapse('plugins_inner');" class="component">
  {{=T("Plugins")}}
  <span class="tooltip">{{=helpicon()}} <span>{{=T("To create a plugin, name a file/folder plugin_[name]")}}</span></span>
</h3>
<div id="plugins_inner" class="component_contents">
  <div class="controls comptools">
    {{=button(PLUGINS_APP, T('download plugins'))}}
  </div>
  <div class="controls">
  </div>
  {{if plugins:}}
  <ul>
      {{for plugin in plugins:}}
      <li>
      {{=A('plugin_%s' % plugin, _class='file', _href=URL('plugin', args=[app, plugin]))}}
      </li>
      {{pass}}
  </ul>
  {{else:}}
  <p><strong>{{=T('There are no plugins')}}</strong></p>
  {{pass}}
  <div class="controls formfield">{{=upload_plugin_form(app)}}</div>
</div>


<script>
jQuery(document).ready(function(){
   jQuery('#search').keyup(function(e){
      var code = (e.keyCode ? e.keyCode : e.which);
      if(code==13 && jQuery('#search').val()){
        jQuery.getJSON('{{=URL('search',args=request.args)}}?keywords='+escape(jQuery('#search').val()),null,function(data, textStatus, xhr){
          jQuery('.component_contents li, .formfield, .comptools').hide();
		  files=data['files'];
          for(var i=0; i<files.length; i++)
            jQuery('li#'+files[i].replace(/\//g,'__').replace('.','__')).slideDown();   
          jQuery('.flash').html('{{=T("Searching:")}} '+files.length+' {{=T("files")}}').slideDown();
		  });
      } else if(code==13) {
          jQuery('.component_contents li, .formfield, .comptools').slideDown();
          jQuery('.flash').html('').hide();
      }
   });
});
</script>

Added applications/admin/views/default/downgrade_web2py.html version [36342e4d3b].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}upgrade{{end}}

<h2>{{=T('web2py downgrade')}}</h2>

<p class="center"><strong class="att">{{=T('ATTENTION:')}}</strong> {{=T('This is an experimental feature and it needs more testing. If you decide to downgrade you do it at your own risk')}}<br />
{{=T('If start the downgrade, be patient, it may take a while to rollback')}}</p>

<div class="center">
{{=FORM(INPUT(_type='submit',_name='nodowngrade',_value=T('Cancel')), _class='inline')}}
{{=FORM(INPUT(_type='submit',_name='downgrade',_value=T('Downgrade')), _class='inline')}}
</div>

Added applications/admin/views/default/edit.html version [e02da483a4].





























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{
  def shortcut(combo, description):
    return XML('<li><tt>%s</tt> %s</li>' % (combo, description))
}}

{{if TEXT_EDITOR == 'amy':}}
{{include 'default/amy_ajax.html'}}
{{else:}}
<script language="Javascript" type="text/javascript" src="{{=URL(r=request,c='static',f='edit_area/edit_area_full.js')}}"></script><script language="Javascript" type="text/javascript">
editAreaLoader.init({id: "body",start_highlight: true,allow_resize: "both",allow_toggle: {{=editarea_preferences['ALLOW_TOGGLE']}},language: "en",syntax: "{{=filetype}}",replace_tab_by_spaces: {{=editarea_preferences['REPLACE_TAB_BY_SPACES']}}, font_size: {{=editarea_preferences['FONT_SIZE']}}, fullscreen: {{=editarea_preferences['FULL_SCREEN']}}, display: "{{=editarea_preferences['DISPLAY']}}", show_line_colors: true, word_wrap: true, save_callback: "doClickSave" {{if filetype=='html':}},plugins: "zencoding"{{pass}} });
</script>
<script language="Javascript" type="text/javascript" src="{{=URL('static','js/ajax_editor.js')}}"></script>
<script language="Javascript" type="text/javascript">
jQuery(document).ready(function(){
     setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
});
</script>
{{pass}}

{{block sectionclass}}edit{{end}}

<h2>{{=T('Editing file "%s"',filename)}}</h2>

{{if functions:}}
  <p class="formfield">
<span style="text-align:left;" id="exposed">
  {{=B(T('exposes:'))}}{{=XML(', '.join([A(f,_href=URL(a=app,c=controller,f=f)).xml() for f in functions]))}}
</span>
  {{if editviewlinks:}}<br/>
  {{=B(T('edit views:'))}}
  {{=XML(', '.join([v.xml() for v in editviewlinks]))}}
  {{pass}}
  </p>
{{pass}}

<p class="right controls">
  {{=button(URL('design',args=request.args[0]), T('back'))}}
  {{if edit_controller:}}
  {{=button(edit_controller, T('edit controller'))}}
  {{pass}}
  {{if view_link:}} 
  {{=button(view_link, T('try view'))}}
  {{pass}}
  {{if request.args[1]=='models':}}
  <a class="button" href="http://www.web2py.com/sqldesigner" target="_blank"><span>{{=T('online designer')}}</span></a>
  {{pass}}
  <a class="button" href="http://www.web2py.com/examples/static/epydoc/index.html" target="_blank"><span>{{=T('docs')}}</span></a>
</p>

<div id="editor_area">
  <form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
    <a value="save" name="save" onclick="return doClickSave();" class="icon saveicon">
      {{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
    </a>
    {{=T('Saved file hash:')}}
    <input type="input" name="file_hash" value="{{=file_hash}}" readonly="readonly"/>
    {{=T('Last saved on:')}} <input type="input" name="saved_on" value="{{=saved_on}}" readonly="readonly"/>
    {{if TEXT_EDITOR=='amy':}}
    <textarea style="width: auto; height:400px;direction:ltr;" rows="58" cols="100" -amy-enabled="true" id="body" name="data">{{=data}}</textarea>
    {{else:}}
    <textarea cols="80" rows="25" id="body" style="direction:ltr;" name="data">{{=data}}</textarea>
    {{pass}}
    <button class="editbutton" onclick="window.location.reload(); return false">{{=T('restore')}}</button> {{=T('currently saved or')}} <button class="editbutton" type="submit" name="revert">{{=T('revert')}}</button>
    {{=T('to  previous version.')}}
    <br/>
  </form>
</div>

{{if filetype=='html':}}
<div class="help">
  <h3>Key bindings for ZenCoding Plugin</h3>
  <ul>
    {{=shortcut('Ctrl+S', 'Save via Ajax')}}
    {{=shortcut('Ctrl+,', 'Expand Abbreviation')}}
    {{=shortcut('Ctrl+M', 'Match Pair')}}
    {{=shortcut('Ctrl+H', 'Wrap with Abbreviation')}}
    {{=shortcut('Shift+Ctrl+M', 'Merge Lines')}}
    {{=shortcut('Ctrl+Shift+←', 'Previous Edit Point')}}
    {{=shortcut('Ctrl+Shift+→', 'Next Edit Point')}}
    {{=shortcut('Ctrl+Shift+↑', 'Go to Matching Pair')}}
  </ul>
</div>
{{else:}}
<div class="help">
  <h3>Key bindings</h3>
  <ul>
    {{=shortcut('Ctrl+S', 'Save via Ajax')}}
  </ul>
</div>
{{pass}}

Added applications/admin/views/default/edit_language.html version [430adf4b8e].



















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script>
function delkey(id) {
  jQuery('#'+id).hide();
  jQuery('#'+id+' INPUT').val(String.fromCharCode(127));
  jQuery('#'+id+' TEXTAREA').val(String.fromCharCode(127));
  return false; 
}
</script>

{{block sectionclass}}edit_language{{end}}

<h2>{{=T('Editing Language file')}} "{{=filename}}"</h2>

<div class="languageform">
  {{=form}}
</div>

Added applications/admin/views/default/index.html version [0a3f176ace].






















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script type="text/javascript">
  jQuery(function() {
    jQuery("#password").focus();
  });
</script>

{{block sectionclass}}login{{end}}

<h2>web2py&trade; {{=T('Web Framework')}}</h2>
<h3>{{=T('Login to the Administrative Interface')}}</h3>
<p class="help">{{=T('ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.')}}</p>
<div class="form">
  <form action="{{=URL(r=request)}}" method="post">
    <div><input type="hidden" name="send" value="{{=send}}"/></div>
    <table>
      <tr><td>{{=T('Administrator Password:')}}</td><td><input type="password" name="password" id="password"/></td></tr>
      <tr><td></td><td><input type="submit" name="login" value="{{=T('Login')}}"/></td></tr>
    </table>
  </form>
</div>

Added applications/admin/views/default/peek.html version [ac2e58d0d6].

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}peek{{end}}

<h2>{{=T("Peeking at file")}} "{{=filename}}"</h2>

<p class="controls">
{{=button(URL('design',args=request.args[0]), T('back'))}}
{{=button(URL('edit',args=request.args), T('edit'))}}
</p>

{{
if filename[-3:]=='.py': language='python'
else: language='html'
}}
{{=CODE(data,language=language,link='/examples/global/vars/')}}

Added applications/admin/views/default/plugin.html version [084d2364cc].






























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{
import os
def all(items):
    return reduce(lambda a,b:a and b,items,True)
def peekfile(path,file):
    return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))
def editfile(path,file):
    return A(SPAN(T('edit')),_class='button editbutton',_href=URL('edit', args=(app, path, file)))
def testfile(path,file):
    return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')), SPAN(T("Run tests in this file"))), _class='icon test tooltip',_href=URL('test', args=(app, file)))
def editlanguagefile(path,file):
    return A(SPAN(T('edit')),_class='button editbutton',_href=URL('edit_language', args=(app, path, file))) 
def file_upload_form(location):
    form=FORM(T("upload file:")," ",
              INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
              INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
              INPUT(_type="hidden",_name="location",_value=location),
              INPUT(_type="hidden",_name="sender",_value=URL('design/'+app)),
              INPUT(_type="submit",_value=T("submit")),_action=URL('upload_file'))
    return form
def file_create_form(location):
    form=FORM(T("create file with filename:")," ",
              INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
              INPUT(_type="hidden",_name="location",_value=location),
              INPUT(_type="hidden",_name="sender",_value=URL('design/'+app)),
              INPUT(_type="submit",_value=T("submit")),_action=URL('create_file'))
    return form
def upload_plugin_form(app):
    form=FORM(T("upload plugin file:")," ",
              INPUT(_type="file",_name="pluginfile"),
              INPUT(_type="submit",_value=T("submit")))
    return form
def deletefile(arglist):
  return A(TAG[''](IMG(_src=URL('static', 'images/delete_icon.png')), SPAN(T('Delete this file (you will be asked to confirm deletion)'))), _class='icon delete tooltip', _href=URL('delete',args=arglist,vars=dict(sender=request.function+'/'+app)))
}}

{{block sectionclass}}plugin{{end}}

<h2>
  {{=T('Plugin "%s" in application', request.args(1))}} "{{=app}}"
</h2>
<div class="right-full controls">
  <a class="button special" href="#" onclick="jQuery('h3').click();return false"><span>{{=T("collapse/expand all")}}</span></a>
  <span class="buttongroup">
  {{=button("#models", T("models"))}}
  {{=button("#controllers", T("controllers"))}}
  {{=button("#views", T("views"))}}
  {{=button("#static", T("static"))}}
  {{=button("#modules", T("modules"))}}
  </span>
  <span class="buttongroup">
  {{=sp_button(URL('design',args=app), T("back"))}}
  {{=sp_button(URL('delete_plugin',args=request.args), T("delete plugin"))}}
  {{=sp_button(URL('pack_plugin',args=request.args), T("pack plugin"))}}
  </span>
</div>

<!-- MODELS -->

<h3 id="models" onclick="collapse('models_inner');" class="component">
  {{=T("Models")}}
</h3>
<div id="models_inner" class="component_contents">
  {{if not models:}}
  <p><strong>{{=T("There are no models")}}</strong></p>
  {{pass}}
  <div class="controls comptools">
  </div>
  <ul>
    {{for m in models:}}
    <li>
    <span class="filetools controls">
      {{=editfile('models',m)}}
      {{=deletefile([app, 'models', m])}}
    </span>
    <span class="file">
      {{=peekfile('models',m)}}
    </span>
    <span class="extras">
      {{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}}
    </span>
    </li>
    {{pass}}
  </ul>
</div>

<!-- FIND CONTROLLER FUNCTIONS -->
{{
controller_functions=[]
for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functions[c]]
}}

<!-- CONTROLLERS -->

<h3 id="controllers" onclick="collapse('controllers_inner');" class="component">
  {{=T("Controllers")}}
</h3>
<div id="controllers_inner" class="component_contents">
  {{if not controllers:}}
  <p><strong>{{=T("There are no controllers")}}</strong></p>
  {{pass}}
  <div class="controls comptools">
  </div>
  <ul>
    {{for c in controllers:}}
    <li>
    <span class="filetools controls">
      {{=editfile('controllers',c)}}
      {{=deletefile([app,'controllers',c])}}
      {{=testfile('controllers',c)}}
    </span>
    <span class="file">
      {{=peekfile('controllers',c)}}
    </span>
    <span class="extras">
      {{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
    </span>
    </li>
    {{pass}}
  </ul>
</div>

<!-- VIEWS -->

<h3 id="views" onclick="collapse('views_inner');" class="component">
  {{=T("Views")}}
</h3>
<div id="views_inner" class="component_contents">
  {{if not views:}}
  <p><strong>{{=T("There are no views")}}</strong></p>
  {{pass}}
  <div class="controls comptools">
  </div>
  <ul>
    {{for c in views:}}
    <li>
      <span class="filetools controls">
      {{=editfile('views',c)}}
      {{=deletefile([app,'views',c])}}
      </span>
      <span class="file">
      {{=peekfile('views',c)}}
      </span>
      <span class="extras">
      {{if extend.has_key(c):}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
      {{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}}
      </span>
    </li>
    {{pass}}
  </ul>
</div>

<!-- STATIC -->

<h3 id="static" onclick="collapse('static_inner');" class="component">
  {{=T("Static files")}}
</h3>
<div id="static_inner" class="component_contents">
  {{if not statics:}}<p><strong>{{=T("There are no static files")}}</strong></p>{{pass}}
  <ul>
    {{
    path=[]
    for file in statics+['']:
      items=file.split('/')
      file_path=items[:-1]
      filename=items[-1]
      while path!=file_path:
          if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
              path.append(file_path[len(path)])
              thispath='static__'+'__'.join(path)
    }}
    <li class="folder">
    <a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
    <ul id="{{=thispath}}" style="display: none;" class="sublist">{{
          else:
              path = path[:-1]
      }}
    </ul></li>
    {{
              pass
          pass
      if filename:
      }}<li>
      <span class="filetools controls">
	{{=editfile('static',file)}} {{=deletefile([app,'static',file])}}
      </span>
      <span class="file">
	<a href="{{=URL(a=app,c='static',f=file)}}">{{=filename}}</a>
      </span>
    </li>{{
          pass
      pass
    }}
    {{pass}}
  </ul>
</div>

<!-- MODULES -->

<h3 id="modules" onclick="collapse('modules_inner');" class="component">
  {{=T("Modules")}}
</h3>
<div id="modules_inner" class="component_contents">
  {{if not modules:}}
  <p><strong>{{=T("There are no modules")}}</strong></p>
  {{pass}}
  <div class="controls comptools">
  </div>
  <ul>
    {{for m in modules:}}
    <li>
    {{=editfile('modules',m)}}
    {{if m!='__init__.py':}}<a class="button" href="{{=URL('delete',args=[app,'modules',m],vars=dict(sender=request.function+'/'+app))}}">{{=T("delete")}}</a>{{pass}}
    {{=peekfile('modules',m)}}
    </li>
    {{pass}}
  </ul>
</div>


Added applications/admin/views/default/resolve.html version [7f562505ee].

























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}resolve{{end}}

<h2>{{=T('Resolve Conflict file')}} "{{=filename}}"</h2>

<script>
function plus() {jQuery('.plus').show(); jQuery('.minus').hide(); }
function minus() {jQuery('.plus').hide(); jQuery('.minus').show(); }
function all() {jQuery('.plus').show(); jQuery('.minus').show(); }
</script>

<div class="controls">
<button onclick="plus()">new</button>
<button onclick="minus()">old</button>
<button onclick="all()">all</button>
</div>

<div class="form">
  <form action="{{=URL(r=request,args=request.args)}}" method="post">
    {{=diff}}
    <input type="submit" name="merge" value="{{=T('merge')}}" /><br/>
  </form>
</div>

Added applications/admin/views/default/site.html version [f3096ca1c3].





























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{import os, glob}}

{{block sectionclass}}site{{end}}

<div class="applist f60">
  <div class="applist_inner">
    <h2>{{=T("Installed applications")}}</h2>
    <ul>
      {{for a in apps:}} 
      <li class="application"> <!-- onmouseover="jQuery(this).children('p').show()" onmouseout="jQuery(this).children('p').hide()"-->
        {{if a==request.application:}}
        <h3 class="currentapp">{{=a}} ({{=T('currently running')}})</h3>  
        <p class="controls">
        {{else:}}
        <h3 class="editableapp">{{=A(a,_href=URL(a,'default','index'))}}</h3> 
	{{if MULTI_USER_MODE and db.app(name=a):}}(created by {{="%(first_name)s %(last_name)s" % db.auth_user[db.app(name=a).owner]}}){{pass}}
        <p class="controls">
        {{if not os.path.exists('applications/%s/compiled' % a):}}
        {{=sp_button(URL('design',args=a), T("edit"))}}
        {{else:}}
        {{=button(URL(a,'appadmin','index'), T("appadmin"))}}
        {{pass}}
        {{=button(URL('about',args=a), T("about"))}}
        {{pass}}
        {{=button(URL('errors',args=a), T("errors"))}}
        {{=button(URL('cleanup',args=a), T("clean"))}}
        {{=button(URL('pack',args=a), T("pack all"))}}
        {{if not os.path.exists('applications/%s/compiled' % a):}}
        {{=button(URL('compile_app',args=a), T("compile"))}}
        {{else:}}
        {{=button(URL('pack',args=(a, 'compiled')), T("pack compiled"))}}
        {{if glob.glob('applications/%s/controllers/*.py' % a):}}
        {{=button(URL('remove_compiled_app',args=a), T("remove compiled"))}}
        {{pass}}
        {{pass}}
        {{if a!=request.application:}}
        {{=button(URL('uninstall',args=a), T("uninstall"))}}
        {{pass}}
        </p>
      </li>
      {{pass}}
    </ul>
  </div>
</div>

<div class="sidebar fl60">
  <div class="sidebar_inner controls">
    <div class="pwdchange">
      <!-- CHANGE ADMIN PWD -->
      {{if MULTI_USER_MODE:}}
      {{=auth.navbar()}}
      {{else:}}
      {{=sp_button(URL('change_password'), T('change admin password'))}}
      {{pass}}
    </div>
    <!-- VERSION -->
    {{if is_manager():}}
    <div class="box">
      <h3>{{=myversion}}</h3>      
      {{if session.check_version:}}
      <p id="check_version">
        {{=T('Checking for upgrades...')}}
      <script>ajax('{{=URL('check_version')}}',[],'check_version');</script>{{session.check_version=False}}
      {{else:}}
      <p id="check_version">
        {{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('check for upgrades'))}}
      {{pass}}
      </p>
      <div class="formfield">
	Running on {{=request.env.server_software}}
      </div>
    </div>
    {{pass}}
    <!-- APP WIZARD -->
    <div class="box">
      <h3>{{=T("New application wizard")}}</h3>
      <p>{{=button(URL('wizard','index'), T('start wizard'))}}
      {{=T("(requires internet access)")}}</p>
    </div>
    <!-- SCAFFOLD APP -->
    <div class="box">
      <h3>{{=T("New simple application")}}</h3>
      <form action="" enctype="multipart/form-data" method="post">
        <div class="formfield">
          {{=LABEL(T("Application name:"), _for="scaffold_filename")}} 
          <input name="filename" type="text" id="scaffold_filename" /> 
          <button type="submit" class="button">{{=T('create')}}</button>
        </div>
        <div class="hidden"></div>
      </form>
    </div>
    <!-- UPLOAD PACKAGE -->
    <div class="box">
      <h3>{{=T("Upload & install packed application")}}</h3>
      <form action="" enctype="multipart/form-data" method="post">
        <div class="formfield">
	  <table>
            <tr>
	      <td>
		{{=LABEL(T("Application name:"), _form='upload_filename')}}
	      </td>
	      <td>
		<input id="appname" name="filename" type="text" id="upload_filename" />
	      </td>
	    </tr>
	    <tr>
	      <td>
		{{=LABEL(T("Upload a package:"), _for='upload_file')}}
	      </td>
	      <td>
		<input id="file" name="file" type="file" id="upload_file" /> 
		<b>OR</b>
	      </td>
            </tr>
	    <tr>
              <td>
		{{=LABEL(T("Use an url:"), _for='upload_url')}}
	      </td>
	      <td>
		<input id="appurl" name="appurl" type="text" id="upload_url"/>
	      </td>
	    </tr>
	    <tr>
	      <td></td>
              <td>
		<input type="checkbox" name="overwrite_check" id="upload_overwrite" /> 
		{{=LABEL(T("overwrite installed app"), _for='upload_overwrite')}}
	      </td>
	    </tr>
	    <tr>
	      <td></td>
	      <td>
		<button type="submit">{{=T('install')}}</button>
	      </td>
	    </tr>
	  </table>
        </div>
      </form>
    </div>
    <!-- DEPLOY ON GAE -->
    <div class="box">
      <h3>{{=T("Deploy on Google App Engine")}}</h3>
      <p>{{=button(URL('gae','deploy'), T('deploy'))}}</p>
    </div><br/>
    {{if TWITTER_HASH:}}	
    <div class="box">
      <h3>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h3>
      <div id="tweets">{{=T('loading...')}}</div>
      <script>
        jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter')}}')});
      </script>
    </div>
    {{pass}}
  </div>
</div>

Added applications/admin/views/default/test.html version [b33a7eb19c].





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}test{{end}}

<h2>{{=T('Testing application')}} "{{=app}}"</h2>

{{for controller in sorted(controllers):}}
<div id='output_{{=controller[:-3]}}'>
  <h3>Testing controller "{{=controller}}"... <blink>please wait!</blink></h3>
</div>

<script><!--
ajax('{{=URL(a=app,c=controller[:-3],f='_TEST')}}',[],'output_{{=controller[:-3]}}');
//--></script>
{{pass}}

<p class="help">{{=T("""If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.
A green title indicates that all tests (if defined) passed. In this case test results are not shown.""")}}</p>
<p class="help">{{=T('Functions with no doctests will result in [passed] tests.')}}</p>
<p class="help">{{=T('ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.')}}</p>

Added applications/admin/views/default/ticket.html version [3b2eb9c387].





































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}ticket{{end}}

<h2>{{=T('Error ticket')}} for "{{=app}}"</h2>
<h3>{{=T('Ticket ID')}}</h3>
<p>{{=ticket}}</p>
{{if output:}}<h4>{{=output}}</h4>{{pass}}
<h3>{{=T('Version')}}</h3>
<table class="versions">
  <tbody>
    <tr>
      <th>web2py&trade;</th>
      <td>{{=myversion}}</td>
    </tr>
    <tr>
      <th>Python</th>
      <td>{{=snapshot.get('pyver','')}}</td>
    </tr>
  </tbody>
</table>
<h3>{{=T('Traceback')}}</h3>
<div class="inspect">
{{=traceback}}
</div>

{{if snapshot:}}
{{try:}}

    <!-- ERROR SNAPSHOT -->
    
    <h3>
    {{=T('Error snapshot')}} 
    <span class="tooltip">{{=helpicon()}} <span>{{=T('Detailed traceback description')}}</span></span>
    </h3>
    
    <!-- SNAPSHOT LIST -->
    
    <div id="snapshot">
    <!-- Exception details -->
      <p class="exception_object inspect">
      <code>{{=snapshot['etype']}}({{=snapshot['evalue']}})</code>
      </p>
      <p class="controls">
      <a class="button" onclick="collapse('exception_inner');"><span>{{=T('inspect attributes')}}</span></a>
      </p>
      <div id="exception_inner" class="hide">
        <div class="inspect">
          <h5>{{=T("Exception instance attributes")}}</h5>
          <table>
            <tbody>
              {{for k,v in snapshot['exception'].items():}}
              <tr>
                <th>{{=k}}</th>
                <td>{{=v}}</td>
              </tr>
              {{pass}}
            </tbody>
          </table>
        </div>
      </div>
    </div>
    
    <!-- FRAMES -->
    <div id="frames">
    <h4>{{=T('Frames')}}</h4>
    <ul>
      {{for i, frame in enumerate(snapshot['frames']):}}
      <li>
        {{is_hidden = (i != len(snapshot['frames'])-1 and 'hide' or 'inspect')}}
        <div class="framefile inspect controls">
          <p>
            <strong>File {{="%s in %s at line %s" % (frame['file'], frame['func'], frame['lnum'])}}</strong>
            <a class="button tbbutton" onclick="collapse('{{="%s_code_inner" % i}}');"><span>{{=T("code")}}</span></a> 
            <a class="button tbbutton" onclick="collapse('{{="%s_args_inner" % i}}');"><span>{{=T("arguments")}}</span></a> 
            <a class="button tbbutton" onclick="collapse('{{="%s_vars_inner" % i}}');"><span>{{=T("variables")}}</span></a>
          </p> 
          <div id="{{="%s_args_inner" % i}}" class="{{=is_hidden}}"> 
            <h5>Function argument list</h5>
            <p>{{=frame['call']}}</p>
          </div>
          <div id="{{="%s_code_inner" % i}}" class="{{=is_hidden}}">
            <h5>Code listing</h5>
            {{if frame['lines']:}}
            <pre>{{=CODE('\n'.join([x[1] for x in sorted(frame['lines'].items(),key=lambda x: x[0])]), 
                    language='python', link=None, counter=min(frame['lines'].keys()), highlight_line=frame['lnum'])}}</pre>
            {{pass}}
          </div>
          <div id="{{="%s_vars_inner" % i}}" class="{{=is_hidden}}">
            <h5>Variables</h5>
            <table>
              <tbody>
                {{for k,v in frame['dump'].items():}}
                <tr>
                  <th>{{=k}}</th>
                  <td>{{=v}}</td>
                </tr>
                {{pass}}
              </tbody>
            </table>
          </div>
        </div>
      </li>
    {{pass}}
    </ul>
    </div>

    <!-- VIEW ENVIRONMENT -->
    <div class="viewenv">
      <h4>Context</h4>
        <p class="controls">
        <a class="button" onclick="jQuery('#locals').slideToggle()"><span>{{=T('locals')}}</span></a>
        <a class="button" onclick="jQuery('#request').slideToggle()"><span>{{=T('request')}}</span></a>
        <a class="button" onclick="jQuery('#session').slideToggle()"><span>{{=T('session')}}</span></a>
        <a class="button" onclick="jQuery('#response').slideToggle()"><span>{{=T('response')}}</span></a>
        </p>
        <div class="hide inspect" id="locals"><h6>locals</h6>{{=BEAUTIFY(snapshot['locals'])}}</div>
        <div class="hide inspect" id="request"><h6>request</h6>{{=BEAUTIFY(snapshot['request'])}}</div>
        <div class="hide inspect" id="session"><h6>session</h6>{{=BEAUTIFY(snapshot['session'])}}</div>
        <div class="hide inspect" id="response"><h6>response</h6>{{=BEAUTIFY(snapshot['response'])}}</div>
    </div>
{{except Exception, e:}}
    <!-- this should not happen, just in case... (cannot output normal hmtl as we don't know current open tags) -->
    {{import traceback;tb=traceback.format_exc().replace("\n","\\n") }}
    <script language='javascript'>alert("Exception during snapshot rendering: {{=tb}} ");</script>
{{pass}}    
{{pass}}

<div class="errorsource">
  <h3>In file: {{=layer}}</h3>
  {{=CODE(code.replace('\r',''),language='python',link='/examples/global/vars/')}}
</div>

Added applications/admin/views/default/uninstall.html version [75f792cca9].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<center>
<h2>{{=T('Are you sure you want to uninstall application "%s"?', app)}}</h2>
<table><tr>
<td>{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('Abort')))}}</td>
<td>{{=FORM(INPUT(_type='submit',_name='delete',_value=T('Uninstall')))}}</td>
</tr></table>
</center>

Added applications/admin/views/default/upgrade_web2py.html version [16b8116e0f].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}upgrade{{end}}

<h2>{{=T('web2py upgrade')}}</h2>

<p class="center"><strong class="att">{{=T('ATTENTION:')}}</strong> {{=T('This is an experimental feature and it needs more testing. If you decide to upgrade you do it at your own risk')}}<br />
{{=T('If start the upgrade, be patient, it may take a while to download')}}</p>

<div class="center">
{{=FORM(INPUT(_type='submit',_name='noupgrade',_value=T('Cancel')), _class='inline')}}
{{=FORM(INPUT(_type='submit',_name='upgrade',_value=T('Upgrade')), _class='inline')}}
</div>

Added applications/admin/views/default/user.html version [7cba4a5dbc].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
{{=form}}
{{if request.args(0)=='login':}}
{{if not 'register' in auth.settings.actions_disabled:}}
<br/><a href="{{=URL(r=request,args='register')}}">register</a>
{{pass}}
{{if not 'request_reset_password' in auth.settings.actions_disabled:}}
<br/><a href="{{=URL(r=request,args='request_reset_password')}}">lost password</a>
{{pass}}
{{pass}}
</div>

<script language="javascript">
<!--
 jQuery("#web2py_user_form input:visible:enabled:first").focus();
//-->
</script> 

Added applications/admin/views/gae/deploy.html version [529bf86e08].































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script>$=jQuery</script>
<link rel="stylesheet" type="text/css" href="{{=URL(r=request,c='static',f='css/jqueryMultiSelect.css')}}" />
<script src="{{=URL(r=request,c='static',f='js/jqueryMultiSelect.js')}}"></script>
<script>
function callback() {
  $.get('{{=URL(r=request,f='callback')}}','',function(data,status){ if(data!='<done/>') { $('#target').html($('#target').html()+data); callback(); } });
}
$(document).ready(function() {
   $('#no_table_applications').multiSelect({selectAll: false});
   callback();
});
</script>

<h2>Google App Engine Deployment Interface</h2>

<p class="help">{{=T("This page can upload your application to the Google App Engine computing cloud. Mind that you must first create indexes locally and this is done by installing the Google appserver and running the app locally with it once, or there will be errors when selecting records. Attention: deployment may take long time, depending on the network speed. Attention: it will overwrite your app.yaml. DO NOT SUBMIT TWICE.")}}</p>

{{if command:}}
<h3>Command</h3>
<button onclick="$.get('{{=URL(r=request,f='kill')}}');">kill process</button>
{{=CODE(command)}}
<h3>GAE Output</h3>
<pre id="target"></pre>
{{else:}}
<h3>Deployment form</h3>
<div class="deploy_form form">
{{=form}}
</div>
{{pass}}

Added applications/admin/views/generic.html version [d02a1c1d33].



















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{"""

You should not modify this file. 
It is used as default when a view is not provided for your controllers

"""}}

{{=BEAUTIFY(response._vars)}}

<button onclick="document.location='{{=URL("admin","default","design",args=request.application)}}'">admin</button>
<button onclick="jQuery('#request').slideToggle()">request</button>
<div class="hidden" id="request"><h2>request</h2>{{=BEAUTIFY(request)}}</div>
<button onclick="jQuery('#session').slideToggle()">session</button>
<div class="hidden" id="session"><h2>session</h2>{{=BEAUTIFY(session)}}</div>
<button onclick="jQuery('#response').slideToggle()">response</button>
<div class="hidden" id="response"><h2>response</h2>{{=BEAUTIFY(response)}}</div>
<script>jQuery('.hidden').hide();</script>

Added applications/admin/views/layout.html version [c4facc28a3].













































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="P3P" content="CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"" />
        <title>{{=response.title or URL()}}</title>
        {{response.files.append(URL('static','css/styles.css'))}}
        {{include 'web2py_ajax.html'}}
        <script>jQuery.noConflict();</script>
    </head>
    <body class="{{=T('direction: ltr') == 'direction: rtl' and 'RTLbody' or ''}} {{block sectionclass}}home{{end}}">
        <div id="header">
          <h1 id="start">
            <a href="{{=URL('default', 'index')}}" class="button"><span>web2py&trade; {{=T('administrative interface')}}</span></a>
          </h1>
          {{if response.menu is not None:}}
          <ul id="menu">
              {{for _name,_active,_link in response.menu:}}
              <li>{{=A(SPAN(_name), _href=_link, _class=_active and 'button select' or 'button')}}</li>
              {{pass}}
          </ul>
          {{pass}}
        </div>
        <div id="main">
            <div id="main_inner">
                <div class="flash">{{=response.flash or ''}}</div>
                {{include}}
            </div>
        </div>
        <div id="footer" class="fixed">
            {{=T('Powered by')}} {{=A('web2py', _href='http://www.web2py.com')}}&trade; {{=T('created by')}} Massimo Di Pierro &copy;2007-2010 -
	    {{if hasattr(T,'get_possible_languages'):}}
	    <span>
	      {{=T('Admin language')}}
	      <select name="adminlanguage" onchange="var date = new Date();cookieDate=date.setTime(date.getTime()+(100*24*60*60*1000));document.cookie='adminLanguage='+this.options[this.selectedIndex].value+'; expires='+cookieDate+'; path=/';window.location.reload()">
		{{for language in T.get_possible_languages():}}
		<option {{=T.accepted_language==language and 'selected' or ''}} >{{=language}}</option>
		{{pass}}
	      </select>
	    </span>
	    {{pass}}
        </div>
    </body>
</html>

Added applications/admin/views/mercurial/commit.html version [6f21b7273e].


































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{import time}}

<h2>Mercurial Version Control System Interface<br />
for application "{{=request.args[0]}}"</h2>

<h3>Commit form</h3>
{{=form}}


{{if repo['.'].rev()>=0:}}
<h3>Last Revision</h3>
<table>
<tr><td>Revision:</td><td>{{=repo['.'].rev()}}</td></tr>
<tr><td>Node:</td><td>{{=repo['.']}}</td></tr>
<tr><td>Created by:</td><td>{{=repo['.'].user()}}</td></tr>
<tr><td>Created on:</td><td>{{=time.ctime(repo['.'].date()[0])}}</td></tr>
<tr><td>Description:</td><td>{{=repo['.'].description()}}</td></tr>
</table>

<h3>Past revisions</h3>
<div class="changes">
  {{=changes}}
</div>

{{if files:}}
<h3>Committed files</h3>
<div class="files">
{{=files}}
</div>
{{pass}}

{{pass}}

Added applications/admin/views/mercurial/revision.html version [8bba96c6e6].


















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<h2 class="section">Revision {{=rev}}</h2>

{{=form}}

<br/><br/>
<h3>Changelog</h3>

{{=desc}}

<br/><br/>
<h3>Files added</h3>

{{=TABLE(*[TR(f) for f in files])}}


Added applications/admin/views/shell/index.html version [8180a3aa71].



































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}shell{{end}}
<!--style type="text/css">

.prompt, #output {
  width: 45em;
  border: 1px solid #CCCCCC;
  font-size: 10pt;
  margin: 0.5em;
  padding: 0.5em;
  padding-right: 0em;
  overflow: auto;
  wrap: hard;
}

#output {
  height:250px;overflow:auto;
}

#toolbar {
  margin-left: 0.5em;
  padding-left: 0.5em;
}

#caret {
  width: 2.5em;
  margin-right: 0px;
  padding-right: 0px;
  border-right: 0px;
}

#statement {
  width: 43em;
  margin-left: -1em;
  padding-left: 0px;
  border-left: 0px;
  background-position: top right;
  background-repeat: no-repeat;
}

.processing {
  background-image: url("{{=URL('static','images/spinner.gif')}}");
}

#ajax-status {
  font-weight: bold;
}

.message {
  color: #8AD;
  font-weight: bold;
  font-style: italic;
}

.error {
  color: #F44;
}

.username {
  font-weight: bold;
}

</style-->

<div id="wrapper">
  <textarea id="output" readonly="readonly">web2py Shell {{=request.env.web2py_version}}</textarea>

  <form id="form" action="{{=URL(r=request,f='callback',args=app)}}" method="get">
    <div id="shellwrapper">
      <div id="caret">&gt;&gt;&gt;</div>
      <div class="tooltip">
        <textarea class="prompt" name="statement" id="statement"></textarea>
        <span>Type some Python code in here and hit Return (Enter) to execute it.</span>
      </div>
    </div>
  </form>
</div>

<div class="help">
  <ul>
    <li>Using the shell may lock the database to other users of this app.</li>
    <li>Each db statement is automatically committed.</li>
    <li>Creating new tables dynamically is not allowed.</li>
    <li>Models are automatically imported in the shell.</li>
  </ul>
</div>

<script type="text/javascript">
var bShellScrolling=0
jQuery(document).ready(function(){
  jQuery('#statement').focus();

  jQuery('#statement').keyup(function(event){ 
    var t=jQuery(this),
    s=t.val(),
    o=jQuery('#output'),
    RETURN = 38;
    if(s=='\n') t.val('');
    if(s.length>1 && s.substr(s.length-1,1)=='\n' && s.substr(s.length-2,1)!=':' &&
    (s.indexOf(':\n ')<0 || s.substr(s.length-2,1)=='\n')) {
      t.val('');
      jQuery.post("{{=URL(r=request,f='callback',args=app)}}",
      {statement:s},function(data){o.html(o.html()+data).attr('scrollTop',o.attr('scrollHeight'));});
    } else { };
    if(event.keyCode==RETURN){
      var i=s.length
      if(i==0){
        var s=o.find('table:last pre:first').text();
        bShellScrolling=o.find('table').length;
      }else if(bShellScrolling){
        var i=bShellScrolling
        if(i<1){
          return
        }else{
          i--
          var s=o.find('table:nth-child('+(i)+') pre:first').text();
          bShellScrolling=i
        }
      }else if(s.indexOf('\n')<0){
        var oo=o.find('tr:first-child pre:contains("'+s+'")')
        if(oo.length==0){
          return
        }else if(oo.length==1){
          s=oo.text();
        }else{
          sVar=oo.text();
          o.html(o.html()+'<dd>'+s+' ?</dd><dt>'+sVar+'</dt>').attr('scrollTop',o.attr('scrollHeight'))
          return
        }
      }else{
        //multistring expr
        return;
      }
      //  if(s.slice(s.length-1)=='\n'){
      s=s.slice(0,s.length-1)
      //	}
      t.val(s);
    }
    if(bShellScrolling && event.keyCode==40){
      var i=bShellScrolling
      i++
      var s=o.find('table:nth-child('+i+') tr:first-child pre').text();
      if(s){
        s=s.slice(0,s.length-1)
        t.val(s);
        bShellScrolling=i
      }else{
        bShellScrolling=0
        t.val('')
      }
    };
    if(bShellScrolling && (event.keyCode==37 || event.keyCode==39)){
      bShellScrolling=0;
    };
    if(event.keyCode==27){
      bShellScrolling=0;
      t.val('');
    };
  });
});
</script>

Added applications/admin/views/toolbar/index.html version [a908ea6ef0].


















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<html>
  <head>
    {{response.files.append(URL('static','js/jquery.js'))}}
    {{include 'web2py_ajax.html'}}
  </head>  
  <body style="border:0; margin:0; padding:0;">    
    <div style="background: #aaaaaa; font-family:hevetica;font-size:9px">
      URL: {{=URL(app,'default','index')}}
      <button onclick="ajax('{{=URL('admin','toolbar','profiler')}}',[],'profiler_inner');jQuery('#profiler').slideDown()">profiler</button>
      <div id="profiler" class="hidden">
	<button onclick="jQuery('#profiler').slideUp()">close</button>
	<pre id="profiler_inner">profiler info</pre>
      </div>
    </div>
    <iframe style="border:0;" width="100%" height="100%" src="{{=URL(app,'default','index')}}"></iframe>      
  </body>
</html>

Added applications/admin/views/web2py_ajax.html version [679a48264c].




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
response.files.insert(0,URL('static','js/jquery.js'))
response.files.insert(1,URL('static','css/calendar.css'))
response.files.insert(2,URL('static','js/calendar.js'))
for _item in response.meta or []:}}
     <meta name="{{=_item}}" content="{{=response.meta[_item]}}" />{{
pass
for _k,_file in enumerate(response.files or []):
  if _file in response.files[:_k]:
     continue
  _file0=_file.lower().split('?')[0]
  if _file0.endswith('.css'):}}
     <link href="{{=_file}}" rel="stylesheet" type="text/css" />{{
  elif _file0.endswith('.js'):}}
     <script src="{{=_file}}" type="text/javascript"></script>{{
  pass
pass
}}

    <script type="text/javascript"><!--
	// These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
    var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
    var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
    var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
    //--></script>

    <script src="{{=URL('static','js/web2py_ajax.js')}}" type="text/javascript"></script>

Added applications/admin/views/wizard/generated.html version [599b024473].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}generated{{end}}

<a class="button" href="{{=URL(app,'default','index')}}">Open new app in new window</a>
<a class="button" href="{{=URL('step1')}}">Back to wizard</a>
<a class="button" href="{{=URL('default','design',args=app)}}">Admin design page</a>
{{if have_mercurial:}}
<a class="button" href="{{=URL('mercurial','commit',args=app)}}">Admin versioning page</a>
{{pass}}
<a class="button" href="{{=URL(app,'appadmin','index')}}">Database administration</a>
<br/><br/>
<iframe style="width: 100%; height: 100%; min-height:600px" src="{{=URL(app,'default','index')}}"></iframe>

Added applications/admin/views/wizard/step.html version [0b95247d7c].













































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

{{block sectionclass}}step{{end}}

<h2>{{=T('New Application Wizard')}}</h2>

<div id="wizard_nav" class="f20 controls">
{{if request.function=='index':}}
  <h3>{{=T('Start a new app')}}</h3>
{{else:}}
  <div class="box">
    <h3>{{=T('Basics')}}</h3>
    <p>{{=button(URL('index'), T('restart'))}}</p>
    <p><strong>App Name:</strong> {{=session.app['name']}}</p>
  </div>
  <div class="box">
    <h3>Current settings</h3>      
    <p>{{=button(URL('step1'), T('edit'))}}</p>
    <ul id="current_settings">
    	{{for key,value in session.app['params']:}}
    	<li><b>{{=key}}:</b> {{=value}}</li>
    	{{pass}}
    </ul>
  </div>
  <div class="box">
    <h3>Tables</h3>
    <p>{{=button(URL('step2'), T('edit all'))}}</p>
    <ul>
    	{{for i,table in enumerate(session.app['tables']):}}
    	<li>{{=button(URL('step3',args=i), T('edit'))}} <strong>{{=table}}</strong></li>
    	{{pass}}
    </ul>
  </div>
  <div class="box">
    <h3>Pages</h3>
    <p>{{=button(URL('step4'), T('edit all'))}}</p>
    <ul>
      {{for i,page in enumerate(session.app['pages']):}}
      <li>{{=button(URL('step5',args=i), T('edit'))}} <strong>{{=page}}</strong></li>
      {{pass}}
    </ul>
  </div>
  <div class="box">
    <h3>{{=T('Generate')}}</h3>
    <p>{{=button(URL('step6'), T('go!'))}}</p>
  </div>
{{pass}}
</div>

<div id="wizard_form" class="fl20 controls">

  <!-- FORM -->
  
  {{if 'step' in request.function:}}
  <h3>{{=T('Step')}} {{=step}}</h3>
  {{if request.function!='step1':}}
  {{=button(URL('step' + str(int(request.function[-1])-1)), T('back'))}}
  {{pass}}
  {{else:}}
  <h3>{{=T('Begin')}}</h3>
  {{pass}}
  {{if request.function in ('step1','step2','step3','step4','step5'):}}
  {{=button(URL('step6'), T('skip to generate'))}}
  {{pass}}
  <br /><br />
  {{if request.function in ('step1','step6'):}}
  <img src="{{=LAYOUTS_APP}}/static/plugin_layouts/layouts/{{=dict(session.app['params'])['layout_theme']}}/preview.png" alt="" align="right" id="preview"/>
  {{pass}}
  <div class="form">
    {{=form}}
  </div>
  <script>
jQuery(document).ready(function(){
        var t=jQuery('#no_table_layout_theme');
  t.change(function(){
           jQuery('#preview').attr('src','{{=LAYOUTS_APP}}/static/plugin_layouts/layouts/'+t.val()+'/preview.png');
      });
});
  </script>
  
  <!-- INSTRUCTIONS -->
  <div class="box">
    <h4>Instructions</h4>
    <div class="help">
      {{if request.function=='index':}}
      <ul>
      	<li>Insert the name of a new app.</li>
      	<li>If the app exists and was created with the wizard, you will be able to edit it, but any manual editing to the app <b>will be lost</b>.</li>
      </ul>
      {{elif request.function=='step1':}}
      <ul>
        <li>This Wizard will help you build a new web2py app.</li>	
      	<li>You can create an app with a name that already exists.</li>
      	<li>If you do not have an email server set email server to "logging".</li>
      	<li>If you want to use Janrain Engage for login: 1) Sign up for a <a href="http://www.janrain.com/products/engage">Janrain Engage</a> account; 2) Register you hostname, domain, and obtain an api key; 3) Set Login Config above to "domain:api_key".</li>
	<li>ATTENTION: you can use the wizard to download plugins BUT we cannot guarantee the stability or backward compatibility of plugins. Moreover plugins may conflict with each other. Anyway, we do recommend installing plugin "wiki" with adds CMS like capabilities to your app.</li>
      </ul>
      {{elif request.function=='step2':}}
      <ul>
        <li>List the names of table that you need.</li>
      	<li>If you do not need authentication remove the table "auth_user".</li>
      	<li>Press enter to create a new input row.</li>
      	<li>Empty rows are ignored.</li>
      	<li>Other tables for role based access control will be created automatically, and do not need to be listed.</li>
        <li>You will be able to add fields later.</li>	
      </ul>
      {{elif request.function=='step3':}}
      <ul>
      	<li>List the fields for this table (do not include an id field, it is automatic), for example "name unique" or "birthday date" or "image upload" or "comments multiple" or "description wiki required"</li>
      	<li>The first keyword(s) for each entry will be used to generate a name for the table field and its label. You can use spaces an other unicode characters.</li>
        <li>Keywords "string" (default), "text", "integer", "boolean", "float", "double", "file", "date", "time", "datetime", "file", "upload" will be used to determine the field type and they will not be made part of the field name.</ li>
        <li>For a reference field use a field name, followed by the name of the referenced table.</li>
      	<li>Other special keywords are "required", "notnull" or "notempty", "unique". They map into equivalent validators but (at this time) should only be used with string and text types.</li>
      	<li>The keywords "html" and "wiki" force a text type and set a representation for the field value as sanitized HTML and MARKMIN resepectively.</li>
        <li>string, integer and reference fields can be "multiple", i.e. multiple values will be allowed</li>
      	<li>For the "auth_user" table do not add attributes to the default fields (username, first_name, last_name, password and email). They are handled automatically.</li>
        <li>Some fields will be added automatically upon creation and handled automatically: "created_by", "created_on", "modified_by", "modified_on", "active" (only active fields can be selected).</li>
        <li>For every table "table" another table "table_archive" is created and it contains the previous versions of each record. This is only accessible via appadmin or programmatically.</li> 
      </ul>
      {{elif request.function=='step4':}}
      <ul>
      	<li>List the names of the pages you want to create.</li>
        <li>Some pages are listed automatically because they expose Create/Read/Update/Delete for each tables you have created.</li>
        <li>All pages, except "error" and those with name starting in underscore willbe listed in the menu. You will be able to edit the menu later.</li>
        <li>You should have page "index", the starting point of your app, and page "error", where web2py will redirect to in case of error.</li>
            </ul>
            {{elif request.function=='step5':}}
            <ul>
        <li>Use the markmin syntax to add text to your pages.</li>
            </ul>
            {{elif request.function=='step6':}}
            <ul>
        <li>Almost done. Click on the button above to create your new app.</li>
        <li>Once done you will be able to edit it as any normal web2py app.</li>
      </ul>
      {{pass}}
    </div>
  </div>
</div>

Added applications/examples/ABOUT version [ea96ed160b].







1
2
3
4
5
6
+
+
+
+
+
+
web2py is an open source full-stack framework for agile development 
of secure database-driven web-based applications, written and programmable in 
Python. 

Created by Massimo Di Pierro <mdipierro@cs.depaul.edu>

Added applications/examples/LICENSE version [4719a3b620].










































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## Web2py License

Web2py is Licensed under the LGPL license version 3 
(http://www.gnu.org/licenses/lgpl.html)

Copyrighted (c) by Massimo Di Pierro (2007-2011)

### On Commercial Redistribution

In accordance with LGPL you may:
- redistribute web2py with your apps (including official web2py binary versions)
- release your applications which use official web2py libraries under any license you wish
But you must:
- make clear in the documentation that your application uses web2py
- release any modification of the web2py libraries under the LGPLv3 license

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 
NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT 
HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, 
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES 
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER 
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

(Earlier versions of web2py, 1.0.*-1.90.*, were released under the GPL2 license plus a
commercial exception which, for practical purposes, was very similar to the current LPGLv3)

### Licenses for third party contributed software

web2py contains third party software under the gluon/contrib/ folder.
Each file/module in contrib is distributed with web2py under its original license.
Here we list some of them.

#### gluon.contrib.simplejson LICENSE

Copyright (c) 2006 Bob Ippolito - 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.

#### gluon.contrib.rss2.py (originally PyRSS2Gen) LICENSE

This is copyright (c) by Dalke Scientific Software, LLC and released under the
BSD license.  See the file LICENSE in the distribution or 
<http://www.opensource.org/licenses/bsd-license.php> for details.

#### gluon.contrib.markdown (markdown2) LICENSE

MIT License from from <http://code.google.com/p/python-markdown2/>

#### gluon.contrib.feedparser LICENSE

Copyright (c) 2002-2005, Mark Pilgrim

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.

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.

#### gluon.wsgiserver.py LICENSE (borrowed from cherrypy)

Copyright (c) 2004, CherryPy Team (team@cherrypy.org)
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.
    * Neither the name of the CherryPy Team nor the names of its contributors 
      may 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.

#### gluon.contrib.pam LICENSE

Copyright (C) 2007-2009 Chris AtLee <chris@atlee.ca> Licensed under the MIT license

#### gluon.contrib.shell LICENSE

Copyright (C) by Google inc. Apache 2.0 Lincense

#### The javascript licenses are in the code itself

Added applications/examples/__init__.py version [da39a3ee5e].

Added applications/examples/controllers/ajax_examples.py version [c86cb0618f].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+




def index():
    return dict()


def data():
    if not session.m or len(session.m) == 10:
        session.m = []
    if request.vars.q:
        session.m.append(request.vars.q)
    session.m.sort()
    return TABLE(*[TR(v) for v in session.m]).xml()


def flash():
    response.flash = 'this text should appear!'
    return dict()


def fade():
    return dict()


Added applications/examples/controllers/appadmin.py version [1eb6fe022d].

























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################

import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils

# ## critical --- make a copy of the environment

global_env = copy.copy(globals())
global_env['datetime'] = datetime

http_host = request.env.http_host.split(':')[0]
remote_addr = request.env.remote_addr
try:
    hosts = (http_host, socket.gethostname(),
             socket.gethostbyname(http_host),
             '::1','127.0.0.1','::ffff:127.0.0.1')
except:
    hosts = (http_host, )

if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
     in ['https', 'HTTPS']:
    session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
    raise HTTP(200, T('appadmin is disabled because insecure channel'))

if (request.application=='admin' and not session.authorized) or \
        (request.application!='admin' and not gluon.fileutils.check_credentials(request)):
    redirect(URL('admin', 'default', 'index'))

ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
                 args=[request.application])], [T('db'), False,
                 URL('index')], [T('state'), False,
                 URL('state')], [T('cache'), False,
                 URL('ccache')]]

# ##########################################################
# ## auxiliary functions
# ###########################################################


def get_databases(request):
    dbs = {}
    for (key, value) in global_env.items():
        cond = False
        try:
            cond = isinstance(value, GQLDB)
        except:
            cond = isinstance(value, SQLDB)
        if cond:
            dbs[key] = value
    return dbs


databases = get_databases(None)


def eval_in_global_env(text):
    exec ('_ret=%s' % text, {}, global_env)
    return global_env['_ret']


def get_database(request):
    if request.args and request.args[0] in databases:
        return eval_in_global_env(request.args[0])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_table(request):
    db = get_database(request)
    if len(request.args) > 1 and request.args[1] in db.tables:
        return (db, request.args[1])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_query(request):
    try:
        return eval_in_global_env(request.vars.query)
    except Exception:
        return None


def query_by_table_type(tablename,db,request=request):
    keyed = hasattr(db[tablename],'_primarykey')
    if keyed:
        firstkey = db[tablename][db[tablename]._primarykey[0]]
        cond = '>0'
        if firstkey.type in ['string', 'text']:
            cond = '!=""'
        qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
    else:
        qry = '%s.%s.id>0' % tuple(request.args[:2])
    return qry



# ##########################################################
# ## list all databases and tables
# ###########################################################


def index():
    return dict(databases=databases)


# ##########################################################
# ## insert a new record
# ###########################################################


def insert():
    (db, table) = get_table(request)
    form = SQLFORM(db[table], ignore_rw=ignore_rw)
    if form.accepts(request.vars, session):
        response.flash = T('new record inserted')
    return dict(form=form,table=db[table])


# ##########################################################
# ## list all records in table and insert new record
# ###########################################################


def download():
    import os
    db = get_database(request)
    return response.download(request,db)

def csv():
    import gluon.contenttype
    response.headers['Content-Type'] = \
        gluon.contenttype.contenttype('.csv')
    db = get_database(request)
    query = get_query(request)
    if not query:
        return None
    response.headers['Content-disposition'] = 'attachment; filename=%s_%s.csv'\
         % tuple(request.vars.query.split('.')[:2])
    return str(db(query).select())


def import_csv(table, file):
    table.import_from_csv_file(file)

def select():
    import re
    db = get_database(request)
    dbname = request.args[0]
    regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
    if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
        regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
    if request.vars.query:
        match = regex.match(request.vars.query)
        if match:
            request.vars.query = '%s.%s.%s==%s' % (request.args[0],
                    match.group('table'), match.group('field'),
                    match.group('value'))
    else:
        request.vars.query = session.last_query
    query = get_query(request)
    if request.vars.start:
        start = int(request.vars.start)
    else:
        start = 0
    nrows = 0
    stop = start + 100
    table = None
    rows = []
    orderby = request.vars.orderby
    if orderby:
        orderby = dbname + '.' + orderby
        if orderby == session.last_orderby:
            if orderby[0] == '~':
                orderby = orderby[1:]
            else:
                orderby = '~' + orderby
    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 '',
                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',
                _class='delete', _type='checkbox', value=False), ''),
                TR('', '', INPUT(_type='submit', _value='submit'))),
                _action=URL(r=request,args=request.args))
    if request.vars.csvfile != None:
        try:
            import_csv(db[request.vars.table],
                       request.vars.csvfile.file)
            response.flash = T('data uploaded')
        except Exception, e:
            response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
    if form.accepts(request.vars, formname=None):
#         regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
        regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')

        match = regex.match(form.vars.query.strip())
        if match:
            table = match.group('table')
        try:
            nrows = db(query).count()
            if form.vars.update_check and form.vars.update_fields:
                db(query).update(**eval_in_global_env('dict(%s)'
                                  % form.vars.update_fields))
                response.flash = T('%s rows updated', nrows)
            elif form.vars.delete_check:
                db(query).delete()
                response.flash = T('%s rows deleted', nrows)
            nrows = db(query).count()
            if orderby:
                rows = db(query).select(limitby=(start, stop),
                        orderby=eval_in_global_env(orderby))
            else:
                rows = db(query).select(limitby=(start, stop))
        except Exception, e:
            (rows, nrows) = ([], 0)
            response.flash = DIV(T('Invalid Query'),PRE(str(e)))
    return dict(
        form=form,
        table=table,
        start=start,
        stop=stop,
        nrows=nrows,
        rows=rows,
        query=request.vars.query,
        )


# ##########################################################
# ## edit delete one record
# ###########################################################


def update():
    (db, table) = get_table(request)
    keyed = hasattr(db[table],'_primarykey')
    record = None
    if keyed:
        key = [f for f in request.vars if f in db[table]._primarykey]
        if key:
            record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
    else:
        record = db(db[table].id == request.args(2)).select().first()

    if not record:
        qry = query_by_table_type(table, db)
        session.flash = T('record does not exist')
        redirect(URL('select', args=request.args[:1],
                     vars=dict(query=qry)))

    if keyed:
        for k in db[table]._primarykey:
            db[table][k].writable=False

    form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
                   ignore_rw=ignore_rw and not keyed,
                   linkto=URL('select',
                   args=request.args[:1]), upload=URL(r=request,
                   f='download', args=request.args[:1]))

    if form.accepts(request.vars, session):
        session.flash = T('done!')
        qry = query_by_table_type(table, db)
        redirect(URL('select', args=request.args[:1],
                 vars=dict(query=qry)))
    return dict(form=form,table=db[table])


# ##########################################################
# ## get global variables
# ###########################################################


def state():
    return dict()

def ccache():
    form = FORM(
        P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
        P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
        P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
    )

    if form.accepts(request.vars, session):
        clear_ram = False
        clear_disk = False
        session.flash = ""
        if request.vars.yes:
            clear_ram = clear_disk = True
        if request.vars.ram:
            clear_ram = True
        if request.vars.disk:
            clear_disk = True

        if clear_ram:
            cache.ram.clear()
            session.flash += "Ram Cleared "
        if clear_disk:
            cache.disk.clear()
            session.flash += "Disk Cleared"

        redirect(URL(r=request))

    try:
        from guppy import hpy; hp=hpy()
    except ImportError:
        hp = False

    import shelve, os, copy, time, math
    from gluon import portalocker

    ram = {
        'bytes': 0,
        'objects': 0,
        'hits': 0,
        'misses': 0,
        'ratio': 0,
        'oldest': time.time()
    }
    disk = copy.copy(ram)
    total = copy.copy(ram)

    for key, value in cache.ram.storage.items():
        if isinstance(value, dict):
            ram['hits'] = value['hit_total'] - value['misses']
            ram['misses'] = value['misses']
            try:
                ram['ratio'] = ram['hits'] * 100 / value['hit_total']
            except (KeyError, ZeroDivisionError):
                ram['ratio'] = 0
        else:
            if hp:
                ram['bytes'] += hp.iso(value[1]).size
                ram['objects'] += hp.iso(value[1]).count

                if value[0] < ram['oldest']:
                    ram['oldest'] = value[0]

    locker = open(os.path.join(request.folder,
                                        'cache/cache.lock'), 'a')
    portalocker.lock(locker, portalocker.LOCK_EX)
    disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
    try:
        for key, value in disk_storage.items():
            if isinstance(value, dict):
                disk['hits'] = value['hit_total'] - value['misses']
                disk['misses'] = value['misses']
                try:
                    disk['ratio'] = disk['hits'] * 100 / value['hit_total']
                except (KeyError, ZeroDivisionError):
                    disk['ratio'] = 0
            else:
                if hp:
                    disk['bytes'] += hp.iso(value[1]).size
                    disk['objects'] += hp.iso(value[1]).count
                    if value[0] < disk['oldest']:
                        disk['oldest'] = value[0]
    finally:
        portalocker.unlock(locker)
        locker.close()
        disk_storage.close()

    total['bytes'] = ram['bytes'] + disk['bytes']
    total['objects'] = ram['objects'] + disk['objects']
    total['hits'] = ram['hits'] + disk['hits']
    total['misses'] = ram['misses'] + disk['misses']
    try:
        total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
    except (KeyError, ZeroDivisionError):
        total['ratio'] = 0

    if disk['oldest'] < ram['oldest']:
        total['oldest'] = disk['oldest']
    else:
        total['oldest'] = ram['oldest']

    def GetInHMS(seconds):
        hours = math.floor(seconds / 3600)
        seconds -= hours * 3600
        minutes = math.floor(seconds / 60)
        seconds -= minutes * 60
        seconds = math.floor(seconds)

        return (hours, minutes, seconds)

    ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
    disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
    total['oldest'] = GetInHMS(time.time() - total['oldest'])

    return dict(form=form, total=total,
                ram=ram, disk=disk)

Added applications/examples/controllers/database_examples.py version [d7a27016aa].

























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from gluon.fileutils import read_file

response.menu = [['Register User', False, URL(r=request,
                 f='register_user')], ['Register Dog', False,
                 URL('register_dog')], ['Register Product'
                 , False, URL('register_product')],
                 ['Buy product', False, URL('buy')]]


def register_user():
    """ simple user registration form with validation and database.insert()
        also lists all records currently in the table"""

    # ## create an insert form from the table

    form = SQLFORM(db.users)

    # ## if form correct perform the insert

    if form.accepts(request.vars, session):
        response.flash = 'new record inserted'

    # ## and get a list of all users

    records = SQLTABLE(db().select(db.users.ALL))
    return dict(form=form, records=records)


def register_dog():
    """ simple user registration form with validation and database.insert()
        also lists all records currently in the table"""

    form = SQLFORM(db.dogs)
    if form.accepts(request.vars, session):
        response.flash = 'new record inserted'
    download = URL('download')  # to see the picture
    records = SQLTABLE(db().select(db.dogs.ALL), upload=download)
    return dict(form=form, records=records)


def register_product():
    """ simple user registration form with validation and database.insert()
        also lists all records currently in the table"""

    form = SQLFORM(db.products)
    if form.accepts(request.vars, session):
        response.flash = 'new record inserted'
    records = SQLTABLE(db().select(db.products.ALL))
    return dict(form=form, records=records)


def buy():
    """ uses a form to query who is buying what. validates form and
        updates existing record or inserts new record in purchases """

    buyerRecords = db().select(db.users.ALL)
    buyerOptions = []
    for row in buyerRecords:
        buyerOptions.append(OPTION(row.name, _value=row.id))

    productRecords = db().select(db.products.ALL)
    productOptions = []
    for row in productRecords:
        productOptions.append(OPTION(row.name, _value=row.id))

    form = FORM(TABLE(
                TR('Buyer id:',
                    SELECT(buyerOptions,_name='buyer_id')),
                TR('Product id:',
                    SELECT(productOptions,_name='product_id')),
                TR('Quantity:',
                    INPUT(_type='text', _name='quantity',
                          requires=IS_INT_IN_RANGE(1, 100))),
                TR('',
                    INPUT(_type='submit', _value='Order'))
                ))
    if form.accepts(request.vars, session, keepvalues=True):

        # ## check if user is in the database

        if len(db(db.users.id == form.vars.buyer_id).select()) == 0:
            form.errors.buyer_id = 'buyer not in database'

        # ## check if product is the database

        if len(db(db.products.id == form.vars.product_id).select())\
             == 0:
            form.errors.product_id = 'product not in database'

        # ## if no errors

        if len(form.errors) == 0:

            # ## get a list of same purchases by same user

            purchases = db((db.purchases.buyer_id == form.vars.buyer_id)
                            & (db.purchases.product_id
                            == form.vars.product_id)).select()

            # ## if list contains a record, update that record

            if len(purchases) > 0:
                purchases[0].update_record(quantity=purchases[0].quantity
                         + form.vars.quantity)
            else:

            # ## or insert a new record in table
                db.purchases.insert(buyer_id=form.vars.buyer_id,
                                    product_id=form.vars.product_id,
                                    quantity=form.vars.quantity)
            response.flash = 'product purchased!'
    if len(form.errors):
        response.flash = 'invalid values in form!'

    # ## now get a list of all purchases

    # quick fix to make it runnable on gae
    if purchased:
        records = db(purchased).select(db.users.name,
                                       db.purchases.quantity,
                                       db.products.name)
    else:
        records = db().select(db.purchases.ALL)
    return dict(form=form, records=SQLTABLE(records), vars=form.vars,
                vars2=request.vars)


def delete_purchased():
    """ delete all records in purchases """

    db(db.purchases.id > 0).delete()
    redirect(URL('buy'))


def reset_purchased():
    """ set quantity=0 for all records in purchases """

    db(db.purchases.id > 0).update(quantity=0)
    redirect(URL('buy'))


def download():
    """ used to download uploaded files """

    import gluon.contenttype
    app = request.application
    filename = request.args[0]
    response.headers['Content-Type'] = \
        gluon.contenttype.contenttype(filename)
    return read_file('applications/%s/uploads/%s' % (app, filename), 'rb')


Added applications/examples/controllers/default.py version [d78f059886].






































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

from gluon.fileutils import read_file

response.title = T('web2py Web Framework')
response.keywords = T('web2py, Python, Web Framework')
response.description = T('web2py Web Framework')

session.forget()

@cache('index')
def index():
    return response.render()

@cache('what')
def what():
    return response.render()

@cache('download')
def download():
    return response.render()

@cache('who')
def who():
    return response.render()

@cache('support')
def support():
    return response.render()

@cache('documentation')
def documentation():
    return response.render()

@cache('usergroups')
def usergroups():
    return response.render()

def contact():
    redirect(URL('default','usergroups'))

@cache('videos')
def videos():
    return response.render()

def security():
    redirect('http://www.web2py.com/book/default/chapter/01#security')

def api():
    redirect('http://web2py.com/book/default/chapter/04#API')

@cache('license')
def license():
    import os
    filename = os.path.join(request.env.gluon_parent, 'LICENSE')
    return response.render(dict(license=MARKMIN(read_file(filename))))

def version():
    return request.env.web2py_version

@cache('examples')
def examples():
    return response.render()

@cache('changelog')
def changelog():
    import os
    filename = os.path.join(request.env.gluon_parent, 'README')
    return response.render(dict(changelog=MARKMIN(read_file(filename))))

Added applications/examples/controllers/form_examples.py version [89768d6d15].




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



def form():
    """ a simple entry form with various types of objects """

    form = FORM(TABLE(
        TR('Your name:', INPUT(_type='text', _name='name',
           requires=IS_NOT_EMPTY())),
        TR('Your email:', INPUT(_type='text', _name='email',
           requires=IS_EMAIL())),
        TR('Admin', INPUT(_type='checkbox', _name='admin')),
        TR('Sure?', SELECT('yes', 'no', _name='sure',
           requires=IS_IN_SET(['yes', 'no']))),
        TR('Profile', TEXTAREA(_name='profile',
           value='write something here')),
        TR('', INPUT(_type='submit', _value='SUBMIT')),
        ))
    if form.accepts(request.vars, session):
        response.flash = 'form accepted'
    elif form.errors:
        response.flash = 'form is invalid'
    else:
        response.flash = 'please fill the form'
    return dict(form=form, vars=form.vars)


Added applications/examples/controllers/global.py version [7b13545222].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

session.forget()

response.menu = [['home', False, '/%s/default/index'
                  % request.application], ['docs', True,
                 '/%s/global/vars' % request.application]]


def vars():
    """the running controller function!"""

    if not request.args:
        (
            doc,
            keys,
            t,
            c,
            d,
            value,
            ) = (
            'Global variables',
            globals(),
            None,
            None,
            (),
            None,
            )
        (title, args) = ('globals()', '')
    elif len(request.args) < 3:
        args = '.'.join(request.args)
        try:
            doc = eval(args + '.__doc__')
        except:
            doc = 'no documentation'
        try:
            keys = eval('dir(%s)' % args)
        except:
            keys = []
        t = eval('type(%s)' % args)
        try:
            c = eval('%s.__class__' % args)
        except:
            c = None
        try:
            d = eval('%s.__bases__' % args)
        except:
            d = None
        title = args
        args += '.'
    else:
        raise HTTP(400)
    attributes = {}
    for key in keys:
        a = args + key
        if eval('isinstance(%s,SQLDB)' % a) or a == 'vars':
            continue
        try:
            doc1 = eval(a + '.__doc__')
        except:
            doc1 = 'no documentation'
        t1 = eval('type(%s)' % a)
        try:
            c1 = eval('%s.__class__' % a)
        except:
            c1 = None
        try:
            d1 = eval('%s.__bases__' % a)
        except:
            d1 = ()
        attributes[a] = (doc1, t1, c1, d1)
    return dict(
        title=title,
        args=args,
        t=t,
        c=c,
        d=d,
        doc=doc,
        attributes=attributes,
        )


Added applications/examples/controllers/layout_examples.py version [7591b93b83].




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



def civilized():
    response.menu = [['civilized', True, URL('civilized'
                     )], ['slick', False, URL('slick')],
                     ['basic', False, URL('basic')]]
    response.flash = 'you clicked on civilized'
    return dict(message='you clicked on civilized')


def slick():
    response.menu = [['civilized', False, URL('civilized'
                     )], ['slick', True, URL('slick')],
                     ['basic', False, URL('basic')]]
    response.flash = 'you clicked on slick'
    return dict(message='you clicked on slick')


def basic():
    response.menu = [['civilized', False, URL('civilized'
                     )], ['slick', False, URL('slick')],
                     ['basic', True, URL('basic')]]
    response.flash = 'you clicked on basic'
    return dict(message='you clicked on basic')


Added applications/examples/controllers/session_examples.py version [83a6e5ca77].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+



def counter():
    """ every time you reload, it increases the session.counter """

    if not session.counter:
        session.counter = 0
    session.counter += 1
    return dict(counter=session.counter)


Added applications/examples/controllers/simple_examples.py version [4082840564].













































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
def hello1():
    """ simple page without template """

    return 'Hello World'


def hello2():
    """ simple page without template but with internationalization """

    return T('Hello World')


def hello3():
    """ page rendered by template simple_examples/index3.html or generic.html"""

    return dict(message='Hello World')


def hello4():
    """ page rendered by template simple_examples/index3.html or generic.html"""

    response.view = 'simple_examples/hello3.html'
    return dict(message=T('Hello World'))


def hello5():
    """ generates full page in controller """

    return HTML(BODY(H1(T('Hello World'), _style='color: red;'))).xml()  # .xml to serialize


def hello6():
    """ page rendered with a flash"""

    response.flash = 'Hello World in a flash!'
    return dict(message=T('Hello World'))


def status():
    """ page that shows internal status"""
    response.view = 'generic.html'
    return dict(request=request, session=session, response=response)


def redirectme():
    """ redirects to /{{=request.application}}/{{=request.controller}}/hello3 """

    redirect(URL('hello3'))


def raisehttp():
    """ returns an HTTP 400 ERROR page """

    raise HTTP(400, 'internal error')


def raiseexception():
    """ generates an exeption, logs the event and returns a ticket number """

    1 / 0
    return 'oops'


def servejs():
    """ serves a js document """

    import gluon.contenttype
    response.headers['Content-Type'] = \
        gluon.contenttype.contenttype('.js')
    return 'alert("This is a Javascript document, it is not supposed to run!");'


def makejson():
    import gluon.contrib.simplejson as sj
    return sj.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])


def makertf():
    import gluon.contrib.pyrtf as q
    doc = q.Document()
    section = q.Section()
    doc.Sections.append(section)
    section.append('Section Title')
    section.append('web2py is great. ' * 100)
    response.headers['Content-Type'] = 'text/rtf'
    return q.dumps(doc)


def rss_aggregator():
    import datetime
    import gluon.contrib.rss2 as rss2
    import gluon.contrib.feedparser as feedparser
    d = feedparser.parse('http://rss.slashdot.org/Slashdot/slashdot/to')

    rss = rss2.RSS2(title=d.channel.title, link=d.channel.link,
                    description=d.channel.description,
                    lastBuildDate=datetime.datetime.now(),
                    items=[rss2.RSSItem(title=entry.title,
                    link=entry.link, description=entry.description,
                    pubDate=datetime.datetime.now()) for entry in
                    d.entries])
    response.headers['Content-Type'] = 'application/rss+xml'
    return rss2.dumps(rss)



def ajaxwiki():
    default="""
# section

## subsection

### sub subsection

- **bold** text
- ''italic''
- [[link http://google.com]]

``
def index: return 'hello world'
``

-----------
Quoted text
-----------

---------
0 | 0 | 1
0 | 2 | 0
3 | 0 | 0
---------
"""
    form = FORM(TEXTAREA(_id='text',_name='text',value=default),
                INPUT(_type='button',
                      _value='markmin',
                      _onclick="ajax('ajaxwiki_onclick',['text'],'html')"))
    return dict(form=form, html=DIV(_id='html'))

def ajaxwiki_onclick():
    return MARKMIN(request.vars.text).xml()

Added applications/examples/controllers/spreadsheet.py version [9142324704].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
from gluon.contrib.spreadsheet import Sheet

def callback():
    return cache.ram('sheet1',lambda:None,None).process(request)

def index():
    sheet = cache.ram('sheet1',lambda:Sheet(10,10,URL('callback')),0)
    #sheet.cell('r0c3',value='=r0c0+r0c1+r0c2',readonly=True)
    return dict(sheet=sheet)

Added applications/examples/controllers/template_examples.py version [0afc3bbead].




































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



def variables():
    return dict(a=10, b=20)


def test_for():
    return dict()


def test_if():
    return dict()


def test_try():
    return dict()


def test_def():
    return dict()


def escape():
    return dict(message='<h1>text is scaped</h1>')


def xml():
    return dict(message=XML('<h1>text is not escaped</h1>'))


def beautify():
    return dict(message=BEAUTIFY(request))


Added applications/examples/models/db.py version [04002207a9].






































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################

if request.controller.endswith('_examples'): response.generic_patterns.append('*')

from gluon.settings import settings

# if running on Google App Engine
if settings.web2py_runtime_gae:
    from gluon.contrib.gql import *
    # connect to Google BigTable
    db = DAL('gae')
    # and store sessions there
    session.connect(request, response, db=db)
else:
    # if not, use SQLite or other DB
    db = DAL('sqlite://storage.sqlite')

db.define_table(
    'users',
    Field('name'),
    Field('email')
    )

# ONE (users) TO MANY (dogs)

db.define_table(
    'dogs',
    Field('owner_id', db.users),
    Field('name'),
    Field('type'),
    Field('vaccinated', 'boolean', default=False),
    Field('picture', 'upload', default=''),
    )

db.define_table(
    'products',
    Field('name'),
    Field('description', 'text')
    )

# MANY (users) TO MANY (purchases)

db.define_table(
    'purchases',
    Field('buyer_id', db.users),
    Field('product_id', db.products),
    Field('quantity', 'integer')
    )

# if running on Google App Engine
if settings.web2py_runtime_gae:
    # quick hack to skip the join
    purchased = None
else:
    # use a joined view
    purchased = (db.users.id == db.purchases.buyer_id) & (db.products.id
                 == db.purchases.product_id)

db.users.name.requires = IS_NOT_EMPTY()
db.users.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, 'users.email')]
db.dogs.owner_id.requires = IS_IN_DB(db, 'users.id', 'users.name')
db.dogs.name.requires = IS_NOT_EMPTY()
db.dogs.type.requires = IS_IN_SET(['small', 'medium', 'large'])
db.purchases.buyer_id.requires = IS_IN_DB(db, 'users.id', 'users.name')
db.purchases.product_id.requires = IS_IN_DB(db, 'products.id',
        'products.name')
db.purchases.quantity.requires = IS_INT_IN_RANGE(0, 10)

Added applications/examples/models/feeds_reader.py version [cd96873e70].

















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

def group_feed_reader(group,mode='div',counter='5'):
    """parse group feeds"""

    url = "http://groups.google.com/group/%s/feed/rss_v2_0_topics.xml?num=%s" %\
          (group,counter)
    from gluon.contrib import feedparser
    g = feedparser.parse(url)

    if mode == 'div':
        html = XML(TAG.BLOCKQUOTE(UL(*[LI(A(entry['title']+' - ' +\
                                 entry['author'][entry['author'].rfind('('):],\
                                 _href=entry['link'],_target='_blank'))\
                            for entry in g['entries'] ]),\
                       _class="boxInfo",\
                       _style="padding-bottom:5px;"))

    else:
        html = XML(UL(*[LI(A(entry['title']+' - ' +\
                             entry['author'][entry['author'].rfind('('):],\
                             _href=entry['link'],_target='_blank'))\
                            for entry in g['entries'] ]))

    return html


def code_feed_reader(project,mode='div'):
    """parse code feeds"""

    url = "http://code.google.com/feeds/p/%s/hgchanges/basic" % project
    from gluon.contrib import feedparser
    g = feedparser.parse(url)
    if mode == 'div':
        html = XML(DIV(UL(*[LI(A(entry['title'],_href=entry['link'],\
                                 _target='_blank'))\
                            for entry in g['entries'][0:5]]),\
                       _class="boxInfo",\
                       _style="padding-bottom:5px;"))
    else:
        html = XML(UL(*[LI(A(entry['title'],_href=entry['link'],\
                             _target='_blank'))\
                            for entry in g['entries'][0:5]]))


    return html



Added applications/examples/models/markmin.py version [4d602f756d].






































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import gluon.template

markmin_dict = dict(template=lambda \
                    code:gluon.template.render(code,context=globals()),
                    sup=lambda \
                        code:'<sup style="font-size:0.5em;">%s</sup>'%code,
                    br=lambda n:'<br>'*int(n),
                    groupdates=lambda group:group_feed_reader(group),
                    )

def get_content(b=None,\
                c=request.controller,\
                f=request.function,\
                l='en',\
                format='markmin'):
    """Gets and renders the file in
    <app>/private/content/<lang>/<controller>/<function>/<block>.<format>
    """

    def openfile():
        import os
        path = os.path.join(request.folder,'private','content',l,c,f,b+'.'+format)
        return open(path)

    try:
        openedfile = openfile()
    except Exception, IOError:
        l='en'
        openedfile = openfile()

    if format == 'markmin':
        html = MARKMIN(str(T(openedfile.read())),markmin_dict)
    else:
        html = str(T(openedfile.read()))
    openedfile.close()

    return html

Added applications/examples/models/menu.py version [e8143d44af].





































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

#########################################################################
## Changes the menu active item
#########################################################################
def toggle_menuclass(cssclass='pressed',menuid='headermenu'):
    """This function changes the menu class to put pressed appearance"""

    positions = dict(
                           index='',
                           what='-108px -115px',
                           download='-211px -115px',
                           who='-315px -115px',
                           support='-418px -115px',
                           documentation='-520px -115px'
                           )


    if request.function in positions.keys():
            jscript = """
            <script>
             $(document).ready(function(){
                         $('.%(menuid)s a').removeClass('%(cssclass)s');
                         $('.%(function)s').toggleClass('%(cssclass)s').css('background-position','%(cssposition)s')

             });
            </script>
            """ % dict(cssclass=cssclass,
                            menuid=menuid,
                            function=request.function,
                            cssposition=positions[request.function]
                            )

            return XML(jscript)
    else:
        return ''

Added applications/examples/private/content/en/default/documentation/community.markmin version [95b4ce4ac6].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
### Community sources

#### Sites
- [[web2pyslices (recipes) http://web2pyslices.com popup]]
- [[web2py utils documentation http://packages.python.org/web2py_utils/ popup]]
- [[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]]

Added applications/examples/private/content/en/default/documentation/main.markmin version [cca528997e].





1
2
3
4
+
+
+
+
## web2py``TM``:sup Documentation

Here is listed knows sources of documentation on web2py
you can submit your own source [[here contact]]

Added applications/examples/private/content/en/default/documentation/more.markmin version [07e3a74e83].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
### More resources

- [[videos http://www.web2py.com/examples/default/videos/ popup]]
- [[Quick Examples http://web2py.com/examples/default/examples popup]]
- [[FAQ http://www.web2py.com/AlterEgo popup]]
- [[Appliances http://web2py.com/appliances popup]]
- [[User Voice http://web2py.uservoice.com/ popup]]
- [[web2py utils http://packages.python.org/web2py_utils/ popup]]
- [[Layouts http://web2py.com/layouts popup]]
- [[Plugins http://web2py.com/plugins popup]]

Added applications/examples/private/content/en/default/documentation/official.markmin version [211d236d62].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
### Official documentation

#### Books
- [[**web2py full/free online book (english)** http://web2py.com/book popup]]
- [[web2py book (spanish) http://www.latinuxpress.com/books/drafts/web2py/ popup]]
- [[buy e-book/printed version http://stores.lulu.com/web2py popup]]
- [[Epydoc http://www.web2py.com/examples/static/epydoc/index.html popup]]
- [[API http://web2py.com/book/default/chapter/04#API popup]]

Added applications/examples/private/content/en/default/index/maincontent.markmin version [a65187fd5d].



1
2
+
+
## web2py``TM``:sup Web Framework
Free open source full-stack framework for rapid development of fast, scalable, [[secure http://www.web2py.com/book/default/chapter/01#security popup]] and portable database-driven web-based applications. Written and programmable in [[Python http://www.python.org popup]]. [[LGPLv3 License http://www.gnu.org/licenses/lgpl.html]]

Added applications/examples/private/content/en/default/index/whyweb2py.markmin version [d28d0c3ed9].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
### Why web2py?

- **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, 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. 
- **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). 
- **Includes** a SSL-enabled and streaming-capable web server, a relational database, a web-based integrated development environment and web-based management interface, a Database Abstraction Layer that writes SQL for you in real time, internationalization support, multiple authentication methods, role based access control, an error logging and ticketing system, multiple caching methods for scalability, the jQuery library for AJAX and effects. [[Read more... http://web2py.com/examples/default/what]]

Added applications/examples/private/content/en/default/usergroups/grouplist.markmin version [0dc9361e64].











































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# web2py usergroups

You can submit a new group to be listed [[here contact]]
## International Group (English)

Main group managed by Massimo Di Pierro

- [[http://groups.google.com/group/web2py/ http://groups.google.com/group/web2py/ popup]]

``web2py``:groupdates

## Brazilian Group

Portuguese speakers group

- [[http://groups.google.com/group/web2py-users-brazil http://groups.google.com/group/web2py-users-brazil popup]]

``web2py-users-brazil``:groupdates

## Spanish Group

Spanish speakers group

- [[http://groups.google.com/group/web2py-usuarios http://groups.google.com/group/web2py-usuarios popup]]

``web2py-usuarios``:groupdates

## Japanese Group

Japanese speakers group

- [[http://groups.google.com/group/web2py-japan http://groups.google.com/group/web2py-japan popup]]

``web2py-japan``:groupdates

## French Group

French speakers group

- [[http://groups.google.com/group/web2py-fr http://groups.google.com/group/web2py-fr popup]]

``web2py-fr``:groupdates

Added applications/examples/static/artwork.tar.gz version [29e1ed6f71].

cannot compute difference between binary files

Added applications/examples/static/bg.gif version [06957bce5d].

cannot compute difference between binary files

Added applications/examples/static/bg.png version [7047b59774].

cannot compute difference between binary files

Added applications/examples/static/css/artwork.css version [184a8c1dc1].














































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*---------------------------------- ARTWORK E STICKERS -----------------------------------------*/
/*logo*/
.logosDow{
	border-width: 1px;
	border-style: solid;
	border-color:#CCC;
	border-radius:3px;
	background-color:#FFF;
	-webkit-border-radius: 3px;
	-moz-border-radius:3px;
	margin:20px auto;
	background: -moz-linear-gradient(top, #fbfbfb, #f1f1f1) repeat-X;
	background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#f1f1f1)) repeat-X;
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#666, endColorstr=#FFFFFFFF)";
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fbfbfb, endColorstr=#f1f1f1);
	border-width: 1px;
	border-style: solid;
	border-color:#CCC;
	border-radius:3px;
	background-color:#FFF;
	-webkit-border-radius: 3px;
	-moz-border-radius:3px;
	width:100%;
	
	padding:10px 10px 0 10px;
	padding-bottom:0
	}
.WH1{
	height:190px;
	}	
.WH2{
	height:90px;
	
	}		
.logosDow span{
	margin:8px 15px;
	float:left;
	width:700px; height:20px;
	color:#555555;
	font:bold 18px/30px Arial,Helvetica,sans-serif;
	letter-spacing:-1px;
}
.box-A{
	margin:10px;	
	float:left;
	border-width: 1px;
	border-style: solid;
	border-color:#CCC;
	border-radius:3px;
	background-color:#FFF;
	-webkit-border-radius: 3px;
	-moz-border-radius:3px;
	width:250px; height:130px;
}
a.box-A span{
	display:none;
	position:relative;
        top:-55px;
	left:-10px;
	width:235px;
	height:50px;
	background-image:url(../img/tipDownloads2.png);
	background-position:center;
	background-repeat:no-repeat;
}
a.box-A:hover span{ 
	display:block;
}
.logoDow1{
	background-image:url(../img/logo3Tones.png);
	background-repeat:no-repeat;
	background-position:-10px -155px;
}
.logoDow2{
	background-image:url(../img/logo3Tones.png);
	background-repeat:no-repeat;
	background-position:-10px 0px;
}
.logoDow3{
	background-image:url(../img/logo3Tones.png);
	background-repeat:no-repeat;
	background-position:-10px -312px;
}
/*fim logo*/
/*Stick*/
.stikImage{
	float:left;
	width:100px;
	height:50px;
	margin-left:15px;
	background-repeat:no-repeat;
	background-position:center;
	
	}
.stikimage1{
	background-image:url(../img/Stickers1.png);
	background-position:center;
}
.stikimage2{
	background-image:url(../img/Stickers2.png);
	background-position:center;
}
.stikimage3{
	background-image:url(../img/Stickers3.png);
	background-position:center;
}
.stikimage4{
	background-image:url(../img/Stickers8.png);
	background-position:center;
}
.stikimage5{
	background-image:url(../img/Stickers5.png);
	background-position:center;
}
.stikimage6{
	background-image:url(../img/Stickers6.png);
	background-position:center;
}
.stikimage7{
	background-image:url(../img/Stickers7.png);
	background-position:center;
}
a.stikImage span{
     display:none;
	position:relative;
    top:-50px;
	left:-50px;
	width:180px;
	height:50px;
	background-image:url(../img/tipDownloads.png);
	background-position:center;
	background-repeat:no-repeat;
}
a.stikImage:hover span{ 
	display:block;
}
/*fim do Stick*/

/*------------------------------ FIM ARTWORK E STICKERS -----------------------------------------*/

Added applications/examples/static/css/calendar.css version [be94f02d8c].





1
2
3
4
+
+
+
+
.calendar{z-index:99;position:relative;display:none;border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar table{border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar .button{text-align:center;padding:1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar .nav{background:transparent}.calendar thead .title{font-weight:bold;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar thead .name{border-bottom:1px solid #000;padding:2px;text-align:center;background:#f4f0e8;}.calendar thead .weekend{color:#f00;}.calendar thead .hilite{border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;padding:0;background-color:#e4e0d8;}.calendar thead .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;background-color:#c4c0b8;}.calendar tbody .day{width:2em;text-align:right;padding:2px 4px 2px 2px;}.calendar tbody .day.othermonth{font-size:80%;color:#aaa;}.calendar tbody .day.othermonth.oweekend{color:#faa;}.calendar table .wn{padding:2px 3px 2px 2px;border-right:1px solid #000;background:#f4f0e8;}.calendar tbody .rowhilite td{background:#e4e0d8;}.calendar tbody .rowhilite td.wn{background:#d4d0c8;}.calendar tbody td.hilite{padding:1px 3px 1px 1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar tbody td.active{padding:2px 2px 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar tbody td.selected{font-weight:bold;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;padding:2px 2px 0 2px;background:#e4e0d8;}.calendar tbody td.weekend{color:#f00;}.calendar tbody td.today{font-weight:bold;color:#00f;}.calendar tbody .disabled{color:#999;}.calendar tbody .emptycell{visibility:hidden;}.calendar tbody .emptyrow{display:none;}.calendar tfoot .ttip{background:#f4f0e8;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar tfoot .hilite{border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;padding:1px;background:#e4e0d8;}.calendar tfoot .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo{position:absolute;display:none;width:4em;top:0;left:0;cursor:default;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;background:#e4e0d8;font-size:90%;padding:1px;z-index:100;}.calendar .combo .label,.calendar .combo .label-IEfix{text-align:center;padding:1px;}.calendar .combo .label-IEfix{width:4em;}.calendar .combo .active{background:#c4c0b8;padding:0;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo .hilite{background:#048;color:#fea;}.calendar td.time{border-top:1px solid #000;padding:1px 0;text-align:center;background-color:#f4f0e8;}.calendar td.time .hour,.calendar td.time .minute,.calendar td.time .ampm{padding:0 3px 0 4px;border:1px solid #889;font-weight:bold;background-color:#fff;}.calendar td.time .ampm{text-align:center;}.calendar td.time .colon{padding:0 2px 0 3px;font-weight:bold;}.calendar td.time span.hilite{border-color:#000;background-color:#766;color:#fff;}.calendar td.time span.active{border-color:#f00;background-color:#000;color:#0f0;}

#CP_hourcont {z-index:99;padding: 0px;position:absolute;border:1px dashed #bbbbbb;background-color:#dddddd;display:none;} #CP_minutecont {z-index:99;background-color:#dddddd;padding: 0px;position:absolute;width:45px;border: 1px dashed #cccccc;display:none;} .floatleft {float:left;} .CP_hour {z-index:99;padding:1px;font-family: Arial, Helvetica, sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;margin:1px;background-color:#eeeeee;} .CP_minute {z-index:99;padding:1px;background-color:#eeeeee;font-family: Arial, Helvetica, sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;margin:1px;} .CP_over {z-index:99;background-color:#ffffff;}

Added applications/examples/static/css/home.css version [e27ddc442c].






























































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
* {	
	margin:0;
	padding:0;
	}
		
html, body {
	height:100%;
	background-color:#FFF;/*#f1f6f2;*/
	min-width:1020px;
	font-size:14px;
	/*font-family:Candara, Verdana, Arial, sans-serif;*/
	font-family:Helvetica,"Helvetica Neue",Arial,sans-serif;
	}

h1,h2,h3,h4,h5,h6 {
	font-family: Helvetica,"Helvetica Neue",Arial,sans-serif; //'Garamond','Georgia',serif;
	margin:15px 0 10px;
	padding:0;
	color: #678A86;
	
	}
	
th, th {vertical-align:top}	

li {
	padding-bottom:5px;
	}
	
a {
	color: #832D20; //#732F2C;
	text-decoration:none;
	}
		
a:hover {
	text-shadow:0 1px 0 #FFF;
	text-decoration:underline;
	}	
			
	
p { 
	border-bottom: 10px solid transparent; 
	color:#383838;
	font-size:14px;
	line-height:24px;
	}	

pre {
	font-family:'Consolas','Menlo','Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace !important;
	}


.general {
	min-height:100%;
	position:relative;
	width:100%;
	}
	
#font1 {
	font-weight:bold;
	font-size:12px;
	font-family:Candara, Verdana, Arial, sans-serif;
	line-height:19px;
	color:#a7b6b5;
	text-shadow:0 1px 0 #000;
	}

 
/****************************   HEADER   ************************************/
.headerExt{
	top:0;
	width:100%;
	height:130px;
	margin:0px auto;
	background-image:url(../img/back-02.png);
	background-repeat:repeat-x;
	background-position:0px -57px;
	z-index:99;
	}

.headerInt{
	position:relative;
	width:982px;
	height:130px;
	margin:0px auto 0px auto;
	}

.boxLogin{
	float:right;
	margin:8px 50px 0px 0px;
	}
	
.logo{
	position:absolute;	
	background-image:url(../img/web2py_logo.png);
	background-position:16px  2px 0px 0px;
	background-repeat:no-repeat;
	width:230px;
	height:50px;
	top:33px;
	left:45px;
	}
	
 
/*****************************  MAIN CONTENT ********************************/
.content {
	width:982px;
	margin:0 auto;
	overflow:hidden;
	padding-bottom:100px;
	}
	
.onecolcontent {
    color:#383838;
    font-size:14px;
    line-height:24px;
	width:850px;
	margin:0 auto;
	height:auto;
	}	
	
.contentleft {
    color:#383838;
    font-size:14px;
    line-height:24px;
	float:left;
	width:650px;
	height:auto;
	}
		
.contentright {
	color:#383838;
    font-size:14px;
    line-height:24px;
	float:right;
	width:300px;
	height:auto;
	}		
	
/************************** FOOTER ******************************************/

.footerExt{
	background-image:url(../img/back-R-02.png); 
	background-repeat:repeat-x ;
	background-position:0px -15px;
	height:100px;
	position:absolute;
	bottom:0;
	width:100%;
	overflow:hidden;

	}	
	
.footerInt{
	position:relative;
	width:982px;
	height:70px;
	margin:30px auto 0 auto;
	}	
		
.Boxfooter1{
	position:absolute;
	bottom:0px;
	left:30px;
	top:5px;
	}
	
.Boxfooter2{
	position:absolute;
	left:130px;
	top:5px;
	}
	
.Boxfooter3{
	position:absolute;
	right:0;
	top:2px;
	}	
	
a.Boxfooter4{
	background-image:url(../img/1283522094_email.png);
	background-position:center;
	background-repeat:no-repeat;
	position:absolute;
	left:32px;
	top:36px;
	width:40px;
	height:32px;
	}	
	
a.Boxfooter5{
	background-image:url(../img/1283522082_phone.png);
	background-position:center;
	background-repeat:no-repeat;
	position:absolute;
	left:131px;
	top:32px;
	width:40px;
	height:32px;
	}	
	
.Boxfooter6{
    background-image:url(../img/Stickers4.png);
	background-position:center;
	background-repeat:no-repeat;
	position:absolute;
	left:840px;
	top:24px;
	width:135px;
	height:44px;
	}
	
.Boxfooter7{
	position:absolute;
	left:745px;
	top:45px;
	width:115px;
	height:24px;
	font-weight:bold;
	font-size:12px;
	font-family:Candara, Verdana, Arial, sans-serif;
	font-style:italic;
	line-height:19px;
	color:#1B211F;
	text-shadow:0 1px 0 #778E88;
	}
		

/******************************  LINKS   ************************************/
a.login{
	font-weight:bold;
	font-size:12px;
	font-family:Candara, Verdana, Arial, sans-serif;
	line-height:19px;
	text-decoration:none;
	color:#a7b6b5;
	text-shadow:0 1px 0 #000;
	}
	
a.login:hover{
	color:#1B211F;
	text-shadow:0 1px 0 #778E88;
	}
		
a.login:visited{
	color:#1B211F;
	text-shadow:0 1px 0 #778E88;
	}



/********************DOWNLOAD****************************************/			
.boxBtDownload{
	width:240px;
	height:57px;
	position:relative;  
	margin:20px auto;
	z-index:0;
	}
.boxBtDownloadICO{
	width:40px;
	height:40px;
	float:right;
	margin:6px 10px;
	background-image:url(../img/netdow2.png);/*Download Icon 1 2 3 */
	background-position:center;
	background-repeat:no-repeat;
}	
#textBtDownload1{
	font-weight:bold;
	font-size:26px;
	font-family:Georgia,Palatino,"Palatino Linotype",Times,"Times New Roman",serif;
	font-style:italic;
	line-height:19px;
	color:#1B211F;
	text-shadow:0 1px 0 #b5b5b5;
	text-decoration:none;
	position:absolute;
	left:35px;
	top:15px;
    }
#textBtDownload2{
	font-weight:bold;
	font-size:12px;
	font-family:Georgia,Palatino,"Palatino Linotype",Times,"Times New Roman",serif;
	font-style:italic;
	line-height:19px;
    color:#747474;
	text-shadow:0 1px 0 #FFFFFF;
	text-decoration:none;
	position:absolute;
	left:18px;
	top:34px;
    }	
a.btDownload{
	position:absolute;

    border-width: 1px;
	border-style: solid;
	border-color:#939593;
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	border-radius:5px;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	background-image:url(../img/back-03.png);
	background-position:bottom;
	background-repeat:repeat-x; 
	text-decoration:none;

	}
.btDownloadPosicao1{
	width:240px;
	height:57px;
	}	
.btDownloadPosicao2{
	width:250px;
	height:57px;
	}	
a.btDownload:hover {
	background-image:url(../img/back-05.png);
	}	
		
.downloadb  li a {
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	border-radius:5px;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	color:#1B211F;
	display:block;
	font-size:93%;
	margin:0;
	padding:6% 40px 6% 6%;
	line-height: 16px;
	border-width: 1px;
	border-style: solid;
	border-color:#939593;
	background-image:url(../img/back-03.png);
	background-position:bottom;
	background-repeat:repeat-x; 
	text-decoration:none;
	
	}
	
.downloadb li a:hover {background-image:url(../img/back-05.png);}	

.downloadb li span{
	width:40px;
	height:40px;
	float:right;
	/*margin:6px 10px;*/
	background-image:url(../img/netdow2.png);/*Download Icon 1 2 3 */
	background-position:center;
	background-repeat:no-repeat;
}		
	
.downloadb li {
	list-style-image:none;
	list-style-position:outside;
	list-style-type:none;
	width: 200px;
	height: 50px;
	
	
	}


/********************************* BOX INFO 1 *****************************/	

blockquote{
	width: 90%;
	margin:10px;
	padding: 3px 15px 10px 20px;
	// padding: 5px;  
	border-width: 1px;
	border-style: solid;
	border-color:#CCC;
	border-radius:5px;
	background-color:#FFF;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	//	margin:20px auto;
	text-align:left;
	background: -moz-linear-gradient(top, #fbfbfb, #f1f1f1) repeat-X;
	background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#f1f1f1)) repeat-X;
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#666, endColorstr=#FFFFFF)";
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fbfbfb, endColorstr=#f1f1f1);
	border-width: 1px;
	border-style: solid;
	border-color:#CCC;
	border-radius:5px;
	background-color:#FFF;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	font-size:12px;
	}
	
blockquote ul {
	padding-left:15px;
//        list-style-image: url(../img/bullet.gif);
	}
	
blockquote h5{
	margin:0;
	padding:0;
	font-size:12px;
	}	
	
.boxInfoWH1{
	width: 80%;
	height: auto;
	}
	
.boxInfoWH2{
	width:600px;
	height: 100px;
	}



.boxCode{
	width: 90%;
	margin:10px;
	background-color:#fff;
	text-align:left;
	border-width: 1px;
	border-style: solid;
	border-color:#939593;
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	border-radius:5px;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	padding:5px;
	}


	
.boxInfo2 a{
	color:#1B211F;
	/*text-shadow:0 1px 0 #778E88;*/
	font-weight:bold;
	font-size:12px;
	line-height:19px;
	text-decoration:none;	
	}
	
.boxInfo2 a:hover{
	text-shadow:0 1px 0 #000;
	}	
		
.boxInfo2 a:visited{
	color:#1B211F;
	text-shadow:0 1px 0 #778E88;
	}


/********************************* BOX BANNER *****************************/	
.boxInfoBanner{
	margin:20px auto;
	border-width: 1px;
	border-style: solid;
	border-color:#939593;
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	border-radius:5px;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	background-image:url(../img/online_book_cover.jpg);
	background-position:center;
	background-repeat:no-repeat;
	width: 240px;
	height: 175px;
	/*-moz-box-shadow:1px 1px 4px #999999;
	-webkit-box-shadow:0px 5px 10px #999999;*/
	cursor:pointer;
	}
	
.boxTopDesc{
    position:relative;
    top:-25px;
	font-weight:bold;
	font-size:18px;
	}	
	
.boxTopDesc:hover{
	color:#a7b6b5;
	}
	
.boxSimple{
	margin:auto;
	border-width: 1px;
	border-style: solid;
	border-color:#939593;
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	border-radius:5px;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	
	background-position:center;
	background-repeat:no-repeat;
	width: 160px;
	height: 106px;
	left:0;
	/*-moz-box-shadow:1px 1px 4px #999999;
	-webkit-box-shadow:0px 5px 10px #999999;*/
	margin-right:110px;
	margin-top:10px;
	}
		

/******************************* BOX SEARCH *****************************/	

.boxSearch1{
    width: 240px;
	height: 27px;
	margin:20px auto;
	background-color:#f1f6f2;
	text-align:left;
	border-width: 1px;
	border-style: solid;
	border-color:#939593;
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	border-radius:5px;
	-webkit-border-radius: 5px;
	-moz-border-radius:5px;
	background-image:url(../img/back-04.png);
	background-position:bottom;
	background-repeat:repeat-x;
	}
	
.boxSearch2{
	width:27px;
	height:26px;
	background-image:url(../img/icons/1283523626_search.png);
	background-repeat:no-repeat;
	background-position:center;
	float:right;
	}


/********************************* LEFT LINKS ************************/	
a.btleftlink{
	color:#383838;
    font-family:Helvetica,Tahoma,Arial,Sans-Serif;
    font-size:18px;
    line-height:24px;
	text-decoration:none;
	float:left;
	margin:4px 0px 0px 40px;
	}
	
a.btleftlink:hover{
	color:#a7b6b5;
	}	

.leftlink{
	margin-left:30px;
	width:245px;
	height:30px;
	background-repeat:no-repeat;
	background-position:left;
	}
	
.leftlinkIcoA{
	background-image:url(../img/icons/usergroups.png);
	}
		
.leftlinkIcoB{
	background-image:url(../img/icons/twitter.png);
	}
	
.leftlinkIcoC{
	background-image:url(../img/icons/tutorials.png);
	}
	
.leftlinkIcoD{
	background-image:url(../img/icons/videos.png);
	}	
	
.leftlinkIcoE{
	background-image:url(../img/icons/examples.png);
	}
	
.leftlinkIcoF{
	background-image:url(../img/icons/uservoice.png);
	}	
	
.leftlinkIcoG{
	background-image:url(../img/icons/slices.png);
	}
.leftlinkIcoH{
	background-image:url(../img/icons/demo.png);
	}
.leftlinkIcoI{
	background-image:url(../img/icons/appliances.png);
	}
.leftlinkIcoJ{
	background-image:url(../img/icons/plugins.png);
	}
.leftlinkIcoK{
	background-image:url(../img/icons/livechat.png);
	}
	
	
/************flash************************/

.flash{
	width:50%;
	padding-bottom:5px;
	margin:auto;
        display:none;
        
	
}

.flashdiv{
    position:fixed;
	top:90px;
	z-index:999;
	width:100%;
	margin:auto;
	position:fixed;
	text-align:center;


}	
	

Added applications/examples/static/css/menu.css version [796415f51c].









































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*********** MENU COMPLETO **********/
.headermenu{
	position:absolute;
	margin:10px 10px;
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:0px 0px;
    width:655px;
    height:37px;
	left:290px;
	top: 30px;
	z-index:200px;
}	 
a.home{
	position:absolute;
	top:0px;
	left:0px;
	z-index:0;
	width:109px;
	height:36px;
}
a:hover.home {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:0px -38px;
}
a:active.home {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-0px -76px;
	border-collapse:inherit;
	
}
a.about{
	position:absolute;
	top:0px;
	left:108px;
	z-index:1;
	width:104px;
	height:36px;
}
a:hover.about {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-108px -37px;
}
a:active.about {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-108px -76px
}


a.download{
	position:absolute;
	top:0px;
	left:211px;
	z-index:2;
	width:104px;
	height:36px;
}
a:hover.download {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-211px -37px;
}
a:active.download {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-211px -76px
}
a.staff{
	position:absolute;
	top:0px;
	left:315px;
	z-index:3;
	width:103px;
	height:36px;
}
a:hover.staff {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-315px -37px;
}
a:active.staff {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-315px -76px
}
a.support{
	position:absolute;
	top:0px;
	left:418px;
	z-index:4;
	width:103px;
	height:36px;
}
a:hover.support {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-418px -37px;
}
a:active.support {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-418px -76px
}
a.documentation{
	position:absolute;
	top:0px;
	left:520px;
	z-index:5;
	width:133px;
	height:36px;
}
a:hover.documentation {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-520px -37px
}
a:active.documentation {
	background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	background-position:-520px -76px;
}

.pressed{
    z-index:0;
    background-image:url(../img/Menu-2.png);
	background-repeat:no-repeat;
	   
    }

/*************** FIM DO MENU COMPLETO **********************/
		
		

Added applications/examples/static/epydoc/api-objects.txt version [07835d23e8].





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
psycopg2	psycopg2-module.html
psycopg2.Binary	psycopg2-module.html#Binary
psycopg2.NUMBER	psycopg2-module.html#NUMBER
psycopg2.connect	psycopg2-module.html#connect
psycopg2.threadsafety	psycopg2-module.html#threadsafety
psycopg2.TimeFromTicks	psycopg2-module.html#TimeFromTicks
psycopg2.Timestamp	psycopg2-module.html#Timestamp
psycopg2.Date	psycopg2-module.html#Date
psycopg2.TimestampFromTicks	psycopg2-module.html#TimestampFromTicks
psycopg2.STRING	psycopg2-module.html#STRING
psycopg2.DATETIME	psycopg2-module.html#DATETIME
psycopg2.Time	psycopg2-module.html#Time
psycopg2.DateFromTicks	psycopg2-module.html#DateFromTicks
psycopg2.BINARY	psycopg2-module.html#BINARY
psycopg2.paramstyle	psycopg2-module.html#paramstyle
psycopg2.k	psycopg2-module.html#k
psycopg2.ROWID	psycopg2-module.html#ROWID
psycopg2.apilevel	psycopg2-module.html#apilevel
psycopg2.tz	psycopg2.tz-module.html
psycopg2.tz.STDOFFSET	psycopg2.tz-module.html#STDOFFSET
psycopg2.tz.DSTDIFF	psycopg2.tz-module.html#DSTDIFF
psycopg2.tz.DSTOFFSET	psycopg2.tz-module.html#DSTOFFSET
psycopg2.tz.ZERO	psycopg2.tz-module.html#ZERO
psycopg2.tz.LOCAL	psycopg2.tz-module.html#LOCAL
sqlite3.dbapi2	sqlite3.dbapi2-module.html
sqlite3.dbapi2.SQLITE_DROP_VIEW	sqlite3.dbapi2-module.html#SQLITE_DROP_VIEW
sqlite3.dbapi2.SQLITE_CREATE_TRIGGER	sqlite3.dbapi2-module.html#SQLITE_CREATE_TRIGGER
sqlite3.dbapi2.version	sqlite3.dbapi2-module.html#version
sqlite3.dbapi2.SQLITE_OK	sqlite3.dbapi2-module.html#SQLITE_OK
sqlite3.dbapi2.SQLITE_DELETE	sqlite3.dbapi2-module.html#SQLITE_DELETE
sqlite3.dbapi2.PARSE_DECLTYPES	sqlite3.dbapi2-module.html#PARSE_DECLTYPES
sqlite3.dbapi2.SQLITE_DENY	sqlite3.dbapi2-module.html#SQLITE_DENY
sqlite3.dbapi2.paramstyle	sqlite3.dbapi2-module.html#paramstyle
sqlite3.dbapi2.SQLITE_DROP_TEMP_VIEW	sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_VIEW
sqlite3.dbapi2.SQLITE_DROP_INDEX	sqlite3.dbapi2-module.html#SQLITE_DROP_INDEX
sqlite3.dbapi2.SQLITE_CREATE_TEMP_INDEX	sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_INDEX
sqlite3.dbapi2.SQLITE_IGNORE	sqlite3.dbapi2-module.html#SQLITE_IGNORE
sqlite3.dbapi2.sqlite_version_info	sqlite3.dbapi2-module.html#sqlite_version_info
sqlite3.dbapi2.SQLITE_ATTACH	sqlite3.dbapi2-module.html#SQLITE_ATTACH
sqlite3.dbapi2.SQLITE_SELECT	sqlite3.dbapi2-module.html#SQLITE_SELECT
sqlite3.dbapi2.SQLITE_CREATE_TABLE	sqlite3.dbapi2-module.html#SQLITE_CREATE_TABLE
sqlite3.dbapi2.SQLITE_READ	sqlite3.dbapi2-module.html#SQLITE_READ
sqlite3.dbapi2.SQLITE_CREATE_VIEW	sqlite3.dbapi2-module.html#SQLITE_CREATE_VIEW
sqlite3.dbapi2.SQLITE_CREATE_TEMP_TRIGGER	sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TRIGGER
sqlite3.dbapi2.SQLITE_PRAGMA	sqlite3.dbapi2-module.html#SQLITE_PRAGMA
sqlite3.dbapi2.adapters	sqlite3.dbapi2-module.html#adapters
sqlite3.dbapi2.SQLITE_CREATE_INDEX	sqlite3.dbapi2-module.html#SQLITE_CREATE_INDEX
sqlite3.dbapi2.threadsafety	sqlite3.dbapi2-module.html#threadsafety
sqlite3.dbapi2.SQLITE_ANALYZE	sqlite3.dbapi2-module.html#SQLITE_ANALYZE
sqlite3.dbapi2.SQLITE_DROP_TEMP_TRIGGER	sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TRIGGER
sqlite3.dbapi2.converters	sqlite3.dbapi2-module.html#converters
sqlite3.dbapi2.SQLITE_CREATE_TEMP_VIEW	sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_VIEW
sqlite3.dbapi2.SQLITE_INSERT	sqlite3.dbapi2-module.html#SQLITE_INSERT
sqlite3.dbapi2.SQLITE_DROP_TEMP_INDEX	sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_INDEX
sqlite3.dbapi2.SQLITE_UPDATE	sqlite3.dbapi2-module.html#SQLITE_UPDATE
sqlite3.dbapi2.version_info	sqlite3.dbapi2-module.html#version_info
sqlite3.dbapi2.SQLITE_DETACH	sqlite3.dbapi2-module.html#SQLITE_DETACH
sqlite3.dbapi2.SQLITE_ALTER_TABLE	sqlite3.dbapi2-module.html#SQLITE_ALTER_TABLE
sqlite3.dbapi2.sqlite_version	sqlite3.dbapi2-module.html#sqlite_version
sqlite3.dbapi2.SQLITE_DROP_TEMP_TABLE	sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TABLE
sqlite3.dbapi2.PARSE_COLNAMES	sqlite3.dbapi2-module.html#PARSE_COLNAMES
sqlite3.dbapi2.apilevel	sqlite3.dbapi2-module.html#apilevel
sqlite3.dbapi2.DateFromTicks	sqlite3.dbapi2-module.html#DateFromTicks
sqlite3.dbapi2.TimeFromTicks	sqlite3.dbapi2-module.html#TimeFromTicks
sqlite3.dbapi2.SQLITE_REINDEX	sqlite3.dbapi2-module.html#SQLITE_REINDEX
sqlite3.dbapi2.TimestampFromTicks	sqlite3.dbapi2-module.html#TimestampFromTicks
sqlite3.dbapi2.SQLITE_CREATE_TEMP_TABLE	sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TABLE
sqlite3.dbapi2.SQLITE_TRANSACTION	sqlite3.dbapi2-module.html#SQLITE_TRANSACTION
sqlite3.dbapi2.x	sqlite3.dbapi2-module.html#x
sqlite3.dbapi2.SQLITE_DROP_TRIGGER	sqlite3.dbapi2-module.html#SQLITE_DROP_TRIGGER
sqlite3.dbapi2.SQLITE_DROP_TABLE	sqlite3.dbapi2-module.html#SQLITE_DROP_TABLE
web2py.gluon	web2py.gluon-module.html
web2py.gluon.TAG	web2py.gluon-module.html#TAG
web2py.gluon.URL	web2py.gluon-module.html#URL
web2py.gluon.ON	web2py.gluon-module.html#ON
web2py.gluon.current	web2py.gluon-module.html#current
web2py.gluon.redirect	web2py.gluon-module.html#redirect
web2py.gluon.embed64	web2py.gluon-module.html#embed64
web2py.gluon.admin	web2py.gluon.admin-module.html
web2py.gluon.admin.app_create	web2py.gluon.admin-module.html#app_create
web2py.gluon.admin.app_cleanup	web2py.gluon.admin-module.html#app_cleanup
web2py.gluon.admin.plugin_pack	web2py.gluon.admin-module.html#plugin_pack
web2py.gluon.admin.w2p_unpack	web2py.gluon.fileutils-module.html#w2p_unpack
web2py.gluon.admin.write_file	web2py.gluon.fileutils-module.html#write_file
web2py.gluon.admin.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.admin.check_new_version	web2py.gluon.admin-module.html#check_new_version
web2py.gluon.admin.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.admin.w2p_pack_plugin	web2py.gluon.fileutils-module.html#w2p_pack_plugin
web2py.gluon.admin.upgrade	web2py.gluon.admin-module.html#upgrade
web2py.gluon.admin.w2p_pack	web2py.gluon.fileutils-module.html#w2p_pack
web2py.gluon.admin.app_pack	web2py.gluon.admin-module.html#app_pack
web2py.gluon.admin.recursive_unlink	web2py.gluon.fileutils-module.html#recursive_unlink
web2py.gluon.admin.unzip	web2py.gluon.admin-module.html#unzip
web2py.gluon.admin.create_missing_folders	web2py.gluon.admin-module.html#create_missing_folders
web2py.gluon.admin.app_install	web2py.gluon.admin-module.html#app_install
web2py.gluon.admin.app_compile	web2py.gluon.admin-module.html#app_compile
web2py.gluon.admin.w2p_unpack_plugin	web2py.gluon.fileutils-module.html#w2p_unpack_plugin
web2py.gluon.admin.abspath	web2py.gluon.fileutils-module.html#abspath
web2py.gluon.admin.apath	web2py.gluon.admin-module.html#apath
web2py.gluon.admin.plugin_install	web2py.gluon.admin-module.html#plugin_install
web2py.gluon.admin.add_path_first	web2py.gluon.admin-module.html#add_path_first
web2py.gluon.admin.app_pack_compiled	web2py.gluon.admin-module.html#app_pack_compiled
web2py.gluon.admin.fix_newlines	web2py.gluon.fileutils-module.html#fix_newlines
web2py.gluon.admin.up	web2py.gluon.fileutils-module.html#up
web2py.gluon.admin.create_missing_app_folders	web2py.gluon.admin-module.html#create_missing_app_folders
web2py.gluon.admin.app_uninstall	web2py.gluon.admin-module.html#app_uninstall
web2py.gluon.cache	web2py.gluon.cache-module.html
web2py.gluon.cache.DEFAULT_TIME_EXPIRE	web2py.gluon.cache-module.html#DEFAULT_TIME_EXPIRE
web2py.gluon.cache.logger	web2py.gluon.cache-module.html#logger
web2py.gluon.cfs	web2py.gluon.cfs-module.html
web2py.gluon.cfs.cfs_lock	web2py.gluon.cfs-module.html#cfs_lock
web2py.gluon.cfs.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.cfs.getcfs	web2py.gluon.cfs-module.html#getcfs
web2py.gluon.cfs.cfs	web2py.gluon.cfs-module.html#cfs
web2py.gluon.compileapp	web2py.gluon.compileapp-module.html
web2py.gluon.compileapp.run_controller_in	web2py.gluon.compileapp-module.html#run_controller_in
web2py.gluon.compileapp.is_gae	web2py.gluon.compileapp-module.html#is_gae
web2py.gluon.compileapp.build_environment	web2py.gluon.compileapp-module.html#build_environment
web2py.gluon.compileapp.TEST_CODE	web2py.gluon.compileapp-module.html#TEST_CODE
web2py.gluon.compileapp.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.compileapp.write_file	web2py.gluon.fileutils-module.html#write_file
web2py.gluon.compileapp.save_pyc	web2py.gluon.compileapp-module.html#save_pyc
web2py.gluon.compileapp.run_view_in	web2py.gluon.compileapp-module.html#run_view_in
web2py.gluon.compileapp.compile2	web2py.gluon.restricted-module.html#compile2
web2py.gluon.compileapp.redirect	web2py.gluon.http-module.html#redirect
web2py.gluon.compileapp.is_jython	web2py.gluon.compileapp-module.html#is_jython
web2py.gluon.compileapp.getcfs	web2py.gluon.cfs-module.html#getcfs
web2py.gluon.compileapp.compile_models	web2py.gluon.compileapp-module.html#compile_models
web2py.gluon.compileapp.logger	web2py.gluon.compileapp-module.html#logger
web2py.gluon.compileapp.listdir	web2py.gluon.fileutils-module.html#listdir
web2py.gluon.compileapp.read_pyc	web2py.gluon.compileapp-module.html#read_pyc
web2py.gluon.compileapp.run_models_in	web2py.gluon.compileapp-module.html#run_models_in
web2py.gluon.compileapp.parse_template	web2py.gluon.template-module.html#parse_template
web2py.gluon.compileapp.compile_views	web2py.gluon.compileapp-module.html#compile_views
web2py.gluon.compileapp.test	web2py.gluon.compileapp-module.html#test
web2py.gluon.compileapp.local_import_aux	web2py.gluon.compileapp-module.html#local_import_aux
web2py.gluon.compileapp.remove_compiled_application	web2py.gluon.compileapp-module.html#remove_compiled_application
web2py.gluon.compileapp.mktree	web2py.gluon.fileutils-module.html#mktree
web2py.gluon.compileapp.compile_controllers	web2py.gluon.compileapp-module.html#compile_controllers
web2py.gluon.compileapp.restricted	web2py.gluon.restricted-module.html#restricted
web2py.gluon.compileapp.compile_application	web2py.gluon.compileapp-module.html#compile_application
web2py.gluon.contenttype	web2py.gluon.contenttype-module.html
web2py.gluon.contenttype.contenttype	web2py.gluon.contenttype-module.html#contenttype
web2py.gluon.contenttype.CONTENT_TYPE	web2py.gluon.contenttype-module.html#CONTENT_TYPE
web2py.gluon.contrib.pymysql	web2py.gluon.contrib.pymysql-module.html
web2py.gluon.contrib.pymysql.Binary	web2py.gluon.contrib.pymysql-module.html#Binary
web2py.gluon.contrib.pymysql.NUMBER	web2py.gluon.contrib.pymysql-module.html#NUMBER
web2py.gluon.contrib.pymysql.connect	web2py.gluon.contrib.pymysql-module.html#connect
web2py.gluon.contrib.pymysql.escape_dict	web2py.gluon.contrib.pymysql-module.html#escape_dict
web2py.gluon.contrib.pymysql.DATE	web2py.gluon.contrib.pymysql-module.html#DATE
web2py.gluon.contrib.pymysql.escape_string	web2py.gluon.contrib.pymysql-module.html#escape_string
web2py.gluon.contrib.pymysql.NULL	web2py.gluon.contrib.pymysql-module.html#NULL
web2py.gluon.contrib.pymysql.threadsafety	web2py.gluon.contrib.pymysql-module.html#threadsafety
web2py.gluon.contrib.pymysql.thread_safe	web2py.gluon.contrib.pymysql-module.html#thread_safe
web2py.gluon.contrib.pymysql.TimeFromTicks	web2py.gluon.contrib.pymysql-module.html#TimeFromTicks
web2py.gluon.contrib.pymysql.install_as_MySQLdb	web2py.gluon.contrib.pymysql-module.html#install_as_MySQLdb
web2py.gluon.contrib.pymysql.TimestampFromTicks	web2py.gluon.contrib.pymysql-module.html#TimestampFromTicks
web2py.gluon.contrib.pymysql.STRING	web2py.gluon.contrib.pymysql-module.html#STRING
web2py.gluon.contrib.pymysql.version_info	web2py.gluon.contrib.pymysql-module.html#version_info
web2py.gluon.contrib.pymysql.escape_sequence	web2py.gluon.contrib.pymysql-module.html#escape_sequence
web2py.gluon.contrib.pymysql.DATETIME	web2py.gluon.contrib.pymysql-module.html#DATETIME
web2py.gluon.contrib.pymysql.Connection	web2py.gluon.contrib.pymysql-module.html#Connection
web2py.gluon.contrib.pymysql.VERSION	web2py.gluon.contrib.pymysql-module.html#VERSION
web2py.gluon.contrib.pymysql.paramstyle	web2py.gluon.contrib.pymysql-module.html#paramstyle
web2py.gluon.contrib.pymysql.DateFromTicks	web2py.gluon.contrib.pymysql-module.html#DateFromTicks
web2py.gluon.contrib.pymysql.BINARY	web2py.gluon.contrib.pymysql-module.html#BINARY
web2py.gluon.contrib.pymysql.TIMESTAMP	web2py.gluon.contrib.pymysql-module.html#TIMESTAMP
web2py.gluon.contrib.pymysql.get_client_info	web2py.gluon.contrib.pymysql-module.html#get_client_info
web2py.gluon.contrib.pymysql.Connect	web2py.gluon.contrib.pymysql-module.html#Connect
web2py.gluon.contrib.pymysql.ROWID	web2py.gluon.contrib.pymysql-module.html#ROWID
web2py.gluon.contrib.pymysql.TIME	web2py.gluon.contrib.pymysql-module.html#TIME
web2py.gluon.contrib.pymysql.apilevel	web2py.gluon.contrib.pymysql-module.html#apilevel
web2py.gluon.contrib.pymysql.constants	web2py.gluon.contrib.pymysql.constants-module.html
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SHORT	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SHORT
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.CHAR	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#CHAR
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDATE	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDATE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NULL	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NULL
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SET
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VARCHAR	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VARCHAR
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INTERVAL	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INTERVAL
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDECIMAL
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BIT	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BIT
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#ENUM
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.GEOMETRY	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#GEOMETRY
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME	web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME
web2py.gluon.contrib.pymysql.converters	web2py.gluon.contrib.pymysql.converters-module.html
web2py.gluon.contrib.pymysql.converters.conversions	web2py.gluon.contrib.pymysql.converters-module.html#conversions
web2py.gluon.contrib.pymysql.converters.convert_bit	web2py.gluon.contrib.pymysql.converters-module.html#convert_bit
web2py.gluon.contrib.pymysql.converters.escape_int	web2py.gluon.contrib.pymysql.converters-module.html#escape_int
web2py.gluon.contrib.pymysql.converters.decoders	web2py.gluon.contrib.pymysql.converters-module.html#decoders
web2py.gluon.contrib.pymysql.converters.escape_object	web2py.gluon.contrib.pymysql.converters-module.html#escape_object
web2py.gluon.contrib.pymysql.converters.convert_timedelta	web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta
web2py.gluon.contrib.pymysql.converters.escape_item	web2py.gluon.contrib.pymysql.converters-module.html#escape_item
web2py.gluon.contrib.pymysql.converters.escape_unicode	web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode
web2py.gluon.contrib.pymysql.converters.ESCAPE_MAP	web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_MAP
web2py.gluon.contrib.pymysql.converters.escape_dict	web2py.gluon.contrib.pymysql.converters-module.html#escape_dict
web2py.gluon.contrib.pymysql.converters.escape_None	web2py.gluon.contrib.pymysql.converters-module.html#escape_None
web2py.gluon.contrib.pymysql.converters.escape_string	web2py.gluon.contrib.pymysql.converters-module.html#escape_string
web2py.gluon.contrib.pymysql.converters.convert_characters	web2py.gluon.contrib.pymysql.converters-module.html#convert_characters
web2py.gluon.contrib.pymysql.converters.convert_date	web2py.gluon.contrib.pymysql.converters-module.html#convert_date
web2py.gluon.contrib.pymysql.converters.encoders	web2py.gluon.contrib.pymysql.converters-module.html#encoders
web2py.gluon.contrib.pymysql.converters.escape_long	web2py.gluon.contrib.pymysql.converters-module.html#escape_long
web2py.gluon.contrib.pymysql.converters.convert_float	web2py.gluon.contrib.pymysql.converters-module.html#convert_float
web2py.gluon.contrib.pymysql.converters.escape_timedelta	web2py.gluon.contrib.pymysql.converters-module.html#escape_timedelta
web2py.gluon.contrib.pymysql.converters.escape_datetime	web2py.gluon.contrib.pymysql.converters-module.html#escape_datetime
web2py.gluon.contrib.pymysql.converters.escape_set	web2py.gluon.contrib.pymysql.converters-module.html#escape_set
web2py.gluon.contrib.pymysql.converters.escape_struct_time	web2py.gluon.contrib.pymysql.converters-module.html#escape_struct_time
web2py.gluon.contrib.pymysql.converters.escape_bool	web2py.gluon.contrib.pymysql.converters-module.html#escape_bool
web2py.gluon.contrib.pymysql.converters.escape_date	web2py.gluon.contrib.pymysql.converters-module.html#escape_date
web2py.gluon.contrib.pymysql.converters.escape_sequence	web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence
web2py.gluon.contrib.pymysql.converters.ESCAPE_REGEX	web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_REGEX
web2py.gluon.contrib.pymysql.converters.convert_time	web2py.gluon.contrib.pymysql.converters-module.html#convert_time
web2py.gluon.contrib.pymysql.converters.convert_mysql_timestamp	web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp
web2py.gluon.contrib.pymysql.converters.convert_long	web2py.gluon.contrib.pymysql.converters-module.html#convert_long
web2py.gluon.contrib.pymysql.converters.convert_set	web2py.gluon.contrib.pymysql.converters-module.html#convert_set
web2py.gluon.contrib.pymysql.converters.convert_datetime	web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime
web2py.gluon.contrib.pymysql.converters.escape_float	web2py.gluon.contrib.pymysql.converters-module.html#escape_float
web2py.gluon.contrib.pymysql.converters.convert_int	web2py.gluon.contrib.pymysql.converters-module.html#convert_int
web2py.gluon.contrib.pymysql.converters.convert_decimal	web2py.gluon.contrib.pymysql.converters-module.html#convert_decimal
web2py.gluon.contrib.pymysql.converters.escape_time	web2py.gluon.contrib.pymysql.converters-module.html#escape_time
web2py.gluon.contrib.pymysql.converters.escape_decimal	web2py.gluon.contrib.pymysql.converters-module.html#escape_decimal
web2py.gluon.custom_import	web2py.gluon.custom_import-module.html
web2py.gluon.custom_import.custom_import_install	web2py.gluon.custom_import-module.html#custom_import_install
web2py.gluon.custom_import._web2py_path	web2py.gluon.custom_import-module.html#_web2py_path
web2py.gluon.custom_import.track_changes	web2py.gluon.custom_import-module.html#track_changes
web2py.gluon.custom_import._web2py_date_tracker_importer	web2py.gluon.custom_import-module.html#_web2py_date_tracker_importer
web2py.gluon.custom_import.is_tracking_changes	web2py.gluon.custom_import-module.html#is_tracking_changes
web2py.gluon.custom_import._web2py_importer	web2py.gluon.custom_import-module.html#_web2py_importer
web2py.gluon.custom_import._is_tracking_changes	web2py.gluon.custom_import-module.html#_is_tracking_changes
web2py.gluon.dal	web2py.gluon.dal-module.html
web2py.gluon.dal.regex_quotes	web2py.gluon.dal-module.html#regex_quotes
web2py.gluon.dal.bar_decode_integer	web2py.gluon.dal-module.html#bar_decode_integer
web2py.gluon.dal.have_serializers	web2py.gluon.dal-module.html#have_serializers
web2py.gluon.dal.Rows_unpickler	web2py.gluon.dal-module.html#Rows_unpickler
web2py.gluon.dal.Row_unpickler	web2py.gluon.dal-module.html#Row_unpickler
web2py.gluon.dal.table_field	web2py.gluon.dal-module.html#table_field
web2py.gluon.dal.logger	web2py.gluon.dal-module.html#logger
web2py.gluon.dal.bar_escape	web2py.gluon.dal-module.html#bar_escape
web2py.gluon.dal.Rows_pickler	web2py.gluon.dal-module.html#Rows_pickler
web2py.gluon.dal.Row_pickler	web2py.gluon.dal-module.html#Row_pickler
web2py.gluon.dal.bar_encode	web2py.gluon.dal-module.html#bar_encode
web2py.gluon.dal.bar_decode_string	web2py.gluon.dal-module.html#bar_decode_string
web2py.gluon.dal.test_all	web2py.gluon.dal-module.html#test_all
web2py.gluon.dal.Reference_pickler	web2py.gluon.dal-module.html#Reference_pickler
web2py.gluon.dal.regex_python_keywords	web2py.gluon.dal-module.html#regex_python_keywords
web2py.gluon.dal.regex_dbname	web2py.gluon.dal-module.html#regex_dbname
web2py.gluon.dal.have_validators	web2py.gluon.dal-module.html#have_validators
web2py.gluon.dal.is_jdbc	web2py.gluon.dal-module.html#is_jdbc
web2py.gluon.dal.thread	web2py.gluon.dal-module.html#thread
web2py.gluon.dal.xorify	web2py.gluon.dal-module.html#xorify
web2py.gluon.dal.DEFAULT	web2py.gluon.dal-module.html#DEFAULT
web2py.gluon.dal.uuid2int	web2py.gluon.dal-module.html#uuid2int
web2py.gluon.dal.regex_cleanup_fn	web2py.gluon.dal-module.html#regex_cleanup_fn
web2py.gluon.dal.MAXCHARLENGTH	web2py.gluon.dal-module.html#MAXCHARLENGTH
web2py.gluon.dal.update_record	web2py.gluon.dal-module.html#update_record
web2py.gluon.dal.ADAPTERS	web2py.gluon.dal-module.html#ADAPTERS
web2py.gluon.dal.regex_content	web2py.gluon.dal-module.html#regex_content
web2py.gluon.dal.Reference_unpickler	web2py.gluon.dal-module.html#Reference_unpickler
web2py.gluon.dal.INGRES_SEQNAME	web2py.gluon.dal-module.html#INGRES_SEQNAME
web2py.gluon.dal.CALLABLETYPES	web2py.gluon.dal-module.html#CALLABLETYPES
web2py.gluon.dal.have_portalocker	web2py.gluon.dal-module.html#have_portalocker
web2py.gluon.dal.string_unpack	web2py.gluon.dal-module.html#string_unpack
web2py.gluon.dal.sqlhtml_validators	web2py.gluon.dal-module.html#sqlhtml_validators
web2py.gluon.dal.drivers	web2py.gluon.dal-module.html#drivers
web2py.gluon.dal.cleanup	web2py.gluon.dal-module.html#cleanup
web2py.gluon.dal.INFINITY	web2py.gluon.dal-module.html#INFINITY
web2py.gluon.dal.sql_locker	web2py.gluon.dal-module.html#sql_locker
web2py.gluon.dal.int2uuid	web2py.gluon.dal-module.html#int2uuid
web2py.gluon.debug	web2py.gluon.debug-module.html
web2py.gluon.debug.stop_trace	web2py.gluon.debug-module.html#stop_trace
web2py.gluon.debug.debugger	web2py.gluon.debug-module.html#debugger
web2py.gluon.debug.pipe_in	web2py.gluon.debug-module.html#pipe_in
web2py.gluon.debug.set_trace	web2py.gluon.debug-module.html#set_trace
web2py.gluon.debug.communicate	web2py.gluon.debug-module.html#communicate
web2py.gluon.debug.pipe_out	web2py.gluon.debug-module.html#pipe_out
web2py.gluon.debug.logger	web2py.gluon.debug-module.html#logger
web2py.gluon.decoder	web2py.gluon.decoder-module.html
web2py.gluon.decoder.autoDetectXMLEncoding	web2py.gluon.decoder-module.html#autoDetectXMLEncoding
web2py.gluon.decoder.decoder	web2py.gluon.decoder-module.html#decoder
web2py.gluon.decoder.autodetect_dict	web2py.gluon.decoder-module.html#autodetect_dict
web2py.gluon.fileutils	web2py.gluon.fileutils-module.html
web2py.gluon.fileutils.tar	web2py.gluon.fileutils-module.html#tar
web2py.gluon.fileutils._extractall	web2py.gluon.fileutils-module.html#_extractall
web2py.gluon.fileutils.listdir	web2py.gluon.fileutils-module.html#listdir
web2py.gluon.fileutils.w2p_unpack	web2py.gluon.fileutils-module.html#w2p_unpack
web2py.gluon.fileutils.write_file	web2py.gluon.fileutils-module.html#write_file
web2py.gluon.fileutils.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.fileutils.w2p_pack_plugin	web2py.gluon.fileutils-module.html#w2p_pack_plugin
web2py.gluon.fileutils.w2p_pack	web2py.gluon.fileutils-module.html#w2p_pack
web2py.gluon.fileutils.recursive_unlink	web2py.gluon.fileutils-module.html#recursive_unlink
web2py.gluon.fileutils.get_session	web2py.gluon.fileutils-module.html#get_session
web2py.gluon.fileutils.w2p_unpack_plugin	web2py.gluon.fileutils-module.html#w2p_unpack_plugin
web2py.gluon.fileutils.abspath	web2py.gluon.fileutils-module.html#abspath
web2py.gluon.fileutils.untar	web2py.gluon.fileutils-module.html#untar
web2py.gluon.fileutils.cleanpath	web2py.gluon.fileutils-module.html#cleanpath
web2py.gluon.fileutils.make_fake_file_like_object	web2py.gluon.fileutils-module.html#make_fake_file_like_object
web2py.gluon.fileutils.copystream	web2py.gluon.fileutils-module.html#copystream
web2py.gluon.fileutils.fix_newlines	web2py.gluon.fileutils-module.html#fix_newlines
web2py.gluon.fileutils.mktree	web2py.gluon.fileutils-module.html#mktree
web2py.gluon.fileutils.readlines_file	web2py.gluon.fileutils-module.html#readlines_file
web2py.gluon.fileutils.up	web2py.gluon.fileutils-module.html#up
web2py.gluon.fileutils.tar_compiled	web2py.gluon.fileutils-module.html#tar_compiled
web2py.gluon.fileutils.check_credentials	web2py.gluon.fileutils-module.html#check_credentials
web2py.gluon.globals	web2py.gluon.globals-module.html
web2py.gluon.globals.custom_json	web2py.gluon.serializers-module.html#custom_json
web2py.gluon.globals.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.globals.streamer	web2py.gluon.streamer-module.html#streamer
web2py.gluon.globals.stream_file_or_304_or_206	web2py.gluon.streamer-module.html#stream_file_or_304_or_206
web2py.gluon.globals.contenttype	web2py.gluon.contenttype-module.html#contenttype
web2py.gluon.globals.current	web2py.gluon.globals-module.html#current
web2py.gluon.globals.json	web2py.gluon.serializers-module.html#json
web2py.gluon.globals.handler	web2py.gluon.xmlrpc-module.html#handler
web2py.gluon.globals.regex_session_id	web2py.gluon.globals-module.html#regex_session_id
web2py.gluon.globals.up	web2py.gluon.fileutils-module.html#up
web2py.gluon.globals.xmlescape	web2py.gluon.html-module.html#xmlescape
web2py.gluon.highlight	web2py.gluon.highlight-module.html
web2py.gluon.highlight.highlight	web2py.gluon.highlight-module.html#highlight
web2py.gluon.html	web2py.gluon.html-module.html
web2py.gluon.html.TAG	web2py.gluon.html-module.html#TAG
web2py.gluon.html.URL	web2py.gluon.html-module.html#URL
web2py.gluon.html.ON	web2py.gluon.html-module.html#ON
web2py.gluon.html.TAG_unpickler	web2py.gluon.html-module.html#TAG_unpickler
web2py.gluon.html.XML_pickle	web2py.gluon.html-module.html#XML_pickle
web2py.gluon.html.hmac_hash	web2py.gluon.utils-module.html#hmac_hash
web2py.gluon.html.markmin_serializer	web2py.gluon.html-module.html#markmin_serializer
web2py.gluon.html.embed64	web2py.gluon.html-module.html#embed64
web2py.gluon.html.xmlescape	web2py.gluon.html-module.html#xmlescape
web2py.gluon.html.verifyURL	web2py.gluon.html-module.html#verifyURL
web2py.gluon.html.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.html.regex_crlf	web2py.gluon.html-module.html#regex_crlf
web2py.gluon.html.join	web2py.gluon.html-module.html#join
web2py.gluon.html.highlight	web2py.gluon.highlight-module.html#highlight
web2py.gluon.html.TAG_pickler	web2py.gluon.html-module.html#TAG_pickler
web2py.gluon.html.XML_unpickle	web2py.gluon.html-module.html#XML_unpickle
web2py.gluon.html.test	web2py.gluon.html-module.html#test
web2py.gluon.html.markdown_serializer	web2py.gluon.html-module.html#markdown_serializer
web2py.gluon.http	web2py.gluon.http-module.html
web2py.gluon.http.redirect	web2py.gluon.http-module.html#redirect
web2py.gluon.http.defined_status	web2py.gluon.http-module.html#defined_status
web2py.gluon.import_all	web2py.gluon.import_all-module.html
web2py.gluon.import_all.dirs	web2py.gluon.import_all-module.html#dirs
web2py.gluon.import_all.files	web2py.gluon.import_all-module.html#files
web2py.gluon.import_all.alert_dependency	web2py.gluon.import_all-module.html#alert_dependency
web2py.gluon.import_all.base_modules	web2py.gluon.import_all-module.html#base_modules
web2py.gluon.import_all.candidate	web2py.gluon.import_all-module.html#candidate
web2py.gluon.import_all.python_version	web2py.gluon.import_all-module.html#python_version
web2py.gluon.import_all.root	web2py.gluon.import_all-module.html#root
web2py.gluon.import_all.contributed_modules	web2py.gluon.import_all-module.html#contributed_modules
web2py.gluon.import_all.module	web2py.gluon.import_all-module.html#module
web2py.gluon.import_all.py27_deprecated	web2py.gluon.import_all-module.html#py27_deprecated
web2py.gluon.import_all.py26_deprecated	web2py.gluon.import_all-module.html#py26_deprecated
web2py.gluon.import_all.name	web2py.gluon.import_all-module.html#name
web2py.gluon.languages	web2py.gluon.languages-module.html
web2py.gluon.languages.is_gae	web2py.gluon.languages-module.html#is_gae
web2py.gluon.languages.regex_translate	web2py.gluon.languages-module.html#regex_translate
web2py.gluon.languages.utf8_repr	web2py.gluon.languages-module.html#utf8_repr
web2py.gluon.languages.PY_STRING_LITERAL_RE	web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE
web2py.gluon.languages.getcfs	web2py.gluon.cfs-module.html#getcfs
web2py.gluon.languages.write_dict	web2py.gluon.languages-module.html#write_dict
web2py.gluon.languages.listdir	web2py.gluon.fileutils-module.html#listdir
web2py.gluon.languages.lazyT_pickle	web2py.gluon.languages-module.html#lazyT_pickle
web2py.gluon.languages.lazyT_unpickle	web2py.gluon.languages-module.html#lazyT_unpickle
web2py.gluon.languages.findT	web2py.gluon.languages-module.html#findT
web2py.gluon.languages.read_dict_aux	web2py.gluon.languages-module.html#read_dict_aux
web2py.gluon.languages.read_dict	web2py.gluon.languages-module.html#read_dict
web2py.gluon.languages.regex_language	web2py.gluon.languages-module.html#regex_language
web2py.gluon.languages.update_all_languages	web2py.gluon.languages-module.html#update_all_languages
web2py.gluon.main	web2py.gluon.main-module.html
web2py.gluon.main.build_environment	web2py.gluon.compileapp-module.html#build_environment
web2py.gluon.main.parse_get_post_vars	web2py.gluon.main-module.html#parse_get_post_vars
web2py.gluon.main.middleware_aux	web2py.gluon.main-module.html#middleware_aux
web2py.gluon.main.write_file	web2py.gluon.fileutils-module.html#write_file
web2py.gluon.main.get_client	web2py.gluon.main-module.html#get_client
web2py.gluon.main.run_view_in	web2py.gluon.compileapp-module.html#run_view_in
web2py.gluon.main.redirect	web2py.gluon.http-module.html#redirect
web2py.gluon.main.contenttype	web2py.gluon.contenttype-module.html#contenttype
web2py.gluon.main.logpath	web2py.gluon.main-module.html#logpath
web2py.gluon.main.web2py_path	web2py.gluon.main-module.html#web2py_path
web2py.gluon.main.logger	web2py.gluon.main-module.html#logger
web2py.gluon.main.start_response_aux	web2py.gluon.main-module.html#start_response_aux
web2py.gluon.main.create_missing_folders	web2py.gluon.admin-module.html#create_missing_folders
web2py.gluon.main.version_info	web2py.gluon.main-module.html#version_info
web2py.gluon.main.Url	web2py.gluon.html-module.html#URL
web2py.gluon.main.regex_client	web2py.gluon.main-module.html#regex_client
web2py.gluon.main.abspath	web2py.gluon.fileutils-module.html#abspath
web2py.gluon.main.run_models_in	web2py.gluon.compileapp-module.html#run_models_in
web2py.gluon.main.wsgibase	web2py.gluon.main-module.html#wsgibase
web2py.gluon.main.copystream_progress	web2py.gluon.main-module.html#copystream_progress
web2py.gluon.main.web2py_version	web2py.gluon.main-module.html#web2py_version
web2py.gluon.main.run_controller_in	web2py.gluon.compileapp-module.html#run_controller_in
web2py.gluon.main.custom_import_install	web2py.gluon.custom_import-module.html#custom_import_install
web2py.gluon.main.appfactory	web2py.gluon.main-module.html#appfactory
web2py.gluon.main.add_path_first	web2py.gluon.admin-module.html#add_path_first
web2py.gluon.main.serve_controller	web2py.gluon.main-module.html#serve_controller
web2py.gluon.main.copystream	web2py.gluon.fileutils-module.html#copystream
web2py.gluon.main.create_missing_app_folders	web2py.gluon.admin-module.html#create_missing_app_folders
web2py.gluon.main.environ_aux	web2py.gluon.main-module.html#environ_aux
web2py.gluon.main.save_password	web2py.gluon.main-module.html#save_password
web2py.gluon.main.requests	web2py.gluon.main-module.html#requests
web2py.gluon.myregex	web2py.gluon.myregex-module.html
web2py.gluon.myregex.regex_expose	web2py.gluon.myregex-module.html#regex_expose
web2py.gluon.myregex.regex_tables	web2py.gluon.myregex-module.html#regex_tables
web2py.gluon.myregex.regex_extend	web2py.gluon.myregex-module.html#regex_extend
web2py.gluon.myregex.regex_include	web2py.gluon.myregex-module.html#regex_include
web2py.gluon.newcron	web2py.gluon.newcron-module.html
web2py.gluon.newcron._cron_stopping	web2py.gluon.newcron-module.html#_cron_stopping
web2py.gluon.newcron.stopcron	web2py.gluon.newcron-module.html#stopcron
web2py.gluon.newcron.parsecronline	web2py.gluon.newcron-module.html#parsecronline
web2py.gluon.newcron.crondance	web2py.gluon.newcron-module.html#crondance
web2py.gluon.newcron.logger	web2py.gluon.newcron-module.html#logger
web2py.gluon.newcron.rangetolist	web2py.gluon.newcron-module.html#rangetolist
web2py.gluon.portalocker	web2py.gluon.portalocker-module.html
web2py.gluon.portalocker.__overlapped	web2py.gluon.portalocker-module.html#__overlapped
web2py.gluon.portalocker.lock	web2py.gluon.portalocker-module.html#lock
web2py.gluon.portalocker.os_locking	web2py.gluon.portalocker-module.html#os_locking
web2py.gluon.portalocker.unlock	web2py.gluon.portalocker-module.html#unlock
web2py.gluon.portalocker.LOCK_NB	web2py.gluon.portalocker-module.html#LOCK_NB
web2py.gluon.portalocker.LOCK_EX	web2py.gluon.portalocker-module.html#LOCK_EX
web2py.gluon.portalocker.logger	web2py.gluon.portalocker-module.html#logger
web2py.gluon.portalocker.LOCK_SH	web2py.gluon.portalocker-module.html#LOCK_SH
web2py.gluon.reserved_sql_keywords	web2py.gluon.reserved_sql_keywords-module.html
web2py.gluon.reserved_sql_keywords.POSTGRESQL_NONRESERVED	web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL_NONRESERVED
web2py.gluon.reserved_sql_keywords.SQLITE	web2py.gluon.reserved_sql_keywords-module.html#SQLITE
web2py.gluon.reserved_sql_keywords.POSTGRESQL	web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL
web2py.gluon.reserved_sql_keywords.FIREBIRD	web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD
web2py.gluon.reserved_sql_keywords.MSSQL	web2py.gluon.reserved_sql_keywords-module.html#MSSQL
web2py.gluon.reserved_sql_keywords.FIREBIRD_NONRESERVED	web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD_NONRESERVED
web2py.gluon.reserved_sql_keywords.JDBCPOSTGRESQL	web2py.gluon.reserved_sql_keywords-module.html#JDBCPOSTGRESQL
web2py.gluon.reserved_sql_keywords.__author__	web2py.gluon.reserved_sql_keywords-module.html#__author__
web2py.gluon.reserved_sql_keywords.INFORMIX	web2py.gluon.reserved_sql_keywords-module.html#INFORMIX
web2py.gluon.reserved_sql_keywords.COMMON	web2py.gluon.reserved_sql_keywords-module.html#COMMON
web2py.gluon.reserved_sql_keywords.MYSQL	web2py.gluon.reserved_sql_keywords-module.html#MYSQL
web2py.gluon.reserved_sql_keywords.ORACLE	web2py.gluon.reserved_sql_keywords-module.html#ORACLE
web2py.gluon.reserved_sql_keywords.INGRES	web2py.gluon.reserved_sql_keywords-module.html#INGRES
web2py.gluon.reserved_sql_keywords.DB2	web2py.gluon.reserved_sql_keywords-module.html#DB2
web2py.gluon.reserved_sql_keywords.ADAPTERS	web2py.gluon.reserved_sql_keywords-module.html#ADAPTERS
web2py.gluon.reserved_sql_keywords.JDBCSQLITE	web2py.gluon.reserved_sql_keywords-module.html#JDBCSQLITE
web2py.gluon.restricted	web2py.gluon.restricted-module.html
web2py.gluon.restricted.restricted	web2py.gluon.restricted-module.html#restricted
web2py.gluon.restricted.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.restricted.snapshot	web2py.gluon.restricted-module.html#snapshot
web2py.gluon.restricted.logger	web2py.gluon.restricted-module.html#logger
web2py.gluon.restricted.compile2	web2py.gluon.restricted-module.html#compile2
web2py.gluon.rewrite	web2py.gluon.rewrite-module.html
web2py.gluon.rewrite.load	web2py.gluon.rewrite-module.html#load
web2py.gluon.rewrite.ROUTER_KEYS	web2py.gluon.rewrite-module.html#ROUTER_KEYS
web2py.gluon.rewrite.params_apps	web2py.gluon.rewrite-module.html#params_apps
web2py.gluon.rewrite.load_routers	web2py.gluon.rewrite-module.html#load_routers
web2py.gluon.rewrite.routers	web2py.gluon.rewrite-module.html#routers
web2py.gluon.rewrite.regex_url_in	web2py.gluon.rewrite-module.html#regex_url_in
web2py.gluon.rewrite.get_effective_router	web2py.gluon.rewrite-module.html#get_effective_router
web2py.gluon.rewrite.regex_anything	web2py.gluon.rewrite-module.html#regex_anything
web2py.gluon.rewrite.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.rewrite.url_in	web2py.gluon.rewrite-module.html#url_in
web2py.gluon.rewrite.map_url_in	web2py.gluon.rewrite-module.html#map_url_in
web2py.gluon.rewrite.map_url_out	web2py.gluon.rewrite-module.html#map_url_out
web2py.gluon.rewrite.regex_filter_in	web2py.gluon.rewrite-module.html#regex_filter_in
web2py.gluon.rewrite.regex_select	web2py.gluon.rewrite-module.html#regex_select
web2py.gluon.rewrite.regex_at	web2py.gluon.rewrite-module.html#regex_at
web2py.gluon.rewrite.regex_url	web2py.gluon.rewrite-module.html#regex_url
web2py.gluon.rewrite.filter_err	web2py.gluon.rewrite-module.html#filter_err
web2py.gluon.rewrite.regex_args	web2py.gluon.rewrite-module.html#regex_args
web2py.gluon.rewrite.regex_uri	web2py.gluon.rewrite-module.html#regex_uri
web2py.gluon.rewrite.params	web2py.gluon.rewrite-module.html#params
web2py.gluon.rewrite.logger	web2py.gluon.rewrite-module.html#logger
web2py.gluon.rewrite.regex_filter_out	web2py.gluon.rewrite-module.html#regex_filter_out
web2py.gluon.rewrite.try_redirect_on_error	web2py.gluon.rewrite-module.html#try_redirect_on_error
web2py.gluon.rewrite.ROUTER_BASE_KEYS	web2py.gluon.rewrite-module.html#ROUTER_BASE_KEYS
web2py.gluon.rewrite.abspath	web2py.gluon.fileutils-module.html#abspath
web2py.gluon.rewrite.url_out	web2py.gluon.rewrite-module.html#url_out
web2py.gluon.rewrite.try_rewrite_on_error	web2py.gluon.rewrite-module.html#try_rewrite_on_error
web2py.gluon.rewrite._params_default	web2py.gluon.rewrite-module.html#_params_default
web2py.gluon.rewrite.filter_url	web2py.gluon.rewrite-module.html#filter_url
web2py.gluon.rewrite.compile_regex	web2py.gluon.rewrite-module.html#compile_regex
web2py.gluon.rewrite.thread	web2py.gluon.rewrite-module.html#thread
web2py.gluon.rewrite.regex_static	web2py.gluon.rewrite-module.html#regex_static
web2py.gluon.rewrite._router_default	web2py.gluon.rewrite-module.html#_router_default
web2py.gluon.rewrite.regex_space	web2py.gluon.rewrite-module.html#regex_space
web2py.gluon.rocket	web2py.gluon.rocket-module.html
web2py.gluon.rocket.BUF_SIZE	web2py.gluon.rocket-module.html#BUF_SIZE
web2py.gluon.rocket.demo	web2py.gluon.rocket-module.html#demo
web2py.gluon.rocket.PY3K	web2py.gluon.rocket-module.html#PY3K
web2py.gluon.rocket.SERVER_SOFTWARE	web2py.gluon.rocket-module.html#SERVER_SOFTWARE
web2py.gluon.rocket.HTTP_SERVER_SOFTWARE	web2py.gluon.rocket-module.html#HTTP_SERVER_SOFTWARE
web2py.gluon.rocket.LOG_LINE	web2py.gluon.rocket-module.html#LOG_LINE
web2py.gluon.rocket.BASE_ENV	web2py.gluon.rocket-module.html#BASE_ENV
web2py.gluon.rocket._formatparam	web2py.gluon.rocket-module.html#_formatparam
web2py.gluon.rocket.HTTP_METHODS	web2py.gluon.rocket-module.html#HTTP_METHODS
web2py.gluon.rocket.log	web2py.gluon.rocket-module.html#log
web2py.gluon.rocket.SERVER_NAME	web2py.gluon.rocket-module.html#SERVER_NAME
web2py.gluon.rocket.NEWLINE	web2py.gluon.rocket-module.html#NEWLINE
web2py.gluon.rocket.HEADER_RESPONSE	web2py.gluon.rocket-module.html#HEADER_RESPONSE
web2py.gluon.rocket.DEFAULTS	web2py.gluon.rocket-module.html#DEFAULTS
web2py.gluon.rocket.b	web2py.gluon.rocket-module.html#b
web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL	web2py.gluon.rocket-module.html#THREAD_STOP_CHECK_INTERVAL
web2py.gluon.rocket.re_REQUEST_LINE	web2py.gluon.rocket-module.html#re_REQUEST_LINE
web2py.gluon.rocket.re_SLASH	web2py.gluon.rocket-module.html#re_SLASH
web2py.gluon.rocket.VERSION	web2py.gluon.rocket-module.html#VERSION
web2py.gluon.rocket.DEFAULT_LISTEN_QUEUE_SIZE	web2py.gluon.rocket-module.html#DEFAULT_LISTEN_QUEUE_SIZE
web2py.gluon.rocket.DEFAULT_MIN_THREADS	web2py.gluon.rocket-module.html#DEFAULT_MIN_THREADS
web2py.gluon.rocket.RESPONSE	web2py.gluon.rocket-module.html#RESPONSE
web2py.gluon.rocket.get_method	web2py.gluon.rocket-module.html#get_method
web2py.gluon.rocket.CherryPyWSGIServer	web2py.gluon.rocket-module.html#CherryPyWSGIServer
web2py.gluon.rocket.DEFAULT_MAX_THREADS	web2py.gluon.rocket-module.html#DEFAULT_MAX_THREADS
web2py.gluon.rocket.SOCKET_TIMEOUT	web2py.gluon.rocket-module.html#SOCKET_TIMEOUT
web2py.gluon.rocket.IS_JYTHON	web2py.gluon.rocket-module.html#IS_JYTHON
web2py.gluon.rocket.IGNORE_ERRORS_ON_CLOSE	web2py.gluon.rocket-module.html#IGNORE_ERRORS_ON_CLOSE
web2py.gluon.rocket.u	web2py.gluon.rocket-module.html#u
web2py.gluon.rocket.has_ssl	web2py.gluon.rocket-module.html#has_ssl
web2py.gluon.rocket.demo_app	web2py.gluon.rocket-module.html#demo_app
web2py.gluon.rocket._tspecials	web2py.gluon.rocket-module.html#_tspecials
web2py.gluon.sanitizer	web2py.gluon.sanitizer-module.html
web2py.gluon.sanitizer.sanitize	web2py.gluon.sanitizer-module.html#sanitize
web2py.gluon.sanitizer.xssescape	web2py.gluon.sanitizer-module.html#xssescape
web2py.gluon.serializers	web2py.gluon.serializers-module.html
web2py.gluon.serializers.xml	web2py.gluon.serializers-module.html#xml
web2py.gluon.serializers.custom_json	web2py.gluon.serializers-module.html#custom_json
web2py.gluon.serializers.xml_rec	web2py.gluon.serializers-module.html#xml_rec
web2py.gluon.serializers.json	web2py.gluon.serializers-module.html#json
web2py.gluon.serializers.xmlescape	web2py.gluon.html-module.html#xmlescape
web2py.gluon.serializers.csv	web2py.gluon.serializers-module.html#csv
web2py.gluon.serializers.rss	web2py.gluon.serializers-module.html#rss
web2py.gluon.settings	web2py.gluon.settings-module.html
web2py.gluon.settings.global_settings	web2py.gluon.settings-module.html#global_settings
web2py.gluon.settings.settings	web2py.gluon.settings-module.html#settings
web2py.gluon.shell	web2py.gluon.shell-module.html
web2py.gluon.shell.exec_environment	web2py.gluon.shell-module.html#exec_environment
web2py.gluon.shell.build_environment	web2py.gluon.compileapp-module.html#build_environment
web2py.gluon.shell.get_usage	web2py.gluon.shell-module.html#get_usage
web2py.gluon.shell.w2p_unpack	web2py.gluon.fileutils-module.html#w2p_unpack
web2py.gluon.shell.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.shell.exec_pythonrc	web2py.gluon.shell-module.html#exec_pythonrc
web2py.gluon.shell.execute_from_command_line	web2py.gluon.shell-module.html#execute_from_command_line
web2py.gluon.shell.parse_path_info	web2py.gluon.shell-module.html#parse_path_info
web2py.gluon.shell.env	web2py.gluon.shell-module.html#env
web2py.gluon.shell.test	web2py.gluon.shell-module.html#test
web2py.gluon.shell.logger	web2py.gluon.shell-module.html#logger
web2py.gluon.shell.run	web2py.gluon.shell-module.html#run
web2py.gluon.shell.read_pyc	web2py.gluon.compileapp-module.html#read_pyc
web2py.gluon.shell.die	web2py.gluon.shell-module.html#die
web2py.gluon.shell.run_models_in	web2py.gluon.compileapp-module.html#run_models_in
web2py.gluon.sql	web2py.gluon.sql-module.html
web2py.gluon.sql.drivers	web2py.gluon.sql-module.html#drivers
web2py.gluon.sqlhtml	web2py.gluon.sqlhtml-module.html
web2py.gluon.sqlhtml.table_field	web2py.gluon.sqlhtml-module.html#table_field
web2py.gluon.sqlhtml.safe_int	web2py.gluon.sqlhtml-module.html#safe_int
web2py.gluon.sqlhtml.form_factory	web2py.gluon.sqlhtml-module.html#form_factory
web2py.gluon.sqlhtml.represent	web2py.gluon.sqlhtml-module.html#represent
web2py.gluon.sqlhtml.safe_float	web2py.gluon.sqlhtml-module.html#safe_float
web2py.gluon.sqlhtml.Url	web2py.gluon.html-module.html#URL
web2py.gluon.sqlhtml.md5_hash	web2py.gluon.utils-module.html#md5_hash
web2py.gluon.sqlhtml.widget_class	web2py.gluon.sqlhtml-module.html#widget_class
web2py.gluon.storage	web2py.gluon.storage-module.html
web2py.gluon.storage.load_storage	web2py.gluon.storage-module.html#load_storage
web2py.gluon.storage.save_storage	web2py.gluon.storage-module.html#save_storage
web2py.gluon.streamer	web2py.gluon.streamer-module.html
web2py.gluon.streamer.contenttype	web2py.gluon.contenttype-module.html#contenttype
web2py.gluon.streamer.DEFAULT_CHUNK_SIZE	web2py.gluon.streamer-module.html#DEFAULT_CHUNK_SIZE
web2py.gluon.streamer.regex_start_range	web2py.gluon.streamer-module.html#regex_start_range
web2py.gluon.streamer.streamer	web2py.gluon.streamer-module.html#streamer
web2py.gluon.streamer.regex_stop_range	web2py.gluon.streamer-module.html#regex_stop_range
web2py.gluon.streamer.stream_file_or_304_or_206	web2py.gluon.streamer-module.html#stream_file_or_304_or_206
web2py.gluon.template	web2py.gluon.template-module.html
web2py.gluon.template.render	web2py.gluon.template-module.html#render
web2py.gluon.template.parse_template	web2py.gluon.template-module.html#parse_template
web2py.gluon.template.get_parsed	web2py.gluon.template-module.html#get_parsed
web2py.gluon.tools	web2py.gluon.tools-module.html
web2py.gluon.tools.validators	web2py.gluon.tools-module.html#validators
web2py.gluon.tools.geocode	web2py.gluon.tools-module.html#geocode
web2py.gluon.tools.logger	web2py.gluon.tools-module.html#logger
web2py.gluon.tools.regex_geocode	web2py.gluon.tools-module.html#regex_geocode
web2py.gluon.tools.ON	web2py.gluon.tools-module.html#ON
web2py.gluon.tools.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.tools.contenttype	web2py.gluon.contenttype-module.html#contenttype
web2py.gluon.tools.prettydate	web2py.gluon.tools-module.html#prettydate
web2py.gluon.tools.current	web2py.gluon.tools-module.html#current
web2py.gluon.tools.universal_caller	web2py.gluon.tools-module.html#universal_caller
web2py.gluon.tools.test_thread_separation	web2py.gluon.tools-module.html#test_thread_separation
web2py.gluon.tools.DEFAULT	web2py.gluon.tools-module.html#DEFAULT
web2py.gluon.tools.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.tools.TAG	web2py.gluon.tools-module.html#TAG
web2py.gluon.tools.completion	web2py.gluon.tools-module.html#completion
web2py.gluon.tools.fetch	web2py.gluon.tools-module.html#fetch
web2py.gluon.tools.call_or_redirect	web2py.gluon.tools-module.html#call_or_redirect
web2py.gluon.tools.addrow	web2py.gluon.tools-module.html#addrow
web2py.gluon.tools.callback	web2py.gluon.tools-module.html#callback
web2py.gluon.utils	web2py.gluon.utils-module.html
web2py.gluon.utils.initialize_urandom	web2py.gluon.utils-module.html#initialize_urandom
web2py.gluon.utils.ctokens	web2py.gluon.utils-module.html#ctokens
web2py.gluon.utils.hmac_hash	web2py.gluon.utils-module.html#hmac_hash
web2py.gluon.utils.get_digest	web2py.gluon.utils-module.html#get_digest
web2py.gluon.utils.web2py_uuid	web2py.gluon.utils-module.html#web2py_uuid
web2py.gluon.utils.md5_hash	web2py.gluon.utils-module.html#md5_hash
web2py.gluon.utils.logger	web2py.gluon.utils-module.html#logger
web2py.gluon.utils.simple_hash	web2py.gluon.utils-module.html#simple_hash
web2py.gluon.validators	web2py.gluon.validators-module.html
web2py.gluon.validators.unicode_to_ascii_url	web2py.gluon.validators-module.html#unicode_to_ascii_url
web2py.gluon.validators.unofficial_url_schemes	web2py.gluon.validators-module.html#unofficial_url_schemes
web2py.gluon.validators.http_schemes	web2py.gluon.validators-module.html#http_schemes
web2py.gluon.validators.regex1	web2py.gluon.validators-module.html#regex1
web2py.gluon.validators.regex2	web2py.gluon.validators-module.html#regex2
web2py.gluon.validators.simple_hash	web2py.gluon.utils-module.html#simple_hash
web2py.gluon.validators.hmac_hash	web2py.gluon.utils-module.html#hmac_hash
web2py.gluon.validators.unicode_to_ascii_authority	web2py.gluon.validators-module.html#unicode_to_ascii_authority
web2py.gluon.validators.regex_time	web2py.gluon.validators-module.html#regex_time
web2py.gluon.validators.label_split_regex	web2py.gluon.validators-module.html#label_split_regex
web2py.gluon.validators.url_split_regex	web2py.gluon.validators-module.html#url_split_regex
web2py.gluon.validators.all_url_schemes	web2py.gluon.validators-module.html#all_url_schemes
web2py.gluon.validators.official_url_schemes	web2py.gluon.validators-module.html#official_url_schemes
web2py.gluon.validators.is_empty	web2py.gluon.validators-module.html#is_empty
web2py.gluon.validators.urlify	web2py.gluon.validators-module.html#urlify
web2py.gluon.validators.translate	web2py.gluon.validators-module.html#translate
web2py.gluon.validators.options_sorter	web2py.gluon.validators-module.html#options_sorter
web2py.gluon.validators.escape_unicode	web2py.gluon.validators-module.html#escape_unicode
web2py.gluon.validators.official_top_level_domains	web2py.gluon.validators-module.html#official_top_level_domains
web2py.gluon.widget	web2py.gluon.widget-module.html
web2py.gluon.widget.ProgramAuthor	web2py.gluon.widget-module.html#ProgramAuthor
web2py.gluon.widget.try_start_browser	web2py.gluon.widget-module.html#try_start_browser
web2py.gluon.widget.read_file	web2py.gluon.fileutils-module.html#read_file
web2py.gluon.widget.write_file	web2py.gluon.fileutils-module.html#write_file
web2py.gluon.widget.run	web2py.gluon.shell-module.html#run
web2py.gluon.widget.console	web2py.gluon.widget-module.html#console
web2py.gluon.widget.ProgramVersion	web2py.gluon.widget-module.html#ProgramVersion
web2py.gluon.widget.start	web2py.gluon.widget-module.html#start
web2py.gluon.widget.w2p_pack	web2py.gluon.fileutils-module.html#w2p_pack
web2py.gluon.widget.test	web2py.gluon.shell-module.html#test
web2py.gluon.widget.logger	web2py.gluon.widget-module.html#logger
web2py.gluon.widget.presentation	web2py.gluon.widget-module.html#presentation
web2py.gluon.widget.msg	web2py.gluon.widget-module.html#msg
web2py.gluon.widget.start_browser	web2py.gluon.widget-module.html#start_browser
web2py.gluon.widget.ProgramName	web2py.gluon.widget-module.html#ProgramName
web2py.gluon.widget.ProgramInfo	web2py.gluon.widget-module.html#ProgramInfo
web2py.gluon.winservice	web2py.gluon.winservice-module.html
web2py.gluon.winservice.web2py_windows_service_handler	web2py.gluon.winservice-module.html#web2py_windows_service_handler
web2py.gluon.xmlrpc	web2py.gluon.xmlrpc-module.html
web2py.gluon.xmlrpc.handler	web2py.gluon.xmlrpc-module.html#handler
datetime.date	datetime.date-class.html
datetime.date.__str__	datetime.date-class.html#__str__
datetime.date.__getattribute__	datetime.date-class.html#__getattribute__
datetime.date.__radd__	datetime.date-class.html#__radd__
datetime.date.toordinal	datetime.date-class.html#toordinal
datetime.date.__rsub__	datetime.date-class.html#__rsub__
datetime.date.year	datetime.date-class.html#year
datetime.date.__lt__	datetime.date-class.html#__lt__
datetime.date.isocalendar	datetime.date-class.html#isocalendar
datetime.date.__new__	datetime.date-class.html#__new__
datetime.date.min	datetime.date-class.html#min
datetime.date.strftime	datetime.date-class.html#strftime
datetime.date.timetuple	datetime.date-class.html#timetuple
datetime.date.today	datetime.date-class.html#today
datetime.date.__repr__	datetime.date-class.html#__repr__
datetime.date.isoformat	datetime.date-class.html#isoformat
datetime.date.__ne__	datetime.date-class.html#__ne__
datetime.date.month	datetime.date-class.html#month
datetime.date.max	datetime.date-class.html#max
datetime.date.isoweekday	datetime.date-class.html#isoweekday
datetime.date.__add__	datetime.date-class.html#__add__
datetime.date.__gt__	datetime.date-class.html#__gt__
datetime.date.__reduce__	datetime.date-class.html#__reduce__
datetime.date.replace	datetime.date-class.html#replace
datetime.date.__eq__	datetime.date-class.html#__eq__
datetime.date.day	datetime.date-class.html#day
datetime.date.ctime	datetime.date-class.html#ctime
datetime.date.fromordinal	datetime.date-class.html#fromordinal
datetime.date.fromtimestamp	datetime.date-class.html#fromtimestamp
datetime.date.__le__	datetime.date-class.html#__le__
datetime.date.weekday	datetime.date-class.html#weekday
datetime.date.__hash__	datetime.date-class.html#__hash__
datetime.date.__sub__	datetime.date-class.html#__sub__
datetime.date.resolution	datetime.date-class.html#resolution
datetime.date.__ge__	datetime.date-class.html#__ge__
datetime.datetime	datetime.datetime-class.html
datetime.date.weekday	datetime.date-class.html#weekday
datetime.datetime.__rsub__	datetime.datetime-class.html#__rsub__
datetime.datetime.__str__	datetime.datetime-class.html#__str__
datetime.datetime.__reduce__	datetime.datetime-class.html#__reduce__
datetime.datetime.__radd__	datetime.datetime-class.html#__radd__
datetime.datetime.utctimetuple	datetime.datetime-class.html#utctimetuple
datetime.datetime.second	datetime.datetime-class.html#second
datetime.date.toordinal	datetime.date-class.html#toordinal
datetime.datetime.utcnow	datetime.datetime-class.html#utcnow
datetime.date.year	datetime.date-class.html#year
datetime.datetime.__lt__	datetime.datetime-class.html#__lt__
datetime.date.isocalendar	datetime.date-class.html#isocalendar
datetime.datetime.now	datetime.datetime-class.html#now
datetime.datetime.__new__	datetime.datetime-class.html#__new__
datetime.datetime.min	datetime.datetime-class.html#min
datetime.datetime.dst	datetime.datetime-class.html#dst
datetime.datetime.astimezone	datetime.datetime-class.html#astimezone
datetime.datetime.strptime	datetime.datetime-class.html#strptime
datetime.datetime.utcfromtimestamp	datetime.datetime-class.html#utcfromtimestamp
datetime.date.strftime	datetime.date-class.html#strftime
datetime.datetime.combine	datetime.datetime-class.html#combine
datetime.datetime.timetuple	datetime.datetime-class.html#timetuple
datetime.datetime.max	datetime.datetime-class.html#max
datetime.datetime.tzinfo	datetime.datetime-class.html#tzinfo
datetime.date.today	datetime.date-class.html#today
datetime.datetime.__repr__	datetime.datetime-class.html#__repr__
datetime.datetime.__ne__	datetime.datetime-class.html#__ne__
datetime.date.month	datetime.date-class.html#month
datetime.datetime.__getattribute__	datetime.datetime-class.html#__getattribute__
datetime.date.isoweekday	datetime.date-class.html#isoweekday
datetime.datetime.replace	datetime.datetime-class.html#replace
datetime.datetime.utcoffset	datetime.datetime-class.html#utcoffset
datetime.datetime.microsecond	datetime.datetime-class.html#microsecond
datetime.datetime.__add__	datetime.datetime-class.html#__add__
datetime.datetime.__gt__	datetime.datetime-class.html#__gt__
datetime.datetime.date	datetime.datetime-class.html#date
datetime.datetime.isoformat	datetime.datetime-class.html#isoformat
datetime.datetime.__eq__	datetime.datetime-class.html#__eq__
datetime.date.day	datetime.date-class.html#day
datetime.datetime.minute	datetime.datetime-class.html#minute
datetime.datetime.ctime	datetime.datetime-class.html#ctime
datetime.datetime.hour	datetime.datetime-class.html#hour
datetime.date.fromordinal	datetime.date-class.html#fromordinal
datetime.datetime.fromtimestamp	datetime.datetime-class.html#fromtimestamp
datetime.datetime.__le__	datetime.datetime-class.html#__le__
datetime.datetime.tzname	datetime.datetime-class.html#tzname
datetime.datetime.time	datetime.datetime-class.html#time
datetime.datetime.__hash__	datetime.datetime-class.html#__hash__
datetime.datetime.__sub__	datetime.datetime-class.html#__sub__
datetime.datetime.timetz	datetime.datetime-class.html#timetz
datetime.datetime.resolution	datetime.datetime-class.html#resolution
datetime.datetime.__ge__	datetime.datetime-class.html#__ge__
datetime.time	datetime.time-class.html
datetime.time.__str__	datetime.time-class.html#__str__
datetime.time.__getattribute__	datetime.time-class.html#__getattribute__
datetime.time.isoformat	datetime.time-class.html#isoformat
datetime.time.second	datetime.time-class.html#second
datetime.time.__lt__	datetime.time-class.html#__lt__
datetime.time.__new__	datetime.time-class.html#__new__
datetime.time.min	datetime.time-class.html#min
datetime.time.dst	datetime.time-class.html#dst
datetime.time.strftime	datetime.time-class.html#strftime
datetime.time.tzinfo	datetime.time-class.html#tzinfo
datetime.time.__repr__	datetime.time-class.html#__repr__
datetime.time.__ne__	datetime.time-class.html#__ne__
datetime.time.max	datetime.time-class.html#max
datetime.time.utcoffset	datetime.time-class.html#utcoffset
datetime.time.microsecond	datetime.time-class.html#microsecond
datetime.time.__gt__	datetime.time-class.html#__gt__
datetime.time.__reduce__	datetime.time-class.html#__reduce__
datetime.time.replace	datetime.time-class.html#replace
datetime.time.__eq__	datetime.time-class.html#__eq__
datetime.time.minute	datetime.time-class.html#minute
datetime.time.__nonzero__	datetime.time-class.html#__nonzero__
datetime.time.hour	datetime.time-class.html#hour
datetime.time.__le__	datetime.time-class.html#__le__
datetime.time.tzname	datetime.time-class.html#tzname
datetime.time.__hash__	datetime.time-class.html#__hash__
datetime.time.resolution	datetime.time-class.html#resolution
datetime.time.__ge__	datetime.time-class.html#__ge__
exceptions.Exception	exceptions.Exception-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
psycopg2.DataError	psycopg2.DataError-class.html
psycopg2.DatabaseError	psycopg2.DatabaseError-class.html
psycopg2.Error	psycopg2.Error-class.html
psycopg2.IntegrityError	psycopg2.IntegrityError-class.html
psycopg2.InterfaceError	psycopg2.InterfaceError-class.html
psycopg2.InternalError	psycopg2.InternalError-class.html
psycopg2.NotSupportedError	psycopg2.NotSupportedError-class.html
psycopg2.OperationalError	psycopg2.OperationalError-class.html
psycopg2.ProgrammingError	psycopg2.ProgrammingError-class.html
psycopg2.Warning	psycopg2.Warning-class.html
psycopg2.tz.FixedOffsetTimezone	psycopg2.tz.FixedOffsetTimezone-class.html
psycopg2.tz.FixedOffsetTimezone.dst	psycopg2.tz.FixedOffsetTimezone-class.html#dst
psycopg2.tz.FixedOffsetTimezone._name	psycopg2.tz.FixedOffsetTimezone-class.html#_name
psycopg2.tz.FixedOffsetTimezone._offset	psycopg2.tz.FixedOffsetTimezone-class.html#_offset
psycopg2.tz.FixedOffsetTimezone.utcoffset	psycopg2.tz.FixedOffsetTimezone-class.html#utcoffset
psycopg2.tz.FixedOffsetTimezone.tzname	psycopg2.tz.FixedOffsetTimezone-class.html#tzname
psycopg2.tz.FixedOffsetTimezone.__init__	psycopg2.tz.FixedOffsetTimezone-class.html#__init__
psycopg2.tz.LocalTimezone	psycopg2.tz.LocalTimezone-class.html
psycopg2.tz.LocalTimezone._isdst	psycopg2.tz.LocalTimezone-class.html#_isdst
psycopg2.tz.LocalTimezone.utcoffset	psycopg2.tz.LocalTimezone-class.html#utcoffset
psycopg2.tz.LocalTimezone.tzname	psycopg2.tz.LocalTimezone-class.html#tzname
psycopg2.tz.LocalTimezone.dst	psycopg2.tz.LocalTimezone-class.html#dst
web2py.gluon.cache.Cache	web2py.gluon.cache.Cache-class.html
web2py.gluon.cache.Cache.__call__	web2py.gluon.cache.Cache-class.html#__call__
web2py.gluon.cache.Cache.__init__	web2py.gluon.cache.Cache-class.html#__init__
web2py.gluon.cache.CacheAbstract	web2py.gluon.cache.CacheAbstract-class.html
web2py.gluon.cache.CacheAbstract._clear	web2py.gluon.cache.CacheAbstract-class.html#_clear
web2py.gluon.cache.CacheAbstract.clear	web2py.gluon.cache.CacheAbstract-class.html#clear
web2py.gluon.cache.CacheAbstract.increment	web2py.gluon.cache.CacheAbstract-class.html#increment
web2py.gluon.cache.CacheAbstract.__call__	web2py.gluon.cache.CacheAbstract-class.html#__call__
web2py.gluon.cache.CacheAbstract.cache_stats_name	web2py.gluon.cache.CacheAbstract-class.html#cache_stats_name
web2py.gluon.cache.CacheAbstract.__init__	web2py.gluon.cache.CacheAbstract-class.html#__init__
web2py.gluon.cache.CacheInRam	web2py.gluon.cache.CacheInRam-class.html
web2py.gluon.cache.CacheInRam.meta_storage	web2py.gluon.cache.CacheInRam-class.html#meta_storage
web2py.gluon.cache.CacheAbstract._clear	web2py.gluon.cache.CacheAbstract-class.html#_clear
web2py.gluon.cache.CacheInRam.clear	web2py.gluon.cache.CacheInRam-class.html#clear
web2py.gluon.cache.CacheInRam.locker	web2py.gluon.cache.CacheInRam-class.html#locker
web2py.gluon.cache.CacheInRam.increment	web2py.gluon.cache.CacheInRam-class.html#increment
web2py.gluon.cache.CacheInRam.__call__	web2py.gluon.cache.CacheInRam-class.html#__call__
web2py.gluon.cache.CacheAbstract.cache_stats_name	web2py.gluon.cache.CacheAbstract-class.html#cache_stats_name
web2py.gluon.cache.CacheInRam.__init__	web2py.gluon.cache.CacheInRam-class.html#__init__
web2py.gluon.cache.CacheOnDisk	web2py.gluon.cache.CacheOnDisk-class.html
web2py.gluon.cache.CacheAbstract._clear	web2py.gluon.cache.CacheAbstract-class.html#_clear
web2py.gluon.cache.CacheOnDisk.clear	web2py.gluon.cache.CacheOnDisk-class.html#clear
web2py.gluon.cache.CacheOnDisk.__call__	web2py.gluon.cache.CacheOnDisk-class.html#__call__
web2py.gluon.cache.CacheOnDisk.increment	web2py.gluon.cache.CacheOnDisk-class.html#increment
web2py.gluon.cache.CacheOnDisk.speedup_checks	web2py.gluon.cache.CacheOnDisk-class.html#speedup_checks
web2py.gluon.cache.CacheAbstract.cache_stats_name	web2py.gluon.cache.CacheAbstract-class.html#cache_stats_name
web2py.gluon.cache.CacheOnDisk.__init__	web2py.gluon.cache.CacheOnDisk-class.html#__init__
web2py.gluon.compileapp.LoadFactory	web2py.gluon.compileapp.LoadFactory-class.html
web2py.gluon.compileapp.LoadFactory.__call__	web2py.gluon.compileapp.LoadFactory-class.html#__call__
web2py.gluon.compileapp.LoadFactory.__init__	web2py.gluon.compileapp.LoadFactory-class.html#__init__
web2py.gluon.compileapp.mybuiltin	web2py.gluon.compileapp.mybuiltin-class.html
web2py.gluon.compileapp.mybuiltin.__getitem__	web2py.gluon.compileapp.mybuiltin-class.html#__getitem__
web2py.gluon.compileapp.mybuiltin.__setitem__	web2py.gluon.compileapp.mybuiltin-class.html#__setitem__
web2py.gluon.contrib.pymysql.DBAPISet	web2py.gluon.contrib.pymysql.DBAPISet-class.html
web2py.gluon.contrib.pymysql.DBAPISet.__ne__	web2py.gluon.contrib.pymysql.DBAPISet-class.html#__ne__
web2py.gluon.contrib.pymysql.DBAPISet.__eq__	web2py.gluon.contrib.pymysql.DBAPISet-class.html#__eq__
web2py.gluon.contrib.pymysql.DBAPISet.__hash__	web2py.gluon.contrib.pymysql.DBAPISet-class.html#__hash__
web2py.gluon.contrib.pymysql.err.DataError	web2py.gluon.contrib.pymysql.err.DataError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.DatabaseError	web2py.gluon.contrib.pymysql.err.DatabaseError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.Error	web2py.gluon.contrib.pymysql.err.Error-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.IntegrityError	web2py.gluon.contrib.pymysql.err.IntegrityError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.InterfaceError	web2py.gluon.contrib.pymysql.err.InterfaceError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.InternalError	web2py.gluon.contrib.pymysql.err.InternalError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.NotSupportedError	web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.OperationalError	web2py.gluon.contrib.pymysql.err.OperationalError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.ProgrammingError	web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.contrib.pymysql.err.Warning	web2py.gluon.contrib.pymysql.err.Warning-class.html
web2py.gluon.custom_import._BaseImporter	web2py.gluon.custom_import._BaseImporter-class.html
web2py.gluon.custom_import._BaseImporter.begin	web2py.gluon.custom_import._BaseImporter-class.html#begin
web2py.gluon.custom_import._BaseImporter.end	web2py.gluon.custom_import._BaseImporter-class.html#end
web2py.gluon.custom_import._BaseImporter.__call__	web2py.gluon.custom_import._BaseImporter-class.html#__call__
web2py.gluon.custom_import._DateTrackerImporter	web2py.gluon.custom_import._DateTrackerImporter-class.html
web2py.gluon.custom_import._DateTrackerImporter._get_module_file	web2py.gluon.custom_import._DateTrackerImporter-class.html#_get_module_file
web2py.gluon.custom_import._DateTrackerImporter.begin	web2py.gluon.custom_import._DateTrackerImporter-class.html#begin
web2py.gluon.custom_import._DateTrackerImporter.end	web2py.gluon.custom_import._DateTrackerImporter-class.html#end
web2py.gluon.custom_import._DateTrackerImporter._update_dates	web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates
web2py.gluon.custom_import._DateTrackerImporter._PACKAGE_PATH_SUFFIX	web2py.gluon.custom_import._DateTrackerImporter-class.html#_PACKAGE_PATH_SUFFIX
web2py.gluon.custom_import._DateTrackerImporter.__call__	web2py.gluon.custom_import._DateTrackerImporter-class.html#__call__
web2py.gluon.custom_import._DateTrackerImporter._reload_check	web2py.gluon.custom_import._DateTrackerImporter-class.html#_reload_check
web2py.gluon.custom_import._DateTrackerImporter.__init__	web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__
web2py.gluon.custom_import._Web2pyDateTrackerImporter	web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html
web2py.gluon.custom_import._Web2pyImporter._matchAppDir	web2py.gluon.custom_import._Web2pyImporter-class.html#_matchAppDir
web2py.gluon.custom_import._Web2pyImporter._Web2pyImporter__import__dot	web2py.gluon.custom_import._Web2pyImporter-class.html#_Web2pyImporter__import__dot
web2py.gluon.custom_import._DateTrackerImporter.begin	web2py.gluon.custom_import._DateTrackerImporter-class.html#begin
web2py.gluon.custom_import._DateTrackerImporter.end	web2py.gluon.custom_import._DateTrackerImporter-class.html#end
web2py.gluon.custom_import._DateTrackerImporter._get_module_file	web2py.gluon.custom_import._DateTrackerImporter-class.html#_get_module_file
web2py.gluon.custom_import._DateTrackerImporter._update_dates	web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates
web2py.gluon.custom_import._DateTrackerImporter._PACKAGE_PATH_SUFFIX	web2py.gluon.custom_import._DateTrackerImporter-class.html#_PACKAGE_PATH_SUFFIX
web2py.gluon.custom_import._Web2pyImporter._RE_ESCAPED_PATH_SEP	web2py.gluon.custom_import._Web2pyImporter-class.html#_RE_ESCAPED_PATH_SEP
web2py.gluon.custom_import._Web2pyImporter.__call__	web2py.gluon.custom_import._Web2pyImporter-class.html#__call__
web2py.gluon.custom_import._DateTrackerImporter._reload_check	web2py.gluon.custom_import._DateTrackerImporter-class.html#_reload_check
web2py.gluon.custom_import._Web2pyImporter.__init__	web2py.gluon.custom_import._Web2pyImporter-class.html#__init__
web2py.gluon.custom_import._Web2pyImporter	web2py.gluon.custom_import._Web2pyImporter-class.html
web2py.gluon.custom_import._Web2pyImporter._matchAppDir	web2py.gluon.custom_import._Web2pyImporter-class.html#_matchAppDir
web2py.gluon.custom_import._Web2pyImporter._Web2pyImporter__import__dot	web2py.gluon.custom_import._Web2pyImporter-class.html#_Web2pyImporter__import__dot
web2py.gluon.custom_import._BaseImporter.begin	web2py.gluon.custom_import._BaseImporter-class.html#begin
web2py.gluon.custom_import._BaseImporter.end	web2py.gluon.custom_import._BaseImporter-class.html#end
web2py.gluon.custom_import._Web2pyImporter.__import__dot	web2py.gluon.custom_import._Web2pyImporter-class.html#__import__dot
web2py.gluon.custom_import._Web2pyImporter._RE_ESCAPED_PATH_SEP	web2py.gluon.custom_import._Web2pyImporter-class.html#_RE_ESCAPED_PATH_SEP
web2py.gluon.custom_import._Web2pyImporter.__call__	web2py.gluon.custom_import._Web2pyImporter-class.html#__call__
web2py.gluon.custom_import._Web2pyImporter.__init__	web2py.gluon.custom_import._Web2pyImporter-class.html#__init__
web2py.gluon.dal.BaseAdapter	web2py.gluon.dal.BaseAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.BaseAdapter.__init__	web2py.gluon.dal.BaseAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.BaseAdapter.RANDOM	web2py.gluon.dal.BaseAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.BaseAdapter.driver	web2py.gluon.dal.BaseAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.types	web2py.gluon.dal.BaseAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.BaseAdapter.lastrowid	web2py.gluon.dal.BaseAdapter-class.html#lastrowid
web2py.gluon.dal.ConnectionPool	web2py.gluon.dal.ConnectionPool-class.html
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.CouchDBAdapter	web2py.gluon.dal.CouchDBAdapter-class.html
web2py.gluon.dal.CouchDBAdapter.represent	web2py.gluon.dal.CouchDBAdapter-class.html#represent
web2py.gluon.dal.NoSQLAdapter.log_execute	web2py.gluon.dal.NoSQLAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.NoSQLAdapter.SUB	web2py.gluon.dal.NoSQLAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.NoSQLAdapter.LEFT_JOIN	web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.NoSQLAdapter.distributed_transaction_begin	web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.NoSQLAdapter.rollback	web2py.gluon.dal.NoSQLAdapter-class.html#rollback
web2py.gluon.dal.NoSQLAdapter.ON	web2py.gluon.dal.NoSQLAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.NoSQLAdapter.integrity_error_class	web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.CouchDBAdapter._select	web2py.gluon.dal.CouchDBAdapter-class.html#_select
web2py.gluon.dal.CouchDBAdapter.insert	web2py.gluon.dal.CouchDBAdapter-class.html#insert
web2py.gluon.dal.NoSQLAdapter.execute	web2py.gluon.dal.NoSQLAdapter-class.html#execute
web2py.gluon.dal.NoSQLAdapter.drop	web2py.gluon.dal.NoSQLAdapter-class.html#drop
web2py.gluon.dal.NoSQLAdapter.migrate_table	web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table
web2py.gluon.dal.NoSQLAdapter.concat_add	web2py.gluon.dal.NoSQLAdapter-class.html#concat_add
web2py.gluon.dal.NoSQLAdapter._insert	web2py.gluon.dal.NoSQLAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.CouchDBAdapter.OR	web2py.gluon.dal.CouchDBAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.NoSQLAdapter.close	web2py.gluon.dal.NoSQLAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.NoSQLAdapter.rowslice	web2py.gluon.dal.NoSQLAdapter-class.html#rowslice
web2py.gluon.dal.NoSQLAdapter.create_sequence_and_triggers	web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.NoSQLAdapter.rollback_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.NoSQLAdapter.commit_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared
web2py.gluon.dal.CouchDBAdapter.EQ	web2py.gluon.dal.CouchDBAdapter-class.html#EQ
web2py.gluon.dal.CouchDBAdapter.AND	web2py.gluon.dal.CouchDBAdapter-class.html#AND
web2py.gluon.dal.CouchDBAdapter.uploads_in_blob	web2py.gluon.dal.CouchDBAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.NoSQLAdapter.commit	web2py.gluon.dal.NoSQLAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.NoSQLAdapter.STARTSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH
web2py.gluon.dal.NoSQLAdapter.to_unicode	web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.NoSQLAdapter._delete	web2py.gluon.dal.NoSQLAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.NoSQLAdapter.MUL	web2py.gluon.dal.NoSQLAdapter-class.html#MUL
web2py.gluon.dal.CouchDBAdapter.select	web2py.gluon.dal.CouchDBAdapter-class.html#select
web2py.gluon.dal.NoSQLAdapter.PRIMARY_KEY	web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.NoSQLAdapter.prepare	web2py.gluon.dal.NoSQLAdapter-class.html#prepare
web2py.gluon.dal.CouchDBAdapter.NE	web2py.gluon.dal.CouchDBAdapter-class.html#NE
web2py.gluon.dal.NoSQLAdapter.SUBSTRING	web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.CouchDBAdapter.expand	web2py.gluon.dal.CouchDBAdapter-class.html#expand
web2py.gluon.dal.NoSQLAdapter.EXTRACT	web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.NoSQLAdapter.represent_exceptions	web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.NoSQLAdapter.ADD	web2py.gluon.dal.NoSQLAdapter-class.html#ADD
web2py.gluon.dal.CouchDBAdapter.count	web2py.gluon.dal.CouchDBAdapter-class.html#count
web2py.gluon.dal.NoSQLAdapter.UPPER	web2py.gluon.dal.NoSQLAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.NoSQLAdapter.LIKE	web2py.gluon.dal.NoSQLAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.CouchDBAdapter.file_exists	web2py.gluon.dal.CouchDBAdapter-class.html#file_exists
web2py.gluon.dal.CouchDBAdapter.delete	web2py.gluon.dal.CouchDBAdapter-class.html#delete
web2py.gluon.dal.NoSQLAdapter.LOWER	web2py.gluon.dal.NoSQLAdapter-class.html#LOWER
web2py.gluon.dal.NoSQLAdapter._update	web2py.gluon.dal.NoSQLAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.NoSQLAdapter.ENDSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH
web2py.gluon.dal.NoSQLAdapter.constraint_name	web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name
web2py.gluon.dal.NoSQLAdapter.DIV	web2py.gluon.dal.NoSQLAdapter-class.html#DIV
web2py.gluon.dal.CouchDBAdapter.__init__	web2py.gluon.dal.CouchDBAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.CouchDBAdapter.file_open	web2py.gluon.dal.CouchDBAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.CouchDBAdapter.COMMA	web2py.gluon.dal.CouchDBAdapter-class.html#COMMA
web2py.gluon.dal.CouchDBAdapter.create_table	web2py.gluon.dal.CouchDBAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.NoSQLAdapter.AGGREGATE	web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE
web2py.gluon.dal.CouchDBAdapter.file_close	web2py.gluon.dal.CouchDBAdapter-class.html#file_close
web2py.gluon.dal.NoSQLAdapter.RANDOM	web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.BaseAdapter.driver	web2py.gluon.dal.BaseAdapter-class.html#driver
web2py.gluon.dal.CouchDBAdapter.update	web2py.gluon.dal.CouchDBAdapter-class.html#update
web2py.gluon.dal.NoSQLAdapter.AS	web2py.gluon.dal.NoSQLAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.CouchDBAdapter.types	web2py.gluon.dal.CouchDBAdapter-class.html#types
web2py.gluon.dal.NoSQLAdapter._count	web2py.gluon.dal.NoSQLAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.NoSQLAdapter.alias	web2py.gluon.dal.NoSQLAdapter-class.html#alias
web2py.gluon.dal.NoSQLAdapter.lastrowid	web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid
web2py.gluon.dal.CubridAdapter	web2py.gluon.dal.CubridAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.MySQLAdapter.distributed_transaction_begin	web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.MySQLAdapter.maxcharlength	web2py.gluon.dal.MySQLAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.MySQLAdapter._drop	web2py.gluon.dal.MySQLAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.MySQLAdapter.concat_add	web2py.gluon.dal.MySQLAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.MySQLAdapter.support_distributed_transaction	web2py.gluon.dal.MySQLAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.MySQLAdapter.rollback_prepared	web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.MySQLAdapter.commit_prepared	web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.MySQLAdapter.prepare	web2py.gluon.dal.MySQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.MySQLAdapter.SUBSTRING	web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.MySQLAdapter.commit_on_alter_table	web2py.gluon.dal.MySQLAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.CubridAdapter.__init__	web2py.gluon.dal.CubridAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.MySQLAdapter.RANDOM	web2py.gluon.dal.MySQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.CubridAdapter.driver	web2py.gluon.dal.CubridAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.MySQLAdapter.types	web2py.gluon.dal.MySQLAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.MySQLAdapter.lastrowid	web2py.gluon.dal.MySQLAdapter-class.html#lastrowid
web2py.gluon.dal.DAL	web2py.gluon.dal.DAL-class.html
web2py.gluon.dal.DAL.Field	web2py.gluon.dal.Field-class.html
web2py.gluon.dal.DAL.set_folder	web2py.gluon.dal.DAL-class.html#set_folder
web2py.gluon.dal.DAL.__init__	web2py.gluon.dal.DAL-class.html#__init__
web2py.gluon.dal.DAL.import_from_csv_file	web2py.gluon.dal.DAL-class.html#import_from_csv_file
web2py.gluon.dal.DAL.__setattr__	web2py.gluon.dal.DAL-class.html#__setattr__
web2py.gluon.dal.DAL._update_referenced_by	web2py.gluon.dal.DAL-class.html#_update_referenced_by
web2py.gluon.dal.DAL.parse_as_rest	web2py.gluon.dal.DAL-class.html#parse_as_rest
web2py.gluon.dal.DAL.export_to_csv_file	web2py.gluon.dal.DAL-class.html#export_to_csv_file
web2py.gluon.dal.DAL.define_table	web2py.gluon.dal.DAL-class.html#define_table
web2py.gluon.dal.DAL.__getattr__	web2py.gluon.dal.DAL-class.html#__getattr__
web2py.gluon.dal.DAL.__call__	web2py.gluon.dal.DAL-class.html#__call__
web2py.gluon.dal.DAL.import_table_definitions	web2py.gluon.dal.DAL-class.html#import_table_definitions
web2py.gluon.dal.DAL.distributed_transaction_begin	web2py.gluon.dal.DAL-class.html#distributed_transaction_begin
web2py.gluon.dal.DAL.rollback	web2py.gluon.dal.DAL-class.html#rollback
web2py.gluon.dal.DAL.__getitem__	web2py.gluon.dal.DAL-class.html#__getitem__
web2py.gluon.dal.DAL.executesql	web2py.gluon.dal.DAL-class.html#executesql
web2py.gluon.dal.DAL.distributed_transaction_commit	web2py.gluon.dal.DAL-class.html#distributed_transaction_commit
web2py.gluon.dal.DAL.check_reserved_keyword	web2py.gluon.dal.DAL-class.html#check_reserved_keyword
web2py.gluon.dal.DAL.__setitem__	web2py.gluon.dal.DAL-class.html#__setitem__
web2py.gluon.dal.DAL.commit	web2py.gluon.dal.DAL-class.html#commit
web2py.gluon.dal.DAL.__contains__	web2py.gluon.dal.DAL-class.html#__contains__
web2py.gluon.dal.DAL.__iter__	web2py.gluon.dal.DAL-class.html#__iter__
web2py.gluon.dal.DAL.__repr__	web2py.gluon.dal.DAL-class.html#__repr__
web2py.gluon.dal.DAL.Table	web2py.gluon.dal.Table-class.html
web2py.gluon.dal.DB2Adapter	web2py.gluon.dal.DB2Adapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.DB2Adapter.select_limitby	web2py.gluon.dal.DB2Adapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.DB2Adapter.LEFT_JOIN	web2py.gluon.dal.DB2Adapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.DB2Adapter.execute	web2py.gluon.dal.DB2Adapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.DB2Adapter.rowslice	web2py.gluon.dal.DB2Adapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.DB2Adapter.types	web2py.gluon.dal.DB2Adapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.DB2Adapter.represent_exceptions	web2py.gluon.dal.DB2Adapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.DB2Adapter.__init__	web2py.gluon.dal.DB2Adapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.DB2Adapter.RANDOM	web2py.gluon.dal.DB2Adapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.DB2Adapter.driver	web2py.gluon.dal.DB2Adapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.DB2Adapter.lastrowid	web2py.gluon.dal.DB2Adapter-class.html#lastrowid
web2py.gluon.dal.DatabaseStoredFile	web2py.gluon.dal.DatabaseStoredFile-class.html
web2py.gluon.dal.DatabaseStoredFile.exists	web2py.gluon.dal.DatabaseStoredFile-class.html#exists
web2py.gluon.dal.DatabaseStoredFile.read	web2py.gluon.dal.DatabaseStoredFile-class.html#read
web2py.gluon.dal.DatabaseStoredFile.write	web2py.gluon.dal.DatabaseStoredFile-class.html#write
web2py.gluon.dal.DatabaseStoredFile.web2py_filesystem	web2py.gluon.dal.DatabaseStoredFile-class.html#web2py_filesystem
web2py.gluon.dal.DatabaseStoredFile.close	web2py.gluon.dal.DatabaseStoredFile-class.html#close
web2py.gluon.dal.DatabaseStoredFile.readline	web2py.gluon.dal.DatabaseStoredFile-class.html#readline
web2py.gluon.dal.DatabaseStoredFile.__init__	web2py.gluon.dal.DatabaseStoredFile-class.html#__init__
web2py.gluon.dal.Expression	web2py.gluon.dal.Expression-class.html
web2py.gluon.dal.Expression.upper	web2py.gluon.dal.Expression-class.html#upper
web2py.gluon.dal.Expression.__getslice__	web2py.gluon.dal.Expression-class.html#__getslice__
web2py.gluon.dal.Expression.coalesce_zero	web2py.gluon.dal.Expression-class.html#coalesce_zero
web2py.gluon.dal.Expression.__str__	web2py.gluon.dal.Expression-class.html#__str__
web2py.gluon.dal.Expression.month	web2py.gluon.dal.Expression-class.html#month
web2py.gluon.dal.Expression.endswith	web2py.gluon.dal.Expression-class.html#endswith
web2py.gluon.dal.Expression.year	web2py.gluon.dal.Expression-class.html#year
web2py.gluon.dal.Expression.__lt__	web2py.gluon.dal.Expression-class.html#__lt__
web2py.gluon.dal.Expression.__init__	web2py.gluon.dal.Expression-class.html#__init__
web2py.gluon.dal.Expression.__invert__	web2py.gluon.dal.Expression-class.html#__invert__
web2py.gluon.dal.Expression.min	web2py.gluon.dal.Expression-class.html#min
web2py.gluon.dal.Expression.sum	web2py.gluon.dal.Expression-class.html#sum
web2py.gluon.dal.Expression.contains	web2py.gluon.dal.Expression-class.html#contains
web2py.gluon.dal.Expression.belongs	web2py.gluon.dal.Expression-class.html#belongs
web2py.gluon.dal.Expression.with_alias	web2py.gluon.dal.Expression-class.html#with_alias
web2py.gluon.dal.Expression.startswith	web2py.gluon.dal.Expression-class.html#startswith
web2py.gluon.dal.Expression.__getitem__	web2py.gluon.dal.Expression-class.html#__getitem__
web2py.gluon.dal.Expression.seconds	web2py.gluon.dal.Expression-class.html#seconds
web2py.gluon.dal.Expression.max	web2py.gluon.dal.Expression-class.html#max
web2py.gluon.dal.Expression.len	web2py.gluon.dal.Expression-class.html#len
web2py.gluon.dal.Expression.__or__	web2py.gluon.dal.Expression-class.html#__or__
web2py.gluon.dal.Expression.__add__	web2py.gluon.dal.Expression-class.html#__add__
web2py.gluon.dal.Expression.__gt__	web2py.gluon.dal.Expression-class.html#__gt__
web2py.gluon.dal.Expression.__ne__	web2py.gluon.dal.Expression-class.html#__ne__
web2py.gluon.dal.Expression.__eq__	web2py.gluon.dal.Expression-class.html#__eq__
web2py.gluon.dal.Expression.day	web2py.gluon.dal.Expression-class.html#day
web2py.gluon.dal.Expression.lower	web2py.gluon.dal.Expression-class.html#lower
web2py.gluon.dal.Expression.like	web2py.gluon.dal.Expression-class.html#like
web2py.gluon.dal.Expression.hour	web2py.gluon.dal.Expression-class.html#hour
web2py.gluon.dal.Expression.__mod__	web2py.gluon.dal.Expression-class.html#__mod__
web2py.gluon.dal.Expression.__div__	web2py.gluon.dal.Expression-class.html#__div__
web2py.gluon.dal.Expression.__le__	web2py.gluon.dal.Expression-class.html#__le__
web2py.gluon.dal.Expression.__mul__	web2py.gluon.dal.Expression-class.html#__mul__
web2py.gluon.dal.Expression.__sub__	web2py.gluon.dal.Expression-class.html#__sub__
web2py.gluon.dal.Expression.minutes	web2py.gluon.dal.Expression-class.html#minutes
web2py.gluon.dal.Expression.__ge__	web2py.gluon.dal.Expression-class.html#__ge__
web2py.gluon.dal.Field	web2py.gluon.dal.Field-class.html
web2py.gluon.dal.Expression.upper	web2py.gluon.dal.Expression-class.html#upper
web2py.gluon.dal.Field.retrieve	web2py.gluon.dal.Field-class.html#retrieve
web2py.gluon.dal.Expression.__getslice__	web2py.gluon.dal.Expression-class.html#__getslice__
web2py.gluon.dal.Expression.coalesce_zero	web2py.gluon.dal.Expression-class.html#coalesce_zero
web2py.gluon.dal.Field.__str__	web2py.gluon.dal.Field-class.html#__str__
web2py.gluon.dal.Expression.month	web2py.gluon.dal.Expression-class.html#month
web2py.gluon.dal.Expression.endswith	web2py.gluon.dal.Expression-class.html#endswith
web2py.gluon.dal.Expression.year	web2py.gluon.dal.Expression-class.html#year
web2py.gluon.dal.Expression.__lt__	web2py.gluon.dal.Expression-class.html#__lt__
web2py.gluon.dal.Field.__init__	web2py.gluon.dal.Field-class.html#__init__
web2py.gluon.dal.Expression.__getitem__	web2py.gluon.dal.Expression-class.html#__getitem__
web2py.gluon.dal.Expression.min	web2py.gluon.dal.Expression-class.html#min
web2py.gluon.dal.Expression.sum	web2py.gluon.dal.Expression-class.html#sum
web2py.gluon.dal.Expression.contains	web2py.gluon.dal.Expression-class.html#contains
web2py.gluon.dal.Expression.belongs	web2py.gluon.dal.Expression-class.html#belongs
web2py.gluon.dal.Expression.with_alias	web2py.gluon.dal.Expression-class.html#with_alias
web2py.gluon.dal.Field.formatter	web2py.gluon.dal.Field-class.html#formatter
web2py.gluon.dal.Field.store	web2py.gluon.dal.Field-class.html#store
web2py.gluon.dal.Expression.startswith	web2py.gluon.dal.Expression-class.html#startswith
web2py.gluon.dal.Expression.__invert__	web2py.gluon.dal.Expression-class.html#__invert__
web2py.gluon.dal.Expression.seconds	web2py.gluon.dal.Expression-class.html#seconds
web2py.gluon.dal.Expression.max	web2py.gluon.dal.Expression-class.html#max
web2py.gluon.dal.Expression.len	web2py.gluon.dal.Expression-class.html#len
web2py.gluon.dal.Expression.__or__	web2py.gluon.dal.Expression-class.html#__or__
web2py.gluon.dal.Expression.__add__	web2py.gluon.dal.Expression-class.html#__add__
web2py.gluon.dal.Expression.__gt__	web2py.gluon.dal.Expression-class.html#__gt__
web2py.gluon.dal.Field.validate	web2py.gluon.dal.Field-class.html#validate
web2py.gluon.dal.Expression.__eq__	web2py.gluon.dal.Expression-class.html#__eq__
web2py.gluon.dal.Expression.day	web2py.gluon.dal.Expression-class.html#day
web2py.gluon.dal.Field.count	web2py.gluon.dal.Field-class.html#count
web2py.gluon.dal.Expression.lower	web2py.gluon.dal.Expression-class.html#lower
web2py.gluon.dal.Expression.__ne__	web2py.gluon.dal.Expression-class.html#__ne__
web2py.gluon.dal.Field.__nonzero__	web2py.gluon.dal.Field-class.html#__nonzero__
web2py.gluon.dal.Expression.like	web2py.gluon.dal.Expression-class.html#like
web2py.gluon.dal.Expression.hour	web2py.gluon.dal.Expression-class.html#hour
web2py.gluon.dal.Expression.__mod__	web2py.gluon.dal.Expression-class.html#__mod__
web2py.gluon.dal.Expression.__div__	web2py.gluon.dal.Expression-class.html#__div__
web2py.gluon.dal.Expression.__le__	web2py.gluon.dal.Expression-class.html#__le__
web2py.gluon.dal.Expression.__mul__	web2py.gluon.dal.Expression-class.html#__mul__
web2py.gluon.dal.Expression.__sub__	web2py.gluon.dal.Expression-class.html#__sub__
web2py.gluon.dal.Expression.minutes	web2py.gluon.dal.Expression-class.html#minutes
web2py.gluon.dal.Expression.__ge__	web2py.gluon.dal.Expression-class.html#__ge__
web2py.gluon.dal.FireBirdAdapter	web2py.gluon.dal.FireBirdAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.FireBirdAdapter.select_limitby	web2py.gluon.dal.FireBirdAdapter-class.html#select_limitby
web2py.gluon.dal.FireBirdAdapter._truncate	web2py.gluon.dal.FireBirdAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.FireBirdAdapter._drop	web2py.gluon.dal.FireBirdAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.FireBirdAdapter.support_distributed_transaction	web2py.gluon.dal.FireBirdAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.FireBirdAdapter.NOT_NULL	web2py.gluon.dal.FireBirdAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.FireBirdAdapter.create_sequence_and_triggers	web2py.gluon.dal.FireBirdAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.FireBirdAdapter.SUBSTRING	web2py.gluon.dal.FireBirdAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.FireBirdAdapter.commit_on_alter_table	web2py.gluon.dal.FireBirdAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.FireBirdAdapter.sequence_name	web2py.gluon.dal.FireBirdAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.FireBirdAdapter.__init__	web2py.gluon.dal.FireBirdAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.FireBirdAdapter.RANDOM	web2py.gluon.dal.FireBirdAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.FireBirdAdapter.driver	web2py.gluon.dal.FireBirdAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.FireBirdAdapter.trigger_name	web2py.gluon.dal.FireBirdAdapter-class.html#trigger_name
web2py.gluon.dal.FireBirdAdapter.types	web2py.gluon.dal.FireBirdAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.FireBirdAdapter.lastrowid	web2py.gluon.dal.FireBirdAdapter-class.html#lastrowid
web2py.gluon.dal.FireBirdEmbeddedAdapter	web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.FireBirdAdapter.select_limitby	web2py.gluon.dal.FireBirdAdapter-class.html#select_limitby
web2py.gluon.dal.FireBirdAdapter._truncate	web2py.gluon.dal.FireBirdAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.FireBirdAdapter._drop	web2py.gluon.dal.FireBirdAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.FireBirdAdapter.support_distributed_transaction	web2py.gluon.dal.FireBirdAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.FireBirdAdapter.NOT_NULL	web2py.gluon.dal.FireBirdAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.FireBirdAdapter.create_sequence_and_triggers	web2py.gluon.dal.FireBirdAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.FireBirdAdapter.SUBSTRING	web2py.gluon.dal.FireBirdAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.FireBirdAdapter.commit_on_alter_table	web2py.gluon.dal.FireBirdAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.FireBirdAdapter.sequence_name	web2py.gluon.dal.FireBirdAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__	web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.FireBirdAdapter.RANDOM	web2py.gluon.dal.FireBirdAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.FireBirdAdapter.driver	web2py.gluon.dal.FireBirdAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.FireBirdAdapter.trigger_name	web2py.gluon.dal.FireBirdAdapter-class.html#trigger_name
web2py.gluon.dal.FireBirdAdapter.types	web2py.gluon.dal.FireBirdAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.FireBirdAdapter.lastrowid	web2py.gluon.dal.FireBirdAdapter-class.html#lastrowid
web2py.gluon.dal.GAEDecimalProperty	web2py.gluon.dal.GAEDecimalProperty-class.html
web2py.gluon.dal.GAEDecimalProperty.make_value_from_datastore	web2py.gluon.dal.GAEDecimalProperty-class.html#make_value_from_datastore
web2py.gluon.dal.GAEDecimalProperty.validate	web2py.gluon.dal.GAEDecimalProperty-class.html#validate
web2py.gluon.dal.GAEDecimalProperty.get_value_for_datastore	web2py.gluon.dal.GAEDecimalProperty-class.html#get_value_for_datastore
web2py.gluon.dal.GAEDecimalProperty.__init__	web2py.gluon.dal.GAEDecimalProperty-class.html#__init__
web2py.gluon.dal.GAEDecimalProperty.data_type	web2py.gluon.dal.GAEDecimalProperty-class.html#data_type
web2py.gluon.dal.GAEF	web2py.gluon.dal.GAEF-class.html
web2py.gluon.dal.GAEF.__repr__	web2py.gluon.dal.GAEF-class.html#__repr__
web2py.gluon.dal.GAEF.__init__	web2py.gluon.dal.GAEF-class.html#__init__
web2py.gluon.dal.GoogleDatastoreAdapter	web2py.gluon.dal.GoogleDatastoreAdapter-class.html
web2py.gluon.dal.NoSQLAdapter.represent	web2py.gluon.dal.NoSQLAdapter-class.html#represent
web2py.gluon.dal.NoSQLAdapter.log_execute	web2py.gluon.dal.NoSQLAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.NoSQLAdapter.SUB	web2py.gluon.dal.NoSQLAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.NoSQLAdapter.LEFT_JOIN	web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.NoSQLAdapter.distributed_transaction_begin	web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.GoogleDatastoreAdapter.GT	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#GT
web2py.gluon.dal.NoSQLAdapter.rollback	web2py.gluon.dal.NoSQLAdapter-class.html#rollback
web2py.gluon.dal.NoSQLAdapter.ON	web2py.gluon.dal.NoSQLAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.GoogleDatastoreAdapter.GE	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.NoSQLAdapter.integrity_error_class	web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.NoSQLAdapter._select	web2py.gluon.dal.NoSQLAdapter-class.html#_select
web2py.gluon.dal.GoogleDatastoreAdapter.insert	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert
web2py.gluon.dal.NoSQLAdapter.execute	web2py.gluon.dal.NoSQLAdapter-class.html#execute
web2py.gluon.dal.NoSQLAdapter.drop	web2py.gluon.dal.NoSQLAdapter-class.html#drop
web2py.gluon.dal.NoSQLAdapter.migrate_table	web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table
web2py.gluon.dal.NoSQLAdapter.concat_add	web2py.gluon.dal.NoSQLAdapter-class.html#concat_add
web2py.gluon.dal.NoSQLAdapter._insert	web2py.gluon.dal.NoSQLAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.NoSQLAdapter.OR	web2py.gluon.dal.NoSQLAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.NoSQLAdapter.close	web2py.gluon.dal.NoSQLAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.NoSQLAdapter.rowslice	web2py.gluon.dal.NoSQLAdapter-class.html#rowslice
web2py.gluon.dal.NoSQLAdapter.create_sequence_and_triggers	web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.NoSQLAdapter.rollback_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.NoSQLAdapter.commit_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared
web2py.gluon.dal.GoogleDatastoreAdapter.EQ	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#EQ
web2py.gluon.dal.GoogleDatastoreAdapter.AND	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#AND
web2py.gluon.dal.GoogleDatastoreAdapter.uploads_in_blob	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#uploads_in_blob
web2py.gluon.dal.GoogleDatastoreAdapter.NOT	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#NOT
web2py.gluon.dal.NoSQLAdapter.commit	web2py.gluon.dal.NoSQLAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.NoSQLAdapter.STARTSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH
web2py.gluon.dal.NoSQLAdapter.to_unicode	web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.NoSQLAdapter._delete	web2py.gluon.dal.NoSQLAdapter-class.html#_delete
web2py.gluon.dal.GoogleDatastoreAdapter.BELONGS	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#BELONGS
web2py.gluon.dal.NoSQLAdapter.MUL	web2py.gluon.dal.NoSQLAdapter-class.html#MUL
web2py.gluon.dal.GoogleDatastoreAdapter.select	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select
web2py.gluon.dal.NoSQLAdapter.PRIMARY_KEY	web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.NoSQLAdapter.prepare	web2py.gluon.dal.NoSQLAdapter-class.html#prepare
web2py.gluon.dal.GoogleDatastoreAdapter.NE	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#NE
web2py.gluon.dal.NoSQLAdapter.SUBSTRING	web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.GoogleDatastoreAdapter.types	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types
web2py.gluon.dal.NoSQLAdapter.EXTRACT	web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.NoSQLAdapter.represent_exceptions	web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.NoSQLAdapter.ADD	web2py.gluon.dal.NoSQLAdapter-class.html#ADD
web2py.gluon.dal.GoogleDatastoreAdapter.count	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#count
web2py.gluon.dal.NoSQLAdapter.UPPER	web2py.gluon.dal.NoSQLAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.NoSQLAdapter.LIKE	web2py.gluon.dal.NoSQLAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.GoogleDatastoreAdapter.file_exists	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_exists
web2py.gluon.dal.GoogleDatastoreAdapter.delete	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#delete
web2py.gluon.dal.NoSQLAdapter.LOWER	web2py.gluon.dal.NoSQLAdapter-class.html#LOWER
web2py.gluon.dal.NoSQLAdapter._update	web2py.gluon.dal.NoSQLAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.NoSQLAdapter.ENDSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH
web2py.gluon.dal.NoSQLAdapter.constraint_name	web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name
web2py.gluon.dal.NoSQLAdapter.DIV	web2py.gluon.dal.NoSQLAdapter-class.html#DIV
web2py.gluon.dal.GoogleDatastoreAdapter.__init__	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.GoogleDatastoreAdapter.LE	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#LE
web2py.gluon.dal.GoogleDatastoreAdapter.file_open	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.GoogleDatastoreAdapter.select_raw	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select_raw
web2py.gluon.dal.GoogleDatastoreAdapter.LT	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#LT
web2py.gluon.dal.GoogleDatastoreAdapter.COMMA	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#COMMA
web2py.gluon.dal.GoogleDatastoreAdapter.create_table	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#create_table
web2py.gluon.dal.GoogleDatastoreAdapter.bulk_insert	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#bulk_insert
web2py.gluon.dal.NoSQLAdapter.AGGREGATE	web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE
web2py.gluon.dal.GoogleDatastoreAdapter.file_close	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_close
web2py.gluon.dal.NoSQLAdapter.RANDOM	web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM
web2py.gluon.dal.GoogleDatastoreAdapter.truncate	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#truncate
web2py.gluon.dal.BaseAdapter.driver	web2py.gluon.dal.BaseAdapter-class.html#driver
web2py.gluon.dal.GoogleDatastoreAdapter.update	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update
web2py.gluon.dal.NoSQLAdapter.AS	web2py.gluon.dal.NoSQLAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.GoogleDatastoreAdapter.expand	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#expand
web2py.gluon.dal.NoSQLAdapter._count	web2py.gluon.dal.NoSQLAdapter-class.html#_count
web2py.gluon.dal.GoogleDatastoreAdapter.CONTAINS	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#CONTAINS
web2py.gluon.dal.GoogleDatastoreAdapter.INVERT	web2py.gluon.dal.GoogleDatastoreAdapter-class.html#INVERT
web2py.gluon.dal.NoSQLAdapter.alias	web2py.gluon.dal.NoSQLAdapter-class.html#alias
web2py.gluon.dal.NoSQLAdapter.lastrowid	web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid
web2py.gluon.dal.GoogleSQLAdapter	web2py.gluon.dal.GoogleSQLAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.MySQLAdapter.distributed_transaction_begin	web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.MySQLAdapter.maxcharlength	web2py.gluon.dal.MySQLAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.MySQLAdapter._drop	web2py.gluon.dal.MySQLAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.MySQLAdapter.concat_add	web2py.gluon.dal.MySQLAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.MySQLAdapter.support_distributed_transaction	web2py.gluon.dal.MySQLAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.UseDatabaseStoredFile.file_delete	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.MySQLAdapter.rollback_prepared	web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.MySQLAdapter.commit_prepared	web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.MySQLAdapter.prepare	web2py.gluon.dal.MySQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.MySQLAdapter.SUBSTRING	web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.MySQLAdapter.commit_on_alter_table	web2py.gluon.dal.MySQLAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.UseDatabaseStoredFile.file_exists	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.GoogleSQLAdapter.__init__	web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.UseDatabaseStoredFile.file_open	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.UseDatabaseStoredFile.file_close	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_close
web2py.gluon.dal.MySQLAdapter.RANDOM	web2py.gluon.dal.MySQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.MySQLAdapter.driver	web2py.gluon.contrib.pymysql-module.html
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.MySQLAdapter.types	web2py.gluon.dal.MySQLAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.MySQLAdapter.lastrowid	web2py.gluon.dal.MySQLAdapter-class.html#lastrowid
web2py.gluon.dal.InformixAdapter	web2py.gluon.dal.InformixAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.InformixAdapter.select_limitby	web2py.gluon.dal.InformixAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.InformixAdapter.integrity_error_class	web2py.gluon.dal.InformixAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.InformixAdapter.execute	web2py.gluon.dal.InformixAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.InformixAdapter.NOT_NULL	web2py.gluon.dal.InformixAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.InformixAdapter.types	web2py.gluon.dal.InformixAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.InformixAdapter.represent_exceptions	web2py.gluon.dal.InformixAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.InformixAdapter.__init__	web2py.gluon.dal.InformixAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.InformixAdapter.RANDOM	web2py.gluon.dal.InformixAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.InformixAdapter.driver	web2py.gluon.dal.InformixAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.InformixAdapter.lastrowid	web2py.gluon.dal.InformixAdapter-class.html#lastrowid
web2py.gluon.dal.IngresAdapter	web2py.gluon.dal.IngresAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.IngresAdapter.select_limitby	web2py.gluon.dal.IngresAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.IngresAdapter.LEFT_JOIN	web2py.gluon.dal.IngresAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.IngresAdapter.RANDOM	web2py.gluon.dal.IngresAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.IngresAdapter.integrity_error_class	web2py.gluon.dal.IngresAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.IngresAdapter.create_sequence_and_triggers	web2py.gluon.dal.IngresAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.IngresAdapter.types	web2py.gluon.dal.IngresAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.IngresAdapter.__init__	web2py.gluon.dal.IngresAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.IngresAdapter.driver	web2py.gluon.dal.IngresAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.IngresAdapter.lastrowid	web2py.gluon.dal.IngresAdapter-class.html#lastrowid
web2py.gluon.dal.IngresUnicodeAdapter	web2py.gluon.dal.IngresUnicodeAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.IngresAdapter.select_limitby	web2py.gluon.dal.IngresAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.IngresAdapter.LEFT_JOIN	web2py.gluon.dal.IngresAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.IngresAdapter.RANDOM	web2py.gluon.dal.IngresAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.IngresAdapter.integrity_error_class	web2py.gluon.dal.IngresAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.IngresAdapter.create_sequence_and_triggers	web2py.gluon.dal.IngresAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.IngresUnicodeAdapter.types	web2py.gluon.dal.IngresUnicodeAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.IngresAdapter.__init__	web2py.gluon.dal.IngresAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.IngresAdapter.driver	web2py.gluon.dal.IngresAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.IngresAdapter.lastrowid	web2py.gluon.dal.IngresAdapter-class.html#lastrowid
web2py.gluon.dal.JDBCPostgreSQLAdapter	web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.PostgreSQLAdapter.distributed_transaction_begin	web2py.gluon.dal.PostgreSQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.PostgreSQLAdapter.support_distributed_transaction	web2py.gluon.dal.PostgreSQLAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.PostgreSQLAdapter.create_sequence_and_triggers	web2py.gluon.dal.PostgreSQLAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.PostgreSQLAdapter.rollback_prepared	web2py.gluon.dal.PostgreSQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.PostgreSQLAdapter.commit_prepared	web2py.gluon.dal.PostgreSQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.PostgreSQLAdapter.STARTSWITH	web2py.gluon.dal.PostgreSQLAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.PostgreSQLAdapter.prepare	web2py.gluon.dal.PostgreSQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.PostgreSQLAdapter.types	web2py.gluon.dal.PostgreSQLAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.PostgreSQLAdapter.sequence_name	web2py.gluon.dal.PostgreSQLAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.PostgreSQLAdapter.LIKE	web2py.gluon.dal.PostgreSQLAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.PostgreSQLAdapter.ENDSWITH	web2py.gluon.dal.PostgreSQLAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__	web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.PostgreSQLAdapter.RANDOM	web2py.gluon.dal.PostgreSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.PostgreSQLAdapter.driver	psycopg2-module.html
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.PostgreSQLAdapter.CONTAINS	web2py.gluon.dal.PostgreSQLAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.PostgreSQLAdapter.lastrowid	web2py.gluon.dal.PostgreSQLAdapter-class.html#lastrowid
web2py.gluon.dal.JDBCSQLiteAdapter	web2py.gluon.dal.JDBCSQLiteAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.SQLiteAdapter._truncate	web2py.gluon.dal.SQLiteAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.JDBCSQLiteAdapter.execute	web2py.gluon.dal.JDBCSQLiteAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.SQLiteAdapter.web2py_extract	web2py.gluon.dal.SQLiteAdapter-class.html#web2py_extract
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.types	web2py.gluon.dal.BaseAdapter-class.html#types
web2py.gluon.dal.SQLiteAdapter.EXTRACT	web2py.gluon.dal.SQLiteAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.JDBCSQLiteAdapter.__init__	web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.BaseAdapter.RANDOM	web2py.gluon.dal.BaseAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.JDBCSQLiteAdapter.driver	web2py.gluon.dal.JDBCSQLiteAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.SQLiteAdapter.lastrowid	web2py.gluon.dal.SQLiteAdapter-class.html#lastrowid
web2py.gluon.dal.MSSQL2Adapter	web2py.gluon.dal.MSSQL2Adapter-class.html
web2py.gluon.dal.MSSQL2Adapter.represent	web2py.gluon.dal.MSSQL2Adapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.MSSQLAdapter.select_limitby	web2py.gluon.dal.MSSQLAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.MSSQLAdapter.LEFT_JOIN	web2py.gluon.dal.MSSQLAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.MSSQLAdapter.RANDOM	web2py.gluon.dal.MSSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.MSSQLAdapter.integrity_error_class	web2py.gluon.dal.MSSQLAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.MSSQL2Adapter.execute	web2py.gluon.dal.MSSQL2Adapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.MSSQLAdapter.rowslice	web2py.gluon.dal.MSSQLAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.MSSQLAdapter.PRIMARY_KEY	web2py.gluon.dal.MSSQLAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.MSSQLAdapter.SUBSTRING	web2py.gluon.dal.MSSQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.MSSQL2Adapter.types	web2py.gluon.dal.MSSQL2Adapter-class.html#types
web2py.gluon.dal.MSSQLAdapter.EXTRACT	web2py.gluon.dal.MSSQLAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.MSSQLAdapter.represent_exceptions	web2py.gluon.dal.MSSQLAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.MSSQLAdapter.__init__	web2py.gluon.dal.MSSQLAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.MSSQLAdapter.ALLOW_NULL	web2py.gluon.dal.MSSQLAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.MSSQLAdapter.driver	web2py.gluon.dal.MSSQLAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.MSSQLAdapter.lastrowid	web2py.gluon.dal.MSSQLAdapter-class.html#lastrowid
web2py.gluon.dal.MSSQLAdapter	web2py.gluon.dal.MSSQLAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.MSSQLAdapter.select_limitby	web2py.gluon.dal.MSSQLAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.MSSQLAdapter.LEFT_JOIN	web2py.gluon.dal.MSSQLAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.MSSQLAdapter.RANDOM	web2py.gluon.dal.MSSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.MSSQLAdapter.integrity_error_class	web2py.gluon.dal.MSSQLAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.MSSQLAdapter.rowslice	web2py.gluon.dal.MSSQLAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.MSSQLAdapter.PRIMARY_KEY	web2py.gluon.dal.MSSQLAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.MSSQLAdapter.SUBSTRING	web2py.gluon.dal.MSSQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.MSSQLAdapter.types	web2py.gluon.dal.MSSQLAdapter-class.html#types
web2py.gluon.dal.MSSQLAdapter.EXTRACT	web2py.gluon.dal.MSSQLAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.MSSQLAdapter.represent_exceptions	web2py.gluon.dal.MSSQLAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.MSSQLAdapter.__init__	web2py.gluon.dal.MSSQLAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.MSSQLAdapter.ALLOW_NULL	web2py.gluon.dal.MSSQLAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.MSSQLAdapter.driver	web2py.gluon.dal.MSSQLAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.MSSQLAdapter.lastrowid	web2py.gluon.dal.MSSQLAdapter-class.html#lastrowid
web2py.gluon.dal.MongoDBAdapter	web2py.gluon.dal.MongoDBAdapter-class.html
web2py.gluon.dal.NoSQLAdapter.represent	web2py.gluon.dal.NoSQLAdapter-class.html#represent
web2py.gluon.dal.NoSQLAdapter.log_execute	web2py.gluon.dal.NoSQLAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.NoSQLAdapter.SUB	web2py.gluon.dal.NoSQLAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.NoSQLAdapter.LEFT_JOIN	web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.NoSQLAdapter.distributed_transaction_begin	web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.NoSQLAdapter.rollback	web2py.gluon.dal.NoSQLAdapter-class.html#rollback
web2py.gluon.dal.NoSQLAdapter.ON	web2py.gluon.dal.NoSQLAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.NoSQLAdapter.integrity_error_class	web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.NoSQLAdapter._select	web2py.gluon.dal.NoSQLAdapter-class.html#_select
web2py.gluon.dal.MongoDBAdapter.insert	web2py.gluon.dal.MongoDBAdapter-class.html#insert
web2py.gluon.dal.NoSQLAdapter.execute	web2py.gluon.dal.NoSQLAdapter-class.html#execute
web2py.gluon.dal.NoSQLAdapter.drop	web2py.gluon.dal.NoSQLAdapter-class.html#drop
web2py.gluon.dal.NoSQLAdapter.migrate_table	web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table
web2py.gluon.dal.NoSQLAdapter.concat_add	web2py.gluon.dal.NoSQLAdapter-class.html#concat_add
web2py.gluon.dal.NoSQLAdapter._insert	web2py.gluon.dal.NoSQLAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.NoSQLAdapter.OR	web2py.gluon.dal.NoSQLAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.NoSQLAdapter.close	web2py.gluon.dal.NoSQLAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.NoSQLAdapter.rowslice	web2py.gluon.dal.NoSQLAdapter-class.html#rowslice
web2py.gluon.dal.NoSQLAdapter.create_sequence_and_triggers	web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.NoSQLAdapter.rollback_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.NoSQLAdapter.commit_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.NoSQLAdapter.AND	web2py.gluon.dal.NoSQLAdapter-class.html#AND
web2py.gluon.dal.MongoDBAdapter.uploads_in_blob	web2py.gluon.dal.MongoDBAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.NoSQLAdapter.commit	web2py.gluon.dal.NoSQLAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.NoSQLAdapter.STARTSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH
web2py.gluon.dal.NoSQLAdapter.to_unicode	web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.NoSQLAdapter._delete	web2py.gluon.dal.NoSQLAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.NoSQLAdapter.MUL	web2py.gluon.dal.NoSQLAdapter-class.html#MUL
web2py.gluon.dal.MongoDBAdapter.select	web2py.gluon.dal.MongoDBAdapter-class.html#select
web2py.gluon.dal.NoSQLAdapter.PRIMARY_KEY	web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.NoSQLAdapter.prepare	web2py.gluon.dal.NoSQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.NoSQLAdapter.SUBSTRING	web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.MongoDBAdapter.types	web2py.gluon.dal.MongoDBAdapter-class.html#types
web2py.gluon.dal.NoSQLAdapter.EXTRACT	web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.NoSQLAdapter.represent_exceptions	web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.NoSQLAdapter.ADD	web2py.gluon.dal.NoSQLAdapter-class.html#ADD
web2py.gluon.dal.MongoDBAdapter.count	web2py.gluon.dal.MongoDBAdapter-class.html#count
web2py.gluon.dal.NoSQLAdapter.UPPER	web2py.gluon.dal.NoSQLAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.NoSQLAdapter.LIKE	web2py.gluon.dal.NoSQLAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.MongoDBAdapter.delete	web2py.gluon.dal.MongoDBAdapter-class.html#delete
web2py.gluon.dal.NoSQLAdapter.LOWER	web2py.gluon.dal.NoSQLAdapter-class.html#LOWER
web2py.gluon.dal.NoSQLAdapter._update	web2py.gluon.dal.NoSQLAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.NoSQLAdapter.ENDSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH
web2py.gluon.dal.NoSQLAdapter.constraint_name	web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name
web2py.gluon.dal.NoSQLAdapter.DIV	web2py.gluon.dal.NoSQLAdapter-class.html#DIV
web2py.gluon.dal.MongoDBAdapter.__init__	web2py.gluon.dal.MongoDBAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.NoSQLAdapter.AGGREGATE	web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.NoSQLAdapter.RANDOM	web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.BaseAdapter.driver	web2py.gluon.dal.BaseAdapter-class.html#driver
web2py.gluon.dal.MongoDBAdapter.update	web2py.gluon.dal.MongoDBAdapter-class.html#update
web2py.gluon.dal.NoSQLAdapter.AS	web2py.gluon.dal.NoSQLAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.NoSQLAdapter._count	web2py.gluon.dal.NoSQLAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.NoSQLAdapter.alias	web2py.gluon.dal.NoSQLAdapter-class.html#alias
web2py.gluon.dal.NoSQLAdapter.lastrowid	web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid
web2py.gluon.dal.MySQLAdapter	web2py.gluon.dal.MySQLAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.MySQLAdapter.distributed_transaction_begin	web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.MySQLAdapter.maxcharlength	web2py.gluon.dal.MySQLAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.MySQLAdapter._drop	web2py.gluon.dal.MySQLAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.MySQLAdapter.concat_add	web2py.gluon.dal.MySQLAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.MySQLAdapter.support_distributed_transaction	web2py.gluon.dal.MySQLAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.MySQLAdapter.rollback_prepared	web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.MySQLAdapter.commit_prepared	web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.MySQLAdapter.prepare	web2py.gluon.dal.MySQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.MySQLAdapter.SUBSTRING	web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.MySQLAdapter.commit_on_alter_table	web2py.gluon.dal.MySQLAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.MySQLAdapter.__init__	web2py.gluon.dal.MySQLAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.MySQLAdapter.RANDOM	web2py.gluon.dal.MySQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.MySQLAdapter.driver	web2py.gluon.contrib.pymysql-module.html
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.MySQLAdapter.types	web2py.gluon.dal.MySQLAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.MySQLAdapter.lastrowid	web2py.gluon.dal.MySQLAdapter-class.html#lastrowid
web2py.gluon.dal.NoSQLAdapter	web2py.gluon.dal.NoSQLAdapter-class.html
web2py.gluon.dal.NoSQLAdapter.represent	web2py.gluon.dal.NoSQLAdapter-class.html#represent
web2py.gluon.dal.NoSQLAdapter.log_execute	web2py.gluon.dal.NoSQLAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.NoSQLAdapter.SUB	web2py.gluon.dal.NoSQLAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.NoSQLAdapter.LEFT_JOIN	web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.NoSQLAdapter.distributed_transaction_begin	web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.NoSQLAdapter.rollback	web2py.gluon.dal.NoSQLAdapter-class.html#rollback
web2py.gluon.dal.NoSQLAdapter.ON	web2py.gluon.dal.NoSQLAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.NoSQLAdapter.integrity_error_class	web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.NoSQLAdapter._select	web2py.gluon.dal.NoSQLAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.NoSQLAdapter.execute	web2py.gluon.dal.NoSQLAdapter-class.html#execute
web2py.gluon.dal.NoSQLAdapter.drop	web2py.gluon.dal.NoSQLAdapter-class.html#drop
web2py.gluon.dal.NoSQLAdapter.migrate_table	web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table
web2py.gluon.dal.NoSQLAdapter.concat_add	web2py.gluon.dal.NoSQLAdapter-class.html#concat_add
web2py.gluon.dal.NoSQLAdapter._insert	web2py.gluon.dal.NoSQLAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.NoSQLAdapter.OR	web2py.gluon.dal.NoSQLAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.NoSQLAdapter.close	web2py.gluon.dal.NoSQLAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.NoSQLAdapter.rowslice	web2py.gluon.dal.NoSQLAdapter-class.html#rowslice
web2py.gluon.dal.NoSQLAdapter.create_sequence_and_triggers	web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.NoSQLAdapter.rollback_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.NoSQLAdapter.commit_prepared	web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.NoSQLAdapter.AND	web2py.gluon.dal.NoSQLAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.NoSQLAdapter.commit	web2py.gluon.dal.NoSQLAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.NoSQLAdapter.STARTSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH
web2py.gluon.dal.NoSQLAdapter.to_unicode	web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.NoSQLAdapter._delete	web2py.gluon.dal.NoSQLAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.NoSQLAdapter.MUL	web2py.gluon.dal.NoSQLAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.NoSQLAdapter.PRIMARY_KEY	web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.NoSQLAdapter.prepare	web2py.gluon.dal.NoSQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.NoSQLAdapter.SUBSTRING	web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.types	web2py.gluon.dal.BaseAdapter-class.html#types
web2py.gluon.dal.NoSQLAdapter.EXTRACT	web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.NoSQLAdapter.represent_exceptions	web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.NoSQLAdapter.ADD	web2py.gluon.dal.NoSQLAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.NoSQLAdapter.UPPER	web2py.gluon.dal.NoSQLAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.NoSQLAdapter.LIKE	web2py.gluon.dal.NoSQLAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.NoSQLAdapter.LOWER	web2py.gluon.dal.NoSQLAdapter-class.html#LOWER
web2py.gluon.dal.NoSQLAdapter._update	web2py.gluon.dal.NoSQLAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.NoSQLAdapter.ENDSWITH	web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH
web2py.gluon.dal.NoSQLAdapter.constraint_name	web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name
web2py.gluon.dal.NoSQLAdapter.DIV	web2py.gluon.dal.NoSQLAdapter-class.html#DIV
web2py.gluon.dal.BaseAdapter.__init__	web2py.gluon.dal.BaseAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.NoSQLAdapter.AGGREGATE	web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.NoSQLAdapter.RANDOM	web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.BaseAdapter.driver	web2py.gluon.dal.BaseAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.NoSQLAdapter.AS	web2py.gluon.dal.NoSQLAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.NoSQLAdapter._count	web2py.gluon.dal.NoSQLAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.NoSQLAdapter.alias	web2py.gluon.dal.NoSQLAdapter-class.html#alias
web2py.gluon.dal.NoSQLAdapter.lastrowid	web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid
web2py.gluon.dal.OracleAdapter	web2py.gluon.dal.OracleAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.OracleAdapter.select_limitby	web2py.gluon.dal.OracleAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.OracleAdapter.LEFT_JOIN	web2py.gluon.dal.OracleAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.OracleAdapter._drop	web2py.gluon.dal.OracleAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.OracleAdapter.execute	web2py.gluon.dal.OracleAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.OracleAdapter.NOT_NULL	web2py.gluon.dal.OracleAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.OracleAdapter.create_sequence_and_triggers	web2py.gluon.dal.OracleAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.OracleAdapter.oracle_fix	web2py.gluon.dal.OracleAdapter-class.html#oracle_fix
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.OracleAdapter.commit_on_alter_table	web2py.gluon.dal.OracleAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.OracleAdapter.represent_exceptions	web2py.gluon.dal.OracleAdapter-class.html#represent_exceptions
web2py.gluon.dal.OracleAdapter.sequence_name	web2py.gluon.dal.OracleAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.OracleAdapter.constraint_name	web2py.gluon.dal.OracleAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.OracleAdapter.__init__	web2py.gluon.dal.OracleAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.OracleAdapter.RANDOM	web2py.gluon.dal.OracleAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.OracleAdapter.driver	web2py.gluon.dal.OracleAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.OracleAdapter.trigger_name	web2py.gluon.dal.OracleAdapter-class.html#trigger_name
web2py.gluon.dal.OracleAdapter.types	web2py.gluon.dal.OracleAdapter-class.html#types
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.OracleAdapter.lastrowid	web2py.gluon.dal.OracleAdapter-class.html#lastrowid
web2py.gluon.dal.PostgreSQLAdapter	web2py.gluon.dal.PostgreSQLAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.PostgreSQLAdapter.distributed_transaction_begin	web2py.gluon.dal.PostgreSQLAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.PostgreSQLAdapter.support_distributed_transaction	web2py.gluon.dal.PostgreSQLAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.PostgreSQLAdapter.create_sequence_and_triggers	web2py.gluon.dal.PostgreSQLAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.PostgreSQLAdapter.rollback_prepared	web2py.gluon.dal.PostgreSQLAdapter-class.html#rollback_prepared
web2py.gluon.dal.PostgreSQLAdapter.commit_prepared	web2py.gluon.dal.PostgreSQLAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.PostgreSQLAdapter.STARTSWITH	web2py.gluon.dal.PostgreSQLAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.PostgreSQLAdapter.prepare	web2py.gluon.dal.PostgreSQLAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.PostgreSQLAdapter.types	web2py.gluon.dal.PostgreSQLAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.PostgreSQLAdapter.sequence_name	web2py.gluon.dal.PostgreSQLAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.PostgreSQLAdapter.LIKE	web2py.gluon.dal.PostgreSQLAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.PostgreSQLAdapter.ENDSWITH	web2py.gluon.dal.PostgreSQLAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.PostgreSQLAdapter.__init__	web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.PostgreSQLAdapter.RANDOM	web2py.gluon.dal.PostgreSQLAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.PostgreSQLAdapter.driver	psycopg2-module.html
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.PostgreSQLAdapter.CONTAINS	web2py.gluon.dal.PostgreSQLAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.PostgreSQLAdapter.lastrowid	web2py.gluon.dal.PostgreSQLAdapter-class.html#lastrowid
web2py.gluon.dal.Query	web2py.gluon.dal.Query-class.html
web2py.gluon.dal.Query.__invert__	web2py.gluon.dal.Query-class.html#__invert__
web2py.gluon.dal.Query.__str__	web2py.gluon.dal.Query-class.html#__str__
web2py.gluon.dal.Query.__or__	web2py.gluon.dal.Query-class.html#__or__
web2py.gluon.dal.Query.__and__	web2py.gluon.dal.Query-class.html#__and__
web2py.gluon.dal.Query.__init__	web2py.gluon.dal.Query-class.html#__init__
web2py.gluon.dal.Reference	web2py.gluon.dal.Reference-class.html
web2py.gluon.dal.Reference.__setattr__	web2py.gluon.dal.Reference-class.html#__setattr__
web2py.gluon.dal.Reference.__getattr__	web2py.gluon.dal.Reference-class.html#__getattr__
web2py.gluon.dal.Reference.__getitem__	web2py.gluon.dal.Reference-class.html#__getitem__
web2py.gluon.dal.Reference.__setitem__	web2py.gluon.dal.Reference-class.html#__setitem__
web2py.gluon.dal.Reference.__allocate	web2py.gluon.dal.Reference-class.html#__allocate
web2py.gluon.dal.Row	web2py.gluon.dal.Row-class.html
web2py.gluon.dal.Row.__int__	web2py.gluon.dal.Row-class.html#__int__
web2py.gluon.dal.Row.__setattr__	web2py.gluon.dal.Row-class.html#__setattr__
web2py.gluon.dal.Row.__getattr__	web2py.gluon.dal.Row-class.html#__getattr__
web2py.gluon.dal.Row.__call__	web2py.gluon.dal.Row-class.html#__call__
web2py.gluon.dal.Row.__ne__	web2py.gluon.dal.Row-class.html#__ne__
web2py.gluon.dal.Row.__getitem__	web2py.gluon.dal.Row-class.html#__getitem__
web2py.gluon.dal.Row.as_dict	web2py.gluon.dal.Row-class.html#as_dict
web2py.gluon.dal.Row.__setitem__	web2py.gluon.dal.Row-class.html#__setitem__
web2py.gluon.dal.Row.__eq__	web2py.gluon.dal.Row-class.html#__eq__
web2py.gluon.dal.Row.__repr__	web2py.gluon.dal.Row-class.html#__repr__
web2py.gluon.dal.Row.__copy__	web2py.gluon.dal.Row-class.html#__copy__
web2py.gluon.dal.Rows	web2py.gluon.dal.Rows-class.html
web2py.gluon.dal.Rows.__getslice__	web2py.gluon.dal.Rows-class.html#__getslice__
web2py.gluon.dal.Rows.__str__	web2py.gluon.dal.Rows-class.html#__str__
web2py.gluon.dal.Rows.__and__	web2py.gluon.dal.Rows-class.html#__and__
web2py.gluon.dal.Rows.exclude	web2py.gluon.dal.Rows-class.html#exclude
web2py.gluon.dal.Rows.find	web2py.gluon.dal.Rows-class.html#find
web2py.gluon.dal.Rows.__init__	web2py.gluon.dal.Rows-class.html#__init__
web2py.gluon.dal.Rows.xml	web2py.gluon.dal.Rows-class.html#xml
web2py.gluon.dal.Rows.setvirtualfields	web2py.gluon.dal.Rows-class.html#setvirtualfields
web2py.gluon.dal.Rows.export_to_csv_file	web2py.gluon.dal.Rows-class.html#export_to_csv_file
web2py.gluon.dal.Rows.json	web2py.gluon.dal.Rows-class.html#json
web2py.gluon.dal.Rows.__len__	web2py.gluon.dal.Rows-class.html#__len__
web2py.gluon.dal.Rows.sort	web2py.gluon.dal.Rows-class.html#sort
web2py.gluon.dal.Rows.__getitem__	web2py.gluon.dal.Rows-class.html#__getitem__
web2py.gluon.dal.Rows.as_dict	web2py.gluon.dal.Rows-class.html#as_dict
web2py.gluon.dal.Rows.__iter__	web2py.gluon.dal.Rows-class.html#__iter__
web2py.gluon.dal.Rows.__or__	web2py.gluon.dal.Rows-class.html#__or__
web2py.gluon.dal.Rows.last	web2py.gluon.dal.Rows-class.html#last
web2py.gluon.dal.Rows.__nonzero__	web2py.gluon.dal.Rows-class.html#__nonzero__
web2py.gluon.dal.Rows.as_list	web2py.gluon.dal.Rows-class.html#as_list
web2py.gluon.dal.Rows.first	web2py.gluon.dal.Rows-class.html#first
web2py.gluon.dal.SAPDBAdapter	web2py.gluon.dal.SAPDBAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.SAPDBAdapter.select_limitby	web2py.gluon.dal.SAPDBAdapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.SAPDBAdapter.support_distributed_transaction	web2py.gluon.dal.SAPDBAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.SAPDBAdapter.create_sequence_and_triggers	web2py.gluon.dal.SAPDBAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.SAPDBAdapter.types	web2py.gluon.dal.SAPDBAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.SAPDBAdapter.sequence_name	web2py.gluon.dal.SAPDBAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.SAPDBAdapter.__init__	web2py.gluon.dal.SAPDBAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.BaseAdapter.RANDOM	web2py.gluon.dal.BaseAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.SAPDBAdapter.driver	web2py.gluon.dal.SAPDBAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.SAPDBAdapter.lastrowid	web2py.gluon.dal.SAPDBAdapter-class.html#lastrowid
web2py.gluon.dal.SQLALL	web2py.gluon.dal.SQLALL-class.html
web2py.gluon.dal.SQLALL.__str__	web2py.gluon.dal.SQLALL-class.html#__str__
web2py.gluon.dal.SQLALL.__init__	web2py.gluon.dal.SQLALL-class.html#__init__
web2py.gluon.dal.SQLCallableList	web2py.gluon.dal.SQLCallableList-class.html
web2py.gluon.dal.SQLCallableList.__call__	web2py.gluon.dal.SQLCallableList-class.html#__call__
web2py.gluon.dal.SQLCustomType	web2py.gluon.dal.SQLCustomType-class.html
web2py.gluon.dal.SQLCustomType.startswith	web2py.gluon.dal.SQLCustomType-class.html#startswith
web2py.gluon.dal.SQLCustomType.__getslice__	web2py.gluon.dal.SQLCustomType-class.html#__getslice__
web2py.gluon.dal.SQLCustomType.__getitem__	web2py.gluon.dal.SQLCustomType-class.html#__getitem__
web2py.gluon.dal.SQLCustomType.__str__	web2py.gluon.dal.SQLCustomType-class.html#__str__
web2py.gluon.dal.SQLCustomType.__init__	web2py.gluon.dal.SQLCustomType-class.html#__init__
web2py.gluon.dal.SQLiteAdapter	web2py.gluon.dal.SQLiteAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.BaseAdapter.select_limitby	web2py.gluon.dal.BaseAdapter-class.html#select_limitby
web2py.gluon.dal.SQLiteAdapter._truncate	web2py.gluon.dal.SQLiteAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.BaseAdapter.LEFT_JOIN	web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.BaseAdapter.execute	web2py.gluon.dal.BaseAdapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.BaseAdapter.rowslice	web2py.gluon.dal.BaseAdapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.SQLiteAdapter.web2py_extract	web2py.gluon.dal.SQLiteAdapter-class.html#web2py_extract
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.BaseAdapter.types	web2py.gluon.dal.BaseAdapter-class.html#types
web2py.gluon.dal.SQLiteAdapter.EXTRACT	web2py.gluon.dal.SQLiteAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.BaseAdapter.represent_exceptions	web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.SQLiteAdapter.__init__	web2py.gluon.dal.SQLiteAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.BaseAdapter.RANDOM	web2py.gluon.dal.BaseAdapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.SQLiteAdapter.driver	sqlite3.dbapi2-module.html
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.SQLiteAdapter.lastrowid	web2py.gluon.dal.SQLiteAdapter-class.html#lastrowid
web2py.gluon.dal.Set	web2py.gluon.dal.Set-class.html
web2py.gluon.dal.Set.delete_uploaded_files	web2py.gluon.dal.Set-class.html#delete_uploaded_files
web2py.gluon.dal.Set._update	web2py.gluon.dal.Set-class.html#_update
web2py.gluon.dal.Set._delete	web2py.gluon.dal.Set-class.html#_delete
web2py.gluon.dal.Set.select	web2py.gluon.dal.Set-class.html#select
web2py.gluon.dal.Set.__init__	web2py.gluon.dal.Set-class.html#__init__
web2py.gluon.dal.Set.__call__	web2py.gluon.dal.Set-class.html#__call__
web2py.gluon.dal.Set.count	web2py.gluon.dal.Set-class.html#count
web2py.gluon.dal.Set.update	web2py.gluon.dal.Set-class.html#update
web2py.gluon.dal.Set.isempty	web2py.gluon.dal.Set-class.html#isempty
web2py.gluon.dal.Set.validate_and_update	web2py.gluon.dal.Set-class.html#validate_and_update
web2py.gluon.dal.Set._select	web2py.gluon.dal.Set-class.html#_select
web2py.gluon.dal.Set._count	web2py.gluon.dal.Set-class.html#_count
web2py.gluon.dal.Set.delete	web2py.gluon.dal.Set-class.html#delete
web2py.gluon.dal.Table	web2py.gluon.dal.Table-class.html
web2py.gluon.dal.Table._listify	web2py.gluon.dal.Table-class.html#_listify
web2py.gluon.dal.Table._validate	web2py.gluon.dal.Table-class.html#_validate
web2py.gluon.dal.Table.__str__	web2py.gluon.dal.Table-class.html#__str__
web2py.gluon.dal.Table._build_query	web2py.gluon.dal.Table-class.html#_build_query
web2py.gluon.dal.Table.__delitem__	web2py.gluon.dal.Table-class.html#__delitem__
web2py.gluon.dal.Table._truncate	web2py.gluon.dal.Table-class.html#_truncate
web2py.gluon.dal.Table.__init__	web2py.gluon.dal.Table-class.html#__init__
web2py.gluon.dal.Table.validate_and_insert	web2py.gluon.dal.Table-class.html#validate_and_insert
web2py.gluon.dal.Table.import_from_csv_file	web2py.gluon.dal.Table-class.html#import_from_csv_file
web2py.gluon.dal.Table.__setattr__	web2py.gluon.dal.Table-class.html#__setattr__
web2py.gluon.dal.Table.truncate	web2py.gluon.dal.Table-class.html#truncate
web2py.gluon.dal.Table.__getattr__	web2py.gluon.dal.Table-class.html#__getattr__
web2py.gluon.dal.Table._filter_fields	web2py.gluon.dal.Table-class.html#_filter_fields
web2py.gluon.dal.Table.with_alias	web2py.gluon.dal.Table-class.html#with_alias
web2py.gluon.dal.Table.__call__	web2py.gluon.dal.Table-class.html#__call__
web2py.gluon.dal.Table.__getitem__	web2py.gluon.dal.Table-class.html#__getitem__
web2py.gluon.dal.Table.on	web2py.gluon.dal.Table-class.html#on
web2py.gluon.dal.Table.bulk_insert	web2py.gluon.dal.Table-class.html#bulk_insert
web2py.gluon.dal.Table.__setitem__	web2py.gluon.dal.Table-class.html#__setitem__
web2py.gluon.dal.Table._drop	web2py.gluon.dal.Table-class.html#_drop
web2py.gluon.dal.Table.insert	web2py.gluon.dal.Table-class.html#insert
web2py.gluon.dal.Table.drop	web2py.gluon.dal.Table-class.html#drop
web2py.gluon.dal.Table.__iter__	web2py.gluon.dal.Table-class.html#__iter__
web2py.gluon.dal.Table.update_or_insert	web2py.gluon.dal.Table-class.html#update_or_insert
web2py.gluon.dal.Table.__repr__	web2py.gluon.dal.Table-class.html#__repr__
web2py.gluon.dal.Table._insert	web2py.gluon.dal.Table-class.html#_insert
web2py.gluon.dal.Table._create_references	web2py.gluon.dal.Table-class.html#_create_references
web2py.gluon.dal.TeradataAdapter	web2py.gluon.dal.TeradataAdapter-class.html
web2py.gluon.dal.BaseAdapter.represent	web2py.gluon.dal.BaseAdapter-class.html#represent
web2py.gluon.dal.BaseAdapter.log_execute	web2py.gluon.dal.BaseAdapter-class.html#log_execute
web2py.gluon.dal.DB2Adapter.select_limitby	web2py.gluon.dal.DB2Adapter-class.html#select_limitby
web2py.gluon.dal.BaseAdapter._truncate	web2py.gluon.dal.BaseAdapter-class.html#_truncate
web2py.gluon.dal.BaseAdapter.tables	web2py.gluon.dal.BaseAdapter-class.html#tables
web2py.gluon.dal.DB2Adapter.LEFT_JOIN	web2py.gluon.dal.DB2Adapter-class.html#LEFT_JOIN
web2py.gluon.dal.BaseAdapter.distributed_transaction_begin	web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin
web2py.gluon.dal.BaseAdapter.GT	web2py.gluon.dal.BaseAdapter-class.html#GT
web2py.gluon.dal.BaseAdapter.rollback	web2py.gluon.dal.BaseAdapter-class.html#rollback
web2py.gluon.dal.BaseAdapter.ON	web2py.gluon.dal.BaseAdapter-class.html#ON
web2py.gluon.dal.BaseAdapter.ALLOW_NULL	web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL
web2py.gluon.dal.BaseAdapter.maxcharlength	web2py.gluon.dal.BaseAdapter-class.html#maxcharlength
web2py.gluon.dal.BaseAdapter.GE	web2py.gluon.dal.BaseAdapter-class.html#GE
web2py.gluon.dal.BaseAdapter.get_table	web2py.gluon.dal.BaseAdapter-class.html#get_table
web2py.gluon.dal.BaseAdapter._drop	web2py.gluon.dal.BaseAdapter-class.html#_drop
web2py.gluon.dal.BaseAdapter.integrity_error_class	web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class
web2py.gluon.dal.ConnectionPool.pool_connection	web2py.gluon.dal.ConnectionPool-class.html#pool_connection
web2py.gluon.dal.BaseAdapter._select	web2py.gluon.dal.BaseAdapter-class.html#_select
web2py.gluon.dal.BaseAdapter.insert	web2py.gluon.dal.BaseAdapter-class.html#insert
web2py.gluon.dal.DB2Adapter.execute	web2py.gluon.dal.DB2Adapter-class.html#execute
web2py.gluon.dal.BaseAdapter.drop	web2py.gluon.dal.BaseAdapter-class.html#drop
web2py.gluon.dal.BaseAdapter.migrate_table	web2py.gluon.dal.BaseAdapter-class.html#migrate_table
web2py.gluon.dal.BaseAdapter.concat_add	web2py.gluon.dal.BaseAdapter-class.html#concat_add
web2py.gluon.dal.BaseAdapter._insert	web2py.gluon.dal.BaseAdapter-class.html#_insert
web2py.gluon.dal.ConnectionPool.pools	web2py.gluon.dal.ConnectionPool-class.html#pools
web2py.gluon.dal.BaseAdapter.support_distributed_transaction	web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction
web2py.gluon.dal.BaseAdapter.OR	web2py.gluon.dal.BaseAdapter-class.html#OR
web2py.gluon.dal.BaseAdapter.file_delete	web2py.gluon.dal.BaseAdapter-class.html#file_delete
web2py.gluon.dal.BaseAdapter.NOT_NULL	web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL
web2py.gluon.dal.ConnectionPool.find_or_make_work_folder	web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder
web2py.gluon.dal.BaseAdapter.close	web2py.gluon.dal.BaseAdapter-class.html#close
web2py.gluon.dal.BaseAdapter.integrity_error	web2py.gluon.dal.BaseAdapter-class.html#integrity_error
web2py.gluon.dal.DB2Adapter.rowslice	web2py.gluon.dal.DB2Adapter-class.html#rowslice
web2py.gluon.dal.BaseAdapter.create_sequence_and_triggers	web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers
web2py.gluon.dal.BaseAdapter.rollback_prepared	web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared
web2py.gluon.dal.BaseAdapter.commit_prepared	web2py.gluon.dal.BaseAdapter-class.html#commit_prepared
web2py.gluon.dal.BaseAdapter.EQ	web2py.gluon.dal.BaseAdapter-class.html#EQ
web2py.gluon.dal.BaseAdapter.AND	web2py.gluon.dal.BaseAdapter-class.html#AND
web2py.gluon.dal.BaseAdapter.uploads_in_blob	web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob
web2py.gluon.dal.BaseAdapter.NOT	web2py.gluon.dal.BaseAdapter-class.html#NOT
web2py.gluon.dal.BaseAdapter.commit	web2py.gluon.dal.BaseAdapter-class.html#commit
web2py.gluon.dal.BaseAdapter.MOD	web2py.gluon.dal.BaseAdapter-class.html#MOD
web2py.gluon.dal.BaseAdapter.STARTSWITH	web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH
web2py.gluon.dal.BaseAdapter.SUB	web2py.gluon.dal.BaseAdapter-class.html#SUB
web2py.gluon.dal.BaseAdapter.COALESCE_ZERO	web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO
web2py.gluon.dal.BaseAdapter._delete	web2py.gluon.dal.BaseAdapter-class.html#_delete
web2py.gluon.dal.BaseAdapter.BELONGS	web2py.gluon.dal.BaseAdapter-class.html#BELONGS
web2py.gluon.dal.BaseAdapter.MUL	web2py.gluon.dal.BaseAdapter-class.html#MUL
web2py.gluon.dal.BaseAdapter.select	web2py.gluon.dal.BaseAdapter-class.html#select
web2py.gluon.dal.BaseAdapter.PRIMARY_KEY	web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY
web2py.gluon.dal.BaseAdapter.prepare	web2py.gluon.dal.BaseAdapter-class.html#prepare
web2py.gluon.dal.BaseAdapter.NE	web2py.gluon.dal.BaseAdapter-class.html#NE
web2py.gluon.dal.BaseAdapter.SUBSTRING	web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING
web2py.gluon.dal.TeradataAdapter.types	web2py.gluon.dal.TeradataAdapter-class.html#types
web2py.gluon.dal.BaseAdapter.EXTRACT	web2py.gluon.dal.BaseAdapter-class.html#EXTRACT
web2py.gluon.dal.BaseAdapter.commit_on_alter_table	web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table
web2py.gluon.dal.DB2Adapter.represent_exceptions	web2py.gluon.dal.DB2Adapter-class.html#represent_exceptions
web2py.gluon.dal.BaseAdapter.sequence_name	web2py.gluon.dal.BaseAdapter-class.html#sequence_name
web2py.gluon.dal.BaseAdapter.ADD	web2py.gluon.dal.BaseAdapter-class.html#ADD
web2py.gluon.dal.BaseAdapter.count	web2py.gluon.dal.BaseAdapter-class.html#count
web2py.gluon.dal.BaseAdapter.UPPER	web2py.gluon.dal.BaseAdapter-class.html#UPPER
web2py.gluon.dal.BaseAdapter.JOIN	web2py.gluon.dal.BaseAdapter-class.html#JOIN
web2py.gluon.dal.BaseAdapter.LIKE	web2py.gluon.dal.BaseAdapter-class.html#LIKE
web2py.gluon.dal.ConnectionPool.close_all_instances	web2py.gluon.dal.ConnectionPool-class.html#close_all_instances
web2py.gluon.dal.BaseAdapter.file_exists	web2py.gluon.dal.BaseAdapter-class.html#file_exists
web2py.gluon.dal.BaseAdapter.delete	web2py.gluon.dal.BaseAdapter-class.html#delete
web2py.gluon.dal.BaseAdapter.LOWER	web2py.gluon.dal.BaseAdapter-class.html#LOWER
web2py.gluon.dal.BaseAdapter._update	web2py.gluon.dal.BaseAdapter-class.html#_update
web2py.gluon.dal.BaseAdapter.parse	web2py.gluon.dal.BaseAdapter-class.html#parse
web2py.gluon.dal.BaseAdapter.ENDSWITH	web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH
web2py.gluon.dal.BaseAdapter.constraint_name	web2py.gluon.dal.BaseAdapter-class.html#constraint_name
web2py.gluon.dal.BaseAdapter.DIV	web2py.gluon.dal.BaseAdapter-class.html#DIV
web2py.gluon.dal.TeradataAdapter.__init__	web2py.gluon.dal.TeradataAdapter-class.html#__init__
web2py.gluon.dal.BaseAdapter.filter_tenant	web2py.gluon.dal.BaseAdapter-class.html#filter_tenant
web2py.gluon.dal.BaseAdapter.LE	web2py.gluon.dal.BaseAdapter-class.html#LE
web2py.gluon.dal.BaseAdapter.file_open	web2py.gluon.dal.BaseAdapter-class.html#file_open
web2py.gluon.dal.ConnectionPool.set_folder	web2py.gluon.dal.ConnectionPool-class.html#set_folder
web2py.gluon.dal.BaseAdapter.LT	web2py.gluon.dal.BaseAdapter-class.html#LT
web2py.gluon.dal.BaseAdapter.COMMA	web2py.gluon.dal.BaseAdapter-class.html#COMMA
web2py.gluon.dal.BaseAdapter.create_table	web2py.gluon.dal.BaseAdapter-class.html#create_table
web2py.gluon.dal.BaseAdapter.bulk_insert	web2py.gluon.dal.BaseAdapter-class.html#bulk_insert
web2py.gluon.dal.BaseAdapter.AGGREGATE	web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE
web2py.gluon.dal.BaseAdapter.file_close	web2py.gluon.dal.BaseAdapter-class.html#file_close
web2py.gluon.dal.DB2Adapter.RANDOM	web2py.gluon.dal.DB2Adapter-class.html#RANDOM
web2py.gluon.dal.BaseAdapter.truncate	web2py.gluon.dal.BaseAdapter-class.html#truncate
web2py.gluon.dal.TeradataAdapter.driver	web2py.gluon.dal.TeradataAdapter-class.html#driver
web2py.gluon.dal.BaseAdapter.update	web2py.gluon.dal.BaseAdapter-class.html#update
web2py.gluon.dal.BaseAdapter.AS	web2py.gluon.dal.BaseAdapter-class.html#AS
web2py.gluon.dal.BaseAdapter.trigger_name	web2py.gluon.dal.BaseAdapter-class.html#trigger_name
web2py.gluon.dal.BaseAdapter.expand	web2py.gluon.dal.BaseAdapter-class.html#expand
web2py.gluon.dal.BaseAdapter._count	web2py.gluon.dal.BaseAdapter-class.html#_count
web2py.gluon.dal.BaseAdapter.CONTAINS	web2py.gluon.dal.BaseAdapter-class.html#CONTAINS
web2py.gluon.dal.BaseAdapter.INVERT	web2py.gluon.dal.BaseAdapter-class.html#INVERT
web2py.gluon.dal.BaseAdapter.alias	web2py.gluon.dal.BaseAdapter-class.html#alias
web2py.gluon.dal.DB2Adapter.lastrowid	web2py.gluon.dal.DB2Adapter-class.html#lastrowid
web2py.gluon.dal.UseDatabaseStoredFile	web2py.gluon.dal.UseDatabaseStoredFile-class.html
web2py.gluon.dal.UseDatabaseStoredFile.file_close	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_close
web2py.gluon.dal.UseDatabaseStoredFile.file_exists	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_exists
web2py.gluon.dal.UseDatabaseStoredFile.file_delete	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_delete
web2py.gluon.dal.UseDatabaseStoredFile.file_open	web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_open
web2py.gluon.debug.Pipe	web2py.gluon.debug.Pipe-class.html
web2py.gluon.debug.Pipe.read	web2py.gluon.debug.Pipe-class.html#read
web2py.gluon.debug.Pipe.write	web2py.gluon.debug.Pipe-class.html#write
web2py.gluon.debug.Pipe.flush	web2py.gluon.debug.Pipe-class.html#flush
web2py.gluon.debug.Pipe.readline	web2py.gluon.debug.Pipe-class.html#readline
web2py.gluon.debug.Pipe.__init__	web2py.gluon.debug.Pipe-class.html#__init__
web2py.gluon.globals.Request	web2py.gluon.globals.Request-class.html
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.globals.Request.__init__	web2py.gluon.globals.Request-class.html#__init__
web2py.gluon.storage.Storage.__setattr__	web2py.gluon.storage.Storage-class.html#__setattr__
web2py.gluon.storage.Storage.__getattr__	web2py.gluon.storage.Storage-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.globals.Request.compute_uuid	web2py.gluon.globals.Request-class.html#compute_uuid
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.globals.Request.user_agent	web2py.gluon.globals.Request-class.html#user_agent
web2py.gluon.globals.Request.restful	web2py.gluon.globals.Request-class.html#restful
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.globals.Response	web2py.gluon.globals.Response-class.html
web2py.gluon.globals.Response.render	web2py.gluon.globals.Response-class.html#render
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.globals.Response.download	web2py.gluon.globals.Response-class.html#download
web2py.gluon.globals.Response.__init__	web2py.gluon.globals.Response-class.html#__init__
web2py.gluon.storage.Storage.__setattr__	web2py.gluon.storage.Storage-class.html#__setattr__
web2py.gluon.globals.Response.stream	web2py.gluon.globals.Response-class.html#stream
web2py.gluon.storage.Storage.__getattr__	web2py.gluon.storage.Storage-class.html#__getattr__
web2py.gluon.globals.Response.write	web2py.gluon.globals.Response-class.html#write
web2py.gluon.globals.Response.json	web2py.gluon.globals.Response-class.html#json
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.globals.Response.xmlrpc	web2py.gluon.globals.Response-class.html#xmlrpc
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.globals.Response.toolbar	web2py.gluon.globals.Response-class.html#toolbar
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.globals.Session	web2py.gluon.globals.Session-class.html
web2py.gluon.globals.Session.forget	web2py.gluon.globals.Session-class.html#forget
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.globals.Session.is_new	web2py.gluon.globals.Session-class.html#is_new
web2py.gluon.globals.Session.connect	web2py.gluon.globals.Session-class.html#connect
web2py.gluon.globals.Session._try_store_in_db	web2py.gluon.globals.Session-class.html#_try_store_in_db
web2py.gluon.globals.Session.secure	web2py.gluon.globals.Session-class.html#secure
web2py.gluon.storage.Storage.__setattr__	web2py.gluon.storage.Storage-class.html#__setattr__
web2py.gluon.storage.Storage.__getattr__	web2py.gluon.storage.Storage-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.globals.Session._close	web2py.gluon.globals.Session-class.html#_close
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.globals.Session._unlock	web2py.gluon.globals.Session-class.html#_unlock
web2py.gluon.globals.Session._try_store_on_disk	web2py.gluon.globals.Session-class.html#_try_store_on_disk
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.globals.Session.is_expired	web2py.gluon.globals.Session-class.html#is_expired
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.highlight.Highlighter	web2py.gluon.highlight.Highlighter-class.html
web2py.gluon.highlight.Highlighter.python_tokenizer	web2py.gluon.highlight.Highlighter-class.html#python_tokenizer
web2py.gluon.highlight.Highlighter.c_tokenizer	web2py.gluon.highlight.Highlighter-class.html#c_tokenizer
web2py.gluon.highlight.Highlighter.html_tokenizer	web2py.gluon.highlight.Highlighter-class.html#html_tokenizer
web2py.gluon.highlight.Highlighter.all_styles	web2py.gluon.highlight.Highlighter-class.html#all_styles
web2py.gluon.highlight.Highlighter.change_style	web2py.gluon.highlight.Highlighter-class.html#change_style
web2py.gluon.highlight.Highlighter.highlight	web2py.gluon.highlight.Highlighter-class.html#highlight
web2py.gluon.highlight.Highlighter.__init__	web2py.gluon.highlight.Highlighter-class.html#__init__
web2py.gluon.html.A	web2py.gluon.html.A-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.A.tag	web2py.gluon.html.A-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.A.xml	web2py.gluon.html.A-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.B	web2py.gluon.html.B-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.B.tag	web2py.gluon.html.B-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.BEAUTIFY	web2py.gluon.html.BEAUTIFY-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.BEAUTIFY.tag	web2py.gluon.html.BEAUTIFY-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.BEAUTIFY.__init__	web2py.gluon.html.BEAUTIFY-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.BEAUTIFY.no_underscore	web2py.gluon.html.BEAUTIFY-class.html#no_underscore
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.BODY	web2py.gluon.html.BODY-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.BODY.tag	web2py.gluon.html.BODY-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.BR	web2py.gluon.html.BR-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.BR.tag	web2py.gluon.html.BR-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.BUTTON	web2py.gluon.html.BUTTON-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.BUTTON.tag	web2py.gluon.html.BUTTON-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.CAT	web2py.gluon.html.CAT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.CAT.tag	web2py.gluon.html.CAT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.CENTER	web2py.gluon.html.CENTER-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.CENTER.tag	web2py.gluon.html.CENTER-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.CODE	web2py.gluon.html.CODE-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.DIV.tag	web2py.gluon.html.DIV-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.CODE.xml	web2py.gluon.html.CODE-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.COL	web2py.gluon.html.COL-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.COL.tag	web2py.gluon.html.COL-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.COLGROUP	web2py.gluon.html.COLGROUP-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.COLGROUP.tag	web2py.gluon.html.COLGROUP-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.DIV	web2py.gluon.html.DIV-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.DIV.tag	web2py.gluon.html.DIV-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.EM	web2py.gluon.html.EM-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.EM.tag	web2py.gluon.html.EM-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.EMBED	web2py.gluon.html.EMBED-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.EMBED.tag	web2py.gluon.html.EMBED-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.FIELDSET	web2py.gluon.html.FIELDSET-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.FIELDSET.tag	web2py.gluon.html.FIELDSET-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.FORM	web2py.gluon.html.FORM-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.FORM.process	web2py.gluon.html.FORM-class.html#process
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.FORM.tag	web2py.gluon.html.FORM-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.FORM.xml	web2py.gluon.html.FORM-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.FORM.__init__	web2py.gluon.html.FORM-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.FORM._postprocessing	web2py.gluon.html.FORM-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.FORM.validate	web2py.gluon.html.FORM-class.html#validate
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.FORM.accepts	web2py.gluon.html.FORM-class.html#accepts
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.FORM.hidden_fields	web2py.gluon.html.FORM-class.html#hidden_fields
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.H1	web2py.gluon.html.H1-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.H1.tag	web2py.gluon.html.H1-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.H2	web2py.gluon.html.H2-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.H2.tag	web2py.gluon.html.H2-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.H3	web2py.gluon.html.H3-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.H3.tag	web2py.gluon.html.H3-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.H4	web2py.gluon.html.H4-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.H4.tag	web2py.gluon.html.H4-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.H5	web2py.gluon.html.H5-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.H5.tag	web2py.gluon.html.H5-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.H6	web2py.gluon.html.H6-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.H6.tag	web2py.gluon.html.H6-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.HEAD	web2py.gluon.html.HEAD-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.HEAD.tag	web2py.gluon.html.HEAD-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.HR	web2py.gluon.html.HR-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.HR.tag	web2py.gluon.html.HR-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.HTML	web2py.gluon.html.HTML-class.html
web2py.gluon.html.HTML.frameset	web2py.gluon.html.HTML-class.html#frameset
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.HTML.tag	web2py.gluon.html.HTML-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.HTML.xml	web2py.gluon.html.HTML-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.HTML.strict	web2py.gluon.html.HTML-class.html#strict
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.HTML.html5	web2py.gluon.html.HTML-class.html#html5
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.HTML.transitional	web2py.gluon.html.HTML-class.html#transitional
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.I	web2py.gluon.html.I-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.I.tag	web2py.gluon.html.I-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.IFRAME	web2py.gluon.html.IFRAME-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.IFRAME.tag	web2py.gluon.html.IFRAME-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.IMG	web2py.gluon.html.IMG-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.IMG.tag	web2py.gluon.html.IMG-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.INPUT	web2py.gluon.html.INPUT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.INPUT._validate	web2py.gluon.html.INPUT-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.INPUT.tag	web2py.gluon.html.INPUT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.INPUT.xml	web2py.gluon.html.INPUT-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.INPUT._postprocessing	web2py.gluon.html.INPUT-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.LABEL	web2py.gluon.html.LABEL-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.LABEL.tag	web2py.gluon.html.LABEL-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.LEGEND	web2py.gluon.html.LEGEND-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.LEGEND.tag	web2py.gluon.html.LEGEND-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.LI	web2py.gluon.html.LI-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.LI.tag	web2py.gluon.html.LI-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.LINK	web2py.gluon.html.LINK-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.LINK.tag	web2py.gluon.html.LINK-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.MARKMIN	web2py.gluon.html.MARKMIN-class.html
web2py.gluon.html.MARKMIN.xml	web2py.gluon.html.MARKMIN-class.html#xml
web2py.gluon.html.MARKMIN.elements	web2py.gluon.html.MARKMIN-class.html#elements
web2py.gluon.html.MARKMIN.__str__	web2py.gluon.html.MARKMIN-class.html#__str__
web2py.gluon.html.MARKMIN.flatten	web2py.gluon.html.MARKMIN-class.html#flatten
web2py.gluon.html.MARKMIN.__init__	web2py.gluon.html.MARKMIN-class.html#__init__
web2py.gluon.html.MENU	web2py.gluon.html.MENU-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.MENU.serialize	web2py.gluon.html.MENU-class.html#serialize
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.MENU.tag	web2py.gluon.html.MENU-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.MENU.xml	web2py.gluon.html.MENU-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.MENU.__init__	web2py.gluon.html.MENU-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.META	web2py.gluon.html.META-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.META.tag	web2py.gluon.html.META-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.OBJECT	web2py.gluon.html.OBJECT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.OBJECT.tag	web2py.gluon.html.OBJECT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.OL	web2py.gluon.html.OL-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.OL.tag	web2py.gluon.html.OL-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.UL._fixup	web2py.gluon.html.UL-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.OPTGROUP	web2py.gluon.html.OPTGROUP-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.OPTGROUP.tag	web2py.gluon.html.OPTGROUP-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.OPTGROUP._fixup	web2py.gluon.html.OPTGROUP-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.OPTION	web2py.gluon.html.OPTION-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.OPTION.tag	web2py.gluon.html.OPTION-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.OPTION._fixup	web2py.gluon.html.OPTION-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.P	web2py.gluon.html.P-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.P.tag	web2py.gluon.html.P-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.P.xml	web2py.gluon.html.P-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.PRE	web2py.gluon.html.PRE-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.PRE.tag	web2py.gluon.html.PRE-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.SCRIPT	web2py.gluon.html.SCRIPT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.SCRIPT.tag	web2py.gluon.html.SCRIPT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.SCRIPT.xml	web2py.gluon.html.SCRIPT-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.SELECT	web2py.gluon.html.SELECT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.INPUT._validate	web2py.gluon.html.INPUT-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.SELECT.tag	web2py.gluon.html.SELECT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.SELECT._fixup	web2py.gluon.html.SELECT-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.INPUT.xml	web2py.gluon.html.INPUT-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.SELECT._postprocessing	web2py.gluon.html.SELECT-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.SPAN	web2py.gluon.html.SPAN-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.SPAN.tag	web2py.gluon.html.SPAN-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.STYLE	web2py.gluon.html.STYLE-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.STYLE.tag	web2py.gluon.html.STYLE-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.STYLE.xml	web2py.gluon.html.STYLE-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TABLE	web2py.gluon.html.TABLE-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TABLE.tag	web2py.gluon.html.TABLE-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.TABLE._fixup	web2py.gluon.html.TABLE-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TBODY	web2py.gluon.html.TBODY-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TBODY.tag	web2py.gluon.html.TBODY-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.TBODY._fixup	web2py.gluon.html.TBODY-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TD	web2py.gluon.html.TD-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TD.tag	web2py.gluon.html.TD-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TEXTAREA	web2py.gluon.html.TEXTAREA-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.INPUT._validate	web2py.gluon.html.INPUT-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TEXTAREA.tag	web2py.gluon.html.TEXTAREA-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.INPUT.xml	web2py.gluon.html.INPUT-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.TEXTAREA._postprocessing	web2py.gluon.html.TEXTAREA-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TFOOT	web2py.gluon.html.TFOOT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TFOOT.tag	web2py.gluon.html.TFOOT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.TFOOT._fixup	web2py.gluon.html.TFOOT-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TH	web2py.gluon.html.TH-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TH.tag	web2py.gluon.html.TH-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.THEAD	web2py.gluon.html.THEAD-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.THEAD.tag	web2py.gluon.html.THEAD-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.THEAD._fixup	web2py.gluon.html.THEAD-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TITLE	web2py.gluon.html.TITLE-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TITLE.tag	web2py.gluon.html.TITLE-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TR	web2py.gluon.html.TR-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TR.tag	web2py.gluon.html.TR-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.TR._fixup	web2py.gluon.html.TR-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.TT	web2py.gluon.html.TT-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TT.tag	web2py.gluon.html.TT-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.UL	web2py.gluon.html.UL-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.UL.tag	web2py.gluon.html.UL-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.UL._fixup	web2py.gluon.html.UL-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.XHTML	web2py.gluon.html.XHTML-class.html
web2py.gluon.html.XHTML.frameset	web2py.gluon.html.XHTML-class.html#frameset
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.XHTML.tag	web2py.gluon.html.XHTML-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.XHTML.xml	web2py.gluon.html.XHTML-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.XHTML.strict	web2py.gluon.html.XHTML-class.html#strict
web2py.gluon.html.DIV.__init__	web2py.gluon.html.DIV-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.XHTML.xmlns	web2py.gluon.html.XHTML-class.html#xmlns
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.XHTML.transitional	web2py.gluon.html.XHTML-class.html#transitional
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.html.XML	web2py.gluon.html.XML-class.html
web2py.gluon.html.XML.__getslice__	web2py.gluon.html.XML-class.html#__getslice__
web2py.gluon.html.XML.__str__	web2py.gluon.html.XML-class.html#__str__
web2py.gluon.html.XML.__radd__	web2py.gluon.html.XML-class.html#__radd__
web2py.gluon.html.XML.flatten	web2py.gluon.html.XML-class.html#flatten
web2py.gluon.html.XML.__init__	web2py.gluon.html.XML-class.html#__init__
web2py.gluon.html.XML.xml	web2py.gluon.html.XML-class.html#xml
web2py.gluon.html.XML.__getattr__	web2py.gluon.html.XML-class.html#__getattr__
web2py.gluon.html.XML.__cmp__	web2py.gluon.html.XML-class.html#__cmp__
web2py.gluon.html.XML.__len__	web2py.gluon.html.XML-class.html#__len__
web2py.gluon.html.XML.elements	web2py.gluon.html.XML-class.html#elements
web2py.gluon.html.XML.__getitem__	web2py.gluon.html.XML-class.html#__getitem__
web2py.gluon.html.XML.__iter__	web2py.gluon.html.XML-class.html#__iter__
web2py.gluon.html.XML.__add__	web2py.gluon.html.XML-class.html#__add__
web2py.gluon.html.XML.__hash__	web2py.gluon.html.XML-class.html#__hash__
web2py.gluon.html.XmlComponent	web2py.gluon.html.XmlComponent-class.html
web2py.gluon.html.XmlComponent.xml	web2py.gluon.html.XmlComponent-class.html#xml
web2py.gluon.html.__TAG__	web2py.gluon.html.__TAG__-class.html
web2py.gluon.html.XmlComponent.xml	web2py.gluon.html.XmlComponent-class.html#xml
web2py.gluon.html.__TAG__.__getitem__	web2py.gluon.html.__TAG__-class.html#__getitem__
web2py.gluon.html.__TAG__.__getattr__	web2py.gluon.html.__TAG__-class.html#__getattr__
web2py.gluon.html.__TAG__.__call__	web2py.gluon.html.__TAG__-class.html#__call__
web2py.gluon.html.web2pyHTMLParser	web2py.gluon.html.web2pyHTMLParser-class.html
web2py.gluon.html.web2pyHTMLParser.handle_entityref	web2py.gluon.html.web2pyHTMLParser-class.html#handle_entityref
web2py.gluon.html.web2pyHTMLParser.handle_starttag	web2py.gluon.html.web2pyHTMLParser-class.html#handle_starttag
web2py.gluon.html.web2pyHTMLParser.__init__	web2py.gluon.html.web2pyHTMLParser-class.html#__init__
web2py.gluon.html.web2pyHTMLParser.handle_endtag	web2py.gluon.html.web2pyHTMLParser-class.html#handle_endtag
web2py.gluon.html.web2pyHTMLParser.handle_charref	web2py.gluon.html.web2pyHTMLParser-class.html#handle_charref
web2py.gluon.html.web2pyHTMLParser.handle_data	web2py.gluon.html.web2pyHTMLParser-class.html#handle_data
web2py.gluon.http.HTTP	web2py.gluon.http.HTTP-class.html
web2py.gluon.http.HTTP.__str__	web2py.gluon.http.HTTP-class.html#__str__
web2py.gluon.http.HTTP.to	web2py.gluon.http.HTTP-class.html#to
web2py.gluon.http.HTTP.message	web2py.gluon.http.HTTP-class.html#message
web2py.gluon.http.HTTP.__init__	web2py.gluon.http.HTTP-class.html#__init__
web2py.gluon.languages.lazyT	web2py.gluon.languages.lazyT-class.html
web2py.gluon.languages.lazyT.__getslice__	web2py.gluon.languages.lazyT-class.html#__getslice__
web2py.gluon.languages.lazyT.__str__	web2py.gluon.languages.lazyT-class.html#__str__
web2py.gluon.languages.lazyT.__radd__	web2py.gluon.languages.lazyT-class.html#__radd__
web2py.gluon.languages.lazyT.__init__	web2py.gluon.languages.lazyT-class.html#__init__
web2py.gluon.languages.lazyT.xml	web2py.gluon.languages.lazyT-class.html#xml
web2py.gluon.languages.lazyT.__getattr__	web2py.gluon.languages.lazyT-class.html#__getattr__
web2py.gluon.languages.lazyT.__cmp__	web2py.gluon.languages.lazyT-class.html#__cmp__
web2py.gluon.languages.lazyT.decode	web2py.gluon.languages.lazyT-class.html#decode
web2py.gluon.languages.lazyT.encode	web2py.gluon.languages.lazyT-class.html#encode
web2py.gluon.languages.lazyT.__len__	web2py.gluon.languages.lazyT-class.html#__len__
web2py.gluon.languages.lazyT.__ne__	web2py.gluon.languages.lazyT-class.html#__ne__
web2py.gluon.languages.lazyT.__getitem__	web2py.gluon.languages.lazyT-class.html#__getitem__
web2py.gluon.languages.lazyT.read	web2py.gluon.languages.lazyT-class.html#read
web2py.gluon.languages.lazyT.__iter__	web2py.gluon.languages.lazyT-class.html#__iter__
web2py.gluon.languages.lazyT.T	web2py.gluon.languages.lazyT-class.html#T
web2py.gluon.languages.lazyT.__add__	web2py.gluon.languages.lazyT-class.html#__add__
web2py.gluon.languages.lazyT.__eq__	web2py.gluon.languages.lazyT-class.html#__eq__
web2py.gluon.languages.lazyT.__mod__	web2py.gluon.languages.lazyT-class.html#__mod__
web2py.gluon.languages.lazyT.m	web2py.gluon.languages.lazyT-class.html#m
web2py.gluon.languages.lazyT.s	web2py.gluon.languages.lazyT-class.html#s
web2py.gluon.languages.lazyT.__repr__	web2py.gluon.languages.lazyT-class.html#__repr__
web2py.gluon.languages.lazyT.__hash__	web2py.gluon.languages.lazyT-class.html#__hash__
web2py.gluon.languages.translator	web2py.gluon.languages.translator-class.html
web2py.gluon.languages.translator.force	web2py.gluon.languages.translator-class.html#force
web2py.gluon.languages.translator.get_possible_languages	web2py.gluon.languages.translator-class.html#get_possible_languages
web2py.gluon.languages.translator.__call__	web2py.gluon.languages.translator-class.html#__call__
web2py.gluon.languages.translator.translate	web2py.gluon.languages.translator-class.html#translate
web2py.gluon.languages.translator.__init__	web2py.gluon.languages.translator-class.html#__init__
web2py.gluon.languages.translator.set_current_languages	web2py.gluon.languages.translator-class.html#set_current_languages
web2py.gluon.main.HttpServer	web2py.gluon.main.HttpServer-class.html
web2py.gluon.main.HttpServer.stop	web2py.gluon.main.HttpServer-class.html#stop
web2py.gluon.main.HttpServer.start	web2py.gluon.main.HttpServer-class.html#start
web2py.gluon.main.HttpServer.__init__	web2py.gluon.main.HttpServer-class.html#__init__
web2py.gluon.newcron.Token	web2py.gluon.newcron.Token-class.html
web2py.gluon.newcron.Token.acquire	web2py.gluon.newcron.Token-class.html#acquire
web2py.gluon.newcron.Token.release	web2py.gluon.newcron.Token-class.html#release
web2py.gluon.newcron.Token.__init__	web2py.gluon.newcron.Token-class.html#__init__
web2py.gluon.newcron.cronlauncher	web2py.gluon.newcron.cronlauncher-class.html
web2py.gluon.newcron.cronlauncher.run	web2py.gluon.newcron.cronlauncher-class.html#run
web2py.gluon.newcron.cronlauncher.__init__	web2py.gluon.newcron.cronlauncher-class.html#__init__
web2py.gluon.newcron.extcron	web2py.gluon.newcron.extcron-class.html
web2py.gluon.newcron.extcron.run	web2py.gluon.newcron.extcron-class.html#run
web2py.gluon.newcron.extcron.__init__	web2py.gluon.newcron.extcron-class.html#__init__
web2py.gluon.newcron.hardcron	web2py.gluon.newcron.hardcron-class.html
web2py.gluon.newcron.hardcron.run	web2py.gluon.newcron.hardcron-class.html#run
web2py.gluon.newcron.hardcron.__init__	web2py.gluon.newcron.hardcron-class.html#__init__
web2py.gluon.newcron.hardcron.launch	web2py.gluon.newcron.hardcron-class.html#launch
web2py.gluon.newcron.softcron	web2py.gluon.newcron.softcron-class.html
web2py.gluon.newcron.softcron.run	web2py.gluon.newcron.softcron-class.html#run
web2py.gluon.newcron.softcron.__init__	web2py.gluon.newcron.softcron-class.html#__init__
web2py.gluon.restricted.RestrictedError	web2py.gluon.restricted.RestrictedError-class.html
web2py.gluon.restricted.RestrictedError.load	web2py.gluon.restricted.RestrictedError-class.html#load
web2py.gluon.restricted.RestrictedError.log	web2py.gluon.restricted.RestrictedError-class.html#log
web2py.gluon.restricted.RestrictedError.__init__	web2py.gluon.restricted.RestrictedError-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.restricted.TicketStorage	web2py.gluon.restricted.TicketStorage-class.html
web2py.gluon.restricted.TicketStorage.load	web2py.gluon.restricted.TicketStorage-class.html#load
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.restricted.TicketStorage.__init__	web2py.gluon.restricted.TicketStorage-class.html#__init__
web2py.gluon.storage.Storage.__setattr__	web2py.gluon.storage.Storage-class.html#__setattr__
web2py.gluon.storage.Storage.__getattr__	web2py.gluon.storage.Storage-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.restricted.TicketStorage.store	web2py.gluon.restricted.TicketStorage-class.html#store
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.restricted.TicketStorage._error_file	web2py.gluon.restricted.TicketStorage-class.html#_error_file
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.restricted.TicketStorage._get_table	web2py.gluon.restricted.TicketStorage-class.html#_get_table
web2py.gluon.restricted.TicketStorage._store_on_disk	web2py.gluon.restricted.TicketStorage-class.html#_store_on_disk
web2py.gluon.restricted.TicketStorage._store_in_db	web2py.gluon.restricted.TicketStorage-class.html#_store_in_db
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.rewrite.MapUrlIn	web2py.gluon.rewrite.MapUrlIn-class.html
web2py.gluon.rewrite.MapUrlIn.map_controller	web2py.gluon.rewrite.MapUrlIn-class.html#map_controller
web2py.gluon.rewrite.MapUrlIn.validate_args	web2py.gluon.rewrite.MapUrlIn-class.html#validate_args
web2py.gluon.rewrite.MapUrlIn.arg0	web2py.gluon.rewrite.MapUrlIn-class.html#arg0
web2py.gluon.rewrite.MapUrlIn.map_static	web2py.gluon.rewrite.MapUrlIn-class.html#map_static
web2py.gluon.rewrite.MapUrlIn.map_language	web2py.gluon.rewrite.MapUrlIn-class.html#map_language
web2py.gluon.rewrite.MapUrlIn.map_app	web2py.gluon.rewrite.MapUrlIn-class.html#map_app
web2py.gluon.rewrite.MapUrlIn.__init__	web2py.gluon.rewrite.MapUrlIn-class.html#__init__
web2py.gluon.rewrite.MapUrlIn.map_prefix	web2py.gluon.rewrite.MapUrlIn-class.html#map_prefix
web2py.gluon.rewrite.MapUrlIn.update_request	web2py.gluon.rewrite.MapUrlIn-class.html#update_request
web2py.gluon.rewrite.MapUrlIn.map_function	web2py.gluon.rewrite.MapUrlIn-class.html#map_function
web2py.gluon.rewrite.MapUrlIn.map_root_static	web2py.gluon.rewrite.MapUrlIn-class.html#map_root_static
web2py.gluon.rewrite.MapUrlIn.harg0	web2py.gluon.rewrite.MapUrlIn-class.html#harg0
web2py.gluon.rewrite.MapUrlIn.pop_arg_if	web2py.gluon.rewrite.MapUrlIn-class.html#pop_arg_if
web2py.gluon.rewrite.MapUrlOut	web2py.gluon.rewrite.MapUrlOut-class.html
web2py.gluon.rewrite.MapUrlOut.acf	web2py.gluon.rewrite.MapUrlOut-class.html#acf
web2py.gluon.rewrite.MapUrlOut.omit_lang	web2py.gluon.rewrite.MapUrlOut-class.html#omit_lang
web2py.gluon.rewrite.MapUrlOut.build_acf	web2py.gluon.rewrite.MapUrlOut-class.html#build_acf
web2py.gluon.rewrite.MapUrlOut.omit_acf	web2py.gluon.rewrite.MapUrlOut-class.html#omit_acf
web2py.gluon.rewrite.MapUrlOut.__init__	web2py.gluon.rewrite.MapUrlOut-class.html#__init__
web2py.gluon.rocket.BadRequest	web2py.gluon.rocket.BadRequest-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.rocket.ChunkedReader	web2py.gluon.rocket.ChunkedReader-class.html
web2py.gluon.rocket.ChunkedReader._read_header	web2py.gluon.rocket.ChunkedReader-class.html#_read_header
web2py.gluon.rocket.ChunkedReader.read	web2py.gluon.rocket.ChunkedReader-class.html#read
web2py.gluon.rocket.ChunkedReader.readlines	web2py.gluon.rocket.ChunkedReader-class.html#readlines
web2py.gluon.rocket.ChunkedReader.readline	web2py.gluon.rocket.ChunkedReader-class.html#readline
web2py.gluon.rocket.ChunkedReader.__init__	web2py.gluon.rocket.ChunkedReader-class.html#__init__
web2py.gluon.rocket.Connection	web2py.gluon.rocket.Connection-class.html
web2py.gluon.rocket.Connection.secure	web2py.gluon.rocket.Connection-class.html#secure
web2py.gluon.rocket.Connection.shutdown	web2py.gluon.rocket.Connection-class.html#shutdown
web2py.gluon.rocket.Connection.close	web2py.gluon.rocket.Connection-class.html#close
web2py.gluon.rocket.Connection.__init__	web2py.gluon.rocket.Connection-class.html#__init__
web2py.gluon.rocket.Connection.makefile	web2py.gluon.rocket.Connection-class.html#makefile
web2py.gluon.rocket.Connection.server_port	web2py.gluon.rocket.Connection-class.html#server_port
web2py.gluon.rocket.Connection.start_time	web2py.gluon.rocket.Connection-class.html#start_time
web2py.gluon.rocket.Connection.ssl	web2py.gluon.rocket.Connection-class.html#ssl
web2py.gluon.rocket.Connection.client_port	web2py.gluon.rocket.Connection-class.html#client_port
web2py.gluon.rocket.Connection.setblocking	web2py.gluon.rocket.Connection-class.html#setblocking
web2py.gluon.rocket.Connection.fileno	web2py.gluon.rocket.Connection-class.html#fileno
web2py.gluon.rocket.Connection.socket	web2py.gluon.rocket.Connection-class.html#socket
web2py.gluon.rocket.Connection.client_addr	web2py.gluon.rocket.Connection-class.html#client_addr
web2py.gluon.rocket.Connection.sendall	web2py.gluon.rocket.Connection-class.html#sendall
web2py.gluon.rocket.FileWrapper	web2py.gluon.rocket.FileWrapper-class.html
web2py.gluon.rocket.FileWrapper.__iter__	web2py.gluon.rocket.FileWrapper-class.html#__iter__
web2py.gluon.rocket.FileWrapper.__init__	web2py.gluon.rocket.FileWrapper-class.html#__init__
web2py.gluon.rocket.FileWrapper.__getitem__	web2py.gluon.rocket.FileWrapper-class.html#__getitem__
web2py.gluon.rocket.FileWrapper.next	web2py.gluon.rocket.FileWrapper-class.html#next
web2py.gluon.rocket.Headers	web2py.gluon.rocket.Headers-class.html
web2py.gluon.rocket.Headers.__delitem__	web2py.gluon.rocket.Headers-class.html#__delitem__
web2py.gluon.rocket.Headers.setdefault	web2py.gluon.rocket.Headers-class.html#setdefault
web2py.gluon.rocket.Headers.__getitem__	web2py.gluon.rocket.Headers-class.html#__getitem__
web2py.gluon.rocket.Headers.__contains__	web2py.gluon.rocket.Headers-class.html#__contains__
web2py.gluon.rocket.Headers.keys	web2py.gluon.rocket.Headers-class.html#keys
web2py.gluon.rocket.Headers.items	web2py.gluon.rocket.Headers-class.html#items
web2py.gluon.rocket.Headers.__str__	web2py.gluon.rocket.Headers-class.html#__str__
web2py.gluon.rocket.Headers.get_all	web2py.gluon.rocket.Headers-class.html#get_all
web2py.gluon.rocket.Headers.add_header	web2py.gluon.rocket.Headers-class.html#add_header
web2py.gluon.rocket.Headers.__setitem__	web2py.gluon.rocket.Headers-class.html#__setitem__
web2py.gluon.rocket.Headers.has_key	web2py.gluon.rocket.Headers-class.html#has_key
web2py.gluon.rocket.Headers.values	web2py.gluon.rocket.Headers-class.html#values
web2py.gluon.rocket.Headers.__len__	web2py.gluon.rocket.Headers-class.html#__len__
web2py.gluon.rocket.Headers.get	web2py.gluon.rocket.Headers-class.html#get
web2py.gluon.rocket.Headers.__init__	web2py.gluon.rocket.Headers-class.html#__init__
web2py.gluon.rocket.Headers.__repr__	web2py.gluon.rocket.Headers-class.html#__repr__
web2py.gluon.rocket.Listener	web2py.gluon.rocket.Listener-class.html
web2py.gluon.rocket.Listener.run	web2py.gluon.rocket.Listener-class.html#run
web2py.gluon.rocket.Listener.__init__	web2py.gluon.rocket.Listener-class.html#__init__
web2py.gluon.rocket.Listener.wrap_socket	web2py.gluon.rocket.Listener-class.html#wrap_socket
web2py.gluon.rocket.Monitor	web2py.gluon.rocket.Monitor-class.html
web2py.gluon.rocket.Monitor.run	web2py.gluon.rocket.Monitor-class.html#run
web2py.gluon.rocket.Monitor.__init__	web2py.gluon.rocket.Monitor-class.html#__init__
web2py.gluon.rocket.Monitor.stop	web2py.gluon.rocket.Monitor-class.html#stop
web2py.gluon.rocket.NullHandler	web2py.gluon.rocket.NullHandler-class.html
web2py.gluon.rocket.NullHandler.emit	web2py.gluon.rocket.NullHandler-class.html#emit
web2py.gluon.rocket.Rocket	web2py.gluon.rocket.Rocket-class.html
web2py.gluon.rocket.Rocket._sigterm	web2py.gluon.rocket.Rocket-class.html#_sigterm
web2py.gluon.rocket.Rocket.stop	web2py.gluon.rocket.Rocket-class.html#stop
web2py.gluon.rocket.Rocket._sighup	web2py.gluon.rocket.Rocket-class.html#_sighup
web2py.gluon.rocket.Rocket.start	web2py.gluon.rocket.Rocket-class.html#start
web2py.gluon.rocket.Rocket.__init__	web2py.gluon.rocket.Rocket-class.html#__init__
web2py.gluon.rocket.Rocket.restart	web2py.gluon.rocket.Rocket-class.html#restart
web2py.gluon.rocket.SSLError	web2py.gluon.rocket.SSLError-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.rocket.SocketClosed	web2py.gluon.rocket.SocketClosed-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.rocket.SocketTimeout	web2py.gluon.rocket.SocketTimeout-class.html
exceptions.Exception.__init__	exceptions.Exception-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.rocket.ThreadPool	web2py.gluon.rocket.ThreadPool-class.html
web2py.gluon.rocket.ThreadPool.stop	web2py.gluon.rocket.ThreadPool-class.html#stop
web2py.gluon.rocket.ThreadPool.grow	web2py.gluon.rocket.ThreadPool-class.html#grow
web2py.gluon.rocket.ThreadPool.start	web2py.gluon.rocket.ThreadPool-class.html#start
web2py.gluon.rocket.ThreadPool.dynamic_resize	web2py.gluon.rocket.ThreadPool-class.html#dynamic_resize
web2py.gluon.rocket.ThreadPool.bring_out_your_dead	web2py.gluon.rocket.ThreadPool-class.html#bring_out_your_dead
web2py.gluon.rocket.ThreadPool.shrink	web2py.gluon.rocket.ThreadPool-class.html#shrink
web2py.gluon.rocket.ThreadPool.__init__	web2py.gluon.rocket.ThreadPool-class.html#__init__
web2py.gluon.rocket.WSGIWorker	web2py.gluon.rocket.WSGIWorker-class.html
web2py.gluon.rocket.WSGIWorker.start_response	web2py.gluon.rocket.WSGIWorker-class.html#start_response
web2py.gluon.rocket.Worker.read_request_line	web2py.gluon.rocket.Worker-class.html#read_request_line
web2py.gluon.rocket.WSGIWorker.run_app	web2py.gluon.rocket.WSGIWorker-class.html#run_app
web2py.gluon.rocket.WSGIWorker.write_warning	web2py.gluon.rocket.WSGIWorker-class.html#write_warning
web2py.gluon.rocket.WSGIWorker.__init__	web2py.gluon.rocket.WSGIWorker-class.html#__init__
web2py.gluon.rocket.WSGIWorker.write	web2py.gluon.rocket.WSGIWorker-class.html#write
web2py.gluon.rocket.Worker._read_request_line_jython	web2py.gluon.rocket.Worker-class.html#_read_request_line_jython
web2py.gluon.rocket.Worker.send_response	web2py.gluon.rocket.Worker-class.html#send_response
web2py.gluon.rocket.Worker.run	web2py.gluon.rocket.Worker-class.html#run
web2py.gluon.rocket.WSGIWorker.build_environ	web2py.gluon.rocket.WSGIWorker-class.html#build_environ
web2py.gluon.rocket.Worker._handleError	web2py.gluon.rocket.Worker-class.html#_handleError
web2py.gluon.rocket.WSGIWorker.send_headers	web2py.gluon.rocket.WSGIWorker-class.html#send_headers
web2py.gluon.rocket.Worker.kill	web2py.gluon.rocket.Worker-class.html#kill
web2py.gluon.rocket.Worker.read_headers	web2py.gluon.rocket.Worker-class.html#read_headers
web2py.gluon.rocket.Worker	web2py.gluon.rocket.Worker-class.html
web2py.gluon.rocket.Worker.read_request_line	web2py.gluon.rocket.Worker-class.html#read_request_line
web2py.gluon.rocket.Worker.run_app	web2py.gluon.rocket.Worker-class.html#run_app
web2py.gluon.rocket.Worker.kill	web2py.gluon.rocket.Worker-class.html#kill
web2py.gluon.rocket.Worker.__init__	web2py.gluon.rocket.Worker-class.html#__init__
web2py.gluon.rocket.Worker._read_request_line_jython	web2py.gluon.rocket.Worker-class.html#_read_request_line_jython
web2py.gluon.rocket.Worker.send_response	web2py.gluon.rocket.Worker-class.html#send_response
web2py.gluon.rocket.Worker.run	web2py.gluon.rocket.Worker-class.html#run
web2py.gluon.rocket.Worker._handleError	web2py.gluon.rocket.Worker-class.html#_handleError
web2py.gluon.rocket.Worker.read_headers	web2py.gluon.rocket.Worker-class.html#read_headers
web2py.gluon.sanitizer.XssCleaner	web2py.gluon.sanitizer.XssCleaner-class.html
web2py.gluon.sanitizer.XssCleaner.xtags	web2py.gluon.sanitizer.XssCleaner-class.html#xtags
web2py.gluon.sanitizer.XssCleaner.handle_data	web2py.gluon.sanitizer.XssCleaner-class.html#handle_data
web2py.gluon.sanitizer.XssCleaner.handle_charref	web2py.gluon.sanitizer.XssCleaner-class.html#handle_charref
web2py.gluon.sanitizer.XssCleaner.strip	web2py.gluon.sanitizer.XssCleaner-class.html#strip
web2py.gluon.sanitizer.XssCleaner.unknown_starttag	web2py.gluon.sanitizer.XssCleaner-class.html#unknown_starttag
web2py.gluon.sanitizer.XssCleaner.handle_entityref	web2py.gluon.sanitizer.XssCleaner-class.html#handle_entityref
web2py.gluon.sanitizer.XssCleaner.handle_comment	web2py.gluon.sanitizer.XssCleaner-class.html#handle_comment
web2py.gluon.sanitizer.XssCleaner.handle_starttag	web2py.gluon.sanitizer.XssCleaner-class.html#handle_starttag
web2py.gluon.sanitizer.XssCleaner.__init__	web2py.gluon.sanitizer.XssCleaner-class.html#__init__
web2py.gluon.sanitizer.XssCleaner.url_is_acceptable	web2py.gluon.sanitizer.XssCleaner-class.html#url_is_acceptable
web2py.gluon.sanitizer.XssCleaner.handle_endtag	web2py.gluon.sanitizer.XssCleaner-class.html#handle_endtag
web2py.gluon.sanitizer.XssCleaner.unknown_endtag	web2py.gluon.sanitizer.XssCleaner-class.html#unknown_endtag
web2py.gluon.sqlhtml.AutocompleteWidget	web2py.gluon.sqlhtml.AutocompleteWidget-class.html
web2py.gluon.sqlhtml.AutocompleteWidget.callback	web2py.gluon.sqlhtml.AutocompleteWidget-class.html#callback
web2py.gluon.sqlhtml.AutocompleteWidget.__call__	web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__	web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__
web2py.gluon.sqlhtml.BooleanWidget	web2py.gluon.sqlhtml.BooleanWidget-class.html
web2py.gluon.sqlhtml.BooleanWidget.widget	web2py.gluon.sqlhtml.BooleanWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.CheckboxesWidget	web2py.gluon.sqlhtml.CheckboxesWidget-class.html
web2py.gluon.sqlhtml.CheckboxesWidget.widget	web2py.gluon.sqlhtml.CheckboxesWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.OptionsWidget.has_options	web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options
web2py.gluon.sqlhtml.DateWidget	web2py.gluon.sqlhtml.DateWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.DatetimeWidget	web2py.gluon.sqlhtml.DatetimeWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.DecimalWidget	web2py.gluon.sqlhtml.DecimalWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.DoubleWidget	web2py.gluon.sqlhtml.DoubleWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.FormWidget	web2py.gluon.sqlhtml.FormWidget-class.html
web2py.gluon.sqlhtml.FormWidget.widget	web2py.gluon.sqlhtml.FormWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.IntegerWidget	web2py.gluon.sqlhtml.IntegerWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.ListWidget	web2py.gluon.sqlhtml.ListWidget-class.html
web2py.gluon.sqlhtml.ListWidget.widget	web2py.gluon.sqlhtml.ListWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.MultipleOptionsWidget	web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget	web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.OptionsWidget.has_options	web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options
web2py.gluon.sqlhtml.OptionsWidget	web2py.gluon.sqlhtml.OptionsWidget-class.html
web2py.gluon.sqlhtml.OptionsWidget.widget	web2py.gluon.sqlhtml.OptionsWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.OptionsWidget.has_options	web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options
web2py.gluon.sqlhtml.PasswordWidget	web2py.gluon.sqlhtml.PasswordWidget-class.html
web2py.gluon.sqlhtml.PasswordWidget.widget	web2py.gluon.sqlhtml.PasswordWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.PasswordWidget.DEFAULT_PASSWORD_DISPLAY	web2py.gluon.sqlhtml.PasswordWidget-class.html#DEFAULT_PASSWORD_DISPLAY
web2py.gluon.sqlhtml.RadioWidget	web2py.gluon.sqlhtml.RadioWidget-class.html
web2py.gluon.sqlhtml.RadioWidget.widget	web2py.gluon.sqlhtml.RadioWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.OptionsWidget.has_options	web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options
web2py.gluon.sqlhtml.SQLFORM	web2py.gluon.sqlhtml.SQLFORM-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.FORM.process	web2py.gluon.html.FORM-class.html#process
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.FORM.tag	web2py.gluon.html.FORM-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.sqlhtml.SQLFORM.FIELDNAME_REQUEST_DELETE	web2py.gluon.sqlhtml.SQLFORM-class.html#FIELDNAME_REQUEST_DELETE
web2py.gluon.html.DIV._fixup	web2py.gluon.html.DIV-class.html#_fixup
web2py.gluon.sqlhtml.SQLFORM.createform	web2py.gluon.sqlhtml.SQLFORM-class.html#createform
web2py.gluon.sqlhtml.SQLFORM.__init__	web2py.gluon.sqlhtml.SQLFORM-class.html#__init__
web2py.gluon.html.FORM.xml	web2py.gluon.html.FORM-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.sqlhtml.SQLFORM.ID_LABEL_SUFFIX	web2py.gluon.sqlhtml.SQLFORM-class.html#ID_LABEL_SUFFIX
web2py.gluon.sqlhtml.SQLFORM.factory	web2py.gluon.sqlhtml.SQLFORM-class.html#factory
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX	web2py.gluon.sqlhtml.SQLFORM-class.html#ID_ROW_SUFFIX
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.sqlhtml.SQLFORM.widgets	web2py.gluon.sqlhtml.SQLFORM-class.html#widgets
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD	web2py.gluon.sqlhtml.SQLFORM-class.html#FIELDKEY_DELETE_RECORD
web2py.gluon.html.FORM._postprocessing	web2py.gluon.html.FORM-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.FORM.validate	web2py.gluon.html.FORM-class.html#validate
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.sqlhtml.SQLFORM.accepts	web2py.gluon.sqlhtml.SQLFORM-class.html#accepts
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.FORM.hidden_fields	web2py.gluon.html.FORM-class.html#hidden_fields
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.sqlhtml.SQLTABLE	web2py.gluon.sqlhtml.SQLTABLE-class.html
web2py.gluon.html.DIV.regex_id	web2py.gluon.html.DIV-class.html#regex_id
web2py.gluon.html.DIV._validate	web2py.gluon.html.DIV-class.html#_validate
web2py.gluon.html.DIV.regex_tag	web2py.gluon.html.DIV-class.html#regex_tag
web2py.gluon.html.DIV.__str__	web2py.gluon.html.DIV-class.html#__str__
web2py.gluon.html.DIV.sibling	web2py.gluon.html.DIV-class.html#sibling
web2py.gluon.html.TABLE.tag	web2py.gluon.html.TABLE-class.html#tag
web2py.gluon.html.DIV.flatten	web2py.gluon.html.DIV-class.html#flatten
web2py.gluon.html.TABLE._fixup	web2py.gluon.html.TABLE-class.html#_fixup
web2py.gluon.html.DIV.append	web2py.gluon.html.DIV-class.html#append
web2py.gluon.html.DIV.xml	web2py.gluon.html.DIV-class.html#xml
web2py.gluon.html.DIV._setnode	web2py.gluon.html.DIV-class.html#_setnode
web2py.gluon.sqlhtml.SQLTABLE.style	web2py.gluon.sqlhtml.SQLTABLE-class.html#style
web2py.gluon.html.DIV._xml	web2py.gluon.html.DIV-class.html#_xml
web2py.gluon.sqlhtml.SQLTABLE.__init__	web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__
web2py.gluon.html.DIV.siblings	web2py.gluon.html.DIV-class.html#siblings
web2py.gluon.html.DIV.__len__	web2py.gluon.html.DIV-class.html#__len__
web2py.gluon.html.DIV.elements	web2py.gluon.html.DIV-class.html#elements
web2py.gluon.html.DIV.__getitem__	web2py.gluon.html.DIV-class.html#__getitem__
web2py.gluon.html.DIV.insert	web2py.gluon.html.DIV-class.html#insert
web2py.gluon.html.DIV._postprocessing	web2py.gluon.html.DIV-class.html#_postprocessing
web2py.gluon.html.DIV.update	web2py.gluon.html.DIV-class.html#update
web2py.gluon.html.DIV.__setitem__	web2py.gluon.html.DIV-class.html#__setitem__
web2py.gluon.html.DIV.__delitem__	web2py.gluon.html.DIV-class.html#__delitem__
web2py.gluon.html.DIV.regex_class	web2py.gluon.html.DIV-class.html#regex_class
web2py.gluon.html.DIV.__nonzero__	web2py.gluon.html.DIV-class.html#__nonzero__
web2py.gluon.html.DIV._traverse	web2py.gluon.html.DIV-class.html#_traverse
web2py.gluon.html.DIV.element	web2py.gluon.html.DIV-class.html#element
web2py.gluon.html.DIV._wrap_components	web2py.gluon.html.DIV-class.html#_wrap_components
web2py.gluon.html.DIV.regex_attr	web2py.gluon.html.DIV-class.html#regex_attr
web2py.gluon.sqlhtml.StringWidget	web2py.gluon.sqlhtml.StringWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.TextWidget	web2py.gluon.sqlhtml.TextWidget-class.html
web2py.gluon.sqlhtml.TextWidget.widget	web2py.gluon.sqlhtml.TextWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.TimeWidget	web2py.gluon.sqlhtml.TimeWidget-class.html
web2py.gluon.sqlhtml.StringWidget.widget	web2py.gluon.sqlhtml.StringWidget-class.html#widget
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.UploadWidget	web2py.gluon.sqlhtml.UploadWidget-class.html
web2py.gluon.sqlhtml.UploadWidget.represent	web2py.gluon.sqlhtml.UploadWidget-class.html#represent
web2py.gluon.sqlhtml.UploadWidget.widget	web2py.gluon.sqlhtml.UploadWidget-class.html#widget
web2py.gluon.sqlhtml.UploadWidget.GENERIC_DESCRIPTION	web2py.gluon.sqlhtml.UploadWidget-class.html#GENERIC_DESCRIPTION
web2py.gluon.sqlhtml.UploadWidget.DELETE_FILE	web2py.gluon.sqlhtml.UploadWidget-class.html#DELETE_FILE
web2py.gluon.sqlhtml.UploadWidget.is_image	web2py.gluon.sqlhtml.UploadWidget-class.html#is_image
web2py.gluon.sqlhtml.UploadWidget.DEFAULT_WIDTH	web2py.gluon.sqlhtml.UploadWidget-class.html#DEFAULT_WIDTH
web2py.gluon.sqlhtml.FormWidget._attributes	web2py.gluon.sqlhtml.FormWidget-class.html#_attributes
web2py.gluon.sqlhtml.UploadWidget.ID_DELETE_SUFFIX	web2py.gluon.sqlhtml.UploadWidget-class.html#ID_DELETE_SUFFIX
web2py.gluon.storage.List	web2py.gluon.storage.List-class.html
web2py.gluon.storage.List.__call__	web2py.gluon.storage.List-class.html#__call__
web2py.gluon.storage.Messages	web2py.gluon.storage.Messages-class.html
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.storage.Messages.__init__	web2py.gluon.storage.Messages-class.html#__init__
web2py.gluon.storage.Messages.__setattr__	web2py.gluon.storage.Messages-class.html#__setattr__
web2py.gluon.storage.Messages.__getattr__	web2py.gluon.storage.Messages-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.storage.Settings	web2py.gluon.storage.Settings-class.html
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.storage.Settings.__setattr__	web2py.gluon.storage.Settings-class.html#__setattr__
web2py.gluon.storage.Storage.__getattr__	web2py.gluon.storage.Storage-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.storage.Storage	web2py.gluon.storage.Storage-class.html
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.storage.Storage.__setattr__	web2py.gluon.storage.Storage-class.html#__setattr__
web2py.gluon.storage.Storage.__getattr__	web2py.gluon.storage.Storage-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.storage.StorageList	web2py.gluon.storage.StorageList-class.html
web2py.gluon.storage.Storage.getlist	web2py.gluon.storage.Storage-class.html#getlist
web2py.gluon.storage.Storage.__setattr__	web2py.gluon.storage.Storage-class.html#__setattr__
web2py.gluon.storage.StorageList.__getattr__	web2py.gluon.storage.StorageList-class.html#__getattr__
web2py.gluon.storage.Storage.__getstate__	web2py.gluon.storage.Storage-class.html#__getstate__
web2py.gluon.storage.Storage.__setstate__	web2py.gluon.storage.Storage-class.html#__setstate__
web2py.gluon.storage.Storage.getlast	web2py.gluon.storage.Storage-class.html#getlast
web2py.gluon.storage.Storage.__delattr__	web2py.gluon.storage.Storage-class.html#__delattr__
web2py.gluon.storage.Storage.__repr__	web2py.gluon.storage.Storage-class.html#__repr__
web2py.gluon.storage.Storage.getfirst	web2py.gluon.storage.Storage-class.html#getfirst
web2py.gluon.template.BlockNode	web2py.gluon.template.BlockNode-class.html
web2py.gluon.template.BlockNode.extend	web2py.gluon.template.BlockNode-class.html#extend
web2py.gluon.template.BlockNode.__str__	web2py.gluon.template.BlockNode-class.html#__str__
web2py.gluon.template.BlockNode.append	web2py.gluon.template.BlockNode-class.html#append
web2py.gluon.template.BlockNode.output	web2py.gluon.template.BlockNode-class.html#output
web2py.gluon.template.BlockNode.__init__	web2py.gluon.template.BlockNode-class.html#__init__
web2py.gluon.template.BlockNode.__repr__	web2py.gluon.template.BlockNode-class.html#__repr__
web2py.gluon.template.Content	web2py.gluon.template.Content-class.html
web2py.gluon.template.Content.insert	web2py.gluon.template.Content-class.html#insert
web2py.gluon.template.Content.extend	web2py.gluon.template.Content-class.html#extend
web2py.gluon.template.Content.__str__	web2py.gluon.template.Content-class.html#__str__
web2py.gluon.template.Content.clear_content	web2py.gluon.template.Content-class.html#clear_content
web2py.gluon.template.Content.append	web2py.gluon.template.Content-class.html#append
web2py.gluon.template.Content._insert	web2py.gluon.template.Content-class.html#_insert
web2py.gluon.template.BlockNode.output	web2py.gluon.template.BlockNode-class.html#output
web2py.gluon.template.Content.__init__	web2py.gluon.template.Content-class.html#__init__
web2py.gluon.template.BlockNode.__repr__	web2py.gluon.template.BlockNode-class.html#__repr__
web2py.gluon.template.Node	web2py.gluon.template.Node-class.html
web2py.gluon.template.Node.__str__	web2py.gluon.template.Node-class.html#__str__
web2py.gluon.template.Node.__init__	web2py.gluon.template.Node-class.html#__init__
web2py.gluon.template.SuperNode	web2py.gluon.template.SuperNode-class.html
web2py.gluon.template.SuperNode.__str__	web2py.gluon.template.SuperNode-class.html#__str__
web2py.gluon.template.SuperNode.__repr__	web2py.gluon.template.SuperNode-class.html#__repr__
web2py.gluon.template.SuperNode.__init__	web2py.gluon.template.SuperNode-class.html#__init__
web2py.gluon.template.TemplateParser	web2py.gluon.template.TemplateParser-class.html
web2py.gluon.template.TemplateParser.reindent	web2py.gluon.template.TemplateParser-class.html#reindent
web2py.gluon.template.TemplateParser.__str__	web2py.gluon.template.TemplateParser-class.html#__str__
web2py.gluon.template.TemplateParser.parse	web2py.gluon.template.TemplateParser-class.html#parse
web2py.gluon.template.TemplateParser.__init__	web2py.gluon.template.TemplateParser-class.html#__init__
web2py.gluon.template.TemplateParser.extend	web2py.gluon.template.TemplateParser-class.html#extend
web2py.gluon.template.TemplateParser.r_multiline	web2py.gluon.template.TemplateParser-class.html#r_multiline
web2py.gluon.template.TemplateParser.re_unblock	web2py.gluon.template.TemplateParser-class.html#re_unblock
web2py.gluon.template.TemplateParser.include	web2py.gluon.template.TemplateParser-class.html#include
web2py.gluon.template.TemplateParser.re_pass	web2py.gluon.template.TemplateParser-class.html#re_pass
web2py.gluon.template.TemplateParser.__unicode__	web2py.gluon.template.TemplateParser-class.html#__unicode__
web2py.gluon.template.TemplateParser.r_tag	web2py.gluon.template.TemplateParser-class.html#r_tag
web2py.gluon.template.TemplateParser.to_string	web2py.gluon.template.TemplateParser-class.html#to_string
web2py.gluon.template.TemplateParser._raise_error	web2py.gluon.template.TemplateParser-class.html#_raise_error
web2py.gluon.template.TemplateParser.re_block	web2py.gluon.template.TemplateParser-class.html#re_block
web2py.gluon.template.TemplateParser._get_file_text	web2py.gluon.template.TemplateParser-class.html#_get_file_text
web2py.gluon.tools.Auth	web2py.gluon.tools.Auth-class.html
web2py.gluon.tools.Auth.profile	web2py.gluon.tools.Auth-class.html#profile
web2py.gluon.tools.Auth.retrieve_username	web2py.gluon.tools.Auth-class.html#retrieve_username
web2py.gluon.tools.Auth.add_permission	web2py.gluon.tools.Auth-class.html#add_permission
web2py.gluon.tools.Auth.requires_membership	web2py.gluon.tools.Auth-class.html#requires_membership
web2py.gluon.tools.Auth.add_group	web2py.gluon.tools.Auth-class.html#add_group
web2py.gluon.tools.Auth.requires_permission	web2py.gluon.tools.Auth-class.html#requires_permission
web2py.gluon.tools.Auth.random_password	web2py.gluon.tools.Auth-class.html#random_password
web2py.gluon.tools.Auth.verify_email	web2py.gluon.tools.Auth-class.html#verify_email
web2py.gluon.tools.Auth.id_group	web2py.gluon.tools.Auth-class.html#id_group
web2py.gluon.tools.Auth.cas_login	web2py.gluon.tools.Auth-class.html#cas_login
web2py.gluon.tools.Auth.define_tables	web2py.gluon.tools.Auth-class.html#define_tables
web2py.gluon.tools.Auth.cas_validate	web2py.gluon.tools.Auth-class.html#cas_validate
web2py.gluon.tools.Auth.del_group	web2py.gluon.tools.Auth-class.html#del_group
web2py.gluon.tools.Auth.user_id	web2py.gluon.tools.Auth-class.html#user_id
web2py.gluon.tools.Auth.del_permission	web2py.gluon.tools.Auth-class.html#del_permission
web2py.gluon.tools.Auth._HTTP	web2py.gluon.tools.Auth-class.html#_HTTP
web2py.gluon.tools.Auth.accessible_query	web2py.gluon.tools.Auth-class.html#accessible_query
web2py.gluon.tools.Auth.login_bare	web2py.gluon.tools.Auth-class.html#login_bare
web2py.gluon.tools.Auth.is_logged_in	web2py.gluon.tools.Auth-class.html#is_logged_in
web2py.gluon.tools.Auth.basic	web2py.gluon.tools.Auth-class.html#basic
web2py.gluon.tools.Auth.__call__	web2py.gluon.tools.Auth-class.html#__call__
web2py.gluon.tools.Auth.requires_signature	web2py.gluon.tools.Auth-class.html#requires_signature
web2py.gluon.tools.Auth.not_authorized	web2py.gluon.tools.Auth-class.html#not_authorized
web2py.gluon.tools.Auth.reset_password_deprecated	web2py.gluon.tools.Auth-class.html#reset_password_deprecated
web2py.gluon.tools.Auth.__get_migrate	web2py.gluon.tools.Auth-class.html#__get_migrate
web2py.gluon.tools.Auth.is_impersonating	web2py.gluon.tools.Auth-class.html#is_impersonating
web2py.gluon.tools.Auth.has_membership	web2py.gluon.tools.Auth-class.html#has_membership
web2py.gluon.tools.Auth.log_event	web2py.gluon.tools.Auth-class.html#log_event
web2py.gluon.tools.Auth._get_user_id	web2py.gluon.tools.Auth-class.html#_get_user_id
web2py.gluon.tools.Auth.has_permission	web2py.gluon.tools.Auth-class.html#has_permission
web2py.gluon.tools.Auth.logout	web2py.gluon.tools.Auth-class.html#logout
web2py.gluon.tools.Auth.groups	web2py.gluon.tools.Auth-class.html#groups
web2py.gluon.tools.Auth.user_group	web2py.gluon.tools.Auth-class.html#user_group
web2py.gluon.tools.Auth.add_membership	web2py.gluon.tools.Auth-class.html#add_membership
web2py.gluon.tools.Auth.retrieve_password	web2py.gluon.tools.Auth-class.html#retrieve_password
web2py.gluon.tools.Auth.url	web2py.gluon.tools.Auth-class.html#url
web2py.gluon.tools.Auth.get_or_create_user	web2py.gluon.tools.Auth-class.html#get_or_create_user
web2py.gluon.tools.Auth.register	web2py.gluon.tools.Auth-class.html#register
web2py.gluon.tools.Auth.reset_password	web2py.gluon.tools.Auth-class.html#reset_password
web2py.gluon.tools.Auth.navbar	web2py.gluon.tools.Auth-class.html#navbar
web2py.gluon.tools.Auth.requires_login	web2py.gluon.tools.Auth-class.html#requires_login
web2py.gluon.tools.Auth.__init__	web2py.gluon.tools.Auth-class.html#__init__
web2py.gluon.tools.Auth.change_password	web2py.gluon.tools.Auth-class.html#change_password
web2py.gluon.tools.Auth.del_membership	web2py.gluon.tools.Auth-class.html#del_membership
web2py.gluon.tools.Auth.impersonate	web2py.gluon.tools.Auth-class.html#impersonate
web2py.gluon.tools.Auth.login	web2py.gluon.tools.Auth-class.html#login
web2py.gluon.tools.Auth.request_reset_password	web2py.gluon.tools.Auth-class.html#request_reset_password
web2py.gluon.tools.Auth.requires	web2py.gluon.tools.Auth-class.html#requires
web2py.gluon.tools.Crud	web2py.gluon.tools.Crud-class.html
web2py.gluon.tools.Crud.get_format	web2py.gluon.tools.Crud-class.html#get_format
web2py.gluon.tools.Crud.archive	web2py.gluon.tools.Crud-class.html#archive
web2py.gluon.tools.Crud.__init__	web2py.gluon.tools.Crud-class.html#__init__
web2py.gluon.tools.Crud.tables	web2py.gluon.tools.Crud-class.html#tables
web2py.gluon.tools.Crud.rows	web2py.gluon.tools.Crud-class.html#rows
web2py.gluon.tools.Crud.create	web2py.gluon.tools.Crud-class.html#create
web2py.gluon.tools.Crud.select	web2py.gluon.tools.Crud-class.html#select
web2py.gluon.tools.Crud.__call__	web2py.gluon.tools.Crud-class.html#__call__
web2py.gluon.tools.Crud.get_query	web2py.gluon.tools.Crud-class.html#get_query
web2py.gluon.tools.Crud.read	web2py.gluon.tools.Crud-class.html#read
web2py.gluon.tools.Crud.update	web2py.gluon.tools.Crud-class.html#update
web2py.gluon.tools.Crud.log_event	web2py.gluon.tools.Crud-class.html#log_event
web2py.gluon.tools.Crud.search	web2py.gluon.tools.Crud-class.html#search
web2py.gluon.tools.Crud.url	web2py.gluon.tools.Crud-class.html#url
web2py.gluon.tools.Crud.has_permission	web2py.gluon.tools.Crud-class.html#has_permission
web2py.gluon.tools.Crud.delete	web2py.gluon.tools.Crud-class.html#delete
web2py.gluon.tools.Mail	web2py.gluon.tools.Mail-class.html
web2py.gluon.tools.Mail.send	web2py.gluon.tools.Mail-class.html#send
web2py.gluon.tools.Mail.Attachment	web2py.gluon.tools.Mail.Attachment-class.html
web2py.gluon.tools.Mail.__init__	web2py.gluon.tools.Mail-class.html#__init__
web2py.gluon.tools.Mail.Attachment	web2py.gluon.tools.Mail.Attachment-class.html
web2py.gluon.tools.Mail.Attachment.__init__	web2py.gluon.tools.Mail.Attachment-class.html#__init__
web2py.gluon.tools.PluginManager	web2py.gluon.tools.PluginManager-class.html
web2py.gluon.tools.PluginManager.__new__	web2py.gluon.tools.PluginManager-class.html#__new__
web2py.gluon.tools.PluginManager.__contains__	web2py.gluon.tools.PluginManager-class.html#__contains__
web2py.gluon.tools.PluginManager.keys	web2py.gluon.tools.PluginManager-class.html#keys
web2py.gluon.tools.PluginManager.__getattr__	web2py.gluon.tools.PluginManager-class.html#__getattr__
web2py.gluon.tools.PluginManager.instances	web2py.gluon.tools.PluginManager-class.html#instances
web2py.gluon.tools.PluginManager.__init__	web2py.gluon.tools.PluginManager-class.html#__init__
web2py.gluon.tools.Recaptcha	web2py.gluon.tools.Recaptcha-class.html
web2py.gluon.tools.Recaptcha.VERIFY_SERVER	web2py.gluon.tools.Recaptcha-class.html#VERIFY_SERVER
web2py.gluon.tools.Recaptcha._validate	web2py.gluon.tools.Recaptcha-class.html#_validate
web2py.gluon.tools.Recaptcha.xml	web2py.gluon.tools.Recaptcha-class.html#xml
web2py.gluon.tools.Recaptcha.__init__	web2py.gluon.tools.Recaptcha-class.html#__init__
web2py.gluon.tools.Recaptcha.API_SERVER	web2py.gluon.tools.Recaptcha-class.html#API_SERVER
web2py.gluon.tools.Recaptcha.API_SSL_SERVER	web2py.gluon.tools.Recaptcha-class.html#API_SSL_SERVER
web2py.gluon.tools.Service	web2py.gluon.tools.Service-class.html
web2py.gluon.tools.Service.__init__	web2py.gluon.tools.Service-class.html#__init__
web2py.gluon.tools.Service.xml	web2py.gluon.tools.Service-class.html#xml
web2py.gluon.tools.Service.amfrpc3	web2py.gluon.tools.Service-class.html#amfrpc3
web2py.gluon.tools.Service.json	web2py.gluon.tools.Service-class.html#json
web2py.gluon.tools.Service.serve_xmlrpc	web2py.gluon.tools.Service-class.html#serve_xmlrpc
web2py.gluon.tools.Service.csv	web2py.gluon.tools.Service-class.html#csv
web2py.gluon.tools.Service.soap	web2py.gluon.tools.Service-class.html#soap
web2py.gluon.tools.Service.JsonRpcException	web2py.gluon.tools.Service.JsonRpcException-class.html
web2py.gluon.tools.Service.serve_soap	web2py.gluon.tools.Service-class.html#serve_soap
web2py.gluon.tools.Service.run	web2py.gluon.tools.Service-class.html#run
web2py.gluon.tools.Service.serve_csv	web2py.gluon.tools.Service-class.html#serve_csv
web2py.gluon.tools.Service.xmlrpc	web2py.gluon.tools.Service-class.html#xmlrpc
web2py.gluon.tools.Service.serve_run	web2py.gluon.tools.Service-class.html#serve_run
web2py.gluon.tools.Service.__call__	web2py.gluon.tools.Service-class.html#__call__
web2py.gluon.tools.Service.serve_jsonrpc	web2py.gluon.tools.Service-class.html#serve_jsonrpc
web2py.gluon.tools.Service.rss	web2py.gluon.tools.Service-class.html#rss
web2py.gluon.tools.Service.serve_json	web2py.gluon.tools.Service-class.html#serve_json
web2py.gluon.tools.Service.serve_rss	web2py.gluon.tools.Service-class.html#serve_rss
web2py.gluon.tools.Service.jsonrpc	web2py.gluon.tools.Service-class.html#jsonrpc
web2py.gluon.tools.Service.amfrpc	web2py.gluon.tools.Service-class.html#amfrpc
web2py.gluon.tools.Service.serve_amfrpc	web2py.gluon.tools.Service-class.html#serve_amfrpc
web2py.gluon.tools.Service.serve_xml	web2py.gluon.tools.Service-class.html#serve_xml
web2py.gluon.tools.Service.error	web2py.gluon.tools.Service-class.html#error
web2py.gluon.tools.Service.JsonRpcException	web2py.gluon.tools.Service.JsonRpcException-class.html
web2py.gluon.tools.Service.JsonRpcException.__init__	web2py.gluon.tools.Service.JsonRpcException-class.html#__init__
exceptions.Exception.__new__	exceptions.Exception-class.html#__new__
web2py.gluon.validators.CLEANUP	web2py.gluon.validators.CLEANUP-class.html
web2py.gluon.validators.CLEANUP.__call__	web2py.gluon.validators.CLEANUP-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.CLEANUP.__init__	web2py.gluon.validators.CLEANUP-class.html#__init__
web2py.gluon.validators.CRYPT	web2py.gluon.validators.CRYPT-class.html
web2py.gluon.validators.CRYPT.__call__	web2py.gluon.validators.CRYPT-class.html#__call__
web2py.gluon.validators.CRYPT.__init__	web2py.gluon.validators.CRYPT-class.html#__init__
web2py.gluon.validators.IS_ALPHANUMERIC	web2py.gluon.validators.IS_ALPHANUMERIC-class.html
web2py.gluon.validators.IS_MATCH.__call__	web2py.gluon.validators.IS_MATCH-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_ALPHANUMERIC.__init__	web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__
web2py.gluon.validators.IS_DATE	web2py.gluon.validators.IS_DATE-class.html
web2py.gluon.validators.IS_DATE.__call__	web2py.gluon.validators.IS_DATE-class.html#__call__
web2py.gluon.validators.IS_DATE.formatter	web2py.gluon.validators.IS_DATE-class.html#formatter
web2py.gluon.validators.IS_DATE.__init__	web2py.gluon.validators.IS_DATE-class.html#__init__
web2py.gluon.validators.IS_DATETIME	web2py.gluon.validators.IS_DATETIME-class.html
web2py.gluon.validators.IS_DATETIME.formatter	web2py.gluon.validators.IS_DATETIME-class.html#formatter
web2py.gluon.validators.IS_DATETIME.__call__	web2py.gluon.validators.IS_DATETIME-class.html#__call__
web2py.gluon.validators.IS_DATETIME.isodatetime	web2py.gluon.validators.IS_DATETIME-class.html#isodatetime
web2py.gluon.validators.IS_DATETIME.__init__	web2py.gluon.validators.IS_DATETIME-class.html#__init__
web2py.gluon.validators.IS_DATETIME.nice	web2py.gluon.validators.IS_DATETIME-class.html#nice
web2py.gluon.validators.IS_DATETIME_IN_RANGE	web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html
web2py.gluon.validators.IS_DATETIME.isodatetime	web2py.gluon.validators.IS_DATETIME-class.html#isodatetime
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__	web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__call__
web2py.gluon.validators.IS_DATETIME.formatter	web2py.gluon.validators.IS_DATETIME-class.html#formatter
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__	web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__
web2py.gluon.validators.IS_DATETIME.nice	web2py.gluon.validators.IS_DATETIME-class.html#nice
web2py.gluon.validators.IS_DATE_IN_RANGE	web2py.gluon.validators.IS_DATE_IN_RANGE-class.html
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__	web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__call__
web2py.gluon.validators.IS_DATE.formatter	web2py.gluon.validators.IS_DATE-class.html#formatter
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__	web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE	web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__	web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter	web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__	web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__
web2py.gluon.validators.IS_EMAIL	web2py.gluon.validators.IS_EMAIL-class.html
web2py.gluon.validators.IS_EMAIL.regex	web2py.gluon.validators.IS_EMAIL-class.html#regex
web2py.gluon.validators.IS_EMAIL.regex_proposed_but_failed	web2py.gluon.validators.IS_EMAIL-class.html#regex_proposed_but_failed
web2py.gluon.validators.IS_EMAIL.__call__	web2py.gluon.validators.IS_EMAIL-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_EMAIL.__init__	web2py.gluon.validators.IS_EMAIL-class.html#__init__
web2py.gluon.validators.IS_EMPTY_OR	web2py.gluon.validators.IS_EMPTY_OR-class.html
web2py.gluon.validators.IS_EMPTY_OR.set_self_id	web2py.gluon.validators.IS_EMPTY_OR-class.html#set_self_id
web2py.gluon.validators.IS_EMPTY_OR._options	web2py.gluon.validators.IS_EMPTY_OR-class.html#_options
web2py.gluon.validators.IS_EMPTY_OR.__call__	web2py.gluon.validators.IS_EMPTY_OR-class.html#__call__
web2py.gluon.validators.IS_EMPTY_OR.formatter	web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter
web2py.gluon.validators.IS_EMPTY_OR.__init__	web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__
web2py.gluon.validators.IS_EQUAL_TO	web2py.gluon.validators.IS_EQUAL_TO-class.html
web2py.gluon.validators.IS_EQUAL_TO.__call__	web2py.gluon.validators.IS_EQUAL_TO-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_EQUAL_TO.__init__	web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__
web2py.gluon.validators.IS_EXPR	web2py.gluon.validators.IS_EXPR-class.html
web2py.gluon.validators.IS_EXPR.__call__	web2py.gluon.validators.IS_EXPR-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_EXPR.__init__	web2py.gluon.validators.IS_EXPR-class.html#__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE	web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__	web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter	web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__	web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__
web2py.gluon.validators.IS_GENERIC_URL	web2py.gluon.validators.IS_GENERIC_URL-class.html
web2py.gluon.validators.IS_GENERIC_URL.__call__	web2py.gluon.validators.IS_GENERIC_URL-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_GENERIC_URL.__init__	web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__
web2py.gluon.validators.IS_HTTP_URL	web2py.gluon.validators.IS_HTTP_URL-class.html
web2py.gluon.validators.IS_HTTP_URL.__call__	web2py.gluon.validators.IS_HTTP_URL-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_HTTP_URL.__init__	web2py.gluon.validators.IS_HTTP_URL-class.html#__init__
web2py.gluon.validators.IS_IMAGE	web2py.gluon.validators.IS_IMAGE-class.html
web2py.gluon.validators.IS_IMAGE.__png	web2py.gluon.validators.IS_IMAGE-class.html#__png
web2py.gluon.validators.IS_IMAGE.__jpeg	web2py.gluon.validators.IS_IMAGE-class.html#__jpeg
web2py.gluon.validators.IS_IMAGE.__bmp	web2py.gluon.validators.IS_IMAGE-class.html#__bmp
web2py.gluon.validators.IS_IMAGE.__call__	web2py.gluon.validators.IS_IMAGE-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_IMAGE.__gif	web2py.gluon.validators.IS_IMAGE-class.html#__gif
web2py.gluon.validators.IS_IMAGE.__init__	web2py.gluon.validators.IS_IMAGE-class.html#__init__
web2py.gluon.validators.IS_INT_IN_RANGE	web2py.gluon.validators.IS_INT_IN_RANGE-class.html
web2py.gluon.validators.IS_INT_IN_RANGE.__call__	web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_INT_IN_RANGE.__init__	web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__
web2py.gluon.validators.IS_IN_DB	web2py.gluon.validators.IS_IN_DB-class.html
web2py.gluon.validators.IS_IN_DB.build_set	web2py.gluon.validators.IS_IN_DB-class.html#build_set
web2py.gluon.validators.IS_IN_DB.set_self_id	web2py.gluon.validators.IS_IN_DB-class.html#set_self_id
web2py.gluon.validators.IS_IN_DB.__call__	web2py.gluon.validators.IS_IN_DB-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_IN_DB.options	web2py.gluon.validators.IS_IN_DB-class.html#options
web2py.gluon.validators.IS_IN_DB.__init__	web2py.gluon.validators.IS_IN_DB-class.html#__init__
web2py.gluon.validators.IS_IN_SET	web2py.gluon.validators.IS_IN_SET-class.html
web2py.gluon.validators.IS_IN_SET.__call__	web2py.gluon.validators.IS_IN_SET-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_IN_SET.options	web2py.gluon.validators.IS_IN_SET-class.html#options
web2py.gluon.validators.IS_IN_SET.__init__	web2py.gluon.validators.IS_IN_SET-class.html#__init__
web2py.gluon.validators.IS_IN_SUBSET	web2py.gluon.validators.IS_IN_SUBSET-class.html
web2py.gluon.validators.IS_IN_SUBSET.__call__	web2py.gluon.validators.IS_IN_SUBSET-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_IN_SET.options	web2py.gluon.validators.IS_IN_SET-class.html#options
web2py.gluon.validators.IS_IN_SUBSET.__init__	web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__
web2py.gluon.validators.IS_IPV4	web2py.gluon.validators.IS_IPV4-class.html
web2py.gluon.validators.IS_IPV4.regex	web2py.gluon.validators.IS_IPV4-class.html#regex
web2py.gluon.validators.IS_IPV4.private	web2py.gluon.validators.IS_IPV4-class.html#private
web2py.gluon.validators.IS_IPV4.numbers	web2py.gluon.validators.IS_IPV4-class.html#numbers
web2py.gluon.validators.IS_IPV4.__call__	web2py.gluon.validators.IS_IPV4-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_IPV4.automatic	web2py.gluon.validators.IS_IPV4-class.html#automatic
web2py.gluon.validators.IS_IPV4.__init__	web2py.gluon.validators.IS_IPV4-class.html#__init__
web2py.gluon.validators.IS_IPV4.localhost	web2py.gluon.validators.IS_IPV4-class.html#localhost
web2py.gluon.validators.IS_LENGTH	web2py.gluon.validators.IS_LENGTH-class.html
web2py.gluon.validators.IS_LENGTH.__call__	web2py.gluon.validators.IS_LENGTH-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_LENGTH.__init__	web2py.gluon.validators.IS_LENGTH-class.html#__init__
web2py.gluon.validators.IS_LIST_OF	web2py.gluon.validators.IS_LIST_OF-class.html
web2py.gluon.validators.IS_LIST_OF.__call__	web2py.gluon.validators.IS_LIST_OF-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_LIST_OF.__init__	web2py.gluon.validators.IS_LIST_OF-class.html#__init__
web2py.gluon.validators.IS_LOWER	web2py.gluon.validators.IS_LOWER-class.html
web2py.gluon.validators.IS_LOWER.__call__	web2py.gluon.validators.IS_LOWER-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_MATCH	web2py.gluon.validators.IS_MATCH-class.html
web2py.gluon.validators.IS_MATCH.__call__	web2py.gluon.validators.IS_MATCH-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_MATCH.__init__	web2py.gluon.validators.IS_MATCH-class.html#__init__
web2py.gluon.validators.IS_NOT_EMPTY	web2py.gluon.validators.IS_NOT_EMPTY-class.html
web2py.gluon.validators.IS_NOT_EMPTY.__call__	web2py.gluon.validators.IS_NOT_EMPTY-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_NOT_EMPTY.__init__	web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__
web2py.gluon.validators.IS_NOT_IN_DB	web2py.gluon.validators.IS_NOT_IN_DB-class.html
web2py.gluon.validators.IS_NOT_IN_DB.set_self_id	web2py.gluon.validators.IS_NOT_IN_DB-class.html#set_self_id
web2py.gluon.validators.IS_NOT_IN_DB.__call__	web2py.gluon.validators.IS_NOT_IN_DB-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_NOT_IN_DB.__init__	web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__
web2py.gluon.validators.IS_SLUG	web2py.gluon.validators.IS_SLUG-class.html
web2py.gluon.validators.IS_SLUG.urlify	web2py.gluon.validators.IS_SLUG-class.html#urlify
web2py.gluon.validators.IS_SLUG.__call__	web2py.gluon.validators.IS_SLUG-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_SLUG.__init__	web2py.gluon.validators.IS_SLUG-class.html#__init__
web2py.gluon.validators.IS_STRONG	web2py.gluon.validators.IS_STRONG-class.html
web2py.gluon.validators.IS_STRONG.__call__	web2py.gluon.validators.IS_STRONG-class.html#__call__
web2py.gluon.validators.IS_STRONG.__init__	web2py.gluon.validators.IS_STRONG-class.html#__init__
web2py.gluon.validators.IS_TIME	web2py.gluon.validators.IS_TIME-class.html
web2py.gluon.validators.IS_TIME.__call__	web2py.gluon.validators.IS_TIME-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_TIME.__init__	web2py.gluon.validators.IS_TIME-class.html#__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME	web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__	web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__	web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__
web2py.gluon.validators.IS_UPPER	web2py.gluon.validators.IS_UPPER-class.html
web2py.gluon.validators.IS_UPPER.__call__	web2py.gluon.validators.IS_UPPER-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_URL	web2py.gluon.validators.IS_URL-class.html
web2py.gluon.validators.IS_URL.__call__	web2py.gluon.validators.IS_URL-class.html#__call__
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.validators.IS_URL.__init__	web2py.gluon.validators.IS_URL-class.html#__init__
web2py.gluon.validators.Validator	web2py.gluon.validators.Validator-class.html
web2py.gluon.validators.Validator.formatter	web2py.gluon.validators.Validator-class.html#formatter
web2py.gluon.widget.IO	web2py.gluon.widget.IO-class.html
web2py.gluon.widget.IO.write	web2py.gluon.widget.IO-class.html#write
web2py.gluon.widget.IO.__init__	web2py.gluon.widget.IO-class.html#__init__
web2py.gluon.widget.web2pyDialog	web2py.gluon.widget.web2pyDialog-class.html
web2py.gluon.widget.web2pyDialog.quit	web2py.gluon.widget.web2pyDialog-class.html#quit
web2py.gluon.widget.web2pyDialog.update_canvas	web2py.gluon.widget.web2pyDialog-class.html#update_canvas
web2py.gluon.widget.web2pyDialog.stop	web2py.gluon.widget.web2pyDialog-class.html#stop
web2py.gluon.widget.web2pyDialog.update	web2py.gluon.widget.web2pyDialog-class.html#update
web2py.gluon.widget.web2pyDialog.connect_pages	web2py.gluon.widget.web2pyDialog-class.html#connect_pages
web2py.gluon.widget.web2pyDialog.start	web2py.gluon.widget.web2pyDialog-class.html#start
web2py.gluon.widget.web2pyDialog.error	web2py.gluon.widget.web2pyDialog-class.html#error
web2py.gluon.widget.web2pyDialog.checkTaskBar	web2py.gluon.widget.web2pyDialog-class.html#checkTaskBar
web2py.gluon.widget.web2pyDialog.__init__	web2py.gluon.widget.web2pyDialog-class.html#__init__
web2py.gluon.winservice.Service	web2py.gluon.winservice.Service-class.html
web2py.gluon.winservice.Service.SvcDoRun	web2py.gluon.winservice.Service-class.html#SvcDoRun
web2py.gluon.winservice.Service.SvcStop	web2py.gluon.winservice.Service-class.html#SvcStop
web2py.gluon.winservice.Service.log	web2py.gluon.winservice.Service-class.html#log
web2py.gluon.winservice.Service.stop	web2py.gluon.winservice.Service-class.html#stop
web2py.gluon.winservice.Service._svc_display_name_	web2py.gluon.winservice.Service-class.html#_svc_display_name_
web2py.gluon.winservice.Service.start	web2py.gluon.winservice.Service-class.html#start
web2py.gluon.winservice.Service._svc_name_	web2py.gluon.winservice.Service-class.html#_svc_name_
web2py.gluon.winservice.Service.__init__	web2py.gluon.winservice.Service-class.html#__init__
web2py.gluon.winservice.Web2pyService	web2py.gluon.winservice.Web2pyService-class.html
web2py.gluon.winservice.Service.SvcDoRun	web2py.gluon.winservice.Service-class.html#SvcDoRun
web2py.gluon.winservice.Service.SvcStop	web2py.gluon.winservice.Service-class.html#SvcStop
web2py.gluon.winservice.Web2pyService.chdir	web2py.gluon.winservice.Web2pyService-class.html#chdir
web2py.gluon.winservice.Service.log	web2py.gluon.winservice.Service-class.html#log
web2py.gluon.winservice.Web2pyService.start	web2py.gluon.winservice.Web2pyService-class.html#start
web2py.gluon.winservice.Web2pyService.stop	web2py.gluon.winservice.Web2pyService-class.html#stop
web2py.gluon.winservice.Web2pyService.server	web2py.gluon.winservice.Web2pyService-class.html#server
web2py.gluon.winservice.Web2pyService._exe_args_	web2py.gluon.winservice.Web2pyService-class.html#_exe_args_
web2py.gluon.winservice.Web2pyService._svc_name_	web2py.gluon.winservice.Web2pyService-class.html#_svc_name_
web2py.gluon.winservice.Web2pyService._svc_display_name_	web2py.gluon.winservice.Web2pyService-class.html#_svc_display_name_
web2py.gluon.winservice.Service.__init__	web2py.gluon.winservice.Service-class.html#__init__

Added applications/examples/static/epydoc/class-tree.html version [ba68f0f97c].

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class Hierarchy</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">&nbsp;</td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="class-tree.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<center><b>
 [ <a href="module-tree.html">Module Hierarchy</a>
 | <a href="class-tree.html">Class Hierarchy</a> ]
</b></center><br />
<h1 class="epydoc">Class Hierarchy</h1>
<ul class="nomargin-top">
    <li> <strong class="uidlink">Queue.Queue</strong>:
      <em class="summary">Create a queue object with a given maximum size.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.debug.Pipe-class.html">web2py.gluon.debug.Pipe</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">email.message.Message</strong>:
      <em class="summary">Basic message object.</em>
    <ul>
    <li> <strong class="uidlink">email.mime.base.MIMEBase</strong>:
      <em class="summary">Base class for MIME specializations.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Mail.Attachment-class.html">web2py.gluon.tools.Mail.Attachment</a></strong>:
      <em class="summary">Email attachment</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">google.appengine.ext.db.Property</strong>
    </li>
    <li> <strong class="uidlink">logging.Filterer</strong>:
      <em class="summary">A base class for loggers and handlers which allows them to share
        common code.</em>
    <ul>
    <li> <strong class="uidlink">logging.Handler</strong>:
      <em class="summary">Handler instances dispatch logging events to specific 
        destinations.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.NullHandler-class.html">web2py.gluon.rocket.NullHandler</a></strong>:
      <em class="summary">A Logging handler to prevent library errors.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">markupbase.ParserBase</strong>:
      <em class="summary">Parser base class which provides some common support methods 
        used by the SGML/HTML and XHTML parsers.</em>
    <ul>
    <li> <strong class="uidlink">sgmllib.SGMLParser</strong>
    <ul>
    <li> <strong class="uidlink">htmllib.HTMLParser</strong>:
      <em class="summary">This is the basic HTML parser class.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.sanitizer.XssCleaner-class.html">web2py.gluon.sanitizer.XssCleaner</a></strong>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">HTMLParser.HTMLParser</strong>:
      <em class="summary">Find tags and other markup and call handler functions.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2py.gluon.html.web2pyHTMLParser</a></strong>:
      <em class="summary">obj = web2pyHTMLParser(text) parses and html/xml text into 
        web2py helpers.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">object</strong>:
      <em class="summary">The most base type</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.CRYPT-class.html">web2py.gluon.validators.CRYPT</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink">frozenset</strong>:
      <em class="summary">frozenset(iterable) --&gt; frozenset object</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html">web2py.gluon.contrib.pymysql.DBAPISet</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.languages.translator-class.html">web2py.gluon.languages.translator</a></strong>:
      <em class="summary">this class is instantiated by gluon.compileapp.build_environment
        as the T object</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.languages.lazyT-class.html">web2py.gluon.languages.lazyT</a></strong>:
      <em class="summary">never to be called explicitly, returned by 
        translator.__call__</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.ChunkedReader-class.html">web2py.gluon.rocket.ChunkedReader</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Query-class.html">web2py.gluon.dal.Query</a></strong>:
      <em class="summary">a query object necessary to define a set.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.Validator-class.html">web2py.gluon.validators.Validator</a></strong>:
      <em class="summary">Root for all validators, mainly for documentation purposes.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.CLEANUP-class.html">web2py.gluon.validators.CLEANUP</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_LIST_OF-class.html">web2py.gluon.validators.IS_LIST_OF</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_HTTP_URL-class.html">web2py.gluon.validators.IS_HTTP_URL</a></strong>:
      <em class="summary">Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

Based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html

This function only checks the URL's syntax.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_EXPR-class.html">web2py.gluon.validators.IS_EXPR</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">web2py.gluon.validators.IS_NOT_IN_DB</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_MATCH-class.html">web2py.gluon.validators.IS_MATCH</a></strong>:
      <em class="summary">example:</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html">web2py.gluon.validators.IS_ALPHANUMERIC</a></strong>:
      <em class="summary">example:</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html">web2py.gluon.validators.IS_NOT_EMPTY</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_SLUG-class.html">web2py.gluon.validators.IS_SLUG</a></strong>:
      <em class="summary">convert arbitrary text string to a slug</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_IN_DB-class.html">web2py.gluon.validators.IS_IN_DB</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_URL-class.html">web2py.gluon.validators.IS_URL</a></strong>:
      <em class="summary">Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

(These rules are based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html)

This function only checks the URL's syntax.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">web2py.gluon.validators.IS_FLOAT_IN_RANGE</a></strong>:
      <em class="summary">Determine that the argument is (or can be represented as) a 
        float, and that it falls within the specified inclusive range.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_DATE-class.html">web2py.gluon.validators.IS_DATE</a></strong>:
      <em class="summary">example:</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html">web2py.gluon.validators.IS_DATE_IN_RANGE</a></strong>:
      <em class="summary">example:</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_DATETIME-class.html">web2py.gluon.validators.IS_DATETIME</a></strong>:
      <em class="summary">example:</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html">web2py.gluon.validators.IS_DATETIME_IN_RANGE</a></strong>:
      <em class="summary">example:</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_IMAGE-class.html">web2py.gluon.validators.IS_IMAGE</a></strong>:
      <em class="summary">Checks if file uploaded through file input was saved in one of 
        selected image formats and has dimensions (width and height) within
        given boundaries.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_LOWER-class.html">web2py.gluon.validators.IS_LOWER</a></strong>:
      <em class="summary">convert to lower case</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html">web2py.gluon.validators.IS_INT_IN_RANGE</a></strong>:
      <em class="summary">Determine that the argument is (or can be represented as) an 
        int, and that it falls within the specified range.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_GENERIC_URL-class.html">web2py.gluon.validators.IS_GENERIC_URL</a></strong>:
      <em class="summary">Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The URL scheme specified (if one is specified) is not valid

Based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html

This function only checks the URL's syntax.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_UPPER-class.html">web2py.gluon.validators.IS_UPPER</a></strong>:
      <em class="summary">convert to upper case</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_TIME-class.html">web2py.gluon.validators.IS_TIME</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">web2py.gluon.validators.IS_DECIMAL_IN_RANGE</a></strong>:
      <em class="summary">Determine that the argument is (or can be represented as) a 
        Python Decimal, and that it falls within the specified inclusive 
        range.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_EQUAL_TO-class.html">web2py.gluon.validators.IS_EQUAL_TO</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_IPV4-class.html">web2py.gluon.validators.IS_IPV4</a></strong>:
      <em class="summary">Checks if field's value is an IP version 4 address in decimal form.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html">web2py.gluon.validators.IS_UPLOAD_FILENAME</a></strong>:
      <em class="summary">Checks if name and extension of file uploaded through file input matches
given criteria.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_IN_SET-class.html">web2py.gluon.validators.IS_IN_SET</a></strong>:
      <em class="summary">example:</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_IN_SUBSET-class.html">web2py.gluon.validators.IS_IN_SUBSET</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">web2py.gluon.validators.IS_EMPTY_OR</a></strong>:
      <em class="summary">dummy class for testing IS_EMPTY_OR</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_LENGTH-class.html">web2py.gluon.validators.IS_LENGTH</a></strong>:
      <em class="summary">Checks if length of field's value fits between given 
        boundaries.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_EMAIL-class.html">web2py.gluon.validators.IS_EMAIL</a></strong>:
      <em class="summary">Checks if field's value is a valid email address.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.SQLCustomType-class.html">web2py.gluon.dal.SQLCustomType</a></strong>:
      <em class="summary">allows defining of custom SQL types...</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Service-class.html">web2py.gluon.tools.Service</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.Connection-class.html">web2py.gluon.rocket.Connection</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.Rocket-class.html">web2py.gluon.rocket.Rocket</a></strong>:
      <em class="summary">The Rocket class is responsible for handling threads and 
        accepting and dispatching connections.</em>
    </li>
    <li> <strong class="uidlink">dict</strong>:
      <em class="summary">dict() -&gt; new empty dictionary.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.DAL-class.html">web2py.gluon.dal.DAL</a></strong>:
      <em class="summary">an instance of this class represents a database connection</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Table-class.html">web2py.gluon.dal.Table</a></strong>:
      <em class="summary">an instance of this class represents a database table</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Row-class.html">web2py.gluon.dal.Row</a></strong>:
      <em class="summary">a dictionary that lets you do d['a'] as well as d.a this is only
        used to store a Row</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.storage.Storage-class.html">web2py.gluon.storage.Storage</a></strong>:
      <em class="summary">A Storage object is like a dictionary except `obj.foo` can be 
        used in addition to `obj['foo']`.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.globals.Response-class.html">web2py.gluon.globals.Response</a></strong>:
      <em class="summary">defines the response object and the default values of its 
        members response.write(   ) can be used to write in the output 
        html</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.storage.Settings-class.html">web2py.gluon.storage.Settings</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.storage.Messages-class.html">web2py.gluon.storage.Messages</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.globals.Request-class.html">web2py.gluon.globals.Request</a></strong>:
      <em class="summary">defines the request object and the default values of its members...</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.restricted.TicketStorage-class.html">web2py.gluon.restricted.TicketStorage</a></strong>:
      <em class="summary">defines the ticket object and the default values of its members 
        (None)</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.storage.StorageList-class.html">web2py.gluon.storage.StorageList</a></strong>:
      <em class="summary">like Storage but missing elements default to [] instead of 
        None</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.globals.Session-class.html">web2py.gluon.globals.Session</a></strong>:
      <em class="summary">defines the session object and the default values of its members
        (None)</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import._BaseImporter-class.html">web2py.gluon.custom_import._BaseImporter</a></strong>:
      <em class="summary">The base importer.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">web2py.gluon.custom_import._DateTrackerImporter</a></strong>:
      <em class="summary">An importer tracking the date of the module files and reloading 
        them when they have changed.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html">web2py.gluon.custom_import._Web2pyDateTrackerImporter</a></strong>:
      <em class="summary">Like _Web2pyImporter but using a _DateTrackerImporter.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html">web2py.gluon.custom_import._Web2pyImporter</a></strong>:
      <em class="summary">The standard web2py importer.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html">web2py.gluon.custom_import._Web2pyDateTrackerImporter</a></strong>:
      <em class="summary">Like _Web2pyImporter but using a _DateTrackerImporter.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">threading._Verbose</strong>
    <ul>
    <li> <strong class="uidlink">threading.Thread</strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron.extcron-class.html">web2py.gluon.newcron.extcron</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron.hardcron-class.html">web2py.gluon.newcron.hardcron</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.Worker-class.html">web2py.gluon.rocket.Worker</a></strong>:
      <em class="summary">The Worker class is a base class responsible for receiving 
        connections and (a subclass) will run an application to process the
        the connection</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.WSGIWorker-class.html">web2py.gluon.rocket.WSGIWorker</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.Monitor-class.html">web2py.gluon.rocket.Monitor</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron.softcron-class.html">web2py.gluon.newcron.softcron</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron.cronlauncher-class.html">web2py.gluon.newcron.cronlauncher</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.Listener-class.html">web2py.gluon.rocket.Listener</a></strong>:
      <em class="summary">The Listener class is a class responsible for accepting 
        connections and queuing them to be processed by a worker 
        thread.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.XmlComponent-class.html">web2py.gluon.html.XmlComponent</a></strong>:
      <em class="summary">Abstract root for all Html components</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.DIV-class.html">web2py.gluon.html.DIV</a></strong>:
      <em class="summary">HTML helper, for easy generating and manipulating a DOM 
        structure.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TD-class.html">web2py.gluon.html.TD</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.H6-class.html">web2py.gluon.html.H6</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.LINK-class.html">web2py.gluon.html.LINK</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.EMBED-class.html">web2py.gluon.html.EMBED</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.LABEL-class.html">web2py.gluon.html.LABEL</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.COL-class.html">web2py.gluon.html.COL</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.UL-class.html">web2py.gluon.html.UL</a></strong>:
      <em class="summary">UL Component.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.OL-class.html">web2py.gluon.html.OL</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.LI-class.html">web2py.gluon.html.LI</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TH-class.html">web2py.gluon.html.TH</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.B-class.html">web2py.gluon.html.B</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TABLE-class.html">web2py.gluon.html.TABLE</a></strong>:
      <em class="summary">TABLE Component.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.SQLTABLE-class.html">web2py.gluon.sqlhtml.SQLTABLE</a></strong>:
      <em class="summary">given a Rows object, as returned by a db().select(), generates
an html table with the rows.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.IMG-class.html">web2py.gluon.html.IMG</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.OBJECT-class.html">web2py.gluon.html.OBJECT</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.H4-class.html">web2py.gluon.html.H4</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.HR-class.html">web2py.gluon.html.HR</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.OPTGROUP-class.html">web2py.gluon.html.OPTGROUP</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.PRE-class.html">web2py.gluon.html.PRE</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.H5-class.html">web2py.gluon.html.H5</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.BUTTON-class.html">web2py.gluon.html.BUTTON</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.LEGEND-class.html">web2py.gluon.html.LEGEND</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.CENTER-class.html">web2py.gluon.html.CENTER</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TITLE-class.html">web2py.gluon.html.TITLE</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.SCRIPT-class.html">web2py.gluon.html.SCRIPT</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.BR-class.html">web2py.gluon.html.BR</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TR-class.html">web2py.gluon.html.TR</a></strong>:
      <em class="summary">TR Component.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.HEAD-class.html">web2py.gluon.html.HEAD</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.FIELDSET-class.html">web2py.gluon.html.FIELDSET</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.BODY-class.html">web2py.gluon.html.BODY</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.I-class.html">web2py.gluon.html.I</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.P-class.html">web2py.gluon.html.P</a></strong>:
      <em class="summary">Will replace ``\n`` by ``&lt;br /&gt;`` if the `cr2br` attribute
        is provided.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TBODY-class.html">web2py.gluon.html.TBODY</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.EM-class.html">web2py.gluon.html.EM</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.BEAUTIFY-class.html">web2py.gluon.html.BEAUTIFY</a></strong>:
      <em class="summary">example::

    &gt;&gt;&gt; BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
    '&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;b&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;font-weight:bold;&quot;&gt;hello&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;:&lt;/td&gt;&lt;td&gt;&lt;div&gt;world&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'

turns any list, dictionary, etc into decent looking html.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.FORM-class.html">web2py.gluon.html.FORM</a></strong>:
      <em class="summary">example:</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html">web2py.gluon.sqlhtml.SQLFORM</a></strong>:
      <em class="summary">SQLFORM is used to map a table (and a current record) into an HTML form

given a SQLTable stored in db.table

generates an insert form::

    SQLFORM(db.table)

generates an update form::

    record=db.table[some_id]
    SQLFORM(db.table, record)

generates an update with a delete button::

    SQLFORM(db.table, record, deletable=True)

if record is an int::

    record=db.table[record]

optional arguments:

:param fields: a list of fields that should be placed in the form,
    default is all.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.META-class.html">web2py.gluon.html.META</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.H3-class.html">web2py.gluon.html.H3</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.A-class.html">web2py.gluon.html.A</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.THEAD-class.html">web2py.gluon.html.THEAD</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.H1-class.html">web2py.gluon.html.H1</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.H2-class.html">web2py.gluon.html.H2</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TT-class.html">web2py.gluon.html.TT</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.XHTML-class.html">web2py.gluon.html.XHTML</a></strong>:
      <em class="summary">This is XHTML version of the HTML helper.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.INPUT-class.html">web2py.gluon.html.INPUT</a></strong>:
      <em class="summary">INPUT Component

examples::

    &gt;&gt;&gt; INPUT(_type='text', _name='name', value='Max').xml()
    '&lt;input name=&quot;name&quot; type=&quot;text&quot; value=&quot;Max&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='checkbox', _name='checkbox', value='on').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;checkbox&quot; type=&quot;checkbox&quot; value=&quot;on&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;yes&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()
    '&lt;input name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;no&quot; /&gt;'

the input helper takes two special attributes value= and requires=.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.SELECT-class.html">web2py.gluon.html.SELECT</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TEXTAREA-class.html">web2py.gluon.html.TEXTAREA</a></strong>:
      <em class="summary">example:</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.COLGROUP-class.html">web2py.gluon.html.COLGROUP</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.HTML-class.html">web2py.gluon.html.HTML</a></strong>:
      <em class="summary">There are four predefined document type definitions.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.STYLE-class.html">web2py.gluon.html.STYLE</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.IFRAME-class.html">web2py.gluon.html.IFRAME</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.TFOOT-class.html">web2py.gluon.html.TFOOT</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.MENU-class.html">web2py.gluon.html.MENU</a></strong>:
      <em class="summary">Used to build menus...</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.SPAN-class.html">web2py.gluon.html.SPAN</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.CODE-class.html">web2py.gluon.html.CODE</a></strong>:
      <em class="summary">displays code in HTML with syntax highlighting.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.OPTION-class.html">web2py.gluon.html.OPTION</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.CAT-class.html">web2py.gluon.html.CAT</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.MARKMIN-class.html">web2py.gluon.html.MARKMIN</a></strong>:
      <em class="summary">For documentation: 
        http://web2py.com/examples/static/markmin.html</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.XML-class.html">web2py.gluon.html.XML</a></strong>:
      <em class="summary">use it to wrap a string that contains XML/HTML so that it will 
        not be escaped by the template</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.html.__TAG__-class.html">web2py.gluon.html.__TAG__</a></strong>:
      <em class="summary">TAG factory example:</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.compileapp.LoadFactory-class.html">web2py.gluon.compileapp.LoadFactory</a></strong>:
      <em class="summary">Attention: this helper is new and experimental</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Rows-class.html">web2py.gluon.dal.Rows</a></strong>:
      <em class="summary">A wrapper for the return value of a select.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.PluginManager-class.html">web2py.gluon.tools.PluginManager</a></strong>:
      <em class="summary">Plugin Manager is similar to a storage object but it is a single
        level singleton this means that multiple instances within the same 
        thread share the same attributes Its constructor is also 
        special.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Mail-class.html">web2py.gluon.tools.Mail</a></strong>:
      <em class="summary">Class for configuring and sending emails with alternative text /
        html body, multiple attachments and encryption support</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.main.HttpServer-class.html">web2py.gluon.main.HttpServer</a></strong>:
      <em class="summary">the web2py web server (Rocket)</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.template.Node-class.html">web2py.gluon.template.Node</a></strong>:
      <em class="summary">Basic Container Object</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.template.BlockNode-class.html">web2py.gluon.template.BlockNode</a></strong>:
      <em class="summary">Block Container.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.template.Content-class.html">web2py.gluon.template.Content</a></strong>:
      <em class="summary">Parent Container -- Used as the root level BlockNode.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.template.SuperNode-class.html">web2py.gluon.template.SuperNode</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.SQLALL-class.html">web2py.gluon.dal.SQLALL</a></strong>:
      <em class="summary">Helper class providing a comma-separated string having all the 
        field names (prefixed by table name and '.')</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.compileapp.mybuiltin-class.html">web2py.gluon.compileapp.mybuiltin</a></strong>:
      <em class="summary">NOTE could simple use a dict and populate it, NOTE not sure if 
        this changes things though if monkey patching import.....</em>
    </li>
    <li> <strong class="uidlink"><a href="datetime.date-class.html">datetime.date</a></strong>:
      <em class="summary">date(year, month, day) --&gt; date object</em>
    <ul>
    <li> <strong class="uidlink"><a href="datetime.datetime-class.html">datetime.datetime</a></strong>:
      <em class="summary">datetime(year, month, day[, hour[, minute[, second[, 
        microsecond[,tzinfo]]]]])</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.FormWidget-class.html">web2py.gluon.sqlhtml.FormWidget</a></strong>:
      <em class="summary">helper for SQLFORM to generate form input fields (widget), 
        related to the fieldtype</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.BooleanWidget-class.html">web2py.gluon.sqlhtml.BooleanWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">web2py.gluon.sqlhtml.OptionsWidget</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html">web2py.gluon.sqlhtml.CheckboxesWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html">web2py.gluon.sqlhtml.MultipleOptionsWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.RadioWidget-class.html">web2py.gluon.sqlhtml.RadioWidget</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.TextWidget-class.html">web2py.gluon.sqlhtml.TextWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.StringWidget-class.html">web2py.gluon.sqlhtml.StringWidget</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.DatetimeWidget-class.html">web2py.gluon.sqlhtml.DatetimeWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.IntegerWidget-class.html">web2py.gluon.sqlhtml.IntegerWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.DoubleWidget-class.html">web2py.gluon.sqlhtml.DoubleWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.DecimalWidget-class.html">web2py.gluon.sqlhtml.DecimalWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.DateWidget-class.html">web2py.gluon.sqlhtml.DateWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.ListWidget-class.html">web2py.gluon.sqlhtml.ListWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.TimeWidget-class.html">web2py.gluon.sqlhtml.TimeWidget</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html">web2py.gluon.sqlhtml.UploadWidget</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.PasswordWidget-class.html">web2py.gluon.sqlhtml.PasswordWidget</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.highlight.Highlighter-class.html">web2py.gluon.highlight.Highlighter</a></strong>:
      <em class="summary">Do syntax highlighting.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.template.TemplateParser-class.html">web2py.gluon.template.TemplateParser</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.widget.IO-class.html">web2py.gluon.widget.IO</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Auth-class.html">web2py.gluon.tools.Auth</a></strong>:
      <em class="summary">Class for authentication, authorization, role based access control.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.ConnectionPool-class.html">web2py.gluon.dal.ConnectionPool</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.BaseAdapter-class.html">web2py.gluon.dal.BaseAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.NoSQLAdapter-class.html">web2py.gluon.dal.NoSQLAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.CouchDBAdapter-class.html">web2py.gluon.dal.CouchDBAdapter</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">web2py.gluon.dal.GoogleDatastoreAdapter</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.MongoDBAdapter-class.html">web2py.gluon.dal.MongoDBAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.FireBirdAdapter-class.html">web2py.gluon.dal.FireBirdAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html">web2py.gluon.dal.FireBirdEmbeddedAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.IngresAdapter-class.html">web2py.gluon.dal.IngresAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html">web2py.gluon.dal.IngresUnicodeAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.DB2Adapter-class.html">web2py.gluon.dal.DB2Adapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.TeradataAdapter-class.html">web2py.gluon.dal.TeradataAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.OracleAdapter-class.html">web2py.gluon.dal.OracleAdapter</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.MySQLAdapter-class.html">web2py.gluon.dal.MySQLAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.CubridAdapter-class.html">web2py.gluon.dal.CubridAdapter</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.GoogleSQLAdapter-class.html">web2py.gluon.dal.GoogleSQLAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.MSSQLAdapter-class.html">web2py.gluon.dal.MSSQLAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html">web2py.gluon.dal.MSSQL2Adapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.InformixAdapter-class.html">web2py.gluon.dal.InformixAdapter</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">web2py.gluon.dal.PostgreSQLAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html">web2py.gluon.dal.JDBCPostgreSQLAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.SQLiteAdapter-class.html">web2py.gluon.dal.SQLiteAdapter</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html">web2py.gluon.dal.JDBCSQLiteAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.SAPDBAdapter-class.html">web2py.gluon.dal.SAPDBAdapter</a></strong>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.GAEF-class.html">web2py.gluon.dal.GAEF</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Expression-class.html">web2py.gluon.dal.Expression</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Field-class.html">web2py.gluon.dal.Field</a></strong>:
      <em class="summary">an instance of this class represents a database field</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">exceptions.BaseException</strong>:
      <em class="summary">Common base class for all exceptions</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.http.HTTP-class.html">web2py.gluon.http.HTTP</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="exceptions.Exception-class.html">exceptions.Exception</a></strong>:
      <em class="summary">Common base class for all non-exit exceptions.</em>
    <ul>
    <li> <strong class="uidlink">exceptions.Warning</strong>:
      <em class="summary">Base class for warning categories.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.Warning-class.html">web2py.gluon.contrib.pymysql.err.Warning</a></strong>:
      <em class="summary">Exception raised for important warnings like data truncations 
        while inserting, etc.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.SocketTimeout-class.html">web2py.gluon.rocket.SocketTimeout</a></strong>:
      <em class="summary">Exception for when a socket times out between requests.</em>
    </li>
    <li> <strong class="uidlink">web2py.gluon.contrib.pymysql.err.MySQLError</strong>:
      <em class="summary">Exception related to operation with MySQL.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.Error-class.html">web2py.gluon.contrib.pymysql.err.Error</a></strong>:
      <em class="summary">Exception that is the base class of all other error exceptions 
        (not Warning).</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">web2py.gluon.contrib.pymysql.err.DatabaseError</a></strong>:
      <em class="summary">Exception raised for errors that are related to the 
        database.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.DataError-class.html">web2py.gluon.contrib.pymysql.err.DataError</a></strong>:
      <em class="summary">Exception raised for errors that are due to problems with the 
        processed data like division by zero, numeric value out of range, 
        etc.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html">web2py.gluon.contrib.pymysql.err.IntegrityError</a></strong>:
      <em class="summary">Exception raised when the relational integrity of the database 
        is affected, e.g.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html">web2py.gluon.contrib.pymysql.err.NotSupportedError</a></strong>:
      <em class="summary">Exception raised in case a method or database API was used which
        is not supported by the database, e.g.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.InternalError-class.html">web2py.gluon.contrib.pymysql.err.InternalError</a></strong>:
      <em class="summary">Exception raised when the database encounters an internal error,
        e.g.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html">web2py.gluon.contrib.pymysql.err.ProgrammingError</a></strong>:
      <em class="summary">Exception raised for programming errors, e.g.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html">web2py.gluon.contrib.pymysql.err.OperationalError</a></strong>:
      <em class="summary">Exception raised for errors that are related to the database's 
        operation and not necessarily under the control of the programmer, 
        e.g.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html">web2py.gluon.contrib.pymysql.err.InterfaceError</a></strong>:
      <em class="summary">Exception raised for errors that are related to the database 
        interface rather than the database itself.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.err.Warning-class.html">web2py.gluon.contrib.pymysql.err.Warning</a></strong>:
      <em class="summary">Exception raised for important warnings like data truncations 
        while inserting, etc.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Service.JsonRpcException-class.html">web2py.gluon.tools.Service.JsonRpcException</a></strong>
    </li>
    <li> <strong class="uidlink">exceptions.StandardError</strong>:
      <em class="summary">Base class for all standard Python exceptions that do not 
        represent interpreter exiting.</em>
    <ul>
    <li> <strong class="uidlink"><a href="psycopg2.Warning-class.html">psycopg2.Warning</a></strong>:
      <em class="summary">A database warning.</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.Error-class.html">psycopg2.Error</a></strong>:
      <em class="summary">Base class for error exceptions.</em>
    <ul>
    <li> <strong class="uidlink"><a href="psycopg2.DatabaseError-class.html">psycopg2.DatabaseError</a></strong>:
      <em class="summary">Error related to the database engine.</em>
    <ul>
    <li> <strong class="uidlink"><a href="psycopg2.NotSupportedError-class.html">psycopg2.NotSupportedError</a></strong>:
      <em class="summary">A not supported datbase API was called.</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.IntegrityError-class.html">psycopg2.IntegrityError</a></strong>:
      <em class="summary">Error related to database integrity.</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.InternalError-class.html">psycopg2.InternalError</a></strong>:
      <em class="summary">The database encountered an internal error.</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.OperationalError-class.html">psycopg2.OperationalError</a></strong>:
      <em class="summary">Error related to database operation (disconnect, memory 
        allocation etc).</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.ProgrammingError-class.html">psycopg2.ProgrammingError</a></strong>:
      <em class="summary">Error related to database programming (SQL error, table not 
        found etc).</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.DataError-class.html">psycopg2.DataError</a></strong>:
      <em class="summary">Error related to problems with the processed data.</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.InterfaceError-class.html">psycopg2.InterfaceError</a></strong>:
      <em class="summary">Error related to the database interface.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.restricted.RestrictedError-class.html">web2py.gluon.restricted.RestrictedError</a></strong>:
      <em class="summary">class used to wrap an exception that occurs in the restricted 
        environment below.</em>
    </li>
    <li> <strong class="uidlink">socket.error</strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.SSLError-class.html">web2py.gluon.rocket.SSLError</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.http.HTTP-class.html">web2py.gluon.http.HTTP</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.SocketClosed-class.html">web2py.gluon.rocket.SocketClosed</a></strong>:
      <em class="summary">Exception for when a socket is closed by the client.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.BadRequest-class.html">web2py.gluon.rocket.BadRequest</a></strong>:
      <em class="summary">Exception for when a client sends an incomprehensible 
        request.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink">gluon.html.XmlComponent</strong>:
      <em class="summary">Abstract root for all Html components</em>
    <ul>
    <li> <strong class="uidlink">gluon.html.DIV</strong>:
      <em class="summary">HTML helper, for easy generating and manipulating a DOM 
        structure.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Recaptcha-class.html">web2py.gluon.tools.Recaptcha</a></strong>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools.Crud-class.html">web2py.gluon.tools.Crud</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rewrite.MapUrlOut-class.html">web2py.gluon.rewrite.MapUrlOut</a></strong>:
      <em class="summary">logic for mapping outgoing URLs</em>
    </li>
    <li> <strong class="uidlink">int</strong>:
      <em class="summary">int(x[, base]) -&gt; integer</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Reference-class.html">web2py.gluon.dal.Reference</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron.Token-class.html">web2py.gluon.newcron.Token</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rewrite.MapUrlIn-class.html">web2py.gluon.rewrite.MapUrlIn</a></strong>:
      <em class="summary">logic for mapping incoming URLs</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.cache.CacheAbstract-class.html">web2py.gluon.cache.CacheAbstract</a></strong>:
      <em class="summary">Abstract class for cache implementations.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.cache.CacheInRam-class.html">web2py.gluon.cache.CacheInRam</a></strong>:
      <em class="summary">Ram based caching</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.cache.CacheOnDisk-class.html">web2py.gluon.cache.CacheOnDisk</a></strong>:
      <em class="summary">Disk based cache</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.cache.Cache-class.html">web2py.gluon.cache.Cache</a></strong>:
      <em class="summary">Sets up generic caching, creating an instance of both CacheInRam and
CacheOnDisk.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.widget.web2pyDialog-class.html">web2py.gluon.widget.web2pyDialog</a></strong>:
      <em class="summary">Main window dialog</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.Set-class.html">web2py.gluon.dal.Set</a></strong>:
      <em class="summary">a Set represents a set of records in the database,
the records are identified by the query=Query(...) object.</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.validators.IS_STRONG-class.html">web2py.gluon.validators.IS_STRONG</a></strong>:
      <em class="summary">example:</em>
    </li>
    <li> <strong class="uidlink"><a href="datetime.time-class.html">datetime.time</a></strong>:
      <em class="summary">time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --&gt;
        a time object</em>
    </li>
    <li> <strong class="uidlink">list</strong>:
      <em class="summary">list() -&gt; new list list(sequence) -&gt; new list initialized 
        from sequence's items</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.SQLCallableList-class.html">web2py.gluon.dal.SQLCallableList</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.storage.List-class.html">web2py.gluon.storage.List</a></strong>:
      <em class="summary">Like a regular python list but a[i] if i is out of bounds return
        None instead of IndexOutOfBounds</em>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html">web2py.gluon.sqlhtml.AutocompleteWidget</a></strong>
    </li>
    <li> <strong class="uidlink">datetime.tzinfo</strong>:
      <em class="summary">Abstract base class for time zone info objects.</em>
    <ul>
    <li> <strong class="uidlink"><a href="psycopg2.tz.FixedOffsetTimezone-class.html">psycopg2.tz.FixedOffsetTimezone</a></strong>:
      <em class="summary">Fixed offset in minutes east from UTC.</em>
    </li>
    <li> <strong class="uidlink"><a href="psycopg2.tz.LocalTimezone-class.html">psycopg2.tz.LocalTimezone</a></strong>:
      <em class="summary">Platform idea of local timezone.</em>
    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html">web2py.gluon.dal.DatabaseStoredFile</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">web2py.gluon.dal.UseDatabaseStoredFile</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.dal.GoogleSQLAdapter-class.html">web2py.gluon.dal.GoogleSQLAdapter</a></strong>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.FileWrapper-class.html">web2py.gluon.rocket.FileWrapper</a></strong>:
      <em class="summary">Wrapper to convert file-like objects to iterables</em>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.Headers-class.html">web2py.gluon.rocket.Headers</a></strong>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket.ThreadPool-class.html">web2py.gluon.rocket.ThreadPool</a></strong>:
      <em class="summary">The ThreadPool class is a container class for all the worker 
        threads.</em>
    </li>
    <li> <strong class="uidlink">win32serviceutil.ServiceFramework</strong>
    </li>
</ul>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/crarr.png version [bcc1196f30].

cannot compute difference between binary files

Added applications/examples/static/epydoc/datetime.date-class.html version [f4d4483ada].

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>datetime.date</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        datetime ::
        date ::
        Class&nbsp;date
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="datetime.date-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class date</h1><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">date</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="datetime.datetime-class.html">datetime</a>
</dd></dl>

<hr />
date(year, month, day) --&gt; date object<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__add__"></a><span class="summary-sig-name">__add__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x+y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x==y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ge__"></a><span class="summary-sig-name">__ge__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&gt;=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
      x.__getattribute__('name') &lt;==&gt; x.name</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__gt__"></a><span class="summary-sig-name">__gt__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&gt;y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__le__"></a><span class="summary-sig-name">__le__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&lt;=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__lt__"></a><span class="summary-sig-name">__lt__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&lt;y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x!=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
        <span class="summary-sig-arg">S</span>,
        <span class="summary-sig-arg">...</span>)</span><br />
      Returns:
a new object with type S, a subtype of T</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__radd__"></a><span class="summary-sig-name">__radd__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      y+x</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#__reduce__" class="summary-sig-name">__reduce__</a>()</span><br />
      Returns:
(cls, state)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__rsub__"></a><span class="summary-sig-name">__rsub__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      y-x</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__sub__"></a><span class="summary-sig-name">__sub__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x-y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="ctime"></a><span class="summary-sig-name">ctime</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return ctime() style string.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="fromordinal"></a><span class="summary-sig-name">fromordinal</span>(<span class="summary-sig-arg">...</span>)</span><br />
      int -&gt; date corresponding to a proleptic Gregorian ordinal.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="fromtimestamp"></a><span class="summary-sig-name">fromtimestamp</span>(<span class="summary-sig-arg">...</span>)</span><br />
      timestamp -&gt; local date from a POSIX timestamp (like 
      time.time()).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isocalendar"></a><span class="summary-sig-name">isocalendar</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return a 3-tuple containing ISO year, week number, and 
      weekday.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isoformat"></a><span class="summary-sig-name">isoformat</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return string in ISO 8601 format, YYYY-MM-DD.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#isoweekday" class="summary-sig-name">isoweekday</a>(<span class="summary-sig-arg">...</span>)</span><br />
      Return the day of the week represented by the date.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="replace"></a><span class="summary-sig-name">replace</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return date with new specified fields.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="strftime"></a><span class="summary-sig-name">strftime</span>(<span class="summary-sig-arg">...</span>)</span><br />
      format -&gt; strftime() style string.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="timetuple"></a><span class="summary-sig-name">timetuple</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return time tuple, compatible with time.localtime().</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="today"></a><span class="summary-sig-name">today</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Current date or datetime:  same as 
      self.__class__.fromtimestamp(time.time()).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#toordinal" class="summary-sig-name">toordinal</a>(<span class="summary-sig-arg">...</span>)</span><br />
      Return proleptic Gregorian ordinal.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.date-class.html#weekday" class="summary-sig-name">weekday</a>(<span class="summary-sig-arg">...</span>)</span><br />
      Return the day of the week represented by the date.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__init__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="max"></a><span class="summary-name">max</span> = <code title="datetime.date(9999, 12, 31)">datetime.date(9999, 12, 31)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="min"></a><span class="summary-name">min</span> = <code title="datetime.date(1, 1, 1)">datetime.date(1, 1, 1)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="resolution"></a><span class="summary-name">resolution</span> = <code title="datetime.timedelta(1)">datetime.timedelta(1)</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="day"></a><span class="summary-name">day</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="month"></a><span class="summary-name">month</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="year"></a><span class="summary-name">year</span>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__getattribute__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x.__getattribute__('name') &lt;==&gt; x.name
  <dl class="fields">
    <dt>Overrides:
      object.__getattribute__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  hash(x)
  <dl class="fields">
    <dt>Overrides:
      object.__hash__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__new__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
        <span class="sig-arg">S</span>,
        <span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
a new object with type S, a subtype of T

</pre></dd>
    <dt>Overrides:
      object.__new__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__reduce__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__reduce__</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  helper for pickle
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
(cls, state)

</pre></dd>
    <dt>Overrides:
      object.__reduce__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      object.__repr__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="isoweekday"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">isoweekday</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Return the day of the week represented by the date. Monday == 1 ... 
  Sunday == 7
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="toordinal"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">toordinal</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Return proleptic Gregorian ordinal.  January 1 of year 1 is day 1.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="weekday"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">weekday</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Return the day of the week represented by the date. Monday == 0 ... 
  Sunday == 6
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/datetime.datetime-class.html version [3fd874a974].








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>datetime.datetime</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        datetime ::
        datetime ::
        Class&nbsp;datetime
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="datetime.datetime-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class datetime</h1><br /><br />
<pre class="base-tree">
object --+    
         |    
      <a href="datetime.date-class.html">date</a> --+
             |
            <strong class="uidshort">datetime</strong>
</pre>

<hr />
<p>datetime(year, month, day[, hour[, minute[, second[, 
  microsecond[,tzinfo]]]]])</p>
  The year, month and day arguments are required. tzinfo may be None, or
  an instance of a tzinfo subclass. The remaining arguments may be ints or 
  longs.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__add__" class="summary-sig-name">__add__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x+y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x==y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__ge__" class="summary-sig-name">__ge__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&gt;=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
      x.__getattribute__('name') &lt;==&gt; x.name</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__gt__" class="summary-sig-name">__gt__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&gt;y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__le__" class="summary-sig-name">__le__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&lt;=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__lt__" class="summary-sig-name">__lt__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&lt;y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__ne__" class="summary-sig-name">__ne__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x!=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
        <span class="summary-sig-arg">S</span>,
        <span class="summary-sig-arg">...</span>)</span><br />
      Returns:
a new object with type S, a subtype of T</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__radd__" class="summary-sig-name">__radd__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      y+x</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__reduce__" class="summary-sig-name">__reduce__</a>()</span><br />
      Returns:
(cls, state)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__rsub__" class="summary-sig-name">__rsub__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      y-x</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#__sub__" class="summary-sig-name">__sub__</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x-y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="astimezone"></a><span class="summary-sig-name">astimezone</span>(<span class="summary-sig-arg">...</span>)</span><br />
      tz -&gt; convert to local time in new timezone tz</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="combine"></a><span class="summary-sig-name">combine</span>(<span class="summary-sig-arg">...</span>)</span><br />
      date, time -&gt; datetime with same date and time fields</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#ctime" class="summary-sig-name">ctime</a>(<span class="summary-sig-arg">...</span>)</span><br />
      Return ctime() style string.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="date"></a><span class="summary-sig-name">date</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return date object with same year, month and day.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dst"></a><span class="summary-sig-name">dst</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return self.tzinfo.dst(self).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#fromtimestamp" class="summary-sig-name">fromtimestamp</a>(<span class="summary-sig-arg">...</span>)</span><br />
      timestamp[, tz] -&gt; tz's local time from POSIX timestamp.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#isoformat" class="summary-sig-name">isoformat</a>(<span class="summary-sig-arg">...</span>)</span><br />
      [sep] -&gt; string in ISO 8601 format, 
      YYYY-MM-DDTHH:MM:SS[.mmmmmm][+HH:MM].</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="now"></a><span class="summary-sig-name">now</span>(<span class="summary-sig-arg">...</span>)</span><br />
      [tz] -&gt; new datetime with tz's local day and time.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#replace" class="summary-sig-name">replace</a>(<span class="summary-sig-arg">...</span>)</span><br />
      Return datetime with new specified fields.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="strptime"></a><span class="summary-sig-name">strptime</span>(<span class="summary-sig-arg">...</span>)</span><br />
      string, format -&gt; new datetime parsed from a string (like 
      time.strptime()).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="time"></a><span class="summary-sig-name">time</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return time object with same time but with tzinfo=None.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.datetime-class.html#timetuple" class="summary-sig-name">timetuple</a>(<span class="summary-sig-arg">...</span>)</span><br />
      Return time tuple, compatible with time.localtime().</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="timetz"></a><span class="summary-sig-name">timetz</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return time object with same time and tzinfo.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="tzname"></a><span class="summary-sig-name">tzname</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return self.tzinfo.tzname(self).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="utcfromtimestamp"></a><span class="summary-sig-name">utcfromtimestamp</span>(<span class="summary-sig-arg">...</span>)</span><br />
      timestamp -&gt; UTC datetime from a POSIX timestamp (like 
      time.time()).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="utcnow"></a><span class="summary-sig-name">utcnow</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return a new datetime representing UTC day and time.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="utcoffset"></a><span class="summary-sig-name">utcoffset</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return self.tzinfo.utcoffset(self).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="utctimetuple"></a><span class="summary-sig-name">utctimetuple</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return UTC time tuple, compatible with time.localtime().</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="datetime.date-class.html">date</a></code></b>:
      <code><a href="datetime.date-class.html#fromordinal">fromordinal</a></code>,
      <code><a href="datetime.date-class.html#isocalendar">isocalendar</a></code>,
      <code><a href="datetime.date-class.html#isoweekday">isoweekday</a></code>,
      <code><a href="datetime.date-class.html#strftime">strftime</a></code>,
      <code><a href="datetime.date-class.html#today">today</a></code>,
      <code><a href="datetime.date-class.html#toordinal">toordinal</a></code>,
      <code><a href="datetime.date-class.html#weekday">weekday</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__init__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="max"></a><span class="summary-name">max</span> = <code title="datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)">datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="min"></a><span class="summary-name">min</span> = <code title="datetime.datetime(1, 1, 1, 0, 0)">datetime.datetime(1, 1, 1, 0, 0)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="resolution"></a><span class="summary-name">resolution</span> = <code title="datetime.timedelta(0, 0, 1)">datetime.timedelta(0, 0, 1)</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="hour"></a><span class="summary-name">hour</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="microsecond"></a><span class="summary-name">microsecond</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="minute"></a><span class="summary-name">minute</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="second"></a><span class="summary-name">second</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tzinfo"></a><span class="summary-name">tzinfo</span>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="datetime.date-class.html">date</a></code></b>:
      <code><a href="datetime.date-class.html#day">day</a></code>,
      <code><a href="datetime.date-class.html#month">month</a></code>,
      <code><a href="datetime.date-class.html#year">year</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__add__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__add__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Addition operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x+y
  <dl class="fields">
    <dt>Overrides:
      date.__add__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__eq__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__eq__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Equality operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x==y
  <dl class="fields">
    <dt>Overrides:
      date.__eq__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__ge__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__ge__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Greater-than-or-equals operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x&gt;=y
  <dl class="fields">
    <dt>Overrides:
      date.__ge__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__getattribute__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x.__getattribute__('name') &lt;==&gt; x.name
  <dl class="fields">
    <dt>Overrides:
      date.__getattribute__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__gt__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__gt__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Greater-than operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x&gt;y
  <dl class="fields">
    <dt>Overrides:
      date.__gt__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  hash(x)
  <dl class="fields">
    <dt>Overrides:
      date.__hash__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__le__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__le__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Less-than-or-equals operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x&lt;=y
  <dl class="fields">
    <dt>Overrides:
      date.__le__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__lt__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__lt__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Less-than operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x&lt;y
  <dl class="fields">
    <dt>Overrides:
      date.__lt__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__ne__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__ne__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x!=y
  <dl class="fields">
    <dt>Overrides:
      date.__ne__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__new__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
        <span class="sig-arg">S</span>,
        <span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
a new object with type S, a subtype of T

</pre></dd>
    <dt>Overrides:
      date.__new__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__radd__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__radd__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Right-side addition operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  y+x
  <dl class="fields">
    <dt>Overrides:
      date.__radd__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__reduce__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__reduce__</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  helper for pickle
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
(cls, state)

</pre></dd>
    <dt>Overrides:
      date.__reduce__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      date.__repr__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__rsub__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__rsub__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  y-x
  <dl class="fields">
    <dt>Overrides:
      date.__rsub__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      date.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__sub__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__sub__</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
    <br /><em class="fname">(Subtraction operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x-y
  <dl class="fields">
    <dt>Overrides:
      date.__sub__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="ctime"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ctime</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Return ctime() style string.
  <dl class="fields">
    <dt>Overrides:
      date.ctime
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="fromtimestamp"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fromtimestamp</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  timestamp[, tz] -&gt; tz's local time from POSIX timestamp.
  <dl class="fields">
    <dt>Overrides:
      date.fromtimestamp
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="isoformat"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">isoformat</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <p>[sep] -&gt; string in ISO 8601 format, 
  YYYY-MM-DDTHH:MM:SS[.mmmmmm][+HH:MM].</p>
  sep is used to separate the year from the time, and defaults to 
  'T'.
  <dl class="fields">
    <dt>Overrides:
      date.isoformat
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="replace"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">replace</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Return datetime with new specified fields.
  <dl class="fields">
    <dt>Overrides:
      date.replace
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="timetuple"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">timetuple</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Return time tuple, compatible with time.localtime().
  <dl class="fields">
    <dt>Overrides:
      date.timetuple
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/datetime.time-class.html version [9e509d7714].


















































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>datetime.time</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        datetime ::
        time ::
        Class&nbsp;time
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="datetime.time-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class time</h1><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">time</strong>
</pre>

<hr />
<p>time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --&gt; a 
  time object</p>
  All arguments are optional. tzinfo may be None, or an instance of a 
  tzinfo subclass. The remaining arguments may be ints or longs.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x==y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ge__"></a><span class="summary-sig-name">__ge__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&gt;=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.time-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
      x.__getattribute__('name') &lt;==&gt; x.name</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__gt__"></a><span class="summary-sig-name">__gt__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&gt;y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.time-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__le__"></a><span class="summary-sig-name">__le__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&lt;=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__lt__"></a><span class="summary-sig-name">__lt__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x&lt;y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      x!=y</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.time-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
        <span class="summary-sig-arg">S</span>,
        <span class="summary-sig-arg">...</span>)</span><br />
      Returns:
a new object with type S, a subtype of T</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__nonzero__"></a><span class="summary-sig-name">__nonzero__</span>(<span class="summary-sig-arg">x</span>)</span><br />
      x != 0</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.time-class.html#__reduce__" class="summary-sig-name">__reduce__</a>()</span><br />
      Returns:
(cls, state)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.time-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="datetime.time-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">x</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dst"></a><span class="summary-sig-name">dst</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return self.tzinfo.dst(self).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isoformat"></a><span class="summary-sig-name">isoformat</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return string in ISO 8601 format, HH:MM:SS[.mmmmmm][+HH:MM].</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="replace"></a><span class="summary-sig-name">replace</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return time with new specified fields.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="strftime"></a><span class="summary-sig-name">strftime</span>(<span class="summary-sig-arg">...</span>)</span><br />
      format -&gt; strftime() style string.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="tzname"></a><span class="summary-sig-name">tzname</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return self.tzinfo.tzname(self).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="utcoffset"></a><span class="summary-sig-name">utcoffset</span>(<span class="summary-sig-arg">...</span>)</span><br />
      Return self.tzinfo.utcoffset(self).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__init__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="max"></a><span class="summary-name">max</span> = <code title="datetime.time(23, 59, 59, 999999)">datetime.time(23, 59, 59, 999999)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="min"></a><span class="summary-name">min</span> = <code title="datetime.time(0, 0)">datetime.time(0, 0)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="resolution"></a><span class="summary-name">resolution</span> = <code title="datetime.timedelta(0, 0, 1)">datetime.timedelta(0, 0, 1)</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="hour"></a><span class="summary-name">hour</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="microsecond"></a><span class="summary-name">microsecond</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="minute"></a><span class="summary-name">minute</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="second"></a><span class="summary-name">second</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tzinfo"></a><span class="summary-name">tzinfo</span>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__getattribute__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x.__getattribute__('name') &lt;==&gt; x.name
  <dl class="fields">
    <dt>Overrides:
      object.__getattribute__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  hash(x)
  <dl class="fields">
    <dt>Overrides:
      object.__hash__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__new__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
        <span class="sig-arg">S</span>,
        <span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
a new object with type S, a subtype of T

</pre></dd>
    <dt>Overrides:
      object.__new__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__reduce__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__reduce__</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  helper for pickle
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
(cls, state)

</pre></dd>
    <dt>Overrides:
      object.__reduce__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      object.__repr__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">x</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/epydoc.css version [586d28cf53].



























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


/* Epydoc CSS Stylesheet
 *
 * This stylesheet can be used to customize the appearance of epydoc's
 * HTML output.
 *
 */

/* Default Colors & Styles
 *   - Set the default foreground & background color with 'body'; and 
 *     link colors with 'a:link' and 'a:visited'.
 *   - Use bold for decision list terms.
 *   - The heading styles defined here are used for headings *within*
 *     docstring descriptions.  All headings used by epydoc itself use
 *     either class='epydoc' or class='toc' (CSS styles for both
 *     defined below).
body                        { background: #ffffff; color: #000000; }
a:link                      { color: #0000ff; }
a:visited                   { color: #204080; }
dt                          { font-weight: bold; }
h1                          { font-size: +140%; font-style: italic;
                              font-weight: bold; }
h2                          { font-size: +125%; font-style: italic;
                              font-weight: bold; }
h3                          { font-size: +110%; font-style: italic;
                              font-weight: normal; }
code                        { font-size: 100%; }
 */
 
body                     {  background-color: #fff; color: #585858; font-size: 10pt; font-family: georgia, serif; }
a                          {color: #FF5C1F; }
a:hover               { text-decoration: underline; }
a:visited               { color: #FF5C1F;}
dt                          { font-weight: bold; }
h1                          { font-size: +140%; font-style: italic;
                              font-weight: bold; }
h2                          { color: #185360; font-size: +125%; font-style: italic;
                              font-weight: bold; }
h3                          { color: #185360; font-size: +110%; font-style: italic;
                              font-weight: normal; }
code                        { font-size: 100%; }

/* Page Header & Footer
 *   - The standard page header consists of a navigation bar (with
 *     pointers to standard pages such as 'home' and 'trees'); a
 *     breadcrumbs list, which can be used to navigate to containing
 *     classes or modules; options links, to show/hide private
 *     variables and to show/hide frames; and a page title (using
 *     <h1>).  The page title may be followed by a link to the
 *     corresponding source code (using 'span.codelink').
 *   - The footer consists of a navigation bar, a timestamp, and a
 *     pointer to epydoc's homepage.

h1.epydoc                   { margin: 0; font-size: +140%; font-weight: bold; }
h2.epydoc                   { font-size: +130%; font-weight: bold; }
h3.epydoc                   { font-size: +115%; font-weight: bold; }
td h3.epydoc                { font-size: +115%; font-weight: bold;
                              margin-bottom: 0; }
table.navbar                { background: #a0c0ff; color: #000000;
                              border: 2px groove #c0d0d0; }
table.navbar table          { color: #000000; }
th.navbar-select            { background: #70b0ff;
                              color: #000000; } 
table.navbar a              { text-decoration: none; }  
table.navbar a:link         { color: #0000ff; }
table.navbar a:visited      { color: #204080; }
span.breadcrumbs            { font-size: 85%; font-weight: bold; }
span.options                { font-size: 70%; }
span.codelink               { font-size: 85%; }
td.footer                   { font-size: 85%; }
*/

h1.epydoc                   { margin: 0; font-size: +140%; font-weight: bold; }
h2.epydoc                   { font-size: +130%; font-weight: bold; }
h3.epydoc                   { font-size: +115%; font-weight: bold; }
td h3.epydoc                { font-size: +115%; font-weight: bold;
                              margin-bottom: 0; }
table.navbar                { background:  url('title.png') repeat-x; 
                                    #background: #a0c0ff; 
                                    color: #FF5C1F;
                                    #border: 2px groove #c0d0d0; }

table.navbar table          { color: #FF5C1F; }
th.navbar-select            { background: #fff;
                                        color: #195866; } 

table.navbar a              { text-decoration: none; 
                                        color: #FF5C1F;}  
table.navbar a:link         { color: #FF5C1F; }
table.navbar a:visited      { color: #FF5C1F; }

span.breadcrumbs            { font-size: 85%; font-weight: bold; }
span.options                { font-size: 70%; }
span.codelink               { font-size: 85%; }
td.footer                   { font-size: 85%; }


/* Table Headers
 *   - Each summary table and details section begins with a 'header'
 *     row.  This row contains a section title (marked by
 *     'span.table-header') as well as a show/hide private link
 *     (marked by 'span.options', defined above).
 *   - Summary tables that contain user-defined groups mark those
 *     groups using 'group header' rows.

td.table-header             { background: #70b0ff; color: #000000;
                              border: 1px solid #608090; }
td.table-header table       { color: #000000; }
td.table-header table a:link      { color: #0000ff; }
td.table-header table a:visited   { color: #204080; }
span.table-header           { font-size: 120%; font-weight: bold; }
th.group-header             { background: #c0e0f8; color: #000000;
                              text-align: left; font-style: italic; 
                              font-size: 115%; 
                              border: 1px solid #608090; }
*/
td.table-header             { background: #258396; color: #000000;
                              border: 1px solid #608090; }

td.table-header table       { color: #fff; }
td.table-header table a:link      { color: #FF5C1F; }
td.table-header table a:visited   { color: #FF5C1F; }
span.table-header           { font-size: 120%; font-weight: bold; }
th.group-header             { background: #185360; color: #fff;
                              text-align: left; font-style: italic; 
                              font-size: 115%; 
                              border: 1px solid #608090; }

/* Summary Tables (functions, variables, etc)
 *   - Each object is described by a single row of the table with
 *     two cells.  The left cell gives the object's type, and is
 *     marked with 'code.summary-type'.  The right cell gives the
 *     object's name and a summary description.
 *   - CSS styles for the table's header and group headers are
 *     defined above, under 'Table Headers'
 */
table.summary               { border-collapse: collapse;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #608090;
                              margin-bottom: 0.5em; }
td.summary                  { border: 1px solid #608090; }
code.summary-type           { font-size: 85%; }
table.summary a:link        { color: #FF5C1F; }
table.summary a:visited     { color: #FF5C1F; }


/* Details Tables (functions, variables, etc)
 *   - Each object is described in its own div.
 *   - A single-row summary table w/ table-header is used as
 *     a header for each details section (CSS style for table-header
 *     is defined above, under 'Table Headers').
 */
table.details               { border-collapse: collapse;
                              background: #e8f0f8; color: #585858;
                              border: 1px solid #608090;
                              margin: .2em 0 0 0; }
table.details table         { color: #fff; }
table.details a:link        { color: #FF5C1F; }
table.details a:visited     { color: #FF5C1F; }

/* Fields */
dl.fields                   { margin-left: 2em; margin-top: 1em;
                              margin-bottom: 1em; }
dl.fields dd ul             { margin-left: 0em; padding-left: 0em; }
div.fields                  { margin-left: 2em; }
div.fields p                { margin-bottom: 0.5em; }

/* Index tables (identifier index, term index, etc)
 *   - link-index is used for indices containing lists of links
 *     (namely, the identifier index & term index).
 *   - index-where is used in link indices for the text indicating
 *     the container/source for each link.
 *   - metadata-index is used for indices containing metadata
 *     extracted from fields (namely, the bug index & todo index).
 */
table.link-index            { border-collapse: collapse;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #608090; }
td.link-index               { border-width: 0px; }
table.link-index a:link     { color: #FF5C1F; }
table.link-index a:visited  { color: #FF5C1F; }
span.index-where            { font-size: 70%; }
table.metadata-index        { border-collapse: collapse;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #608090; 
                              margin: .2em 0 0 0; }
td.metadata-index           { border-width: 1px; border-style: solid; }
table.metadata-index a:link { color: #FF5C1F; }
table.metadata-index a:visited  { color: #FF5C1F; }

/* Function signatures
 *   - sig* is used for the signature in the details section.
 *   - .summary-sig* is used for the signature in the summary 
 *     table, and when listing property accessor functions.
.sig-name                   { color: #006080; }
.sig-arg                    { color: #008060; }
.sig-default                { color: #602000; }
.summary-sig                { font-family: monospace; }
.summary-sig-name           { color: #006080; font-weight: bold; }
table.summary a.summary-sig-name:link
                            { color: #006080; font-weight: bold; }
table.summary a.summary-sig-name:visited
                            { color: #006080; font-weight: bold; }
.summary-sig-arg            { color: #006040; }
.summary-sig-default        { color: #501800; }
 * */
.sig-name                   { color: #FF5C1F; }
.sig-arg                    { color: #008060; }
.sig-default                { color: #602000; }
.summary-sig                { font-family: monospace; }
.summary-sig-name           { color: #FF5C1F; font-weight: bold; }
table.summary a.summary-sig-name:link
                            { color: #FF5C1F; font-weight: bold; }
table.summary a.summary-sig-name:visited
                            { color: #FF5C1F; font-weight: bold; }
.summary-sig-arg            { color: #006040; }
.summary-sig-default        { color: #FF5C1F; }


/* To render variables, classes etc. like functions */
table.summary .summary-name { color: #FF5C1F; font-weight: bold;
                              font-family: monospace; }
table.summary
     a.summary-name:link    { color: #FF5C1F; font-weight: bold;
                              font-family: monospace; }
table.summary
    a.summary-name:visited  { color: #FF5C1F; font-weight: bold;
                              font-family: monospace; }

/* Variable values
 *   - In the 'variable details' sections, each variable's value is
 *     listed in a 'pre.variable' box.  The width of this box is
 *     restricted to 80 chars; if the value's repr is longer than
 *     this it will be wrapped, using a backslash marked with
 *     class 'variable-linewrap'.  If the value's repr is longer
 *     than 3 lines, the rest will be elided; and an ellipsis
 *     marker ('...' marked with 'variable-ellipsis') will be used.
 *   - If the value is a string, its quote marks will be marked
 *     with 'variable-quote'.
 *   - If the variable is a regexp, it is syntax-highlighted using
 *     the re* CSS classes.
 */
pre.variable                { padding: .5em; margin: 0;
                              background: #dce4ec; color: #000000;
                              border: 1px solid #708890; }
.variable-linewrap          { color: #604000; font-weight: bold; }
.variable-ellipsis          { color: #604000; font-weight: bold; }
.variable-quote             { color: #604000; font-weight: bold; }
.variable-group             { color: #008000; font-weight: bold; }
.variable-op                { color: #604000; font-weight: bold; }
.variable-string            { color: #006030; }
.variable-unknown           { color: #a00000; font-weight: bold; }
.re                         { color: #000000; }
.re-char                    { color: #006030; }
.re-op                      { color: #600000; }
.re-group                   { color: #003060; }
.re-ref                     { color: #404040; }

/* Base tree
 *   - Used by class pages to display the base class hierarchy.
 */
pre.base-tree               { font-size: 80%; margin: 0; }

/* Frames-based table of contents headers
 *   - Consists of two frames: one for selecting modules; and
 *     the other listing the contents of the selected module.
 *   - h1.toc is used for each frame's heading
 *   - h2.toc is used for subheadings within each frame.
 */
h1.toc                      { text-align: center; font-size: 105%;
                              margin: 0; font-weight: bold;
                              padding: 0; }
h2.toc                      { font-size: 100%; font-weight: bold; 
                              margin: 0.5em 0 0 -0.3em; }

/* Syntax Highlighting for Source Code
 *   - doctest examples are displayed in a 'pre.py-doctest' block.
 *     If the example is in a details table entry, then it will use
 *     the colors specified by the 'table pre.py-doctest' line.
 *   - Source code listings are displayed in a 'pre.py-src' block.
 *     Each line is marked with 'span.py-line' (used to draw a line
 *     down the left margin, separating the code from the line
 *     numbers).  Line numbers are displayed with 'span.py-lineno'.
 *     The expand/collapse block toggle button is displayed with
 *     'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
 *     modify the font size of the text.)
 *   - If a source code page is opened with an anchor, then the
 *     corresponding code block will be highlighted.  The code
 *     block's header is highlighted with 'py-highlight-hdr'; and
 *     the code block's body is highlighted with 'py-highlight'.
 *   - The remaining py-* classes are used to perform syntax
 *     highlighting (py-string for string literals, py-name for names,
 *     etc.)

pre.py-doctest              { padding: .5em; margin: 1em;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #708890; }
table pre.py-doctest        { background: #dce4ec;
                              color: #000000; }
pre.py-src                  { border: 2px solid #000000; 
                              background: #f0f0f0; color: #000000; }
.py-line                    { border-left: 2px solid #000000; 
                              margin-left: .2em; padding-left: .4em; }
.py-lineno                  { font-style: italic; font-size: 90%;
                              padding-left: .5em; }
a.py-toggle                 { text-decoration: none; }
div.py-highlight-hdr        { border-top: 2px solid #000000;
                              border-bottom: 2px solid #000000;
                              background: #d8e8e8; }
div.py-highlight            { border-bottom: 2px solid #000000;
                              background: #d0e0e0; }
.py-prompt                  { color: #005050; font-weight: bold;}
.py-more                    { color: #005050; font-weight: bold;}
.py-string                  { color: #006030; }
.py-comment                 { color: #003060; }
.py-keyword                 { color: #600000; }
.py-output                  { color: #404040; }
.py-name                    { color: #000050; }
.py-name:link               { color: #000050 !important; }
.py-name:visited            { color: #000050 !important; }
.py-number                  { color: #005000; }
.py-defname                 { color: #000060; font-weight: bold; }
.py-def-name                { color: #000060; font-weight: bold; }
.py-base-class              { color: #000060; }
.py-param                   { color: #000060; }
.py-docstring               { color: #006030; }
.py-decorator               { color: #804020; }
 */
/* Use this if you don't want links to names underlined: */
/*a.py-name                   { text-decoration: none; }*/

pre.py-doctest              { padding: .5em; margin: 1em;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #708890; }
table pre.py-doctest        { background: #dce4ec;
                              color: #000000; }
pre.py-src                  { border: 2px solid #000000; 
                              background: #f0f0f0; color: #000000; }
.py-line                    { border-left: 2px solid #000000; 
                              margin-left: .2em; padding-left: .4em; }
.py-lineno                  { font-style: italic; font-size: 90%;
                              padding-left: .5em; }
a.py-toggle                 { text-decoration: none; }
div.py-highlight-hdr        { border-top: 2px solid #000000;
                              border-bottom: 2px solid #000000;
                              background: #d8e8e8; }
div.py-highlight            { border-bottom: 2px solid #000000;
                              background: #d0e0e0; }
.py-prompt                  { color: #005050; font-weight: bold;}
.py-more                    { color: #005050; font-weight: bold;}
.py-string                  { color: green; }
.py-comment                 { color: green; }
.py-keyword                 { color: blue; }
.py-output                  { color: #404040; }
.py-name                    { color: #585858;}
.py-name:link               { color: #FF5C1F !important; }
.py-name:visited            { color: #FF5C1F !important; }
.py-number                  { color: #005000; }
.py-defname                 { color: #FF5C1F; font-weight: bold; }
.py-def-name                { color: #FF5C1F; font-weight: bold; }
.py-base-class              { color: #FF5C1F; }
.py-param                   { color: #000060; }
.py-docstring               { color: green; }
.py-decorator               { color: #804020; }

/* Graphs & Diagrams
 *   - These CSS styles are used for graphs & diagrams generated using
 *     Graphviz dot.  'img.graph-without-title' is used for bare
 *     diagrams (to remove the border created by making the image
 *     clickable).
 */
img.graph-without-title     { border: none; }
img.graph-with-title        { border: 1px solid #000000; }
span.graph-title            { font-weight: bold; }
span.graph-caption          { }

/* General-purpose classes
 *   - 'p.indent-wrapped-lines' defines a paragraph whose first line
 *     is not indented, but whose subsequent lines are.
 *   - The 'nomargin-top' class is used to remove the top margin (e.g.
 *     from lists).  The 'nomargin' class is used to remove both the
 *     top and bottom margin (but not the left or right margin --
 *     for lists, that would cause the bullets to disappear.)
 */
p.indent-wrapped-lines      { padding: 0 0 0 7em; text-indent: -7em; 
                              margin: 0; }
.nomargin-top               { margin-top: 0; }
.nomargin                   { margin-top: 0; margin-bottom: 0; }

/* HTML Log */
div.log-block               { padding: 0; margin: .5em 0 .5em 0;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #000000; }
div.log-error               { padding: .1em .3em .1em .3em; margin: 4px;
                              background: #ffb0b0; color: #000000;
                              border: 1px solid #000000; }
div.log-warning             { padding: .1em .3em .1em .3em; margin: 4px;
                              background: #ffffb0; color: #000000;
                              border: 1px solid #000000; }
div.log-info               { padding: .1em .3em .1em .3em; margin: 4px;
                              background: #b0ffb0; color: #000000;
                              border: 1px solid #000000; }
h2.log-hdr                  { background: #70b0ff; color: #000000;
                              margin: 0; padding: 0em 0.5em 0em 0.5em;
                              border-bottom: 1px solid #000000; font-size: 110%; }
p.log                       { font-weight: bold; margin: .5em 0 .5em 0; }
tr.opt-changed              { color: #000000; font-weight: bold; }
tr.opt-default              { color: #606060; }
pre.log                     { margin: 0; padding: 0; padding-left: 1em; }

Added applications/examples/static/epydoc/epydoc.js version [9f477dc176].

























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function toggle_private() {
        // Search for any private/public links on this page.  Store
        // their old text in "cmd," so we will know what action to
        // take; and change their text to the opposite action.
        var cmd = "?";
        var elts = document.getElementsByTagName("a");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "privatelink") {
            cmd = elts[i].innerHTML;
            elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
                                    "hide&nbsp;private":"show&nbsp;private");
          }
        }
        // Update all DIVs containing private objects.
        var elts = document.getElementsByTagName("div");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "private") {
            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
          }
        }
        // Update all table rowss containing private objects.  Note, we
        // use "" instead of "block" becaue IE & firefox disagree on what
        // this should be (block vs table-row), and "" just gives the
        // default for both browsers.
        var elts = document.getElementsByTagName("tr");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "private") {
            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
          }
        }
        // Update all list items containing private objects.
        var elts = document.getElementsByTagName("li");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "private") {
            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
                                        "none":"list-item");
          }
        }
        // Update all list items containing private objects.
        var elts = document.getElementsByTagName("ul");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "private") {
            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
          }
        }
        // Set a cookie to remember the current option.
        document.cookie = "EpydocPrivate="+cmd;
      }
function getCookie(name) {
        var dc = document.cookie;
        var prefix = name + "=";
        var begin = dc.indexOf("; " + prefix);
        if (begin == -1) {
          begin = dc.indexOf(prefix);
          if (begin != 0) return null;
        } else
        { begin += 2; }
        var end = document.cookie.indexOf(";", begin);
        if (end == -1)
        { end = dc.length; }
        return unescape(dc.substring(begin + prefix.length, end));
      }
function setFrame(url1, url2) {
          parent.frames[1].location.href = url1;
          parent.frames[2].location.href = url2;
      }
function checkCookie() {
        var cmd=getCookie("EpydocPrivate");
        if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
            toggle_private();
      }
function toggleCallGraph(id) {
        var elt = document.getElementById(id);
        if (elt.style.display == "none")
            elt.style.display = "block";
        else
            elt.style.display = "none";
      }
function expand(id) {
  var elt = document.getElementById(id+"-expanded");
  if (elt) elt.style.display = "block";
  var elt = document.getElementById(id+"-expanded-linenums");
  if (elt) elt.style.display = "block";
  var elt = document.getElementById(id+"-collapsed");
  if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
  var elt = document.getElementById(id+"-collapsed-linenums");
  if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
  var elt = document.getElementById(id+"-toggle");
  if (elt) { elt.innerHTML = "-"; }
}

function collapse(id) {
  var elt = document.getElementById(id+"-expanded");
  if (elt) elt.style.display = "none";
  var elt = document.getElementById(id+"-expanded-linenums");
  if (elt) elt.style.display = "none";
  var elt = document.getElementById(id+"-collapsed-linenums");
  if (elt) { elt.innerHTML = "<br/>"; elt.style.display="block"; }
  var elt = document.getElementById(id+"-toggle");
  if (elt) { elt.innerHTML = "+"; }
  var elt = document.getElementById(id+"-collapsed");
  if (elt) {
    elt.style.display = "block";
    
    var indent = elt.getAttribute("indent");
    var pad = elt.getAttribute("pad");
    var s = "<tt class='py-lineno'>";
    for (var i=0; i<pad.length; i++) { s += "&nbsp;" }
    s += "</tt>";
    s += "&nbsp;&nbsp;<tt class='py-line'>";
    for (var i=0; i<indent.length; i++) { s += "&nbsp;" }
    s += "<a href='#' onclick='expand(\"" + id;
    s += "\");return false'>...</a></tt><br />";
    elt.innerHTML = s;
  }
}

function toggle(id) {
  elt = document.getElementById(id+"-toggle");
  if (elt.innerHTML == "-")
      collapse(id); 
  else
      expand(id);
  return false;
}

function highlight(id) {
  var elt = document.getElementById(id+"-def");
  if (elt) elt.className = "py-highlight-hdr";
  var elt = document.getElementById(id+"-expanded");
  if (elt) elt.className = "py-highlight";
  var elt = document.getElementById(id+"-collapsed");
  if (elt) elt.className = "py-highlight";
}

function num_lines(s) {
  var n = 1;
  var pos = s.indexOf("\n");
  while ( pos > 0) {
    n += 1;
    pos = s.indexOf("\n", pos+1);
  }
  return n;
}

// Collapse all blocks that mave more than `min_lines` lines.
function collapse_all(min_lines) {
  var elts = document.getElementsByTagName("div");
  for (var i=0; i<elts.length; i++) {
    var elt = elts[i];
    var split = elt.id.indexOf("-");
    if (split > 0)
      if (elt.id.substring(split, elt.id.length) == "-expanded")
        if (num_lines(elt.innerHTML) > min_lines)
          collapse(elt.id.substring(0, split));
  }
}

function expandto(href) {
  var start = href.indexOf("#")+1;
  if (start != 0 && start != href.length) {
    if (href.substring(start, href.length) != "-") {
      collapse_all(4);
      pos = href.indexOf(".", start);
      while (pos != -1) {
        var id = href.substring(start, pos);
        expand(id);
        pos = href.indexOf(".", pos+1);
      }
      var id = href.substring(start, href.length);
      expand(id);
      highlight(id);
    }
  }
}

function kill_doclink(id) {
  var parent = document.getElementById(id);
  parent.removeChild(parent.childNodes.item(0));
}
function auto_kill_doclink(ev) {
  if (!ev) var ev = window.event;
  if (!this.contains(ev.toElement)) {
    var parent = document.getElementById(this.parentID);
    parent.removeChild(parent.childNodes.item(0));
  }
}

function doclink(id, name, targets_id) {
  var elt = document.getElementById(id);

  // If we already opened the box, then destroy it.
  // (This case should never occur, but leave it in just in case.)
  if (elt.childNodes.length > 1) {
    elt.removeChild(elt.childNodes.item(0));
  }
  else {
    // The outer box: relative + inline positioning.
    var box1 = document.createElement("div");
    box1.style.position = "relative";
    box1.style.display = "inline";
    box1.style.top = 0;
    box1.style.left = 0;
  
    // A shadow for fun
    var shadow = document.createElement("div");
    shadow.style.position = "absolute";
    shadow.style.left = "-1.3em";
    shadow.style.top = "-1.3em";
    shadow.style.background = "#404040";
    
    // The inner box: absolute positioning.
    var box2 = document.createElement("div");
    box2.style.position = "relative";
    box2.style.border = "1px solid #a0a0a0";
    box2.style.left = "-.2em";
    box2.style.top = "-.2em";
    box2.style.background = "white";
    box2.style.padding = ".3em .4em .3em .4em";
    box2.style.fontStyle = "normal";
    box2.onmouseout=auto_kill_doclink;
    box2.parentID = id;

    // Get the targets
    var targets_elt = document.getElementById(targets_id);
    var targets = targets_elt.getAttribute("targets");
    var links = "";
    target_list = targets.split(",");
    for (var i=0; i<target_list.length; i++) {
        var target = target_list[i].split("=");
        links += "<li><a href='" + target[1] + 
               "' style='text-decoration:none'>" +
               target[0] + "</a></li>";
    }
  
    // Put it all together.
    elt.insertBefore(box1, elt.childNodes.item(0));
    //box1.appendChild(box2);
    box1.appendChild(shadow);
    shadow.appendChild(box2);
    box2.innerHTML =
        "Which <b>"+name+"</b> do you want to see documentation for?" +
        "<ul style='margin-bottom: 0;'>" +
        links + 
        "<li><a href='#' style='text-decoration:none' " +
        "onclick='kill_doclink(\""+id+"\");return false;'>"+
        "<i>None of the above</i></a></li></ul>";
  }
  return false;
}

function get_anchor() {
          var href = location.href;
          var start = href.indexOf("#")+1;
          if ((start != 0) && (start != href.length))
              return href.substring(start, href.length);
      }
function redirect_url(dottedName) {
          // Scan through each element of the "pages" list, and check
          // if "name" matches with any of them.
          for (var i=0; i<pages.length; i++) {

              // Each page has the form "<pagename>-m" or "<pagename>-c";
              // extract the <pagename> portion & compare it to dottedName.
              var pagename = pages[i].substring(0, pages[i].length-2);
              if (pagename == dottedName.substring(0,pagename.length)) {

                  // We've found a page that matches `dottedName`;
                  // construct its URL, using leftover `dottedName`
                  // content to form an anchor.
                  var pagetype = pages[i].charAt(pages[i].length-1);
                  var url = pagename + ((pagetype=="m")?"-module.html":
                                                        "-class.html");
                  if (dottedName.length > pagename.length)
                      url += "#" + dottedName.substring(pagename.length+1,
                                                        dottedName.length);
                  return url;
              }
          }
      }

Added applications/examples/static/epydoc/exceptions.Exception-class.html version [f379659542].





































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>exceptions.Exception</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        exceptions ::
        Exception ::
        Class&nbsp;Exception
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="exceptions.Exception-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Exception</h1><br /><br />
<pre class="base-tree">
   object --+    
            |    
BaseException --+
                |
               <strong class="uidshort">Exception</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    StandardError,
    Warning,
    GeneratorExit,
    StopIteration,
    <a href="web2py.gluon.http.HTTP-class.html">web2py.gluon.http.HTTP</a>,
    Queue.Empty,
    Queue.Full,
    HTMLParser.HTMLParseError,
    <a href="web2py.gluon.rocket.BadRequest-class.html">web2py.gluon.rocket.BadRequest</a>,
    socket.error,
    <a href="web2py.gluon.rocket.SocketClosed-class.html">web2py.gluon.rocket.SocketClosed</a>,
    <a href="web2py.gluon.rocket.SocketTimeout-class.html">web2py.gluon.rocket.SocketTimeout</a>,
    <a href="web2py.gluon.rocket.BadRequest-class.html">web2py.gluon.rocket.BadRequest</a>,
    <a href="web2py.gluon.rocket.SocketClosed-class.html">web2py.gluon.rocket.SocketClosed</a>,
    web2py.gluon.contrib.pymysql.err.MySQLError,
    <a href="web2py.gluon.tools.Service.JsonRpcException-class.html">web2py.gluon.tools.Service.JsonRpcException</a>,
    <a href="web2py.gluon.tools.Service.JsonRpcException-class.html">web2py.gluon.tools.Service.JsonRpcException</a>,
    <a href="web2py.gluon.restricted.RestrictedError-class.html">web2py.gluon.restricted.RestrictedError</a>
</dd></dl>

<hr />
Common base class for all non-exit exceptions.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="exceptions.Exception-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="exceptions.Exception-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
        <span class="summary-sig-arg">S</span>,
        <span class="summary-sig-arg">...</span>)</span><br />
      Returns:
a new object with type S, a subtype of T</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      BaseException.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__new__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
        <span class="sig-arg">S</span>,
        <span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
a new object with type S, a subtype of T

</pre></dd>
    <dt>Overrides:
      BaseException.__new__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/frames.html version [551171ca4e].


















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
          "DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title> web2py Web Framework </title>
</head>
<frameset cols="20%,80%">
  <frameset rows="30%,70%">
    <frame src="toc.html" name="moduleListFrame"
           id="moduleListFrame" />
    <frame src="toc-everything.html" name="moduleFrame"
           id="moduleFrame" />
  </frameset>
  <frame src="web2py.gluon-module.html" name="mainFrame" id="mainFrame" />
</frameset>
</html>

Added applications/examples/static/epydoc/help.html version [ab544c3828].























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Help</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">&nbsp;</td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="help.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>

<h1 class="epydoc"> API Documentation </h1>

<p> This document contains the API (Application Programming Interface)
documentation for web2py Web Framework.  Documentation for the Python
objects defined by the project is divided into separate pages for each
package, module, and class.  The API documentation also includes two
pages containing information about the project as a whole: a trees
page, and an index page.  </p>

<h2> Object Documentation </h2>

  <p>Each <strong>Package Documentation</strong> page contains: </p>
  <ul>
    <li> A description of the package. </li>
    <li> A list of the modules and sub-packages contained by the
    package.  </li>
    <li> A summary of the classes defined by the package. </li>
    <li> A summary of the functions defined by the package. </li>
    <li> A summary of the variables defined by the package. </li>
    <li> A detailed description of each function defined by the
    package. </li>
    <li> A detailed description of each variable defined by the
    package. </li>
  </ul>
  
  <p>Each <strong>Module Documentation</strong> page contains:</p>
  <ul>
    <li> A description of the module. </li>
    <li> A summary of the classes defined by the module. </li>
    <li> A summary of the functions defined by the module. </li>
    <li> A summary of the variables defined by the module. </li>
    <li> A detailed description of each function defined by the
    module. </li>
    <li> A detailed description of each variable defined by the
    module. </li>
  </ul>
  
  <p>Each <strong>Class Documentation</strong> page contains: </p>
  <ul>
    <li> A class inheritance diagram. </li>
    <li> A list of known subclasses. </li>
    <li> A description of the class. </li>
    <li> A summary of the methods defined by the class. </li>
    <li> A summary of the instance variables defined by the class. </li>
    <li> A summary of the class (static) variables defined by the
    class. </li> 
    <li> A detailed description of each method defined by the
    class. </li>
    <li> A detailed description of each instance variable defined by the
    class. </li> 
    <li> A detailed description of each class (static) variable defined
    by the class. </li> 
  </ul>

<h2> Project Documentation </h2>

  <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
  <ul>
    <li> The <em>module hierarchy</em> lists every package and module, with
    modules grouped into packages.  At the top level, and within each
    package, modules and sub-packages are listed alphabetically. </li>
    <li> The <em>class hierarchy</em> lists every class, grouped by base
    class.  If a class has more than one base class, then it will be
    listed under each base class.  At the top level, and under each base
    class, classes are listed alphabetically. </li>
  </ul>
  
  <p> The <strong>Index</strong> page contains indices of terms and
  identifiers: </p>
  <ul>
    <li> The <em>term index</em> lists every term indexed by any object's
    documentation.  For each term, the index provides links to each
    place where the term is indexed. </li>
    <li> The <em>identifier index</em> lists the (short) name of every package,
    module, class, method, function, variable, and parameter.  For each
    identifier, the index provides a short description, and a link to
    its documentation. </li>
  </ul>

<h2> The Table of Contents </h2>

<p> The table of contents occupies the two frames on the left side of
the window.  The upper-left frame displays the <em>project
contents</em>, and the lower-left frame displays the <em>module
contents</em>: </p>

<table class="help summary" border="1" cellspacing="0" cellpadding="3">
  <tr style="height: 30%">
    <td align="center" style="font-size: small">
       Project<br />Contents<hr />...</td>
    <td align="center" style="font-size: small" rowspan="2" width="70%">
      API<br />Documentation<br />Frame<br /><br /><br />
    </td>
  </tr>
  <tr>
    <td align="center" style="font-size: small">
      Module<br />Contents<hr />&nbsp;<br />...<br />&nbsp;
    </td>
  </tr>
</table><br />

<p> The <strong>project contents frame</strong> contains a list of all packages
and modules that are defined by the project.  Clicking on an entry
will display its contents in the module contents frame.  Clicking on a
special entry, labeled "Everything," will display the contents of
the entire project. </p>

<p> The <strong>module contents frame</strong> contains a list of every
submodule, class, type, exception, function, and variable defined by a
module or package.  Clicking on an entry will display its
documentation in the API documentation frame.  Clicking on the name of
the module, at the top of the frame, will display the documentation
for the module itself. </p>

<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
navigation bar can be used to control whether the table of contents is
displayed or not. </p>

<h2> The Navigation Bar </h2>

<p> A navigation bar is located at the top and bottom of every page.
It indicates what type of page you are currently viewing, and allows
you to go to related pages.  The following table describes the labels
on the navigation bar.  Note that not some labels (such as
[Parent]) are not displayed on all pages. </p>

<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
<tr class="summary">
  <th>Label</th>
  <th>Highlighted when...</th>
  <th>Links to...</th>
</tr>
  <tr><td valign="top"><strong>[Parent]</strong></td>
      <td valign="top"><em>(never highlighted)</em></td>
      <td valign="top"> the parent of the current package </td></tr>
  <tr><td valign="top"><strong>[Package]</strong></td>
      <td valign="top">viewing a package</td>
      <td valign="top">the package containing the current object
      </td></tr>
  <tr><td valign="top"><strong>[Module]</strong></td>
      <td valign="top">viewing a module</td>
      <td valign="top">the module containing the current object
      </td></tr> 
  <tr><td valign="top"><strong>[Class]</strong></td>
      <td valign="top">viewing a class </td>
      <td valign="top">the class containing the current object</td></tr>
  <tr><td valign="top"><strong>[Trees]</strong></td>
      <td valign="top">viewing the trees page</td>
      <td valign="top"> the trees page </td></tr>
  <tr><td valign="top"><strong>[Index]</strong></td>
      <td valign="top">viewing the index page</td>
      <td valign="top"> the index page </td></tr>
  <tr><td valign="top"><strong>[Help]</strong></td>
      <td valign="top">viewing the help page</td>
      <td valign="top"> the help page </td></tr>
</table>

<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
the top navigation bar can be used to control whether documentation
for private objects is displayed.  Private objects are usually defined
as objects whose (short) names begin with a single underscore, but do
not end with an underscore.  For example, "<code>_x</code>",
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
are private objects; but "<code>re.sub</code>",
"<code>__init__</code>", and "<code>type_</code>" are not.  However,
if a module defines the "<code>__all__</code>" variable, then its
contents are used to decide which objects are private. </p>

<p> A timestamp below the bottom navigation bar indicates when each
page was last updated. </p>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/identifier-index.html version [0a2be90a87].






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Identifier Index</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">&nbsp;</td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="identifier-index.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<table border="0" width="100%">
<tr valign="bottom"><td>
<h1 class="epydoc">Identifier Index</h1>
</td><td>
[
 <a href="#A">A</a>
 <a href="#B">B</a>
 <a href="#C">C</a>
 <a href="#D">D</a>
 <a href="#E">E</a>
 <a href="#F">F</a>
 <a href="#G">G</a>
 <a href="#H">H</a>
 <a href="#I">I</a>
 <a href="#J">J</a>
 <a href="#K">K</a>
 <a href="#L">L</a>
 <a href="#M">M</a>
 <a href="#N">N</a>
 <a href="#O">O</a>
 <a href="#P">P</a>
 <a href="#Q">Q</a>
 <a href="#R">R</a>
 <a href="#S">S</a>
 <a href="#T">T</a>
 <a href="#U">U</a>
 <a href="#V">V</a>
 <a href="#W">W</a>
 <a href="#X">X</a>
 <a href="#Y">Y</a>
 <a href="#Z">Z</a>
 <a href="#_">_</a>
]
</td></table>
<table border="0" width="100%"><tr valign="top">
<td valign="top" width="1%"><a name="A"><h2 class="epydoc">A</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.A-class.html">A</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_pack">app_pack()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#abspath">abspath()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#alias">alias()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_pack_compiled">app_pack_compiled()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#accepts">accepts()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#all_styles">all_styles</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_uninstall">app_uninstall()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#accepts">accepts()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#all_url_schemes">all_url_schemes</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#append">append()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#accessible_query">accessible_query()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html#append">append()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlOut-class.html#acf">acf()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#ALLOW_NULL">ALLOW_NULL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#append">append()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.Token-class.html#acquire">acquire()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.Token-class.html">Token</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#amfrpc">amfrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#appfactory">appfactory()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#adapters">adapters</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#amfrpc3">amfrpc3()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#archive">archive()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#ADAPTERS">ADAPTERS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#arg0">arg0</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#ADAPTERS">ADAPTERS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#AND">AND()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#AND">AND()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AS">AS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ADD">ADD()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AND">AND()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#as_dict">as_dict()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#add_group">add_group()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#apath">apath()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#as_dict">as_dict()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#add_header">add_header()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html#API_SERVER">API_SERVER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#as_list">as_list()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#add_membership">add_membership()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html#API_SSL_SERVER">API_SSL_SERVER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Mail.Attachment-class.html">Attachment</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Mail-class.html">Mail</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#add_path_first">add_path_first()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html#apilevel">apilevel</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html">Auth</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#add_permission">add_permission()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#apilevel">apilevel</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html">AutocompleteWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#addrow">addrow()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#apilevel">apilevel</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.decoder-module.html#autodetect_dict">autodetect_dict</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.decoder-module.html">web2py.gluon.decoder</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html">admin</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_cleanup">app_cleanup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.decoder-module.html#autoDetectXMLEncoding">autoDetectXMLEncoding()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.decoder-module.html">web2py.gluon.decoder</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_compile">app_compile()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#automatic">automatic</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE">AGGREGATE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_create">app_create()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#alert_dependency">alert_dependency</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#app_install">app_install()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="B"><h2 class="epydoc">B</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.B-class.html">B</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._BaseImporter-class.html#begin">begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.BooleanWidget-class.html">BooleanWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#b">b()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#begin">begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BR-class.html">BR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.BadRequest-class.html">BadRequest</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#bring_out_your_dead">bring_out_your_dead()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#bar_decode_integer">bar_decode_integer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#belongs">belongs()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#BUF_SIZE">BUF_SIZE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#bar_decode_string">bar_decode_string()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#BELONGS">BELONGS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlOut-class.html#build_acf">build_acf()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#bar_encode">bar_encode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html#BINARY">BINARY</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#build_environ">build_environ()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#bar_escape">bar_escape()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#BINARY">BINARY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#build_environment">build_environment()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#BASE_ENV">BASE_ENV</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#Binary">Binary()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_DB-class.html#build_set">build_set()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#base_modules">base_modules</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BIT">BIT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB">BLOB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#bulk_insert">bulk_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#basic">basic()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#bulk_insert">bulk_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BEAUTIFY-class.html">BEAUTIFY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BODY-class.html">BODY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BUTTON-class.html">BUTTON</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="C"><h2 class="epydoc">C</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#c_tokenizer">c_tokenizer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#COMMA">COMMA()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime">convert_datetime()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache-module.html">cache</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#COMMA">COMMA()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_decimal">convert_decimal()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.Cache-class.html">Cache</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_float">convert_float()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html#cache_stats_name">cache_stats_name</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#commit">commit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_int">convert_int()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit">commit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_long">convert_long()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp">convert_mysql_timestamp()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheOnDisk-class.html">CacheOnDisk</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_set">convert_set()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#call_or_redirect">call_or_redirect()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_time">convert_time()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#CALLABLETYPES">CALLABLETYPES</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta">convert_timedelta()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#callback">callback()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html">AutocompleteWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#converters">converters</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#callback">callback()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared">commit_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html">converters</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#candidate">candidate</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared">commit_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#copystream">copystream()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#cas_login">cas_login()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#commit_prepared">commit_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#copystream_progress">copystream_progress()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#cas_validate">cas_validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#COMMON">COMMON</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.CAT-class.html">CAT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#communicate">communicate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.CENTER-class.html">CENTER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted-module.html#compile2">compile2()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#count">count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cfs-module.html">cfs</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#compile_application">compile_application()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#count">count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cfs-module.html#cfs">cfs</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cfs-module.html">web2py.gluon.cfs</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#compile_controllers">compile_controllers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#count">count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cfs-module.html#cfs_lock">cfs_lock</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cfs-module.html">web2py.gluon.cfs</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#compile_models">compile_models()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#count">count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#change_password">change_password()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#compile_regex">compile_regex()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#count">count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#change_style">change_style()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#compile_views">compile_views()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#create">create()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#CHAR">CHAR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html">compileapp</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#create_missing_app_folders">create_missing_app_folders()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#chdir">chdir()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#completion">completion()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#create_missing_folders">create_missing_folders()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#check_credentials">check_credentials()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Request-class.html#compute_uuid">compute_uuid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Request-class.html">Request</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#check_new_version">check_new_version()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#check_reserved_keyword">check_reserved_keyword()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#concat_add">concat_add()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html">CheckboxesWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#concat_add">concat_add()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#checkTaskBar">checkTaskBar()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#Connect">Connect()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#CherryPyWSGIServer">CherryPyWSGIServer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#connect">connect()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#connect_pages">connect_pages()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#cleanpath">cleanpath()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html">Connection</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.CLEANUP-class.html">CLEANUP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#create_table">create_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#cleanup">cleanup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#console">console()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#create_table">create_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html#clear">clear()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants-module.html">constants</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#createform">createform()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html#clear">clear()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html#crondance">crondance()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheOnDisk-class.html#clear">clear()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheOnDisk-class.html">CacheOnDisk</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name">constraint_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.cronlauncher-class.html">cronlauncher</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#clear_content">clear_content()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#constraint_name">constraint_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html">Crud</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#client_addr">client_addr</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.CRYPT-class.html">CRYPT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#client_port">client_port</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#contains">contains()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html#csv">csv()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#CONTAINS">CONTAINS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#csv">csv()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#close">close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#CONTAINS">CONTAINS()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#ctokens">ctokens</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#close">close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html">Content</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CubridAdapter-class.html">CubridAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#close">close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contenttype-module.html#CONTENT_TYPE">CONTENT_TYPE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contenttype-module.html">web2py.gluon.contenttype</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon-module.html#current">current</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contenttype-module.html">contenttype</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals-module.html#current">current</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contenttype-module.html#contenttype">contenttype()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contenttype-module.html">web2py.gluon.contenttype</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#current">current</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#coalesce_zero">coalesce_zero()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#contributed_modules">contributed_modules</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html">custom_import</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.CODE-class.html">CODE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#conversions">conversions</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#custom_import_install">custom_import_install()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.COL-class.html">COL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_bit">convert_bit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html#custom_json">custom_json()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.COLGROUP-class.html">COLGROUP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_characters">convert_characters()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_date">convert_date()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="D"><h2 class="epydoc">D</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html">dal</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#DEFAULT">DEFAULT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html">DAL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#DEFAULT">DEFAULT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEDecimalProperty-class.html#data_type">data_type</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEDecimalProperty-class.html">GAEDecimalProperty</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.streamer-module.html#DEFAULT_CHUNK_SIZE">DEFAULT_CHUNK_SIZE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="psycopg2.DatabaseError-class.html">DatabaseError</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#DEFAULT_LISTEN_QUEUE_SIZE">DEFAULT_LISTEN_QUEUE_SIZE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#distributed_transaction_commit">distributed_transaction_commit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#DEFAULT_MAX_THREADS">DEFAULT_MAX_THREADS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html">DIV</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#DEFAULT_MIN_THREADS">DEFAULT_MIN_THREADS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="psycopg2.DataError-class.html">DataError</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.PasswordWidget-class.html#DEFAULT_PASSWORD_DISPLAY">DEFAULT_PASSWORD_DISPLAY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.PasswordWidget-class.html">PasswordWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#DIV">DIV()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.DataError-class.html">DataError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cache-module.html#DEFAULT_TIME_EXPIRE">DEFAULT_TIME_EXPIRE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE">DOUBLE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="datetime.date-class.html">date</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#DEFAULT_WIDTH">DEFAULT_WIDTH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.DoubleWidget-class.html">DoubleWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#DATE">DATE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#DEFAULTS">DEFAULTS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#download">download()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE">DATE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#define_table">define_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="datetime.datetime-class.html">datetime</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#define_tables">define_tables()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CubridAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CubridAdapter-class.html">CubridAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="psycopg2-module.html#DATETIME">DATETIME</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http-module.html#defined_status">defined_status</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http-module.html">web2py.gluon.http</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#DATETIME">DATETIME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#del_group">del_group()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME">DATETIME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#del_membership">del_membership()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.DatetimeWidget-class.html">DatetimeWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#del_permission">del_permission()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.DateWidget-class.html">DateWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html">JDBCSQLiteAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#day">day()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#delete">delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#DB2">DB2</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#delete">delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#delete">delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html">dbapi2</a><br />
<span class="index-where">(in&nbsp;sqlite3)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#delete">delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.TeradataAdapter-class.html#driver">driver</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.TeradataAdapter-class.html">TeradataAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html">DBAPISet</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#delete">delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#drivers">drivers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html">debug</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#DELETE_FILE">DELETE_FILE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sql-module.html#drivers">drivers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sql-module.html">web2py.gluon.sql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#debugger">debugger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#delete_uploaded_files">delete_uploaded_files()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL">DECIMAL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#demo">demo()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#drop">drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.DecimalWidget-class.html">DecimalWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#demo_app">demo_app()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#drop">drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#die">die()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz-module.html#DSTDIFF">DSTDIFF</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz-module.html">psycopg2.tz</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.decoder-module.html">decoder</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#dirs">dirs</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz-module.html#DSTOFFSET">DSTOFFSET</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz-module.html">psycopg2.tz</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.decoder-module.html#decoder">decoder()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.decoder-module.html">web2py.gluon.decoder</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#dynamic_resize">dynamic_resize()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#decoders">decoders</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#distributed_transaction_begin">distributed_transaction_begin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="E"><h2 class="epydoc">E</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#element">element()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#error">error()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#elements">elements()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_bool">escape_bool()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MARKMIN-class.html#elements">elements()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_date">escape_date()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html">JDBCSQLiteAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#elements">elements()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_datetime">escape_datetime()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQL2Adapter-class.html">MSSQL2Adapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.EM-class.html">EM</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_decimal">escape_decimal()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.EMBED-class.html">EMBED</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_dict">escape_dict()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#embed64">embed64()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_float">escape_float()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#execute_from_command_line">execute_from_command_line()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.NullHandler-class.html#emit">emit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.NullHandler-class.html">NullHandler</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_item">escape_item()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#executesql">executesql()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_MAP">ESCAPE_MAP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#exists">exists()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#encoders">encoders</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_None">escape_None()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._BaseImporter-class.html#end">end()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_object">escape_object()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#expand">expand()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#end">end()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_REGEX">ESCAPE_REGEX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#expand">expand()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence">escape_sequence()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#export_to_csv_file">export_to_csv_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#endswith">endswith()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_set">escape_set()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#export_to_csv_file">export_to_csv_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH">ENDSWITH()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_string">escape_string()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html">Expression</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#ENDSWITH">ENDSWITH()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_struct_time">escape_struct_time()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.extcron-class.html">extcron</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#ENUM">ENUM</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_time">escape_time()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html#extend">extend()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#env">env()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_timedelta">escape_timedelta()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#extend">extend()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#environ_aux">environ_aux()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode">escape_unicode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#extend">extend()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#escape_unicode">escape_unicode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#EQ">EQ()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="exceptions.Exception-class.html">Exception</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#EXTRACT">EXTRACT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#EQ">EQ()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#exclude">exclude()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT">EXTRACT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="psycopg2.Error-class.html">Error</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#exec_environment">exec_environment()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#EXTRACT">EXTRACT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#exec_pythonrc">exec_pythonrc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#error">error()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="F"><h2 class="epydoc">F</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#factory">factory()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#file_open">file_open()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz.FixedOffsetTimezone-class.html">FixedOffsetTimezone</a></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#factory">factory()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_open">file_open()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#flatten">flatten()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#fetch">fetch()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_open">file_open()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MARKMIN-class.html#flatten">flatten()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html">Field</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#fileno">fileno</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#flatten">flatten()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">FIELD_TYPE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants-module.html">web2py.gluon.contrib.pymysql.constants</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#files">files</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT">FLOAT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#FIELDKEY_DELETE_RECORD">FIELDKEY_DELETE_RECORD</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html">fileutils</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug.Pipe-class.html#flush">flush()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug.Pipe-class.html">Pipe</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#FIELDNAME_REQUEST_DELETE">FIELDNAME_REQUEST_DELETE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.FileWrapper-class.html">FileWrapper</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html#force">force()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.translator-class.html">translator</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FIELDSET-class.html">FIELDSET</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#filter_err">filter_err()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#forget">forget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html">FORM</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#file_close">file_close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#filter_url">filter_url()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_close">file_close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#find">find()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_close">file_close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#findT">findT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">IS_DECIMAL_IN_RANGE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_delete">file_delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD">FIREBIRD</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD_NONRESERVED">FIREBIRD_NONRESERVED</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">IS_FLOAT_IN_RANGE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#file_exists">file_exists()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.Validator-class.html">Validator</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_exists">file_exists()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html">FireBirdEmbeddedAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_exists">file_exists()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#first">first()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html#frameset">frameset</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HTML-class.html">HTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#fix_newlines">fix_newlines()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html#frameset">frameset</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XHTML-class.html">XHTML</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="G"><h2 class="epydoc">G</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEDecimalProperty-class.html">GAEDecimalProperty</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#get_effective_router">get_effective_router()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEF-class.html">GAEF</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#get_format">get_format()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#get_method">get_method()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#GE">GE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#get_or_create_user">get_or_create_user()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.settings-module.html#global_settings">global_settings</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.settings-module.html">web2py.gluon.settings</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#GENERIC_DESCRIPTION">GENERIC_DESCRIPTION</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template-module.html#get_parsed">get_parsed()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals-module.html">globals</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#geocode">geocode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html#get_possible_languages">get_possible_languages()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.translator-class.html">translator</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon-module.html">gluon</a><br />
<span class="index-where">(in&nbsp;web2py)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#GEOMETRY">GEOMETRY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#get_query">get_query()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#get">get()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#get_session">get_session()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleSQLAdapter-class.html">GoogleSQLAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#get_all">get_all()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#groups">groups()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#get_client">get_client()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#get_usage">get_usage()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#grow">grow()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#get_client_info">get_client_info()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEDecimalProperty-class.html#get_value_for_datastore">get_value_for_datastore()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEDecimalProperty-class.html">GAEDecimalProperty</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#get_digest">get_digest()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cfs-module.html#getcfs">getcfs()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cfs-module.html">web2py.gluon.cfs</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#GT">GT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="H"><h2 class="epydoc">H</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H1-class.html">H1</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.xmlrpc-module.html#handler">handler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.xmlrpc-module.html">web2py.gluon.xmlrpc</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#highlight">highlight()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H2-class.html">H2</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.hardcron-class.html">hardcron</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight-module.html#highlight">highlight()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight-module.html">web2py.gluon.highlight</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H3-class.html">H3</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#harg0">harg0</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight-module.html">web2py.gluon.highlight</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H4-class.html">H4</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#has_key">has_key()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#hmac_hash">hmac_hash()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H5-class.html">H5</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#has_membership">has_membership()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#hour">hour()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H6-class.html">H6</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options">has_options()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HR-class.html">HR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_charref">handle_charref()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#has_permission">has_permission()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html">html</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_charref">handle_charref()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#has_permission">has_permission()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html">HTML</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_comment">handle_comment()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#has_ssl">has_ssl</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html#html5">html5</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HTML-class.html">HTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_data">handle_data()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#have_portalocker">have_portalocker</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#html_tokenizer">html_tokenizer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_data">handle_data()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#have_serializers">have_serializers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http-module.html">http</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_endtag">handle_endtag()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#have_validators">have_validators</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http.HTTP-class.html">HTTP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http-module.html">web2py.gluon.http</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_endtag">handle_endtag()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HEAD-class.html">HEAD</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#HTTP_METHODS">HTTP_METHODS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_entityref">handle_entityref()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#HEADER_RESPONSE">HEADER_RESPONSE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#http_schemes">http_schemes</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_entityref">handle_entityref()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html">Headers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#HTTP_SERVER_SOFTWARE">HTTP_SERVER_SOFTWARE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_starttag">handle_starttag()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#hidden_fields">hidden_fields()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main.HttpServer-class.html">HttpServer</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_starttag">handle_starttag()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight-module.html">highlight</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="I"><h2 class="epydoc">I</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.I-class.html">I</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html#instances">instances</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#is_gae">is_gae</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#ID_DELETE_SUFFIX">ID_DELETE_SUFFIX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24">INT24</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_GENERIC_URL-class.html">IS_GENERIC_URL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#id_group">id_group()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#int2uuid">int2uuid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_HTTP_URL-class.html">IS_HTTP_URL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#ID_LABEL_SUFFIX">ID_LABEL_SUFFIX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.IntegerWidget-class.html">IntegerWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#ID_ROW_SUFFIX">ID_ROW_SUFFIX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#is_image">is_image()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.IFRAME-class.html">IFRAME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#is_impersonating">is_impersonating()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#IGNORE_ERRORS_ON_CLOSE">IGNORE_ERRORS_ON_CLOSE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#integrity_error_class">integrity_error_class()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.IMG-class.html">IMG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#integrity_error_class">integrity_error_class()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#impersonate">impersonate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#integrity_error_class">integrity_error_class()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SUBSET-class.html">IS_IN_SUBSET</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html">import_all</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class">integrity_error_class()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html">IS_INT_IN_RANGE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#import_from_csv_file">import_from_csv_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.IntegrityError-class.html">IntegrityError</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#import_from_csv_file">import_from_csv_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html">IntegrityError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#is_jdbc">is_jdbc</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#import_table_definitions">import_table_definitions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.InterfaceError-class.html">InterfaceError</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#is_jython">is_jython</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#include">include()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html">InterfaceError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#IS_JYTHON">IS_JYTHON</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html#increment">increment()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.InternalError-class.html">InternalError</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LENGTH-class.html">IS_LENGTH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html#increment">increment()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.InternalError-class.html">InternalError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LIST_OF-class.html">IS_LIST_OF</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheOnDisk-class.html#increment">increment()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheOnDisk-class.html">CacheOnDisk</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INTERVAL">INTERVAL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#is_logged_in">is_logged_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#INFINITY">INFINITY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LOWER-class.html">IS_LOWER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#INFORMIX">INFORMIX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#INVERT">INVERT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.IO-class.html">IO</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#is_new">is_new()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#INGRES">INGRES</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html">IS_ALPHANUMERIC</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html">IS_NOT_EMPTY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#INGRES_SEQNAME">INGRES_SEQNAME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">IS_NOT_IN_DB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html">IS_DATE_IN_RANGE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_SLUG-class.html">IS_SLUG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html">IngresUnicodeAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_STRONG-class.html">IS_STRONG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#initialize_urandom">initialize_urandom()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html">IS_DATETIME_IN_RANGE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_TIME-class.html">IS_TIME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.INPUT-class.html">INPUT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">IS_DECIMAL_IN_RANGE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#is_tracking_changes">is_tracking_changes()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html">IS_UPLOAD_FILENAME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#is_empty">is_empty()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_UPPER-class.html">IS_UPPER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_URL-class.html">IS_URL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EQUAL_TO-class.html">IS_EQUAL_TO</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#isempty">isempty()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#is_expired">is_expired()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME-class.html#isodatetime">isodatetime</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EXPR-class.html">IS_EXPR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#items">items()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#insert">insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">IS_FLOAT_IN_RANGE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#install_as_MySQLdb">install_as_MySQLdb()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#is_gae">is_gae</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="J"><h2 class="epydoc">J</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#JDBCPOSTGRESQL">JDBCPOSTGRESQL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html#json">json()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html">JDBCPostgreSQLAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#join">join()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#json">json()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#JDBCSQLITE">JDBCSQLITE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#json">json()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#jsonrpc">jsonrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html">JDBCSQLiteAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#json">json()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service.JsonRpcException-class.html">JsonRpcException</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="K"><h2 class="epydoc">K</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="psycopg2-module.html#k">k</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html#keys">keys()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#keys">keys()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#kill">kill()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="L"><h2 class="epydoc">L</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LABEL-class.html">LABEL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LI-class.html">LI</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#label_split_regex">label_split_regex</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#log_execute">log_execute()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html">languages</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#like">like()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#LOG_LINE">LOG_LINE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#last">last()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LIKE">LIKE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cache-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#LIKE">LIKE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LINK-class.html">LINK</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.List-class.html">List</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#listdir">listdir()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Listener-class.html">Listener</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.ListWidget-class.html">ListWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.RestrictedError-class.html#load">load()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.RestrictedError-class.html">RestrictedError</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#load">load()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#load">load()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#load_routers">load_routers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage-module.html#load_storage">load_storage()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#lastrowid">lastrowid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp.LoadFactory-class.html">LoadFactory</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#logger">logger</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.hardcron-class.html#launch">launch()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.hardcron-class.html">hardcron</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz-module.html#LOCAL">LOCAL</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz-module.html">psycopg2.tz</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#login">login()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html">lazyT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#local_import_aux">local_import_aux()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#login_bare">login_bare()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#lazyT_pickle">lazyT_pickle()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#localhost">localhost</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#logout">logout()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#lazyT_unpickle">lazyT_unpickle()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz.LocalTimezone-class.html">LocalTimezone</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#logpath">logpath</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#lock">lock()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG">LONG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#LE">LE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#LOCK_EX">LOCK_EX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB">LONG_BLOB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#LOCK_NB">LOCK_NB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG">LONGLONG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#LEFT_JOIN">LEFT_JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#LOCK_SH">LOCK_SH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#LEFT_JOIN">LEFT_JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html#locker">locker</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#lower">lower()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#LEFT_JOIN">LEFT_JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#log">log</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LOWER">LOWER()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN">LEFT_JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.RestrictedError-class.html#log">log()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.RestrictedError-class.html">RestrictedError</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#LEFT_JOIN">LEFT_JOIN()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#log">log()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#LT">LT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LEGEND-class.html">LEGEND</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#log_event">log_event()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#len">len()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#log_event">log_event()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="M"><h2 class="epydoc">M</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#m">m</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.date-class.html#max">max</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.date-class.html">date</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#min">min()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Mail-class.html">Mail</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.datetime-class.html#max">max</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.datetime-class.html">datetime</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#minutes">minutes()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html">main</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.time-class.html#max">max</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.time-class.html">time</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#mktree">mktree()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#make_fake_file_like_object">make_fake_file_like_object()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#max">max()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEDecimalProperty-class.html#make_value_from_datastore">make_value_from_datastore()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEDecimalProperty-class.html">GAEDecimalProperty</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#module">module</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#makefile">makefile</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#MAXCHARLENGTH">MAXCHARLENGTH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_app">map_app()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#maxcharlength">maxcharlength</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Monitor-class.html">Monitor</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_controller">map_controller()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#md5_hash">md5_hash()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#month">month()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_function">map_function()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB">MEDIUM_BLOB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#msg">msg</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_language">map_language()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MENU-class.html">MENU</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#MSSQL">MSSQL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_prefix">map_prefix()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http.HTTP-class.html#message">message</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http.HTTP-class.html">HTTP</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html">MSSQL2Adapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_root_static">map_root_static()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Messages-class.html">Messages</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_static">map_static()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.META-class.html">META</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#map_url_in">map_url_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html#meta_storage">meta_storage</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#MUL">MUL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#map_url_out">map_url_out()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#middleware_aux">middleware_aux()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html">MultipleOptionsWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp.mybuiltin-class.html">mybuiltin</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table">migrate_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.myregex-module.html">myregex</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#markdown_serializer">markdown_serializer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.date-class.html#min">min</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.date-class.html">date</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#MYSQL">MYSQL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.datetime-class.html#min">min</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.datetime-class.html">datetime</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#markmin_serializer">markmin_serializer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.time-class.html#min">min</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.time-class.html">time</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="N"><h2 class="epydoc">N</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#name">name</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME-class.html#nice">nice()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#NOT_NULL">NOT_NULL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#navbar">navbar()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BEAUTIFY-class.html#no_underscore">no_underscore()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.BEAUTIFY-class.html">BEAUTIFY</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.NotSupportedError-class.html">NotSupportedError</a></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Node-class.html">Node</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html">NotSupportedError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#NE">NE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#NULL">NULL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#NE">NE()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NULL">NULL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html">newcron</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#NOT">NOT()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.NullHandler-class.html">NullHandler</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDATE">NEWDATE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#not_authorized">not_authorized()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html#NUMBER">NUMBER</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDECIMAL">NEWDECIMAL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#NUMBER">NUMBER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#NEWLINE">NEWLINE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#NOT_NULL">NOT_NULL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#numbers">numbers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.FileWrapper-class.html#next">next()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.FileWrapper-class.html">FileWrapper</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#NOT_NULL">NOT_NULL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="O"><h2 class="epydoc">O</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OBJECT-class.html">OBJECT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ON">ON()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#official_top_level_domains">official_top_level_domains</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#on">on()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#OR">OR()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#official_url_schemes">official_url_schemes</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.OperationalError-class.html">OperationalError</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#OR">OR()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OL-class.html">OL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html">OperationalError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#ORACLE">ORACLE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlOut-class.html#omit_acf">omit_acf()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OPTGROUP-class.html">OPTGROUP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#oracle_fix">oracle_fix</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlOut-class.html#omit_lang">omit_lang()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OPTION-class.html">OPTION</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon-module.html#ON">ON</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_DB-class.html#options">options()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#os_locking">os_locking</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#ON">ON</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SET-class.html#options">options()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html#output">output()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#ON">ON</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#options_sorter">options_sorter()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="P"><h2 class="epydoc">P</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.P-class.html">P</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#plugin_install">plugin_install()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#params">params</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#plugin_pack">plugin_pack()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#private">private</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#params_apps">params_apps</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#process">process()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="psycopg2-module.html#paramstyle">paramstyle</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#profile">profile()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#paramstyle">paramstyle</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#ProgramAuthor">ProgramAuthor</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#paramstyle">paramstyle</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#pop_arg_if">pop_arg_if()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#ProgramInfo">ProgramInfo</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html">portalocker</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.ProgrammingError-class.html">ProgrammingError</a></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#parse">parse()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL">POSTGRESQL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html">ProgrammingError</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#parse_as_rest">parse_as_rest()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL_NONRESERVED">POSTGRESQL_NONRESERVED</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#ProgramName">ProgramName</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#PARSE_COLNAMES">PARSE_COLNAMES</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#ProgramVersion">ProgramVersion</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#PARSE_DECLTYPES">PARSE_DECLTYPES</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.PRE-class.html">PRE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html">psycopg2</a></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#parse_get_post_vars">parse_get_post_vars()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#py26_deprecated">py26_deprecated</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#parse_path_info">parse_path_info()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#prepare">prepare()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#py27_deprecated">py27_deprecated</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template-module.html#parse_template">parse_template()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#prepare">prepare()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#PY3K">PY3K</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html#parsecronline">parsecronline()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#prepare">prepare()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE">PY_STRING_LITERAL_RE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.PasswordWidget-class.html">PasswordWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#presentation">presentation()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html">pymysql</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug.Pipe-class.html">Pipe</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#prettydate">prettydate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#python_tokenizer">python_tokenizer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#pipe_in">pipe_in</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#python_version">python_version</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#pipe_out">pipe_out</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="Q"><h2 class="epydoc">Q</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Query-class.html">Query</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#quit">quit()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="R"><h2 class="epydoc">R</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#r_multiline">r_multiline</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#regex_dbname">regex_dbname</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.datetime-class.html#resolution">resolution</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.datetime-class.html">datetime</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#r_tag">r_tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.myregex-module.html#regex_expose">regex_expose</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.myregex-module.html">web2py.gluon.myregex</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.time-class.html#resolution">resolution</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.time-class.html">time</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.RadioWidget-class.html">RadioWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.myregex-module.html#regex_extend">regex_extend</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.myregex-module.html">web2py.gluon.myregex</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html">Response</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_filter_in">regex_filter_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#RESPONSE">RESPONSE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_filter_out">regex_filter_out()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html#restart">restart()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#regex_geocode">regex_geocode</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Request-class.html#restful">restful()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Request-class.html">Request</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted-module.html">restricted</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.myregex-module.html#regex_include">regex_include</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.myregex-module.html">web2py.gluon.myregex</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted-module.html#restricted">restricted()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#regex_language">regex_language</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.RestrictedError-class.html">RestrictedError</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMAIL-class.html#regex_proposed_but_failed">regex_proposed_but_failed</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#retrieve">retrieve()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#regex_python_keywords">regex_python_keywords</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#retrieve_password">retrieve_password()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#regex_quotes">regex_quotes</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#retrieve_username">retrieve_username()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#RANDOM">RANDOM()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_select">regex_select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html">rewrite</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#random_password">random_password()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals-module.html#regex_session_id">regex_session_id</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html">rocket</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html#rangetolist">rangetolist()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_space">regex_space</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#re_block">re_block</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.streamer-module.html#regex_start_range">regex_start_range</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#re_pass">re_pass</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_static">regex_static</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#rollback">rollback()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#re_REQUEST_LINE">re_REQUEST_LINE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.streamer-module.html#regex_stop_range">regex_stop_range</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback">rollback()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#re_SLASH">re_SLASH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.myregex-module.html#regex_tables">regex_tables</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.myregex-module.html">web2py.gluon.myregex</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#re_unblock">re_unblock</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared">rollback_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#read">read()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#regex_time">regex_time</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared">rollback_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug.Pipe-class.html#read">read()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug.Pipe-class.html">Pipe</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#regex_translate">regex_translate</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#rollback_prepared">rollback_prepared()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#read">read()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_uri">regex_uri()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.import_all-module.html#root">root</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ChunkedReader-class.html#read">read()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_url">regex_url</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#ROUTER_BASE_KEYS">ROUTER_BASE_KEYS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#read">read()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_url_in">regex_url_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#ROUTER_KEYS">ROUTER_KEYS</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#read_dict">read_dict()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#register">register()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#routers">routers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#read_dict_aux">read_dict_aux()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#reindent">reindent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html">Row</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#read_file">read_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.Token-class.html#release">release()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.Token-class.html">Token</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#Row_pickler">Row_pickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#read_headers">read_headers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#remove_compiled_application">remove_compiled_application()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#Row_unpickler">Row_unpickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#read_pyc">read_pyc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#render">render()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html#ROWID">ROWID</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#read_request_line">read_request_line()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template-module.html#render">render()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#ROWID">ROWID</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#readline">readline()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html">Rows</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.debug.Pipe-class.html#readline">readline()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug.Pipe-class.html">Pipe</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#represent">represent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#rows">rows()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ChunkedReader-class.html#readline">readline()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html#represent">represent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQL2Adapter-class.html">MSSQL2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#Rows_pickler">Rows_pickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ChunkedReader-class.html#readlines">readlines()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent">represent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#Rows_unpickler">Rows_unpickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#readlines_file">readlines_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#represent">represent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml-module.html#represent">represent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#rowslice">rowslice()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#recursive_unlink">recursive_unlink()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#rowslice">rowslice()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.http-module.html#redirect">redirect()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http-module.html">web2py.gluon.http</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#represent_exceptions">represent_exceptions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rowslice">rowslice()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Reference-class.html">Reference</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#represent_exceptions">represent_exceptions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html#rss">rss()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#Reference_pickler">Reference_pickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#represent_exceptions">represent_exceptions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#rss">rss()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#Reference_unpickler">Reference_unpickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions">represent_exceptions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.cronlauncher-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.cronlauncher-class.html">cronlauncher</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMAIL-class.html#regex">regex</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#represent_exceptions">represent_exceptions()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.extcron-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.extcron-class.html">extcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#regex">regex</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Request-class.html">Request</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.hardcron-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.hardcron-class.html">hardcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#regex1">regex1</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#request_reset_password">request_reset_password()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.softcron-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.softcron-class.html">softcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#regex2">regex2</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#requests">requests</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Listener-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Listener-class.html">Listener</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_anything">regex_anything</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#requires">requires()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Monitor-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Monitor-class.html">Monitor</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_args">regex_args</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#requires_login">requires_login()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#regex_at">regex_at</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#requires_membership">requires_membership()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#requires_permission">requires_permission()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#run">run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#requires_signature">requires_signature()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#run_app">run_app()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#regex_cleanup_fn">regex_cleanup_fn</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html">reserved_sql_keywords</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#run_app">run_app()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#regex_client">regex_client</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#reset_password">reset_password()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#run_controller_in">run_controller_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#regex_content">regex_content</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#reset_password_deprecated">reset_password_deprecated()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#run_models_in">run_models_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#regex_crlf">regex_crlf</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.date-class.html#resolution">resolution</a><br />
<span class="index-where">(in&nbsp;<a href="datetime.date-class.html">date</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#run_view_in">run_view_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="S"><h2 class="epydoc">S</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#s">s</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#set_trace">set_trace()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml-module.html#safe_float">safe_float()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#setblocking">setblocking</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLTABLE-class.html">SQLTABLE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml-module.html#safe_int">safe_int()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#setdefault">setdefault()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#ssl">ssl</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer-module.html#sanitize">sanitize()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer-module.html">web2py.gluon.sanitizer</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.settings-module.html">settings</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.SSLError-class.html">SSLError</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer-module.html">sanitizer</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.settings-module.html#settings">settings</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.settings-module.html">web2py.gluon.settings</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main.HttpServer-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main.HttpServer-class.html">HttpServer</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Settings-class.html">Settings</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#save_password">save_password()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#setvirtualfields">setvirtualfields()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#save_pyc">save_pyc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html">shell</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage-module.html#save_storage">save_storage()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SHORT">SHORT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SCRIPT-class.html">SCRIPT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#shrink">shrink()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#search">search()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#shutdown">shutdown</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#seconds">seconds()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#sibling">sibling()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#start_browser">start_browser()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#secure">secure</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#siblings">siblings()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#start_response">start_response()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#secure">secure()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#simple_hash">simple_hash()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#start_response_aux">start_response_aux()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SELECT-class.html">SELECT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted-module.html#snapshot">snapshot()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#start_time">start_time</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#soap">soap()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#select">select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#socket">socket</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#startswith">startswith()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select">select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#SOCKET_TIMEOUT">SOCKET_TIMEOUT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH">STARTSWITH()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#select">select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.SocketClosed-class.html">SocketClosed</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#STARTSWITH">STARTSWITH()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#select">select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.SocketTimeout-class.html">SocketTimeout</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCustomType-class.html#startswith">startswith()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLCustomType-class.html">SQLCustomType</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#select">select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.softcron-class.html">softcron</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz-module.html#STDOFFSET">STDOFFSET</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz-module.html">psycopg2.tz</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#sort">sort()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main.HttpServer-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main.HttpServer-class.html">HttpServer</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SPAN-class.html">SPAN</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Monitor-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Monitor-class.html">Monitor</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheOnDisk-class.html#speedup_checks">speedup_checks</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheOnDisk-class.html">CacheOnDisk</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sql-module.html">sql</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#sql_locker">sql_locker</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLALL-class.html">SQLALL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCallableList-class.html">SQLCallableList</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#stop">stop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#select_limitby">select_limitby()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCustomType-class.html">SQLCustomType</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug-module.html#stop_trace">stop_trace()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select_raw">select_raw()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html#stopcron">stopcron()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Mail-class.html#send">send()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Mail-class.html">Mail</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml-module.html">sqlhtml</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage-module.html">storage</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#send_headers">send_headers()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#sqlhtml_validators">sqlhtml_validators()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html">Storage</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#send_response">send_response()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#SQLITE">SQLITE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.StorageList-class.html">StorageList</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#sendall">sendall</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_ALTER_TABLE">SQLITE_ALTER_TABLE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#store">store()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_ANALYZE">SQLITE_ANALYZE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#store">store()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#sequence_name">sequence_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_ATTACH">SQLITE_ATTACH</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#stream">stream()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#sequence_name">sequence_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_INDEX">SQLITE_CREATE_INDEX</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.streamer-module.html#stream_file_or_304_or_206">stream_file_or_304_or_206()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#sequence_name">sequence_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TABLE">SQLITE_CREATE_TABLE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.streamer-module.html">streamer</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#sequence_name">sequence_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_INDEX">SQLITE_CREATE_TEMP_INDEX</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.streamer-module.html#streamer">streamer()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MENU-class.html#serialize">serialize()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MENU-class.html">MENU</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TABLE">SQLITE_CREATE_TEMP_TABLE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html#strict">strict</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HTML-class.html">HTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html">serializers</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TRIGGER">SQLITE_CREATE_TEMP_TRIGGER</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html#strict">strict</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XHTML-class.html">XHTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_amfrpc">serve_amfrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_VIEW">SQLITE_CREATE_TEMP_VIEW</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html#STRING">STRING</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#serve_controller">serve_controller()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TRIGGER">SQLITE_CREATE_TRIGGER</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#STRING">STRING</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_csv">serve_csv()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_CREATE_VIEW">SQLITE_CREATE_VIEW</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING">STRING</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_json">serve_json()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DELETE">SQLITE_DELETE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#string_unpack">string_unpack</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_jsonrpc">serve_jsonrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DENY">SQLITE_DENY</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_rss">serve_rss()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DETACH">SQLITE_DETACH</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#strip">strip()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_run">serve_run()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_INDEX">SQLITE_DROP_INDEX</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.STYLE-class.html">STYLE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_soap">serve_soap()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_TABLE">SQLITE_DROP_TABLE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLTABLE-class.html#style">style()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLTABLE-class.html">SQLTABLE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_xml">serve_xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_INDEX">SQLITE_DROP_TEMP_INDEX</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#serve_xmlrpc">serve_xmlrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TABLE">SQLITE_DROP_TEMP_TABLE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUB">SUB()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#server">server</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TRIGGER">SQLITE_DROP_TEMP_TRIGGER</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#SERVER_NAME">SERVER_NAME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_VIEW">SQLITE_DROP_TEMP_VIEW</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#SUBSTRING">SUBSTRING()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#server_port">server_port</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_TRIGGER">SQLITE_DROP_TRIGGER</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#SUBSTRING">SUBSTRING()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#SERVER_SOFTWARE">SERVER_SOFTWARE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_DROP_VIEW">SQLITE_DROP_VIEW</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING">SUBSTRING()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html">Service</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_IGNORE">SQLITE_IGNORE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING">SUBSTRING()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html">Service</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice-module.html">web2py.gluon.winservice</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_INSERT">SQLITE_INSERT</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#sum">sum()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html">Session</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_OK">SQLITE_OK</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.SuperNode-class.html">SuperNode</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SET">SET</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_PRAGMA">SQLITE_PRAGMA</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html">Set</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_READ">SQLITE_READ</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html#set_current_languages">set_current_languages()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.translator-class.html">translator</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_REINDEX">SQLITE_REINDEX</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_SELECT">SQLITE_SELECT</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#set_folder">set_folder()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_TRANSACTION">SQLITE_TRANSACTION</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#set_self_id">set_self_id()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#SQLITE_UPDATE">SQLITE_UPDATE</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#SvcDoRun">SvcDoRun()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_DB-class.html#set_self_id">set_self_id()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#sqlite_version">sqlite_version</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#SvcStop">SvcStop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#set_self_id">set_self_id()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">IS_NOT_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#sqlite_version_info">sqlite_version_info</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="T"><h2 class="epydoc">T</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#T">T</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SCRIPT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.SCRIPT-class.html">SCRIPT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#TIME">TIME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html">Table</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SELECT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.SELECT-class.html">SELECT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME">TIME</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TABLE-class.html">TABLE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SPAN-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.SPAN-class.html">SPAN</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#TIMESTAMP">TIMESTAMP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#table_field">table_field</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.STYLE-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.STYLE-class.html">STYLE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP">TIMESTAMP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml-module.html#table_field">table_field</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TABLE-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TABLE-class.html">TABLE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.TimeWidget-class.html">TimeWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#TAG">TAG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY">TINY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#tables">tables()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TBODY-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TBODY-class.html">TBODY</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB">TINY_BLOB</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon-module.html#TAG">TAG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TD-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TD-class.html">TD</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TITLE-class.html">TITLE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.A-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.A-class.html">A</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TEXTAREA-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TEXTAREA-class.html">TEXTAREA</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http.HTTP-class.html#to">to()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http.HTTP-class.html">HTTP</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.B-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.B-class.html">B</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TFOOT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TFOOT-class.html">TFOOT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#to_string">to_string()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BEAUTIFY-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.BEAUTIFY-class.html">BEAUTIFY</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TH-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TH-class.html">TH</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode">to_unicode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BODY-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.BODY-class.html">BODY</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.THEAD-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.THEAD-class.html">THEAD</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.Token-class.html">Token</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BR-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.BR-class.html">BR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TITLE-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TITLE-class.html">TITLE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#toolbar">toolbar()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BUTTON-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.BUTTON-class.html">BUTTON</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TR-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TR-class.html">TR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html">tools</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.CAT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.CAT-class.html">CAT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TT-class.html">TT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TR-class.html">TR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.CENTER-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.CENTER-class.html">CENTER</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.UL-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.UL-class.html">UL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#track_changes">track_changes()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.COL-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.COL-class.html">COL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XHTML-class.html">XHTML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html#transitional">transitional</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HTML-class.html">HTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.COLGROUP-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.COLGROUP-class.html">COLGROUP</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#TAG">TAG</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html#transitional">transitional</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XHTML-class.html">XHTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#TAG_pickler">TAG_pickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html#translate">translate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.translator-class.html">translator</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.EM-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.EM-class.html">EM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#TAG_unpickler">TAG_unpickler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#translate">translate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.EMBED-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.EMBED-class.html">EMBED</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#tar">tar()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html">translator</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FIELDSET-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FIELDSET-class.html">FIELDSET</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#tar_compiled">tar_compiled()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TBODY-class.html">TBODY</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#trigger_name">trigger_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H1-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.H1-class.html">H1</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TD-class.html">TD</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#trigger_name">trigger_name()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H2-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.H2-class.html">H2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template-module.html">template</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H3-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.H3-class.html">H3</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template-module.html">web2py.gluon.template</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#truncate">truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H4-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.H4-class.html">H4</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.TeradataAdapter-class.html">TeradataAdapter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#truncate">truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H5-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.H5-class.html">H5</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#test">test()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#try_redirect_on_error">try_redirect_on_error()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.H6-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.H6-class.html">H6</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#test">test()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#try_rewrite_on_error">try_rewrite_on_error()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HEAD-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HEAD-class.html">HEAD</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.shell-module.html#test">test()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html#try_start_browser">try_start_browser()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HR-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HR-class.html">HR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#test_all">test_all()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TT-class.html">TT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HTML-class.html">HTML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp-module.html#TEST_CODE">TEST_CODE</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.I-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.I-class.html">I</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#test_thread_separation">test_thread_separation()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.IFRAME-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.IFRAME-class.html">IFRAME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TEXTAREA-class.html">TEXTAREA</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.IMG-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.IMG-class.html">IMG</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.TextWidget-class.html">TextWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.INPUT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.INPUT-class.html">INPUT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TFOOT-class.html">TFOOT</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LABEL-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.LABEL-class.html">LABEL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TH-class.html">TH</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LEGEND-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.LEGEND-class.html">LEGEND</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.THEAD-class.html">THEAD</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LI-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.LI-class.html">LI</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#thread">thread</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html">IngresUnicodeAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.LINK-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.LINK-class.html">LINK</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#thread">thread</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQL2Adapter-class.html">MSSQL2Adapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MENU-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MENU-class.html">MENU</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#thread_safe">thread_safe()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.META-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.META-class.html">META</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#THREAD_STOP_CHECK_INTERVAL">THREAD_STOP_CHECK_INTERVAL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OBJECT-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.OBJECT-class.html">OBJECT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OL-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.OL-class.html">OL</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2-module.html#threadsafety">threadsafety</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OPTGROUP-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.OPTGROUP-class.html">OPTGROUP</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#threadsafety">threadsafety</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OPTION-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.OPTION-class.html">OPTION</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#threadsafety">threadsafety</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.P-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.P-class.html">P</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.TeradataAdapter-class.html#types">types</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.TeradataAdapter-class.html">TeradataAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.PRE-class.html#tag">tag</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.PRE-class.html">PRE</a>)</font></td>
<td width="33%" class="link-index"><a href="datetime.time-class.html">time</a></td>
<td width="33%" class="link-index"><a href="psycopg2.tz-module.html">tz</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2-module.html">psycopg2</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="U"><h2 class="epydoc">U</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#u">u()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#URL">URL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.UL-class.html">UL</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#url">url()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#unicode_to_ascii_authority">unicode_to_ascii_authority()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#url">url()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#unicode_to_ascii_url">unicode_to_ascii_url()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#update_all_languages">update_all_languages()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#url_in">url_in()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#universal_caller">universal_caller()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#update_canvas">update_canvas()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#url_is_acceptable">url_is_acceptable()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#unknown_endtag">unknown_endtag()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#update_or_insert">update_or_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#url_out">url_out()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#unknown_starttag">unknown_starttag()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#update_record">update_record()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#url_split_regex">url_split_regex</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#unlock">unlock()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#update_request">update_request()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_SLUG-class.html#urlify">urlify()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_SLUG-class.html">IS_SLUG</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#unofficial_url_schemes">unofficial_url_schemes</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#upgrade">upgrade()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html#urlify">urlify()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#untar">untar()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.admin-module.html#unzip">unzip()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#uploads_in_blob">uploads_in_blob</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Request-class.html#user_agent">user_agent()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Request-class.html">Request</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#up">up()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#uploads_in_blob">uploads_in_blob</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#user_group">user_group()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#uploads_in_blob">uploads_in_blob</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#user_id">user_id</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#utf8_repr">utf8_repr()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html">utils</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#upper">upper()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#uuid2int">uuid2int()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#update">update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#UPPER">UPPER()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="V"><h2 class="epydoc">V</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#validate">validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators-module.html">validators</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#verifyURL">verifyURL()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEDecimalProperty-class.html#validate">validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEDecimalProperty-class.html">GAEDecimalProperty</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools-module.html#validators">validators()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#version">version</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#validate">validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#values">values()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#VERSION">VERSION</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#validate_and_insert">validate_and_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING">VAR_STRING</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#VERSION">VERSION</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#validate_and_update">validate_and_update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VARCHAR">VARCHAR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#version_info">version_info</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#validate_args">validate_args()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#verify_email">verify_email()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql-module.html#version_info">version_info</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.Validator-class.html">Validator</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html#VERIFY_SERVER">VERIFY_SERVER</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#version_info">version_info</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="W"><h2 class="epydoc">W</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#w2p_pack">w2p_pack()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget-module.html">widget</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#with_alias">with_alias()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#w2p_pack_plugin">w2p_pack_plugin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.BooleanWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.BooleanWidget-class.html">BooleanWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#with_alias">with_alias()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#w2p_unpack">w2p_unpack()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html">CheckboxesWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html">Worker</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#w2p_unpack_plugin">w2p_unpack_plugin()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Listener-class.html#wrap_socket">wrap_socket()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Listener-class.html">Listener</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="psycopg2.Warning-class.html">Warning</a></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.ListWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.ListWidget-class.html">ListWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#write">write()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.err.Warning-class.html">Warning</a><br />
<span class="index-where">(in&nbsp;web2py.gluon.contrib.pymysql.err)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html">MultipleOptionsWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug.Pipe-class.html#write">write()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug.Pipe-class.html">Pipe</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#web2py_extract">web2py_extract()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#write">write()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#web2py_filesystem">web2py_filesystem</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.PasswordWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.PasswordWidget-class.html">PasswordWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#write">write()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#web2py_path">web2py_path</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.RadioWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.RadioWidget-class.html">RadioWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.IO-class.html#write">write()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.IO-class.html">IO</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.utils-module.html#web2py_uuid">web2py_uuid()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages-module.html#write_dict">write_dict()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#web2py_version">web2py_version</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.TextWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.TextWidget-class.html">TextWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#write_file">write_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice-module.html#web2py_windows_service_handler">web2py_windows_service_handler()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice-module.html">web2py.gluon.winservice</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#widget">widget()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#write_warning">write_warning()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml-module.html#widget_class">widget_class</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main-module.html#wsgibase">wsgibase()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main-module.html">web2py.gluon.main</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#widgets">widgets</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice-module.html">web2py.gluon.winservice</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice-module.html">winservice</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="X"><h2 class="epydoc">X</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="sqlite3.dbapi2-module.html#x">x</a><br />
<span class="index-where">(in&nbsp;<a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.P-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.P-class.html">P</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#XML_unpickle">XML_unpickle()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html">XHTML</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SCRIPT-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.SCRIPT-class.html">SCRIPT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html">XML</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.STYLE-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.STYLE-class.html">STYLE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#xmlescape">xmlescape()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XHTML-class.html">XHTML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XHTML-class.html#xmlns">xmlns</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XHTML-class.html">XHTML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.A-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.A-class.html">A</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.xmlrpc-module.html">xmlrpc</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon-module.html">web2py.gluon</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.CODE-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.CODE-class.html">CODE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XmlComponent-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#xmlrpc">xmlrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#xmlrpc">xmlrpc()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal-module.html#xorify">xorify()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.HTML-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.HTML-class.html">HTML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer-module.html">web2py.gluon.sanitizer</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.INPUT-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.INPUT-class.html">INPUT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer-module.html#xssescape">xssescape()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer-module.html">web2py.gluon.sanitizer</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MARKMIN-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html-module.html#XML_pickle">XML_pickle()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#xtags">xtags()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MENU-class.html#xml">xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MENU-class.html">MENU</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.serializers-module.html#xml_rec">xml_rec()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="Y"><h2 class="epydoc">Y</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR">YEAR</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#year">year()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="Z"><h2 class="epydoc">Z</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="psycopg2.tz-module.html#ZERO">ZERO</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz-module.html">psycopg2.tz</a>)</font></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<td valign="top" width="1%"><a name="_"><h2 class="epydoc">_</h2></a></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__add__">__add__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__add__">__add__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.SuperNode-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.SuperNode-class.html">SuperNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__add__">__add__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Reference-class.html#__allocate">__allocate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Reference-class.html">Reference</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Query-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Query-class.html">Query</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Reference-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Reference-class.html">Reference</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Query-class.html#__and__">__and__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Query-class.html">Query</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__and__">__and__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.reserved_sql_keywords-module.html#__author__">__author__</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLALL-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLALL-class.html">SQLALL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Messages-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Messages-class.html">Messages</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__bmp">__bmp()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCustomType-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLCustomType-class.html">SQLCustomType</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Settings-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Settings-class.html">Settings</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.Cache-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.Cache-class.html">Cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp.mybuiltin-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp.mybuiltin-class.html">mybuiltin</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheOnDisk-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheOnDisk-class.html">CacheOnDisk</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.TeradataAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.TeradataAdapter-class.html">TeradataAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Reference-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Reference-class.html">Reference</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp.LoadFactory-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp.LoadFactory-class.html">LoadFactory</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.debug.Pipe-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.debug.Pipe-class.html">Pipe</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._BaseImporter-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Request-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Request-class.html">Request</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Response-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Response-class.html">Response</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.highlight.Highlighter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__setitem__">__setitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.BEAUTIFY-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.BEAUTIFY-class.html">BEAUTIFY</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCallableList-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLCallableList-class.html">SQLCallableList</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MARKMIN-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Query-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Query-class.html">Query</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MENU-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MENU-class.html">MENU</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.__TAG__-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.__TAG__-class.html">__TAG__</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLALL-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLALL-class.html">SQLALL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.translator-class.html">translator</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCustomType-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLCustomType-class.html">SQLCustomType</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html">AutocompleteWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http.HTTP-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http.HTTP-class.html">HTTP</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.List-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.List-class.html">List</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.translator-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.translator-class.html">translator</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.MARKMIN-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.main.HttpServer-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.main.HttpServer-class.html">HttpServer</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.Token-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.Token-class.html">Token</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.http.HTTP-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.http.HTTP-class.html">HTTP</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.CLEANUP-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.CLEANUP-class.html">CLEANUP</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.cronlauncher-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.cronlauncher-class.html">cronlauncher</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.CRYPT-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.CRYPT-class.html">CRYPT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.extcron-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.extcron-class.html">extcron</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.hardcron-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.hardcron-class.html">hardcron</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron.softcron-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron.softcron-class.html">softcron</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html">IS_DATETIME_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.RestrictedError-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.RestrictedError-class.html">RestrictedError</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Node-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Node-class.html">Node</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html">IS_DATE_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.SuperNode-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.SuperNode-class.html">SuperNode</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">IS_DECIMAL_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMAIL-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite.MapUrlOut-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__sub__">__sub__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ChunkedReader-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.__TAG__-class.html">__TAG__</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html-module.html">web2py.gluon.html</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EQUAL_TO-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EQUAL_TO-class.html">IS_EQUAL_TO</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Connection-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Connection-class.html">Connection</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#__unicode__">__unicode__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EXPR-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EXPR-class.html">IS_EXPR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.FileWrapper-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.FileWrapper-class.html">FileWrapper</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">IS_FLOAT_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_GENERIC_URL-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_GENERIC_URL-class.html">IS_GENERIC_URL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Listener-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Listener-class.html">Listener</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_build_query">_build_query()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_HTTP_URL-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_HTTP_URL-class.html">IS_HTTP_URL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Monitor-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Monitor-class.html">Monitor</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html#_clear">_clear()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#_close">_close()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html">IS_INT_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ThreadPool-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_DB-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.WSGIWorker-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_count">_count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SET-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#_count">_count()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SUBSET-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_SUBSET-class.html">IS_IN_SUBSET</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_create_references">_create_references()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html">AutocompleteWidget</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.newcron-module.html#_cron_stopping">_cron_stopping</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LENGTH-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_LENGTH-class.html">IS_LENGTH</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LIST_OF-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_LIST_OF-class.html">IS_LIST_OF</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.sqlhtml.SQLTABLE-class.html">SQLTABLE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LOWER-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_LOWER-class.html">IS_LOWER</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Messages-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Messages-class.html">Messages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_delete">_delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_MATCH-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.BlockNode-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#_delete">_delete()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html">IS_NOT_EMPTY</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">IS_NOT_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Node-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Node-class.html">Node</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#_drop">_drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_SLUG-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_SLUG-class.html">IS_SLUG</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.SuperNode-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.SuperNode-class.html">SuperNode</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MySQLAdapter-class.html#_drop">_drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_STRONG-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_STRONG-class.html">IS_STRONG</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.OracleAdapter-class.html#_drop">_drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_TIME-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_TIME-class.html">IS_TIME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_drop">_drop()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html">IS_UPLOAD_FILENAME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Crud-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Crud-class.html">Crud</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#_error_file">_error_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_UPPER-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_UPPER-class.html">IS_UPPER</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Mail.Attachment-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Mail.Attachment-class.html">Attachment</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#_exe_args_">_exe_args_</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_URL-class.html#__call__">__call__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_URL-class.html">IS_URL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Mail-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Mail-class.html">Mail</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.fileutils-module.html#_extractall">_extractall()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__cmp__">__cmp__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_filter_fields">_filter_fields()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__cmp__">__cmp__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__contains__">__contains__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service.JsonRpcException-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service.JsonRpcException-class.html">JsonRpcException</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OPTGROUP-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.OPTGROUP-class.html">OPTGROUP</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html#__contains__">__contains__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Service-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.OPTION-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.OPTION-class.html">OPTION</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__copy__">__copy__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.CLEANUP-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.CLEANUP-class.html">CLEANUP</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SELECT-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.SELECT-class.html">SELECT</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.CRYPT-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.CRYPT-class.html">CRYPT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TABLE-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TABLE-class.html">TABLE</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__delitem__">__delitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html">IS_ALPHANUMERIC</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TBODY-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TBODY-class.html">TBODY</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TFOOT-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TFOOT-class.html">TFOOT</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__delitem__">__delitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.THEAD-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.THEAD-class.html">THEAD</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__div__">__div__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html">IS_DATETIME_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TR-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TR-class.html">TR</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__eq__">__eq__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html">DBAPISet</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html">IS_DATE_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.UL-class.html#_fixup">_fixup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.UL-class.html">UL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__eq__">__eq__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">IS_DECIMAL_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#_formatparam">_formatparam()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__eq__">__eq__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMAIL-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#_get_file_text">_get_file_text()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__eq__">__eq__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_get_module_file">_get_module_file()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__ge__">__ge__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EQUAL_TO-class.html">IS_EQUAL_TO</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#_get_table">_get_table()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#__get_migrate">__get_migrate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EXPR-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EXPR-class.html">IS_EXPR</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#_get_user_id">_get_user_id()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">IS_FLOAT_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#_handleError">_handleError()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Reference-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Reference-class.html">Reference</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_GENERIC_URL-class.html">IS_GENERIC_URL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Auth-class.html#_HTTP">_HTTP()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Auth-class.html">Auth</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_HTTP_URL-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_HTTP_URL-class.html">IS_HTTP_URL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_insert">_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html">IS_INT_IN_RANGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_insert">_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.__TAG__-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.__TAG__-class.html">__TAG__</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_DB-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.Content-class.html#_insert">_insert()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.Content-class.html">Content</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SET-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#_is_tracking_changes">_is_tracking_changes</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Messages-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Messages-class.html">Messages</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IN_SUBSET-class.html">IS_IN_SUBSET</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_listify">_listify()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IPV4-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_matchAppDir">_matchAppDir()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.StorageList-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.StorageList-class.html">StorageList</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LENGTH-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_LENGTH-class.html">IS_LENGTH</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz.FixedOffsetTimezone-class.html#_name">_name</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz.FixedOffsetTimezone-class.html">FixedOffsetTimezone</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html#__getattr__">__getattr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_LIST_OF-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_LIST_OF-class.html">IS_LIST_OF</a>)</font></td>
<td width="33%" class="link-index"><a href="psycopg2.tz.FixedOffsetTimezone-class.html#_offset">_offset</a><br />
<span class="index-where">(in&nbsp;<a href="psycopg2.tz.FixedOffsetTimezone-class.html">FixedOffsetTimezone</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp.mybuiltin-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp.mybuiltin-class.html">mybuiltin</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_MATCH-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#_options">_options()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html">IS_NOT_EMPTY</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_PACKAGE_PATH_SUFFIX">_PACKAGE_PATH_SUFFIX</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">IS_NOT_IN_DB</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#_params_default">_params_default()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Reference-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Reference-class.html">Reference</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_SLUG-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_SLUG-class.html">IS_SLUG</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_STRONG-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_STRONG-class.html">IS_STRONG</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.FORM-class.html#_postprocessing">_postprocessing()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.FORM-class.html">FORM</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_TIME-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_TIME-class.html">IS_TIME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.INPUT-class.html#_postprocessing">_postprocessing()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.INPUT-class.html">INPUT</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCustomType-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLCustomType-class.html">SQLCustomType</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html">IS_UPLOAD_FILENAME</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.SELECT-class.html#_postprocessing">_postprocessing()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.SELECT-class.html">SELECT</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_URL-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_URL-class.html">IS_URL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.TEXTAREA-class.html#_postprocessing">_postprocessing()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.TEXTAREA-class.html">TEXTAREA</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.IO-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.IO-class.html">IO</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.template.TemplateParser-class.html#_raise_error">_raise_error()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.widget.web2pyDialog-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_RE_ESCAPED_PATH_SEP">_RE_ESCAPED_PATH_SEP</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.__TAG__-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.__TAG__-class.html">__TAG__</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.ChunkedReader-class.html#_read_header">_read_header()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__int__">__int__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Worker-class.html#_read_request_line_jython">_read_request_line_jython()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Worker-class.html">Worker</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.FileWrapper-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.FileWrapper-class.html">FileWrapper</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__invert__">__invert__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_reload_check">_reload_check()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__getitem__">__getitem__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Query-class.html#__invert__">__invert__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Query-class.html">Query</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rewrite-module.html#_router_default">_router_default()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__getslice__">__getslice__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__iter__">__iter__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__getslice__">__getslice__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__iter__">__iter__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#_select">_select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLCustomType-class.html#__getslice__">__getslice__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLCustomType-class.html">SQLCustomType</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__iter__">__iter__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_select">_select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__getslice__">__getslice__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__iter__">__iter__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#_select">_select()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__getslice__">__getslice__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__iter__">__iter__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.FileWrapper-class.html#__iter__">__iter__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.FileWrapper-class.html">FileWrapper</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html#_sighup">_sighup()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__gif">__gif()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__jpeg">__jpeg()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Rocket-class.html#_sigterm">_sigterm()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html">Rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__gt__">__gt__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__le__">__le__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#_store_in_db">_store_in_db()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__hash__">__hash__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html">DBAPISet</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__len__">__len__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.restricted.TicketStorage-class.html#_store_on_disk">_store_on_disk()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__hash__">__hash__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__len__">__len__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#_svc_display_name_">_svc_display_name_</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__hash__">__hash__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__len__">__len__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#_svc_display_name_">_svc_display_name_</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__import__dot">__import__dot()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__len__">__len__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Service-class.html#_svc_name_">_svc_name_</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Service-class.html">Service</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.Cache-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.Cache-class.html">Cache</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__len__">__len__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.winservice.Web2pyService-class.html#_svc_name_">_svc_name_</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheAbstract-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheAbstract-class.html">CacheAbstract</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__lt__">__lt__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheInRam-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheInRam-class.html">CacheInRam</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__mod__">__mod__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.cache.CacheOnDisk-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.cache.CacheOnDisk-class.html">CacheOnDisk</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__mod__">__mod__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#_truncate">_truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.compileapp.LoadFactory-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.compileapp.LoadFactory-class.html">LoadFactory</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__mul__">__mul__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#_truncate">_truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__ne__">__ne__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html">DBAPISet</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_truncate">_truncate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__ne__">__ne__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#_try_store_in_db">_try_store_in_db()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__ne__">__ne__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#_try_store_on_disk">_try_store_on_disk()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__ne__">__ne__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket-module.html#_tspecials">_tspecials</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.CubridAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.CubridAdapter-class.html">CubridAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.PluginManager-class.html#__new__">__new__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.globals.Session-class.html#_unlock">_unlock()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.globals.Session-class.html">Session</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#__nonzero__">__nonzero__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DB2Adapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__nonzero__">__nonzero__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_update">_update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DatabaseStoredFile-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html">DatabaseStoredFile</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Set-class.html#_update">_update()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Set-class.html">Set</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Expression-class.html#__or__">__or__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Expression-class.html">Expression</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates">_update_dates()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Field-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Field-class.html">Field</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Query-class.html#__or__">__or__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Query-class.html">Query</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#_update_referenced_by">_update_referenced_by()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Rows-class.html#__or__">__or__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Rows-class.html">Rows</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#_validate">_validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html">FireBirdEmbeddedAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.portalocker-module.html#__overlapped">__overlapped</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_validate">_validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEDecimalProperty-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEDecimalProperty-class.html">GAEDecimalProperty</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__png">__png()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.INPUT-class.html#_validate">_validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.INPUT-class.html">INPUT</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEF-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEF-class.html">GAEF</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.XML-class.html#__radd__">__radd__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.XML-class.html">XML</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.tools.Recaptcha-class.html#_validate">_validate()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__radd__">__radd__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#_web2py_date_tracker_importer">_web2py_date_tracker_importer</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GoogleSQLAdapter-class.html">GoogleSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.DAL-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.DAL-class.html">DAL</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#_web2py_importer">_web2py_importer</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.InformixAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.GAEF-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.GAEF-class.html">GAEF</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import-module.html#_web2py_path">_web2py_path</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.IngresAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Row-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Row-class.html">Row</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html">_Web2pyDateTrackerImporter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html">JDBCPostgreSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.Table-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.Table-class.html">Table</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html">JDBCSQLiteAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.languages.lazyT-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.languages.lazyT-class.html">lazyT</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_Web2pyImporter__import__dot">_Web2pyImporter__import__dot()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.rocket.Headers-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.rocket.Headers-class.html">Headers</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.storage.Storage-class.html">Storage</a>)</font></td>
<td width="33%" class="link-index"><a href="web2py.gluon.html.DIV-class.html#_xml">_xml()</a><br />
<span class="index-where">(in&nbsp;<a href="web2py.gluon.html.DIV-class.html">DIV</a>)</font></td>
</tr>
</table>
</td></tr>
</table>
</br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/index.html version [551171ca4e].


















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
          "DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title> web2py Web Framework </title>
</head>
<frameset cols="20%,80%">
  <frameset rows="30%,70%">
    <frame src="toc.html" name="moduleListFrame"
           id="moduleListFrame" />
    <frame src="toc-everything.html" name="moduleFrame"
           id="moduleFrame" />
  </frameset>
  <frame src="web2py.gluon-module.html" name="mainFrame" id="mainFrame" />
</frameset>
</html>

Added applications/examples/static/epydoc/module-tree.html version [c599e47485].



















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module Hierarchy</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">&nbsp;</td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="module-tree.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<center><b>
 [ <a href="module-tree.html">Module Hierarchy</a>
 | <a href="class-tree.html">Class Hierarchy</a> ]
</b></center><br />
<h1 class="epydoc">Module Hierarchy</h1>
<ul class="nomargin-top">
    <li> <strong class="uidlink"><a href="psycopg2-module.html">psycopg2</a></strong>: <em class="summary">A Python driver for PostgreSQL

psycopg is a PostgreSQL_ database adapter for the Python_ programming
language.</em>
    <ul>
    <li> <strong class="uidlink"><a href="psycopg2.tz-module.html">psycopg2.tz</a></strong>: <em class="summary">tzinfo implementations for psycopg2</em>    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a></strong>: <em class="summary">PyMySQL: A pure-Python drop-in replacement for MySQLdb.</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon-module.html">web2py.gluon</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.cfs-module.html">web2py.gluon.cfs</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.contenttype-module.html">web2py.gluon.contenttype</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink">web2py.gluon.contrib</strong>
    <ul class="private">
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a></strong>: <em class="summary">PyMySQL: A pure-Python drop-in replacement for MySQLdb.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants-module.html">web2py.gluon.contrib.pymysql.constants</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a></strong>    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a></strong>    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a></strong>: <em class="summary">This file is part of the web2py Web Framework Developed by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;, limodou 
        &lt;limodou@gmail.com&gt; and srackham 
        &lt;srackham@gmail.com&gt;.</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.decoder-module.html">web2py.gluon.decoder</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.highlight-module.html">web2py.gluon.highlight</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.html-module.html">web2py.gluon.html</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.http-module.html">web2py.gluon.http</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.main-module.html">web2py.gluon.main</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.myregex-module.html">web2py.gluon.myregex</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a></strong>: <em class="summary">Created by Attila Csipa &lt;web2py@csipa.in.rs&gt; Modified by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a></strong>: <em class="summary">Cross-platform (posix/nt) API for flock-style file locking.</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a></strong>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.sanitizer-module.html">web2py.gluon.sanitizer</a></strong>: <em class="summary">:</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.settings-module.html">web2py.gluon.settings</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a></strong>: <em class="summary">This file is part of the web2py Web Framework Developed by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;, limodou 
        &lt;limodou@gmail.com&gt; and srackham 
        &lt;srackham@gmail.com&gt;.</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sql-module.html">web2py.gluon.sql</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.template-module.html">web2py.gluon.template</a></strong>: <em class="summary">This file is part of the web2py Web Framework (Copyrighted, 2007-2011).</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.xmlrpc-module.html">web2py.gluon.xmlrpc</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a></strong>: <em class="summary">PyMySQL: A pure-Python drop-in replacement for MySQLdb.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants-module.html">web2py.gluon.contrib.pymysql.constants</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a></strong>    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a></strong>    </li>
    </ul>
    </li>
</ul>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2-module.html version [26fe2ee9c5].



































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;psycopg2
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package psycopg2</h1><span class="codelink"><a href="psycopg2-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">
A Python driver for PostgreSQL

psycopg is a PostgreSQL_ database adapter for the Python_ programming
language. This is version 2, a complete rewrite of the original code to
provide new-style classes for connection and cursor objects and other sweet
candies. Like the original, psycopg 2 was written with the aim of being very
small and fast, and stable as a rock.

Homepage: http://initd.org/projects/psycopg2

.. _PostgreSQL: http://www.postgresql.org/
.. _Python: http://www.python.org/

:Groups:
  * `Connections creation`: connect
  * `Value objects constructors`: Binary, Date, DateFromTicks, Time,
    TimeFromTicks, Timestamp, TimestampFromTicks

</pre><br /><br />

<hr />
<div class="fields">      <p><strong>Version:</strong>
        2.0.6 (dec mx dt ext pq3)
      </p>
</div><!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Submodules</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Submodules"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="psycopg2.tz-module.html">psycopg2.tz</a></strong>: <em class="summary">tzinfo implementations for psycopg2</em>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.DataError-class.html" class="summary-name">DataError</a><br />
      Error related to problems with the processed data.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.DatabaseError-class.html" class="summary-name">DatabaseError</a><br />
      Error related to the database engine.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.Error-class.html" class="summary-name">Error</a><br />
      Base class for error exceptions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.IntegrityError-class.html" class="summary-name">IntegrityError</a><br />
      Error related to database integrity.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.InterfaceError-class.html" class="summary-name">InterfaceError</a><br />
      Error related to the database interface.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.InternalError-class.html" class="summary-name">InternalError</a><br />
      The database encountered an internal error.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.NotSupportedError-class.html" class="summary-name">NotSupportedError</a><br />
      A not supported datbase API was called.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.OperationalError-class.html" class="summary-name">OperationalError</a><br />
      Error related to database operation (disconnect, memory 
        allocation etc).
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.ProgrammingError-class.html" class="summary-name">ProgrammingError</a><br />
      Error related to database programming (SQL error, table not 
        found etc).
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.Warning-class.html" class="summary-name">Warning</a><br />
      A database warning.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#Binary" class="summary-sig-name">Binary</a>(<span class="summary-sig-arg">buffer</span>)</span><br />
      Build an object capable to hold a bynary string value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#Date" class="summary-sig-name">Date</a>(<span class="summary-sig-arg">year</span>,
        <span class="summary-sig-arg">month</span>,
        <span class="summary-sig-arg">day</span>)</span><br />
      Build an object holding a date value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#DateFromTicks" class="summary-sig-name">DateFromTicks</a>(<span class="summary-sig-arg">ticks</span>)</span><br />
      Build an object holding a date value from the given ticks 
      value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#Time" class="summary-sig-name">Time</a>(<span class="summary-sig-arg">hour</span>,
        <span class="summary-sig-arg">minutes</span>,
        <span class="summary-sig-arg">seconds</span>,
        <span class="summary-sig-arg">tzinfo</span>=<span class="summary-sig-default">None</span>)</span><br />
      Build an object holding a time value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#TimeFromTicks" class="summary-sig-name">TimeFromTicks</a>(<span class="summary-sig-arg">ticks</span>)</span><br />
      Build an object holding a time value from the given ticks 
      value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#Timestamp" class="summary-sig-name">Timestamp</a>(<span class="summary-sig-arg">year</span>,
        <span class="summary-sig-arg">month</span>,
        <span class="summary-sig-arg">day</span>,
        <span class="summary-sig-arg">hour</span>,
        <span class="summary-sig-arg">minutes</span>,
        <span class="summary-sig-arg">seconds</span>,
        <span class="summary-sig-arg">tzinfo</span>=<span class="summary-sig-default">None</span>)</span><br />
      Build an object holding a timestamp value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#TimestampFromTicks" class="summary-sig-name">TimestampFromTicks</a>(<span class="summary-sig-arg">ticks</span>)</span><br />
      Build an object holding a timestamp value from the given ticks 
      value.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2-module.html#connect" class="summary-sig-name">connect</a>(<span class="summary-sig-arg">dsn</span>,
        <span class="summary-sig-arg">...</span>)</span><br />
      Create a new database connection.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BINARY"></a><span class="summary-name">BINARY</span> = <code title="&lt;psycopg2._psycopg.type object at 0xd660a0&gt;">&lt;psycopg2._psycopg.type object at 0xd660a0&gt;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DATETIME"></a><span class="summary-name">DATETIME</span> = <code title="&lt;psycopg2._psycopg.type object at 0xd5ef80&gt;">&lt;psycopg2._psycopg.type object at 0xd5ef80&gt;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NUMBER"></a><span class="summary-name">NUMBER</span> = <code title="&lt;psycopg2._psycopg.type object at 0xd5ed88&gt;">&lt;psycopg2._psycopg.type object at 0xd5ed88&gt;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ROWID"></a><span class="summary-name">ROWID</span> = <code title="&lt;psycopg2._psycopg.type object at 0xd660d8&gt;">&lt;psycopg2._psycopg.type object at 0xd660d8&gt;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="STRING"></a><span class="summary-name">STRING</span> = <code title="&lt;psycopg2._psycopg.type object at 0xd5ef10&gt;">&lt;psycopg2._psycopg.type object at 0xd5ef10&gt;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="apilevel"></a><span class="summary-name">apilevel</span> = <code title="'2.0'"><code class="variable-quote">'</code><code class="variable-string">2.0</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="k"></a><span class="summary-name">k</span> = <code title="'DatabaseError'"><code class="variable-quote">'</code><code class="variable-string">DatabaseError</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="paramstyle"></a><span class="summary-name">paramstyle</span> = <code title="'pyformat'"><code class="variable-quote">'</code><code class="variable-string">pyformat</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="threadsafety"></a><span class="summary-name">threadsafety</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="Binary"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Binary</span>(<span class="sig-arg">buffer</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Build an object capable to hold a bynary string value.
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new binary object

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="Date"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Date</span>(<span class="sig-arg">year</span>,
        <span class="sig-arg">month</span>,
        <span class="sig-arg">day</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Build an object holding a date value.
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new date

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="DateFromTicks"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">DateFromTicks</span>(<span class="sig-arg">ticks</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <p>Build an object holding a date value from the given ticks value.</p>
  Ticks are the number of seconds since the epoch; see the documentation
  of the standard Python time module for details).
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new date

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="Time"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Time</span>(<span class="sig-arg">hour</span>,
        <span class="sig-arg">minutes</span>,
        <span class="sig-arg">seconds</span>,
        <span class="sig-arg">tzinfo</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Build an object holding a time value.
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new time

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="TimeFromTicks"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">TimeFromTicks</span>(<span class="sig-arg">ticks</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <p>Build an object holding a time value from the given ticks value.</p>
  Ticks are the number of seconds since the epoch; see the documentation
  of the standard Python time module for details).
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new time

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="Timestamp"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Timestamp</span>(<span class="sig-arg">year</span>,
        <span class="sig-arg">month</span>,
        <span class="sig-arg">day</span>,
        <span class="sig-arg">hour</span>,
        <span class="sig-arg">minutes</span>,
        <span class="sig-arg">seconds</span>,
        <span class="sig-arg">tzinfo</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  Build an object holding a timestamp value.
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new timestamp

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="TimestampFromTicks"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">TimestampFromTicks</span>(<span class="sig-arg">ticks</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <p>Build an object holding a timestamp value from the given ticks 
  value.</p>
  Ticks are the number of seconds since the epoch; see the documentation
  of the standard Python time module for details).
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new timestamp

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="connect"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">connect</span>(<span class="sig-arg">dsn</span>,
        <span class="sig-arg">...</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">
Create a new database connection.

This function supports two different but equivalent sets of arguments.
A single data source name or ``dsn`` string can be used to specify the
connection parameters, as follows::

    psycopg2.connect(&quot;dbname=xxx user=xxx ...&quot;)

If ``dsn`` is not provided it is possible to pass the parameters as
keyword arguments; e.g.::

    psycopg2.connect(database='xxx', user='xxx', ...)

The full list of available parameters is:

- ``dbname`` -- database name (only in 'dsn')
- ``database`` -- database name (only as keyword argument)
- ``host`` -- host address (defaults to UNIX socket if not provided)
- ``port`` -- port number (defaults to 5432 if not provided)
- ``user`` -- user name used to authenticate
- ``password`` -- password used to authenticate
- ``sslmode`` -- SSL mode (see PostgreSQL documentation)

If the ``connection_factory`` keyword argument is not provided this
function always return an instance of the `connection` class.
Else the given sub-class of `extensions.connection` will be used to
instantiate the connection object.

:return: New database connection
:rtype: `extensions.connection`

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2-pysrc.html version [d3e7cfc9c4].


































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;psycopg2
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="psycopg2-module.html">Package psycopg2</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-docstring">"""A Python driver for PostgreSQL</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">psycopg is a PostgreSQL_ database adapter for the Python_ programming</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">language. This is version 2, a complete rewrite of the original code to</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">provide new-style classes for connection and cursor objects and other sweet</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">candies. Like the original, psycopg 2 was written with the aim of being very</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">small and fast, and stable as a rock.</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring">Homepage: http://initd.org/projects/psycopg2</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-docstring">.. _PostgreSQL: http://www.postgresql.org/</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-docstring">.. _Python: http://www.python.org/</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-docstring">:Groups:</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-docstring">  * `Connections creation`: connect</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-docstring">  * `Value objects constructors`: Binary, Date, DateFromTicks, Time,</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-docstring">    TimeFromTicks, Timestamp, TimestampFromTicks</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-comment"># psycopg/__init__.py - initialization of the psycopg module</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright (C) 2003-2004 Federico Di Gregorio  &lt;fog@debian.org&gt;</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is free software; you can redistribute it and/or modify</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># it under the terms of the GNU General Public License as published by the</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Free Software Foundation; either version 2, or (at your option) any later</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># version.</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is distributed in the hope that it will be useful, but</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># for more details.</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-comment"># Import modules needed by _psycopg to allow tools like py2exe to do</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># their work without bothering about the module dependencies.</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># </tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># TODO: we should probably use the Warnings framework to signal a missing</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># module instead of raising an exception (in case we're running a thin</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># embedded Python or something even more devious.)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt><tt class="py-op">,</tt> <tt class="py-name">warnings</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Variable sqlite3.dbapi2.version_info=sqlite3.dbapi2-module.html#version_info,Variable web2py.gluon.contrib.pymysql.version_info=web2py.gluon.contrib.pymysql-module.html#version_info,Variable web2py.gluon.main.version_info=web2py.gluon.main-module.html#version_info"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-0', 'version_info', 'link-0');">version_info</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">2</tt> <tt class="py-keyword">and</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-1', 'version_info', 'link-0');">version_info</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">3</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-2', 'datetime', 'link-2');">datetime</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">_psycopg_needs_datetime</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">        <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">            <tt class="py-string">"can't import datetime module probably needed by _psycopg"</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">            <tt class="py-name">RuntimeWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-3', 'version_info', 'link-0');">version_info</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">2</tt> <tt class="py-keyword">and</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-4', 'version_info', 'link-0');">version_info</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">4</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">decimal</tt> <tt class="py-keyword">as</tt> <tt class="py-name">_psycopg_needs_decimal</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">        <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">            <tt class="py-string">"can't import decimal module probably needed by _psycopg"</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">            <tt class="py-name">RuntimeWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Package psycopg2=psycopg2-module.html"><a title="psycopg2" class="py-name" href="#" onclick="return doclink('link-5', 'psycopg2', 'link-5');">psycopg2</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Module psycopg2.tz=psycopg2.tz-module.html"><a title="psycopg2.tz" class="py-name" href="#" onclick="return doclink('link-6', 'tz', 'link-6');">tz</a></tt> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line"><tt class="py-keyword">del</tt> <tt class="py-name">sys</tt><tt class="py-op">,</tt> <tt class="py-name">warnings</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line"> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"><tt class="py-comment"># Import the DBAPI-2.0 stuff into top-level module.</tt> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt id="link-7" class="py-name" targets="Variable psycopg2.BINARY=psycopg2-module.html#BINARY,Variable web2py.gluon.contrib.pymysql.BINARY=web2py.gluon.contrib.pymysql-module.html#BINARY"><a title="psycopg2.BINARY
web2py.gluon.contrib.pymysql.BINARY" class="py-name" href="#" onclick="return doclink('link-7', 'BINARY', 'link-7');">BINARY</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Variable psycopg2.NUMBER=psycopg2-module.html#NUMBER,Variable web2py.gluon.contrib.pymysql.NUMBER=web2py.gluon.contrib.pymysql-module.html#NUMBER"><a title="psycopg2.NUMBER
web2py.gluon.contrib.pymysql.NUMBER" class="py-name" href="#" onclick="return doclink('link-8', 'NUMBER', 'link-8');">NUMBER</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Variable psycopg2.STRING=psycopg2-module.html#STRING,Variable web2py.gluon.contrib.pymysql.STRING=web2py.gluon.contrib.pymysql-module.html#STRING,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING"><a title="psycopg2.STRING
web2py.gluon.contrib.pymysql.STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING" class="py-name" href="#" onclick="return doclink('link-9', 'STRING', 'link-9');">STRING</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Variable psycopg2.DATETIME=psycopg2-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.DATETIME=web2py.gluon.contrib.pymysql-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME"><a title="psycopg2.DATETIME
web2py.gluon.contrib.pymysql.DATETIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME" class="py-name" href="#" onclick="return doclink('link-10', 'DATETIME', 'link-10');">DATETIME</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Variable psycopg2.ROWID=psycopg2-module.html#ROWID,Variable web2py.gluon.contrib.pymysql.ROWID=web2py.gluon.contrib.pymysql-module.html#ROWID"><a title="psycopg2.ROWID
web2py.gluon.contrib.pymysql.ROWID" class="py-name" href="#" onclick="return doclink('link-11', 'ROWID', 'link-11');">ROWID</a></tt> </tt>
<a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line"> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt id="link-12" class="py-name" targets="Function web2py.gluon.contrib.pymysql.Binary()=web2py.gluon.contrib.pymysql-module.html#Binary"><a title="web2py.gluon.contrib.pymysql.Binary" class="py-name" href="#" onclick="return doclink('link-12', 'Binary', 'link-12');">Binary</a></tt><tt class="py-op">,</tt> <tt class="py-name">Date</tt><tt class="py-op">,</tt> <tt class="py-name">Time</tt><tt class="py-op">,</tt> <tt class="py-name">Timestamp</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt class="py-name">DateFromTicks</tt><tt class="py-op">,</tt> <tt class="py-name">TimeFromTicks</tt><tt class="py-op">,</tt> <tt class="py-name">TimestampFromTicks</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt id="link-13" class="py-name" targets="Class psycopg2.Error=psycopg2.Error-class.html,Class web2py.gluon.contrib.pymysql.err.Error=web2py.gluon.contrib.pymysql.err.Error-class.html"><a title="psycopg2.Error
web2py.gluon.contrib.pymysql.err.Error" class="py-name" href="#" onclick="return doclink('link-13', 'Error', 'link-13');">Error</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class psycopg2.Warning=psycopg2.Warning-class.html,Class web2py.gluon.contrib.pymysql.err.Warning=web2py.gluon.contrib.pymysql.err.Warning-class.html"><a title="psycopg2.Warning
web2py.gluon.contrib.pymysql.err.Warning" class="py-name" href="#" onclick="return doclink('link-14', 'Warning', 'link-14');">Warning</a></tt><tt class="py-op">,</tt> <tt id="link-15" class="py-name" targets="Class psycopg2.DataError=psycopg2.DataError-class.html,Class web2py.gluon.contrib.pymysql.err.DataError=web2py.gluon.contrib.pymysql.err.DataError-class.html"><a title="psycopg2.DataError
web2py.gluon.contrib.pymysql.err.DataError" class="py-name" href="#" onclick="return doclink('link-15', 'DataError', 'link-15');">DataError</a></tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name" targets="Class psycopg2.DatabaseError=psycopg2.DatabaseError-class.html,Class web2py.gluon.contrib.pymysql.err.DatabaseError=web2py.gluon.contrib.pymysql.err.DatabaseError-class.html"><a title="psycopg2.DatabaseError
web2py.gluon.contrib.pymysql.err.DatabaseError" class="py-name" href="#" onclick="return doclink('link-16', 'DatabaseError', 'link-16');">DatabaseError</a></tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Class psycopg2.ProgrammingError=psycopg2.ProgrammingError-class.html,Class web2py.gluon.contrib.pymysql.err.ProgrammingError=web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html"><a title="psycopg2.ProgrammingError
web2py.gluon.contrib.pymysql.err.ProgrammingError" class="py-name" href="#" onclick="return doclink('link-17', 'ProgrammingError', 'link-17');">ProgrammingError</a></tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt id="link-18" class="py-name" targets="Class psycopg2.IntegrityError=psycopg2.IntegrityError-class.html,Class web2py.gluon.contrib.pymysql.err.IntegrityError=web2py.gluon.contrib.pymysql.err.IntegrityError-class.html"><a title="psycopg2.IntegrityError
web2py.gluon.contrib.pymysql.err.IntegrityError" class="py-name" href="#" onclick="return doclink('link-18', 'IntegrityError', 'link-18');">IntegrityError</a></tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Class psycopg2.InterfaceError=psycopg2.InterfaceError-class.html,Class web2py.gluon.contrib.pymysql.err.InterfaceError=web2py.gluon.contrib.pymysql.err.InterfaceError-class.html"><a title="psycopg2.InterfaceError
web2py.gluon.contrib.pymysql.err.InterfaceError" class="py-name" href="#" onclick="return doclink('link-19', 'InterfaceError', 'link-19');">InterfaceError</a></tt><tt class="py-op">,</tt> <tt id="link-20" class="py-name" targets="Class psycopg2.InternalError=psycopg2.InternalError-class.html,Class web2py.gluon.contrib.pymysql.err.InternalError=web2py.gluon.contrib.pymysql.err.InternalError-class.html"><a title="psycopg2.InternalError
web2py.gluon.contrib.pymysql.err.InternalError" class="py-name" href="#" onclick="return doclink('link-20', 'InternalError', 'link-20');">InternalError</a></tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt id="link-21" class="py-name" targets="Class psycopg2.NotSupportedError=psycopg2.NotSupportedError-class.html,Class web2py.gluon.contrib.pymysql.err.NotSupportedError=web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html"><a title="psycopg2.NotSupportedError
web2py.gluon.contrib.pymysql.err.NotSupportedError" class="py-name" href="#" onclick="return doclink('link-21', 'NotSupportedError', 'link-21');">NotSupportedError</a></tt><tt class="py-op">,</tt> <tt id="link-22" class="py-name" targets="Class psycopg2.OperationalError=psycopg2.OperationalError-class.html,Class web2py.gluon.contrib.pymysql.err.OperationalError=web2py.gluon.contrib.pymysql.err.OperationalError-class.html"><a title="psycopg2.OperationalError
web2py.gluon.contrib.pymysql.err.OperationalError" class="py-name" href="#" onclick="return doclink('link-22', 'OperationalError', 'link-22');">OperationalError</a></tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line"> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt id="link-23" class="py-name" targets="Method web2py.gluon.globals.Session.connect()=web2py.gluon.globals.Session-class.html#connect"><a title="web2py.gluon.globals.Session.connect" class="py-name" href="#" onclick="return doclink('link-23', 'connect', 'link-23');">connect</a></tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name" targets="Variable psycopg2.apilevel=psycopg2-module.html#apilevel,Variable sqlite3.dbapi2.apilevel=sqlite3.dbapi2-module.html#apilevel,Variable web2py.gluon.contrib.pymysql.apilevel=web2py.gluon.contrib.pymysql-module.html#apilevel"><a title="psycopg2.apilevel
sqlite3.dbapi2.apilevel
web2py.gluon.contrib.pymysql.apilevel" class="py-name" href="#" onclick="return doclink('link-24', 'apilevel', 'link-24');">apilevel</a></tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name" targets="Variable psycopg2.threadsafety=psycopg2-module.html#threadsafety,Variable sqlite3.dbapi2.threadsafety=sqlite3.dbapi2-module.html#threadsafety,Variable web2py.gluon.contrib.pymysql.threadsafety=web2py.gluon.contrib.pymysql-module.html#threadsafety"><a title="psycopg2.threadsafety
sqlite3.dbapi2.threadsafety
web2py.gluon.contrib.pymysql.threadsafety" class="py-name" href="#" onclick="return doclink('link-25', 'threadsafety', 'link-25');">threadsafety</a></tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name" targets="Variable psycopg2.paramstyle=psycopg2-module.html#paramstyle,Variable sqlite3.dbapi2.paramstyle=sqlite3.dbapi2-module.html#paramstyle,Variable web2py.gluon.contrib.pymysql.paramstyle=web2py.gluon.contrib.pymysql-module.html#paramstyle"><a title="psycopg2.paramstyle
sqlite3.dbapi2.paramstyle
web2py.gluon.contrib.pymysql.paramstyle" class="py-name" href="#" onclick="return doclink('link-26', 'paramstyle', 'link-26');">paramstyle</a></tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_psycopg</tt> <tt class="py-keyword">import</tt> <tt class="py-name">__version__</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line"> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt id="link-27" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-27', 'k', 'link-27');">k</a></tt> <tt class="py-keyword">for</tt> <tt id="link-28" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-28', 'k', 'link-27');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-29', 'keys', 'link-29');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-30" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-30', 'k', 'link-27');">k</a></tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-31', 'startswith', 'link-31');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.DataError-class.html version [ab191da1ee].













































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.DataError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        DataError ::
        Class&nbsp;DataError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.DataError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DataError</h1><span class="codelink"><a href="psycopg2-pysrc.html#DataError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
        exceptions.StandardError --+        
                                   |        
                               <a href="psycopg2.Error-class.html">Error</a> --+    
                                       |    
                           <a href="psycopg2.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">DataError</strong>
</pre>

<hr />
Error related to problems with the processed data.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.DatabaseError-class.html version [7fe80798af].





















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.DatabaseError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        DatabaseError ::
        Class&nbsp;DatabaseError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.DatabaseError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DatabaseError</h1><span class="codelink"><a href="psycopg2-pysrc.html#DatabaseError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                
                       |                
exceptions.BaseException --+            
                           |            
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+        
                               |        
        exceptions.StandardError --+    
                                   |    
                               <a href="psycopg2.Error-class.html">Error</a> --+
                                       |
                                      <strong class="uidshort">DatabaseError</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="psycopg2.DataError-class.html">DataError</a>,
    <a href="psycopg2.IntegrityError-class.html">IntegrityError</a>,
    <a href="psycopg2.InternalError-class.html">InternalError</a>,
    <a href="psycopg2.NotSupportedError-class.html">NotSupportedError</a>,
    <a href="psycopg2.OperationalError-class.html">OperationalError</a>,
    <a href="psycopg2.ProgrammingError-class.html">ProgrammingError</a>
</dd></dl>

<hr />
Error related to the database engine.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.Error-class.html version [98de8f55d1].















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.Error</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        Error ::
        Class&nbsp;Error
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.Error-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Error</h1><span class="codelink"><a href="psycopg2-pysrc.html#Error">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+    
                               |    
        exceptions.StandardError --+
                                   |
                                  <strong class="uidshort">Error</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="psycopg2.DatabaseError-class.html">DatabaseError</a>,
    <a href="psycopg2.InterfaceError-class.html">InterfaceError</a>
</dd></dl>

<hr />
Base class for error exceptions.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.IntegrityError-class.html version [9ecedfb976].













































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.IntegrityError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        IntegrityError ::
        Class&nbsp;IntegrityError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.IntegrityError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IntegrityError</h1><span class="codelink"><a href="psycopg2-pysrc.html#IntegrityError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
        exceptions.StandardError --+        
                                   |        
                               <a href="psycopg2.Error-class.html">Error</a> --+    
                                       |    
                           <a href="psycopg2.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">IntegrityError</strong>
</pre>

<hr />
Error related to database integrity.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.InterfaceError-class.html version [e709319c9c].











































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.InterfaceError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        InterfaceError ::
        Class&nbsp;InterfaceError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.InterfaceError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class InterfaceError</h1><span class="codelink"><a href="psycopg2-pysrc.html#InterfaceError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                
                       |                
exceptions.BaseException --+            
                           |            
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+        
                               |        
        exceptions.StandardError --+    
                                   |    
                               <a href="psycopg2.Error-class.html">Error</a> --+
                                       |
                                      <strong class="uidshort">InterfaceError</strong>
</pre>

<hr />
Error related to the database interface.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.InternalError-class.html version [c5cf33be98].













































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.InternalError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        InternalError ::
        Class&nbsp;InternalError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.InternalError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class InternalError</h1><span class="codelink"><a href="psycopg2-pysrc.html#InternalError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
        exceptions.StandardError --+        
                                   |        
                               <a href="psycopg2.Error-class.html">Error</a> --+    
                                       |    
                           <a href="psycopg2.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">InternalError</strong>
</pre>

<hr />
The database encountered an internal error.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.NotSupportedError-class.html version [1f2478371d].













































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.NotSupportedError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        NotSupportedError ::
        Class&nbsp;NotSupportedError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.NotSupportedError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class NotSupportedError</h1><span class="codelink"><a href="psycopg2-pysrc.html#NotSupportedError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
        exceptions.StandardError --+        
                                   |        
                               <a href="psycopg2.Error-class.html">Error</a> --+    
                                       |    
                           <a href="psycopg2.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">NotSupportedError</strong>
</pre>

<hr />
A not supported datbase API was called.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.OperationalError-class.html version [608497a402].














































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.OperationalError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        OperationalError ::
        Class&nbsp;OperationalError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.OperationalError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OperationalError</h1><span class="codelink"><a href="psycopg2-pysrc.html#OperationalError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
        exceptions.StandardError --+        
                                   |        
                               <a href="psycopg2.Error-class.html">Error</a> --+    
                                       |    
                           <a href="psycopg2.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">OperationalError</strong>
</pre>

<hr />
Error related to database operation (disconnect, memory allocation 
  etc).<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.ProgrammingError-class.html version [6c4dff9c05].














































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.ProgrammingError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        ProgrammingError ::
        Class&nbsp;ProgrammingError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.ProgrammingError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ProgrammingError</h1><span class="codelink"><a href="psycopg2-pysrc.html#ProgrammingError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
        exceptions.StandardError --+        
                                   |        
                               <a href="psycopg2.Error-class.html">Error</a> --+    
                                       |    
                           <a href="psycopg2.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">ProgrammingError</strong>
</pre>

<hr />
Error related to database programming (SQL error, table not found 
  etc).<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.Warning-class.html version [be3cdbc9fc].









































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.Warning</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        Warning ::
        Class&nbsp;Warning
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.Warning-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Warning</h1><span class="codelink"><a href="psycopg2-pysrc.html#Warning">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+    
                               |    
        exceptions.StandardError --+
                                   |
                                  <strong class="uidshort">Warning</strong>
</pre>

<hr />
A database warning.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.StandardError</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.tz-module.html version [5c4671c67e].
















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.tz</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="psycopg2-module.html">Package&nbsp;psycopg2</a> ::
        Module&nbsp;tz
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.tz-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module tz</h1><span class="codelink"><a href="psycopg2.tz-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>tzinfo implementations for psycopg2</p>
  This module holds two different tzinfo implementations that can be 
  used as the 'tzinfo' argument to datetime constructors, directly passed 
  to psycopg functions or used to set the .tzinfo_factory attribute in 
  cursors.<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.tz.FixedOffsetTimezone-class.html" class="summary-name">FixedOffsetTimezone</a><br />
      Fixed offset in minutes east from UTC.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2.tz.LocalTimezone-class.html" class="summary-name">LocalTimezone</a><br />
      Platform idea of local timezone.
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DSTDIFF"></a><span class="summary-name">DSTDIFF</span> = <code title="datetime.timedelta(0, 3600)">datetime.timedelta(0, 3600)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DSTOFFSET"></a><span class="summary-name">DSTOFFSET</span> = <code title="datetime.timedelta(0, 3600)">datetime.timedelta(0, 3600)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LOCAL"></a><span class="summary-name">LOCAL</span> = <code title="&lt;psycopg2.tz.LocalTimezone object at 0xd4e690&gt;">&lt;psycopg2.tz.LocalTimezone object at 0xd4e690&gt;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="STDOFFSET"></a><span class="summary-name">STDOFFSET</span> = <code title="datetime.timedelta(0)">datetime.timedelta(0)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ZERO"></a><span class="summary-name">ZERO</span> = <code title="datetime.timedelta(0)">datetime.timedelta(0)</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.tz-pysrc.html version [5bfdfb6ac0].






























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.tz</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="psycopg2-module.html">Package&nbsp;psycopg2</a> ::
        Module&nbsp;tz
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.tz-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="psycopg2.tz-module.html">Module psycopg2.tz</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-docstring">"""tzinfo implementations for psycopg2</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">This module holds two different tzinfo implementations that can be used as</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">the 'tzinfo' argument to datetime constructors, directly passed to psycopg</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">functions or used to set the .tzinfo_factory attribute in cursors. </tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment"># psycopg/tz.py - tzinfo implementation</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright (C) 2003-2004 Federico Di Gregorio  &lt;fog@debian.org&gt;</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is free software; you can redistribute it and/or modify</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># it under the terms of the GNU General Public License as published by the</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Free Software Foundation; either version 2, or (at your option) any later</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># version.</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is distributed in the hope that it will be useful, but</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># for more details.</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1', 'time', 'link-1');">time</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable psycopg2.tz.ZERO=psycopg2.tz-module.html#ZERO"><a title="psycopg2.tz.ZERO" class="py-name" href="#" onclick="return doclink('link-2', 'ZERO', 'link-2');">ZERO</a></tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-3', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"> </tt>
<a name="FixedOffsetTimezone"></a><div id="FixedOffsetTimezone-def"><a name="L27"></a><tt class="py-lineno"> 27</tt> <a class="py-toggle" href="#" id="FixedOffsetTimezone-toggle" onclick="return toggle('FixedOffsetTimezone');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="psycopg2.tz.FixedOffsetTimezone-class.html">FixedOffsetTimezone</a><tt class="py-op">(</tt><tt class="py-base-class">datetime</tt><tt class="py-op">.</tt><tt class="py-base-class">tzinfo</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FixedOffsetTimezone-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="FixedOffsetTimezone-expanded"><a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt class="py-docstring">"""Fixed offset in minutes east from UTC.</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">    This is exactly the implementation found in Python 2.3.x documentation,</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">    with a small change to the __init__ method to allow for pickling and a</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">    default name in the form 'sHH:MM' ('s' is the sign.)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt id="link-4" class="py-name" targets="Variable psycopg2.tz.FixedOffsetTimezone._name=psycopg2.tz.FixedOffsetTimezone-class.html#_name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-4', '_name', 'link-4');">_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt id="link-5" class="py-name" targets="Variable psycopg2.tz.FixedOffsetTimezone._offset=psycopg2.tz.FixedOffsetTimezone-class.html#_offset"><a title="psycopg2.tz.FixedOffsetTimezone._offset" class="py-name" href="#" onclick="return doclink('link-5', '_offset', 'link-5');">_offset</a></tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="psycopg2.tz.ZERO" class="py-name" href="#" onclick="return doclink('link-6', 'ZERO', 'link-2');">ZERO</a></tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">     </tt>
<a name="FixedOffsetTimezone.__init__"></a><div id="FixedOffsetTimezone.__init__-def"><a name="L37"></a><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="FixedOffsetTimezone.__init__-toggle" onclick="return toggle('FixedOffsetTimezone.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.FixedOffsetTimezone-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">offset</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FixedOffsetTimezone.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FixedOffsetTimezone.__init__-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">offset</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._offset" class="py-name" href="#" onclick="return doclink('link-7', '_offset', 'link-5');">_offset</a></tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-8', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt><tt id="link-9" class="py-name" targets="Method web2py.gluon.dal.Expression.minutes()=web2py.gluon.dal.Expression-class.html#minutes"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-9', 'minutes', 'link-9');">minutes</a></tt> <tt class="py-op">=</tt> <tt class="py-name">offset</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-10" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-10', 'name', 'link-10');">name</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-11', '_name', 'link-4');">_name</a></tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-12', 'name', 'link-10');">name</a></tt> </tt>
</div><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"> </tt>
<a name="FixedOffsetTimezone.utcoffset"></a><div id="FixedOffsetTimezone.utcoffset-def"><a name="L43"></a><tt class="py-lineno"> 43</tt> <a class="py-toggle" href="#" id="FixedOffsetTimezone.utcoffset-toggle" onclick="return toggle('FixedOffsetTimezone.utcoffset');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.FixedOffsetTimezone-class.html#utcoffset">utcoffset</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FixedOffsetTimezone.utcoffset-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FixedOffsetTimezone.utcoffset-expanded"><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._offset" class="py-name" href="#" onclick="return doclink('link-13', '_offset', 'link-5');">_offset</a></tt> </tt>
</div><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"> </tt>
<a name="FixedOffsetTimezone.tzname"></a><div id="FixedOffsetTimezone.tzname-def"><a name="L46"></a><tt class="py-lineno"> 46</tt> <a class="py-toggle" href="#" id="FixedOffsetTimezone.tzname-toggle" onclick="return toggle('FixedOffsetTimezone.tzname');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.FixedOffsetTimezone-class.html#tzname">tzname</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FixedOffsetTimezone.tzname-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FixedOffsetTimezone.tzname-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-14', '_name', 'link-4');">_name</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-15', '_name', 'link-4');">_name</a></tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">            <tt id="link-16" class="py-name" targets="Method web2py.gluon.dal.Expression.seconds()=web2py.gluon.dal.Expression-class.html#seconds"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-16', 'seconds', 'link-16');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._offset" class="py-name" href="#" onclick="return doclink('link-17', '_offset', 'link-5');">_offset</a></tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-18', 'seconds', 'link-16');">seconds</a></tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._offset" class="py-name" href="#" onclick="return doclink('link-19', '_offset', 'link-5');">_offset</a></tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">*</tt> <tt class="py-number">86400</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">            <tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-20', 'seconds', 'link-16');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-name">divmod</tt><tt class="py-op">(</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-21', 'seconds', 'link-16');">seconds</a></tt><tt class="py-op">,</tt> <tt class="py-number">3600</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">            <tt id="link-22" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-22', 'minutes', 'link-9');">minutes</a></tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-23', 'seconds', 'link-16');">seconds</a></tt><tt class="py-op">/</tt><tt class="py-number">60</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-24', 'minutes', 'link-9');">minutes</a></tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-string">"%+03d:%d"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-25', 'minutes', 'link-9');">minutes</a></tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-string">"%+03d"</tt> <tt class="py-op">%</tt> <tt class="py-name">hours</tt> </tt>
</div><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">             </tt>
<a name="FixedOffsetTimezone.dst"></a><div id="FixedOffsetTimezone.dst-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="FixedOffsetTimezone.dst-toggle" onclick="return toggle('FixedOffsetTimezone.dst');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.FixedOffsetTimezone-class.html#dst">dst</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FixedOffsetTimezone.dst-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FixedOffsetTimezone.dst-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-26" class="py-name"><a title="psycopg2.tz.ZERO" class="py-name" href="#" onclick="return doclink('link-26', 'ZERO', 'link-2');">ZERO</a></tt> </tt>
</div></div><a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt id="link-27" class="py-name" targets="Variable psycopg2.tz.STDOFFSET=psycopg2.tz-module.html#STDOFFSET"><a title="psycopg2.tz.STDOFFSET" class="py-name" href="#" onclick="return doclink('link-27', 'STDOFFSET', 'link-27');">STDOFFSET</a></tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-28', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-29', 'seconds', 'link-16');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt id="link-30" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-30', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">timezone</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-31" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-31', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">daylight</tt><tt class="py-op">:</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt id="link-32" class="py-name" targets="Variable psycopg2.tz.DSTOFFSET=psycopg2.tz-module.html#DSTOFFSET"><a title="psycopg2.tz.DSTOFFSET" class="py-name" href="#" onclick="return doclink('link-32', 'DSTOFFSET', 'link-32');">DSTOFFSET</a></tt> <tt class="py-op">=</tt> <tt id="link-33" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-33', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-34', 'seconds', 'link-16');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt id="link-35" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-35', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">altzone</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt id="link-36" class="py-name"><a title="psycopg2.tz.DSTOFFSET" class="py-name" href="#" onclick="return doclink('link-36', 'DSTOFFSET', 'link-32');">DSTOFFSET</a></tt> <tt class="py-op">=</tt> <tt id="link-37" class="py-name"><a title="psycopg2.tz.STDOFFSET" class="py-name" href="#" onclick="return doclink('link-37', 'STDOFFSET', 'link-27');">STDOFFSET</a></tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt id="link-38" class="py-name" targets="Variable psycopg2.tz.DSTDIFF=psycopg2.tz-module.html#DSTDIFF"><a title="psycopg2.tz.DSTDIFF" class="py-name" href="#" onclick="return doclink('link-38', 'DSTDIFF', 'link-38');">DSTDIFF</a></tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="psycopg2.tz.DSTOFFSET" class="py-name" href="#" onclick="return doclink('link-39', 'DSTOFFSET', 'link-32');">DSTOFFSET</a></tt> <tt class="py-op">-</tt> <tt id="link-40" class="py-name"><a title="psycopg2.tz.STDOFFSET" class="py-name" href="#" onclick="return doclink('link-40', 'STDOFFSET', 'link-27');">STDOFFSET</a></tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"> </tt>
<a name="LocalTimezone"></a><div id="LocalTimezone-def"><a name="L69"></a><tt class="py-lineno"> 69</tt> <a class="py-toggle" href="#" id="LocalTimezone-toggle" onclick="return toggle('LocalTimezone');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="psycopg2.tz.LocalTimezone-class.html">LocalTimezone</a><tt class="py-op">(</tt><tt class="py-base-class">datetime</tt><tt class="py-op">.</tt><tt class="py-base-class">tzinfo</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalTimezone-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="LocalTimezone-expanded"><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">    <tt class="py-docstring">"""Platform idea of local timezone.</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">    This is the exact implementation from the Pyhton 2.3 documentation.</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">     </tt>
<a name="LocalTimezone.utcoffset"></a><div id="LocalTimezone.utcoffset-def"><a name="L75"></a><tt class="py-lineno"> 75</tt> <a class="py-toggle" href="#" id="LocalTimezone.utcoffset-toggle" onclick="return toggle('LocalTimezone.utcoffset');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.LocalTimezone-class.html#utcoffset">utcoffset</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalTimezone.utcoffset-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="LocalTimezone.utcoffset-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_isdst</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-41" class="py-name"><a title="psycopg2.tz.DSTOFFSET" class="py-name" href="#" onclick="return doclink('link-41', 'DSTOFFSET', 'link-32');">DSTOFFSET</a></tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-42" class="py-name"><a title="psycopg2.tz.STDOFFSET" class="py-name" href="#" onclick="return doclink('link-42', 'STDOFFSET', 'link-27');">STDOFFSET</a></tt> </tt>
</div><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"> </tt>
<a name="LocalTimezone.dst"></a><div id="LocalTimezone.dst-def"><a name="L81"></a><tt class="py-lineno"> 81</tt> <a class="py-toggle" href="#" id="LocalTimezone.dst-toggle" onclick="return toggle('LocalTimezone.dst');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.LocalTimezone-class.html#dst">dst</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalTimezone.dst-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="LocalTimezone.dst-expanded"><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_isdst</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-43" class="py-name"><a title="psycopg2.tz.DSTDIFF" class="py-name" href="#" onclick="return doclink('link-43', 'DSTDIFF', 'link-38');">DSTDIFF</a></tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-44" class="py-name"><a title="psycopg2.tz.ZERO" class="py-name" href="#" onclick="return doclink('link-44', 'ZERO', 'link-2');">ZERO</a></tt> </tt>
</div><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"> </tt>
<a name="LocalTimezone.tzname"></a><div id="LocalTimezone.tzname-def"><a name="L87"></a><tt class="py-lineno"> 87</tt> <a class="py-toggle" href="#" id="LocalTimezone.tzname-toggle" onclick="return toggle('LocalTimezone.tzname');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.LocalTimezone-class.html#tzname">tzname</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalTimezone.tzname-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="LocalTimezone.tzname-expanded"><a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-45" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-45', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">tzname</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_isdst</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
</div><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"> </tt>
<a name="LocalTimezone._isdst"></a><div id="LocalTimezone._isdst-def"><a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="LocalTimezone._isdst-toggle" onclick="return toggle('LocalTimezone._isdst');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="psycopg2.tz.LocalTimezone-class.html#_isdst">_isdst</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalTimezone._isdst-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="LocalTimezone._isdst-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">tt</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Method web2py.gluon.dal.Expression.year()=web2py.gluon.dal.Expression-class.html#year"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-46', 'year', 'link-46');">year</a></tt><tt class="py-op">,</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name" targets="Method web2py.gluon.dal.Expression.month()=web2py.gluon.dal.Expression-class.html#month"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-47', 'month', 'link-47');">month</a></tt><tt class="py-op">,</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name" targets="Method web2py.gluon.dal.Expression.day()=web2py.gluon.dal.Expression-class.html#day"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-48', 'day', 'link-48');">day</a></tt><tt class="py-op">,</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">              <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name" targets="Method web2py.gluon.dal.Expression.hour()=web2py.gluon.dal.Expression-class.html#hour"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-49', 'hour', 'link-49');">hour</a></tt><tt class="py-op">,</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">,</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">second</tt><tt class="py-op">,</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">              <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">weekday</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">stamp</tt> <tt class="py-op">=</tt> <tt id="link-50" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-50', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">mktime</tt><tt class="py-op">(</tt><tt class="py-name">tt</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-name">tt</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-51', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">localtime</tt><tt class="py-op">(</tt><tt class="py-name">stamp</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">tt</tt><tt class="py-op">.</tt><tt class="py-name">tm_isdst</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt> </tt>
</div></div><a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt id="link-52" class="py-name" targets="Variable psycopg2.tz.LOCAL=psycopg2.tz-module.html#LOCAL"><a title="psycopg2.tz.LOCAL" class="py-name" href="#" onclick="return doclink('link-52', 'LOCAL', 'link-52');">LOCAL</a></tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name" targets="Class psycopg2.tz.LocalTimezone=psycopg2.tz.LocalTimezone-class.html"><a title="psycopg2.tz.LocalTimezone" class="py-name" href="#" onclick="return doclink('link-53', 'LocalTimezone', 'link-53');">LocalTimezone</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-comment"># TODO: pre-generate some interesting time zones?</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.tz.FixedOffsetTimezone-class.html version [3eba9aaaca].

































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.tz.FixedOffsetTimezone</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        tz ::
        FixedOffsetTimezone ::
        Class&nbsp;FixedOffsetTimezone
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.tz.FixedOffsetTimezone-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FixedOffsetTimezone</h1><span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
     object --+    
              |    
datetime.tzinfo --+
                  |
                 <strong class="uidshort">FixedOffsetTimezone</strong>
</pre>

<hr />
<p>Fixed offset in minutes east from UTC.</p>
  This is exactly the implementation found in Python 2.3.x 
  documentation, with a small change to the __init__ method to allow for 
  pickling and a default name in the form 'sHH:MM' ('s' is the sign.)<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.FixedOffsetTimezone-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">offset</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.FixedOffsetTimezone-class.html#dst" class="summary-sig-name">dst</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      datetime -&gt; DST offset in minutes east of UTC.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.dst">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.FixedOffsetTimezone-class.html#tzname" class="summary-sig-name">tzname</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      datetime -&gt; string name of time zone.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.tzname">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.FixedOffsetTimezone-class.html#utcoffset" class="summary-sig-name">utcoffset</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      datetime -&gt; minutes east of UTC (negative for west of UTC).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.utcoffset">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>datetime.tzinfo</code></b>:
      <code>__getattribute__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>fromutc</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__hash__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_name"></a><span class="summary-name">_name</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_offset"></a><span class="summary-name">_offset</span> = <code title="datetime.timedelta(0)">datetime.timedelta(0)</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">offset</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">name</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="dst"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">dst</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.dst">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  datetime -&gt; DST offset in minutes east of UTC.
  <dl class="fields">
    <dt>Overrides:
      datetime.tzinfo.dst
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="tzname"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">tzname</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.tzname">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  datetime -&gt; string name of time zone.
  <dl class="fields">
    <dt>Overrides:
      datetime.tzinfo.tzname
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="utcoffset"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">utcoffset</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#FixedOffsetTimezone.utcoffset">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  datetime -&gt; minutes east of UTC (negative for west of UTC).
  <dl class="fields">
    <dt>Overrides:
      datetime.tzinfo.utcoffset
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/psycopg2.tz.LocalTimezone-class.html version [654c1e9c12].


































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2.tz.LocalTimezone</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        psycopg2 ::
        tz ::
        LocalTimezone ::
        Class&nbsp;LocalTimezone
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="psycopg2.tz.LocalTimezone-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class LocalTimezone</h1><span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
     object --+    
              |    
datetime.tzinfo --+
                  |
                 <strong class="uidshort">LocalTimezone</strong>
</pre>

<hr />
<p>Platform idea of local timezone.</p>
  This is the exact implementation from the Pyhton 2.3 
  documentation.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_isdst"></a><span class="summary-sig-name">_isdst</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone._isdst">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.LocalTimezone-class.html#dst" class="summary-sig-name">dst</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      datetime -&gt; DST offset in minutes east of UTC.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone.dst">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.LocalTimezone-class.html#tzname" class="summary-sig-name">tzname</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      datetime -&gt; string name of time zone.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone.tzname">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="psycopg2.tz.LocalTimezone-class.html#utcoffset" class="summary-sig-name">utcoffset</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      datetime -&gt; minutes east of UTC (negative for west of UTC).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone.utcoffset">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>datetime.tzinfo</code></b>:
      <code>__getattribute__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>fromutc</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="dst"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">dst</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone.dst">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  datetime -&gt; DST offset in minutes east of UTC.
  <dl class="fields">
    <dt>Overrides:
      datetime.tzinfo.dst
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="tzname"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">tzname</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone.tzname">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  datetime -&gt; string name of time zone.
  <dl class="fields">
    <dt>Overrides:
      datetime.tzinfo.tzname
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="utcoffset"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">utcoffset</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="psycopg2.tz-pysrc.html#LocalTimezone.utcoffset">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  datetime -&gt; minutes east of UTC (negative for west of UTC).
  <dl class="fields">
    <dt>Overrides:
      datetime.tzinfo.utcoffset
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/redirect.html version [56928789d6].







































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<html><head><title>Epydoc Redirect Page</title>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>
<body>
<script type="text/javascript">
<!--
var pages = ["web2py.gluon.custom_import._Web2pyDateTrackerImporter-c", "web2py.gluon.contrib.pymysql.err.NotSupportedError-c", "web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-m", "web2py.gluon.contrib.pymysql.err.OperationalError-c", "web2py.gluon.contrib.pymysql.err.ProgrammingError-c", "web2py.gluon.contrib.pymysql.err.IntegrityError-c", "web2py.gluon.contrib.pymysql.err.InterfaceError-c", "web2py.gluon.custom_import._DateTrackerImporter-c", "web2py.gluon.contrib.pymysql.err.DatabaseError-c", "web2py.gluon.contrib.pymysql.err.InternalError-c", "web2py.gluon.validators.IS_DATETIME_IN_RANGE-c", "web2py.gluon.tools.Service.JsonRpcException-c", "web2py.gluon.validators.IS_DECIMAL_IN_RANGE-c", "web2py.gluon.contrib.pymysql.err.DataError-c", "web2py.gluon.custom_import._Web2pyImporter-c", "web2py.gluon.sqlhtml.MultipleOptionsWidget-c", "web2py.gluon.validators.IS_UPLOAD_FILENAME-c", "web2py.gluon.validators.IS_FLOAT_IN_RANGE-c", "web2py.gluon.contrib.pymysql.err.Warning-c", "web2py.gluon.custom_import._BaseImporter-c", "web2py.gluon.dal.FireBirdEmbeddedAdapter-c", "web2py.gluon.validators.IS_DATE_IN_RANGE-c", "web2py.gluon.contrib.pymysql.converters-m", "web2py.gluon.dal.GoogleDatastoreAdapter-c", "web2py.gluon.restricted.RestrictedError-c", "web2py.gluon.sqlhtml.AutocompleteWidget-c", "web2py.gluon.validators.IS_ALPHANUMERIC-c", "web2py.gluon.validators.IS_INT_IN_RANGE-c", "web2py.gluon.contrib.pymysql.constants-m", "web2py.gluon.contrib.pymysql.err.Error-c", "web2py.gluon.dal.JDBCPostgreSQLAdapter-c", "web2py.gluon.dal.UseDatabaseStoredFile-c", "web2py.gluon.validators.IS_GENERIC_URL-c", "web2py.gluon.contrib.pymysql.DBAPISet-c", "web2py.gluon.dal.IngresUnicodeAdapter-c", "web2py.gluon.restricted.TicketStorage-c", "web2py.gluon.sqlhtml.CheckboxesWidget-c", "web2py.gluon.winservice.Web2pyService-c", "web2py.gluon.template.TemplateParser-c", "web2py.gluon.validators.IS_IN_SUBSET-c", "web2py.gluon.validators.IS_NOT_EMPTY-c", "web2py.gluon.validators.IS_NOT_IN_DB-c", "web2py.gluon.compileapp.LoadFactory-c", "web2py.gluon.dal.DatabaseStoredFile-c", "web2py.gluon.dal.GAEDecimalProperty-c", "web2py.gluon.sqlhtml.DatetimeWidget-c", "web2py.gluon.sqlhtml.PasswordWidget-c", "web2py.gluon.validators.IS_DATETIME-c", "web2py.gluon.validators.IS_EMPTY_OR-c", "web2py.gluon.validators.IS_EQUAL_TO-c", "web2py.gluon.validators.IS_HTTP_URL-c", "web2py.gluon.reserved_sql_keywords-m", "web2py.gluon.dal.JDBCSQLiteAdapter-c", "web2py.gluon.dal.PostgreSQLAdapter-c", "web2py.gluon.highlight.Highlighter-c", "web2py.gluon.html.web2pyHTMLParser-c", "web2py.gluon.sqlhtml.BooleanWidget-c", "web2py.gluon.sqlhtml.DecimalWidget-c", "web2py.gluon.sqlhtml.IntegerWidget-c", "web2py.gluon.sqlhtml.OptionsWidget-c", "web2py.gluon.tools.Mail.Attachment-c", "web2py.gluon.validators.IS_LIST_OF-c", "web2py.gluon.compileapp.mybuiltin-c", "web2py.gluon.dal.GoogleSQLAdapter-c", "web2py.gluon.languages.translator-c", "web2py.gluon.newcron.cronlauncher-c", "web2py.gluon.rocket.ChunkedReader-c", "web2py.gluon.rocket.SocketTimeout-c", "web2py.gluon.sanitizer.XssCleaner-c", "web2py.gluon.sqlhtml.DoubleWidget-c", "web2py.gluon.sqlhtml.StringWidget-c", "web2py.gluon.sqlhtml.UploadWidget-c", "web2py.gluon.validators.IS_IN_SET-c", "web2py.gluon.validators.IS_LENGTH-c", "web2py.gluon.validators.IS_STRONG-c", "web2py.gluon.validators.Validator-c", "web2py.gluon.cache.CacheAbstract-c", "web2py.gluon.dal.FireBirdAdapter-c", "web2py.gluon.dal.InformixAdapter-c", "web2py.gluon.dal.SQLCallableList-c", "web2py.gluon.dal.TeradataAdapter-c", "web2py.gluon.rocket.SocketClosed-c", "web2py.gluon.sqlhtml.RadioWidget-c", "web2py.gluon.storage.StorageList-c", "web2py.gluon.tools.PluginManager-c", "web2py.gluon.validators.IS_EMAIL-c", "web2py.gluon.validators.IS_IMAGE-c", "web2py.gluon.validators.IS_IN_DB-c", "web2py.gluon.validators.IS_LOWER-c", "web2py.gluon.validators.IS_MATCH-c", "web2py.gluon.validators.IS_UPPER-c", "web2py.gluon.widget.web2pyDialog-c", "psycopg2.tz.FixedOffsetTimezone-c", "web2py.gluon.dal.ConnectionPool-c", "web2py.gluon.dal.CouchDBAdapter-c", "web2py.gluon.dal.MongoDBAdapter-c", "web2py.gluon.rocket.FileWrapper-c", "web2py.gluon.rocket.NullHandler-c", "web2py.gluon.sqlhtml.DateWidget-c", "web2py.gluon.sqlhtml.FormWidget-c", "web2py.gluon.sqlhtml.ListWidget-c", "web2py.gluon.sqlhtml.TextWidget-c", "web2py.gluon.sqlhtml.TimeWidget-c", "web2py.gluon.template.BlockNode-c", "web2py.gluon.template.SuperNode-c", "web2py.gluon.validators.CLEANUP-c", "web2py.gluon.validators.IS_DATE-c", "web2py.gluon.validators.IS_EXPR-c", "web2py.gluon.validators.IS_IPV4-c", "web2py.gluon.validators.IS_SLUG-c", "web2py.gluon.validators.IS_TIME-c", "web2py.gluon.winservice.Service-c", "web2py.gluon.cache.CacheOnDisk-c", "web2py.gluon.dal.CubridAdapter-c", "web2py.gluon.dal.IngresAdapter-c", "web2py.gluon.dal.MSSQL2Adapter-c", "web2py.gluon.dal.OracleAdapter-c", "web2py.gluon.dal.SQLCustomType-c", "web2py.gluon.dal.SQLiteAdapter-c", "web2py.gluon.html.XmlComponent-c", "web2py.gluon.rewrite.MapUrlOut-c", "web2py.gluon.rocket.BadRequest-c", "web2py.gluon.rocket.Connection-c", "web2py.gluon.rocket.ThreadPool-c", "web2py.gluon.rocket.WSGIWorker-c", "web2py.gluon.validators.IS_URL-c", "web2py.gluon.cache.CacheInRam-c", "web2py.gluon.dal.MSSQLAdapter-c", "web2py.gluon.dal.MySQLAdapter-c", "web2py.gluon.dal.NoSQLAdapter-c", "web2py.gluon.dal.SAPDBAdapter-c", "web2py.gluon.globals.Response-c", "web2py.gluon.newcron.hardcron-c", "web2py.gluon.newcron.softcron-c", "web2py.gluon.rewrite.MapUrlIn-c", "web2py.gluon.sqlhtml.SQLTABLE-c", "web2py.gluon.storage.Messages-c", "web2py.gluon.storage.Settings-c", "web2py.gluon.template.Content-c", "web2py.gluon.validators.CRYPT-c", "web2py.gluon.contrib.pymysql-m", "web2py.gluon.dal.BaseAdapter-c", "web2py.gluon.globals.Request-c", "web2py.gluon.globals.Session-c", "web2py.gluon.languages.lazyT-c", "web2py.gluon.main.HttpServer-c", "web2py.gluon.newcron.extcron-c", "web2py.gluon.rocket.Listener-c", "web2py.gluon.rocket.SSLError-c", "web2py.gluon.sqlhtml.SQLFORM-c", "web2py.gluon.storage.Storage-c", "web2py.gluon.tools.Recaptcha-c", "web2py.gluon.dal.DB2Adapter-c", "web2py.gluon.dal.Expression-c", "web2py.gluon.rocket.Headers-c", "web2py.gluon.rocket.Monitor-c", "web2py.gluon.custom_import-m", "psycopg2.NotSupportedError-c", "web2py.gluon.dal.Reference-c", "web2py.gluon.html.BEAUTIFY-c", "web2py.gluon.html.COLGROUP-c", "web2py.gluon.html.FIELDSET-c", "web2py.gluon.html.OPTGROUP-c", "web2py.gluon.html.TEXTAREA-c", "web2py.gluon.newcron.Token-c", "web2py.gluon.rocket.Rocket-c", "web2py.gluon.rocket.Worker-c", "web2py.gluon.template.Node-c", "web2py.gluon.tools.Service-c", "psycopg2.OperationalError-c", "psycopg2.ProgrammingError-c", "psycopg2.tz.LocalTimezone-c", "web2py.gluon.html.MARKMIN-c", "web2py.gluon.html.__TAG__-c", "web2py.gluon.storage.List-c", "web2py.gluon.contenttype-m", "web2py.gluon.portalocker-m", "web2py.gluon.serializers-m", "web2py.gluon.cache.Cache-c", "web2py.gluon.html.BUTTON-c", "web2py.gluon.html.CENTER-c", "web2py.gluon.html.IFRAME-c", "web2py.gluon.html.LEGEND-c", "web2py.gluon.html.OBJECT-c", "web2py.gluon.html.OPTION-c", "web2py.gluon.html.SCRIPT-c", "web2py.gluon.html.SELECT-c", "web2py.gluon.compileapp-m", "web2py.gluon.import_all-m", "web2py.gluon.restricted-m", "web2py.gluon.validators-m", "web2py.gluon.winservice-m", "psycopg2.IntegrityError-c", "psycopg2.InterfaceError-c", "web2py.gluon.dal.SQLALL-c", "web2py.gluon.debug.Pipe-c", "web2py.gluon.html.EMBED-c", "web2py.gluon.html.INPUT-c", "web2py.gluon.html.LABEL-c", "web2py.gluon.html.STYLE-c", "web2py.gluon.html.TABLE-c", "web2py.gluon.html.TBODY-c", "web2py.gluon.html.TFOOT-c", "web2py.gluon.html.THEAD-c", "web2py.gluon.html.TITLE-c", "web2py.gluon.html.XHTML-c", "web2py.gluon.tools.Auth-c", "web2py.gluon.tools.Crud-c", "web2py.gluon.tools.Mail-c", "web2py.gluon.fileutils-m", "web2py.gluon.highlight-m", "web2py.gluon.languages-m", "web2py.gluon.sanitizer-m", "psycopg2.DatabaseError-c", "psycopg2.InternalError-c", "web2py.gluon.dal.Field-c", "web2py.gluon.dal.Query-c", "web2py.gluon.dal.Table-c", "web2py.gluon.html.BODY-c", "web2py.gluon.html.CODE-c", "web2py.gluon.html.FORM-c", "web2py.gluon.html.HEAD-c", "web2py.gluon.html.HTML-c", "web2py.gluon.html.LINK-c", "web2py.gluon.html.MENU-c", "web2py.gluon.html.META-c", "web2py.gluon.html.SPAN-c", "web2py.gluon.http.HTTP-c", "web2py.gluon.widget.IO-c", "web2py.gluon.settings-m", "web2py.gluon.streamer-m", "web2py.gluon.template-m", "web2py.gluon.dal.GAEF-c", "web2py.gluon.dal.Rows-c", "web2py.gluon.html.CAT-c", "web2py.gluon.html.COL-c", "web2py.gluon.html.DIV-c", "web2py.gluon.html.IMG-c", "web2py.gluon.html.PRE-c", "web2py.gluon.html.XML-c", "web2py.gluon.decoder-m", "web2py.gluon.globals-m", "web2py.gluon.myregex-m", "web2py.gluon.newcron-m", "web2py.gluon.rewrite-m", "web2py.gluon.sqlhtml-m", "web2py.gluon.storage-m", "exceptions.Exception-c", "web2py.gluon.dal.DAL-c", "web2py.gluon.dal.Row-c", "web2py.gluon.dal.Set-c", "web2py.gluon.html.BR-c", "web2py.gluon.html.EM-c", "web2py.gluon.html.H1-c", "web2py.gluon.html.H2-c", "web2py.gluon.html.H3-c", "web2py.gluon.html.H4-c", "web2py.gluon.html.H5-c", "web2py.gluon.html.H6-c", "web2py.gluon.html.HR-c", "web2py.gluon.html.LI-c", "web2py.gluon.html.OL-c", "web2py.gluon.html.TD-c", "web2py.gluon.html.TH-c", "web2py.gluon.html.TR-c", "web2py.gluon.html.TT-c", "web2py.gluon.html.UL-c", "web2py.gluon.rocket-m", "web2py.gluon.widget-m", "web2py.gluon.xmlrpc-m", "web2py.gluon.html.A-c", "web2py.gluon.html.B-c", "web2py.gluon.html.I-c", "web2py.gluon.html.P-c", "web2py.gluon.admin-m", "web2py.gluon.cache-m", "web2py.gluon.debug-m", "web2py.gluon.shell-m", "web2py.gluon.tools-m", "web2py.gluon.utils-m", "psycopg2.DataError-c", "web2py.gluon.html-m", "web2py.gluon.http-m", "web2py.gluon.main-m", "datetime.datetime-c", "web2py.gluon.cfs-m", "web2py.gluon.dal-m", "web2py.gluon.sql-m", "psycopg2.Warning-c", "sqlite3.dbapi2-m", "psycopg2.Error-c", "datetime.date-c", "datetime.time-c", "web2py.gluon-m", "psycopg2.tz-m", "psycopg2-m"];
var dottedName = get_anchor();
if (dottedName) {
    var target = redirect_url(dottedName);
    if (target) window.location.replace(target);
}
// -->
</script>

<h3>Epydoc Auto-redirect page</h3>

<p>When javascript is enabled, this page will redirect URLs of
the form <tt>redirect.html#<i>dotted.name</i></tt> to the
documentation for the object with the given fully-qualified
dotted name.</p>
<p><a id="message"> &nbsp; </a></p>

<script type="text/javascript">
<!--
if (dottedName) {
    var msg = document.getElementById("message");
    msg.innerHTML = "No documentation found for <tt>"+
                    dottedName+"</tt>";
}
// -->
</script>

</body>
</html>

Added applications/examples/static/epydoc/sqlite3.dbapi2-module.html version [57e6fdf38d].














































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>sqlite3.dbapi2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;sqlite3 ::
        Module&nbsp;dbapi2
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="sqlite3.dbapi2-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module dbapi2</h1><span class="codelink"><a href="sqlite3.dbapi2-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>PyMySQL: A pure-Python drop-in replacement for MySQLdb.</p>
  <p>Copyright (c) 2010 PyMySQL contributors</p>
  <p>Permission is hereby granted, free of charge, to any person obtaining 
  a copy of this software and associated documentation files (the 
  &quot;Software&quot;), 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:</p>
  <p>The above copyright notice and this permission notice shall be 
  included in all copies or substantial portions of the Software.</p>
  THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="DateFromTicks"></a><span class="summary-sig-name">DateFromTicks</span>(<span class="summary-sig-arg">ticks</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="sqlite3.dbapi2-pysrc.html#DateFromTicks">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="TimeFromTicks"></a><span class="summary-sig-name">TimeFromTicks</span>(<span class="summary-sig-arg">ticks</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="sqlite3.dbapi2-pysrc.html#TimeFromTicks">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="TimestampFromTicks"></a><span class="summary-sig-name">TimestampFromTicks</span>(<span class="summary-sig-arg">ticks</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="sqlite3.dbapi2-pysrc.html#TimestampFromTicks">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="PARSE_COLNAMES"></a><span class="summary-name">PARSE_COLNAMES</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="PARSE_DECLTYPES"></a><span class="summary-name">PARSE_DECLTYPES</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_ALTER_TABLE"></a><span class="summary-name">SQLITE_ALTER_TABLE</span> = <code title="26">26</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_ANALYZE"></a><span class="summary-name">SQLITE_ANALYZE</span> = <code title="28">28</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_ATTACH"></a><span class="summary-name">SQLITE_ATTACH</span> = <code title="24">24</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_INDEX"></a><span class="summary-name">SQLITE_CREATE_INDEX</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_TABLE"></a><span class="summary-name">SQLITE_CREATE_TABLE</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_TEMP_INDEX"></a><span class="summary-name">SQLITE_CREATE_TEMP_INDEX</span> = <code title="3">3</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_TEMP_TABLE"></a><span class="summary-name">SQLITE_CREATE_TEMP_TABLE</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_TEMP_TRIGGER"></a><span class="summary-name">SQLITE_CREATE_TEMP_TRIGGER</span> = <code title="5">5</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_TEMP_VIEW"></a><span class="summary-name">SQLITE_CREATE_TEMP_VIEW</span> = <code title="6">6</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_TRIGGER"></a><span class="summary-name">SQLITE_CREATE_TRIGGER</span> = <code title="7">7</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_CREATE_VIEW"></a><span class="summary-name">SQLITE_CREATE_VIEW</span> = <code title="8">8</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DELETE"></a><span class="summary-name">SQLITE_DELETE</span> = <code title="9">9</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DENY"></a><span class="summary-name">SQLITE_DENY</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DETACH"></a><span class="summary-name">SQLITE_DETACH</span> = <code title="25">25</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_INDEX"></a><span class="summary-name">SQLITE_DROP_INDEX</span> = <code title="10">10</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_TABLE"></a><span class="summary-name">SQLITE_DROP_TABLE</span> = <code title="11">11</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_TEMP_INDEX"></a><span class="summary-name">SQLITE_DROP_TEMP_INDEX</span> = <code title="12">12</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_TEMP_TABLE"></a><span class="summary-name">SQLITE_DROP_TEMP_TABLE</span> = <code title="13">13</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_TEMP_TRIGGER"></a><span class="summary-name">SQLITE_DROP_TEMP_TRIGGER</span> = <code title="14">14</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_TEMP_VIEW"></a><span class="summary-name">SQLITE_DROP_TEMP_VIEW</span> = <code title="15">15</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_TRIGGER"></a><span class="summary-name">SQLITE_DROP_TRIGGER</span> = <code title="16">16</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_DROP_VIEW"></a><span class="summary-name">SQLITE_DROP_VIEW</span> = <code title="17">17</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_IGNORE"></a><span class="summary-name">SQLITE_IGNORE</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_INSERT"></a><span class="summary-name">SQLITE_INSERT</span> = <code title="18">18</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_OK"></a><span class="summary-name">SQLITE_OK</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_PRAGMA"></a><span class="summary-name">SQLITE_PRAGMA</span> = <code title="19">19</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_READ"></a><span class="summary-name">SQLITE_READ</span> = <code title="20">20</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_REINDEX"></a><span class="summary-name">SQLITE_REINDEX</span> = <code title="27">27</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_SELECT"></a><span class="summary-name">SQLITE_SELECT</span> = <code title="21">21</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_TRANSACTION"></a><span class="summary-name">SQLITE_TRANSACTION</span> = <code title="22">22</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SQLITE_UPDATE"></a><span class="summary-name">SQLITE_UPDATE</span> = <code title="23">23</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="sqlite3.dbapi2-module.html#adapters" class="summary-name">adapters</a> = <code title="{(&lt;type 'datetime.date'&gt;, &lt;type 'sqlite3.PrepareProtocol'&gt;): &lt;function\
 adapt_date at 0xd25578&gt;,
 (&lt;type 'datetime.datetime'&gt;, &lt;type 'sqlite3.PrepareProtocol'&gt;): &lt;func\
tion adapt_datetime at 0xd255f0&gt;}"><code class="variable-group">{</code><code class="variable-group">(</code>&lt;type 'datetime.date'&gt;<code class="variable-op">, </code>&lt;type 'sqlite3.PreparePro<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="apilevel"></a><span class="summary-name">apilevel</span> = <code title="'2.0'"><code class="variable-quote">'</code><code class="variable-string">2.0</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="sqlite3.dbapi2-module.html#converters" class="summary-name">converters</a> = <code title="{'DATE': &lt;function convert_date at 0xd25668&gt;,
 'TIMESTAMP': &lt;function convert_timestamp at 0xd256e0&gt;}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;function convert_date at 0xd25668&gt;<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">TI</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="paramstyle"></a><span class="summary-name">paramstyle</span> = <code title="'qmark'"><code class="variable-quote">'</code><code class="variable-string">qmark</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="sqlite_version"></a><span class="summary-name">sqlite_version</span> = <code title="'3.4.2'"><code class="variable-quote">'</code><code class="variable-string">3.4.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="sqlite_version_info"></a><span class="summary-name">sqlite_version_info</span> = <code title="(3, 4, 2)"><code class="variable-group">(</code>3<code class="variable-op">, </code>4<code class="variable-op">, </code>2<code class="variable-group">)</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="threadsafety"></a><span class="summary-name">threadsafety</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="version"></a><span class="summary-name">version</span> = <code title="'2.3.2'"><code class="variable-quote">'</code><code class="variable-string">2.3.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="version_info"></a><span class="summary-name">version_info</span> = <code title="(2, 3, 2)"><code class="variable-group">(</code>2<code class="variable-op">, </code>3<code class="variable-op">, </code>2<code class="variable-group">)</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="x"></a><span class="summary-name">x</span> = <code title="'2'"><code class="variable-quote">'</code><code class="variable-string">2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="adapters"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">adapters</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-group">(</code>&lt;type 'datetime.date'&gt;<code class="variable-op">, </code>&lt;type 'sqlite3.PrepareProtocol'&gt;<code class="variable-group">)</code><code class="variable-op">: </code>&lt;function<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 adapt_date at 0xd25578&gt;<code class="variable-op">,</code>
 <code class="variable-group">(</code>&lt;type 'datetime.datetime'&gt;<code class="variable-op">, </code>&lt;type 'sqlite3.PrepareProtocol'&gt;<code class="variable-group">)</code><code class="variable-op">: </code>&lt;func<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
tion adapt_datetime at 0xd255f0&gt;<code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="converters"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">converters</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;function convert_date at 0xd25668&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">TIMESTAMP</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;function convert_timestamp at 0xd256e0&gt;<code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/sqlite3.dbapi2-pysrc.html version [85bf49c164].


























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>sqlite3.dbapi2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;sqlite3 ::
        Module&nbsp;dbapi2
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="sqlite3.dbapi2-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="sqlite3.dbapi2-module.html">Module sqlite3.dbapi2</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#-*- coding: ISO-8859-1 -*-</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># pysqlite2/dbapi2.py: the DB-API 2.0 interface</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright (C) 2004-2005 Gerhard H&#228;ring &lt;gh@ghaering.de&gt;</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This file is part of pysqlite.</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This software is provided 'as-is', without any express or implied</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># warranty.  In no event will the authors be held liable for any damages</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># arising from the use of this software.</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Permission is granted to anyone to use this software for any purpose,</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># including commercial applications, and to alter it and redistribute it</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># freely, subject to the following restrictions:</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># 1. The origin of this software must not be misrepresented; you must not</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    claim that you wrote the original software. If you use this software</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    in a product, an acknowledgment in the product documentation would be</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    appreciated but is not required.</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># 2. Altered source versions must be plainly marked as such, and must not be</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    misrepresented as being the original software.</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># 3. This notice may not be removed or altered from any source distribution.</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1', 'time', 'link-1');">time</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">_sqlite3</tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable psycopg2.paramstyle=psycopg2-module.html#paramstyle,Variable sqlite3.dbapi2.paramstyle=sqlite3.dbapi2-module.html#paramstyle,Variable web2py.gluon.contrib.pymysql.paramstyle=web2py.gluon.contrib.pymysql-module.html#paramstyle"><a title="psycopg2.paramstyle
sqlite3.dbapi2.paramstyle
web2py.gluon.contrib.pymysql.paramstyle" class="py-name" href="#" onclick="return doclink('link-2', 'paramstyle', 'link-2');">paramstyle</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"qmark"</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable psycopg2.threadsafety=psycopg2-module.html#threadsafety,Variable sqlite3.dbapi2.threadsafety=sqlite3.dbapi2-module.html#threadsafety,Variable web2py.gluon.contrib.pymysql.threadsafety=web2py.gluon.contrib.pymysql-module.html#threadsafety"><a title="psycopg2.threadsafety
sqlite3.dbapi2.threadsafety
web2py.gluon.contrib.pymysql.threadsafety" class="py-name" href="#" onclick="return doclink('link-3', 'threadsafety', 'link-3');">threadsafety</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable psycopg2.apilevel=psycopg2-module.html#apilevel,Variable sqlite3.dbapi2.apilevel=sqlite3.dbapi2-module.html#apilevel,Variable web2py.gluon.contrib.pymysql.apilevel=web2py.gluon.contrib.pymysql-module.html#apilevel"><a title="psycopg2.apilevel
sqlite3.dbapi2.apilevel
web2py.gluon.contrib.pymysql.apilevel" class="py-name" href="#" onclick="return doclink('link-4', 'apilevel', 'link-4');">apilevel</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"2.0"</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"><tt class="py-name">Date</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-5', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Class datetime.date=datetime.date-class.html"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-6', 'date', 'link-6');">date</a></tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line"><tt class="py-name">Time</tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-7', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-8', 'time', 'link-1');">time</a></tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"><tt class="py-name">Timestamp</tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-9', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-10', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"> </tt>
<a name="DateFromTicks"></a><div id="DateFromTicks-def"><a name="L41"></a><tt class="py-lineno">41</tt> <a class="py-toggle" href="#" id="DateFromTicks-toggle" onclick="return toggle('DateFromTicks');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="sqlite3.dbapi2-module.html#DateFromTicks">DateFromTicks</a><tt class="py-op">(</tt><tt class="py-param">ticks</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DateFromTicks-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="DateFromTicks-expanded"><a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">apply</tt><tt class="py-op">(</tt><tt class="py-name">Date</tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-11', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">localtime</tt><tt class="py-op">(</tt><tt class="py-name">ticks</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line"> </tt>
<a name="TimeFromTicks"></a><div id="TimeFromTicks-def"><a name="L44"></a><tt class="py-lineno">44</tt> <a class="py-toggle" href="#" id="TimeFromTicks-toggle" onclick="return toggle('TimeFromTicks');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="sqlite3.dbapi2-module.html#TimeFromTicks">TimeFromTicks</a><tt class="py-op">(</tt><tt class="py-param">ticks</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TimeFromTicks-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="TimeFromTicks-expanded"><a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">apply</tt><tt class="py-op">(</tt><tt class="py-name">Time</tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-12', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">localtime</tt><tt class="py-op">(</tt><tt class="py-name">ticks</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"> </tt>
<a name="TimestampFromTicks"></a><div id="TimestampFromTicks-def"><a name="L47"></a><tt class="py-lineno">47</tt> <a class="py-toggle" href="#" id="TimestampFromTicks-toggle" onclick="return toggle('TimestampFromTicks');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="sqlite3.dbapi2-module.html#TimestampFromTicks">TimestampFromTicks</a><tt class="py-op">(</tt><tt class="py-param">ticks</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TimestampFromTicks-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="TimestampFromTicks-expanded"><a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">apply</tt><tt class="py-op">(</tt><tt class="py-name">Timestamp</tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-13', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">localtime</tt><tt class="py-op">(</tt><tt class="py-name">ticks</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line"><tt id="link-14" class="py-name" targets="Variable sqlite3.dbapi2.version_info=sqlite3.dbapi2-module.html#version_info,Variable web2py.gluon.contrib.pymysql.version_info=web2py.gluon.contrib.pymysql-module.html#version_info,Variable web2py.gluon.main.version_info=web2py.gluon.main-module.html#version_info"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-14', 'version_info', 'link-14');">version_info</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-15" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-15', 'x', 'link-15');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-16" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-16', 'x', 'link-15');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-17" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-17', 'version', 'link-17');">version</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"."</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable sqlite3.dbapi2.sqlite_version_info=sqlite3.dbapi2-module.html#sqlite_version_info"><a title="sqlite3.dbapi2.sqlite_version_info" class="py-name" href="#" onclick="return doclink('link-18', 'sqlite_version_info', 'link-18');">sqlite_version_info</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-19" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-19', 'x', 'link-15');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-20" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-20', 'x', 'link-15');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-21" class="py-name" targets="Variable sqlite3.dbapi2.sqlite_version=sqlite3.dbapi2-module.html#sqlite_version"><a title="sqlite3.dbapi2.sqlite_version" class="py-name" href="#" onclick="return doclink('link-21', 'sqlite_version', 'link-21');">sqlite_version</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"."</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line"> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line"><tt id="link-22" class="py-name" targets="Function web2py.gluon.contrib.pymysql.Binary()=web2py.gluon.contrib.pymysql-module.html#Binary"><a title="web2py.gluon.contrib.pymysql.Binary" class="py-name" href="#" onclick="return doclink('link-22', 'Binary', 'link-22');">Binary</a></tt> <tt class="py-op">=</tt> <tt class="py-name">buffer</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line"> </tt>
<a name="register_adapters_and_converters"></a><div id="register_adapters_and_converters-def"><a name="L55"></a><tt class="py-lineno">55</tt> <a class="py-toggle" href="#" id="register_adapters_and_converters-toggle" onclick="return toggle('register_adapters_and_converters');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="sqlite3.dbapi2-module.html#register_adapters_and_converters">register_adapters_and_converters</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="register_adapters_and_converters-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="register_adapters_and_converters-expanded"><a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">adapt_date</tt><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">isoformat</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">adapt_datetime</tt><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">isoformat</tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">)</tt> </tt>
</div><a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line"> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">convert_date</tt><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-23" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-23', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-24', 'date', 'link-6');">date</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"-"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">convert_timestamp</tt><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">        <tt class="py-name">datepart</tt><tt class="py-op">,</tt> <tt class="py-name">timepart</tt> <tt class="py-op">=</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">        <tt id="link-25" class="py-name" targets="Method web2py.gluon.dal.Expression.year()=web2py.gluon.dal.Expression-class.html#year"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-25', 'year', 'link-25');">year</a></tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name" targets="Method web2py.gluon.dal.Expression.month()=web2py.gluon.dal.Expression-class.html#month"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-26', 'month', 'link-26');">month</a></tt><tt class="py-op">,</tt> <tt id="link-27" class="py-name" targets="Method web2py.gluon.dal.Expression.day()=web2py.gluon.dal.Expression-class.html#day"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-27', 'day', 'link-27');">day</a></tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">datepart</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"-"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">        <tt class="py-name">timepart_full</tt> <tt class="py-op">=</tt> <tt class="py-name">timepart</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"."</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line">        <tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name" targets="Method web2py.gluon.dal.Expression.minutes()=web2py.gluon.dal.Expression-class.html#minutes"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-28', 'minutes', 'link-28');">minutes</a></tt><tt class="py-op">,</tt> <tt id="link-29" class="py-name" targets="Method web2py.gluon.dal.Expression.seconds()=web2py.gluon.dal.Expression-class.html#seconds"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-29', 'seconds', 'link-29');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">timepart_full</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">":"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-30" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-30', 'len', 'link-30');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">timepart_full</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">            <tt class="py-name">microseconds</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-string">"0."</tt> <tt class="py-op">+</tt> <tt class="py-name">timepart_full</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">1000000</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">            <tt class="py-name">microseconds</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line"> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line">        <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-31', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-32', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-33', 'year', 'link-25');">year</a></tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-34', 'month', 'link-26');">month</a></tt><tt class="py-op">,</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-35', 'day', 'link-27');">day</a></tt><tt class="py-op">,</tt> <tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt id="link-36" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-36', 'minutes', 'link-28');">minutes</a></tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-37', 'seconds', 'link-29');">seconds</a></tt><tt class="py-op">,</tt> <tt class="py-name">microseconds</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno">76</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
</div><a name="L77"></a><tt class="py-lineno">77</tt>  <tt class="py-line"> </tt>
<a name="L78"></a><tt class="py-lineno">78</tt>  <tt class="py-line"> </tt>
<a name="L79"></a><tt class="py-lineno">79</tt>  <tt class="py-line">    <tt class="py-name">register_adapter</tt><tt class="py-op">(</tt><tt id="link-38" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-38', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-39', 'date', 'link-6');">date</a></tt><tt class="py-op">,</tt> <tt class="py-name">adapt_date</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno">80</tt>  <tt class="py-line">    <tt class="py-name">register_adapter</tt><tt class="py-op">(</tt><tt id="link-40" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-40', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-41', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">,</tt> <tt class="py-name">adapt_datetime</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno">81</tt>  <tt class="py-line">    <tt class="py-name">register_converter</tt><tt class="py-op">(</tt><tt class="py-string">"date"</tt><tt class="py-op">,</tt> <tt id="link-42" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_date()=web2py.gluon.contrib.pymysql.converters-module.html#convert_date"><a title="web2py.gluon.contrib.pymysql.converters.convert_date" class="py-name" href="#" onclick="return doclink('link-42', 'convert_date', 'link-42');">convert_date</a></tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno">82</tt>  <tt class="py-line">    <tt class="py-name">register_converter</tt><tt class="py-op">(</tt><tt class="py-string">"timestamp"</tt><tt class="py-op">,</tt> <tt class="py-name">convert_timestamp</tt><tt class="py-op">)</tt> </tt>
</div><a name="L83"></a><tt class="py-lineno">83</tt>  <tt class="py-line"> </tt>
<a name="L84"></a><tt class="py-lineno">84</tt>  <tt class="py-line"><tt class="py-name">register_adapters_and_converters</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L85"></a><tt class="py-lineno">85</tt>  <tt class="py-line"> </tt>
<a name="L86"></a><tt class="py-lineno">86</tt>  <tt class="py-line"><tt class="py-comment"># Clean up namespace</tt> </tt>
<a name="L87"></a><tt class="py-lineno">87</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L88"></a><tt class="py-lineno">88</tt>  <tt class="py-line"><tt class="py-keyword">del</tt><tt class="py-op">(</tt><tt class="py-name">register_adapters_and_converters</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno">89</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/title.png version [4ed899302f].

cannot compute difference between binary files

Added applications/examples/static/epydoc/toc-everything.html version [8a9b5797c5].













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Everything</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Everything</h1>
<hr />
  <h2 class="toc">All Classes</h2>
    <a target="mainFrame" href="datetime.date-class.html"
     >datetime.date</a><br />    <a target="mainFrame" href="datetime.datetime-class.html"
     >datetime.datetime</a><br />    <a target="mainFrame" href="datetime.time-class.html"
     >datetime.time</a><br />    <a target="mainFrame" href="exceptions.Exception-class.html"
     >exceptions.Exception</a><br />    <a target="mainFrame" href="psycopg2.DataError-class.html"
     >psycopg2.DataError</a><br />    <a target="mainFrame" href="psycopg2.DatabaseError-class.html"
     >psycopg2.DatabaseError</a><br />    <a target="mainFrame" href="psycopg2.Error-class.html"
     >psycopg2.Error</a><br />    <a target="mainFrame" href="psycopg2.IntegrityError-class.html"
     >psycopg2.IntegrityError</a><br />    <a target="mainFrame" href="psycopg2.InterfaceError-class.html"
     >psycopg2.InterfaceError</a><br />    <a target="mainFrame" href="psycopg2.InternalError-class.html"
     >psycopg2.InternalError</a><br />    <a target="mainFrame" href="psycopg2.NotSupportedError-class.html"
     >psycopg2.NotSupportedError</a><br />    <a target="mainFrame" href="psycopg2.OperationalError-class.html"
     >psycopg2.OperationalError</a><br />    <a target="mainFrame" href="psycopg2.ProgrammingError-class.html"
     >psycopg2.ProgrammingError</a><br />    <a target="mainFrame" href="psycopg2.Warning-class.html"
     >psycopg2.Warning</a><br />    <a target="mainFrame" href="psycopg2.tz.FixedOffsetTimezone-class.html"
     >psycopg2.tz.FixedOffsetTimezone</a><br />    <a target="mainFrame" href="psycopg2.tz.LocalTimezone-class.html"
     >psycopg2.tz.LocalTimezone</a><br />    <a target="mainFrame" href="web2py.gluon.cache.Cache-class.html"
     >web2py.gluon.cache.Cache</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cache.CacheAbstract-class.html"
     >web2py.gluon.cache.CacheAbstract</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cache.CacheInRam-class.html"
     >web2py.gluon.cache.CacheInRam</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cache.CacheOnDisk-class.html"
     >web2py.gluon.cache.CacheOnDisk</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.compileapp.LoadFactory-class.html"
     >web2py.gluon.compileapp.LoadFactory</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp.mybuiltin-class.html"
     >web2py.gluon.compileapp.mybuiltin</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.DBAPISet-class.html"
     >web2py.gluon.contrib.pymysql.DBAPISet</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.DataError-class.html"
     >web2py.gluon.contrib.pymysql.err.DataError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html"
     >web2py.gluon.contrib.pymysql.err.DatabaseError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.Error-class.html"
     >web2py.gluon.contrib.pymysql.err.Error</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html"
     >web2py.gluon.contrib.pymysql.err.IntegrityError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html"
     >web2py.gluon.contrib.pymysql.err.InterfaceError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.InternalError-class.html"
     >web2py.gluon.contrib.pymysql.err.InternalError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html"
     >web2py.gluon.contrib.pymysql.err.NotSupportedError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html"
     >web2py.gluon.contrib.pymysql.err.OperationalError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html"
     >web2py.gluon.contrib.pymysql.err.ProgrammingError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.Warning-class.html"
     >web2py.gluon.contrib.pymysql.err.Warning</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._BaseImporter-class.html"
     >web2py.gluon.custom_import._BaseImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._DateTrackerImporter-class.html"
     >web2py.gluon.custom_import._DateTrackerImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html"
     >web2py.gluon.custom_import._Web2pyDateTrackerImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._Web2pyImporter-class.html"
     >web2py.gluon.custom_import._Web2pyImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.BaseAdapter-class.html"
     >web2py.gluon.dal.BaseAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.ConnectionPool-class.html"
     >web2py.gluon.dal.ConnectionPool</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.CouchDBAdapter-class.html"
     >web2py.gluon.dal.CouchDBAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.CubridAdapter-class.html"
     >web2py.gluon.dal.CubridAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DAL-class.html"
     >web2py.gluon.dal.DAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DB2Adapter-class.html"
     >web2py.gluon.dal.DB2Adapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DatabaseStoredFile-class.html"
     >web2py.gluon.dal.DatabaseStoredFile</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Expression-class.html"
     >web2py.gluon.dal.Expression</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Field-class.html"
     >web2py.gluon.dal.Field</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.FireBirdAdapter-class.html"
     >web2py.gluon.dal.FireBirdAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html"
     >web2py.gluon.dal.FireBirdEmbeddedAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GAEDecimalProperty-class.html"
     >web2py.gluon.dal.GAEDecimalProperty</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GAEF-class.html"
     >web2py.gluon.dal.GAEF</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html"
     >web2py.gluon.dal.GoogleDatastoreAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GoogleSQLAdapter-class.html"
     >web2py.gluon.dal.GoogleSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.InformixAdapter-class.html"
     >web2py.gluon.dal.InformixAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.IngresAdapter-class.html"
     >web2py.gluon.dal.IngresAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.IngresUnicodeAdapter-class.html"
     >web2py.gluon.dal.IngresUnicodeAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html"
     >web2py.gluon.dal.JDBCPostgreSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html"
     >web2py.gluon.dal.JDBCSQLiteAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MSSQL2Adapter-class.html"
     >web2py.gluon.dal.MSSQL2Adapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MSSQLAdapter-class.html"
     >web2py.gluon.dal.MSSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MongoDBAdapter-class.html"
     >web2py.gluon.dal.MongoDBAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MySQLAdapter-class.html"
     >web2py.gluon.dal.MySQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.NoSQLAdapter-class.html"
     >web2py.gluon.dal.NoSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.OracleAdapter-class.html"
     >web2py.gluon.dal.OracleAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.PostgreSQLAdapter-class.html"
     >web2py.gluon.dal.PostgreSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Query-class.html"
     >web2py.gluon.dal.Query</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Reference-class.html"
     >web2py.gluon.dal.Reference</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Row-class.html"
     >web2py.gluon.dal.Row</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Rows-class.html"
     >web2py.gluon.dal.Rows</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SAPDBAdapter-class.html"
     >web2py.gluon.dal.SAPDBAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLALL-class.html"
     >web2py.gluon.dal.SQLALL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLCallableList-class.html"
     >web2py.gluon.dal.SQLCallableList</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLCustomType-class.html"
     >web2py.gluon.dal.SQLCustomType</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLiteAdapter-class.html"
     >web2py.gluon.dal.SQLiteAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Set-class.html"
     >web2py.gluon.dal.Set</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Table-class.html"
     >web2py.gluon.dal.Table</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.TeradataAdapter-class.html"
     >web2py.gluon.dal.TeradataAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.UseDatabaseStoredFile-class.html"
     >web2py.gluon.dal.UseDatabaseStoredFile</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.debug.Pipe-class.html"
     >web2py.gluon.debug.Pipe</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals.Request-class.html"
     >web2py.gluon.globals.Request</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals.Response-class.html"
     >web2py.gluon.globals.Response</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals.Session-class.html"
     >web2py.gluon.globals.Session</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.highlight.Highlighter-class.html"
     >web2py.gluon.highlight.Highlighter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.A-class.html"
     >web2py.gluon.html.A</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.B-class.html"
     >web2py.gluon.html.B</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BEAUTIFY-class.html"
     >web2py.gluon.html.BEAUTIFY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BODY-class.html"
     >web2py.gluon.html.BODY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BR-class.html"
     >web2py.gluon.html.BR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BUTTON-class.html"
     >web2py.gluon.html.BUTTON</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.CAT-class.html"
     >web2py.gluon.html.CAT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.CENTER-class.html"
     >web2py.gluon.html.CENTER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.CODE-class.html"
     >web2py.gluon.html.CODE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.COL-class.html"
     >web2py.gluon.html.COL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.COLGROUP-class.html"
     >web2py.gluon.html.COLGROUP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.DIV-class.html"
     >web2py.gluon.html.DIV</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.EM-class.html"
     >web2py.gluon.html.EM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.EMBED-class.html"
     >web2py.gluon.html.EMBED</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.FIELDSET-class.html"
     >web2py.gluon.html.FIELDSET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.FORM-class.html"
     >web2py.gluon.html.FORM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H1-class.html"
     >web2py.gluon.html.H1</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H2-class.html"
     >web2py.gluon.html.H2</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H3-class.html"
     >web2py.gluon.html.H3</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H4-class.html"
     >web2py.gluon.html.H4</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H5-class.html"
     >web2py.gluon.html.H5</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H6-class.html"
     >web2py.gluon.html.H6</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.HEAD-class.html"
     >web2py.gluon.html.HEAD</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.HR-class.html"
     >web2py.gluon.html.HR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.HTML-class.html"
     >web2py.gluon.html.HTML</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.I-class.html"
     >web2py.gluon.html.I</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.IFRAME-class.html"
     >web2py.gluon.html.IFRAME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.IMG-class.html"
     >web2py.gluon.html.IMG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.INPUT-class.html"
     >web2py.gluon.html.INPUT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LABEL-class.html"
     >web2py.gluon.html.LABEL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LEGEND-class.html"
     >web2py.gluon.html.LEGEND</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LI-class.html"
     >web2py.gluon.html.LI</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LINK-class.html"
     >web2py.gluon.html.LINK</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.MARKMIN-class.html"
     >web2py.gluon.html.MARKMIN</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.MENU-class.html"
     >web2py.gluon.html.MENU</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.META-class.html"
     >web2py.gluon.html.META</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OBJECT-class.html"
     >web2py.gluon.html.OBJECT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OL-class.html"
     >web2py.gluon.html.OL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OPTGROUP-class.html"
     >web2py.gluon.html.OPTGROUP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OPTION-class.html"
     >web2py.gluon.html.OPTION</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.P-class.html"
     >web2py.gluon.html.P</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.PRE-class.html"
     >web2py.gluon.html.PRE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.SCRIPT-class.html"
     >web2py.gluon.html.SCRIPT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.SELECT-class.html"
     >web2py.gluon.html.SELECT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.SPAN-class.html"
     >web2py.gluon.html.SPAN</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.STYLE-class.html"
     >web2py.gluon.html.STYLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TABLE-class.html"
     >web2py.gluon.html.TABLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TBODY-class.html"
     >web2py.gluon.html.TBODY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TD-class.html"
     >web2py.gluon.html.TD</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TEXTAREA-class.html"
     >web2py.gluon.html.TEXTAREA</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TFOOT-class.html"
     >web2py.gluon.html.TFOOT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TH-class.html"
     >web2py.gluon.html.TH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.THEAD-class.html"
     >web2py.gluon.html.THEAD</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TITLE-class.html"
     >web2py.gluon.html.TITLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TR-class.html"
     >web2py.gluon.html.TR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TT-class.html"
     >web2py.gluon.html.TT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.UL-class.html"
     >web2py.gluon.html.UL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.XHTML-class.html"
     >web2py.gluon.html.XHTML</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.XML-class.html"
     >web2py.gluon.html.XML</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.XmlComponent-class.html"
     >web2py.gluon.html.XmlComponent</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.__TAG__-class.html"
     >web2py.gluon.html.__TAG__</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.web2pyHTMLParser-class.html"
     >web2py.gluon.html.web2pyHTMLParser</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.http.HTTP-class.html"
     >web2py.gluon.http.HTTP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages.lazyT-class.html"
     >web2py.gluon.languages.lazyT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages.translator-class.html"
     >web2py.gluon.languages.translator</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.main.HttpServer-class.html"
     >web2py.gluon.main.HttpServer</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.Token-class.html"
     >web2py.gluon.newcron.Token</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.cronlauncher-class.html"
     >web2py.gluon.newcron.cronlauncher</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.extcron-class.html"
     >web2py.gluon.newcron.extcron</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.hardcron-class.html"
     >web2py.gluon.newcron.hardcron</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.softcron-class.html"
     >web2py.gluon.newcron.softcron</a><br />    <a target="mainFrame" href="web2py.gluon.restricted.RestrictedError-class.html"
     >web2py.gluon.restricted.RestrictedError</a><br />    <a target="mainFrame" href="web2py.gluon.restricted.TicketStorage-class.html"
     >web2py.gluon.restricted.TicketStorage</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite.MapUrlIn-class.html"
     >web2py.gluon.rewrite.MapUrlIn</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite.MapUrlOut-class.html"
     >web2py.gluon.rewrite.MapUrlOut</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.BadRequest-class.html"
     >web2py.gluon.rocket.BadRequest</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.ChunkedReader-class.html"
     >web2py.gluon.rocket.ChunkedReader</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Connection-class.html"
     >web2py.gluon.rocket.Connection</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.FileWrapper-class.html"
     >web2py.gluon.rocket.FileWrapper</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Headers-class.html"
     >web2py.gluon.rocket.Headers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Listener-class.html"
     >web2py.gluon.rocket.Listener</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Monitor-class.html"
     >web2py.gluon.rocket.Monitor</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket.NullHandler-class.html"
     >web2py.gluon.rocket.NullHandler</a><br />    <a target="mainFrame" href="web2py.gluon.rocket.Rocket-class.html"
     >web2py.gluon.rocket.Rocket</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.SSLError-class.html"
     >web2py.gluon.rocket.SSLError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.SocketClosed-class.html"
     >web2py.gluon.rocket.SocketClosed</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.SocketTimeout-class.html"
     >web2py.gluon.rocket.SocketTimeout</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.ThreadPool-class.html"
     >web2py.gluon.rocket.ThreadPool</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.WSGIWorker-class.html"
     >web2py.gluon.rocket.WSGIWorker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Worker-class.html"
     >web2py.gluon.rocket.Worker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sanitizer.XssCleaner-class.html"
     >web2py.gluon.sanitizer.XssCleaner</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html"
     >web2py.gluon.sqlhtml.AutocompleteWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.BooleanWidget-class.html"
     >web2py.gluon.sqlhtml.BooleanWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html"
     >web2py.gluon.sqlhtml.CheckboxesWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DateWidget-class.html"
     >web2py.gluon.sqlhtml.DateWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DatetimeWidget-class.html"
     >web2py.gluon.sqlhtml.DatetimeWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DecimalWidget-class.html"
     >web2py.gluon.sqlhtml.DecimalWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DoubleWidget-class.html"
     >web2py.gluon.sqlhtml.DoubleWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.FormWidget-class.html"
     >web2py.gluon.sqlhtml.FormWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.IntegerWidget-class.html"
     >web2py.gluon.sqlhtml.IntegerWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.ListWidget-class.html"
     >web2py.gluon.sqlhtml.ListWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html"
     >web2py.gluon.sqlhtml.MultipleOptionsWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.OptionsWidget-class.html"
     >web2py.gluon.sqlhtml.OptionsWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.PasswordWidget-class.html"
     >web2py.gluon.sqlhtml.PasswordWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.RadioWidget-class.html"
     >web2py.gluon.sqlhtml.RadioWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.SQLFORM-class.html"
     >web2py.gluon.sqlhtml.SQLFORM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.SQLTABLE-class.html"
     >web2py.gluon.sqlhtml.SQLTABLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.StringWidget-class.html"
     >web2py.gluon.sqlhtml.StringWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.TextWidget-class.html"
     >web2py.gluon.sqlhtml.TextWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.TimeWidget-class.html"
     >web2py.gluon.sqlhtml.TimeWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.UploadWidget-class.html"
     >web2py.gluon.sqlhtml.UploadWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.List-class.html"
     >web2py.gluon.storage.List</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.Messages-class.html"
     >web2py.gluon.storage.Messages</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.Settings-class.html"
     >web2py.gluon.storage.Settings</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.Storage-class.html"
     >web2py.gluon.storage.Storage</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.StorageList-class.html"
     >web2py.gluon.storage.StorageList</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.template.BlockNode-class.html"
     >web2py.gluon.template.BlockNode</a><br />    <a target="mainFrame" href="web2py.gluon.template.Content-class.html"
     >web2py.gluon.template.Content</a><br />    <a target="mainFrame" href="web2py.gluon.template.Node-class.html"
     >web2py.gluon.template.Node</a><br />    <a target="mainFrame" href="web2py.gluon.template.SuperNode-class.html"
     >web2py.gluon.template.SuperNode</a><br />    <a target="mainFrame" href="web2py.gluon.template.TemplateParser-class.html"
     >web2py.gluon.template.TemplateParser</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Auth-class.html"
     >web2py.gluon.tools.Auth</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Crud-class.html"
     >web2py.gluon.tools.Crud</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Mail-class.html"
     >web2py.gluon.tools.Mail</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Mail.Attachment-class.html"
     >web2py.gluon.tools.Mail.Attachment</a><br />    <a target="mainFrame" href="web2py.gluon.tools.PluginManager-class.html"
     >web2py.gluon.tools.PluginManager</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Recaptcha-class.html"
     >web2py.gluon.tools.Recaptcha</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Service-class.html"
     >web2py.gluon.tools.Service</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Service.JsonRpcException-class.html"
     >web2py.gluon.tools.Service.JsonRpcException</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.CLEANUP-class.html"
     >web2py.gluon.validators.CLEANUP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.CRYPT-class.html"
     >web2py.gluon.validators.CRYPT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html"
     >web2py.gluon.validators.IS_ALPHANUMERIC</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATE-class.html"
     >web2py.gluon.validators.IS_DATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATETIME-class.html"
     >web2py.gluon.validators.IS_DATETIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html"
     >web2py.gluon.validators.IS_DATETIME_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html"
     >web2py.gluon.validators.IS_DATE_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html"
     >web2py.gluon.validators.IS_DECIMAL_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EMAIL-class.html"
     >web2py.gluon.validators.IS_EMAIL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EMPTY_OR-class.html"
     >web2py.gluon.validators.IS_EMPTY_OR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EQUAL_TO-class.html"
     >web2py.gluon.validators.IS_EQUAL_TO</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EXPR-class.html"
     >web2py.gluon.validators.IS_EXPR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html"
     >web2py.gluon.validators.IS_FLOAT_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_GENERIC_URL-class.html"
     >web2py.gluon.validators.IS_GENERIC_URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_HTTP_URL-class.html"
     >web2py.gluon.validators.IS_HTTP_URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IMAGE-class.html"
     >web2py.gluon.validators.IS_IMAGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html"
     >web2py.gluon.validators.IS_INT_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_DB-class.html"
     >web2py.gluon.validators.IS_IN_DB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_SET-class.html"
     >web2py.gluon.validators.IS_IN_SET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_SUBSET-class.html"
     >web2py.gluon.validators.IS_IN_SUBSET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IPV4-class.html"
     >web2py.gluon.validators.IS_IPV4</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_LENGTH-class.html"
     >web2py.gluon.validators.IS_LENGTH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_LIST_OF-class.html"
     >web2py.gluon.validators.IS_LIST_OF</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_LOWER-class.html"
     >web2py.gluon.validators.IS_LOWER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_MATCH-class.html"
     >web2py.gluon.validators.IS_MATCH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_NOT_EMPTY-class.html"
     >web2py.gluon.validators.IS_NOT_EMPTY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html"
     >web2py.gluon.validators.IS_NOT_IN_DB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_SLUG-class.html"
     >web2py.gluon.validators.IS_SLUG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_STRONG-class.html"
     >web2py.gluon.validators.IS_STRONG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_TIME-class.html"
     >web2py.gluon.validators.IS_TIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html"
     >web2py.gluon.validators.IS_UPLOAD_FILENAME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_UPPER-class.html"
     >web2py.gluon.validators.IS_UPPER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_URL-class.html"
     >web2py.gluon.validators.IS_URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.Validator-class.html"
     >web2py.gluon.validators.Validator</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.widget.IO-class.html"
     >web2py.gluon.widget.IO</a><br />    <a target="mainFrame" href="web2py.gluon.widget.web2pyDialog-class.html"
     >web2py.gluon.widget.web2pyDialog</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.winservice.Service-class.html"
     >web2py.gluon.winservice.Service</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.winservice.Web2pyService-class.html"
     >web2py.gluon.winservice.Web2pyService</a><br />  </div>
  <h2 class="toc">All Functions</h2>
    <a target="mainFrame" href="web2py.gluon.admin-module.html#add_path_first"
     >web2py.gluon.admin.add_path_first</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#apath"
     >web2py.gluon.admin.apath</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_cleanup"
     >web2py.gluon.admin.app_cleanup</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_compile"
     >web2py.gluon.admin.app_compile</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_create"
     >web2py.gluon.admin.app_create</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_install"
     >web2py.gluon.admin.app_install</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_pack"
     >web2py.gluon.admin.app_pack</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_pack_compiled"
     >web2py.gluon.admin.app_pack_compiled</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_uninstall"
     >web2py.gluon.admin.app_uninstall</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#check_new_version"
     >web2py.gluon.admin.check_new_version</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#create_missing_app_folders"
     >web2py.gluon.admin.create_missing_app_folders</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#create_missing_folders"
     >web2py.gluon.admin.create_missing_folders</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#plugin_install"
     >web2py.gluon.admin.plugin_install</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#plugin_pack"
     >web2py.gluon.admin.plugin_pack</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#unzip"
     >web2py.gluon.admin.unzip</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#upgrade"
     >web2py.gluon.admin.upgrade</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cfs-module.html#getcfs"
     >web2py.gluon.cfs.getcfs</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#build_environment"
     >web2py.gluon.compileapp.build_environment</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_application"
     >web2py.gluon.compileapp.compile_application</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_controllers"
     >web2py.gluon.compileapp.compile_controllers</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_models"
     >web2py.gluon.compileapp.compile_models</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_views"
     >web2py.gluon.compileapp.compile_views</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#local_import_aux"
     >web2py.gluon.compileapp.local_import_aux</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#read_pyc"
     >web2py.gluon.compileapp.read_pyc</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#remove_compiled_application"
     >web2py.gluon.compileapp.remove_compiled_application</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#run_controller_in"
     >web2py.gluon.compileapp.run_controller_in</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#run_models_in"
     >web2py.gluon.compileapp.run_models_in</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#run_view_in"
     >web2py.gluon.compileapp.run_view_in</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#save_pyc"
     >web2py.gluon.compileapp.save_pyc</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#test"
     >web2py.gluon.compileapp.test</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contenttype-module.html#contenttype"
     >web2py.gluon.contenttype.contenttype</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#Binary"
     >web2py.gluon.contrib.pymysql.Binary</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#Connect"
     >web2py.gluon.contrib.pymysql.Connect</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_bit"
     >web2py.gluon.contrib.pymysql.converters.convert_bit</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_characters"
     >web2py.gluon.contrib.pymysql.converters.convert_characters</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_date"
     >web2py.gluon.contrib.pymysql.converters.convert_date</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime"
     >web2py.gluon.contrib.pymysql.converters.convert_datetime</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_decimal"
     >web2py.gluon.contrib.pymysql.converters.convert_decimal</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_float"
     >web2py.gluon.contrib.pymysql.converters.convert_float</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_int"
     >web2py.gluon.contrib.pymysql.converters.convert_int</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_long"
     >web2py.gluon.contrib.pymysql.converters.convert_long</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp"
     >web2py.gluon.contrib.pymysql.converters.convert_mysql_timestamp</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_set"
     >web2py.gluon.contrib.pymysql.converters.convert_set</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_time"
     >web2py.gluon.contrib.pymysql.converters.convert_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta"
     >web2py.gluon.contrib.pymysql.converters.convert_timedelta</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_None"
     >web2py.gluon.contrib.pymysql.converters.escape_None</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_bool"
     >web2py.gluon.contrib.pymysql.converters.escape_bool</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_date"
     >web2py.gluon.contrib.pymysql.converters.escape_date</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_datetime"
     >web2py.gluon.contrib.pymysql.converters.escape_datetime</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_decimal"
     >web2py.gluon.contrib.pymysql.converters.escape_decimal</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_dict"
     >web2py.gluon.contrib.pymysql.converters.escape_dict</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_float"
     >web2py.gluon.contrib.pymysql.converters.escape_float</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_item"
     >web2py.gluon.contrib.pymysql.converters.escape_item</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_object"
     >web2py.gluon.contrib.pymysql.converters.escape_object</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence"
     >web2py.gluon.contrib.pymysql.converters.escape_sequence</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_set"
     >web2py.gluon.contrib.pymysql.converters.escape_set</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_string"
     >web2py.gluon.contrib.pymysql.converters.escape_string</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_struct_time"
     >web2py.gluon.contrib.pymysql.converters.escape_struct_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_time"
     >web2py.gluon.contrib.pymysql.converters.escape_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_timedelta"
     >web2py.gluon.contrib.pymysql.converters.escape_timedelta</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode"
     >web2py.gluon.contrib.pymysql.converters.escape_unicode</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#get_client_info"
     >web2py.gluon.contrib.pymysql.get_client_info</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#install_as_MySQLdb"
     >web2py.gluon.contrib.pymysql.install_as_MySQLdb</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#thread_safe"
     >web2py.gluon.contrib.pymysql.thread_safe</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="None"
     >web2py.gluon.contrib.pymysql.times.DateFromTicks</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="None"
     >web2py.gluon.contrib.pymysql.times.TimeFromTicks</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="None"
     >web2py.gluon.contrib.pymysql.times.TimestampFromTicks</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#custom_import_install"
     >web2py.gluon.custom_import.custom_import_install</a><br />    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#is_tracking_changes"
     >web2py.gluon.custom_import.is_tracking_changes</a><br />    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#track_changes"
     >web2py.gluon.custom_import.track_changes</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#DEFAULT"
     >web2py.gluon.dal.DEFAULT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Reference_pickler"
     >web2py.gluon.dal.Reference_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Reference_unpickler"
     >web2py.gluon.dal.Reference_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Row_pickler"
     >web2py.gluon.dal.Row_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Row_unpickler"
     >web2py.gluon.dal.Row_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Rows_pickler"
     >web2py.gluon.dal.Rows_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Rows_unpickler"
     >web2py.gluon.dal.Rows_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_decode_integer"
     >web2py.gluon.dal.bar_decode_integer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_decode_string"
     >web2py.gluon.dal.bar_decode_string</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_encode"
     >web2py.gluon.dal.bar_encode</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_escape"
     >web2py.gluon.dal.bar_escape</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#cleanup"
     >web2py.gluon.dal.cleanup</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#int2uuid"
     >web2py.gluon.dal.int2uuid</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#sqlhtml_validators"
     >web2py.gluon.dal.sqlhtml_validators</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#test_all"
     >web2py.gluon.dal.test_all</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#update_record"
     >web2py.gluon.dal.update_record</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#uuid2int"
     >web2py.gluon.dal.uuid2int</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#xorify"
     >web2py.gluon.dal.xorify</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.debug-module.html#communicate"
     >web2py.gluon.debug.communicate</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#set_trace"
     >web2py.gluon.debug.set_trace</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#stop_trace"
     >web2py.gluon.debug.stop_trace</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.decoder-module.html#autoDetectXMLEncoding"
     >web2py.gluon.decoder.autoDetectXMLEncoding</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.decoder-module.html#decoder"
     >web2py.gluon.decoder.decoder</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#_extractall"
     >web2py.gluon.fileutils._extractall</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#abspath"
     >web2py.gluon.fileutils.abspath</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#check_credentials"
     >web2py.gluon.fileutils.check_credentials</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#cleanpath"
     >web2py.gluon.fileutils.cleanpath</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#copystream"
     >web2py.gluon.fileutils.copystream</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#fix_newlines"
     >web2py.gluon.fileutils.fix_newlines</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#get_session"
     >web2py.gluon.fileutils.get_session</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#listdir"
     >web2py.gluon.fileutils.listdir</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#make_fake_file_like_object"
     >web2py.gluon.fileutils.make_fake_file_like_object</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#mktree"
     >web2py.gluon.fileutils.mktree</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#read_file"
     >web2py.gluon.fileutils.read_file</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#readlines_file"
     >web2py.gluon.fileutils.readlines_file</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#recursive_unlink"
     >web2py.gluon.fileutils.recursive_unlink</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#tar"
     >web2py.gluon.fileutils.tar</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#tar_compiled"
     >web2py.gluon.fileutils.tar_compiled</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#untar"
     >web2py.gluon.fileutils.untar</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#up"
     >web2py.gluon.fileutils.up</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_pack"
     >web2py.gluon.fileutils.w2p_pack</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_pack_plugin"
     >web2py.gluon.fileutils.w2p_pack_plugin</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_unpack"
     >web2py.gluon.fileutils.w2p_unpack</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_unpack_plugin"
     >web2py.gluon.fileutils.w2p_unpack_plugin</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#write_file"
     >web2py.gluon.fileutils.write_file</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.highlight-module.html#highlight"
     >web2py.gluon.highlight.highlight</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#TAG_pickler"
     >web2py.gluon.html.TAG_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#TAG_unpickler"
     >web2py.gluon.html.TAG_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#URL"
     >web2py.gluon.html.URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#XML_pickle"
     >web2py.gluon.html.XML_pickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#XML_unpickle"
     >web2py.gluon.html.XML_unpickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#embed64"
     >web2py.gluon.html.embed64</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#join"
     >web2py.gluon.html.join</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#markdown_serializer"
     >web2py.gluon.html.markdown_serializer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#markmin_serializer"
     >web2py.gluon.html.markmin_serializer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#test"
     >web2py.gluon.html.test</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#verifyURL"
     >web2py.gluon.html.verifyURL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#xmlescape"
     >web2py.gluon.html.xmlescape</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.http-module.html#redirect"
     >web2py.gluon.http.redirect</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#findT"
     >web2py.gluon.languages.findT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#lazyT_pickle"
     >web2py.gluon.languages.lazyT_pickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#lazyT_unpickle"
     >web2py.gluon.languages.lazyT_unpickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#read_dict"
     >web2py.gluon.languages.read_dict</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#read_dict_aux"
     >web2py.gluon.languages.read_dict_aux</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#update_all_languages"
     >web2py.gluon.languages.update_all_languages</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#utf8_repr"
     >web2py.gluon.languages.utf8_repr</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#write_dict"
     >web2py.gluon.languages.write_dict</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.main-module.html#appfactory"
     >web2py.gluon.main.appfactory</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#copystream_progress"
     >web2py.gluon.main.copystream_progress</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#environ_aux"
     >web2py.gluon.main.environ_aux</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#get_client"
     >web2py.gluon.main.get_client</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#middleware_aux"
     >web2py.gluon.main.middleware_aux</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#parse_get_post_vars"
     >web2py.gluon.main.parse_get_post_vars</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.main-module.html#save_password"
     >web2py.gluon.main.save_password</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#serve_controller"
     >web2py.gluon.main.serve_controller</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#start_response_aux"
     >web2py.gluon.main.start_response_aux</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.main-module.html#wsgibase"
     >web2py.gluon.main.wsgibase</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#crondance"
     >web2py.gluon.newcron.crondance</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#parsecronline"
     >web2py.gluon.newcron.parsecronline</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#rangetolist"
     >web2py.gluon.newcron.rangetolist</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#stopcron"
     >web2py.gluon.newcron.stopcron</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#lock"
     >web2py.gluon.portalocker.lock</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#unlock"
     >web2py.gluon.portalocker.unlock</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.restricted-module.html#compile2"
     >web2py.gluon.restricted.compile2</a><br />    <a target="mainFrame" href="web2py.gluon.restricted-module.html#restricted"
     >web2py.gluon.restricted.restricted</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.restricted-module.html#snapshot"
     >web2py.gluon.restricted.snapshot</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#_params_default"
     >web2py.gluon.rewrite._params_default</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#_router_default"
     >web2py.gluon.rewrite._router_default</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#compile_regex"
     >web2py.gluon.rewrite.compile_regex</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#filter_err"
     >web2py.gluon.rewrite.filter_err</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#filter_url"
     >web2py.gluon.rewrite.filter_url</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#get_effective_router"
     >web2py.gluon.rewrite.get_effective_router</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#load"
     >web2py.gluon.rewrite.load</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#load_routers"
     >web2py.gluon.rewrite.load_routers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#map_url_in"
     >web2py.gluon.rewrite.map_url_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#map_url_out"
     >web2py.gluon.rewrite.map_url_out</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_filter_in"
     >web2py.gluon.rewrite.regex_filter_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_filter_out"
     >web2py.gluon.rewrite.regex_filter_out</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_select"
     >web2py.gluon.rewrite.regex_select</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_uri"
     >web2py.gluon.rewrite.regex_uri</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_url_in"
     >web2py.gluon.rewrite.regex_url_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#try_redirect_on_error"
     >web2py.gluon.rewrite.try_redirect_on_error</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#try_rewrite_on_error"
     >web2py.gluon.rewrite.try_rewrite_on_error</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#url_in"
     >web2py.gluon.rewrite.url_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#url_out"
     >web2py.gluon.rewrite.url_out</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#CherryPyWSGIServer"
     >web2py.gluon.rocket.CherryPyWSGIServer</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#_formatparam"
     >web2py.gluon.rocket._formatparam</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#b"
     >web2py.gluon.rocket.b</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#demo"
     >web2py.gluon.rocket.demo</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#demo_app"
     >web2py.gluon.rocket.demo_app</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#get_method"
     >web2py.gluon.rocket.get_method</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#u"
     >web2py.gluon.rocket.u</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sanitizer-module.html#sanitize"
     >web2py.gluon.sanitizer.sanitize</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sanitizer-module.html#xssescape"
     >web2py.gluon.sanitizer.xssescape</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#csv"
     >web2py.gluon.serializers.csv</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#custom_json"
     >web2py.gluon.serializers.custom_json</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#json"
     >web2py.gluon.serializers.json</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#rss"
     >web2py.gluon.serializers.rss</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#xml"
     >web2py.gluon.serializers.xml</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#xml_rec"
     >web2py.gluon.serializers.xml_rec</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.shell-module.html#die"
     >web2py.gluon.shell.die</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#env"
     >web2py.gluon.shell.env</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#exec_environment"
     >web2py.gluon.shell.exec_environment</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#exec_pythonrc"
     >web2py.gluon.shell.exec_pythonrc</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#execute_from_command_line"
     >web2py.gluon.shell.execute_from_command_line</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#get_usage"
     >web2py.gluon.shell.get_usage</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#parse_path_info"
     >web2py.gluon.shell.parse_path_info</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#run"
     >web2py.gluon.shell.run</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#test"
     >web2py.gluon.shell.test</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#represent"
     >web2py.gluon.sqlhtml.represent</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#safe_float"
     >web2py.gluon.sqlhtml.safe_float</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#safe_int"
     >web2py.gluon.sqlhtml.safe_int</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage-module.html#load_storage"
     >web2py.gluon.storage.load_storage</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage-module.html#save_storage"
     >web2py.gluon.storage.save_storage</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#stream_file_or_304_or_206"
     >web2py.gluon.streamer.stream_file_or_304_or_206</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#streamer"
     >web2py.gluon.streamer.streamer</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.template-module.html#get_parsed"
     >web2py.gluon.template.get_parsed</a><br />    <a target="mainFrame" href="web2py.gluon.template-module.html#parse_template"
     >web2py.gluon.template.parse_template</a><br />    <a target="mainFrame" href="web2py.gluon.template-module.html#render"
     >web2py.gluon.template.render</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#DEFAULT"
     >web2py.gluon.tools.DEFAULT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#addrow"
     >web2py.gluon.tools.addrow</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#call_or_redirect"
     >web2py.gluon.tools.call_or_redirect</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#callback"
     >web2py.gluon.tools.callback</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#completion"
     >web2py.gluon.tools.completion</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.tools-module.html#fetch"
     >web2py.gluon.tools.fetch</a><br />    <a target="mainFrame" href="web2py.gluon.tools-module.html#geocode"
     >web2py.gluon.tools.geocode</a><br />    <a target="mainFrame" href="web2py.gluon.tools-module.html#prettydate"
     >web2py.gluon.tools.prettydate</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#test_thread_separation"
     >web2py.gluon.tools.test_thread_separation</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#universal_caller"
     >web2py.gluon.tools.universal_caller</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#validators"
     >web2py.gluon.tools.validators</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#get_digest"
     >web2py.gluon.utils.get_digest</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#hmac_hash"
     >web2py.gluon.utils.hmac_hash</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#initialize_urandom"
     >web2py.gluon.utils.initialize_urandom</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#md5_hash"
     >web2py.gluon.utils.md5_hash</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#simple_hash"
     >web2py.gluon.utils.simple_hash</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#web2py_uuid"
     >web2py.gluon.utils.web2py_uuid</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#escape_unicode"
     >web2py.gluon.validators.escape_unicode</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#is_empty"
     >web2py.gluon.validators.is_empty</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#options_sorter"
     >web2py.gluon.validators.options_sorter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#translate"
     >web2py.gluon.validators.translate</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#unicode_to_ascii_authority"
     >web2py.gluon.validators.unicode_to_ascii_authority</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#unicode_to_ascii_url"
     >web2py.gluon.validators.unicode_to_ascii_url</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#urlify"
     >web2py.gluon.validators.urlify</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.widget-module.html#console"
     >web2py.gluon.widget.console</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#presentation"
     >web2py.gluon.widget.presentation</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#start"
     >web2py.gluon.widget.start</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#start_browser"
     >web2py.gluon.widget.start_browser</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#try_start_browser"
     >web2py.gluon.widget.try_start_browser</a><br />    <a target="mainFrame" href="web2py.gluon.winservice-module.html#web2py_windows_service_handler"
     >web2py.gluon.winservice.web2py_windows_service_handler</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.xmlrpc-module.html#handler"
     >web2py.gluon.xmlrpc.handler</a><br />  </div>
  <h2 class="toc">All Variables</h2>
    <a target="mainFrame" href="psycopg2-module.html#BINARY"
     >psycopg2.BINARY</a><br />    <a target="mainFrame" href="psycopg2-module.html#DATETIME"
     >psycopg2.DATETIME</a><br />    <a target="mainFrame" href="psycopg2-module.html#NUMBER"
     >psycopg2.NUMBER</a><br />    <a target="mainFrame" href="psycopg2-module.html#ROWID"
     >psycopg2.ROWID</a><br />    <a target="mainFrame" href="psycopg2-module.html#STRING"
     >psycopg2.STRING</a><br />    <a target="mainFrame" href="psycopg2-module.html#apilevel"
     >psycopg2.apilevel</a><br />    <a target="mainFrame" href="psycopg2-module.html#k"
     >psycopg2.k</a><br />    <a target="mainFrame" href="psycopg2-module.html#paramstyle"
     >psycopg2.paramstyle</a><br />    <a target="mainFrame" href="psycopg2-module.html#threadsafety"
     >psycopg2.threadsafety</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#DSTDIFF"
     >psycopg2.tz.DSTDIFF</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#DSTOFFSET"
     >psycopg2.tz.DSTOFFSET</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#LOCAL"
     >psycopg2.tz.LOCAL</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#STDOFFSET"
     >psycopg2.tz.STDOFFSET</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#ZERO"
     >psycopg2.tz.ZERO</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#PARSE_COLNAMES"
     >sqlite3.dbapi2.PARSE_COLNAMES</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#PARSE_DECLTYPES"
     >sqlite3.dbapi2.PARSE_DECLTYPES</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_ALTER_TABLE"
     >sqlite3.dbapi2.SQLITE_ALTER_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_ANALYZE"
     >sqlite3.dbapi2.SQLITE_ANALYZE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_ATTACH"
     >sqlite3.dbapi2.SQLITE_ATTACH</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_INDEX"
     >sqlite3.dbapi2.SQLITE_CREATE_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TABLE"
     >sqlite3.dbapi2.SQLITE_CREATE_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_INDEX"
     >sqlite3.dbapi2.SQLITE_CREATE_TEMP_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TABLE"
     >sqlite3.dbapi2.SQLITE_CREATE_TEMP_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TRIGGER"
     >sqlite3.dbapi2.SQLITE_CREATE_TEMP_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_VIEW"
     >sqlite3.dbapi2.SQLITE_CREATE_TEMP_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TRIGGER"
     >sqlite3.dbapi2.SQLITE_CREATE_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_VIEW"
     >sqlite3.dbapi2.SQLITE_CREATE_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DELETE"
     >sqlite3.dbapi2.SQLITE_DELETE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DENY"
     >sqlite3.dbapi2.SQLITE_DENY</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DETACH"
     >sqlite3.dbapi2.SQLITE_DETACH</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_INDEX"
     >sqlite3.dbapi2.SQLITE_DROP_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TABLE"
     >sqlite3.dbapi2.SQLITE_DROP_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_INDEX"
     >sqlite3.dbapi2.SQLITE_DROP_TEMP_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TABLE"
     >sqlite3.dbapi2.SQLITE_DROP_TEMP_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TRIGGER"
     >sqlite3.dbapi2.SQLITE_DROP_TEMP_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_VIEW"
     >sqlite3.dbapi2.SQLITE_DROP_TEMP_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TRIGGER"
     >sqlite3.dbapi2.SQLITE_DROP_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_VIEW"
     >sqlite3.dbapi2.SQLITE_DROP_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_IGNORE"
     >sqlite3.dbapi2.SQLITE_IGNORE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_INSERT"
     >sqlite3.dbapi2.SQLITE_INSERT</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_OK"
     >sqlite3.dbapi2.SQLITE_OK</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_PRAGMA"
     >sqlite3.dbapi2.SQLITE_PRAGMA</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_READ"
     >sqlite3.dbapi2.SQLITE_READ</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_REINDEX"
     >sqlite3.dbapi2.SQLITE_REINDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_SELECT"
     >sqlite3.dbapi2.SQLITE_SELECT</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_TRANSACTION"
     >sqlite3.dbapi2.SQLITE_TRANSACTION</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_UPDATE"
     >sqlite3.dbapi2.SQLITE_UPDATE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#adapters"
     >sqlite3.dbapi2.adapters</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#apilevel"
     >sqlite3.dbapi2.apilevel</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#converters"
     >sqlite3.dbapi2.converters</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#paramstyle"
     >sqlite3.dbapi2.paramstyle</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#sqlite_version"
     >sqlite3.dbapi2.sqlite_version</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#sqlite_version_info"
     >sqlite3.dbapi2.sqlite_version_info</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#threadsafety"
     >sqlite3.dbapi2.threadsafety</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#version"
     >sqlite3.dbapi2.version</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#version_info"
     >sqlite3.dbapi2.version_info</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#x"
     >sqlite3.dbapi2.x</a><br />    <a target="mainFrame" href="web2py.gluon-module.html#ON"
     >web2py.gluon.ON</a><br />    <a target="mainFrame" href="web2py.gluon-module.html#TAG"
     >web2py.gluon.TAG</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cache-module.html#DEFAULT_TIME_EXPIRE"
     >web2py.gluon.cache.DEFAULT_TIME_EXPIRE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cache-module.html#logger"
     >web2py.gluon.cache.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cfs-module.html#cfs"
     >web2py.gluon.cfs.cfs</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cfs-module.html#cfs_lock"
     >web2py.gluon.cfs.cfs_lock</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#TEST_CODE"
     >web2py.gluon.compileapp.TEST_CODE</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#is_gae"
     >web2py.gluon.compileapp.is_gae</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#is_jython"
     >web2py.gluon.compileapp.is_jython</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#logger"
     >web2py.gluon.compileapp.logger</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contenttype-module.html#CONTENT_TYPE"
     >web2py.gluon.contenttype.CONTENT_TYPE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#BINARY"
     >web2py.gluon.contrib.pymysql.BINARY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#DATE"
     >web2py.gluon.contrib.pymysql.DATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#DATETIME"
     >web2py.gluon.contrib.pymysql.DATETIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#NULL"
     >web2py.gluon.contrib.pymysql.NULL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#NUMBER"
     >web2py.gluon.contrib.pymysql.NUMBER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#ROWID"
     >web2py.gluon.contrib.pymysql.ROWID</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#STRING"
     >web2py.gluon.contrib.pymysql.STRING</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#TIME"
     >web2py.gluon.contrib.pymysql.TIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#TIMESTAMP"
     >web2py.gluon.contrib.pymysql.TIMESTAMP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#VERSION"
     >web2py.gluon.contrib.pymysql.VERSION</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#apilevel"
     >web2py.gluon.contrib.pymysql.apilevel</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BIT"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BIT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#CHAR"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.CHAR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#ENUM"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#GEOMETRY"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.GEOMETRY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INTERVAL"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INTERVAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDATE"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDECIMAL"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NULL"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NULL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SET"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SHORT"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SHORT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VARCHAR"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VARCHAR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR"
     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_MAP"
     >web2py.gluon.contrib.pymysql.converters.ESCAPE_MAP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_REGEX"
     >web2py.gluon.contrib.pymysql.converters.ESCAPE_REGEX</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#conversions"
     >web2py.gluon.contrib.pymysql.converters.conversions</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#decoders"
     >web2py.gluon.contrib.pymysql.converters.decoders</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#encoders"
     >web2py.gluon.contrib.pymysql.converters.encoders</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#paramstyle"
     >web2py.gluon.contrib.pymysql.paramstyle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#threadsafety"
     >web2py.gluon.contrib.pymysql.threadsafety</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#version_info"
     >web2py.gluon.contrib.pymysql.version_info</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon-module.html#current"
     >web2py.gluon.current</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_is_tracking_changes"
     >web2py.gluon.custom_import._is_tracking_changes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_web2py_date_tracker_importer"
     >web2py.gluon.custom_import._web2py_date_tracker_importer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_web2py_importer"
     >web2py.gluon.custom_import._web2py_importer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_web2py_path"
     >web2py.gluon.custom_import._web2py_path</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#ADAPTERS"
     >web2py.gluon.dal.ADAPTERS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#CALLABLETYPES"
     >web2py.gluon.dal.CALLABLETYPES</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#INFINITY"
     >web2py.gluon.dal.INFINITY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#INGRES_SEQNAME"
     >web2py.gluon.dal.INGRES_SEQNAME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#MAXCHARLENGTH"
     >web2py.gluon.dal.MAXCHARLENGTH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#drivers"
     >web2py.gluon.dal.drivers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#have_portalocker"
     >web2py.gluon.dal.have_portalocker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#have_serializers"
     >web2py.gluon.dal.have_serializers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#have_validators"
     >web2py.gluon.dal.have_validators</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#is_jdbc"
     >web2py.gluon.dal.is_jdbc</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#logger"
     >web2py.gluon.dal.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_cleanup_fn"
     >web2py.gluon.dal.regex_cleanup_fn</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_content"
     >web2py.gluon.dal.regex_content</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_dbname"
     >web2py.gluon.dal.regex_dbname</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_python_keywords"
     >web2py.gluon.dal.regex_python_keywords</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_quotes"
     >web2py.gluon.dal.regex_quotes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#sql_locker"
     >web2py.gluon.dal.sql_locker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#string_unpack"
     >web2py.gluon.dal.string_unpack</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#table_field"
     >web2py.gluon.dal.table_field</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#thread"
     >web2py.gluon.dal.thread</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.debug-module.html#debugger"
     >web2py.gluon.debug.debugger</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#logger"
     >web2py.gluon.debug.logger</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#pipe_in"
     >web2py.gluon.debug.pipe_in</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#pipe_out"
     >web2py.gluon.debug.pipe_out</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.decoder-module.html#autodetect_dict"
     >web2py.gluon.decoder.autodetect_dict</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals-module.html#current"
     >web2py.gluon.globals.current</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals-module.html#regex_session_id"
     >web2py.gluon.globals.regex_session_id</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#ON"
     >web2py.gluon.html.ON</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#TAG"
     >web2py.gluon.html.TAG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#regex_crlf"
     >web2py.gluon.html.regex_crlf</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.http-module.html#defined_status"
     >web2py.gluon.http.defined_status</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.import_all-module.html#alert_dependency"
     >web2py.gluon.import_all.alert_dependency</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#base_modules"
     >web2py.gluon.import_all.base_modules</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#candidate"
     >web2py.gluon.import_all.candidate</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#contributed_modules"
     >web2py.gluon.import_all.contributed_modules</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#dirs"
     >web2py.gluon.import_all.dirs</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#files"
     >web2py.gluon.import_all.files</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#module"
     >web2py.gluon.import_all.module</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#name"
     >web2py.gluon.import_all.name</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#py26_deprecated"
     >web2py.gluon.import_all.py26_deprecated</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#py27_deprecated"
     >web2py.gluon.import_all.py27_deprecated</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#python_version"
     >web2py.gluon.import_all.python_version</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#root"
     >web2py.gluon.import_all.root</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE"
     >web2py.gluon.languages.PY_STRING_LITERAL_RE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#is_gae"
     >web2py.gluon.languages.is_gae</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#regex_language"
     >web2py.gluon.languages.regex_language</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#regex_translate"
     >web2py.gluon.languages.regex_translate</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#logger"
     >web2py.gluon.main.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#logpath"
     >web2py.gluon.main.logpath</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#regex_client"
     >web2py.gluon.main.regex_client</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#requests"
     >web2py.gluon.main.requests</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#version_info"
     >web2py.gluon.main.version_info</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#web2py_path"
     >web2py.gluon.main.web2py_path</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#web2py_version"
     >web2py.gluon.main.web2py_version</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_expose"
     >web2py.gluon.myregex.regex_expose</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_extend"
     >web2py.gluon.myregex.regex_extend</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_include"
     >web2py.gluon.myregex.regex_include</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_tables"
     >web2py.gluon.myregex.regex_tables</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.newcron-module.html#_cron_stopping"
     >web2py.gluon.newcron._cron_stopping</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.newcron-module.html#logger"
     >web2py.gluon.newcron.logger</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#LOCK_EX"
     >web2py.gluon.portalocker.LOCK_EX</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#LOCK_NB"
     >web2py.gluon.portalocker.LOCK_NB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#LOCK_SH"
     >web2py.gluon.portalocker.LOCK_SH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#__overlapped"
     >web2py.gluon.portalocker.__overlapped</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#logger"
     >web2py.gluon.portalocker.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#os_locking"
     >web2py.gluon.portalocker.os_locking</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#ADAPTERS"
     >web2py.gluon.reserved_sql_keywords.ADAPTERS</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#COMMON"
     >web2py.gluon.reserved_sql_keywords.COMMON</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#DB2"
     >web2py.gluon.reserved_sql_keywords.DB2</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD"
     >web2py.gluon.reserved_sql_keywords.FIREBIRD</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD_NONRESERVED"
     >web2py.gluon.reserved_sql_keywords.FIREBIRD_NONRESERVED</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#INFORMIX"
     >web2py.gluon.reserved_sql_keywords.INFORMIX</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#INGRES"
     >web2py.gluon.reserved_sql_keywords.INGRES</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#JDBCPOSTGRESQL"
     >web2py.gluon.reserved_sql_keywords.JDBCPOSTGRESQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#JDBCSQLITE"
     >web2py.gluon.reserved_sql_keywords.JDBCSQLITE</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#MSSQL"
     >web2py.gluon.reserved_sql_keywords.MSSQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#MYSQL"
     >web2py.gluon.reserved_sql_keywords.MYSQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#ORACLE"
     >web2py.gluon.reserved_sql_keywords.ORACLE</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL"
     >web2py.gluon.reserved_sql_keywords.POSTGRESQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL_NONRESERVED"
     >web2py.gluon.reserved_sql_keywords.POSTGRESQL_NONRESERVED</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#SQLITE"
     >web2py.gluon.reserved_sql_keywords.SQLITE</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#__author__"
     >web2py.gluon.reserved_sql_keywords.__author__</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.restricted-module.html#logger"
     >web2py.gluon.restricted.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#ROUTER_BASE_KEYS"
     >web2py.gluon.rewrite.ROUTER_BASE_KEYS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#ROUTER_KEYS"
     >web2py.gluon.rewrite.ROUTER_KEYS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#logger"
     >web2py.gluon.rewrite.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#params"
     >web2py.gluon.rewrite.params</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#params_apps"
     >web2py.gluon.rewrite.params_apps</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_anything"
     >web2py.gluon.rewrite.regex_anything</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_args"
     >web2py.gluon.rewrite.regex_args</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_at"
     >web2py.gluon.rewrite.regex_at</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_space"
     >web2py.gluon.rewrite.regex_space</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_static"
     >web2py.gluon.rewrite.regex_static</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_url"
     >web2py.gluon.rewrite.regex_url</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#routers"
     >web2py.gluon.rewrite.routers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#thread"
     >web2py.gluon.rewrite.thread</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#BASE_ENV"
     >web2py.gluon.rocket.BASE_ENV</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#BUF_SIZE"
     >web2py.gluon.rocket.BUF_SIZE</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULTS"
     >web2py.gluon.rocket.DEFAULTS</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULT_LISTEN_QUEUE_SIZE"
     >web2py.gluon.rocket.DEFAULT_LISTEN_QUEUE_SIZE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULT_MAX_THREADS"
     >web2py.gluon.rocket.DEFAULT_MAX_THREADS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULT_MIN_THREADS"
     >web2py.gluon.rocket.DEFAULT_MIN_THREADS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#HEADER_RESPONSE"
     >web2py.gluon.rocket.HEADER_RESPONSE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#HTTP_METHODS"
     >web2py.gluon.rocket.HTTP_METHODS</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#HTTP_SERVER_SOFTWARE"
     >web2py.gluon.rocket.HTTP_SERVER_SOFTWARE</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#IGNORE_ERRORS_ON_CLOSE"
     >web2py.gluon.rocket.IGNORE_ERRORS_ON_CLOSE</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#IS_JYTHON"
     >web2py.gluon.rocket.IS_JYTHON</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#LOG_LINE"
     >web2py.gluon.rocket.LOG_LINE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#NEWLINE"
     >web2py.gluon.rocket.NEWLINE</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#PY3K"
     >web2py.gluon.rocket.PY3K</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#RESPONSE"
     >web2py.gluon.rocket.RESPONSE</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#SERVER_NAME"
     >web2py.gluon.rocket.SERVER_NAME</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#SERVER_SOFTWARE"
     >web2py.gluon.rocket.SERVER_SOFTWARE</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#SOCKET_TIMEOUT"
     >web2py.gluon.rocket.SOCKET_TIMEOUT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#THREAD_STOP_CHECK_INTERVAL"
     >web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#VERSION"
     >web2py.gluon.rocket.VERSION</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#_tspecials"
     >web2py.gluon.rocket._tspecials</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#has_ssl"
     >web2py.gluon.rocket.has_ssl</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#log"
     >web2py.gluon.rocket.log</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#re_REQUEST_LINE"
     >web2py.gluon.rocket.re_REQUEST_LINE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#re_SLASH"
     >web2py.gluon.rocket.re_SLASH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.settings-module.html#global_settings"
     >web2py.gluon.settings.global_settings</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.settings-module.html#settings"
     >web2py.gluon.settings.settings</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.shell-module.html#logger"
     >web2py.gluon.shell.logger</a><br />    <a target="mainFrame" href="web2py.gluon.sql-module.html#drivers"
     >web2py.gluon.sql.drivers</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#table_field"
     >web2py.gluon.sqlhtml.table_field</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#widget_class"
     >web2py.gluon.sqlhtml.widget_class</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#DEFAULT_CHUNK_SIZE"
     >web2py.gluon.streamer.DEFAULT_CHUNK_SIZE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#regex_start_range"
     >web2py.gluon.streamer.regex_start_range</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#regex_stop_range"
     >web2py.gluon.streamer.regex_stop_range</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#ON"
     >web2py.gluon.tools.ON</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#TAG"
     >web2py.gluon.tools.TAG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#current"
     >web2py.gluon.tools.current</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#logger"
     >web2py.gluon.tools.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#regex_geocode"
     >web2py.gluon.tools.regex_geocode</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#ctokens"
     >web2py.gluon.utils.ctokens</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#logger"
     >web2py.gluon.utils.logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#all_url_schemes"
     >web2py.gluon.validators.all_url_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#http_schemes"
     >web2py.gluon.validators.http_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#label_split_regex"
     >web2py.gluon.validators.label_split_regex</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#official_top_level_domains"
     >web2py.gluon.validators.official_top_level_domains</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#official_url_schemes"
     >web2py.gluon.validators.official_url_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#regex1"
     >web2py.gluon.validators.regex1</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#regex2"
     >web2py.gluon.validators.regex2</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#regex_time"
     >web2py.gluon.validators.regex_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#unofficial_url_schemes"
     >web2py.gluon.validators.unofficial_url_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#url_split_regex"
     >web2py.gluon.validators.url_split_regex</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramAuthor"
     >web2py.gluon.widget.ProgramAuthor</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramInfo"
     >web2py.gluon.widget.ProgramInfo</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramName"
     >web2py.gluon.widget.ProgramName</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramVersion"
     >web2py.gluon.widget.ProgramVersion</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#logger"
     >web2py.gluon.widget.logger</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#msg"
     >web2py.gluon.widget.msg</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-psycopg2-module.html version [6e8e39f6da].





























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>psycopg2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module psycopg2</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="psycopg2.DataError-class.html"
     >DataError</a><br />    <a target="mainFrame" href="psycopg2.DatabaseError-class.html"
     >DatabaseError</a><br />    <a target="mainFrame" href="psycopg2.Error-class.html"
     >Error</a><br />    <a target="mainFrame" href="psycopg2.IntegrityError-class.html"
     >IntegrityError</a><br />    <a target="mainFrame" href="psycopg2.InterfaceError-class.html"
     >InterfaceError</a><br />    <a target="mainFrame" href="psycopg2.InternalError-class.html"
     >InternalError</a><br />    <a target="mainFrame" href="psycopg2.NotSupportedError-class.html"
     >NotSupportedError</a><br />    <a target="mainFrame" href="psycopg2.OperationalError-class.html"
     >OperationalError</a><br />    <a target="mainFrame" href="psycopg2.ProgrammingError-class.html"
     >ProgrammingError</a><br />    <a target="mainFrame" href="psycopg2.Warning-class.html"
     >Warning</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="psycopg2-module.html#Binary"
     >Binary</a><br />    <a target="mainFrame" href="psycopg2-module.html#Date"
     >Date</a><br />    <a target="mainFrame" href="psycopg2-module.html#DateFromTicks"
     >DateFromTicks</a><br />    <a target="mainFrame" href="psycopg2-module.html#Time"
     >Time</a><br />    <a target="mainFrame" href="psycopg2-module.html#TimeFromTicks"
     >TimeFromTicks</a><br />    <a target="mainFrame" href="psycopg2-module.html#Timestamp"
     >Timestamp</a><br />    <a target="mainFrame" href="psycopg2-module.html#TimestampFromTicks"
     >TimestampFromTicks</a><br />    <a target="mainFrame" href="psycopg2-module.html#connect"
     >connect</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="psycopg2-module.html#BINARY"
     >BINARY</a><br />    <a target="mainFrame" href="psycopg2-module.html#DATETIME"
     >DATETIME</a><br />    <a target="mainFrame" href="psycopg2-module.html#NUMBER"
     >NUMBER</a><br />    <a target="mainFrame" href="psycopg2-module.html#ROWID"
     >ROWID</a><br />    <a target="mainFrame" href="psycopg2-module.html#STRING"
     >STRING</a><br />    <a target="mainFrame" href="psycopg2-module.html#apilevel"
     >apilevel</a><br />    <a target="mainFrame" href="psycopg2-module.html#k"
     >k</a><br />    <a target="mainFrame" href="psycopg2-module.html#paramstyle"
     >paramstyle</a><br />    <a target="mainFrame" href="psycopg2-module.html#threadsafety"
     >threadsafety</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-psycopg2.tz-module.html version [b7670e47fa].








































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tz</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module tz</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="psycopg2.tz.FixedOffsetTimezone-class.html"
     >FixedOffsetTimezone</a><br />    <a target="mainFrame" href="psycopg2.tz.LocalTimezone-class.html"
     >LocalTimezone</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="psycopg2.tz-module.html#DSTDIFF"
     >DSTDIFF</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#DSTOFFSET"
     >DSTOFFSET</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#LOCAL"
     >LOCAL</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#STDOFFSET"
     >STDOFFSET</a><br />    <a target="mainFrame" href="psycopg2.tz-module.html#ZERO"
     >ZERO</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-sqlite3.dbapi2-module.html version [cc3d655c7e].















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>dbapi2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module dbapi2</h1>
<hr />
  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="sqlite3.dbapi2-module.html#DateFromTicks"
     >DateFromTicks</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#TimeFromTicks"
     >TimeFromTicks</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#TimestampFromTicks"
     >TimestampFromTicks</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="sqlite3.dbapi2-module.html#PARSE_COLNAMES"
     >PARSE_COLNAMES</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#PARSE_DECLTYPES"
     >PARSE_DECLTYPES</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_ALTER_TABLE"
     >SQLITE_ALTER_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_ANALYZE"
     >SQLITE_ANALYZE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_ATTACH"
     >SQLITE_ATTACH</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_INDEX"
     >SQLITE_CREATE_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TABLE"
     >SQLITE_CREATE_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_INDEX"
     >SQLITE_CREATE_TEMP_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TABLE"
     >SQLITE_CREATE_TEMP_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_TRIGGER"
     >SQLITE_CREATE_TEMP_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TEMP_VIEW"
     >SQLITE_CREATE_TEMP_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_TRIGGER"
     >SQLITE_CREATE_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_CREATE_VIEW"
     >SQLITE_CREATE_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DELETE"
     >SQLITE_DELETE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DENY"
     >SQLITE_DENY</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DETACH"
     >SQLITE_DETACH</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_INDEX"
     >SQLITE_DROP_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TABLE"
     >SQLITE_DROP_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_INDEX"
     >SQLITE_DROP_TEMP_INDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TABLE"
     >SQLITE_DROP_TEMP_TABLE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_TRIGGER"
     >SQLITE_DROP_TEMP_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TEMP_VIEW"
     >SQLITE_DROP_TEMP_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_TRIGGER"
     >SQLITE_DROP_TRIGGER</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_DROP_VIEW"
     >SQLITE_DROP_VIEW</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_IGNORE"
     >SQLITE_IGNORE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_INSERT"
     >SQLITE_INSERT</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_OK"
     >SQLITE_OK</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_PRAGMA"
     >SQLITE_PRAGMA</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_READ"
     >SQLITE_READ</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_REINDEX"
     >SQLITE_REINDEX</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_SELECT"
     >SQLITE_SELECT</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_TRANSACTION"
     >SQLITE_TRANSACTION</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#SQLITE_UPDATE"
     >SQLITE_UPDATE</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#adapters"
     >adapters</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#apilevel"
     >apilevel</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#converters"
     >converters</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#paramstyle"
     >paramstyle</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#sqlite_version"
     >sqlite_version</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#sqlite_version_info"
     >sqlite_version_info</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#threadsafety"
     >threadsafety</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#version"
     >version</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#version_info"
     >version_info</a><br />    <a target="mainFrame" href="sqlite3.dbapi2-module.html#x"
     >x</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon-module.html version [e5c2599ab2].




































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>gluon</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module gluon</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.html.A-class.html"
     >A</a><br />    <a target="mainFrame" href="web2py.gluon.html.B-class.html"
     >B</a><br />    <a target="mainFrame" href="web2py.gluon.html.BEAUTIFY-class.html"
     >BEAUTIFY</a><br />    <a target="mainFrame" href="web2py.gluon.html.BODY-class.html"
     >BODY</a><br />    <a target="mainFrame" href="web2py.gluon.html.BR-class.html"
     >BR</a><br />    <a target="mainFrame" href="web2py.gluon.html.CAT-class.html"
     >CAT</a><br />    <a target="mainFrame" href="web2py.gluon.html.CENTER-class.html"
     >CENTER</a><br />    <a target="mainFrame" href="web2py.gluon.validators.CLEANUP-class.html"
     >CLEANUP</a><br />    <a target="mainFrame" href="web2py.gluon.html.CODE-class.html"
     >CODE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.CRYPT-class.html"
     >CRYPT</a><br />    <a target="mainFrame" href="web2py.gluon.dal.DAL-class.html"
     >DAL</a><br />    <a target="mainFrame" href="web2py.gluon.html.DIV-class.html"
     >DIV</a><br />    <a target="mainFrame" href="web2py.gluon.html.EM-class.html"
     >EM</a><br />    <a target="mainFrame" href="web2py.gluon.html.EMBED-class.html"
     >EMBED</a><br />    <a target="mainFrame" href="web2py.gluon.html.FIELDSET-class.html"
     >FIELDSET</a><br />    <a target="mainFrame" href="web2py.gluon.html.FORM-class.html"
     >FORM</a><br />    <a target="mainFrame" href="web2py.gluon.dal.Field-class.html"
     >Field</a><br />    <a target="mainFrame" href="web2py.gluon.html.H1-class.html"
     >H1</a><br />    <a target="mainFrame" href="web2py.gluon.html.H2-class.html"
     >H2</a><br />    <a target="mainFrame" href="web2py.gluon.html.H3-class.html"
     >H3</a><br />    <a target="mainFrame" href="web2py.gluon.html.H4-class.html"
     >H4</a><br />    <a target="mainFrame" href="web2py.gluon.html.H5-class.html"
     >H5</a><br />    <a target="mainFrame" href="web2py.gluon.html.H6-class.html"
     >H6</a><br />    <a target="mainFrame" href="web2py.gluon.html.HEAD-class.html"
     >HEAD</a><br />    <a target="mainFrame" href="web2py.gluon.html.HR-class.html"
     >HR</a><br />    <a target="mainFrame" href="web2py.gluon.html.HTML-class.html"
     >HTML</a><br />    <a target="mainFrame" href="web2py.gluon.http.HTTP-class.html"
     >HTTP</a><br />    <a target="mainFrame" href="web2py.gluon.html.I-class.html"
     >I</a><br />    <a target="mainFrame" href="web2py.gluon.html.IFRAME-class.html"
     >IFRAME</a><br />    <a target="mainFrame" href="web2py.gluon.html.IMG-class.html"
     >IMG</a><br />    <a target="mainFrame" href="web2py.gluon.html.INPUT-class.html"
     >INPUT</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html"
     >IS_ALPHANUMERIC</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_DATE-class.html"
     >IS_DATE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_DATETIME-class.html"
     >IS_DATETIME</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html"
     >IS_DATETIME_IN_RANGE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html"
     >IS_DATE_IN_RANGE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html"
     >IS_DECIMAL_IN_RANGE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_EMAIL-class.html"
     >IS_EMAIL</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_EMPTY_OR-class.html"
     >IS_EMPTY_OR</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_EQUAL_TO-class.html"
     >IS_EQUAL_TO</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_EXPR-class.html"
     >IS_EXPR</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html"
     >IS_FLOAT_IN_RANGE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_IMAGE-class.html"
     >IS_IMAGE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html"
     >IS_INT_IN_RANGE</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_DB-class.html"
     >IS_IN_DB</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_SET-class.html"
     >IS_IN_SET</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_IPV4-class.html"
     >IS_IPV4</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_LENGTH-class.html"
     >IS_LENGTH</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_LIST_OF-class.html"
     >IS_LIST_OF</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_LOWER-class.html"
     >IS_LOWER</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_MATCH-class.html"
     >IS_MATCH</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_NOT_EMPTY-class.html"
     >IS_NOT_EMPTY</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html"
     >IS_NOT_IN_DB</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_EMPTY_OR-class.html"
     >IS_NULL_OR</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_SLUG-class.html"
     >IS_SLUG</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_STRONG-class.html"
     >IS_STRONG</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_TIME-class.html"
     >IS_TIME</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html"
     >IS_UPLOAD_FILENAME</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_UPPER-class.html"
     >IS_UPPER</a><br />    <a target="mainFrame" href="web2py.gluon.validators.IS_URL-class.html"
     >IS_URL</a><br />    <a target="mainFrame" href="web2py.gluon.html.LABEL-class.html"
     >LABEL</a><br />    <a target="mainFrame" href="web2py.gluon.html.LEGEND-class.html"
     >LEGEND</a><br />    <a target="mainFrame" href="web2py.gluon.html.LI-class.html"
     >LI</a><br />    <a target="mainFrame" href="web2py.gluon.html.LINK-class.html"
     >LINK</a><br />    <a target="mainFrame" href="web2py.gluon.html.MARKMIN-class.html"
     >MARKMIN</a><br />    <a target="mainFrame" href="web2py.gluon.html.MENU-class.html"
     >MENU</a><br />    <a target="mainFrame" href="web2py.gluon.html.META-class.html"
     >META</a><br />    <a target="mainFrame" href="web2py.gluon.html.OBJECT-class.html"
     >OBJECT</a><br />    <a target="mainFrame" href="web2py.gluon.html.OL-class.html"
     >OL</a><br />    <a target="mainFrame" href="web2py.gluon.html.OPTGROUP-class.html"
     >OPTGROUP</a><br />    <a target="mainFrame" href="web2py.gluon.html.OPTION-class.html"
     >OPTION</a><br />    <a target="mainFrame" href="web2py.gluon.html.P-class.html"
     >P</a><br />    <a target="mainFrame" href="web2py.gluon.html.PRE-class.html"
     >PRE</a><br />    <a target="mainFrame" href="web2py.gluon.html.SCRIPT-class.html"
     >SCRIPT</a><br />    <a target="mainFrame" href="web2py.gluon.html.SELECT-class.html"
     >SELECT</a><br />    <a target="mainFrame" href="web2py.gluon.html.SPAN-class.html"
     >SPAN</a><br />    <a target="mainFrame" href="web2py.gluon.sqlhtml.SQLFORM-class.html"
     >SQLFORM</a><br />    <a target="mainFrame" href="web2py.gluon.sqlhtml.SQLTABLE-class.html"
     >SQLTABLE</a><br />    <a target="mainFrame" href="web2py.gluon.html.STYLE-class.html"
     >STYLE</a><br />    <a target="mainFrame" href="web2py.gluon.html.TABLE-class.html"
     >TABLE</a><br />    <a target="mainFrame" href="web2py.gluon.html.TBODY-class.html"
     >TBODY</a><br />    <a target="mainFrame" href="web2py.gluon.html.TD-class.html"
     >TD</a><br />    <a target="mainFrame" href="web2py.gluon.html.TEXTAREA-class.html"
     >TEXTAREA</a><br />    <a target="mainFrame" href="web2py.gluon.html.TFOOT-class.html"
     >TFOOT</a><br />    <a target="mainFrame" href="web2py.gluon.html.TH-class.html"
     >TH</a><br />    <a target="mainFrame" href="web2py.gluon.html.THEAD-class.html"
     >THEAD</a><br />    <a target="mainFrame" href="web2py.gluon.html.TITLE-class.html"
     >TITLE</a><br />    <a target="mainFrame" href="web2py.gluon.html.TR-class.html"
     >TR</a><br />    <a target="mainFrame" href="web2py.gluon.html.TT-class.html"
     >TT</a><br />    <a target="mainFrame" href="web2py.gluon.html.UL-class.html"
     >UL</a><br />    <a target="mainFrame" href="web2py.gluon.html.XHTML-class.html"
     >XHTML</a><br />    <a target="mainFrame" href="web2py.gluon.html.XML-class.html"
     >XML</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon-module.html#URL"
     >URL</a><br />    <a target="mainFrame" href="web2py.gluon-module.html#embed64"
     >embed64</a><br />    <a target="mainFrame" href="web2py.gluon-module.html#redirect"
     >redirect</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon-module.html#ON"
     >ON</a><br />    <a target="mainFrame" href="web2py.gluon-module.html#TAG"
     >TAG</a><br />    <a target="mainFrame" href="web2py.gluon-module.html#current"
     >current</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.admin-module.html version [a7e715d95c].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>admin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module admin</h1>
<hr />
  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.admin-module.html#add_path_first"
     >add_path_first</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#apath"
     >apath</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_cleanup"
     >app_cleanup</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_compile"
     >app_compile</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_create"
     >app_create</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_install"
     >app_install</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_pack"
     >app_pack</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_pack_compiled"
     >app_pack_compiled</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#app_uninstall"
     >app_uninstall</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#check_new_version"
     >check_new_version</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#create_missing_app_folders"
     >create_missing_app_folders</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#create_missing_folders"
     >create_missing_folders</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#plugin_install"
     >plugin_install</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#plugin_pack"
     >plugin_pack</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#unzip"
     >unzip</a><br />    <a target="mainFrame" href="web2py.gluon.admin-module.html#upgrade"
     >upgrade</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.cfs-module.html version [959737b8c7].










































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>cfs</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module cfs</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cfs-module.html#getcfs"
     >getcfs</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cfs-module.html#cfs"
     >cfs</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.cfs-module.html#cfs_lock"
     >cfs_lock</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.compileapp-module.html version [93e4a8d8be].





















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>compileapp</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module compileapp</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.compileapp.LoadFactory-class.html"
     >LoadFactory</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp.mybuiltin-class.html"
     >mybuiltin</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#build_environment"
     >build_environment</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_application"
     >compile_application</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_controllers"
     >compile_controllers</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_models"
     >compile_models</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#compile_views"
     >compile_views</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#local_import_aux"
     >local_import_aux</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#read_pyc"
     >read_pyc</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#remove_compiled_application"
     >remove_compiled_application</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#run_controller_in"
     >run_controller_in</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#run_models_in"
     >run_models_in</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#run_view_in"
     >run_view_in</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#save_pyc"
     >save_pyc</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#test"
     >test</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#TEST_CODE"
     >TEST_CODE</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#is_gae"
     >is_gae</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#is_jython"
     >is_jython</a><br />    <a target="mainFrame" href="web2py.gluon.compileapp-module.html#logger"
     >logger</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.contenttype-module.html version [ee8e7493ad].







































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>contenttype</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module contenttype</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contenttype-module.html#contenttype"
     >contenttype</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contenttype-module.html#CONTENT_TYPE"
     >CONTENT_TYPE</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql-module.html version [dce5967558].





























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pymysql</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module pymysql</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.DBAPISet-class.html"
     >DBAPISet</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.DataError-class.html"
     >DataError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html"
     >DatabaseError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="datetime.date-class.html"
     >Date</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.Error-class.html"
     >Error</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html"
     >IntegrityError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html"
     >InterfaceError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.InternalError-class.html"
     >InternalError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html"
     >NotSupportedError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html"
     >OperationalError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html"
     >ProgrammingError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="datetime.time-class.html"
     >Time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="datetime.datetime-class.html"
     >Timestamp</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.err.Warning-class.html"
     >Warning</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#Binary"
     >Binary</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#Connect"
     >Connect</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#Connection"
     >Connection</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#DateFromTicks"
     >DateFromTicks</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#TimeFromTicks"
     >TimeFromTicks</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#TimestampFromTicks"
     >TimestampFromTicks</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#connect"
     >connect</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#escape_dict"
     >escape_dict</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#escape_sequence"
     >escape_sequence</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#escape_string"
     >escape_string</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#get_client_info"
     >get_client_info</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#install_as_MySQLdb"
     >install_as_MySQLdb</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#thread_safe"
     >thread_safe</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#BINARY"
     >BINARY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#DATE"
     >DATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#DATETIME"
     >DATETIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#NULL"
     >NULL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#NUMBER"
     >NUMBER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#ROWID"
     >ROWID</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#STRING"
     >STRING</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#TIME"
     >TIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#TIMESTAMP"
     >TIMESTAMP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#VERSION"
     >VERSION</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#apilevel"
     >apilevel</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#paramstyle"
     >paramstyle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#threadsafety"
     >threadsafety</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql-module.html#version_info"
     >version_info</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql.constants-module.html version [475eb8ccf2].































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>constants</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module constants</h1>
<hr />
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html version [c597ca903f].























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>FIELD_TYPE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module FIELD_TYPE</h1>
<hr />
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BIT"
     >BIT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB"
     >BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#CHAR"
     >CHAR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE"
     >DATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME"
     >DATETIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL"
     >DECIMAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE"
     >DOUBLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#ENUM"
     >ENUM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT"
     >FLOAT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#GEOMETRY"
     >GEOMETRY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24"
     >INT24</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INTERVAL"
     >INTERVAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG"
     >LONG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG"
     >LONGLONG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB"
     >LONG_BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB"
     >MEDIUM_BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDATE"
     >NEWDATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDECIMAL"
     >NEWDECIMAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NULL"
     >NULL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SET"
     >SET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SHORT"
     >SHORT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING"
     >STRING</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME"
     >TIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP"
     >TIMESTAMP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY"
     >TINY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB"
     >TINY_BLOB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VARCHAR"
     >VARCHAR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING"
     >VAR_STRING</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR"
     >YEAR</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql.converters-module.html version [8395aec7ee].










































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>converters</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module converters</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_bit"
     >convert_bit</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_characters"
     >convert_characters</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_date"
     >convert_date</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime"
     >convert_datetime</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_decimal"
     >convert_decimal</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_float"
     >convert_float</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_int"
     >convert_int</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_long"
     >convert_long</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp"
     >convert_mysql_timestamp</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_set"
     >convert_set</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_time"
     >convert_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta"
     >convert_timedelta</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_None"
     >escape_None</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_bool"
     >escape_bool</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_date"
     >escape_date</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_datetime"
     >escape_datetime</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_decimal"
     >escape_decimal</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_dict"
     >escape_dict</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_float"
     >escape_float</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_int"
     >escape_int</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_item"
     >escape_item</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_long"
     >escape_long</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_object"
     >escape_object</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence"
     >escape_sequence</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_set"
     >escape_set</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_string"
     >escape_string</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_struct_time"
     >escape_struct_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_time"
     >escape_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_timedelta"
     >escape_timedelta</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode"
     >escape_unicode</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_MAP"
     >ESCAPE_MAP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_REGEX"
     >ESCAPE_REGEX</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#conversions"
     >conversions</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#decoders"
     >decoders</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.contrib.pymysql.converters-module.html#encoders"
     >encoders</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.custom_import-module.html version [c00690a506].





























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>custom_import</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module custom_import</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._BaseImporter-class.html"
     >_BaseImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._DateTrackerImporter-class.html"
     >_DateTrackerImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html"
     >_Web2pyDateTrackerImporter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import._Web2pyImporter-class.html"
     >_Web2pyImporter</a><br />  </div>
  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#custom_import_install"
     >custom_import_install</a><br />    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#is_tracking_changes"
     >is_tracking_changes</a><br />    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#track_changes"
     >track_changes</a><br />  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_is_tracking_changes"
     >_is_tracking_changes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_web2py_date_tracker_importer"
     >_web2py_date_tracker_importer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_web2py_importer"
     >_web2py_importer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.custom_import-module.html#_web2py_path"
     >_web2py_path</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.dal-module.html version [47ee44525c].







































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>dal</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module dal</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.BaseAdapter-class.html"
     >BaseAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.ConnectionPool-class.html"
     >ConnectionPool</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.CouchDBAdapter-class.html"
     >CouchDBAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.CubridAdapter-class.html"
     >CubridAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DAL-class.html"
     >DAL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DB2Adapter-class.html"
     >DB2Adapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DatabaseStoredFile-class.html"
     >DatabaseStoredFile</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Expression-class.html"
     >Expression</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Field-class.html"
     >Field</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.FireBirdAdapter-class.html"
     >FireBirdAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html"
     >FireBirdEmbeddedAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GAEDecimalProperty-class.html"
     >GAEDecimalProperty</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GAEF-class.html"
     >GAEF</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DAL-class.html"
     >GQLDB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html"
     >GoogleDatastoreAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.GoogleSQLAdapter-class.html"
     >GoogleSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.InformixAdapter-class.html"
     >InformixAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.IngresAdapter-class.html"
     >IngresAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.IngresUnicodeAdapter-class.html"
     >IngresUnicodeAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html"
     >JDBCPostgreSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html"
     >JDBCSQLiteAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MSSQL2Adapter-class.html"
     >MSSQL2Adapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MSSQLAdapter-class.html"
     >MSSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MongoDBAdapter-class.html"
     >MongoDBAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.MySQLAdapter-class.html"
     >MySQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.NoSQLAdapter-class.html"
     >NoSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.OracleAdapter-class.html"
     >OracleAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.PostgreSQLAdapter-class.html"
     >PostgreSQLAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Query-class.html"
     >Query</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Reference-class.html"
     >Reference</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Row-class.html"
     >Row</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Rows-class.html"
     >Rows</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SAPDBAdapter-class.html"
     >SAPDBAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLALL-class.html"
     >SQLALL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLCallableList-class.html"
     >SQLCallableList</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLCustomType-class.html"
     >SQLCustomType</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.DAL-class.html"
     >SQLDB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Field-class.html"
     >SQLField</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Query-class.html"
     >SQLQuery</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Rows-class.html"
     >SQLRows</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Set-class.html"
     >SQLSet</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Row-class.html"
     >SQLStorage</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Table-class.html"
     >SQLTable</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Expression-class.html"
     >SQLXorable</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.SQLiteAdapter-class.html"
     >SQLiteAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Set-class.html"
     >Set</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.Table-class.html"
     >Table</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.TeradataAdapter-class.html"
     >TeradataAdapter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal.UseDatabaseStoredFile-class.html"
     >UseDatabaseStoredFile</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#DEFAULT"
     >DEFAULT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Reference_pickler"
     >Reference_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Reference_unpickler"
     >Reference_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Row_pickler"
     >Row_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Row_unpickler"
     >Row_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Rows_pickler"
     >Rows_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#Rows_unpickler"
     >Rows_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_decode_integer"
     >bar_decode_integer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_decode_string"
     >bar_decode_string</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_encode"
     >bar_encode</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#bar_escape"
     >bar_escape</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#cleanup"
     >cleanup</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#int2uuid"
     >int2uuid</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#sqlhtml_validators"
     >sqlhtml_validators</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#test_all"
     >test_all</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#update_record"
     >update_record</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#uuid2int"
     >uuid2int</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#xorify"
     >xorify</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#ADAPTERS"
     >ADAPTERS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#CALLABLETYPES"
     >CALLABLETYPES</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#INFINITY"
     >INFINITY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#INGRES_SEQNAME"
     >INGRES_SEQNAME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#MAXCHARLENGTH"
     >MAXCHARLENGTH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#drivers"
     >drivers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#have_portalocker"
     >have_portalocker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#have_serializers"
     >have_serializers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#have_validators"
     >have_validators</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#is_jdbc"
     >is_jdbc</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#logger"
     >logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_cleanup_fn"
     >regex_cleanup_fn</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_content"
     >regex_content</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_dbname"
     >regex_dbname</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_python_keywords"
     >regex_python_keywords</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#regex_quotes"
     >regex_quotes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#sql_locker"
     >sql_locker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#string_unpack"
     >string_unpack</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#table_field"
     >table_field</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.dal-module.html#thread"
     >thread</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.debug-module.html version [044eae7ecb].










































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>debug</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module debug</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.debug.Pipe-class.html"
     >Pipe</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.debug-module.html#communicate"
     >communicate</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#set_trace"
     >set_trace</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#stop_trace"
     >stop_trace</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.debug-module.html#debugger"
     >debugger</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#logger"
     >logger</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#pipe_in"
     >pipe_in</a><br />    <a target="mainFrame" href="web2py.gluon.debug-module.html#pipe_out"
     >pipe_out</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.decoder-module.html version [40d4d7156f].










































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>decoder</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module decoder</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.decoder-module.html#autoDetectXMLEncoding"
     >autoDetectXMLEncoding</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.decoder-module.html#decoder"
     >decoder</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.decoder-module.html#autodetect_dict"
     >autodetect_dict</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.fileutils-module.html version [6fd241c0d3].


































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>fileutils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module fileutils</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#_extractall"
     >_extractall</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#abspath"
     >abspath</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#check_credentials"
     >check_credentials</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#cleanpath"
     >cleanpath</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#copystream"
     >copystream</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#fix_newlines"
     >fix_newlines</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#get_session"
     >get_session</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#listdir"
     >listdir</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#make_fake_file_like_object"
     >make_fake_file_like_object</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#mktree"
     >mktree</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#read_file"
     >read_file</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#readlines_file"
     >readlines_file</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#recursive_unlink"
     >recursive_unlink</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#tar"
     >tar</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#tar_compiled"
     >tar_compiled</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#untar"
     >untar</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#up"
     >up</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_pack"
     >w2p_pack</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_pack_plugin"
     >w2p_pack_plugin</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_unpack"
     >w2p_unpack</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#w2p_unpack_plugin"
     >w2p_unpack_plugin</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.fileutils-module.html#write_file"
     >write_file</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.globals-module.html version [935714ef40].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>globals</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module globals</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals.Request-class.html"
     >Request</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals.Response-class.html"
     >Response</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals.Session-class.html"
     >Session</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals-module.html#current"
     >current</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.globals-module.html#regex_session_id"
     >regex_session_id</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.highlight-module.html version [960d2f424a].







































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>highlight</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module highlight</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.highlight.Highlighter-class.html"
     >Highlighter</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.highlight-module.html#highlight"
     >highlight</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.html-module.html version [831543d28e].









































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>html</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module html</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.A-class.html"
     >A</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.B-class.html"
     >B</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BEAUTIFY-class.html"
     >BEAUTIFY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BODY-class.html"
     >BODY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BR-class.html"
     >BR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.BUTTON-class.html"
     >BUTTON</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.CAT-class.html"
     >CAT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.CENTER-class.html"
     >CENTER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.CODE-class.html"
     >CODE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.COL-class.html"
     >COL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.COLGROUP-class.html"
     >COLGROUP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.DIV-class.html"
     >DIV</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.EM-class.html"
     >EM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.EMBED-class.html"
     >EMBED</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.FIELDSET-class.html"
     >FIELDSET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.FORM-class.html"
     >FORM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H1-class.html"
     >H1</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H2-class.html"
     >H2</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H3-class.html"
     >H3</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H4-class.html"
     >H4</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H5-class.html"
     >H5</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.H6-class.html"
     >H6</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.HEAD-class.html"
     >HEAD</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.HR-class.html"
     >HR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.HTML-class.html"
     >HTML</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.I-class.html"
     >I</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.IFRAME-class.html"
     >IFRAME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.IMG-class.html"
     >IMG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.INPUT-class.html"
     >INPUT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LABEL-class.html"
     >LABEL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LEGEND-class.html"
     >LEGEND</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LI-class.html"
     >LI</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.LINK-class.html"
     >LINK</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.MARKMIN-class.html"
     >MARKMIN</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.MENU-class.html"
     >MENU</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.META-class.html"
     >META</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OBJECT-class.html"
     >OBJECT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OL-class.html"
     >OL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OPTGROUP-class.html"
     >OPTGROUP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.OPTION-class.html"
     >OPTION</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.P-class.html"
     >P</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.PRE-class.html"
     >PRE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.SCRIPT-class.html"
     >SCRIPT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.SELECT-class.html"
     >SELECT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.SPAN-class.html"
     >SPAN</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.STYLE-class.html"
     >STYLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TABLE-class.html"
     >TABLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TBODY-class.html"
     >TBODY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TD-class.html"
     >TD</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TEXTAREA-class.html"
     >TEXTAREA</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TFOOT-class.html"
     >TFOOT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TH-class.html"
     >TH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.THEAD-class.html"
     >THEAD</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TITLE-class.html"
     >TITLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TR-class.html"
     >TR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.TT-class.html"
     >TT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.UL-class.html"
     >UL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.XHTML-class.html"
     >XHTML</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.XML-class.html"
     >XML</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.XmlComponent-class.html"
     >XmlComponent</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.__TAG__-class.html"
     >__TAG__</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html.web2pyHTMLParser-class.html"
     >web2pyHTMLParser</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#TAG_pickler"
     >TAG_pickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#TAG_unpickler"
     >TAG_unpickler</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#URL"
     >URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#XML_pickle"
     >XML_pickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#XML_unpickle"
     >XML_unpickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#embed64"
     >embed64</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#join"
     >join</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#markdown_serializer"
     >markdown_serializer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#markmin_serializer"
     >markmin_serializer</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#test"
     >test</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#verifyURL"
     >verifyURL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#xmlescape"
     >xmlescape</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#ON"
     >ON</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#TAG"
     >TAG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.html-module.html#regex_crlf"
     >regex_crlf</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.http-module.html version [508663cb02].














































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>http</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module http</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="exceptions.Exception-class.html"
     >BaseException</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.http.HTTP-class.html"
     >HTTP</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.http-module.html#redirect"
     >redirect</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.http-module.html#defined_status"
     >defined_status</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.import_all-module.html version [33e2761ec5].












































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>import_all</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module import_all</h1>
<hr />
  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.import_all-module.html#alert_dependency"
     >alert_dependency</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#base_modules"
     >base_modules</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#candidate"
     >candidate</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#contributed_modules"
     >contributed_modules</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#dirs"
     >dirs</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#files"
     >files</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#module"
     >module</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#name"
     >name</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#py26_deprecated"
     >py26_deprecated</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#py27_deprecated"
     >py27_deprecated</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#python_version"
     >python_version</a><br />    <a target="mainFrame" href="web2py.gluon.import_all-module.html#root"
     >root</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.languages-module.html version [6fcbc298a9].












































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>languages</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module languages</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages.lazyT-class.html"
     >lazyT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages.translator-class.html"
     >translator</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#findT"
     >findT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#lazyT_pickle"
     >lazyT_pickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#lazyT_unpickle"
     >lazyT_unpickle</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#read_dict"
     >read_dict</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#read_dict_aux"
     >read_dict_aux</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#update_all_languages"
     >update_all_languages</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#utf8_repr"
     >utf8_repr</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#write_dict"
     >write_dict</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE"
     >PY_STRING_LITERAL_RE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#is_gae"
     >is_gae</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#regex_language"
     >regex_language</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.languages-module.html#regex_translate"
     >regex_translate</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.main-module.html version [4f3509a60a].
















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>main</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module main</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.main.HttpServer-class.html"
     >HttpServer</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.main-module.html#appfactory"
     >appfactory</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#copystream_progress"
     >copystream_progress</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#environ_aux"
     >environ_aux</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#get_client"
     >get_client</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#middleware_aux"
     >middleware_aux</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#parse_get_post_vars"
     >parse_get_post_vars</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.main-module.html#save_password"
     >save_password</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#serve_controller"
     >serve_controller</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#start_response_aux"
     >start_response_aux</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.main-module.html#wsgibase"
     >wsgibase</a><br />  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#logger"
     >logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#logpath"
     >logpath</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#regex_client"
     >regex_client</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#requests"
     >requests</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#version_info"
     >version_info</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#web2py_path"
     >web2py_path</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.main-module.html#web2py_version"
     >web2py_version</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.myregex-module.html version [6a946ca9dd].












































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>myregex</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module myregex</h1>
<hr />
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_expose"
     >regex_expose</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_extend"
     >regex_extend</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_include"
     >regex_include</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.myregex-module.html#regex_tables"
     >regex_tables</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.newcron-module.html version [d7b0aecedb].















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>newcron</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module newcron</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.newcron.Token-class.html"
     >Token</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.cronlauncher-class.html"
     >cronlauncher</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.extcron-class.html"
     >extcron</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.hardcron-class.html"
     >hardcron</a><br />    <a target="mainFrame" href="web2py.gluon.newcron.softcron-class.html"
     >softcron</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.newcron-module.html#crondance"
     >crondance</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#parsecronline"
     >parsecronline</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#rangetolist"
     >rangetolist</a><br />    <a target="mainFrame" href="web2py.gluon.newcron-module.html#stopcron"
     >stopcron</a><br />  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.newcron-module.html#_cron_stopping"
     >_cron_stopping</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.newcron-module.html#logger"
     >logger</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.portalocker-module.html version [17809e2a47].

























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>portalocker</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module portalocker</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#lock"
     >lock</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#unlock"
     >unlock</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#LOCK_EX"
     >LOCK_EX</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#LOCK_NB"
     >LOCK_NB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#LOCK_SH"
     >LOCK_SH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#__overlapped"
     >__overlapped</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#logger"
     >logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.portalocker-module.html#os_locking"
     >os_locking</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.reserved_sql_keywords-module.html version [79280176ff].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>reserved_sql_keywords</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module reserved_sql_keywords</h1>
<hr />
  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#ADAPTERS"
     >ADAPTERS</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#COMMON"
     >COMMON</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#DB2"
     >DB2</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD"
     >FIREBIRD</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD_NONRESERVED"
     >FIREBIRD_NONRESERVED</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#INFORMIX"
     >INFORMIX</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#INGRES"
     >INGRES</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#JDBCPOSTGRESQL"
     >JDBCPOSTGRESQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#JDBCSQLITE"
     >JDBCSQLITE</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#MSSQL"
     >MSSQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#MYSQL"
     >MYSQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#ORACLE"
     >ORACLE</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL"
     >POSTGRESQL</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL_NONRESERVED"
     >POSTGRESQL_NONRESERVED</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#SQLITE"
     >SQLITE</a><br />    <a target="mainFrame" href="web2py.gluon.reserved_sql_keywords-module.html#__author__"
     >__author__</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.restricted-module.html version [385bc2259a].












































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>restricted</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module restricted</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.restricted.RestrictedError-class.html"
     >RestrictedError</a><br />    <a target="mainFrame" href="web2py.gluon.restricted.TicketStorage-class.html"
     >TicketStorage</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.restricted-module.html#compile2"
     >compile2</a><br />    <a target="mainFrame" href="web2py.gluon.restricted-module.html#restricted"
     >restricted</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.restricted-module.html#snapshot"
     >snapshot</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.restricted-module.html#logger"
     >logger</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.rewrite-module.html version [6df2360817].








































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>rewrite</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module rewrite</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite.MapUrlIn-class.html"
     >MapUrlIn</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite.MapUrlOut-class.html"
     >MapUrlOut</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#_params_default"
     >_params_default</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#_router_default"
     >_router_default</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#compile_regex"
     >compile_regex</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#filter_err"
     >filter_err</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#filter_url"
     >filter_url</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#get_effective_router"
     >get_effective_router</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#load"
     >load</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#load_routers"
     >load_routers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#map_url_in"
     >map_url_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#map_url_out"
     >map_url_out</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_filter_in"
     >regex_filter_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_filter_out"
     >regex_filter_out</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_select"
     >regex_select</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_uri"
     >regex_uri</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_url_in"
     >regex_url_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#try_redirect_on_error"
     >try_redirect_on_error</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#try_rewrite_on_error"
     >try_rewrite_on_error</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#url_in"
     >url_in</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#url_out"
     >url_out</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#ROUTER_BASE_KEYS"
     >ROUTER_BASE_KEYS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#ROUTER_KEYS"
     >ROUTER_KEYS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#logger"
     >logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#params"
     >params</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#params_apps"
     >params_apps</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_anything"
     >regex_anything</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_args"
     >regex_args</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_at"
     >regex_at</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_space"
     >regex_space</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_static"
     >regex_static</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#regex_url"
     >regex_url</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#routers"
     >routers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rewrite-module.html#thread"
     >thread</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.rocket-module.html version [045556ff3d].



















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>rocket</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module rocket</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.BadRequest-class.html"
     >BadRequest</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.ChunkedReader-class.html"
     >ChunkedReader</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Connection-class.html"
     >Connection</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.FileWrapper-class.html"
     >FileWrapper</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Headers-class.html"
     >Headers</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Listener-class.html"
     >Listener</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Monitor-class.html"
     >Monitor</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket.NullHandler-class.html"
     >NullHandler</a><br />    <a target="mainFrame" href="web2py.gluon.rocket.Rocket-class.html"
     >Rocket</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.SSLError-class.html"
     >SSLError</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.SocketClosed-class.html"
     >SocketClosed</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.SocketTimeout-class.html"
     >SocketTimeout</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.ThreadPool-class.html"
     >ThreadPool</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.WSGIWorker-class.html"
     >WSGIWorker</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket.Worker-class.html"
     >Worker</a><br />  </div>
  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#CherryPyWSGIServer"
     >CherryPyWSGIServer</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#_formatparam"
     >_formatparam</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#b"
     >b</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#demo"
     >demo</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#demo_app"
     >demo_app</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#get_method"
     >get_method</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#u"
     >u</a><br />  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#BASE_ENV"
     >BASE_ENV</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#BUF_SIZE"
     >BUF_SIZE</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULTS"
     >DEFAULTS</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULT_LISTEN_QUEUE_SIZE"
     >DEFAULT_LISTEN_QUEUE_SIZE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULT_MAX_THREADS"
     >DEFAULT_MAX_THREADS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#DEFAULT_MIN_THREADS"
     >DEFAULT_MIN_THREADS</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#HEADER_RESPONSE"
     >HEADER_RESPONSE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#HTTP_METHODS"
     >HTTP_METHODS</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#HTTP_SERVER_SOFTWARE"
     >HTTP_SERVER_SOFTWARE</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#IGNORE_ERRORS_ON_CLOSE"
     >IGNORE_ERRORS_ON_CLOSE</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#IS_JYTHON"
     >IS_JYTHON</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#LOG_LINE"
     >LOG_LINE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#NEWLINE"
     >NEWLINE</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#PY3K"
     >PY3K</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#RESPONSE"
     >RESPONSE</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#SERVER_NAME"
     >SERVER_NAME</a><br />    <a target="mainFrame" href="web2py.gluon.rocket-module.html#SERVER_SOFTWARE"
     >SERVER_SOFTWARE</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#SOCKET_TIMEOUT"
     >SOCKET_TIMEOUT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#THREAD_STOP_CHECK_INTERVAL"
     >THREAD_STOP_CHECK_INTERVAL</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#VERSION"
     >VERSION</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#_tspecials"
     >_tspecials</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#has_ssl"
     >has_ssl</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#log"
     >log</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#re_REQUEST_LINE"
     >re_REQUEST_LINE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.rocket-module.html#re_SLASH"
     >re_SLASH</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.sanitizer-module.html version [5a61ccd126].










































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>sanitizer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module sanitizer</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sanitizer.XssCleaner-class.html"
     >XssCleaner</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sanitizer-module.html#sanitize"
     >sanitize</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sanitizer-module.html#xssescape"
     >xssescape</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.serializers-module.html version [4057bf45c4].


















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>serializers</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module serializers</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#csv"
     >csv</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#custom_json"
     >custom_json</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#json"
     >json</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#rss"
     >rss</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#xml"
     >xml</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.serializers-module.html#xml_rec"
     >xml_rec</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.settings-module.html version [306124ce3e].






































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>settings</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module settings</h1>
<hr />
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.settings-module.html#global_settings"
     >global_settings</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.settings-module.html#settings"
     >settings</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.shell-module.html version [519c05b9fe].











































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>shell</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module shell</h1>
<hr />
  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.shell-module.html#die"
     >die</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#env"
     >env</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#exec_environment"
     >exec_environment</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#exec_pythonrc"
     >exec_pythonrc</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#execute_from_command_line"
     >execute_from_command_line</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#get_usage"
     >get_usage</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#parse_path_info"
     >parse_path_info</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#run"
     >run</a><br />    <a target="mainFrame" href="web2py.gluon.shell-module.html#test"
     >test</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.shell-module.html#logger"
     >logger</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.sql-module.html version [c78d181c06].




































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>sql</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module sql</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.dal.DAL-class.html"
     >DAL</a><br />    <a target="mainFrame" href="web2py.gluon.dal.Field-class.html"
     >Field</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.sql-module.html#drivers"
     >drivers</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.sqlhtml-module.html version [a91cf4dccb].
















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>sqlhtml</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module sqlhtml</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html"
     >AutocompleteWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.BooleanWidget-class.html"
     >BooleanWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html"
     >CheckboxesWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DateWidget-class.html"
     >DateWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DatetimeWidget-class.html"
     >DatetimeWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DecimalWidget-class.html"
     >DecimalWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.DoubleWidget-class.html"
     >DoubleWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.FormWidget-class.html"
     >FormWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.IntegerWidget-class.html"
     >IntegerWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.ListWidget-class.html"
     >ListWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html"
     >MultipleOptionsWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.OptionsWidget-class.html"
     >OptionsWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.PasswordWidget-class.html"
     >PasswordWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.RadioWidget-class.html"
     >RadioWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.SQLFORM-class.html"
     >SQLFORM</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.SQLTABLE-class.html"
     >SQLTABLE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.StringWidget-class.html"
     >StringWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.TextWidget-class.html"
     >TextWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.TimeWidget-class.html"
     >TimeWidget</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml.UploadWidget-class.html"
     >UploadWidget</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#form_factory"
     >form_factory</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#represent"
     >represent</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#safe_float"
     >safe_float</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#safe_int"
     >safe_int</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#table_field"
     >table_field</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.sqlhtml-module.html#widget_class"
     >widget_class</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.storage-module.html version [dc89bdea5d].






















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>storage</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module storage</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.List-class.html"
     >List</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.Messages-class.html"
     >Messages</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.Settings-class.html"
     >Settings</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.Storage-class.html"
     >Storage</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage.StorageList-class.html"
     >StorageList</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage-module.html#load_storage"
     >load_storage</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.storage-module.html#save_storage"
     >save_storage</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.streamer-module.html version [d41c4b72b1].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>streamer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module streamer</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#stream_file_or_304_or_206"
     >stream_file_or_304_or_206</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#streamer"
     >streamer</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#DEFAULT_CHUNK_SIZE"
     >DEFAULT_CHUNK_SIZE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#regex_start_range"
     >regex_start_range</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.streamer-module.html#regex_stop_range"
     >regex_stop_range</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.template-module.html version [d3ae0a8298].









































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>template</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module template</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.template.BlockNode-class.html"
     >BlockNode</a><br />    <a target="mainFrame" href="web2py.gluon.template.Content-class.html"
     >Content</a><br />    <a target="mainFrame" href="web2py.gluon.template.Node-class.html"
     >Node</a><br />    <a target="mainFrame" href="web2py.gluon.template.SuperNode-class.html"
     >SuperNode</a><br />    <a target="mainFrame" href="web2py.gluon.template.TemplateParser-class.html"
     >TemplateParser</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.template-module.html#get_parsed"
     >get_parsed</a><br />    <a target="mainFrame" href="web2py.gluon.template-module.html#parse_template"
     >parse_template</a><br />    <a target="mainFrame" href="web2py.gluon.template-module.html#render"
     >render</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.tools-module.html version [f2cc8960ba].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tools</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module tools</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="web2py.gluon.tools.Auth-class.html"
     >Auth</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Crud-class.html"
     >Crud</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Mail-class.html"
     >Mail</a><br />    <a target="mainFrame" href="web2py.gluon.tools.PluginManager-class.html"
     >PluginManager</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Recaptcha-class.html"
     >Recaptcha</a><br />    <a target="mainFrame" href="web2py.gluon.tools.Service-class.html"
     >Service</a><br />  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#DEFAULT"
     >DEFAULT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#addrow"
     >addrow</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#call_or_redirect"
     >call_or_redirect</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#callback"
     >callback</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#completion"
     >completion</a><br />  </div>
    <a target="mainFrame" href="web2py.gluon.tools-module.html#fetch"
     >fetch</a><br />    <a target="mainFrame" href="web2py.gluon.tools-module.html#geocode"
     >geocode</a><br />    <a target="mainFrame" href="web2py.gluon.tools-module.html#prettydate"
     >prettydate</a><br />  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#test_thread_separation"
     >test_thread_separation</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#universal_caller"
     >universal_caller</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#validators"
     >validators</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#ON"
     >ON</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#TAG"
     >TAG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#current"
     >current</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#logger"
     >logger</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.tools-module.html#regex_geocode"
     >regex_geocode</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.utils-module.html version [b0871ad0dd].

























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>utils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module utils</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#get_digest"
     >get_digest</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#hmac_hash"
     >hmac_hash</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#initialize_urandom"
     >initialize_urandom</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#md5_hash"
     >md5_hash</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#simple_hash"
     >simple_hash</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#web2py_uuid"
     >web2py_uuid</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#ctokens"
     >ctokens</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.utils-module.html#logger"
     >logger</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.validators-module.html version [43d57f7c44].






























































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>validators</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module validators</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.CLEANUP-class.html"
     >CLEANUP</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.CRYPT-class.html"
     >CRYPT</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html"
     >IS_ALPHANUMERIC</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATE-class.html"
     >IS_DATE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATETIME-class.html"
     >IS_DATETIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html"
     >IS_DATETIME_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html"
     >IS_DATE_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html"
     >IS_DECIMAL_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EMAIL-class.html"
     >IS_EMAIL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EMPTY_OR-class.html"
     >IS_EMPTY_OR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EQUAL_TO-class.html"
     >IS_EQUAL_TO</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EXPR-class.html"
     >IS_EXPR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html"
     >IS_FLOAT_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_GENERIC_URL-class.html"
     >IS_GENERIC_URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_HTTP_URL-class.html"
     >IS_HTTP_URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IMAGE-class.html"
     >IS_IMAGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html"
     >IS_INT_IN_RANGE</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_DB-class.html"
     >IS_IN_DB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_SET-class.html"
     >IS_IN_SET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IN_SUBSET-class.html"
     >IS_IN_SUBSET</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_IPV4-class.html"
     >IS_IPV4</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_LENGTH-class.html"
     >IS_LENGTH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_LIST_OF-class.html"
     >IS_LIST_OF</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_LOWER-class.html"
     >IS_LOWER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_MATCH-class.html"
     >IS_MATCH</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_NOT_EMPTY-class.html"
     >IS_NOT_EMPTY</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html"
     >IS_NOT_IN_DB</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_EMPTY_OR-class.html"
     >IS_NULL_OR</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_SLUG-class.html"
     >IS_SLUG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_STRONG-class.html"
     >IS_STRONG</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_TIME-class.html"
     >IS_TIME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html"
     >IS_UPLOAD_FILENAME</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_UPPER-class.html"
     >IS_UPPER</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.IS_URL-class.html"
     >IS_URL</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators.Validator-class.html"
     >Validator</a><br />  </div>
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#escape_unicode"
     >escape_unicode</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#is_empty"
     >is_empty</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#options_sorter"
     >options_sorter</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#translate"
     >translate</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#unicode_to_ascii_authority"
     >unicode_to_ascii_authority</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#unicode_to_ascii_url"
     >unicode_to_ascii_url</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#urlify"
     >urlify</a><br />  </div>
  <h2 class="toc">Variables</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#all_url_schemes"
     >all_url_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#http_schemes"
     >http_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#label_split_regex"
     >label_split_regex</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#official_top_level_domains"
     >official_top_level_domains</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#official_url_schemes"
     >official_url_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#regex1"
     >regex1</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#regex2"
     >regex2</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#regex_time"
     >regex_time</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#unofficial_url_schemes"
     >unofficial_url_schemes</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.validators-module.html#url_split_regex"
     >url_split_regex</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.widget-module.html version [02cb1ae712].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>widget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module widget</h1>
<hr />
  <h2 class="toc">Classes</h2>
    <a target="mainFrame" href="exceptions.Exception-class.html"
     >BaseException</a><br />    <a target="mainFrame" href="web2py.gluon.widget.IO-class.html"
     >IO</a><br />    <a target="mainFrame" href="web2py.gluon.widget.web2pyDialog-class.html"
     >web2pyDialog</a><br />  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.widget-module.html#console"
     >console</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#presentation"
     >presentation</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#start"
     >start</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#start_browser"
     >start_browser</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#try_start_browser"
     >try_start_browser</a><br />  <h2 class="toc">Variables</h2>
    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramAuthor"
     >ProgramAuthor</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramInfo"
     >ProgramInfo</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramName"
     >ProgramName</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#ProgramVersion"
     >ProgramVersion</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#logger"
     >logger</a><br />    <a target="mainFrame" href="web2py.gluon.widget-module.html#msg"
     >msg</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.winservice-module.html version [618bdc4f34].








































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>winservice</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module winservice</h1>
<hr />
  <h2 class="toc">Classes</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.winservice.Service-class.html"
     >Service</a><br />  </div>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.winservice.Web2pyService-class.html"
     >Web2pyService</a><br />  </div>
  <h2 class="toc">Functions</h2>
    <a target="mainFrame" href="web2py.gluon.winservice-module.html#web2py_windows_service_handler"
     >web2py_windows_service_handler</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc-web2py.gluon.xmlrpc-module.html version [f7f520eab7].



































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>xmlrpc</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Module xmlrpc</h1>
<hr />
  <h2 class="toc">Functions</h2>
  <div class="private">
    <a target="mainFrame" href="web2py.gluon.xmlrpc-module.html#handler"
     >handler</a><br />  </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/toc.html version [a93743e4d3].





































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Table of Contents</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<h1 class="toc">Table&nbsp;of&nbsp;Contents</h1>
<hr />
  <a target="moduleFrame" href="toc-everything.html">Everything</a>
  <br />
  <h2 class="toc">Modules</h2>
    <a target="moduleFrame" href="toc-psycopg2-module.html"
     onclick="setFrame('toc-psycopg2-module.html','psycopg2-module.html');"     >psycopg2</a><br />    <a target="moduleFrame" href="toc-psycopg2.tz-module.html"
     onclick="setFrame('toc-psycopg2.tz-module.html','psycopg2.tz-module.html');"     >psycopg2.tz</a><br />    <a target="moduleFrame" href="toc-sqlite3.dbapi2-module.html"
     onclick="setFrame('toc-sqlite3.dbapi2-module.html','sqlite3.dbapi2-module.html');"     >sqlite3.dbapi2</a><br />    <a target="moduleFrame" href="toc-web2py.gluon-module.html"
     onclick="setFrame('toc-web2py.gluon-module.html','web2py.gluon-module.html');"     >web2py.gluon</a><br />    <a target="moduleFrame" href="toc-web2py.gluon.admin-module.html"
     onclick="setFrame('toc-web2py.gluon.admin-module.html','web2py.gluon.admin-module.html');"     >web2py.gluon.admin</a><br />    <a target="moduleFrame" href="toc-web2py.gluon.cache-module.html"
     onclick="setFrame('toc-web2py.gluon.cache-module.html','web2py.gluon.cache-module.html');"     >web2py.gluon.cache</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.cfs-module.html"
     onclick="setFrame('toc-web2py.gluon.cfs-module.html','web2py.gluon.cfs-module.html');"     >web2py.gluon.cfs</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.compileapp-module.html"
     onclick="setFrame('toc-web2py.gluon.compileapp-module.html','web2py.gluon.compileapp-module.html');"     >web2py.gluon.compileapp</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.contenttype-module.html"
     onclick="setFrame('toc-web2py.gluon.contenttype-module.html','web2py.gluon.contenttype-module.html');"     >web2py.gluon.contenttype</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.contrib.pymysql-module.html"
     onclick="setFrame('toc-web2py.gluon.contrib.pymysql-module.html','web2py.gluon.contrib.pymysql-module.html');"     >web2py.gluon.contrib.pymysql</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.contrib.pymysql.constants-module.html"
     onclick="setFrame('toc-web2py.gluon.contrib.pymysql.constants-module.html','web2py.gluon.contrib.pymysql.constants-module.html');"     >web2py.gluon.contrib.pymysql.constants</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html"
     onclick="setFrame('toc-web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html','web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html');"     >web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.contrib.pymysql.converters-module.html"
     onclick="setFrame('toc-web2py.gluon.contrib.pymysql.converters-module.html','web2py.gluon.contrib.pymysql.converters-module.html');"     >web2py.gluon.contrib.pymysql.converters</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.custom_import-module.html"
     onclick="setFrame('toc-web2py.gluon.custom_import-module.html','web2py.gluon.custom_import-module.html');"     >web2py.gluon.custom_import</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.dal-module.html"
     onclick="setFrame('toc-web2py.gluon.dal-module.html','web2py.gluon.dal-module.html');"     >web2py.gluon.dal</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.debug-module.html"
     onclick="setFrame('toc-web2py.gluon.debug-module.html','web2py.gluon.debug-module.html');"     >web2py.gluon.debug</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.decoder-module.html"
     onclick="setFrame('toc-web2py.gluon.decoder-module.html','web2py.gluon.decoder-module.html');"     >web2py.gluon.decoder</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.fileutils-module.html"
     onclick="setFrame('toc-web2py.gluon.fileutils-module.html','web2py.gluon.fileutils-module.html');"     >web2py.gluon.fileutils</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.globals-module.html"
     onclick="setFrame('toc-web2py.gluon.globals-module.html','web2py.gluon.globals-module.html');"     >web2py.gluon.globals</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.highlight-module.html"
     onclick="setFrame('toc-web2py.gluon.highlight-module.html','web2py.gluon.highlight-module.html');"     >web2py.gluon.highlight</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.html-module.html"
     onclick="setFrame('toc-web2py.gluon.html-module.html','web2py.gluon.html-module.html');"     >web2py.gluon.html</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.http-module.html"
     onclick="setFrame('toc-web2py.gluon.http-module.html','web2py.gluon.http-module.html');"     >web2py.gluon.http</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.import_all-module.html"
     onclick="setFrame('toc-web2py.gluon.import_all-module.html','web2py.gluon.import_all-module.html');"     >web2py.gluon.import_all</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.languages-module.html"
     onclick="setFrame('toc-web2py.gluon.languages-module.html','web2py.gluon.languages-module.html');"     >web2py.gluon.languages</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.main-module.html"
     onclick="setFrame('toc-web2py.gluon.main-module.html','web2py.gluon.main-module.html');"     >web2py.gluon.main</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.myregex-module.html"
     onclick="setFrame('toc-web2py.gluon.myregex-module.html','web2py.gluon.myregex-module.html');"     >web2py.gluon.myregex</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.newcron-module.html"
     onclick="setFrame('toc-web2py.gluon.newcron-module.html','web2py.gluon.newcron-module.html');"     >web2py.gluon.newcron</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.portalocker-module.html"
     onclick="setFrame('toc-web2py.gluon.portalocker-module.html','web2py.gluon.portalocker-module.html');"     >web2py.gluon.portalocker</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.reserved_sql_keywords-module.html"
     onclick="setFrame('toc-web2py.gluon.reserved_sql_keywords-module.html','web2py.gluon.reserved_sql_keywords-module.html');"     >web2py.gluon.reserved_sql_keywords</a><br />    <a target="moduleFrame" href="toc-web2py.gluon.restricted-module.html"
     onclick="setFrame('toc-web2py.gluon.restricted-module.html','web2py.gluon.restricted-module.html');"     >web2py.gluon.restricted</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.rewrite-module.html"
     onclick="setFrame('toc-web2py.gluon.rewrite-module.html','web2py.gluon.rewrite-module.html');"     >web2py.gluon.rewrite</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.rocket-module.html"
     onclick="setFrame('toc-web2py.gluon.rocket-module.html','web2py.gluon.rocket-module.html');"     >web2py.gluon.rocket</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.sanitizer-module.html"
     onclick="setFrame('toc-web2py.gluon.sanitizer-module.html','web2py.gluon.sanitizer-module.html');"     >web2py.gluon.sanitizer</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.serializers-module.html"
     onclick="setFrame('toc-web2py.gluon.serializers-module.html','web2py.gluon.serializers-module.html');"     >web2py.gluon.serializers</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.settings-module.html"
     onclick="setFrame('toc-web2py.gluon.settings-module.html','web2py.gluon.settings-module.html');"     >web2py.gluon.settings</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.shell-module.html"
     onclick="setFrame('toc-web2py.gluon.shell-module.html','web2py.gluon.shell-module.html');"     >web2py.gluon.shell</a><br />    <a target="moduleFrame" href="toc-web2py.gluon.sql-module.html"
     onclick="setFrame('toc-web2py.gluon.sql-module.html','web2py.gluon.sql-module.html');"     >web2py.gluon.sql</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.sqlhtml-module.html"
     onclick="setFrame('toc-web2py.gluon.sqlhtml-module.html','web2py.gluon.sqlhtml-module.html');"     >web2py.gluon.sqlhtml</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.storage-module.html"
     onclick="setFrame('toc-web2py.gluon.storage-module.html','web2py.gluon.storage-module.html');"     >web2py.gluon.storage</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.streamer-module.html"
     onclick="setFrame('toc-web2py.gluon.streamer-module.html','web2py.gluon.streamer-module.html');"     >web2py.gluon.streamer</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.template-module.html"
     onclick="setFrame('toc-web2py.gluon.template-module.html','web2py.gluon.template-module.html');"     >web2py.gluon.template</a><br />    <a target="moduleFrame" href="toc-web2py.gluon.tools-module.html"
     onclick="setFrame('toc-web2py.gluon.tools-module.html','web2py.gluon.tools-module.html');"     >web2py.gluon.tools</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.utils-module.html"
     onclick="setFrame('toc-web2py.gluon.utils-module.html','web2py.gluon.utils-module.html');"     >web2py.gluon.utils</a><br />  </div>
  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.validators-module.html"
     onclick="setFrame('toc-web2py.gluon.validators-module.html','web2py.gluon.validators-module.html');"     >web2py.gluon.validators</a><br />  </div>
    <a target="moduleFrame" href="toc-web2py.gluon.widget-module.html"
     onclick="setFrame('toc-web2py.gluon.widget-module.html','web2py.gluon.widget-module.html');"     >web2py.gluon.widget</a><br />    <a target="moduleFrame" href="toc-web2py.gluon.winservice-module.html"
     onclick="setFrame('toc-web2py.gluon.winservice-module.html','web2py.gluon.winservice-module.html');"     >web2py.gluon.winservice</a><br />  <div class="private">
    <a target="moduleFrame" href="toc-web2py.gluon.xmlrpc-module.html"
     onclick="setFrame('toc-web2py.gluon.xmlrpc-module.html','web2py.gluon.xmlrpc-module.html');"     >web2py.gluon.xmlrpc</a><br />  </div>
<hr />
  <span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon-module.html version [0ef563c871].







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        Package&nbsp;gluon
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package gluon</h1><span class="codelink"><a href="web2py.gluon-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)
  <h1 class="heading">Web2Py framework modules</h1><br /><br />

<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Submodules</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Submodules"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="web2py.gluon.admin-module.html">web2py.gluon.admin</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.cache-module.html">web2py.gluon.cache</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.cfs-module.html">web2py.gluon.cfs</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.compileapp-module.html">web2py.gluon.compileapp</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.contenttype-module.html">web2py.gluon.contenttype</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink">web2py.gluon.contrib</strong>
    <ul class="private">
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a></strong>: <em class="summary">PyMySQL: A pure-Python drop-in replacement for MySQLdb.</em>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants-module.html">web2py.gluon.contrib.pymysql.constants</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a></strong>    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a></strong>    </li>
    </ul>
    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.custom_import-module.html">web2py.gluon.custom_import</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.dal-module.html">web2py.gluon.dal</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.debug-module.html">web2py.gluon.debug</a></strong>: <em class="summary">This file is part of the web2py Web Framework Developed by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;, limodou 
        &lt;limodou@gmail.com&gt; and srackham 
        &lt;srackham@gmail.com&gt;.</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.decoder-module.html">web2py.gluon.decoder</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.fileutils-module.html">web2py.gluon.fileutils</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.globals-module.html">web2py.gluon.globals</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.highlight-module.html">web2py.gluon.highlight</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.html-module.html">web2py.gluon.html</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.http-module.html">web2py.gluon.http</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.import_all-module.html">web2py.gluon.import_all</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.languages-module.html">web2py.gluon.languages</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.main-module.html">web2py.gluon.main</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.myregex-module.html">web2py.gluon.myregex</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.newcron-module.html">web2py.gluon.newcron</a></strong>: <em class="summary">Created by Attila Csipa &lt;web2py@csipa.in.rs&gt; Modified by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.portalocker-module.html">web2py.gluon.portalocker</a></strong>: <em class="summary">Cross-platform (posix/nt) API for flock-style file locking.</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.reserved_sql_keywords-module.html">web2py.gluon.reserved_sql_keywords</a></strong>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.restricted-module.html">web2py.gluon.restricted</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.rewrite-module.html">web2py.gluon.rewrite</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.rocket-module.html">web2py.gluon.rocket</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.sanitizer-module.html">web2py.gluon.sanitizer</a></strong>: <em class="summary">:</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.serializers-module.html">web2py.gluon.serializers</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.settings-module.html">web2py.gluon.settings</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.shell-module.html">web2py.gluon.shell</a></strong>: <em class="summary">This file is part of the web2py Web Framework Developed by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;, limodou 
        &lt;limodou@gmail.com&gt; and srackham 
        &lt;srackham@gmail.com&gt;.</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.sql-module.html">web2py.gluon.sql</a></strong>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.sqlhtml-module.html">web2py.gluon.sqlhtml</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.storage-module.html">web2py.gluon.storage</a></strong>: <em class="summary">This file is part of the web2py Web Framework...</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.streamer-module.html">web2py.gluon.streamer</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.template-module.html">web2py.gluon.template</a></strong>: <em class="summary">This file is part of the web2py Web Framework (Copyrighted, 2007-2011).</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.tools-module.html">web2py.gluon.tools</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.utils-module.html">web2py.gluon.utils</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.validators-module.html">web2py.gluon.validators</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.widget-module.html">web2py.gluon.widget</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
    <li class="private"> <strong class="uidlink"><a href="web2py.gluon.xmlrpc-module.html">web2py.gluon.xmlrpc</a></strong>: <em class="summary">This file is part of the web2py Web Framework Copyrighted by 
        Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
        (http://www.gnu.org/licenses/lgpl.html)</em>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.http.HTTP-class.html" class="summary-name">HTTP</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DAL-class.html" class="summary-name">DAL</a><br />
      an instance of this class represents a database connection
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Field-class.html" class="summary-name">Field</a><br />
      an instance of this class represents a database field
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.SQLFORM-class.html" class="summary-name">SQLFORM</a><br />
      SQLFORM is used to map a table (and a current record) into an HTML form

given a SQLTable stored in db.table

generates an insert form::

    SQLFORM(db.table)

generates an update form::

    record=db.table[some_id]
    SQLFORM(db.table, record)

generates an update with a delete button::

    SQLFORM(db.table, record, deletable=True)

if record is an int::

    record=db.table[record]

optional arguments:

:param fields: a list of fields that should be placed in the form,
    default is all.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.SQLTABLE-class.html" class="summary-name">SQLTABLE</a><br />
      given a Rows object, as returned by a db().select(), generates
an html table with the rows.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.A-class.html" class="summary-name">A</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.B-class.html" class="summary-name">B</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BEAUTIFY-class.html" class="summary-name">BEAUTIFY</a><br />
      example::

    &gt;&gt;&gt; BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
    '&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;b&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;font-weight:bold;&quot;&gt;hello&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;:&lt;/td&gt;&lt;td&gt;&lt;div&gt;world&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'

turns any list, dictionary, etc into decent looking html.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BODY-class.html" class="summary-name">BODY</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BR-class.html" class="summary-name">BR</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.CAT-class.html" class="summary-name">CAT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.CENTER-class.html" class="summary-name">CENTER</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.CLEANUP-class.html" class="summary-name">CLEANUP</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.CODE-class.html" class="summary-name">CODE</a><br />
      displays code in HTML with syntax highlighting.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.CRYPT-class.html" class="summary-name">CRYPT</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.DIV-class.html" class="summary-name">DIV</a><br />
      HTML helper, for easy generating and manipulating a DOM 
        structure.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.EM-class.html" class="summary-name">EM</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.EMBED-class.html" class="summary-name">EMBED</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.FIELDSET-class.html" class="summary-name">FIELDSET</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.FORM-class.html" class="summary-name">FORM</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H1-class.html" class="summary-name">H1</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H2-class.html" class="summary-name">H2</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H3-class.html" class="summary-name">H3</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H4-class.html" class="summary-name">H4</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H5-class.html" class="summary-name">H5</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H6-class.html" class="summary-name">H6</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HEAD-class.html" class="summary-name">HEAD</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HR-class.html" class="summary-name">HR</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HTML-class.html" class="summary-name">HTML</a><br />
      There are four predefined document type definitions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.I-class.html" class="summary-name">I</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.IFRAME-class.html" class="summary-name">IFRAME</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.IMG-class.html" class="summary-name">IMG</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.INPUT-class.html" class="summary-name">INPUT</a><br />
      INPUT Component

examples::

    &gt;&gt;&gt; INPUT(_type='text', _name='name', value='Max').xml()
    '&lt;input name=&quot;name&quot; type=&quot;text&quot; value=&quot;Max&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='checkbox', _name='checkbox', value='on').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;checkbox&quot; type=&quot;checkbox&quot; value=&quot;on&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;yes&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()
    '&lt;input name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;no&quot; /&gt;'

the input helper takes two special attributes value= and requires=.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html" class="summary-name">IS_ALPHANUMERIC</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATE-class.html" class="summary-name">IS_DATE</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATETIME-class.html" class="summary-name">IS_DATETIME</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html" class="summary-name">IS_DATETIME_IN_RANGE</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html" class="summary-name">IS_DATE_IN_RANGE</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html" class="summary-name">IS_DECIMAL_IN_RANGE</a><br />
      Determine that the argument is (or can be represented as) a 
        Python Decimal, and that it falls within the specified inclusive 
        range.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMAIL-class.html" class="summary-name">IS_EMAIL</a><br />
      Checks if field's value is a valid email address.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMPTY_OR-class.html" class="summary-name">IS_EMPTY_OR</a><br />
      dummy class for testing IS_EMPTY_OR
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EQUAL_TO-class.html" class="summary-name">IS_EQUAL_TO</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EXPR-class.html" class="summary-name">IS_EXPR</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html" class="summary-name">IS_FLOAT_IN_RANGE</a><br />
      Determine that the argument is (or can be represented as) a 
        float, and that it falls within the specified inclusive range.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IMAGE-class.html" class="summary-name">IS_IMAGE</a><br />
      Checks if file uploaded through file input was saved in one of 
        selected image formats and has dimensions (width and height) within
        given boundaries.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html" class="summary-name">IS_INT_IN_RANGE</a><br />
      Determine that the argument is (or can be represented as) an 
        int, and that it falls within the specified range.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IN_DB-class.html" class="summary-name">IS_IN_DB</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IN_SET-class.html" class="summary-name">IS_IN_SET</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IPV4-class.html" class="summary-name">IS_IPV4</a><br />
      Checks if field's value is an IP version 4 address in decimal form.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_LENGTH-class.html" class="summary-name">IS_LENGTH</a><br />
      Checks if length of field's value fits between given 
        boundaries.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_LIST_OF-class.html" class="summary-name">IS_LIST_OF</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_LOWER-class.html" class="summary-name">IS_LOWER</a><br />
      convert to lower case
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_MATCH-class.html" class="summary-name">IS_MATCH</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html" class="summary-name">IS_NOT_EMPTY</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html" class="summary-name">IS_NOT_IN_DB</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMPTY_OR-class.html" class="summary-name">IS_NULL_OR</a><br />
      dummy class for testing IS_EMPTY_OR
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_SLUG-class.html" class="summary-name">IS_SLUG</a><br />
      convert arbitrary text string to a slug
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_STRONG-class.html" class="summary-name">IS_STRONG</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_TIME-class.html" class="summary-name">IS_TIME</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html" class="summary-name">IS_UPLOAD_FILENAME</a><br />
      Checks if name and extension of file uploaded through file input matches
given criteria.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_UPPER-class.html" class="summary-name">IS_UPPER</a><br />
      convert to upper case
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_URL-class.html" class="summary-name">IS_URL</a><br />
      Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

(These rules are based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html)

This function only checks the URL's syntax.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LABEL-class.html" class="summary-name">LABEL</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LEGEND-class.html" class="summary-name">LEGEND</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LI-class.html" class="summary-name">LI</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LINK-class.html" class="summary-name">LINK</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.MARKMIN-class.html" class="summary-name">MARKMIN</a><br />
      For documentation: 
        http://web2py.com/examples/static/markmin.html
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.MENU-class.html" class="summary-name">MENU</a><br />
      Used to build menus...
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.META-class.html" class="summary-name">META</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OBJECT-class.html" class="summary-name">OBJECT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OL-class.html" class="summary-name">OL</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OPTGROUP-class.html" class="summary-name">OPTGROUP</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OPTION-class.html" class="summary-name">OPTION</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.P-class.html" class="summary-name">P</a><br />
      Will replace ``\n`` by ``&lt;br /&gt;`` if the `cr2br` attribute
        is provided.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.PRE-class.html" class="summary-name">PRE</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.SCRIPT-class.html" class="summary-name">SCRIPT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.SELECT-class.html" class="summary-name">SELECT</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.SPAN-class.html" class="summary-name">SPAN</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.STYLE-class.html" class="summary-name">STYLE</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TABLE-class.html" class="summary-name">TABLE</a><br />
      TABLE Component.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TBODY-class.html" class="summary-name">TBODY</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TD-class.html" class="summary-name">TD</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TEXTAREA-class.html" class="summary-name">TEXTAREA</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TFOOT-class.html" class="summary-name">TFOOT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TH-class.html" class="summary-name">TH</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.THEAD-class.html" class="summary-name">THEAD</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TITLE-class.html" class="summary-name">TITLE</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TR-class.html" class="summary-name">TR</a><br />
      TR Component.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TT-class.html" class="summary-name">TT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.UL-class.html" class="summary-name">UL</a><br />
      UL Component.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XHTML-class.html" class="summary-name">XHTML</a><br />
      This is XHTML version of the HTML helper.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XML-class.html" class="summary-name">XML</a><br />
      use it to wrap a string that contains XML/HTML so that it will 
        not be escaped by the template
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="redirect"></a><span class="summary-sig-name">redirect</span>(<span class="summary-sig-arg">location</span>,
        <span class="summary-sig-arg">how</span>=<span class="summary-sig-default">303</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.http-pysrc.html#redirect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon-module.html#URL" class="summary-sig-name">URL</a>(<span class="summary-sig-arg">a</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">c</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">f</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">r</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">vars</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">anchor</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">extension</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">env</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hmac_key</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hash_vars</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">salt</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">user_signature</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">scheme</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">host</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">1</span>)</span><br />
      generate a URL

example::

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#URL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon-module.html#embed64" class="summary-sig-name">embed64</a>(<span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">file</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">extension</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">image/gif</code><code class="variable-quote">'</code></span>)</span><br />
      helper to encode the provided (binary) data into base64.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#embed64">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="current"></a><span class="summary-name">current</span> = <code title="threading.local()">threading.local()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ON"></a><span class="summary-name">ON</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TAG"></a><span class="summary-name">TAG</span> = <code title="__TAG__()">__TAG__()</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="URL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">URL</span>(<span class="sig-arg">a</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">c</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">f</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">r</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">args</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">vars</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">anchor</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">extension</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">env</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">hmac_key</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">hash_vars</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">salt</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">user_signature</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">scheme</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">host</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">port</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#URL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

generate a URL

example::

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':1, 'q':2}, anchor='1'))
    '/a/c/f/x/y/z?p=1&amp;q=2#1'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':(1,3), 'q':2}, anchor='1'))
    '/a/c/f/x/y/z?p=1&amp;p=3&amp;q=2#1'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':(3,1), 'q':2}, anchor='1'))
    '/a/c/f/x/y/z?p=3&amp;p=1&amp;q=2#1'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', anchor='1+2'))
    '/a/c/f#1%2B2'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':(1,3), 'q':2}, anchor='1', hmac_key='key'))
    '/a/c/f/x/y/z?p=1&amp;p=3&amp;q=2&amp;_signature=5d06bb8a4a6093dd325da2ee591c35c61afbd3c6#1'

generates a url '/a/c/f' corresponding to application a, controller c
and function f. If r=request is passed, a, c, f are set, respectively,
to r.application, r.controller, r.function.

The more typical usage is:

URL(r=request, f='index') that generates a url for the index function
within the present application and controller.

:param a: application (default to current if r is given)
:param c: controller (default to current if r is given)
:param f: function (default to current if r is given)
:param r: request (optional)
:param args: any arguments (optional)
:param vars: any variables (optional)
:param anchor: anchorname, without # (optional)
:param hmac_key: key to use when generating hmac signature (optional)
:param hash_vars: which of the vars to include in our hmac signature
    True (default) - hash all vars, False - hash none of the vars,
    iterable - hash only the included vars ['key1','key2']
:param scheme: URI scheme (True, 'http' or 'https', etc); forces absolute URL (optional)
:param host: string to force absolute URL with host (True means http_host)
:param port: optional port number (forces absolute URL)

:raises SyntaxError: when no application, controller or function is
    available
:raises SyntaxError: when a CRLF is found in the generated url

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="embed64"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">embed64</span>(<span class="sig-arg">filename</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">file</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">data</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">extension</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">image/gif</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#embed64">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>helper to encode the provided (binary) data into base64.</p>
  :param filename: if provided, opens and reads this file in 'rb' mode 
  :param file: if provided, reads this file :param data: if provided, uses 
  the provided data
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon-pysrc.html version [4c786500d5].

















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        Package&nbsp;gluon
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon-module.html">Package web2py.gluon</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring">Web2Py framework modules</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-docstring">========================</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'A'</tt><tt class="py-op">,</tt> <tt class="py-string">'B'</tt><tt class="py-op">,</tt> <tt class="py-string">'BEAUTIFY'</tt><tt class="py-op">,</tt> <tt class="py-string">'BODY'</tt><tt class="py-op">,</tt> <tt class="py-string">'BR'</tt><tt class="py-op">,</tt> <tt class="py-string">'CAT'</tt><tt class="py-op">,</tt> <tt class="py-string">'CENTER'</tt><tt class="py-op">,</tt> <tt class="py-string">'CLEANUP'</tt><tt class="py-op">,</tt> <tt class="py-string">'CODE'</tt><tt class="py-op">,</tt> <tt class="py-string">'CRYPT'</tt><tt class="py-op">,</tt> <tt class="py-string">'DAL'</tt><tt class="py-op">,</tt> <tt class="py-string">'DIV'</tt><tt class="py-op">,</tt> <tt class="py-string">'EM'</tt><tt class="py-op">,</tt> <tt class="py-string">'EMBED'</tt><tt class="py-op">,</tt> <tt class="py-string">'FIELDSET'</tt><tt class="py-op">,</tt> <tt class="py-string">'FORM'</tt><tt class="py-op">,</tt> <tt class="py-string">'Field'</tt><tt class="py-op">,</tt> <tt class="py-string">'H1'</tt><tt class="py-op">,</tt> <tt class="py-string">'H2'</tt><tt class="py-op">,</tt> <tt class="py-string">'H3'</tt><tt class="py-op">,</tt> <tt class="py-string">'H4'</tt><tt class="py-op">,</tt> <tt class="py-string">'H5'</tt><tt class="py-op">,</tt> <tt class="py-string">'H6'</tt><tt class="py-op">,</tt> <tt class="py-string">'HEAD'</tt><tt class="py-op">,</tt> <tt class="py-string">'HR'</tt><tt class="py-op">,</tt> <tt class="py-string">'HTML'</tt><tt class="py-op">,</tt> <tt class="py-string">'HTTP'</tt><tt class="py-op">,</tt> <tt class="py-string">'I'</tt><tt class="py-op">,</tt> <tt class="py-string">'IFRAME'</tt><tt class="py-op">,</tt> <tt class="py-string">'IMG'</tt><tt class="py-op">,</tt> <tt class="py-string">'INPUT'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_ALPHANUMERIC'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_DATE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_DATETIME'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_DATETIME_IN_RANGE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_DATE_IN_RANGE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_DECIMAL_IN_RANGE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_EMAIL'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_EMPTY_OR'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_EQUAL_TO'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_EXPR'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_FLOAT_IN_RANGE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_IMAGE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_INT_IN_RANGE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_IN_DB'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_IN_SET'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_IPV4'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_LENGTH'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_LIST_OF'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_LOWER'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_MATCH'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_NOT_EMPTY'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_NOT_IN_DB'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_NULL_OR'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_SLUG'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_STRONG'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_TIME'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_UPLOAD_FILENAME'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_UPPER'</tt><tt class="py-op">,</tt> <tt class="py-string">'IS_URL'</tt><tt class="py-op">,</tt> <tt class="py-string">'LABEL'</tt><tt class="py-op">,</tt> <tt class="py-string">'LEGEND'</tt><tt class="py-op">,</tt> <tt class="py-string">'LI'</tt><tt class="py-op">,</tt> <tt class="py-string">'LINK'</tt><tt class="py-op">,</tt> <tt class="py-string">'MARKMIN'</tt><tt class="py-op">,</tt> <tt class="py-string">'MENU'</tt><tt class="py-op">,</tt> <tt class="py-string">'META'</tt><tt class="py-op">,</tt> <tt class="py-string">'OBJECT'</tt><tt class="py-op">,</tt> <tt class="py-string">'OL'</tt><tt class="py-op">,</tt> <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> <tt class="py-string">'OPTGROUP'</tt><tt class="py-op">,</tt> <tt class="py-string">'OPTION'</tt><tt class="py-op">,</tt> <tt class="py-string">'P'</tt><tt class="py-op">,</tt> <tt class="py-string">'PRE'</tt><tt class="py-op">,</tt> <tt class="py-string">'SCRIPT'</tt><tt class="py-op">,</tt> <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> <tt class="py-string">'SPAN'</tt><tt class="py-op">,</tt> <tt class="py-string">'SQLFORM'</tt><tt class="py-op">,</tt> <tt class="py-string">'SQLTABLE'</tt><tt class="py-op">,</tt> <tt class="py-string">'STYLE'</tt><tt class="py-op">,</tt> <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> <tt class="py-string">'TAG'</tt><tt class="py-op">,</tt> <tt class="py-string">'TBODY'</tt><tt class="py-op">,</tt> <tt class="py-string">'TD'</tt><tt class="py-op">,</tt> <tt class="py-string">'TEXTAREA'</tt><tt class="py-op">,</tt> <tt class="py-string">'TFOOT'</tt><tt class="py-op">,</tt> <tt class="py-string">'TH'</tt><tt class="py-op">,</tt> <tt class="py-string">'THEAD'</tt><tt class="py-op">,</tt> <tt class="py-string">'TITLE'</tt><tt class="py-op">,</tt> <tt class="py-string">'TR'</tt><tt class="py-op">,</tt> <tt class="py-string">'TT'</tt><tt class="py-op">,</tt> <tt class="py-string">'UL'</tt><tt class="py-op">,</tt> <tt class="py-string">'URL'</tt><tt class="py-op">,</tt> <tt class="py-string">'XHTML'</tt><tt class="py-op">,</tt> <tt class="py-string">'XML'</tt><tt class="py-op">,</tt><tt class="py-string">'redirect'</tt><tt class="py-op">,</tt><tt class="py-string">'current'</tt><tt class="py-op">,</tt><tt class="py-string">'embed64'</tt><tt class="py-op">]</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-0', 'globals', 'link-0');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1', 'current', 'link-1');">current</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-2', 'html', 'link-2');">html</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Function web2py.gluon.tools.validators()=web2py.gluon.tools-module.html#validators,Module web2py.gluon.validators=web2py.gluon.validators-module.html"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-3', 'validators', 'link-3');">validators</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-4', 'http', 'link-4');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Function web2py.gluon.http.redirect()=web2py.gluon.http-module.html#redirect"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-5', 'redirect', 'link-5');">redirect</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-6', 'HTTP', 'link-6');">HTTP</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-7', 'dal', 'link-7');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Class web2py.gluon.dal.DAL=web2py.gluon.dal.DAL-class.html"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-8', 'DAL', 'link-8');">DAL</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Class web2py.gluon.dal.Field=web2py.gluon.dal.Field-class.html"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-9', 'Field', 'link-9');">Field</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-10" class="py-name" targets="Module web2py.gluon.sqlhtml=web2py.gluon.sqlhtml-module.html"><a title="web2py.gluon.sqlhtml" class="py-name" href="#" onclick="return doclink('link-10', 'sqlhtml', 'link-10');">sqlhtml</a></tt> <tt class="py-keyword">import</tt> <tt id="link-11" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLFORM=web2py.gluon.sqlhtml.SQLFORM-class.html"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-11', 'SQLFORM', 'link-11');">SQLFORM</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLTABLE=web2py.gluon.sqlhtml.SQLTABLE-class.html"><a title="web2py.gluon.sqlhtml.SQLTABLE" class="py-name" href="#" onclick="return doclink('link-12', 'SQLTABLE', 'link-12');">SQLTABLE</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.admin-module.html version [5cee0b8091].



































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.admin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;admin
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.admin-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module admin</h1><span class="codelink"><a href="web2py.gluon.admin-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)
  <h1 class="heading">Utility functions for the Admin application</h1><br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#apath" class="summary-sig-name">apath</a>(<span class="summary-sig-arg">path</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">r</span>=<span class="summary-sig-default">1</span>)</span><br />
      Builds a path inside an application folder...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#apath">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_pack" class="summary-sig-name">app_pack</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      Builds a w2p package for the application...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_pack">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_pack_compiled" class="summary-sig-name">app_pack_compiled</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      Builds a w2p bytecode-compiled package for the application...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_pack_compiled">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_cleanup" class="summary-sig-name">app_cleanup</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      Removes session, cache and error files...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_cleanup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_compile" class="summary-sig-name">app_compile</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      Compiles the application...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_compile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_create" class="summary-sig-name">app_create</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">force</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">key</span>=<span class="summary-sig-default">1</span>)</span><br />
      Create a copy of welcome.w2p (scaffolding) app...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_create">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_install" class="summary-sig-name">app_install</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">fobj</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">overwrite</span>=<span class="summary-sig-default">1</span>)</span><br />
      Installs an application:

- Identifies file type by filename
- Writes `fobj` contents to the `../deposit/` folder
- Calls `w2p_unpack()` to do the job.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_install">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#app_uninstall" class="summary-sig-name">app_uninstall</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      Uninstalls the application.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_uninstall">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#plugin_pack" class="summary-sig-name">plugin_pack</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">plugin_name</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      Builds a w2p package for the application...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#plugin_pack">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#plugin_install" class="summary-sig-name">plugin_install</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">fobj</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      Installs an application:

- Identifies file type by filename
- Writes `fobj` contents to the `../deposit/` folder
- Calls `w2p_unpack()` to do the job.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#plugin_install">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#check_new_version" class="summary-sig-name">check_new_version</a>(<span class="summary-sig-arg">myversion</span>,
        <span class="summary-sig-arg">version_URL</span>)</span><br />
      Compares current web2py's version with the latest stable web2py version.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#check_new_version">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unzip"></a><span class="summary-sig-name">unzip</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">dir</span>,
        <span class="summary-sig-arg">subfolder</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Unzips filename into dir (.zip only, no .gz etc) if subfolder!='' 
      it unzip only files in subfolder</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#unzip">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.admin-module.html#upgrade" class="summary-sig-name">upgrade</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">url</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">http://web2py.com</code><code class="variable-quote">'</code></span>)</span><br />
      Upgrades web2py (src, osx, win) is a new version is posted.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#upgrade">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_path_first"></a><span class="summary-sig-name">add_path_first</span>(<span class="summary-sig-arg">path</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#add_path_first">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_missing_folders"></a><span class="summary-sig-name">create_missing_folders</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#create_missing_folders">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_missing_app_folders"></a><span class="summary-sig-name">create_missing_app_folders</span>(<span class="summary-sig-arg">request</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.admin-pysrc.html#create_missing_app_folders">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="apath"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">apath</span>(<span class="sig-arg">path</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">r</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#apath">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Builds a path inside an application folder

Parameters
----------
path:
    path within the application folder
r:
    the global request object

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_pack"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_pack</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_pack">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Builds a w2p package for the application

Parameters
----------
app:
    application name
request:
    the global request object

Returns
-------
filename:
    filename of the w2p file or None on error

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_pack_compiled"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_pack_compiled</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_pack_compiled">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Builds a w2p bytecode-compiled package for the application

Parameters
----------
app:
    application name
request:
    the global request object

Returns
-------
filename:
    filename of the w2p file or None on error

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_cleanup"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_cleanup</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_cleanup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Removes session, cache and error files

Parameters
----------
app:
    application name
request:
    the global request object

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_compile"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_compile</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_compile">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Compiles the application

Parameters
----------
app:
    application name
request:
    the global request object

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_create"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_create</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">force</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">key</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_create">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Create a copy of welcome.w2p (scaffolding) app

Parameters
----------
app:
    application name
request:
    the global request object

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_install"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_install</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">fobj</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">filename</span>,
        <span class="sig-arg">overwrite</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_install">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Installs an application:

- Identifies file type by filename
- Writes `fobj` contents to the `../deposit/` folder
- Calls `w2p_unpack()` to do the job.

Parameters
----------
app:
    new application name
fobj:
    file object containing the application to be installed
request:
    the global request object
filename:
    original filename of the `fobj`, required to determine extension

Returns
-------
upname:
    name of the file where app is temporarily stored or `None` on failure

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="app_uninstall"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">app_uninstall</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#app_uninstall">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Uninstalls the application.

Parameters
----------
app:
    application name
request:
    the global request object

Returns
-------
`True` on success, `False` on failure

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="plugin_pack"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">plugin_pack</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">plugin_name</span>,
        <span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#plugin_pack">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Builds a w2p package for the application

Parameters
----------
app:
    application name
plugin_name:
    the name of the plugin without plugin_ prefix
request:
    the current request app

Returns
-------
filename:
    filename of the w2p file or None on error

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="plugin_install"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">plugin_install</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">fobj</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#plugin_install">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Installs an application:

- Identifies file type by filename
- Writes `fobj` contents to the `../deposit/` folder
- Calls `w2p_unpack()` to do the job.

Parameters
----------
app:
    new application name
fobj:
    file object containing the application to be installed
request:
    the global request object
filename:
    original filename of the `fobj`, required to determine extension

Returns
-------
upname:
    name of the file where app is temporarily stored or `None` on failure

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="check_new_version"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">check_new_version</span>(<span class="sig-arg">myversion</span>,
        <span class="sig-arg">version_URL</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#check_new_version">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Compares current web2py's version with the latest stable web2py version.

Parameters
----------
myversion:
    the current version as stored in file `web2py/VERSION`
version_URL:
    the URL that contains the version of the latest stable release

Returns
-------
state:
    `True` if upgrade available, `False` if current version if up-to-date,
    -1 on error
version:
    the most up-to-version available

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="upgrade"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">upgrade</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">url</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">http://web2py.com</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.admin-pysrc.html#upgrade">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Upgrades web2py (src, osx, win) is a new version is posted.
It detects whether src, osx or win is running and downloads the right one

Parameters
----------
request:
    the current request object, required to determine version and path
url:
    the incomplete url where to locate the latest web2py
    actual url is url+'/examples/static/web2py_(src|osx|win).zip'

Returns
-------
    True on success, False on failure (network problem or old version)

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:58 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.admin-pysrc.html version [8300f8ff59].
























































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.admin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;admin
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.admin-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.admin-module.html">Module web2py.gluon.admin</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Utility functions for the Admin application</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">===========================================</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">zipfile</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">shutil</tt> <tt class="py-keyword">import</tt> <tt class="py-name">rmtree</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-0', 'utils', 'link-0');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Function web2py.gluon.utils.web2py_uuid()=web2py.gluon.utils-module.html#web2py_uuid"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-1', 'web2py_uuid', 'link-1');">web2py_uuid</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-2', 'fileutils', 'link-2');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Function web2py.gluon.fileutils.w2p_pack()=web2py.gluon.fileutils-module.html#w2p_pack"><a title="web2py.gluon.fileutils.w2p_pack" class="py-name" href="#" onclick="return doclink('link-3', 'w2p_pack', 'link-3');">w2p_pack</a></tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Function web2py.gluon.fileutils.w2p_unpack()=web2py.gluon.fileutils-module.html#w2p_unpack"><a title="web2py.gluon.fileutils.w2p_unpack" class="py-name" href="#" onclick="return doclink('link-4', 'w2p_unpack', 'link-4');">w2p_unpack</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Function web2py.gluon.fileutils.w2p_pack_plugin()=web2py.gluon.fileutils-module.html#w2p_pack_plugin"><a title="web2py.gluon.fileutils.w2p_pack_plugin" class="py-name" href="#" onclick="return doclink('link-5', 'w2p_pack_plugin', 'link-5');">w2p_pack_plugin</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.fileutils.w2p_unpack_plugin()=web2py.gluon.fileutils-module.html#w2p_unpack_plugin"><a title="web2py.gluon.fileutils.w2p_unpack_plugin" class="py-name" href="#" onclick="return doclink('link-6', 'w2p_unpack_plugin', 'link-6');">w2p_unpack_plugin</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-7', 'fileutils', 'link-2');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Function web2py.gluon.fileutils.up()=web2py.gluon.fileutils-module.html#up"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-8', 'up', 'link-8');">up</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Function web2py.gluon.fileutils.fix_newlines()=web2py.gluon.fileutils-module.html#fix_newlines"><a title="web2py.gluon.fileutils.fix_newlines" class="py-name" href="#" onclick="return doclink('link-9', 'fix_newlines', 'link-9');">fix_newlines</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-10', 'abspath', 'link-10');">abspath</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.fileutils.recursive_unlink()=web2py.gluon.fileutils-module.html#recursive_unlink"><a title="web2py.gluon.fileutils.recursive_unlink" class="py-name" href="#" onclick="return doclink('link-11', 'recursive_unlink', 'link-11');">recursive_unlink</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-12', 'fileutils', 'link-2');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-13" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-13', 'read_file', 'link-13');">read_file</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-14', 'write_file', 'link-14');">write_file</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name" targets="Module web2py.gluon.restricted=web2py.gluon.restricted-module.html,Function web2py.gluon.restricted.restricted()=web2py.gluon.restricted-module.html#restricted"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-15', 'restricted', 'link-15');">restricted</a></tt> <tt class="py-keyword">import</tt> <tt id="link-16" class="py-name" targets="Class web2py.gluon.restricted.RestrictedError=web2py.gluon.restricted.RestrictedError-class.html"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-16', 'RestrictedError', 'link-16');">RestrictedError</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-17" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-17', 'settings', 'link-17');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-18" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-18', 'global_settings', 'link-18');">global_settings</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="apath"></a><div id="apath-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="apath-toggle" onclick="return toggle('apath');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#apath">apath</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">r</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="apath-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="apath-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">    Builds a path inside an application folder</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">    path:</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">        path within the application folder</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">    r:</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-name">opath</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-19', 'up', 'link-8');">up</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-keyword">while</tt> <tt class="py-name">path</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'../'</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">opath</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-20', 'up', 'link-8');">up</a></tt><tt class="py-op">(</tt><tt class="py-name">opath</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-21', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">opath</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"> </tt>
<a name="app_pack"></a><div id="app_pack-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="app_pack-toggle" onclick="return toggle('app_pack');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_pack">app_pack</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_pack-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_pack-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">    Builds a w2p package for the application</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">    filename:</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">        filename of the w2p file or None on error</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt id="link-22" class="py-name" targets="Function web2py.gluon.admin.app_cleanup()=web2py.gluon.admin-module.html#app_cleanup"><a title="web2py.gluon.admin.app_cleanup" class="py-name" href="#" onclick="return doclink('link-22', 'app_cleanup', 'link-22');">app_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name" targets="Function web2py.gluon.admin.apath()=web2py.gluon.admin-module.html#apath"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-23', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'../deposit/%s.w2p'</tt> <tt class="py-op">%</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt id="link-24" class="py-name"><a title="web2py.gluon.fileutils.w2p_pack" class="py-name" href="#" onclick="return doclink('link-24', 'w2p_pack', 'link-3');">w2p_pack</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-25', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">filename</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-26" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-26', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="app_pack_compiled"></a><div id="app_pack_compiled-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="app_pack_compiled-toggle" onclick="return toggle('app_pack_compiled');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_pack_compiled">app_pack_compiled</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_pack_compiled-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_pack_compiled-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">    Builds a w2p bytecode-compiled package for the application</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">    filename:</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-docstring">        filename of the w2p file or None on error</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-27', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'../deposit/%s.w2p'</tt> <tt class="py-op">%</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt id="link-28" class="py-name"><a title="web2py.gluon.fileutils.w2p_pack" class="py-name" href="#" onclick="return doclink('link-28', 'w2p_pack', 'link-3');">w2p_pack</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-29', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">compiled</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">filename</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-30" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-30', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"> </tt>
<a name="app_cleanup"></a><div id="app_cleanup-def"><a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="app_cleanup-toggle" onclick="return toggle('app_cleanup');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_cleanup">app_cleanup</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_cleanup-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_cleanup-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">    Removes session, cache and error files</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt class="py-comment"># Remove error files</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-31', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s/errors/'</tt> <tt class="py-op">%</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-32', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-33', 'listdir', 'link-33');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">'.'</tt><tt class="py-op">:</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-34', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-comment"># Remove session files</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-35', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s/sessions/'</tt> <tt class="py-op">%</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-36', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-37', 'listdir', 'link-33');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">'.'</tt><tt class="py-op">:</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.fileutils.recursive_unlink" class="py-name" href="#" onclick="return doclink('link-38', 'recursive_unlink', 'link-11');">recursive_unlink</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-39', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">                <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-comment"># Remove cache files</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-40" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-40', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s/sessions/'</tt> <tt class="py-op">%</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-41', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-42', 'listdir', 'link-33');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">'.'</tt><tt class="py-op">:</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-43', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">                <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">r</tt> </tt>
</div><a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"> </tt>
<a name="app_compile"></a><div id="app_compile-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="app_compile-toggle" onclick="return toggle('app_compile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_compile">app_compile</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_compile-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_compile-expanded"><a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"><tt class="py-docstring">    Compiles the application</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-44" class="py-name" targets="Module web2py.gluon.compileapp=web2py.gluon.compileapp-module.html"><a title="web2py.gluon.compileapp" class="py-name" href="#" onclick="return doclink('link-44', 'compileapp', 'link-44');">compileapp</a></tt> <tt class="py-keyword">import</tt> <tt id="link-45" class="py-name" targets="Function web2py.gluon.compileapp.compile_application()=web2py.gluon.compileapp-module.html#compile_application"><a title="web2py.gluon.compileapp.compile_application" class="py-name" href="#" onclick="return doclink('link-45', 'compile_application', 'link-45');">compile_application</a></tt><tt class="py-op">,</tt> <tt id="link-46" class="py-name" targets="Function web2py.gluon.compileapp.remove_compiled_application()=web2py.gluon.compileapp-module.html#remove_compiled_application"><a title="web2py.gluon.compileapp.remove_compiled_application" class="py-name" href="#" onclick="return doclink('link-46', 'remove_compiled_application', 'link-46');">remove_compiled_application</a></tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">    <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-47', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">        <tt id="link-48" class="py-name"><a title="web2py.gluon.compileapp.compile_application" class="py-name" href="#" onclick="return doclink('link-48', 'compile_application', 'link-45');">compile_application</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt id="link-49" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-49', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">,</tt> <tt id="link-50" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-50', 'RestrictedError', 'link-16');">RestrictedError</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">        <tt class="py-name">tb</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">        <tt id="link-51" class="py-name"><a title="web2py.gluon.compileapp.remove_compiled_application" class="py-name" href="#" onclick="return doclink('link-51', 'remove_compiled_application', 'link-46');">remove_compiled_application</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">tb</tt> </tt>
</div><a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"> </tt>
<a name="app_create"></a><div id="app_create-def"><a name="L153"></a><tt class="py-lineno">153</tt> <a class="py-toggle" href="#" id="app_create-toggle" onclick="return toggle('app_create');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_create">app_create</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt><tt class="py-param">force</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-param">key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_create-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_create-expanded"><a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"><tt class="py-docstring">    Create a copy of welcome.w2p (scaffolding) app</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-52" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-52', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-53" class="py-name" targets="Method web2py.gluon.languages.translator.force()=web2py.gluon.languages.translator-class.html#force"><a title="web2py.gluon.languages.translator.force" class="py-name" href="#" onclick="return doclink('link-53', 'force', 'link-53');">force</a></tt><tt class="py-op">:</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt id="link-54" class="py-name"><a title="web2py.gluon.fileutils.w2p_unpack" class="py-name" href="#" onclick="return doclink('link-54', 'w2p_unpack', 'link-4');">w2p_unpack</a></tt><tt class="py-op">(</tt><tt class="py-string">'welcome.w2p'</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">subfolder</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'models'</tt><tt class="py-op">,</tt><tt class="py-string">'views'</tt><tt class="py-op">,</tt><tt class="py-string">'controllers'</tt><tt class="py-op">,</tt> <tt class="py-string">'databases'</tt><tt class="py-op">,</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                          <tt class="py-string">'modules'</tt><tt class="py-op">,</tt><tt class="py-string">'cron'</tt><tt class="py-op">,</tt><tt class="py-string">'errors'</tt><tt class="py-op">,</tt><tt class="py-string">'sessions'</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                          <tt class="py-string">'languages'</tt><tt class="py-op">,</tt><tt class="py-string">'static'</tt><tt class="py-op">,</tt><tt class="py-string">'private'</tt><tt class="py-op">,</tt><tt class="py-string">'uploads'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">            <tt class="py-name">subpath</tt> <tt class="py-op">=</tt>  <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-55', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">subfolder</tt><tt class="py-op">)</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-56', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">subpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">                <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">subpath</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-57', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'models'</tt><tt class="py-op">,</tt> <tt class="py-string">'db.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-58', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-59" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-59', 'read_file', 'link-13');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;your secret key&gt;'</tt><tt class="py-op">,</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">                                <tt class="py-string">'sha512:'</tt><tt class="py-op">+</tt><tt class="py-op">(</tt><tt class="py-name">key</tt> <tt class="py-keyword">or</tt> <tt id="link-60" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-60', 'web2py_uuid', 'link-1');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">            <tt id="link-61" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-61', 'write_file', 'link-14');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">        <tt class="py-name">rmtree</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"> </tt>
<a name="app_install"></a><div id="app_install-def"><a name="L191"></a><tt class="py-lineno">191</tt> <a class="py-toggle" href="#" id="app_install-toggle" onclick="return toggle('app_install');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_install">app_install</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">fobj</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">overwrite</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_install-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_install-expanded"><a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring">    Installs an application:</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring">    - Identifies file type by filename</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring">    - Writes `fobj` contents to the `../deposit/` folder</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring">    - Calls `w2p_unpack()` to do the job.</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">        new application name</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">    fobj:</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">        file object containing the application to be installed</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"><tt class="py-docstring">    filename:</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line"><tt class="py-docstring">        original filename of the `fobj`, required to determine extension</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line"><tt class="py-docstring">    upname:</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line"><tt class="py-docstring">        name of the file where app is temporarily stored or `None` on failure</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">    <tt class="py-name">did_mkdir</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'.w2p'</tt><tt class="py-op">:</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-string">'w2p'</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">7</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'.tar.gz'</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">        <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-string">'tar.gz'</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-string">'tar'</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">    <tt class="py-name">upname</tt> <tt class="py-op">=</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-62', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'../deposit/%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">extension</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line"> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">        <tt id="link-63" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-63', 'write_file', 'link-14');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">upname</tt><tt class="py-op">,</tt> <tt class="py-name">fobj</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-64', 'read', 'link-64');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-65', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">overwrite</tt><tt class="py-op">:</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">            <tt class="py-name">did_mkdir</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">        <tt id="link-66" class="py-name"><a title="web2py.gluon.fileutils.w2p_unpack" class="py-name" href="#" onclick="return doclink('link-66', 'w2p_unpack', 'link-4');">w2p_unpack</a></tt><tt class="py-op">(</tt><tt class="py-name">upname</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">extension</tt> <tt class="py-op">!=</tt> <tt class="py-string">'tar'</tt><tt class="py-op">:</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">upname</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">        <tt id="link-67" class="py-name"><a title="web2py.gluon.fileutils.fix_newlines" class="py-name" href="#" onclick="return doclink('link-67', 'fix_newlines', 'link-9');">fix_newlines</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">upname</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-68" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-68', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">did_mkdir</tt><tt class="py-op">:</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">            <tt class="py-name">rmtree</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"> </tt>
<a name="app_uninstall"></a><div id="app_uninstall-def"><a name="L241"></a><tt class="py-lineno">241</tt> <a class="py-toggle" href="#" id="app_uninstall-toggle" onclick="return toggle('app_uninstall');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#app_uninstall">app_uninstall</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="app_uninstall-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="app_uninstall-expanded"><a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line"><tt class="py-docstring">    Uninstalls the application.</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line"><tt class="py-docstring">    `True` on success, `False` on failure</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">        <tt class="py-comment"># Hey App, this is your end...</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-69" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-69', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt class="py-name">rmtree</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-70" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-70', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line"> </tt>
<a name="plugin_pack"></a><div id="plugin_pack-def"><a name="L264"></a><tt class="py-lineno">264</tt> <a class="py-toggle" href="#" id="plugin_pack-toggle" onclick="return toggle('plugin_pack');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#plugin_pack">plugin_pack</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">plugin_name</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="plugin_pack-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="plugin_pack-expanded"><a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line"><tt class="py-docstring">    Builds a w2p package for the application</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line"><tt class="py-docstring">        application name</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line"><tt class="py-docstring">    plugin_name:</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"><tt class="py-docstring">        the name of the plugin without plugin_ prefix</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line"><tt class="py-docstring">        the current request app</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line"><tt class="py-docstring">    filename:</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"><tt class="py-docstring">        filename of the w2p file or None on error</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-71" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-71', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'../deposit/web2py.plugin.%s.w2p'</tt> <tt class="py-op">%</tt> <tt class="py-name">plugin_name</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt id="link-72" class="py-name"><a title="web2py.gluon.fileutils.w2p_pack_plugin" class="py-name" href="#" onclick="return doclink('link-72', 'w2p_pack_plugin', 'link-5');">w2p_pack_plugin</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt id="link-73" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-73', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">plugin_name</tt><tt class="py-op">)</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">filename</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-74" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-74', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line"> </tt>
<a name="plugin_install"></a><div id="plugin_install-def"><a name="L289"></a><tt class="py-lineno">289</tt> <a class="py-toggle" href="#" id="plugin_install-toggle" onclick="return toggle('plugin_install');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#plugin_install">plugin_install</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">fobj</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="plugin_install-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="plugin_install-expanded"><a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line"><tt class="py-docstring">    Installs an application:</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line"><tt class="py-docstring">    - Identifies file type by filename</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"><tt class="py-docstring">    - Writes `fobj` contents to the `../deposit/` folder</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line"><tt class="py-docstring">    - Calls `w2p_unpack()` to do the job.</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line"><tt class="py-docstring">    app:</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line"><tt class="py-docstring">        new application name</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line"><tt class="py-docstring">    fobj:</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line"><tt class="py-docstring">        file object containing the application to be installed</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line"><tt class="py-docstring">        the global request object</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line"><tt class="py-docstring">    filename:</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line"><tt class="py-docstring">        original filename of the `fobj`, required to determine extension</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line"><tt class="py-docstring">    upname:</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"><tt class="py-docstring">        name of the file where app is temporarily stored or `None` on failure</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">    <tt class="py-name">upname</tt> <tt class="py-op">=</tt> <tt id="link-75" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-75', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-string">'../deposit/%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">        <tt id="link-76" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-76', 'write_file', 'link-14');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">upname</tt><tt class="py-op">,</tt> <tt class="py-name">fobj</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-77', 'read', 'link-64');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-78" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-78', 'apath', 'link-23');">apath</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt id="link-79" class="py-name"><a title="web2py.gluon.fileutils.w2p_unpack_plugin" class="py-name" href="#" onclick="return doclink('link-79', 'w2p_unpack_plugin', 'link-6');">w2p_unpack_plugin</a></tt><tt class="py-op">(</tt><tt class="py-name">upname</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">        <tt id="link-80" class="py-name"><a title="web2py.gluon.fileutils.fix_newlines" class="py-name" href="#" onclick="return doclink('link-80', 'fix_newlines', 'link-9');">fix_newlines</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">upname</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-81" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-81', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">upname</tt><tt class="py-op">)</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
<a name="check_new_version"></a><div id="check_new_version-def"><a name="L326"></a><tt class="py-lineno">326</tt> <a class="py-toggle" href="#" id="check_new_version-toggle" onclick="return toggle('check_new_version');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#check_new_version">check_new_version</a><tt class="py-op">(</tt><tt class="py-param">myversion</tt><tt class="py-op">,</tt> <tt class="py-param">version_URL</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="check_new_version-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="check_new_version-expanded"><a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line"><tt class="py-docstring">    Compares current web2py's version with the latest stable web2py version.</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line"><tt class="py-docstring">    myversion:</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line"><tt class="py-docstring">        the current version as stored in file `web2py/VERSION`</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line"><tt class="py-docstring">    version_URL:</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line"><tt class="py-docstring">        the URL that contains the version of the latest stable release</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line"><tt class="py-docstring">    state:</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"><tt class="py-docstring">        `True` if upgrade available, `False` if current version if up-to-date,</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line"><tt class="py-docstring">        -1 on error</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line"><tt class="py-docstring">    version:</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"><tt class="py-docstring">        the most up-to-version available</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">urllib</tt> <tt class="py-keyword">import</tt> <tt class="py-name">urlopen</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">        <tt id="link-82" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-82', 'version', 'link-82');">version</a></tt> <tt class="py-op">=</tt> <tt class="py-name">urlopen</tt><tt class="py-op">(</tt><tt class="py-name">version_URL</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-83', 'read', 'link-64');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-84" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-84', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">myversion</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line"> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-85" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-85', 'version', 'link-82');">version</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-name">myversion</tt><tt class="py-op">:</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-86" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-86', 'version', 'link-82');">version</a></tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt id="link-87" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-87', 'version', 'link-82');">version</a></tt> </tt>
</div><a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line"> </tt>
<a name="unzip"></a><div id="unzip-def"><a name="L356"></a><tt class="py-lineno">356</tt> <a class="py-toggle" href="#" id="unzip-toggle" onclick="return toggle('unzip');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#unzip">unzip</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">dir</tt><tt class="py-op">,</tt> <tt class="py-param">subfolder</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="unzip-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="unzip-expanded"><a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line"><tt class="py-docstring">    Unzips filename into dir (.zip only, no .gz etc)</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line"><tt class="py-docstring">    if subfolder!='' it unzip only files in subfolder</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-88" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-88', 'abspath', 'link-10');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">zipfile</tt><tt class="py-op">.</tt><tt class="py-name">is_zipfile</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">RuntimeError</tt><tt class="py-op">,</tt> <tt class="py-string">'Not a valid zipfile'</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line">    <tt class="py-name">zf</tt> <tt class="py-op">=</tt> <tt class="py-name">zipfile</tt><tt class="py-op">.</tt><tt class="py-name">ZipFile</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">subfolder</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-89', 'endswith', 'link-89');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">        <tt class="py-name">subfolder</tt> <tt class="py-op">=</tt> <tt class="py-name">subfolder</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-90', 'len', 'link-90');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">subfolder</tt><tt class="py-op">)</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt id="link-91" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-91', 'name', 'link-91');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">zf</tt><tt class="py-op">.</tt><tt class="py-name">namelist</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-92" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-92', 'name', 'link-91');">name</a></tt><tt class="py-op">.</tt><tt id="link-93" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-93', 'startswith', 'link-93');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-name">subfolder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">            <tt class="py-keyword">continue</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">        <tt class="py-comment">#print name[n:]</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-94', 'name', 'link-91');">name</a></tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-95', 'endswith', 'link-89');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">            <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-96', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-97', 'name', 'link-91');">name</a></tt><tt class="py-op">[</tt><tt class="py-name">n</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-98', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">                <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">            <tt id="link-99" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-99', 'write_file', 'link-14');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-100', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt id="link-101" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-101', 'name', 'link-91');">name</a></tt><tt class="py-op">[</tt><tt class="py-name">n</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">zf</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-102', 'read', 'link-64');">read</a></tt><tt class="py-op">(</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-103', 'name', 'link-91');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line"> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line"> </tt>
<a name="upgrade"></a><div id="upgrade-def"><a name="L380"></a><tt class="py-lineno">380</tt> <a class="py-toggle" href="#" id="upgrade-toggle" onclick="return toggle('upgrade');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#upgrade">upgrade</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">=</tt><tt class="py-string">'http://web2py.com'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="upgrade-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="upgrade-expanded"><a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line"><tt class="py-docstring">    Upgrades web2py (src, osx, win) is a new version is posted.</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line"><tt class="py-docstring">    It detects whether src, osx or win is running and downloads the right one</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line"><tt class="py-docstring">    request:</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line"><tt class="py-docstring">        the current request object, required to determine version and path</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line"><tt class="py-docstring">    url:</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line"><tt class="py-docstring">        the incomplete url where to locate the latest web2py</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line"><tt class="py-docstring">        actual url is url+'/examples/static/web2py_(src|osx|win).zip'</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line"><tt class="py-docstring">        True on success, False on failure (network problem or old version)</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">    <tt id="link-104" class="py-name" targets="Variable web2py.gluon.main.web2py_version=web2py.gluon.main-module.html#web2py_version"><a title="web2py.gluon.main.web2py_version" class="py-name" href="#" onclick="return doclink('link-104', 'web2py_version', 'link-104');">web2py_version</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-105', 'env', 'link-105');">env</a></tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="web2py.gluon.main.web2py_version" class="py-name" href="#" onclick="return doclink('link-106', 'web2py_version', 'link-104');">web2py_version</a></tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">    <tt class="py-name">gluon_parent</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-107', 'env', 'link-105');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">gluon_parent</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-108', 'endswith', 'link-89');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">        <tt class="py-name">gluon_parent</tt> <tt class="py-op">=</tt> <tt class="py-name">gluon_parent</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">check</tt><tt class="py-op">,</tt> <tt id="link-109" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-109', 'version', 'link-82');">version</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-110" class="py-name" targets="Function web2py.gluon.admin.check_new_version()=web2py.gluon.admin-module.html#check_new_version"><a title="web2py.gluon.admin.check_new_version" class="py-name" href="#" onclick="return doclink('link-110', 'check_new_version', 'link-110');">check_new_version</a></tt><tt class="py-op">(</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.main.web2py_version" class="py-name" href="#" onclick="return doclink('link-111', 'web2py_version', 'link-104');">web2py_version</a></tt><tt class="py-op">,</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">                                         <tt id="link-112" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-112', 'url', 'link-112');">url</a></tt><tt class="py-op">+</tt><tt class="py-string">'/examples/default/version'</tt><tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">check</tt><tt class="py-op">:</tt> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-string">'Already latest version'</tt><tt class="py-op">)</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-113', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-114', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">gluon_parent</tt><tt class="py-op">,</tt> <tt class="py-string">'web2py.exe'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">        <tt class="py-name">version_type</tt> <tt class="py-op">=</tt> <tt class="py-string">'win'</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">        <tt class="py-name">destination</tt> <tt class="py-op">=</tt> <tt class="py-name">gluon_parent</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">        <tt class="py-name">subfolder</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py/'</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">gluon_parent</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-115', 'endswith', 'link-89');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/Contents/Resources/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">        <tt class="py-name">version_type</tt> <tt class="py-op">=</tt> <tt class="py-string">'osx'</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line">        <tt class="py-name">destination</tt> <tt class="py-op">=</tt> <tt class="py-name">gluon_parent</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-116', 'len', 'link-90');">len</a></tt><tt class="py-op">(</tt><tt class="py-string">'/Contents/Resources/'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">        <tt class="py-name">subfolder</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py/web2py.app/'</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">        <tt class="py-name">version_type</tt> <tt class="py-op">=</tt> <tt class="py-string">'src'</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">        <tt class="py-name">destination</tt> <tt class="py-op">=</tt> <tt class="py-name">gluon_parent</tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">        <tt class="py-name">subfolder</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py/'</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line"> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">    <tt class="py-name">full_url</tt> <tt class="py-op">=</tt> <tt id="link-117" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-117', 'url', 'link-112');">url</a></tt> <tt class="py-op">+</tt> <tt class="py-string">'/examples/static/web2py_%s.zip'</tt> <tt class="py-op">%</tt> <tt class="py-name">version_type</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-118" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-118', 'abspath', 'link-10');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py_%s_downloaded.zip'</tt> <tt class="py-op">%</tt> <tt class="py-name">version_type</tt><tt class="py-op">)</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">    <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">        <tt id="link-119" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-119', 'write_file', 'link-14');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlopen</tt><tt class="py-op">(</tt><tt class="py-name">full_url</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-120', 'read', 'link-64');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-121" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-121', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">,</tt><tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">        <tt id="link-122" class="py-name" targets="Function web2py.gluon.admin.unzip()=web2py.gluon.admin-module.html#unzip"><a title="web2py.gluon.admin.unzip" class="py-name" href="#" onclick="return doclink('link-122', 'unzip', 'link-122');">unzip</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">destination</tt><tt class="py-op">,</tt> <tt class="py-name">subfolder</tt><tt class="py-op">)</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-123" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-123', 'Exception', 'link-26');">Exception</a></tt><tt class="py-op">,</tt><tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt> </tt>
</div><a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line"> </tt>
<a name="add_path_first"></a><div id="add_path_first-def"><a name="L431"></a><tt class="py-lineno">431</tt> <a class="py-toggle" href="#" id="add_path_first-toggle" onclick="return toggle('add_path_first');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#add_path_first">add_path_first</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="add_path_first-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="add_path_first-expanded"><a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">    <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">path</tt><tt class="py-op">]</tt><tt class="py-op">+</tt><tt class="py-op">[</tt><tt class="py-name">p</tt> <tt class="py-keyword">for</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">p</tt><tt class="py-op">==</tt><tt class="py-name">path</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">p</tt><tt class="py-op">==</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">+</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
</div><a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line"> </tt>
<a name="create_missing_folders"></a><div id="create_missing_folders-def"><a name="L434"></a><tt class="py-lineno">434</tt> <a class="py-toggle" href="#" id="create_missing_folders-toggle" onclick="return toggle('create_missing_folders');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#create_missing_folders">create_missing_folders</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="create_missing_folders-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="create_missing_folders-expanded"><a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-124" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-124', 'global_settings', 'link-18');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt><tt class="py-op">:</tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">path</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-string">'deposit'</tt><tt class="py-op">,</tt> <tt class="py-string">'site-packages'</tt><tt class="py-op">,</tt> <tt class="py-string">'logs'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-125" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-125', 'abspath', 'link-10');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt id="link-126" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-126', 'gluon', 'link-126');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-127', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line">                <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line">    <tt class="py-name">paths</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-128" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-128', 'global_settings', 'link-18');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt><tt class="py-op">,</tt> <tt id="link-129" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-129', 'abspath', 'link-10');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'site-packages'</tt><tt class="py-op">,</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-130', 'gluon', 'link-126');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt>  <tt id="link-131" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-131', 'abspath', 'link-10');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'gluon'</tt><tt class="py-op">,</tt> <tt id="link-132" class="py-name"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-132', 'gluon', 'link-126');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">    <tt class="py-op">[</tt><tt id="link-133" class="py-name" targets="Function web2py.gluon.admin.add_path_first()=web2py.gluon.admin-module.html#add_path_first"><a title="web2py.gluon.admin.add_path_first" class="py-name" href="#" onclick="return doclink('link-133', 'add_path_first', 'link-133');">add_path_first</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">path</tt> <tt class="py-keyword">in</tt> <tt class="py-name">paths</tt><tt class="py-op">]</tt> </tt>
</div><a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line"> </tt>
<a name="create_missing_app_folders"></a><div id="create_missing_app_folders-def"><a name="L443"></a><tt class="py-lineno">443</tt> <a class="py-toggle" href="#" id="create_missing_app_folders-toggle" onclick="return toggle('create_missing_app_folders');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.admin-module.html#create_missing_app_folders">create_missing_app_folders</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="create_missing_app_folders-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="create_missing_app_folders-expanded"><a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-134" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-134', 'global_settings', 'link-18');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt><tt class="py-op">:</tt> </tt>
<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-135" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-135', 'global_settings', 'link-18');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">app_folders</tt><tt class="py-op">:</tt> </tt>
<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">subfolder</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'models'</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">,</tt> <tt class="py-string">'databases'</tt><tt class="py-op">,</tt> </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line">                              <tt class="py-string">'modules'</tt><tt class="py-op">,</tt> <tt class="py-string">'cron'</tt><tt class="py-op">,</tt> <tt class="py-string">'errors'</tt><tt class="py-op">,</tt> <tt class="py-string">'sessions'</tt><tt class="py-op">,</tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line">                              <tt class="py-string">'languages'</tt><tt class="py-op">,</tt> <tt class="py-string">'static'</tt><tt class="py-op">,</tt> <tt class="py-string">'private'</tt><tt class="py-op">,</tt> <tt class="py-string">'uploads'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">                <tt class="py-name">path</tt> <tt class="py-op">=</tt>  <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-136', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-name">subfolder</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-137', 'exists', 'link-32');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line">                    <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">            <tt id="link-138" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-138', 'global_settings', 'link-18');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">app_folders</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
</div><a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.cfs-module.html version [d599cce730].





















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.cfs</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;cfs
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.cfs-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module cfs</h1><span class="codelink"><a href="web2py.gluon.cfs-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)
  <h1 class="heading">Functions required to execute app components</h1>
    FOR INTERNAL USE ONLY<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.cfs-module.html#getcfs" class="summary-sig-name">getcfs</a>(<span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">filter</span>=<span class="summary-sig-default">1</span>)</span><br />
      Caches the *filtered* file `filename` with `key` until the file is
modified.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.cfs-pysrc.html#getcfs">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="cfs"></a><span class="summary-name">cfs</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="cfs_lock"></a><span class="summary-name">cfs_lock</span> = <code title="thread.allocate_lock()">thread.allocate_lock()</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="getcfs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getcfs</span>(<span class="sig-arg">key</span>,
        <span class="sig-arg">filename</span>,
        <span class="sig-arg">filter</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.cfs-pysrc.html#getcfs">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Caches the *filtered* file `filename` with `key` until the file is
modified.

:param key: the cache key
:param filename: the file to cache
:param filter: is the function used for filtering. Normally `filename` is a
    .py file and `filter` is a function that bytecode compiles the file.
    In this way the bytecode compiled file is cached. (Default = None)

This is used on Google App Engine since pyc files cannot be saved.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.cfs-pysrc.html version [92e2709656].


















































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.cfs</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;cfs
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.cfs-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.cfs-module.html">Module web2py.gluon.cfs</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring">Functions required to execute app components</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-docstring">============================================</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-docstring">FOR INTERNAL USE ONLY</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">stat</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-0', 'thread', 'link-0');">thread</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-1', 'fileutils', 'link-1');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-2', 'read_file', 'link-2');">read_file</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Module web2py.gluon.cfs=web2py.gluon.cfs-module.html,Variable web2py.gluon.cfs.cfs=web2py.gluon.cfs-module.html#cfs"><a title="web2py.gluon.cfs
web2py.gluon.cfs.cfs" class="py-name" href="#" onclick="return doclink('link-3', 'cfs', 'link-3');">cfs</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt>  <tt class="py-comment"># for speed-up</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable web2py.gluon.cfs.cfs_lock=web2py.gluon.cfs-module.html#cfs_lock"><a title="web2py.gluon.cfs.cfs_lock" class="py-name" href="#" onclick="return doclink('link-4', 'cfs_lock', 'link-4');">cfs_lock</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-5', 'thread', 'link-0');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">allocate_lock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># and thread safety</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt>
<a name="getcfs"></a><div id="getcfs-def"><a name="L24"></a><tt class="py-lineno">24</tt> <a class="py-toggle" href="#" id="getcfs-toggle" onclick="return toggle('getcfs');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.cfs-module.html#getcfs">getcfs</a><tt class="py-op">(</tt><tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">filter</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="getcfs-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="getcfs-expanded"><a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt class="py-docstring">    Caches the *filtered* file `filename` with `key` until the file is</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-docstring">    modified.</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt class="py-docstring">    :param key: the cache key</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-docstring">    :param filename: the file to cache</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-docstring">    :param filter: is the function used for filtering. Normally `filename` is a</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-docstring">        .py file and `filter` is a function that bytecode compiles the file.</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-docstring">        In this way the bytecode compiled file is cached. (Default = None)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"><tt class="py-docstring">    This is used on Google App Engine since pyc files cannot be saved.</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">    <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">stat</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">stat</tt><tt class="py-op">.</tt><tt class="py-name">ST_MTIME</tt><tt class="py-op">]</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">    <tt id="link-6" class="py-name"><a title="web2py.gluon.cfs.cfs_lock" class="py-name" href="#" onclick="return doclink('link-6', 'cfs_lock', 'link-4');">cfs_lock</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method web2py.gluon.newcron.Token.acquire()=web2py.gluon.newcron.Token-class.html#acquire"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-7', 'acquire', 'link-7');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">    <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="web2py.gluon.cfs
web2py.gluon.cfs.cfs" class="py-name" href="#" onclick="return doclink('link-8', 'cfs', 'link-3');">cfs</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-9', 'get', 'link-9');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">    <tt id="link-10" class="py-name"><a title="web2py.gluon.cfs.cfs_lock" class="py-name" href="#" onclick="return doclink('link-10', 'cfs_lock', 'link-4');">cfs_lock</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.newcron.Token.release()=web2py.gluon.newcron.Token-class.html#release"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-11', 'release', 'link-11');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">item</tt> <tt class="py-keyword">and</tt> <tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">t</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">filter</tt><tt class="py-op">:</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-12', 'read_file', 'link-2');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">    <tt id="link-13" class="py-name"><a title="web2py.gluon.cfs.cfs_lock" class="py-name" href="#" onclick="return doclink('link-13', 'cfs_lock', 'link-4');">cfs_lock</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-14', 'acquire', 'link-7');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">    <tt id="link-15" class="py-name"><a title="web2py.gluon.cfs
web2py.gluon.cfs.cfs" class="py-name" href="#" onclick="return doclink('link-15', 'cfs', 'link-3');">cfs</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">    <tt id="link-16" class="py-name"><a title="web2py.gluon.cfs.cfs_lock" class="py-name" href="#" onclick="return doclink('link-16', 'cfs_lock', 'link-4');">cfs_lock</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-17', 'release', 'link-11');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
</div><a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.compileapp-module.html version [0dcf560404].







































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.compileapp</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;compileapp
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.compileapp-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module compileapp</h1><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)
  <h1 class="heading">Functions required to execute app components</h1>
    FOR INTERNAL USE ONLY<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.compileapp.mybuiltin-class.html" class="summary-name">mybuiltin</a><br />
      NOTE could simple use a dict and populate it, NOTE not sure if 
        this changes things though if monkey patching import.....
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.compileapp.LoadFactory-class.html" class="summary-name">LoadFactory</a><br />
      Attention: this helper is new and experimental
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.compileapp-module.html#local_import_aux" class="summary-sig-name">local_import_aux</a>(<span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">force</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">app</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">welcome</code><code class="variable-quote">'</code></span>)</span><br />
      In apps, instead of importing a local module
(in applications/app/modules) with::

   import a.b.c as d

you should do::

   d = local_import('a.b.c')

or (to force a reload):

   d = local_import('a.b.c', reload=True)

This prevents conflict between applications and un-necessary execs.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#local_import_aux">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="build_environment"></a><span class="summary-sig-name">build_environment</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>,
        <span class="summary-sig-arg">session</span>,
        <span class="summary-sig-arg">store_current</span>=<span class="summary-sig-default">True</span>)</span><br />
      Build the environment dictionary into which web2py files are 
      executed.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#build_environment">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="save_pyc"></a><span class="summary-sig-name">save_pyc</span>(<span class="summary-sig-arg">filename</span>)</span><br />
      Bytecode compiles the file `filename`</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#save_pyc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.compileapp-module.html#read_pyc" class="summary-sig-name">read_pyc</a>(<span class="summary-sig-arg">filename</span>)</span><br />
      Read the code inside a bytecode compiled file if the MAGIC number 
      is compatible</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#read_pyc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compile_views"></a><span class="summary-sig-name">compile_views</span>(<span class="summary-sig-arg">folder</span>)</span><br />
      Compiles all the views in the application specified by 
      `folder`</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#compile_views">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compile_models"></a><span class="summary-sig-name">compile_models</span>(<span class="summary-sig-arg">folder</span>)</span><br />
      Compiles all the models in the application specified by 
      `folder`</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#compile_models">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compile_controllers"></a><span class="summary-sig-name">compile_controllers</span>(<span class="summary-sig-arg">folder</span>)</span><br />
      Compiles all the controllers in the application specified by 
      `folder`</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#compile_controllers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="run_models_in"></a><span class="summary-sig-name">run_models_in</span>(<span class="summary-sig-arg">environment</span>)</span><br />
      Runs all models (in the app specified by the current folder) It 
      tries pre-compiled models first before compiling them.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#run_models_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.compileapp-module.html#run_controller_in" class="summary-sig-name">run_controller_in</a>(<span class="summary-sig-arg">controller</span>,
        <span class="summary-sig-arg">function</span>,
        <span class="summary-sig-arg">environment</span>)</span><br />
      Runs the controller.function() (for the app specified by the 
      current folder).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#run_controller_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.compileapp-module.html#run_view_in" class="summary-sig-name">run_view_in</a>(<span class="summary-sig-arg">environment</span>)</span><br />
      Executes the view for the requested action.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#run_view_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="remove_compiled_application"></a><span class="summary-sig-name">remove_compiled_application</span>(<span class="summary-sig-arg">folder</span>)</span><br />
      Deletes the folder `compiled` containing the compiled 
      application.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#remove_compiled_application">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compile_application"></a><span class="summary-sig-name">compile_application</span>(<span class="summary-sig-arg">folder</span>)</span><br />
      Compiles all models, views, controller for the application in 
      `folder`.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#compile_application">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.compileapp-module.html#test" class="summary-sig-name">test</a>()</span><br />
      Example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#test">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="is_gae"></a><span class="summary-name">is_gae</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="is_jython"></a><span class="summary-name">is_jython</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.compileapp-module.html#TEST_CODE" class="summary-name">TEST_CODE</a> = <code title="'''
def _TEST():
    import doctest, sys, cStringIO, types, cgi, gluon.fileutils
    if not gluon.fileutils.check_credentials(request):
        raise HTTP(401, web2py_error=\'invalid credentials\')
    stdout = sys.stdout
    html = \'&lt;h2&gt;Testing controller &quot;%s.py&quot; ... done.&lt;/h2&gt;&lt;br/&gt;\\n\' \\
\
..."><code class="variable-quote">'</code><code class="variable-string">\ndef _TEST():\n    import doctest, sys, cStringI</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="local_import_aux"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">local_import_aux</span>(<span class="sig-arg">name</span>,
        <span class="sig-arg">force</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">app</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">welcome</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#local_import_aux">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

In apps, instead of importing a local module
(in applications/app/modules) with::

   import a.b.c as d

you should do::

   d = local_import('a.b.c')

or (to force a reload):

   d = local_import('a.b.c', reload=True)

This prevents conflict between applications and un-necessary execs.
It can be used to import any module, including regular Python modules.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="read_pyc"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">read_pyc</span>(<span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#read_pyc">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Read the code inside a bytecode compiled file if the MAGIC number is 
  compatible</p>
  :returns: a code object
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="run_controller_in"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run_controller_in</span>(<span class="sig-arg">controller</span>,
        <span class="sig-arg">function</span>,
        <span class="sig-arg">environment</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#run_controller_in">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Runs the controller.function() (for the app specified by the current 
  folder). It tries pre-compiled controller_function.pyc first before 
  compiling it.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="run_view_in"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run_view_in</span>(<span class="sig-arg">environment</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#run_view_in">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Executes the view for the requested action. The view is the one 
  specified in `response.view` or determined by the url or 
  `view/generic.extension` It tries the pre-compiled 
  views_controller_function.pyc before compiling it.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="test"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">test</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#test">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Example:
<pre class="literalblock">
   &gt;&gt;&gt; import traceback, types
   &gt;&gt;&gt; environment={'x':1}
   &gt;&gt;&gt; open('a.py', 'w').write('print 1/x')
   &gt;&gt;&gt; save_pyc('a.py')
   &gt;&gt;&gt; os.unlink('a.py')
   &gt;&gt;&gt; if type(read_pyc('a.pyc'))==types.CodeType: print 'code'
   code
   &gt;&gt;&gt; exec read_pyc('a.pyc') in environment
   1
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="TEST_CODE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">TEST_CODE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string"></code>
<code class="variable-string">def _TEST():</code>
<code class="variable-string">    import doctest, sys, cStringIO, types, cgi, gluon.fileutils</code>
<code class="variable-string">    if not gluon.fileutils.check_credentials(request):</code>
<code class="variable-string">        raise HTTP(401, web2py_error=\'invalid credentials\')</code>
<code class="variable-string">    stdout = sys.stdout</code>
<code class="variable-string">    html = \'&lt;h2&gt;Testing controller &quot;%s.py&quot; ... done.&lt;/h2&gt;&lt;br/&gt;\\n\' \</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">\</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.compileapp-pysrc.html version [fa5f65d8df].















































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.compileapp</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;compileapp
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.compileapp-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.compileapp-module.html">Module web2py.gluon.compileapp</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">Functions required to execute app components</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">============================================</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">FOR INTERNAL USE ONLY</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">fnmatch</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">copy</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">random</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">__builtin__</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-0', 'storage', 'link-0');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-1', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name" targets="Class web2py.gluon.storage.List=web2py.gluon.storage.List-class.html"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-2', 'List', 'link-2');">List</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.template=web2py.gluon.template-module.html"><a title="web2py.gluon.template" class="py-name" href="#" onclick="return doclink('link-3', 'template', 'link-3');">template</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Function web2py.gluon.template.parse_template()=web2py.gluon.template-module.html#parse_template"><a title="web2py.gluon.template.parse_template" class="py-name" href="#" onclick="return doclink('link-4', 'parse_template', 'link-4');">parse_template</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.restricted=web2py.gluon.restricted-module.html,Function web2py.gluon.restricted.restricted()=web2py.gluon.restricted-module.html#restricted"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-5', 'restricted', 'link-5');">restricted</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-6', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Function web2py.gluon.restricted.compile2()=web2py.gluon.restricted-module.html#compile2"><a title="web2py.gluon.restricted.compile2" class="py-name" href="#" onclick="return doclink('link-7', 'compile2', 'link-7');">compile2</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-8" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-8', 'fileutils', 'link-8');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-9" class="py-name" targets="Function web2py.gluon.fileutils.mktree()=web2py.gluon.fileutils-module.html#mktree"><a title="web2py.gluon.fileutils.mktree" class="py-name" href="#" onclick="return doclink('link-9', 'mktree', 'link-9');">mktree</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-10', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-11', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-12', 'write_file', 'link-12');">write_file</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-13" class="py-name" targets="Module web2py.gluon.myregex=web2py.gluon.myregex-module.html"><a title="web2py.gluon.myregex" class="py-name" href="#" onclick="return doclink('link-13', 'myregex', 'link-13');">myregex</a></tt> <tt class="py-keyword">import</tt> <tt id="link-14" class="py-name" targets="Variable web2py.gluon.myregex.regex_expose=web2py.gluon.myregex-module.html#regex_expose"><a title="web2py.gluon.myregex.regex_expose" class="py-name" href="#" onclick="return doclink('link-14', 'regex_expose', 'link-14');">regex_expose</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name" targets="Module web2py.gluon.languages=web2py.gluon.languages-module.html"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-15', 'languages', 'link-15');">languages</a></tt> <tt class="py-keyword">import</tt> <tt id="link-16" class="py-name" targets="Class web2py.gluon.languages.translator=web2py.gluon.languages.translator-class.html"><a title="web2py.gluon.languages.translator" class="py-name" href="#" onclick="return doclink('link-16', 'translator', 'link-16');">translator</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-17" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-17', 'dal', 'link-17');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-18" class="py-name" targets="Class web2py.gluon.dal.BaseAdapter=web2py.gluon.dal.BaseAdapter-class.html"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-18', 'BaseAdapter', 'link-18');">BaseAdapter</a></tt><tt class="py-op">,</tt> <tt class="py-name">SQLDB</tt><tt class="py-op">,</tt> <tt class="py-name">SQLField</tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Class web2py.gluon.dal.DAL=web2py.gluon.dal.DAL-class.html"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-19', 'DAL', 'link-19');">DAL</a></tt><tt class="py-op">,</tt> <tt id="link-20" class="py-name" targets="Class web2py.gluon.dal.Field=web2py.gluon.dal.Field-class.html"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-20', 'Field', 'link-20');">Field</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-21" class="py-name" targets="Module web2py.gluon.sqlhtml=web2py.gluon.sqlhtml-module.html"><a title="web2py.gluon.sqlhtml" class="py-name" href="#" onclick="return doclink('link-21', 'sqlhtml', 'link-21');">sqlhtml</a></tt> <tt class="py-keyword">import</tt> <tt id="link-22" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLFORM=web2py.gluon.sqlhtml.SQLFORM-class.html"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-22', 'SQLFORM', 'link-22');">SQLFORM</a></tt><tt class="py-op">,</tt> <tt id="link-23" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLTABLE=web2py.gluon.sqlhtml.SQLTABLE-class.html"><a title="web2py.gluon.sqlhtml.SQLTABLE" class="py-name" href="#" onclick="return doclink('link-23', 'SQLTABLE', 'link-23');">SQLTABLE</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-24" class="py-name" targets="Module web2py.gluon.cache=web2py.gluon.cache-module.html"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-24', 'cache', 'link-24');">cache</a></tt> <tt class="py-keyword">import</tt> <tt id="link-25" class="py-name" targets="Class web2py.gluon.cache.Cache=web2py.gluon.cache.Cache-class.html"><a title="web2py.gluon.cache.Cache" class="py-name" href="#" onclick="return doclink('link-25', 'Cache', 'link-25');">Cache</a></tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-26" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-26', 'globals', 'link-26');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-27" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-27', 'current', 'link-27');">current</a></tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-28" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-28', 'settings', 'link-28');">settings</a></tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-29" class="py-name" targets="Module web2py.gluon.cfs=web2py.gluon.cfs-module.html,Variable web2py.gluon.cfs.cfs=web2py.gluon.cfs-module.html#cfs"><a title="web2py.gluon.cfs
web2py.gluon.cfs.cfs" class="py-name" href="#" onclick="return doclink('link-29', 'cfs', 'link-29');">cfs</a></tt> <tt class="py-keyword">import</tt> <tt id="link-30" class="py-name" targets="Function web2py.gluon.cfs.getcfs()=web2py.gluon.cfs-module.html#getcfs"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-30', 'getcfs', 'link-30');">getcfs</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-31" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-31', 'html', 'link-31');">html</a></tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-32" class="py-name" targets="Function web2py.gluon.tools.validators()=web2py.gluon.tools-module.html#validators,Module web2py.gluon.validators=web2py.gluon.validators-module.html"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-32', 'validators', 'link-32');">validators</a></tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-33" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-33', 'http', 'link-33');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-34" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-34', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">,</tt> <tt id="link-35" class="py-name" targets="Function web2py.gluon.http.redirect()=web2py.gluon.http-module.html#redirect"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-35', 'redirect', 'link-35');">redirect</a></tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">marshal</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">shutil</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">imp</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt id="link-36" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-36', 'logger', 'link-36');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-37" class="py-name" targets="Module web2py.gluon.rewrite=web2py.gluon.rewrite-module.html"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-37', 'rewrite', 'link-37');">rewrite</a></tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">py_compile</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt id="link-38" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-38', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'unable to import py_compile'</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt id="link-39" class="py-name" targets="Variable web2py.gluon.compileapp.is_gae=web2py.gluon.compileapp-module.html#is_gae,Variable web2py.gluon.languages.is_gae=web2py.gluon.languages-module.html#is_gae"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-39', 'is_gae', 'link-39');">is_gae</a></tt> <tt class="py-op">=</tt> <tt id="link-40" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-40', 'settings', 'link-28');">settings</a></tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-41', 'global_settings', 'link-41');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt id="link-42" class="py-name" targets="Variable web2py.gluon.compileapp.is_jython=web2py.gluon.compileapp-module.html#is_jython"><a title="web2py.gluon.compileapp.is_jython" class="py-name" href="#" onclick="return doclink('link-42', 'is_jython', 'link-42');">is_jython</a></tt> <tt class="py-op">=</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-43', 'settings', 'link-28');">settings</a></tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-44', 'global_settings', 'link-41');">global_settings</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.compileapp.is_jython" class="py-name" href="#" onclick="return doclink('link-45', 'is_jython', 'link-42');">is_jython</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'java'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">platform</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-46', 'lower', 'link-46');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">,</tt> <tt class="py-string">'JYTHON_JAR'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">copyright</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-47', 'find', 'link-47');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'Jython'</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt id="link-48" class="py-name" targets="Variable web2py.gluon.compileapp.TEST_CODE=web2py.gluon.compileapp-module.html#TEST_CODE"><a title="web2py.gluon.compileapp.TEST_CODE" class="py-name" href="#" onclick="return doclink('link-48', 'TEST_CODE', 'link-48');">TEST_CODE</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-string">r"""</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-string">def _TEST():</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-string">    import doctest, sys, cStringIO, types, cgi, gluon.fileutils</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-string">    if not gluon.fileutils.check_credentials(request):</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"><tt class="py-string">        raise HTTP(401, web2py_error='invalid credentials')</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-string">    stdout = sys.stdout</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-string">    html = '&lt;h2&gt;Testing controller "%s.py" ... done.&lt;/h2&gt;&lt;br/&gt;\n' \</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-string">        % request.controller</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-string">    for key in sorted([key for key in globals() if not key in __symbols__+['_TEST']]):</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-string">        eval_key = eval(key)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-string">        if type(eval_key) == types.FunctionType:</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-string">            number_doctests = sum([len(ds.examples) for ds in doctest.DocTestFinder().find(eval_key)])</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-string">            if number_doctests&gt;0:</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-string">                sys.stdout = cStringIO.StringIO()</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-string">                name = '%s/controllers/%s.py in %s.__doc__' \</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-string">                    % (request.folder, request.controller, key)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-string">                doctest.run_docstring_examples(eval_key,</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-string">                    globals(), False, name=name)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-string">                report = sys.stdout.getvalue().strip()</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-string">                if report:</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-string">                    pf = 'failed'</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-string">                else:</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-string">                    pf = 'passed'</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-string">                html += '&lt;h3 class="%s"&gt;Function %s [%s]&lt;/h3&gt;\n' \</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-string">                    % (pf, key, pf)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-string">                if report:</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-string">                    html += CODE(report, language='web2py', \</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-string">                        link='/examples/global/vars/').xml()</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-string">                html += '&lt;br/&gt;\n'</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-string">            else:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"><tt class="py-string">                html += \</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-string">                    '&lt;h3 class="nodoctests"&gt;Function %s [no doctests]&lt;/h3&gt;&lt;br/&gt;\n' \</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-string">                    % (key)</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-string">    response._vars = html</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-string">    sys.stdout = stdout</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-string">_TEST()</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="mybuiltin"></a><div id="mybuiltin-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="mybuiltin-toggle" onclick="return toggle('mybuiltin');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.compileapp.mybuiltin-class.html">mybuiltin</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="mybuiltin-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="mybuiltin-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring">    NOTE could simple use a dict and populate it, </tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">    NOTE not sure if this changes things though if monkey patching import.....</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt class="py-comment">#__builtins__</tt> </tt>
<a name="mybuiltin.__getitem__"></a><div id="mybuiltin.__getitem__-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="mybuiltin.__getitem__-toggle" onclick="return toggle('mybuiltin.__getitem__');">-</a><tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp.mybuiltin-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="mybuiltin.__getitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="mybuiltin.__getitem__-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">__builtin__</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">KeyError</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt>             </tt>
</div><a name="mybuiltin.__setitem__"></a><div id="mybuiltin.__setitem__-def"><a name="L102"></a><tt class="py-lineno">102</tt> <a class="py-toggle" href="#" id="mybuiltin.__setitem__-toggle" onclick="return toggle('mybuiltin.__setitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp.mybuiltin-class.html#__setitem__">__setitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="mybuiltin.__setitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="mybuiltin.__setitem__-expanded"><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-name">setattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="LoadFactory"></a><div id="LoadFactory-def"><a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="LoadFactory-toggle" onclick="return toggle('LoadFactory');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.compileapp.LoadFactory-class.html">LoadFactory</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LoadFactory-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="LoadFactory-expanded"><a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">    Attention: this helper is new and experimental</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="LoadFactory.__init__"></a><div id="LoadFactory.__init__-def"><a name="L109"></a><tt class="py-lineno">109</tt> <a class="py-toggle" href="#" id="LoadFactory.__init__-toggle" onclick="return toggle('LoadFactory.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp.LoadFactory-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">environment</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LoadFactory.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="LoadFactory.__init__-expanded"><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt> </tt>
</div><a name="LoadFactory.__call__"></a><div id="LoadFactory.__call__-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="LoadFactory.__call__-toggle" onclick="return toggle('LoadFactory.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp.LoadFactory-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">c</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">=</tt><tt class="py-string">'index'</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                 <tt class="py-param">extension</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">target</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">ajax</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-param">ajax_trap</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                 <tt class="py-param">url</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">user_signature</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">content</tt><tt class="py-op">=</tt><tt class="py-string">'loading...'</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">attr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LoadFactory.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="LoadFactory.__call__-expanded"><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-49', 'globals', 'link-26');">globals</a></tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-name">target</tt> <tt class="py-op">=</tt> <tt class="py-name">target</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'c'</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">random</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_id'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">target</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">,</tt><tt id="link-50" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-50', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-51', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-52" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-52', 'url', 'link-52');">url</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">ajax</tt><tt class="py-op">:</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">            <tt id="link-53" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-53', 'url', 'link-52');">url</a></tt> <tt class="py-op">=</tt> <tt id="link-54" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-54', 'url', 'link-52');">url</a></tt> <tt class="py-keyword">or</tt> <tt id="link-55" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-55', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Function web2py.gluon.html.URL()=web2py.gluon.html-module.html#URL"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-56', 'URL', 'link-56');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">                                  <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">vars</tt><tt class="py-op">,</tt> <tt class="py-name">extension</tt><tt class="py-op">=</tt><tt class="py-name">extension</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                                  <tt class="py-name">user_signature</tt><tt class="py-op">=</tt><tt class="py-name">user_signature</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-name">script</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-57', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name" targets="Class web2py.gluon.html.SCRIPT=web2py.gluon.html.SCRIPT-class.html"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-58', 'SCRIPT', 'link-58');">SCRIPT</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py_component("%s","%s")'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-59', 'url', 'link-52');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">target</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">                                 <tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">"text/javascript"</tt><tt class="py-op">)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-60" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-60', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Variable web2py.gluon.TAG=web2py.gluon-module.html#TAG,Variable web2py.gluon.html.TAG=web2py.gluon.html-module.html#TAG,Variable web2py.gluon.tools.TAG=web2py.gluon.tools-module.html#TAG"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-61', 'TAG', 'link-61');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">script</tt><tt class="py-op">,</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-62', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.DIV()=web2py.gluon.dal.BaseAdapter-class.html#DIV,Method web2py.gluon.dal.NoSQLAdapter.DIV()=web2py.gluon.dal.NoSQLAdapter-class.html#DIV,Class web2py.gluon.html.DIV=web2py.gluon.html.DIV-class.html"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-63', 'DIV', 'link-63');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">content</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt><tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">                <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">]</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt> <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-64', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-65', 'items', 'link-65');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">                <tt class="py-name">other_request</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">[</tt><tt class="py-string">'env'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-66" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-66', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-67', 'env', 'link-67');">env</a></tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-68', 'items', 'link-65');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">                <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-69', 'env', 'link-67');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'key'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt>  </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">extension</tt> <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt id="link-70" class="py-name"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-70', 'List', 'link-2');">List</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">vars</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">vars</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt> <tt class="py-op">=</tt> <tt id="link-71" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-71', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">            <tt class="py-name">other_response</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-72', 'globals', 'link-26');">globals</a></tt><tt class="py-op">.</tt><tt id="link-73" class="py-name" targets="Class web2py.gluon.globals.Response=web2py.gluon.globals.Response-class.html"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-73', 'Response', 'link-73');">Response</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-74', 'env', 'link-67');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">path_info</tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> \ </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">                <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-75', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> \ </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">                             <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-76', 'env', 'link-67');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">query_string</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">                <tt class="py-name">vars</tt> <tt class="py-keyword">and</tt> <tt id="link-77" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-77', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-78', 'URL', 'link-56');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-79', 'env', 'link-67');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_web2py_component_location</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-80', 'env', 'link-67');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">path_info</tt>             </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">cid</tt> <tt class="py-op">=</tt> <tt class="py-name">target</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-81', 'env', 'link-67');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_web2py_component_element</tt> <tt class="py-op">=</tt> <tt class="py-name">target</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">            <tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">other_request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">            <tt class="py-name">other_environment</tt> <tt class="py-op">=</tt> <tt class="py-name">copy</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">            <tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt> <tt class="py-op">=</tt> <tt class="py-name">other_environment</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">            <tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">generic_patterns</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">                <tt class="py-name">copy</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-82', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">generic_patterns</tt><tt class="py-op">)</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">            <tt class="py-name">other_environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">other_request</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">            <tt class="py-name">other_environment</tt><tt class="py-op">[</tt><tt class="py-string">'response'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">other_response</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">            <tt class="py-comment">## some magic here because current are thread-locals</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">            <tt class="py-name">original_request</tt><tt class="py-op">,</tt> <tt id="link-83" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-83', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-84', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">other_request</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">            <tt class="py-name">original_response</tt><tt class="py-op">,</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-85', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-86" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-86', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">other_response</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">            <tt class="py-name">page</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name" targets="Function web2py.gluon.compileapp.run_controller_in()=web2py.gluon.compileapp-module.html#run_controller_in"><a title="web2py.gluon.compileapp.run_controller_in" class="py-name" href="#" onclick="return doclink('link-87', 'run_controller_in', 'link-87');">run_controller_in</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">other_environment</tt><tt class="py-op">)</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">page</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">                <tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">page</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">page</tt><tt class="py-op">:</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">                    <tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">page</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                <tt id="link-88" class="py-name" targets="Function web2py.gluon.compileapp.run_view_in()=web2py.gluon.compileapp-module.html#run_view_in"><a title="web2py.gluon.compileapp.run_view_in" class="py-name" href="#" onclick="return doclink('link-88', 'run_view_in', 'link-88');">run_view_in</a></tt><tt class="py-op">(</tt><tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">)</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                <tt class="py-name">page</tt> <tt class="py-op">=</tt> <tt class="py-name">other_response</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">            <tt id="link-89" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-89', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-90', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">original_request</tt><tt class="py-op">,</tt> <tt class="py-name">original_response</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">            <tt class="py-name">js</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">ajax_trap</tt><tt class="py-op">:</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">                <tt class="py-name">link</tt> <tt class="py-op">=</tt> <tt id="link-91" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-91', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-92', 'URL', 'link-56');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">                                <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">vars</tt><tt class="py-op">,</tt> <tt class="py-name">extension</tt><tt class="py-op">=</tt><tt class="py-name">extension</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">                                <tt class="py-name">user_signature</tt><tt class="py-op">=</tt><tt class="py-name">user_signature</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">                <tt class="py-name">js</tt> <tt class="py-op">=</tt> <tt class="py-string">"web2py_trap_form('%s','%s');"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">link</tt><tt class="py-op">,</tt> <tt class="py-name">target</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">            <tt class="py-name">script</tt> <tt class="py-op">=</tt> <tt class="py-name">js</tt> <tt class="py-keyword">and</tt> <tt id="link-93" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-93', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-94', 'SCRIPT', 'link-58');">SCRIPT</a></tt><tt class="py-op">(</tt><tt class="py-name">js</tt><tt class="py-op">,</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">"text/javascript"</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-95', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-96', 'TAG', 'link-61');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-97', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-98', 'DIV', 'link-63');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-99', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt id="link-100" class="py-name" targets="Class web2py.gluon.html.XML=web2py.gluon.html.XML-class.html"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-100', 'XML', 'link-100');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">page</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">script</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line"> </tt>
<a name="local_import_aux"></a><div id="local_import_aux-def"><a name="L187"></a><tt class="py-lineno">187</tt> <a class="py-toggle" href="#" id="local_import_aux-toggle" onclick="return toggle('local_import_aux');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#local_import_aux">local_import_aux</a><tt class="py-op">(</tt><tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">force</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-string">'welcome'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="local_import_aux-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="local_import_aux-expanded"><a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"><tt class="py-docstring">    In apps, instead of importing a local module</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"><tt class="py-docstring">    (in applications/app/modules) with::</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"><tt class="py-docstring">       import a.b.c as d</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring">    you should do::</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring">       d = local_import('a.b.c')</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-docstring">    or (to force a reload):</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring">       d = local_import('a.b.c', reload=True)</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">    This prevents conflict between applications and un-necessary execs.</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">    It can be used to import any module, including regular Python modules.</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">    <tt id="link-101" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-101', 'items', 'link-65');">items</a></tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-102', 'name', 'link-102');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">    <tt id="link-103" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-103', 'name', 'link-102');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"applications.%s.modules.%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt id="link-104" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-104', 'items', 'link-65');">items</a></tt><tt class="py-op">)</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">    <tt id="link-105" class="py-name" targets="Variable web2py.gluon.import_all.module=web2py.gluon.import_all-module.html#module"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-105', 'module', 'link-105');">module</a></tt> <tt class="py-op">=</tt> <tt class="py-name">__import__</tt><tt class="py-op">(</tt><tt id="link-106" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-106', 'name', 'link-102');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-107" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-107', 'name', 'link-102');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"."</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt id="link-108" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-108', 'module', 'link-105');">module</a></tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-109', 'module', 'link-105');">module</a></tt><tt class="py-op">,</tt> <tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-110" class="py-name" targets="Method web2py.gluon.languages.translator.force()=web2py.gluon.languages.translator-class.html#force"><a title="web2py.gluon.languages.translator.force" class="py-name" href="#" onclick="return doclink('link-110', 'force', 'link-110');">force</a></tt><tt class="py-op">:</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-name">reload</tt><tt class="py-op">(</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-111', 'module', 'link-105');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-112', 'module', 'link-105');">module</a></tt> </tt>
</div><a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line"> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"><tt class="py-string">OLD IMPLEMENTATION:</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"><tt class="py-string">    items = name.replace('/','.').split('.')</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-string">    filename, modulepath = items[-1], os.path.join(apath,'modules',*items[:-1])</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-string">    imp.acquire_lock()</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"><tt class="py-string">    try:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-string">        file=None</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line"><tt class="py-string">        (file,path,desc) = imp.find_module(filename,[modulepath]+sys.path)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line"><tt class="py-string">        if not path in sys.modules or reload:</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line"><tt class="py-string">            if is_gae:</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"><tt class="py-string">                module={}</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line"><tt class="py-string">                execfile(path,{},module)</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line"><tt class="py-string">                module=Storage(module)</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line"><tt class="py-string">            else:</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"><tt class="py-string">                module = imp.load_module(path,file,path,desc)</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"><tt class="py-string">            sys.modules[path] = module</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"><tt class="py-string">        else:</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line"><tt class="py-string">            module = sys.modules[path]</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line"><tt class="py-string">    except Exception, e:</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"><tt class="py-string">        module = None</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"><tt class="py-string">    if file:</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line"><tt class="py-string">        file.close()</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"><tt class="py-string">    imp.release_lock()</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"><tt class="py-string">    if not module:</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"><tt class="py-string">        raise ImportError, "cannot find module %s in %s" % (filename, modulepath)</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"><tt class="py-string">    return module</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line"> </tt>
<a name="build_environment"></a><div id="build_environment-def"><a name="L243"></a><tt class="py-lineno">243</tt> <a class="py-toggle" href="#" id="build_environment-toggle" onclick="return toggle('build_environment');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#build_environment">build_environment</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">,</tt> <tt class="py-param">session</tt><tt class="py-op">,</tt> <tt class="py-param">store_current</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="build_environment-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="build_environment-expanded"><a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line"><tt class="py-docstring">    Build the environment dictionary into which web2py files are executed.</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">    <tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-113" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-113', 'html', 'link-31');">html</a></tt><tt class="py-op">.</tt><tt class="py-name">__all__</tt><tt class="py-op">:</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt id="link-114" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-114', 'html', 'link-31');">html</a></tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-115" class="py-name"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-115', 'validators', 'link-32');">validators</a></tt><tt class="py-op">.</tt><tt class="py-name">__all__</tt><tt class="py-op">:</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-116', 'validators', 'link-32');">validators</a></tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-117', 'env', 'link-67');">env</a></tt><tt class="py-op">:</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-118', 'env', 'link-67');">env</a></tt> <tt class="py-op">=</tt> <tt id="link-119" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-119', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">    <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'T'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-120" class="py-name"><a title="web2py.gluon.languages.translator" class="py-name" href="#" onclick="return doclink('link-120', 'translator', 'link-16');">translator</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">    <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'cache'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-121" class="py-name"><a title="web2py.gluon.cache.Cache" class="py-name" href="#" onclick="return doclink('link-121', 'Cache', 'link-25');">Cache</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">store_current</tt><tt class="py-op">:</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt id="link-122" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-122', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">        <tt id="link-123" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-123', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">        <tt id="link-124" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-124', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">        <tt id="link-125" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-125', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt id="link-126" class="py-name" targets="Variable web2py.gluon.languages.lazyT.T=web2py.gluon.languages.lazyT-class.html#T"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-126', 'T', 'link-126');">T</a></tt> <tt class="py-op">=</tt> <tt class="py-name">t</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">        <tt id="link-127" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-127', 'current', 'link-27');">current</a></tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-128', 'cache', 'link-24');">cache</a></tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt class="py-name">__builtins__</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-129" class="py-name"><a title="web2py.gluon.compileapp.is_jython" class="py-name" href="#" onclick="return doclink('link-129', 'is_jython', 'link-42');">is_jython</a></tt><tt class="py-op">:</tt> <tt class="py-comment"># jython hack</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">        <tt class="py-name">__builtins__</tt> <tt class="py-op">=</tt> <tt id="link-130" class="py-name" targets="Class web2py.gluon.compileapp.mybuiltin=web2py.gluon.compileapp.mybuiltin-class.html"><a title="web2py.gluon.compileapp.mybuiltin" class="py-name" href="#" onclick="return doclink('link-130', 'mybuiltin', 'link-130');">mybuiltin</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">        <tt class="py-name">__builtins__</tt><tt class="py-op">[</tt><tt class="py-string">'__import__'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">__builtin__</tt><tt class="py-op">.</tt><tt class="py-name">__import__</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'__builtins__'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">__builtins__</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'HTTP'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-131', 'HTTP', 'link-34');">HTTP</a></tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'redirect'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-132" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-132', 'redirect', 'link-35');">redirect</a></tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'response'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'session'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'DAL'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-133', 'DAL', 'link-19');">DAL</a></tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'Field'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-134" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-134', 'Field', 'link-20');">Field</a></tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'SQLDB'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">SQLDB</tt>        <tt class="py-comment"># for backward compatibility</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'SQLField'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">SQLField</tt>  <tt class="py-comment"># for backward compatibility</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'SQLFORM'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-135" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-135', 'SQLFORM', 'link-22');">SQLFORM</a></tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'SQLTABLE'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-136" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE" class="py-name" href="#" onclick="return doclink('link-136', 'SQLTABLE', 'link-23');">SQLTABLE</a></tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'LOAD'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-137" class="py-name" targets="Class web2py.gluon.compileapp.LoadFactory=web2py.gluon.compileapp.LoadFactory-class.html"><a title="web2py.gluon.compileapp.LoadFactory" class="py-name" href="#" onclick="return doclink('link-137', 'LoadFactory', 'link-137');">LoadFactory</a></tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'local_import'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt class="py-keyword">lambda</tt> <tt id="link-138" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-138', 'name', 'link-102');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">reload</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">:</tt>\ </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt id="link-139" class="py-name" targets="Function web2py.gluon.compileapp.local_import_aux()=web2py.gluon.compileapp-module.html#local_import_aux"><a title="web2py.gluon.compileapp.local_import_aux" class="py-name" href="#" onclick="return doclink('link-139', 'local_import_aux', 'link-139');">local_import_aux</a></tt><tt class="py-op">(</tt><tt id="link-140" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-140', 'name', 'link-102');">name</a></tt><tt class="py-op">,</tt><tt class="py-name">reload</tt><tt class="py-op">,</tt><tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">    <tt id="link-141" class="py-name"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-141', 'BaseAdapter', 'link-18');">BaseAdapter</a></tt><tt class="py-op">.</tt><tt id="link-142" class="py-name" targets="Static Method web2py.gluon.dal.ConnectionPool.set_folder()=web2py.gluon.dal.ConnectionPool-class.html#set_folder,Static Method web2py.gluon.dal.DAL.set_folder()=web2py.gluon.dal.DAL-class.html#set_folder"><a title="web2py.gluon.dal.ConnectionPool.set_folder
web2py.gluon.dal.DAL.set_folder" class="py-name" href="#" onclick="return doclink('link-142', 'set_folder', 'link-142');">set_folder</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-143', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'databases'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt> <tt class="py-op">=</tt> <tt class="py-name">copy</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">environment</tt> </tt>
</div><a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line"> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line"> </tt>
<a name="save_pyc"></a><div id="save_pyc-def"><a name="L291"></a><tt class="py-lineno">291</tt> <a class="py-toggle" href="#" id="save_pyc-toggle" onclick="return toggle('save_pyc');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#save_pyc">save_pyc</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="save_pyc-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="save_pyc-expanded"><a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line"><tt class="py-docstring">    Bytecode compiles the file `filename`</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">    <tt class="py-name">py_compile</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
</div><a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line"> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line"> </tt>
<a name="read_pyc"></a><div id="read_pyc-def"><a name="L298"></a><tt class="py-lineno">298</tt> <a class="py-toggle" href="#" id="read_pyc-toggle" onclick="return toggle('read_pyc');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#read_pyc">read_pyc</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="read_pyc-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="read_pyc-expanded"><a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line"><tt class="py-docstring">    Read the code inside a bytecode compiled file if the MAGIC number is</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line"><tt class="py-docstring">    compatible</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line"><tt class="py-docstring">    :returns: a code object</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">    <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-144" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-144', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-145" class="py-name"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-145', 'is_gae', 'link-39');">is_gae</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">imp</tt><tt class="py-op">.</tt><tt class="py-name">get_magic</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">SystemError</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled code is incompatible'</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">marshal</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line"> </tt>
<a name="compile_views"></a><div id="compile_views-def"><a name="L311"></a><tt class="py-lineno">311</tt> <a class="py-toggle" href="#" id="compile_views-toggle" onclick="return toggle('compile_views');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#compile_views">compile_views</a><tt class="py-op">(</tt><tt class="py-param">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="compile_views-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="compile_views-expanded"><a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"><tt class="py-docstring">    Compiles all the views in the application specified by `folder`</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-146', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">)</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-147" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-147', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'^[\w/]+\.\w+$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-148" class="py-name"><a title="web2py.gluon.template.parse_template" class="py-name" href="#" onclick="return doclink('link-148', 'parse_template', 'link-4');">parse_template</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'views/%s.py'</tt> <tt class="py-op">%</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-149', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">        <tt id="link-150" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-150', 'write_file', 'link-12');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">        <tt id="link-151" class="py-name" targets="Function web2py.gluon.compileapp.save_pyc()=web2py.gluon.compileapp-module.html#save_pyc"><a title="web2py.gluon.compileapp.save_pyc" class="py-name" href="#" onclick="return doclink('link-151', 'save_pyc', 'link-151');">save_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
</div><a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line"> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
<a name="compile_models"></a><div id="compile_models-def"><a name="L326"></a><tt class="py-lineno">326</tt> <a class="py-toggle" href="#" id="compile_models-toggle" onclick="return toggle('compile_models');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#compile_models">compile_models</a><tt class="py-op">(</tt><tt class="py-param">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="compile_models-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="compile_models-expanded"><a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line"><tt class="py-docstring">    Compiles all the models in the application specified by `folder`</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-152', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'models'</tt><tt class="py-op">)</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-153" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-153', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'.+\.py$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-154" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-154', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-155', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-156', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">,</tt><tt class="py-string">'models'</tt><tt class="py-op">,</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">        <tt id="link-157" class="py-name"><a title="web2py.gluon.fileutils.mktree" class="py-name" href="#" onclick="return doclink('link-157', 'mktree', 'link-9');">mktree</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line">        <tt id="link-158" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-158', 'write_file', 'link-12');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">        <tt id="link-159" class="py-name"><a title="web2py.gluon.compileapp.save_pyc" class="py-name" href="#" onclick="return doclink('link-159', 'save_pyc', 'link-151');">save_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
</div><a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line"> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"> </tt>
<a name="compile_controllers"></a><div id="compile_controllers-def"><a name="L341"></a><tt class="py-lineno">341</tt> <a class="py-toggle" href="#" id="compile_controllers-toggle" onclick="return toggle('compile_controllers');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#compile_controllers">compile_controllers</a><tt class="py-op">(</tt><tt class="py-param">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="compile_controllers-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="compile_controllers-expanded"><a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"><tt class="py-docstring">    Compiles all the controllers in the application specified by `folder`</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line"> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-160', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-161" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-161', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'.+\.py$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">        <tt class="py-comment">### why is this here? save_pyc(os.path.join(path, file))</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-162" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-162', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-163', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">        <tt class="py-name">exposed</tt> <tt class="py-op">=</tt> <tt id="link-164" class="py-name"><a title="web2py.gluon.myregex.regex_expose" class="py-name" href="#" onclick="return doclink('link-164', 'regex_expose', 'link-14');">regex_expose</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">function</tt> <tt class="py-keyword">in</tt> <tt class="py-name">exposed</tt><tt class="py-op">:</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">            <tt class="py-name">command</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt> <tt class="py-op">+</tt> <tt class="py-string">"\nresponse._vars=response._caller(%s)\n"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">                <tt class="py-name">function</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-165', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'controllers/'</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">                                     <tt class="py-op">+</tt> <tt class="py-name">file</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">                                     <tt class="py-op">+</tt> <tt class="py-string">'_'</tt> <tt class="py-op">+</tt> <tt class="py-name">function</tt> <tt class="py-op">+</tt> <tt class="py-string">'.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">            <tt id="link-166" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-166', 'write_file', 'link-12');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">command</tt><tt class="py-op">)</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">            <tt id="link-167" class="py-name"><a title="web2py.gluon.compileapp.save_pyc" class="py-name" href="#" onclick="return doclink('link-167', 'save_pyc', 'link-151');">save_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
</div><a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line"> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line"> </tt>
<a name="run_models_in"></a><div id="run_models_in-def"><a name="L362"></a><tt class="py-lineno">362</tt> <a class="py-toggle" href="#" id="run_models_in-toggle" onclick="return toggle('run_models_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#run_models_in">run_models_in</a><tt class="py-op">(</tt><tt class="py-param">environment</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="run_models_in-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="run_models_in-expanded"><a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line"><tt class="py-docstring">    Runs all models (in the app specified by the current folder)</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line"><tt class="py-docstring">    It tries pre-compiled models first before compiling them.</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line"> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">    <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">    <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">    <tt class="py-name">cpath</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-168', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">)</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-169', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">cpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">model</tt> <tt class="py-keyword">in</tt> <tt id="link-170" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-170', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">cpath</tt><tt class="py-op">,</tt> <tt class="py-string">'^models_\w+\.pyc$'</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">            <tt id="link-171" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-171', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt id="link-172" class="py-name" targets="Function web2py.gluon.compileapp.read_pyc()=web2py.gluon.compileapp-module.html#read_pyc"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-172', 'read_pyc', 'link-172');">read_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">model</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">=</tt><tt class="py-name">model</tt><tt class="py-op">)</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-173', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">cpath</tt><tt class="py-op">,</tt> <tt class="py-string">'models'</tt><tt class="py-op">)</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">        <tt class="py-name">models</tt> <tt class="py-op">=</tt> <tt id="link-174" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-174', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'^\w+\.pyc$'</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt id="link-175" class="py-name" targets="Method web2py.gluon.dal.Rows.sort()=web2py.gluon.dal.Rows-class.html#sort"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-175', 'sort', 'link-175');">sort</a></tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">        <tt class="py-name">compiled</tt><tt class="py-op">=</tt><tt class="py-name">True</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-176', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'models'</tt><tt class="py-op">)</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">        <tt class="py-name">models</tt> <tt class="py-op">=</tt> <tt id="link-177" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-177', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'^\w+\.py$'</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt id="link-178" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-178', 'sort', 'link-175');">sort</a></tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">        <tt class="py-name">compiled</tt><tt class="py-op">=</tt><tt class="py-name">False</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">    <tt class="py-name">paths</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-179', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-180', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">model</tt> <tt class="py-keyword">in</tt> <tt class="py-name">models</tt><tt class="py-op">:</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">model</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">paths</tt> <tt class="py-keyword">and</tt> <tt class="py-name">c</tt><tt class="py-op">!=</tt><tt class="py-string">'appadmin'</tt><tt class="py-op">:</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">            <tt class="py-keyword">continue</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">compiled</tt><tt class="py-op">:</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">            <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-181" class="py-name"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-181', 'read_pyc', 'link-172');">read_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">model</tt><tt class="py-op">)</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-182" class="py-name"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-182', 'is_gae', 'link-39');">is_gae</a></tt><tt class="py-op">:</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">            <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-183" class="py-name"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-183', 'getcfs', 'link-30');">getcfs</a></tt><tt class="py-op">(</tt><tt class="py-name">model</tt><tt class="py-op">,</tt> <tt class="py-name">model</tt><tt class="py-op">,</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">                          <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt id="link-184" class="py-name"><a title="web2py.gluon.restricted.compile2" class="py-name" href="#" onclick="return doclink('link-184', 'compile2', 'link-7');">compile2</a></tt><tt class="py-op">(</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-185', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">model</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">model</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">            <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-186', 'getcfs', 'link-30');">getcfs</a></tt><tt class="py-op">(</tt><tt class="py-name">model</tt><tt class="py-op">,</tt> <tt class="py-name">model</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">        <tt id="link-187" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-187', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">=</tt><tt class="py-name">model</tt><tt class="py-op">)</tt> </tt>
</div><a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line"> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line"> </tt>
<a name="run_controller_in"></a><div id="run_controller_in-def"><a name="L396"></a><tt class="py-lineno">396</tt> <a class="py-toggle" href="#" id="run_controller_in-toggle" onclick="return toggle('run_controller_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#run_controller_in">run_controller_in</a><tt class="py-op">(</tt><tt class="py-param">controller</tt><tt class="py-op">,</tt> <tt class="py-param">function</tt><tt class="py-op">,</tt> <tt class="py-param">environment</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="run_controller_in-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="run_controller_in-expanded"><a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line"><tt class="py-docstring">    Runs the controller.function() (for the app specified by</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line"><tt class="py-docstring">    the current folder).</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line"><tt class="py-docstring">    It tries pre-compiled controller_function.pyc first before compiling it.</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line"> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">    <tt class="py-comment"># if compiled should run compiled!</tt> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">    <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-188" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-188', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">)</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">    <tt class="py-name">badc</tt> <tt class="py-op">=</tt> <tt class="py-string">'invalid controller (%s/%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">)</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">    <tt class="py-name">badf</tt> <tt class="py-op">=</tt> <tt class="py-string">'invalid function (%s/%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">)</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-189', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-190', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers_%s_%s.pyc'</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line">                                 <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-191', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-192" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-192', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">                       <tt id="link-193" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-193', 'rewrite', 'link-37');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-194" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-194', 'thread', 'link-194');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">badf</tt><tt class="py-op">,</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">badf</tt><tt class="py-op">)</tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">        <tt id="link-195" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-195', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt id="link-196" class="py-name"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-196', 'read_pyc', 'link-172');">read_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">=</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">function</tt> <tt class="py-op">==</tt> <tt class="py-string">'_TEST'</tt><tt class="py-op">:</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">        <tt class="py-comment"># TESTING: adjust the path to include site packages</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">from</tt> <tt id="link-197" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-197', 'settings', 'link-28');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-198" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-198', 'global_settings', 'link-41');">global_settings</a></tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-199" class="py-name" targets="Module web2py.gluon.admin=web2py.gluon.admin-module.html"><a title="web2py.gluon.admin" class="py-name" href="#" onclick="return doclink('link-199', 'admin', 'link-199');">admin</a></tt> <tt class="py-keyword">import</tt> <tt id="link-200" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-200', 'abspath', 'link-200');">abspath</a></tt><tt class="py-op">,</tt> <tt id="link-201" class="py-name" targets="Function web2py.gluon.admin.add_path_first()=web2py.gluon.admin-module.html#add_path_first"><a title="web2py.gluon.admin.add_path_first" class="py-name" href="#" onclick="return doclink('link-201', 'add_path_first', 'link-201');">add_path_first</a></tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line">        <tt class="py-name">paths</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-202" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-202', 'global_settings', 'link-41');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt><tt class="py-op">,</tt> <tt id="link-203" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-203', 'abspath', 'link-200');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'site-packages'</tt><tt class="py-op">,</tt> <tt id="link-204" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-204', 'gluon', 'link-204');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt>  <tt id="link-205" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-205', 'abspath', 'link-200');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'gluon'</tt><tt class="py-op">,</tt> <tt id="link-206" class="py-name"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-206', 'gluon', 'link-204');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">        <tt class="py-op">[</tt><tt id="link-207" class="py-name"><a title="web2py.gluon.admin.add_path_first" class="py-name" href="#" onclick="return doclink('link-207', 'add_path_first', 'link-201');">add_path_first</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">path</tt> <tt class="py-keyword">in</tt> <tt class="py-name">paths</tt><tt class="py-op">]</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">        <tt class="py-comment"># TESTING END</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-208" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-208', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers/%s.py'</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">                                 <tt class="py-op">%</tt> <tt class="py-name">controller</tt><tt class="py-op">)</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-209', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-210" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-210', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">                       <tt id="link-211" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-211', 'rewrite', 'link-37');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-212', 'thread', 'link-194');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">badc</tt><tt class="py-op">,</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">badc</tt><tt class="py-op">)</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line">        <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'__symbols__'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">.</tt><tt id="link-213" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-213', 'keys', 'link-213');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-214" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-214', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">+=</tt> <tt id="link-215" class="py-name"><a title="web2py.gluon.compileapp.TEST_CODE" class="py-name" href="#" onclick="return doclink('link-215', 'TEST_CODE', 'link-48');">TEST_CODE</a></tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line">        <tt id="link-216" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-216', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">=</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-217" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-217', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers/%s.py'</tt> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">                                 <tt class="py-op">%</tt> <tt class="py-name">controller</tt><tt class="py-op">)</tt> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-218', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-219" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-219', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line">                       <tt id="link-220" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-220', 'rewrite', 'link-37');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-221" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-221', 'thread', 'link-194');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">badc</tt><tt class="py-op">,</tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">badc</tt><tt class="py-op">)</tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-222" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-222', 'read_file', 'link-11');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line">        <tt class="py-name">exposed</tt> <tt class="py-op">=</tt> <tt id="link-223" class="py-name"><a title="web2py.gluon.myregex.regex_expose" class="py-name" href="#" onclick="return doclink('link-223', 'regex_expose', 'link-14');">regex_expose</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">function</tt> <tt class="py-keyword">in</tt> <tt class="py-name">exposed</tt><tt class="py-op">:</tt> </tt>
<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-224" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-224', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">                       <tt id="link-225" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-225', 'rewrite', 'link-37');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-226" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-226', 'thread', 'link-194');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">badf</tt><tt class="py-op">,</tt> </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">badf</tt><tt class="py-op">)</tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s\nresponse._vars=response._caller(%s)\n"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">)</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-227" class="py-name"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-227', 'is_gae', 'link-39');">is_gae</a></tt><tt class="py-op">:</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line">            <tt class="py-name">layer</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> <tt class="py-op">+</tt> <tt class="py-string">':'</tt> <tt class="py-op">+</tt> <tt class="py-name">function</tt> </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line">            <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-228" class="py-name"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-228', 'getcfs', 'link-30');">getcfs</a></tt><tt class="py-op">(</tt><tt class="py-name">layer</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt>  <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt id="link-229" class="py-name"><a title="web2py.gluon.restricted.compile2" class="py-name" href="#" onclick="return doclink('link-229', 'compile2', 'link-7');">compile2</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt><tt class="py-name">layer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">        <tt id="link-230" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-230', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line">    <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'response'</tt><tt class="py-op">]</tt> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">    <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">postprocessing</tt><tt class="py-op">:</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">postprocessing</tt><tt class="py-op">:</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line">            <tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">p</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">,</tt><tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line">        <tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-231" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-231', 'encode', 'link-231');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">,</tt><tt class="py-string">'xml'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">        <tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-232" class="py-name" targets="Method web2py.gluon.dal.Rows.xml()=web2py.gluon.dal.Rows-class.html#xml,Method web2py.gluon.html.A.xml()=web2py.gluon.html.A-class.html#xml,Method web2py.gluon.html.CODE.xml()=web2py.gluon.html.CODE-class.html#xml,Method web2py.gluon.html.DIV.xml()=web2py.gluon.html.DIV-class.html#xml,Method web2py.gluon.html.FORM.xml()=web2py.gluon.html.FORM-class.html#xml,Method web2py.gluon.html.HTML.xml()=web2py.gluon.html.HTML-class.html#xml,Method web2py.gluon.html.INPUT.xml()=web2py.gluon.html.INPUT-class.html#xml,Method web2py.gluon.html.MARKMIN.xml()=web2py.gluon.html.MARKMIN-class.html#xml,Method web2py.gluon.html.MENU.xml()=web2py.gluon.html.MENU-class.html#xml,Method web2py.gluon.html.P.xml()=web2py.gluon.html.P-class.html#xml,Method web2py.gluon.html.SCRIPT.xml()=web2py.gluon.html.SCRIPT-class.html#xml,Method web2py.gluon.html.STYLE.xml()=web2py.gluon.html.STYLE-class.html#xml,Method web2py.gluon.html.XHTML.xml()=web2py.gluon.html.XHTML-class.html#xml,Method web2py.gluon.html.XML.xml()=web2py.gluon.html.XML-class.html#xml,Method web2py.gluon.html.XmlComponent.xml()=web2py.gluon.html.XmlComponent-class.html#xml,Method web2py.gluon.languages.lazyT.xml()=web2py.gluon.languages.lazyT-class.html#xml,Function web2py.gluon.serializers.xml()=web2py.gluon.serializers-module.html#xml,Method web2py.gluon.tools.Recaptcha.xml()=web2py.gluon.tools.Recaptcha-class.html#xml,Method web2py.gluon.tools.Service.xml()=web2py.gluon.tools.Service-class.html#xml"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-232', 'xml', 'link-232');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">vars</tt> </tt>
</div><a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"> </tt>
<a name="run_view_in"></a><div id="run_view_in-def"><a name="L464"></a><tt class="py-lineno">464</tt> <a class="py-toggle" href="#" id="run_view_in-toggle" onclick="return toggle('run_view_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#run_view_in">run_view_in</a><tt class="py-op">(</tt><tt class="py-param">environment</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="run_view_in-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="run_view_in-expanded"><a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line"><tt class="py-docstring">    Executes the view for the requested action.</tt> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line"><tt class="py-docstring">    The view is the one specified in `response.view` or determined by the url</tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line"><tt class="py-docstring">    or `view/generic.extension`</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line"><tt class="py-docstring">    It tries the pre-compiled views_controller_function.pyc before compiling it.</tt> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line"> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line">    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'request'</tt><tt class="py-op">]</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line">    <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'response'</tt><tt class="py-op">]</tt> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">    <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-233" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-233', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">)</tt> </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">    <tt class="py-name">badv</tt> <tt class="py-op">=</tt> <tt class="py-string">'invalid view (%s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt> </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">    <tt class="py-name">patterns</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">generic_patterns</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">    <tt id="link-234" class="py-name" targets="Variable web2py.gluon.validators.IS_EMAIL.regex=web2py.gluon.validators.IS_EMAIL-class.html#regex,Variable web2py.gluon.validators.IS_IPV4.regex=web2py.gluon.validators.IS_IPV4-class.html#regex"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-234', 'regex', 'link-234');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'|'</tt><tt class="py-op">.</tt><tt id="link-235" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-235', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">fnmatch</tt><tt class="py-op">.</tt><tt id="link-236" class="py-name" targets="Method web2py.gluon.languages.translator.translate()=web2py.gluon.languages.translator-class.html#translate,Function web2py.gluon.validators.translate()=web2py.gluon.validators-module.html#translate"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-236', 'translate', 'link-236');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">patterns</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">    <tt class="py-name">short_action</tt> <tt class="py-op">=</tt>  <tt class="py-string">'%(controller)s/%(function)s.%(extension)s'</tt> <tt class="py-op">%</tt> <tt class="py-name">request</tt> </tt>
<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">    <tt class="py-name">allow_generic</tt> <tt class="py-op">=</tt> <tt class="py-name">patterns</tt> <tt class="py-keyword">and</tt> <tt id="link-237" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-237', 'regex', 'link-234');">regex</a></tt><tt class="py-op">.</tt><tt id="link-238" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-238', 'search', 'link-238');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">short_action</tt><tt class="py-op">)</tt> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">        <tt class="py-name">ccode</tt> <tt class="py-op">=</tt> <tt id="link-239" class="py-name"><a title="web2py.gluon.template.parse_template" class="py-name" href="#" onclick="return doclink('link-239', 'parse_template', 'link-4');">parse_template</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-240" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-240', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">                               <tt class="py-name">context</tt><tt class="py-op">=</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line">        <tt id="link-241" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-241', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt class="py-name">ccode</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-string">'file stream'</tt><tt class="py-op">)</tt> </tt>
<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-242" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-242', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line">        <tt id="link-243" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-243', 'x', 'link-243');">x</a></tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">        <tt id="link-244" class="py-name" targets="Variable web2py.gluon.import_all.files=web2py.gluon.import_all-module.html#files"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-244', 'files', 'link-244');">files</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'views_%s.pyc'</tt> <tt class="py-op">%</tt> <tt id="link-245" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-245', 'x', 'link-243');">x</a></tt><tt class="py-op">]</tt> </tt>
<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">allow_generic</tt><tt class="py-op">:</tt> </tt>
<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">            <tt id="link-246" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-246', 'files', 'link-244');">files</a></tt><tt class="py-op">.</tt><tt id="link-247" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-247', 'append', 'link-247');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'views_generic.%s.pyc'</tt> <tt class="py-op">%</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line">        <tt class="py-comment"># for backward compatibility</tt> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'html'</tt><tt class="py-op">:</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">            <tt id="link-248" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-248', 'files', 'link-244');">files</a></tt><tt class="py-op">.</tt><tt id="link-249" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-249', 'append', 'link-247');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'views_%s.pyc'</tt> <tt class="py-op">%</tt> <tt id="link-250" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-250', 'x', 'link-243');">x</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">5</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">allow_generic</tt><tt class="py-op">:</tt> </tt>
<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">                <tt id="link-251" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-251', 'files', 'link-244');">files</a></tt><tt class="py-op">.</tt><tt id="link-252" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-252', 'append', 'link-247');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'views_generic.pyc'</tt><tt class="py-op">)</tt> </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">        <tt class="py-comment"># end backward compatibility code</tt> </tt>
<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt id="link-253" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-253', 'files', 'link-244');">files</a></tt><tt class="py-op">:</tt> </tt>
<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-254" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-254', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-255" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-255', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line">                <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-256" class="py-name"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-256', 'read_pyc', 'link-172');">read_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">                <tt id="link-257" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-257', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">=</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-258" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-258', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line">                   <tt id="link-259" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-259', 'rewrite', 'link-37');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-260" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-260', 'thread', 'link-194');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">badv</tt><tt class="py-op">,</tt> </tt>
<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line">                   <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">badv</tt><tt class="py-op">)</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-261" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-261', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">)</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-262" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-262', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">allow_generic</tt><tt class="py-op">:</tt> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt> <tt class="py-op">=</tt> <tt class="py-string">'generic.'</tt> <tt class="py-op">+</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> </tt>
<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-263" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-263', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">)</tt> </tt>
<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-264" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-264', 'exists', 'link-169');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-265" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-265', 'HTTP', 'link-34');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line">                       <tt id="link-266" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-266', 'rewrite', 'link-37');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-267" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-267', 'thread', 'link-194');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">badv</tt><tt class="py-op">,</tt> </tt>
<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">badv</tt><tt class="py-op">)</tt> </tt>
<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line">        <tt class="py-name">layer</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> </tt>
<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-268" class="py-name"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-268', 'is_gae', 'link-39');">is_gae</a></tt><tt class="py-op">:</tt> </tt>
<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">            <tt class="py-name">ccode</tt> <tt class="py-op">=</tt> <tt id="link-269" class="py-name"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-269', 'getcfs', 'link-30');">getcfs</a></tt><tt class="py-op">(</tt><tt class="py-name">layer</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line">                           <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt id="link-270" class="py-name"><a title="web2py.gluon.restricted.compile2" class="py-name" href="#" onclick="return doclink('link-270', 'compile2', 'link-7');">compile2</a></tt><tt class="py-op">(</tt><tt id="link-271" class="py-name"><a title="web2py.gluon.template.parse_template" class="py-name" href="#" onclick="return doclink('link-271', 'parse_template', 'link-4');">parse_template</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> </tt>
<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line">                                            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-272" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-272', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">                                            <tt class="py-name">context</tt><tt class="py-op">=</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">layer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line">            <tt class="py-name">ccode</tt> <tt class="py-op">=</tt> <tt id="link-273" class="py-name"><a title="web2py.gluon.template.parse_template" class="py-name" href="#" onclick="return doclink('link-273', 'parse_template', 'link-4');">parse_template</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> </tt>
<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">                                   <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-274" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-274', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">                                   <tt class="py-name">context</tt><tt class="py-op">=</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">        <tt id="link-275" class="py-name"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-275', 'restricted', 'link-5');">restricted</a></tt><tt class="py-op">(</tt><tt class="py-name">ccode</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">)</tt> </tt>
</div><a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line"> </tt>
<a name="remove_compiled_application"></a><div id="remove_compiled_application-def"><a name="L526"></a><tt class="py-lineno">526</tt> <a class="py-toggle" href="#" id="remove_compiled_application-toggle" onclick="return toggle('remove_compiled_application');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#remove_compiled_application">remove_compiled_application</a><tt class="py-op">(</tt><tt class="py-param">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="remove_compiled_application-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="remove_compiled_application-expanded"><a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line"><tt class="py-docstring">    Deletes the folder `compiled` containing the compiled application.</tt> </tt>
<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line">        <tt class="py-name">shutil</tt><tt class="py-op">.</tt><tt class="py-name">rmtree</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-276" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-276', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-277" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-277', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">)</tt> </tt>
<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-278" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-278', 'listdir', 'link-10');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-string">'.*\.pyc$'</tt><tt class="py-op">,</tt><tt id="link-279" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.drop()=web2py.gluon.dal.BaseAdapter-class.html#drop,Method web2py.gluon.dal.NoSQLAdapter.drop()=web2py.gluon.dal.NoSQLAdapter-class.html#drop,Method web2py.gluon.dal.Table.drop()=web2py.gluon.dal.Table-class.html#drop"><a title="web2py.gluon.dal.BaseAdapter.drop
web2py.gluon.dal.NoSQLAdapter.drop
web2py.gluon.dal.Table.drop" class="py-name" href="#" onclick="return doclink('link-279', 'drop', 'link-279');">drop</a></tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">OSError</tt><tt class="py-op">:</tt> </tt>
<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line"> </tt>
<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line"> </tt>
<a name="compile_application"></a><div id="compile_application-def"><a name="L539"></a><tt class="py-lineno">539</tt> <a class="py-toggle" href="#" id="compile_application-toggle" onclick="return toggle('compile_application');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#compile_application">compile_application</a><tt class="py-op">(</tt><tt class="py-param">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="compile_application-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="compile_application-expanded"><a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line"><tt class="py-docstring">    Compiles all models, views, controller for the application in `folder`.</tt> </tt>
<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line">    <tt id="link-280" class="py-name" targets="Function web2py.gluon.compileapp.remove_compiled_application()=web2py.gluon.compileapp-module.html#remove_compiled_application"><a title="web2py.gluon.compileapp.remove_compiled_application" class="py-name" href="#" onclick="return doclink('link-280', 'remove_compiled_application', 'link-280');">remove_compiled_application</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line">    <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-281" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-281', 'join', 'link-75');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line">    <tt id="link-282" class="py-name" targets="Function web2py.gluon.compileapp.compile_models()=web2py.gluon.compileapp-module.html#compile_models"><a title="web2py.gluon.compileapp.compile_models" class="py-name" href="#" onclick="return doclink('link-282', 'compile_models', 'link-282');">compile_models</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">    <tt id="link-283" class="py-name" targets="Function web2py.gluon.compileapp.compile_controllers()=web2py.gluon.compileapp-module.html#compile_controllers"><a title="web2py.gluon.compileapp.compile_controllers" class="py-name" href="#" onclick="return doclink('link-283', 'compile_controllers', 'link-283');">compile_controllers</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">    <tt id="link-284" class="py-name" targets="Function web2py.gluon.compileapp.compile_views()=web2py.gluon.compileapp-module.html#compile_views"><a title="web2py.gluon.compileapp.compile_views" class="py-name" href="#" onclick="return doclink('link-284', 'compile_views', 'link-284');">compile_views</a></tt><tt class="py-op">(</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
</div><a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line"> </tt>
<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line"> </tt>
<a name="test"></a><div id="test-def"><a name="L550"></a><tt class="py-lineno">550</tt> <a class="py-toggle" href="#" id="test-toggle" onclick="return toggle('test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.compileapp-module.html#test">test</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="test-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="test-expanded"><a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L552"></a><tt class="py-lineno">552</tt>  <tt class="py-line"><tt class="py-docstring">    Example::</tt> </tt>
<a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import traceback, types</tt> </tt>
<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; environment={'x':1}</tt> </tt>
<a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; open('a.py', 'w').write('print 1/x')</tt> </tt>
<a name="L557"></a><tt class="py-lineno">557</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; save_pyc('a.py')</tt> </tt>
<a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; os.unlink('a.py')</tt> </tt>
<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; if type(read_pyc('a.pyc'))==types.CodeType: print 'code'</tt> </tt>
<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line"><tt class="py-docstring">        code</tt> </tt>
<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; exec read_pyc('a.pyc') in environment</tt> </tt>
<a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line"><tt class="py-docstring">        1</tt> </tt>
<a name="L563"></a><tt class="py-lineno">563</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line"> </tt>
<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> </tt>
</div><a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line"> </tt>
<a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line"> </tt>
<a name="L568"></a><tt class="py-lineno">568</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L570"></a><tt class="py-lineno">570</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:08 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.compileapp.LoadFactory-class.html version [9b8934cb63].




















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.compileapp.LoadFactory</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.compileapp-module.html">Module&nbsp;compileapp</a> ::
        Class&nbsp;LoadFactory
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.compileapp.LoadFactory-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class LoadFactory</h1><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#LoadFactory">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">LoadFactory</strong>
</pre>

<hr />
Attention: this helper is new and experimental<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.compileapp.LoadFactory-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">environment</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#LoadFactory.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">c</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">f</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">index</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">vars</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">extension</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">target</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">ajax</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">ajax_trap</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">url</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">user_signature</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">content</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">loading...</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">**attr</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#LoadFactory.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">environment</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#LoadFactory.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.compileapp.mybuiltin-class.html version [4d85223ce5].





























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.compileapp.mybuiltin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.compileapp-module.html">Module&nbsp;compileapp</a> ::
        Class&nbsp;mybuiltin
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.compileapp.mybuiltin-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class mybuiltin</h1><span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#mybuiltin">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">mybuiltin</strong>
</pre>

<hr />
NOTE could simple use a dict and populate it, NOTE not sure if this 
  changes things though if monkey patching import.....<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#mybuiltin.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__setitem__"></a><span class="summary-sig-name">__setitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.compileapp-pysrc.html#mybuiltin.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contenttype-module.html version [04cba23f1a].













































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contenttype</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;contenttype
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contenttype-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module contenttype</h1><span class="codelink"><a href="web2py.gluon.contenttype-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  CONTENT_TYPE dictionary created against freedesktop.org' shared mime 
  info database version 0.70.<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="contenttype"></a><span class="summary-sig-name">contenttype</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">text/plain</code><code class="variable-quote">'</code></span>)</span><br />
      Returns the Content-Type string matching extension of the given 
      filename.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contenttype-pysrc.html#contenttype">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contenttype-module.html#CONTENT_TYPE" class="summary-name">CONTENT_TYPE</a> = <code title="{'.123': 'application/vnd.lotus-1-2-3',
 '.3ds': 'image/x-3ds',
 '.3g2': 'video/3gpp',
 '.3ga': 'video/3gpp',
 '.3gp': 'video/3gpp',
 '.3gpp': 'video/3gpp',
 '.602': 'application/x-t602',
 '.669': 'audio/x-mod',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">.123</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">application/vnd.lotus-1-2-3</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">.3ds</code><code class="variable-quote">'</code><code class="variable-op">:</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="CONTENT_TYPE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">CONTENT_TYPE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">.123</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">application/vnd.lotus-1-2-3</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.3ds</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">image/x-3ds</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.3g2</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">video/3gpp</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.3ga</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">video/3gpp</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.3gp</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">video/3gpp</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.3gpp</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">video/3gpp</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.602</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">application/x-t602</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">.669</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">audio/x-mod</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contenttype-pysrc.html version [1f70e68e9f].









































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contenttype</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;contenttype
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contenttype-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.contenttype-module.html">Module web2py.gluon.contenttype</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">CONTENT_TYPE dictionary created against freedesktop.org' shared mime info</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">database version 0.70.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'contenttype'</tt><tt class="py-op">]</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.contenttype.CONTENT_TYPE=web2py.gluon.contenttype-module.html#CONTENT_TYPE"><a title="web2py.gluon.contenttype.CONTENT_TYPE" class="py-name" href="#" onclick="return doclink('link-0', 'CONTENT_TYPE', 'link-0');">CONTENT_TYPE</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">    <tt class="py-string">'.load'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/html'</tt><tt class="py-op">,</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">    <tt class="py-string">'.123'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.lotus-1-2-3'</tt><tt class="py-op">,</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">    <tt class="py-string">'.3ds'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-3ds'</tt><tt class="py-op">,</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">    <tt class="py-string">'.3g2'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/3gpp'</tt><tt class="py-op">,</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">    <tt class="py-string">'.3ga'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/3gpp'</tt><tt class="py-op">,</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">    <tt class="py-string">'.3gp'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/3gpp'</tt><tt class="py-op">,</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">    <tt class="py-string">'.3gpp'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/3gpp'</tt><tt class="py-op">,</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-string">'.602'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-t602'</tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">    <tt class="py-string">'.669'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">    <tt class="py-string">'.7z'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-7z-compressed'</tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">    <tt class="py-string">'.a'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-archive'</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-string">'.aac'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/mp4'</tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt class="py-string">'.abw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-abiword'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-string">'.abw.crashed'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-abiword'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-string">'.abw.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-abiword'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">    <tt class="py-string">'.ac3'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/ac3'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt class="py-string">'.ace'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-ace'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-string">'.adb'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-adasrc'</tt><tt class="py-op">,</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-string">'.ads'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-adasrc'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-string">'.afm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-afm'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-string">'.ag'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-applix-graphics'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-string">'.ai'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/illustrator'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-string">'.aif'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-aiff'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-string">'.aifc'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-aiff'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">    <tt class="py-string">'.aiff'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-aiff'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-string">'.al'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-perl'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-string">'.alz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-alz'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-string">'.amr'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/amr'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-string">'.ani'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-navi-animation'</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-string">'.anim[1-9j]'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-anim'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-string">'.anx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/annodex'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-string">'.ape'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-ape'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt class="py-string">'.arj'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-arj'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt class="py-string">'.arw'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-sony-arw'</tt><tt class="py-op">,</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt class="py-string">'.as'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-applix-spreadsheet'</tt><tt class="py-op">,</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt class="py-string">'.asc'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">    <tt class="py-string">'.asf'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-ms-asf'</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-string">'.asp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-asp'</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">    <tt class="py-string">'.ass'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ssa'</tt><tt class="py-op">,</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-string">'.asx'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-ms-asx'</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">    <tt class="py-string">'.atom'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/atom+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-string">'.au'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/basic'</tt><tt class="py-op">,</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">    <tt class="py-string">'.avi'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-msvideo'</tt><tt class="py-op">,</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt class="py-string">'.aw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-applix-word'</tt><tt class="py-op">,</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">    <tt class="py-string">'.awb'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/amr-wb'</tt><tt class="py-op">,</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">    <tt class="py-string">'.awk'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-awk'</tt><tt class="py-op">,</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-string">'.axa'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/annodex'</tt><tt class="py-op">,</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">    <tt class="py-string">'.axv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/annodex'</tt><tt class="py-op">,</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt class="py-string">'.bak'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-trash'</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-string">'.bcpio'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bcpio'</tt><tt class="py-op">,</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt class="py-string">'.bdf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-bdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt class="py-string">'.bib'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-bibtex'</tt><tt class="py-op">,</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt class="py-string">'.bin'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/octet-stream'</tt><tt class="py-op">,</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">    <tt class="py-string">'.blend'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-blender'</tt><tt class="py-op">,</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">    <tt class="py-string">'.blender'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-blender'</tt><tt class="py-op">,</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">    <tt class="py-string">'.bmp'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/bmp'</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">    <tt class="py-string">'.bz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzip'</tt><tt class="py-op">,</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">    <tt class="py-string">'.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzip'</tt><tt class="py-op">,</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">    <tt class="py-string">'.c'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-csrc'</tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">    <tt class="py-string">'.c++'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++src'</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">    <tt class="py-string">'.cab'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-cab-compressed'</tt><tt class="py-op">,</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-string">'.cb7'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cb7'</tt><tt class="py-op">,</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">    <tt class="py-string">'.cbr'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cbr'</tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">    <tt class="py-string">'.cbt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cbt'</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">    <tt class="py-string">'.cbz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cbz'</tt><tt class="py-op">,</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt class="py-string">'.cc'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++src'</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt class="py-string">'.cdf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-netcdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt class="py-string">'.cdr'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.corel-draw'</tt><tt class="py-op">,</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt class="py-string">'.cer'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-x509-ca-cert'</tt><tt class="py-op">,</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt class="py-string">'.cert'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-x509-ca-cert'</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">    <tt class="py-string">'.cgm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/cgm'</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-string">'.chm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-chm'</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt class="py-string">'.chrt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kchart'</tt><tt class="py-op">,</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-string">'.class'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-java'</tt><tt class="py-op">,</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">    <tt class="py-string">'.cls'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">    <tt class="py-string">'.cmake'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-cmake'</tt><tt class="py-op">,</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">    <tt class="py-string">'.cpio'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cpio'</tt><tt class="py-op">,</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-string">'.cpio.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cpio-compressed'</tt><tt class="py-op">,</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">    <tt class="py-string">'.cpp'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++src'</tt><tt class="py-op">,</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">    <tt class="py-string">'.cr2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-canon-cr2'</tt><tt class="py-op">,</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt class="py-string">'.crt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-x509-ca-cert'</tt><tt class="py-op">,</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt class="py-string">'.crw'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-canon-crw'</tt><tt class="py-op">,</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt class="py-string">'.cs'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-csharp'</tt><tt class="py-op">,</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt class="py-string">'.csh'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-csh'</tt><tt class="py-op">,</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">    <tt class="py-string">'.css'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/css'</tt><tt class="py-op">,</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">    <tt class="py-string">'.cssl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/css'</tt><tt class="py-op">,</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt class="py-string">'.csv'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/csv'</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt class="py-string">'.cue'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cue'</tt><tt class="py-op">,</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">    <tt class="py-string">'.cur'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-win-bitmap'</tt><tt class="py-op">,</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-string">'.cxx'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++src'</tt><tt class="py-op">,</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt class="py-string">'.d'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-dsrc'</tt><tt class="py-op">,</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">    <tt class="py-string">'.dar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-dar'</tt><tt class="py-op">,</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">    <tt class="py-string">'.dbf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-dbf'</tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">    <tt class="py-string">'.dc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-dc-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">    <tt class="py-string">'.dcl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-dcl'</tt><tt class="py-op">,</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">    <tt class="py-string">'.dcm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/dicom'</tt><tt class="py-op">,</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-string">'.dcr'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-kodak-dcr'</tt><tt class="py-op">,</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt class="py-string">'.dds'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-dds'</tt><tt class="py-op">,</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt class="py-string">'.deb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-deb'</tt><tt class="py-op">,</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt class="py-string">'.der'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-x509-ca-cert'</tt><tt class="py-op">,</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">    <tt class="py-string">'.desktop'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-desktop'</tt><tt class="py-op">,</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt class="py-string">'.dia'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-dia-diagram'</tt><tt class="py-op">,</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-string">'.diff'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-patch'</tt><tt class="py-op">,</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">    <tt class="py-string">'.divx'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-msvideo'</tt><tt class="py-op">,</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">    <tt class="py-string">'.djv'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.djvu'</tt><tt class="py-op">,</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-string">'.djvu'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.djvu'</tt><tt class="py-op">,</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt class="py-string">'.dng'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-adobe-dng'</tt><tt class="py-op">,</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">    <tt class="py-string">'.doc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/msword'</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt class="py-string">'.docbook'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/docbook+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">    <tt class="py-string">'.docm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openxmlformats-officedocument.wordprocessingml.document'</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-string">'.docx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openxmlformats-officedocument.wordprocessingml.document'</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">    <tt class="py-string">'.dot'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/vnd.graphviz'</tt><tt class="py-op">,</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">    <tt class="py-string">'.dsl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-dsl'</tt><tt class="py-op">,</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">    <tt class="py-string">'.dtd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xml-dtd'</tt><tt class="py-op">,</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">    <tt class="py-string">'.dtx'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">    <tt class="py-string">'.dv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/dv'</tt><tt class="py-op">,</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">    <tt class="py-string">'.dvi'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-dvi'</tt><tt class="py-op">,</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">    <tt class="py-string">'.dvi.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzdvi'</tt><tt class="py-op">,</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">    <tt class="py-string">'.dvi.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gzdvi'</tt><tt class="py-op">,</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">    <tt class="py-string">'.dwg'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.dwg'</tt><tt class="py-op">,</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">    <tt class="py-string">'.dxf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.dxf'</tt><tt class="py-op">,</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">    <tt class="py-string">'.e'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-eiffel'</tt><tt class="py-op">,</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">    <tt class="py-string">'.egon'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-egon'</tt><tt class="py-op">,</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">    <tt class="py-string">'.eif'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-eiffel'</tt><tt class="py-op">,</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">    <tt class="py-string">'.el'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-emacs-lisp'</tt><tt class="py-op">,</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">    <tt class="py-string">'.emf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-emf'</tt><tt class="py-op">,</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">    <tt class="py-string">'.emp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.emusic-emusic_package'</tt><tt class="py-op">,</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">    <tt class="py-string">'.ent'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xml-external-parsed-entity'</tt><tt class="py-op">,</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">    <tt class="py-string">'.eps'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-eps'</tt><tt class="py-op">,</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">    <tt class="py-string">'.eps.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-bzeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">    <tt class="py-string">'.eps.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-gzeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">    <tt class="py-string">'.epsf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-eps'</tt><tt class="py-op">,</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">    <tt class="py-string">'.epsf.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-bzeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">    <tt class="py-string">'.epsf.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-gzeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">    <tt class="py-string">'.epsi'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-eps'</tt><tt class="py-op">,</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">    <tt class="py-string">'.epsi.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-bzeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">    <tt class="py-string">'.epsi.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-gzeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">    <tt class="py-string">'.epub'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/epub+zip'</tt><tt class="py-op">,</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">    <tt class="py-string">'.erl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-erlang'</tt><tt class="py-op">,</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">    <tt class="py-string">'.es'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/ecmascript'</tt><tt class="py-op">,</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">    <tt class="py-string">'.etheme'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-e-theme'</tt><tt class="py-op">,</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">    <tt class="py-string">'.etx'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-setext'</tt><tt class="py-op">,</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">    <tt class="py-string">'.exe'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-ms-dos-executable'</tt><tt class="py-op">,</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">    <tt class="py-string">'.exr'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-exr'</tt><tt class="py-op">,</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">    <tt class="py-string">'.ez'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/andrew-inset'</tt><tt class="py-op">,</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">    <tt class="py-string">'.f'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-fortran'</tt><tt class="py-op">,</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">    <tt class="py-string">'.f90'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-fortran'</tt><tt class="py-op">,</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">    <tt class="py-string">'.f95'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-fortran'</tt><tt class="py-op">,</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">    <tt class="py-string">'.fb2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-fictionbook+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">    <tt class="py-string">'.fig'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-xfig'</tt><tt class="py-op">,</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">    <tt class="py-string">'.fits'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/fits'</tt><tt class="py-op">,</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">    <tt class="py-string">'.fl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-fluid'</tt><tt class="py-op">,</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">    <tt class="py-string">'.flac'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-flac'</tt><tt class="py-op">,</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">    <tt class="py-string">'.flc'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-flic'</tt><tt class="py-op">,</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">    <tt class="py-string">'.fli'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-flic'</tt><tt class="py-op">,</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">    <tt class="py-string">'.flv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-flv'</tt><tt class="py-op">,</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">    <tt class="py-string">'.flw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kivio'</tt><tt class="py-op">,</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">    <tt class="py-string">'.fo'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-xslfo'</tt><tt class="py-op">,</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">    <tt class="py-string">'.for'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-fortran'</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">    <tt class="py-string">'.g3'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/fax-g3'</tt><tt class="py-op">,</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">    <tt class="py-string">'.gb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gameboy-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">    <tt class="py-string">'.gba'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gba-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">    <tt class="py-string">'.gcrd'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/directory'</tt><tt class="py-op">,</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">    <tt class="py-string">'.ged'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gedcom'</tt><tt class="py-op">,</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">    <tt class="py-string">'.gedcom'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gedcom'</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">    <tt class="py-string">'.gen'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-genesis-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">    <tt class="py-string">'.gf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tex-gf'</tt><tt class="py-op">,</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">    <tt class="py-string">'.gg'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sms-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">    <tt class="py-string">'.gif'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/gif'</tt><tt class="py-op">,</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">    <tt class="py-string">'.glade'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-glade'</tt><tt class="py-op">,</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">    <tt class="py-string">'.gmo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gettext-translation'</tt><tt class="py-op">,</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">    <tt class="py-string">'.gnc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnucash'</tt><tt class="py-op">,</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">    <tt class="py-string">'.gnd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/gnunet-directory'</tt><tt class="py-op">,</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">    <tt class="py-string">'.gnucash'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnucash'</tt><tt class="py-op">,</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">    <tt class="py-string">'.gnumeric'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnumeric'</tt><tt class="py-op">,</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">    <tt class="py-string">'.gnuplot'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnuplot'</tt><tt class="py-op">,</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">    <tt class="py-string">'.gp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnuplot'</tt><tt class="py-op">,</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">    <tt class="py-string">'.gpg'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pgp-encrypted'</tt><tt class="py-op">,</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">    <tt class="py-string">'.gplt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnuplot'</tt><tt class="py-op">,</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">    <tt class="py-string">'.gra'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-graphite'</tt><tt class="py-op">,</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">    <tt class="py-string">'.gsf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-type1'</tt><tt class="py-op">,</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">    <tt class="py-string">'.gsm'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-gsm'</tt><tt class="py-op">,</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">    <tt class="py-string">'.gtar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">    <tt class="py-string">'.gv'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/vnd.graphviz'</tt><tt class="py-op">,</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">    <tt class="py-string">'.gvp'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-google-video-pointer'</tt><tt class="py-op">,</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">    <tt class="py-string">'.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gzip'</tt><tt class="py-op">,</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">    <tt class="py-string">'.h'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-chdr'</tt><tt class="py-op">,</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">    <tt class="py-string">'.h++'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++hdr'</tt><tt class="py-op">,</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">    <tt class="py-string">'.hdf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-hdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">    <tt class="py-string">'.hh'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++hdr'</tt><tt class="py-op">,</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">    <tt class="py-string">'.hp'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++hdr'</tt><tt class="py-op">,</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">    <tt class="py-string">'.hpgl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.hp-hpgl'</tt><tt class="py-op">,</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">    <tt class="py-string">'.hpp'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++hdr'</tt><tt class="py-op">,</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">    <tt class="py-string">'.hs'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-haskell'</tt><tt class="py-op">,</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">    <tt class="py-string">'.htm'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/html'</tt><tt class="py-op">,</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">    <tt class="py-string">'.html'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/html'</tt><tt class="py-op">,</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">    <tt class="py-string">'.hwp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-hwp'</tt><tt class="py-op">,</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">    <tt class="py-string">'.hwt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-hwt'</tt><tt class="py-op">,</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">    <tt class="py-string">'.hxx'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-c++hdr'</tt><tt class="py-op">,</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">    <tt class="py-string">'.ica'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-ica'</tt><tt class="py-op">,</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">    <tt class="py-string">'.icb'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-tga'</tt><tt class="py-op">,</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">    <tt class="py-string">'.icns'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-icns'</tt><tt class="py-op">,</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">    <tt class="py-string">'.ico'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.microsoft.icon'</tt><tt class="py-op">,</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">    <tt class="py-string">'.ics'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/calendar'</tt><tt class="py-op">,</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">    <tt class="py-string">'.idl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-idl'</tt><tt class="py-op">,</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">    <tt class="py-string">'.ief'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/ief'</tt><tt class="py-op">,</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">    <tt class="py-string">'.iff'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-iff'</tt><tt class="py-op">,</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">    <tt class="py-string">'.ilbm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-ilbm'</tt><tt class="py-op">,</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">    <tt class="py-string">'.ime'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-imelody'</tt><tt class="py-op">,</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">    <tt class="py-string">'.imy'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-imelody'</tt><tt class="py-op">,</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">    <tt class="py-string">'.ins'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">    <tt class="py-string">'.iptables'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-iptables'</tt><tt class="py-op">,</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">    <tt class="py-string">'.iso'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cd-image'</tt><tt class="py-op">,</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">    <tt class="py-string">'.iso9660'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cd-image'</tt><tt class="py-op">,</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">    <tt class="py-string">'.it'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-it'</tt><tt class="py-op">,</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">    <tt class="py-string">'.j2k'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jp2'</tt><tt class="py-op">,</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">    <tt class="py-string">'.jad'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/vnd.sun.j2me.app-descriptor'</tt><tt class="py-op">,</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">    <tt class="py-string">'.jar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-java-archive'</tt><tt class="py-op">,</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">    <tt class="py-string">'.java'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-java'</tt><tt class="py-op">,</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">    <tt class="py-string">'.jng'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-jng'</tt><tt class="py-op">,</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">    <tt class="py-string">'.jnlp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-java-jnlp-file'</tt><tt class="py-op">,</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">    <tt class="py-string">'.jp2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jp2'</tt><tt class="py-op">,</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">    <tt class="py-string">'.jpc'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jp2'</tt><tt class="py-op">,</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">    <tt class="py-string">'.jpe'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">    <tt class="py-string">'.jpeg'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">    <tt class="py-string">'.jpf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jp2'</tt><tt class="py-op">,</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">    <tt class="py-string">'.jpg'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">    <tt class="py-string">'.jpr'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-jbuilder-project'</tt><tt class="py-op">,</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">    <tt class="py-string">'.jpx'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jp2'</tt><tt class="py-op">,</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">    <tt class="py-string">'.js'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/javascript'</tt><tt class="py-op">,</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">    <tt class="py-string">'.json'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/json'</tt><tt class="py-op">,</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">    <tt class="py-string">'.k25'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-kodak-k25'</tt><tt class="py-op">,</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">    <tt class="py-string">'.kar'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/midi'</tt><tt class="py-op">,</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">    <tt class="py-string">'.karbon'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-karbon'</tt><tt class="py-op">,</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">    <tt class="py-string">'.kdc'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-kodak-kdc'</tt><tt class="py-op">,</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">    <tt class="py-string">'.kdelnk'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-desktop'</tt><tt class="py-op">,</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">    <tt class="py-string">'.kexi'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kexiproject-sqlite3'</tt><tt class="py-op">,</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">    <tt class="py-string">'.kexic'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kexi-connectiondata'</tt><tt class="py-op">,</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">    <tt class="py-string">'.kexis'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kexiproject-shortcut'</tt><tt class="py-op">,</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">    <tt class="py-string">'.kfo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kformula'</tt><tt class="py-op">,</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">    <tt class="py-string">'.kil'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-killustrator'</tt><tt class="py-op">,</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">    <tt class="py-string">'.kino'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/smil'</tt><tt class="py-op">,</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">    <tt class="py-string">'.kml'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.google-earth.kml+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">    <tt class="py-string">'.kmz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.google-earth.kmz'</tt><tt class="py-op">,</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">    <tt class="py-string">'.kon'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kontour'</tt><tt class="py-op">,</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">    <tt class="py-string">'.kpm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kpovmodeler'</tt><tt class="py-op">,</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">    <tt class="py-string">'.kpr'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kpresenter'</tt><tt class="py-op">,</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">    <tt class="py-string">'.kpt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kpresenter'</tt><tt class="py-op">,</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line">    <tt class="py-string">'.kra'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-krita'</tt><tt class="py-op">,</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">    <tt class="py-string">'.ksp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kspread'</tt><tt class="py-op">,</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">    <tt class="py-string">'.kud'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kugar'</tt><tt class="py-op">,</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">    <tt class="py-string">'.kwd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kword'</tt><tt class="py-op">,</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">    <tt class="py-string">'.kwt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-kword'</tt><tt class="py-op">,</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">    <tt class="py-string">'.la'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-shared-library-la'</tt><tt class="py-op">,</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">    <tt class="py-string">'.latex'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">    <tt class="py-string">'.ldif'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ldif'</tt><tt class="py-op">,</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">    <tt class="py-string">'.lha'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lha'</tt><tt class="py-op">,</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">    <tt class="py-string">'.lhs'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-literate-haskell'</tt><tt class="py-op">,</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">    <tt class="py-string">'.lhz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lhz'</tt><tt class="py-op">,</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-string">'.log'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-log'</tt><tt class="py-op">,</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">    <tt class="py-string">'.ltx'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">    <tt class="py-string">'.lua'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-lua'</tt><tt class="py-op">,</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">    <tt class="py-string">'.lwo'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-lwo'</tt><tt class="py-op">,</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">    <tt class="py-string">'.lwob'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-lwo'</tt><tt class="py-op">,</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">    <tt class="py-string">'.lws'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-lws'</tt><tt class="py-op">,</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">    <tt class="py-string">'.ly'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-lilypond'</tt><tt class="py-op">,</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">    <tt class="py-string">'.lyx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lyx'</tt><tt class="py-op">,</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">    <tt class="py-string">'.lz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lzip'</tt><tt class="py-op">,</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">    <tt class="py-string">'.lzh'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lha'</tt><tt class="py-op">,</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">    <tt class="py-string">'.lzma'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lzma'</tt><tt class="py-op">,</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">    <tt class="py-string">'.lzo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lzop'</tt><tt class="py-op">,</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">    <tt class="py-string">'.m'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-matlab'</tt><tt class="py-op">,</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">    <tt class="py-string">'.m15'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">    <tt class="py-string">'.m2t'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">    <tt class="py-string">'.m3u'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mpegurl'</tt><tt class="py-op">,</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">    <tt class="py-string">'.m3u8'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mpegurl'</tt><tt class="py-op">,</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">    <tt class="py-string">'.m4'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-m4'</tt><tt class="py-op">,</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">    <tt class="py-string">'.m4a'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/mp4'</tt><tt class="py-op">,</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">    <tt class="py-string">'.m4b'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-m4b'</tt><tt class="py-op">,</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">    <tt class="py-string">'.m4v'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mp4'</tt><tt class="py-op">,</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">    <tt class="py-string">'.mab'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-markaby'</tt><tt class="py-op">,</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">    <tt class="py-string">'.man'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-troff-man'</tt><tt class="py-op">,</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">    <tt class="py-string">'.mbox'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/mbox'</tt><tt class="py-op">,</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">    <tt class="py-string">'.md'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-genesis-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">    <tt class="py-string">'.mdb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-access'</tt><tt class="py-op">,</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">    <tt class="py-string">'.mdi'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.ms-modi'</tt><tt class="py-op">,</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">    <tt class="py-string">'.me'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-troff-me'</tt><tt class="py-op">,</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">    <tt class="py-string">'.med'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">    <tt class="py-string">'.metalink'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/metalink+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">    <tt class="py-string">'.mgp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-magicpoint'</tt><tt class="py-op">,</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">    <tt class="py-string">'.mid'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/midi'</tt><tt class="py-op">,</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">    <tt class="py-string">'.midi'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/midi'</tt><tt class="py-op">,</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">    <tt class="py-string">'.mif'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-mif'</tt><tt class="py-op">,</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">    <tt class="py-string">'.minipsf'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-minipsf'</tt><tt class="py-op">,</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">    <tt class="py-string">'.mka'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-matroska'</tt><tt class="py-op">,</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">    <tt class="py-string">'.mkv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-matroska'</tt><tt class="py-op">,</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">    <tt class="py-string">'.ml'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ocaml'</tt><tt class="py-op">,</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">    <tt class="py-string">'.mli'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ocaml'</tt><tt class="py-op">,</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">    <tt class="py-string">'.mm'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-troff-mm'</tt><tt class="py-op">,</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">    <tt class="py-string">'.mmf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-smaf'</tt><tt class="py-op">,</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">    <tt class="py-string">'.mml'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/mathml'</tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">    <tt class="py-string">'.mng'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-mng'</tt><tt class="py-op">,</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">    <tt class="py-string">'.mo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gettext-translation'</tt><tt class="py-op">,</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">    <tt class="py-string">'.mo3'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mo3'</tt><tt class="py-op">,</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">    <tt class="py-string">'.moc'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-moc'</tt><tt class="py-op">,</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">    <tt class="py-string">'.mod'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">    <tt class="py-string">'.mof'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-mof'</tt><tt class="py-op">,</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">    <tt class="py-string">'.moov'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/quicktime'</tt><tt class="py-op">,</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">    <tt class="py-string">'.mov'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/quicktime'</tt><tt class="py-op">,</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line">    <tt class="py-string">'.movie'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-sgi-movie'</tt><tt class="py-op">,</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">    <tt class="py-string">'.mp+'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-musepack'</tt><tt class="py-op">,</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">    <tt class="py-string">'.mp2'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">    <tt class="py-string">'.mp3'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">    <tt class="py-string">'.mp4'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mp4'</tt><tt class="py-op">,</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">    <tt class="py-string">'.mpc'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-musepack'</tt><tt class="py-op">,</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">    <tt class="py-string">'.mpe'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">    <tt class="py-string">'.mpeg'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">    <tt class="py-string">'.mpg'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">    <tt class="py-string">'.mpga'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">    <tt class="py-string">'.mpp'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-musepack'</tt><tt class="py-op">,</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line">    <tt class="py-string">'.mrl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-mrml'</tt><tt class="py-op">,</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">    <tt class="py-string">'.mrml'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-mrml'</tt><tt class="py-op">,</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">    <tt class="py-string">'.mrw'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-minolta-mrw'</tt><tt class="py-op">,</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">    <tt class="py-string">'.ms'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-troff-ms'</tt><tt class="py-op">,</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">    <tt class="py-string">'.msi'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-msi'</tt><tt class="py-op">,</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">    <tt class="py-string">'.msod'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-msod'</tt><tt class="py-op">,</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">    <tt class="py-string">'.msx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-msx-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">    <tt class="py-string">'.mtm'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">    <tt class="py-string">'.mup'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-mup'</tt><tt class="py-op">,</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">    <tt class="py-string">'.mxf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/mxf'</tt><tt class="py-op">,</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">    <tt class="py-string">'.n64'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-n64-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">    <tt class="py-string">'.nb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/mathematica'</tt><tt class="py-op">,</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">    <tt class="py-string">'.nc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-netcdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">    <tt class="py-string">'.nds'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-nintendo-ds-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">    <tt class="py-string">'.nef'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-nikon-nef'</tt><tt class="py-op">,</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">    <tt class="py-string">'.nes'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-nes-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">    <tt class="py-string">'.nfo'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-nfo'</tt><tt class="py-op">,</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">    <tt class="py-string">'.not'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-mup'</tt><tt class="py-op">,</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">    <tt class="py-string">'.nsc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-netshow-channel'</tt><tt class="py-op">,</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">    <tt class="py-string">'.nsv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-nsv'</tt><tt class="py-op">,</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">    <tt class="py-string">'.o'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-object'</tt><tt class="py-op">,</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">    <tt class="py-string">'.obj'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tgif'</tt><tt class="py-op">,</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">    <tt class="py-string">'.ocl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ocl'</tt><tt class="py-op">,</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">    <tt class="py-string">'.oda'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/oda'</tt><tt class="py-op">,</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">    <tt class="py-string">'.odb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.database'</tt><tt class="py-op">,</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">    <tt class="py-string">'.odc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.chart'</tt><tt class="py-op">,</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">    <tt class="py-string">'.odf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.formula'</tt><tt class="py-op">,</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">    <tt class="py-string">'.odg'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.graphics'</tt><tt class="py-op">,</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line">    <tt class="py-string">'.odi'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.image'</tt><tt class="py-op">,</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">    <tt class="py-string">'.odm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.text-master'</tt><tt class="py-op">,</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">    <tt class="py-string">'.odp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.presentation'</tt><tt class="py-op">,</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">    <tt class="py-string">'.ods'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.spreadsheet'</tt><tt class="py-op">,</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">    <tt class="py-string">'.odt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.text'</tt><tt class="py-op">,</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">    <tt class="py-string">'.oga'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/ogg'</tt><tt class="py-op">,</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">    <tt class="py-string">'.ogg'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-theora+ogg'</tt><tt class="py-op">,</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">    <tt class="py-string">'.ogm'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-ogm+ogg'</tt><tt class="py-op">,</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">    <tt class="py-string">'.ogv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/ogg'</tt><tt class="py-op">,</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">    <tt class="py-string">'.ogx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/ogg'</tt><tt class="py-op">,</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">    <tt class="py-string">'.old'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-trash'</tt><tt class="py-op">,</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">    <tt class="py-string">'.oleo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-oleo'</tt><tt class="py-op">,</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">    <tt class="py-string">'.opml'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-opml+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">    <tt class="py-string">'.ora'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/openraster'</tt><tt class="py-op">,</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">    <tt class="py-string">'.orf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-olympus-orf'</tt><tt class="py-op">,</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line">    <tt class="py-string">'.otc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.chart-template'</tt><tt class="py-op">,</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">    <tt class="py-string">'.otf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-otf'</tt><tt class="py-op">,</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">    <tt class="py-string">'.otg'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.graphics-template'</tt><tt class="py-op">,</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">    <tt class="py-string">'.oth'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.text-web'</tt><tt class="py-op">,</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">    <tt class="py-string">'.otp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.presentation-template'</tt><tt class="py-op">,</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">    <tt class="py-string">'.ots'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.spreadsheet-template'</tt><tt class="py-op">,</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">    <tt class="py-string">'.ott'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.oasis.opendocument.text-template'</tt><tt class="py-op">,</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">    <tt class="py-string">'.owl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/rdf+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">    <tt class="py-string">'.oxt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openofficeorg.extension'</tt><tt class="py-op">,</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">    <tt class="py-string">'.p'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-pascal'</tt><tt class="py-op">,</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">    <tt class="py-string">'.p10'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pkcs10'</tt><tt class="py-op">,</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">    <tt class="py-string">'.p12'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pkcs12'</tt><tt class="py-op">,</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">    <tt class="py-string">'.p7b'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pkcs7-certificates'</tt><tt class="py-op">,</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">    <tt class="py-string">'.p7s'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pkcs7-signature'</tt><tt class="py-op">,</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">    <tt class="py-string">'.pack'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-java-pack200'</tt><tt class="py-op">,</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line">    <tt class="py-string">'.pak'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pak'</tt><tt class="py-op">,</tt> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">    <tt class="py-string">'.par2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-par2'</tt><tt class="py-op">,</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line">    <tt class="py-string">'.pas'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-pascal'</tt><tt class="py-op">,</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">    <tt class="py-string">'.patch'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-patch'</tt><tt class="py-op">,</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">    <tt class="py-string">'.pbm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-portable-bitmap'</tt><tt class="py-op">,</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">    <tt class="py-string">'.pcd'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-photo-cd'</tt><tt class="py-op">,</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">    <tt class="py-string">'.pcf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cisco-vpn-settings'</tt><tt class="py-op">,</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">    <tt class="py-string">'.pcf.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-pcf'</tt><tt class="py-op">,</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">    <tt class="py-string">'.pcf.z'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-pcf'</tt><tt class="py-op">,</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">    <tt class="py-string">'.pcl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.hp-pcl'</tt><tt class="py-op">,</tt> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">    <tt class="py-string">'.pcx'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-pcx'</tt><tt class="py-op">,</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">    <tt class="py-string">'.pdb'</tt><tt class="py-op">:</tt> <tt class="py-string">'chemical/x-pdb'</tt><tt class="py-op">,</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">    <tt class="py-string">'.pdc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-aportisdoc'</tt><tt class="py-op">,</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">    <tt class="py-string">'.pdf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">    <tt class="py-string">'.pdf.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzpdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">    <tt class="py-string">'.pdf.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gzpdf'</tt><tt class="py-op">,</tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">    <tt class="py-string">'.pef'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-pentax-pef'</tt><tt class="py-op">,</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line">    <tt class="py-string">'.pem'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-x509-ca-cert'</tt><tt class="py-op">,</tt> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">    <tt class="py-string">'.perl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-perl'</tt><tt class="py-op">,</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line">    <tt class="py-string">'.pfa'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-type1'</tt><tt class="py-op">,</tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">    <tt class="py-string">'.pfb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-type1'</tt><tt class="py-op">,</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">    <tt class="py-string">'.pfx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pkcs12'</tt><tt class="py-op">,</tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">    <tt class="py-string">'.pgm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-portable-graymap'</tt><tt class="py-op">,</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">    <tt class="py-string">'.pgn'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-chess-pgn'</tt><tt class="py-op">,</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">    <tt class="py-string">'.pgp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pgp-encrypted'</tt><tt class="py-op">,</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">    <tt class="py-string">'.php'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-php'</tt><tt class="py-op">,</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">    <tt class="py-string">'.php3'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-php'</tt><tt class="py-op">,</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line">    <tt class="py-string">'.php4'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-php'</tt><tt class="py-op">,</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">    <tt class="py-string">'.pict'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-pict'</tt><tt class="py-op">,</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">    <tt class="py-string">'.pict1'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-pict'</tt><tt class="py-op">,</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">    <tt class="py-string">'.pict2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-pict'</tt><tt class="py-op">,</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">    <tt class="py-string">'.pickle'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/python-pickle'</tt><tt class="py-op">,</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">    <tt class="py-string">'.pk'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tex-pk'</tt><tt class="py-op">,</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">    <tt class="py-string">'.pkipath'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pkix-pkipath'</tt><tt class="py-op">,</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line">    <tt class="py-string">'.pkr'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pgp-keys'</tt><tt class="py-op">,</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">    <tt class="py-string">'.pl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-perl'</tt><tt class="py-op">,</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">    <tt class="py-string">'.pla'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-iriver-pla'</tt><tt class="py-op">,</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line">    <tt class="py-string">'.pln'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-planperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">    <tt class="py-string">'.pls'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-scpls'</tt><tt class="py-op">,</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line">    <tt class="py-string">'.pm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-perl'</tt><tt class="py-op">,</tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line">    <tt class="py-string">'.png'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/png'</tt><tt class="py-op">,</tt> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">    <tt class="py-string">'.pnm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-portable-anymap'</tt><tt class="py-op">,</tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line">    <tt class="py-string">'.pntg'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-macpaint'</tt><tt class="py-op">,</tt> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">    <tt class="py-string">'.po'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-gettext-translation'</tt><tt class="py-op">,</tt> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">    <tt class="py-string">'.por'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-spss-por'</tt><tt class="py-op">,</tt> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line">    <tt class="py-string">'.pot'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-gettext-translation-template'</tt><tt class="py-op">,</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line">    <tt class="py-string">'.ppm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-portable-pixmap'</tt><tt class="py-op">,</tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">    <tt class="py-string">'.pps'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-powerpoint'</tt><tt class="py-op">,</tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line">    <tt class="py-string">'.ppt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-powerpoint'</tt><tt class="py-op">,</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line">    <tt class="py-string">'.pptm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openxmlformats-officedocument.presentationml.presentation'</tt><tt class="py-op">,</tt> </tt>
<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line">    <tt class="py-string">'.pptx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openxmlformats-officedocument.presentationml.presentation'</tt><tt class="py-op">,</tt> </tt>
<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line">    <tt class="py-string">'.ppz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-powerpoint'</tt><tt class="py-op">,</tt> </tt>
<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">    <tt class="py-string">'.prc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-palm-database'</tt><tt class="py-op">,</tt> </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line">    <tt class="py-string">'.ps'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/postscript'</tt><tt class="py-op">,</tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line">    <tt class="py-string">'.ps.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzpostscript'</tt><tt class="py-op">,</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">    <tt class="py-string">'.ps.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gzpostscript'</tt><tt class="py-op">,</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line">    <tt class="py-string">'.psd'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.adobe.photoshop'</tt><tt class="py-op">,</tt> </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line">    <tt class="py-string">'.psf'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-psf'</tt><tt class="py-op">,</tt> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">    <tt class="py-string">'.psf.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gz-font-linux-psf'</tt><tt class="py-op">,</tt> </tt>
<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line">    <tt class="py-string">'.psflib'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-psflib'</tt><tt class="py-op">,</tt> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">    <tt class="py-string">'.psid'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/prs.sid'</tt><tt class="py-op">,</tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line">    <tt class="py-string">'.psw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pocket-word'</tt><tt class="py-op">,</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">    <tt class="py-string">'.pw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pw'</tt><tt class="py-op">,</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line">    <tt class="py-string">'.py'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-python'</tt><tt class="py-op">,</tt> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">    <tt class="py-string">'.pyc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-python-bytecode'</tt><tt class="py-op">,</tt> </tt>
<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line">    <tt class="py-string">'.pyo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-python-bytecode'</tt><tt class="py-op">,</tt> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">    <tt class="py-string">'.qif'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-quicktime'</tt><tt class="py-op">,</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">    <tt class="py-string">'.qt'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/quicktime'</tt><tt class="py-op">,</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">    <tt class="py-string">'.qtif'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-quicktime'</tt><tt class="py-op">,</tt> </tt>
<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line">    <tt class="py-string">'.qtl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-quicktime-media-link'</tt><tt class="py-op">,</tt> </tt>
<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line">    <tt class="py-string">'.qtvr'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/quicktime'</tt><tt class="py-op">,</tt> </tt>
<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">    <tt class="py-string">'.ra'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/vnd.rn-realaudio'</tt><tt class="py-op">,</tt> </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line">    <tt class="py-string">'.raf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-fuji-raf'</tt><tt class="py-op">,</tt> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line">    <tt class="py-string">'.ram'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/ram'</tt><tt class="py-op">,</tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line">    <tt class="py-string">'.rar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-rar'</tt><tt class="py-op">,</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line">    <tt class="py-string">'.ras'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-cmu-raster'</tt><tt class="py-op">,</tt> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line">    <tt class="py-string">'.raw'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-panasonic-raw'</tt><tt class="py-op">,</tt> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line">    <tt class="py-string">'.rax'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/vnd.rn-realaudio'</tt><tt class="py-op">,</tt> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line">    <tt class="py-string">'.rb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-ruby'</tt><tt class="py-op">,</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line">    <tt class="py-string">'.rdf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/rdf+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">    <tt class="py-string">'.rdfs'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/rdf+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">    <tt class="py-string">'.reg'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ms-regedit'</tt><tt class="py-op">,</tt> </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">    <tt class="py-string">'.rej'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-reject'</tt><tt class="py-op">,</tt> </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">    <tt class="py-string">'.rgb'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-rgb'</tt><tt class="py-op">,</tt> </tt>
<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">    <tt class="py-string">'.rle'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/rle'</tt><tt class="py-op">,</tt> </tt>
<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">    <tt class="py-string">'.rm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.rn-realmedia'</tt><tt class="py-op">,</tt> </tt>
<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">    <tt class="py-string">'.rmj'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.rn-realmedia'</tt><tt class="py-op">,</tt> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">    <tt class="py-string">'.rmm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.rn-realmedia'</tt><tt class="py-op">,</tt> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">    <tt class="py-string">'.rms'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.rn-realmedia'</tt><tt class="py-op">,</tt> </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">    <tt class="py-string">'.rmvb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.rn-realmedia'</tt><tt class="py-op">,</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line">    <tt class="py-string">'.rmx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.rn-realmedia'</tt><tt class="py-op">,</tt> </tt>
<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">    <tt class="py-string">'.roff'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/troff'</tt><tt class="py-op">,</tt> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line">    <tt class="py-string">'.rp'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.rn-realpix'</tt><tt class="py-op">,</tt> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">    <tt class="py-string">'.rpm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-rpm'</tt><tt class="py-op">,</tt> </tt>
<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">    <tt class="py-string">'.rss'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/rss+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">    <tt class="py-string">'.rt'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/vnd.rn-realtext'</tt><tt class="py-op">,</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line">    <tt class="py-string">'.rtf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/rtf'</tt><tt class="py-op">,</tt> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">    <tt class="py-string">'.rtx'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/richtext'</tt><tt class="py-op">,</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">    <tt class="py-string">'.rv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/vnd.rn-realvideo'</tt><tt class="py-op">,</tt> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">    <tt class="py-string">'.rvx'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/vnd.rn-realvideo'</tt><tt class="py-op">,</tt> </tt>
<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">    <tt class="py-string">'.s3m'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-s3m'</tt><tt class="py-op">,</tt> </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">    <tt class="py-string">'.sam'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-amipro'</tt><tt class="py-op">,</tt> </tt>
<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line">    <tt class="py-string">'.sami'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sami'</tt><tt class="py-op">,</tt> </tt>
<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">    <tt class="py-string">'.sav'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-spss-sav'</tt><tt class="py-op">,</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line">    <tt class="py-string">'.scm'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-scheme'</tt><tt class="py-op">,</tt> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line">    <tt class="py-string">'.sda'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.draw'</tt><tt class="py-op">,</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">    <tt class="py-string">'.sdc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.calc'</tt><tt class="py-op">,</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">    <tt class="py-string">'.sdd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.impress'</tt><tt class="py-op">,</tt> </tt>
<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line">    <tt class="py-string">'.sdp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/sdp'</tt><tt class="py-op">,</tt> </tt>
<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line">    <tt class="py-string">'.sds'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.chart'</tt><tt class="py-op">,</tt> </tt>
<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line">    <tt class="py-string">'.sdw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.writer'</tt><tt class="py-op">,</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line">    <tt class="py-string">'.sgf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-go-sgf'</tt><tt class="py-op">,</tt> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">    <tt class="py-string">'.sgi'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-sgi'</tt><tt class="py-op">,</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">    <tt class="py-string">'.sgl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.writer'</tt><tt class="py-op">,</tt> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">    <tt class="py-string">'.sgm'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/sgml'</tt><tt class="py-op">,</tt> </tt>
<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line">    <tt class="py-string">'.sgml'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/sgml'</tt><tt class="py-op">,</tt> </tt>
<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line">    <tt class="py-string">'.sh'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-shellscript'</tt><tt class="py-op">,</tt> </tt>
<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line">    <tt class="py-string">'.shar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-shar'</tt><tt class="py-op">,</tt> </tt>
<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line">    <tt class="py-string">'.shn'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-shorten'</tt><tt class="py-op">,</tt> </tt>
<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">    <tt class="py-string">'.siag'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-siag'</tt><tt class="py-op">,</tt> </tt>
<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line">    <tt class="py-string">'.sid'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/prs.sid'</tt><tt class="py-op">,</tt> </tt>
<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line">    <tt class="py-string">'.sik'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-trash'</tt><tt class="py-op">,</tt> </tt>
<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">    <tt class="py-string">'.sis'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.symbian.install'</tt><tt class="py-op">,</tt> </tt>
<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line">    <tt class="py-string">'.sisx'</tt><tt class="py-op">:</tt> <tt class="py-string">'x-epoc/x-sisx-app'</tt><tt class="py-op">,</tt> </tt>
<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line">    <tt class="py-string">'.sit'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-stuffit'</tt><tt class="py-op">,</tt> </tt>
<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">    <tt class="py-string">'.siv'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/sieve'</tt><tt class="py-op">,</tt> </tt>
<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line">    <tt class="py-string">'.sk'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-skencil'</tt><tt class="py-op">,</tt> </tt>
<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line">    <tt class="py-string">'.sk1'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-skencil'</tt><tt class="py-op">,</tt> </tt>
<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">    <tt class="py-string">'.skr'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/pgp-keys'</tt><tt class="py-op">,</tt> </tt>
<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">    <tt class="py-string">'.slk'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/spreadsheet'</tt><tt class="py-op">,</tt> </tt>
<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">    <tt class="py-string">'.smaf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-smaf'</tt><tt class="py-op">,</tt> </tt>
<a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line">    <tt class="py-string">'.smc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-snes-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line">    <tt class="py-string">'.smd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.mail'</tt><tt class="py-op">,</tt> </tt>
<a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line">    <tt class="py-string">'.smf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.math'</tt><tt class="py-op">,</tt> </tt>
<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line">    <tt class="py-string">'.smi'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sami'</tt><tt class="py-op">,</tt> </tt>
<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line">    <tt class="py-string">'.smil'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/smil'</tt><tt class="py-op">,</tt> </tt>
<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line">    <tt class="py-string">'.sml'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/smil'</tt><tt class="py-op">,</tt> </tt>
<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line">    <tt class="py-string">'.sms'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sms-rom'</tt><tt class="py-op">,</tt> </tt>
<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line">    <tt class="py-string">'.snd'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/basic'</tt><tt class="py-op">,</tt> </tt>
<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">    <tt class="py-string">'.so'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sharedlib'</tt><tt class="py-op">,</tt> </tt>
<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">    <tt class="py-string">'.spc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-pkcs7-certificates'</tt><tt class="py-op">,</tt> </tt>
<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line">    <tt class="py-string">'.spd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-speedo'</tt><tt class="py-op">,</tt> </tt>
<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line">    <tt class="py-string">'.spec'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-rpm-spec'</tt><tt class="py-op">,</tt> </tt>
<a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line">    <tt class="py-string">'.spl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-shockwave-flash'</tt><tt class="py-op">,</tt> </tt>
<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line">    <tt class="py-string">'.spx'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-speex'</tt><tt class="py-op">,</tt> </tt>
<a name="L539"></a><tt class="py-lineno">539</tt>  <tt class="py-line">    <tt class="py-string">'.sql'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-sql'</tt><tt class="py-op">,</tt> </tt>
<a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">    <tt class="py-string">'.sr2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-sony-sr2'</tt><tt class="py-op">,</tt> </tt>
<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line">    <tt class="py-string">'.src'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-wais-source'</tt><tt class="py-op">,</tt> </tt>
<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line">    <tt class="py-string">'.srf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-sony-srf'</tt><tt class="py-op">,</tt> </tt>
<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line">    <tt class="py-string">'.srt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-subrip'</tt><tt class="py-op">,</tt> </tt>
<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line">    <tt class="py-string">'.ssa'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-ssa'</tt><tt class="py-op">,</tt> </tt>
<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line">    <tt class="py-string">'.stc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.calc.template'</tt><tt class="py-op">,</tt> </tt>
<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">    <tt class="py-string">'.std'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.draw.template'</tt><tt class="py-op">,</tt> </tt>
<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">    <tt class="py-string">'.sti'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.impress.template'</tt><tt class="py-op">,</tt> </tt>
<a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line">    <tt class="py-string">'.stm'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-stm'</tt><tt class="py-op">,</tt> </tt>
<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line">    <tt class="py-string">'.stw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.writer.template'</tt><tt class="py-op">,</tt> </tt>
<a name="L550"></a><tt class="py-lineno">550</tt>  <tt class="py-line">    <tt class="py-string">'.sty'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line">    <tt class="py-string">'.sub'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-subviewer'</tt><tt class="py-op">,</tt> </tt>
<a name="L552"></a><tt class="py-lineno">552</tt>  <tt class="py-line">    <tt class="py-string">'.sun'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-sun-raster'</tt><tt class="py-op">,</tt> </tt>
<a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line">    <tt class="py-string">'.sv4cpio'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sv4cpio'</tt><tt class="py-op">,</tt> </tt>
<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line">    <tt class="py-string">'.sv4crc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-sv4crc'</tt><tt class="py-op">,</tt> </tt>
<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line">    <tt class="py-string">'.svg'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/svg+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line">    <tt class="py-string">'.svgz'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/svg+xml-compressed'</tt><tt class="py-op">,</tt> </tt>
<a name="L557"></a><tt class="py-lineno">557</tt>  <tt class="py-line">    <tt class="py-string">'.swf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-shockwave-flash'</tt><tt class="py-op">,</tt> </tt>
<a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line">    <tt class="py-string">'.sxc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.calc'</tt><tt class="py-op">,</tt> </tt>
<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line">    <tt class="py-string">'.sxd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.draw'</tt><tt class="py-op">,</tt> </tt>
<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line">    <tt class="py-string">'.sxg'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.writer.global'</tt><tt class="py-op">,</tt> </tt>
<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line">    <tt class="py-string">'.sxi'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.impress'</tt><tt class="py-op">,</tt> </tt>
<a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line">    <tt class="py-string">'.sxm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.math'</tt><tt class="py-op">,</tt> </tt>
<a name="L563"></a><tt class="py-lineno">563</tt>  <tt class="py-line">    <tt class="py-string">'.sxw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.sun.xml.writer'</tt><tt class="py-op">,</tt> </tt>
<a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line">    <tt class="py-string">'.sylk'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/spreadsheet'</tt><tt class="py-op">,</tt> </tt>
<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line">    <tt class="py-string">'.t'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/troff'</tt><tt class="py-op">,</tt> </tt>
<a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line">    <tt class="py-string">'.t2t'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-txt2tags'</tt><tt class="py-op">,</tt> </tt>
<a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line">    <tt class="py-string">'.tar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L568"></a><tt class="py-lineno">568</tt>  <tt class="py-line">    <tt class="py-string">'.tar.bz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzip-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line">    <tt class="py-string">'.tar.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzip-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L570"></a><tt class="py-lineno">570</tt>  <tt class="py-line">    <tt class="py-string">'.tar.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line">    <tt class="py-string">'.tar.lzma'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lzma-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L572"></a><tt class="py-lineno">572</tt>  <tt class="py-line">    <tt class="py-string">'.tar.lzo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tzo'</tt><tt class="py-op">,</tt> </tt>
<a name="L573"></a><tt class="py-lineno">573</tt>  <tt class="py-line">    <tt class="py-string">'.tar.xz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-xz-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L574"></a><tt class="py-lineno">574</tt>  <tt class="py-line">    <tt class="py-string">'.tar.z'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tarz'</tt><tt class="py-op">,</tt> </tt>
<a name="L575"></a><tt class="py-lineno">575</tt>  <tt class="py-line">    <tt class="py-string">'.tbz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzip-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L576"></a><tt class="py-lineno">576</tt>  <tt class="py-line">    <tt class="py-string">'.tbz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bzip-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L577"></a><tt class="py-lineno">577</tt>  <tt class="py-line">    <tt class="py-string">'.tcl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tcl'</tt><tt class="py-op">,</tt> </tt>
<a name="L578"></a><tt class="py-lineno">578</tt>  <tt class="py-line">    <tt class="py-string">'.tex'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tex'</tt><tt class="py-op">,</tt> </tt>
<a name="L579"></a><tt class="py-lineno">579</tt>  <tt class="py-line">    <tt class="py-string">'.texi'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-texinfo'</tt><tt class="py-op">,</tt> </tt>
<a name="L580"></a><tt class="py-lineno">580</tt>  <tt class="py-line">    <tt class="py-string">'.texinfo'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-texinfo'</tt><tt class="py-op">,</tt> </tt>
<a name="L581"></a><tt class="py-lineno">581</tt>  <tt class="py-line">    <tt class="py-string">'.tga'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-tga'</tt><tt class="py-op">,</tt> </tt>
<a name="L582"></a><tt class="py-lineno">582</tt>  <tt class="py-line">    <tt class="py-string">'.tgz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L583"></a><tt class="py-lineno">583</tt>  <tt class="py-line">    <tt class="py-string">'.theme'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-theme'</tt><tt class="py-op">,</tt> </tt>
<a name="L584"></a><tt class="py-lineno">584</tt>  <tt class="py-line">    <tt class="py-string">'.themepack'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-windows-themepack'</tt><tt class="py-op">,</tt> </tt>
<a name="L585"></a><tt class="py-lineno">585</tt>  <tt class="py-line">    <tt class="py-string">'.tif'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/tiff'</tt><tt class="py-op">,</tt> </tt>
<a name="L586"></a><tt class="py-lineno">586</tt>  <tt class="py-line">    <tt class="py-string">'.tiff'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/tiff'</tt><tt class="py-op">,</tt> </tt>
<a name="L587"></a><tt class="py-lineno">587</tt>  <tt class="py-line">    <tt class="py-string">'.tk'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-tcl'</tt><tt class="py-op">,</tt> </tt>
<a name="L588"></a><tt class="py-lineno">588</tt>  <tt class="py-line">    <tt class="py-string">'.tlz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-lzma-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L589"></a><tt class="py-lineno">589</tt>  <tt class="py-line">    <tt class="py-string">'.tnef'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-tnef'</tt><tt class="py-op">,</tt> </tt>
<a name="L590"></a><tt class="py-lineno">590</tt>  <tt class="py-line">    <tt class="py-string">'.tnf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-tnef'</tt><tt class="py-op">,</tt> </tt>
<a name="L591"></a><tt class="py-lineno">591</tt>  <tt class="py-line">    <tt class="py-string">'.toc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-cdrdao-toc'</tt><tt class="py-op">,</tt> </tt>
<a name="L592"></a><tt class="py-lineno">592</tt>  <tt class="py-line">    <tt class="py-string">'.torrent'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-bittorrent'</tt><tt class="py-op">,</tt> </tt>
<a name="L593"></a><tt class="py-lineno">593</tt>  <tt class="py-line">    <tt class="py-string">'.tpic'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-tga'</tt><tt class="py-op">,</tt> </tt>
<a name="L594"></a><tt class="py-lineno">594</tt>  <tt class="py-line">    <tt class="py-string">'.tr'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/troff'</tt><tt class="py-op">,</tt> </tt>
<a name="L595"></a><tt class="py-lineno">595</tt>  <tt class="py-line">    <tt class="py-string">'.ts'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-linguist'</tt><tt class="py-op">,</tt> </tt>
<a name="L596"></a><tt class="py-lineno">596</tt>  <tt class="py-line">    <tt class="py-string">'.tsv'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/tab-separated-values'</tt><tt class="py-op">,</tt> </tt>
<a name="L597"></a><tt class="py-lineno">597</tt>  <tt class="py-line">    <tt class="py-string">'.tta'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-tta'</tt><tt class="py-op">,</tt> </tt>
<a name="L598"></a><tt class="py-lineno">598</tt>  <tt class="py-line">    <tt class="py-string">'.ttc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-ttf'</tt><tt class="py-op">,</tt> </tt>
<a name="L599"></a><tt class="py-lineno">599</tt>  <tt class="py-line">    <tt class="py-string">'.ttf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-ttf'</tt><tt class="py-op">,</tt> </tt>
<a name="L600"></a><tt class="py-lineno">600</tt>  <tt class="py-line">    <tt class="py-string">'.ttx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-font-ttx'</tt><tt class="py-op">,</tt> </tt>
<a name="L601"></a><tt class="py-lineno">601</tt>  <tt class="py-line">    <tt class="py-string">'.txt'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L602"></a><tt class="py-lineno">602</tt>  <tt class="py-line">    <tt class="py-string">'.txz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-xz-compressed-tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L603"></a><tt class="py-lineno">603</tt>  <tt class="py-line">    <tt class="py-string">'.tzo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-tzo'</tt><tt class="py-op">,</tt> </tt>
<a name="L604"></a><tt class="py-lineno">604</tt>  <tt class="py-line">    <tt class="py-string">'.ufraw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-ufraw'</tt><tt class="py-op">,</tt> </tt>
<a name="L605"></a><tt class="py-lineno">605</tt>  <tt class="py-line">    <tt class="py-string">'.ui'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-designer'</tt><tt class="py-op">,</tt> </tt>
<a name="L606"></a><tt class="py-lineno">606</tt>  <tt class="py-line">    <tt class="py-string">'.uil'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-uil'</tt><tt class="py-op">,</tt> </tt>
<a name="L607"></a><tt class="py-lineno">607</tt>  <tt class="py-line">    <tt class="py-string">'.ult'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L608"></a><tt class="py-lineno">608</tt>  <tt class="py-line">    <tt class="py-string">'.uni'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mod'</tt><tt class="py-op">,</tt> </tt>
<a name="L609"></a><tt class="py-lineno">609</tt>  <tt class="py-line">    <tt class="py-string">'.uri'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-uri'</tt><tt class="py-op">,</tt> </tt>
<a name="L610"></a><tt class="py-lineno">610</tt>  <tt class="py-line">    <tt class="py-string">'.url'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-uri'</tt><tt class="py-op">,</tt> </tt>
<a name="L611"></a><tt class="py-lineno">611</tt>  <tt class="py-line">    <tt class="py-string">'.ustar'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-ustar'</tt><tt class="py-op">,</tt> </tt>
<a name="L612"></a><tt class="py-lineno">612</tt>  <tt class="py-line">    <tt class="py-string">'.vala'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-vala'</tt><tt class="py-op">,</tt> </tt>
<a name="L613"></a><tt class="py-lineno">613</tt>  <tt class="py-line">    <tt class="py-string">'.vapi'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-vala'</tt><tt class="py-op">,</tt> </tt>
<a name="L614"></a><tt class="py-lineno">614</tt>  <tt class="py-line">    <tt class="py-string">'.vcf'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/directory'</tt><tt class="py-op">,</tt> </tt>
<a name="L615"></a><tt class="py-lineno">615</tt>  <tt class="py-line">    <tt class="py-string">'.vcs'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/calendar'</tt><tt class="py-op">,</tt> </tt>
<a name="L616"></a><tt class="py-lineno">616</tt>  <tt class="py-line">    <tt class="py-string">'.vct'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/directory'</tt><tt class="py-op">,</tt> </tt>
<a name="L617"></a><tt class="py-lineno">617</tt>  <tt class="py-line">    <tt class="py-string">'.vda'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-tga'</tt><tt class="py-op">,</tt> </tt>
<a name="L618"></a><tt class="py-lineno">618</tt>  <tt class="py-line">    <tt class="py-string">'.vhd'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-vhdl'</tt><tt class="py-op">,</tt> </tt>
<a name="L619"></a><tt class="py-lineno">619</tt>  <tt class="py-line">    <tt class="py-string">'.vhdl'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-vhdl'</tt><tt class="py-op">,</tt> </tt>
<a name="L620"></a><tt class="py-lineno">620</tt>  <tt class="py-line">    <tt class="py-string">'.viv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/vivo'</tt><tt class="py-op">,</tt> </tt>
<a name="L621"></a><tt class="py-lineno">621</tt>  <tt class="py-line">    <tt class="py-string">'.vivo'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/vivo'</tt><tt class="py-op">,</tt> </tt>
<a name="L622"></a><tt class="py-lineno">622</tt>  <tt class="py-line">    <tt class="py-string">'.vlc'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-mpegurl'</tt><tt class="py-op">,</tt> </tt>
<a name="L623"></a><tt class="py-lineno">623</tt>  <tt class="py-line">    <tt class="py-string">'.vob'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/mpeg'</tt><tt class="py-op">,</tt> </tt>
<a name="L624"></a><tt class="py-lineno">624</tt>  <tt class="py-line">    <tt class="py-string">'.voc'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-voc'</tt><tt class="py-op">,</tt> </tt>
<a name="L625"></a><tt class="py-lineno">625</tt>  <tt class="py-line">    <tt class="py-string">'.vor'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.stardivision.writer'</tt><tt class="py-op">,</tt> </tt>
<a name="L626"></a><tt class="py-lineno">626</tt>  <tt class="py-line">    <tt class="py-string">'.vst'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-tga'</tt><tt class="py-op">,</tt> </tt>
<a name="L627"></a><tt class="py-lineno">627</tt>  <tt class="py-line">    <tt class="py-string">'.wav'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-wav'</tt><tt class="py-op">,</tt> </tt>
<a name="L628"></a><tt class="py-lineno">628</tt>  <tt class="py-line">    <tt class="py-string">'.wax'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-ms-asx'</tt><tt class="py-op">,</tt> </tt>
<a name="L629"></a><tt class="py-lineno">629</tt>  <tt class="py-line">    <tt class="py-string">'.wb1'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-quattropro'</tt><tt class="py-op">,</tt> </tt>
<a name="L630"></a><tt class="py-lineno">630</tt>  <tt class="py-line">    <tt class="py-string">'.wb2'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-quattropro'</tt><tt class="py-op">,</tt> </tt>
<a name="L631"></a><tt class="py-lineno">631</tt>  <tt class="py-line">    <tt class="py-string">'.wb3'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-quattropro'</tt><tt class="py-op">,</tt> </tt>
<a name="L632"></a><tt class="py-lineno">632</tt>  <tt class="py-line">    <tt class="py-string">'.wbmp'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/vnd.wap.wbmp'</tt><tt class="py-op">,</tt> </tt>
<a name="L633"></a><tt class="py-lineno">633</tt>  <tt class="py-line">    <tt class="py-string">'.wcm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-works'</tt><tt class="py-op">,</tt> </tt>
<a name="L634"></a><tt class="py-lineno">634</tt>  <tt class="py-line">    <tt class="py-string">'.wdb'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-works'</tt><tt class="py-op">,</tt> </tt>
<a name="L635"></a><tt class="py-lineno">635</tt>  <tt class="py-line">    <tt class="py-string">'.wk1'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.lotus-1-2-3'</tt><tt class="py-op">,</tt> </tt>
<a name="L636"></a><tt class="py-lineno">636</tt>  <tt class="py-line">    <tt class="py-string">'.wk3'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.lotus-1-2-3'</tt><tt class="py-op">,</tt> </tt>
<a name="L637"></a><tt class="py-lineno">637</tt>  <tt class="py-line">    <tt class="py-string">'.wk4'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.lotus-1-2-3'</tt><tt class="py-op">,</tt> </tt>
<a name="L638"></a><tt class="py-lineno">638</tt>  <tt class="py-line">    <tt class="py-string">'.wks'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-works'</tt><tt class="py-op">,</tt> </tt>
<a name="L639"></a><tt class="py-lineno">639</tt>  <tt class="py-line">    <tt class="py-string">'.wma'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-ms-wma'</tt><tt class="py-op">,</tt> </tt>
<a name="L640"></a><tt class="py-lineno">640</tt>  <tt class="py-line">    <tt class="py-string">'.wmf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-wmf'</tt><tt class="py-op">,</tt> </tt>
<a name="L641"></a><tt class="py-lineno">641</tt>  <tt class="py-line">    <tt class="py-string">'.wml'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/vnd.wap.wml'</tt><tt class="py-op">,</tt> </tt>
<a name="L642"></a><tt class="py-lineno">642</tt>  <tt class="py-line">    <tt class="py-string">'.wmls'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/vnd.wap.wmlscript'</tt><tt class="py-op">,</tt> </tt>
<a name="L643"></a><tt class="py-lineno">643</tt>  <tt class="py-line">    <tt class="py-string">'.wmv'</tt><tt class="py-op">:</tt> <tt class="py-string">'video/x-ms-wmv'</tt><tt class="py-op">,</tt> </tt>
<a name="L644"></a><tt class="py-lineno">644</tt>  <tt class="py-line">    <tt class="py-string">'.wmx'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-ms-asx'</tt><tt class="py-op">,</tt> </tt>
<a name="L645"></a><tt class="py-lineno">645</tt>  <tt class="py-line">    <tt class="py-string">'.wp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.wordperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L646"></a><tt class="py-lineno">646</tt>  <tt class="py-line">    <tt class="py-string">'.wp4'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.wordperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L647"></a><tt class="py-lineno">647</tt>  <tt class="py-line">    <tt class="py-string">'.wp5'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.wordperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L648"></a><tt class="py-lineno">648</tt>  <tt class="py-line">    <tt class="py-string">'.wp6'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.wordperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L649"></a><tt class="py-lineno">649</tt>  <tt class="py-line">    <tt class="py-string">'.wpd'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.wordperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L650"></a><tt class="py-lineno">650</tt>  <tt class="py-line">    <tt class="py-string">'.wpg'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-wpg'</tt><tt class="py-op">,</tt> </tt>
<a name="L651"></a><tt class="py-lineno">651</tt>  <tt class="py-line">    <tt class="py-string">'.wpl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-wpl'</tt><tt class="py-op">,</tt> </tt>
<a name="L652"></a><tt class="py-lineno">652</tt>  <tt class="py-line">    <tt class="py-string">'.wpp'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.wordperfect'</tt><tt class="py-op">,</tt> </tt>
<a name="L653"></a><tt class="py-lineno">653</tt>  <tt class="py-line">    <tt class="py-string">'.wps'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-works'</tt><tt class="py-op">,</tt> </tt>
<a name="L654"></a><tt class="py-lineno">654</tt>  <tt class="py-line">    <tt class="py-string">'.wri'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-mswrite'</tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno">655</tt>  <tt class="py-line">    <tt class="py-string">'.wrl'</tt><tt class="py-op">:</tt> <tt class="py-string">'model/vrml'</tt><tt class="py-op">,</tt> </tt>
<a name="L656"></a><tt class="py-lineno">656</tt>  <tt class="py-line">    <tt class="py-string">'.wv'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-wavpack'</tt><tt class="py-op">,</tt> </tt>
<a name="L657"></a><tt class="py-lineno">657</tt>  <tt class="py-line">    <tt class="py-string">'.wvc'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-wavpack-correction'</tt><tt class="py-op">,</tt> </tt>
<a name="L658"></a><tt class="py-lineno">658</tt>  <tt class="py-line">    <tt class="py-string">'.wvp'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-wavpack'</tt><tt class="py-op">,</tt> </tt>
<a name="L659"></a><tt class="py-lineno">659</tt>  <tt class="py-line">    <tt class="py-string">'.wvx'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-ms-asx'</tt><tt class="py-op">,</tt> </tt>
<a name="L660"></a><tt class="py-lineno">660</tt>  <tt class="py-line">    <tt class="py-string">'.x3f'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-sigma-x3f'</tt><tt class="py-op">,</tt> </tt>
<a name="L661"></a><tt class="py-lineno">661</tt>  <tt class="py-line">    <tt class="py-string">'.xac'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-gnucash'</tt><tt class="py-op">,</tt> </tt>
<a name="L662"></a><tt class="py-lineno">662</tt>  <tt class="py-line">    <tt class="py-string">'.xbel'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-xbel'</tt><tt class="py-op">,</tt> </tt>
<a name="L663"></a><tt class="py-lineno">663</tt>  <tt class="py-line">    <tt class="py-string">'.xbl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L664"></a><tt class="py-lineno">664</tt>  <tt class="py-line">    <tt class="py-string">'.xbm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-xbitmap'</tt><tt class="py-op">,</tt> </tt>
<a name="L665"></a><tt class="py-lineno">665</tt>  <tt class="py-line">    <tt class="py-string">'.xcf'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-xcf'</tt><tt class="py-op">,</tt> </tt>
<a name="L666"></a><tt class="py-lineno">666</tt>  <tt class="py-line">    <tt class="py-string">'.xcf.bz2'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-compressed-xcf'</tt><tt class="py-op">,</tt> </tt>
<a name="L667"></a><tt class="py-lineno">667</tt>  <tt class="py-line">    <tt class="py-string">'.xcf.gz'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-compressed-xcf'</tt><tt class="py-op">,</tt> </tt>
<a name="L668"></a><tt class="py-lineno">668</tt>  <tt class="py-line">    <tt class="py-string">'.xhtml'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xhtml+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L669"></a><tt class="py-lineno">669</tt>  <tt class="py-line">    <tt class="py-string">'.xi'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-xi'</tt><tt class="py-op">,</tt> </tt>
<a name="L670"></a><tt class="py-lineno">670</tt>  <tt class="py-line">    <tt class="py-string">'.xla'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L671"></a><tt class="py-lineno">671</tt>  <tt class="py-line">    <tt class="py-string">'.xlc'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L672"></a><tt class="py-lineno">672</tt>  <tt class="py-line">    <tt class="py-string">'.xld'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L673"></a><tt class="py-lineno">673</tt>  <tt class="py-line">    <tt class="py-string">'.xlf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-xliff'</tt><tt class="py-op">,</tt> </tt>
<a name="L674"></a><tt class="py-lineno">674</tt>  <tt class="py-line">    <tt class="py-string">'.xliff'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-xliff'</tt><tt class="py-op">,</tt> </tt>
<a name="L675"></a><tt class="py-lineno">675</tt>  <tt class="py-line">    <tt class="py-string">'.xll'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L676"></a><tt class="py-lineno">676</tt>  <tt class="py-line">    <tt class="py-string">'.xlm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L677"></a><tt class="py-lineno">677</tt>  <tt class="py-line">    <tt class="py-string">'.xls'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L678"></a><tt class="py-lineno">678</tt>  <tt class="py-line">    <tt class="py-string">'.xlsm'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'</tt><tt class="py-op">,</tt> </tt>
<a name="L679"></a><tt class="py-lineno">679</tt>  <tt class="py-line">    <tt class="py-string">'.xlsx'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'</tt><tt class="py-op">,</tt> </tt>
<a name="L680"></a><tt class="py-lineno">680</tt>  <tt class="py-line">    <tt class="py-string">'.xlt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno">681</tt>  <tt class="py-line">    <tt class="py-string">'.xlw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-excel'</tt><tt class="py-op">,</tt> </tt>
<a name="L682"></a><tt class="py-lineno">682</tt>  <tt class="py-line">    <tt class="py-string">'.xm'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-xm'</tt><tt class="py-op">,</tt> </tt>
<a name="L683"></a><tt class="py-lineno">683</tt>  <tt class="py-line">    <tt class="py-string">'.xmf'</tt><tt class="py-op">:</tt> <tt class="py-string">'audio/x-xmf'</tt><tt class="py-op">,</tt> </tt>
<a name="L684"></a><tt class="py-lineno">684</tt>  <tt class="py-line">    <tt class="py-string">'.xmi'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-xmi'</tt><tt class="py-op">,</tt> </tt>
<a name="L685"></a><tt class="py-lineno">685</tt>  <tt class="py-line">    <tt class="py-string">'.xml'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L686"></a><tt class="py-lineno">686</tt>  <tt class="py-line">    <tt class="py-string">'.xpm'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-xpixmap'</tt><tt class="py-op">,</tt> </tt>
<a name="L687"></a><tt class="py-lineno">687</tt>  <tt class="py-line">    <tt class="py-string">'.xps'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.ms-xpsdocument'</tt><tt class="py-op">,</tt> </tt>
<a name="L688"></a><tt class="py-lineno">688</tt>  <tt class="py-line">    <tt class="py-string">'.xsl'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L689"></a><tt class="py-lineno">689</tt>  <tt class="py-line">    <tt class="py-string">'.xslfo'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/x-xslfo'</tt><tt class="py-op">,</tt> </tt>
<a name="L690"></a><tt class="py-lineno">690</tt>  <tt class="py-line">    <tt class="py-string">'.xslt'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L691"></a><tt class="py-lineno">691</tt>  <tt class="py-line">    <tt class="py-string">'.xspf'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/xspf+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L692"></a><tt class="py-lineno">692</tt>  <tt class="py-line">    <tt class="py-string">'.xul'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/vnd.mozilla.xul+xml'</tt><tt class="py-op">,</tt> </tt>
<a name="L693"></a><tt class="py-lineno">693</tt>  <tt class="py-line">    <tt class="py-string">'.xwd'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/x-xwindowdump'</tt><tt class="py-op">,</tt> </tt>
<a name="L694"></a><tt class="py-lineno">694</tt>  <tt class="py-line">    <tt class="py-string">'.xyz'</tt><tt class="py-op">:</tt> <tt class="py-string">'chemical/x-pdb'</tt><tt class="py-op">,</tt> </tt>
<a name="L695"></a><tt class="py-lineno">695</tt>  <tt class="py-line">    <tt class="py-string">'.xz'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-xz'</tt><tt class="py-op">,</tt> </tt>
<a name="L696"></a><tt class="py-lineno">696</tt>  <tt class="py-line">    <tt class="py-string">'.w2p'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/w2p'</tt><tt class="py-op">,</tt> </tt>
<a name="L697"></a><tt class="py-lineno">697</tt>  <tt class="py-line">    <tt class="py-string">'.z'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-compress'</tt><tt class="py-op">,</tt> </tt>
<a name="L698"></a><tt class="py-lineno">698</tt>  <tt class="py-line">    <tt class="py-string">'.zabw'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-abiword'</tt><tt class="py-op">,</tt> </tt>
<a name="L699"></a><tt class="py-lineno">699</tt>  <tt class="py-line">    <tt class="py-string">'.zip'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/zip'</tt><tt class="py-op">,</tt> </tt>
<a name="L700"></a><tt class="py-lineno">700</tt>  <tt class="py-line">    <tt class="py-string">'.zoo'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-zoo'</tt><tt class="py-op">,</tt> </tt>
<a name="L701"></a><tt class="py-lineno">701</tt>  <tt class="py-line">    <tt class="py-op">}</tt> </tt>
<a name="L702"></a><tt class="py-lineno">702</tt>  <tt class="py-line"> </tt>
<a name="L703"></a><tt class="py-lineno">703</tt>  <tt class="py-line"> </tt>
<a name="contenttype"></a><div id="contenttype-def"><a name="L704"></a><tt class="py-lineno">704</tt> <a class="py-toggle" href="#" id="contenttype-toggle" onclick="return toggle('contenttype');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contenttype-module.html#contenttype">contenttype</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">default</tt><tt class="py-op">=</tt><tt class="py-string">'text/plain'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="contenttype-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="contenttype-expanded"><a name="L705"></a><tt class="py-lineno">705</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L706"></a><tt class="py-lineno">706</tt>  <tt class="py-line"><tt class="py-docstring">    Returns the Content-Type string matching extension of the given filename.</tt> </tt>
<a name="L707"></a><tt class="py-lineno">707</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L708"></a><tt class="py-lineno">708</tt>  <tt class="py-line"> </tt>
<a name="L709"></a><tt class="py-lineno">709</tt>  <tt class="py-line">    <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">.</tt><tt class="py-name">rfind</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L710"></a><tt class="py-lineno">710</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">&gt;=</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L711"></a><tt class="py-lineno">711</tt>  <tt class="py-line">        <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name"><a title="web2py.gluon.contenttype.CONTENT_TYPE" class="py-name" href="#" onclick="return doclink('link-1', 'CONTENT_TYPE', 'link-0');">CONTENT_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-2', 'get', 'link-2');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-3', 'lower', 'link-3');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L712"></a><tt class="py-lineno">712</tt>  <tt class="py-line">        <tt class="py-name">j</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">.</tt><tt class="py-name">rfind</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
<a name="L713"></a><tt class="py-lineno">713</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">j</tt><tt class="py-op">&gt;=</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L714"></a><tt class="py-lineno">714</tt>  <tt class="py-line">            <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name"><a title="web2py.gluon.contenttype.CONTENT_TYPE" class="py-name" href="#" onclick="return doclink('link-4', 'CONTENT_TYPE', 'link-0');">CONTENT_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-5', 'get', 'link-2');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-name">j</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-6', 'lower', 'link-3');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L715"></a><tt class="py-lineno">715</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">default</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-7', 'startswith', 'link-7');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'text/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L716"></a><tt class="py-lineno">716</tt>  <tt class="py-line">        <tt class="py-name">default</tt> <tt class="py-op">+=</tt> <tt class="py-string">'; charset=utf-8'</tt> </tt>
<a name="L717"></a><tt class="py-lineno">717</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">default</tt> </tt>
</div><a name="L718"></a><tt class="py-lineno">718</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql-module.html version [41a3a21ee7].




























































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        Package&nbsp;pymysql
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package pymysql</h1><span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>PyMySQL: A pure-Python drop-in replacement for MySQLdb.</p>
  <p>Copyright (c) 2010 PyMySQL contributors</p>
  <p>Permission is hereby granted, free of charge, to any person obtaining 
  a copy of this software and associated documentation files (the 
  &quot;Software&quot;), 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:</p>
  <p>The above copyright notice and this permission notice shall be 
  included in all copies or substantial portions of the Software.</p>
  THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.<br /><br />

<hr />
<div class="fields">      <p><strong>Version:</strong>
        0.4.None
      </p>
</div><!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Submodules</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Submodules"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants-module.html">web2py.gluon.contrib.pymysql.constants</a></strong>
    <ul>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a></strong>    </li>
    </ul>
    </li>
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.converters-module.html">web2py.gluon.contrib.pymysql.converters</a></strong>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html" class="summary-name">DBAPISet</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.DataError-class.html" class="summary-name">DataError</a><br />
      Exception raised for errors that are due to problems with the 
        processed data like division by zero, numeric value out of range, 
        etc.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html" class="summary-name">DatabaseError</a><br />
      Exception raised for errors that are related to the 
        database.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="datetime.date-class.html" class="summary-name">Date</a><br />
      date(year, month, day) --&gt; date object
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.Error-class.html" class="summary-name">Error</a><br />
      Exception that is the base class of all other error exceptions 
        (not Warning).
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html" class="summary-name">IntegrityError</a><br />
      Exception raised when the relational integrity of the database 
        is affected, e.g.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html" class="summary-name">InterfaceError</a><br />
      Exception raised for errors that are related to the database 
        interface rather than the database itself.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.InternalError-class.html" class="summary-name">InternalError</a><br />
      Exception raised when the database encounters an internal error,
        e.g.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html" class="summary-name">NotSupportedError</a><br />
      Exception raised in case a method or database API was used which
        is not supported by the database, e.g.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html" class="summary-name">OperationalError</a><br />
      Exception raised for errors that are related to the database's 
        operation and not necessarily under the control of the programmer, 
        e.g.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html" class="summary-name">ProgrammingError</a><br />
      Exception raised for programming errors, e.g.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="datetime.time-class.html" class="summary-name">Time</a><br />
      time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --&gt;
        a time object
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="datetime.datetime-class.html" class="summary-name">Timestamp</a><br />
      datetime(year, month, day[, hour[, minute[, second[, 
        microsecond[,tzinfo]]]]])
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.err.Warning-class.html" class="summary-name">Warning</a><br />
      Exception raised for important warnings like data truncations 
        while inserting, etc.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Binary"></a><span class="summary-sig-name">Binary</span>(<span class="summary-sig-arg">x</span>)</span><br />
      Return x as a binary type.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#Binary">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Connect"></a><span class="summary-sig-name">Connect</span>(<span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Connect to the database; see connections.Connection.__init__() for
      more information.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#Connect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Connection"></a><span class="summary-sig-name">Connection</span>(<span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Connect to the database; see connections.Connection.__init__() for
      more information.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#Connect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="DateFromTicks"></a><span class="summary-sig-name">DateFromTicks</span>(<span class="summary-sig-arg">ticks</span>)</span></td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="TimeFromTicks"></a><span class="summary-sig-name">TimeFromTicks</span>(<span class="summary-sig-arg">ticks</span>)</span></td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="TimestampFromTicks"></a><span class="summary-sig-name">TimestampFromTicks</span>(<span class="summary-sig-arg">ticks</span>)</span></td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="connect"></a><span class="summary-sig-name">connect</span>(<span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Connect to the database; see connections.Connection.__init__() for
      more information.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#Connect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_dict"></a><span class="summary-sig-name">escape_dict</span>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">charset</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_sequence"></a><span class="summary-sig-name">escape_sequence</span>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">charset</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_sequence">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_string"></a><span class="summary-sig-name">escape_string</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_client_info"></a><span class="summary-sig-name">get_client_info</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#get_client_info">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="install_as_MySQLdb"></a><span class="summary-sig-name">install_as_MySQLdb</span>()</span><br />
      After this function is called, any application that imports 
      MySQLdb or _mysql will unwittingly actually use</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#install_as_MySQLdb">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="thread_safe"></a><span class="summary-sig-name">thread_safe</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#thread_safe">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BINARY"></a><span class="summary-name">BINARY</span> = <code title="DBAPISet([249, 250, 251, 252])">DBAPISet([249, 250, 251, 252])</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DATE"></a><span class="summary-name">DATE</span> = <code title="DBAPISet([10, 14])">DBAPISet([10, 14])</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DATETIME"></a><span class="summary-name">DATETIME</span> = <code title="DBAPISet([12, 7])">DBAPISet([12, 7])</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NULL"></a><span class="summary-name">NULL</span> = <code title="'NULL'"><code class="variable-quote">'</code><code class="variable-string">NULL</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NUMBER"></a><span class="summary-name">NUMBER</span> = <code title="DBAPISet([0, 1, 3, 4, 5, 8, 9, 13])">DBAPISet([0, 1, 3, 4, 5, 8, 9, 13])</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ROWID"></a><span class="summary-name">ROWID</span> = <code title="DBAPISet([])">DBAPISet([])</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="STRING"></a><span class="summary-name">STRING</span> = <code title="DBAPISet([253, 254, 247])">DBAPISet([253, 254, 247])</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TIME"></a><span class="summary-name">TIME</span> = <code title="DBAPISet([11])">DBAPISet([11])</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TIMESTAMP"></a><span class="summary-name">TIMESTAMP</span> = <code title="DBAPISet([12, 7])">DBAPISet([12, 7])</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VERSION"></a><span class="summary-name">VERSION</span> = <code title="(0, 4, None)"><code class="variable-group">(</code>0<code class="variable-op">, </code>4<code class="variable-op">, </code>None<code class="variable-group">)</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="apilevel"></a><span class="summary-name">apilevel</span> = <code title="'2.0'"><code class="variable-quote">'</code><code class="variable-string">2.0</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="paramstyle"></a><span class="summary-name">paramstyle</span> = <code title="'format'"><code class="variable-quote">'</code><code class="variable-string">format</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="threadsafety"></a><span class="summary-name">threadsafety</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="version_info"></a><span class="summary-name">version_info</span> = <code title="(1, 2, 2, 'final', 0)"><code class="variable-group">(</code>1<code class="variable-op">, </code>2<code class="variable-op">, </code>2<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">final</code><code class="variable-quote">'</code><code class="variable-op">, </code>0<code class="variable-group">)</code></code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql-pysrc.html version [18b8580005].















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        Package&nbsp;pymysql
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.contrib.pymysql-module.html">Package web2py.gluon.contrib.pymysql</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-docstring">PyMySQL: A pure-Python drop-in replacement for MySQLdb.</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">Copyright (c) 2010 PyMySQL contributors</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Permission is hereby granted, free of charge, to any person obtaining a copy</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">of this software and associated documentation files (the "Software"), to deal</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">in the Software without restriction, including without limitation the rights</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">copies of the Software, and to permit persons to whom the Software is</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">furnished to do so, subject to the following conditions:</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">The above copyright notice and this permission notice shall be included in</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">all copies or substantial portions of the Software.</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring">LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-docstring">OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">THE SOFTWARE.</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.VERSION=web2py.gluon.contrib.pymysql-module.html#VERSION,Variable web2py.gluon.rocket.VERSION=web2py.gluon.rocket-module.html#VERSION"><a title="web2py.gluon.contrib.pymysql.VERSION
web2py.gluon.rocket.VERSION" class="py-name" href="#" onclick="return doclink('link-0', 'VERSION', 'link-0');">VERSION</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Package web2py.gluon.contrib.pymysql.constants=web2py.gluon.contrib.pymysql.constants-module.html"><a title="web2py.gluon.contrib.pymysql.constants" class="py-name" href="#" onclick="return doclink('link-1', 'constants', 'link-1');">constants</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.contrib.pymysql.constants.FIELD_TYPE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-2', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Variable sqlite3.dbapi2.converters=sqlite3.dbapi2-module.html#converters,Module web2py.gluon.contrib.pymysql.converters=web2py.gluon.contrib.pymysql.converters-module.html"><a title="sqlite3.dbapi2.converters
web2py.gluon.contrib.pymysql.converters" class="py-name" href="#" onclick="return doclink('link-3', 'converters', 'link-3');">converters</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_dict()=web2py.gluon.contrib.pymysql.converters-module.html#escape_dict"><a title="web2py.gluon.contrib.pymysql.converters.escape_dict" class="py-name" href="#" onclick="return doclink('link-4', 'escape_dict', 'link-4');">escape_dict</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_sequence()=web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence"><a title="web2py.gluon.contrib.pymysql.converters.escape_sequence" class="py-name" href="#" onclick="return doclink('link-5', 'escape_sequence', 'link-5');">escape_sequence</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_string()=web2py.gluon.contrib.pymysql.converters-module.html#escape_string"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-6', 'escape_string', 'link-6');">escape_string</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">err</tt> <tt class="py-keyword">import</tt> <tt id="link-7" class="py-name" targets="Class psycopg2.Warning=psycopg2.Warning-class.html,Class web2py.gluon.contrib.pymysql.err.Warning=web2py.gluon.contrib.pymysql.err.Warning-class.html"><a title="psycopg2.Warning
web2py.gluon.contrib.pymysql.err.Warning" class="py-name" href="#" onclick="return doclink('link-7', 'Warning', 'link-7');">Warning</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class psycopg2.Error=psycopg2.Error-class.html,Class web2py.gluon.contrib.pymysql.err.Error=web2py.gluon.contrib.pymysql.err.Error-class.html"><a title="psycopg2.Error
web2py.gluon.contrib.pymysql.err.Error" class="py-name" href="#" onclick="return doclink('link-8', 'Error', 'link-8');">Error</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Class psycopg2.InterfaceError=psycopg2.InterfaceError-class.html,Class web2py.gluon.contrib.pymysql.err.InterfaceError=web2py.gluon.contrib.pymysql.err.InterfaceError-class.html"><a title="psycopg2.InterfaceError
web2py.gluon.contrib.pymysql.err.InterfaceError" class="py-name" href="#" onclick="return doclink('link-9', 'InterfaceError', 'link-9');">InterfaceError</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Class psycopg2.DataError=psycopg2.DataError-class.html,Class web2py.gluon.contrib.pymysql.err.DataError=web2py.gluon.contrib.pymysql.err.DataError-class.html"><a title="psycopg2.DataError
web2py.gluon.contrib.pymysql.err.DataError" class="py-name" href="#" onclick="return doclink('link-10', 'DataError', 'link-10');">DataError</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">     <tt id="link-11" class="py-name" targets="Class psycopg2.DatabaseError=psycopg2.DatabaseError-class.html,Class web2py.gluon.contrib.pymysql.err.DatabaseError=web2py.gluon.contrib.pymysql.err.DatabaseError-class.html"><a title="psycopg2.DatabaseError
web2py.gluon.contrib.pymysql.err.DatabaseError" class="py-name" href="#" onclick="return doclink('link-11', 'DatabaseError', 'link-11');">DatabaseError</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Class psycopg2.OperationalError=psycopg2.OperationalError-class.html,Class web2py.gluon.contrib.pymysql.err.OperationalError=web2py.gluon.contrib.pymysql.err.OperationalError-class.html"><a title="psycopg2.OperationalError
web2py.gluon.contrib.pymysql.err.OperationalError" class="py-name" href="#" onclick="return doclink('link-12', 'OperationalError', 'link-12');">OperationalError</a></tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name" targets="Class psycopg2.IntegrityError=psycopg2.IntegrityError-class.html,Class web2py.gluon.contrib.pymysql.err.IntegrityError=web2py.gluon.contrib.pymysql.err.IntegrityError-class.html"><a title="psycopg2.IntegrityError
web2py.gluon.contrib.pymysql.err.IntegrityError" class="py-name" href="#" onclick="return doclink('link-13', 'IntegrityError', 'link-13');">IntegrityError</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class psycopg2.InternalError=psycopg2.InternalError-class.html,Class web2py.gluon.contrib.pymysql.err.InternalError=web2py.gluon.contrib.pymysql.err.InternalError-class.html"><a title="psycopg2.InternalError
web2py.gluon.contrib.pymysql.err.InternalError" class="py-name" href="#" onclick="return doclink('link-14', 'InternalError', 'link-14');">InternalError</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">     <tt id="link-15" class="py-name" targets="Class psycopg2.NotSupportedError=psycopg2.NotSupportedError-class.html,Class web2py.gluon.contrib.pymysql.err.NotSupportedError=web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html"><a title="psycopg2.NotSupportedError
web2py.gluon.contrib.pymysql.err.NotSupportedError" class="py-name" href="#" onclick="return doclink('link-15', 'NotSupportedError', 'link-15');">NotSupportedError</a></tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name" targets="Class psycopg2.ProgrammingError=psycopg2.ProgrammingError-class.html,Class web2py.gluon.contrib.pymysql.err.ProgrammingError=web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html"><a title="psycopg2.ProgrammingError
web2py.gluon.contrib.pymysql.err.ProgrammingError" class="py-name" href="#" onclick="return doclink('link-16', 'ProgrammingError', 'link-16');">ProgrammingError</a></tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">times</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Date</tt><tt class="py-op">,</tt> <tt class="py-name">Time</tt><tt class="py-op">,</tt> <tt class="py-name">Timestamp</tt><tt class="py-op">,</tt> \ </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-name">DateFromTicks</tt><tt class="py-op">,</tt> <tt class="py-name">TimeFromTicks</tt><tt class="py-op">,</tt> <tt class="py-name">TimestampFromTicks</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-name">frozenset</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ImmutableSet</tt> <tt class="py-keyword">as</tt> <tt class="py-name">frozenset</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt class="py-name">BaseSet</tt> <tt class="py-keyword">as</tt> <tt class="py-name">set</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt id="link-17" class="py-name" targets="Class web2py.gluon.dal.Set=web2py.gluon.dal.Set-class.html"><a title="web2py.gluon.dal.Set" class="py-name" href="#" onclick="return doclink('link-17', 'Set', 'link-17');">Set</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">set</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable psycopg2.threadsafety=psycopg2-module.html#threadsafety,Variable sqlite3.dbapi2.threadsafety=sqlite3.dbapi2-module.html#threadsafety,Variable web2py.gluon.contrib.pymysql.threadsafety=web2py.gluon.contrib.pymysql-module.html#threadsafety"><a title="psycopg2.threadsafety
sqlite3.dbapi2.threadsafety
web2py.gluon.contrib.pymysql.threadsafety" class="py-name" href="#" onclick="return doclink('link-18', 'threadsafety', 'link-18');">threadsafety</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt id="link-19" class="py-name" targets="Variable psycopg2.apilevel=psycopg2-module.html#apilevel,Variable sqlite3.dbapi2.apilevel=sqlite3.dbapi2-module.html#apilevel,Variable web2py.gluon.contrib.pymysql.apilevel=web2py.gluon.contrib.pymysql-module.html#apilevel"><a title="psycopg2.apilevel
sqlite3.dbapi2.apilevel
web2py.gluon.contrib.pymysql.apilevel" class="py-name" href="#" onclick="return doclink('link-19', 'apilevel', 'link-19');">apilevel</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"2.0"</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt id="link-20" class="py-name" targets="Variable psycopg2.paramstyle=psycopg2-module.html#paramstyle,Variable sqlite3.dbapi2.paramstyle=sqlite3.dbapi2-module.html#paramstyle,Variable web2py.gluon.contrib.pymysql.paramstyle=web2py.gluon.contrib.pymysql-module.html#paramstyle"><a title="psycopg2.paramstyle
sqlite3.dbapi2.paramstyle
web2py.gluon.contrib.pymysql.paramstyle" class="py-name" href="#" onclick="return doclink('link-20', 'paramstyle', 'link-20');">paramstyle</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"format"</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"> </tt>
<a name="DBAPISet"></a><div id="DBAPISet-def"><a name="L51"></a><tt class="py-lineno"> 51</tt> <a class="py-toggle" href="#" id="DBAPISet-toggle" onclick="return toggle('DBAPISet');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.DBAPISet-class.html">DBAPISet</a><tt class="py-op">(</tt><tt class="py-base-class">frozenset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DBAPISet-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="DBAPISet-expanded"><a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"> </tt>
<a name="DBAPISet.__ne__"></a><div id="DBAPISet.__ne__-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="DBAPISet.__ne__-toggle" onclick="return toggle('DBAPISet.__ne__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__ne__">__ne__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DBAPISet.__ne__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DBAPISet.__ne__-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">set</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-21" class="py-name" targets="Class web2py.gluon.contrib.pymysql.DBAPISet=web2py.gluon.contrib.pymysql.DBAPISet-class.html"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-21', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method web2py.gluon.contrib.pymysql.DBAPISet.__ne__()=web2py.gluon.contrib.pymysql.DBAPISet-class.html#__ne__,Method web2py.gluon.dal.Expression.__ne__()=web2py.gluon.dal.Expression-class.html#__ne__,Method web2py.gluon.dal.Row.__ne__()=web2py.gluon.dal.Row-class.html#__ne__,Method web2py.gluon.languages.lazyT.__ne__()=web2py.gluon.languages.lazyT-class.html#__ne__"><a title="web2py.gluon.contrib.pymysql.DBAPISet.__ne__
web2py.gluon.dal.Expression.__ne__
web2py.gluon.dal.Row.__ne__
web2py.gluon.languages.lazyT.__ne__" class="py-name" href="#" onclick="return doclink('link-22', '__ne__', 'link-22');">__ne__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">other</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"> </tt>
<a name="DBAPISet.__eq__"></a><div id="DBAPISet.__eq__-def"><a name="L60"></a><tt class="py-lineno"> 60</tt> <a class="py-toggle" href="#" id="DBAPISet.__eq__-toggle" onclick="return toggle('DBAPISet.__eq__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__eq__">__eq__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DBAPISet.__eq__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DBAPISet.__eq__-expanded"><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">frozenset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">frozenset</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Method web2py.gluon.contrib.pymysql.DBAPISet.__eq__()=web2py.gluon.contrib.pymysql.DBAPISet-class.html#__eq__,Method web2py.gluon.dal.Expression.__eq__()=web2py.gluon.dal.Expression-class.html#__eq__,Method web2py.gluon.dal.Row.__eq__()=web2py.gluon.dal.Row-class.html#__eq__,Method web2py.gluon.languages.lazyT.__eq__()=web2py.gluon.languages.lazyT-class.html#__eq__"><a title="web2py.gluon.contrib.pymysql.DBAPISet.__eq__
web2py.gluon.dal.Expression.__eq__
web2py.gluon.dal.Row.__eq__
web2py.gluon.languages.lazyT.__eq__" class="py-name" href="#" onclick="return doclink('link-23', '__eq__', 'link-23');">__eq__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">other</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="DBAPISet.__hash__"></a><div id="DBAPISet.__hash__-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="DBAPISet.__hash__-toggle" onclick="return toggle('DBAPISet.__hash__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__hash__">__hash__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DBAPISet.__hash__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DBAPISet.__hash__-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">frozenset</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Method web2py.gluon.contrib.pymysql.DBAPISet.__hash__()=web2py.gluon.contrib.pymysql.DBAPISet-class.html#__hash__,Method web2py.gluon.html.XML.__hash__()=web2py.gluon.html.XML-class.html#__hash__,Method web2py.gluon.languages.lazyT.__hash__()=web2py.gluon.languages.lazyT-class.html#__hash__"><a title="web2py.gluon.contrib.pymysql.DBAPISet.__hash__
web2py.gluon.html.XML.__hash__
web2py.gluon.languages.lazyT.__hash__" class="py-name" href="#" onclick="return doclink('link-24', '__hash__', 'link-24');">__hash__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt id="link-25" class="py-name" targets="Variable psycopg2.STRING=psycopg2-module.html#STRING,Variable web2py.gluon.contrib.pymysql.STRING=web2py.gluon.contrib.pymysql-module.html#STRING,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING"><a title="psycopg2.STRING
web2py.gluon.contrib.pymysql.STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING" class="py-name" href="#" onclick="return doclink('link-25', 'STRING', 'link-25');">STRING</a></tt>    <tt class="py-op">=</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-26', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-27', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#ENUM"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM" class="py-name" href="#" onclick="return doclink('link-28', 'ENUM', 'link-28');">ENUM</a></tt><tt class="py-op">,</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-29', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="psycopg2.STRING
web2py.gluon.contrib.pymysql.STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING" class="py-name" href="#" onclick="return doclink('link-30', 'STRING', 'link-25');">STRING</a></tt><tt class="py-op">,</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">                     <tt id="link-31" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-31', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING" class="py-name" href="#" onclick="return doclink('link-32', 'VAR_STRING', 'link-32');">VAR_STRING</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt id="link-33" class="py-name" targets="Variable psycopg2.BINARY=psycopg2-module.html#BINARY,Variable web2py.gluon.contrib.pymysql.BINARY=web2py.gluon.contrib.pymysql-module.html#BINARY"><a title="psycopg2.BINARY
web2py.gluon.contrib.pymysql.BINARY" class="py-name" href="#" onclick="return doclink('link-33', 'BINARY', 'link-33');">BINARY</a></tt>    <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-34', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-35', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB" class="py-name" href="#" onclick="return doclink('link-36', 'BLOB', 'link-36');">BLOB</a></tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-37', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB" class="py-name" href="#" onclick="return doclink('link-38', 'LONG_BLOB', 'link-38');">LONG_BLOB</a></tt><tt class="py-op">,</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">                     <tt id="link-39" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-39', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB" class="py-name" href="#" onclick="return doclink('link-40', 'MEDIUM_BLOB', 'link-40');">MEDIUM_BLOB</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-41', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB" class="py-name" href="#" onclick="return doclink('link-42', 'TINY_BLOB', 'link-42');">TINY_BLOB</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt id="link-43" class="py-name" targets="Variable psycopg2.NUMBER=psycopg2-module.html#NUMBER,Variable web2py.gluon.contrib.pymysql.NUMBER=web2py.gluon.contrib.pymysql-module.html#NUMBER"><a title="psycopg2.NUMBER
web2py.gluon.contrib.pymysql.NUMBER" class="py-name" href="#" onclick="return doclink('link-43', 'NUMBER', 'link-43');">NUMBER</a></tt>    <tt class="py-op">=</tt> <tt id="link-44" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-44', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-45', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL" class="py-name" href="#" onclick="return doclink('link-46', 'DECIMAL', 'link-46');">DECIMAL</a></tt><tt class="py-op">,</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-47', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-48" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE" class="py-name" href="#" onclick="return doclink('link-48', 'DOUBLE', 'link-48');">DOUBLE</a></tt><tt class="py-op">,</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-49', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT" class="py-name" href="#" onclick="return doclink('link-50', 'FLOAT', 'link-50');">FLOAT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">                     <tt id="link-51" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-51', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-52" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24" class="py-name" href="#" onclick="return doclink('link-52', 'INT24', 'link-52');">INT24</a></tt><tt class="py-op">,</tt> <tt id="link-53" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-53', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG" class="py-name" href="#" onclick="return doclink('link-54', 'LONG', 'link-54');">LONG</a></tt><tt class="py-op">,</tt> <tt id="link-55" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-55', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG" class="py-name" href="#" onclick="return doclink('link-56', 'LONGLONG', 'link-56');">LONGLONG</a></tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">                     <tt id="link-57" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-57', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY" class="py-name" href="#" onclick="return doclink('link-58', 'TINY', 'link-58');">TINY</a></tt><tt class="py-op">,</tt> <tt id="link-59" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-59', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-60" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR" class="py-name" href="#" onclick="return doclink('link-60', 'YEAR', 'link-60');">YEAR</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt id="link-61" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.DATE=web2py.gluon.contrib.pymysql-module.html#DATE,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE"><a title="web2py.gluon.contrib.pymysql.DATE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE" class="py-name" href="#" onclick="return doclink('link-61', 'DATE', 'link-61');">DATE</a></tt>      <tt class="py-op">=</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-62', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-63', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="web2py.gluon.contrib.pymysql.DATE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE" class="py-name" href="#" onclick="return doclink('link-64', 'DATE', 'link-61');">DATE</a></tt><tt class="py-op">,</tt> <tt id="link-65" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-65', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDATE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDATE"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDATE" class="py-name" href="#" onclick="return doclink('link-66', 'NEWDATE', 'link-66');">NEWDATE</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt id="link-67" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.TIME=web2py.gluon.contrib.pymysql-module.html#TIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME"><a title="web2py.gluon.contrib.pymysql.TIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME" class="py-name" href="#" onclick="return doclink('link-67', 'TIME', 'link-67');">TIME</a></tt>      <tt class="py-op">=</tt> <tt id="link-68" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-68', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-69', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.contrib.pymysql.TIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME" class="py-name" href="#" onclick="return doclink('link-70', 'TIME', 'link-67');">TIME</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt id="link-71" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.TIMESTAMP=web2py.gluon.contrib.pymysql-module.html#TIMESTAMP,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP"><a title="web2py.gluon.contrib.pymysql.TIMESTAMP
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP" class="py-name" href="#" onclick="return doclink('link-71', 'TIMESTAMP', 'link-71');">TIMESTAMP</a></tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-72', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-73', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.contrib.pymysql.TIMESTAMP
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP" class="py-name" href="#" onclick="return doclink('link-74', 'TIMESTAMP', 'link-71');">TIMESTAMP</a></tt><tt class="py-op">,</tt> <tt id="link-75" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-75', 'FIELD_TYPE', 'link-2');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-76" class="py-name" targets="Variable psycopg2.DATETIME=psycopg2-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.DATETIME=web2py.gluon.contrib.pymysql-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME"><a title="psycopg2.DATETIME
web2py.gluon.contrib.pymysql.DATETIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME" class="py-name" href="#" onclick="return doclink('link-76', 'DATETIME', 'link-76');">DATETIME</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt id="link-77" class="py-name"><a title="psycopg2.DATETIME
web2py.gluon.contrib.pymysql.DATETIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME" class="py-name" href="#" onclick="return doclink('link-77', 'DATETIME', 'link-76');">DATETIME</a></tt>  <tt class="py-op">=</tt> <tt id="link-78" class="py-name"><a title="web2py.gluon.contrib.pymysql.TIMESTAMP
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP" class="py-name" href="#" onclick="return doclink('link-78', 'TIMESTAMP', 'link-71');">TIMESTAMP</a></tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt id="link-79" class="py-name" targets="Variable psycopg2.ROWID=psycopg2-module.html#ROWID,Variable web2py.gluon.contrib.pymysql.ROWID=web2py.gluon.contrib.pymysql-module.html#ROWID"><a title="psycopg2.ROWID
web2py.gluon.contrib.pymysql.ROWID" class="py-name" href="#" onclick="return doclink('link-79', 'ROWID', 'link-79');">ROWID</a></tt>     <tt class="py-op">=</tt> <tt id="link-80" class="py-name"><a title="web2py.gluon.contrib.pymysql.DBAPISet" class="py-name" href="#" onclick="return doclink('link-80', 'DBAPISet', 'link-21');">DBAPISet</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"> </tt>
<a name="Binary"></a><div id="Binary-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="Binary-toggle" onclick="return toggle('Binary');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql-module.html#Binary">Binary</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Binary-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Binary-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt class="py-docstring">"""Return x as a binary type."""</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-81" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-81', 'x', 'link-81');">x</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"> </tt>
<a name="Connect"></a><div id="Connect-def"><a name="L87"></a><tt class="py-lineno"> 87</tt> <a class="py-toggle" href="#" id="Connect-toggle" onclick="return toggle('Connect');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql-module.html#Connect">Connect</a><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Connect-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Connect-expanded"><a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">    Connect to the database; see connections.Connection.__init__() for</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">    more information.</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">connections</tt> <tt class="py-keyword">import</tt> <tt id="link-82" class="py-name" targets="Class web2py.gluon.rocket.Connection=web2py.gluon.rocket.Connection-class.html"><a title="web2py.gluon.rocket.Connection" class="py-name" href="#" onclick="return doclink('link-82', 'Connection', 'link-82');">Connection</a></tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-83" class="py-name"><a title="web2py.gluon.rocket.Connection" class="py-name" href="#" onclick="return doclink('link-83', 'Connection', 'link-82');">Connection</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="get_client_info"></a><div id="get_client_info-def"><a name="L95"></a><tt class="py-lineno"> 95</tt> <a class="py-toggle" href="#" id="get_client_info-toggle" onclick="return toggle('get_client_info');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql-module.html#get_client_info">get_client_info</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt>  <tt class="py-comment"># for MySQLdb compatibility</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">  <tt class="py-keyword">return</tt> <tt class="py-string">'%s.%s.%s'</tt> <tt class="py-op">%</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.contrib.pymysql.VERSION
web2py.gluon.rocket.VERSION" class="py-name" href="#" onclick="return doclink('link-84', 'VERSION', 'link-0');">VERSION</a></tt> </tt>
</div><a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt id="link-85" class="py-name" targets="Method web2py.gluon.globals.Session.connect()=web2py.gluon.globals.Session-class.html#connect"><a title="web2py.gluon.globals.Session.connect" class="py-name" href="#" onclick="return doclink('link-85', 'connect', 'link-85');">connect</a></tt> <tt class="py-op">=</tt> <tt id="link-86" class="py-name"><a title="web2py.gluon.rocket.Connection" class="py-name" href="#" onclick="return doclink('link-86', 'Connection', 'link-82');">Connection</a></tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name" targets="Function web2py.gluon.contrib.pymysql.Connect()=web2py.gluon.contrib.pymysql-module.html#Connect"><a title="web2py.gluon.contrib.pymysql.Connect" class="py-name" href="#" onclick="return doclink('link-87', 'Connect', 'link-87');">Connect</a></tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-comment"># we include a doctored version_info here for MySQLdb compatibility</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-88" class="py-name" targets="Variable sqlite3.dbapi2.version_info=sqlite3.dbapi2-module.html#version_info,Variable web2py.gluon.contrib.pymysql.version_info=web2py.gluon.contrib.pymysql-module.html#version_info,Variable web2py.gluon.main.version_info=web2py.gluon.main-module.html#version_info"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-88', 'version_info', 'link-88');">version_info</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-number">2</tt><tt class="py-op">,</tt><tt class="py-number">2</tt><tt class="py-op">,</tt><tt class="py-string">"final"</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt id="link-89" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.NULL=web2py.gluon.contrib.pymysql-module.html#NULL,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NULL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NULL"><a title="web2py.gluon.contrib.pymysql.NULL
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NULL" class="py-name" href="#" onclick="return doclink('link-89', 'NULL', 'link-89');">NULL</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"NULL"</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name" targets="Function web2py.gluon.contrib.pymysql.get_client_info()=web2py.gluon.contrib.pymysql-module.html#get_client_info"><a title="web2py.gluon.contrib.pymysql.get_client_info" class="py-name" href="#" onclick="return doclink('link-90', 'get_client_info', 'link-90');">get_client_info</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"> </tt>
<a name="thread_safe"></a><div id="thread_safe-def"><a name="L107"></a><tt class="py-lineno">107</tt> <a class="py-toggle" href="#" id="thread_safe-toggle" onclick="return toggle('thread_safe');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql-module.html#thread_safe">thread_safe</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="thread_safe-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="thread_safe-expanded"><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> <tt class="py-comment"># match MySQLdb.thread_safe()</tt> </tt>
</div><a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt>
<a name="install_as_MySQLdb"></a><div id="install_as_MySQLdb-def"><a name="L110"></a><tt class="py-lineno">110</tt> <a class="py-toggle" href="#" id="install_as_MySQLdb-toggle" onclick="return toggle('install_as_MySQLdb');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql-module.html#install_as_MySQLdb">install_as_MySQLdb</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="install_as_MySQLdb-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="install_as_MySQLdb-expanded"><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-docstring">    After this function is called, any application that imports MySQLdb or</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-docstring">    _mysql will unwittingly actually use </tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">[</tt><tt class="py-string">"MySQLdb"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">[</tt><tt class="py-string">"_mysql"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">[</tt><tt class="py-string">"pymysql"</tt><tt class="py-op">]</tt> </tt>
</div><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-string">'BINARY'</tt><tt class="py-op">,</tt> <tt class="py-string">'Binary'</tt><tt class="py-op">,</tt> <tt class="py-string">'Connect'</tt><tt class="py-op">,</tt> <tt class="py-string">'Connection'</tt><tt class="py-op">,</tt> <tt class="py-string">'DATE'</tt><tt class="py-op">,</tt> <tt class="py-string">'Date'</tt><tt class="py-op">,</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">    <tt class="py-string">'Time'</tt><tt class="py-op">,</tt> <tt class="py-string">'Timestamp'</tt><tt class="py-op">,</tt> <tt class="py-string">'DateFromTicks'</tt><tt class="py-op">,</tt> <tt class="py-string">'TimeFromTicks'</tt><tt class="py-op">,</tt> <tt class="py-string">'TimestampFromTicks'</tt><tt class="py-op">,</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">    <tt class="py-string">'DataError'</tt><tt class="py-op">,</tt> <tt class="py-string">'DatabaseError'</tt><tt class="py-op">,</tt> <tt class="py-string">'Error'</tt><tt class="py-op">,</tt> <tt class="py-string">'FIELD_TYPE'</tt><tt class="py-op">,</tt> <tt class="py-string">'IntegrityError'</tt><tt class="py-op">,</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-string">'InterfaceError'</tt><tt class="py-op">,</tt> <tt class="py-string">'InternalError'</tt><tt class="py-op">,</tt> <tt class="py-string">'MySQLError'</tt><tt class="py-op">,</tt> <tt class="py-string">'NULL'</tt><tt class="py-op">,</tt> <tt class="py-string">'NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt class="py-string">'NotSupportedError'</tt><tt class="py-op">,</tt> <tt class="py-string">'DBAPISet'</tt><tt class="py-op">,</tt> <tt class="py-string">'OperationalError'</tt><tt class="py-op">,</tt> <tt class="py-string">'ProgrammingError'</tt><tt class="py-op">,</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">    <tt class="py-string">'ROWID'</tt><tt class="py-op">,</tt> <tt class="py-string">'STRING'</tt><tt class="py-op">,</tt> <tt class="py-string">'TIME'</tt><tt class="py-op">,</tt> <tt class="py-string">'TIMESTAMP'</tt><tt class="py-op">,</tt> <tt class="py-string">'Warning'</tt><tt class="py-op">,</tt> <tt class="py-string">'apilevel'</tt><tt class="py-op">,</tt> <tt class="py-string">'connect'</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt class="py-string">'connections'</tt><tt class="py-op">,</tt> <tt class="py-string">'constants'</tt><tt class="py-op">,</tt> <tt class="py-string">'converters'</tt><tt class="py-op">,</tt> <tt class="py-string">'cursors'</tt><tt class="py-op">,</tt> <tt class="py-string">'debug'</tt><tt class="py-op">,</tt> <tt class="py-string">'escape'</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">    <tt class="py-string">'escape_dict'</tt><tt class="py-op">,</tt> <tt class="py-string">'escape_sequence'</tt><tt class="py-op">,</tt> <tt class="py-string">'escape_string'</tt><tt class="py-op">,</tt> <tt class="py-string">'get_client_info'</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-string">'paramstyle'</tt><tt class="py-op">,</tt> <tt class="py-string">'string_literal'</tt><tt class="py-op">,</tt> <tt class="py-string">'threadsafety'</tt><tt class="py-op">,</tt> <tt class="py-string">'version_info'</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">    <tt class="py-string">"install_as_MySQLdb"</tt><tt class="py-op">,</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">    <tt class="py-string">"NULL"</tt><tt class="py-op">,</tt><tt class="py-string">"__version__"</tt><tt class="py-op">,</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.DBAPISet-class.html version [68bd4d7cc5].



































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.DBAPISet</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Class&nbsp;DBAPISet
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DBAPISet</h1><span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 frozenset --+
             |
            <strong class="uidshort">DBAPISet</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      x==y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet.__eq__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet.__hash__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.DBAPISet-class.html#__ne__" class="summary-sig-name">__ne__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      x!=y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet.__ne__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>frozenset</code></b>:
      <code>__and__</code>,
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__gt__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__new__</code>,
      <code>__or__</code>,
      <code>__rand__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__ror__</code>,
      <code>__rsub__</code>,
      <code>__rxor__</code>,
      <code>__sub__</code>,
      <code>__xor__</code>,
      <code>copy</code>,
      <code>difference</code>,
      <code>intersection</code>,
      <code>issubset</code>,
      <code>issuperset</code>,
      <code>symmetric_difference</code>,
      <code>union</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__init__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__eq__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__eq__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
    <br /><em class="fname">(Equality operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet.__eq__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x==y
  <dl class="fields">
    <dt>Overrides:
      frozenset.__eq__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet.__hash__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  hash(x)
  <dl class="fields">
    <dt>Overrides:
      frozenset.__hash__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__ne__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__ne__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql-pysrc.html#DBAPISet.__ne__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x!=y
  <dl class="fields">
    <dt>Overrides:
      frozenset.__ne__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants-module.html version [977eeabb05].














































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.constants</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Package&nbsp;constants
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.constants-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package constants</h1><span class="codelink"><a href="web2py.gluon.contrib.pymysql.constants-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Submodules</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Submodules"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a></strong>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants-pysrc.html version [b4f0e11b91].






























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.constants</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Package&nbsp;constants
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.constants-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.contrib.pymysql.constants-module.html">Package web2py.gluon.contrib.pymysql.constants</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">1</tt>  <tt class="py-line"> </tt>
<a name="L2"></a><tt class="py-lineno">2</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html version [2bf8b6e0bd].
























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        <a href="web2py.gluon.contrib.pymysql.constants-module.html">Package&nbsp;constants</a> ::
        Module&nbsp;FIELD_TYPE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module FIELD_TYPE</h1><span class="codelink"><a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BIT"></a><span class="summary-name">BIT</span> = <code title="16">16</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BLOB"></a><span class="summary-name">BLOB</span> = <code title="252">252</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="CHAR"></a><span class="summary-name">CHAR</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DATE"></a><span class="summary-name">DATE</span> = <code title="10">10</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DATETIME"></a><span class="summary-name">DATETIME</span> = <code title="12">12</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DECIMAL"></a><span class="summary-name">DECIMAL</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DOUBLE"></a><span class="summary-name">DOUBLE</span> = <code title="5">5</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ENUM"></a><span class="summary-name">ENUM</span> = <code title="247">247</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FLOAT"></a><span class="summary-name">FLOAT</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="GEOMETRY"></a><span class="summary-name">GEOMETRY</span> = <code title="255">255</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="INT24"></a><span class="summary-name">INT24</span> = <code title="9">9</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="INTERVAL"></a><span class="summary-name">INTERVAL</span> = <code title="247">247</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LONG"></a><span class="summary-name">LONG</span> = <code title="3">3</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LONGLONG"></a><span class="summary-name">LONGLONG</span> = <code title="8">8</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LONG_BLOB"></a><span class="summary-name">LONG_BLOB</span> = <code title="251">251</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="MEDIUM_BLOB"></a><span class="summary-name">MEDIUM_BLOB</span> = <code title="250">250</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NEWDATE"></a><span class="summary-name">NEWDATE</span> = <code title="14">14</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NEWDECIMAL"></a><span class="summary-name">NEWDECIMAL</span> = <code title="246">246</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NULL"></a><span class="summary-name">NULL</span> = <code title="6">6</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SET"></a><span class="summary-name">SET</span> = <code title="248">248</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SHORT"></a><span class="summary-name">SHORT</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="STRING"></a><span class="summary-name">STRING</span> = <code title="254">254</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TIME"></a><span class="summary-name">TIME</span> = <code title="11">11</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TIMESTAMP"></a><span class="summary-name">TIMESTAMP</span> = <code title="7">7</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TINY"></a><span class="summary-name">TINY</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TINY_BLOB"></a><span class="summary-name">TINY_BLOB</span> = <code title="249">249</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VARCHAR"></a><span class="summary-name">VARCHAR</span> = <code title="15">15</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VAR_STRING"></a><span class="summary-name">VAR_STRING</span> = <code title="253">253</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="YEAR"></a><span class="summary-name">YEAR</span> = <code title="13">13</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-pysrc.html version [9a1c978d8f].






































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        <a href="web2py.gluon.contrib.pymysql.constants-module.html">Package&nbsp;constants</a> ::
        Module&nbsp;FIELD_TYPE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html">Module web2py.gluon.contrib.pymysql.constants.FIELD_TYPE</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL" class="py-name" href="#" onclick="return doclink('link-0', 'DECIMAL', 'link-0');">DECIMAL</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY" class="py-name" href="#" onclick="return doclink('link-1', 'TINY', 'link-1');">TINY</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SHORT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SHORT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SHORT" class="py-name" href="#" onclick="return doclink('link-2', 'SHORT', 'link-2');">SHORT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG" class="py-name" href="#" onclick="return doclink('link-3', 'LONG', 'link-3');">LONG</a></tt> <tt class="py-op">=</tt> <tt class="py-number">3</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT" class="py-name" href="#" onclick="return doclink('link-4', 'FLOAT', 'link-4');">FLOAT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">4</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE" class="py-name" href="#" onclick="return doclink('link-5', 'DOUBLE', 'link-5');">DOUBLE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.NULL=web2py.gluon.contrib.pymysql-module.html#NULL,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NULL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NULL"><a title="web2py.gluon.contrib.pymysql.NULL
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NULL" class="py-name" href="#" onclick="return doclink('link-6', 'NULL', 'link-6');">NULL</a></tt> <tt class="py-op">=</tt> <tt class="py-number">6</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.TIMESTAMP=web2py.gluon.contrib.pymysql-module.html#TIMESTAMP,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP"><a title="web2py.gluon.contrib.pymysql.TIMESTAMP
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP" class="py-name" href="#" onclick="return doclink('link-7', 'TIMESTAMP', 'link-7');">TIMESTAMP</a></tt> <tt class="py-op">=</tt> <tt class="py-number">7</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG" class="py-name" href="#" onclick="return doclink('link-8', 'LONGLONG', 'link-8');">LONGLONG</a></tt> <tt class="py-op">=</tt> <tt class="py-number">8</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24" class="py-name" href="#" onclick="return doclink('link-9', 'INT24', 'link-9');">INT24</a></tt> <tt class="py-op">=</tt> <tt class="py-number">9</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.DATE=web2py.gluon.contrib.pymysql-module.html#DATE,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE"><a title="web2py.gluon.contrib.pymysql.DATE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE" class="py-name" href="#" onclick="return doclink('link-10', 'DATE', 'link-10');">DATE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">10</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt id="link-11" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.TIME=web2py.gluon.contrib.pymysql-module.html#TIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME"><a title="web2py.gluon.contrib.pymysql.TIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME" class="py-name" href="#" onclick="return doclink('link-11', 'TIME', 'link-11');">TIME</a></tt> <tt class="py-op">=</tt> <tt class="py-number">11</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt id="link-12" class="py-name" targets="Variable psycopg2.DATETIME=psycopg2-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.DATETIME=web2py.gluon.contrib.pymysql-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME"><a title="psycopg2.DATETIME
web2py.gluon.contrib.pymysql.DATETIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME" class="py-name" href="#" onclick="return doclink('link-12', 'DATETIME', 'link-12');">DATETIME</a></tt> <tt class="py-op">=</tt> <tt class="py-number">12</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt id="link-13" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR" class="py-name" href="#" onclick="return doclink('link-13', 'YEAR', 'link-13');">YEAR</a></tt> <tt class="py-op">=</tt> <tt class="py-number">13</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt id="link-14" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDATE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDATE"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDATE" class="py-name" href="#" onclick="return doclink('link-14', 'NEWDATE', 'link-14');">NEWDATE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">14</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt id="link-15" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VARCHAR=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VARCHAR"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VARCHAR" class="py-name" href="#" onclick="return doclink('link-15', 'VARCHAR', 'link-15');">VARCHAR</a></tt> <tt class="py-op">=</tt> <tt class="py-number">15</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt id="link-16" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BIT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BIT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BIT" class="py-name" href="#" onclick="return doclink('link-16', 'BIT', 'link-16');">BIT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">16</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt id="link-17" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDECIMAL"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL" class="py-name" href="#" onclick="return doclink('link-17', 'NEWDECIMAL', 'link-17');">NEWDECIMAL</a></tt> <tt class="py-op">=</tt> <tt class="py-number">246</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#ENUM"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM" class="py-name" href="#" onclick="return doclink('link-18', 'ENUM', 'link-18');">ENUM</a></tt> <tt class="py-op">=</tt> <tt class="py-number">247</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt id="link-19" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SET"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET" class="py-name" href="#" onclick="return doclink('link-19', 'SET', 'link-19');">SET</a></tt> <tt class="py-op">=</tt> <tt class="py-number">248</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt id="link-20" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB" class="py-name" href="#" onclick="return doclink('link-20', 'TINY_BLOB', 'link-20');">TINY_BLOB</a></tt> <tt class="py-op">=</tt> <tt class="py-number">249</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt id="link-21" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB" class="py-name" href="#" onclick="return doclink('link-21', 'MEDIUM_BLOB', 'link-21');">MEDIUM_BLOB</a></tt> <tt class="py-op">=</tt> <tt class="py-number">250</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt id="link-22" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB" class="py-name" href="#" onclick="return doclink('link-22', 'LONG_BLOB', 'link-22');">LONG_BLOB</a></tt> <tt class="py-op">=</tt> <tt class="py-number">251</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt id="link-23" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB" class="py-name" href="#" onclick="return doclink('link-23', 'BLOB', 'link-23');">BLOB</a></tt> <tt class="py-op">=</tt> <tt class="py-number">252</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt id="link-24" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING" class="py-name" href="#" onclick="return doclink('link-24', 'VAR_STRING', 'link-24');">VAR_STRING</a></tt> <tt class="py-op">=</tt> <tt class="py-number">253</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt id="link-25" class="py-name" targets="Variable psycopg2.STRING=psycopg2-module.html#STRING,Variable web2py.gluon.contrib.pymysql.STRING=web2py.gluon.contrib.pymysql-module.html#STRING,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING"><a title="psycopg2.STRING
web2py.gluon.contrib.pymysql.STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING" class="py-name" href="#" onclick="return doclink('link-25', 'STRING', 'link-25');">STRING</a></tt> <tt class="py-op">=</tt> <tt class="py-number">254</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt id="link-26" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.GEOMETRY=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#GEOMETRY"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.GEOMETRY" class="py-name" href="#" onclick="return doclink('link-26', 'GEOMETRY', 'link-26');">GEOMETRY</a></tt> <tt class="py-op">=</tt> <tt class="py-number">255</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt id="link-27" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.CHAR=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#CHAR"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.CHAR" class="py-name" href="#" onclick="return doclink('link-27', 'CHAR', 'link-27');">CHAR</a></tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY" class="py-name" href="#" onclick="return doclink('link-28', 'TINY', 'link-1');">TINY</a></tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt id="link-29" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INTERVAL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INTERVAL"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INTERVAL" class="py-name" href="#" onclick="return doclink('link-29', 'INTERVAL', 'link-29');">INTERVAL</a></tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.ENUM" class="py-name" href="#" onclick="return doclink('link-30', 'ENUM', 'link-18');">ENUM</a></tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:09 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.converters-module.html version [996ec5e093].
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.converters</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;converters
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module converters</h1><span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_bit"></a><span class="summary-sig-name">convert_bit</span>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_bit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_characters"></a><span class="summary-sig-name">convert_characters</span>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_characters">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_date" class="summary-sig-name">convert_date</a>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">obj</span>)</span><br />
      Returns a DATE column as a date object:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_date">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime" class="summary-sig-name">convert_datetime</a>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">obj</span>)</span><br />
      Returns a DATETIME or TIMESTAMP column value as a datetime 
      object:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_datetime">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_decimal"></a><span class="summary-sig-name">convert_decimal</span>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_decimal">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_float"></a><span class="summary-sig-name">convert_float</span>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_float">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_int"></a><span class="summary-sig-name">convert_int</span>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_int">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_long"></a><span class="summary-sig-name">convert_long</span>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_long">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp" class="summary-sig-name">convert_mysql_timestamp</a>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">timestamp</span>)</span><br />
      Convert a MySQL TIMESTAMP to a Timestamp object.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_mysql_timestamp">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert_set"></a><span class="summary-sig-name">convert_set</span>(<span class="summary-sig-arg">s</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_set">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_time" class="summary-sig-name">convert_time</a>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">obj</span>)</span><br />
      Returns a TIME column as a time object:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_time">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta" class="summary-sig-name">convert_timedelta</a>(<span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">obj</span>)</span><br />
      Returns a TIME column as a timedelta object:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_timedelta">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_None"></a><span class="summary-sig-name">escape_None</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_None">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_bool"></a><span class="summary-sig-name">escape_bool</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_bool">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_date"></a><span class="summary-sig-name">escape_date</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_date">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_datetime"></a><span class="summary-sig-name">escape_datetime</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_datetime">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_decimal"></a><span class="summary-sig-name">escape_decimal</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_decimal">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_dict"></a><span class="summary-sig-name">escape_dict</span>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">charset</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_float"></a><span class="summary-sig-name">escape_float</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_float">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_int"></a><span class="summary-sig-name">escape_int</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_object">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_item"></a><span class="summary-sig-name">escape_item</span>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">charset</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_item">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_long"></a><span class="summary-sig-name">escape_long</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_object">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_object"></a><span class="summary-sig-name">escape_object</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_object">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_sequence"></a><span class="summary-sig-name">escape_sequence</span>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">charset</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_sequence">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_set"></a><span class="summary-sig-name">escape_set</span>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">charset</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_set">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_string"></a><span class="summary-sig-name">escape_string</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_struct_time"></a><span class="summary-sig-name">escape_struct_time</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_struct_time">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_time"></a><span class="summary-sig-name">escape_time</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_time">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_timedelta"></a><span class="summary-sig-name">escape_timedelta</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_timedelta">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="escape_unicode"></a><span class="summary-sig-name">escape_unicode</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#escape_unicode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_MAP" class="summary-name">ESCAPE_MAP</a> = <code title="{'\x00': '\\0',
 '''
''': '\\n',
 '\r': '\\r',
 '\x1a': '\\Z',
 '&quot;': '\\&quot;',
 '\'': '\\\'',
 '\\': '\\\\'}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\0</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">\n</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\n</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">\r</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\r</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">\x1a</code><code class="variable-quote">'</code><code class="variable-op">:</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ESCAPE_REGEX"></a><span class="summary-name">ESCAPE_REGEX</span> = <code title="re.compile(r'[\x00\n\r\x1a\'&quot;\\]')">re.compile(r'<code class="re-group">[</code>\x00\n\r\x1a\'&quot;\\<code class="re-group">]</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.converters-module.html#conversions" class="summary-name">conversions</a> = <code title="{0: &lt;function convert_decimal at 0xd3ccf8&gt;,
 1: &lt;function convert_int at 0xd3cb90&gt;,
 2: &lt;function convert_int at 0xd3cb90&gt;,
 3: &lt;function convert_long at 0xd3cc08&gt;,
 4: &lt;function convert_float at 0xd3cc80&gt;,
 5: &lt;function convert_float at 0xd3cc80&gt;,
 7: &lt;function convert_mysql_timestamp at 0xd3c9b0&gt;,
 8: &lt;function convert_long at 0xd3cc08&gt;,
..."><code class="variable-group">{</code>0<code class="variable-op">: </code>&lt;function convert_decimal at 0xd3ccf8&gt;<code class="variable-op">, </code>1<code class="variable-op">: </code>&lt;<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.converters-module.html#decoders" class="summary-name">decoders</a> = <code title="{0: &lt;function convert_decimal at 0xd3ccf8&gt;,
 1: &lt;function convert_int at 0xd3cb90&gt;,
 2: &lt;function convert_int at 0xd3cb90&gt;,
 3: &lt;function convert_long at 0xd3cc08&gt;,
 4: &lt;function convert_float at 0xd3cc80&gt;,
 5: &lt;function convert_float at 0xd3cc80&gt;,
 7: &lt;function convert_mysql_timestamp at 0xd3c9b0&gt;,
 8: &lt;function convert_long at 0xd3cc08&gt;,
..."><code class="variable-group">{</code>0<code class="variable-op">: </code>&lt;function convert_decimal at 0xd3ccf8&gt;<code class="variable-op">, </code>1<code class="variable-op">: </code>&lt;fun<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql.converters-module.html#encoders" class="summary-name">encoders</a> = <code title="{&lt;type 'bool'&gt;: &lt;function escape_bool at 0xd3c2a8&gt;,
 &lt;type 'float'&gt;: &lt;function escape_float at 0xd3c398&gt;,
 &lt;type 'int'&gt;: &lt;function escape_object at 0xd3c320&gt;,
 &lt;type 'list'&gt;: &lt;function escape_sequence at 0xd34c80&gt;,
 &lt;type 'long'&gt;: &lt;function escape_object at 0xd3c320&gt;,
 &lt;type 'dict'&gt;: &lt;function escape_dict at 0xd34a28&gt;,
 &lt;type 'NoneType'&gt;: &lt;function escape_None at 0xd3c500&gt;,
 &lt;type 'set'&gt;: &lt;function escape_sequence at 0xd34c80&gt;,
..."><code class="variable-group">{</code>&lt;type 'bool'&gt;<code class="variable-op">: </code>&lt;function escape_bool at 0xd3c2a8&gt;<code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="convert_date"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">convert_date</span>(<span class="sig-arg">connection</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">obj</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_date">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Returns a DATE column as a date object:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>date_or_None(<span class="py-string">'2007-02-26'</span>)
<span class="py-output">datetime.date(2007, 2, 26)</span></pre>
  Illegal values are returned as None:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>date_or_None(<span class="py-string">'2007-02-31'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>date_or_None(<span class="py-string">'0000-00-00'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="convert_datetime"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">convert_datetime</span>(<span class="sig-arg">connection</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">obj</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_datetime">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Returns a DATETIME or TIMESTAMP column value as a datetime object:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>datetime_or_None(<span class="py-string">'2007-02-25 23:06:20'</span>)
<span class="py-output">datetime.datetime(2007, 2, 25, 23, 6, 20)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>datetime_or_None(<span class="py-string">'2007-02-25T23:06:20'</span>)
<span class="py-output">datetime.datetime(2007, 2, 25, 23, 6, 20)</span></pre>
  Illegal values are returned as None:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>datetime_or_None(<span class="py-string">'2007-02-31T23:06:20'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>datetime_or_None(<span class="py-string">'0000-00-00 00:00:00'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="convert_mysql_timestamp"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">convert_mysql_timestamp</span>(<span class="sig-arg">connection</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">timestamp</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_mysql_timestamp">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Convert a MySQL TIMESTAMP to a Timestamp object.</p>
  MySQL &gt;= 4.1 returns TIMESTAMP in the same format as DATETIME:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>mysql_timestamp_converter(<span class="py-string">'2007-02-25 22:32:17'</span>)
<span class="py-output">datetime.datetime(2007, 2, 25, 22, 32, 17)</span></pre>
  MySQL &lt; 4.1 uses a big string of numbers:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>mysql_timestamp_converter(<span class="py-string">'20070225223217'</span>)
<span class="py-output">datetime.datetime(2007, 2, 25, 22, 32, 17)</span></pre>
  Illegal values are returned as None:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>mysql_timestamp_converter(<span class="py-string">'2007-02-31 22:32:17'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>mysql_timestamp_converter(<span class="py-string">'00000000000000'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="convert_time"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">convert_time</span>(<span class="sig-arg">connection</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">obj</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_time">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Returns a TIME column as a time object:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>time_or_None(<span class="py-string">'15:06:17'</span>)
<span class="py-output">datetime.time(15, 6, 17)</span></pre>
  Illegal values are returned as None:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>time_or_None(<span class="py-string">'-25:06:17'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>time_or_None(<span class="py-string">'random crap'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span></pre>
  <p>Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but can 
  accept values as (+|-)DD HH:MM:SS. The latter format will not be parsed 
  correctly by this function.</p>
  Also note that MySQL's TIME column corresponds more closely to 
  Python's timedelta and not time. However if you want TIME columns to be 
  treated as time-of-day and not a time offset, then you can use set this 
  function as the converter for FIELD_TYPE.TIME.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="convert_timedelta"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">convert_timedelta</span>(<span class="sig-arg">connection</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">obj</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.contrib.pymysql.converters-pysrc.html#convert_timedelta">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Returns a TIME column as a timedelta object:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>timedelta_or_None(<span class="py-string">'25:06:17'</span>)
<span class="py-output">datetime.timedelta(1, 3977)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>timedelta_or_None(<span class="py-string">'-25:06:17'</span>)
<span class="py-output">datetime.timedelta(-2, 83177)</span></pre>
  Illegal values are returned as None:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>timedelta_or_None(<span class="py-string">'random crap'</span>) <span class="py-keyword">is</span> None
<span class="py-output">True</span></pre>
  Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but can 
  accept values as (+|-)DD HH:MM:SS. The latter format will not be parsed 
  correctly by this function.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="ESCAPE_MAP"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ESCAPE_MAP</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\0</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'''</code><code class="variable-string"></code>
<code class="variable-string"></code><code class="variable-quote">'''</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\n</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">\r</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\r</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">\x1a</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\Z</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">&quot;</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\&quot;</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">\'</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\\'</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">\\</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\\\\</code><code class="variable-quote">'</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="conversions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">conversions</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code>0<code class="variable-op">: </code>&lt;function convert_decimal at 0xd3ccf8&gt;<code class="variable-op">,</code>
 1<code class="variable-op">: </code>&lt;function convert_int at 0xd3cb90&gt;<code class="variable-op">,</code>
 2<code class="variable-op">: </code>&lt;function convert_int at 0xd3cb90&gt;<code class="variable-op">,</code>
 3<code class="variable-op">: </code>&lt;function convert_long at 0xd3cc08&gt;<code class="variable-op">,</code>
 4<code class="variable-op">: </code>&lt;function convert_float at 0xd3cc80&gt;<code class="variable-op">,</code>
 5<code class="variable-op">: </code>&lt;function convert_float at 0xd3cc80&gt;<code class="variable-op">,</code>
 7<code class="variable-op">: </code>&lt;function convert_mysql_timestamp at 0xd3c9b0&gt;<code class="variable-op">,</code>
 8<code class="variable-op">: </code>&lt;function convert_long at 0xd3cc08&gt;<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="decoders"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">decoders</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code>0<code class="variable-op">: </code>&lt;function convert_decimal at 0xd3ccf8&gt;<code class="variable-op">,</code>
 1<code class="variable-op">: </code>&lt;function convert_int at 0xd3cb90&gt;<code class="variable-op">,</code>
 2<code class="variable-op">: </code>&lt;function convert_int at 0xd3cb90&gt;<code class="variable-op">,</code>
 3<code class="variable-op">: </code>&lt;function convert_long at 0xd3cc08&gt;<code class="variable-op">,</code>
 4<code class="variable-op">: </code>&lt;function convert_float at 0xd3cc80&gt;<code class="variable-op">,</code>
 5<code class="variable-op">: </code>&lt;function convert_float at 0xd3cc80&gt;<code class="variable-op">,</code>
 7<code class="variable-op">: </code>&lt;function convert_mysql_timestamp at 0xd3c9b0&gt;<code class="variable-op">,</code>
 8<code class="variable-op">: </code>&lt;function convert_long at 0xd3cc08&gt;<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="encoders"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">encoders</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code>&lt;type 'bool'&gt;<code class="variable-op">: </code>&lt;function escape_bool at 0xd3c2a8&gt;<code class="variable-op">,</code>
 &lt;type 'float'&gt;<code class="variable-op">: </code>&lt;function escape_float at 0xd3c398&gt;<code class="variable-op">,</code>
 &lt;type 'int'&gt;<code class="variable-op">: </code>&lt;function escape_object at 0xd3c320&gt;<code class="variable-op">,</code>
 &lt;type 'list'&gt;<code class="variable-op">: </code>&lt;function escape_sequence at 0xd34c80&gt;<code class="variable-op">,</code>
 &lt;type 'long'&gt;<code class="variable-op">: </code>&lt;function escape_object at 0xd3c320&gt;<code class="variable-op">,</code>
 &lt;type 'dict'&gt;<code class="variable-op">: </code>&lt;function escape_dict at 0xd34a28&gt;<code class="variable-op">,</code>
 &lt;type 'NoneType'&gt;<code class="variable-op">: </code>&lt;function escape_None at 0xd3c500&gt;<code class="variable-op">,</code>
 &lt;type 'set'&gt;<code class="variable-op">: </code>&lt;function escape_sequence at 0xd34c80&gt;<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.converters-pysrc.html version [fc4479fa6d].


































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.converters</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;converters
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.converters-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.contrib.pymysql.converters-module.html">Module web2py.gluon.contrib.pymysql.converters</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1', 'time', 'link-1');">time</a></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Package web2py.gluon.contrib.pymysql.constants=web2py.gluon.contrib.pymysql.constants-module.html"><a title="web2py.gluon.contrib.pymysql.constants" class="py-name" href="#" onclick="return doclink('link-2', 'constants', 'link-2');">constants</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.contrib.pymysql.constants.FIELD_TYPE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-3', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">,</tt> <tt class="py-name">FLAG</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">charset</tt> <tt class="py-keyword">import</tt> <tt class="py-name">charset_by_id</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line">    <tt class="py-name">set</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt class="py-name">BaseSet</tt> <tt class="py-keyword">as</tt> <tt class="py-name">set</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Class web2py.gluon.dal.Set=web2py.gluon.dal.Set-class.html"><a title="web2py.gluon.dal.Set" class="py-name" href="#" onclick="return doclink('link-4', 'Set', 'link-4');">Set</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">set</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.converters.ESCAPE_REGEX=web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_REGEX"><a title="web2py.gluon.contrib.pymysql.converters.ESCAPE_REGEX" class="py-name" href="#" onclick="return doclink('link-5', 'ESCAPE_REGEX', 'link-5');">ESCAPE_REGEX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r"[\0\n\r\032\'\"\\]"</tt><tt class="py-op">)</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.converters.ESCAPE_MAP=web2py.gluon.contrib.pymysql.converters-module.html#ESCAPE_MAP"><a title="web2py.gluon.contrib.pymysql.converters.ESCAPE_MAP" class="py-name" href="#" onclick="return doclink('link-6', 'ESCAPE_MAP', 'link-6');">ESCAPE_MAP</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'\0'</tt><tt class="py-op">:</tt> <tt class="py-string">'\\0'</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">:</tt> <tt class="py-string">'\\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'\r'</tt><tt class="py-op">:</tt> <tt class="py-string">'\\r'</tt><tt class="py-op">,</tt> <tt class="py-string">'\032'</tt><tt class="py-op">:</tt> <tt class="py-string">'\\Z'</tt><tt class="py-op">,</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">              <tt class="py-string">'\''</tt><tt class="py-op">:</tt> <tt class="py-string">'\\\''</tt><tt class="py-op">,</tt> <tt class="py-string">'"'</tt><tt class="py-op">:</tt> <tt class="py-string">'\\"'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\'</tt><tt class="py-op">:</tt> <tt class="py-string">'\\\\'</tt><tt class="py-op">}</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="escape_item"></a><div id="escape_item-def"><a name="L20"></a><tt class="py-lineno"> 20</tt> <a class="py-toggle" href="#" id="escape_item-toggle" onclick="return toggle('escape_item');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_item">escape_item</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">charset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_item-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_item-expanded"><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">set</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-7" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_sequence()=web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence"><a title="web2py.gluon.contrib.pymysql.converters.escape_sequence" class="py-name" href="#" onclick="return doclink('link-7', 'escape_sequence', 'link-7');">escape_sequence</a></tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">dict</tt><tt class="py-op">:</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-8" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_dict()=web2py.gluon.contrib.pymysql.converters-module.html#escape_dict"><a title="web2py.gluon.contrib.pymysql.converters.escape_dict" class="py-name" href="#" onclick="return doclink('link-8', 'escape_dict', 'link-8');">escape_dict</a></tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-string">"decode"</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-comment"># deal with py3k bytes</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-9', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt class="py-name">encoder</tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.converters.encoders=web2py.gluon.contrib.pymysql.converters-module.html#encoders"><a title="web2py.gluon.contrib.pymysql.converters.encoders" class="py-name" href="#" onclick="return doclink('link-10', 'encoders', 'link-10');">encoders</a></tt><tt class="py-op">[</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-name">encoder</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">str</tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-11', 'encode', 'link-11');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
</div><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"> </tt>
<a name="escape_dict"></a><div id="escape_dict-def"><a name="L35"></a><tt class="py-lineno"> 35</tt> <a class="py-toggle" href="#" id="escape_dict-toggle" onclick="return toggle('escape_dict');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_dict">escape_dict</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">charset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_dict-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_dict-expanded"><a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt id="link-12" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-12', 'k', 'link-12');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-13', 'items', 'link-13');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-name">quoted</tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_item()=web2py.gluon.contrib.pymysql.converters-module.html#escape_item"><a title="web2py.gluon.contrib.pymysql.converters.escape_item" class="py-name" href="#" onclick="return doclink('link-14', 'escape_item', 'link-14');">escape_item</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">        <tt class="py-name">n</tt><tt class="py-op">[</tt><tt id="link-15" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-15', 'k', 'link-12');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">quoted</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">n</tt> </tt>
</div><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"> </tt>
<a name="escape_sequence"></a><div id="escape_sequence-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="escape_sequence-toggle" onclick="return toggle('escape_sequence');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_sequence">escape_sequence</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">charset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_sequence-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_sequence-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">val</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-name">quoted</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_item" class="py-name" href="#" onclick="return doclink('link-16', 'escape_item', 'link-14');">escape_item</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">n</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-17', 'append', 'link-17');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">quoted</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
<a name="escape_set"></a><div id="escape_set-def"><a name="L49"></a><tt class="py-lineno"> 49</tt> <a class="py-toggle" href="#" id="escape_set-toggle" onclick="return toggle('escape_set');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_set">escape_set</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">charset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_set-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_set-expanded"><a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt id="link-18" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-18', 'x', 'link-18');">x</a></tt><tt class="py-op">:</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_item" class="py-name" href="#" onclick="return doclink('link-19', 'escape_item', 'link-14');">escape_item</a></tt><tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-20', 'x', 'link-18');">x</a></tt><tt class="py-op">,</tt> <tt class="py-name">charset</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">','</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-21', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
</div><a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"> </tt>
<a name="escape_bool"></a><div id="escape_bool-def"><a name="L53"></a><tt class="py-lineno"> 53</tt> <a class="py-toggle" href="#" id="escape_bool-toggle" onclick="return toggle('escape_bool');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_bool">escape_bool</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_bool-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_bool-expanded"><a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"> </tt>
<a name="escape_object"></a><div id="escape_object-def"><a name="L56"></a><tt class="py-lineno"> 56</tt> <a class="py-toggle" href="#" id="escape_object-toggle" onclick="return toggle('escape_object');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_object">escape_object</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_object-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_object-expanded"><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-name">escape_int</tt> <tt class="py-op">=</tt> <tt class="py-name">escape_long</tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_object()=web2py.gluon.contrib.pymysql.converters-module.html#escape_object"><a title="web2py.gluon.contrib.pymysql.converters.escape_object" class="py-name" href="#" onclick="return doclink('link-22', 'escape_object', 'link-22');">escape_object</a></tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"> </tt>
<a name="escape_float"></a><div id="escape_float-def"><a name="L61"></a><tt class="py-lineno"> 61</tt> <a class="py-toggle" href="#" id="escape_float-toggle" onclick="return toggle('escape_float');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_float">escape_float</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_float-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_float-expanded"><a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-string">'%.15g'</tt> <tt class="py-op">%</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="escape_string"></a><div id="escape_string-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="escape_string-toggle" onclick="return toggle('escape_string');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_string">escape_string</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_string-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_string-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-string">"'%s'"</tt> <tt class="py-op">%</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.ESCAPE_REGEX" class="py-name" href="#" onclick="return doclink('link-23', 'ESCAPE_REGEX', 'link-5');">ESCAPE_REGEX</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">            <tt class="py-keyword">lambda</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.ESCAPE_MAP" class="py-name" href="#" onclick="return doclink('link-24', 'ESCAPE_MAP', 'link-6');">ESCAPE_MAP</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-25', 'get', 'link-25');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"> </tt>
<a name="escape_unicode"></a><div id="escape_unicode-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="escape_unicode-toggle" onclick="return toggle('escape_unicode');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode">escape_unicode</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_unicode-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_unicode-expanded"><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-26" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_string()=web2py.gluon.contrib.pymysql.converters-module.html#escape_string"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-26', 'escape_string', 'link-26');">escape_string</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="escape_None"></a><div id="escape_None-def"><a name="L71"></a><tt class="py-lineno"> 71</tt> <a class="py-toggle" href="#" id="escape_None-toggle" onclick="return toggle('escape_None');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_None">escape_None</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_None-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_None-expanded"><a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">'NULL'</tt> </tt>
</div><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"> </tt>
<a name="escape_timedelta"></a><div id="escape_timedelta-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="escape_timedelta-toggle" onclick="return toggle('escape_timedelta');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_timedelta">escape_timedelta</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_timedelta-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_timedelta-expanded"><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">    <tt id="link-27" class="py-name" targets="Method web2py.gluon.dal.Expression.seconds()=web2py.gluon.dal.Expression-class.html#seconds"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-27', 'seconds', 'link-27');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-28', 'seconds', 'link-27');">seconds</a></tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">60</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">    <tt id="link-29" class="py-name" targets="Method web2py.gluon.dal.Expression.minutes()=web2py.gluon.dal.Expression-class.html#minutes"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-29', 'minutes', 'link-29');">minutes</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-30', 'seconds', 'link-27');">seconds</a></tt> <tt class="py-op">//</tt> <tt class="py-number">60</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">60</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-31', 'seconds', 'link-27');">seconds</a></tt> <tt class="py-op">//</tt> <tt class="py-number">3600</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">24</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">days</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">24</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-32', 'escape_string', 'link-26');">escape_string</a></tt><tt class="py-op">(</tt><tt class="py-string">'%02d:%02d:%02d'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt id="link-33" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-33', 'minutes', 'link-29');">minutes</a></tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-34', 'seconds', 'link-27');">seconds</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="escape_time"></a><div id="escape_time-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="escape_time-toggle" onclick="return toggle('escape_time');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_time">escape_time</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_time-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_time-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt id="link-35" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-35', 's', 'link-35');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"%02d:%02d:%02d"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Method web2py.gluon.dal.Expression.hour()=web2py.gluon.dal.Expression-class.html#hour"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-36', 'hour', 'link-36');">hour</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                            <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">second</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">microsecond</tt><tt class="py-op">:</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt id="link-37" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-37', 's', 'link-35');">s</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">".%f"</tt> <tt class="py-op">%</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">microsecond</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-38', 'escape_string', 'link-26');">escape_string</a></tt><tt class="py-op">(</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-39', 's', 'link-35');">s</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
<a name="escape_datetime"></a><div id="escape_datetime-def"><a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="escape_datetime-toggle" onclick="return toggle('escape_datetime');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_datetime">escape_datetime</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_datetime-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_datetime-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-40" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-40', 'escape_string', 'link-26');">escape_string</a></tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">"%Y-%m-%d %H:%M:%S"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="escape_date"></a><div id="escape_date-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="escape_date-toggle" onclick="return toggle('escape_date');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_date">escape_date</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_date-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_date-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-41" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-41', 'escape_string', 'link-26');">escape_string</a></tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">"%Y-%m-%d"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"> </tt>
<a name="escape_struct_time"></a><div id="escape_struct_time-def"><a name="L94"></a><tt class="py-lineno"> 94</tt> <a class="py-toggle" href="#" id="escape_struct_time-toggle" onclick="return toggle('escape_struct_time');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_struct_time">escape_struct_time</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_struct_time-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="escape_struct_time-expanded"><a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-42" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_datetime()=web2py.gluon.contrib.pymysql.converters-module.html#escape_datetime"><a title="web2py.gluon.contrib.pymysql.converters.escape_datetime" class="py-name" href="#" onclick="return doclink('link-42', 'escape_datetime', 'link-42');">escape_datetime</a></tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-43', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-44', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">obj</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"> </tt>
<a name="convert_datetime"></a><div id="convert_datetime-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="convert_datetime-toggle" onclick="return toggle('convert_datetime');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime">convert_datetime</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_datetime-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_datetime-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt class="py-docstring">"""Returns a DATETIME or TIMESTAMP column value as a datetime object:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; datetime_or_None('2007-02-25 23:06:20')</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.datetime(2007, 2, 25, 23, 6, 20)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; datetime_or_None('2007-02-25T23:06:20')</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.datetime(2007, 2, 25, 23, 6, 20)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">    Illegal values are returned as None:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; datetime_or_None('2007-02-31T23:06:20') is None</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; datetime_or_None('0000-00-00 00:00:00') is None</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-45', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-string">' '</tt> <tt class="py-keyword">in</tt> <tt class="py-name">obj</tt><tt class="py-op">:</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">sep</tt> <tt class="py-op">=</tt> <tt class="py-string">' '</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-string">'T'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">obj</tt><tt class="py-op">:</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-name">sep</tt> <tt class="py-op">=</tt> <tt class="py-string">'T'</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-46" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_date()=web2py.gluon.contrib.pymysql.converters-module.html#convert_date"><a title="web2py.gluon.contrib.pymysql.converters.convert_date" class="py-name" href="#" onclick="return doclink('link-46', 'convert_date', 'link-46');">convert_date</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">,</tt> <tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-name">ymd</tt><tt class="py-op">,</tt> <tt class="py-name">hms</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-47" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-47', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-48', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-op">[</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-49" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-49', 'x', 'link-18');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-50" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-50', 'x', 'link-18');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">ymd</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-name">hms</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-51" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_date" class="py-name" href="#" onclick="return doclink('link-51', 'convert_date', 'link-46');">convert_date</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">,</tt> <tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
</div><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt>
<a name="convert_timedelta"></a><div id="convert_timedelta-def"><a name="L128"></a><tt class="py-lineno">128</tt> <a class="py-toggle" href="#" id="convert_timedelta-toggle" onclick="return toggle('convert_timedelta');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta">convert_timedelta</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_timedelta-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_timedelta-expanded"><a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">    <tt class="py-docstring">"""Returns a TIME column as a timedelta object:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; timedelta_or_None('25:06:17')</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.timedelta(1, 3977)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; timedelta_or_None('-25:06:17')</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.timedelta(-2, 83177)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"><tt class="py-docstring">    Illegal values are returned as None:</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; timedelta_or_None('random crap') is None</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring">    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"><tt class="py-docstring">    can accept values as (+|-)DD HH:MM:SS. The latter format will not</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"><tt class="py-docstring">    be parsed correctly by this function.</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">math</tt> <tt class="py-keyword">import</tt> <tt class="py-name">modf</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">            <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-52', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">        <tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt id="link-53" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-53', 'minutes', 'link-29');">minutes</a></tt><tt class="py-op">,</tt> <tt id="link-54" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-54', 'seconds', 'link-27');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-55', 'x', 'link-18');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-56" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-56', 'x', 'link-18');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">        <tt class="py-name">tdelta</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-57', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">            <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hours</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt id="link-58" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-58', 'minutes', 'link-29');">minutes</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.dal.Expression.minutes" class="py-name" href="#" onclick="return doclink('link-59', 'minutes', 'link-29');">minutes</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt id="link-60" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-60', 'seconds', 'link-27');">seconds</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-61" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-61', 'seconds', 'link-27');">seconds</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">            <tt class="py-name">microseconds</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-62', 'seconds', 'link-27');">seconds</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">*</tt><tt class="py-number">1000000</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">tdelta</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"> </tt>
<a name="convert_time"></a><div id="convert_time-def"><a name="L160"></a><tt class="py-lineno">160</tt> <a class="py-toggle" href="#" id="convert_time-toggle" onclick="return toggle('convert_time');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_time">convert_time</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_time-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_time-expanded"><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">    <tt class="py-docstring">"""Returns a TIME column as a time object:</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; time_or_None('15:06:17')</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.time(15, 6, 17)</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"><tt class="py-docstring">    Illegal values are returned as None:</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; time_or_None('-25:06:17') is None</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; time_or_None('random crap') is None</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"><tt class="py-docstring">    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line"><tt class="py-docstring">    can accept values as (+|-)DD HH:MM:SS. The latter format will not</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line"><tt class="py-docstring">    be parsed correctly by this function.</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line"><tt class="py-docstring">    Also note that MySQL's TIME column corresponds more closely to</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"><tt class="py-docstring">    Python's timedelta and not time. However if you want TIME columns</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line"><tt class="py-docstring">    to be treated as time-of-day and not a time offset, then you can</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"><tt class="py-docstring">    use set this function as the converter for FIELD_TYPE.TIME.</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">math</tt> <tt class="py-keyword">import</tt> <tt class="py-name">modf</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt id="link-63" class="py-name"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-63', 'hour', 'link-36');">hour</a></tt><tt class="py-op">,</tt> <tt class="py-name">minute</tt><tt class="py-op">,</tt> <tt class="py-name">second</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-64" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-64', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-65', 'time', 'link-1');">time</a></tt><tt class="py-op">(</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-66', 'hour', 'link-36');">hour</a></tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-67', 'hour', 'link-36');">hour</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">minute</tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">minute</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">                             <tt class="py-name">second</tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">second</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">                             <tt class="py-name">microsecond</tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">second</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">*</tt><tt class="py-number">1000000</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"> </tt>
<a name="convert_date"></a><div id="convert_date-def"><a name="L191"></a><tt class="py-lineno">191</tt> <a class="py-toggle" href="#" id="convert_date-toggle" onclick="return toggle('convert_date');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_date">convert_date</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_date-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_date-expanded"><a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">    <tt class="py-docstring">"""Returns a DATE column as a date object:</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; date_or_None('2007-02-26')</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.date(2007, 2, 26)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring">    Illegal values are returned as None:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; date_or_None('2007-02-31') is None</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; date_or_None('0000-00-00') is None</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">            <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-68', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-69" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-69', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-70" class="py-name" targets="Class datetime.date=datetime.date-class.html"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-70', 'date', 'link-70');">date</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-op">[</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-71" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-71', 'x', 'link-18');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-72" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-72', 'x', 'link-18');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"> </tt>
<a name="convert_mysql_timestamp"></a><div id="convert_mysql_timestamp-def"><a name="L212"></a><tt class="py-lineno">212</tt> <a class="py-toggle" href="#" id="convert_mysql_timestamp-toggle" onclick="return toggle('convert_mysql_timestamp');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp">convert_mysql_timestamp</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">timestamp</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_mysql_timestamp-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_mysql_timestamp-expanded"><a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">    <tt class="py-docstring">"""Convert a MySQL TIMESTAMP to a Timestamp object.</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"><tt class="py-docstring">    MySQL &gt;= 4.1 returns TIMESTAMP in the same format as DATETIME:</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; mysql_timestamp_converter('2007-02-25 22:32:17')</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.datetime(2007, 2, 25, 22, 32, 17)</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"><tt class="py-docstring">    MySQL &lt; 4.1 uses a big string of numbers:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; mysql_timestamp_converter('20070225223217')</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line"><tt class="py-docstring">      datetime.datetime(2007, 2, 25, 22, 32, 17)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"><tt class="py-docstring">    Illegal values are returned as None:</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; mysql_timestamp_converter('2007-02-31 22:32:17') is None</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"><tt class="py-docstring">      &gt;&gt;&gt; mysql_timestamp_converter('00000000000000') is None</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"><tt class="py-docstring">      True</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">        <tt class="py-name">timestamp</tt> <tt class="py-op">=</tt> <tt class="py-name">timestamp</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-73', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'-'</tt><tt class="py-op">:</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-74" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_datetime()=web2py.gluon.contrib.pymysql.converters-module.html#convert_datetime"><a title="web2py.gluon.contrib.pymysql.converters.convert_datetime" class="py-name" href="#" onclick="return doclink('link-74', 'convert_datetime', 'link-74');">convert_datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">,</tt> <tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">timestamp</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">    <tt class="py-name">timestamp</tt> <tt class="py-op">+=</tt> <tt class="py-string">"0"</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">14</tt><tt class="py-op">-</tt><tt id="link-75" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-75', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-comment"># padding</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">    <tt id="link-76" class="py-name" targets="Method web2py.gluon.dal.Expression.year()=web2py.gluon.dal.Expression-class.html#year"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-76', 'year', 'link-76');">year</a></tt><tt class="py-op">,</tt> <tt id="link-77" class="py-name" targets="Method web2py.gluon.dal.Expression.month()=web2py.gluon.dal.Expression-class.html#month"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-77', 'month', 'link-77');">month</a></tt><tt class="py-op">,</tt> <tt id="link-78" class="py-name" targets="Method web2py.gluon.dal.Expression.day()=web2py.gluon.dal.Expression-class.html#day"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-78', 'day', 'link-78');">day</a></tt><tt class="py-op">,</tt> <tt id="link-79" class="py-name"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-79', 'hour', 'link-36');">hour</a></tt><tt class="py-op">,</tt> <tt class="py-name">minute</tt><tt class="py-op">,</tt> <tt class="py-name">second</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">        <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">:</tt><tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> \ </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">        <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">:</tt><tt class="py-number">10</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-number">10</tt><tt class="py-op">:</tt><tt class="py-number">12</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">[</tt><tt class="py-number">12</tt><tt class="py-op">:</tt><tt class="py-number">14</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-80" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-80', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-81', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-82', 'year', 'link-76');">year</a></tt><tt class="py-op">,</tt> <tt id="link-83" class="py-name"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-83', 'month', 'link-77');">month</a></tt><tt class="py-op">,</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-84', 'day', 'link-78');">day</a></tt><tt class="py-op">,</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-85', 'hour', 'link-36');">hour</a></tt><tt class="py-op">,</tt> <tt class="py-name">minute</tt><tt class="py-op">,</tt> <tt class="py-name">second</tt><tt class="py-op">)</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"> </tt>
<a name="convert_set"></a><div id="convert_set-def"><a name="L247"></a><tt class="py-lineno">247</tt> <a class="py-toggle" href="#" id="convert_set-toggle" onclick="return toggle('convert_set');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_set">convert_set</a><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_set-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_set-expanded"><a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt id="link-86" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-86', 's', 'link-35');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">","</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line"> </tt>
<a name="convert_bit"></a><div id="convert_bit-def"><a name="L250"></a><tt class="py-lineno">250</tt> <a class="py-toggle" href="#" id="convert_bit-toggle" onclick="return toggle('convert_bit');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_bit">convert_bit</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_bit-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_bit-expanded"><a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">    <tt class="py-comment">#b = "\x00" * (8 - len(b)) + b # pad w/ zeroes</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#return struct.unpack("&gt;Q", b)[0]</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># the snippet above is right, but MySQLdb doesn't process bits,</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># so we shouldn't either</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">return</tt> <tt id="link-87" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-87', 'b', 'link-87');">b</a></tt> </tt>
</div><a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"> </tt>
<a name="convert_characters"></a><div id="convert_characters-def"><a name="L258"></a><tt class="py-lineno">258</tt> <a class="py-toggle" href="#" id="convert_characters-toggle" onclick="return toggle('convert_characters');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_characters">convert_characters</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_characters-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_characters-expanded"><a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">    <tt class="py-name">field_charset</tt> <tt class="py-op">=</tt> <tt class="py-name">charset_by_id</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">charsetnr</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-88', 'name', 'link-88');">name</a></tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">flags</tt> <tt class="py-op">&amp;</tt> <tt class="py-name">FLAG</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SET"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET" class="py-name" href="#" onclick="return doclink('link-89', 'SET', 'link-89');">SET</a></tt><tt class="py-op">:</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-90" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_set()=web2py.gluon.contrib.pymysql.converters-module.html#convert_set"><a title="web2py.gluon.contrib.pymysql.converters.convert_set" class="py-name" href="#" onclick="return doclink('link-90', 'convert_set', 'link-90');">convert_set</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-91', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">field_charset</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">flags</tt> <tt class="py-op">&amp;</tt> <tt class="py-name">FLAG</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name" targets="Variable psycopg2.BINARY=psycopg2-module.html#BINARY,Variable web2py.gluon.contrib.pymysql.BINARY=web2py.gluon.contrib.pymysql-module.html#BINARY"><a title="psycopg2.BINARY
web2py.gluon.contrib.pymysql.BINARY" class="py-name" href="#" onclick="return doclink('link-92', 'BINARY', 'link-92');">BINARY</a></tt><tt class="py-op">:</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">use_unicode</tt><tt class="py-op">:</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-93', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">field_charset</tt><tt class="py-op">)</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt> <tt class="py-op">!=</tt> <tt class="py-name">field_charset</tt><tt class="py-op">:</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-94', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">field_charset</tt><tt class="py-op">)</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-95', 'encode', 'link-11');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-96', 'decode', 'link-9');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">connection</tt><tt class="py-op">.</tt><tt class="py-name">charset</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
</div><a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"> </tt>
<a name="convert_int"></a><div id="convert_int-def"><a name="L274"></a><tt class="py-lineno">274</tt> <a class="py-toggle" href="#" id="convert_int-toggle" onclick="return toggle('convert_int');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_int">convert_int</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_int-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_int-expanded"><a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"> </tt>
<a name="convert_long"></a><div id="convert_long-def"><a name="L277"></a><tt class="py-lineno">277</tt> <a class="py-toggle" href="#" id="convert_long-toggle" onclick="return toggle('convert_long');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_long">convert_long</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_long-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_long-expanded"><a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line"> </tt>
<a name="convert_float"></a><div id="convert_float-def"><a name="L280"></a><tt class="py-lineno">280</tt> <a class="py-toggle" href="#" id="convert_float-toggle" onclick="return toggle('convert_float');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_float">convert_float</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_float-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="convert_float-expanded"><a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line"> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line"><tt id="link-97" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.encoders" class="py-name" href="#" onclick="return doclink('link-97', 'encoders', 'link-10');">encoders</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt class="py-name">bool</tt><tt class="py-op">:</tt> <tt id="link-98" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_bool()=web2py.gluon.contrib.pymysql.converters-module.html#escape_bool"><a title="web2py.gluon.contrib.pymysql.converters.escape_bool" class="py-name" href="#" onclick="return doclink('link-98', 'escape_bool', 'link-98');">escape_bool</a></tt><tt class="py-op">,</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt class="py-name">int</tt><tt class="py-op">:</tt> <tt class="py-name">escape_int</tt><tt class="py-op">,</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-name">long</tt><tt class="py-op">:</tt> <tt class="py-name">escape_long</tt><tt class="py-op">,</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">        <tt class="py-name">float</tt><tt class="py-op">:</tt> <tt id="link-99" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_float()=web2py.gluon.contrib.pymysql.converters-module.html#escape_float"><a title="web2py.gluon.contrib.pymysql.converters.escape_float" class="py-name" href="#" onclick="return doclink('link-99', 'escape_float', 'link-99');">escape_float</a></tt><tt class="py-op">,</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">        <tt class="py-name">str</tt><tt class="py-op">:</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_string" class="py-name" href="#" onclick="return doclink('link-100', 'escape_string', 'link-26');">escape_string</a></tt><tt class="py-op">,</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">        <tt class="py-name">unicode</tt><tt class="py-op">:</tt> <tt id="link-101" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_unicode()=web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode,Function web2py.gluon.validators.escape_unicode()=web2py.gluon.validators-module.html#escape_unicode"><a title="web2py.gluon.contrib.pymysql.converters.escape_unicode
web2py.gluon.validators.escape_unicode" class="py-name" href="#" onclick="return doclink('link-101', 'escape_unicode', 'link-101');">escape_unicode</a></tt><tt class="py-op">,</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">        <tt class="py-name">tuple</tt><tt class="py-op">:</tt> <tt id="link-102" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_sequence" class="py-name" href="#" onclick="return doclink('link-102', 'escape_sequence', 'link-7');">escape_sequence</a></tt><tt class="py-op">,</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">        <tt class="py-name">list</tt><tt class="py-op">:</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_sequence" class="py-name" href="#" onclick="return doclink('link-103', 'escape_sequence', 'link-7');">escape_sequence</a></tt><tt class="py-op">,</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">        <tt class="py-name">set</tt><tt class="py-op">:</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_sequence" class="py-name" href="#" onclick="return doclink('link-104', 'escape_sequence', 'link-7');">escape_sequence</a></tt><tt class="py-op">,</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">        <tt class="py-name">dict</tt><tt class="py-op">:</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_dict" class="py-name" href="#" onclick="return doclink('link-105', 'escape_dict', 'link-8');">escape_dict</a></tt><tt class="py-op">,</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">        <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt id="link-106" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_None()=web2py.gluon.contrib.pymysql.converters-module.html#escape_None"><a title="web2py.gluon.contrib.pymysql.converters.escape_None" class="py-name" href="#" onclick="return doclink('link-106', 'escape_None', 'link-106');">escape_None</a></tt><tt class="py-op">,</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">        <tt id="link-107" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-107', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-108', 'date', 'link-70');">date</a></tt><tt class="py-op">:</tt> <tt id="link-109" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_date()=web2py.gluon.contrib.pymysql.converters-module.html#escape_date"><a title="web2py.gluon.contrib.pymysql.converters.escape_date" class="py-name" href="#" onclick="return doclink('link-109', 'escape_date', 'link-109');">escape_date</a></tt><tt class="py-op">,</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt id="link-110" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-110', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-111', 'datetime', 'link-0');">datetime</a></tt> <tt class="py-op">:</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_datetime" class="py-name" href="#" onclick="return doclink('link-112', 'escape_datetime', 'link-42');">escape_datetime</a></tt><tt class="py-op">,</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">        <tt id="link-113" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-113', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt> <tt class="py-op">:</tt> <tt id="link-114" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_timedelta()=web2py.gluon.contrib.pymysql.converters-module.html#escape_timedelta"><a title="web2py.gluon.contrib.pymysql.converters.escape_timedelta" class="py-name" href="#" onclick="return doclink('link-114', 'escape_timedelta', 'link-114');">escape_timedelta</a></tt><tt class="py-op">,</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">        <tt id="link-115" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-115', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-116', 'time', 'link-1');">time</a></tt> <tt class="py-op">:</tt> <tt id="link-117" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_time()=web2py.gluon.contrib.pymysql.converters-module.html#escape_time"><a title="web2py.gluon.contrib.pymysql.converters.escape_time" class="py-name" href="#" onclick="return doclink('link-117', 'escape_time', 'link-117');">escape_time</a></tt><tt class="py-op">,</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">        <tt id="link-118" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-118', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">struct_time</tt> <tt class="py-op">:</tt> <tt id="link-119" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_struct_time()=web2py.gluon.contrib.pymysql.converters-module.html#escape_struct_time"><a title="web2py.gluon.contrib.pymysql.converters.escape_struct_time" class="py-name" href="#" onclick="return doclink('link-119', 'escape_struct_time', 'link-119');">escape_struct_time</a></tt><tt class="py-op">,</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">        <tt class="py-op">}</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line"> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line"><tt id="link-120" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.converters.decoders=web2py.gluon.contrib.pymysql.converters-module.html#decoders"><a title="web2py.gluon.contrib.pymysql.converters.decoders" class="py-name" href="#" onclick="return doclink('link-120', 'decoders', 'link-120');">decoders</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">        <tt id="link-121" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-121', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-122" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BIT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BIT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BIT" class="py-name" href="#" onclick="return doclink('link-122', 'BIT', 'link-122');">BIT</a></tt><tt class="py-op">:</tt> <tt id="link-123" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_bit()=web2py.gluon.contrib.pymysql.converters-module.html#convert_bit"><a title="web2py.gluon.contrib.pymysql.converters.convert_bit" class="py-name" href="#" onclick="return doclink('link-123', 'convert_bit', 'link-123');">convert_bit</a></tt><tt class="py-op">,</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">        <tt id="link-124" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-124', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-125" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY" class="py-name" href="#" onclick="return doclink('link-125', 'TINY', 'link-125');">TINY</a></tt><tt class="py-op">:</tt> <tt id="link-126" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_int()=web2py.gluon.contrib.pymysql.converters-module.html#convert_int"><a title="web2py.gluon.contrib.pymysql.converters.convert_int" class="py-name" href="#" onclick="return doclink('link-126', 'convert_int', 'link-126');">convert_int</a></tt><tt class="py-op">,</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">        <tt id="link-127" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-127', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-128" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SHORT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#SHORT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SHORT" class="py-name" href="#" onclick="return doclink('link-128', 'SHORT', 'link-128');">SHORT</a></tt><tt class="py-op">:</tt> <tt id="link-129" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_int" class="py-name" href="#" onclick="return doclink('link-129', 'convert_int', 'link-126');">convert_int</a></tt><tt class="py-op">,</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">        <tt id="link-130" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-130', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-131" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG" class="py-name" href="#" onclick="return doclink('link-131', 'LONG', 'link-131');">LONG</a></tt><tt class="py-op">:</tt> <tt id="link-132" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_long()=web2py.gluon.contrib.pymysql.converters-module.html#convert_long"><a title="web2py.gluon.contrib.pymysql.converters.convert_long" class="py-name" href="#" onclick="return doclink('link-132', 'convert_long', 'link-132');">convert_long</a></tt><tt class="py-op">,</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">        <tt id="link-133" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-133', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-134" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#FLOAT"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.FLOAT" class="py-name" href="#" onclick="return doclink('link-134', 'FLOAT', 'link-134');">FLOAT</a></tt><tt class="py-op">:</tt> <tt id="link-135" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_float()=web2py.gluon.contrib.pymysql.converters-module.html#convert_float"><a title="web2py.gluon.contrib.pymysql.converters.convert_float" class="py-name" href="#" onclick="return doclink('link-135', 'convert_float', 'link-135');">convert_float</a></tt><tt class="py-op">,</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">        <tt id="link-136" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-136', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-137" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DOUBLE"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DOUBLE" class="py-name" href="#" onclick="return doclink('link-137', 'DOUBLE', 'link-137');">DOUBLE</a></tt><tt class="py-op">:</tt> <tt id="link-138" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_float" class="py-name" href="#" onclick="return doclink('link-138', 'convert_float', 'link-135');">convert_float</a></tt><tt class="py-op">,</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">        <tt id="link-139" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-139', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-140" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DECIMAL"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL" class="py-name" href="#" onclick="return doclink('link-140', 'DECIMAL', 'link-140');">DECIMAL</a></tt><tt class="py-op">:</tt> <tt id="link-141" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_float" class="py-name" href="#" onclick="return doclink('link-141', 'convert_float', 'link-135');">convert_float</a></tt><tt class="py-op">,</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt id="link-142" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-142', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-143" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#NEWDECIMAL"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL" class="py-name" href="#" onclick="return doclink('link-143', 'NEWDECIMAL', 'link-143');">NEWDECIMAL</a></tt><tt class="py-op">:</tt> <tt id="link-144" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_float" class="py-name" href="#" onclick="return doclink('link-144', 'convert_float', 'link-135');">convert_float</a></tt><tt class="py-op">,</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">        <tt id="link-145" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-145', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-146" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONGLONG"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONGLONG" class="py-name" href="#" onclick="return doclink('link-146', 'LONGLONG', 'link-146');">LONGLONG</a></tt><tt class="py-op">:</tt> <tt id="link-147" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_long" class="py-name" href="#" onclick="return doclink('link-147', 'convert_long', 'link-132');">convert_long</a></tt><tt class="py-op">,</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">        <tt id="link-148" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-148', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#INT24"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.INT24" class="py-name" href="#" onclick="return doclink('link-149', 'INT24', 'link-149');">INT24</a></tt><tt class="py-op">:</tt> <tt id="link-150" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_int" class="py-name" href="#" onclick="return doclink('link-150', 'convert_int', 'link-126');">convert_int</a></tt><tt class="py-op">,</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">        <tt id="link-151" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-151', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-152" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#YEAR"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.YEAR" class="py-name" href="#" onclick="return doclink('link-152', 'YEAR', 'link-152');">YEAR</a></tt><tt class="py-op">:</tt> <tt id="link-153" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_int" class="py-name" href="#" onclick="return doclink('link-153', 'convert_int', 'link-126');">convert_int</a></tt><tt class="py-op">,</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">        <tt id="link-154" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-154', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-155" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.TIMESTAMP=web2py.gluon.contrib.pymysql-module.html#TIMESTAMP,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIMESTAMP"><a title="web2py.gluon.contrib.pymysql.TIMESTAMP
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIMESTAMP" class="py-name" href="#" onclick="return doclink('link-155', 'TIMESTAMP', 'link-155');">TIMESTAMP</a></tt><tt class="py-op">:</tt> <tt id="link-156" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_mysql_timestamp()=web2py.gluon.contrib.pymysql.converters-module.html#convert_mysql_timestamp"><a title="web2py.gluon.contrib.pymysql.converters.convert_mysql_timestamp" class="py-name" href="#" onclick="return doclink('link-156', 'convert_mysql_timestamp', 'link-156');">convert_mysql_timestamp</a></tt><tt class="py-op">,</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">        <tt id="link-157" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-157', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-158" class="py-name" targets="Variable psycopg2.DATETIME=psycopg2-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.DATETIME=web2py.gluon.contrib.pymysql-module.html#DATETIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATETIME"><a title="psycopg2.DATETIME
web2py.gluon.contrib.pymysql.DATETIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATETIME" class="py-name" href="#" onclick="return doclink('link-158', 'DATETIME', 'link-158');">DATETIME</a></tt><tt class="py-op">:</tt> <tt id="link-159" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_datetime" class="py-name" href="#" onclick="return doclink('link-159', 'convert_datetime', 'link-74');">convert_datetime</a></tt><tt class="py-op">,</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">        <tt id="link-160" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-160', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-161" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.TIME=web2py.gluon.contrib.pymysql-module.html#TIME,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TIME"><a title="web2py.gluon.contrib.pymysql.TIME
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TIME" class="py-name" href="#" onclick="return doclink('link-161', 'TIME', 'link-161');">TIME</a></tt><tt class="py-op">:</tt> <tt id="link-162" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_timedelta()=web2py.gluon.contrib.pymysql.converters-module.html#convert_timedelta"><a title="web2py.gluon.contrib.pymysql.converters.convert_timedelta" class="py-name" href="#" onclick="return doclink('link-162', 'convert_timedelta', 'link-162');">convert_timedelta</a></tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">        <tt id="link-163" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-163', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-164" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.DATE=web2py.gluon.contrib.pymysql-module.html#DATE,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#DATE"><a title="web2py.gluon.contrib.pymysql.DATE
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DATE" class="py-name" href="#" onclick="return doclink('link-164', 'DATE', 'link-164');">DATE</a></tt><tt class="py-op">:</tt> <tt id="link-165" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_date" class="py-name" href="#" onclick="return doclink('link-165', 'convert_date', 'link-46');">convert_date</a></tt><tt class="py-op">,</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt id="link-166" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-166', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.SET" class="py-name" href="#" onclick="return doclink('link-167', 'SET', 'link-89');">SET</a></tt><tt class="py-op">:</tt> <tt id="link-168" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_set" class="py-name" href="#" onclick="return doclink('link-168', 'convert_set', 'link-90');">convert_set</a></tt><tt class="py-op">,</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt id="link-169" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-169', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-170" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.BLOB" class="py-name" href="#" onclick="return doclink('link-170', 'BLOB', 'link-170');">BLOB</a></tt><tt class="py-op">:</tt> <tt id="link-171" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_characters()=web2py.gluon.contrib.pymysql.converters-module.html#convert_characters"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-171', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">        <tt id="link-172" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-172', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-173" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#TINY_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.TINY_BLOB" class="py-name" href="#" onclick="return doclink('link-173', 'TINY_BLOB', 'link-173');">TINY_BLOB</a></tt><tt class="py-op">:</tt> <tt id="link-174" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-174', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">        <tt id="link-175" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-175', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-176" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#MEDIUM_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.MEDIUM_BLOB" class="py-name" href="#" onclick="return doclink('link-176', 'MEDIUM_BLOB', 'link-176');">MEDIUM_BLOB</a></tt><tt class="py-op">:</tt> <tt id="link-177" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-177', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">        <tt id="link-178" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-178', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-179" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#LONG_BLOB"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.LONG_BLOB" class="py-name" href="#" onclick="return doclink('link-179', 'LONG_BLOB', 'link-179');">LONG_BLOB</a></tt><tt class="py-op">:</tt> <tt id="link-180" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-180', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">        <tt id="link-181" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-181', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-182" class="py-name" targets="Variable psycopg2.STRING=psycopg2-module.html#STRING,Variable web2py.gluon.contrib.pymysql.STRING=web2py.gluon.contrib.pymysql-module.html#STRING,Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#STRING"><a title="psycopg2.STRING
web2py.gluon.contrib.pymysql.STRING
web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.STRING" class="py-name" href="#" onclick="return doclink('link-182', 'STRING', 'link-182');">STRING</a></tt><tt class="py-op">:</tt> <tt id="link-183" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-183', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">        <tt id="link-184" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-184', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-185" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VAR_STRING"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VAR_STRING" class="py-name" href="#" onclick="return doclink('link-185', 'VAR_STRING', 'link-185');">VAR_STRING</a></tt><tt class="py-op">:</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-186', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line">        <tt id="link-187" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-187', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-188" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VARCHAR=web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html#VARCHAR"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.VARCHAR" class="py-name" href="#" onclick="return doclink('link-188', 'VARCHAR', 'link-188');">VARCHAR</a></tt><tt class="py-op">:</tt> <tt id="link-189" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_characters" class="py-name" href="#" onclick="return doclink('link-189', 'convert_characters', 'link-171');">convert_characters</a></tt><tt class="py-op">,</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">        <tt class="py-comment">#FIELD_TYPE.BLOB: str,</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">        <tt class="py-comment">#FIELD_TYPE.STRING: str,</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">        <tt class="py-comment">#FIELD_TYPE.VAR_STRING: str,</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">        <tt class="py-comment">#FIELD_TYPE.VARCHAR: str</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">        <tt class="py-op">}</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line"><tt id="link-190" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.converters.conversions=web2py.gluon.contrib.pymysql.converters-module.html#conversions"><a title="web2py.gluon.contrib.pymysql.converters.conversions" class="py-name" href="#" onclick="return doclink('link-190', 'conversions', 'link-190');">conversions</a></tt> <tt class="py-op">=</tt> <tt id="link-191" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.decoders" class="py-name" href="#" onclick="return doclink('link-191', 'decoders', 'link-120');">decoders</a></tt>  <tt class="py-comment"># for MySQLdb compatibility</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line"> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">    <tt class="py-comment"># python version &gt; 2.3</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">from</tt> <tt class="py-name">decimal</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Decimal</tt> </tt>
<a name="convert_decimal"></a><div id="convert_decimal-def"><a name="L336"></a><tt class="py-lineno">336</tt> <a class="py-toggle" href="#" id="convert_decimal-toggle" onclick="return toggle('convert_decimal');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#convert_decimal">convert_decimal</a><tt class="py-op">(</tt><tt class="py-param">connection</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="convert_decimal-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="convert_decimal-expanded"><a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">Decimal</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">    <tt id="link-192" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.decoders" class="py-name" href="#" onclick="return doclink('link-192', 'decoders', 'link-120');">decoders</a></tt><tt class="py-op">[</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-193', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.DECIMAL" class="py-name" href="#" onclick="return doclink('link-194', 'DECIMAL', 'link-140');">DECIMAL</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-195" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.convert_decimal()=web2py.gluon.contrib.pymysql.converters-module.html#convert_decimal"><a title="web2py.gluon.contrib.pymysql.converters.convert_decimal" class="py-name" href="#" onclick="return doclink('link-195', 'convert_decimal', 'link-195');">convert_decimal</a></tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">    <tt id="link-196" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.decoders" class="py-name" href="#" onclick="return doclink('link-196', 'decoders', 'link-120');">decoders</a></tt><tt class="py-op">[</tt><tt id="link-197" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE" class="py-name" href="#" onclick="return doclink('link-197', 'FIELD_TYPE', 'link-3');">FIELD_TYPE</a></tt><tt class="py-op">.</tt><tt id="link-198" class="py-name"><a title="web2py.gluon.contrib.pymysql.constants.FIELD_TYPE.NEWDECIMAL" class="py-name" href="#" onclick="return doclink('link-198', 'NEWDECIMAL', 'link-143');">NEWDECIMAL</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.convert_decimal" class="py-name" href="#" onclick="return doclink('link-199', 'convert_decimal', 'link-195');">convert_decimal</a></tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"> </tt>
<a name="escape_decimal"></a><div id="escape_decimal-def"><a name="L341"></a><tt class="py-lineno">341</tt> <a class="py-toggle" href="#" id="escape_decimal-toggle" onclick="return toggle('escape_decimal');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.contrib.pymysql.converters-module.html#escape_decimal">escape_decimal</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_decimal-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="escape_decimal-expanded"><a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">unicode</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
</div><a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">    <tt id="link-200" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.encoders" class="py-name" href="#" onclick="return doclink('link-200', 'encoders', 'link-10');">encoders</a></tt><tt class="py-op">[</tt><tt class="py-name">Decimal</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-201" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_decimal()=web2py.gluon.contrib.pymysql.converters-module.html#escape_decimal"><a title="web2py.gluon.contrib.pymysql.converters.escape_decimal" class="py-name" href="#" onclick="return doclink('link-201', 'escape_decimal', 'link-201');">escape_decimal</a></tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.DataError-class.html version [ce29a6d9ad].


















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.DataError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;DataError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.DataError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DataError</h1><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
                      MySQLError --+        
                                   |        
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+    
                                       |    
                           <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">DataError</strong>
</pre>

<hr />
Exception raised for errors that are due to problems with the 
  processed data like division by zero, numeric value out of range, 
  etc.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.DatabaseError-class.html version [c1d0dcc6c7].
























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.DatabaseError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;DatabaseError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DatabaseError</h1><br /><br />
<pre class="base-tree">
              object --+                
                       |                
exceptions.BaseException --+            
                           |            
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+        
                               |        
                      MySQLError --+    
                                   |    
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+
                                       |
                                      <strong class="uidshort">DatabaseError</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.contrib.pymysql.err.DataError-class.html">DataError</a>,
    <a href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html">IntegrityError</a>,
    <a href="web2py.gluon.contrib.pymysql.err.InternalError-class.html">InternalError</a>,
    <a href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html">NotSupportedError</a>,
    <a href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html">OperationalError</a>,
    <a href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html">ProgrammingError</a>
</dd></dl>

<hr />
Exception raised for errors that are related to the database.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.Error-class.html version [f786a98fc1].



















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.Error</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;Error
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.Error-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Error</h1><br /><br />
<pre class="base-tree">
              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+    
                               |    
                      MySQLError --+
                                   |
                                  <strong class="uidshort">Error</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a>,
    <a href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html">InterfaceError</a>
</dd></dl>

<hr />
Exception that is the base class of all other error exceptions (not 
  Warning).<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.IntegrityError-class.html version [0e493dd542].

















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.IntegrityError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;IntegrityError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.IntegrityError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IntegrityError</h1><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
                      MySQLError --+        
                                   |        
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+    
                                       |    
                           <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">IntegrityError</strong>
</pre>

<hr />
Exception raised when the relational integrity of the database is 
  affected, e.g. a foreign key check fails, duplicate key, etc.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.InterfaceError-class.html version [1048eca9be].















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.InterfaceError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;InterfaceError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.InterfaceError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class InterfaceError</h1><br /><br />
<pre class="base-tree">
              object --+                
                       |                
exceptions.BaseException --+            
                           |            
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+        
                               |        
                      MySQLError --+    
                                   |    
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+
                                       |
                                      <strong class="uidshort">InterfaceError</strong>
</pre>

<hr />
Exception raised for errors that are related to the database interface
  rather than the database itself.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.InternalError-class.html version [2e6096c089].

















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.InternalError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;InternalError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.InternalError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class InternalError</h1><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
                      MySQLError --+        
                                   |        
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+    
                                       |    
                           <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">InternalError</strong>
</pre>

<hr />
Exception raised when the database encounters an internal error, e.g. 
  the cursor is not valid anymore, the transaction is out of sync, etc.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html version [f170f4c50c].



















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.NotSupportedError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;NotSupportedError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class NotSupportedError</h1><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
                      MySQLError --+        
                                   |        
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+    
                                       |    
                           <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">NotSupportedError</strong>
</pre>

<hr />
Exception raised in case a method or database API was used which is 
  not supported by the database, e.g. requesting a .rollback() on a 
  connection that does not support transaction or has transactions turned 
  off.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.OperationalError-class.html version [4c5245a8ef].




















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.OperationalError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;OperationalError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.OperationalError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OperationalError</h1><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
                      MySQLError --+        
                                   |        
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+    
                                       |    
                           <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">OperationalError</strong>
</pre>

<hr />
Exception raised for errors that are related to the database's 
  operation and not necessarily under the control of the programmer, e.g. 
  an unexpected disconnect occurs, the data source name is not found, a 
  transaction could not be processed, a memory allocation error occurred 
  during processing, etc.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html version [a8eb2e37c9].


















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.ProgrammingError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;ProgrammingError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ProgrammingError</h1><br /><br />
<pre class="base-tree">
              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+            
                               |            
                      MySQLError --+        
                                   |        
                               <a href="web2py.gluon.contrib.pymysql.err.Error-class.html">Error</a> --+    
                                       |    
                           <a href="web2py.gluon.contrib.pymysql.err.DatabaseError-class.html">DatabaseError</a> --+
                                           |
                                          <strong class="uidshort">ProgrammingError</strong>
</pre>

<hr />
Exception raised for programming errors, e.g. table not found or 
  already exists, syntax error in the SQL statement, wrong number of 
  parameters specified, etc.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.Warning-class.html version [556300840f].





















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.contrib.pymysql.err.Warning</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Package&nbsp;contrib ::
        <a href="web2py.gluon.contrib.pymysql-module.html">Package&nbsp;pymysql</a> ::
        Module&nbsp;err ::
        Class&nbsp;Warning
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.contrib.pymysql.err.Warning-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Warning</h1><br /><br />
<pre class="base-tree">
              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+    
                               |    
              exceptions.Warning --+
                                   |
              object --+           |
                       |           |
exceptions.BaseException --+       |
                           |       |
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+   |
                               |   |
                      MySQLError --+
                                   |
                                  <strong class="uidshort">Warning</strong>
</pre>

<hr />
Exception raised for important warnings like data truncations while 
  inserting, etc.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Warning</code></b>:
      <code>__init__</code>,
      <code>__new__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.custom_import-module.html version [c401a77d12].

































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.custom_import</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;custom_import
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.custom_import-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module custom_import</h1><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.custom_import._BaseImporter-class.html" class="summary-name">_BaseImporter</a><br />
      The base importer.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.custom_import._DateTrackerImporter-class.html" class="summary-name">_DateTrackerImporter</a><br />
      An importer tracking the date of the module files and reloading 
        them when they have changed.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.custom_import._Web2pyImporter-class.html" class="summary-name">_Web2pyImporter</a><br />
      The standard web2py importer.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html" class="summary-name">_Web2pyDateTrackerImporter</a><br />
      Like _Web2pyImporter but using a _DateTrackerImporter.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="custom_import_install"></a><span class="summary-sig-name">custom_import_install</span>(<span class="summary-sig-arg">web2py_path</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#custom_import_install">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import-module.html#is_tracking_changes" class="summary-sig-name">is_tracking_changes</a>()</span><br />
      Returns:
      True: neo_importer is tracking changes made to Python source 
      files.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#is_tracking_changes">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import-module.html#track_changes" class="summary-sig-name">track_changes</a>(<span class="summary-sig-arg">track</span>=<span class="summary-sig-default">True</span>)</span><br />
      Tell neo_importer to start/stop tracking changes made to Python 
      modules.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#track_changes">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_web2py_importer"></a><span class="summary-name">_web2py_importer</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_web2py_date_tracker_importer"></a><span class="summary-name">_web2py_date_tracker_importer</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_web2py_path"></a><span class="summary-name">_web2py_path</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_is_tracking_changes"></a><span class="summary-name">_is_tracking_changes</span> = <code title="True">True</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="is_tracking_changes"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">is_tracking_changes</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#is_tracking_changes">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>True: neo_importer is tracking changes made to Python source 
          files. False: neo_import does not reload Python modules.</dd>
  </dl>
</td></tr></table>
</div>
<a name="track_changes"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">track_changes</span>(<span class="sig-arg">track</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#track_changes">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Tell neo_importer to start/stop tracking changes made to Python 
  modules.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>track</code></strong> - True: Start tracking changes. False: Stop tracking 
          changes.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.custom_import-pysrc.html version [a03ed4d47f].















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.custom_import</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;custom_import
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.custom_import-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.custom_import-module.html">Module web2py.gluon.custom_import</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">__builtin__</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">threading</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment"># Install the new import function:</tt> </tt>
<a name="custom_import_install"></a><div id="custom_import_install-def"><a name="L11"></a><tt class="py-lineno"> 11</tt> <a class="py-toggle" href="#" id="custom_import_install-toggle" onclick="return toggle('custom_import_install');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import-module.html#custom_import_install">custom_import_install</a><tt class="py-op">(</tt><tt class="py-param">web2py_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="custom_import_install-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="custom_import_install-expanded"><a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line">        <tt class="py-keyword">global</tt> <tt id="link-0" class="py-name" targets="Variable web2py.gluon.custom_import._web2py_importer=web2py.gluon.custom_import-module.html#_web2py_importer"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-0', '_web2py_importer', 'link-0');">_web2py_importer</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">        <tt class="py-keyword">global</tt> <tt id="link-1" class="py-name" targets="Variable web2py.gluon.custom_import._web2py_path=web2py.gluon.custom_import-module.html#_web2py_path"><a title="web2py.gluon.custom_import._web2py_path" class="py-name" href="#" onclick="return doclink('link-1', '_web2py_path', 'link-1');">_web2py_path</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-2" class="py-name"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-2', '_web2py_importer', 'link-0');">_web2py_importer</a></tt><tt class="py-op">:</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt>  <tt class="py-comment"># Already installed</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">        <tt id="link-3" class="py-name"><a title="web2py.gluon.custom_import._web2py_path" class="py-name" href="#" onclick="return doclink('link-3', '_web2py_path', 'link-1');">_web2py_path</a></tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name" targets="Variable web2py.gluon.main.web2py_path=web2py.gluon.main-module.html#web2py_path"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-4', 'web2py_path', 'link-4');">web2py_path</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">        <tt id="link-5" class="py-name"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-5', '_web2py_importer', 'link-0');">_web2py_importer</a></tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name" targets="Class web2py.gluon.custom_import._Web2pyImporter=web2py.gluon.custom_import._Web2pyImporter-class.html"><a title="web2py.gluon.custom_import._Web2pyImporter" class="py-name" href="#" onclick="return doclink('link-6', '_Web2pyImporter', 'link-6');">_Web2pyImporter</a></tt><tt class="py-op">(</tt><tt id="link-7" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-7', 'web2py_path', 'link-4');">web2py_path</a></tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">        <tt class="py-name">__builtin__</tt><tt class="py-op">.</tt><tt class="py-name">__import__</tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-8', '_web2py_importer', 'link-0');">_web2py_importer</a></tt> </tt>
</div><a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="is_tracking_changes"></a><div id="is_tracking_changes-def"><a name="L20"></a><tt class="py-lineno"> 20</tt> <a class="py-toggle" href="#" id="is_tracking_changes-toggle" onclick="return toggle('is_tracking_changes');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import-module.html#is_tracking_changes">is_tracking_changes</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="is_tracking_changes-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="is_tracking_changes-expanded"><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">    @return: True: neo_importer is tracking changes made to Python source</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">    files. False: neo_import does not reload Python modules.</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-9" class="py-name" targets="Variable web2py.gluon.custom_import._is_tracking_changes=web2py.gluon.custom_import-module.html#_is_tracking_changes"><a title="web2py.gluon.custom_import._is_tracking_changes" class="py-name" href="#" onclick="return doclink('link-9', '_is_tracking_changes', 'link-9');">_is_tracking_changes</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-10" class="py-name"><a title="web2py.gluon.custom_import._is_tracking_changes" class="py-name" href="#" onclick="return doclink('link-10', '_is_tracking_changes', 'link-9');">_is_tracking_changes</a></tt> </tt>
</div><a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="track_changes"></a><div id="track_changes-def"><a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="track_changes-toggle" onclick="return toggle('track_changes');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import-module.html#track_changes">track_changes</a><tt class="py-op">(</tt><tt class="py-param">track</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="track_changes-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="track_changes-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">    Tell neo_importer to start/stop tracking changes made to Python modules.</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">    @param track: True: Start tracking changes. False: Stop tracking changes.</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-11" class="py-name"><a title="web2py.gluon.custom_import._is_tracking_changes" class="py-name" href="#" onclick="return doclink('link-11', '_is_tracking_changes', 'link-9');">_is_tracking_changes</a></tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-12', '_web2py_importer', 'link-0');">_web2py_importer</a></tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-13" class="py-name" targets="Variable web2py.gluon.custom_import._web2py_date_tracker_importer=web2py.gluon.custom_import-module.html#_web2py_date_tracker_importer"><a title="web2py.gluon.custom_import._web2py_date_tracker_importer" class="py-name" href="#" onclick="return doclink('link-13', '_web2py_date_tracker_importer', 'link-13');">_web2py_date_tracker_importer</a></tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-keyword">assert</tt> <tt class="py-name">track</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt> <tt class="py-keyword">or</tt> <tt class="py-name">track</tt> <tt class="py-keyword">is</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-string">"Boolean expected."</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">track</tt> <tt class="py-op">==</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon.custom_import._is_tracking_changes" class="py-name" href="#" onclick="return doclink('link-14', '_is_tracking_changes', 'link-9');">_is_tracking_changes</a></tt><tt class="py-op">:</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">track</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-15" class="py-name"><a title="web2py.gluon.custom_import._web2py_date_tracker_importer" class="py-name" href="#" onclick="return doclink('link-15', '_web2py_date_tracker_importer', 'link-13');">_web2py_date_tracker_importer</a></tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">            <tt id="link-16" class="py-name"><a title="web2py.gluon.custom_import._web2py_date_tracker_importer" class="py-name" href="#" onclick="return doclink('link-16', '_web2py_date_tracker_importer', 'link-13');">_web2py_date_tracker_importer</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">              <tt id="link-17" class="py-name" targets="Class web2py.gluon.custom_import._Web2pyDateTrackerImporter=web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html"><a title="web2py.gluon.custom_import._Web2pyDateTrackerImporter" class="py-name" href="#" onclick="return doclink('link-17', '_Web2pyDateTrackerImporter', 'link-17');">_Web2pyDateTrackerImporter</a></tt><tt class="py-op">(</tt><tt id="link-18" class="py-name"><a title="web2py.gluon.custom_import._web2py_path" class="py-name" href="#" onclick="return doclink('link-18', '_web2py_path', 'link-1');">_web2py_path</a></tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-name">__builtin__</tt><tt class="py-op">.</tt><tt class="py-name">__import__</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.custom_import._web2py_date_tracker_importer" class="py-name" href="#" onclick="return doclink('link-19', '_web2py_date_tracker_importer', 'link-13');">_web2py_date_tracker_importer</a></tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-name">__builtin__</tt><tt class="py-op">.</tt><tt class="py-name">__import__</tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-20', '_web2py_importer', 'link-0');">_web2py_importer</a></tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt id="link-21" class="py-name"><a title="web2py.gluon.custom_import._is_tracking_changes" class="py-name" href="#" onclick="return doclink('link-21', '_is_tracking_changes', 'link-9');">_is_tracking_changes</a></tt> <tt class="py-op">=</tt> <tt class="py-name">track</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-name">_STANDARD_PYTHON_IMPORTER</tt> <tt class="py-op">=</tt> <tt class="py-name">__builtin__</tt><tt class="py-op">.</tt><tt class="py-name">__import__</tt> <tt class="py-comment"># Keep standard importer</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt id="link-22" class="py-name"><a title="web2py.gluon.custom_import._web2py_importer" class="py-name" href="#" onclick="return doclink('link-22', '_web2py_importer', 'link-0');">_web2py_importer</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># The standard web2py importer</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt id="link-23" class="py-name"><a title="web2py.gluon.custom_import._web2py_date_tracker_importer" class="py-name" href="#" onclick="return doclink('link-23', '_web2py_date_tracker_importer', 'link-13');">_web2py_date_tracker_importer</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># The web2py importer with date tracking</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt id="link-24" class="py-name"><a title="web2py.gluon.custom_import._web2py_path" class="py-name" href="#" onclick="return doclink('link-24', '_web2py_path', 'link-1');">_web2py_path</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># Absolute path of the web2py directory</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt id="link-25" class="py-name"><a title="web2py.gluon.custom_import._is_tracking_changes" class="py-name" href="#" onclick="return doclink('link-25', '_is_tracking_changes', 'link-9');">_is_tracking_changes</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> <tt class="py-comment"># The tracking mode</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="_BaseImporter"></a><div id="_BaseImporter-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="_BaseImporter-toggle" onclick="return toggle('_BaseImporter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_BaseImporter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_BaseImporter-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">    The base importer. Dispatch the import the call to the standard Python</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">    importer.</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"> </tt>
<a name="_BaseImporter.begin"></a><div id="_BaseImporter.begin-def"><a name="L63"></a><tt class="py-lineno"> 63</tt> <a class="py-toggle" href="#" id="_BaseImporter.begin-toggle" onclick="return toggle('_BaseImporter.begin');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._BaseImporter-class.html#begin">begin</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_BaseImporter.begin-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_BaseImporter.begin-expanded"><a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-docstring">        Many imports can be made for a single import statement. This method</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-docstring">        help the management of this aspect.</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
</div><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"> </tt>
<a name="_BaseImporter.__call__"></a><div id="_BaseImporter.__call__-def"><a name="L69"></a><tt class="py-lineno"> 69</tt> <a class="py-toggle" href="#" id="_BaseImporter.__call__-toggle" onclick="return toggle('_BaseImporter.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._BaseImporter-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">globals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">locals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">fromlist</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">level</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_BaseImporter.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_BaseImporter.__call__-expanded"><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">        The import method itself.</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_STANDARD_PYTHON_IMPORTER</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-26', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> <tt id="link-27" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-27', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">,</tt> <tt class="py-name">fromlist</tt><tt class="py-op">,</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">                                         <tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
</div><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="_BaseImporter.end"></a><div id="_BaseImporter.end-def"><a name="L76"></a><tt class="py-lineno"> 76</tt> <a class="py-toggle" href="#" id="_BaseImporter.end-toggle" onclick="return toggle('_BaseImporter.end');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._BaseImporter-class.html#end">end</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_BaseImporter.end-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_BaseImporter.end-expanded"><a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">        Needed for clean up.</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
</div></div><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter"></a><div id="_DateTrackerImporter-def"><a name="L82"></a><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter-toggle" onclick="return toggle('_DateTrackerImporter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a><tt class="py-op">(</tt><tt class="py-base-class">_BaseImporter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_DateTrackerImporter-expanded"><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-docstring">    An importer tracking the date of the module files and reloading them when</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-docstring">    they have changed.</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt id="link-28" class="py-name" targets="Variable web2py.gluon.custom_import._DateTrackerImporter._PACKAGE_PATH_SUFFIX=web2py.gluon.custom_import._DateTrackerImporter-class.html#_PACKAGE_PATH_SUFFIX"><a title="web2py.gluon.custom_import._DateTrackerImporter._PACKAGE_PATH_SUFFIX" class="py-name" href="#" onclick="return doclink('link-28', '_PACKAGE_PATH_SUFFIX', 'link-28');">_PACKAGE_PATH_SUFFIX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">+</tt><tt class="py-string">"__init__.py"</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter.__init__"></a><div id="_DateTrackerImporter.__init__-def"><a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter.__init__-toggle" onclick="return toggle('_DateTrackerImporter.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter.__init__-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-29" class="py-name" targets="Class web2py.gluon.custom_import._DateTrackerImporter=web2py.gluon.custom_import._DateTrackerImporter-class.html"><a title="web2py.gluon.custom_import._DateTrackerImporter" class="py-name" href="#" onclick="return doclink('link-29', '_DateTrackerImporter', 'link-29');">_DateTrackerImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-30', '__init__', 'link-30');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_import_dates</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> <tt class="py-comment"># Import dates of the files of the modules</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-comment"># Avoid reloading cause by file modifications of reload:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt> <tt class="py-op">=</tt> <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">local</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">_modules_loaded</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter.begin"></a><div id="_DateTrackerImporter.begin-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter.begin-toggle" onclick="return toggle('_DateTrackerImporter.begin');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#begin">begin</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter.begin-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter.begin-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">_modules_loaded</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter.__call__"></a><div id="_DateTrackerImporter.__call__-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter.__call__-toggle" onclick="return toggle('_DateTrackerImporter.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">globals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">locals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">fromlist</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">level</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter.__call__-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">        The import method itself.</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-name">call_begin_end</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">_modules_loaded</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">call_begin_end</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method web2py.gluon.custom_import._BaseImporter.begin()=web2py.gluon.custom_import._BaseImporter-class.html#begin,Method web2py.gluon.custom_import._DateTrackerImporter.begin()=web2py.gluon.custom_import._DateTrackerImporter-class.html#begin"><a title="web2py.gluon.custom_import._BaseImporter.begin
web2py.gluon.custom_import._DateTrackerImporter.begin" class="py-name" href="#" onclick="return doclink('link-31', 'begin', 'link-31');">begin</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-32', 'globals', 'link-27');">globals</a></tt> <tt class="py-op">=</tt> <tt id="link-33" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-33', 'globals', 'link-27');">globals</a></tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">locals</tt> <tt class="py-op">=</tt> <tt class="py-name">locals</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">level</tt> <tt class="py-op">=</tt> <tt class="py-name">level</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">            <tt class="py-comment"># Check the date and reload if needed:</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method web2py.gluon.custom_import._DateTrackerImporter._update_dates()=web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates"><a title="web2py.gluon.custom_import._DateTrackerImporter._update_dates" class="py-name" href="#" onclick="return doclink('link-34', '_update_dates', 'link-34');">_update_dates</a></tt><tt class="py-op">(</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-35', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">fromlist</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">            <tt class="py-comment"># Try to load the module and update the dates if it works:</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.custom_import._DateTrackerImporter" class="py-name" href="#" onclick="return doclink('link-36', '_DateTrackerImporter', 'link-29');">_DateTrackerImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> \ </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">              <tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method web2py.gluon.cache.Cache.__call__()=web2py.gluon.cache.Cache-class.html#__call__,Method web2py.gluon.cache.CacheAbstract.__call__()=web2py.gluon.cache.CacheAbstract-class.html#__call__,Method web2py.gluon.cache.CacheInRam.__call__()=web2py.gluon.cache.CacheInRam-class.html#__call__,Method web2py.gluon.cache.CacheOnDisk.__call__()=web2py.gluon.cache.CacheOnDisk-class.html#__call__,Method web2py.gluon.compileapp.LoadFactory.__call__()=web2py.gluon.compileapp.LoadFactory-class.html#__call__,Method web2py.gluon.custom_import._BaseImporter.__call__()=web2py.gluon.custom_import._BaseImporter-class.html#__call__,Method web2py.gluon.custom_import._DateTrackerImporter.__call__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__call__,Method web2py.gluon.custom_import._Web2pyImporter.__call__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__call__,Method web2py.gluon.dal.DAL.__call__()=web2py.gluon.dal.DAL-class.html#__call__,Method web2py.gluon.dal.Row.__call__()=web2py.gluon.dal.Row-class.html#__call__,Method web2py.gluon.dal.SQLCallableList.__call__()=web2py.gluon.dal.SQLCallableList-class.html#__call__,Method web2py.gluon.dal.Set.__call__()=web2py.gluon.dal.Set-class.html#__call__,Method web2py.gluon.dal.Table.__call__()=web2py.gluon.dal.Table-class.html#__call__,Method web2py.gluon.html.__TAG__.__call__()=web2py.gluon.html.__TAG__-class.html#__call__,Method web2py.gluon.languages.translator.__call__()=web2py.gluon.languages.translator-class.html#__call__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__call__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__call__,Method web2py.gluon.storage.List.__call__()=web2py.gluon.storage.List-class.html#__call__,Method web2py.gluon.tools.Auth.__call__()=web2py.gluon.tools.Auth-class.html#__call__,Method web2py.gluon.tools.Crud.__call__()=web2py.gluon.tools.Crud-class.html#__call__,Method web2py.gluon.tools.Service.__call__()=web2py.gluon.tools.Service-class.html#__call__,Method web2py.gluon.validators.CLEANUP.__call__()=web2py.gluon.validators.CLEANUP-class.html#__call__,Method web2py.gluon.validators.CRYPT.__call__()=web2py.gluon.validators.CRYPT-class.html#__call__,Method web2py.gluon.validators.IS_DATE.__call__()=web2py.gluon.validators.IS_DATE-class.html#__call__,Method web2py.gluon.validators.IS_DATETIME.__call__()=web2py.gluon.validators.IS_DATETIME-class.html#__call__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__call__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_EMAIL.__call__()=web2py.gluon.validators.IS_EMAIL-class.html#__call__,Method web2py.gluon.validators.IS_EMPTY_OR.__call__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__call__,Method web2py.gluon.validators.IS_EQUAL_TO.__call__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__call__,Method web2py.gluon.validators.IS_EXPR.__call__()=web2py.gluon.validators.IS_EXPR-class.html#__call__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_GENERIC_URL.__call__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__call__,Method web2py.gluon.validators.IS_HTTP_URL.__call__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__call__,Method web2py.gluon.validators.IS_IMAGE.__call__()=web2py.gluon.validators.IS_IMAGE-class.html#__call__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__call__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_IN_DB.__call__()=web2py.gluon.validators.IS_IN_DB-class.html#__call__,Method web2py.gluon.validators.IS_IN_SET.__call__()=web2py.gluon.validators.IS_IN_SET-class.html#__call__,Method web2py.gluon.validators.IS_IN_SUBSET.__call__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__call__,Method web2py.gluon.validators.IS_IPV4.__call__()=web2py.gluon.validators.IS_IPV4-class.html#__call__,Method web2py.gluon.validators.IS_LENGTH.__call__()=web2py.gluon.validators.IS_LENGTH-class.html#__call__,Method web2py.gluon.validators.IS_LIST_OF.__call__()=web2py.gluon.validators.IS_LIST_OF-class.html#__call__,Method web2py.gluon.validators.IS_LOWER.__call__()=web2py.gluon.validators.IS_LOWER-class.html#__call__,Method web2py.gluon.validators.IS_MATCH.__call__()=web2py.gluon.validators.IS_MATCH-class.html#__call__,Method web2py.gluon.validators.IS_NOT_EMPTY.__call__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__call__,Method web2py.gluon.validators.IS_NOT_IN_DB.__call__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__call__,Method web2py.gluon.validators.IS_SLUG.__call__()=web2py.gluon.validators.IS_SLUG-class.html#__call__,Method web2py.gluon.validators.IS_STRONG.__call__()=web2py.gluon.validators.IS_STRONG-class.html#__call__,Method web2py.gluon.validators.IS_TIME.__call__()=web2py.gluon.validators.IS_TIME-class.html#__call__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__call__,Method web2py.gluon.validators.IS_UPPER.__call__()=web2py.gluon.validators.IS_UPPER-class.html#__call__,Method web2py.gluon.validators.IS_URL.__call__()=web2py.gluon.validators.IS_URL-class.html#__call__"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-37', '__call__', 'link-37');">__call__</a></tt><tt class="py-op">(</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-38', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> <tt id="link-39" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-39', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">,</tt> <tt class="py-name">fromlist</tt><tt class="py-op">,</tt> <tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">            <tt class="py-comment"># Module maybe loaded for the 1st time so we need to set the date</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.custom_import._DateTrackerImporter._update_dates" class="py-name" href="#" onclick="return doclink('link-40', '_update_dates', 'link-34');">_update_dates</a></tt><tt class="py-op">(</tt><tt id="link-41" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-41', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">fromlist</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-42" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-42', 'Exception', 'link-42');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">e</tt>  <tt class="py-comment"># Don't hide something that went wrong</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">call_begin_end</tt><tt class="py-op">:</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method web2py.gluon.custom_import._BaseImporter.end()=web2py.gluon.custom_import._BaseImporter-class.html#end,Method web2py.gluon.custom_import._DateTrackerImporter.end()=web2py.gluon.custom_import._DateTrackerImporter-class.html#end"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-43', 'end', 'link-43');">end</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter._update_dates"></a><div id="_DateTrackerImporter._update_dates-def"><a name="L129"></a><tt class="py-lineno">129</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter._update_dates-toggle" onclick="return toggle('_DateTrackerImporter._update_dates');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates">_update_dates</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">fromlist</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter._update_dates-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter._update_dates-expanded"><a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-docstring">        Update all the dates associated to the statement import. A single</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-docstring">        import statement may import many modules.</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Method web2py.gluon.custom_import._DateTrackerImporter._reload_check()=web2py.gluon.custom_import._DateTrackerImporter-class.html#_reload_check"><a title="web2py.gluon.custom_import._DateTrackerImporter._reload_check" class="py-name" href="#" onclick="return doclink('link-44', '_reload_check', 'link-44');">_reload_check</a></tt><tt class="py-op">(</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-45', 'name', 'link-26');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">fromlist</tt><tt class="py-op">:</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">fromlist_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fromlist</tt><tt class="py-op">:</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="web2py.gluon.custom_import._DateTrackerImporter._reload_check" class="py-name" href="#" onclick="return doclink('link-46', '_reload_check', 'link-44');">_reload_check</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s.%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-47', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">fromlist_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter._reload_check"></a><div id="_DateTrackerImporter._reload_check-def"><a name="L140"></a><tt class="py-lineno">140</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter._reload_check-toggle" onclick="return toggle('_DateTrackerImporter._reload_check');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_reload_check">_reload_check</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter._reload_check-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter._reload_check-expanded"><a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"><tt class="py-docstring">        Update the date associated to the module and reload the module if</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"><tt class="py-docstring">        the file has changed.</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">        <tt id="link-48" class="py-name" targets="Variable web2py.gluon.import_all.module=web2py.gluon.import_all-module.html#module"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-48', 'module', 'link-48');">module</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-49', 'get', 'link-49');">get</a></tt><tt class="py-op">(</tt><tt id="link-50" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-50', 'name', 'link-26');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Class Method web2py.gluon.custom_import._DateTrackerImporter._get_module_file()=web2py.gluon.custom_import._DateTrackerImporter-class.html#_get_module_file"><a title="web2py.gluon.custom_import._DateTrackerImporter._get_module_file" class="py-name" href="#" onclick="return doclink('link-51', '_get_module_file', 'link-51');">_get_module_file</a></tt><tt class="py-op">(</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-52', 'module', 'link-48');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">:</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">            <tt id="link-53" class="py-name" targets="Class datetime.date=datetime.date-class.html"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-53', 'date', 'link-53');">date</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_import_dates</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-54', 'get', 'link-49');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">            <tt class="py-name">new_date</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">            <tt class="py-name">reload_mod</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt class="py-name">mod_to_pack</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> <tt class="py-comment"># Module turning into a package? (special case)</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">                <tt class="py-name">new_date</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">getmtime</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_import_dates</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt>  <tt class="py-comment"># Clean up</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">                <tt class="py-comment"># Handle module changing in package and</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment">#package changing in module:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-55', 'endswith', 'link-55');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">".py"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">                    <tt class="py-comment"># Get path without file ext:</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">splitext</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">                    <tt class="py-name">reload_mod</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> \ </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">                      <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.custom_import._DateTrackerImporter._PACKAGE_PATH_SUFFIX" class="py-name" href="#" onclick="return doclink('link-56', '_PACKAGE_PATH_SUFFIX', 'link-28');">_PACKAGE_PATH_SUFFIX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">                    <tt class="py-name">mod_to_pack</tt> <tt class="py-op">=</tt> <tt class="py-name">reload_mod</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-comment"># Package turning into module?</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">                    <tt class="py-name">file</tt> <tt class="py-op">+=</tt> <tt class="py-string">".py"</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">                    <tt class="py-name">reload_mod</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">reload_mod</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">                    <tt class="py-name">new_date</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">getmtime</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> <tt class="py-comment"># Refresh file date</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">reload_mod</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt id="link-57" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-57', 'date', 'link-53');">date</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">new_date</tt> <tt class="py-op">&gt;</tt> <tt id="link-58" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-58', 'date', 'link-53');">date</a></tt><tt class="py-op">:</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_import_dates</tt><tt class="py-op">[</tt><tt class="py-name">file</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">new_date</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">reload_mod</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt id="link-59" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-59', 'date', 'link-53');">date</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">new_date</tt> <tt class="py-op">&gt;</tt> <tt id="link-60" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-60', 'date', 'link-53');">date</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-61" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-61', 'module', 'link-48');">module</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">_modules_loaded</tt><tt class="py-op">:</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">mod_to_pack</tt><tt class="py-op">:</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                        <tt class="py-comment"># Module turning into a package:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">mod_name</tt> <tt class="py-op">=</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-62', 'module', 'link-48');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">                        <tt class="py-keyword">del</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">[</tt><tt class="py-name">mod_name</tt><tt class="py-op">]</tt> <tt class="py-comment"># Delete the module</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">                        <tt class="py-comment"># Reload the module:</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.custom_import._DateTrackerImporter" class="py-name" href="#" onclick="return doclink('link-63', '_DateTrackerImporter', 'link-29');">_DateTrackerImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-64', '__call__', 'link-37');">__call__</a></tt> \ </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">                          <tt class="py-op">(</tt><tt class="py-name">mod_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-65', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">locals</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">                           <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">                        <tt class="py-name">reload</tt><tt class="py-op">(</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-66', 'module', 'link-48');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">_modules_loaded</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-67', 'module', 'link-48');">module</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"> </tt>
<a name="_DateTrackerImporter.end"></a><div id="_DateTrackerImporter.end-def"><a name="L186"></a><tt class="py-lineno">186</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter.end-toggle" onclick="return toggle('_DateTrackerImporter.end');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#end">end</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter.end-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter.end-expanded"><a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tl</tt><tt class="py-op">.</tt><tt class="py-name">_modules_loaded</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line"> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">classmethod</tt> </tt>
<a name="_DateTrackerImporter._get_module_file"></a><div id="_DateTrackerImporter._get_module_file-def"><a name="L190"></a><tt class="py-lineno">190</tt> <a class="py-toggle" href="#" id="_DateTrackerImporter._get_module_file-toggle" onclick="return toggle('_DateTrackerImporter._get_module_file');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_get_module_file">_get_module_file</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_DateTrackerImporter._get_module_file-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_DateTrackerImporter._get_module_file-expanded"><a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"><tt class="py-docstring">        Get the absolute path file associated to the module or None.</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">        <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-68', 'module', 'link-48');">module</a></tt><tt class="py-op">,</tt> <tt class="py-string">"__file__"</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">:</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">            <tt class="py-comment"># Make path absolute if not:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#file = os.path.join(cls.web2py_path, file)</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">            <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">splitext</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">+</tt><tt class="py-string">".py"</tt> <tt class="py-comment"># Change .pyc for .py</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-69', 'endswith', 'link-55');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.custom_import._DateTrackerImporter._PACKAGE_PATH_SUFFIX" class="py-name" href="#" onclick="return doclink('link-70', '_PACKAGE_PATH_SUFFIX', 'link-28');">_PACKAGE_PATH_SUFFIX</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">                <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt>  <tt class="py-comment"># Track dir for packages</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">file</tt> </tt>
</div></div><a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"> </tt>
<a name="_Web2pyImporter"></a><div id="_Web2pyImporter-def"><a name="L205"></a><tt class="py-lineno">205</tt> <a class="py-toggle" href="#" id="_Web2pyImporter-toggle" onclick="return toggle('_Web2pyImporter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a><tt class="py-op">(</tt><tt class="py-base-class">_BaseImporter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_Web2pyImporter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_Web2pyImporter-expanded"><a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"><tt class="py-docstring">    The standard web2py importer. Like the standard Python importer but it</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line"><tt class="py-docstring">    tries to transform import statements as something like</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line"><tt class="py-docstring">    "import applications.app_name.modules.x". If the import failed, fall back</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line"><tt class="py-docstring">    on _BaseImporter.</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line"> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">    <tt id="link-71" class="py-name" targets="Variable web2py.gluon.custom_import._Web2pyImporter._RE_ESCAPED_PATH_SEP=web2py.gluon.custom_import._Web2pyImporter-class.html#_RE_ESCAPED_PATH_SEP"><a title="web2py.gluon.custom_import._Web2pyImporter._RE_ESCAPED_PATH_SEP" class="py-name" href="#" onclick="return doclink('link-71', '_RE_ESCAPED_PATH_SEP', 'link-71');">_RE_ESCAPED_PATH_SEP</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">)</tt>  <tt class="py-comment"># os.path.sep escaped for re</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"> </tt>
<a name="_Web2pyImporter.__init__"></a><div id="_Web2pyImporter.__init__-def"><a name="L215"></a><tt class="py-lineno">215</tt> <a class="py-toggle" href="#" id="_Web2pyImporter.__init__-toggle" onclick="return toggle('_Web2pyImporter.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._Web2pyImporter-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">web2py_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_Web2pyImporter.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Web2pyImporter.__init__-expanded"><a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"><tt class="py-docstring">        @param web2py_path: The absolute path of the web2py installation.</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">        <tt class="py-keyword">global</tt> <tt class="py-name">DEBUG</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-72" class="py-name"><a title="web2py.gluon.custom_import._Web2pyImporter" class="py-name" href="#" onclick="return doclink('link-72', '_Web2pyImporter', 'link-6');">_Web2pyImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-73', '__init__', 'link-30');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-74', 'web2py_path', 'link-4');">web2py_path</a></tt> <tt class="py-op">=</tt>  <tt id="link-75" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-75', 'web2py_path', 'link-4');">web2py_path</a></tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__web2py_path_os_path_sep</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-76', 'web2py_path', 'link-4');">web2py_path</a></tt><tt class="py-op">+</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__web2py_path_os_path_sep_len</tt> <tt class="py-op">=</tt> <tt id="link-77" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-77', 'len', 'link-77');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__web2py_path_os_path_sep</tt><tt class="py-op">)</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__RE_APP_DIR</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">          <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.custom_import._Web2pyImporter._RE_ESCAPED_PATH_SEP" class="py-name" href="#" onclick="return doclink('link-78', '_RE_ESCAPED_PATH_SEP', 'link-71');">_RE_ESCAPED_PATH_SEP</a></tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-79', 'join', 'link-79');">join</a></tt><tt class="py-op">(</tt> \ </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">          <tt class="py-op">(</tt> \ </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">            <tt class="py-comment">#"^" + re.escape(web2py_path),   # Not working with Python 2.5</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">            <tt class="py-string">"^("</tt> <tt class="py-op">+</tt> <tt class="py-string">"applications"</tt><tt class="py-op">,</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">            <tt class="py-string">"[^"</tt><tt class="py-op">,</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">            <tt class="py-string">"]+)"</tt><tt class="py-op">,</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">            <tt class="py-string">""</tt><tt class="py-op">,</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">          <tt class="py-op">)</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"> </tt>
<a name="_Web2pyImporter._matchAppDir"></a><div id="_Web2pyImporter._matchAppDir-def"><a name="L235"></a><tt class="py-lineno">235</tt> <a class="py-toggle" href="#" id="_Web2pyImporter._matchAppDir-toggle" onclick="return toggle('_Web2pyImporter._matchAppDir');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._Web2pyImporter-class.html#_matchAppDir">_matchAppDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">file_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_Web2pyImporter._matchAppDir-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Web2pyImporter._matchAppDir-expanded"><a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"><tt class="py-docstring">        Does the file in a directory inside the "applications" directory?</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">file_path</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-80', 'startswith', 'link-80');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__web2py_path_os_path_sep</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">            <tt class="py-name">file_path</tt> <tt class="py-op">=</tt> <tt class="py-name">file_path</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__web2py_path_os_path_sep_len</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__RE_APP_DIR</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">file_path</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"> </tt>
<a name="_Web2pyImporter.__call__"></a><div id="_Web2pyImporter.__call__-def"><a name="L245"></a><tt class="py-lineno">245</tt> <a class="py-toggle" href="#" id="_Web2pyImporter.__call__-toggle" onclick="return toggle('_Web2pyImporter.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._Web2pyImporter-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">globals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">locals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">fromlist</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">level</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_Web2pyImporter.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Web2pyImporter.__call__-expanded"><a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"><tt class="py-docstring">        The import method itself.</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line"> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.begin
web2py.gluon.custom_import._DateTrackerImporter.begin" class="py-name" href="#" onclick="return doclink('link-81', 'begin', 'link-31');">begin</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-comment">#try:</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># if not relative and not from applications:</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-82" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-82', 'name', 'link-26');">name</a></tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-83', 'startswith', 'link-80');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">"."</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">level</tt> <tt class="py-op">&lt;=</tt> <tt class="py-number">0</tt> \ </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">                    <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-84', 'name', 'link-26');">name</a></tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-85', 'startswith', 'link-80');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">"applications."</tt><tt class="py-op">)</tt> \ </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">                    <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-86" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-86', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">            <tt class="py-comment"># Get the name of the file do the import</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">caller_file_name</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-87', 'join', 'link-79');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-88', 'web2py_path', 'link-4');">web2py_path</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">                                            <tt id="link-89" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-89', 'globals', 'link-27');">globals</a></tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-90', 'get', 'link-49');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">"__file__"</tt><tt class="py-op">,</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">            <tt class="py-comment"># Is the path in an application directory?</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">match_app_dir</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name" targets="Method web2py.gluon.custom_import._Web2pyImporter._matchAppDir()=web2py.gluon.custom_import._Web2pyImporter-class.html#_matchAppDir"><a title="web2py.gluon.custom_import._Web2pyImporter._matchAppDir" class="py-name" href="#" onclick="return doclink('link-91', '_matchAppDir', 'link-91');">_matchAppDir</a></tt><tt class="py-op">(</tt><tt class="py-name">caller_file_name</tt><tt class="py-op">)</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">match_app_dir</tt><tt class="py-op">:</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">                    <tt class="py-comment"># Get the prefix to add for the import</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># (like applications.app_name.modules):</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">modules_prefix</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">                        <tt class="py-string">"."</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-92', 'join', 'link-79');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">match_app_dir</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt> \ </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">                        <tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-string">"."</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"modules"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fromlist</tt><tt class="py-op">:</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">                        <tt class="py-comment"># import like "import x" or "import x.y"</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name" targets="Method web2py.gluon.custom_import._Web2pyImporter.__import__dot()=web2py.gluon.custom_import._Web2pyImporter-class.html#__import__dot"><a title="web2py.gluon.custom_import._Web2pyImporter.__import__dot" class="py-name" href="#" onclick="return doclink('link-93', '__import__dot', 'link-93');">__import__dot</a></tt><tt class="py-op">(</tt><tt class="py-name">modules_prefix</tt><tt class="py-op">,</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-94', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">                            <tt id="link-95" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-95', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">,</tt> <tt class="py-name">fromlist</tt><tt class="py-op">,</tt> <tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">                        <tt class="py-comment"># import like "from x import a, b, ..."</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">return</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.custom_import._Web2pyImporter" class="py-name" href="#" onclick="return doclink('link-96', '_Web2pyImporter', 'link-6');">_Web2pyImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> \ </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">                            <tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-97', '__call__', 'link-37');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">modules_prefix</tt><tt class="py-op">+</tt><tt class="py-string">"."</tt><tt class="py-op">+</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-98', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">                                    <tt id="link-99" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-99', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">,</tt> <tt class="py-name">fromlist</tt><tt class="py-op">,</tt> <tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">                    <tt class="py-keyword">pass</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.custom_import._Web2pyImporter" class="py-name" href="#" onclick="return doclink('link-100', '_Web2pyImporter', 'link-6');">_Web2pyImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-101', '__call__', 'link-37');">__call__</a></tt><tt class="py-op">(</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-102', 'name', 'link-26');">name</a></tt><tt class="py-op">,</tt> <tt id="link-103" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-103', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">,</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">                                                    <tt class="py-name">fromlist</tt><tt class="py-op">,</tt> <tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">        <tt class="py-comment">#except Exception, e:</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#    raise e  # Don't hide something that went wrong</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#finally:</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-104', 'end', 'link-43');">end</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line"> </tt>
<a name="_Web2pyImporter.__import__dot"></a><div id="_Web2pyImporter.__import__dot-def"><a name="L286"></a><tt class="py-lineno">286</tt> <a class="py-toggle" href="#" id="_Web2pyImporter.__import__dot-toggle" onclick="return toggle('_Web2pyImporter.__import__dot');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.custom_import._Web2pyImporter-class.html#__import__dot">__import__dot</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">prefix</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">globals</tt><tt class="py-op">,</tt> <tt class="py-param">locals</tt><tt class="py-op">,</tt> <tt class="py-param">fromlist</tt><tt class="py-op">,</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">                      <tt class="py-param">level</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_Web2pyImporter.__import__dot-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Web2pyImporter.__import__dot-expanded"><a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line"><tt class="py-docstring">        Here we will import x.y.z as many imports like:</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line"><tt class="py-docstring">        from applications.app_name.modules import x</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line"><tt class="py-docstring">        from applications.app_name.modules.x import y</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line"><tt class="py-docstring">        from applications.app_name.modules.x.y import z.</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line"><tt class="py-docstring">        x will be the module returned.</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line"> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-105" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-105', 'name', 'link-26');">name</a></tt> <tt class="py-keyword">in</tt> <tt id="link-106" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-106', 'name', 'link-26');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"."</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">            <tt class="py-name">new_mod</tt> <tt class="py-op">=</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.custom_import._Web2pyImporter" class="py-name" href="#" onclick="return doclink('link-107', '_Web2pyImporter', 'link-6');">_Web2pyImporter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-108', '__call__', 'link-37');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt> <tt id="link-109" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-109', 'globals', 'link-27');">globals</a></tt><tt class="py-op">,</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">                                                        <tt class="py-name">locals</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt id="link-110" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-110', 'name', 'link-26');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">                <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt> <tt class="py-keyword">or</tt> <tt class="py-name">new_mod</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">[</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-111', 'name', 'link-26');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">ImportError</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">            <tt class="py-name">prefix</tt> <tt class="py-op">+=</tt> <tt class="py-string">"."</tt> <tt class="py-op">+</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-112', 'name', 'link-26');">name</a></tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
</div></div><a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line"> </tt>
<a name="_Web2pyDateTrackerImporter"></a><div id="_Web2pyDateTrackerImporter-def"><a name="L307"></a><tt class="py-lineno">307</tt> <a class="py-toggle" href="#" id="_Web2pyDateTrackerImporter-toggle" onclick="return toggle('_Web2pyDateTrackerImporter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html">_Web2pyDateTrackerImporter</a><tt class="py-op">(</tt><tt class="py-base-class">_Web2pyImporter</tt><tt class="py-op">,</tt> <tt class="py-base-class">_DateTrackerImporter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_Web2pyDateTrackerImporter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_Web2pyDateTrackerImporter-expanded"><a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"><tt class="py-docstring">    Like _Web2pyImporter but using a _DateTrackerImporter.</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
</div><a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.custom_import._BaseImporter-class.html version [159e514682].































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.custom_import._BaseImporter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.custom_import-module.html">Module&nbsp;custom_import</a> ::
        Class&nbsp;_BaseImporter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.custom_import._BaseImporter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _BaseImporter</h1><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_BaseImporter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">_BaseImporter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a>,
    <a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a>
</dd></dl>

<hr />
The base importer. Dispatch the import the call to the standard Python
  importer.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._BaseImporter-class.html#begin" class="summary-sig-name">begin</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Many imports can be made for a single import statement.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_BaseImporter.begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">globals</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">locals</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">fromlist</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">level</span>=<span class="summary-sig-default">-1</span>)</span><br />
      The import method itself.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_BaseImporter.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="end"></a><span class="summary-sig-name">end</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Needed for clean up.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_BaseImporter.end">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="begin"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">begin</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_BaseImporter.begin">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Many imports can be made for a single import statement. This method 
  help the management of this aspect.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.custom_import._DateTrackerImporter-class.html version [00b9207621].


























































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.custom_import._DateTrackerImporter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.custom_import-module.html">Module&nbsp;custom_import</a> ::
        Class&nbsp;_DateTrackerImporter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _DateTrackerImporter</h1><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
   object --+    
            |    
<a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a> --+
                |
               <strong class="uidshort">_DateTrackerImporter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html">_Web2pyDateTrackerImporter</a>
</dd></dl>

<hr />
An importer tracking the date of the module files and reloading them 
  when they have changed.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#begin" class="summary-sig-name">begin</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Many imports can be made for a single import statement.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">globals</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">locals</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">fromlist</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">level</span>=<span class="summary-sig-default">-1</span>)</span><br />
      The import method itself.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates" class="summary-sig-name">_update_dates</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">fromlist</span>)</span><br />
      Update all the dates associated to the statement import.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter._update_dates">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_reload_check"></a><span class="summary-sig-name">_reload_check</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Update the date associated to the module and reload the module if 
      the file has changed.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter._reload_check">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#end" class="summary-sig-name">end</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Needed for clean up.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.end">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS METHODS ==================== -->
<a name="section-ClassMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_module_file"></a><span class="summary-sig-name">_get_module_file</span>(<span class="summary-sig-arg">cls</span>,
        <span class="summary-sig-arg">module</span>)</span><br />
      Get the absolute path file associated to the module or None.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter._get_module_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_PACKAGE_PATH_SUFFIX"></a><span class="summary-name">_PACKAGE_PATH_SUFFIX</span> = <code title="'/__init__.py'"><code class="variable-quote">'</code><code class="variable-string">/__init__.py</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="begin"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">begin</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.begin">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Many imports can be made for a single import statement. This method 
  help the management of this aspect.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.custom_import._BaseImporter-class.html#begin">_BaseImporter.begin</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">globals</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">locals</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">fromlist</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">level</span>=<span class="sig-default">-1</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  The import method itself.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.custom_import._BaseImporter-class.html#__call__">_BaseImporter.__call__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_update_dates"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_update_dates</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">fromlist</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter._update_dates">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Update all the dates associated to the statement import. A single 
  import statement may import many modules.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="end"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">end</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_DateTrackerImporter.end">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Needed for clean up.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.custom_import._BaseImporter-class.html#end">_BaseImporter.end</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html version [a2aa0dbfca].







































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.custom_import._Web2pyDateTrackerImporter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.custom_import-module.html">Module&nbsp;custom_import</a> ::
        Class&nbsp;_Web2pyDateTrackerImporter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _Web2pyDateTrackerImporter</h1><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyDateTrackerImporter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
      object --+        
               |        
   <a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a> --+    
                   |    
     <a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a> --+
                       |
      object --+       |
               |       |
   <a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a> --+   |
                   |   |
<a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a> --+
                       |
                      <strong class="uidshort">_Web2pyDateTrackerImporter</strong>
</pre>

<hr />
Like _Web2pyImporter but using a _DateTrackerImporter.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a></code></b>:
      <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__call__">__call__</a></code>,
      <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__init__">__init__</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a></code></b> (private):
      <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_Web2pyImporter__import__dot">_Web2pyImporter__import__dot</a></code>,
      <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_matchAppDir">_matchAppDir</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a></code></b>:
      <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#begin">begin</a></code>,
      <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#end">end</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a></code></b> (private):
      <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_reload_check">_reload_check</a></code>,
      <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_update_dates">_update_dates</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS METHODS ==================== -->
<a name="section-ClassMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a></code></b> (private):
      <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_get_module_file">_get_module_file</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html">_Web2pyImporter</a></code></b> (private):
      <code><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_RE_ESCAPED_PATH_SEP">_RE_ESCAPED_PATH_SEP</a></code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html">_DateTrackerImporter</a></code></b> (private):
      <code><a href="web2py.gluon.custom_import._DateTrackerImporter-class.html#_PACKAGE_PATH_SUFFIX">_PACKAGE_PATH_SUFFIX</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.custom_import._Web2pyImporter-class.html version [7b8cb16291].





















































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.custom_import._Web2pyImporter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.custom_import-module.html">Module&nbsp;custom_import</a> ::
        Class&nbsp;_Web2pyImporter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.custom_import._Web2pyImporter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _Web2pyImporter</h1><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
   object --+    
            |    
<a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a> --+
                |
               <strong class="uidshort">_Web2pyImporter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html">_Web2pyDateTrackerImporter</a>
</dd></dl>

<hr />
The standard web2py importer. Like the standard Python importer but it
  tries to transform import statements as something like &quot;import 
  applications.app_name.modules.x&quot;. If the import failed, fall back on
  _BaseImporter.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">web2py_path</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_matchAppDir"></a><span class="summary-sig-name">_matchAppDir</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">file_path</span>)</span><br />
      Does the file in a directory inside the &quot;applications&quot; 
      directory?</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter._matchAppDir">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">globals</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">locals</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">fromlist</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">level</span>=<span class="summary-sig-default">-1</span>)</span><br />
      The import method itself.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#__import__dot" class="summary-sig-name">__import__dot</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">prefix</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">globals</span>,
        <span class="summary-sig-arg">locals</span>,
        <span class="summary-sig-arg">fromlist</span>,
        <span class="summary-sig-arg">level</span>)</span><br />
      Here we will import x.y.z as many imports like: from 
      applications.app_name.modules import x from 
      applications.app_name.modules.x import y from 
      applications.app_name.modules.x.y import z.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter.__import__dot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.custom_import._Web2pyImporter-class.html#_Web2pyImporter__import__dot" class="summary-sig-name">_Web2pyImporter__import__dot</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">prefix</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">globals</span>,
        <span class="summary-sig-arg">locals</span>,
        <span class="summary-sig-arg">fromlist</span>,
        <span class="summary-sig-arg">level</span>)</span><br />
      Here we will import x.y.z as many imports like: from 
      applications.app_name.modules import x from 
      applications.app_name.modules.x import y from 
      applications.app_name.modules.x.y import z.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter._Web2pyImporter__import__dot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.custom_import._BaseImporter-class.html">_BaseImporter</a></code></b>:
      <code><a href="web2py.gluon.custom_import._BaseImporter-class.html#begin">begin</a></code>,
      <code><a href="web2py.gluon.custom_import._BaseImporter-class.html#end">end</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_RE_ESCAPED_PATH_SEP"></a><span class="summary-name">_RE_ESCAPED_PATH_SEP</span> = <code title="'\\/'"><code class="variable-quote">'</code><code class="variable-string">\\/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">web2py_path</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>web2py_path</code></strong> - The absolute path of the web2py installation.</li>
    </ul></dd>
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">globals</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">locals</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">fromlist</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">level</span>=<span class="sig-default">-1</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  The import method itself.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.custom_import._BaseImporter-class.html#__call__">_BaseImporter.__call__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__import__dot"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__import__dot</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">prefix</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">globals</span>,
        <span class="sig-arg">locals</span>,
        <span class="sig-arg">fromlist</span>,
        <span class="sig-arg">level</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter.__import__dot">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Here we will import x.y.z as many imports like: from 
  applications.app_name.modules import x from 
  applications.app_name.modules.x import y from 
  applications.app_name.modules.x.y import z. x will be the module 
  returned.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_Web2pyImporter__import__dot"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_Web2pyImporter__import__dot</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">prefix</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">globals</span>,
        <span class="sig-arg">locals</span>,
        <span class="sig-arg">fromlist</span>,
        <span class="sig-arg">level</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.custom_import-pysrc.html#_Web2pyImporter._Web2pyImporter__import__dot">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Here we will import x.y.z as many imports like: from 
  applications.app_name.modules import x from 
  applications.app_name.modules.x import y from 
  applications.app_name.modules.x.y import z. x will be the module 
  returned.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal-module.html version [ed310cf04e].



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;dal
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module dal</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Thanks to
    * Niall Sweeny &lt;niall.sweeny@fonjax.com&gt; for MS SQL support
    * Marcel Leuthi &lt;mluethi@mlsystems.ch&gt; for Oracle support
    * Denes
    * Chris Clark
    * clach05
    * Denes Lengyel
    * and many others who have contributed to current and previous versions

This file contains the DAL support for many relational databases,
including:
- SQLite
- MySQL
- Postgres
- Oracle
- MS SQL
- DB2
- Interbase
- Ingres
- SapDB (experimental)
- Cubrid (experimental)
- CouchDB (experimental)
- MongoDB (in progress)
- Google:nosql
- Google:sql

Example of usage:

&gt;&gt;&gt; # from dal import DAL, Field

### create DAL connection (and create DB if not exists)
&gt;&gt;&gt; db=DAL(('mysql://a:b@locahost/x','sqlite://storage.sqlite'),folder=None)

### define a table 'person' (create/aster as necessary)
&gt;&gt;&gt; person = db.define_table('person',Field('name','string'))

### insert a record
&gt;&gt;&gt; id = person.insert(name='James')

### retrieve it by id
&gt;&gt;&gt; james = person(id)

### retrieve it by name
&gt;&gt;&gt; james = person(name='James')

### retrieve it by arbitrary query
&gt;&gt;&gt; query = (person.name=='James')&amp;(person.name.startswith('J'))
&gt;&gt;&gt; james = db(query).select(person.ALL)[0]

### update one record
&gt;&gt;&gt; james.update_record(name='Jim')

### update multiple records by query
&gt;&gt;&gt; db(person.name.like('J%')).update(name='James')
1

### delete records by query
&gt;&gt;&gt; db(person.name.lower()=='jim').delete()
0

### retrieve multiple records (rows)
&gt;&gt;&gt; people = db(person).select(orderby=person.name,groupby=person.name,limitby=(0,100))

### further filter them
&gt;&gt;&gt; james = people.find(lambda row: row.name=='James').first()
&gt;&gt;&gt; print james.id, james.name
1 James

### check aggrgates
&gt;&gt;&gt; counter = person.id.count()
&gt;&gt;&gt; print db(person).select(counter).first()(counter)
1

### delete one record
&gt;&gt;&gt; james.delete_record()
1

### delete (drop) entire database table
&gt;&gt;&gt; person.drop()

Supported field types:
id string text boolean integer double decimal password upload blob time date datetime,

Supported DAL URI strings:
'sqlite://test.db'
'sqlite:memory'
'jdbc:sqlite://test.db'
'mysql://root:none@localhost/test'
'postgres://mdipierro:none@localhost/test'
'jdbc:postgres://mdipierro:none@localhost/test'
'mssql://web2py:none@A64X2/web2py_test'
'mssql2://web2py:none@A64X2/web2py_test' # alternate mappings
'oracle://username:password@database'
'firebird://user:password@server:3050/database'
'db2://DSN=dsn;UID=user;PWD=pass'
'firebird://username:password@hostname/database'
'firebird_embedded://username:password@c://path'
'informix://user:password@server:3050/database'
'informixu://user:password@server:3050/database' # unicode informix
'google:datastore' # for google app engine datastore
'google:sql' # for google app engine with sql (mysql compatible)
'teradata://DSN=dsn;UID=user;PWD=pass' # experimental 

For more info:
help(DAL)
help(Field)

</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.GAEDecimalProperty-class.html" class="summary-name">GAEDecimalProperty</a><br />
      GAE decimal implementation
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.ConnectionPool-class.html" class="summary-name">ConnectionPool</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.BaseAdapter-class.html" class="summary-name">BaseAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.SQLiteAdapter-class.html" class="summary-name">SQLiteAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html" class="summary-name">JDBCSQLiteAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MySQLAdapter-class.html" class="summary-name">MySQLAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.PostgreSQLAdapter-class.html" class="summary-name">PostgreSQLAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html" class="summary-name">JDBCPostgreSQLAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.OracleAdapter-class.html" class="summary-name">OracleAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MSSQLAdapter-class.html" class="summary-name">MSSQLAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MSSQL2Adapter-class.html" class="summary-name">MSSQL2Adapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.FireBirdAdapter-class.html" class="summary-name">FireBirdAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html" class="summary-name">FireBirdEmbeddedAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.InformixAdapter-class.html" class="summary-name">InformixAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DB2Adapter-class.html" class="summary-name">DB2Adapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.TeradataAdapter-class.html" class="summary-name">TeradataAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.IngresAdapter-class.html" class="summary-name">IngresAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html" class="summary-name">IngresUnicodeAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.SAPDBAdapter-class.html" class="summary-name">SAPDBAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.CubridAdapter-class.html" class="summary-name">CubridAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DatabaseStoredFile-class.html" class="summary-name">DatabaseStoredFile</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html" class="summary-name">UseDatabaseStoredFile</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.GoogleSQLAdapter-class.html" class="summary-name">GoogleSQLAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.NoSQLAdapter-class.html" class="summary-name">NoSQLAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.GAEF-class.html" class="summary-name">GAEF</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html" class="summary-name">GoogleDatastoreAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.CouchDBAdapter-class.html" class="summary-name">CouchDBAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MongoDBAdapter-class.html" class="summary-name">MongoDBAdapter</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Row-class.html" class="summary-name">Row</a><br />
      a dictionary that lets you do d['a'] as well as d.a this is only
        used to store a Row
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.SQLCallableList-class.html" class="summary-name">SQLCallableList</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DAL-class.html" class="summary-name">DAL</a><br />
      an instance of this class represents a database connection
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.SQLALL-class.html" class="summary-name">SQLALL</a><br />
      Helper class providing a comma-separated string having all the 
        field names (prefixed by table name and '.')
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Reference-class.html" class="summary-name">Reference</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Table-class.html" class="summary-name">Table</a><br />
      an instance of this class represents a database table
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Expression-class.html" class="summary-name">Expression</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.SQLCustomType-class.html" class="summary-name">SQLCustomType</a><br />
      allows defining of custom SQL types...
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Field-class.html" class="summary-name">Field</a><br />
      an instance of this class represents a database field
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Query-class.html" class="summary-name">Query</a><br />
      a query object necessary to define a set.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Set-class.html" class="summary-name">Set</a><br />
      a Set represents a set of records in the database,
the records are identified by the query=Query(...) object.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Rows-class.html" class="summary-name">Rows</a><br />
      A wrapper for the return value of a select.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Field-class.html" class="summary-name">SQLField</a><br />
      an instance of this class represents a database field
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Table-class.html" class="summary-name">SQLTable</a><br />
      an instance of this class represents a database table
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Expression-class.html" class="summary-name">SQLXorable</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Query-class.html" class="summary-name">SQLQuery</a><br />
      a query object necessary to define a set.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Set-class.html" class="summary-name">SQLSet</a><br />
      a Set represents a set of records in the database,
the records are identified by the query=Query(...) object.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Rows-class.html" class="summary-name">SQLRows</a><br />
      A wrapper for the return value of a select.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Row-class.html" class="summary-name">SQLStorage</a><br />
      a dictionary that lets you do d['a'] as well as d.a this is only
        used to store a Row
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DAL-class.html" class="summary-name">SQLDB</a><br />
      an instance of this class represents a database connection
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DAL-class.html" class="summary-name">GQLDB</a><br />
      an instance of this class represents a database connection
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="DEFAULT"></a><span class="summary-sig-name">DEFAULT</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DEFAULT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="uuid2int"></a><span class="summary-sig-name">uuid2int</span>(<span class="summary-sig-arg">uuidv</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#uuid2int">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="int2uuid"></a><span class="summary-sig-name">int2uuid</span>(<span class="summary-sig-arg">n</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#int2uuid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cleanup"></a><span class="summary-sig-name">cleanup</span>(<span class="summary-sig-arg">text</span>)</span><br />
      validates that the given text is clean: only contains 
      [0-9a-zA-Z_]</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#cleanup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal-module.html#sqlhtml_validators" class="summary-sig-name">sqlhtml_validators</a>(<span class="summary-sig-arg">field</span>)</span><br />
      Field type validation, using web2py's validators mechanism.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#sqlhtml_validators">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bar_escape"></a><span class="summary-sig-name">bar_escape</span>(<span class="summary-sig-arg">item</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_escape">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bar_encode"></a><span class="summary-sig-name">bar_encode</span>(<span class="summary-sig-arg">items</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_encode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bar_decode_integer"></a><span class="summary-sig-name">bar_decode_integer</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_decode_integer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bar_decode_string"></a><span class="summary-sig-name">bar_decode_string</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_decode_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Row_unpickler"></a><span class="summary-sig-name">Row_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row_unpickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Row_pickler"></a><span class="summary-sig-name">Row_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row_pickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Reference_unpickler"></a><span class="summary-sig-name">Reference_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference_unpickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Reference_pickler"></a><span class="summary-sig-name">Reference_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference_pickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xorify"></a><span class="summary-sig-name">xorify</span>(<span class="summary-sig-arg">orderby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#xorify">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update_record"></a><span class="summary-sig-name">update_record</span>(<span class="summary-sig-arg">pack</span>,
        <span class="summary-sig-arg">a</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#update_record">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Rows_unpickler"></a><span class="summary-sig-name">Rows_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows_unpickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Rows_pickler"></a><span class="summary-sig-name">Rows_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows_pickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal-module.html#test_all" class="summary-sig-name">test_all</a>()</span><br />
      &gt;&gt;&gt; if len(sys.argv)&lt;2: db = DAL(&quot;sqlite://test.db&quot;)...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#test_all">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="MAXCHARLENGTH"></a><span class="summary-name">MAXCHARLENGTH</span> = <code title="512">512</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="INFINITY"></a><span class="summary-name">INFINITY</span> = <code title="32768">32768</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal-module.html#CALLABLETYPES" class="summary-name">CALLABLETYPES</a> = <code title="(&lt;type 'function'&gt;,
 &lt;type 'function'&gt;,
 &lt;type 'builtin_function_or_method'&gt;,
 &lt;type 'instancemethod'&gt;,
 &lt;type 'builtin_function_or_method'&gt;)"><code class="variable-group">(</code>&lt;type 'function'&gt;<code class="variable-op">, </code>&lt;type 'function'&gt;<code class="variable-op">, </code>&lt;type '<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="have_portalocker"></a><span class="summary-name">have_portalocker</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="have_serializers"></a><span class="summary-name">have_serializers</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="have_validators"></a><span class="summary-name">have_validators</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py.dal&quot;)">logging.getLogger(&quot;web2py.dal&quot;)</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="sql_locker"></a><span class="summary-name">sql_locker</span> = <code title="&lt;_RLock(None, 0)&gt;">&lt;_RLock(None, 0)&gt;</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="thread"></a><span class="summary-name">thread</span> = <code title="threading.local()">threading.local()</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_dbname"></a><span class="summary-name">regex_dbname</span> = <code title="re.compile(r'^(\w+)(:\w+)*')">re.compile(r'^<code class="re-group">(</code>\w<code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>:\w<code class="re-op">+</code><code class="re-group">)</code><code class="re-op">*</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="table_field"></a><span class="summary-name">table_field</span> = <code title="re.compile(r'^[\w_]+\.[\w_]+$')">re.compile(r'^<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>\.<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>$')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal-module.html#regex_content" class="summary-name">regex_content</a> = <code title="re.compile(r'(?P&lt;table&gt;[\w-]+)\.(?P&lt;field&gt;[\w-]+)\.(?P&lt;uuidkey&gt;[\w-]+)\
\.(?P&lt;name&gt;\w+)\.\w+$')">re.compile(r'<code class="re-group">(?P&lt;</code><code class="re-ref">table</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\.<code class="re-group">(?P&lt;</code><code class="re-ref">field</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w-<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_cleanup_fn"></a><span class="summary-name">regex_cleanup_fn</span> = <code title="re.compile(r'[\'&quot;\s;]+')">re.compile(r'<code class="re-group">[</code>\'&quot;\s;<code class="re-group">]</code><code class="re-op">+</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="string_unpack"></a><span class="summary-name">string_unpack</span> = <code title="re.compile(r'(?&lt;!\|)\|(?!\|)')">re.compile(r'<code class="re-group">(?&lt;!</code>\|<code class="re-group">)</code>\|<code class="re-group">(?!</code>\|<code class="re-group">)</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal-module.html#regex_python_keywords" class="summary-name">regex_python_keywords</a> = <code title="re.compile(r'^(and|del|from|not|while|as|elif|global|or|with|assert|el\
se|if|pass|yield|break|except|import|print|class|exec|in|raise|continu\
e|finally|is|return|def|for|lambda|try)$')">re.compile(r'^<code class="re-group">(</code>and<code class="re-op">|</code>del<code class="re-op">|</code>from<code class="re-op">|</code>not<code class="re-op">|</code>while<code class="re-op">|</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="drivers"></a><span class="summary-name">drivers</span> = <code title="['SQLite3', 'pymysql', 'PostgreSQL']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">SQLite3</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">pymysql</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">PostgreSQL</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="is_jdbc"></a><span class="summary-name">is_jdbc</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="INGRES_SEQNAME"></a><span class="summary-name">INGRES_SEQNAME</span> = <code title="'ii***lineitemsequence'"><code class="variable-quote">'</code><code class="variable-string">ii***lineitemsequence</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal-module.html#ADAPTERS" class="summary-name">ADAPTERS</a> = <code title="{'couchdb': &lt;class 'web2py.gluon.dal.CouchDBAdapter'&gt;,
 'cubrid': &lt;class 'web2py.gluon.dal.CubridAdapter'&gt;,
 'db2': &lt;class 'web2py.gluon.dal.DB2Adapter'&gt;,
 'firebird': &lt;class 'web2py.gluon.dal.FireBirdAdapter'&gt;,
 'firebird_embedded': &lt;class 'web2py.gluon.dal.FireBirdAdapter'&gt;,
 'gae': &lt;class 'web2py.gluon.dal.GoogleDatastoreAdapter'&gt;,
 'google:datastore': &lt;class 'web2py.gluon.dal.GoogleDatastoreAdapter'&gt;\
,
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">couchdb</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.CouchDBAdapter<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_quotes"></a><span class="summary-name">regex_quotes</span> = <code title="re.compile(r'\'[^\']*\'')">re.compile(r'\'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code>\'')</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="sqlhtml_validators"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sqlhtml_validators</span>(<span class="sig-arg">field</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#sqlhtml_validators">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Field type validation, using web2py's validators mechanism.</p>
  makes sure the content of a field is in line with the declared 
  fieldtype
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="test_all"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">test_all</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#test_all">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">


 &gt;&gt;&gt; if len(sys.argv)&lt;2: db = DAL(&quot;sqlite://test.db&quot;)
 &gt;&gt;&gt; if len(sys.argv)&gt;1: db = DAL(sys.argv[1])
 &gt;&gt;&gt; tmp = db.define_table('users',              Field('stringf', 'string', length=32, required=True),              Field('booleanf', 'boolean', default=False),              Field('passwordf', 'password', notnull=True),              Field('uploadf', 'upload'),              Field('blobf', 'blob'),              Field('integerf', 'integer', unique=True),              Field('doublef', 'double', unique=True,notnull=True),              Field('datef', 'date', default=datetime.date.today()),              Field('timef', 'time'),              Field('datetimef', 'datetime'),              migrate='test_user.table')

Insert a field

 &gt;&gt;&gt; db.users.insert(stringf='a', booleanf=True, passwordf='p', blobf='0A',                       uploadf=None, integerf=5, doublef=3.14,                       datef=datetime.date(2001, 1, 1),                       timef=datetime.time(12, 30, 15),                       datetimef=datetime.datetime(2002, 2, 2, 12, 30, 15))
 1

 Drop the table

 &gt;&gt;&gt; db.users.drop()

 Examples of insert, select, update, delete

 &gt;&gt;&gt; tmp = db.define_table('person',              Field('name'),              Field('birth','date'),              migrate='test_person.table')
 &gt;&gt;&gt; person_id = db.person.insert(name=&quot;Marco&quot;,birth='2005-06-22')
 &gt;&gt;&gt; person_id = db.person.insert(name=&quot;Massimo&quot;,birth='1971-12-21')

 commented len(db().select(db.person.ALL))
 commented 2

 &gt;&gt;&gt; me = db(db.person.id==person_id).select()[0] # test select
 &gt;&gt;&gt; me.name
 'Massimo'
 &gt;&gt;&gt; db(db.person.name=='Massimo').update(name='massimo') # test update
 1
 &gt;&gt;&gt; db(db.person.name=='Marco').select().first().delete_record() # test delete
 1

 Update a single record

 &gt;&gt;&gt; me.update_record(name=&quot;Max&quot;)
 &gt;&gt;&gt; me.name
 'Max'

 Examples of complex search conditions

 &gt;&gt;&gt; len(db((db.person.name=='Max')&amp;(db.person.birth&lt;'2003-01-01')).select())
 1
 &gt;&gt;&gt; len(db((db.person.name=='Max')&amp;(db.person.birth&lt;datetime.date(2003,01,01))).select())
 1
 &gt;&gt;&gt; len(db((db.person.name=='Max')|(db.person.birth&lt;'2003-01-01')).select())
 1
 &gt;&gt;&gt; me = db(db.person.id==person_id).select(db.person.name)[0]
 &gt;&gt;&gt; me.name
 'Max'

 Examples of search conditions using extract from date/datetime/time

 &gt;&gt;&gt; len(db(db.person.birth.month()==12).select())
 1
 &gt;&gt;&gt; len(db(db.person.birth.year()&gt;1900).select())
 1

 Example of usage of NULL

 &gt;&gt;&gt; len(db(db.person.birth==None).select()) ### test NULL
 0
 &gt;&gt;&gt; len(db(db.person.birth!=None).select()) ### test NULL
 1

 Examples of search conditions using lower, upper, and like

 &gt;&gt;&gt; len(db(db.person.name.upper()=='MAX').select())
 1
 &gt;&gt;&gt; len(db(db.person.name.like('%ax')).select())
 1
 &gt;&gt;&gt; len(db(db.person.name.upper().like('%AX')).select())
 1
 &gt;&gt;&gt; len(db(~db.person.name.upper().like('%AX')).select())
 0

 orderby, groupby and limitby

 &gt;&gt;&gt; people = db().select(db.person.name, orderby=db.person.name)
 &gt;&gt;&gt; order = db.person.name|~db.person.birth
 &gt;&gt;&gt; people = db().select(db.person.name, orderby=order)

 &gt;&gt;&gt; people = db().select(db.person.name, orderby=db.person.name, groupby=db.person.name)

 &gt;&gt;&gt; people = db().select(db.person.name, orderby=order, limitby=(0,100))

 Example of one 2 many relation

 &gt;&gt;&gt; tmp = db.define_table('dog',               Field('name'),               Field('birth','date'),               Field('owner',db.person),               migrate='test_dog.table')
 &gt;&gt;&gt; db.dog.insert(name='Snoopy', birth=None, owner=person_id)
 1

 A simple JOIN

 &gt;&gt;&gt; len(db(db.dog.owner==db.person.id).select())
 1

 &gt;&gt;&gt; len(db().select(db.person.ALL, db.dog.name,left=db.dog.on(db.dog.owner==db.person.id)))
 1

 Drop tables

 &gt;&gt;&gt; db.dog.drop()
 &gt;&gt;&gt; db.person.drop()

 Example of many 2 many relation and Set

 &gt;&gt;&gt; tmp = db.define_table('author', Field('name'),                            migrate='test_author.table')
 &gt;&gt;&gt; tmp = db.define_table('paper', Field('title'),                            migrate='test_paper.table')
 &gt;&gt;&gt; tmp = db.define_table('authorship',            Field('author_id', db.author),            Field('paper_id', db.paper),            migrate='test_authorship.table')
 &gt;&gt;&gt; aid = db.author.insert(name='Massimo')
 &gt;&gt;&gt; pid = db.paper.insert(title='QCD')
 &gt;&gt;&gt; tmp = db.authorship.insert(author_id=aid, paper_id=pid)

 Define a Set

 &gt;&gt;&gt; authored_papers = db((db.author.id==db.authorship.author_id)&amp;(db.paper.id==db.authorship.paper_id))
 &gt;&gt;&gt; rows = authored_papers.select(db.author.name, db.paper.title)
 &gt;&gt;&gt; for row in rows: print row.author.name, row.paper.title
 Massimo QCD

 Example of search condition using  belongs

 &gt;&gt;&gt; set = (1, 2, 3)
 &gt;&gt;&gt; rows = db(db.paper.id.belongs(set)).select(db.paper.ALL)
 &gt;&gt;&gt; print rows[0].title
 QCD

 Example of search condition using nested select

 &gt;&gt;&gt; nested_select = db()._select(db.authorship.paper_id)
 &gt;&gt;&gt; rows = db(db.paper.id.belongs(nested_select)).select(db.paper.ALL)
 &gt;&gt;&gt; print rows[0].title
 QCD

 Example of expressions

 &gt;&gt;&gt; mynumber = db.define_table('mynumber', Field('x', 'integer'))
 &gt;&gt;&gt; db(mynumber.id&gt;0).delete()
 0
 &gt;&gt;&gt; for i in range(10): tmp = mynumber.insert(x=i)
 &gt;&gt;&gt; db(mynumber.id&gt;0).select(mynumber.x.sum())[0](mynumber.x.sum())
 45

 &gt;&gt;&gt; db(mynumber.x+2==5).select(mynumber.x + 2)[0](mynumber.x + 2)
 5

 Output in csv

 &gt;&gt;&gt; print str(authored_papers.select(db.author.name, db.paper.title)).strip()
 author.name,paper.title
 Massimo,QCD

 Delete all leftover tables

 &gt;&gt;&gt; DAL.distributed_transaction_commit(db)

 &gt;&gt;&gt; db.mynumber.drop()
 &gt;&gt;&gt; db.authorship.drop()
 &gt;&gt;&gt; db.author.drop()
 &gt;&gt;&gt; db.paper.drop()
 

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="CALLABLETYPES"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">CALLABLETYPES</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">(</code>&lt;type 'function'&gt;<code class="variable-op">,</code>
 &lt;type 'function'&gt;<code class="variable-op">,</code>
 &lt;type 'builtin_function_or_method'&gt;<code class="variable-op">,</code>
 &lt;type 'instancemethod'&gt;<code class="variable-op">,</code>
 &lt;type 'builtin_function_or_method'&gt;<code class="variable-group">)</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_content"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_content</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-group">(?P&lt;</code><code class="re-ref">table</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\.<code class="re-group">(?P&lt;</code><code class="re-ref">field</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\.<code class="re-group">(?P&lt;</code><code class="re-ref">uuidkey</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
\.<code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code>\w<code class="re-op">+</code><code class="re-group">)</code>\.\w<code class="re-op">+</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_python_keywords"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_python_keywords</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'^<code class="re-group">(</code>and<code class="re-op">|</code>del<code class="re-op">|</code>from<code class="re-op">|</code>not<code class="re-op">|</code>while<code class="re-op">|</code>as<code class="re-op">|</code>elif<code class="re-op">|</code>global<code class="re-op">|</code>or<code class="re-op">|</code>with<code class="re-op">|</code>assert<code class="re-op">|</code>el<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
se<code class="re-op">|</code>if<code class="re-op">|</code>pass<code class="re-op">|</code>yield<code class="re-op">|</code>break<code class="re-op">|</code>except<code class="re-op">|</code>import<code class="re-op">|</code>print<code class="re-op">|</code>class<code class="re-op">|</code>exec<code class="re-op">|</code>in<code class="re-op">|</code>raise<code class="re-op">|</code>continu<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
e<code class="re-op">|</code>finally<code class="re-op">|</code>is<code class="re-op">|</code>return<code class="re-op">|</code>def<code class="re-op">|</code>for<code class="re-op">|</code>lambda<code class="re-op">|</code>try<code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ADAPTERS"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ADAPTERS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">couchdb</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.CouchDBAdapter'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">cubrid</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.CubridAdapter'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">db2</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.DB2Adapter'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">firebird</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.FireBirdAdapter'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">firebird_embedded</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.FireBirdAdapter'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gae</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.GoogleDatastoreAdapter'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">google:datastore</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'web2py.gluon.dal.GoogleDatastoreAdapter'&gt;<code class="variable-op"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal-pysrc.html version [db12cff127].

more than 10,000 changes

Added applications/examples/static/epydoc/web2py.gluon.dal.BaseAdapter-class.html version [a2f1c94717].
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.BaseAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;BaseAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.BaseAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BaseAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+    
             |    
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+
                 |
                <strong class="uidshort">BaseAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a>,
    <a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a>,
    <a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a>,
    <a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a>,
    <a href="web2py.gluon.dal.InformixAdapter-class.html">InformixAdapter</a>,
    <a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a>,
    <a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a>,
    <a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a>,
    <a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a>,
    <a href="web2py.gluon.dal.OracleAdapter-class.html">OracleAdapter</a>,
    <a href="web2py.gluon.dal.SAPDBAdapter-class.html">SAPDBAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="integrity_error"></a><span class="summary-sig-name">integrity_error</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.integrity_error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_exists"></a><span class="summary-sig-name">file_exists</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.file_exists">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_open"></a><span class="summary-sig-name">file_open</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">rb</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">lock</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.file_open">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_close"></a><span class="summary-sig-name">file_close</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fileobj</span>,
        <span class="summary-sig-arg">unlock</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.file_close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_delete"></a><span class="summary-sig-name">file_delete</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.file_delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.BaseAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd635f0&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sequence_name"></a><span class="summary-sig-name">sequence_name</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.sequence_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="trigger_name"></a><span class="summary-sig-name">trigger_name</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.trigger_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_table"></a><span class="summary-sig-name">create_table</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">polymodel</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.create_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="migrate_table"></a><span class="summary-sig-name">migrate_table</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">sql_fields</span>,
        <span class="summary-sig-arg">sql_fields_old</span>,
        <span class="summary-sig-arg">sql_fields_aux</span>,
        <span class="summary-sig-arg">logfile</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.migrate_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="LOWER"></a><span class="summary-sig-name">LOWER</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.LOWER">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="UPPER"></a><span class="summary-sig-name">UPPER</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.UPPER">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="EXTRACT"></a><span class="summary-sig-name">EXTRACT</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">what</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.EXTRACT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="AGGREGATE"></a><span class="summary-sig-name">AGGREGATE</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">what</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.AGGREGATE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="JOIN"></a><span class="summary-sig-name">JOIN</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="LEFT_JOIN"></a><span class="summary-sig-name">LEFT_JOIN</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.LEFT_JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="RANDOM"></a><span class="summary-sig-name">RANDOM</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="NOT_NULL"></a><span class="summary-sig-name">NOT_NULL</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">default</span>,
        <span class="summary-sig-arg">field_type</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.NOT_NULL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="COALESCE_ZERO"></a><span class="summary-sig-name">COALESCE_ZERO</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.COALESCE_ZERO">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="ALLOW_NULL"></a><span class="summary-sig-name">ALLOW_NULL</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.ALLOW_NULL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="SUBSTRING"></a><span class="summary-sig-name">SUBSTRING</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">parameters</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.SUBSTRING">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="PRIMARY_KEY"></a><span class="summary-sig-name">PRIMARY_KEY</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.PRIMARY_KEY">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_drop"></a><span class="summary-sig-name">_drop</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="drop"></a><span class="summary-sig-name">drop</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_insert"></a><span class="summary-sig-name">_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="insert"></a><span class="summary-sig-name">insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bulk_insert"></a><span class="summary-sig-name">bulk_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">items</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.bulk_insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="NOT"></a><span class="summary-sig-name">NOT</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.NOT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="AND"></a><span class="summary-sig-name">AND</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.AND">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="OR"></a><span class="summary-sig-name">OR</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.OR">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="BELONGS"></a><span class="summary-sig-name">BELONGS</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.BELONGS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="LIKE"></a><span class="summary-sig-name">LIKE</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.LIKE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="STARTSWITH"></a><span class="summary-sig-name">STARTSWITH</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.STARTSWITH">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="ENDSWITH"></a><span class="summary-sig-name">ENDSWITH</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.ENDSWITH">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CONTAINS"></a><span class="summary-sig-name">CONTAINS</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.CONTAINS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="EQ"></a><span class="summary-sig-name">EQ</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.EQ">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="NE"></a><span class="summary-sig-name">NE</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.NE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="LT"></a><span class="summary-sig-name">LT</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.LT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="LE"></a><span class="summary-sig-name">LE</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.LE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="GT"></a><span class="summary-sig-name">GT</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.GT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="GE"></a><span class="summary-sig-name">GE</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.GE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="ADD"></a><span class="summary-sig-name">ADD</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.ADD">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="SUB"></a><span class="summary-sig-name">SUB</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.SUB">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="MUL"></a><span class="summary-sig-name">MUL</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.MUL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="DIV"></a><span class="summary-sig-name">DIV</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.DIV">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="MOD"></a><span class="summary-sig-name">MOD</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.MOD">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="AS"></a><span class="summary-sig-name">AS</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.AS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="ON"></a><span class="summary-sig-name">ON</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.ON">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="INVERT"></a><span class="summary-sig-name">INVERT</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.INVERT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="COMMA"></a><span class="summary-sig-name">COMMA</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.COMMA">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="expand"></a><span class="summary-sig-name">expand</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">expression</span>,
        <span class="summary-sig-arg">field_type</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.expand">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="alias"></a><span class="summary-sig-name">alias</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">alias</span>)</span><br />
      given a table object, makes a new table object with alias 
      name.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.alias">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_truncate"></a><span class="summary-sig-name">_truncate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="truncate"></a><span class="summary-sig-name">truncate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"> </code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_update"></a><span class="summary-sig-name">_update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update"></a><span class="summary-sig-name">update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_delete"></a><span class="summary-sig-name">_delete</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="delete"></a><span class="summary-sig-name">delete</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_table"></a><span class="summary-sig-name">get_table</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.get_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_select"></a><span class="summary-sig-name">_select</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="select_limitby"></a><span class="summary-sig-name">select_limitby</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="select"></a><span class="summary-sig-name">select</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span><br />
      Always returns a Rows object, even if it may be empty</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_count"></a><span class="summary-sig-name">_count</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter._count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="count"></a><span class="summary-sig-name">count</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="tables"></a><span class="summary-sig-name">tables</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.tables">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="commit"></a><span class="summary-sig-name">commit</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.commit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rollback"></a><span class="summary-sig-name">rollback</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.rollback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="close"></a><span class="summary-sig-name">close</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="distributed_transaction_begin"></a><span class="summary-sig-name">distributed_transaction_begin</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.distributed_transaction_begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="prepare"></a><span class="summary-sig-name">prepare</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.prepare">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="commit_prepared"></a><span class="summary-sig-name">commit_prepared</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.commit_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rollback_prepared"></a><span class="summary-sig-name">rollback_prepared</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.rollback_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="concat_add"></a><span class="summary-sig-name">concat_add</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.concat_add">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="constraint_name"></a><span class="summary-sig-name">constraint_name</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fieldname</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.constraint_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_sequence_and_triggers"></a><span class="summary-sig-name">create_sequence_and_triggers</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="log_execute"></a><span class="summary-sig-name">log_execute</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.log_execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="execute"></a><span class="summary-sig-name">execute</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="represent"></a><span class="summary-sig-name">represent</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.represent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="represent_exceptions"></a><span class="summary-sig-name">represent_exceptions</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.represent_exceptions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="lastrowid"></a><span class="summary-sig-name">lastrowid</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="integrity_error_class"></a><span class="summary-sig-name">integrity_error_class</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.integrity_error_class">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rowslice"></a><span class="summary-sig-name">rowslice</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>)</span><br />
      by default this function does nothing, overload when db does not 
      do slicing</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.rowslice">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parse"></a><span class="summary-sig-name">parse</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">colnames</span>,
        <span class="summary-sig-arg">blob_decode</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.parse">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="filter_tenant"></a><span class="summary-sig-name">filter_tenant</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">tablenames</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.filter_tenant">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="maxcharlength"></a><span class="summary-name">maxcharlength</span> = <code title="32768">32768</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="commit_on_alter_table"></a><span class="summary-name">commit_on_alter_table</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="support_distributed_transaction"></a><span class="summary-name">support_distributed_transaction</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="uploads_in_blob"></a><span class="summary-name">uploads_in_blob</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.BaseAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BLOB',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'TIMESTAMP',
 'decimal': 'DOUBLE',
 'double': 'DOUBLE',
 'id': 'INTEGER PRIMARY KEY AUTOINCREMENT',
 'integer': 'INTEGER',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd635f0&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#BaseAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DOUBLE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DOUBLE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER PRIMARY KEY AUTOINCREMENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.ConnectionPool-class.html version [56bc1749c0].
















































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.ConnectionPool</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;ConnectionPool
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.ConnectionPool-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ConnectionPool</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#ConnectionPool">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">ConnectionPool</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder" class="summary-sig-name">find_or_make_work_folder</a>(<span class="summary-sig-arg">self</span>)</span><br />
      this actually does not make the folder.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#ConnectionPool.find_or_make_work_folder">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="pool_connection"></a><span class="summary-sig-name">pool_connection</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#ConnectionPool.pool_connection">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_folder"></a><span class="summary-sig-name">set_folder</span>(<span class="summary-sig-arg">folder</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#ConnectionPool.set_folder">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="close_all_instances"></a><span class="summary-sig-name">close_all_instances</span>(<span class="summary-sig-arg">action</span>)</span><br />
      to close cleanly databases in a multithreaded environment</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#ConnectionPool.close_all_instances">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="pools"></a><span class="summary-name">pools</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="find_or_make_work_folder"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">find_or_make_work_folder</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#ConnectionPool.find_or_make_work_folder">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  this actually does not make the folder. it has to be there
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.CouchDBAdapter-class.html version [478c363b53].


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.CouchDBAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;CouchDBAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.CouchDBAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CouchDBAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
          <a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a> --+
                         |
                        <strong class="uidshort">CouchDBAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#file_exists" class="summary-sig-name">file_exists</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.file_exists">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#file_open" class="summary-sig-name">file_open</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">rb</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">lock</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.file_open">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#file_close" class="summary-sig-name">file_close</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fileobj</span>,
        <span class="summary-sig-arg">unlock</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.file_close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#expand" class="summary-sig-name">expand</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">expression</span>,
        <span class="summary-sig-arg">field_type</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.expand">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#AND" class="summary-sig-name">AND</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.AND">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#OR" class="summary-sig-name">OR</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.OR">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#EQ" class="summary-sig-name">EQ</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.EQ">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#NE" class="summary-sig-name">NE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.NE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#COMMA" class="summary-sig-name">COMMA</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.COMMA">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#represent" class="summary-sig-name">represent</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.represent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">couchdb://127.0.0.1:5984</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd73500&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#create_table" class="summary-sig-name">create_table</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">polymodel</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.create_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#insert" class="summary-sig-name">insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#_select" class="summary-sig-name">_select</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter._select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#select" class="summary-sig-name">select</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span><br />
      Always returns a Rows object, even if it may be empty</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#delete" class="summary-sig-name">delete</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CouchDBAdapter-class.html#count" class="summary-sig-name">count</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rowslice">rowslice</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode">to_unicode</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="uploads_in_blob"></a><span class="summary-name">uploads_in_blob</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.CouchDBAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': &lt;type 'str'&gt;,
 'boolean': &lt;type 'bool'&gt;,
 'date': &lt;type 'datetime.date'&gt;,
 'datetime': &lt;type 'datetime.datetime'&gt;,
 'double': &lt;type 'float'&gt;,
 'id': &lt;type 'long'&gt;,
 'integer': &lt;type 'long'&gt;,
 'list:integer': &lt;type 'list'&gt;,
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'str'&gt;<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'bool'&gt;<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#driver">driver</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="file_exists"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">file_exists</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.file_exists">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  to be used ONLY for files that on GAE may not be on filesystem
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">BaseAdapter.file_exists</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="file_open"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">file_open</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">rb</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">lock</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.file_open">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  to be used ONLY for files that on GAE may not be on filesystem
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">BaseAdapter.file_open</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="file_close"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">file_close</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">fileobj</span>,
        <span class="sig-arg">unlock</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.file_close">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  to be used ONLY for files that on GAE may not be on filesystem
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">BaseAdapter.file_close</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="expand"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">expand</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">expression</span>,
        <span class="sig-arg">field_type</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.expand">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#expand">BaseAdapter.expand</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="AND"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AND</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.AND">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.NoSQLAdapter-class.html#AND">NoSQLAdapter.AND</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="OR"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">OR</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.OR">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.NoSQLAdapter-class.html#OR">NoSQLAdapter.OR</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="EQ"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">EQ</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.EQ">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">BaseAdapter.EQ</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="NE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">NE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.NE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#NE">BaseAdapter.NE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="COMMA"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">COMMA</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.COMMA">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">BaseAdapter.COMMA</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.represent">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent">NoSQLAdapter.represent</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">couchdb://127.0.0.1:5984</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd73500&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_table"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_table</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fake_migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">polymodel</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.create_table">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">BaseAdapter.create_table</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="insert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#insert">BaseAdapter.insert</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_select"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_select</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>,
        <span class="sig-arg">attributes</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter._select">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.NoSQLAdapter-class.html#_select">NoSQLAdapter._select</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>,
        <span class="sig-arg">attributes</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.select">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Always returns a Rows object, even if it may be empty
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select">BaseAdapter.select</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="delete"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">delete</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.delete">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#delete">BaseAdapter.delete</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="update"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.update">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#update">BaseAdapter.update</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">count</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">distinct</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CouchDBAdapter.count">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#count">BaseAdapter.count</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'str'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'bool'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'datetime.date'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'datetime.datetime'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'float'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'long'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'long'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">list:integer</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'list'&gt;<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.CubridAdapter-class.html version [12de98219b].









































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.CubridAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;CubridAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.CubridAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CubridAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CubridAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
          <a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a> --+
                         |
                        <strong class="uidshort">CubridAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.CubridAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6e488&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CubridAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared">rollback_prepared</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#_drop">_drop</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#types">types</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6e488&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#CubridAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.MySQLAdapter-class.html#__init__">MySQLAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.DAL-class.html version [dbaca854e9].

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.DAL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;DAL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.DAL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DAL</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      dict --+
             |
            <strong class="uidshort">DAL</strong>
</pre>

<hr />
<p>an instance of this class represents a database connection</p>
  Example:
<pre class="literalblock">
  db = DAL('sqlite://test.db')
  db.define_table('tablename', Field('fieldname1'),
                               Field('fieldname2'))
</pre><br /><br />

<!-- ==================== NESTED CLASSES ==================== -->
<a name="section-NestedClasses"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Nested Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-NestedClasses"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Field-class.html" class="summary-name">Field</a><br />
      an instance of this class represents a database field
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Table-class.html" class="summary-name">Table</a><br />
      an instance of this class represents a database table
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">uri</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">sqlite://dummy.db</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">check_reserved</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">migrate_enabled</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate_all</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">decode_credentials</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">attempts</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">auto_import</span>=<span class="summary-sig-default">True</span>)</span><br />
      Creates a new Database Abstraction Layer instance.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="import_table_definitions"></a><span class="summary-sig-name">import_table_definitions</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.import_table_definitions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#check_reserved_keyword" class="summary-sig-name">check_reserved_keyword</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Validates ``name`` against SQL keywords Uses self.check_reserve 
      which is a list of operators to use.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.check_reserved_keyword">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__contains__" class="summary-sig-name">__contains__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span><br />
      Returns:
True if D has a key k, else False</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__contains__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#parse_as_rest" class="summary-sig-name">parse_as_rest</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">patterns</span>,
        <span class="summary-sig-arg">args</span>,
        <span class="summary-sig-arg">vars</span>,
        <span class="summary-sig-arg">query</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">nested_select</span>=<span class="summary-sig-default">True</span>)</span><br />
      EXAMPLE:...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.parse_as_rest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="define_table"></a><span class="summary-sig-name">define_table</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">*fields</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.define_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__iter__" class="summary-sig-name">__iter__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      iter(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      x[y]</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__setitem__" class="summary-sig-name">__setitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x[i]=y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x.__setattr__('name', value) &lt;==&gt; x.name = value</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="commit"></a><span class="summary-sig-name">commit</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.commit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rollback"></a><span class="summary-sig-name">rollback</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.rollback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DAL-class.html#executesql" class="summary-sig-name">executesql</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">placeholders</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">as_dict</span>=<span class="summary-sig-default">True</span>)</span><br />
      placeholders is optional and will always be None when using DAL if
      using raw SQL with placeholders, placeholders may be a sequence of 
      values to be substituted in or, *if supported by the DB driver*, a 
      dictionary with keys matching named placeholders in your SQL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.executesql">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_update_referenced_by"></a><span class="summary-sig-name">_update_referenced_by</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL._update_referenced_by">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="export_to_csv_file"></a><span class="summary-sig-name">export_to_csv_file</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ofile</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.export_to_csv_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="import_from_csv_file"></a><span class="summary-sig-name">import_from_csv_file</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ifile</span>,
        <span class="summary-sig-arg">id_map</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">null</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">&lt;NULL&gt;</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">unique</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">uuid</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.import_from_csv_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_folder"></a><span class="summary-sig-name">set_folder</span>(<span class="summary-sig-arg">folder</span>)</span><br />
      # ## this allows gluon to set a folder for this thread # ## 
      &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; Should go away as new DAL 
      replaces old sql.py</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.set_folder">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="distributed_transaction_begin"></a><span class="summary-sig-name">distributed_transaction_begin</span>(<span class="summary-sig-arg">*instances</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.distributed_transaction_begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="distributed_transaction_commit"></a><span class="summary-sig-name">distributed_transaction_commit</span>(<span class="summary-sig-arg">*instances</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.distributed_transaction_commit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">uri</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">sqlite://dummy.db</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">check_reserved</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fake_migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">migrate_enabled</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fake_migrate_all</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">decode_credentials</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">attempts</span>=<span class="sig-default">5</span>,
        <span class="sig-arg">auto_import</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Creates a new Database Abstraction Layer instance.

Keyword arguments:

:uri: string that contains information for connecting to a database.
       (default: 'sqlite://dummy.db')
:pool_size: How many open connections to make to the database object.
:folder: &lt;please update me&gt;
:db_codec: string encoding of the database (default: 'UTF-8')
:check_reserved: list of adapters to check tablenames and column names
                 against sql reserved keywords. (Default None)

* 'common' List of sql keywords that are common to all database types
        such as &quot;SELECT, INSERT&quot;. (recommended)
* 'all' Checks against all known SQL keywords. (not recommended)
        &lt;adaptername&gt; Checks against the specific adapters list of keywords
        (recommended)
* '&lt;adaptername&gt;_nonreserved' Checks against the specific adapters
        list of nonreserved keywords. (if available)
:migrate (defaults to True) sets default migrate behavior for all tables
:fake_migrate (defaults to False) sets default fake_migrate behavior for all tables
:migrate_enabled (defaults to True). If set to False disables ALL migrations
:fake_migrate_all (defaults to False). If sets to True fake migrates ALL tables
:attempts (defaults to 5). Number of times to attempt connecting

</pre>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new empty dictionary

</pre></dd>
    <dt>Overrides:
      dict.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="check_reserved_keyword"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">check_reserved_keyword</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.check_reserved_keyword">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Validates ``name`` against SQL keywords Uses self.check_reserve which 
  is a list of operators to use. self.check_reserved ['common', 'postgres',
  'mysql'] self.check_reserved ['all']
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__contains__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__contains__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>)</span>
    <br /><em class="fname">(In operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__contains__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
True if D has a key k, else False

</pre></dd>
    <dt>Overrides:
      dict.__contains__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="parse_as_rest"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parse_as_rest</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">patterns</span>,
        <span class="sig-arg">args</span>,
        <span class="sig-arg">vars</span>,
        <span class="sig-arg">query</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">nested_select</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.parse_as_rest">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

        EXAMPLE:

db.define_table('person',Field('name'),Field('info'))
db.define_table('pet',Field('person',db.person),Field('name'),Field('info'))

@request.restful()
def index():
    def GET(*kargs,**kvars):
        patterns = [
            &quot;/persons[person]&quot;,
            &quot;/{person.name.startswith}&quot;,
            &quot;/{person.name}/:field&quot;,
            &quot;/{person.name}/pets[pet.person]&quot;,
            &quot;/{person.name}/pet[pet.person]/{pet.name}&quot;,
            &quot;/{person.name}/pet[pet.person]/{pet.name}/:field&quot;
            ]
        parser = db.parse_as_rest(patterns,kargs,kvars)
        if parser.status == 200:
            return dict(content=parser.response)
        else:
            raise HTTP(parser.status,parser.error)
    def POST(table_name,**kvars):
        if table_name == 'person':
            return db.person.validate_and_insert(**kvars)
        elif table_name == 'pet':
            return db.pet.validate_and_insert(**kvars)
        else:
            raise HTTP(400)
    return locals()
        

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__iter__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__iter__</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__iter__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  iter(x)
  <dl class="fields">
    <dt>Overrides:
      dict.__iter__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__getitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Indexing operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__getitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x[y]
  <dl class="fields">
    <dt>Overrides:
      dict.__getitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Index assignment operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__setitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x[i]=y
  <dl class="fields">
    <dt>Overrides:
      dict.__setitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__setattr__('name', value) &lt;==&gt; x.name = value
  <dl class="fields">
    <dt>Overrides:
      object.__setattr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      dict.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="executesql"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">executesql</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">placeholders</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">as_dict</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DAL.executesql">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>placeholders is optional and will always be None when using DAL if 
  using raw SQL with placeholders, placeholders may be a sequence of values
  to be substituted in or, *if supported by the DB driver*, a dictionary 
  with keys matching named placeholders in your SQL.</p>
  <p>Added 2009-12-05 &quot;as_dict&quot; optional argument. Will always be
  None when using DAL. If using raw SQL can be set to True and the results 
  cursor returned by the DB driver will be converted to a sequence of 
  dictionaries keyed with the db field names. Tested with SQLite but should
  work with any database since the cursor.description used to get field 
  names is part of the Python dbi 2.0 specs. Results returned with as_dict 
  = True are the same as those returned when applying .to_list() to a DAL 
  query.</p>
  <p>[{field1: value1, field2: value2}, {field1: value1b, field2: 
  value2b}]</p>
  --bmeredyk
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.DB2Adapter-class.html version [4684febe52].





































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.DB2Adapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;DB2Adapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.DB2Adapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DB2Adapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">DB2Adapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.TeradataAdapter-class.html">TeradataAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#LEFT_JOIN" class="summary-sig-name">LEFT_JOIN</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.LEFT_JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#represent_exceptions" class="summary-sig-name">represent_exceptions</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.represent_exceptions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6d938&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.DB2Adapter-class.html#rowslice" class="summary-sig-name">rowslice</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>)</span><br />
      by default this function does nothing, overload when db does not 
      do slicing</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.rowslice">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('pyodbc', None)">globals().get('pyodbc', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DB2Adapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BLOB',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'TIMESTAMP',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'DOUBLE',
 'id': 'INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL',
 'integer': 'INT',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="LEFT_JOIN"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LEFT_JOIN</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.LEFT_JOIN">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">BaseAdapter.LEFT_JOIN</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent_exceptions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent_exceptions</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.represent_exceptions">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">BaseAdapter.represent_exceptions</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6d938&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#execute">BaseAdapter.execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rowslice"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rowslice</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">rows</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DB2Adapter.rowslice">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  by default this function does nothing, overload when db does not do 
  slicing
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">BaseAdapter.rowslice</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DOUBLE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.DatabaseStoredFile-class.html version [81f5061ea5].
























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.DatabaseStoredFile</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;DatabaseStoredFile
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.DatabaseStoredFile-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DatabaseStoredFile</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile">source&nbsp;code</a></span><br /><br />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">bytes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile.read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="readline"></a><span class="summary-sig-name">readline</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile.readline">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile.write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="close"></a><span class="summary-sig-name">close</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile.close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="exists"></a><span class="summary-sig-name">exists</span>(<span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DatabaseStoredFile.exists">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="web2py_filesystem"></a><span class="summary-name">web2py_filesystem</span> = <code title="True">True</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Expression-class.html version [6f4cd3eb71].
































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Expression</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Expression
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Expression-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Expression</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Expression</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.Field-class.html">Field</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Expression-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">op</span>,
        <span class="summary-sig-arg">first</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sum"></a><span class="summary-sig-name">sum</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.sum">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="max"></a><span class="summary-sig-name">max</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.max">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="min"></a><span class="summary-sig-name">min</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.min">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="len"></a><span class="summary-sig-name">len</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.len">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="lower"></a><span class="summary-sig-name">lower</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.lower">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="upper"></a><span class="summary-sig-name">upper</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.upper">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="year"></a><span class="summary-sig-name">year</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.year">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="month"></a><span class="summary-sig-name">month</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.month">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="day"></a><span class="summary-sig-name">day</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.day">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="hour"></a><span class="summary-sig-name">hour</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.hour">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="minutes"></a><span class="summary-sig-name">minutes</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.minutes">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="coalesce_zero"></a><span class="summary-sig-name">coalesce_zero</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.coalesce_zero">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="seconds"></a><span class="summary-sig-name">seconds</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.seconds">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getslice__"></a><span class="summary-sig-name">__getslice__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">start</span>,
        <span class="summary-sig-arg">stop</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__getslice__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Expression-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__or__"></a><span class="summary-sig-name">__or__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__or__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__invert__"></a><span class="summary-sig-name">__invert__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__invert__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__add__"></a><span class="summary-sig-name">__add__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__add__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__sub__"></a><span class="summary-sig-name">__sub__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__sub__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__mul__"></a><span class="summary-sig-name">__mul__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__mul__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__div__"></a><span class="summary-sig-name">__div__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__div__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__mod__"></a><span class="summary-sig-name">__mod__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__mod__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__eq__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__ne__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__lt__"></a><span class="summary-sig-name">__lt__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__lt__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__le__"></a><span class="summary-sig-name">__le__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__le__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__gt__"></a><span class="summary-sig-name">__gt__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__gt__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ge__"></a><span class="summary-sig-name">__ge__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__ge__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="like"></a><span class="summary-sig-name">like</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.like">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="belongs"></a><span class="summary-sig-name">belongs</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.belongs">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="startswith"></a><span class="summary-sig-name">startswith</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.startswith">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="endswith"></a><span class="summary-sig-name">endswith</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.endswith">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="contains"></a><span class="summary-sig-name">contains</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.contains">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="with_alias"></a><span class="summary-sig-name">with_alias</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">alias</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.with_alias">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">op</span>,
        <span class="sig-arg">first</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">type</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Expression.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Field-class.html version [8b5e77e0e7].




















































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Field</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Field
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Field-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Field</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.dal.Expression-class.html">Expression</a> --+
             |
            <strong class="uidshort">Field</strong>
</pre>

<hr />
<p>an instance of this class represents a database field</p>
  example:
<pre class="literalblock">
   a = Field(name, 'string', length=32, default=None, required=False,
       requires=IS_NOT_EMPTY(), ondelete='CASCADE',
       notnull=False, unique=False,
       uploadfield=True, widget=None, label=None, comment=None,
       uploadfield=True, # True means store on disk,
                         # 'a_field_name' means store in this field in db
                         # False means file content will be discarded.
       writable=True, readable=True, update=None, authorize=None,
       autodelete=False, represent=None, uploadfolder=None,
       uploadseparate=False # upload to separate directories by uuid_keys
                            # first 2 character and tablename.fieldname
                            # False - old behavior
                            # True - put uploaded file in
                            #   &lt;uploaddir&gt;/&lt;tablename&gt;.&lt;fieldname&gt;/uuid_key[:2]
                            #        directory)
</pre>
  <p>to be used as argument of DAL.define_table</p>
  <p>allowed field types: string, boolean, integer, double, text, blob, 
  date, time, datetime, upload, password</p>
  strings must have a length of Adapter.maxcharlength by default (512 or
  255 for mysql) fields should have a default or they will be required in 
  SQLFORMs the requires argument is used to validate the field input in 
  SQLFORMs<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Field-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fieldname</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">string</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">length</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd1ec80&gt;</span>,
        <span class="summary-sig-arg">required</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">requires</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd1ec80&gt;</span>,
        <span class="summary-sig-arg">ondelete</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">CASCADE</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">notnull</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">unique</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">uploadfield</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">widget</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">label</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">comment</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">writable</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">readable</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">update</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">authorize</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">autodelete</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">represent</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">uploadfolder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">uploadseparate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">compute</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">custom_store</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">custom_retrieve</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">custom_delete</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="store"></a><span class="summary-sig-name">store</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.store">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="retrieve"></a><span class="summary-sig-name">retrieve</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.retrieve">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="formatter"></a><span class="summary-sig-name">formatter</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="validate"></a><span class="summary-sig-name">validate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="count"></a><span class="summary-sig-name">count</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__nonzero__"></a><span class="summary-sig-name">__nonzero__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.__nonzero__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Field-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.Expression-class.html">Expression</a></code></b>:
      <code><a href="web2py.gluon.dal.Expression-class.html#__add__">__add__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__div__">__div__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__eq__">__eq__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__ge__">__ge__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__getslice__">__getslice__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__gt__">__gt__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__invert__">__invert__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__le__">__le__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__lt__">__lt__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__mod__">__mod__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__mul__">__mul__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__ne__">__ne__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__or__">__or__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#__sub__">__sub__</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#belongs">belongs</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#coalesce_zero">coalesce_zero</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#contains">contains</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#day">day</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#endswith">endswith</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#hour">hour</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#len">len</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#like">like</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#lower">lower</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#max">max</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#min">min</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#minutes">minutes</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#month">month</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#seconds">seconds</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#startswith">startswith</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#sum">sum</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#upper">upper</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#with_alias">with_alias</a></code>,
      <code><a href="web2py.gluon.dal.Expression-class.html#year">year</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">fieldname</span>,
        <span class="sig-arg">type</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">string</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">length</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">default</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd1ec80&gt;</span>,
        <span class="sig-arg">required</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">requires</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd1ec80&gt;</span>,
        <span class="sig-arg">ondelete</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">CASCADE</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">notnull</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">unique</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">uploadfield</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">widget</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">label</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">comment</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">writable</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">readable</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">update</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">authorize</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">autodelete</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">represent</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">uploadfolder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">uploadseparate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">compute</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">custom_store</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">custom_retrieve</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">custom_delete</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.Expression-class.html#__init__">Expression.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Field.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.Expression-class.html#__str__">Expression.__str__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.FireBirdAdapter-class.html version [5dc9fba6a8].










































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.FireBirdAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;FireBirdAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.FireBirdAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FireBirdAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">FireBirdAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html">FireBirdEmbeddedAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#sequence_name" class="summary-sig-name">sequence_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.sequence_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#trigger_name" class="summary-sig-name">trigger_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.trigger_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#NOT_NULL" class="summary-sig-name">NOT_NULL</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">default</span>,
        <span class="summary-sig-arg">field_type</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.NOT_NULL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#SUBSTRING" class="summary-sig-name">SUBSTRING</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">parameters</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.SUBSTRING">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#_drop" class="summary-sig-name">_drop</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter._drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#_truncate" class="summary-sig-name">_truncate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter._truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6d050&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#create_sequence_and_triggers" class="summary-sig-name">create_sequence_and_triggers</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('pyodbc', None)">globals().get('pyodbc', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="commit_on_alter_table"></a><span class="summary-name">commit_on_alter_table</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="support_distributed_transaction"></a><span class="summary-name">support_distributed_transaction</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.FireBirdAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BLOB SUB_TYPE 0',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'TIMESTAMP',
 'decimal': 'DECIMAL(%(precision)s,%(scale)s)',
 'double': 'DOUBLE PRECISION',
 'id': 'INTEGER PRIMARY KEY',
 'integer': 'INTEGER',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB SUB_TYPE 0</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">dat</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="sequence_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sequence_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.sequence_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">BaseAdapter.sequence_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="trigger_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">trigger_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.trigger_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">BaseAdapter.trigger_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="NOT_NULL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">NOT_NULL</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">default</span>,
        <span class="sig-arg">field_type</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.NOT_NULL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">BaseAdapter.NOT_NULL</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="SUBSTRING"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SUBSTRING</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">parameters</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.SUBSTRING">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">BaseAdapter.SUBSTRING</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_drop"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_drop</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter._drop">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">BaseAdapter._drop</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_truncate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_truncate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter._truncate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">BaseAdapter._truncate</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6d050&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_sequence_and_triggers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_sequence_and_triggers</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">BaseAdapter.create_sequence_and_triggers</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB SUB_TYPE 0</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DECIMAL(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DOUBLE PRECISION</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER PRIMARY KEY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html version [22e07c62c5].





































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.FireBirdEmbeddedAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;FireBirdEmbeddedAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FireBirdEmbeddedAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdEmbeddedAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
       <a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a> --+
                         |
                        <strong class="uidshort">FireBirdEmbeddedAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6d230&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdEmbeddedAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#trigger_name">trigger_name</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#_truncate">_truncate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html">FireBirdAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#driver">driver</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.FireBirdAdapter-class.html#types">types</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6d230&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#FireBirdEmbeddedAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.FireBirdAdapter-class.html#__init__">FireBirdAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.GAEDecimalProperty-class.html version [a22ba41e73].















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.GAEDecimalProperty</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;GAEDecimalProperty
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.GAEDecimalProperty-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GAEDecimalProperty</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEDecimalProperty">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
google.appengine.ext.db.Property --+
                                   |
                                  <strong class="uidshort">GAEDecimalProperty</strong>
</pre>

<hr />
GAE decimal implementation<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">precision</span>,
        <span class="summary-sig-arg">scale</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEDecimalProperty.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_value_for_datastore"></a><span class="summary-sig-name">get_value_for_datastore</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">model_instance</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEDecimalProperty.get_value_for_datastore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="make_value_from_datastore"></a><span class="summary-sig-name">make_value_from_datastore</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEDecimalProperty.make_value_from_datastore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="validate"></a><span class="summary-sig-name">validate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEDecimalProperty.validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="data_type"></a><span class="summary-name">data_type</span> = <code title="decimal.Decimal">decimal.Decimal</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.GAEF-class.html version [65c549cf09].




































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.GAEF</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;GAEF
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.GAEF-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GAEF</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEF">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">GAEF</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GAEF-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">op</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">apply</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEF.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GAEF-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEF.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">op</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">apply</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEF.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GAEF.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      object.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.GoogleDatastoreAdapter-class.html version [48ef4914fd].














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.GoogleDatastoreAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;GoogleDatastoreAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GoogleDatastoreAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
          <a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a> --+
                         |
                        <strong class="uidshort">GoogleDatastoreAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_exists" class="summary-sig-name">file_exists</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.file_exists">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_open" class="summary-sig-name">file_open</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">rb</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">lock</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.file_open">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#file_close" class="summary-sig-name">file_close</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fileobj</span>,
        <span class="summary-sig-arg">unlock</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be used ONLY for files that on GAE may not be on filesystem</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.file_close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd71398&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#create_table" class="summary-sig-name">create_table</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">polymodel</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.create_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#expand" class="summary-sig-name">expand</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">expression</span>,
        <span class="summary-sig-arg">field_type</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.expand">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#AND" class="summary-sig-name">AND</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.AND">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#EQ" class="summary-sig-name">EQ</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.EQ">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#NE" class="summary-sig-name">NE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.NE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#LT" class="summary-sig-name">LT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.LT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#LE" class="summary-sig-name">LE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.LE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#GT" class="summary-sig-name">GT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.GT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#GE" class="summary-sig-name">GE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.GE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#INVERT" class="summary-sig-name">INVERT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.INVERT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#COMMA" class="summary-sig-name">COMMA</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.COMMA">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#BELONGS" class="summary-sig-name">BELONGS</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.BELONGS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#CONTAINS" class="summary-sig-name">CONTAINS</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.CONTAINS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#NOT" class="summary-sig-name">NOT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.NOT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#truncate" class="summary-sig-name">truncate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="select_raw"></a><span class="summary-sig-name">select_raw</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">attributes</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.select_raw">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select" class="summary-sig-name">select</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span><br />
      Always returns a Rows object, even if it may be empty</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#count" class="summary-sig-name">count</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#delete" class="summary-sig-name">delete</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>)</span><br />
      This function was changed on 2010-05-04 because according to 
      http://code.google.com/p/googleappengine/issues/detail?id=3119 GAE no
      longer support deleting more than 1000 records.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">update_fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert" class="summary-sig-name">insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html#bulk_insert" class="summary-sig-name">bulk_insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">items</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.bulk_insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rowslice">rowslice</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode">to_unicode</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="uploads_in_blob"></a><span class="summary-name">uploads_in_blob</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="types"></a><span class="summary-name">types</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#driver">driver</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="file_exists"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">file_exists</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.file_exists">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  to be used ONLY for files that on GAE may not be on filesystem
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">BaseAdapter.file_exists</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="file_open"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">file_open</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">rb</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">lock</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.file_open">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  to be used ONLY for files that on GAE may not be on filesystem
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">BaseAdapter.file_open</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="file_close"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">file_close</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">fileobj</span>,
        <span class="sig-arg">unlock</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.file_close">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  to be used ONLY for files that on GAE may not be on filesystem
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">BaseAdapter.file_close</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd71398&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_table"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_table</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fake_migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">polymodel</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.create_table">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">BaseAdapter.create_table</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="expand"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">expand</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">expression</span>,
        <span class="sig-arg">field_type</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.expand">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#expand">BaseAdapter.expand</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="AND"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AND</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.AND">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.NoSQLAdapter-class.html#AND">NoSQLAdapter.AND</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="EQ"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">EQ</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.EQ">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">BaseAdapter.EQ</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="NE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">NE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.NE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#NE">BaseAdapter.NE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.LT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LT">BaseAdapter.LT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.LE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LE">BaseAdapter.LE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="GT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.GT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#GT">BaseAdapter.GT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="GE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.GE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#GE">BaseAdapter.GE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="INVERT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">INVERT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.INVERT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">BaseAdapter.INVERT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="COMMA"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">COMMA</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.COMMA">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">BaseAdapter.COMMA</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="BELONGS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">BELONGS</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.BELONGS">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BaseAdapter.BELONGS</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="CONTAINS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">CONTAINS</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.CONTAINS">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">BaseAdapter.CONTAINS</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="NOT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">NOT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.NOT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">BaseAdapter.NOT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="truncate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">truncate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.truncate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">BaseAdapter.truncate</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>,
        <span class="sig-arg">attributes</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.select">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Always returns a Rows object, even if it may be empty
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select">BaseAdapter.select</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">count</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">distinct</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.count">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#count">BaseAdapter.count</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="delete"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">delete</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.delete">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  This function was changed on 2010-05-04 because according to 
  http://code.google.com/p/googleappengine/issues/detail?id=3119 GAE no 
  longer support deleting more than 1000 records.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#delete">BaseAdapter.delete</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="update"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">update_fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.update">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#update">BaseAdapter.update</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="insert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#insert">BaseAdapter.insert</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="bulk_insert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">bulk_insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">items</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleDatastoreAdapter.bulk_insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">BaseAdapter.bulk_insert</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.GoogleSQLAdapter-class.html version [d43853aa04].












































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.GoogleSQLAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;GoogleSQLAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.GoogleSQLAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GoogleSQLAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleSQLAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
 <a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a> --+
                         |
    object --+           |
             |           |
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+       |
                 |       |
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+   |
                     |   |
          <a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a> --+
                         |
                        <strong class="uidshort">GoogleSQLAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">google:sql://realm:domain/database</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">check_reserved</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6ea28&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleSQLAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html">UseDatabaseStoredFile</a></code></b>:
      <code><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html#file_open">file_open</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared">rollback_prepared</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#_drop">_drop</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MySQLAdapter-class.html">MySQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.contrib.pymysql-module.html">driver</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.MySQLAdapter-class.html#types">types</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">google:sql://realm:domain/database</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">check_reserved</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fake_migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6ea28&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#GoogleSQLAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.MySQLAdapter-class.html#__init__">MySQLAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.InformixAdapter-class.html version [4f0255356e].


























































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.InformixAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;InformixAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.InformixAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class InformixAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">InformixAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#NOT_NULL" class="summary-sig-name">NOT_NULL</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">default</span>,
        <span class="summary-sig-arg">field_type</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.NOT_NULL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#represent_exceptions" class="summary-sig-name">represent_exceptions</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.represent_exceptions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6d500&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.InformixAdapter-class.html#integrity_error_class" class="summary-sig-name">integrity_error_class</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.integrity_error_class">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('informixdb', None)">globals().get('informixdb', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.InformixAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BLOB SUB_TYPE 0',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'DATETIME',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT',
 'id': 'SERIAL',
 'integer': 'INTEGER',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB SUB_TYPE 0</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">dat</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="NOT_NULL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">NOT_NULL</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">default</span>,
        <span class="sig-arg">field_type</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.NOT_NULL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">BaseAdapter.NOT_NULL</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent_exceptions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent_exceptions</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.represent_exceptions">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">BaseAdapter.represent_exceptions</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6d500&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#execute">BaseAdapter.execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="integrity_error_class"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">integrity_error_class</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#InformixAdapter.integrity_error_class">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">BaseAdapter.integrity_error_class</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB SUB_TYPE 0</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">SERIAL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.IngresAdapter-class.html version [03ae703d89].






















































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.IngresAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;IngresAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.IngresAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IngresAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">IngresAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html">IngresUnicodeAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#LEFT_JOIN" class="summary-sig-name">LEFT_JOIN</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.LEFT_JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6de60&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#create_sequence_and_triggers" class="summary-sig-name">create_sequence_and_triggers</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.IngresAdapter-class.html#integrity_error_class" class="summary-sig-name">integrity_error_class</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.integrity_error_class">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('ingresdbi', None)">globals().get('ingresdbi', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.IngresAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BLOB',
 'boolean': 'CHAR(1)',
 'date': 'ANSIDATE',
 'datetime': 'TIMESTAMP WITHOUT TIME ZONE',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT8',
 'id': 'integer4 not null unique with default next value for ii***line\
itemsequence',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ANSIDA</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="LEFT_JOIN"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LEFT_JOIN</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.LEFT_JOIN">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">BaseAdapter.LEFT_JOIN</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6de60&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_sequence_and_triggers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_sequence_and_triggers</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">BaseAdapter.create_sequence_and_triggers</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="integrity_error_class"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">integrity_error_class</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresAdapter.integrity_error_class">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">BaseAdapter.integrity_error_class</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ANSIDATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP WITHOUT TIME ZONE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT8</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">integer4 not null unique with default next value for ii***line</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">itemsequence</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.IngresUnicodeAdapter-class.html version [be5498a12e].


















































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.IngresUnicodeAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;IngresUnicodeAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IngresUnicodeAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#IngresUnicodeAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
         <a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a> --+
                         |
                        <strong class="uidshort">IngresUnicodeAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#select_limitby">select_limitby</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BLOB',
 'boolean': 'CHAR(1)',
 'date': 'ANSIDATE',
 'datetime': 'TIMESTAMP WITHOUT TIME ZONE',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT8',
 'id': 'integer4 not null unique with default next value for ii***line\
itemsequence',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ANSIDA</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.IngresAdapter-class.html">IngresAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.IngresAdapter-class.html#driver">driver</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BLOB</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ANSIDATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP WITHOUT TIME ZONE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT8</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">integer4 not null unique with default next value for ii***line</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">itemsequence</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html version [c1ba390156].
































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.JDBCPostgreSQLAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;JDBCPostgreSQLAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class JDBCPostgreSQLAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCPostgreSQLAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
     <a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a> --+
                         |
                        <strong class="uidshort">JDBCPostgreSQLAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6acf8&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCPostgreSQLAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#sequence_name">sequence_name</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html">PostgreSQLAdapter</a></code></b>:
      <code><a href="psycopg2-module.html">driver</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#types">types</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6acf8&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCPostgreSQLAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__">PostgreSQLAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.JDBCSQLiteAdapter-class.html version [b9fbe073cc].

















































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.JDBCSQLiteAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;JDBCSQLiteAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class JDBCSQLiteAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCSQLiteAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
         <a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a> --+
                         |
                        <strong class="uidshort">JDBCSQLiteAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd69f50&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCSQLiteAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">a</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCSQLiteAdapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html#lastrowid">lastrowid</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html#_truncate">_truncate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html">SQLiteAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.SQLiteAdapter-class.html#web2py_extract">web2py_extract</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#types">types</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd69f50&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCSQLiteAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.SQLiteAdapter-class.html#__init__">SQLiteAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">a</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#JDBCSQLiteAdapter.execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#execute">BaseAdapter.execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.MSSQL2Adapter-class.html version [34da5cced1].





















































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.MSSQL2Adapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;MSSQL2Adapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.MSSQL2Adapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MSSQL2Adapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQL2Adapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
          <a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a> --+
                         |
                        <strong class="uidshort">MSSQL2Adapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html#represent" class="summary-sig-name">represent</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQL2Adapter.represent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQL2Adapter-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">a</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQL2Adapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#select_limitby">select_limitby</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MSSQL2Adapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'IMAGE',
 'boolean': 'CHAR(1)',
 'date': 'DATETIME',
 'datetime': 'DATETIME',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT',
 'id': 'INT IDENTITY PRIMARY KEY',
 'integer': 'INT',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">IMAGE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATET</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html">MSSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.MSSQLAdapter-class.html#driver">driver</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="represent"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQL2Adapter.represent">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent">BaseAdapter.represent</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">a</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQL2Adapter.execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#execute">BaseAdapter.execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">IMAGE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT IDENTITY PRIMARY KEY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.MSSQLAdapter-class.html version [3e0138748b].



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.MSSQLAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;MSSQLAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.MSSQLAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MSSQLAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">MSSQLAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.MSSQL2Adapter-class.html">MSSQL2Adapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#EXTRACT" class="summary-sig-name">EXTRACT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">what</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.EXTRACT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#LEFT_JOIN" class="summary-sig-name">LEFT_JOIN</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.LEFT_JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#ALLOW_NULL" class="summary-sig-name">ALLOW_NULL</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.ALLOW_NULL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#SUBSTRING" class="summary-sig-name">SUBSTRING</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">parameters</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.SUBSTRING">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#PRIMARY_KEY" class="summary-sig-name">PRIMARY_KEY</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.PRIMARY_KEY">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#represent_exceptions" class="summary-sig-name">represent_exceptions</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.represent_exceptions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6b8c0&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">fake_connect</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#integrity_error_class" class="summary-sig-name">integrity_error_class</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.integrity_error_class">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MSSQLAdapter-class.html#rowslice" class="summary-sig-name">rowslice</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>)</span><br />
      by default this function does nothing, overload when db does not 
      do slicing</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.rowslice">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('pyodbc', None)">globals().get('pyodbc', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MSSQLAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'IMAGE',
 'boolean': 'BIT',
 'date': 'DATETIME',
 'datetime': 'DATETIME',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT',
 'id': 'INT IDENTITY PRIMARY KEY',
 'integer': 'INT',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">IMAGE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BIT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="EXTRACT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">EXTRACT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">what</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.EXTRACT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">BaseAdapter.EXTRACT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LEFT_JOIN"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LEFT_JOIN</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.LEFT_JOIN">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">BaseAdapter.LEFT_JOIN</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="ALLOW_NULL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ALLOW_NULL</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.ALLOW_NULL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">BaseAdapter.ALLOW_NULL</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="SUBSTRING"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SUBSTRING</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">parameters</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.SUBSTRING">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">BaseAdapter.SUBSTRING</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="PRIMARY_KEY"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">PRIMARY_KEY</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.PRIMARY_KEY">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">BaseAdapter.PRIMARY_KEY</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent_exceptions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent_exceptions</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.represent_exceptions">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">BaseAdapter.represent_exceptions</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6b8c0&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">fake_connect</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="integrity_error_class"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">integrity_error_class</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.integrity_error_class">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">BaseAdapter.integrity_error_class</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rowslice"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rowslice</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">rows</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MSSQLAdapter.rowslice">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  by default this function does nothing, overload when db does not do 
  slicing
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">BaseAdapter.rowslice</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">IMAGE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BIT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT IDENTITY PRIMARY KEY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.MongoDBAdapter-class.html version [78efdc3075].
























































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.MongoDBAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;MongoDBAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.MongoDBAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MongoDBAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
          <a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a> --+
                         |
                        <strong class="uidshort">MongoDBAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">mongodb://127.0.0.1:5984/db</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd739b0&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#insert" class="summary-sig-name">insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#count" class="summary-sig-name">count</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#select" class="summary-sig-name">select</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span><br />
      Always returns a Rows object, even if it may be empty</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#delete" class="summary-sig-name">delete</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MongoDBAdapter-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rowslice">rowslice</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html">NoSQLAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.NoSQLAdapter-class.html#to_unicode">to_unicode</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="uploads_in_blob"></a><span class="summary-name">uploads_in_blob</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MongoDBAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': &lt;type 'str'&gt;,
 'boolean': &lt;type 'bool'&gt;,
 'date': &lt;type 'datetime.date'&gt;,
 'datetime': &lt;type 'datetime.datetime'&gt;,
 'double': &lt;type 'float'&gt;,
 'id': &lt;type 'long'&gt;,
 'integer': &lt;type 'long'&gt;,
 'list:integer': &lt;type 'list'&gt;,
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'str'&gt;<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'bool'&gt;<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#driver">driver</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">mongodb://127.0.0.1:5984/db</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd739b0&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="insert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#insert">BaseAdapter.insert</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">count</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.count">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#count">BaseAdapter.count</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>,
        <span class="sig-arg">attributes</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.select">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Always returns a Rows object, even if it may be empty
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select">BaseAdapter.select</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="delete"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">delete</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.delete">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#delete">BaseAdapter.delete</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="update"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MongoDBAdapter.update">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#update">BaseAdapter.update</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'str'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'bool'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'datetime.date'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'datetime.datetime'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'float'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'long'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'long'&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">list:integer</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;type 'list'&gt;<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.MySQLAdapter-class.html version [4488c60f3a].
























































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.MySQLAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;MySQLAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.MySQLAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MySQLAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">MySQLAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.CubridAdapter-class.html">CubridAdapter</a>,
    <a href="web2py.gluon.dal.GoogleSQLAdapter-class.html">GoogleSQLAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#SUBSTRING" class="summary-sig-name">SUBSTRING</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">parameters</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.SUBSTRING">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#_drop" class="summary-sig-name">_drop</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter._drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#distributed_transaction_begin" class="summary-sig-name">distributed_transaction_begin</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.distributed_transaction_begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#prepare" class="summary-sig-name">prepare</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.prepare">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#commit_prepared" class="summary-sig-name">commit_prepared</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ley</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.commit_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#rollback_prepared" class="summary-sig-name">rollback_prepared</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.rollback_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#concat_add" class="summary-sig-name">concat_add</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.concat_add">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6a500&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.MySQLAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.contrib.pymysql-module.html" class="summary-name">driver</a><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="maxcharlength"></a><span class="summary-name">maxcharlength</span> = <code title="255">255</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="commit_on_alter_table"></a><span class="summary-name">commit_on_alter_table</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="support_distributed_transaction"></a><span class="summary-name">support_distributed_transaction</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.MySQLAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'LONGBLOB',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'DATETIME',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'DOUBLE',
 'id': 'INT AUTO_INCREMENT NOT NULL',
 'integer': 'INT',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">LONGBLOB</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DA</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="SUBSTRING"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SUBSTRING</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">parameters</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.SUBSTRING">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">BaseAdapter.SUBSTRING</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_drop"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_drop</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter._drop">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">BaseAdapter._drop</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="distributed_transaction_begin"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">distributed_transaction_begin</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.distributed_transaction_begin">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">BaseAdapter.distributed_transaction_begin</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="prepare"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">prepare</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.prepare">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">BaseAdapter.prepare</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="commit_prepared"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">commit_prepared</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ley</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.commit_prepared">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">BaseAdapter.commit_prepared</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rollback_prepared"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rollback_prepared</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.rollback_prepared">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">BaseAdapter.rollback_prepared</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="concat_add"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">concat_add</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.concat_add">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">BaseAdapter.concat_add</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6a500&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#MySQLAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="driver"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">driver</h3>
  <p>PyMySQL: A pure-Python drop-in replacement for MySQLdb.</p>
  <p>Copyright (c) 2010 PyMySQL contributors</p>
  <p>Permission is hereby granted, free of charge, to any person obtaining 
  a copy of this software and associated documentation files (the 
  &quot;Software&quot;), 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:</p>
  <p>The above copyright notice and this permission notice shall be 
  included in all copies or substantial portions of the Software.</p>
  THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><a href="web2py.gluon.contrib.pymysql-module.html">web2py.gluon.contrib.pymysql</a></dd>
  </dl>
</td></tr></table>
</div>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">LONGBLOB</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATETIME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DOUBLE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT AUTO_INCREMENT NOT NULL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.NoSQLAdapter-class.html version [de152a958e].















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.NoSQLAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;NoSQLAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.NoSQLAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class NoSQLAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">NoSQLAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.CouchDBAdapter-class.html">CouchDBAdapter</a>,
    <a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html">GoogleDatastoreAdapter</a>,
    <a href="web2py.gluon.dal.MongoDBAdapter-class.html">MongoDBAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent" class="summary-sig-name">represent</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.represent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_insert" class="summary-sig-name">_insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_count" class="summary-sig-name">_count</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_select" class="summary-sig-name">_select</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_delete" class="summary-sig-name">_delete</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#_update" class="summary-sig-name">_update</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit" class="summary-sig-name">commit</a>(<span class="summary-sig-arg">self</span>)</span><br />
      remember: no transactions on many NoSQL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.commit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback" class="summary-sig-name">rollback</a>(<span class="summary-sig-arg">self</span>)</span><br />
      remember: no transactions on many NoSQL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.rollback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">self</span>)</span><br />
      remember: no transactions on many NoSQL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#OR" class="summary-sig-name">OR</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.OR">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AND" class="summary-sig-name">AND</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.AND">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AS" class="summary-sig-name">AS</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.AS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ON" class="summary-sig-name">ON</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.ON">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#STARTSWITH" class="summary-sig-name">STARTSWITH</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.STARTSWITH">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ENDSWITH" class="summary-sig-name">ENDSWITH</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.ENDSWITH">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#ADD" class="summary-sig-name">ADD</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.ADD">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUB" class="summary-sig-name">SUB</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.SUB">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#MUL" class="summary-sig-name">MUL</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.MUL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#DIV" class="summary-sig-name">DIV</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.DIV">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LOWER" class="summary-sig-name">LOWER</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.LOWER">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#UPPER" class="summary-sig-name">UPPER</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.UPPER">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#EXTRACT" class="summary-sig-name">EXTRACT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">what</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.EXTRACT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#AGGREGATE" class="summary-sig-name">AGGREGATE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">what</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.AGGREGATE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LEFT_JOIN" class="summary-sig-name">LEFT_JOIN</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.LEFT_JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#SUBSTRING" class="summary-sig-name">SUBSTRING</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">parameters</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.SUBSTRING">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#PRIMARY_KEY" class="summary-sig-name">PRIMARY_KEY</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.PRIMARY_KEY">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#LIKE" class="summary-sig-name">LIKE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.LIKE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#drop" class="summary-sig-name">drop</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#alias" class="summary-sig-name">alias</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">alias</span>)</span><br />
      given a table object, makes a new table object with alias 
      name.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.alias">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#migrate_table" class="summary-sig-name">migrate_table</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.migrate_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#distributed_transaction_begin" class="summary-sig-name">distributed_transaction_begin</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.distributed_transaction_begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#prepare" class="summary-sig-name">prepare</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.prepare">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#commit_prepared" class="summary-sig-name">commit_prepared</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.commit_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rollback_prepared" class="summary-sig-name">rollback_prepared</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.rollback_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#concat_add" class="summary-sig-name">concat_add</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.concat_add">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#constraint_name" class="summary-sig-name">constraint_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">fieldname</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.constraint_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#create_sequence_and_triggers" class="summary-sig-name">create_sequence_and_triggers</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#log_execute" class="summary-sig-name">log_execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.log_execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#represent_exceptions" class="summary-sig-name">represent_exceptions</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.represent_exceptions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#integrity_error_class" class="summary-sig-name">integrity_error_class</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.integrity_error_class">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.NoSQLAdapter-class.html#rowslice" class="summary-sig-name">rowslice</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>)</span><br />
      by default this function does nothing, overload when db does not 
      do slicing</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.rowslice">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="to_unicode"></a><span class="summary-sig-name">to_unicode</span>(<span class="summary-sig-arg">obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.to_unicode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#driver">driver</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#types">types</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="represent"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.represent">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent">BaseAdapter.represent</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_insert"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">BaseAdapter._insert</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_count"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_count</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">distinct</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._count">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_count">BaseAdapter._count</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_select"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_select</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>,
        <span class="sig-arg">attributes</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._select">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_select">BaseAdapter._select</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_delete"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_delete</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._delete">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">BaseAdapter._delete</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_update"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_update</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">fields</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter._update">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_update">BaseAdapter._update</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="commit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">commit</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.commit">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  remember: no transactions on many NoSQL
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#commit">BaseAdapter.commit</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rollback"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rollback</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.rollback">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  remember: no transactions on many NoSQL
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">BaseAdapter.rollback</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="close"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.close">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  remember: no transactions on many NoSQL
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#close">BaseAdapter.close</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="OR"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">OR</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.OR">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#OR">BaseAdapter.OR</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="AND"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AND</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.AND">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#AND">BaseAdapter.AND</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="AS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AS</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.AS">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#AS">BaseAdapter.AS</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="ON"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ON</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.ON">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#ON">BaseAdapter.ON</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="STARTSWITH"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">STARTSWITH</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.STARTSWITH">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">BaseAdapter.STARTSWITH</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="ENDSWITH"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ENDSWITH</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.ENDSWITH">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">BaseAdapter.ENDSWITH</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="ADD"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ADD</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.ADD">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">BaseAdapter.ADD</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="SUB"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SUB</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.SUB">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">BaseAdapter.SUB</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="MUL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">MUL</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.MUL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">BaseAdapter.MUL</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="DIV"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">DIV</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.DIV">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">BaseAdapter.DIV</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LOWER"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LOWER</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.LOWER">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">BaseAdapter.LOWER</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="UPPER"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">UPPER</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.UPPER">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">BaseAdapter.UPPER</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="EXTRACT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">EXTRACT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">what</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.EXTRACT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">BaseAdapter.EXTRACT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="AGGREGATE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AGGREGATE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">what</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.AGGREGATE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">BaseAdapter.AGGREGATE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LEFT_JOIN"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LEFT_JOIN</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.LEFT_JOIN">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">BaseAdapter.LEFT_JOIN</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="SUBSTRING"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SUBSTRING</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">parameters</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.SUBSTRING">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">BaseAdapter.SUBSTRING</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="PRIMARY_KEY"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">PRIMARY_KEY</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.PRIMARY_KEY">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">BaseAdapter.PRIMARY_KEY</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LIKE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LIKE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.LIKE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">BaseAdapter.LIKE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="drop"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drop</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.drop">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#drop">BaseAdapter.drop</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="alias"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">alias</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">alias</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.alias">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  given a table object, makes a new table object with alias name.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#alias">BaseAdapter.alias</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="migrate_table"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">migrate_table</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*a</span>,
        <span class="sig-arg">**b</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.migrate_table">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">BaseAdapter.migrate_table</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="distributed_transaction_begin"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">distributed_transaction_begin</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.distributed_transaction_begin">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">BaseAdapter.distributed_transaction_begin</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="prepare"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">prepare</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.prepare">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">BaseAdapter.prepare</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="commit_prepared"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">commit_prepared</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.commit_prepared">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">BaseAdapter.commit_prepared</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rollback_prepared"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rollback_prepared</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.rollback_prepared">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">BaseAdapter.rollback_prepared</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="concat_add"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">concat_add</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.concat_add">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">BaseAdapter.concat_add</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="constraint_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">constraint_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">fieldname</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.constraint_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">BaseAdapter.constraint_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_sequence_and_triggers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_sequence_and_triggers</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">BaseAdapter.create_sequence_and_triggers</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="log_execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">log_execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*a</span>,
        <span class="sig-arg">**b</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.log_execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">BaseAdapter.log_execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*a</span>,
        <span class="sig-arg">**b</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#execute">BaseAdapter.execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent_exceptions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent_exceptions</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.represent_exceptions">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">BaseAdapter.represent_exceptions</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="integrity_error_class"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">integrity_error_class</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.integrity_error_class">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">BaseAdapter.integrity_error_class</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rowslice"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rowslice</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">rows</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#NoSQLAdapter.rowslice">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  by default this function does nothing, overload when db does not do 
  slicing
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">BaseAdapter.rowslice</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.OracleAdapter-class.html version [b996aa01cd].






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.OracleAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;OracleAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.OracleAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OracleAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">OracleAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#sequence_name" class="summary-sig-name">sequence_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.sequence_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#trigger_name" class="summary-sig-name">trigger_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.trigger_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#LEFT_JOIN" class="summary-sig-name">LEFT_JOIN</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.LEFT_JOIN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#NOT_NULL" class="summary-sig-name">NOT_NULL</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">default</span>,
        <span class="summary-sig-arg">field_type</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.NOT_NULL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#_drop" class="summary-sig-name">_drop</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter._drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#constraint_name" class="summary-sig-name">constraint_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">fieldname</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.constraint_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#represent_exceptions" class="summary-sig-name">represent_exceptions</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">fieldtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.represent_exceptions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6b2a8&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#create_sequence_and_triggers" class="summary-sig-name">create_sequence_and_triggers</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.OracleAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('cx_Oracle', None)">globals().get('cx_Oracle', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="commit_on_alter_table"></a><span class="summary-name">commit_on_alter_table</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.OracleAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'CLOB',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'DATE',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT',
 'id': 'NUMBER PRIMARY KEY',
 'integer': 'INT',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CLOB</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.OracleAdapter-class.html#oracle_fix" class="summary-name">oracle_fix</a> = <code title="re.compile(r'[^\']*(\'[^\']*\'[^\']*)*:(?P&lt;clob&gt;CLOB\(\'([^\']+|\'\')*\
\'\))')">re.compile(r'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">(</code>\'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code>\'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">*</code>:<code class="re-group">(?P&lt;</code><code class="re-ref">clob</code><code class="re-group">&gt;</code>C<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="sequence_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sequence_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.sequence_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">BaseAdapter.sequence_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="trigger_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">trigger_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.trigger_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">BaseAdapter.trigger_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LEFT_JOIN"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LEFT_JOIN</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.LEFT_JOIN">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">BaseAdapter.LEFT_JOIN</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="NOT_NULL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">NOT_NULL</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">default</span>,
        <span class="sig-arg">field_type</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.NOT_NULL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">BaseAdapter.NOT_NULL</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_drop"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_drop</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter._drop">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">BaseAdapter._drop</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="constraint_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">constraint_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">fieldname</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.constraint_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">BaseAdapter.constraint_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent_exceptions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent_exceptions</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">fieldtype</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.represent_exceptions">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">BaseAdapter.represent_exceptions</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6b2a8&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="execute"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.execute">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#execute">BaseAdapter.execute</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_sequence_and_triggers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_sequence_and_triggers</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">BaseAdapter.create_sequence_and_triggers</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#OracleAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CLOB</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMBER PRIMARY KEY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="oracle_fix"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">oracle_fix</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">(</code>\'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code>\'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">*</code>:<code class="re-group">(?P&lt;</code><code class="re-ref">clob</code><code class="re-group">&gt;</code>CLOB\(\'<code class="re-group">(</code><code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">+</code><code class="re-op">|</code>\'\'<code class="re-group">)</code><code class="re-op">*</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
\'\)<code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.PostgreSQLAdapter-class.html version [44e96ba098].













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.PostgreSQLAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;PostgreSQLAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class PostgreSQLAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">PostgreSQLAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html">JDBCPostgreSQLAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#sequence_name" class="summary-sig-name">sequence_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.sequence_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#RANDOM" class="summary-sig-name">RANDOM</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.RANDOM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#distributed_transaction_begin" class="summary-sig-name">distributed_transaction_begin</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.distributed_transaction_begin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#prepare" class="summary-sig-name">prepare</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.prepare">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#commit_prepared" class="summary-sig-name">commit_prepared</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.commit_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#rollback_prepared" class="summary-sig-name">rollback_prepared</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.rollback_prepared">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#create_sequence_and_triggers" class="summary-sig-name">create_sequence_and_triggers</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6a9b0&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#LIKE" class="summary-sig-name">LIKE</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.LIKE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#STARTSWITH" class="summary-sig-name">STARTSWITH</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.STARTSWITH">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#ENDSWITH" class="summary-sig-name">ENDSWITH</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.ENDSWITH">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#CONTAINS" class="summary-sig-name">CONTAINS</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">first</span>,
        <span class="summary-sig-arg">second</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.CONTAINS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="psycopg2-module.html" class="summary-name">driver</a><br />
      A Python driver for PostgreSQL

psycopg is a PostgreSQL_ database adapter for the Python_ programming
language.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="support_distributed_transaction"></a><span class="summary-name">support_distributed_transaction</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.PostgreSQLAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'BYTEA',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'TIMESTAMP',
 'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
 'double': 'FLOAT8',
 'id': 'SERIAL PRIMARY KEY',
 'integer': 'INTEGER',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BYTEA</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="sequence_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sequence_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.sequence_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">BaseAdapter.sequence_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="RANDOM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">RANDOM</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.RANDOM">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">BaseAdapter.RANDOM</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="distributed_transaction_begin"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">distributed_transaction_begin</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.distributed_transaction_begin">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">BaseAdapter.distributed_transaction_begin</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="prepare"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">prepare</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.prepare">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">BaseAdapter.prepare</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="commit_prepared"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">commit_prepared</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.commit_prepared">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">BaseAdapter.commit_prepared</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="rollback_prepared"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rollback_prepared</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.rollback_prepared">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">BaseAdapter.rollback_prepared</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_sequence_and_triggers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_sequence_and_triggers</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">BaseAdapter.create_sequence_and_triggers</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6a9b0&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="LIKE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LIKE</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.LIKE">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">BaseAdapter.LIKE</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="STARTSWITH"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">STARTSWITH</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.STARTSWITH">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">BaseAdapter.STARTSWITH</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="ENDSWITH"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ENDSWITH</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.ENDSWITH">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">BaseAdapter.ENDSWITH</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="CONTAINS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">CONTAINS</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">first</span>,
        <span class="sig-arg">second</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#PostgreSQLAdapter.CONTAINS">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">BaseAdapter.CONTAINS</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="driver"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">driver</h3>
  <pre class="literalblock">
A Python driver for PostgreSQL

psycopg is a PostgreSQL_ database adapter for the Python_ programming
language. This is version 2, a complete rewrite of the original code to
provide new-style classes for connection and cursor objects and other sweet
candies. Like the original, psycopg 2 was written with the aim of being very
small and fast, and stable as a rock.

Homepage: http://initd.org/projects/psycopg2

.. _PostgreSQL: http://www.postgresql.org/
.. _Python: http://www.python.org/

:Groups:
  * `Connections creation`: connect
  * `Value objects constructors`: Binary, Date, DateFromTicks, Time,
    TimeFromTicks, Timestamp, TimestampFromTicks

</pre>
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><a href="psycopg2-module.html">psycopg2</a></dd>
  </dl>
</td></tr></table>
</div>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">BYTEA</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NUMERIC(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT8</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">SERIAL PRIMARY KEY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INTEGER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Query-class.html version [2e6b55b6e6].































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Query</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Query
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Query-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Query</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Query</strong>
</pre>

<hr />
<p>a query object necessary to define a set. it can be stored or can be 
  passed to DAL.__call__() to obtain a Set</p>
  Example:
<pre class="literalblock">
   query = db.users.name=='Max'
   set = db(query)
   records = set.select()
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Query-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">op</span>,
        <span class="summary-sig-arg">first</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Query-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__and__"></a><span class="summary-sig-name">__and__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__and__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__or__"></a><span class="summary-sig-name">__or__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__or__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__invert__"></a><span class="summary-sig-name">__invert__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__invert__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">op</span>,
        <span class="sig-arg">first</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">second</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Query.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Reference-class.html version [96b4ec80fb].







































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Reference</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Reference
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Reference-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Reference</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
       int --+
             |
            <strong class="uidshort">Reference</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__allocate"></a><span class="summary-sig-name">__allocate</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference.__allocate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Reference-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x.__setattr__('name', value) &lt;==&gt; x.name = value</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__setitem__"></a><span class="summary-sig-name">__setitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>int</code></b>:
      <code>__abs__</code>,
      <code>__add__</code>,
      <code>__and__</code>,
      <code>__cmp__</code>,
      <code>__coerce__</code>,
      <code>__div__</code>,
      <code>__divmod__</code>,
      <code>__float__</code>,
      <code>__floordiv__</code>,
      <code>__getattribute__</code>,
      <code>__getnewargs__</code>,
      <code>__hash__</code>,
      <code>__hex__</code>,
      <code>__index__</code>,
      <code>__int__</code>,
      <code>__invert__</code>,
      <code>__long__</code>,
      <code>__lshift__</code>,
      <code>__mod__</code>,
      <code>__mul__</code>,
      <code>__neg__</code>,
      <code>__new__</code>,
      <code>__nonzero__</code>,
      <code>__oct__</code>,
      <code>__or__</code>,
      <code>__pos__</code>,
      <code>__pow__</code>,
      <code>__radd__</code>,
      <code>__rand__</code>,
      <code>__rdiv__</code>,
      <code>__rdivmod__</code>,
      <code>__repr__</code>,
      <code>__rfloordiv__</code>,
      <code>__rlshift__</code>,
      <code>__rmod__</code>,
      <code>__rmul__</code>,
      <code>__ror__</code>,
      <code>__rpow__</code>,
      <code>__rrshift__</code>,
      <code>__rshift__</code>,
      <code>__rsub__</code>,
      <code>__rtruediv__</code>,
      <code>__rxor__</code>,
      <code>__str__</code>,
      <code>__sub__</code>,
      <code>__truediv__</code>,
      <code>__xor__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__init__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__setattr__('name', value) &lt;==&gt; x.name = value
  <dl class="fields">
    <dt>Overrides:
      object.__setattr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Row-class.html version [6d743fb6cd].




























































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Row</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Row
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Row-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Row</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      dict --+
             |
            <strong class="uidshort">Row</strong>
</pre>

<hr />
a dictionary that lets you do d['a'] as well as d.a this is only used 
  to store a Row<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Row-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      x[y]</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Row-class.html#__setitem__" class="summary-sig-name">__setitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x[i]=y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Row-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x.__setattr__('name', value) &lt;==&gt; x.name = value</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Row-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__int__"></a><span class="summary-sig-name">__int__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__int__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Row-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      x==y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__eq__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Row-class.html#__ne__" class="summary-sig-name">__ne__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      x!=y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__ne__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__copy__"></a><span class="summary-sig-name">__copy__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__copy__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="as_dict"></a><span class="summary-sig-name">as_dict</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">datetime_to_str</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.as_dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__new__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__getitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Indexing operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__getitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x[y]
  <dl class="fields">
    <dt>Overrides:
      dict.__getitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Index assignment operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__setitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x[i]=y
  <dl class="fields">
    <dt>Overrides:
      dict.__setitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__setattr__('name', value) &lt;==&gt; x.name = value
  <dl class="fields">
    <dt>Overrides:
      object.__setattr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      dict.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__eq__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__eq__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
    <br /><em class="fname">(Equality operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__eq__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x==y
  <dl class="fields">
    <dt>Overrides:
      dict.__eq__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__ne__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__ne__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row.__ne__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x!=y
  <dl class="fields">
    <dt>Overrides:
      dict.__ne__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Rows-class.html version [d00146a602].






































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Rows</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Rows
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Rows-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Rows</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Rows</strong>
</pre>

<hr />
A wrapper for the return value of a select. It basically represents a 
  table. It has an iterator and each row is represented as a 
  dictionary.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Rows-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">records</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">colnames</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">compact</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">rawrows</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setvirtualfields"></a><span class="summary-sig-name">setvirtualfields</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**keyed_virtualfields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.setvirtualfields">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__and__"></a><span class="summary-sig-name">__and__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__and__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__or__"></a><span class="summary-sig-name">__or__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__or__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__nonzero__"></a><span class="summary-sig-name">__nonzero__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__nonzero__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getslice__"></a><span class="summary-sig-name">__getslice__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">a</span>,
        <span class="summary-sig-arg">b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__getslice__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">self</span>)</span><br />
      iterator over records</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Rows-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      serializes the table into a csv file</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="first"></a><span class="summary-sig-name">first</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.first">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="last"></a><span class="summary-sig-name">last</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.last">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="find"></a><span class="summary-sig-name">find</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      returns a new Rows object, a subset of the original object, 
      filtered by the function f</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.find">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="exclude"></a><span class="summary-sig-name">exclude</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      removes elements from the calling Rows object, filtered by the 
      function f, and returns a new Rows object containing the removed 
      elements</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.exclude">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sort"></a><span class="summary-sig-name">sort</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>,
        <span class="summary-sig-arg">reverse</span>=<span class="summary-sig-default">True</span>)</span><br />
      returns a list of sorted elements (not sorted in place)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.sort">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Rows-class.html#as_list" class="summary-sig-name">as_list</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">compact</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">storage_to_dict</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">datetime_to_str</span>=<span class="summary-sig-default">True</span>)</span><br />
      returns the data as a list or dictionary.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.as_list">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Rows-class.html#as_dict" class="summary-sig-name">as_dict</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">compact</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">storage_to_dict</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">datetime_to_str</span>=<span class="summary-sig-default">True</span>)</span><br />
      returns the data as a dictionary of dictionaries 
      (storage_to_dict=True) or records (False)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.as_dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Rows-class.html#export_to_csv_file" class="summary-sig-name">export_to_csv_file</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ofile</span>,
        <span class="summary-sig-arg">null</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">&lt;NULL&gt;</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      export data to csv, the first line contains the column names...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.export_to_csv_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xml"></a><span class="summary-sig-name">xml</span>(<span class="summary-sig-arg">self</span>)</span><br />
      serializes the table using sqlhtml.SQLTABLE (if present)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="json"></a><span class="summary-sig-name">json</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">object</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">1</span>)</span><br />
      serializes the table to a JSON list of objects</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">records</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">colnames</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">compact</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">rawrows</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  serializes the table into a csv file
  <dl class="fields">
    <dt>Overrides:
      object.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="as_list"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">as_list</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">compact</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">storage_to_dict</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">datetime_to_str</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.as_list">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  returns the data as a list or dictionary. :param storage_to_dict: when
  True returns a dict, otherwise a list(default True) :param 
  datetime_to_str: convert datetime fields as strings (default True)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="as_dict"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">as_dict</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">compact</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">storage_to_dict</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">datetime_to_str</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.as_dict">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>returns the data as a dictionary of dictionaries 
  (storage_to_dict=True) or records (False)</p>
  :param key: the name of the field to be used as dict key, normally the
  id :param compact: ? (default True) :param storage_to_dict: when True 
  returns a dict, otherwise a list(default True) :param datetime_to_str: 
  convert datetime fields as strings (default True)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="export_to_csv_file"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">export_to_csv_file</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ofile</span>,
        <span class="sig-arg">null</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">&lt;NULL&gt;</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows.export_to_csv_file">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

export data to csv, the first line contains the column names

:param ofile: where the csv must be exported to
:param null: how null values must be represented (default '&lt;NULL&gt;')
:param delimiter: delimiter to separate values (default ',')
:param quotechar: character to use to quote string values (default '&quot;')
:param quoting: quote system, use csv.QUOTE_*** (default csv.QUOTE_MINIMAL)
:param represent: use the fields .represent value (default False)
:param colnames: list of column names to use (default self.colnames)
                 This will only work when exporting rows objects!!!!
                 DO NOT use this with db.export_to_csv()

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.SAPDBAdapter-class.html version [b90afb4928].















































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.SAPDBAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;SAPDBAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.SAPDBAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SAPDBAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">SAPDBAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#sequence_name" class="summary-sig-name">sequence_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.sequence_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#select_limitby" class="summary-sig-name">select_limitby</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sql_s</span>,
        <span class="summary-sig-arg">sql_f</span>,
        <span class="summary-sig-arg">sql_t</span>,
        <span class="summary-sig-arg">sql_w</span>,
        <span class="summary-sig-arg">sql_o</span>,
        <span class="summary-sig-arg">limitby</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.select_limitby">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#create_sequence_and_triggers" class="summary-sig-name">create_sequence_and_triggers</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">**args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6e320&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SAPDBAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('sapdb', None)">globals().get('sapdb', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="support_distributed_transaction"></a><span class="summary-name">support_distributed_transaction</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.SAPDBAdapter-class.html#types" class="summary-name">types</a> = <code title="{'blob': 'LONG',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
 'datetime': 'TIMESTAMP',
 'decimal': 'FIXED(%(precision)s,%(scale)s)',
 'double': 'FLOAT',
 'id': 'INT PRIMARY KEY',
 'integer': 'INT',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">LONG</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="sequence_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sequence_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.sequence_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">BaseAdapter.sequence_name</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="select_limitby"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">select_limitby</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sql_s</span>,
        <span class="sig-arg">sql_f</span>,
        <span class="sig-arg">sql_t</span>,
        <span class="sig-arg">sql_w</span>,
        <span class="sig-arg">sql_o</span>,
        <span class="sig-arg">limitby</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.select_limitby">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">BaseAdapter.select_limitby</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_sequence_and_triggers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_sequence_and_triggers</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">query</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.create_sequence_and_triggers">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">BaseAdapter.create_sequence_and_triggers</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6e320&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SAPDBAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">blob</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">LONG</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">boolean</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CHAR(1)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">date</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">DATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">datetime</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">TIMESTAMP</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">decimal</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FIXED(%(precision)s,%(scale)s)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">double</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">FLOAT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">id</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT PRIMARY KEY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">integer</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">INT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.SQLALL-class.html version [b90e82234d].


































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.SQLALL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;SQLALL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.SQLALL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQLALL</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLALL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">SQLALL</strong>
</pre>

<hr />
<p>Helper class providing a comma-separated string having all the field 
  names (prefixed by table name and '.')</p>
  normally only called from within gluon.sql<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLALL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLALL.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLALL-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLALL.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLALL.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLALL.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.SQLCallableList-class.html version [37b88fbccd].









































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.SQLCallableList</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;SQLCallableList
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.SQLCallableList-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQLCallableList</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCallableList">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      list --+
             |
            <strong class="uidshort">SQLCallableList</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCallableList.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>list</code></b>:
      <code>__add__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__delslice__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__iadd__</code>,
      <code>__imul__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__mul__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__repr__</code>,
      <code>__reversed__</code>,
      <code>__rmul__</code>,
      <code>__setitem__</code>,
      <code>__setslice__</code>,
      <code>append</code>,
      <code>count</code>,
      <code>extend</code>,
      <code>index</code>,
      <code>insert</code>,
      <code>pop</code>,
      <code>remove</code>,
      <code>reverse</code>,
      <code>sort</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.SQLCustomType-class.html version [0e67e537d3].























































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.SQLCustomType</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;SQLCustomType
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.SQLCustomType-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQLCustomType</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">SQLCustomType</strong>
</pre>

<hr />
<pre class="literalblock">

allows defining of custom SQL types

Example::

    decimal = SQLCustomType(
        type ='double',
        native ='integer',
        encoder =(lambda x: int(float(x) * 100)),
        decoder = (lambda x: Decimal(&quot;0.00&quot;) + Decimal(str(float(x)/100)) )
        )

    db.define_table(
        'example',
        Field('value', type=decimal)
        )

:param type: the web2py type (default = 'string')
:param native: the backend type
:param encoder: how to encode the value to store it in the backend
:param decoder: how to decode the value retrieved from the backend
:param validator: what validators to use ( default = None, will use the
    default validator for type)

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLCustomType-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">string</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">native</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">encoder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">decoder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">validator</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">_class</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="startswith"></a><span class="summary-sig-name">startswith</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dummy</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.startswith">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getslice__"></a><span class="summary-sig-name">__getslice__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">a</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">b</span>=<span class="summary-sig-default">100</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.__getslice__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLCustomType-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">type</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">string</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">native</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">encoder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">decoder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">validator</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">_class</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLCustomType.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.SQLiteAdapter-class.html version [9a6c932756].






































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.SQLiteAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;SQLiteAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.SQLiteAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQLiteAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+        
             |        
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+    
                 |    
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+
                     |
                    <strong class="uidshort">SQLiteAdapter</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html">JDBCSQLiteAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#EXTRACT" class="summary-sig-name">EXTRACT</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">what</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.EXTRACT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd69d70&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#_truncate" class="summary-sig-name">_truncate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter._truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.SQLiteAdapter-class.html#lastrowid" class="summary-sig-name">lastrowid</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.lastrowid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select_limitby">select_limitby</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="web2py_extract"></a><span class="summary-sig-name">web2py_extract</span>(<span class="summary-sig-arg">lookup</span>,
        <span class="summary-sig-arg">s</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.web2py_extract">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="sqlite3.dbapi2-module.html" class="summary-name">driver</a><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#types">types</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="EXTRACT"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">EXTRACT</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">what</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.EXTRACT">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">BaseAdapter.EXTRACT</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd69d70&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#__init__">BaseAdapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_truncate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_truncate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter._truncate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">BaseAdapter._truncate</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="lastrowid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">lastrowid</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#SQLiteAdapter.lastrowid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.BaseAdapter-class.html#lastrowid">BaseAdapter.lastrowid</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="driver"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">driver</h3>
  <p>PyMySQL: A pure-Python drop-in replacement for MySQLdb.</p>
  <p>Copyright (c) 2010 PyMySQL contributors</p>
  <p>Permission is hereby granted, free of charge, to any person obtaining 
  a copy of this software and associated documentation files (the 
  &quot;Software&quot;), 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:</p>
  <p>The above copyright notice and this permission notice shall be 
  included in all copies or substantial portions of the Software.</p>
  THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><a href="sqlite3.dbapi2-module.html">sqlite3.dbapi2</a></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Set-class.html version [88937b4961].




















































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Set</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Set
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Set-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Set</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Set</strong>
</pre>

<hr />
<pre class="literalblock">

a Set represents a set of records in the database,
the records are identified by the query=Query(...) object.
normally the Set is generated by DAL.__call__(Query(...))

given a set, for example
   set = db(db.users.name=='Max')
you can:
   set.update(db.users.name='Massimo')
   set.delete() # all elements in the set
   set.select(orderby=db.users.id, groupby=db.users.name, limitby=(0,10))
and take subsets:
   subset = set(db.users.id&lt;5)

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Set-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">query</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_count"></a><span class="summary-sig-name">_count</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set._count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_select"></a><span class="summary-sig-name">_select</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*fields</span>,
        <span class="summary-sig-arg">**attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set._select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_delete"></a><span class="summary-sig-name">_delete</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set._delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_update"></a><span class="summary-sig-name">_update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**update_fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set._update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isempty"></a><span class="summary-sig-name">isempty</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.isempty">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="count"></a><span class="summary-sig-name">count</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">distinct</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="select"></a><span class="summary-sig-name">select</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*fields</span>,
        <span class="summary-sig-arg">**attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="delete"></a><span class="summary-sig-name">delete</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update"></a><span class="summary-sig-name">update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**update_fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="validate_and_update"></a><span class="summary-sig-name">validate_and_update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**update_fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.validate_and_update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="delete_uploaded_files"></a><span class="summary-sig-name">delete_uploaded_files</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">upload_fields</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.delete_uploaded_files">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">query</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Set.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.Table-class.html version [314362c35b].

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.Table</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;Table
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.Table-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Table</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      dict --+
             |
            <strong class="uidshort">Table</strong>
</pre>

<hr />
<p>an instance of this class represents a database table</p>
  Example:
<pre class="literalblock">
   db = DAL(...)
   db.define_table('users', Field('name'))
   db.users.insert(name='me') # print db.users._insert(...) to see SQL
   db.users.drop()
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">*fields</span>,
        <span class="summary-sig-arg">**args</span>)</span><br />
      Initializes the table and performs checking on the provided 
      fields.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_validate"></a><span class="summary-sig-name">_validate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**vars</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_create_references"></a><span class="summary-sig-name">_create_references</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._create_references">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_filter_fields"></a><span class="summary-sig-name">_filter_fields</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>,
        <span class="summary-sig-arg">id</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._filter_fields">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_build_query"></a><span class="summary-sig-name">_build_query</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      for keyed table only</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._build_query">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      x[y]</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd1ec80&gt;</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__setitem__" class="summary-sig-name">__setitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x[i]=y</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__delitem__" class="summary-sig-name">__delitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      del x[y]</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__delitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x.__setattr__('name', value) &lt;==&gt; x.name = value</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__iter__" class="summary-sig-name">__iter__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      iter(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_drop"></a><span class="summary-sig-name">_drop</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="drop"></a><span class="summary-sig-name">drop</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.drop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_listify"></a><span class="summary-sig-name">_listify</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fields</span>,
        <span class="summary-sig-arg">update</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._listify">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_insert"></a><span class="summary-sig-name">_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="insert"></a><span class="summary-sig-name">insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="validate_and_insert"></a><span class="summary-sig-name">validate_and_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.validate_and_insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update_or_insert"></a><span class="summary-sig-name">update_or_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd1ec80&gt;</span>,
        <span class="summary-sig-arg">**values</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.update_or_insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bulk_insert"></a><span class="summary-sig-name">bulk_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">items</span>)</span><br />
      here items is a list of dictionaries</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.bulk_insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_truncate"></a><span class="summary-sig-name">_truncate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table._truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="truncate"></a><span class="summary-sig-name">truncate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.truncate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.Table-class.html#import_from_csv_file" class="summary-sig-name">import_from_csv_file</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">csvfile</span>,
        <span class="summary-sig-arg">id_map</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">null</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">&lt;NULL&gt;</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">unique</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">uuid</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      import records from csv file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.import_from_csv_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="with_alias"></a><span class="summary-sig-name">with_alias</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">alias</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.with_alias">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="on"></a><span class="summary-sig-name">on</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.on">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">tablename</span>,
        <span class="sig-arg">*fields</span>,
        <span class="sig-arg">**args</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Initializes the table and performs checking on the provided 
  fields.</p>
  <p>Each table will have automatically an 'id'.</p>
  <p>If a field is of type Table, the fields (excluding 'id') from that 
  table will be used instead.</p>
  :raises SyntaxError: when a supplied field is of incorrect type.
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new empty dictionary

</pre></dd>
    <dt>Overrides:
      dict.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__getitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Indexing operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__getitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x[y]
  <dl class="fields">
    <dt>Overrides:
      dict.__getitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Index assignment operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__setitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x[i]=y
  <dl class="fields">
    <dt>Overrides:
      dict.__setitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__delitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Index deletion operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__delitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  del x[y]
  <dl class="fields">
    <dt>Overrides:
      dict.__delitem__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__setattr__('name', value) &lt;==&gt; x.name = value
  <dl class="fields">
    <dt>Overrides:
      object.__setattr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__iter__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__iter__</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__iter__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  iter(x)
  <dl class="fields">
    <dt>Overrides:
      dict.__iter__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      dict.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="import_from_csv_file"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">import_from_csv_file</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">csvfile</span>,
        <span class="sig-arg">id_map</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">null</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">&lt;NULL&gt;</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">unique</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">uuid</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Table.import_from_csv_file">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  import records from csv file. Column headers must have same names as 
  table fields. field 'id' is ignored. If column names read 'table.file' 
  the 'table.' prefix is ignored. 'unique' argument is a field which must 
  be unique (typically a uuid field)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.TeradataAdapter-class.html version [641bf6566e].



































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.TeradataAdapter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;TeradataAdapter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.TeradataAdapter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TeradataAdapter</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#TeradataAdapter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    object --+            
             |            
<a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a> --+        
                 |        
       <a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a> --+    
                     |    
            <a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a> --+
                         |
                        <strong class="uidshort">TeradataAdapter</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.dal.TeradataAdapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">pool_size</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">folder</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db_codec</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">credential_decoder</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0xd6db90&gt;</span>,
        <span class="summary-sig-arg">driver_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">adapter_args</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#TeradataAdapter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.DB2Adapter-class.html">DB2Adapter</a></code></b>:
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#LEFT_JOIN">LEFT_JOIN</a></code>,
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#RANDOM">RANDOM</a></code>,
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#execute">execute</a></code>,
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#lastrowid">lastrowid</a></code>,
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#represent_exceptions">represent_exceptions</a></code>,
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#rowslice">rowslice</a></code>,
      <code><a href="web2py.gluon.dal.DB2Adapter-class.html#select_limitby">select_limitby</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ADD">ADD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AGGREGATE">AGGREGATE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ALLOW_NULL">ALLOW_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AND">AND</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#AS">AS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#BELONGS">BELONGS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COALESCE_ZERO">COALESCE_ZERO</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#COMMA">COMMA</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#CONTAINS">CONTAINS</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#DIV">DIV</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ENDSWITH">ENDSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EQ">EQ</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#EXTRACT">EXTRACT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GE">GE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#GT">GT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#INVERT">INVERT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#JOIN">JOIN</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LE">LE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LIKE">LIKE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LOWER">LOWER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#LT">LT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MOD">MOD</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#MUL">MUL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NE">NE</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT">NOT</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#NOT_NULL">NOT_NULL</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#ON">ON</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#OR">OR</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#PRIMARY_KEY">PRIMARY_KEY</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#STARTSWITH">STARTSWITH</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUB">SUB</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#SUBSTRING">SUBSTRING</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#UPPER">UPPER</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#alias">alias</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#bulk_insert">bulk_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#close">close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit">commit</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_prepared">commit_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#concat_add">concat_add</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#constraint_name">constraint_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#count">count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_sequence_and_triggers">create_sequence_and_triggers</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#create_table">create_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#delete">delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#distributed_transaction_begin">distributed_transaction_begin</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#drop">drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#expand">expand</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_close">file_close</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_delete">file_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_exists">file_exists</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#file_open">file_open</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#filter_tenant">filter_tenant</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#get_table">get_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error">integrity_error</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#integrity_error_class">integrity_error_class</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#log_execute">log_execute</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#migrate_table">migrate_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#parse">parse</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#prepare">prepare</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#represent">represent</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback">rollback</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#rollback_prepared">rollback_prepared</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#select">select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#sequence_name">sequence_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#tables">tables</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#trigger_name">trigger_name</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#truncate">truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b> (private):
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_count">_count</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_delete">_delete</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_drop">_drop</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_insert">_insert</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_select">_select</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_truncate">_truncate</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#_update">_update</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#find_or_make_work_folder">find_or_make_work_folder</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pool_connection">pool_connection</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#close_all_instances">close_all_instances</a></code>,
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#set_folder">set_folder</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="driver"></a><span class="summary-name">driver</span> = <code title="globals().get('pyodbc', None)">globals().get('pyodbc', None)</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.TeradataAdapter-class.html#types" class="summary-name">types</a> = <code title="{'boolean': 'CHAR(1)', 'string': 'VARCHAR(%(length)s)', 'text': 'CLOB'\
, 'password': 'VARCHAR(%(length)s)', 'blob': 'BLOB', 'upload': 'VARCHA\
R(%(length)s)', 'integer': 'INT', 'double': 'DOUBLE', 'decimal': 'NUME\
RIC(%(precision)s,%(scale)s)', 'date': 'DATE', 'time': 'TIME', 'dateti\
me': 'TIMESTAMP', 'id': 'INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY \
KEY NOT NULL', 'reference': 'INT, FOREIGN KEY (%(field_name)s) REFEREN\
CES %(foreign_key)s ON DELETE %(on_delete_action)s', 'reference FK': '\
, CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFER\
...">{'boolean': 'CHAR(1)', 'string': 'VARCHAR(%(length)s)'<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.BaseAdapter-class.html">BaseAdapter</a></code></b>:
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#commit_on_alter_table">commit_on_alter_table</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#maxcharlength">maxcharlength</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#support_distributed_transaction">support_distributed_transaction</a></code>,
      <code><a href="web2py.gluon.dal.BaseAdapter-class.html#uploads_in_blob">uploads_in_blob</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.dal.ConnectionPool-class.html">ConnectionPool</a></code></b>:
      <code><a href="web2py.gluon.dal.ConnectionPool-class.html#pools">pools</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">uri</span>,
        <span class="sig-arg">pool_size</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">folder</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db_codec</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">credential_decoder</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0xd6db90&gt;</span>,
        <span class="sig-arg">driver_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">adapter_args</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#TeradataAdapter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.dal.DB2Adapter-class.html#__init__">DB2Adapter.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="types"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">types</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{'boolean': 'CHAR(1)', 'string': 'VARCHAR(%(length)s)', 'text': 'CLOB'<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
, 'password': 'VARCHAR(%(length)s)', 'blob': 'BLOB', 'upload': 'VARCHA<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
R(%(length)s)', 'integer': 'INT', 'double': 'DOUBLE', 'decimal': 'NUME<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
RIC(%(precision)s,%(scale)s)', 'date': 'DATE', 'time': 'TIME', 'dateti<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
me': 'TIMESTAMP', 'id': 'INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY <span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
KEY NOT NULL', 'reference': 'INT, FOREIGN KEY (%(field_name)s) REFEREN<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
CES %(foreign_key)s ON DELETE %(on_delete_action)s', 'reference FK': '<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
, CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFER<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.dal.UseDatabaseStoredFile-class.html version [edea0c49ea].




















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.dal.UseDatabaseStoredFile</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.dal-module.html">Module&nbsp;dal</a> ::
        Class&nbsp;UseDatabaseStoredFile
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class UseDatabaseStoredFile</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#UseDatabaseStoredFile">source&nbsp;code</a></span><br /><br />
<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.dal.GoogleSQLAdapter-class.html">GoogleSQLAdapter</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_exists"></a><span class="summary-sig-name">file_exists</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#UseDatabaseStoredFile.file_exists">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_open"></a><span class="summary-sig-name">file_open</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">rb</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">lock</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#UseDatabaseStoredFile.file_open">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_close"></a><span class="summary-sig-name">file_close</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fileobj</span>,
        <span class="summary-sig-arg">unlock</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#UseDatabaseStoredFile.file_close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="file_delete"></a><span class="summary-sig-name">file_delete</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.dal-pysrc.html#UseDatabaseStoredFile.file_delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.debug-module.html version [b5a47db524].










































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.debug</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;debug
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.debug-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module debug</h1><span class="codelink"><a href="web2py.gluon.debug-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Developed by Massimo Di 
  Pierro &lt;mdipierro@cs.depaul.edu&gt;, limodou &lt;limodou@gmail.com&gt;
  and srackham &lt;srackham@gmail.com&gt;. License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.debug.Pipe-class.html" class="summary-name">Pipe</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_trace"></a><span class="summary-sig-name">set_trace</span>()</span><br />
      breakpoint shortcut (like pdb)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#set_trace">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop_trace"></a><span class="summary-sig-name">stop_trace</span>()</span><br />
      stop waiting for the debugger (called atexit)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#stop_trace">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="communicate"></a><span class="summary-sig-name">communicate</span>(<span class="summary-sig-arg">command</span>=<span class="summary-sig-default">1</span>)</span><br />
      send command to debbuger, wait result</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#communicate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="pipe_in"></a><span class="summary-name">pipe_in</span> = <code title="Pipe('in')">Pipe('in')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="pipe_out"></a><span class="summary-name">pipe_out</span> = <code title="Pipe('out')">Pipe('out')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.debug-module.html#debugger" class="summary-name">debugger</a> = <code title="pdb.Pdb(completekey= None, stdin= pipe_in, stdout= pipe_out,)">pdb.Pdb(completekey= None, stdin= pipe_in, stdout= <code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="debugger"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">debugger</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
pdb.Pdb(completekey= None, stdin= pipe_in, stdout= pipe_out,)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.debug-pysrc.html version [ac6d24e938].



































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.debug</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;debug
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.debug-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.debug-module.html">Module web2py.gluon.debug</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">Developed by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;,</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">limodou &lt;limodou@gmail.com&gt; and srackham &lt;srackham@gmail.com&gt;.</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">pdb</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">Queue</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-0', 'logger', 'link-0');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"> </tt>
<a name="Pipe"></a><div id="Pipe-def"><a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="Pipe-toggle" onclick="return toggle('Pipe');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.debug.Pipe-class.html">Pipe</a><tt class="py-op">(</tt><tt class="py-base-class">Queue</tt><tt class="py-op">.</tt><tt class="py-base-class">Queue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Pipe-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Pipe-expanded"><a name="Pipe.__init__"></a><div id="Pipe.__init__-def"><a name="L20"></a><tt class="py-lineno">20</tt> <a class="py-toggle" href="#" id="Pipe.__init__-toggle" onclick="return toggle('Pipe.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug.Pipe-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-string">'r'</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Pipe.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pipe.__init__-expanded"><a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1', 'name', 'link-1');">name</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-2', '__init__', 'link-2');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt>
<a name="Pipe.write"></a><div id="Pipe.write-def"><a name="L24"></a><tt class="py-lineno">24</tt> <a class="py-toggle" href="#" id="Pipe.write-toggle" onclick="return toggle('Pipe.write');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug.Pipe-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Pipe.write-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pipe.write-expanded"><a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">        <tt id="link-3" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-3', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module web2py.gluon.debug=web2py.gluon.debug-module.html"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-4', 'debug', 'link-4');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug %s writting %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"> </tt>
<a name="Pipe.flush"></a><div id="Pipe.flush-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="Pipe.flush-toggle" onclick="return toggle('Pipe.flush');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug.Pipe-class.html#flush">flush</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Pipe.flush-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pipe.flush-expanded"><a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-comment"># mark checkpoint (complete message)</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-5" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-5', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-6', 'debug', 'link-4');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug %s flushing..."</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line">        <tt class="py-comment"># wait until it is processed</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-7', 'join', 'link-7');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">        <tt id="link-8" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-8', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-9', 'debug', 'link-4');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug %s flush done"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">)</tt> </tt>
</div><a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"> </tt>
<a name="Pipe.read"></a><div id="Pipe.read-def"><a name="L36"></a><tt class="py-lineno">36</tt> <a class="py-toggle" href="#" id="Pipe.read-toggle" onclick="return toggle('Pipe.read');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug.Pipe-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">count</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">timeout</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Pipe.read-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pipe.read-expanded"><a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">        <tt id="link-10" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-10', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-11', 'debug', 'link-4');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug %s reading..."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-12', 'get', 'link-12');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">block</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-comment"># signal that we are ready</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">task_done</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt id="link-13" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-13', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-14', 'debug', 'link-4');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug %s read %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
</div><a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line"> </tt>
<a name="Pipe.readline"></a><div id="Pipe.readline-def"><a name="L44"></a><tt class="py-lineno">44</tt> <a class="py-toggle" href="#" id="Pipe.readline-toggle" onclick="return toggle('Pipe.readline');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug.Pipe-class.html#readline">readline</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Pipe.readline-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pipe.readline-expanded"><a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">        <tt id="link-15" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-15', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-16', 'debug', 'link-4');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug %s readline..."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-17', 'read', 'link-17');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line"> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable web2py.gluon.debug.pipe_in=web2py.gluon.debug-module.html#pipe_in"><a title="web2py.gluon.debug.pipe_in" class="py-name" href="#" onclick="return doclink('link-18', 'pipe_in', 'link-18');">pipe_in</a></tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name" targets="Class web2py.gluon.debug.Pipe=web2py.gluon.debug.Pipe-class.html"><a title="web2py.gluon.debug.Pipe" class="py-name" href="#" onclick="return doclink('link-19', 'Pipe', 'link-19');">Pipe</a></tt><tt class="py-op">(</tt><tt class="py-string">'in'</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line"><tt id="link-20" class="py-name" targets="Variable web2py.gluon.debug.pipe_out=web2py.gluon.debug-module.html#pipe_out"><a title="web2py.gluon.debug.pipe_out" class="py-name" href="#" onclick="return doclink('link-20', 'pipe_out', 'link-20');">pipe_out</a></tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.debug.Pipe" class="py-name" href="#" onclick="return doclink('link-21', 'Pipe', 'link-19');">Pipe</a></tt><tt class="py-op">(</tt><tt class="py-string">'out'</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line"><tt id="link-22" class="py-name" targets="Variable web2py.gluon.debug.debugger=web2py.gluon.debug-module.html#debugger"><a title="web2py.gluon.debug.debugger" class="py-name" href="#" onclick="return doclink('link-22', 'debugger', 'link-22');">debugger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">pdb</tt><tt class="py-op">.</tt><tt class="py-name">Pdb</tt><tt class="py-op">(</tt><tt class="py-name">completekey</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">stdin</tt><tt class="py-op">=</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.debug.pipe_in" class="py-name" href="#" onclick="return doclink('link-23', 'pipe_in', 'link-18');">pipe_in</a></tt><tt class="py-op">,</tt> <tt class="py-name">stdout</tt><tt class="py-op">=</tt><tt id="link-24" class="py-name"><a title="web2py.gluon.debug.pipe_out" class="py-name" href="#" onclick="return doclink('link-24', 'pipe_out', 'link-20');">pipe_out</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line"> </tt>
<a name="set_trace"></a><div id="set_trace-def"><a name="L54"></a><tt class="py-lineno">54</tt> <a class="py-toggle" href="#" id="set_trace-toggle" onclick="return toggle('set_trace');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug-module.html#set_trace">set_trace</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="set_trace-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="set_trace-expanded"><a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line">    <tt class="py-docstring">"breakpoint shortcut (like pdb)"</tt> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">    <tt id="link-25" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-25', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"DEBUG: set_trace!"</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">    <tt id="link-26" class="py-name"><a title="web2py.gluon.debug.debugger" class="py-name" href="#" onclick="return doclink('link-26', 'debugger', 'link-22');">debugger</a></tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Function web2py.gluon.debug.set_trace()=web2py.gluon.debug-module.html#set_trace"><a title="web2py.gluon.debug.set_trace" class="py-name" href="#" onclick="return doclink('link-27', 'set_trace', 'link-27');">set_trace</a></tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">_getframe</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">f_back</tt><tt class="py-op">)</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"> </tt>
<a name="stop_trace"></a><div id="stop_trace-def"><a name="L60"></a><tt class="py-lineno">60</tt> <a class="py-toggle" href="#" id="stop_trace-toggle" onclick="return toggle('stop_trace');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug-module.html#stop_trace">stop_trace</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="stop_trace-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="stop_trace-expanded"><a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line">    <tt class="py-docstring">"stop waiting for the debugger (called atexit)"</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">    <tt class="py-comment"># this should prevent communicate is wait forever a command result</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># and the main thread has finished</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-28" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-28', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"DEBUG: stop_trace!"</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">    <tt id="link-29" class="py-name"><a title="web2py.gluon.debug.pipe_out" class="py-name" href="#" onclick="return doclink('link-29', 'pipe_out', 'link-20');">pipe_out</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-30', 'write', 'link-30');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">"debug finished!"</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">    <tt id="link-31" class="py-name"><a title="web2py.gluon.debug.pipe_out" class="py-name" href="#" onclick="return doclink('link-31', 'pipe_out', 'link-20');">pipe_out</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-32', 'write', 'link-30');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">    <tt class="py-comment">#pipe_out.flush()</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="communicate"></a><div id="communicate-def"><a name="L69"></a><tt class="py-lineno">69</tt> <a class="py-toggle" href="#" id="communicate-toggle" onclick="return toggle('communicate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.debug-module.html#communicate">communicate</a><tt class="py-op">(</tt><tt class="py-param">command</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="communicate-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="communicate-expanded"><a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">    <tt class="py-docstring">"send command to debbuger, wait result"</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">command</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line">        <tt id="link-33" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-33', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"DEBUG: sending command %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">command</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">        <tt id="link-34" class="py-name"><a title="web2py.gluon.debug.pipe_in" class="py-name" href="#" onclick="return doclink('link-34', 'pipe_in', 'link-18');">pipe_in</a></tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-35', 'write', 'link-30');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">command</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">        <tt class="py-comment">#pipe_in.flush()</tt> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L76"></a><tt class="py-lineno">76</tt>  <tt class="py-line">    <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L77"></a><tt class="py-lineno">77</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-36" class="py-name"><a title="web2py.gluon.debug.pipe_out" class="py-name" href="#" onclick="return doclink('link-36', 'pipe_out', 'link-20');">pipe_out</a></tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-37', 'read', 'link-17');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno">78</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">data</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L79"></a><tt class="py-lineno">79</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L80"></a><tt class="py-lineno">80</tt>  <tt class="py-line">        <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-38', 'append', 'link-38');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno">81</tt>  <tt class="py-line">    <tt id="link-39" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-39', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"DEBUG: result %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno">82</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-40', 'join', 'link-7');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
</div><a name="L83"></a><tt class="py-lineno">83</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.debug.Pipe-class.html version [bb56fead4a].










































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.debug.Pipe</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.debug-module.html">Module&nbsp;debug</a> ::
        Class&nbsp;Pipe
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.debug.Pipe-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Pipe</h1><span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
Queue.Queue --+
              |
             <strong class="uidshort">Pipe</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.debug.Pipe-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe.write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="flush"></a><span class="summary-sig-name">flush</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe.flush">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">count</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe.read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="readline"></a><span class="summary-sig-name">readline</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe.readline">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>Queue.Queue</code></b>:
      <code>empty</code>,
      <code>full</code>,
      <code>get</code>,
      <code>get_nowait</code>,
      <code>join</code>,
      <code>put</code>,
      <code>put_nowait</code>,
      <code>qsize</code>,
      <code>task_done</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>Queue.Queue</code></b> (private):
      <code>_empty</code>,
      <code>_full</code>,
      <code>_get</code>,
      <code>_init</code>,
      <code>_put</code>,
      <code>_qsize</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.debug-pysrc.html#Pipe.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      Queue.Queue.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.decoder-module.html version [57f7996c02].

































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.decoder</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;decoder
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.decoder-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module decoder</h1><span class="codelink"><a href="web2py.gluon.decoder-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.decoder-module.html#autoDetectXMLEncoding" class="summary-sig-name">autoDetectXMLEncoding</a>(<span class="summary-sig-arg">buffer</span>)</span><br />
      buffer -&gt; encoding_name
The buffer should be at least 4 bytes long.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.decoder-pysrc.html#autoDetectXMLEncoding">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="decoder"></a><span class="summary-sig-name">decoder</span>(<span class="summary-sig-arg">buffer</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.decoder-pysrc.html#decoder">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.decoder-module.html#autodetect_dict" class="summary-name">autodetect_dict</a> = <code title="{(0, 0, 254, 255): 'ucs4_be',
 (0, 60, 0, 63): 'utf_16_be',
 (60, 0, 63, 0): 'utf_16_le',
 (60, 63, 120, 109): 'utf_8',
 (76, 111, 167, 148): 'EBCDIC',
 (254, 255, None, None): 'utf_16_be',
 (255, 254, None, None): 'utf_16_le',
 (255, 254, 0, 0): 'ucs4_le'}"><code class="variable-group">{</code><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>254<code class="variable-op">, </code>255<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ucs4_be</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-group">(</code>0<code class="variable-op">, </code>60<code class="variable-op">, </code>0<code class="variable-op">, </code>63<code class="variable-group">)</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="autoDetectXMLEncoding"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">autoDetectXMLEncoding</span>(<span class="sig-arg">buffer</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.decoder-pysrc.html#autoDetectXMLEncoding">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">
buffer -&gt; encoding_name
The buffer should be at least 4 bytes long.
    Returns None if encoding cannot be detected.
    Note that encoding_name might not have an installed
    decoder (e.g. EBCDIC)

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="autodetect_dict"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">autodetect_dict</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>254<code class="variable-op">, </code>255<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ucs4_be</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>0<code class="variable-op">, </code>60<code class="variable-op">, </code>0<code class="variable-op">, </code>63<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">utf_16_be</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>60<code class="variable-op">, </code>0<code class="variable-op">, </code>63<code class="variable-op">, </code>0<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">utf_16_le</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>60<code class="variable-op">, </code>63<code class="variable-op">, </code>120<code class="variable-op">, </code>109<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">utf_8</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>76<code class="variable-op">, </code>111<code class="variable-op">, </code>167<code class="variable-op">, </code>148<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">EBCDIC</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>254<code class="variable-op">, </code>255<code class="variable-op">, </code>None<code class="variable-op">, </code>None<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">utf_16_be</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>255<code class="variable-op">, </code>254<code class="variable-op">, </code>None<code class="variable-op">, </code>None<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">utf_16_le</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-group">(</code>255<code class="variable-op">, </code>254<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ucs4_le</code><code class="variable-quote">'</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.decoder-pysrc.html version [e8f304d098].






































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.decoder</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;decoder
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.decoder-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.decoder-module.html">Module web2py.gluon.decoder</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">codecs</tt><tt class="py-op">,</tt> <tt class="py-name">encodings</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-string">"""Caller will hand this library a buffer and ask it to either convert</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-string">it or auto-detect the type.</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-string">Based on http://code.activestate.com/recipes/52257/</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-string">Licensed under the PSF License</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-comment"># None represents a potentially variable byte. "##" in the XML spec...</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-0" class="py-name" targets="Variable web2py.gluon.decoder.autodetect_dict=web2py.gluon.decoder-module.html#autodetect_dict"><a title="web2py.gluon.decoder.autodetect_dict" class="py-name" href="#" onclick="return doclink('link-0', 'autodetect_dict', 'link-0');">autodetect_dict</a></tt><tt class="py-op">=</tt><tt class="py-op">{</tt> <tt class="py-comment"># bytepattern     : ("name",</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0x00</tt><tt class="py-op">,</tt> <tt class="py-number">0x00</tt><tt class="py-op">,</tt> <tt class="py-number">0xFE</tt><tt class="py-op">,</tt> <tt class="py-number">0xFF</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"ucs4_be"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0xFF</tt><tt class="py-op">,</tt> <tt class="py-number">0xFE</tt><tt class="py-op">,</tt> <tt class="py-number">0x00</tt><tt class="py-op">,</tt> <tt class="py-number">0x00</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"ucs4_le"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0xFE</tt><tt class="py-op">,</tt> <tt class="py-number">0xFF</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"utf_16_be"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0xFF</tt><tt class="py-op">,</tt> <tt class="py-number">0xFE</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"utf_16_le"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0x00</tt><tt class="py-op">,</tt> <tt class="py-number">0x3C</tt><tt class="py-op">,</tt> <tt class="py-number">0x00</tt><tt class="py-op">,</tt> <tt class="py-number">0x3F</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"utf_16_be"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0x3C</tt><tt class="py-op">,</tt> <tt class="py-number">0x00</tt><tt class="py-op">,</tt> <tt class="py-number">0x3F</tt><tt class="py-op">,</tt> <tt class="py-number">0x00</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"utf_16_le"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0x3C</tt><tt class="py-op">,</tt> <tt class="py-number">0x3F</tt><tt class="py-op">,</tt> <tt class="py-number">0x78</tt><tt class="py-op">,</tt> <tt class="py-number">0x6D</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"utf_8"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-number">0x4C</tt><tt class="py-op">,</tt> <tt class="py-number">0x6F</tt><tt class="py-op">,</tt> <tt class="py-number">0xA7</tt><tt class="py-op">,</tt> <tt class="py-number">0x94</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-string">"EBCDIC"</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">                 <tt class="py-op">}</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"> </tt>
<a name="autoDetectXMLEncoding"></a><div id="autoDetectXMLEncoding-def"><a name="L23"></a><tt class="py-lineno">23</tt> <a class="py-toggle" href="#" id="autoDetectXMLEncoding-toggle" onclick="return toggle('autoDetectXMLEncoding');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.decoder-module.html#autoDetectXMLEncoding">autoDetectXMLEncoding</a><tt class="py-op">(</tt><tt class="py-param">buffer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="autoDetectXMLEncoding-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="autoDetectXMLEncoding-expanded"><a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">    <tt class="py-docstring">""" buffer -&gt; encoding_name</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt class="py-docstring">    The buffer should be at least 4 bytes long.</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt class="py-docstring">        Returns None if encoding cannot be detected.</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-docstring">        Note that encoding_name might not have an installed</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-docstring">        decoder (e.g. EBCDIC)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">    <tt class="py-comment"># a more efficient implementation would not decode the whole</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># buffer at once but otherwise we'd have to decode a character at</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># a time looking for the quote character...that's a pain</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">    <tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt class="py-string">"utf_8"</tt> <tt class="py-comment"># according to the XML spec, this is the default</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">                          <tt class="py-comment"># this code successively tries to refine the default</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"><tt class="py-comment"></tt>                          <tt class="py-comment"># whenever it fails to refine, it falls back to</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line"><tt class="py-comment"></tt>                          <tt class="py-comment"># the last place encoding was set.</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-1" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-1', 'len', 'link-1');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">&gt;=</tt><tt class="py-number">4</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">byte1</tt><tt class="py-op">,</tt> <tt class="py-name">byte2</tt><tt class="py-op">,</tt> <tt class="py-name">byte3</tt><tt class="py-op">,</tt> <tt class="py-name">byte4</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">ord</tt><tt class="py-op">,</tt> <tt class="py-name">buffer</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">        <tt class="py-name">enc_info</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name"><a title="web2py.gluon.decoder.autodetect_dict" class="py-name" href="#" onclick="return doclink('link-2', 'autodetect_dict', 'link-0');">autodetect_dict</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-3', 'get', 'link-3');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">enc_info</tt><tt class="py-op">:</tt> <tt class="py-comment"># try autodetection again removing potentially</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">            <tt class="py-comment"># variable bytes</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">byte1</tt><tt class="py-op">,</tt> <tt class="py-name">byte2</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">            <tt class="py-name">enc_info</tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name"><a title="web2py.gluon.decoder.autodetect_dict" class="py-name" href="#" onclick="return doclink('link-4', 'autodetect_dict', 'link-0');">autodetect_dict</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-5', 'get', 'link-3');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">bytes</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">        <tt class="py-name">enc_info</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line"> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">enc_info</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">        <tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt class="py-name">enc_info</tt> <tt class="py-comment"># we've got a guess... these are</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">                            <tt class="py-comment">#the new defaults</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">        <tt class="py-comment"># try to find a more precise encoding using xml declaration</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">secret_decoder_ring</tt> <tt class="py-op">=</tt> <tt class="py-name">codecs</tt><tt class="py-op">.</tt><tt class="py-name">lookup</tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">decoded</tt><tt class="py-op">,</tt><tt class="py-name">length</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">secret_decoder_ring</tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line">        <tt class="py-name">first_line</tt> <tt class="py-op">=</tt> <tt class="py-name">decoded</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"\n"</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">first_line</tt> <tt class="py-keyword">and</tt> <tt class="py-name">first_line</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-6', 'startswith', 'link-6');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">u"&lt;?xml"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">            <tt class="py-name">encoding_pos</tt> <tt class="py-op">=</tt> <tt class="py-name">first_line</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-7', 'find', 'link-7');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">u"encoding"</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">encoding_pos</tt><tt class="py-op">!=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line">                <tt class="py-comment"># look for double quote</tt> </tt>
<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">quote_pos</tt><tt class="py-op">=</tt><tt class="py-name">first_line</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-8', 'find', 'link-7');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">,</tt> <tt class="py-name">encoding_pos</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line"> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">quote_pos</tt><tt class="py-op">==</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt>                 <tt class="py-comment"># look for single quote</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">                    <tt class="py-name">quote_pos</tt><tt class="py-op">=</tt><tt class="py-name">first_line</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-9', 'find', 'link-7');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">"'"</tt><tt class="py-op">,</tt> <tt class="py-name">encoding_pos</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">quote_pos</tt><tt class="py-op">&gt;</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">                    <tt class="py-name">quote_char</tt><tt class="py-op">,</tt><tt class="py-name">rest</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">first_line</tt><tt class="py-op">[</tt><tt class="py-name">quote_pos</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">                                                <tt class="py-name">first_line</tt><tt class="py-op">[</tt><tt class="py-name">quote_pos</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">                    <tt class="py-name">encoding</tt><tt class="py-op">=</tt><tt class="py-name">rest</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">rest</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-10', 'find', 'link-7');">find</a></tt><tt class="py-op">(</tt><tt class="py-name">quote_char</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line"> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">encoding</tt> </tt>
</div><a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line"> </tt>
<a name="decoder"></a><div id="decoder-def"><a name="L72"></a><tt class="py-lineno">72</tt> <a class="py-toggle" href="#" id="decoder-toggle" onclick="return toggle('decoder');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.decoder-module.html#decoder">decoder</a><tt class="py-op">(</tt><tt class="py-param">buffer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="decoder-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="decoder-expanded"><a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">    <tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.decoder.autoDetectXMLEncoding()=web2py.gluon.decoder-module.html#autoDetectXMLEncoding"><a title="web2py.gluon.decoder.autoDetectXMLEncoding" class="py-name" href="#" onclick="return doclink('link-11', 'autoDetectXMLEncoding', 'link-11');">autoDetectXMLEncoding</a></tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">buffer</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-12', 'decode', 'link-12');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-13', 'encode', 'link-13');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.fileutils-module.html version [4077d6f0a7].










































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.fileutils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;fileutils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.fileutils-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module fileutils</h1><span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read_file"></a><span class="summary-sig-name">read_file</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code></span>)</span><br />
      returns content from filename, making sure to close the file 
      explicitly on exit.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#read_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write_file"></a><span class="summary-sig-name">write_file</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">w</code><code class="variable-quote">'</code></span>)</span><br />
      writes &lt;value&gt; to filename, making sure to close the file 
      explicitly on exit.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#write_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="readlines_file"></a><span class="summary-sig-name">readlines_file</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code></span>)</span><br />
      applies .split(' ') to the output of read_file()</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#readlines_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="abspath"></a><span class="summary-sig-name">abspath</span>(<span class="summary-sig-arg">*relpath</span>,
        <span class="summary-sig-arg">**base</span>)</span><br />
      convert relative path to absolute path based (by default) on 
      applications_parent</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#abspath">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="mktree"></a><span class="summary-sig-name">mktree</span>(<span class="summary-sig-arg">path</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#mktree">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.fileutils-module.html#listdir" class="summary-sig-name">listdir</a>(<span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">expression</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">^.+$</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">drop</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">add_dirs</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">sort</span>=<span class="summary-sig-default">True</span>)</span><br />
      like os.listdir() but you can specify a regex pattern to filter 
      files.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#listdir">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="recursive_unlink"></a><span class="summary-sig-name">recursive_unlink</span>(<span class="summary-sig-arg">f</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#recursive_unlink">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.fileutils-module.html#cleanpath" class="summary-sig-name">cleanpath</a>(<span class="summary-sig-arg">path</span>)</span><br />
      turns any expression/path into a valid filename.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#cleanpath">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_extractall"></a><span class="summary-sig-name">_extractall</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">members</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#_extractall">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="tar"></a><span class="summary-sig-name">tar</span>(<span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">dir</span>,
        <span class="summary-sig-arg">expression</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">^.+$</code><code class="variable-quote">'</code></span>)</span><br />
      tars dir into file, only tars file that match expression</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#tar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="untar"></a><span class="summary-sig-name">untar</span>(<span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">dir</span>)</span><br />
      untar file into dir</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#untar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="w2p_pack"></a><span class="summary-sig-name">w2p_pack</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">compiled</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#w2p_pack">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="w2p_unpack"></a><span class="summary-sig-name">w2p_unpack</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">delete_tar</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#w2p_unpack">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.fileutils-module.html#w2p_pack_plugin" class="summary-sig-name">w2p_pack_plugin</a>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">plugin_name</span>)</span><br />
      Pack the given plugin into a w2p file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#w2p_pack_plugin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="w2p_unpack_plugin"></a><span class="summary-sig-name">w2p_unpack_plugin</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">delete_tar</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#w2p_unpack_plugin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.fileutils-module.html#tar_compiled" class="summary-sig-name">tar_compiled</a>(<span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">dir</span>,
        <span class="summary-sig-arg">expression</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">^.+$</code><code class="variable-quote">'</code></span>)</span><br />
      used to tar a compiled application.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#tar_compiled">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="up"></a><span class="summary-sig-name">up</span>(<span class="summary-sig-arg">path</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#up">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_session"></a><span class="summary-sig-name">get_session</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">other_application</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">admin</code><code class="variable-quote">'</code></span>)</span><br />
      checks that user is authorized to access other_application</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#get_session">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="check_credentials"></a><span class="summary-sig-name">check_credentials</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">other_application</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">admin</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">expiration</span>=<span class="summary-sig-default">3600</span>)</span><br />
      checks that user is authorized to access other_application</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#check_credentials">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="fix_newlines"></a><span class="summary-sig-name">fix_newlines</span>(<span class="summary-sig-arg">path</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#fix_newlines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="copystream"></a><span class="summary-sig-name">copystream</span>(<span class="summary-sig-arg">src</span>,
        <span class="summary-sig-arg">dest</span>,
        <span class="summary-sig-arg">size</span>,
        <span class="summary-sig-arg">chunk_size</span>=<span class="summary-sig-default">100000</span>)</span><br />
      this is here because I think there is a bug in 
      shutil.copyfileobj</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#copystream">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="make_fake_file_like_object"></a><span class="summary-sig-name">make_fake_file_like_object</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#make_fake_file_like_object">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="listdir"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">listdir</span>(<span class="sig-arg">path</span>,
        <span class="sig-arg">expression</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">^.+$</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">drop</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">add_dirs</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">sort</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#listdir">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  like os.listdir() but you can specify a regex pattern to filter files.
  if add_dirs is True, the returned items will have the full path.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="cleanpath"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">cleanpath</span>(<span class="sig-arg">path</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#cleanpath">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  turns any expression/path into a valid filename. replaces / with _ and
  removes special characters.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="w2p_pack_plugin"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">w2p_pack_plugin</span>(<span class="sig-arg">filename</span>,
        <span class="sig-arg">path</span>,
        <span class="sig-arg">plugin_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#w2p_pack_plugin">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">
Pack the given plugin into a w2p file.
Will match files at:
    &lt;path&gt;/*/plugin_[name].*
    &lt;path&gt;/*/plugin_[name]/*

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="tar_compiled"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">tar_compiled</span>(<span class="sig-arg">file</span>,
        <span class="sig-arg">dir</span>,
        <span class="sig-arg">expression</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">^.+$</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.fileutils-pysrc.html#tar_compiled">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  used to tar a compiled application. the content of models, views, 
  controllers is not stored in the tar file.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.fileutils-pysrc.html version [ce901d93fe].

















































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.fileutils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;fileutils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.fileutils-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.fileutils-module.html">Module web2py.gluon.fileutils</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-0', 'storage', 'link-0');">storage</a></tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">tarfile</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">glob</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1', 'time', 'link-1');">time</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-2', 'http', 'link-2');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-3', 'HTTP', 'link-3');">HTTP</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">gzip</tt> <tt class="py-keyword">import</tt> <tt class="py-name">open</tt> <tt class="py-keyword">as</tt> <tt class="py-name">gzopen</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-4', 'settings', 'link-4');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-5', 'global_settings', 'link-5');">global_settings</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">    <tt class="py-string">'read_file'</tt><tt class="py-op">,</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-string">'write_file'</tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">    <tt class="py-string">'readlines_file'</tt><tt class="py-op">,</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">    <tt class="py-string">'up'</tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">    <tt class="py-string">'abspath'</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-string">'mktree'</tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt class="py-string">'listdir'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-string">'recursive_unlink'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-string">'cleanpath'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">    <tt class="py-string">'tar'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt class="py-string">'untar'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-string">'tar_compiled'</tt><tt class="py-op">,</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-string">'get_session'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-string">'check_credentials'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-string">'w2p_pack'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-string">'w2p_unpack'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-string">'w2p_pack_plugin'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-string">'w2p_unpack_plugin'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">    <tt class="py-string">'fix_newlines'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-string">'make_fake_file_like_object'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"> </tt>
<a name="read_file"></a><div id="read_file-def"><a name="L44"></a><tt class="py-lineno"> 44</tt> <a class="py-toggle" href="#" id="read_file-toggle" onclick="return toggle('read_file');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#read_file">read_file</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-string">'r'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="read_file-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="read_file-expanded"><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-docstring">"returns content from filename, making sure to close the file explicitly on exit."</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-6', 'read', 'link-6');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-7', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"> </tt>
<a name="write_file"></a><div id="write_file-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="write_file-toggle" onclick="return toggle('write_file');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#write_file">write_file</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-string">'w'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="write_file-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="write_file-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-docstring">"writes &lt;value&gt; to filename, making sure to close the file explicitly on exit."</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-8', 'write', 'link-8');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-9', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"> </tt>
<a name="readlines_file"></a><div id="readlines_file-def"><a name="L60"></a><tt class="py-lineno"> 60</tt> <a class="py-toggle" href="#" id="readlines_file-toggle" onclick="return toggle('readlines_file');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#readlines_file">readlines_file</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-string">'r'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="readlines_file-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="readlines_file-expanded"><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">    <tt class="py-docstring">"applies .split('\n') to the output of read_file()"</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-10" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-10', 'read_file', 'link-10');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="abspath"></a><div id="abspath-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="abspath-toggle" onclick="return toggle('abspath');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#abspath">abspath</a><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">relpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">base</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="abspath-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="abspath-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-docstring">"convert relative path to absolute path based (by default) on applications_parent"</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-11', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">relpath</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt id="link-12" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-12', 'gluon', 'link-12');">gluon</a></tt> <tt class="py-op">=</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-13', 'get', 'link-13');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'gluon'</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isabs</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">path</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-14', 'gluon', 'link-12');">gluon</a></tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-15', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt id="link-16" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-16', 'global_settings', 'link-5');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-17', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt id="link-18" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-18', 'global_settings', 'link-5');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
</div><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"> </tt>
<a name="mktree"></a><div id="mktree-def"><a name="L75"></a><tt class="py-lineno"> 75</tt> <a class="py-toggle" href="#" id="mktree-toggle" onclick="return toggle('mktree');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#mktree">mktree</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="mktree-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="mktree-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">    <tt class="py-name">head</tt><tt class="py-op">,</tt><tt class="py-name">tail</tt> <tt class="py-op">=</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">head</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">tail</tt><tt class="py-op">:</tt> <tt id="link-19" class="py-name" targets="Function web2py.gluon.fileutils.mktree()=web2py.gluon.fileutils-module.html#mktree"><a title="web2py.gluon.fileutils.mktree" class="py-name" href="#" onclick="return doclink('link-19', 'mktree', 'link-19');">mktree</a></tt><tt class="py-op">(</tt><tt class="py-name">head</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-20', 'exists', 'link-20');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">head</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">head</tt><tt class="py-op">)</tt> </tt>
</div><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"> </tt>
<a name="listdir"></a><div id="listdir-def"><a name="L82"></a><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="listdir-toggle" onclick="return toggle('listdir');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#listdir">listdir</a><tt class="py-op">(</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt class="py-param">path</tt><tt class="py-op">,</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt class="py-param">expression</tt><tt class="py-op">=</tt><tt class="py-string">'^.+$'</tt><tt class="py-op">,</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt class="py-param">drop</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">    <tt class="py-param">add_dirs</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-param">sort</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="listdir-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="listdir-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">    like os.listdir() but you can specify a regex pattern to filter files.</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">    if add_dirs is True, the returned items will have the full path.</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">path</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt> <tt class="py-op">+</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-21" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.drop()=web2py.gluon.dal.BaseAdapter-class.html#drop,Method web2py.gluon.dal.NoSQLAdapter.drop()=web2py.gluon.dal.NoSQLAdapter-class.html#drop,Method web2py.gluon.dal.Table.drop()=web2py.gluon.dal.Table-class.html#drop"><a title="web2py.gluon.dal.BaseAdapter.drop
web2py.gluon.dal.NoSQLAdapter.drop
web2py.gluon.dal.Table.drop" class="py-name" href="#" onclick="return doclink('link-21', 'drop', 'link-21');">drop</a></tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-22', 'len', 'link-22');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt id="link-23" class="py-name" targets="Variable web2py.gluon.validators.IS_EMAIL.regex=web2py.gluon.validators.IS_EMAIL-class.html#regex,Variable web2py.gluon.validators.IS_IPV4.regex=web2py.gluon.validators.IS_IPV4-class.html#regex"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-23', 'regex', 'link-23');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">expression</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">    <tt id="link-24" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-24', 'items', 'link-24');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Variable web2py.gluon.import_all.root=web2py.gluon.import_all-module.html#root"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-25', 'root', 'link-25');">root</a></tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name" targets="Variable web2py.gluon.import_all.dirs=web2py.gluon.import_all-module.html#dirs"><a title="web2py.gluon.import_all.dirs" class="py-name" href="#" onclick="return doclink('link-26', 'dirs', 'link-26');">dirs</a></tt><tt class="py-op">,</tt> <tt id="link-27" class="py-name" targets="Variable web2py.gluon.import_all.files=web2py.gluon.import_all-module.html#files"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-27', 'files', 'link-27');">files</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">walk</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">topdown</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">dir</tt> <tt class="py-keyword">in</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.import_all.dirs" class="py-name" href="#" onclick="return doclink('link-28', 'dirs', 'link-26');">dirs</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">dir</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-29', 'startswith', 'link-29');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                <tt id="link-30" class="py-name"><a title="web2py.gluon.import_all.dirs" class="py-name" href="#" onclick="return doclink('link-30', 'dirs', 'link-26');">dirs</a></tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">add_dirs</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">            <tt id="link-31" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-31', 'items', 'link-24');">items</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-32', 'append', 'link-32');">append</a></tt><tt class="py-op">(</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-33', 'root', 'link-25');">root</a></tt><tt class="py-op">[</tt><tt class="py-name">n</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-34', 'files', 'link-27');">files</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-35', 'regex', 'link-23');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-36', 'startswith', 'link-29');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                <tt id="link-37" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-37', 'items', 'link-24');">items</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-38', 'append', 'link-32');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-39', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-40', 'root', 'link-25');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">n</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-41" class="py-name" targets="Method web2py.gluon.dal.Rows.sort()=web2py.gluon.dal.Rows-class.html#sort"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-41', 'sort', 'link-41');">sort</a></tt><tt class="py-op">:</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-42" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-42', 'items', 'link-24');">items</a></tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-43', 'items', 'link-24');">items</a></tt> </tt>
</div><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"> </tt>
<a name="recursive_unlink"></a><div id="recursive_unlink-def"><a name="L116"></a><tt class="py-lineno">116</tt> <a class="py-toggle" href="#" id="recursive_unlink-toggle" onclick="return toggle('recursive_unlink');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#recursive_unlink">recursive_unlink</a><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="recursive_unlink-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="recursive_unlink-expanded"><a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-44" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-44', 's', 'link-44');">s</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-45', 'listdir', 'link-45');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt id="link-46" class="py-name" targets="Function web2py.gluon.fileutils.recursive_unlink()=web2py.gluon.fileutils-module.html#recursive_unlink"><a title="web2py.gluon.fileutils.recursive_unlink" class="py-name" href="#" onclick="return doclink('link-46', 'recursive_unlink', 'link-46');">recursive_unlink</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-47', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-48', 's', 'link-44');">s</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">rmdir</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
</div><a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"> </tt>
<a name="cleanpath"></a><div id="cleanpath-def"><a name="L125"></a><tt class="py-lineno">125</tt> <a class="py-toggle" href="#" id="cleanpath-toggle" onclick="return toggle('cleanpath');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#cleanpath">cleanpath</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="cleanpath-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="cleanpath-expanded"><a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">    turns any expression/path into a valid filename. replaces / with _ and</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">    removes special characters.</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">    <tt id="link-49" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-49', 'items', 'link-24');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-50" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-50', 'len', 'link-22');">len</a></tt><tt class="py-op">(</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-51', 'items', 'link-24');">items</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'[^\w\.]+'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-52', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt id="link-53" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-53', 'items', 'link-24');">items</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'.'</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">                       <tt class="py-op">+</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-54', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-55', 'items', 'link-24');">items</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'[^\w\.]+'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-56', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-57', 'items', 'link-24');">items</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">path</tt> </tt>
</div><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"> </tt>
<a name="_extractall"></a><div id="_extractall-def"><a name="L140"></a><tt class="py-lineno">140</tt> <a class="py-toggle" href="#" id="_extractall-toggle" onclick="return toggle('_extractall');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#_extractall">_extractall</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-param">members</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_extractall-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_extractall-expanded"><a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt class="py-name">TarFile</tt><tt class="py-op">,</tt> <tt class="py-string">'extractall'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">tarfile</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ExtractError</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-keyword">class</tt> <tt class="py-def-name">TarFile</tt><tt class="py-op">(</tt><tt class="py-base-class">tarfile</tt><tt class="py-op">.</tt><tt class="py-base-class">TarFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">extractall</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-param">members</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">                <tt class="py-docstring">"""Extract all members from the archive to the current working</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"><tt class="py-docstring">             directory and set owner, modification time and permissions on</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"><tt class="py-docstring">             directories afterwards. `path' specifies a different directory</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"><tt class="py-docstring">             to extract to. `members' is optional and must be a subset of the</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line"><tt class="py-docstring">             list returned by getmembers().</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">                <tt class="py-name">directories</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">members</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">                    <tt class="py-name">members</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">tarinfo</tt> <tt class="py-keyword">in</tt> <tt class="py-name">members</tt><tt class="py-op">:</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">tarinfo</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">                        <tt class="py-comment"># Extract directory with a safe mode, so that</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># all files below can be extracted as well.</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">                        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">                            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">makedirs</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-58', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">                                    <tt class="py-name">tarinfo</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-59', 'name', 'link-59');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0777</tt><tt class="py-op">)</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">                        <tt class="py-keyword">except</tt> <tt class="py-name">EnvironmentError</tt><tt class="py-op">:</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">                            <tt class="py-keyword">pass</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">                        <tt class="py-name">directories</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-60', 'append', 'link-32');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">tarinfo</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extract</tt><tt class="py-op">(</tt><tt class="py-name">tarinfo</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">                <tt class="py-comment"># Reverse sort directories.</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                <tt class="py-name">directories</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-61', 'sort', 'link-41');">sort</a></tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-62" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-62', 'b', 'link-62');">b</a></tt><tt class="py-op">:</tt> <tt class="py-name">cmp</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-63', 'name', 'link-59');">name</a></tt><tt class="py-op">,</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-64', 'b', 'link-62');">b</a></tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-65', 'name', 'link-59');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                <tt class="py-name">directories</tt><tt class="py-op">.</tt><tt class="py-name">reverse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">                <tt class="py-comment"># Set correct owner, mtime and filemode on directories.</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">tarinfo</tt> <tt class="py-keyword">in</tt> <tt class="py-name">directories</tt><tt class="py-op">:</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">                    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-66', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">tarinfo</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-67', 'name', 'link-59');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">                    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chown</tt><tt class="py-op">(</tt><tt class="py-name">tarinfo</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">utime</tt><tt class="py-op">(</tt><tt class="py-name">tarinfo</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chmod</tt><tt class="py-op">(</tt><tt class="py-name">tarinfo</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">                    <tt class="py-keyword">except</tt> <tt class="py-name">ExtractError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorlevel</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">                            <tt class="py-keyword">raise</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dbg</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-string">'tarfile: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line"> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">        <tt class="py-name">_cls</tt> <tt class="py-op">=</tt> <tt class="py-name">TarFile</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-name">_cls</tt> <tt class="py-op">=</tt> <tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt class="py-name">TarFile</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">    <tt id="link-68" class="py-name" targets="Function web2py.gluon.fileutils.tar()=web2py.gluon.fileutils-module.html#tar"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-68', 'tar', 'link-68');">tar</a></tt> <tt class="py-op">=</tt> <tt class="py-name">_cls</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">    <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt id="link-69" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-69', 'tar', 'link-68');">tar</a></tt><tt class="py-op">.</tt><tt class="py-name">extractall</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">members</tt><tt class="py-op">)</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">    <tt id="link-70" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-70', 'tar', 'link-68');">tar</a></tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-71', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt>
</div><a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"> </tt>
<a name="tar"></a><div id="tar-def"><a name="L201"></a><tt class="py-lineno">201</tt> <a class="py-toggle" href="#" id="tar-toggle" onclick="return toggle('tar');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#tar">tar</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">,</tt> <tt class="py-param">dir</tt><tt class="py-op">,</tt> <tt class="py-param">expression</tt><tt class="py-op">=</tt><tt class="py-string">'^.+$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="tar-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="tar-expanded"><a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">    tars dir into file, only tars file that match expression</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">    <tt id="link-72" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-72', 'tar', 'link-68');">tar</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt class="py-name">TarFile</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'w'</tt><tt class="py-op">)</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-73" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-73', 'listdir', 'link-45');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">expression</tt><tt class="py-op">,</tt> <tt class="py-name">add_dirs</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">            <tt id="link-74" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-74', 'tar', 'link-68');">tar</a></tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-75', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt id="link-76" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-76', 'tar', 'link-68');">tar</a></tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-77', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line"> </tt>
<a name="untar"></a><div id="untar-def"><a name="L213"></a><tt class="py-lineno">213</tt> <a class="py-toggle" href="#" id="untar-toggle" onclick="return toggle('untar');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#untar">untar</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">,</tt> <tt class="py-param">dir</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="untar-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="untar-expanded"><a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"><tt class="py-docstring">    untar file into dir</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">    <tt id="link-78" class="py-name" targets="Function web2py.gluon.fileutils._extractall()=web2py.gluon.fileutils-module.html#_extractall"><a title="web2py.gluon.fileutils._extractall" class="py-name" href="#" onclick="return doclink('link-78', '_extractall', 'link-78');">_extractall</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">dir</tt><tt class="py-op">)</tt> </tt>
</div><a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"> </tt>
<a name="w2p_pack"></a><div id="w2p_pack-def"><a name="L221"></a><tt class="py-lineno">221</tt> <a class="py-toggle" href="#" id="w2p_pack-toggle" onclick="return toggle('w2p_pack');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#w2p_pack">w2p_pack</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">compiled</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="w2p_pack-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="w2p_pack-expanded"><a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-79" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-79', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-80" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-80', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">    <tt class="py-name">tarname</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> <tt class="py-op">+</tt> <tt class="py-string">'.tar'</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">compiled</tt><tt class="py-op">:</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">        <tt id="link-81" class="py-name" targets="Function web2py.gluon.fileutils.tar_compiled()=web2py.gluon.fileutils-module.html#tar_compiled"><a title="web2py.gluon.fileutils.tar_compiled" class="py-name" href="#" onclick="return doclink('link-81', 'tar_compiled', 'link-81');">tar_compiled</a></tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'^[\w\.\-]+$'</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">        <tt id="link-82" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-82', 'tar', 'link-68');">tar</a></tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'^[\w\.\-]+$'</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">    <tt class="py-name">w2pfp</tt> <tt class="py-op">=</tt> <tt class="py-name">gzopen</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">    <tt class="py-name">tarfp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">    <tt class="py-name">w2pfp</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-83', 'write', 'link-8');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">tarfp</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-84', 'read', 'link-6');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">    <tt class="py-name">w2pfp</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-85', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">    <tt class="py-name">tarfp</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-86', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">    <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">)</tt> </tt>
</div><a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"> </tt>
<a name="w2p_unpack"></a><div id="w2p_unpack-def"><a name="L236"></a><tt class="py-lineno">236</tt> <a class="py-toggle" href="#" id="w2p_unpack-toggle" onclick="return toggle('w2p_unpack');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#w2p_unpack">w2p_unpack</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">delete_tar</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="w2p_unpack-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="w2p_unpack-expanded"><a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-87', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-88" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-88', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'.w2p'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'.gz'</tt><tt class="py-op">:</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'.w2p'</tt><tt class="py-op">:</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">            <tt class="py-name">tarname</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">'.tar'</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">            <tt class="py-name">tarname</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">'.tar'</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">        <tt class="py-name">fgzipped</tt> <tt class="py-op">=</tt> <tt class="py-name">gzopen</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">        <tt class="py-name">tarfile</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-89', 'write', 'link-8');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">fgzipped</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-90', 'read', 'link-6');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">        <tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-91', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">        <tt class="py-name">fgzipped</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-92', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">tarname</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">    <tt id="link-93" class="py-name" targets="Function web2py.gluon.fileutils.untar()=web2py.gluon.fileutils-module.html#untar"><a title="web2py.gluon.fileutils.untar" class="py-name" href="#" onclick="return doclink('link-93', 'untar', 'link-93');">untar</a></tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">delete_tar</tt><tt class="py-op">:</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">tarname</tt><tt class="py-op">)</tt> </tt>
</div><a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line"> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"> </tt>
<a name="w2p_pack_plugin"></a><div id="w2p_pack_plugin-def"><a name="L256"></a><tt class="py-lineno">256</tt> <a class="py-toggle" href="#" id="w2p_pack_plugin-toggle" onclick="return toggle('w2p_pack_plugin');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#w2p_pack_plugin">w2p_pack_plugin</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">plugin_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="w2p_pack_plugin-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="w2p_pack_plugin-expanded"><a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">    <tt class="py-docstring">"""Pack the given plugin into a w2p file.</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line"><tt class="py-docstring">    Will match files at:</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;path&gt;/*/plugin_[name].*</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;path&gt;/*/plugin_[name]/*</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-94', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-95', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">filename</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-96', 'endswith', 'link-96');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py.plugin.%s.w2p'</tt> <tt class="py-op">%</tt> <tt class="py-name">plugin_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-97" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-97', 'Exception', 'link-97');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a web2py plugin name"</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">    <tt class="py-name">plugin_tarball</tt> <tt class="py-op">=</tt> <tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'w:gz'</tt><tt class="py-op">)</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">        <tt class="py-name">app_dir</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">app_dir</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">'/'</tt><tt class="py-op">:</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">            <tt class="py-name">app_dir</tt> <tt class="py-op">=</tt> <tt class="py-name">app_dir</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-name">files1</tt><tt class="py-op">=</tt><tt class="py-name">glob</tt><tt class="py-op">.</tt><tt class="py-name">glob</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-98', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">app_dir</tt><tt class="py-op">,</tt><tt class="py-string">'*/plugin_%s.*'</tt> <tt class="py-op">%</tt> <tt class="py-name">plugin_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">        <tt class="py-name">files2</tt><tt class="py-op">=</tt><tt class="py-name">glob</tt><tt class="py-op">.</tt><tt class="py-name">glob</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-99', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">app_dir</tt><tt class="py-op">,</tt><tt class="py-string">'*/plugin_%s/*'</tt> <tt class="py-op">%</tt> <tt class="py-name">plugin_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt class="py-name">files1</tt><tt class="py-op">+</tt><tt class="py-name">files2</tt><tt class="py-op">:</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">            <tt class="py-name">plugin_tarball</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">arcname</tt><tt class="py-op">=</tt><tt class="py-name">file</tt><tt class="py-op">[</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-100', 'len', 'link-22');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">app_dir</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">        <tt class="py-name">plugin_tarball</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-101', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line"> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line"> </tt>
<a name="w2p_unpack_plugin"></a><div id="w2p_unpack_plugin-def"><a name="L279"></a><tt class="py-lineno">279</tt> <a class="py-toggle" href="#" id="w2p_unpack_plugin-toggle" onclick="return toggle('w2p_unpack_plugin');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#w2p_unpack_plugin">w2p_unpack_plugin</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">delete_tar</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="w2p_unpack_plugin-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="w2p_unpack_plugin-expanded"><a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-102', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-103" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-103', 'abspath', 'link-79');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">basename</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-104', 'startswith', 'link-29');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py.plugin.'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-105" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-105', 'Exception', 'link-97');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a web2py plugin"</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">    <tt id="link-106" class="py-name" targets="Function web2py.gluon.fileutils.w2p_unpack()=web2py.gluon.fileutils-module.html#w2p_unpack"><a title="web2py.gluon.fileutils.w2p_unpack" class="py-name" href="#" onclick="return doclink('link-106', 'w2p_unpack', 'link-106');">w2p_unpack</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-name">delete_tar</tt><tt class="py-op">)</tt> </tt>
</div><a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line"> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line"> </tt>
<a name="tar_compiled"></a><div id="tar_compiled-def"><a name="L287"></a><tt class="py-lineno">287</tt> <a class="py-toggle" href="#" id="tar_compiled-toggle" onclick="return toggle('tar_compiled');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#tar_compiled">tar_compiled</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">,</tt> <tt class="py-param">dir</tt><tt class="py-op">,</tt> <tt class="py-param">expression</tt><tt class="py-op">=</tt><tt class="py-string">'^.+$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="tar_compiled-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="tar_compiled-expanded"><a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line"><tt class="py-docstring">    used to tar a compiled application.</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line"><tt class="py-docstring">    the content of models, views, controllers is not stored in the tar file.</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line"> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">    <tt id="link-107" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-107', 'tar', 'link-68');">tar</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tarfile</tt><tt class="py-op">.</tt><tt class="py-name">TarFile</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'w'</tt><tt class="py-op">)</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-108" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-108', 'listdir', 'link-45');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">expression</tt><tt class="py-op">,</tt> <tt class="py-name">add_dirs</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-109', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">islink</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">            <tt class="py-keyword">continue</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">file</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'.pyc'</tt><tt class="py-op">:</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'models'</tt><tt class="py-op">:</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'views'</tt><tt class="py-op">:</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">11</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">7</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'modules'</tt><tt class="py-op">:</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">        <tt id="link-110" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-110', 'tar', 'link-68');">tar</a></tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">    <tt id="link-111" class="py-name"><a title="web2py.gluon.fileutils.tar" class="py-name" href="#" onclick="return doclink('link-111', 'tar', 'link-68');">tar</a></tt><tt class="py-op">.</tt><tt id="link-112" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-112', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"> </tt>
<a name="up"></a><div id="up-def"><a name="L310"></a><tt class="py-lineno">310</tt> <a class="py-toggle" href="#" id="up-toggle" onclick="return toggle('up');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#up">up</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="up-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="up-expanded"><a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">normpath</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line"> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"> </tt>
<a name="get_session"></a><div id="get_session-def"><a name="L314"></a><tt class="py-lineno">314</tt> <a class="py-toggle" href="#" id="get_session-toggle" onclick="return toggle('get_session');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#get_session">get_session</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">other_application</tt><tt class="py-op">=</tt><tt class="py-string">'admin'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_session-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_session-expanded"><a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">    <tt class="py-docstring">""" checks that user is authorized to access other_application"""</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt class="py-name">other_application</tt><tt class="py-op">:</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">KeyError</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-string">'session_id_'</tt> <tt class="py-op">+</tt> <tt class="py-name">other_application</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">        <tt class="py-name">osession</tt> <tt class="py-op">=</tt> <tt id="link-113" class="py-name"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-113', 'storage', 'link-0');">storage</a></tt><tt class="py-op">.</tt><tt id="link-114" class="py-name" targets="Function web2py.gluon.storage.load_storage()=web2py.gluon.storage-module.html#load_storage"><a title="web2py.gluon.storage.load_storage" class="py-name" href="#" onclick="return doclink('link-114', 'load_storage', 'link-114');">load_storage</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-115', 'join', 'link-11');">join</a></tt><tt class="py-op">(</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">                <tt id="link-116" class="py-name" targets="Function web2py.gluon.fileutils.up()=web2py.gluon.fileutils-module.html#up"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-116', 'up', 'link-116');">up</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">other_application</tt><tt class="py-op">,</tt> <tt class="py-string">'sessions'</tt><tt class="py-op">,</tt> <tt class="py-name">session_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">        <tt class="py-name">osession</tt> <tt class="py-op">=</tt> <tt id="link-117" class="py-name"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-117', 'storage', 'link-0');">storage</a></tt><tt class="py-op">.</tt><tt id="link-118" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-118', 'Storage', 'link-118');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">osession</tt> </tt>
</div><a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line"> </tt>
<a name="check_credentials"></a><div id="check_credentials-def"><a name="L327"></a><tt class="py-lineno">327</tt> <a class="py-toggle" href="#" id="check_credentials-toggle" onclick="return toggle('check_credentials');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#check_credentials">check_credentials</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">other_application</tt><tt class="py-op">=</tt><tt class="py-string">'admin'</tt><tt class="py-op">,</tt> <tt class="py-param">expiration</tt> <tt class="py-op">=</tt> <tt class="py-number">60</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="check_credentials-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="check_credentials-expanded"><a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">    <tt class="py-docstring">""" checks that user is authorized to access other_application"""</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-119', 'env', 'link-119');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt><tt class="py-op">:</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">google</tt><tt class="py-op">.</tt><tt class="py-name">appengine</tt><tt class="py-op">.</tt><tt class="py-name">api</tt> <tt class="py-keyword">import</tt> <tt class="py-name">users</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">users</tt><tt class="py-op">.</tt><tt class="py-name">is_current_user_admin</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">            <tt class="py-name">login_html</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;a href="%s"&gt;Sign in with your google account&lt;/a&gt;.'</tt> \ </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">                <tt class="py-op">%</tt> <tt class="py-name">users</tt><tt class="py-op">.</tt><tt class="py-name">create_login_url</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-120', 'env', 'link-119');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">path_info</tt><tt class="py-op">)</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-121" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-121', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt> <tt class="py-string">'&lt;html&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">login_html</tt><tt class="py-op">)</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">        <tt class="py-name">dt</tt> <tt class="py-op">=</tt> <tt id="link-122" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-122', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-123', 'time', 'link-1');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">expiration</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">        <tt id="link-124" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-124', 's', 'link-44');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-125" class="py-name" targets="Function web2py.gluon.fileutils.get_session()=web2py.gluon.fileutils-module.html#get_session"><a title="web2py.gluon.fileutils.get_session" class="py-name" href="#" onclick="return doclink('link-125', 'get_session', 'link-125');">get_session</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">other_application</tt><tt class="py-op">)</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-126', 's', 'link-44');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">authorized</tt> <tt class="py-keyword">and</tt> <tt id="link-127" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-127', 's', 'link-44');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">last_time</tt> <tt class="py-keyword">and</tt> <tt id="link-128" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-128', 's', 'link-44');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">last_time</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">dt</tt><tt class="py-op">)</tt> </tt>
</div><a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line"> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line"> </tt>
<a name="fix_newlines"></a><div id="fix_newlines-def"><a name="L343"></a><tt class="py-lineno">343</tt> <a class="py-toggle" href="#" id="fix_newlines-toggle" onclick="return toggle('fix_newlines');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#fix_newlines">fix_newlines</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="fix_newlines-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="fix_newlines-expanded"><a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">    <tt id="link-129" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-129', 'regex', 'link-23');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'''(\r</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line"><tt class="py-string">|\r|</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line"><tt class="py-string">)'''</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">filename</tt> <tt class="py-keyword">in</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-130', 'listdir', 'link-45');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'.*\.(py|html)$'</tt><tt class="py-op">,</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.drop
web2py.gluon.dal.NoSQLAdapter.drop
web2py.gluon.dal.Table.drop" class="py-name" href="#" onclick="return doclink('link-131', 'drop', 'link-21');">drop</a></tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">        <tt class="py-name">rdata</tt> <tt class="py-op">=</tt> <tt id="link-132" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-132', 'read_file', 'link-10');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">        <tt class="py-name">wdata</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-133', 'regex', 'link-23');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-name">rdata</tt><tt class="py-op">)</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">wdata</tt> <tt class="py-op">!=</tt> <tt class="py-name">rdata</tt><tt class="py-op">:</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">            <tt id="link-134" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-134', 'write_file', 'link-134');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">wdata</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line"> </tt>
<a name="copystream"></a><div id="copystream-def"><a name="L353"></a><tt class="py-lineno">353</tt> <a class="py-toggle" href="#" id="copystream-toggle" onclick="return toggle('copystream');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#copystream">copystream</a><tt class="py-op">(</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">    <tt class="py-param">src</tt><tt class="py-op">,</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">    <tt class="py-param">dest</tt><tt class="py-op">,</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">    <tt class="py-param">size</tt><tt class="py-op">,</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">    <tt class="py-param">chunk_size</tt><tt class="py-op">=</tt><tt class="py-number">10</tt> <tt class="py-op">**</tt> <tt class="py-number">5</tt><tt class="py-op">,</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="copystream-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="copystream-expanded"><a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line"><tt class="py-docstring">    this is here because I think there is a bug in shutil.copyfileobj</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">    <tt class="py-keyword">while</tt> <tt class="py-name">size</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">src</tt><tt class="py-op">.</tt><tt id="link-135" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-135', 'read', 'link-6');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">src</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-136', 'read', 'link-6');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">        <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt id="link-137" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-137', 'len', 'link-22');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">size</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">        <tt class="py-name">size</tt> <tt class="py-op">-=</tt> <tt class="py-name">length</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">        <tt class="py-name">dest</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-138', 'write', 'link-8');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">    <tt class="py-name">dest</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> </tt>
</div><a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line"> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line"> </tt>
<a name="make_fake_file_like_object"></a><div id="make_fake_file_like_object-def"><a name="L380"></a><tt class="py-lineno">380</tt> <a class="py-toggle" href="#" id="make_fake_file_like_object-toggle" onclick="return toggle('make_fake_file_like_object');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.fileutils-module.html#make_fake_file_like_object">make_fake_file_like_object</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="make_fake_file_like_object-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="make_fake_file_like_object-expanded"><a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">    <tt class="py-keyword">class</tt> <tt class="py-def-name">LogFile</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">write</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
</div><a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">LogFile</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.globals-module.html version [82dd89441e].















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.globals</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;globals
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.globals-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module globals</h1><span class="codelink"><a href="web2py.gluon.globals-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Contains the classes for the global used variables:

- Request
- Response
- Session

</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.globals.Request-class.html" class="summary-name">Request</a><br />
      defines the request object and the default values of its members...
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.globals.Response-class.html" class="summary-name">Response</a><br />
      defines the response object and the default values of its 
        members response.write(   ) can be used to write in the output 
        html
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.globals.Session-class.html" class="summary-name">Session</a><br />
      defines the session object and the default values of its members
        (None)
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_session_id"></a><span class="summary-name">regex_session_id</span> = <code title="re.compile(r'^([\w-]+/)?[\w-\.]+$')">re.compile(r'^<code class="re-group">(</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code>/<code class="re-group">)</code><code class="re-op">?</code><code class="re-group">[</code>\w-\.<code class="re-group">]</code><code class="re-op">+</code>$')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="current"></a><span class="summary-name">current</span> = <code title="threading.local()">threading.local()</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.globals-pysrc.html version [d0eae33eb6].

































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.globals</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;globals
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.globals-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.globals-module.html">Module web2py.gluon.globals</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">Contains the classes for the global used variables:</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">- Request</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">- Response</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">- Session</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-0', 'storage', 'link-0');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-1', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name" targets="Class web2py.gluon.storage.List=web2py.gluon.storage.List-class.html"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-2', 'List', 'link-2');">List</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.streamer=web2py.gluon.streamer-module.html,Function web2py.gluon.streamer.streamer()=web2py.gluon.streamer-module.html#streamer"><a title="web2py.gluon.streamer
web2py.gluon.streamer.streamer" class="py-name" href="#" onclick="return doclink('link-3', 'streamer', 'link-3');">streamer</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name"><a title="web2py.gluon.streamer
web2py.gluon.streamer.streamer" class="py-name" href="#" onclick="return doclink('link-4', 'streamer', 'link-3');">streamer</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Function web2py.gluon.streamer.stream_file_or_304_or_206()=web2py.gluon.streamer-module.html#stream_file_or_304_or_206"><a title="web2py.gluon.streamer.stream_file_or_304_or_206" class="py-name" href="#" onclick="return doclink('link-5', 'stream_file_or_304_or_206', 'link-5');">stream_file_or_304_or_206</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Variable web2py.gluon.streamer.DEFAULT_CHUNK_SIZE=web2py.gluon.streamer-module.html#DEFAULT_CHUNK_SIZE"><a title="web2py.gluon.streamer.DEFAULT_CHUNK_SIZE" class="py-name" href="#" onclick="return doclink('link-6', 'DEFAULT_CHUNK_SIZE', 'link-6');">DEFAULT_CHUNK_SIZE</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name" targets="Method web2py.gluon.globals.Response.xmlrpc()=web2py.gluon.globals.Response-class.html#xmlrpc,Method web2py.gluon.tools.Service.xmlrpc()=web2py.gluon.tools.Service-class.html#xmlrpc,Module web2py.gluon.xmlrpc=web2py.gluon.xmlrpc-module.html"><a title="web2py.gluon.globals.Response.xmlrpc
web2py.gluon.tools.Service.xmlrpc
web2py.gluon.xmlrpc" class="py-name" href="#" onclick="return doclink('link-7', 'xmlrpc', 'link-7');">xmlrpc</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Function web2py.gluon.xmlrpc.handler()=web2py.gluon.xmlrpc-module.html#handler"><a title="web2py.gluon.xmlrpc.handler" class="py-name" href="#" onclick="return doclink('link-8', 'handler', 'link-8');">handler</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name" targets="Module web2py.gluon.contenttype=web2py.gluon.contenttype-module.html,Function web2py.gluon.contenttype.contenttype()=web2py.gluon.contenttype-module.html#contenttype"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-9', 'contenttype', 'link-9');">contenttype</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-10', 'contenttype', 'link-9');">contenttype</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-11" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-11', 'html', 'link-11');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-12" class="py-name" targets="Function web2py.gluon.html.xmlescape()=web2py.gluon.html-module.html#xmlescape"><a title="web2py.gluon.html.xmlescape" class="py-name" href="#" onclick="return doclink('link-12', 'xmlescape', 'link-12');">xmlescape</a></tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name" targets="Class web2py.gluon.html.TABLE=web2py.gluon.html.TABLE-class.html"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-13', 'TABLE', 'link-13');">TABLE</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class web2py.gluon.html.TR=web2py.gluon.html.TR-class.html"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-14', 'TR', 'link-14');">TR</a></tt><tt class="py-op">,</tt> <tt id="link-15" class="py-name" targets="Class web2py.gluon.html.PRE=web2py.gluon.html.PRE-class.html"><a title="web2py.gluon.html.PRE" class="py-name" href="#" onclick="return doclink('link-15', 'PRE', 'link-15');">PRE</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-16" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-16', 'http', 'link-16');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-17" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-17', 'HTTP', 'link-17');">HTTP</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-18" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-18', 'fileutils', 'link-18');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-19" class="py-name" targets="Function web2py.gluon.fileutils.up()=web2py.gluon.fileutils-module.html#up"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-19', 'up', 'link-19');">up</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-20" class="py-name" targets="Module web2py.gluon.serializers=web2py.gluon.serializers-module.html"><a title="web2py.gluon.serializers" class="py-name" href="#" onclick="return doclink('link-20', 'serializers', 'link-20');">serializers</a></tt> <tt class="py-keyword">import</tt> <tt id="link-21" class="py-name" targets="Method web2py.gluon.dal.Rows.json()=web2py.gluon.dal.Rows-class.html#json,Method web2py.gluon.globals.Response.json()=web2py.gluon.globals.Response-class.html#json,Function web2py.gluon.serializers.json()=web2py.gluon.serializers-module.html#json,Method web2py.gluon.tools.Service.json()=web2py.gluon.tools.Service-class.html#json"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-21', 'json', 'link-21');">json</a></tt><tt class="py-op">,</tt> <tt id="link-22" class="py-name" targets="Function web2py.gluon.serializers.custom_json()=web2py.gluon.serializers-module.html#custom_json"><a title="web2py.gluon.serializers.custom_json" class="py-name" href="#" onclick="return doclink('link-22', 'custom_json', 'link-22');">custom_json</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-23" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-23', 'settings', 'link-23');">settings</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-24" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-24', 'utils', 'link-24');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-25" class="py-name" targets="Function web2py.gluon.utils.web2py_uuid()=web2py.gluon.utils-module.html#web2py_uuid"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-25', 'web2py_uuid', 'link-25');">web2py_uuid</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-26', 'settings', 'link-23');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-27" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-27', 'global_settings', 'link-27');">global_settings</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hashlib</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-28" class="py-name" targets="Module web2py.gluon.portalocker=web2py.gluon.portalocker-module.html"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-28', 'portalocker', 'link-28');">portalocker</a></tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cPickle</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-29" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-29', 'datetime', 'link-29');">datetime</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">Cookie</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">threading</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt id="link-30" class="py-name" targets="Variable web2py.gluon.globals.regex_session_id=web2py.gluon.globals-module.html#regex_session_id"><a title="web2py.gluon.globals.regex_session_id" class="py-name" href="#" onclick="return doclink('link-30', 'regex_session_id', 'link-30');">regex_session_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^([\w\-]+/)?[\w\-\.]+$'</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'Request'</tt><tt class="py-op">,</tt> <tt class="py-string">'Response'</tt><tt class="py-op">,</tt> <tt class="py-string">'Session'</tt><tt class="py-op">]</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt id="link-31" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-31', 'current', 'link-31');">current</a></tt> <tt class="py-op">=</tt> <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">local</tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># thread-local storage for request-scope globals</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"> </tt>
<a name="Request"></a><div id="Request-def"><a name="L47"></a><tt class="py-lineno"> 47</tt> <a class="py-toggle" href="#" id="Request-toggle" onclick="return toggle('Request');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.globals.Request-class.html">Request</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Request-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Request-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring">    defines the request object and the default values of its members</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">    - env: environment variables, by gluon.main.wsgibase()</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">    - cookies</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">    - get_vars</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">    - post_vars</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">    - vars</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"><tt class="py-docstring">    - folder</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-docstring">    - application</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">    - function</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">    - args</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">    - extension</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring">    - now: datetime.datetime.today()</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">    - restful()</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="Request.__init__"></a><div id="Request.__init__-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="Request.__init__-toggle" onclick="return toggle('Request.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Request-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Request.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Request.__init__-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wsgi</tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-32', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># hooks to environ and start_response</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-33', 'env', 'link-33');">env</a></tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-34', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt> <tt class="py-op">=</tt> <tt class="py-name">Cookie</tt><tt class="py-op">.</tt><tt class="py-name">SimpleCookie</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-35', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt> <tt class="py-op">=</tt> <tt id="link-36" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-36', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt id="link-37" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-37', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-38', 'List', 'link-2');">List</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-39', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-40', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_https</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_local</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"> </tt>
<a name="Request.compute_uuid"></a><div id="Request.compute_uuid-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="Request.compute_uuid-toggle" onclick="return toggle('Request.compute_uuid');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Request-class.html#compute_uuid">compute_uuid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Request.compute_uuid-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Request.compute_uuid-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uuid</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s.%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">client</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%Y-%m-%d.%H-%M-%S'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">            <tt id="link-41" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-41', 'web2py_uuid', 'link-25');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uuid</tt> </tt>
</div><a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="Request.user_agent"></a><div id="Request.user_agent-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="Request.user_agent-toggle" onclick="return toggle('Request.user_agent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Request-class.html#user_agent">user_agent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Request.user_agent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Request.user_agent-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-42" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-42', 'gluon', 'link-42');">gluon</a></tt><tt class="py-op">.</tt><tt class="py-name">contrib</tt> <tt class="py-keyword">import</tt> <tt class="py-name">user_agent_parser</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-43', 'current', 'link-31');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_user_agent</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_user_agent</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt class="py-name">user_agent_parser</tt><tt class="py-op">.</tt><tt class="py-name">detect</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-44', 'env', 'link-33');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_user_agent</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_user_agent</tt> </tt>
</div><a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"> </tt>
<a name="Request.restful"></a><div id="Request.restful-def"><a name="L98"></a><tt class="py-lineno"> 98</tt> <a class="py-toggle" href="#" id="Request.restful-toggle" onclick="return toggle('Request.restful');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Request-class.html#restful">restful</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Request.restful-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Request.restful-expanded"><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">wrapper</tt><tt class="py-op">(</tt><tt class="py-param">action</tt><tt class="py-op">,</tt><tt class="py-param">self</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-param">_action</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">,</tt><tt class="py-param">_self</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">                <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-45', 'env', 'link-33');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">request_method</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-46" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-46', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                    <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">rsplit</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt><tt class="py-string">'POST'</tt><tt class="py-op">,</tt><tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt><tt class="py-string">'PUT'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-47', 'HTTP', 'link-17');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt><tt class="py-string">"invalid method"</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                <tt class="py-name">rest_action</tt> <tt class="py-op">=</tt> <tt class="py-name">_action</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-48', 'get', 'link-48');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">rest_action</tt><tt class="py-op">:</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-49', 'HTTP', 'link-17');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt><tt class="py-string">"method not supported"</tt><tt class="py-op">)</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">rest_action</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                    <tt class="py-name">exc_type</tt><tt class="py-op">,</tt> <tt class="py-name">exc_value</tt><tt class="py-op">,</tt> <tt class="py-name">exc_traceback</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-50" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-50', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">extract_tb</tt><tt class="py-op">(</tt><tt class="py-name">exc_traceback</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-51" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-51', 'HTTP', 'link-17');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt><tt class="py-string">"invalid arguments"</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt class="py-name">e</tt> </tt>
</div><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">wrapper</tt> </tt>
</div></div><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"> </tt>
<a name="Response"></a><div id="Response-def"><a name="L124"></a><tt class="py-lineno">124</tt> <a class="py-toggle" href="#" id="Response-toggle" onclick="return toggle('Response');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html">Response</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Response-expanded"><a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">    defines the response object and the default values of its members</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">    response.write(   ) can be used to write in the output html</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"> </tt>
<a name="Response.__init__"></a><div id="Response.__init__-def"><a name="L131"></a><tt class="py-lineno">131</tt> <a class="py-toggle" href="#" id="Response.__init__-toggle" onclick="return toggle('Response.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.__init__-expanded"><a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-number">200</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt id="link-52" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-52', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'X-Powered-By'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py'</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt> <tt class="py-op">=</tt> <tt class="py-name">Cookie</tt><tt class="py-op">.</tt><tt class="py-name">SimpleCookie</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">postprocessing</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt>            <tt class="py-comment"># used by the default view layout</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meta</tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-53', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>      <tt class="py-comment"># used by web2py_ajax.html</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt>             <tt class="py-comment"># used by the default view layout</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name" targets="Variable web2py.gluon.import_all.files=web2py.gluon.import_all-module.html#files"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-54', 'files', 'link-54');">files</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt>            <tt class="py-comment"># used by web2py_ajax.html</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">generic_patterns</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># patterns to allow generic views</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_caller</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> <tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_custom_commit</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_custom_rollback</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"> </tt>
<a name="Response.write"></a><div id="Response.write-def"><a name="L150"></a><tt class="py-lineno">150</tt> <a class="py-toggle" href="#" id="Response.write-toggle" onclick="return toggle('Response.write');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">escape</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.write-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.write-expanded"><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">escape</tt><tt class="py-op">:</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-55', 'write', 'link-55');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-56', 'write', 'link-55');">write</a></tt><tt class="py-op">(</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.html.xmlescape" class="py-name" href="#" onclick="return doclink('link-57', 'xmlescape', 'link-12');">xmlescape</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"> </tt>
<a name="Response.render"></a><div id="Response.render-def"><a name="L156"></a><tt class="py-lineno">156</tt> <a class="py-toggle" href="#" id="Response.render-toggle" onclick="return toggle('Response.render');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#render">render</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.render-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.render-expanded"><a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-58" class="py-name" targets="Module web2py.gluon.compileapp=web2py.gluon.compileapp-module.html"><a title="web2py.gluon.compileapp" class="py-name" href="#" onclick="return doclink('link-58', 'compileapp', 'link-58');">compileapp</a></tt> <tt class="py-keyword">import</tt> <tt id="link-59" class="py-name" targets="Function web2py.gluon.compileapp.run_view_in()=web2py.gluon.compileapp-module.html#run_view_in"><a title="web2py.gluon.compileapp.run_view_in" class="py-name" href="#" onclick="return doclink('link-59', 'run_view_in', 'link-59');">run_view_in</a></tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-60" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-60', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'Response.render can be called with two arguments, at most'</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-61" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-61', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-62', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-63" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-63', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'read'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-64', 'read', 'link-64');">read</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-65" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-65', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">view</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-66', 'update', 'link-66');">update</a></tt><tt class="py-op">(</tt><tt id="link-67" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-67', 'b', 'link-67');">b</a></tt><tt class="py-op">)</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-68', 'update', 'link-66');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">view</tt><tt class="py-op">:</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">obody</tt><tt class="py-op">,</tt> <tt class="py-name">oview</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">)</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">view</tt><tt class="py-op">)</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">            <tt id="link-69" class="py-name"><a title="web2py.gluon.compileapp.run_view_in" class="py-name" href="#" onclick="return doclink('link-69', 'run_view_in', 'link-59');">run_view_in</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">)</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">            <tt class="py-name">page</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-70', 'close', 'link-70');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">view</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">obody</tt><tt class="py-op">,</tt> <tt class="py-name">oview</tt><tt class="py-op">)</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">            <tt id="link-71" class="py-name"><a title="web2py.gluon.compileapp.run_view_in" class="py-name" href="#" onclick="return doclink('link-71', 'run_view_in', 'link-59');">run_view_in</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">            <tt class="py-name">page</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">page</tt> </tt>
</div><a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"> </tt>
<a name="Response.stream"></a><div id="Response.stream-def"><a name="L185"></a><tt class="py-lineno">185</tt> <a class="py-toggle" href="#" id="Response.stream-toggle" onclick="return toggle('Response.stream');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#stream">stream</a><tt class="py-op">(</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">        <tt class="py-param">stream</tt><tt class="py-op">,</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-param">chunk_size</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.streamer.DEFAULT_CHUNK_SIZE" class="py-name" href="#" onclick="return doclink('link-72', 'DEFAULT_CHUNK_SIZE', 'link-6');">DEFAULT_CHUNK_SIZE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-param">request</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.stream-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.stream-expanded"><a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"><tt class="py-docstring">        if a controller function::</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring">            return response.stream(file, 100)</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring">        the file content will be streamed at 100 bytes at the time</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-73" class="py-name" targets="Method web2py.gluon.globals.Response.stream()=web2py.gluon.globals.Response-class.html#stream"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-73', 'stream', 'link-73');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">            <tt id="link-74" class="py-name"><a title="web2py.gluon.streamer.stream_file_or_304_or_206" class="py-name" href="#" onclick="return doclink('link-74', 'stream_file_or_304_or_206', 'link-5');">stream_file_or_304_or_206</a></tt><tt class="py-op">(</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-75', 'stream', 'link-73');">stream</a></tt><tt class="py-op">,</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">                                      <tt class="py-name">chunk_size</tt><tt class="py-op">=</tt><tt class="py-name">chunk_size</tt><tt class="py-op">,</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">                                      <tt class="py-name">request</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">                                      <tt class="py-name">headers</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-comment"># ## the following is for backward compatibility</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-76', 'stream', 'link-73');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-string">'name'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt id="link-77" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-77', 'stream', 'link-73');">stream</a></tt><tt class="py-op">.</tt><tt id="link-78" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-78', 'name', 'link-78');">name</a></tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt id="link-79" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-79', 'keys', 'link-79');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-80', 'lower', 'link-80');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">]</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'content-type'</tt> <tt class="py-keyword">in</tt> <tt id="link-81" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-81', 'keys', 'link-79');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-82" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-82', 'contenttype', 'link-9');">contenttype</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'content-length'</tt> <tt class="py-keyword">in</tt> <tt id="link-83" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-83', 'keys', 'link-79');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                    <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">getsize</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">OSError</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-84', 'env', 'link-33');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_use_wsgi_file_wrapper</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">            <tt class="py-name">wrapped</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-85', 'env', 'link-33');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">wsgi_file_wrapper</tt><tt class="py-op">(</tt><tt id="link-86" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-86', 'stream', 'link-73');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">            <tt class="py-name">wrapped</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="web2py.gluon.streamer
web2py.gluon.streamer.streamer" class="py-name" href="#" onclick="return doclink('link-87', 'streamer', 'link-3');">streamer</a></tt><tt class="py-op">(</tt><tt id="link-88" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-88', 'stream', 'link-73');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">=</tt><tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">wrapped</tt> </tt>
</div><a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"> </tt>
<a name="Response.download"></a><div id="Response.download-def"><a name="L226"></a><tt class="py-lineno">226</tt> <a class="py-toggle" href="#" id="Response.download-toggle" onclick="return toggle('Response.download');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#download">download</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">db</tt><tt class="py-op">,</tt> <tt class="py-param">chunk_size</tt> <tt class="py-op">=</tt> <tt id="link-89" class="py-name"><a title="web2py.gluon.streamer.DEFAULT_CHUNK_SIZE" class="py-name" href="#" onclick="return doclink('link-89', 'DEFAULT_CHUNK_SIZE', 'link-6');">DEFAULT_CHUNK_SIZE</a></tt><tt class="py-op">,</tt> <tt class="py-param">attachment</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.download-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.download-expanded"><a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line"><tt class="py-docstring">        example of usage in controller::</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"><tt class="py-docstring">            def download():</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"><tt class="py-docstring">                return response.download(request, db)</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line"><tt class="py-docstring">        downloads from http://..../download/filename</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-90', 'contenttype', 'link-9');">contenttype</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">c</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-91" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-91', 'HTTP', 'link-17');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">        <tt id="link-92" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-92', 'name', 'link-78');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">        <tt id="link-93" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-93', 'items', 'link-93');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'(?P&lt;table&gt;.*?)\.(?P&lt;field&gt;.*?)\..*'</tt><tt class="py-op">)</tt>\ </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">                           <tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt id="link-94" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-94', 'name', 'link-78');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-95', 'items', 'link-93');">items</a></tt><tt class="py-op">:</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-96" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-96', 'HTTP', 'link-17');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-97', 'items', 'link-93');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'table'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-98" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-98', 'items', 'link-93');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'field'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">        <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">t</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">]</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt id="link-99" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-99', 'stream', 'link-73');">stream</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name" targets="Method web2py.gluon.dal.Field.retrieve()=web2py.gluon.dal.Field-class.html#retrieve"><a title="web2py.gluon.dal.Field.retrieve" class="py-name" href="#" onclick="return doclink('link-100', 'retrieve', 'link-100');">retrieve</a></tt><tt class="py-op">(</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-101', 'name', 'link-78');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-102" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-102', 'HTTP', 'link-17');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-103', 'contenttype', 'link-9');">contenttype</a></tt><tt class="py-op">(</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-104', 'name', 'link-78');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">attachment</tt><tt class="py-op">:</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Disposition'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">                <tt class="py-string">"attachment; filename=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">filename</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-105', 'stream', 'link-73');">stream</a></tt><tt class="py-op">(</tt><tt id="link-106" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-106', 'stream', 'link-73');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
</div><a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"> </tt>
<a name="Response.json"></a><div id="Response.json-def"><a name="L256"></a><tt class="py-lineno">256</tt> <a class="py-toggle" href="#" id="Response.json-toggle" onclick="return toggle('Response.json');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#json">json</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.json-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.json-expanded"><a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-107" class="py-name"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-107', 'json', 'link-21');">json</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">default</tt> <tt class="py-keyword">or</tt> <tt id="link-108" class="py-name"><a title="web2py.gluon.serializers.custom_json" class="py-name" href="#" onclick="return doclink('link-108', 'custom_json', 'link-22');">custom_json</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line"> </tt>
<a name="Response.xmlrpc"></a><div id="Response.xmlrpc-def"><a name="L259"></a><tt class="py-lineno">259</tt> <a class="py-toggle" href="#" id="Response.xmlrpc-toggle" onclick="return toggle('Response.xmlrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#xmlrpc">xmlrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">methods</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.xmlrpc-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.xmlrpc-expanded"><a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"><tt class="py-docstring">        assuming::</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line"><tt class="py-docstring">            def add(a, b):</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-docstring">                return a+b</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line"><tt class="py-docstring">        if a controller function \"func\"::</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line"><tt class="py-docstring">            return response.xmlrpc(request, [add])</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line"><tt class="py-docstring">        the controller will be able to handle xmlrpc requests for</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line"><tt class="py-docstring">        the add function. Example::</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"><tt class="py-docstring">            import xmlrpclib</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"><tt class="py-docstring">            connection = xmlrpclib.ServerProxy('http://hostname/app/contr/func')</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line"><tt class="py-docstring">            print connection.add(3, 4)</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line"> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-109" class="py-name"><a title="web2py.gluon.xmlrpc.handler" class="py-name" href="#" onclick="return doclink('link-109', 'handler', 'link-8');">handler</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">methods</tt><tt class="py-op">)</tt> </tt>
</div><a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"> </tt>
<a name="Response.toolbar"></a><div id="Response.toolbar-def"><a name="L281"></a><tt class="py-lineno">281</tt> <a class="py-toggle" href="#" id="Response.toolbar-toggle" onclick="return toggle('Response.toolbar');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Response-class.html#toolbar">toolbar</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Response.toolbar-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Response.toolbar-expanded"><a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-110', 'html', 'link-11');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-111" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.DIV()=web2py.gluon.dal.BaseAdapter-class.html#DIV,Method web2py.gluon.dal.NoSQLAdapter.DIV()=web2py.gluon.dal.NoSQLAdapter-class.html#DIV,Class web2py.gluon.html.DIV=web2py.gluon.html.DIV-class.html"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-111', 'DIV', 'link-111');">DIV</a></tt><tt class="py-op">,</tt> <tt id="link-112" class="py-name" targets="Class web2py.gluon.html.SCRIPT=web2py.gluon.html.SCRIPT-class.html"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-112', 'SCRIPT', 'link-112');">SCRIPT</a></tt><tt class="py-op">,</tt> <tt id="link-113" class="py-name" targets="Class web2py.gluon.html.BEAUTIFY=web2py.gluon.html.BEAUTIFY-class.html"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-113', 'BEAUTIFY', 'link-113');">BEAUTIFY</a></tt><tt class="py-op">,</tt> <tt id="link-114" class="py-name" targets="Variable web2py.gluon.TAG=web2py.gluon-module.html#TAG,Variable web2py.gluon.html.TAG=web2py.gluon.html-module.html#TAG,Variable web2py.gluon.tools.TAG=web2py.gluon.tools-module.html#TAG"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-114', 'TAG', 'link-114');">TAG</a></tt><tt class="py-op">,</tt> <tt id="link-115" class="py-name" targets="Function web2py.gluon.html.URL()=web2py.gluon.html-module.html#URL"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-115', 'URL', 'link-115');">URL</a></tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt id="link-116" class="py-name" targets="Class web2py.gluon.html.BUTTON=web2py.gluon.html.BUTTON-class.html"><a title="web2py.gluon.html.BUTTON" class="py-name" href="#" onclick="return doclink('link-116', 'BUTTON', 'link-116');">BUTTON</a></tt> <tt class="py-op">=</tt> <tt id="link-117" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-117', 'TAG', 'link-114');">TAG</a></tt><tt class="py-op">.</tt><tt class="py-name">button</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt id="link-118" class="py-name" targets="Module web2py.gluon.admin=web2py.gluon.admin-module.html"><a title="web2py.gluon.admin" class="py-name" href="#" onclick="return doclink('link-118', 'admin', 'link-118');">admin</a></tt> <tt class="py-op">=</tt> <tt id="link-119" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-119', 'URL', 'link-115');">URL</a></tt><tt class="py-op">(</tt><tt class="py-string">"admin"</tt><tt class="py-op">,</tt><tt class="py-string">"default"</tt><tt class="py-op">,</tt><tt class="py-string">"design"</tt><tt class="py-op">,</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">                    <tt class="py-name">args</tt><tt class="py-op">=</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-120', 'current', 'link-31');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-121" class="py-name"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-121', 'gluon', 'link-42');">gluon</a></tt><tt class="py-op">.</tt><tt id="link-122" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-122', 'dal', 'link-122');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-123" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-123', 'thread', 'link-123');">thread</a></tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">        <tt class="py-name">dbstats</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-124', 'TABLE', 'link-13');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-125" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-125', 'TR', 'link-14');">TR</a></tt><tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.html.PRE" class="py-name" href="#" onclick="return doclink('link-126', 'PRE', 'link-15');">PRE</a></tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">'%.2fms'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">*</tt><tt class="py-number">1000</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">                               <tt class="py-keyword">for</tt> <tt class="py-name">row</tt> <tt class="py-keyword">in</tt> <tt class="py-name">i</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt class="py-name">_timings</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> \ </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">                       <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt id="link-127" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-127', 'thread', 'link-123');">thread</a></tt><tt class="py-op">.</tt><tt id="link-128" class="py-name" targets="Variable web2py.gluon.tools.PluginManager.instances=web2py.gluon.tools.PluginManager-class.html#instances"><a title="web2py.gluon.tools.PluginManager.instances" class="py-name" href="#" onclick="return doclink('link-128', 'instances', 'link-128');">instances</a></tt><tt class="py-op">]</tt>         </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">        <tt id="link-129" class="py-name" targets="Function web2py.gluon.rocket.u()=web2py.gluon.rocket-module.html#u"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-129', 'u', 'link-129');">u</a></tt> <tt class="py-op">=</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-130', 'web2py_uuid', 'link-25');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-131', 'DIV', 'link-111');">DIV</a></tt><tt class="py-op">(</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">            <tt id="link-132" class="py-name"><a title="web2py.gluon.html.BUTTON" class="py-name" href="#" onclick="return doclink('link-132', 'BUTTON', 'link-116');">BUTTON</a></tt><tt class="py-op">(</tt><tt class="py-string">'design'</tt><tt class="py-op">,</tt><tt class="py-name">_onclick</tt><tt class="py-op">=</tt><tt class="py-string">"document.location='%s'"</tt> <tt class="py-op">%</tt> <tt id="link-133" class="py-name"><a title="web2py.gluon.admin" class="py-name" href="#" onclick="return doclink('link-133', 'admin', 'link-118');">admin</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">            <tt id="link-134" class="py-name"><a title="web2py.gluon.html.BUTTON" class="py-name" href="#" onclick="return doclink('link-134', 'BUTTON', 'link-116');">BUTTON</a></tt><tt class="py-op">(</tt><tt class="py-string">'request'</tt><tt class="py-op">,</tt><tt class="py-name">_onclick</tt><tt class="py-op">=</tt><tt class="py-string">"jQuery('#request-%s').slideToggle()"</tt><tt class="py-op">%</tt><tt id="link-135" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-135', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">            <tt id="link-136" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-136', 'DIV', 'link-111');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-137', 'BEAUTIFY', 'link-113');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt id="link-138" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-138', 'current', 'link-31');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">"hidden"</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">"request-%s"</tt><tt class="py-op">%</tt><tt id="link-139" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-139', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">            <tt id="link-140" class="py-name"><a title="web2py.gluon.html.BUTTON" class="py-name" href="#" onclick="return doclink('link-140', 'BUTTON', 'link-116');">BUTTON</a></tt><tt class="py-op">(</tt><tt class="py-string">'session'</tt><tt class="py-op">,</tt><tt class="py-name">_onclick</tt><tt class="py-op">=</tt><tt class="py-string">"jQuery('#session-%s').slideToggle()"</tt><tt class="py-op">%</tt><tt id="link-141" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-141', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">            <tt id="link-142" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-142', 'DIV', 'link-111');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-143', 'BEAUTIFY', 'link-113');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-144', 'current', 'link-31');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">"hidden"</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">"session-%s"</tt><tt class="py-op">%</tt><tt id="link-145" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-145', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">            <tt id="link-146" class="py-name"><a title="web2py.gluon.html.BUTTON" class="py-name" href="#" onclick="return doclink('link-146', 'BUTTON', 'link-116');">BUTTON</a></tt><tt class="py-op">(</tt><tt class="py-string">'response'</tt><tt class="py-op">,</tt><tt class="py-name">_onclick</tt><tt class="py-op">=</tt><tt class="py-string">"jQuery('#response-%s').slideToggle()"</tt><tt class="py-op">%</tt><tt id="link-147" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-147', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">            <tt id="link-148" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-148', 'DIV', 'link-111');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-149" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-149', 'BEAUTIFY', 'link-113');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt id="link-150" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-150', 'current', 'link-31');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">"hidden"</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">"response-%s"</tt><tt class="py-op">%</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-151', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">            <tt id="link-152" class="py-name"><a title="web2py.gluon.html.BUTTON" class="py-name" href="#" onclick="return doclink('link-152', 'BUTTON', 'link-116');">BUTTON</a></tt><tt class="py-op">(</tt><tt class="py-string">'db stats'</tt><tt class="py-op">,</tt><tt class="py-name">_onclick</tt><tt class="py-op">=</tt><tt class="py-string">"jQuery('#db-stats-%s').slideToggle()"</tt><tt class="py-op">%</tt><tt id="link-153" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-153', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">            <tt id="link-154" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-154', 'DIV', 'link-111');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-155', 'BEAUTIFY', 'link-113');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt class="py-name">dbstats</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">"hidden"</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">"db-stats-%s"</tt><tt class="py-op">%</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-156', 'u', 'link-129');">u</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">            <tt id="link-157" class="py-name"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-157', 'SCRIPT', 'link-112');">SCRIPT</a></tt><tt class="py-op">(</tt><tt class="py-string">"jQuery('.hidden').hide()"</tt><tt class="py-op">)</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
</div></div><a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line"> </tt>
<a name="Session"></a><div id="Session-def"><a name="L304"></a><tt class="py-lineno">304</tt> <a class="py-toggle" href="#" id="Session-toggle" onclick="return toggle('Session');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html">Session</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Session-expanded"><a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line"> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line"><tt class="py-docstring">    defines the session object and the default values of its members (None)</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"> </tt>
<a name="Session.connect"></a><div id="Session.connect-def"><a name="L310"></a><tt class="py-lineno">310</tt> <a class="py-toggle" href="#" id="Session.connect-toggle" onclick="return toggle('Session.connect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#connect">connect</a><tt class="py-op">(</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">        <tt class="py-param">request</tt><tt class="py-op">,</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">        <tt class="py-param">response</tt><tt class="py-op">,</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">        <tt class="py-param">db</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">        <tt class="py-param">tablename</tt><tt class="py-op">=</tt><tt class="py-string">'web2py_session'</tt><tt class="py-op">,</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">        <tt class="py-param">masterapp</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">        <tt class="py-param">migrate</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt class="py-param">separate</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt class="py-param">check_client</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session.connect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session.connect-expanded"><a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"><tt class="py-docstring">        separate can be separate=lambda(session_name): session_name[-2:]</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line"><tt class="py-docstring">        and it is used to determine a session prefix.</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line"><tt class="py-docstring">        separate can be True and it is set to session_name[-2:]</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">separate</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">            <tt class="py-name">separate</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">session_name</tt><tt class="py-op">:</tt> <tt class="py-name">session_name</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name" targets="Method web2py.gluon.globals.Session._unlock()=web2py.gluon.globals.Session-class.html#_unlock"><a title="web2py.gluon.globals.Session._unlock" class="py-name" href="#" onclick="return doclink('link-158', '_unlock', 'link-158');">_unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">masterapp</tt><tt class="py-op">:</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">            <tt class="py-name">masterapp</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'session_id_%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">masterapp</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-159', 'lower', 'link-80');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line"> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">db</tt><tt class="py-op">:</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-160" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-160', 'global_settings', 'link-27');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt> <tt class="py-keyword">or</tt> <tt class="py-name">masterapp</tt> <tt class="py-keyword">in</tt> <tt id="link-161" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-161', 'global_settings', 'link-27');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt><tt class="py-op">:</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_new</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">            <tt class="py-name">client</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">client</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt> <tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">:</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">                    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-162" class="py-name"><a title="web2py.gluon.globals.regex_session_id" class="py-name" href="#" onclick="return doclink('link-162', 'regex_session_id', 'link-30');">regex_session_id</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_filename</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">                        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-163', 'join', 'link-163');">join</a></tt><tt class="py-op">(</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-164', 'up', 'link-19');">up</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">masterapp</tt><tt class="py-op">,</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">                            <tt class="py-string">'sessions'</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">)</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">:</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">                        <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb+'</tt><tt class="py-op">)</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">                    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">                        <tt id="link-165" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-165', 'portalocker', 'link-28');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-166" class="py-name" targets="Function web2py.gluon.portalocker.lock()=web2py.gluon.portalocker-module.html#lock"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-166', 'lock', 'link-166');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">,</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">                                <tt id="link-167" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-167', 'portalocker', 'link-28');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-168" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_EX=web2py.gluon.portalocker-module.html#LOCK_EX"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-168', 'LOCK_EX', 'link-168');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_locked</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-169', 'update', 'link-66');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-170', 'load', 'link-170');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">                        <tt class="py-name">oc</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_filename</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">check_client</tt> <tt class="py-keyword">and</tt> <tt class="py-name">client</tt><tt class="py-op">!=</tt><tt class="py-name">oc</tt><tt class="py-op">:</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">                            <tt class="py-keyword">raise</tt> <tt id="link-171" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-171', 'Exception', 'link-171');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-string">"cookie attack"</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">                    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">                        <tt class="py-keyword">pass</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">                        <tt class="py-comment">#This causes admin login to break. Must find out why.</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment">#self._close(response)</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">:</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">                <tt class="py-name">uuid</tt> <tt class="py-op">=</tt> <tt id="link-172" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-172', 'web2py_uuid', 'link-25');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s-%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">client</tt><tt class="py-op">,</tt> <tt class="py-name">uuid</tt><tt class="py-op">)</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">separate</tt><tt class="py-op">:</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">                    <tt class="py-name">prefix</tt> <tt class="py-op">=</tt> <tt class="py-name">separate</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">)</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">)</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_filename</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">                    <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-173', 'join', 'link-163');">join</a></tt><tt class="py-op">(</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-174', 'up', 'link-19');">up</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">masterapp</tt><tt class="py-op">,</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">                                 <tt class="py-string">'sessions'</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt><tt class="py-op">)</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_new</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-175" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-175', 'global_settings', 'link-27');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">                <tt id="link-176" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-176', 'global_settings', 'link-27');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">masterapp</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_db</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">:</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-177" class="py-name" targets="Method web2py.gluon.globals.Session._close()=web2py.gluon.globals.Session-class.html#_close"><a title="web2py.gluon.globals.Session._close" class="py-name" href="#" onclick="return doclink('link-177', '_close', 'link-177');">_close</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-178" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-178', 'settings', 'link-23');">settings</a></tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-179', 'global_settings', 'link-27');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">                <tt class="py-comment"># in principle this could work without GAE</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">tickets_db</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">masterapp</tt> <tt class="py-op">==</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">:</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">                <tt class="py-name">table_migrate</tt> <tt class="py-op">=</tt> <tt class="py-name">migrate</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">                <tt class="py-name">table_migrate</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">            <tt class="py-name">tname</tt> <tt class="py-op">=</tt> <tt class="py-name">tablename</tt> <tt class="py-op">+</tt> <tt class="py-string">'_'</tt> <tt class="py-op">+</tt> <tt class="py-name">masterapp</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-180', 'get', 'link-48');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">tname</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">table</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">                <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name" targets="Method web2py.gluon.dal.DAL.define_table()=web2py.gluon.dal.DAL-class.html#define_table"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-181', 'define_table', 'link-181');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">                    <tt class="py-name">tname</tt><tt class="py-op">,</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line">                    <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name" targets="Class web2py.gluon.dal.Field=web2py.gluon.dal.Field-class.html"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-182', 'Field', 'link-182');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'locked'</tt><tt class="py-op">,</tt> <tt class="py-string">'boolean'</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">                    <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-183" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-183', 'Field', 'link-182');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'client_ip'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">64</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line">                    <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-184', 'Field', 'link-182');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_datetime'</tt><tt class="py-op">,</tt> <tt class="py-string">'datetime'</tt><tt class="py-op">,</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">                             <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">                    <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-185', 'Field', 'link-182');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'modified_datetime'</tt><tt class="py-op">,</tt> <tt class="py-string">'datetime'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">                    <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-186" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-186', 'Field', 'link-182');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'unique_key'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">64</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">                    <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-187', 'Field', 'link-182');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'session_data'</tt><tt class="py-op">,</tt> <tt class="py-string">'blob'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">                    <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">table_migrate</tt><tt class="py-op">,</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">                    <tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">                <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">unique_key</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt> <tt class="py-op">==</tt> <tt class="py-string">'0'</tt><tt class="py-op">:</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-188" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-188', 'Exception', 'link-171');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-string">'record_id == 0'</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">                <tt id="link-189" class="py-name" targets="Method web2py.gluon.tools.Crud.rows()=web2py.gluon.tools.Crud-class.html#rows"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-189', 'rows', 'link-189');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">==</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.select()=web2py.gluon.dal.BaseAdapter-class.html#select,Method web2py.gluon.dal.CouchDBAdapter.select()=web2py.gluon.dal.CouchDBAdapter-class.html#select,Method web2py.gluon.dal.GoogleDatastoreAdapter.select()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select,Method web2py.gluon.dal.MongoDBAdapter.select()=web2py.gluon.dal.MongoDBAdapter-class.html#select,Method web2py.gluon.dal.Set.select()=web2py.gluon.dal.Set-class.html#select,Method web2py.gluon.tools.Crud.select()=web2py.gluon.tools.Crud-class.html#select"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-190', 'select', 'link-190');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-191" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-191', 'len', 'link-46');">len</a></tt><tt class="py-op">(</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-192', 'rows', 'link-189');">rows</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> <tt class="py-keyword">or</tt> <tt id="link-193" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-193', 'rows', 'link-189');">rows</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">unique_key</tt> <tt class="py-op">!=</tt> <tt class="py-name">unique_key</tt><tt class="py-op">:</tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-194" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-194', 'Exception', 'link-171');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-string">'No record'</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line"> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">                 <tt class="py-comment"># rows[0].update_record(locked=True)</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">                <tt class="py-name">session_data</tt> <tt class="py-op">=</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-195', 'rows', 'link-189');">rows</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">session_data</tt><tt class="py-op">)</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-196', 'update', 'link-66');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">session_data</tt><tt class="py-op">)</tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-197" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-197', 'Exception', 'link-171');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">                <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">                <tt class="py-name">unique_key</tt> <tt class="py-op">=</tt> <tt id="link-198" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-198', 'web2py_uuid', 'link-25');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">                <tt class="py-name">session_data</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_dbtable_and_field</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">unique_key</tt><tt class="py-op">)</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">unique_key</tt><tt class="py-op">)</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'path'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__hash</tt> <tt class="py-op">=</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">md5</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">digest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt><tt class="py-op">:</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line"> </tt>
<a name="Session.is_new"></a><div id="Session.is_new-def"><a name="L429"></a><tt class="py-lineno">429</tt> <a class="py-toggle" href="#" id="Session.is_new-toggle" onclick="return toggle('Session.is_new');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#is_new">is_new</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session.is_new-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session.is_new-expanded"><a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_start_timestamp</tt><tt class="py-op">:</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_start_timestamp</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-199', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-200', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">today</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line"> </tt>
<a name="Session.is_expired"></a><div id="Session.is_expired-def"><a name="L436"></a><tt class="py-lineno">436</tt> <a class="py-toggle" href="#" id="Session.is_expired-toggle" onclick="return toggle('Session.is_expired');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#is_expired">is_expired</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">seconds</tt> <tt class="py-op">=</tt> <tt class="py-number">3600</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session.is_expired-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session.is_expired-expanded"><a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">        <tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt id="link-201" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-201', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-202" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-202', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">today</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_timestamp</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_timestamp</tt> <tt class="py-op">+</tt> <tt id="link-203" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-203', 'datetime', 'link-29');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt><tt id="link-204" class="py-name" targets="Method web2py.gluon.dal.Expression.seconds()=web2py.gluon.dal.Expression-class.html#seconds"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-204', 'seconds', 'link-204');">seconds</a></tt> <tt class="py-op">=</tt> <tt id="link-205" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-205', 'seconds', 'link-204');">seconds</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">now</tt><tt class="py-op">:</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_timestamp</tt> <tt class="py-op">=</tt> <tt class="py-name">now</tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"> </tt>
<a name="Session.secure"></a><div id="Session.secure-def"><a name="L445"></a><tt class="py-lineno">445</tt> <a class="py-toggle" href="#" id="Session.secure-toggle" onclick="return toggle('Session.secure');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#secure">secure</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session.secure-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session.secure-expanded"><a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_secure</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line"> </tt>
<a name="Session.forget"></a><div id="Session.forget-def"><a name="L448"></a><tt class="py-lineno">448</tt> <a class="py-toggle" href="#" id="Session.forget-toggle" onclick="return toggle('Session.forget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#forget">forget</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session.forget-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session.forget-expanded"><a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-206" class="py-name"><a title="web2py.gluon.globals.Session._close" class="py-name" href="#" onclick="return doclink('link-206', '_close', 'link-177');">_close</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_forget</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line"> </tt>
<a name="Session._try_store_in_db"></a><div id="Session._try_store_in_db-def"><a name="L452"></a><tt class="py-lineno">452</tt> <a class="py-toggle" href="#" id="Session._try_store_in_db-toggle" onclick="return toggle('Session._try_store_in_db');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#_try_store_in_db">_try_store_in_db</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session._try_store_in_db-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session._try_store_in_db-expanded"><a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">        <tt class="py-comment"># don't save if file-based sessions, no session id, or session being forgotten</tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_db</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_forget</tt><tt class="py-op">:</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">        <tt class="py-comment"># don't save if no change to session</tt> </tt>
<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">__hash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__hash</tt> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__hash</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__hash</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__hash</tt> <tt class="py-op">==</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">md5</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">digest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line"> </tt>
<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">record_id_name</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">unique_key</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_dbtable_and_field</tt> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line">        <tt class="py-name">dd</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">locked</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">client_ip</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-207', 'env', 'link-33');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt><tt class="py-op">,</tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line">                  <tt class="py-name">modified_datetime</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line">                  <tt class="py-name">session_data</tt><tt class="py-op">=</tt><tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line">                  <tt class="py-name">unique_key</tt><tt class="py-op">=</tt><tt class="py-name">unique_key</tt><tt class="py-op">)</tt> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt><tt class="py-op">:</tt> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">==</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-208" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-208', 'update', 'link-66');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">dd</tt><tt class="py-op">)</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">            <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-209', 'insert', 'link-209');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">dd</tt><tt class="py-op">)</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s:%s'</tt>\ </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">             <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">unique_key</tt><tt class="py-op">)</tt> </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'path'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt> </tt>
</div><a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line"> </tt>
<a name="Session._try_store_on_disk"></a><div id="Session._try_store_on_disk-def"><a name="L479"></a><tt class="py-lineno">479</tt> <a class="py-toggle" href="#" id="Session._try_store_on_disk-toggle" onclick="return toggle('Session._try_store_on_disk');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#_try_store_on_disk">_try_store_on_disk</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session._try_store_on_disk-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session._try_store_on_disk-expanded"><a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line"> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">        <tt class="py-comment"># don't save if sessions not not file-based</tt> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_db</tt><tt class="py-op">:</tt> </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line"> </tt>
<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">        <tt class="py-comment"># don't save if no change to session</tt> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">__hash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__hash</tt> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__hash</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__hash</tt> </tt>
<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__hash</tt> <tt class="py-op">==</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">md5</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">digest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-210" class="py-name"><a title="web2py.gluon.globals.Session._close" class="py-name" href="#" onclick="return doclink('link-210', '_close', 'link-177');">_close</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line"> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_forget</tt><tt class="py-op">:</tt> </tt>
<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-211" class="py-name"><a title="web2py.gluon.globals.Session._close" class="py-name" href="#" onclick="return doclink('link-211', '_close', 'link-177');">_close</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line"> </tt>
<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_new</tt><tt class="py-op">:</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line">            <tt class="py-comment"># Tests if the session sub-folder exists, if not, create it</tt> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">session_folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_filename</tt><tt class="py-op">)</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-212" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-212', 'exists', 'link-212');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">session_folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">                <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">session_folder</tt><tt class="py-op">)</tt> </tt>
<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_filename</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line">            <tt id="link-213" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-213', 'portalocker', 'link-28');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-214" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-214', 'lock', 'link-166');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">,</tt> <tt id="link-215" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-215', 'portalocker', 'link-28');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-216" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-216', 'LOCK_EX', 'link-168');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_locked</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line"> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">:</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">            <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dump</tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">)</tt> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">.</tt><tt id="link-217" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.truncate()=web2py.gluon.dal.BaseAdapter-class.html#truncate,Method web2py.gluon.dal.GoogleDatastoreAdapter.truncate()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#truncate,Method web2py.gluon.dal.Table.truncate()=web2py.gluon.dal.Table-class.html#truncate"><a title="web2py.gluon.dal.BaseAdapter.truncate
web2py.gluon.dal.GoogleDatastoreAdapter.truncate
web2py.gluon.dal.Table.truncate" class="py-name" href="#" onclick="return doclink('link-217', 'truncate', 'link-217');">truncate</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="web2py.gluon.globals.Session._close" class="py-name" href="#" onclick="return doclink('link-218', '_close', 'link-177');">_close</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
</div><a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line"> </tt>
<a name="Session._unlock"></a><div id="Session._unlock-def"><a name="L511"></a><tt class="py-lineno">511</tt> <a class="py-toggle" href="#" id="Session._unlock-toggle" onclick="return toggle('Session._unlock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#_unlock">_unlock</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session._unlock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session._unlock-expanded"><a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt> <tt class="py-keyword">and</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt> <tt class="py-keyword">and</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_locked</tt><tt class="py-op">:</tt> </tt>
<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line">                <tt id="link-219" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-219', 'portalocker', 'link-28');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-220" class="py-name" targets="Function web2py.gluon.portalocker.unlock()=web2py.gluon.portalocker-module.html#unlock"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-220', 'unlock', 'link-220');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">)</tt> </tt>
<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_locked</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> <tt class="py-comment">### this should never happen but happens in Windows</tt> </tt>
<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
</div><a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line"> </tt>
<a name="Session._close"></a><div id="Session._close-def"><a name="L519"></a><tt class="py-lineno">519</tt> <a class="py-toggle" href="#" id="Session._close-toggle" onclick="return toggle('Session._close');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.globals.Session-class.html#_close">_close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Session._close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Session._close-expanded"><a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt> <tt class="py-keyword">and</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">:</tt> </tt>
<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-221" class="py-name"><a title="web2py.gluon.globals.Session._unlock" class="py-name" href="#" onclick="return doclink('link-221', '_unlock', 'link-158');">_unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">.</tt><tt id="link-222" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-222', 'close', 'link-70');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">                <tt class="py-keyword">del</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt> </tt>
<a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.globals.Request-class.html version [1d61817dd0].






































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.globals.Request</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.globals-module.html">Module&nbsp;globals</a> ::
        Class&nbsp;Request
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.globals.Request-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Request</h1><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Request">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
 object --+        
          |        
       dict --+    
              |    
<a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a> --+
                  |
                 <strong class="uidshort">Request</strong>
</pre>

<hr />
<pre class="literalblock">

defines the request object and the default values of its members

- env: environment variables, by gluon.main.wsgibase()
- cookies
- get_vars
- post_vars
- vars
- folder
- application
- function
- args
- extension
- now: datetime.datetime.today()
- restful()

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.globals.Request-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Request.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compute_uuid"></a><span class="summary-sig-name">compute_uuid</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Request.compute_uuid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="user_agent"></a><span class="summary-sig-name">user_agent</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Request.user_agent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="restful"></a><span class="summary-sig-name">restful</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Request.restful">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Request.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new empty dictionary

</pre></dd>
    <dt>Overrides:
      dict.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.globals.Response-class.html version [5f39c060b7].


































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.globals.Response</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.globals-module.html">Module&nbsp;globals</a> ::
        Class&nbsp;Response
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.globals.Response-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Response</h1><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
 object --+        
          |        
       dict --+    
              |    
<a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a> --+
                  |
                 <strong class="uidshort">Response</strong>
</pre>

<hr />
defines the response object and the default values of its members 
  response.write(   ) can be used to write in the output html<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.globals.Response-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">escape</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="render"></a><span class="summary-sig-name">render</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.render">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.globals.Response-class.html#stream" class="summary-sig-name">stream</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stream</span>,
        <span class="summary-sig-arg">chunk_size</span>=<span class="summary-sig-default">65536</span>,
        <span class="summary-sig-arg">request</span>=<span class="summary-sig-default">1</span>)</span><br />
      if a controller function:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.stream">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.globals.Response-class.html#download" class="summary-sig-name">download</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">chunk_size</span>=<span class="summary-sig-default">65536</span>,
        <span class="summary-sig-arg">attachment</span>=<span class="summary-sig-default">True</span>)</span><br />
      example of usage in controller:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.download">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="json"></a><span class="summary-sig-name">json</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.globals.Response-class.html#xmlrpc" class="summary-sig-name">xmlrpc</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">methods</span>)</span><br />
      assuming:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.xmlrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="toolbar"></a><span class="summary-sig-name">toolbar</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.toolbar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new empty dictionary

</pre></dd>
    <dt>Overrides:
      dict.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="stream"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">stream</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">stream</span>,
        <span class="sig-arg">chunk_size</span>=<span class="sig-default">65536</span>,
        <span class="sig-arg">request</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.stream">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  if a controller function:
<pre class="literalblock">
   return response.stream(file, 100)
</pre>
  the file content will be streamed at 100 bytes at the time
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="download"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">download</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">db</span>,
        <span class="sig-arg">chunk_size</span>=<span class="sig-default">65536</span>,
        <span class="sig-arg">attachment</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.download">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example of usage in controller:
<pre class="literalblock">
   def download():
       return response.download(request, db)
</pre>
  downloads from http://..../download/filename
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="xmlrpc"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xmlrpc</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">methods</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Response.xmlrpc">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  assuming:
<pre class="literalblock">
   def add(a, b):
       return a+b
</pre>
  if a controller function &quot;func&quot;:
<pre class="literalblock">
   return response.xmlrpc(request, [add])
</pre>
  the controller will be able to handle xmlrpc requests for the add 
  function. Example:
<pre class="literalblock">
   import xmlrpclib
   connection = xmlrpclib.ServerProxy('http://hostname/app/contr/func')
   print connection.add(3, 4)
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.globals.Session-class.html version [2843b7267c].






















































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.globals.Session</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.globals-module.html">Module&nbsp;globals</a> ::
        Class&nbsp;Session
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.globals.Session-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Session</h1><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
 object --+        
          |        
       dict --+    
              |    
<a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a> --+
                  |
                 <strong class="uidshort">Session</strong>
</pre>

<hr />
defines the session object and the default values of its members 
  (None)<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.globals.Session-class.html#connect" class="summary-sig-name">connect</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>,
        <span class="summary-sig-arg">db</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">tablename</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">web2py_session</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">masterapp</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">separate</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">check_client</span>=<span class="summary-sig-default">True</span>)</span><br />
      separate can be separate=lambda(session_name): session_name[-2:] 
      and it is used to determine a session prefix.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session.connect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="is_new"></a><span class="summary-sig-name">is_new</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session.is_new">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="is_expired"></a><span class="summary-sig-name">is_expired</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">seconds</span>=<span class="summary-sig-default">3600</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session.is_expired">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="secure"></a><span class="summary-sig-name">secure</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session.secure">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="forget"></a><span class="summary-sig-name">forget</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">response</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session.forget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_try_store_in_db"></a><span class="summary-sig-name">_try_store_in_db</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session._try_store_in_db">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_try_store_on_disk"></a><span class="summary-sig-name">_try_store_on_disk</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session._try_store_on_disk">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_unlock"></a><span class="summary-sig-name">_unlock</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">response</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session._unlock">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_close"></a><span class="summary-sig-name">_close</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">response</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session._close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="connect"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">connect</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">response</span>,
        <span class="sig-arg">db</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">tablename</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">web2py_session</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">masterapp</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">separate</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">check_client</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.globals-pysrc.html#Session.connect">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  separate can be separate=lambda(session_name): session_name[-2:] and 
  it is used to determine a session prefix. separate can be True and it is 
  set to session_name[-2:]
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.highlight-module.html version [0c8acf3456].


























































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.highlight</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;highlight
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.highlight-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module highlight</h1><span class="codelink"><a href="web2py.gluon.highlight-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.highlight.Highlighter-class.html" class="summary-name">Highlighter</a><br />
      Do syntax highlighting.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="highlight"></a><span class="summary-sig-name">highlight</span>(<span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">language</span>,
        <span class="summary-sig-arg">link</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">/examples/globals/vars/</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">counter</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">styles</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">highlight_line</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">attributes</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#highlight">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.highlight-pysrc.html version [617e5de201].














































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.highlight</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;highlight
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.highlight-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.highlight-module.html">Module web2py.gluon.highlight</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cgi</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'highlight'</tt><tt class="py-op">]</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="Highlighter"></a><div id="Highlighter-def"><a name="L16"></a><tt class="py-lineno"> 16</tt> <a class="py-toggle" href="#" id="Highlighter-toggle" onclick="return toggle('Highlighter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html">Highlighter</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Highlighter-expanded"><a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">    Do syntax highlighting.</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="Highlighter.__init__"></a><div id="Highlighter.__init__-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="Highlighter.__init__-toggle" onclick="return toggle('Highlighter.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt class="py-param">mode</tt><tt class="py-op">,</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt class="py-param">link</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-param">styles</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Highlighter.__init__-expanded"><a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">        Initialise highlighter:</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">            mode = language (PYTHON, WEB2PY,C, CPP, HTML, HTML_PLAIN)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">        <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">mode</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method web2py.gluon.dal.Expression.upper()=web2py.gluon.dal.Expression-class.html#upper"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-0', 'upper', 'link-0');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">link</tt> <tt class="py-keyword">and</tt> <tt class="py-name">link</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'/'</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">            <tt class="py-name">link</tt> <tt class="py-op">=</tt> <tt class="py-name">link</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">link</tt> <tt class="py-op">=</tt> <tt class="py-name">link</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">styles</tt> <tt class="py-op">=</tt> <tt class="py-name">styles</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Method web2py.gluon.template.BlockNode.output()=web2py.gluon.template.BlockNode-class.html#output"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-1', 'output', 'link-1');">output</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">span_style</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'WEB2PY'</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'PYTHON'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'PYTHON'</tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'GOTOHTML'</tt><tt class="py-op">]</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'CPP'</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'C'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'C'</tt><tt class="py-op">:</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'CPPKEYWORD'</tt><tt class="py-op">]</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'HTML_PLAIN'</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'HTML'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">'GOTOPYTHON'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'HTML'</tt><tt class="py-op">:</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'Unknown mode: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">mode</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">mode</tt> </tt>
</div><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"> </tt>
<a name="Highlighter.c_tokenizer"></a><div id="Highlighter.c_tokenizer-def"><a name="L56"></a><tt class="py-lineno"> 56</tt> <a class="py-toggle" href="#" id="Highlighter.c_tokenizer-toggle" onclick="return toggle('Highlighter.c_tokenizer');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html#c_tokenizer">c_tokenizer</a><tt class="py-op">(</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-param">token</tt><tt class="py-op">,</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-param">match</tt><tt class="py-op">,</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-param">style</tt><tt class="py-op">,</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter.c_tokenizer-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Highlighter.c_tokenizer-expanded"><a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">        Callback for C specific highlighting.</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.highlight.Highlighter.change_style()=web2py.gluon.highlight.Highlighter-class.html#change_style"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-2', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">token</tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Method web2py.gluon.sqlhtml.SQLTABLE.style()=web2py.gluon.sqlhtml.SQLTABLE-class.html#style"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-3', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-4', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-5', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="Highlighter.python_tokenizer"></a><div id="Highlighter.python_tokenizer-def"><a name="L70"></a><tt class="py-lineno"> 70</tt> <a class="py-toggle" href="#" id="Highlighter.python_tokenizer-toggle" onclick="return toggle('Highlighter.python_tokenizer');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html#python_tokenizer">python_tokenizer</a><tt class="py-op">(</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt class="py-param">token</tt><tt class="py-op">,</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-param">match</tt><tt class="py-op">,</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-param">style</tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter.python_tokenizer-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Highlighter.python_tokenizer-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">        Callback for python specific highlighting.</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">token</tt> <tt class="py-op">==</tt> <tt class="py-string">'MULTILINESTRING'</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-6', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">token</tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-7', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-8', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-9', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strMultilineString</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">'PYTHONMultilineString'</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">token</tt> <tt class="py-op">==</tt> <tt class="py-string">'ENDMULTILINESTRING'</tt><tt class="py-op">:</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strMultilineString</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-10', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-11', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strMultilineString</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-string">'PYTHON'</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-12', 'style', 'link-3');">style</a></tt> <tt class="py-keyword">and</tt> <tt id="link-13" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-13', 'style', 'link-3');">style</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'link:'</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-14', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt id="link-15" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-15', 'url', 'link-15');">url</a></tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-16', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-17" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-17', 'style', 'link-3');">style</a></tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">';'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-18', 'url', 'link-15');">url</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'None'</tt> <tt class="py-keyword">or</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-19', 'url', 'link-15');">url</a></tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt><tt class="py-op">:</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-20', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-21', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;span style="%s"&gt;%s&lt;/span&gt;'</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                                    <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-22" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-22', 'style', 'link-3');">style</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-23', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-24', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;a href="%s%s" style="%s"&gt;%s&lt;/a&gt;'</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                                    <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-25" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-25', 'url', 'link-15');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-26', 'style', 'link-3');">style</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-27', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">token</tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-28', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-29', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-30', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">token</tt> <tt class="py-op">==</tt> <tt class="py-string">'GOTOHTML'</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">'HTML'</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"> </tt>
<a name="Highlighter.html_tokenizer"></a><div id="Highlighter.html_tokenizer-def"><a name="L107"></a><tt class="py-lineno">107</tt> <a class="py-toggle" href="#" id="Highlighter.html_tokenizer-toggle" onclick="return toggle('Highlighter.html_tokenizer');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html#html_tokenizer">html_tokenizer</a><tt class="py-op">(</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-param">token</tt><tt class="py-op">,</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">        <tt class="py-param">match</tt><tt class="py-op">,</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-param">style</tt><tt class="py-op">,</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter.html_tokenizer-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Highlighter.html_tokenizer-expanded"><a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring">        Callback for HTML specific highlighting.</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-31', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">token</tt><tt class="py-op">,</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-32', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-33', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-34', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">token</tt> <tt class="py-op">==</tt> <tt class="py-string">'GOTOPYTHON'</tt><tt class="py-op">:</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">'PYTHON'</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt id="link-35" class="py-name" targets="Variable web2py.gluon.highlight.Highlighter.all_styles=web2py.gluon.highlight.Highlighter-class.html#all_styles"><a title="web2py.gluon.highlight.Highlighter.all_styles" class="py-name" href="#" onclick="return doclink('link-35', 'all_styles', 'link-35');">all_styles</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-string">'C'</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt id="link-36" class="py-name" targets="Method web2py.gluon.highlight.Highlighter.c_tokenizer()=web2py.gluon.highlight.Highlighter-class.html#c_tokenizer"><a title="web2py.gluon.highlight.Highlighter.c_tokenizer" class="py-name" href="#" onclick="return doclink('link-36', 'c_tokenizer', 'link-36');">c_tokenizer</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'//.*\r?\n'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">             <tt class="py-string">'color: green; font-style: italic'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'MULTILINECOMMENT'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'/\*.*?\*/'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">             <tt class="py-string">'color: green; font-style: italic'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'PREPROCESSOR'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'\s*#.*?[^\\]\s*\n'</tt><tt class="py-op">,</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">             <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: magenta; font-style: italic'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'PUNC'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[-+*!&amp;|^~/%\=&lt;&gt;\[\]{}(),.:]'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">             <tt class="py-string">'font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">             <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'0x[0-9a-fA-F]+|[+-]?\d+(\.\d+)?([eE][+-]\d+)?|\d+'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">             <tt class="py-string">'color: red'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'KEYWORD'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(sizeof|int|long|short|char|void|'</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'signed|unsigned|float|double|'</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'goto|break|return|continue|asm|'</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'case|default|if|else|switch|while|for|do|'</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'struct|union|enum|typedef|'</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'static|register|auto|volatile|extern|const)(?![a-zA-Z0-9_])'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">             <tt class="py-string">'color:#185369; font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'CPPKEYWORD'</tt><tt class="py-op">,</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">             <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(class|private|protected|public|template|new|delete|'</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'this|friend|using|inline|export|bool|throw|try|catch|'</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'operator|typeid|virtual)(?![a-zA-Z0-9_])'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">             <tt class="py-string">'color: blue; font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'STRING'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'r?u?\'(.*?)(?&lt;!\\)\'|"(.*?)(?&lt;!\\)"'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">             <tt class="py-string">'color: #FF9966'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'IDENTIFIER'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[a-zA-Z_][a-zA-Z0-9_]*'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">             <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'WHITESPACE'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[   \r\n]+'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'Keep'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">            <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-string">'PYTHON'</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt id="link-37" class="py-name" targets="Method web2py.gluon.highlight.Highlighter.python_tokenizer()=web2py.gluon.highlight.Highlighter-class.html#python_tokenizer"><a title="web2py.gluon.highlight.Highlighter.python_tokenizer" class="py-name" href="#" onclick="return doclink('link-37', 'python_tokenizer', 'link-37');">python_tokenizer</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'GOTOHTML'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'\}\}'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: red'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'PUNC'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[-+*!|&amp;^~/%\=&lt;&gt;\[\]{}(),.:]'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">             <tt class="py-string">'font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">             <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'0x[0-9a-fA-F]+|[+-]?\d+(\.\d+)?([eE][+-]\d+)?|\d+'</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">             <tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: red'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'KEYWORD'</tt><tt class="py-op">,</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">             <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(def|class|break|continue|del|exec|finally|pass|'</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'print|raise|return|try|except|global|assert|lambda|'</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'yield|for|while|if|elif|else|and|in|is|not|or|import|'</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-string">r'from|True|False)(?![a-zA-Z0-9_])'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">             <tt class="py-string">'color:#185369; font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'WEB2PY'</tt><tt class="py-op">,</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">             <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(request|response|session|cache|redirect|local_import|HTTP|TR|XML|URL|BEAUTIFY|A|BODY|BR|B|CAT|CENTER|CODE|DIV|EM|EMBED|FIELDSET|LEGEND|FORM|H1|H2|H3|H4|H5|H6|IFRAME|HEAD|HR|HTML|I|IMG|INPUT|LABEL|LI|LINK|MARKMIN|MENU|META|OBJECT|OL|ON|OPTION|P|PRE|SCRIPT|SELECT|SPAN|STYLE|TABLE|THEAD|TBODY|TFOOT|TAG|TD|TEXTAREA|TH|TITLE|TT|T|UL|XHTML|IS_SLUG|IS_STRONG|IS_LOWER|IS_UPPER|IS_ALPHANUMERIC|IS_DATETIME|IS_DATETIME_IN_RANGE|IS_DATE|IS_DATE_IN_RANGE|IS_DECIMAL_IN_RANGE|IS_EMAIL|IS_EXPR|IS_FLOAT_IN_RANGE|IS_IMAGE|IS_INT_IN_RANGE|IS_IN_SET|IS_IPV4|IS_LIST_OF|IS_LENGTH|IS_MATCH|IS_EQUAL_TO|IS_EMPTY_OR|IS_NULL_OR|IS_NOT_EMPTY|IS_TIME|IS_UPLOAD_FILENAME|IS_URL|CLEANUP|CRYPT|IS_IN_DB|IS_NOT_IN_DB|DAL|Field|SQLFORM|SQLTABLE|xmlescape|embed64)(?![a-zA-Z0-9_])'</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">             <tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'link:%(link)s;text-decoration:None;color:#FF5C1F;'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'MAGIC'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'self|None'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">             <tt class="py-string">'color:#185369; font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'MULTILINESTRING'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'r?u?(\'\'\'|""")'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">             <tt class="py-string">'color: #FF9966'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'STRING'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'r?u?\'(.*?)(?&lt;!\\)\'|"(.*?)(?&lt;!\\)"'</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">             <tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: #FF9966'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'IDENTIFIER'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[a-zA-Z_][a-zA-Z0-9_]*'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">             <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'\#.*\r?\n'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">             <tt class="py-string">'color: green; font-style: italic'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'WHITESPACE'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[   \r\n]+'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'Keep'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">            <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-string">'PYTHONMultilineString'</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.highlight.Highlighter.python_tokenizer" class="py-name" href="#" onclick="return doclink('link-38', 'python_tokenizer', 'link-37');">python_tokenizer</a></tt><tt class="py-op">,</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">                                  <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'ENDMULTILINESTRING'</tt><tt class="py-op">,</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">                                  <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'.*?("""|\'\'\')'</tt><tt class="py-op">,</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">                                  <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: darkred'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">        <tt class="py-string">'HTML'</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt id="link-39" class="py-name" targets="Method web2py.gluon.highlight.Highlighter.html_tokenizer()=web2py.gluon.highlight.Highlighter-class.html#html_tokenizer"><a title="web2py.gluon.highlight.Highlighter.html_tokenizer" class="py-name" href="#" onclick="return doclink('link-39', 'html_tokenizer', 'link-39');">html_tokenizer</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'GOTOPYTHON'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'\{\{'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: red'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'&lt;!--[^&gt;]*--&gt;|&lt;!&gt;'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">             <tt class="py-string">'color: green; font-style: italic'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'XMLCRAP'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'&lt;![^&gt;]*&gt;'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">             <tt class="py-string">'color: blue; font-style: italic'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'SCRIPT'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'&lt;script .*?&lt;/script&gt;'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">IGNORECASE</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">              <tt class="py-op">+</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'color: black'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'TAG'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'&lt;/?\s*[a-zA-Z0-9]+'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">             <tt class="py-string">'color: darkred; font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'ENDTAG'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'/?&gt;'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">             <tt class="py-string">'color: darkred; font-weight: bold'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">            <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">        <tt class="py-op">}</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"> </tt>
<a name="Highlighter.highlight"></a><div id="Highlighter.highlight-def"><a name="L202"></a><tt class="py-lineno">202</tt> <a class="py-toggle" href="#" id="Highlighter.highlight-toggle" onclick="return toggle('Highlighter.highlight');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html#highlight">highlight</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter.highlight-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Highlighter.highlight-expanded"><a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">        Syntax highlight some python code.</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"><tt class="py-docstring">        Returns html version of code.</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">i</tt> <tt class="py-op">&lt;</tt> <tt id="link-40" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-40', 'len', 'link-40');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">token</tt><tt class="py-op">,</tt> <tt class="py-name">o_re</tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-41', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-42" class="py-name" targets="Class web2py.gluon.highlight.Highlighter=web2py.gluon.highlight.Highlighter-class.html"><a title="web2py.gluon.highlight.Highlighter" class="py-name" href="#" onclick="return doclink('link-42', 'Highlighter', 'link-42');">Highlighter</a></tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="web2py.gluon.highlight.Highlighter.all_styles" class="py-name" href="#" onclick="return doclink('link-43', 'all_styles', 'link-35');">all_styles</a></tt><tt class="py-op">[</tt><tt class="py-name">mode</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">token</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">suppress_tokens</tt><tt class="py-op">:</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">                    <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">o_re</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt id="link-44" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-44', 'style', 'link-3');">style</a></tt><tt class="py-op">:</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">                            <tt class="py-name">new_mode</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                                <tt id="link-45" class="py-name"><a title="web2py.gluon.highlight.Highlighter" class="py-name" href="#" onclick="return doclink('link-45', 'Highlighter', 'link-42');">Highlighter</a></tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="web2py.gluon.highlight.Highlighter.all_styles" class="py-name" href="#" onclick="return doclink('link-46', 'all_styles', 'link-35');">all_styles</a></tt><tt class="py-op">[</tt><tt class="py-name">mode</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                                    <tt class="py-name">token</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">,</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-47', 'style', 'link-3');">style</a></tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                                     <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">link</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">link</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">                            <tt class="py-name">new_mode</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">                                <tt id="link-48" class="py-name"><a title="web2py.gluon.highlight.Highlighter" class="py-name" href="#" onclick="return doclink('link-48', 'Highlighter', 'link-42');">Highlighter</a></tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="web2py.gluon.highlight.Highlighter.all_styles" class="py-name" href="#" onclick="return doclink('link-49', 'all_styles', 'link-35');">all_styles</a></tt><tt class="py-op">[</tt><tt class="py-name">mode</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">                                    <tt class="py-name">token</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">,</tt> <tt id="link-50" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-50', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">new_mode</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">                            <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">new_mode</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">                        <tt class="py-name">i</tt> <tt class="py-op">+=</tt> <tt id="link-51" class="py-name" targets="Variable datetime.date.max=datetime.date-class.html#max,Variable datetime.datetime.max=datetime.datetime-class.html#max,Variable datetime.time.max=datetime.time-class.html#max,Method web2py.gluon.dal.Expression.max()=web2py.gluon.dal.Expression-class.html#max"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-51', 'max', 'link-51');">max</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt id="link-52" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-52', 'len', 'link-40');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">                        <tt class="py-keyword">break</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-53', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-54', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-55', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">                <tt class="py-name">i</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.highlight.Highlighter.change_style" class="py-name" href="#" onclick="return doclink('link-56', 'change_style', 'link-2');">change_style</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-57', 'join', 'link-57');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-58', 'output', 'link-1');">output</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">expandtabs</tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
</div><a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"> </tt>
<a name="Highlighter.change_style"></a><div id="Highlighter.change_style-def"><a name="L235"></a><tt class="py-lineno">235</tt> <a class="py-toggle" href="#" id="Highlighter.change_style-toggle" onclick="return toggle('Highlighter.change_style');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight.Highlighter-class.html#change_style">change_style</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">token</tt><tt class="py-op">,</tt> <tt class="py-param">style</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Highlighter.change_style-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Highlighter.change_style-expanded"><a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"><tt class="py-docstring">        Generate output to change from existing style to another style only.</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">token</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">styles</tt><tt class="py-op">:</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">            <tt id="link-59" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-59', 'style', 'link-3');">style</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">styles</tt><tt class="py-op">[</tt><tt class="py-name">token</tt><tt class="py-op">]</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">span_style</tt> <tt class="py-op">!=</tt> <tt id="link-60" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-60', 'style', 'link-3');">style</a></tt><tt class="py-op">:</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-61" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-61', 'style', 'link-3');">style</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">'Keep'</tt><tt class="py-op">:</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">span_style</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-62', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-63', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;/span&gt;'</tt><tt class="py-op">)</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-64', 'style', 'link-3');">style</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-65', 'output', 'link-1');">output</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-66', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;span style="%s"&gt;'</tt> <tt class="py-op">%</tt> <tt id="link-67" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-67', 'style', 'link-3');">style</a></tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">span_style</tt> <tt class="py-op">=</tt> <tt id="link-68" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-68', 'style', 'link-3');">style</a></tt> </tt>
</div></div><a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line"> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line"> </tt>
<a name="highlight"></a><div id="highlight-def"><a name="L251"></a><tt class="py-lineno">251</tt> <a class="py-toggle" href="#" id="highlight-toggle" onclick="return toggle('highlight');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.highlight-module.html#highlight">highlight</a><tt class="py-op">(</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">    <tt class="py-param">code</tt><tt class="py-op">,</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">    <tt class="py-param">language</tt><tt class="py-op">,</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">    <tt class="py-param">link</tt><tt class="py-op">=</tt><tt class="py-string">'/examples/globals/vars/'</tt><tt class="py-op">,</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">    <tt class="py-param">counter</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">    <tt class="py-param">styles</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">    <tt class="py-param">highlight_line</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">    <tt class="py-param">attributes</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="highlight-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="highlight-expanded"><a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'CODE'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">styles</tt><tt class="py-op">:</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">        <tt class="py-name">code_style</tt> <tt class="py-op">=</tt> <tt class="py-string">"""</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"><tt class="py-string">        font-size: 11px;</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line"><tt class="py-string">        font-family: Bitstream Vera Sans Mono,monospace;</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-string">        background-color: transparent;</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"><tt class="py-string">        margin: 0;</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line"><tt class="py-string">        padding: 5px;</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line"><tt class="py-string">        border: none;</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line"><tt class="py-string">        overflow: auto;</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-string">        white-space: pre !important;\n"""</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-name">code_style</tt> <tt class="py-op">=</tt> <tt class="py-name">styles</tt><tt class="py-op">[</tt><tt class="py-string">'CODE'</tt><tt class="py-op">]</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'LINENUMBERS'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">styles</tt><tt class="py-op">:</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">        <tt class="py-name">linenumbers_style</tt> <tt class="py-op">=</tt> <tt class="py-string">"""</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"><tt class="py-string">        font-size: 11px;</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line"><tt class="py-string">        font-family: Bitstream Vera Sans Mono,monospace;</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-string">        background-color: transparent;</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line"><tt class="py-string">        margin: 0;</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line"><tt class="py-string">        padding: 5px;</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line"><tt class="py-string">        border: none;</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"><tt class="py-string">        color: #A0A0A0;\n"""</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-name">linenumbers_style</tt> <tt class="py-op">=</tt> <tt class="py-name">styles</tt><tt class="py-op">[</tt><tt class="py-string">'LINENUMBERS'</tt><tt class="py-op">]</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'LINEHIGHLIGHT'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">styles</tt><tt class="py-op">:</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt class="py-name">linehighlight_style</tt> <tt class="py-op">=</tt> <tt class="py-string">"background-color: #EBDDE2;"</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-name">linehighlight_style</tt> <tt class="py-op">=</tt> <tt class="py-name">styles</tt><tt class="py-op">[</tt><tt class="py-string">'LINEHIGHLIGHT'</tt><tt class="py-op">]</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line"> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">language</tt> <tt class="py-keyword">and</tt> <tt class="py-name">language</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-69', 'upper', 'link-0');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'PYTHON'</tt><tt class="py-op">,</tt> <tt class="py-string">'C'</tt><tt class="py-op">,</tt> <tt class="py-string">'CPP'</tt><tt class="py-op">,</tt> <tt class="py-string">'HTML'</tt><tt class="py-op">,</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">            <tt class="py-string">'WEB2PY'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt id="link-70" class="py-name"><a title="web2py.gluon.highlight.Highlighter" class="py-name" href="#" onclick="return doclink('link-70', 'Highlighter', 'link-42');">Highlighter</a></tt><tt class="py-op">(</tt><tt class="py-name">language</tt><tt class="py-op">,</tt> <tt class="py-name">link</tt><tt class="py-op">,</tt> <tt class="py-name">styles</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-71" class="py-name" targets="Module web2py.gluon.highlight=web2py.gluon.highlight-module.html,Method web2py.gluon.highlight.Highlighter.highlight()=web2py.gluon.highlight.Highlighter-class.html#highlight,Function web2py.gluon.highlight.highlight()=web2py.gluon.highlight-module.html#highlight"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-71', 'highlight', 'link-71');">highlight</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">    <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">code</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">counter</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-name">linenumbers</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt> <tt class="py-op">*</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-72', 'len', 'link-40');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">counter</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">        <tt class="py-name">linenumbers</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">counter</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">*</tt> <tt id="link-73" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-73', 'len', 'link-40');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">        <tt class="py-name">linenumbers</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">i</tt> <tt class="py-op">+</tt> <tt class="py-name">counter</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">                               <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-74', 'len', 'link-40');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line"> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">highlight_line</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">counter</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">counter</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">            <tt class="py-name">lineno</tt> <tt class="py-op">=</tt> <tt class="py-name">highlight_line</tt> <tt class="py-op">-</tt> <tt class="py-name">counter</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">            <tt class="py-name">lineno</tt> <tt class="py-op">=</tt> <tt class="py-name">highlight_line</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">lineno</tt><tt class="py-op">&lt;</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-75', 'len', 'link-40');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">            <tt class="py-name">lines</tt><tt class="py-op">[</tt><tt class="py-name">lineno</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;div style="%s"&gt;%s&lt;/div&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linehighlight_style</tt><tt class="py-op">,</tt> <tt class="py-name">lines</tt><tt class="py-op">[</tt><tt class="py-name">lineno</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">            <tt class="py-name">linenumbers</tt><tt class="py-op">[</tt><tt class="py-name">lineno</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;div style="%s"&gt;%s&lt;/div&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linehighlight_style</tt><tt class="py-op">,</tt> <tt class="py-name">linenumbers</tt><tt class="py-op">[</tt><tt class="py-name">lineno</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">    <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;br/&gt;'</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-76', 'join', 'link-57');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">    <tt id="link-77" class="py-name" targets="Variable web2py.gluon.validators.IS_IPV4.numbers=web2py.gluon.validators.IS_IPV4-class.html#numbers"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-77', 'numbers', 'link-77');">numbers</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;br/&gt;'</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-78', 'join', 'link-57');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">linenumbers</tt><tt class="py-op">)</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line"> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">    <tt id="link-79" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-79', 'items', 'link-79');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-80', 'items', 'link-79');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">    <tt class="py-name">fa</tt> <tt class="py-op">=</tt> <tt class="py-string">' '</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-81', 'join', 'link-57');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-82', 'lower', 'link-82');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-83" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-83', 'items', 'link-79');">items</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">                   <tt class="py-op">==</tt> <tt class="py-string">'_'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">[</tt><tt class="py-string">'%s="%s"'</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">                   <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-84', 'lower', 'link-82');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">,</tt> <tt class="py-string">"'"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">                  <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-85', 'items', 'link-79');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">                   <tt class="py-op">==</tt> <tt class="py-string">'_'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">fa</tt><tt class="py-op">:</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">        <tt class="py-name">fa</tt> <tt class="py-op">=</tt> <tt class="py-string">' '</tt> <tt class="py-op">+</tt> <tt class="py-name">fa</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;table%s&gt;&lt;tr valign="top"&gt;&lt;td style="width:40px; text-align: right;"&gt;&lt;pre style="%s"&gt;%s&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="%s"&gt;%s&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'</tt>\ </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">         <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">linenumbers_style</tt><tt class="py-op">,</tt> <tt id="link-86" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-86', 'numbers', 'link-77');">numbers</a></tt><tt class="py-op">,</tt> <tt class="py-name">code_style</tt><tt class="py-op">,</tt> <tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
</div><a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line"> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">    <tt class="py-name">argfp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">    <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">argfp</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-87', 'read', 'link-87');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">    <tt class="py-name">argfp</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-88', 'close', 'link-88');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'&lt;html&gt;&lt;body&gt;'</tt> <tt class="py-op">+</tt> <tt id="link-89" class="py-name"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-89', 'highlight', 'link-71');">highlight</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt>\ </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">         <tt class="py-op">+</tt> <tt class="py-string">'&lt;/body&gt;&lt;/html&gt;'</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.highlight.Highlighter-class.html version [a184022da3].


































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.highlight.Highlighter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.highlight-module.html">Module&nbsp;highlight</a> ::
        Class&nbsp;Highlighter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.highlight.Highlighter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Highlighter</h1><span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Highlighter</strong>
</pre>

<hr />
Do syntax highlighting.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.highlight.Highlighter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mode</span>,
        <span class="summary-sig-arg">link</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">styles</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      Initialise highlighter:...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="c_tokenizer"></a><span class="summary-sig-name">c_tokenizer</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">token</span>,
        <span class="summary-sig-arg">match</span>,
        <span class="summary-sig-arg">style</span>)</span><br />
      Callback for C specific highlighting.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.c_tokenizer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="python_tokenizer"></a><span class="summary-sig-name">python_tokenizer</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">token</span>,
        <span class="summary-sig-arg">match</span>,
        <span class="summary-sig-arg">style</span>)</span><br />
      Callback for python specific highlighting.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.python_tokenizer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="html_tokenizer"></a><span class="summary-sig-name">html_tokenizer</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">token</span>,
        <span class="summary-sig-arg">match</span>,
        <span class="summary-sig-arg">style</span>)</span><br />
      Callback for HTML specific highlighting.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.html_tokenizer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.highlight.Highlighter-class.html#highlight" class="summary-sig-name">highlight</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span><br />
      Syntax highlight some python code.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.highlight">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="change_style"></a><span class="summary-sig-name">change_style</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">token</span>,
        <span class="summary-sig-arg">style</span>)</span><br />
      Generate output to change from existing style to another style 
      only.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.change_style">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.highlight.Highlighter-class.html#all_styles" class="summary-name">all_styles</a> = <code title="{'C': (&lt;function c_tokenizer at 0xaf97d0&gt;,
       (('COMMENT',
         re.compile(r'//.*\r?\n'),
         'color: green; font-style: italic'),
        ('MULTILINECOMMENT',
         re.compile(r'(?s)/\*.*?\*/'),
         'color: green; font-style: italic'),
        ('PREPROCESSOR', re.compile(r'(?s)\s*#.*?[^\\]\s*\n'), 'color:\
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">C</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">(</code>&lt;function c_tokenizer at 0xaf97d0&gt;<code class="variable-op">, </code><code class="variable-group">(</code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">COM</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">mode</span>,
        <span class="sig-arg">link</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">styles</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Initialise highlighter:
    mode = language (PYTHON, WEB2PY,C, CPP, HTML, HTML_PLAIN)

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="highlight"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">highlight</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.highlight-pysrc.html#Highlighter.highlight">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Syntax highlight some python code. Returns html version of code.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="all_styles"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">all_styles</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">C</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">(</code>&lt;function c_tokenizer at 0xaf97d0&gt;<code class="variable-op">,</code>
       <code class="variable-group">(</code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">COMMENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
         re.compile(r'//.<code class="re-op">*</code>\r<code class="re-op">?</code>\n')<code class="variable-op">,</code>
         <code class="variable-quote">'</code><code class="variable-string">color: green; font-style: italic</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
        <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">MULTILINECOMMENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
         re.compile(r'<code class="re-flags">(?s)</code>/\*.<code class="re-op">*?</code>\*/')<code class="variable-op">,</code>
         <code class="variable-quote">'</code><code class="variable-string">color: green; font-style: italic</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
        <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">PREPROCESSOR</code><code class="variable-quote">'</code><code class="variable-op">, </code>re.compile(r'<code class="re-flags">(?s)</code>\s<code class="re-op">*</code>#.<code class="re-op">*?</code><code class="re-group">[^</code>\\<code class="re-group">]</code>\s<code class="re-op">*</code>\n')<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">color:</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html-module.html version [d91a1cb89b].

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;html
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module html</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XmlComponent-class.html" class="summary-name">XmlComponent</a><br />
      Abstract root for all Html components
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XML-class.html" class="summary-name">XML</a><br />
      use it to wrap a string that contains XML/HTML so that it will 
        not be escaped by the template
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.DIV-class.html" class="summary-name">DIV</a><br />
      HTML helper, for easy generating and manipulating a DOM 
        structure.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.CAT-class.html" class="summary-name">CAT</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.__TAG__-class.html" class="summary-name">__TAG__</a><br />
      TAG factory example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HTML-class.html" class="summary-name">HTML</a><br />
      There are four predefined document type definitions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XHTML-class.html" class="summary-name">XHTML</a><br />
      This is XHTML version of the HTML helper.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HEAD-class.html" class="summary-name">HEAD</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TITLE-class.html" class="summary-name">TITLE</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.META-class.html" class="summary-name">META</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LINK-class.html" class="summary-name">LINK</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.SCRIPT-class.html" class="summary-name">SCRIPT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.STYLE-class.html" class="summary-name">STYLE</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.IMG-class.html" class="summary-name">IMG</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.SPAN-class.html" class="summary-name">SPAN</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BODY-class.html" class="summary-name">BODY</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H1-class.html" class="summary-name">H1</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H2-class.html" class="summary-name">H2</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H3-class.html" class="summary-name">H3</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H4-class.html" class="summary-name">H4</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H5-class.html" class="summary-name">H5</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.H6-class.html" class="summary-name">H6</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.P-class.html" class="summary-name">P</a><br />
      Will replace ``\n`` by ``&lt;br /&gt;`` if the `cr2br` attribute
        is provided.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.B-class.html" class="summary-name">B</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BR-class.html" class="summary-name">BR</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HR-class.html" class="summary-name">HR</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.A-class.html" class="summary-name">A</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BUTTON-class.html" class="summary-name">BUTTON</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.EM-class.html" class="summary-name">EM</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.EMBED-class.html" class="summary-name">EMBED</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TT-class.html" class="summary-name">TT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.PRE-class.html" class="summary-name">PRE</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.CENTER-class.html" class="summary-name">CENTER</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.CODE-class.html" class="summary-name">CODE</a><br />
      displays code in HTML with syntax highlighting.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LABEL-class.html" class="summary-name">LABEL</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LI-class.html" class="summary-name">LI</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.UL-class.html" class="summary-name">UL</a><br />
      UL Component.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OL-class.html" class="summary-name">OL</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TD-class.html" class="summary-name">TD</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TH-class.html" class="summary-name">TH</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TR-class.html" class="summary-name">TR</a><br />
      TR Component.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.THEAD-class.html" class="summary-name">THEAD</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TBODY-class.html" class="summary-name">TBODY</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TFOOT-class.html" class="summary-name">TFOOT</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.COL-class.html" class="summary-name">COL</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.COLGROUP-class.html" class="summary-name">COLGROUP</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TABLE-class.html" class="summary-name">TABLE</a><br />
      TABLE Component.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.I-class.html" class="summary-name">I</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.IFRAME-class.html" class="summary-name">IFRAME</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.INPUT-class.html" class="summary-name">INPUT</a><br />
      INPUT Component

examples::

    &gt;&gt;&gt; INPUT(_type='text', _name='name', value='Max').xml()
    '&lt;input name=&quot;name&quot; type=&quot;text&quot; value=&quot;Max&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='checkbox', _name='checkbox', value='on').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;checkbox&quot; type=&quot;checkbox&quot; value=&quot;on&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;yes&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()
    '&lt;input name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;no&quot; /&gt;'

the input helper takes two special attributes value= and requires=.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.TEXTAREA-class.html" class="summary-name">TEXTAREA</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OPTION-class.html" class="summary-name">OPTION</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OBJECT-class.html" class="summary-name">OBJECT</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.OPTGROUP-class.html" class="summary-name">OPTGROUP</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.SELECT-class.html" class="summary-name">SELECT</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.FIELDSET-class.html" class="summary-name">FIELDSET</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.LEGEND-class.html" class="summary-name">LEGEND</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.FORM-class.html" class="summary-name">FORM</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.BEAUTIFY-class.html" class="summary-name">BEAUTIFY</a><br />
      example::

    &gt;&gt;&gt; BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
    '&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;b&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;font-weight:bold;&quot;&gt;hello&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;:&lt;/td&gt;&lt;td&gt;&lt;div&gt;world&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'

turns any list, dictionary, etc into decent looking html.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.MENU-class.html" class="summary-name">MENU</a><br />
      Used to build menus...
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.web2pyHTMLParser-class.html" class="summary-name">web2pyHTMLParser</a><br />
      obj = web2pyHTMLParser(text) parses and html/xml text into 
        web2py helpers.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.MARKMIN-class.html" class="summary-name">MARKMIN</a><br />
      For documentation: 
        http://web2py.com/examples/static/markmin.html
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html-module.html#join" class="summary-sig-name">join</a>(<span class="summary-sig-arg">S</span>,
        <span class="summary-sig-arg">sequence</span>)</span><br />
      Return a string which is the concatenation of the strings in the 
      sequence.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#join">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html-module.html#xmlescape" class="summary-sig-name">xmlescape</a>(<span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">quote</span>=<span class="summary-sig-default">True</span>)</span><br />
      returns an escaped string of the provided data</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#xmlescape">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html-module.html#URL" class="summary-sig-name">URL</a>(<span class="summary-sig-arg">a</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">c</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">f</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">r</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">vars</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">anchor</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">extension</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">env</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hmac_key</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hash_vars</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">salt</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">user_signature</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">scheme</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">host</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">1</span>)</span><br />
      generate a URL

example::

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#URL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html-module.html#verifyURL" class="summary-sig-name">verifyURL</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">hmac_key</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hash_vars</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">salt</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">user_signature</span>=<span class="summary-sig-default">1</span>)</span><br />
      Verifies that a request's args &amp; vars have not been tampered with by the user

:param request: web2py's request object
:param hmac_key: the key to authenticate with, must be the same one previously
                used when calling URL()
:param hash_vars: which vars to include in our hashing.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#verifyURL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="XML_unpickle"></a><span class="summary-sig-name">XML_unpickle</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML_unpickle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="XML_pickle"></a><span class="summary-sig-name">XML_pickle</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML_pickle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="TAG_unpickler"></a><span class="summary-sig-name">TAG_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TAG_unpickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="TAG_pickler"></a><span class="summary-sig-name">TAG_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TAG_pickler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html-module.html#embed64" class="summary-sig-name">embed64</a>(<span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">file</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">extension</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">image/gif</code><code class="variable-quote">'</code></span>)</span><br />
      helper to encode the provided (binary) data into base64.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#embed64">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html-module.html#test" class="summary-sig-name">test</a>()</span><br />
      Example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#test">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="markdown_serializer"></a><span class="summary-sig-name">markdown_serializer</span>(<span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">tag</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">attr</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#markdown_serializer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="markmin_serializer"></a><span class="summary-sig-name">markmin_serializer</span>(<span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">tag</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">attr</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#markmin_serializer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_crlf"></a><span class="summary-name">regex_crlf</span> = <code title="re.compile(r'[\r\n]')">re.compile(r'<code class="re-group">[</code>\r\n<code class="re-group">]</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ON"></a><span class="summary-name">ON</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TAG"></a><span class="summary-name">TAG</span> = <code title="__TAG__()">__TAG__()</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="join"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">join</span>(<span class="sig-arg">S</span>,
        <span class="sig-arg">sequence</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#join">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Return a string which is the concatenation of the strings in the 
  sequence.  The separator between elements is S.
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
string

</pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="xmlescape"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xmlescape</span>(<span class="sig-arg">data</span>,
        <span class="sig-arg">quote</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#xmlescape">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>returns an escaped string of the provided data</p>
  :param data: the data to be escaped :param quote: optional (default 
  False)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="URL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">URL</span>(<span class="sig-arg">a</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">c</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">f</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">r</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">args</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">vars</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">anchor</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">extension</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">env</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">hmac_key</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">hash_vars</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">salt</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">user_signature</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">scheme</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">host</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">port</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#URL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

generate a URL

example::

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':1, 'q':2}, anchor='1'))
    '/a/c/f/x/y/z?p=1&amp;q=2#1'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':(1,3), 'q':2}, anchor='1'))
    '/a/c/f/x/y/z?p=1&amp;p=3&amp;q=2#1'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':(3,1), 'q':2}, anchor='1'))
    '/a/c/f/x/y/z?p=3&amp;p=1&amp;q=2#1'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', anchor='1+2'))
    '/a/c/f#1%2B2'

    &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
    ...     vars={'p':(1,3), 'q':2}, anchor='1', hmac_key='key'))
    '/a/c/f/x/y/z?p=1&amp;p=3&amp;q=2&amp;_signature=5d06bb8a4a6093dd325da2ee591c35c61afbd3c6#1'

generates a url '/a/c/f' corresponding to application a, controller c
and function f. If r=request is passed, a, c, f are set, respectively,
to r.application, r.controller, r.function.

The more typical usage is:

URL(r=request, f='index') that generates a url for the index function
within the present application and controller.

:param a: application (default to current if r is given)
:param c: controller (default to current if r is given)
:param f: function (default to current if r is given)
:param r: request (optional)
:param args: any arguments (optional)
:param vars: any variables (optional)
:param anchor: anchorname, without # (optional)
:param hmac_key: key to use when generating hmac signature (optional)
:param hash_vars: which of the vars to include in our hmac signature
    True (default) - hash all vars, False - hash none of the vars,
    iterable - hash only the included vars ['key1','key2']
:param scheme: URI scheme (True, 'http' or 'https', etc); forces absolute URL (optional)
:param host: string to force absolute URL with host (True means http_host)
:param port: optional port number (forces absolute URL)

:raises SyntaxError: when no application, controller or function is
    available
:raises SyntaxError: when a CRLF is found in the generated url

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="verifyURL"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">verifyURL</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">hmac_key</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">hash_vars</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">salt</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">user_signature</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#verifyURL">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Verifies that a request's args &amp; vars have not been tampered with by the user

:param request: web2py's request object
:param hmac_key: the key to authenticate with, must be the same one previously
                used when calling URL()
:param hash_vars: which vars to include in our hashing. (Optional)
                Only uses the 1st value currently
                True (or undefined) means all, False none,
                an iterable just the specified keys

do not call directly. Use instead:

URL.verify(hmac_key='...')

the key has to match the one used to generate the URL.

    &gt;&gt;&gt; r = Storage()
    &gt;&gt;&gt; gv = Storage(p=(1,3),q=2,_signature='5d06bb8a4a6093dd325da2ee591c35c61afbd3c6')
    &gt;&gt;&gt; r.update(dict(application='a', controller='c', function='f'))
    &gt;&gt;&gt; r['args'] = ['x', 'y', 'z']
    &gt;&gt;&gt; r['get_vars'] = gv
    &gt;&gt;&gt; verifyURL(r, 'key')
    True
    &gt;&gt;&gt; verifyURL(r, 'kay')
    False
    &gt;&gt;&gt; r.get_vars.p = (3, 1)
    &gt;&gt;&gt; verifyURL(r, 'key')
    True
    &gt;&gt;&gt; r.get_vars.p = (3, 2)
    &gt;&gt;&gt; verifyURL(r, 'key')
    False

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="embed64"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">embed64</span>(<span class="sig-arg">filename</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">file</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">data</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">extension</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">image/gif</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#embed64">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>helper to encode the provided (binary) data into base64.</p>
  :param filename: if provided, opens and reads this file in 'rb' mode 
  :param file: if provided, reads this file :param data: if provided, uses 
  the provided data
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="test"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">test</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#test">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Example:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> validators <span class="py-keyword">import</span> *
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> DIV(A(<span class="py-string">'click me'</span>, _href=URL(a=<span class="py-string">'a'</span>, c=<span class="py-string">'b'</span>, f=<span class="py-string">'c'</span>)), BR(), HR(), DIV(SPAN(<span class="py-string">&quot;World&quot;</span>), _class=<span class="py-string">'unknown'</span>)).xml()
<span class="py-output">&lt;div&gt;&lt;a href=&quot;/a/b/c&quot;&gt;click me&lt;/a&gt;&lt;br /&gt;&lt;hr /&gt;&lt;div class=&quot;unknown&quot;&gt;&lt;span&gt;World&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> DIV(UL(<span class="py-string">&quot;doc&quot;</span>,<span class="py-string">&quot;cat&quot;</span>,<span class="py-string">&quot;mouse&quot;</span>)).xml()
<span class="py-output">&lt;div&gt;&lt;ul&gt;&lt;li&gt;doc&lt;/li&gt;&lt;li&gt;cat&lt;/li&gt;&lt;li&gt;mouse&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> DIV(UL(<span class="py-string">&quot;doc&quot;</span>, LI(<span class="py-string">&quot;cat&quot;</span>, _class=<span class="py-string">'feline'</span>), 18)).xml()
<span class="py-output">&lt;div&gt;&lt;ul&gt;&lt;li&gt;doc&lt;/li&gt;&lt;li class=&quot;feline&quot;&gt;cat&lt;/li&gt;&lt;li&gt;18&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> TABLE([<span class="py-string">'a'</span>, <span class="py-string">'b'</span>, <span class="py-string">'c'</span>], TR(<span class="py-string">'d'</span>, <span class="py-string">'e'</span>, <span class="py-string">'f'</span>), TR(TD(1), TD(2), TD(3))).xml()
<span class="py-output">&lt;table&gt;&lt;tr&gt;&lt;td&gt;a&lt;/td&gt;&lt;td&gt;b&lt;/td&gt;&lt;td&gt;c&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;d&lt;/td&gt;&lt;td&gt;e&lt;/td&gt;&lt;td&gt;f&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>form=FORM(INPUT(_type=<span class="py-string">'text'</span>, _name=<span class="py-string">'myvar'</span>, requires=IS_EXPR(<span class="py-string">'int(value)&lt;10'</span>)))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.xml()
<span class="py-output">&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;myvar&quot; type=&quot;text&quot; /&gt;&lt;/form&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.accepts({<span class="py-string">'myvar'</span>:<span class="py-string">'34'</span>}, formname=None)
<span class="py-output">False</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.xml()
<span class="py-output">&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;myvar&quot; type=&quot;text&quot; value=&quot;34&quot; /&gt;&lt;div class=&quot;error&quot; id=&quot;myvar__error&quot;&gt;invalid expression&lt;/div&gt;&lt;/form&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.accepts({<span class="py-string">'myvar'</span>:<span class="py-string">'4'</span>}, formname=None, keepvalues=True)
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.xml()
<span class="py-output">&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;myvar&quot; type=&quot;text&quot; value=&quot;4&quot; /&gt;&lt;/form&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>form=FORM(SELECT(<span class="py-string">'cat'</span>, <span class="py-string">'dog'</span>, _name=<span class="py-string">'myvar'</span>))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.accepts({<span class="py-string">'myvar'</span>:<span class="py-string">'dog'</span>}, formname=None, keepvalues=True)
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.xml()
<span class="py-output">&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;select name=&quot;myvar&quot;&gt;&lt;option value=&quot;cat&quot;&gt;cat&lt;/option&gt;&lt;option selected=&quot;selected&quot; value=&quot;dog&quot;&gt;dog&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>form=FORM(INPUT(_type=<span class="py-string">'text'</span>, _name=<span class="py-string">'myvar'</span>, requires=IS_MATCH(<span class="py-string">'^\w+$'</span>, <span class="py-string">'only alphanumeric!'</span>)))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.accepts({<span class="py-string">'myvar'</span>:<span class="py-string">'as df'</span>}, formname=None)
<span class="py-output">False</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> form.xml()
<span class="py-output">&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;myvar&quot; type=&quot;text&quot; value=&quot;as df&quot; /&gt;&lt;div class=&quot;error&quot; id=&quot;myvar__error&quot;&gt;only alphanumeric!&lt;/div&gt;&lt;/form&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>session={}
<span class="py-prompt">&gt;&gt;&gt; </span>form=FORM(INPUT(value=<span class="py-string">&quot;Hello World&quot;</span>, _name=<span class="py-string">&quot;var&quot;</span>, requires=IS_MATCH(<span class="py-string">'^\w+$'</span>)))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">if</span> form.accepts({}, session,formname=None): <span class="py-keyword">print</span> <span class="py-string">'passed'</span>
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">if</span> form.accepts({<span class="py-string">'var'</span>:<span class="py-string">'test '</span>, <span class="py-string">'_formkey'</span>: session[<span class="py-string">'_formkey[None]'</span>]}, session, formname=None): <span class="py-keyword">print</span> <span class="py-string">'passed'</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html-pysrc.html version [bf0acc8ed2].









































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;html
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.html-module.html">Module web2py.gluon.html</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cgi</tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">copy</tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Variable web2py.gluon.dal.BaseAdapter.types=web2py.gluon.dal.BaseAdapter-class.html#types,Variable web2py.gluon.dal.CouchDBAdapter.types=web2py.gluon.dal.CouchDBAdapter-class.html#types,Variable web2py.gluon.dal.DB2Adapter.types=web2py.gluon.dal.DB2Adapter-class.html#types,Variable web2py.gluon.dal.FireBirdAdapter.types=web2py.gluon.dal.FireBirdAdapter-class.html#types,Variable web2py.gluon.dal.GoogleDatastoreAdapter.types=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types,Variable web2py.gluon.dal.InformixAdapter.types=web2py.gluon.dal.InformixAdapter-class.html#types,Variable web2py.gluon.dal.IngresAdapter.types=web2py.gluon.dal.IngresAdapter-class.html#types,Variable web2py.gluon.dal.IngresUnicodeAdapter.types=web2py.gluon.dal.IngresUnicodeAdapter-class.html#types,Variable web2py.gluon.dal.MSSQL2Adapter.types=web2py.gluon.dal.MSSQL2Adapter-class.html#types,Variable web2py.gluon.dal.MSSQLAdapter.types=web2py.gluon.dal.MSSQLAdapter-class.html#types,Variable web2py.gluon.dal.MongoDBAdapter.types=web2py.gluon.dal.MongoDBAdapter-class.html#types,Variable web2py.gluon.dal.MySQLAdapter.types=web2py.gluon.dal.MySQLAdapter-class.html#types,Variable web2py.gluon.dal.OracleAdapter.types=web2py.gluon.dal.OracleAdapter-class.html#types,Variable web2py.gluon.dal.PostgreSQLAdapter.types=web2py.gluon.dal.PostgreSQLAdapter-class.html#types,Variable web2py.gluon.dal.SAPDBAdapter.types=web2py.gluon.dal.SAPDBAdapter-class.html#types,Variable web2py.gluon.dal.TeradataAdapter.types=web2py.gluon.dal.TeradataAdapter-class.html#types"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-0', 'types', 'link-0');">types</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">base64</tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module web2py.gluon.sanitizer=web2py.gluon.sanitizer-module.html"><a title="web2py.gluon.sanitizer" class="py-name" href="#" onclick="return doclink('link-1', 'sanitizer', 'link-1');">sanitizer</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.rewrite=web2py.gluon.rewrite-module.html"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-2', 'rewrite', 'link-2');">rewrite</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">itertools</tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.decoder=web2py.gluon.decoder-module.html,Function web2py.gluon.decoder.decoder()=web2py.gluon.decoder-module.html#decoder"><a title="web2py.gluon.decoder
web2py.gluon.decoder.decoder" class="py-name" href="#" onclick="return doclink('link-3', 'decoder', 'link-3');">decoder</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">copy_reg</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cPickle</tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">marshal</tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">HTMLParser</tt> <tt class="py-keyword">import</tt> <tt class="py-name">HTMLParser</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">htmlentitydefs</tt> <tt class="py-keyword">import</tt> <tt class="py-name">name2codepoint</tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">markmin</tt><tt class="py-op">.</tt><tt class="py-name">markmin2html</tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Method web2py.gluon.globals.Response.render()=web2py.gluon.globals.Response-class.html#render,Function web2py.gluon.template.render()=web2py.gluon.template-module.html#render"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-4', 'render', 'link-4');">render</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-5', 'storage', 'link-5');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-6', 'Storage', 'link-6');">Storage</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name" targets="Module web2py.gluon.highlight=web2py.gluon.highlight-module.html,Method web2py.gluon.highlight.Highlighter.highlight()=web2py.gluon.highlight.Highlighter-class.html#highlight,Function web2py.gluon.highlight.highlight()=web2py.gluon.highlight-module.html#highlight"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-7', 'highlight', 'link-7');">highlight</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-8', 'highlight', 'link-7');">highlight</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-9', 'utils', 'link-9');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name" targets="Function web2py.gluon.utils.web2py_uuid()=web2py.gluon.utils-module.html#web2py_uuid"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-10', 'web2py_uuid', 'link-10');">web2py_uuid</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.utils.hmac_hash()=web2py.gluon.utils-module.html#hmac_hash"><a title="web2py.gluon.utils.hmac_hash" class="py-name" href="#" onclick="return doclink('link-11', 'hmac_hash', 'link-11');">hmac_hash</a></tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hmac</tt> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hashlib</tt> </tt>
<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line"><tt id="link-12" class="py-name" targets="Variable web2py.gluon.html.regex_crlf=web2py.gluon.html-module.html#regex_crlf"><a title="web2py.gluon.html.regex_crlf" class="py-name" href="#" onclick="return doclink('link-12', 'regex_crlf', 'link-12');">regex_crlf</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'\r|\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt id="link-13" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-13', 'join', 'link-13');">join</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-14', 'join', 'link-13');">join</a></tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line"> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">    <tt class="py-string">'A'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">    <tt class="py-string">'B'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">    <tt class="py-string">'BEAUTIFY'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">    <tt class="py-string">'BODY'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">    <tt class="py-string">'BR'</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">    <tt class="py-string">'BUTTON'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">    <tt class="py-string">'CENTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">    <tt class="py-string">'CAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">    <tt class="py-string">'CODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">    <tt class="py-string">'DIV'</tt><tt class="py-op">,</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">    <tt class="py-string">'EM'</tt><tt class="py-op">,</tt> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">    <tt class="py-string">'EMBED'</tt><tt class="py-op">,</tt> </tt>
<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">    <tt class="py-string">'FIELDSET'</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">    <tt class="py-string">'FORM'</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line">    <tt class="py-string">'H1'</tt><tt class="py-op">,</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">    <tt class="py-string">'H2'</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">    <tt class="py-string">'H3'</tt><tt class="py-op">,</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line">    <tt class="py-string">'H4'</tt><tt class="py-op">,</tt> </tt>
<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line">    <tt class="py-string">'H5'</tt><tt class="py-op">,</tt> </tt>
<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line">    <tt class="py-string">'H6'</tt><tt class="py-op">,</tt> </tt>
<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">    <tt class="py-string">'HEAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line">    <tt class="py-string">'HR'</tt><tt class="py-op">,</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line">    <tt class="py-string">'HTML'</tt><tt class="py-op">,</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">    <tt class="py-string">'I'</tt><tt class="py-op">,</tt> </tt>
<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line">    <tt class="py-string">'IFRAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line">    <tt class="py-string">'IMG'</tt><tt class="py-op">,</tt> </tt>
<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line">    <tt class="py-string">'INPUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line">    <tt class="py-string">'LABEL'</tt><tt class="py-op">,</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line">    <tt class="py-string">'LEGEND'</tt><tt class="py-op">,</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">    <tt class="py-string">'LI'</tt><tt class="py-op">,</tt> </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line">    <tt class="py-string">'LINK'</tt><tt class="py-op">,</tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line">    <tt class="py-string">'OL'</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line">    <tt class="py-string">'UL'</tt><tt class="py-op">,</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line">    <tt class="py-string">'MARKMIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line">    <tt class="py-string">'MENU'</tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line">    <tt class="py-string">'META'</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line">    <tt class="py-string">'OBJECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line">    <tt class="py-string">'OPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line">    <tt class="py-string">'P'</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line">    <tt class="py-string">'PRE'</tt><tt class="py-op">,</tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line">    <tt class="py-string">'SCRIPT'</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line">    <tt class="py-string">'OPTGROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line">    <tt class="py-string">'SPAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line">    <tt class="py-string">'STYLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line">    <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line">    <tt class="py-string">'TAG'</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line">    <tt class="py-string">'TD'</tt><tt class="py-op">,</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">    <tt class="py-string">'TEXTAREA'</tt><tt class="py-op">,</tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line">    <tt class="py-string">'TH'</tt><tt class="py-op">,</tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line">    <tt class="py-string">'THEAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line">    <tt class="py-string">'TBODY'</tt><tt class="py-op">,</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">    <tt class="py-string">'TFOOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">    <tt class="py-string">'TITLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line">    <tt class="py-string">'TR'</tt><tt class="py-op">,</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line">    <tt class="py-string">'TT'</tt><tt class="py-op">,</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line">    <tt class="py-string">'URL'</tt><tt class="py-op">,</tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line">    <tt class="py-string">'XHTML'</tt><tt class="py-op">,</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">    <tt class="py-string">'XML'</tt><tt class="py-op">,</tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">    <tt class="py-string">'xmlescape'</tt><tt class="py-op">,</tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line">    <tt class="py-string">'embed64'</tt><tt class="py-op">,</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"> </tt>
<a name="xmlescape"></a><div id="xmlescape-def"><a name="L105"></a><tt class="py-lineno"> 105</tt> <a class="py-toggle" href="#" id="xmlescape-toggle" onclick="return toggle('xmlescape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#xmlescape">xmlescape</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">quote</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="xmlescape-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="xmlescape-expanded"><a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"><tt class="py-docstring">    returns an escaped string of the provided data</tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring">    :param data: the data to be escaped</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">    :param quote: optional (default False)</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">    <tt class="py-comment"># first try the xml function</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt><tt class="py-string">'xml'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method web2py.gluon.dal.Rows.xml()=web2py.gluon.dal.Rows-class.html#xml,Method web2py.gluon.html.A.xml()=web2py.gluon.html.A-class.html#xml,Method web2py.gluon.html.CODE.xml()=web2py.gluon.html.CODE-class.html#xml,Method web2py.gluon.html.DIV.xml()=web2py.gluon.html.DIV-class.html#xml,Method web2py.gluon.html.FORM.xml()=web2py.gluon.html.FORM-class.html#xml,Method web2py.gluon.html.HTML.xml()=web2py.gluon.html.HTML-class.html#xml,Method web2py.gluon.html.INPUT.xml()=web2py.gluon.html.INPUT-class.html#xml,Method web2py.gluon.html.MARKMIN.xml()=web2py.gluon.html.MARKMIN-class.html#xml,Method web2py.gluon.html.MENU.xml()=web2py.gluon.html.MENU-class.html#xml,Method web2py.gluon.html.P.xml()=web2py.gluon.html.P-class.html#xml,Method web2py.gluon.html.SCRIPT.xml()=web2py.gluon.html.SCRIPT-class.html#xml,Method web2py.gluon.html.STYLE.xml()=web2py.gluon.html.STYLE-class.html#xml,Method web2py.gluon.html.XHTML.xml()=web2py.gluon.html.XHTML-class.html#xml,Method web2py.gluon.html.XML.xml()=web2py.gluon.html.XML-class.html#xml,Method web2py.gluon.html.XmlComponent.xml()=web2py.gluon.html.XmlComponent-class.html#xml,Method web2py.gluon.languages.lazyT.xml()=web2py.gluon.languages.lazyT-class.html#xml,Function web2py.gluon.serializers.xml()=web2py.gluon.serializers-module.html#xml,Method web2py.gluon.tools.Recaptcha.xml()=web2py.gluon.tools.Recaptcha-class.html#xml,Method web2py.gluon.tools.Service.xml()=web2py.gluon.tools.Service-class.html#xml"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-15', 'xml', 'link-15');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-16', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line">    <tt class="py-comment"># otherwise, make it a string</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-17', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">,</tt> <tt class="py-string">'xmlcharrefreplace'</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line">    <tt class="py-comment"># ... and do the escaping</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">quote</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"'"</tt><tt class="py-op">,</tt><tt class="py-string">"&amp;#x27;"</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
</div><a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"> </tt>
<a name="URL"></a><div id="URL-def"><a name="L128"></a><tt class="py-lineno"> 128</tt> <a class="py-toggle" href="#" id="URL-toggle" onclick="return toggle('URL');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#URL">URL</a><tt class="py-op">(</tt> </tt>
<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line">    <tt class="py-param">a</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">    <tt class="py-param">c</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">    <tt class="py-param">f</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">    <tt class="py-param">r</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">    <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">    <tt class="py-param">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">    <tt class="py-param">anchor</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">    <tt class="py-param">extension</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">    <tt class="py-param">env</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">    <tt class="py-param">hmac_key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">    <tt class="py-param">hash_vars</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">    <tt class="py-param">salt</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">    <tt class="py-param">user_signature</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line">    <tt class="py-param">scheme</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line">    <tt class="py-param">host</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line">    <tt class="py-param">port</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="URL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="URL-expanded"><a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"><tt class="py-docstring">    generate a URL</tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],</tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring">        ...     vars={'p':1, 'q':2}, anchor='1'))</tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">        '/a/c/f/x/y/z?p=1&amp;q=2#1'</tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">        ...     vars={'p':(1,3), 'q':2}, anchor='1'))</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring">        '/a/c/f/x/y/z?p=1&amp;p=3&amp;q=2#1'</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],</tt> </tt>
<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line"><tt class="py-docstring">        ...     vars={'p':(3,1), 'q':2}, anchor='1'))</tt> </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line"><tt class="py-docstring">        '/a/c/f/x/y/z?p=3&amp;p=1&amp;q=2#1'</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; str(URL(a='a', c='c', f='f', anchor='1+2'))</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line"><tt class="py-docstring">        '/a/c/f#1%2B2'</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"><tt class="py-docstring">        ...     vars={'p':(1,3), 'q':2}, anchor='1', hmac_key='key'))</tt> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line"><tt class="py-docstring">        '/a/c/f/x/y/z?p=1&amp;p=3&amp;q=2&amp;_signature=5d06bb8a4a6093dd325da2ee591c35c61afbd3c6#1'</tt> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line"><tt class="py-docstring">    generates a url '/a/c/f' corresponding to application a, controller c</tt> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line"><tt class="py-docstring">    and function f. If r=request is passed, a, c, f are set, respectively,</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line"><tt class="py-docstring">    to r.application, r.controller, r.function.</tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line"><tt class="py-docstring">    The more typical usage is:</tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line"><tt class="py-docstring">    URL(r=request, f='index') that generates a url for the index function</tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line"><tt class="py-docstring">    within the present application and controller.</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line"><tt class="py-docstring">    :param a: application (default to current if r is given)</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line"><tt class="py-docstring">    :param c: controller (default to current if r is given)</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line"><tt class="py-docstring">    :param f: function (default to current if r is given)</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line"><tt class="py-docstring">    :param r: request (optional)</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line"><tt class="py-docstring">    :param args: any arguments (optional)</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line"><tt class="py-docstring">    :param vars: any variables (optional)</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line"><tt class="py-docstring">    :param anchor: anchorname, without # (optional)</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"><tt class="py-docstring">    :param hmac_key: key to use when generating hmac signature (optional)</tt> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line"><tt class="py-docstring">    :param hash_vars: which of the vars to include in our hmac signature</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line"><tt class="py-docstring">        True (default) - hash all vars, False - hash none of the vars,</tt> </tt>
<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"><tt class="py-docstring">        iterable - hash only the included vars ['key1','key2']</tt> </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line"><tt class="py-docstring">    :param scheme: URI scheme (True, 'http' or 'https', etc); forces absolute URL (optional)</tt> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line"><tt class="py-docstring">    :param host: string to force absolute URL with host (True means http_host)</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line"><tt class="py-docstring">    :param port: optional port number (forces absolute URL)</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line"><tt class="py-docstring">    :raises SyntaxError: when no application, controller or function is</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line"><tt class="py-docstring">        available</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line"><tt class="py-docstring">    :raises SyntaxError: when a CRLF is found in the generated url</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line">    <tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">vars</tt> <tt class="py-keyword">or</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">    <tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line">    <tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line">    <tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line"> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">a</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">c</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">a</tt> <tt class="py-keyword">and</tt> <tt class="py-name">c</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-18" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-18', 'globals', 'link-18');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-19" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-19', 'current', 'link-19');">current</a></tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-20', 'current', 'link-19');">current</a></tt><tt class="py-op">,</tt><tt class="py-string">'request'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">            <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-21', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line">        <tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">        <tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">        <tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">        <tt id="link-22" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-22', 'env', 'link-22');">env</a></tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-23', 'env', 'link-22');">env</a></tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">extension</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">!=</tt> <tt class="py-string">'html'</tt><tt class="py-op">:</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">            <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">a</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">        <tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">        <tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">            <tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">            <tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">            <tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line"> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">    <tt class="py-name">function2</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">function</tt><tt class="py-op">,</tt><tt class="py-name">extension</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'html'</tt><tt class="py-op">)</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line"> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">application</tt> <tt class="py-keyword">and</tt> <tt class="py-name">controller</tt> <tt class="py-keyword">and</tt> <tt class="py-name">function</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'not enough information to build the url'</tt> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">        <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">]</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line">    <tt class="py-name">other</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-24', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-25', 'x', 'link-25');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-26" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-26', 'x', 'link-25');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-27', 'endswith', 'link-27');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">        <tt class="py-name">other</tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt>    <tt class="py-comment"># add trailing slash to make last trailing empty arg explicit</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line"> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method web2py.gluon.rocket.Headers.has_key()=web2py.gluon.rocket.Headers-class.html#has_key"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-28', 'has_key', 'link-28');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">'_signature'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-string">'_signature'</tt><tt class="py-op">)</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">    <tt class="py-name">list_vars</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">vals</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-29', 'items', 'link-29');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">vals</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">            <tt class="py-name">vals</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">vals</tt><tt class="py-op">]</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">val</tt> <tt class="py-keyword">in</tt> <tt class="py-name">vals</tt><tt class="py-op">:</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">            <tt class="py-name">list_vars</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-30', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line"> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">user_signature</tt><tt class="py-op">:</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-31', 'globals', 'link-18');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-32', 'current', 'link-19');">current</a></tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-33" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-33', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">:</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">            <tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-34', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">hmac_key</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line"> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hmac_key</tt><tt class="py-op">:</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">        <tt class="py-comment"># generate an hmac signature of the vars &amp; args so can later</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># verify the user hasn't messed with anything</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">        <tt class="py-name">h_args</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s/%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function2</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line"> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">        <tt class="py-comment"># how many of the vars should we include in our hash?</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">hash_vars</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt>       <tt class="py-comment"># include them all</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line">            <tt class="py-name">h_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">list_vars</tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">hash_vars</tt> <tt class="py-keyword">is</tt> <tt class="py-name">False</tt><tt class="py-op">:</tt>    <tt class="py-comment"># include none of them</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line">            <tt class="py-name">h_vars</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt>                       <tt class="py-comment"># include just those specified</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hash_vars</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">hash_vars</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">                <tt class="py-name">hash_vars</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">hash_vars</tt><tt class="py-op">]</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line">            <tt class="py-name">h_vars</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-35" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-35', 'k', 'link-35');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-36', 'k', 'link-35');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">list_vars</tt> <tt class="py-keyword">if</tt> <tt id="link-37" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-37', 'k', 'link-35');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">hash_vars</tt><tt class="py-op">]</tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line"> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">        <tt class="py-comment"># re-assembling the same way during hash authentication</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-38" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-38', 'message', 'link-38');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">h_args</tt> <tt class="py-op">+</tt> <tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">h_vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line"> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">        <tt class="py-name">sig</tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="web2py.gluon.utils.hmac_hash" class="py-name" href="#" onclick="return doclink('link-39', 'hmac_hash', 'link-11');">hmac_hash</a></tt><tt class="py-op">(</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-40', 'message', 'link-38');">message</a></tt><tt class="py-op">,</tt><tt class="py-name">hmac_key</tt><tt class="py-op">,</tt><tt class="py-name">salt</tt><tt class="py-op">=</tt><tt class="py-name">salt</tt><tt class="py-op">)</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">        <tt class="py-comment"># add the signature into vars</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">list_vars</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-41', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'_signature'</tt><tt class="py-op">,</tt> <tt class="py-name">sig</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">list_vars</tt><tt class="py-op">:</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line">        <tt class="py-name">other</tt> <tt class="py-op">+=</tt> <tt class="py-string">'?%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">list_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">anchor</tt><tt class="py-op">:</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">        <tt class="py-name">other</tt> <tt class="py-op">+=</tt> <tt class="py-string">'#'</tt> <tt class="py-op">+</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">anchor</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">extension</tt><tt class="py-op">:</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">        <tt class="py-name">function</tt> <tt class="py-op">+=</tt> <tt class="py-string">'.'</tt> <tt class="py-op">+</tt> <tt class="py-name">extension</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-42" class="py-name"><a title="web2py.gluon.html.regex_crlf" class="py-name" href="#" onclick="return doclink('link-42', 'regex_crlf', 'link-12');">regex_crlf</a></tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-43', 'search', 'link-43');">search</a></tt><tt class="py-op">(</tt><tt id="link-44" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-44', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'CRLF Injection Detected'</tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line">    <tt id="link-45" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-45', 'url', 'link-45');">url</a></tt> <tt class="py-op">=</tt> <tt id="link-46" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-46', 'rewrite', 'link-2');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-47" class="py-name" targets="Function web2py.gluon.rewrite.url_out()=web2py.gluon.rewrite-module.html#url_out"><a title="web2py.gluon.rewrite.url_out" class="py-name" href="#" onclick="return doclink('link-47', 'url_out', 'link-47');">url_out</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt id="link-48" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-48', 'env', 'link-22');">env</a></tt><tt class="py-op">,</tt> <tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">,</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line">                          <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-49', 'url', 'link-45');">url</a></tt> </tt>
</div><a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line"> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line"> </tt>
<a name="verifyURL"></a><div id="verifyURL-def"><a name="L291"></a><tt class="py-lineno"> 291</tt> <a class="py-toggle" href="#" id="verifyURL-toggle" onclick="return toggle('verifyURL');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#verifyURL">verifyURL</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">hmac_key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">hash_vars</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-param">salt</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">user_signature</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="verifyURL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="verifyURL-expanded"><a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"><tt class="py-docstring">    Verifies that a request's args &amp; vars have not been tampered with by the user</tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line"><tt class="py-docstring">    :param request: web2py's request object</tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"><tt class="py-docstring">    :param hmac_key: the key to authenticate with, must be the same one previously</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line"><tt class="py-docstring">                    used when calling URL()</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line"><tt class="py-docstring">    :param hash_vars: which vars to include in our hashing. (Optional)</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line"><tt class="py-docstring">                    Only uses the 1st value currently</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line"><tt class="py-docstring">                    True (or undefined) means all, False none,</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line"><tt class="py-docstring">                    an iterable just the specified keys</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line"><tt class="py-docstring">    do not call directly. Use instead:</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line"><tt class="py-docstring">    URL.verify(hmac_key='...')</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line"><tt class="py-docstring">    the key has to match the one used to generate the URL.</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; r = Storage()</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; gv = Storage(p=(1,3),q=2,_signature='5d06bb8a4a6093dd325da2ee591c35c61afbd3c6')</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; r.update(dict(application='a', controller='c', function='f'))</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; r['args'] = ['x', 'y', 'z']</tt> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; r['get_vars'] = gv</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; verifyURL(r, 'key')</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; verifyURL(r, 'kay')</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line"><tt class="py-docstring">        False</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; r.get_vars.p = (3, 1)</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; verifyURL(r, 'key')</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; r.get_vars.p = (3, 2)</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; verifyURL(r, 'key')</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line"><tt class="py-docstring">        False</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line"> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-50', 'has_key', 'link-28');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">'_signature'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> <tt class="py-comment"># no signature in the request URL</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line"> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">    <tt class="py-comment"># check if user_signature requires</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">user_signature</tt><tt class="py-op">:</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-51" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-51', 'globals', 'link-18');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-52" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-52', 'current', 'link-19');">current</a></tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-53" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-53', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">:</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">        <tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt id="link-54" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-54', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">hmac_key</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hmac_key</tt><tt class="py-op">:</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line"> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">    <tt class="py-comment"># get our sig from request.get_vars for later comparison</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">original_sig</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_signature</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line"> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">    <tt class="py-comment"># now generate a new hmac for the remaining args &amp; vars</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">vars</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line"> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">    <tt class="py-comment"># remove the signature var since it was not part of our signed message</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-string">'_signature'</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line"> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">    <tt class="py-comment"># join all the args &amp; vars into one long string</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">    <tt class="py-comment"># always include all of the args</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">other</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-55', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-56', 'x', 'link-25');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-57" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-57', 'x', 'link-25');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">    <tt class="py-name">h_args</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s/%s.%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">                                 <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">                                 <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">,</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">                                 <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">,</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">                                 <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line"> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">    <tt class="py-comment"># but only include those vars specified (allows more flexibility for use with</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># forms or ajax)</tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">    <tt class="py-name">list_vars</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">vals</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-58', 'items', 'link-29');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">vals</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">            <tt class="py-name">vals</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">vals</tt><tt class="py-op">]</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">val</tt> <tt class="py-keyword">in</tt> <tt class="py-name">vals</tt><tt class="py-op">:</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">            <tt class="py-name">list_vars</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-59', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line"> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">    <tt class="py-comment"># which of the vars are to be included?</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">hash_vars</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt>       <tt class="py-comment"># include them all</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">        <tt class="py-name">h_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">list_vars</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">hash_vars</tt> <tt class="py-keyword">is</tt> <tt class="py-name">False</tt><tt class="py-op">:</tt>    <tt class="py-comment"># include none of them</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">        <tt class="py-name">h_vars</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt>                       <tt class="py-comment"># include just those specified</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">        <tt class="py-comment"># wrap in a try - if the desired vars have been removed it'll fail</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hash_vars</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">hash_vars</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">                <tt class="py-name">hash_vars</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">hash_vars</tt><tt class="py-op">]</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">            <tt class="py-name">h_vars</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-60" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-60', 'k', 'link-35');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-61" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-61', 'k', 'link-35');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">list_vars</tt> <tt class="py-keyword">if</tt> <tt id="link-62" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-62', 'k', 'link-35');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">hash_vars</tt><tt class="py-op">]</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">            <tt class="py-comment"># user has removed one of our vars! Immediate fail</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">    <tt class="py-comment"># build the full message string with both args &amp; vars</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-63" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-63', 'message', 'link-38');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">h_args</tt> <tt class="py-op">+</tt> <tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">h_vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line"> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">    <tt class="py-comment"># hash with the hmac_key provided</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">sig</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.utils.hmac_hash" class="py-name" href="#" onclick="return doclink('link-64', 'hmac_hash', 'link-11');">hmac_hash</a></tt><tt class="py-op">(</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-65', 'message', 'link-38');">message</a></tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">hmac_key</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">salt</tt><tt class="py-op">=</tt><tt class="py-name">salt</tt><tt class="py-op">)</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line"> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">    <tt class="py-comment"># put _signature back in get_vars just in case a second call to URL.verify is performed</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># (otherwise it'll immediately return false)</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-string">'_signature'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">original_sig</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line"> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">    <tt class="py-comment"># return whether or not the signature in the request matched the one we just generated</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># (I.E. was the message the same as the one we originally signed)</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">return</tt> <tt class="py-name">original_sig</tt> <tt class="py-op">==</tt> <tt class="py-name">sig</tt> </tt>
</div><a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line"> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line"><tt id="link-66" class="py-name" targets="Function web2py.gluon.html.URL()=web2py.gluon.html-module.html#URL"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-66', 'URL', 'link-66');">URL</a></tt><tt class="py-op">.</tt><tt class="py-name">verify</tt> <tt class="py-op">=</tt> <tt id="link-67" class="py-name" targets="Function web2py.gluon.html.verifyURL()=web2py.gluon.html-module.html#verifyURL"><a title="web2py.gluon.html.verifyURL" class="py-name" href="#" onclick="return doclink('link-67', 'verifyURL', 'link-67');">verifyURL</a></tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line"> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line"><tt id="link-68" class="py-name" targets="Variable web2py.gluon.ON=web2py.gluon-module.html#ON,Method web2py.gluon.dal.BaseAdapter.ON()=web2py.gluon.dal.BaseAdapter-class.html#ON,Method web2py.gluon.dal.NoSQLAdapter.ON()=web2py.gluon.dal.NoSQLAdapter-class.html#ON,Variable web2py.gluon.html.ON=web2py.gluon.html-module.html#ON,Variable web2py.gluon.tools.ON=web2py.gluon.tools-module.html#ON"><a title="web2py.gluon.ON
web2py.gluon.dal.BaseAdapter.ON
web2py.gluon.dal.NoSQLAdapter.ON
web2py.gluon.html.ON
web2py.gluon.tools.ON" class="py-name" href="#" onclick="return doclink('link-68', 'ON', 'link-68');">ON</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line"> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line"> </tt>
<a name="XmlComponent"></a><div id="XmlComponent-def"><a name="L401"></a><tt class="py-lineno"> 401</tt> <a class="py-toggle" href="#" id="XmlComponent-toggle" onclick="return toggle('XmlComponent');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XmlComponent-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="XmlComponent-expanded"><a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line"><tt class="py-docstring">    Abstract root for all Html components</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line"> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">    <tt class="py-comment"># TODO: move some DIV methods to here</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="XmlComponent.xml"></a><div id="XmlComponent.xml-def"><a name="L408"></a><tt class="py-lineno"> 408</tt> <a class="py-toggle" href="#" id="XmlComponent.xml-toggle" onclick="return toggle('XmlComponent.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XmlComponent-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XmlComponent.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XmlComponent.xml-expanded"><a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line"> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line"> </tt>
<a name="XML"></a><div id="XML-def"><a name="L412"></a><tt class="py-lineno"> 412</tt> <a class="py-toggle" href="#" id="XML-toggle" onclick="return toggle('XML');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html">XML</a><tt class="py-op">(</tt><tt class="py-base-class">XmlComponent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="XML-expanded"><a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line"><tt class="py-docstring">    use it to wrap a string that contains XML/HTML so that it will not be</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line"><tt class="py-docstring">    escaped by the template</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line"><tt class="py-docstring">    example:</tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; XML('&lt;h1&gt;Hello&lt;/h1&gt;').xml()</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-docstring">    '&lt;h1&gt;Hello&lt;/h1&gt;'</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line"> </tt>
<a name="XML.__init__"></a><div id="XML.__init__-def"><a name="L423"></a><tt class="py-lineno"> 423</tt> <a class="py-toggle" href="#" id="XML.__init__-toggle" onclick="return toggle('XML.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">        <tt class="py-param">text</tt><tt class="py-op">,</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">        <tt class="py-param">sanitize</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line">        <tt class="py-param">permitted_tags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line">            <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">            <tt class="py-string">'b'</tt><tt class="py-op">,</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">            <tt class="py-string">'blockquote'</tt><tt class="py-op">,</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">            <tt class="py-string">'br/'</tt><tt class="py-op">,</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">            <tt class="py-string">'i'</tt><tt class="py-op">,</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">            <tt class="py-string">'li'</tt><tt class="py-op">,</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">            <tt class="py-string">'ol'</tt><tt class="py-op">,</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line">            <tt class="py-string">'ul'</tt><tt class="py-op">,</tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line">            <tt class="py-string">'p'</tt><tt class="py-op">,</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line">            <tt class="py-string">'cite'</tt><tt class="py-op">,</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">            <tt class="py-string">'code'</tt><tt class="py-op">,</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">            <tt class="py-string">'pre'</tt><tt class="py-op">,</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">            <tt class="py-string">'img/'</tt><tt class="py-op">,</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">            <tt class="py-string">'h1'</tt><tt class="py-op">,</tt><tt class="py-string">'h2'</tt><tt class="py-op">,</tt><tt class="py-string">'h3'</tt><tt class="py-op">,</tt><tt class="py-string">'h4'</tt><tt class="py-op">,</tt><tt class="py-string">'h5'</tt><tt class="py-op">,</tt><tt class="py-string">'h6'</tt><tt class="py-op">,</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">            <tt class="py-string">'table'</tt><tt class="py-op">,</tt><tt class="py-string">'tr'</tt><tt class="py-op">,</tt><tt class="py-string">'td'</tt><tt class="py-op">,</tt><tt class="py-string">'div'</tt><tt class="py-op">,</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">            <tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line">        <tt class="py-param">allowed_attributes</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line">            <tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">            <tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'alt'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">            <tt class="py-string">'blockquote'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">            <tt class="py-string">'td'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'colspan'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">            <tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__init__-expanded"><a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line"><tt class="py-docstring">        :param text: the XML text</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line"><tt class="py-docstring">        :param sanitize: sanitize text using the permitted tags and allowed</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line"><tt class="py-docstring">            attributes (default False)</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line"><tt class="py-docstring">        :param permitted_tags: list of permitted tags (default: simple list of</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line"><tt class="py-docstring">            tags)</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line"><tt class="py-docstring">        :param allowed_attributes: dictionary of allowed attributed (default</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line"><tt class="py-docstring">            for A, IMG and BlockQuote).</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"><tt class="py-docstring">            The key is the tag; the value is a list of allowed attributes.</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-69" class="py-name" targets="Function web2py.gluon.sanitizer.sanitize()=web2py.gluon.sanitizer-module.html#sanitize"><a title="web2py.gluon.sanitizer.sanitize" class="py-name" href="#" onclick="return doclink('link-69', 'sanitize', 'link-69');">sanitize</a></tt><tt class="py-op">:</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt id="link-70" class="py-name"><a title="web2py.gluon.sanitizer" class="py-name" href="#" onclick="return doclink('link-70', 'sanitizer', 'link-1');">sanitizer</a></tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="web2py.gluon.sanitizer.sanitize" class="py-name" href="#" onclick="return doclink('link-71', 'sanitize', 'link-69');">sanitize</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">permitted_tags</tt><tt class="py-op">,</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">                    <tt class="py-name">allowed_attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt id="link-72" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-72', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">,</tt> <tt class="py-string">'xmlcharrefreplace'</tt><tt class="py-op">)</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"> </tt>
<a name="XML.xml"></a><div id="XML.xml-def"><a name="L471"></a><tt class="py-lineno"> 471</tt> <a class="py-toggle" href="#" id="XML.xml-toggle" onclick="return toggle('XML.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.xml-expanded"><a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> </tt>
</div><a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line"> </tt>
<a name="XML.__str__"></a><div id="XML.__str__-def"><a name="L474"></a><tt class="py-lineno"> 474</tt> <a class="py-toggle" href="#" id="XML.__str__-toggle" onclick="return toggle('XML.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__str__-expanded"><a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-73', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line"> </tt>
<a name="XML.__add__"></a><div id="XML.__add__-def"><a name="L477"></a><tt class="py-lineno"> 477</tt> <a class="py-toggle" href="#" id="XML.__add__-toggle" onclick="return toggle('XML.__add__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__add__">__add__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__add__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__add__-expanded"><a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
</div><a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line"> </tt>
<a name="XML.__radd__"></a><div id="XML.__radd__-def"><a name="L480"></a><tt class="py-lineno"> 480</tt> <a class="py-toggle" href="#" id="XML.__radd__-toggle" onclick="return toggle('XML.__radd__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__radd__">__radd__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__radd__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__radd__-expanded"><a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line"> </tt>
<a name="XML.__cmp__"></a><div id="XML.__cmp__-def"><a name="L483"></a><tt class="py-lineno"> 483</tt> <a class="py-toggle" href="#" id="XML.__cmp__-toggle" onclick="return toggle('XML.__cmp__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__cmp__">__cmp__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__cmp__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__cmp__-expanded"><a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">cmp</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line"> </tt>
<a name="XML.__hash__"></a><div id="XML.__hash__-def"><a name="L486"></a><tt class="py-lineno"> 486</tt> <a class="py-toggle" href="#" id="XML.__hash__-toggle" onclick="return toggle('XML.__hash__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__hash__">__hash__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__hash__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__hash__-expanded"><a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hash</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line"> </tt>
<a name="XML.__getattr__"></a><div id="XML.__getattr__-def"><a name="L489"></a><tt class="py-lineno"> 489</tt> <a class="py-toggle" href="#" id="XML.__getattr__-toggle" onclick="return toggle('XML.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__getattr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__getattr__-expanded"><a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-74" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-74', 'name', 'link-74');">name</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"> </tt>
<a name="XML.__getitem__"></a><div id="XML.__getitem__-def"><a name="L492"></a><tt class="py-lineno"> 492</tt> <a class="py-toggle" href="#" id="XML.__getitem__-toggle" onclick="return toggle('XML.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">i</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__getitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__getitem__-expanded"><a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
</div><a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"> </tt>
<a name="XML.__getslice__"></a><div id="XML.__getslice__-def"><a name="L495"></a><tt class="py-lineno"> 495</tt> <a class="py-toggle" href="#" id="XML.__getslice__-toggle" onclick="return toggle('XML.__getslice__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__getslice__">__getslice__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">i</tt><tt class="py-op">,</tt><tt class="py-param">j</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__getslice__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__getslice__-expanded"><a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">:</tt><tt class="py-name">j</tt><tt class="py-op">]</tt> </tt>
</div><a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line"> </tt>
<a name="XML.__iter__"></a><div id="XML.__iter__-def"><a name="L498"></a><tt class="py-lineno"> 498</tt> <a class="py-toggle" href="#" id="XML.__iter__-toggle" onclick="return toggle('XML.__iter__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__iter__">__iter__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__iter__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__iter__-expanded"><a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">yield</tt> <tt class="py-name">c</tt> </tt>
</div><a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"> </tt>
<a name="XML.__len__"></a><div id="XML.__len__-def"><a name="L501"></a><tt class="py-lineno"> 501</tt> <a class="py-toggle" href="#" id="XML.__len__-toggle" onclick="return toggle('XML.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.__len__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.__len__-expanded"><a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-75" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-75', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line"> </tt>
<a name="XML.flatten"></a><div id="XML.flatten-def"><a name="L504"></a><tt class="py-lineno"> 504</tt> <a class="py-toggle" href="#" id="XML.flatten-toggle" onclick="return toggle('XML.flatten');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#flatten">flatten</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">render</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.flatten-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.flatten-expanded"><a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"><tt class="py-docstring">        return the text stored by the XML object rendered by the render function</tt> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-76" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-76', 'render', 'link-4');">render</a></tt><tt class="py-op">:</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-77" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-77', 'render', 'link-4');">render</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> </tt>
</div><a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line"> </tt>
<a name="XML.elements"></a><div id="XML.elements-def"><a name="L512"></a><tt class="py-lineno"> 512</tt> <a class="py-toggle" href="#" id="XML.elements-toggle" onclick="return toggle('XML.elements');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XML-class.html#elements">elements</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML.elements-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XML.elements-expanded"><a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line"><tt class="py-docstring">        to be considered experimental since the behavior of this method is questionable</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line"><tt class="py-docstring">        another options could be TAG(self.text).elements(*args,**kargs)</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line"> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line"><tt class="py-comment">### important to allow safe session.flash=T(....)</tt> </tt>
<a name="XML_unpickle"></a><div id="XML_unpickle-def"><a name="L520"></a><tt class="py-lineno"> 520</tt> <a class="py-toggle" href="#" id="XML_unpickle-toggle" onclick="return toggle('XML_unpickle');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#XML_unpickle">XML_unpickle</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML_unpickle-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="XML_unpickle-expanded"><a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">marshal</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="XML_pickle"></a><div id="XML_pickle-def"><a name="L522"></a><tt class="py-lineno"> 522</tt> <a class="py-toggle" href="#" id="XML_pickle-toggle" onclick="return toggle('XML_pickle');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#XML_pickle">XML_pickle</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XML_pickle-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="XML_pickle-expanded"><a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-78" class="py-name" targets="Function web2py.gluon.html.XML_unpickle()=web2py.gluon.html-module.html#XML_unpickle"><a title="web2py.gluon.html.XML_unpickle" class="py-name" href="#" onclick="return doclink('link-78', 'XML_unpickle', 'link-78');">XML_unpickle</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">marshal</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
</div><a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line"><tt class="py-name">copy_reg</tt><tt class="py-op">.</tt><tt class="py-name">pickle</tt><tt class="py-op">(</tt><tt id="link-79" class="py-name" targets="Class web2py.gluon.html.XML=web2py.gluon.html.XML-class.html"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-79', 'XML', 'link-79');">XML</a></tt><tt class="py-op">,</tt> <tt id="link-80" class="py-name" targets="Function web2py.gluon.html.XML_pickle()=web2py.gluon.html-module.html#XML_pickle"><a title="web2py.gluon.html.XML_pickle" class="py-name" href="#" onclick="return doclink('link-80', 'XML_pickle', 'link-80');">XML_pickle</a></tt><tt class="py-op">,</tt> <tt id="link-81" class="py-name"><a title="web2py.gluon.html.XML_unpickle" class="py-name" href="#" onclick="return doclink('link-81', 'XML_unpickle', 'link-78');">XML_unpickle</a></tt><tt class="py-op">)</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line"> </tt>
<a name="DIV"></a><div id="DIV-def"><a name="L528"></a><tt class="py-lineno"> 528</tt> <a class="py-toggle" href="#" id="DIV-toggle" onclick="return toggle('DIV');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html">DIV</a><tt class="py-op">(</tt><tt class="py-base-class">XmlComponent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DIV-expanded"><a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"><tt class="py-docstring">    HTML helper, for easy generating and manipulating a DOM structure.</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line"><tt class="py-docstring">    Little or no validation is done.</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"><tt class="py-docstring">    Behaves like a dictionary regarding updating of attributes.</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line"><tt class="py-docstring">    Behaves like a list regarding inserting/appending components.</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; DIV('hello', 'world', _style='color:red;').xml()</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"><tt class="py-docstring">        '&lt;div style=\"color:red;\"&gt;helloworld&lt;/div&gt;'</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"><tt class="py-docstring">    all other HTML helpers are derived from DIV.</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line"><tt class="py-docstring">    _something=\"value\" attributes are transparently translated into</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"><tt class="py-docstring">    something=\"value\" HTML attributes</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line"> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">    <tt class="py-comment"># name of the tag, subclasses should update this</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># tags ending with a '/' denote classes that cannot</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># contain components</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-82" class="py-name" targets="Variable web2py.gluon.html.A.tag=web2py.gluon.html.A-class.html#tag,Variable web2py.gluon.html.B.tag=web2py.gluon.html.B-class.html#tag,Variable web2py.gluon.html.BEAUTIFY.tag=web2py.gluon.html.BEAUTIFY-class.html#tag,Variable web2py.gluon.html.BODY.tag=web2py.gluon.html.BODY-class.html#tag,Variable web2py.gluon.html.BR.tag=web2py.gluon.html.BR-class.html#tag,Variable web2py.gluon.html.BUTTON.tag=web2py.gluon.html.BUTTON-class.html#tag,Variable web2py.gluon.html.CAT.tag=web2py.gluon.html.CAT-class.html#tag,Variable web2py.gluon.html.CENTER.tag=web2py.gluon.html.CENTER-class.html#tag,Variable web2py.gluon.html.COL.tag=web2py.gluon.html.COL-class.html#tag,Variable web2py.gluon.html.COLGROUP.tag=web2py.gluon.html.COLGROUP-class.html#tag,Variable web2py.gluon.html.DIV.tag=web2py.gluon.html.DIV-class.html#tag,Variable web2py.gluon.html.EM.tag=web2py.gluon.html.EM-class.html#tag,Variable web2py.gluon.html.EMBED.tag=web2py.gluon.html.EMBED-class.html#tag,Variable web2py.gluon.html.FIELDSET.tag=web2py.gluon.html.FIELDSET-class.html#tag,Variable web2py.gluon.html.FORM.tag=web2py.gluon.html.FORM-class.html#tag,Variable web2py.gluon.html.H1.tag=web2py.gluon.html.H1-class.html#tag,Variable web2py.gluon.html.H2.tag=web2py.gluon.html.H2-class.html#tag,Variable web2py.gluon.html.H3.tag=web2py.gluon.html.H3-class.html#tag,Variable web2py.gluon.html.H4.tag=web2py.gluon.html.H4-class.html#tag,Variable web2py.gluon.html.H5.tag=web2py.gluon.html.H5-class.html#tag,Variable web2py.gluon.html.H6.tag=web2py.gluon.html.H6-class.html#tag,Variable web2py.gluon.html.HEAD.tag=web2py.gluon.html.HEAD-class.html#tag,Variable web2py.gluon.html.HR.tag=web2py.gluon.html.HR-class.html#tag,Variable web2py.gluon.html.HTML.tag=web2py.gluon.html.HTML-class.html#tag,Variable web2py.gluon.html.I.tag=web2py.gluon.html.I-class.html#tag,Variable web2py.gluon.html.IFRAME.tag=web2py.gluon.html.IFRAME-class.html#tag,Variable web2py.gluon.html.IMG.tag=web2py.gluon.html.IMG-class.html#tag,Variable web2py.gluon.html.INPUT.tag=web2py.gluon.html.INPUT-class.html#tag,Variable web2py.gluon.html.LABEL.tag=web2py.gluon.html.LABEL-class.html#tag,Variable web2py.gluon.html.LEGEND.tag=web2py.gluon.html.LEGEND-class.html#tag,Variable web2py.gluon.html.LI.tag=web2py.gluon.html.LI-class.html#tag,Variable web2py.gluon.html.LINK.tag=web2py.gluon.html.LINK-class.html#tag,Variable web2py.gluon.html.MENU.tag=web2py.gluon.html.MENU-class.html#tag,Variable web2py.gluon.html.META.tag=web2py.gluon.html.META-class.html#tag,Variable web2py.gluon.html.OBJECT.tag=web2py.gluon.html.OBJECT-class.html#tag,Variable web2py.gluon.html.OL.tag=web2py.gluon.html.OL-class.html#tag,Variable web2py.gluon.html.OPTGROUP.tag=web2py.gluon.html.OPTGROUP-class.html#tag,Variable web2py.gluon.html.OPTION.tag=web2py.gluon.html.OPTION-class.html#tag,Variable web2py.gluon.html.P.tag=web2py.gluon.html.P-class.html#tag,Variable web2py.gluon.html.PRE.tag=web2py.gluon.html.PRE-class.html#tag,Variable web2py.gluon.html.SCRIPT.tag=web2py.gluon.html.SCRIPT-class.html#tag,Variable web2py.gluon.html.SELECT.tag=web2py.gluon.html.SELECT-class.html#tag,Variable web2py.gluon.html.SPAN.tag=web2py.gluon.html.SPAN-class.html#tag,Variable web2py.gluon.html.STYLE.tag=web2py.gluon.html.STYLE-class.html#tag,Variable web2py.gluon.html.TABLE.tag=web2py.gluon.html.TABLE-class.html#tag,Variable web2py.gluon.html.TBODY.tag=web2py.gluon.html.TBODY-class.html#tag,Variable web2py.gluon.html.TD.tag=web2py.gluon.html.TD-class.html#tag,Variable web2py.gluon.html.TEXTAREA.tag=web2py.gluon.html.TEXTAREA-class.html#tag,Variable web2py.gluon.html.TFOOT.tag=web2py.gluon.html.TFOOT-class.html#tag,Variable web2py.gluon.html.TH.tag=web2py.gluon.html.TH-class.html#tag,Variable web2py.gluon.html.THEAD.tag=web2py.gluon.html.THEAD-class.html#tag,Variable web2py.gluon.html.TITLE.tag=web2py.gluon.html.TITLE-class.html#tag,Variable web2py.gluon.html.TR.tag=web2py.gluon.html.TR-class.html#tag,Variable web2py.gluon.html.TT.tag=web2py.gluon.html.TT-class.html#tag,Variable web2py.gluon.html.UL.tag=web2py.gluon.html.UL-class.html#tag,Variable web2py.gluon.html.XHTML.tag=web2py.gluon.html.XHTML-class.html#tag"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-82', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'div'</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line"> </tt>
<a name="DIV.__init__"></a><div id="DIV.__init__-def"><a name="L552"></a><tt class="py-lineno"> 552</tt> <a class="py-toggle" href="#" id="DIV.__init__-toggle" onclick="return toggle('DIV.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">components</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__init__-expanded"><a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line"><tt class="py-docstring">        :param *components: any components that should be nested in this element</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line"><tt class="py-docstring">        :param **attributes: any attributes you want to give to this element</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line"><tt class="py-docstring">        :raises SyntaxError: when a stand alone tag receives components</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line"> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-83', 'tag', 'link-82');">tag</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'&lt;%s&gt; tags cannot have components'</tt>\ </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">                 <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-84', 'tag', 'link-82');">tag</a></tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-85', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">components</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt><tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">components</tt><tt class="py-op">)</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name" targets="Method web2py.gluon.html.DIV._fixup()=web2py.gluon.html.DIV-class.html#_fixup,Method web2py.gluon.html.OPTGROUP._fixup()=web2py.gluon.html.OPTGROUP-class.html#_fixup,Method web2py.gluon.html.OPTION._fixup()=web2py.gluon.html.OPTION-class.html#_fixup,Method web2py.gluon.html.SELECT._fixup()=web2py.gluon.html.SELECT-class.html#_fixup,Method web2py.gluon.html.TABLE._fixup()=web2py.gluon.html.TABLE-class.html#_fixup,Method web2py.gluon.html.TBODY._fixup()=web2py.gluon.html.TBODY-class.html#_fixup,Method web2py.gluon.html.TFOOT._fixup()=web2py.gluon.html.TFOOT-class.html#_fixup,Method web2py.gluon.html.THEAD._fixup()=web2py.gluon.html.THEAD-class.html#_fixup,Method web2py.gluon.html.TR._fixup()=web2py.gluon.html.TR-class.html#_fixup,Method web2py.gluon.html.UL._fixup()=web2py.gluon.html.UL-class.html#_fixup"><a title="web2py.gluon.html.DIV._fixup
web2py.gluon.html.OPTGROUP._fixup
web2py.gluon.html.OPTION._fixup
web2py.gluon.html.SELECT._fixup
web2py.gluon.html.TABLE._fixup
web2py.gluon.html.TBODY._fixup
web2py.gluon.html.TFOOT._fixup
web2py.gluon.html.THEAD._fixup
web2py.gluon.html.TR._fixup
web2py.gluon.html.UL._fixup" class="py-name" href="#" onclick="return doclink('link-86', '_fixup', 'link-86');">_fixup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line">        <tt class="py-comment"># converts special attributes in components attributes</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name" targets="Method web2py.gluon.html.DIV._postprocessing()=web2py.gluon.html.DIV-class.html#_postprocessing,Method web2py.gluon.html.FORM._postprocessing()=web2py.gluon.html.FORM-class.html#_postprocessing,Method web2py.gluon.html.INPUT._postprocessing()=web2py.gluon.html.INPUT-class.html#_postprocessing,Method web2py.gluon.html.SELECT._postprocessing()=web2py.gluon.html.SELECT-class.html#_postprocessing,Method web2py.gluon.html.TEXTAREA._postprocessing()=web2py.gluon.html.TEXTAREA-class.html#_postprocessing"><a title="web2py.gluon.html.DIV._postprocessing
web2py.gluon.html.FORM._postprocessing
web2py.gluon.html.INPUT._postprocessing
web2py.gluon.html.SELECT._postprocessing
web2py.gluon.html.TEXTAREA._postprocessing" class="py-name" href="#" onclick="return doclink('link-87', '_postprocessing', 'link-87');">_postprocessing</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name" targets="Method web2py.gluon.html.DIV._setnode()=web2py.gluon.html.DIV-class.html#_setnode"><a title="web2py.gluon.html.DIV._setnode" class="py-name" href="#" onclick="return doclink('link-88', '_setnode', 'link-88');">_setnode</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
</div><a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line"> </tt>
<a name="DIV.update"></a><div id="DIV.update-def"><a name="L575"></a><tt class="py-lineno"> 575</tt> <a class="py-toggle" href="#" id="DIV.update-toggle" onclick="return toggle('DIV.update');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#update">update</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.update-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.update-expanded"><a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line"><tt class="py-docstring">        dictionary like updating of the tag attributes</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line"> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kargs</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-89', 'items', 'link-29');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line"> </tt>
<a name="DIV.append"></a><div id="DIV.append-def"><a name="L584"></a><tt class="py-lineno"> 584</tt> <a class="py-toggle" href="#" id="DIV.append-toggle" onclick="return toggle('DIV.append');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#append">append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.append-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.append-expanded"><a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line"><tt class="py-docstring">        list style appending of components</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a=DIV()</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a.append(SPAN('x'))</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print a</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;div&gt;&lt;span&gt;x&lt;/span&gt;&lt;/div&gt;</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.html.DIV._setnode" class="py-name" href="#" onclick="return doclink('link-90', '_setnode', 'link-88');">_setnode</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-91', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.html.DIV._fixup
web2py.gluon.html.OPTGROUP._fixup
web2py.gluon.html.OPTION._fixup
web2py.gluon.html.SELECT._fixup
web2py.gluon.html.TABLE._fixup
web2py.gluon.html.TBODY._fixup
web2py.gluon.html.TFOOT._fixup
web2py.gluon.html.THEAD._fixup
web2py.gluon.html.TR._fixup
web2py.gluon.html.UL._fixup" class="py-name" href="#" onclick="return doclink('link-92', '_fixup', 'link-86');">_fixup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt>
</div><a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line"> </tt>
<a name="DIV.insert"></a><div id="DIV.insert-def"><a name="L598"></a><tt class="py-lineno"> 598</tt> <a class="py-toggle" href="#" id="DIV.insert-toggle" onclick="return toggle('DIV.insert');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#insert">insert</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.insert-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.insert-expanded"><a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line"><tt class="py-docstring">        list style inserting of components</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a=DIV()</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a.insert(0,SPAN('x'))</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print a</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;div&gt;&lt;span&gt;x&lt;/span&gt;&lt;/div&gt;</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="web2py.gluon.html.DIV._setnode" class="py-name" href="#" onclick="return doclink('link-93', '_setnode', 'link-88');">_setnode</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-94', 'insert', 'link-94');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.html.DIV._fixup
web2py.gluon.html.OPTGROUP._fixup
web2py.gluon.html.OPTION._fixup
web2py.gluon.html.SELECT._fixup
web2py.gluon.html.TABLE._fixup
web2py.gluon.html.TBODY._fixup
web2py.gluon.html.TFOOT._fixup
web2py.gluon.html.THEAD._fixup
web2py.gluon.html.TR._fixup
web2py.gluon.html.UL._fixup" class="py-name" href="#" onclick="return doclink('link-95', '_fixup', 'link-86');">_fixup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt>
</div><a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line"> </tt>
<a name="DIV.__getitem__"></a><div id="DIV.__getitem__-def"><a name="L612"></a><tt class="py-lineno"> 612</tt> <a class="py-toggle" href="#" id="DIV.__getitem__-toggle" onclick="return toggle('DIV.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__getitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__getitem__-expanded"><a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line"><tt class="py-docstring">        gets attribute with name 'i' or component #i.</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line"><tt class="py-docstring">        If attribute 'i' is not found returns None</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line"><tt class="py-docstring">        :param i: index</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line"><tt class="py-docstring">           if i is a string: the name of the attribute</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line"><tt class="py-docstring">           otherwise references to number of the component</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line"> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
</div><a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"> </tt>
<a name="DIV.__setitem__"></a><div id="DIV.__setitem__-def"><a name="L630"></a><tt class="py-lineno"> 630</tt> <a class="py-toggle" href="#" id="DIV.__setitem__-toggle" onclick="return toggle('DIV.__setitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__setitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__setitem__-expanded"><a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-docstring">        sets attribute with name 'i' or component #i.</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line"><tt class="py-docstring">        :param i: index</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line"><tt class="py-docstring">           if i is a string: the name of the attribute</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line"><tt class="py-docstring">           otherwise references to number of the component</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: the new value</tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.html.DIV._setnode" class="py-name" href="#" onclick="return doclink('link-96', '_setnode', 'link-88');">_setnode</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line"> </tt>
<a name="DIV.__delitem__"></a><div id="DIV.__delitem__-def"><a name="L645"></a><tt class="py-lineno"> 645</tt> <a class="py-toggle" href="#" id="DIV.__delitem__-toggle" onclick="return toggle('DIV.__delitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__delitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__delitem__-expanded"><a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line"><tt class="py-docstring">        deletes attribute with name 'i' or component #i.</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line"><tt class="py-docstring">        :param i: index</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line"><tt class="py-docstring">           if i is a string: the name of the attribute</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line"><tt class="py-docstring">           otherwise references to number of the component</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line"> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
</div><a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line"> </tt>
<a name="DIV.__len__"></a><div id="DIV.__len__-def"><a name="L659"></a><tt class="py-lineno"> 659</tt> <a class="py-toggle" href="#" id="DIV.__len__-toggle" onclick="return toggle('DIV.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__len__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__len__-expanded"><a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line"><tt class="py-docstring">        returns the number of included components</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-97" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-97', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">)</tt> </tt>
</div><a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line"> </tt>
<a name="DIV.__nonzero__"></a><div id="DIV.__nonzero__-def"><a name="L665"></a><tt class="py-lineno"> 665</tt> <a class="py-toggle" href="#" id="DIV.__nonzero__-toggle" onclick="return toggle('DIV.__nonzero__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__nonzero__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__nonzero__-expanded"><a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line"><tt class="py-docstring">        always return True</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line"> </tt>
<a name="DIV._fixup"></a><div id="DIV._fixup-def"><a name="L671"></a><tt class="py-lineno"> 671</tt> <a class="py-toggle" href="#" id="DIV._fixup-toggle" onclick="return toggle('DIV._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._fixup-expanded"><a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line"><tt class="py-docstring">        Handling of provided components.</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line"><tt class="py-docstring">        Nothing to fixup yet. May be overridden by subclasses,</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line"><tt class="py-docstring">        eg for wrapping some components in another component or blocking them.</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
</div><a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line"> </tt>
<a name="DIV._wrap_components"></a><div id="DIV._wrap_components-def"><a name="L680"></a><tt class="py-lineno"> 680</tt> <a class="py-toggle" href="#" id="DIV._wrap_components-toggle" onclick="return toggle('DIV._wrap_components');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">allowed_parents</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">                         <tt class="py-param">wrap_parent</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">                         <tt class="py-param">wrap_lambda</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._wrap_components-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._wrap_components-expanded"><a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line"><tt class="py-docstring">        helper for _fixup. Checks if a component is in allowed_parents,</tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line"><tt class="py-docstring">        otherwise wraps it in wrap_parent</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line"><tt class="py-docstring">        :param allowed_parents: (tuple) classes that the component should be an</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line"><tt class="py-docstring">            instance of</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line"><tt class="py-docstring">        :param wrap_parent: the class to wrap the component in, if needed</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line"><tt class="py-docstring">        :param wrap_lambda: lambda to use for wrapping, if needed</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">        <tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">allowed_parents</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">wrap_lambda</tt><tt class="py-op">:</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">                <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">wrap_lambda</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">                <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">wrap_parent</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt id="link-98" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.DIV()=web2py.gluon.dal.BaseAdapter-class.html#DIV,Method web2py.gluon.dal.NoSQLAdapter.DIV()=web2py.gluon.dal.NoSQLAdapter-class.html#DIV,Class web2py.gluon.html.DIV=web2py.gluon.html.DIV-class.html"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-98', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line">            <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-99', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">components</tt> </tt>
</div><a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"> </tt>
<a name="DIV._postprocessing"></a><div id="DIV._postprocessing-def"><a name="L706"></a><tt class="py-lineno"> 706</tt> <a class="py-toggle" href="#" id="DIV._postprocessing-toggle" onclick="return toggle('DIV._postprocessing');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._postprocessing-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._postprocessing-expanded"><a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line"><tt class="py-docstring">        Handling of attributes (normally the ones not prefixed with '_').</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line"><tt class="py-docstring">        Nothing to postprocess yet. May be overridden by subclasses</tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
</div><a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line"> </tt>
<a name="DIV._traverse"></a><div id="DIV._traverse-def"><a name="L714"></a><tt class="py-lineno"> 714</tt> <a class="py-toggle" href="#" id="DIV._traverse-toggle" onclick="return toggle('DIV._traverse');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">status</tt><tt class="py-op">,</tt> <tt class="py-param">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._traverse-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._traverse-expanded"><a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line">        <tt class="py-comment"># TODO: docstring</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">newstatus</tt> <tt class="py-op">=</tt> <tt class="py-name">status</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'_traverse'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name" targets="Method web2py.gluon.html.DIV._traverse()=web2py.gluon.html.DIV-class.html#_traverse"><a title="web2py.gluon.html.DIV._traverse" class="py-name" href="#" onclick="return doclink('link-100', '_traverse', 'link-100');">_traverse</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">latest</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">latest</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'hideerror'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">hideerror</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">                <tt class="py-name">newstatus</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.html.DIV._traverse" class="py-name" href="#" onclick="return doclink('link-101', '_traverse', 'link-100');">_traverse</a></tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">newstatus</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line"> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">        <tt class="py-comment"># for input, textarea, select, option</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># deal with 'value' and 'validation'</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line">        <tt id="link-102" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-102', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_name'</tt><tt class="py-op">]</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">newstatus</tt><tt class="py-op">:</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">            <tt class="py-name">newstatus</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name" targets="Method web2py.gluon.dal.Table._validate()=web2py.gluon.dal.Table-class.html#_validate,Method web2py.gluon.html.DIV._validate()=web2py.gluon.html.DIV-class.html#_validate,Method web2py.gluon.html.INPUT._validate()=web2py.gluon.html.INPUT-class.html#_validate,Method web2py.gluon.tools.Recaptcha._validate()=web2py.gluon.tools.Recaptcha-class.html#_validate"><a title="web2py.gluon.dal.Table._validate
web2py.gluon.html.DIV._validate
web2py.gluon.html.INPUT._validate
web2py.gluon.tools.Recaptcha._validate" class="py-name" href="#" onclick="return doclink('link-103', '_validate', 'link-103');">_validate</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.html.DIV._postprocessing
web2py.gluon.html.FORM._postprocessing
web2py.gluon.html.INPUT._postprocessing
web2py.gluon.html.SELECT._postprocessing
web2py.gluon.html.TEXTAREA._postprocessing" class="py-name" href="#" onclick="return doclink('link-104', '_postprocessing', 'link-87');">_postprocessing</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'old_value'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'old_value'</tt><tt class="py-op">]</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.html.DIV._postprocessing
web2py.gluon.html.FORM._postprocessing
web2py.gluon.html.INPUT._postprocessing
web2py.gluon.html.SELECT._postprocessing
web2py.gluon.html.TEXTAREA._postprocessing" class="py-name" href="#" onclick="return doclink('link-105', '_postprocessing', 'link-87');">_postprocessing</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-106" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-106', 'name', 'link-74');">name</a></tt> <tt class="py-keyword">and</tt> <tt id="link-107" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-107', 'name', 'link-74');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-108', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.html.DIV._postprocessing
web2py.gluon.html.FORM._postprocessing
web2py.gluon.html.INPUT._postprocessing
web2py.gluon.html.SELECT._postprocessing
web2py.gluon.html.TEXTAREA._postprocessing" class="py-name" href="#" onclick="return doclink('link-109', '_postprocessing', 'link-87');">_postprocessing</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-110', 'name', 'link-74');">name</a></tt><tt class="py-op">:</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">latest</tt><tt class="py-op">[</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-111', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">newstatus</tt> </tt>
</div><a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line"> </tt>
<a name="DIV._validate"></a><div id="DIV._validate-def"><a name="L745"></a><tt class="py-lineno"> 745</tt> <a class="py-toggle" href="#" id="DIV._validate-toggle" onclick="return toggle('DIV._validate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_validate">_validate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._validate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._validate-expanded"><a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line"><tt class="py-docstring">        nothing to validate yet. May be overridden by subclasses</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line"> </tt>
<a name="DIV._setnode"></a><div id="DIV._setnode-def"><a name="L751"></a><tt class="py-lineno"> 751</tt> <a class="py-toggle" href="#" id="DIV._setnode-toggle" onclick="return toggle('DIV._setnode');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._setnode-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._setnode-expanded"><a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt id="link-112" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-112', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">            <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line"> </tt>
<a name="DIV._xml"></a><div id="DIV._xml-def"><a name="L755"></a><tt class="py-lineno"> 755</tt> <a class="py-toggle" href="#" id="DIV._xml-toggle" onclick="return toggle('DIV._xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#_xml">_xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV._xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV._xml-expanded"><a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line"><tt class="py-docstring">        helper for xml generation. Returns separately:</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line"><tt class="py-docstring">        - the component attributes</tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line"><tt class="py-docstring">        - the generated xml of the inner components</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line"><tt class="py-docstring">        Component attributes start with an underscore ('_') and</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line"><tt class="py-docstring">        do not have a False or None value. The underscore is removed.</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line"><tt class="py-docstring">        A value of True is replaced with the attribute name.</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line"><tt class="py-docstring">        :returns: tuple: (attributes, components)</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line"> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">        <tt class="py-comment"># get the attributes for this component</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># (they start with '_', others may have special meanings)</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">fa</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'_'</tt><tt class="py-op">:</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line">            <tt id="link-113" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-113', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt id="link-114" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-114', 'name', 'link-74');">name</a></tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">False</tt> <tt class="py-keyword">or</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">            <tt class="py-name">fa</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-115', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt> <tt id="link-116" class="py-name" targets="Function web2py.gluon.html.xmlescape()=web2py.gluon.html-module.html#xmlescape"><a title="web2py.gluon.html.xmlescape" class="py-name" href="#" onclick="return doclink('link-116', 'xmlescape', 'link-116');">xmlescape</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line"> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">        <tt class="py-comment"># get the xml for the inner components</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">co</tt> <tt class="py-op">=</tt> <tt id="link-117" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-117', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-118" class="py-name"><a title="web2py.gluon.html.xmlescape" class="py-name" href="#" onclick="return doclink('link-118', 'xmlescape', 'link-116');">xmlescape</a></tt><tt class="py-op">(</tt><tt class="py-name">component</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">component</tt> <tt class="py-keyword">in</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line">                     <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line"> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">)</tt> </tt>
</div><a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line"> </tt>
<a name="DIV.xml"></a><div id="DIV.xml-def"><a name="L788"></a><tt class="py-lineno"> 788</tt> <a class="py-toggle" href="#" id="DIV.xml-toggle" onclick="return toggle('DIV.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.xml-expanded"><a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line"><tt class="py-docstring">        generates the xml for this component.</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line"> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name" targets="Method web2py.gluon.html.DIV._xml()=web2py.gluon.html.DIV-class.html#_xml"><a title="web2py.gluon.html.DIV._xml" class="py-name" href="#" onclick="return doclink('link-119', '_xml', 'link-119');">_xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line"> </tt>
<a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-120', 'tag', 'link-82');">tag</a></tt><tt class="py-op">:</tt> </tt>
<a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">co</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line"> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-121', 'tag', 'link-82');">tag</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt><tt class="py-op">:</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">            <tt class="py-comment"># &lt;tag [attributes] /&gt;</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;%s%s /&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-122', 'tag', 'link-82');">tag</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">fa</tt><tt class="py-op">)</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line"> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">        <tt class="py-comment"># else: &lt;tag [attributes]&gt;  inner components xml &lt;/tag&gt;</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;%s%s&gt;%s&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-123', 'tag', 'link-82');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-124', 'tag', 'link-82');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line"> </tt>
<a name="DIV.__str__"></a><div id="DIV.__str__-def"><a name="L805"></a><tt class="py-lineno"> 805</tt> <a class="py-toggle" href="#" id="DIV.__str__-toggle" onclick="return toggle('DIV.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.__str__-expanded"><a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line"><tt class="py-docstring">        str(COMPONENT) returns equals COMPONENT.xml()</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line"> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-125', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line"> </tt>
<a name="DIV.flatten"></a><div id="DIV.flatten-def"><a name="L812"></a><tt class="py-lineno"> 812</tt> <a class="py-toggle" href="#" id="DIV.flatten-toggle" onclick="return toggle('DIV.flatten');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#flatten">flatten</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">render</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.flatten-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.flatten-expanded"><a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line"><tt class="py-docstring">        return the text stored by the DIV object rendered by the render function</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line"><tt class="py-docstring">        the render function must take text, tagname, and attributes</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line"><tt class="py-docstring">        render=None is equivalent to render=lambda text, tag, attr: text</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; markdown = lambda text,tag=None,attributes={}: \</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line"><tt class="py-docstring">                        {None: re.sub('\s+',' ',text), \</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line"><tt class="py-docstring">                         'h1':'#'+text+'\\n\\n', \</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line"><tt class="py-docstring">                         'p':text+'\\n'}.get(tag,text)</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a=TAG('&lt;h1&gt;Header&lt;/h1&gt;&lt;p&gt;this is a     test&lt;/p&gt;')</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a.flatten(markdown)</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line"><tt class="py-docstring">        '#Header\\n\\nthis is a test\\n'</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line"> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt id="link-126" class="py-name" targets="Class web2py.gluon.html.XmlComponent=web2py.gluon.html.XmlComponent-class.html"><a title="web2py.gluon.html.XmlComponent" class="py-name" href="#" onclick="return doclink('link-126', 'XmlComponent', 'link-126');">XmlComponent</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line">                <tt id="link-127" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-127', 's', 'link-127');">s</a></tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name" targets="Method web2py.gluon.html.DIV.flatten()=web2py.gluon.html.DIV-class.html#flatten,Method web2py.gluon.html.MARKMIN.flatten()=web2py.gluon.html.MARKMIN-class.html#flatten,Method web2py.gluon.html.XML.flatten()=web2py.gluon.html.XML-class.html#flatten"><a title="web2py.gluon.html.DIV.flatten
web2py.gluon.html.MARKMIN.flatten
web2py.gluon.html.XML.flatten" class="py-name" href="#" onclick="return doclink('link-128', 'flatten', 'link-128');">flatten</a></tt><tt class="py-op">(</tt><tt id="link-129" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-129', 'render', 'link-4');">render</a></tt><tt class="py-op">)</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-130', 'render', 'link-4');">render</a></tt><tt class="py-op">:</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">                <tt id="link-131" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-131', 's', 'link-127');">s</a></tt><tt class="py-op">=</tt><tt id="link-132" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-132', 'render', 'link-4');">render</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">                <tt id="link-133" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-133', 's', 'link-127');">s</a></tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">            <tt class="py-name">text</tt><tt class="py-op">+=</tt><tt id="link-134" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-134', 's', 'link-127');">s</a></tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-135" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-135', 'render', 'link-4');">render</a></tt><tt class="py-op">:</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt id="link-136" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-136', 'render', 'link-4');">render</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-137', 'tag', 'link-82');">tag</a></tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line"> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">    <tt id="link-138" class="py-name" targets="Variable web2py.gluon.html.DIV.regex_tag=web2py.gluon.html.DIV-class.html#regex_tag"><a title="web2py.gluon.html.DIV.regex_tag" class="py-name" href="#" onclick="return doclink('link-138', 'regex_tag', 'link-138');">regex_tag</a></tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^[\w\-\:]+'</tt><tt class="py-op">)</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line">    <tt id="link-139" class="py-name" targets="Variable web2py.gluon.html.DIV.regex_id=web2py.gluon.html.DIV-class.html#regex_id"><a title="web2py.gluon.html.DIV.regex_id" class="py-name" href="#" onclick="return doclink('link-139', 'regex_id', 'link-139');">regex_id</a></tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'#([\w\-]+)'</tt><tt class="py-op">)</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">    <tt id="link-140" class="py-name" targets="Variable web2py.gluon.html.DIV.regex_class=web2py.gluon.html.DIV-class.html#regex_class"><a title="web2py.gluon.html.DIV.regex_class" class="py-name" href="#" onclick="return doclink('link-140', 'regex_class', 'link-140');">regex_class</a></tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'\.([\w\-]+)'</tt><tt class="py-op">)</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">    <tt id="link-141" class="py-name" targets="Variable web2py.gluon.html.DIV.regex_attr=web2py.gluon.html.DIV-class.html#regex_attr"><a title="web2py.gluon.html.DIV.regex_attr" class="py-name" href="#" onclick="return doclink('link-141', 'regex_attr', 'link-141');">regex_attr</a></tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'\[([\w\-\:]+)=(.*?)\]'</tt><tt class="py-op">)</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line"> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line"> </tt>
<a name="DIV.elements"></a><div id="DIV.elements-def"><a name="L846"></a><tt class="py-lineno"> 846</tt> <a class="py-toggle" href="#" id="DIV.elements-toggle" onclick="return toggle('DIV.elements');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#elements">elements</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.elements-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.elements-expanded"><a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line"><tt class="py-docstring">        find all component that match the supplied attribute dictionary,</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line"><tt class="py-docstring">        or None if nothing could be found</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line"><tt class="py-docstring">        All components of the components are searched.</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a = DIV(DIV(SPAN('x'),3,DIV(SPAN('y'))))</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; for c in a.elements('span',first_only=True): c[0]='z'</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print a</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;div&gt;&lt;div&gt;&lt;span&gt;z&lt;/span&gt;3&lt;div&gt;&lt;span&gt;y&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; for c in a.elements('span'): c[0]='z'</tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print a</tt> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;div&gt;&lt;div&gt;&lt;span&gt;z&lt;/span&gt;3&lt;div&gt;&lt;span&gt;z&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line"><tt class="py-docstring">        It also supports a syntax compatible with jQuery</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a=TAG('&lt;div&gt;&lt;span&gt;&lt;a id="1-1" u:v=$&gt;hello&lt;/a&gt;&lt;/span&gt;&lt;p class="this is a test"&gt;world&lt;/p&gt;&lt;/div&gt;')</tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; for e in a.elements('div a#1-1, p.is'): print e.flatten()</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line"><tt class="py-docstring">        hello</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line"><tt class="py-docstring">        world</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; for e in a.elements('#1-1'): print e.flatten()</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line"><tt class="py-docstring">        hello</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a.elements('a[u:v=$]')[0].xml()</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line"><tt class="py-docstring">        '&lt;a id="1-1" u:v="$"&gt;hello&lt;/a&gt;'</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a=FORM( INPUT(_type='text'), SELECT(range(1)), TEXTAREA() )</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; for c in a.elements('input, select, textarea'): c['_disabled'] = 'disabled'</tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; a.xml()</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line"><tt class="py-docstring">        '&lt;form action="" enctype="multipart/form-data" method="post"&gt;&lt;input disabled="disabled" type="text" /&gt;&lt;select disabled="disabled"&gt;&lt;option value="0"&gt;0&lt;/option&gt;&lt;/select&gt;&lt;textarea cols="40" disabled="disabled" rows="10"&gt;&lt;/textarea&gt;&lt;/form&gt;'</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-142" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-142', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line">            <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-143', 'strip', 'link-143');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">a</tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-144" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-144', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line">            <tt class="py-name">subset</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name" targets="Method web2py.gluon.html.DIV.elements()=web2py.gluon.html.DIV-class.html#elements,Method web2py.gluon.html.MARKMIN.elements()=web2py.gluon.html.MARKMIN-class.html#elements,Method web2py.gluon.html.XML.elements()=web2py.gluon.html.XML-class.html#elements"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-145', 'elements', 'link-145');">elements</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">a</tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">]</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-146" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-146', 'b', 'link-146');">b</a></tt><tt class="py-op">:</tt><tt class="py-name">a</tt><tt class="py-op">+</tt><tt id="link-147" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-147', 'b', 'link-146');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">subset</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-148" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-148', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">            <tt id="link-149" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-149', 'items', 'link-29');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-150" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-150', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-151', 'items', 'link-29');">items</a></tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line">                <tt class="py-name">subset</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-152', 'elements', 'link-145');">elements</a></tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-153', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt id="link-154" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-154', 'items', 'link-29');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">a</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-155', 'elements', 'link-145');">elements</a></tt><tt class="py-op">(</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-156', 'items', 'link-29');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-157" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-157', 'b', 'link-146');">b</a></tt><tt class="py-op">:</tt><tt class="py-name">a</tt><tt class="py-op">+</tt><tt id="link-158" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-158', 'b', 'link-146');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">subset</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">                <tt class="py-name">item</tt><tt class="py-op">=</tt><tt id="link-159" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-159', 'items', 'link-29');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-string">'#'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">item</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">item</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'['</tt> <tt class="py-keyword">in</tt> <tt class="py-name">item</tt><tt class="py-op">:</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line">                    <tt class="py-name">match_tag</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="web2py.gluon.html.DIV.regex_tag" class="py-name" href="#" onclick="return doclink('link-160', 'regex_tag', 'link-138');">regex_tag</a></tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-161', 'search', 'link-43');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">                    <tt class="py-name">match_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="web2py.gluon.html.DIV.regex_id" class="py-name" href="#" onclick="return doclink('link-162', 'regex_id', 'link-139');">regex_id</a></tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-163', 'search', 'link-43');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">                    <tt class="py-name">match_class</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.html.DIV.regex_class" class="py-name" href="#" onclick="return doclink('link-164', 'regex_class', 'link-140');">regex_class</a></tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-165', 'search', 'link-43');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line">                    <tt class="py-name">match_attr</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="web2py.gluon.html.DIV.regex_attr" class="py-name" href="#" onclick="return doclink('link-166', 'regex_attr', 'link-141');">regex_attr</a></tt><tt class="py-op">.</tt><tt class="py-name">finditer</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line">                    <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">match_tag</tt><tt class="py-op">:</tt> <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">match_tag</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">match_id</tt><tt class="py-op">:</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'_id'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">match_id</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">match_class</tt><tt class="py-op">:</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'(?&lt;!\w)%s(?!\w)'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">                       <tt class="py-name">match_class</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">,</tt><tt class="py-string">'\\-'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt><tt class="py-string">'\\:'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">match_attr</tt><tt class="py-op">:</tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line">                        <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'_'</tt><tt class="py-op">+</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-167', 'elements', 'link-145');">elements</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">)</tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line">        <tt class="py-comment"># make a copy of the components</tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">matches</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line">        <tt class="py-name">first_only</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">kargs</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-168', 'has_key', 'link-28');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">"first_only"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line">            <tt class="py-name">first_only</tt> <tt class="py-op">=</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">"first_only"</tt><tt class="py-op">]</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">"first_only"</tt><tt class="py-op">]</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">        <tt class="py-comment"># check if the component has an attribute with the same</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># value as provided</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">        <tt id="link-169" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-169', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-string">'tag'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"/"</tt><tt class="py-op">,</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt id="link-170" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-170', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line">            <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kargs</tt><tt class="py-op">.</tt><tt id="link-171" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-171', 'items', 'link-29');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">                    <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-172" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-172', 'search', 'link-43');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">                    <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">                <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'find'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kargs</tt><tt class="py-op">:</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line">            <tt id="link-173" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-173', 'find', 'link-173');">find</a></tt> <tt class="py-op">=</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'find'</tt><tt class="py-op">]</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-174', 'find', 'link-173');">find</a></tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-175" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-175', 'find', 'link-173');">find</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">c</tt><tt class="py-op">:</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">                        <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-176" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-176', 'find', 'link-173');">find</a></tt><tt class="py-op">.</tt><tt id="link-177" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-177', 'search', 'link-43');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">                        <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">        <tt class="py-comment"># if found, return the component</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">check</tt><tt class="py-op">:</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">            <tt class="py-name">matches</tt><tt class="py-op">.</tt><tt id="link-178" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-178', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">first_only</tt><tt class="py-op">:</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">matches</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">        <tt class="py-comment"># loop the copy</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt id="link-179" class="py-name"><a title="web2py.gluon.html.XmlComponent" class="py-name" href="#" onclick="return doclink('link-179', 'XmlComponent', 'link-126');">XmlComponent</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">                <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'first_only'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">first_only</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">                <tt class="py-name">child_matches</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-180', 'elements', 'link-145');">elements</a></tt><tt class="py-op">(</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt>  <tt class="py-op">**</tt><tt class="py-name">kargs</tt> <tt class="py-op">)</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">first_only</tt>  <tt class="py-keyword">and</tt> <tt id="link-181" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-181', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">child_matches</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">child_matches</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line">                <tt class="py-name">matches</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name" targets="Method web2py.gluon.template.BlockNode.extend()=web2py.gluon.template.BlockNode-class.html#extend,Method web2py.gluon.template.Content.extend()=web2py.gluon.template.Content-class.html#extend,Method web2py.gluon.template.TemplateParser.extend()=web2py.gluon.template.TemplateParser-class.html#extend"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-182', 'extend', 'link-182');">extend</a></tt><tt class="py-op">(</tt> <tt class="py-name">child_matches</tt> <tt class="py-op">)</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">matches</tt> </tt>
</div><a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line"> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line"> </tt>
<a name="DIV.element"></a><div id="DIV.element-def"><a name="L948"></a><tt class="py-lineno"> 948</tt> <a class="py-toggle" href="#" id="DIV.element-toggle" onclick="return toggle('DIV.element');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#element">element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.element-expanded"><a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line"><tt class="py-docstring">        find the first component that matches the supplied attribute dictionary,</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line"><tt class="py-docstring">        or None if nothing could be found</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line"><tt class="py-docstring">        Also the components of the components are searched.</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line">        <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'first_only'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">        <tt id="link-183" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-183', 'elements', 'link-145');">elements</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-184', 'elements', 'link-145');">elements</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">)</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-185" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-185', 'elements', 'link-145');">elements</a></tt><tt class="py-op">:</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line">            <tt class="py-comment"># we found nothing</tt> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-186', 'elements', 'link-145');">elements</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div><a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line"> </tt>
<a name="DIV.siblings"></a><div id="DIV.siblings-def"><a name="L962"></a><tt class="py-lineno"> 962</tt> <a class="py-toggle" href="#" id="DIV.siblings-toggle" onclick="return toggle('DIV.siblings');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#siblings">siblings</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.siblings-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.siblings-expanded"><a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line"><tt class="py-docstring">        find all sibling components that match the supplied argument list</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line"><tt class="py-docstring">        and attribute dictionary, or None if nothing could be found</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">        <tt class="py-name">sibs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-187', 's', 'link-127');">s</a></tt> <tt class="py-keyword">for</tt> <tt id="link-188" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-188', 's', 'link-127');">s</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-189" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-189', 's', 'link-127');">s</a></tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">]</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">        <tt class="py-name">matches</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">        <tt class="py-name">first_only</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">kargs</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-190', 'has_key', 'link-28');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">"first_only"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">            <tt class="py-name">first_only</tt> <tt class="py-op">=</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">"first_only"</tt><tt class="py-op">]</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">"first_only"</tt><tt class="py-op">]</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sibs</tt><tt class="py-op">:</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line">                <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line">                <tt id="link-191" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-191', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-string">'tag'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"/"</tt><tt class="py-op">,</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt id="link-192" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-192', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">                        <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kargs</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-193', 'items', 'link-29');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">                            <tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">check</tt><tt class="py-op">:</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line">                    <tt class="py-name">matches</tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-194', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">first_only</tt><tt class="py-op">:</tt> <tt class="py-keyword">break</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">matches</tt> </tt>
</div><a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line"> </tt>
<a name="DIV.sibling"></a><div id="DIV.sibling-def"><a name="L989"></a><tt class="py-lineno"> 989</tt> <a class="py-toggle" href="#" id="DIV.sibling-toggle" onclick="return toggle('DIV.sibling');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.DIV-class.html#sibling">sibling</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DIV.sibling-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DIV.sibling-expanded"><a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line"><tt class="py-docstring">        find the first sibling component that match the supplied argument list</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line"><tt class="py-docstring">        and attribute dictionary, or None if nothing could be found</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line">        <tt class="py-name">kargs</tt><tt class="py-op">[</tt><tt class="py-string">'first_only'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">        <tt class="py-name">sibs</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name" targets="Method web2py.gluon.html.DIV.siblings()=web2py.gluon.html.DIV-class.html#siblings"><a title="web2py.gluon.html.DIV.siblings" class="py-name" href="#" onclick="return doclink('link-195', 'siblings', 'link-195');">siblings</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">)</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">sibs</tt><tt class="py-op">:</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">sibs</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line"> </tt>
<a name="CAT"></a><div id="CAT-def"><a name="L1000"></a><tt class="py-lineno">1000</tt> <a class="py-toggle" href="#" id="CAT-toggle" onclick="return toggle('CAT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.CAT-class.html">CAT</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CAT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CAT-expanded"><a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">     </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">    <tt id="link-196" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-196', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
</div><a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line"> </tt>
<a name="TAG_unpickler"></a><div id="TAG_unpickler-def"><a name="L1004"></a><tt class="py-lineno">1004</tt> <a class="py-toggle" href="#" id="TAG_unpickler-toggle" onclick="return toggle('TAG_unpickler');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#TAG_unpickler">TAG_unpickler</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TAG_unpickler-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TAG_unpickler-expanded"><a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line"> </tt>
<a name="TAG_pickler"></a><div id="TAG_pickler-def"><a name="L1007"></a><tt class="py-lineno">1007</tt> <a class="py-toggle" href="#" id="TAG_pickler-toggle" onclick="return toggle('TAG_pickler');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#TAG_pickler">TAG_pickler</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TAG_pickler-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TAG_pickler-expanded"><a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">    <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-197" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-197', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">    <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">    <tt class="py-name">marshal_dump</tt> <tt class="py-op">=</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-198" class="py-name" targets="Function web2py.gluon.html.TAG_unpickler()=web2py.gluon.html-module.html#TAG_unpickler"><a title="web2py.gluon.html.TAG_unpickler" class="py-name" href="#" onclick="return doclink('link-198', 'TAG_unpickler', 'link-198');">TAG_unpickler</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">marshal_dump</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line"> </tt>
<a name="__TAG__"></a><div id="__TAG__-def"><a name="L1013"></a><tt class="py-lineno">1013</tt> <a class="py-toggle" href="#" id="__TAG__-toggle" onclick="return toggle('__TAG__');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.__TAG__-class.html">__TAG__</a><tt class="py-op">(</tt><tt class="py-base-class">XmlComponent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="__TAG__-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="__TAG__-expanded"><a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line"> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line"><tt class="py-docstring">    TAG factory example::</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print TAG.first(TAG.second('test'), _key = 3)</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;first key=\"3\"&gt;&lt;second&gt;test&lt;/second&gt;&lt;/first&gt;</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line"> </tt>
<a name="__TAG__.__getitem__"></a><div id="__TAG__.__getitem__-def"><a name="L1023"></a><tt class="py-lineno">1023</tt> <a class="py-toggle" href="#" id="__TAG__.__getitem__-toggle" onclick="return toggle('__TAG__.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.__TAG__-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="__TAG__.__getitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="__TAG__.__getitem__-expanded"><a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-199" class="py-name" targets="Method web2py.gluon.dal.DAL.__getattr__()=web2py.gluon.dal.DAL-class.html#__getattr__,Method web2py.gluon.dal.Reference.__getattr__()=web2py.gluon.dal.Reference-class.html#__getattr__,Method web2py.gluon.dal.Row.__getattr__()=web2py.gluon.dal.Row-class.html#__getattr__,Method web2py.gluon.dal.Table.__getattr__()=web2py.gluon.dal.Table-class.html#__getattr__,Method web2py.gluon.html.XML.__getattr__()=web2py.gluon.html.XML-class.html#__getattr__,Method web2py.gluon.html.__TAG__.__getattr__()=web2py.gluon.html.__TAG__-class.html#__getattr__,Method web2py.gluon.languages.lazyT.__getattr__()=web2py.gluon.languages.lazyT-class.html#__getattr__,Method web2py.gluon.storage.Messages.__getattr__()=web2py.gluon.storage.Messages-class.html#__getattr__,Method web2py.gluon.storage.Storage.__getattr__()=web2py.gluon.storage.Storage-class.html#__getattr__,Method web2py.gluon.storage.StorageList.__getattr__()=web2py.gluon.storage.StorageList-class.html#__getattr__,Method web2py.gluon.tools.PluginManager.__getattr__()=web2py.gluon.tools.PluginManager-class.html#__getattr__"><a title="web2py.gluon.dal.DAL.__getattr__
web2py.gluon.dal.Reference.__getattr__
web2py.gluon.dal.Row.__getattr__
web2py.gluon.dal.Table.__getattr__
web2py.gluon.html.XML.__getattr__
web2py.gluon.html.__TAG__.__getattr__
web2py.gluon.languages.lazyT.__getattr__
web2py.gluon.storage.Messages.__getattr__
web2py.gluon.storage.Storage.__getattr__
web2py.gluon.storage.StorageList.__getattr__
web2py.gluon.tools.PluginManager.__getattr__" class="py-name" href="#" onclick="return doclink('link-199', '__getattr__', 'link-199');">__getattr__</a></tt><tt class="py-op">(</tt><tt id="link-200" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-200', 'name', 'link-74');">name</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line"> </tt>
<a name="__TAG__.__getattr__"></a><div id="__TAG__.__getattr__-def"><a name="L1026"></a><tt class="py-lineno">1026</tt> <a class="py-toggle" href="#" id="__TAG__.__getattr__-toggle" onclick="return toggle('__TAG__.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.__TAG__-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="__TAG__.__getattr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="__TAG__.__getattr__-expanded"><a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-201" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-201', 'name', 'link-74');">name</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'_'</tt><tt class="py-op">:</tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">            <tt id="link-202" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-202', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-203" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-203', 'name', 'link-74');">name</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-204" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-204', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt><tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">            <tt id="link-205" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-205', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-206" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-206', 'name', 'link-74');">name</a></tt><tt class="py-op">.</tt><tt id="link-207" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-207', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">        <tt class="py-keyword">class</tt> <tt class="py-def-name">__tag__</tt><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">            <tt id="link-208" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-208', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt id="link-209" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-209', 'name', 'link-74');">name</a></tt> </tt>
</div><a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">        <tt class="py-name">copy_reg</tt><tt class="py-op">.</tt><tt class="py-name">pickle</tt><tt class="py-op">(</tt><tt class="py-name">__tag__</tt><tt class="py-op">,</tt> <tt id="link-210" class="py-name" targets="Function web2py.gluon.html.TAG_pickler()=web2py.gluon.html-module.html#TAG_pickler"><a title="web2py.gluon.html.TAG_pickler" class="py-name" href="#" onclick="return doclink('link-210', 'TAG_pickler', 'link-210');">TAG_pickler</a></tt><tt class="py-op">,</tt> <tt id="link-211" class="py-name"><a title="web2py.gluon.html.TAG_unpickler" class="py-name" href="#" onclick="return doclink('link-211', 'TAG_unpickler', 'link-198');">TAG_unpickler</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-212" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-212', 'b', 'link-146');">b</a></tt><tt class="py-op">:</tt> <tt class="py-name">__tag__</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-213" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-213', 'b', 'link-146');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line"> </tt>
<a name="__TAG__.__call__"></a><div id="__TAG__.__call__-def"><a name="L1036"></a><tt class="py-lineno">1036</tt> <a class="py-toggle" href="#" id="__TAG__.__call__-toggle" onclick="return toggle('__TAG__.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.__TAG__-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">html</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="__TAG__.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="__TAG__.__call__-expanded"><a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-214" class="py-name" targets="Class web2py.gluon.html.web2pyHTMLParser=web2py.gluon.html.web2pyHTMLParser-class.html"><a title="web2py.gluon.html.web2pyHTMLParser" class="py-name" href="#" onclick="return doclink('link-214', 'web2pyHTMLParser', 'link-214');">web2pyHTMLParser</a></tt><tt class="py-op">(</tt><tt id="link-215" class="py-name"><a title="web2py.gluon.decoder
web2py.gluon.decoder.decoder" class="py-name" href="#" onclick="return doclink('link-215', 'decoder', 'link-3');">decoder</a></tt><tt class="py-op">.</tt><tt id="link-216" class="py-name"><a title="web2py.gluon.decoder
web2py.gluon.decoder.decoder" class="py-name" href="#" onclick="return doclink('link-216', 'decoder', 'link-3');">decoder</a></tt><tt class="py-op">(</tt><tt id="link-217" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-217', 'html', 'link-217');">html</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">tree</tt> </tt>
</div></div><a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line"> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line"><tt id="link-218" class="py-name" targets="Variable web2py.gluon.TAG=web2py.gluon-module.html#TAG,Variable web2py.gluon.html.TAG=web2py.gluon.html-module.html#TAG,Variable web2py.gluon.tools.TAG=web2py.gluon.tools-module.html#TAG"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-218', 'TAG', 'link-218');">TAG</a></tt> <tt class="py-op">=</tt> <tt id="link-219" class="py-name" targets="Class web2py.gluon.html.__TAG__=web2py.gluon.html.__TAG__-class.html"><a title="web2py.gluon.html.__TAG__" class="py-name" href="#" onclick="return doclink('link-219', '__TAG__', 'link-219');">__TAG__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line"> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line"> </tt>
<a name="HTML"></a><div id="HTML-def"><a name="L1042"></a><tt class="py-lineno">1042</tt> <a class="py-toggle" href="#" id="HTML-toggle" onclick="return toggle('HTML');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.HTML-class.html">HTML</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTML-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="HTML-expanded"><a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line"><tt class="py-docstring">    There are four predefined document type definitions.</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line"><tt class="py-docstring">    They can be specified in the 'doctype' parameter:</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line"><tt class="py-docstring">    -'strict' enables strict doctype</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line"><tt class="py-docstring">    -'transitional' enables transitional doctype (default)</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line"><tt class="py-docstring">    -'frameset' enables frameset doctype</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line"><tt class="py-docstring">    -'html5' enables HTML 5 doctype</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line"><tt class="py-docstring">    -any other string will be treated as user's own doctype</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line"><tt class="py-docstring">    'lang' parameter specifies the language of the document.</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line"><tt class="py-docstring">    Defaults to 'en'.</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line"><tt class="py-docstring">    See also :class:`DIV`</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line"> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">    <tt id="link-220" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-220', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'html'</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line"> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">    <tt id="link-221" class="py-name" targets="Variable web2py.gluon.html.HTML.strict=web2py.gluon.html.HTML-class.html#strict,Variable web2py.gluon.html.XHTML.strict=web2py.gluon.html.XHTML-class.html#strict"><a title="web2py.gluon.html.HTML.strict
web2py.gluon.html.XHTML.strict" class="py-name" href="#" onclick="return doclink('link-221', 'strict', 'link-221');">strict</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;\n'</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line">    <tt id="link-222" class="py-name" targets="Variable web2py.gluon.html.HTML.transitional=web2py.gluon.html.HTML-class.html#transitional,Variable web2py.gluon.html.XHTML.transitional=web2py.gluon.html.XHTML-class.html#transitional"><a title="web2py.gluon.html.HTML.transitional
web2py.gluon.html.XHTML.transitional" class="py-name" href="#" onclick="return doclink('link-222', 'transitional', 'link-222');">transitional</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;\n'</tt> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">    <tt id="link-223" class="py-name" targets="Variable web2py.gluon.html.HTML.frameset=web2py.gluon.html.HTML-class.html#frameset,Variable web2py.gluon.html.XHTML.frameset=web2py.gluon.html.XHTML-class.html#frameset"><a title="web2py.gluon.html.HTML.frameset
web2py.gluon.html.XHTML.frameset" class="py-name" href="#" onclick="return doclink('link-223', 'frameset', 'link-223');">frameset</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"&gt;\n'</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line">    <tt id="link-224" class="py-name" targets="Variable web2py.gluon.html.HTML.html5=web2py.gluon.html.HTML-class.html#html5"><a title="web2py.gluon.html.HTML.html5" class="py-name" href="#" onclick="return doclink('link-224', 'html5', 'link-224');">html5</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE HTML&gt;\n'</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line"> </tt>
<a name="HTML.xml"></a><div id="HTML.xml-def"><a name="L1066"></a><tt class="py-lineno">1066</tt> <a class="py-toggle" href="#" id="HTML.xml-toggle" onclick="return toggle('HTML.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.HTML-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTML.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="HTML.xml-expanded"><a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">        <tt class="py-name">lang</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'lang'</tt><tt class="py-op">]</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">lang</tt><tt class="py-op">:</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">            <tt class="py-name">lang</tt> <tt class="py-op">=</tt> <tt class="py-string">'en'</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_lang'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">lang</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line">        <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'doctype'</tt><tt class="py-op">]</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">doctype</tt><tt class="py-op">:</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'strict'</tt><tt class="py-op">:</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-225" class="py-name"><a title="web2py.gluon.html.HTML.strict
web2py.gluon.html.XHTML.strict" class="py-name" href="#" onclick="return doclink('link-225', 'strict', 'link-221');">strict</a></tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'transitional'</tt><tt class="py-op">:</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-226" class="py-name"><a title="web2py.gluon.html.HTML.transitional
web2py.gluon.html.XHTML.transitional" class="py-name" href="#" onclick="return doclink('link-226', 'transitional', 'link-222');">transitional</a></tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'frameset'</tt><tt class="py-op">:</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="web2py.gluon.html.HTML.frameset
web2py.gluon.html.XHTML.frameset" class="py-name" href="#" onclick="return doclink('link-227', 'frameset', 'link-223');">frameset</a></tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'html5'</tt><tt class="py-op">:</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="web2py.gluon.html.HTML.html5" class="py-name" href="#" onclick="return doclink('link-228', 'html5', 'link-224');">html5</a></tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">doctype</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line">            <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-229" class="py-name"><a title="web2py.gluon.html.HTML.transitional
web2py.gluon.html.XHTML.transitional" class="py-name" href="#" onclick="return doclink('link-229', 'transitional', 'link-222');">transitional</a></tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-230" class="py-name"><a title="web2py.gluon.html.DIV._xml" class="py-name" href="#" onclick="return doclink('link-230', '_xml', 'link-119');">_xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'%s&lt;%s%s&gt;%s&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">doctype</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-231" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-231', 'tag', 'link-82');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-232" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-232', 'tag', 'link-82');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line"> </tt>
<a name="XHTML"></a><div id="XHTML-def"><a name="L1088"></a><tt class="py-lineno">1088</tt> <a class="py-toggle" href="#" id="XHTML-toggle" onclick="return toggle('XHTML');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.XHTML-class.html">XHTML</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XHTML-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="XHTML-expanded"><a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line"><tt class="py-docstring">    This is XHTML version of the HTML helper.</tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line"><tt class="py-docstring">    There are three predefined document type definitions.</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line"><tt class="py-docstring">    They can be specified in the 'doctype' parameter:</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line"><tt class="py-docstring">    -'strict' enables strict doctype</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line"><tt class="py-docstring">    -'transitional' enables transitional doctype (default)</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line"><tt class="py-docstring">    -'frameset' enables frameset doctype</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line"><tt class="py-docstring">    -any other string will be treated as user's own doctype</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line"><tt class="py-docstring">    'lang' parameter specifies the language of the document and the xml document.</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line"><tt class="py-docstring">    Defaults to 'en'.</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line"><tt class="py-docstring">    'xmlns' parameter specifies the xml namespace.</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line"><tt class="py-docstring">    Defaults to 'http://www.w3.org/1999/xhtml'.</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line"><tt class="py-docstring">    See also :class:`DIV`</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line"> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">    <tt id="link-233" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-233', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'html'</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line"> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line">    <tt id="link-234" class="py-name"><a title="web2py.gluon.html.HTML.strict
web2py.gluon.html.XHTML.strict" class="py-name" href="#" onclick="return doclink('link-234', 'strict', 'link-221');">strict</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;\n'</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">    <tt id="link-235" class="py-name"><a title="web2py.gluon.html.HTML.transitional
web2py.gluon.html.XHTML.transitional" class="py-name" href="#" onclick="return doclink('link-235', 'transitional', 'link-222');">transitional</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;\n'</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">    <tt id="link-236" class="py-name"><a title="web2py.gluon.html.HTML.frameset
web2py.gluon.html.XHTML.frameset" class="py-name" href="#" onclick="return doclink('link-236', 'frameset', 'link-223');">frameset</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;\n'</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">    <tt id="link-237" class="py-name" targets="Variable web2py.gluon.html.XHTML.xmlns=web2py.gluon.html.XHTML-class.html#xmlns"><a title="web2py.gluon.html.XHTML.xmlns" class="py-name" href="#" onclick="return doclink('link-237', 'xmlns', 'link-237');">xmlns</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'http://www.w3.org/1999/xhtml'</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line"> </tt>
<a name="XHTML.xml"></a><div id="XHTML.xml-def"><a name="L1116"></a><tt class="py-lineno">1116</tt> <a class="py-toggle" href="#" id="XHTML.xml-toggle" onclick="return toggle('XHTML.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.XHTML-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XHTML.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XHTML.xml-expanded"><a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">        <tt id="link-238" class="py-name"><a title="web2py.gluon.html.XHTML.xmlns" class="py-name" href="#" onclick="return doclink('link-238', 'xmlns', 'link-237');">xmlns</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'xmlns'</tt><tt class="py-op">]</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-239" class="py-name"><a title="web2py.gluon.html.XHTML.xmlns" class="py-name" href="#" onclick="return doclink('link-239', 'xmlns', 'link-237');">xmlns</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_xmlns'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-240" class="py-name"><a title="web2py.gluon.html.XHTML.xmlns" class="py-name" href="#" onclick="return doclink('link-240', 'xmlns', 'link-237');">xmlns</a></tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_xmlns'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-241" class="py-name"><a title="web2py.gluon.html.XHTML.xmlns" class="py-name" href="#" onclick="return doclink('link-241', 'xmlns', 'link-237');">xmlns</a></tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">        <tt class="py-name">lang</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'lang'</tt><tt class="py-op">]</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">lang</tt><tt class="py-op">:</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">            <tt class="py-name">lang</tt> <tt class="py-op">=</tt> <tt class="py-string">'en'</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_lang'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">lang</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_xml:lang'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">lang</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">        <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'doctype'</tt><tt class="py-op">]</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">doctype</tt><tt class="py-op">:</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'strict'</tt><tt class="py-op">:</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-242" class="py-name"><a title="web2py.gluon.html.HTML.strict
web2py.gluon.html.XHTML.strict" class="py-name" href="#" onclick="return doclink('link-242', 'strict', 'link-221');">strict</a></tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'transitional'</tt><tt class="py-op">:</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-243" class="py-name"><a title="web2py.gluon.html.HTML.transitional
web2py.gluon.html.XHTML.transitional" class="py-name" href="#" onclick="return doclink('link-243', 'transitional', 'link-222');">transitional</a></tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">doctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'frameset'</tt><tt class="py-op">:</tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-244" class="py-name"><a title="web2py.gluon.html.HTML.frameset
web2py.gluon.html.XHTML.frameset" class="py-name" href="#" onclick="return doclink('link-244', 'frameset', 'link-223');">frameset</a></tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">                <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">doctype</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">            <tt class="py-name">doctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-245" class="py-name"><a title="web2py.gluon.html.HTML.transitional
web2py.gluon.html.XHTML.transitional" class="py-name" href="#" onclick="return doclink('link-245', 'transitional', 'link-222');">transitional</a></tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-246" class="py-name"><a title="web2py.gluon.html.DIV._xml" class="py-name" href="#" onclick="return doclink('link-246', '_xml', 'link-119');">_xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'%s&lt;%s%s&gt;%s&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">doctype</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-247" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-247', 'tag', 'link-82');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-248" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-248', 'tag', 'link-82');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line"> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line"> </tt>
<a name="HEAD"></a><div id="HEAD-def"><a name="L1143"></a><tt class="py-lineno">1143</tt> <a class="py-toggle" href="#" id="HEAD-toggle" onclick="return toggle('HEAD');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.HEAD-class.html">HEAD</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HEAD-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="HEAD-expanded"><a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line"> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">    <tt id="link-249" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-249', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'head'</tt> </tt>
</div><a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line"> </tt>
<a name="TITLE"></a><div id="TITLE-def"><a name="L1147"></a><tt class="py-lineno">1147</tt> <a class="py-toggle" href="#" id="TITLE-toggle" onclick="return toggle('TITLE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TITLE-class.html">TITLE</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TITLE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TITLE-expanded"><a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line"> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">    <tt id="link-250" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-250', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'title'</tt> </tt>
</div><a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line"> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line"> </tt>
<a name="META"></a><div id="META-def"><a name="L1152"></a><tt class="py-lineno">1152</tt> <a class="py-toggle" href="#" id="META-toggle" onclick="return toggle('META');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.META-class.html">META</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="META-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="META-expanded"><a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line"> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line">    <tt id="link-251" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-251', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'meta/'</tt> </tt>
</div><a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line"> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line"> </tt>
<a name="LINK"></a><div id="LINK-def"><a name="L1157"></a><tt class="py-lineno">1157</tt> <a class="py-toggle" href="#" id="LINK-toggle" onclick="return toggle('LINK');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.LINK-class.html">LINK</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LINK-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="LINK-expanded"><a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line"> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">    <tt id="link-252" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-252', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'link/'</tt> </tt>
</div><a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line"> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line"> </tt>
<a name="SCRIPT"></a><div id="SCRIPT-def"><a name="L1162"></a><tt class="py-lineno">1162</tt> <a class="py-toggle" href="#" id="SCRIPT-toggle" onclick="return toggle('SCRIPT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.SCRIPT-class.html">SCRIPT</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SCRIPT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SCRIPT-expanded"><a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line"> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line">    <tt id="link-253" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-253', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'script'</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line"> </tt>
<a name="SCRIPT.xml"></a><div id="SCRIPT.xml-def"><a name="L1166"></a><tt class="py-lineno">1166</tt> <a class="py-toggle" href="#" id="SCRIPT.xml-toggle" onclick="return toggle('SCRIPT.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.SCRIPT-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SCRIPT.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SCRIPT.xml-expanded"><a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-254" class="py-name"><a title="web2py.gluon.html.DIV._xml" class="py-name" href="#" onclick="return doclink('link-254', '_xml', 'link-119');">_xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">        <tt class="py-comment"># no escaping of subcomponents</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">co</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt id="link-255" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-255', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">component</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">component</tt> <tt class="py-keyword">in</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">co</tt><tt class="py-op">:</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line">            <tt class="py-comment"># &lt;script [attributes]&gt;&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># script body</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># //--&gt;&lt;!]]&gt;&lt;/script&gt;</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># return '&lt;%s%s&gt;&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--\n%s\n//--&gt;&lt;!]]&gt;&lt;/%s&gt;' % (self.tag, fa, co, self.tag)</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;%s%s&gt;&lt;!--\n%s\n//--&gt;&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-256" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-256', 'tag', 'link-82');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-257" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-257', 'tag', 'link-82');">tag</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-258" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-258', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-259" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-259', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line"> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line"> </tt>
<a name="STYLE"></a><div id="STYLE-def"><a name="L1181"></a><tt class="py-lineno">1181</tt> <a class="py-toggle" href="#" id="STYLE-toggle" onclick="return toggle('STYLE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.STYLE-class.html">STYLE</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="STYLE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="STYLE-expanded"><a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line"> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">    <tt id="link-260" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-260', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'style'</tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line"> </tt>
<a name="STYLE.xml"></a><div id="STYLE.xml-def"><a name="L1185"></a><tt class="py-lineno">1185</tt> <a class="py-toggle" href="#" id="STYLE.xml-toggle" onclick="return toggle('STYLE.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.STYLE-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="STYLE.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="STYLE.xml-expanded"><a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-261" class="py-name"><a title="web2py.gluon.html.DIV._xml" class="py-name" href="#" onclick="return doclink('link-261', '_xml', 'link-119');">_xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">        <tt class="py-comment"># no escaping of subcomponents</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">co</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt id="link-262" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-262', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">component</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">component</tt> <tt class="py-keyword">in</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">co</tt><tt class="py-op">:</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line">            <tt class="py-comment"># &lt;style [attributes]&gt;&lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!--*/</tt> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># style body</tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># /*]]&gt;*/--&gt;&lt;/style&gt;</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;%s%s&gt;&lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!--*/\n%s\n/*]]&gt;*/--&gt;&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-263" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-263', 'tag', 'link-82');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">fa</tt><tt class="py-op">,</tt> <tt class="py-name">co</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-264" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-264', 'tag', 'link-82');">tag</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-265" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-265', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-266" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-266', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line"> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line"> </tt>
<a name="IMG"></a><div id="IMG-def"><a name="L1199"></a><tt class="py-lineno">1199</tt> <a class="py-toggle" href="#" id="IMG-toggle" onclick="return toggle('IMG');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.IMG-class.html">IMG</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IMG-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IMG-expanded"><a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line"> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line">    <tt id="link-267" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-267', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'img/'</tt> </tt>
</div><a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line"> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line"> </tt>
<a name="SPAN"></a><div id="SPAN-def"><a name="L1204"></a><tt class="py-lineno">1204</tt> <a class="py-toggle" href="#" id="SPAN-toggle" onclick="return toggle('SPAN');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.SPAN-class.html">SPAN</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SPAN-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SPAN-expanded"><a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line"> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">    <tt id="link-268" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-268', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'span'</tt> </tt>
</div><a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line"> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line"> </tt>
<a name="BODY"></a><div id="BODY-def"><a name="L1209"></a><tt class="py-lineno">1209</tt> <a class="py-toggle" href="#" id="BODY-toggle" onclick="return toggle('BODY');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.BODY-class.html">BODY</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BODY-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BODY-expanded"><a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line"> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line">    <tt id="link-269" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-269', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'body'</tt> </tt>
</div><a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line"> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line"> </tt>
<a name="H1"></a><div id="H1-def"><a name="L1214"></a><tt class="py-lineno">1214</tt> <a class="py-toggle" href="#" id="H1-toggle" onclick="return toggle('H1');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.H1-class.html">H1</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="H1-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="H1-expanded"><a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line"> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">    <tt id="link-270" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-270', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'h1'</tt> </tt>
</div><a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line"> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line"> </tt>
<a name="H2"></a><div id="H2-def"><a name="L1219"></a><tt class="py-lineno">1219</tt> <a class="py-toggle" href="#" id="H2-toggle" onclick="return toggle('H2');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.H2-class.html">H2</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="H2-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="H2-expanded"><a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line"> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">    <tt id="link-271" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-271', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'h2'</tt> </tt>
</div><a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line"> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line"> </tt>
<a name="H3"></a><div id="H3-def"><a name="L1224"></a><tt class="py-lineno">1224</tt> <a class="py-toggle" href="#" id="H3-toggle" onclick="return toggle('H3');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.H3-class.html">H3</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="H3-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="H3-expanded"><a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line"> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">    <tt id="link-272" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-272', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'h3'</tt> </tt>
</div><a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line"> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line"> </tt>
<a name="H4"></a><div id="H4-def"><a name="L1229"></a><tt class="py-lineno">1229</tt> <a class="py-toggle" href="#" id="H4-toggle" onclick="return toggle('H4');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.H4-class.html">H4</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="H4-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="H4-expanded"><a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line"> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">    <tt id="link-273" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-273', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'h4'</tt> </tt>
</div><a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line"> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line"> </tt>
<a name="H5"></a><div id="H5-def"><a name="L1234"></a><tt class="py-lineno">1234</tt> <a class="py-toggle" href="#" id="H5-toggle" onclick="return toggle('H5');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.H5-class.html">H5</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="H5-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="H5-expanded"><a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line"> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">    <tt id="link-274" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-274', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'h5'</tt> </tt>
</div><a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line"> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line"> </tt>
<a name="H6"></a><div id="H6-def"><a name="L1239"></a><tt class="py-lineno">1239</tt> <a class="py-toggle" href="#" id="H6-toggle" onclick="return toggle('H6');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.H6-class.html">H6</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="H6-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="H6-expanded"><a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line"> </tt>
<a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line">    <tt id="link-275" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-275', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'h6'</tt> </tt>
</div><a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line"> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line"> </tt>
<a name="P"></a><div id="P-def"><a name="L1244"></a><tt class="py-lineno">1244</tt> <a class="py-toggle" href="#" id="P-toggle" onclick="return toggle('P');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.P-class.html">P</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="P-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="P-expanded"><a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line"><tt class="py-docstring">    Will replace ``\\n`` by ``&lt;br /&gt;`` if the `cr2br` attribute is provided.</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line"><tt class="py-docstring">    see also :class:`DIV`</tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line"> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line">    <tt id="link-276" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-276', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'p'</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line"> </tt>
<a name="P.xml"></a><div id="P.xml-def"><a name="L1253"></a><tt class="py-lineno">1253</tt> <a class="py-toggle" href="#" id="P.xml-toggle" onclick="return toggle('P.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.P-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="P.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="P.xml-expanded"><a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt id="link-277" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-277', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-278" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-278', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'cr2br'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'&lt;br /&gt;'</tt><tt class="py-op">)</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">text</tt> </tt>
</div></div><a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line"> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line"> </tt>
<a name="B"></a><div id="B-def"><a name="L1260"></a><tt class="py-lineno">1260</tt> <a class="py-toggle" href="#" id="B-toggle" onclick="return toggle('B');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.B-class.html">B</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="B-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="B-expanded"><a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line"> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line">    <tt id="link-279" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-279', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'b'</tt> </tt>
</div><a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line"> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line"> </tt>
<a name="BR"></a><div id="BR-def"><a name="L1265"></a><tt class="py-lineno">1265</tt> <a class="py-toggle" href="#" id="BR-toggle" onclick="return toggle('BR');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.BR-class.html">BR</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BR-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BR-expanded"><a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line"> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line">    <tt id="link-280" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-280', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'br/'</tt> </tt>
</div><a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line"> </tt>
<a name="L1269"></a><tt class="py-lineno">1269</tt>  <tt class="py-line"> </tt>
<a name="HR"></a><div id="HR-def"><a name="L1270"></a><tt class="py-lineno">1270</tt> <a class="py-toggle" href="#" id="HR-toggle" onclick="return toggle('HR');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.HR-class.html">HR</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HR-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="HR-expanded"><a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line"> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line">    <tt id="link-281" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-281', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'hr/'</tt> </tt>
</div><a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line"> </tt>
<a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line"> </tt>
<a name="A"></a><div id="A-def"><a name="L1275"></a><tt class="py-lineno">1275</tt> <a class="py-toggle" href="#" id="A-toggle" onclick="return toggle('A');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.A-class.html">A</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="A-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="A-expanded"><a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line"> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line">    <tt id="link-282" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-282', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'a'</tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line"> </tt>
<a name="A.xml"></a><div id="A.xml-def"><a name="L1279"></a><tt class="py-lineno">1279</tt> <a class="py-toggle" href="#" id="A.xml-toggle" onclick="return toggle('A.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.A-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="A.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="A.xml-expanded"><a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'callback'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_onclick'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">"ajax('%s',[],'%s');return false;"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'callback'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'target'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_href'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_href'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'#null'</tt> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'cid'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_onclick'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">'web2py_component("%s","%s");return false;'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_href'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'cid'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-283" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-283', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-284', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line"> </tt>
<a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line"> </tt>
<a name="BUTTON"></a><div id="BUTTON-def"><a name="L1290"></a><tt class="py-lineno">1290</tt> <a class="py-toggle" href="#" id="BUTTON-toggle" onclick="return toggle('BUTTON');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.BUTTON-class.html">BUTTON</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BUTTON-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BUTTON-expanded"><a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line">     </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line">    <tt id="link-285" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-285', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'button'</tt> </tt>
</div><a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line"> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line"> </tt>
<a name="EM"></a><div id="EM-def"><a name="L1295"></a><tt class="py-lineno">1295</tt> <a class="py-toggle" href="#" id="EM-toggle" onclick="return toggle('EM');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.EM-class.html">EM</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="EM-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="EM-expanded"><a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line"> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line">    <tt id="link-286" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-286', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'em'</tt> </tt>
</div><a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line"> </tt>
<a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line"> </tt>
<a name="EMBED"></a><div id="EMBED-def"><a name="L1300"></a><tt class="py-lineno">1300</tt> <a class="py-toggle" href="#" id="EMBED-toggle" onclick="return toggle('EMBED');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.EMBED-class.html">EMBED</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="EMBED-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="EMBED-expanded"><a name="L1301"></a><tt class="py-lineno">1301</tt>  <tt class="py-line"> </tt>
<a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line">    <tt id="link-287" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-287', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'embed/'</tt> </tt>
</div><a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line"> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line"> </tt>
<a name="TT"></a><div id="TT-def"><a name="L1305"></a><tt class="py-lineno">1305</tt> <a class="py-toggle" href="#" id="TT-toggle" onclick="return toggle('TT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TT-class.html">TT</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TT-expanded"><a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line"> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line">    <tt id="link-288" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-288', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'tt'</tt> </tt>
</div><a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line"> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line"> </tt>
<a name="PRE"></a><div id="PRE-def"><a name="L1310"></a><tt class="py-lineno">1310</tt> <a class="py-toggle" href="#" id="PRE-toggle" onclick="return toggle('PRE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.PRE-class.html">PRE</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PRE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="PRE-expanded"><a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line"> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line">    <tt id="link-289" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-289', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'pre'</tt> </tt>
</div><a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line"> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line"> </tt>
<a name="CENTER"></a><div id="CENTER-def"><a name="L1315"></a><tt class="py-lineno">1315</tt> <a class="py-toggle" href="#" id="CENTER-toggle" onclick="return toggle('CENTER');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.CENTER-class.html">CENTER</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CENTER-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CENTER-expanded"><a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line"> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line">    <tt id="link-290" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-290', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'center'</tt> </tt>
</div><a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line"> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line"> </tt>
<a name="CODE"></a><div id="CODE-def"><a name="L1320"></a><tt class="py-lineno">1320</tt> <a class="py-toggle" href="#" id="CODE-toggle" onclick="return toggle('CODE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.CODE-class.html">CODE</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CODE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CODE-expanded"><a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line"> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line"><tt class="py-docstring">    displays code in HTML with syntax highlighting.</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line"><tt class="py-docstring">    :param attributes: optional attributes:</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line"><tt class="py-docstring">        - language: indicates the language, otherwise PYTHON is assumed</tt> </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line"><tt class="py-docstring">        - link: can provide a link</tt> </tt>
<a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line"><tt class="py-docstring">        - styles: for styles</tt> </tt>
<a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line"><tt class="py-docstring">    Example::</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line"><tt class="py-docstring">        {{=CODE(\"print 'hello world'\", language='python', link=None,</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line"><tt class="py-docstring">            counter=1, styles={}, highlight_line=None)}}</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line"><tt class="py-docstring">    supported languages are \"python\", \"html_plain\", \"c\", \"cpp\",</tt> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line"><tt class="py-docstring">    \"web2py\", \"html\".</tt> </tt>
<a name="L1339"></a><tt class="py-lineno">1339</tt>  <tt class="py-line"><tt class="py-docstring">    The \"html\" language interprets {{ and }} tags as \"web2py\" code,</tt> </tt>
<a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line"><tt class="py-docstring">    \"html_plain\" doesn't.</tt> </tt>
<a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line"><tt class="py-docstring">    if a link='/examples/global/vars/' is provided web2py keywords are linked to</tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line"><tt class="py-docstring">    the online docs.</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line"><tt class="py-docstring">    the counter is used for line numbering, counter can be None or a prompt</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line"><tt class="py-docstring">    string.</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line"> </tt>
<a name="CODE.xml"></a><div id="CODE.xml-def"><a name="L1349"></a><tt class="py-lineno">1349</tt> <a class="py-toggle" href="#" id="CODE.xml-toggle" onclick="return toggle('CODE.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.CODE-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CODE.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CODE.xml-expanded"><a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">        <tt class="py-name">language</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'language'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'PYTHON'</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">        <tt class="py-name">link</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'link'</tt><tt class="py-op">]</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">        <tt class="py-name">counter</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-291" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-291', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'counter'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line">        <tt class="py-name">highlight_line</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-292" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-292', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'highlight_line'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line">        <tt class="py-name">styles</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'styles'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-293" class="py-name"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-293', 'highlight', 'link-7');">highlight</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line">            <tt id="link-294" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-294', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line">            <tt class="py-name">language</tt><tt class="py-op">=</tt><tt class="py-name">language</tt><tt class="py-op">,</tt> </tt>
<a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line">            <tt class="py-name">link</tt><tt class="py-op">=</tt><tt class="py-name">link</tt><tt class="py-op">,</tt> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line">            <tt class="py-name">counter</tt><tt class="py-op">=</tt><tt class="py-name">counter</tt><tt class="py-op">,</tt> </tt>
<a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line">            <tt class="py-name">styles</tt><tt class="py-op">=</tt><tt class="py-name">styles</tt><tt class="py-op">,</tt> </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">            <tt class="py-name">attributes</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">,</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">            <tt class="py-name">highlight_line</tt><tt class="py-op">=</tt><tt class="py-name">highlight_line</tt><tt class="py-op">,</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
</div></div><a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line"> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line"> </tt>
<a name="LABEL"></a><div id="LABEL-def"><a name="L1366"></a><tt class="py-lineno">1366</tt> <a class="py-toggle" href="#" id="LABEL-toggle" onclick="return toggle('LABEL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.LABEL-class.html">LABEL</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LABEL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="LABEL-expanded"><a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line"> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line">    <tt id="link-295" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-295', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'label'</tt> </tt>
</div><a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line"> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line"> </tt>
<a name="LI"></a><div id="LI-def"><a name="L1371"></a><tt class="py-lineno">1371</tt> <a class="py-toggle" href="#" id="LI-toggle" onclick="return toggle('LI');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.LI-class.html">LI</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LI-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="LI-expanded"><a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line"> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">    <tt id="link-296" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-296', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'li'</tt> </tt>
</div><a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line"> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line"> </tt>
<a name="UL"></a><div id="UL-def"><a name="L1376"></a><tt class="py-lineno">1376</tt> <a class="py-toggle" href="#" id="UL-toggle" onclick="return toggle('UL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.UL-class.html">UL</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="UL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="UL-expanded"><a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line"><tt class="py-docstring">    UL Component.</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line"><tt class="py-docstring">    If subcomponents are not LI-components they will be wrapped in a LI</tt> </tt>
<a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1382"></a><tt class="py-lineno">1382</tt>  <tt class="py-line"><tt class="py-docstring">    see also :class:`DIV`</tt> </tt>
<a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1384"></a><tt class="py-lineno">1384</tt>  <tt class="py-line"> </tt>
<a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line">    <tt id="link-297" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-297', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'ul'</tt> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line"> </tt>
<a name="UL._fixup"></a><div id="UL._fixup-def"><a name="L1387"></a><tt class="py-lineno">1387</tt> <a class="py-toggle" href="#" id="UL._fixup-toggle" onclick="return toggle('UL._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.UL-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="UL._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="UL._fixup-expanded"><a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-298" class="py-name" targets="Method web2py.gluon.html.DIV._wrap_components()=web2py.gluon.html.DIV-class.html#_wrap_components"><a title="web2py.gluon.html.DIV._wrap_components" class="py-name" href="#" onclick="return doclink('link-298', '_wrap_components', 'link-298');">_wrap_components</a></tt><tt class="py-op">(</tt><tt id="link-299" class="py-name" targets="Class web2py.gluon.html.LI=web2py.gluon.html.LI-class.html"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-299', 'LI', 'link-299');">LI</a></tt><tt class="py-op">,</tt> <tt id="link-300" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-300', 'LI', 'link-299');">LI</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line"> </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line"> </tt>
<a name="OL"></a><div id="OL-def"><a name="L1391"></a><tt class="py-lineno">1391</tt> <a class="py-toggle" href="#" id="OL-toggle" onclick="return toggle('OL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.OL-class.html">OL</a><tt class="py-op">(</tt><tt class="py-base-class">UL</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="OL-expanded"><a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line"> </tt>
<a name="L1393"></a><tt class="py-lineno">1393</tt>  <tt class="py-line">    <tt id="link-301" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-301', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'ol'</tt> </tt>
</div><a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line"> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line"> </tt>
<a name="TD"></a><div id="TD-def"><a name="L1396"></a><tt class="py-lineno">1396</tt> <a class="py-toggle" href="#" id="TD-toggle" onclick="return toggle('TD');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TD-class.html">TD</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TD-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TD-expanded"><a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line"> </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">    <tt id="link-302" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-302', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'td'</tt> </tt>
</div><a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line"> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line"> </tt>
<a name="TH"></a><div id="TH-def"><a name="L1401"></a><tt class="py-lineno">1401</tt> <a class="py-toggle" href="#" id="TH-toggle" onclick="return toggle('TH');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TH-class.html">TH</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TH-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TH-expanded"><a name="L1402"></a><tt class="py-lineno">1402</tt>  <tt class="py-line"> </tt>
<a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">    <tt id="link-303" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-303', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'th'</tt> </tt>
</div><a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line"> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line"> </tt>
<a name="TR"></a><div id="TR-def"><a name="L1406"></a><tt class="py-lineno">1406</tt> <a class="py-toggle" href="#" id="TR-toggle" onclick="return toggle('TR');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TR-class.html">TR</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TR-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TR-expanded"><a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line"><tt class="py-docstring">    TR Component.</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line"><tt class="py-docstring">    If subcomponents are not TD/TH-components they will be wrapped in a TD</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line"><tt class="py-docstring">    see also :class:`DIV`</tt> </tt>
<a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line"> </tt>
<a name="L1415"></a><tt class="py-lineno">1415</tt>  <tt class="py-line">    <tt id="link-304" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-304', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'tr'</tt> </tt>
<a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line"> </tt>
<a name="TR._fixup"></a><div id="TR._fixup-def"><a name="L1417"></a><tt class="py-lineno">1417</tt> <a class="py-toggle" href="#" id="TR._fixup-toggle" onclick="return toggle('TR._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.TR-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TR._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TR._fixup-expanded"><a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-305" class="py-name"><a title="web2py.gluon.html.DIV._wrap_components" class="py-name" href="#" onclick="return doclink('link-305', '_wrap_components', 'link-298');">_wrap_components</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-306" class="py-name" targets="Class web2py.gluon.html.TD=web2py.gluon.html.TD-class.html"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-306', 'TD', 'link-306');">TD</a></tt><tt class="py-op">,</tt> <tt id="link-307" class="py-name" targets="Class web2py.gluon.html.TH=web2py.gluon.html.TH-class.html"><a title="web2py.gluon.html.TH" class="py-name" href="#" onclick="return doclink('link-307', 'TH', 'link-307');">TH</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-308" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-308', 'TD', 'link-306');">TD</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line"> </tt>
<a name="THEAD"></a><div id="THEAD-def"><a name="L1420"></a><tt class="py-lineno">1420</tt> <a class="py-toggle" href="#" id="THEAD-toggle" onclick="return toggle('THEAD');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.THEAD-class.html">THEAD</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="THEAD-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="THEAD-expanded"><a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line"> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">    <tt id="link-309" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-309', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'thead'</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line"> </tt>
<a name="THEAD._fixup"></a><div id="THEAD._fixup-def"><a name="L1424"></a><tt class="py-lineno">1424</tt> <a class="py-toggle" href="#" id="THEAD._fixup-toggle" onclick="return toggle('THEAD._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.THEAD-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="THEAD._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="THEAD._fixup-expanded"><a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-310" class="py-name"><a title="web2py.gluon.html.DIV._wrap_components" class="py-name" href="#" onclick="return doclink('link-310', '_wrap_components', 'link-298');">_wrap_components</a></tt><tt class="py-op">(</tt><tt id="link-311" class="py-name" targets="Class web2py.gluon.html.TR=web2py.gluon.html.TR-class.html"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-311', 'TR', 'link-311');">TR</a></tt><tt class="py-op">,</tt> <tt id="link-312" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-312', 'TR', 'link-311');">TR</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line"> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line"> </tt>
<a name="TBODY"></a><div id="TBODY-def"><a name="L1428"></a><tt class="py-lineno">1428</tt> <a class="py-toggle" href="#" id="TBODY-toggle" onclick="return toggle('TBODY');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TBODY-class.html">TBODY</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBODY-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TBODY-expanded"><a name="L1429"></a><tt class="py-lineno">1429</tt>  <tt class="py-line"> </tt>
<a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">    <tt id="link-313" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-313', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'tbody'</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line"> </tt>
<a name="TBODY._fixup"></a><div id="TBODY._fixup-def"><a name="L1432"></a><tt class="py-lineno">1432</tt> <a class="py-toggle" href="#" id="TBODY._fixup-toggle" onclick="return toggle('TBODY._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.TBODY-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBODY._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TBODY._fixup-expanded"><a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-314" class="py-name"><a title="web2py.gluon.html.DIV._wrap_components" class="py-name" href="#" onclick="return doclink('link-314', '_wrap_components', 'link-298');">_wrap_components</a></tt><tt class="py-op">(</tt><tt id="link-315" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-315', 'TR', 'link-311');">TR</a></tt><tt class="py-op">,</tt> <tt id="link-316" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-316', 'TR', 'link-311');">TR</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line"> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line"> </tt>
<a name="TFOOT"></a><div id="TFOOT-def"><a name="L1436"></a><tt class="py-lineno">1436</tt> <a class="py-toggle" href="#" id="TFOOT-toggle" onclick="return toggle('TFOOT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TFOOT-class.html">TFOOT</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TFOOT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TFOOT-expanded"><a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line"> </tt>
<a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">    <tt id="link-317" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-317', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'tfoot'</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line"> </tt>
<a name="TFOOT._fixup"></a><div id="TFOOT._fixup-def"><a name="L1440"></a><tt class="py-lineno">1440</tt> <a class="py-toggle" href="#" id="TFOOT._fixup-toggle" onclick="return toggle('TFOOT._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.TFOOT-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TFOOT._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TFOOT._fixup-expanded"><a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-318" class="py-name"><a title="web2py.gluon.html.DIV._wrap_components" class="py-name" href="#" onclick="return doclink('link-318', '_wrap_components', 'link-298');">_wrap_components</a></tt><tt class="py-op">(</tt><tt id="link-319" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-319', 'TR', 'link-311');">TR</a></tt><tt class="py-op">,</tt> <tt id="link-320" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-320', 'TR', 'link-311');">TR</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line"> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line"> </tt>
<a name="COL"></a><div id="COL-def"><a name="L1444"></a><tt class="py-lineno">1444</tt> <a class="py-toggle" href="#" id="COL-toggle" onclick="return toggle('COL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.COL-class.html">COL</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="COL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="COL-expanded"><a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line"> </tt>
<a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line">    <tt id="link-321" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-321', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'col'</tt> </tt>
</div><a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line"> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line"> </tt>
<a name="COLGROUP"></a><div id="COLGROUP-def"><a name="L1449"></a><tt class="py-lineno">1449</tt> <a class="py-toggle" href="#" id="COLGROUP-toggle" onclick="return toggle('COLGROUP');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.COLGROUP-class.html">COLGROUP</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="COLGROUP-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="COLGROUP-expanded"><a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line"> </tt>
<a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line">    <tt id="link-322" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-322', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'colgroup'</tt> </tt>
</div><a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line"> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line"> </tt>
<a name="TABLE"></a><div id="TABLE-def"><a name="L1454"></a><tt class="py-lineno">1454</tt> <a class="py-toggle" href="#" id="TABLE-toggle" onclick="return toggle('TABLE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TABLE-class.html">TABLE</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TABLE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TABLE-expanded"><a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line"><tt class="py-docstring">    TABLE Component.</tt> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line"><tt class="py-docstring">    If subcomponents are not TR/TBODY/THEAD/TFOOT-components</tt> </tt>
<a name="L1459"></a><tt class="py-lineno">1459</tt>  <tt class="py-line"><tt class="py-docstring">    they will be wrapped in a TR</tt> </tt>
<a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line"><tt class="py-docstring">    see also :class:`DIV`</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line"> </tt>
<a name="L1464"></a><tt class="py-lineno">1464</tt>  <tt class="py-line">    <tt id="link-323" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-323', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'table'</tt> </tt>
<a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line"> </tt>
<a name="TABLE._fixup"></a><div id="TABLE._fixup-def"><a name="L1466"></a><tt class="py-lineno">1466</tt> <a class="py-toggle" href="#" id="TABLE._fixup-toggle" onclick="return toggle('TABLE._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.TABLE-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TABLE._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TABLE._fixup-expanded"><a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-324" class="py-name"><a title="web2py.gluon.html.DIV._wrap_components" class="py-name" href="#" onclick="return doclink('link-324', '_wrap_components', 'link-298');">_wrap_components</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-325" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-325', 'TR', 'link-311');">TR</a></tt><tt class="py-op">,</tt> <tt id="link-326" class="py-name" targets="Class web2py.gluon.html.TBODY=web2py.gluon.html.TBODY-class.html"><a title="web2py.gluon.html.TBODY" class="py-name" href="#" onclick="return doclink('link-326', 'TBODY', 'link-326');">TBODY</a></tt><tt class="py-op">,</tt> <tt id="link-327" class="py-name" targets="Class web2py.gluon.html.THEAD=web2py.gluon.html.THEAD-class.html"><a title="web2py.gluon.html.THEAD" class="py-name" href="#" onclick="return doclink('link-327', 'THEAD', 'link-327');">THEAD</a></tt><tt class="py-op">,</tt> <tt id="link-328" class="py-name" targets="Class web2py.gluon.html.TFOOT=web2py.gluon.html.TFOOT-class.html"><a title="web2py.gluon.html.TFOOT" class="py-name" href="#" onclick="return doclink('link-328', 'TFOOT', 'link-328');">TFOOT</a></tt><tt class="py-op">,</tt> <tt id="link-329" class="py-name" targets="Class web2py.gluon.html.COL=web2py.gluon.html.COL-class.html"><a title="web2py.gluon.html.COL" class="py-name" href="#" onclick="return doclink('link-329', 'COL', 'link-329');">COL</a></tt><tt class="py-op">,</tt> <tt id="link-330" class="py-name" targets="Class web2py.gluon.html.COLGROUP=web2py.gluon.html.COLGROUP-class.html"><a title="web2py.gluon.html.COLGROUP" class="py-name" href="#" onclick="return doclink('link-330', 'COLGROUP', 'link-330');">COLGROUP</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-331" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-331', 'TR', 'link-311');">TR</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line"> </tt>
<a name="I"></a><div id="I-def"><a name="L1469"></a><tt class="py-lineno">1469</tt> <a class="py-toggle" href="#" id="I-toggle" onclick="return toggle('I');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.I-class.html">I</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="I-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="I-expanded"><a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line"> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">    <tt id="link-332" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-332', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'i'</tt> </tt>
</div><a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line"> </tt>
<a name="IFRAME"></a><div id="IFRAME-def"><a name="L1473"></a><tt class="py-lineno">1473</tt> <a class="py-toggle" href="#" id="IFRAME-toggle" onclick="return toggle('IFRAME');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.IFRAME-class.html">IFRAME</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IFRAME-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IFRAME-expanded"><a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line"> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">    <tt id="link-333" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-333', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'iframe'</tt> </tt>
</div><a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line"> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line"> </tt>
<a name="INPUT"></a><div id="INPUT-def"><a name="L1478"></a><tt class="py-lineno">1478</tt> <a class="py-toggle" href="#" id="INPUT-toggle" onclick="return toggle('INPUT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.INPUT-class.html">INPUT</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="INPUT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="INPUT-expanded"><a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line"> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT Component</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line"><tt class="py-docstring">        examples::</tt> </tt>
<a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1485"></a><tt class="py-lineno">1485</tt>  <tt class="py-line"><tt class="py-docstring">            &gt;&gt;&gt; INPUT(_type='text', _name='name', value='Max').xml()</tt> </tt>
<a name="L1486"></a><tt class="py-lineno">1486</tt>  <tt class="py-line"><tt class="py-docstring">            '&lt;input name=\"name\" type=\"text\" value=\"Max\" /&gt;'</tt> </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line"><tt class="py-docstring">            &gt;&gt;&gt; INPUT(_type='checkbox', _name='checkbox', value='on').xml()</tt> </tt>
<a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line"><tt class="py-docstring">            '&lt;input checked=\"checked\" name=\"checkbox\" type=\"checkbox\" value=\"on\" /&gt;'</tt> </tt>
<a name="L1490"></a><tt class="py-lineno">1490</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line"><tt class="py-docstring">            &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line"><tt class="py-docstring">            '&lt;input checked=\"checked\" name=\"radio\" type=\"radio\" value=\"yes\" /&gt;'</tt> </tt>
<a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line"><tt class="py-docstring">            &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line"><tt class="py-docstring">            '&lt;input name=\"radio\" type=\"radio\" value=\"no\" /&gt;'</tt> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line"><tt class="py-docstring">        the input helper takes two special attributes value= and requires=.</tt> </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: used to pass the initial value for the input field.</tt> </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line"><tt class="py-docstring">            value differs from _value because it works for checkboxes, radio,</tt> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line"><tt class="py-docstring">            textarea and select/option too.</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line"><tt class="py-docstring">            - for a checkbox value should be '' or 'on'.</tt> </tt>
<a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line"><tt class="py-docstring">            - for a radio or select/option value should be the _value</tt> </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line"><tt class="py-docstring">                of the checked/selected item.</tt> </tt>
<a name="L1506"></a><tt class="py-lineno">1506</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line"><tt class="py-docstring">        :param requires: should be None, or a validator or a list of validators</tt> </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line"><tt class="py-docstring">            for the value of the field.</tt> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line"> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line">    <tt id="link-334" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-334', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'input/'</tt> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line"> </tt>
<a name="INPUT._validate"></a><div id="INPUT._validate-def"><a name="L1513"></a><tt class="py-lineno">1513</tt> <a class="py-toggle" href="#" id="INPUT._validate-toggle" onclick="return toggle('INPUT._validate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.INPUT-class.html#_validate">_validate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="INPUT._validate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="INPUT._validate-expanded"><a name="L1514"></a><tt class="py-lineno">1514</tt>  <tt class="py-line"> </tt>
<a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line">        <tt class="py-comment"># # this only changes value, not _value</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line">        <tt id="link-335" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-335', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_name'</tt><tt class="py-op">]</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-336" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-336', 'name', 'link-74');">name</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt id="link-337" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-337', 'name', 'link-74');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt><tt class="py-op">:</tt> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line">        <tt id="link-338" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-338', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-339" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-339', 'name', 'link-74');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line"> </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_type'</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'checkbox'</tt><tt class="py-op">:</tt> </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'old_value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-340" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-340', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt id="link-341" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-341', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'old_value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">False</tt> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-342" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-342', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt id="link-343" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-343', 'name', 'link-74');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1530"></a><tt class="py-lineno">1530</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt> </tt>
<a name="L1531"></a><tt class="py-lineno">1531</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1532"></a><tt class="py-lineno">1532</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">value</tt> </tt>
<a name="L1533"></a><tt class="py-lineno">1533</tt>  <tt class="py-line">        <tt id="link-344" class="py-name" targets="Method web2py.gluon.tools.Auth.requires()=web2py.gluon.tools.Auth-class.html#requires"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-344', 'requires', 'link-344');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'requires'</tt><tt class="py-op">]</tt> </tt>
<a name="L1534"></a><tt class="py-lineno">1534</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-345" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-345', 'requires', 'link-344');">requires</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1535"></a><tt class="py-lineno">1535</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-346" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-346', 'requires', 'link-344');">requires</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1536"></a><tt class="py-lineno">1536</tt>  <tt class="py-line">                <tt id="link-347" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-347', 'requires', 'link-344');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-348" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-348', 'requires', 'link-344');">requires</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1537"></a><tt class="py-lineno">1537</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">validator</tt> <tt class="py-keyword">in</tt> <tt id="link-349" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-349', 'requires', 'link-344');">requires</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1538"></a><tt class="py-lineno">1538</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">errors</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">validator</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1539"></a><tt class="py-lineno">1539</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">errors</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1540"></a><tt class="py-lineno">1540</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt id="link-350" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-350', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L1541"></a><tt class="py-lineno">1541</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt id="link-351" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-351', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">errors</tt> </tt>
<a name="L1542"></a><tt class="py-lineno">1542</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L1543"></a><tt class="py-lineno">1543</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-352" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-352', 'name', 'link-74');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">:</tt> </tt>
<a name="L1544"></a><tt class="py-lineno">1544</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt id="link-353" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-353', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L1545"></a><tt class="py-lineno">1545</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1546"></a><tt class="py-lineno">1546</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1547"></a><tt class="py-lineno">1547</tt>  <tt class="py-line"> </tt>
<a name="INPUT._postprocessing"></a><div id="INPUT._postprocessing-def"><a name="L1548"></a><tt class="py-lineno">1548</tt> <a class="py-toggle" href="#" id="INPUT._postprocessing-toggle" onclick="return toggle('INPUT._postprocessing');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.INPUT-class.html#_postprocessing">_postprocessing</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="INPUT._postprocessing-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="INPUT._postprocessing-expanded"><a name="L1549"></a><tt class="py-lineno">1549</tt>  <tt class="py-line">        <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_type'</tt><tt class="py-op">]</tt> </tt>
<a name="L1550"></a><tt class="py-lineno">1550</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">t</tt><tt class="py-op">:</tt> </tt>
<a name="L1551"></a><tt class="py-lineno">1551</tt>  <tt class="py-line">            <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text'</tt> </tt>
<a name="L1552"></a><tt class="py-lineno">1552</tt>  <tt class="py-line">        <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">t</tt><tt class="py-op">.</tt><tt id="link-354" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-354', 'lower', 'link-354');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1553"></a><tt class="py-lineno">1553</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> </tt>
<a name="L1554"></a><tt class="py-lineno">1554</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1555"></a><tt class="py-lineno">1555</tt>  <tt class="py-line">            <tt class="py-name">_value</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1556"></a><tt class="py-lineno">1556</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1557"></a><tt class="py-lineno">1557</tt>  <tt class="py-line">            <tt class="py-name">_value</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1558"></a><tt class="py-lineno">1558</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt class="py-string">'checkbox'</tt><tt class="py-op">:</tt> </tt>
<a name="L1559"></a><tt class="py-lineno">1559</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">_value</tt><tt class="py-op">:</tt> </tt>
<a name="L1560"></a><tt class="py-lineno">1560</tt>  <tt class="py-line">                <tt class="py-name">_value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'on'</tt> </tt>
<a name="L1561"></a><tt class="py-lineno">1561</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L1562"></a><tt class="py-lineno">1562</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1563"></a><tt class="py-lineno">1563</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L1564"></a><tt class="py-lineno">1564</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">_value</tt><tt class="py-op">]</tt> </tt>
<a name="L1565"></a><tt class="py-lineno">1565</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt><tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1566"></a><tt class="py-lineno">1566</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'|'</tt><tt class="py-op">)</tt> </tt>
<a name="L1567"></a><tt class="py-lineno">1567</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_checked'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">_value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'checked'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">None</tt> </tt>
<a name="L1568"></a><tt class="py-lineno">1568</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt class="py-string">'radio'</tt><tt class="py-op">:</tt> </tt>
<a name="L1569"></a><tt class="py-lineno">1569</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">_value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1570"></a><tt class="py-lineno">1570</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_checked'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'checked'</tt> </tt>
<a name="L1571"></a><tt class="py-lineno">1571</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1572"></a><tt class="py-lineno">1572</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_checked'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1573"></a><tt class="py-lineno">1573</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt class="py-string">'text'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt class="py-string">'hidden'</tt><tt class="py-op">:</tt> </tt>
<a name="L1574"></a><tt class="py-lineno">1574</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1575"></a><tt class="py-lineno">1575</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L1576"></a><tt class="py-lineno">1576</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1577"></a><tt class="py-lineno">1577</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">_value</tt> </tt>
</div><a name="L1578"></a><tt class="py-lineno">1578</tt>  <tt class="py-line"> </tt>
<a name="INPUT.xml"></a><div id="INPUT.xml-def"><a name="L1579"></a><tt class="py-lineno">1579</tt> <a class="py-toggle" href="#" id="INPUT.xml-toggle" onclick="return toggle('INPUT.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.INPUT-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="INPUT.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="INPUT.xml-expanded"><a name="L1580"></a><tt class="py-lineno">1580</tt>  <tt class="py-line">        <tt id="link-355" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-355', 'name', 'link-74');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-356" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-356', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_name'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1581"></a><tt class="py-lineno">1581</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-357" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-357', 'name', 'link-74');">name</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'errors'</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1582"></a><tt class="py-lineno">1582</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">.</tt><tt id="link-358" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-358', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt id="link-359" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-359', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1583"></a><tt class="py-lineno">1583</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'hideerror'</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L1584"></a><tt class="py-lineno">1584</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-360" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-360', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-361" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-361', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-362" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-362', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt id="link-363" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-363', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'error'</tt><tt class="py-op">,</tt> </tt>
<a name="L1585"></a><tt class="py-lineno">1585</tt>  <tt class="py-line">                <tt class="py-name">errors</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">'%s__error'</tt> <tt class="py-op">%</tt> <tt id="link-364" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-364', 'name', 'link-74');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-365" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-365', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1586"></a><tt class="py-lineno">1586</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1587"></a><tt class="py-lineno">1587</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-366" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-366', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-367" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-367', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1588"></a><tt class="py-lineno">1588</tt>  <tt class="py-line"> </tt>
<a name="L1589"></a><tt class="py-lineno">1589</tt>  <tt class="py-line"> </tt>
<a name="TEXTAREA"></a><div id="TEXTAREA-def"><a name="L1590"></a><tt class="py-lineno">1590</tt> <a class="py-toggle" href="#" id="TEXTAREA-toggle" onclick="return toggle('TEXTAREA');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.TEXTAREA-class.html">TEXTAREA</a><tt class="py-op">(</tt><tt class="py-base-class">INPUT</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TEXTAREA-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TEXTAREA-expanded"><a name="L1591"></a><tt class="py-lineno">1591</tt>  <tt class="py-line"> </tt>
<a name="L1592"></a><tt class="py-lineno">1592</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1593"></a><tt class="py-lineno">1593</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L1594"></a><tt class="py-lineno">1594</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1595"></a><tt class="py-lineno">1595</tt>  <tt class="py-line"><tt class="py-docstring">        TEXTAREA(_name='sometext', value='blah '*100, requires=IS_NOT_EMPTY())</tt> </tt>
<a name="L1596"></a><tt class="py-lineno">1596</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1597"></a><tt class="py-lineno">1597</tt>  <tt class="py-line"><tt class="py-docstring">    'blah blah blah ...' will be the content of the textarea field.</tt> </tt>
<a name="L1598"></a><tt class="py-lineno">1598</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1599"></a><tt class="py-lineno">1599</tt>  <tt class="py-line"> </tt>
<a name="L1600"></a><tt class="py-lineno">1600</tt>  <tt class="py-line">    <tt id="link-368" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-368', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'textarea'</tt> </tt>
<a name="L1601"></a><tt class="py-lineno">1601</tt>  <tt class="py-line"> </tt>
<a name="TEXTAREA._postprocessing"></a><div id="TEXTAREA._postprocessing-def"><a name="L1602"></a><tt class="py-lineno">1602</tt> <a class="py-toggle" href="#" id="TEXTAREA._postprocessing-toggle" onclick="return toggle('TEXTAREA._postprocessing');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.TEXTAREA-class.html#_postprocessing">_postprocessing</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TEXTAREA._postprocessing-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TEXTAREA._postprocessing-expanded"><a name="L1603"></a><tt class="py-lineno">1603</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_rows'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1604"></a><tt class="py-lineno">1604</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_rows'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">10</tt> </tt>
<a name="L1605"></a><tt class="py-lineno">1605</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_cols'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1606"></a><tt class="py-lineno">1606</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_cols'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">40</tt> </tt>
<a name="L1607"></a><tt class="py-lineno">1607</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1608"></a><tt class="py-lineno">1608</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
<a name="L1609"></a><tt class="py-lineno">1609</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L1610"></a><tt class="py-lineno">1610</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L1611"></a><tt class="py-lineno">1611</tt>  <tt class="py-line"> </tt>
<a name="L1612"></a><tt class="py-lineno">1612</tt>  <tt class="py-line"> </tt>
<a name="OPTION"></a><div id="OPTION-def"><a name="L1613"></a><tt class="py-lineno">1613</tt> <a class="py-toggle" href="#" id="OPTION-toggle" onclick="return toggle('OPTION');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.OPTION-class.html">OPTION</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OPTION-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="OPTION-expanded"><a name="L1614"></a><tt class="py-lineno">1614</tt>  <tt class="py-line"> </tt>
<a name="L1615"></a><tt class="py-lineno">1615</tt>  <tt class="py-line">    <tt id="link-369" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-369', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'option'</tt> </tt>
<a name="L1616"></a><tt class="py-lineno">1616</tt>  <tt class="py-line"> </tt>
<a name="OPTION._fixup"></a><div id="OPTION._fixup-def"><a name="L1617"></a><tt class="py-lineno">1617</tt> <a class="py-toggle" href="#" id="OPTION._fixup-toggle" onclick="return toggle('OPTION._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.OPTION-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OPTION._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="OPTION._fixup-expanded"><a name="L1618"></a><tt class="py-lineno">1618</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_value'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1619"></a><tt class="py-lineno">1619</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1620"></a><tt class="py-lineno">1620</tt>  <tt class="py-line"> </tt>
<a name="L1621"></a><tt class="py-lineno">1621</tt>  <tt class="py-line"> </tt>
<a name="OBJECT"></a><div id="OBJECT-def"><a name="L1622"></a><tt class="py-lineno">1622</tt> <a class="py-toggle" href="#" id="OBJECT-toggle" onclick="return toggle('OBJECT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.OBJECT-class.html">OBJECT</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OBJECT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="OBJECT-expanded"><a name="L1623"></a><tt class="py-lineno">1623</tt>  <tt class="py-line"> </tt>
<a name="L1624"></a><tt class="py-lineno">1624</tt>  <tt class="py-line">    <tt id="link-370" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-370', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'object'</tt> </tt>
</div><a name="L1625"></a><tt class="py-lineno">1625</tt>  <tt class="py-line"> </tt>
<a name="OPTGROUP"></a><div id="OPTGROUP-def"><a name="L1626"></a><tt class="py-lineno">1626</tt> <a class="py-toggle" href="#" id="OPTGROUP-toggle" onclick="return toggle('OPTGROUP');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.OPTGROUP-class.html">OPTGROUP</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OPTGROUP-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="OPTGROUP-expanded"><a name="L1627"></a><tt class="py-lineno">1627</tt>  <tt class="py-line"> </tt>
<a name="L1628"></a><tt class="py-lineno">1628</tt>  <tt class="py-line">    <tt id="link-371" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-371', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'optgroup'</tt> </tt>
<a name="L1629"></a><tt class="py-lineno">1629</tt>  <tt class="py-line"> </tt>
<a name="OPTGROUP._fixup"></a><div id="OPTGROUP._fixup-def"><a name="L1630"></a><tt class="py-lineno">1630</tt> <a class="py-toggle" href="#" id="OPTGROUP._fixup-toggle" onclick="return toggle('OPTGROUP._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.OPTGROUP-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OPTGROUP._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="OPTGROUP._fixup-expanded"><a name="L1631"></a><tt class="py-lineno">1631</tt>  <tt class="py-line">        <tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1632"></a><tt class="py-lineno">1632</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L1633"></a><tt class="py-lineno">1633</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt id="link-372" class="py-name" targets="Class web2py.gluon.html.OPTION=web2py.gluon.html.OPTION-class.html"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-372', 'OPTION', 'link-372');">OPTION</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1634"></a><tt class="py-lineno">1634</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-373" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-373', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L1635"></a><tt class="py-lineno">1635</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1636"></a><tt class="py-lineno">1636</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-374" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-374', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-375" class="py-name"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-375', 'OPTION', 'link-372');">OPTION</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1637"></a><tt class="py-lineno">1637</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">components</tt> </tt>
</div></div><a name="L1638"></a><tt class="py-lineno">1638</tt>  <tt class="py-line"> </tt>
<a name="L1639"></a><tt class="py-lineno">1639</tt>  <tt class="py-line"> </tt>
<a name="SELECT"></a><div id="SELECT-def"><a name="L1640"></a><tt class="py-lineno">1640</tt> <a class="py-toggle" href="#" id="SELECT-toggle" onclick="return toggle('SELECT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.SELECT-class.html">SELECT</a><tt class="py-op">(</tt><tt class="py-base-class">INPUT</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SELECT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SELECT-expanded"><a name="L1641"></a><tt class="py-lineno">1641</tt>  <tt class="py-line"> </tt>
<a name="L1642"></a><tt class="py-lineno">1642</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1643"></a><tt class="py-lineno">1643</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L1644"></a><tt class="py-lineno">1644</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1645"></a><tt class="py-lineno">1645</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; from validators import IS_IN_SET</tt> </tt>
<a name="L1646"></a><tt class="py-lineno">1646</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; SELECT('yes', 'no', _name='selector', value='yes',</tt> </tt>
<a name="L1647"></a><tt class="py-lineno">1647</tt>  <tt class="py-line"><tt class="py-docstring">        ...    requires=IS_IN_SET(['yes', 'no'])).xml()</tt> </tt>
<a name="L1648"></a><tt class="py-lineno">1648</tt>  <tt class="py-line"><tt class="py-docstring">        '&lt;select name=\"selector\"&gt;&lt;option selected=\"selected\" value=\"yes\"&gt;yes&lt;/option&gt;&lt;option value=\"no\"&gt;no&lt;/option&gt;&lt;/select&gt;'</tt> </tt>
<a name="L1649"></a><tt class="py-lineno">1649</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1650"></a><tt class="py-lineno">1650</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1651"></a><tt class="py-lineno">1651</tt>  <tt class="py-line"> </tt>
<a name="L1652"></a><tt class="py-lineno">1652</tt>  <tt class="py-line">    <tt id="link-376" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-376', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'select'</tt> </tt>
<a name="L1653"></a><tt class="py-lineno">1653</tt>  <tt class="py-line"> </tt>
<a name="SELECT._fixup"></a><div id="SELECT._fixup-def"><a name="L1654"></a><tt class="py-lineno">1654</tt> <a class="py-toggle" href="#" id="SELECT._fixup-toggle" onclick="return toggle('SELECT._fixup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.SELECT-class.html#_fixup">_fixup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SELECT._fixup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SELECT._fixup-expanded"><a name="L1655"></a><tt class="py-lineno">1655</tt>  <tt class="py-line">        <tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1656"></a><tt class="py-lineno">1656</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L1657"></a><tt class="py-lineno">1657</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt id="link-377" class="py-name"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-377', 'OPTION', 'link-372');">OPTION</a></tt><tt class="py-op">,</tt> <tt id="link-378" class="py-name" targets="Class web2py.gluon.html.OPTGROUP=web2py.gluon.html.OPTGROUP-class.html"><a title="web2py.gluon.html.OPTGROUP" class="py-name" href="#" onclick="return doclink('link-378', 'OPTGROUP', 'link-378');">OPTGROUP</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1658"></a><tt class="py-lineno">1658</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-379" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-379', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L1659"></a><tt class="py-lineno">1659</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1660"></a><tt class="py-lineno">1660</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-380" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-380', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-381" class="py-name"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-381', 'OPTION', 'link-372');">OPTION</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1661"></a><tt class="py-lineno">1661</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">components</tt> </tt>
</div><a name="L1662"></a><tt class="py-lineno">1662</tt>  <tt class="py-line"> </tt>
<a name="SELECT._postprocessing"></a><div id="SELECT._postprocessing-def"><a name="L1663"></a><tt class="py-lineno">1663</tt> <a class="py-toggle" href="#" id="SELECT._postprocessing-toggle" onclick="return toggle('SELECT._postprocessing');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.SELECT-class.html#_postprocessing">_postprocessing</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SELECT._postprocessing-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SELECT._postprocessing-expanded"><a name="L1664"></a><tt class="py-lineno">1664</tt>  <tt class="py-line">        <tt class="py-name">component_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1665"></a><tt class="py-lineno">1665</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L1666"></a><tt class="py-lineno">1666</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt id="link-382" class="py-name"><a title="web2py.gluon.html.OPTGROUP" class="py-name" href="#" onclick="return doclink('link-382', 'OPTGROUP', 'link-378');">OPTGROUP</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1667"></a><tt class="py-lineno">1667</tt>  <tt class="py-line">                <tt class="py-name">component_list</tt><tt class="py-op">.</tt><tt id="link-383" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-383', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">)</tt> </tt>
<a name="L1668"></a><tt class="py-lineno">1668</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1669"></a><tt class="py-lineno">1669</tt>  <tt class="py-line">                <tt class="py-name">component_list</tt><tt class="py-op">.</tt><tt id="link-384" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-384', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1670"></a><tt class="py-lineno">1670</tt>  <tt class="py-line">        <tt id="link-385" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-385', 'options', 'link-385');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">itertools</tt><tt class="py-op">.</tt><tt class="py-name">chain</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">component_list</tt><tt class="py-op">)</tt> </tt>
<a name="L1671"></a><tt class="py-lineno">1671</tt>  <tt class="py-line"> </tt>
<a name="L1672"></a><tt class="py-lineno">1672</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> </tt>
<a name="L1673"></a><tt class="py-lineno">1673</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1674"></a><tt class="py-lineno">1674</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_multiple'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1675"></a><tt class="py-lineno">1675</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt id="link-386" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-386', 'options', 'link-385');">options</a></tt><tt class="py-op">:</tt> <tt class="py-comment"># my patch</tt> </tt>
<a name="L1676"></a><tt class="py-lineno">1676</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">and</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1677"></a><tt class="py-lineno">1677</tt>  <tt class="py-line">                        <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'_selected'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'selected'</tt> </tt>
<a name="L1678"></a><tt class="py-lineno">1678</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1679"></a><tt class="py-lineno">1679</tt>  <tt class="py-line">                        <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'_selected'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1680"></a><tt class="py-lineno">1680</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1681"></a><tt class="py-lineno">1681</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt><tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1682"></a><tt class="py-lineno">1682</tt>  <tt class="py-line">                    <tt id="link-387" class="py-name" targets="Method web2py.gluon.rocket.Headers.values()=web2py.gluon.rocket.Headers-class.html#values"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-387', 'values', 'link-387');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L1683"></a><tt class="py-lineno">1683</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1684"></a><tt class="py-lineno">1684</tt>  <tt class="py-line">                    <tt id="link-388" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-388', 'values', 'link-387');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L1685"></a><tt class="py-lineno">1685</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt id="link-389" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-389', 'options', 'link-385');">options</a></tt><tt class="py-op">:</tt> <tt class="py-comment"># my patch</tt> </tt>
<a name="L1686"></a><tt class="py-lineno">1686</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">and</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'_value'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-390" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-390', 'values', 'link-387');">values</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1687"></a><tt class="py-lineno">1687</tt>  <tt class="py-line">                        <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'_selected'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'selected'</tt> </tt>
<a name="L1688"></a><tt class="py-lineno">1688</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1689"></a><tt class="py-lineno">1689</tt>  <tt class="py-line">                        <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'_selected'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div></div><a name="L1690"></a><tt class="py-lineno">1690</tt>  <tt class="py-line"> </tt>
<a name="L1691"></a><tt class="py-lineno">1691</tt>  <tt class="py-line"> </tt>
<a name="FIELDSET"></a><div id="FIELDSET-def"><a name="L1692"></a><tt class="py-lineno">1692</tt> <a class="py-toggle" href="#" id="FIELDSET-toggle" onclick="return toggle('FIELDSET');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.FIELDSET-class.html">FIELDSET</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FIELDSET-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="FIELDSET-expanded"><a name="L1693"></a><tt class="py-lineno">1693</tt>  <tt class="py-line"> </tt>
<a name="L1694"></a><tt class="py-lineno">1694</tt>  <tt class="py-line">    <tt id="link-391" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-391', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'fieldset'</tt> </tt>
</div><a name="L1695"></a><tt class="py-lineno">1695</tt>  <tt class="py-line"> </tt>
<a name="L1696"></a><tt class="py-lineno">1696</tt>  <tt class="py-line"> </tt>
<a name="LEGEND"></a><div id="LEGEND-def"><a name="L1697"></a><tt class="py-lineno">1697</tt> <a class="py-toggle" href="#" id="LEGEND-toggle" onclick="return toggle('LEGEND');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.LEGEND-class.html">LEGEND</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LEGEND-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="LEGEND-expanded"><a name="L1698"></a><tt class="py-lineno">1698</tt>  <tt class="py-line"> </tt>
<a name="L1699"></a><tt class="py-lineno">1699</tt>  <tt class="py-line">    <tt id="link-392" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-392', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'legend'</tt> </tt>
</div><a name="L1700"></a><tt class="py-lineno">1700</tt>  <tt class="py-line"> </tt>
<a name="L1701"></a><tt class="py-lineno">1701</tt>  <tt class="py-line"> </tt>
<a name="FORM"></a><div id="FORM-def"><a name="L1702"></a><tt class="py-lineno">1702</tt> <a class="py-toggle" href="#" id="FORM-toggle" onclick="return toggle('FORM');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html">FORM</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="FORM-expanded"><a name="L1703"></a><tt class="py-lineno">1703</tt>  <tt class="py-line"> </tt>
<a name="L1704"></a><tt class="py-lineno">1704</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1705"></a><tt class="py-lineno">1705</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L1706"></a><tt class="py-lineno">1706</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1707"></a><tt class="py-lineno">1707</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; from validators import IS_NOT_EMPTY</tt> </tt>
<a name="L1708"></a><tt class="py-lineno">1708</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; form=FORM(INPUT(_name=\"test\", requires=IS_NOT_EMPTY()))</tt> </tt>
<a name="L1709"></a><tt class="py-lineno">1709</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; form.xml()</tt> </tt>
<a name="L1710"></a><tt class="py-lineno">1710</tt>  <tt class="py-line"><tt class="py-docstring">        '&lt;form action=\"\" enctype=\"multipart/form-data\" method=\"post\"&gt;&lt;input name=\"test\" type=\"text\" /&gt;&lt;/form&gt;'</tt> </tt>
<a name="L1711"></a><tt class="py-lineno">1711</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1712"></a><tt class="py-lineno">1712</tt>  <tt class="py-line"><tt class="py-docstring">    a FORM is container for INPUT, TEXTAREA, SELECT and other helpers</tt> </tt>
<a name="L1713"></a><tt class="py-lineno">1713</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1714"></a><tt class="py-lineno">1714</tt>  <tt class="py-line"><tt class="py-docstring">    form has one important method::</tt> </tt>
<a name="L1715"></a><tt class="py-lineno">1715</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1716"></a><tt class="py-lineno">1716</tt>  <tt class="py-line"><tt class="py-docstring">        form.accepts(request.vars, session)</tt> </tt>
<a name="L1717"></a><tt class="py-lineno">1717</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1718"></a><tt class="py-lineno">1718</tt>  <tt class="py-line"><tt class="py-docstring">    if form is accepted (and all validators pass) form.vars contains the</tt> </tt>
<a name="L1719"></a><tt class="py-lineno">1719</tt>  <tt class="py-line"><tt class="py-docstring">    accepted vars, otherwise form.errors contains the errors.</tt> </tt>
<a name="L1720"></a><tt class="py-lineno">1720</tt>  <tt class="py-line"><tt class="py-docstring">    in case of errors the form is modified to present the errors to the user.</tt> </tt>
<a name="L1721"></a><tt class="py-lineno">1721</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1722"></a><tt class="py-lineno">1722</tt>  <tt class="py-line"> </tt>
<a name="L1723"></a><tt class="py-lineno">1723</tt>  <tt class="py-line">    <tt id="link-393" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-393', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'form'</tt> </tt>
<a name="L1724"></a><tt class="py-lineno">1724</tt>  <tt class="py-line"> </tt>
<a name="FORM.__init__"></a><div id="FORM.__init__-def"><a name="L1725"></a><tt class="py-lineno">1725</tt> <a class="py-toggle" href="#" id="FORM.__init__-toggle" onclick="return toggle('FORM.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">components</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM.__init__-expanded"><a name="L1726"></a><tt class="py-lineno">1726</tt>  <tt class="py-line">        <tt id="link-394" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-394', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-395" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-395', '__init__', 'link-395');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">components</tt><tt class="py-op">,</tt>  <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L1727"></a><tt class="py-lineno">1727</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt id="link-396" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-396', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1728"></a><tt class="py-lineno">1728</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt> <tt class="py-op">=</tt> <tt id="link-397" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-397', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1729"></a><tt class="py-lineno">1729</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">latest</tt> <tt class="py-op">=</tt> <tt id="link-398" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-398', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1730"></a><tt class="py-lineno">1730</tt>  <tt class="py-line"> </tt>
<a name="FORM.accepts"></a><div id="FORM.accepts-def"><a name="L1731"></a><tt class="py-lineno">1731</tt> <a class="py-toggle" href="#" id="FORM.accepts-toggle" onclick="return toggle('FORM.accepts');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#accepts">accepts</a><tt class="py-op">(</tt> </tt>
<a name="L1732"></a><tt class="py-lineno">1732</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1733"></a><tt class="py-lineno">1733</tt>  <tt class="py-line">        <tt class="py-param">vars</tt><tt class="py-op">,</tt> </tt>
<a name="L1734"></a><tt class="py-lineno">1734</tt>  <tt class="py-line">        <tt class="py-param">session</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1735"></a><tt class="py-lineno">1735</tt>  <tt class="py-line">        <tt class="py-param">formname</tt><tt class="py-op">=</tt><tt class="py-string">'default'</tt><tt class="py-op">,</tt> </tt>
<a name="L1736"></a><tt class="py-lineno">1736</tt>  <tt class="py-line">        <tt class="py-param">keepvalues</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1737"></a><tt class="py-lineno">1737</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1738"></a><tt class="py-lineno">1738</tt>  <tt class="py-line">        <tt class="py-param">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1739"></a><tt class="py-lineno">1739</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM.accepts-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM.accepts-expanded"><a name="L1740"></a><tt class="py-lineno">1740</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'Request'</tt><tt class="py-op">:</tt> </tt>
<a name="L1741"></a><tt class="py-lineno">1741</tt>  <tt class="py-line">            <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt> </tt>
<a name="L1742"></a><tt class="py-lineno">1742</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">.</tt><tt id="link-399" class="py-name" targets="Method web2py.gluon.cache.CacheAbstract.clear()=web2py.gluon.cache.CacheAbstract-class.html#clear,Method web2py.gluon.cache.CacheInRam.clear()=web2py.gluon.cache.CacheInRam-class.html#clear,Method web2py.gluon.cache.CacheOnDisk.clear()=web2py.gluon.cache.CacheOnDisk-class.html#clear"><a title="web2py.gluon.cache.CacheAbstract.clear
web2py.gluon.cache.CacheInRam.clear
web2py.gluon.cache.CacheOnDisk.clear" class="py-name" href="#" onclick="return doclink('link-399', 'clear', 'link-399');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1743"></a><tt class="py-lineno">1743</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt> <tt class="py-op">=</tt> <tt id="link-400" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-400', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1744"></a><tt class="py-lineno">1744</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-401" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-401', 'update', 'link-401');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L1745"></a><tt class="py-lineno">1745</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt> </tt>
<a name="L1746"></a><tt class="py-lineno">1746</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt> <tt class="py-op">=</tt> <tt class="py-name">formname</tt> </tt>
<a name="L1747"></a><tt class="py-lineno">1747</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keepvalues</tt> <tt class="py-op">=</tt> <tt class="py-name">keepvalues</tt> </tt>
<a name="L1748"></a><tt class="py-lineno">1748</tt>  <tt class="py-line"> </tt>
<a name="L1749"></a><tt class="py-lineno">1749</tt>  <tt class="py-line">        <tt class="py-comment"># if this tag is a form and we are in accepting mode (status=True)</tt> </tt>
<a name="L1750"></a><tt class="py-lineno">1750</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># check formname and formkey</tt> </tt>
<a name="L1751"></a><tt class="py-lineno">1751</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1752"></a><tt class="py-lineno">1752</tt>  <tt class="py-line">        <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1753"></a><tt class="py-lineno">1753</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">:</tt> </tt>
<a name="L1754"></a><tt class="py-lineno">1754</tt>  <tt class="py-line">            <tt class="py-name">formkey</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-402" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-402', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_formkey[%s]'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1755"></a><tt class="py-lineno">1755</tt>  <tt class="py-line">            <tt class="py-comment"># check if user tampering with form and void CSRF</tt> </tt>
<a name="L1756"></a><tt class="py-lineno">1756</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">formkey</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">_formkey</tt><tt class="py-op">:</tt> </tt>
<a name="L1757"></a><tt class="py-lineno">1757</tt>  <tt class="py-line">                <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1758"></a><tt class="py-lineno">1758</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">_formname</tt><tt class="py-op">:</tt> </tt>
<a name="L1759"></a><tt class="py-lineno">1759</tt>  <tt class="py-line">            <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1760"></a><tt class="py-lineno">1760</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">status</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">:</tt> </tt>
<a name="L1761"></a><tt class="py-lineno">1761</tt>  <tt class="py-line">            <tt class="py-comment"># check if editing a record that has been modified by the server</tt> </tt>
<a name="L1762"></a><tt class="py-lineno">1762</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-string">'record_hash'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_hash</tt> <tt class="py-op">!=</tt> <tt class="py-name">formkey</tt><tt class="py-op">:</tt> </tt>
<a name="L1763"></a><tt class="py-lineno">1763</tt>  <tt class="py-line">                <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1764"></a><tt class="py-lineno">1764</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1765"></a><tt class="py-lineno">1765</tt>  <tt class="py-line">        <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-403" class="py-name"><a title="web2py.gluon.html.DIV._traverse" class="py-name" href="#" onclick="return doclink('link-403', '_traverse', 'link-100');">_traverse</a></tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt> </tt>
<a name="L1766"></a><tt class="py-lineno">1766</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt><tt class="py-op">:</tt> </tt>
<a name="L1767"></a><tt class="py-lineno">1767</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1768"></a><tt class="py-lineno">1768</tt>  <tt class="py-line">                <tt class="py-name">onsuccess</tt> <tt class="py-op">=</tt> <tt class="py-name">onvalidation</tt><tt class="py-op">.</tt><tt id="link-404" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-404', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'onsuccess'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1769"></a><tt class="py-lineno">1769</tt>  <tt class="py-line">                <tt class="py-name">onfailure</tt> <tt class="py-op">=</tt> <tt class="py-name">onvalidation</tt><tt class="py-op">.</tt><tt id="link-405" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-405', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'onfailure'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1770"></a><tt class="py-lineno">1770</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">onsuccess</tt> <tt class="py-keyword">and</tt> <tt class="py-name">status</tt><tt class="py-op">:</tt> </tt>
<a name="L1771"></a><tt class="py-lineno">1771</tt>  <tt class="py-line">                    <tt class="py-name">onsuccess</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1772"></a><tt class="py-lineno">1772</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">onfailure</tt> <tt class="py-keyword">and</tt> <tt class="py-name">vars</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">status</tt><tt class="py-op">:</tt> </tt>
<a name="L1773"></a><tt class="py-lineno">1773</tt>  <tt class="py-line">                    <tt class="py-name">onfailure</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1774"></a><tt class="py-lineno">1774</tt>  <tt class="py-line">                    <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt id="link-406" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-406', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> </tt>
<a name="L1775"></a><tt class="py-lineno">1775</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">status</tt><tt class="py-op">:</tt> </tt>
<a name="L1776"></a><tt class="py-lineno">1776</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1777"></a><tt class="py-lineno">1777</tt>  <tt class="py-line">                    <tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">onvalidation</tt><tt class="py-op">]</tt> </tt>
<a name="L1778"></a><tt class="py-lineno">1778</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1779"></a><tt class="py-lineno">1779</tt>  <tt class="py-line">                    <tt class="py-name">onvalidation</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1780"></a><tt class="py-lineno">1780</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">:</tt> </tt>
<a name="L1781"></a><tt class="py-lineno">1781</tt>  <tt class="py-line">            <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1782"></a><tt class="py-lineno">1782</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">session</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1783"></a><tt class="py-lineno">1783</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-string">'record_hash'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1784"></a><tt class="py-lineno">1784</tt>  <tt class="py-line">                <tt class="py-name">formkey</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_hash</tt> </tt>
<a name="L1785"></a><tt class="py-lineno">1785</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1786"></a><tt class="py-lineno">1786</tt>  <tt class="py-line">                <tt class="py-name">formkey</tt> <tt class="py-op">=</tt> <tt id="link-407" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-407', 'web2py_uuid', 'link-10');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1787"></a><tt class="py-lineno">1787</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formkey</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt><tt class="py-op">[</tt><tt class="py-string">'_formkey[%s]'</tt> <tt class="py-op">%</tt> <tt class="py-name">formname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">formkey</tt> </tt>
<a name="L1788"></a><tt class="py-lineno">1788</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">status</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">keepvalues</tt><tt class="py-op">:</tt> </tt>
<a name="L1789"></a><tt class="py-lineno">1789</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-408" class="py-name"><a title="web2py.gluon.html.DIV._traverse" class="py-name" href="#" onclick="return doclink('link-408', '_traverse', 'link-100');">_traverse</a></tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt> </tt>
<a name="L1790"></a><tt class="py-lineno">1790</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">status</tt> </tt>
</div><a name="L1791"></a><tt class="py-lineno">1791</tt>  <tt class="py-line"> </tt>
<a name="FORM._postprocessing"></a><div id="FORM._postprocessing-def"><a name="L1792"></a><tt class="py-lineno">1792</tt> <a class="py-toggle" href="#" id="FORM._postprocessing-toggle" onclick="return toggle('FORM._postprocessing');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#_postprocessing">_postprocessing</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM._postprocessing-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM._postprocessing-expanded"><a name="L1793"></a><tt class="py-lineno">1793</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_action'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1794"></a><tt class="py-lineno">1794</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_action'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1795"></a><tt class="py-lineno">1795</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_method'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1796"></a><tt class="py-lineno">1796</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_method'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'post'</tt> </tt>
<a name="L1797"></a><tt class="py-lineno">1797</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_enctype'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1798"></a><tt class="py-lineno">1798</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_enctype'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'multipart/form-data'</tt> </tt>
</div><a name="L1799"></a><tt class="py-lineno">1799</tt>  <tt class="py-line"> </tt>
<a name="FORM.hidden_fields"></a><div id="FORM.hidden_fields-def"><a name="L1800"></a><tt class="py-lineno">1800</tt> <a class="py-toggle" href="#" id="FORM.hidden_fields-toggle" onclick="return toggle('FORM.hidden_fields');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#hidden_fields">hidden_fields</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM.hidden_fields-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM.hidden_fields-expanded"><a name="L1801"></a><tt class="py-lineno">1801</tt>  <tt class="py-line">        <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1802"></a><tt class="py-lineno">1802</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'hidden'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1803"></a><tt class="py-lineno">1803</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-409" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-409', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'hidden'</tt><tt class="py-op">,</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-410" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-410', 'items', 'link-29');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1804"></a><tt class="py-lineno">1804</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-411" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-411', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-412" class="py-name" targets="Class web2py.gluon.html.INPUT=web2py.gluon.html.INPUT-class.html"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-412', 'INPUT', 'link-412');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'hidden'</tt><tt class="py-op">,</tt> <tt id="link-413" class="py-name" targets="Variable psycopg2.tz.FixedOffsetTimezone._name=psycopg2.tz.FixedOffsetTimezone-class.html#_name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-413', '_name', 'link-413');">_name</a></tt><tt class="py-op">=</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1805"></a><tt class="py-lineno">1805</tt>  <tt class="py-line"> </tt>
<a name="L1806"></a><tt class="py-lineno">1806</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'formkey'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formkey</tt><tt class="py-op">:</tt> </tt>
<a name="L1807"></a><tt class="py-lineno">1807</tt>  <tt class="py-line">            <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-414" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-414', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-415" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-415', 'INPUT', 'link-412');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'hidden'</tt><tt class="py-op">,</tt> <tt id="link-416" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-416', '_name', 'link-413');">_name</a></tt><tt class="py-op">=</tt><tt class="py-string">'_formkey'</tt><tt class="py-op">,</tt> </tt>
<a name="L1808"></a><tt class="py-lineno">1808</tt>  <tt class="py-line">                     <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formkey</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1809"></a><tt class="py-lineno">1809</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'formname'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt><tt class="py-op">:</tt> </tt>
<a name="L1810"></a><tt class="py-lineno">1810</tt>  <tt class="py-line">            <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-417" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-417', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-418" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-418', 'INPUT', 'link-412');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'hidden'</tt><tt class="py-op">,</tt> <tt id="link-419" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-419', '_name', 'link-413');">_name</a></tt><tt class="py-op">=</tt><tt class="py-string">'_formname'</tt><tt class="py-op">,</tt> </tt>
<a name="L1811"></a><tt class="py-lineno">1811</tt>  <tt class="py-line">                     <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formname</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1812"></a><tt class="py-lineno">1812</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-420" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-420', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">"hidden"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1813"></a><tt class="py-lineno">1813</tt>  <tt class="py-line"> </tt>
<a name="FORM.xml"></a><div id="FORM.xml-def"><a name="L1814"></a><tt class="py-lineno">1814</tt> <a class="py-toggle" href="#" id="FORM.xml-toggle" onclick="return toggle('FORM.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM.xml-expanded"><a name="L1815"></a><tt class="py-lineno">1815</tt>  <tt class="py-line">        <tt class="py-name">newform</tt> <tt class="py-op">=</tt> <tt id="link-421" class="py-name" targets="Class web2py.gluon.html.FORM=web2py.gluon.html.FORM-class.html"><a title="web2py.gluon.html.FORM" class="py-name" href="#" onclick="return doclink('link-421', 'FORM', 'link-421');">FORM</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L1816"></a><tt class="py-lineno">1816</tt>  <tt class="py-line">        <tt id="link-422" class="py-name" targets="Method web2py.gluon.html.FORM.hidden_fields()=web2py.gluon.html.FORM-class.html#hidden_fields"><a title="web2py.gluon.html.FORM.hidden_fields" class="py-name" href="#" onclick="return doclink('link-422', 'hidden_fields', 'link-422');">hidden_fields</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-423" class="py-name"><a title="web2py.gluon.html.FORM.hidden_fields" class="py-name" href="#" onclick="return doclink('link-423', 'hidden_fields', 'link-422');">hidden_fields</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1817"></a><tt class="py-lineno">1817</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-424" class="py-name"><a title="web2py.gluon.html.FORM.hidden_fields" class="py-name" href="#" onclick="return doclink('link-424', 'hidden_fields', 'link-422');">hidden_fields</a></tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L1818"></a><tt class="py-lineno">1818</tt>  <tt class="py-line">            <tt class="py-name">newform</tt><tt class="py-op">.</tt><tt id="link-425" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-425', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-426" class="py-name"><a title="web2py.gluon.html.FORM.hidden_fields" class="py-name" href="#" onclick="return doclink('link-426', 'hidden_fields', 'link-422');">hidden_fields</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1819"></a><tt class="py-lineno">1819</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-427" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-427', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">.</tt><tt id="link-428" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-428', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-name">newform</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1820"></a><tt class="py-lineno">1820</tt>  <tt class="py-line"> </tt>
<a name="FORM.validate"></a><div id="FORM.validate-def"><a name="L1821"></a><tt class="py-lineno">1821</tt> <a class="py-toggle" href="#" id="FORM.validate-toggle" onclick="return toggle('FORM.validate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#validate">validate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt>  </tt>
<a name="L1822"></a><tt class="py-lineno">1822</tt>  <tt class="py-line">                 <tt class="py-param">values</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1823"></a><tt class="py-lineno">1823</tt>  <tt class="py-line">                 <tt class="py-param">session</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt>  </tt>
<a name="L1824"></a><tt class="py-lineno">1824</tt>  <tt class="py-line">                 <tt class="py-param">formname</tt><tt class="py-op">=</tt><tt class="py-string">'default'</tt><tt class="py-op">,</tt> </tt>
<a name="L1825"></a><tt class="py-lineno">1825</tt>  <tt class="py-line">                 <tt class="py-param">keepvalues</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1826"></a><tt class="py-lineno">1826</tt>  <tt class="py-line">                 <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1827"></a><tt class="py-lineno">1827</tt>  <tt class="py-line">                 <tt class="py-param">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1828"></a><tt class="py-lineno">1828</tt>  <tt class="py-line">                 <tt class="py-param">onsuccess</tt><tt class="py-op">=</tt><tt class="py-string">'flash'</tt><tt class="py-op">,</tt> </tt>
<a name="L1829"></a><tt class="py-lineno">1829</tt>  <tt class="py-line">                 <tt class="py-param">onfailure</tt><tt class="py-op">=</tt><tt class="py-string">'flash'</tt><tt class="py-op">,</tt> </tt>
<a name="L1830"></a><tt class="py-lineno">1830</tt>  <tt class="py-line">                 <tt class="py-param">message_onsuccess</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt>  </tt>
<a name="L1831"></a><tt class="py-lineno">1831</tt>  <tt class="py-line">                 <tt class="py-param">message_onfailure</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt>  </tt>
<a name="L1832"></a><tt class="py-lineno">1832</tt>  <tt class="py-line">                 <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM.validate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM.validate-expanded"><a name="L1833"></a><tt class="py-lineno">1833</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1834"></a><tt class="py-lineno">1834</tt>  <tt class="py-line"><tt class="py-docstring">        This function validates the form, </tt> </tt>
<a name="L1835"></a><tt class="py-lineno">1835</tt>  <tt class="py-line"><tt class="py-docstring">        you can use it instead of directly form.accepts.</tt> </tt>
<a name="L1836"></a><tt class="py-lineno">1836</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1837"></a><tt class="py-lineno">1837</tt>  <tt class="py-line"><tt class="py-docstring">        Usage:</tt> </tt>
<a name="L1838"></a><tt class="py-lineno">1838</tt>  <tt class="py-line"><tt class="py-docstring">        In controller</tt> </tt>
<a name="L1839"></a><tt class="py-lineno">1839</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1840"></a><tt class="py-lineno">1840</tt>  <tt class="py-line"><tt class="py-docstring">        def action():</tt> </tt>
<a name="L1841"></a><tt class="py-lineno">1841</tt>  <tt class="py-line"><tt class="py-docstring">            form=FORM(INPUT(_name=\"test\", requires=IS_NOT_EMPTY()))</tt> </tt>
<a name="L1842"></a><tt class="py-lineno">1842</tt>  <tt class="py-line"><tt class="py-docstring">            form.validate() #you can pass some args here - see below</tt> </tt>
<a name="L1843"></a><tt class="py-lineno">1843</tt>  <tt class="py-line"><tt class="py-docstring">            return dict(form=form)</tt> </tt>
<a name="L1844"></a><tt class="py-lineno">1844</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1845"></a><tt class="py-lineno">1845</tt>  <tt class="py-line"><tt class="py-docstring">        This can receive a bunch of arguments        </tt> </tt>
<a name="L1846"></a><tt class="py-lineno">1846</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1847"></a><tt class="py-lineno">1847</tt>  <tt class="py-line"><tt class="py-docstring">        onsuccess = 'flash' - will show message_onsuccess in response.flash</tt> </tt>
<a name="L1848"></a><tt class="py-lineno">1848</tt>  <tt class="py-line"><tt class="py-docstring">                    None - will do nothing</tt> </tt>
<a name="L1849"></a><tt class="py-lineno">1849</tt>  <tt class="py-line"><tt class="py-docstring">                    can be a function (lambda form: pass)</tt> </tt>
<a name="L1850"></a><tt class="py-lineno">1850</tt>  <tt class="py-line"><tt class="py-docstring">        onfailure = 'flash' - will show message_onfailure in response.flash</tt> </tt>
<a name="L1851"></a><tt class="py-lineno">1851</tt>  <tt class="py-line"><tt class="py-docstring">                    None - will do nothing</tt> </tt>
<a name="L1852"></a><tt class="py-lineno">1852</tt>  <tt class="py-line"><tt class="py-docstring">                    can be a function (lambda form: pass)</tt> </tt>
<a name="L1853"></a><tt class="py-lineno">1853</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1854"></a><tt class="py-lineno">1854</tt>  <tt class="py-line"><tt class="py-docstring">        values = values to test the validation - dictionary, response.vars, session or other - Default to (request.vars, session)</tt> </tt>
<a name="L1855"></a><tt class="py-lineno">1855</tt>  <tt class="py-line"><tt class="py-docstring">        message_onsuccess</tt> </tt>
<a name="L1856"></a><tt class="py-lineno">1856</tt>  <tt class="py-line"><tt class="py-docstring">        message_onfailure</tt> </tt>
<a name="L1857"></a><tt class="py-lineno">1857</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1858"></a><tt class="py-lineno">1858</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-429" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-429', 'gluon', 'link-429');">gluon</a></tt> <tt class="py-keyword">import</tt> <tt id="link-430" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-430', 'current', 'link-19');">current</a></tt> </tt>
<a name="L1859"></a><tt class="py-lineno">1859</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">session</tt><tt class="py-op">:</tt> <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-431" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-431', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1860"></a><tt class="py-lineno">1860</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-432" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-432', 'values', 'link-387');">values</a></tt><tt class="py-op">:</tt> <tt id="link-433" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-433', 'values', 'link-387');">values</a></tt> <tt class="py-op">=</tt> <tt id="link-434" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-434', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt> </tt>
<a name="L1861"></a><tt class="py-lineno">1861</tt>  <tt class="py-line">          </tt>
<a name="L1862"></a><tt class="py-lineno">1862</tt>  <tt class="py-line">        <tt class="py-name">message_onsuccess</tt> <tt class="py-op">=</tt> <tt class="py-name">message_onsuccess</tt> <tt class="py-keyword">or</tt> <tt id="link-435" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-435', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt id="link-436" class="py-name" targets="Variable web2py.gluon.languages.lazyT.T=web2py.gluon.languages.lazyT-class.html#T"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-436', 'T', 'link-436');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">"Success!"</tt><tt class="py-op">)</tt> </tt>
<a name="L1863"></a><tt class="py-lineno">1863</tt>  <tt class="py-line">        <tt class="py-name">message_onfailure</tt> <tt class="py-op">=</tt> <tt class="py-name">message_onfailure</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1864"></a><tt class="py-lineno">1864</tt>  <tt class="py-line">            <tt id="link-437" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-437', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt id="link-438" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-438', 'T', 'link-436');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">"Errors in form, please check it out."</tt><tt class="py-op">)</tt> </tt>
<a name="L1865"></a><tt class="py-lineno">1865</tt>  <tt class="py-line"> </tt>
<a name="L1866"></a><tt class="py-lineno">1866</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-439" class="py-name" targets="Method web2py.gluon.html.FORM.accepts()=web2py.gluon.html.FORM-class.html#accepts,Method web2py.gluon.sqlhtml.SQLFORM.accepts()=web2py.gluon.sqlhtml.SQLFORM-class.html#accepts"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-439', 'accepts', 'link-439');">accepts</a></tt><tt class="py-op">(</tt><tt id="link-440" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-440', 'values', 'link-387');">values</a></tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1867"></a><tt class="py-lineno">1867</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">onsuccess</tt> <tt class="py-op">==</tt> <tt class="py-string">'flash'</tt><tt class="py-op">:</tt> </tt>
<a name="L1868"></a><tt class="py-lineno">1868</tt>  <tt class="py-line">                <tt id="link-441" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-441', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">message_onsuccess</tt> </tt>
<a name="L1869"></a><tt class="py-lineno">1869</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">onsuccess</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1870"></a><tt class="py-lineno">1870</tt>  <tt class="py-line">                <tt class="py-name">onsuccess</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1871"></a><tt class="py-lineno">1871</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1872"></a><tt class="py-lineno">1872</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">:</tt> </tt>
<a name="L1873"></a><tt class="py-lineno">1873</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">onfailure</tt> <tt class="py-op">==</tt> <tt class="py-string">'flash'</tt><tt class="py-op">:</tt> </tt>
<a name="L1874"></a><tt class="py-lineno">1874</tt>  <tt class="py-line">                <tt id="link-442" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-442', 'current', 'link-19');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">message_onfailure</tt> </tt>
<a name="L1875"></a><tt class="py-lineno">1875</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">onfailure</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1876"></a><tt class="py-lineno">1876</tt>  <tt class="py-line">                <tt class="py-name">onfailure</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1877"></a><tt class="py-lineno">1877</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1878"></a><tt class="py-lineno">1878</tt>  <tt class="py-line"> </tt>
<a name="FORM.process"></a><div id="FORM.process-def"><a name="L1879"></a><tt class="py-lineno">1879</tt> <a class="py-toggle" href="#" id="FORM.process-toggle" onclick="return toggle('FORM.process');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.FORM-class.html#process">process</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">values</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">session</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FORM.process-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FORM.process-expanded"><a name="L1880"></a><tt class="py-lineno">1880</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1881"></a><tt class="py-lineno">1881</tt>  <tt class="py-line"><tt class="py-docstring">        Perform the .validate() method but returns the form</tt> </tt>
<a name="L1882"></a><tt class="py-lineno">1882</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1883"></a><tt class="py-lineno">1883</tt>  <tt class="py-line"><tt class="py-docstring">        Usage in controllers:</tt> </tt>
<a name="L1884"></a><tt class="py-lineno">1884</tt>  <tt class="py-line"><tt class="py-docstring">        # directly on return</tt> </tt>
<a name="L1885"></a><tt class="py-lineno">1885</tt>  <tt class="py-line"><tt class="py-docstring">        def action():</tt> </tt>
<a name="L1886"></a><tt class="py-lineno">1886</tt>  <tt class="py-line"><tt class="py-docstring">            #some code here</tt> </tt>
<a name="L1887"></a><tt class="py-lineno">1887</tt>  <tt class="py-line"><tt class="py-docstring">            return dict(form=FORM(...).process(...))</tt> </tt>
<a name="L1888"></a><tt class="py-lineno">1888</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1889"></a><tt class="py-lineno">1889</tt>  <tt class="py-line"><tt class="py-docstring">        You can use it with FORM, SQLFORM or FORM based plugins</tt> </tt>
<a name="L1890"></a><tt class="py-lineno">1890</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1891"></a><tt class="py-lineno">1891</tt>  <tt class="py-line"><tt class="py-docstring">        Examples:</tt> </tt>
<a name="L1892"></a><tt class="py-lineno">1892</tt>  <tt class="py-line"><tt class="py-docstring">        #response.flash messages</tt> </tt>
<a name="L1893"></a><tt class="py-lineno">1893</tt>  <tt class="py-line"><tt class="py-docstring">        def action():</tt> </tt>
<a name="L1894"></a><tt class="py-lineno">1894</tt>  <tt class="py-line"><tt class="py-docstring">            form = SQLFORM(db.table).process(message_onsuccess='Sucess!')</tt> </tt>
<a name="L1895"></a><tt class="py-lineno">1895</tt>  <tt class="py-line"><tt class="py-docstring">            retutn dict(form=form)</tt> </tt>
<a name="L1896"></a><tt class="py-lineno">1896</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1897"></a><tt class="py-lineno">1897</tt>  <tt class="py-line"><tt class="py-docstring">        # callback function</tt> </tt>
<a name="L1898"></a><tt class="py-lineno">1898</tt>  <tt class="py-line"><tt class="py-docstring">        # callback receives True or False as first arg, and a list of args.</tt> </tt>
<a name="L1899"></a><tt class="py-lineno">1899</tt>  <tt class="py-line"><tt class="py-docstring">        def my_callback(status, msg):</tt> </tt>
<a name="L1900"></a><tt class="py-lineno">1900</tt>  <tt class="py-line"><tt class="py-docstring">           response.flash = "Success! "+msg if status else "Errors occured"</tt> </tt>
<a name="L1901"></a><tt class="py-lineno">1901</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1902"></a><tt class="py-lineno">1902</tt>  <tt class="py-line"><tt class="py-docstring">        # after argument can be 'flash' to response.flash messages</tt> </tt>
<a name="L1903"></a><tt class="py-lineno">1903</tt>  <tt class="py-line"><tt class="py-docstring">        # or a function name to use as callback or None to do nothing.</tt> </tt>
<a name="L1904"></a><tt class="py-lineno">1904</tt>  <tt class="py-line"><tt class="py-docstring">        def action():</tt> </tt>
<a name="L1905"></a><tt class="py-lineno">1905</tt>  <tt class="py-line"><tt class="py-docstring">            return dict(form=SQLFORM(db.table).process(onsuccess=my_callback)</tt> </tt>
<a name="L1906"></a><tt class="py-lineno">1906</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt>  </tt>
<a name="L1907"></a><tt class="py-lineno">1907</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-443" class="py-name" targets="Method web2py.gluon.dal.Field.validate()=web2py.gluon.dal.Field-class.html#validate,Method web2py.gluon.dal.GAEDecimalProperty.validate()=web2py.gluon.dal.GAEDecimalProperty-class.html#validate,Method web2py.gluon.html.FORM.validate()=web2py.gluon.html.FORM-class.html#validate"><a title="web2py.gluon.dal.Field.validate
web2py.gluon.dal.GAEDecimalProperty.validate
web2py.gluon.html.FORM.validate" class="py-name" href="#" onclick="return doclink('link-443', 'validate', 'link-443');">validate</a></tt><tt class="py-op">(</tt><tt id="link-444" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-444', 'values', 'link-387');">values</a></tt><tt class="py-op">=</tt><tt id="link-445" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-445', 'values', 'link-387');">values</a></tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">=</tt><tt class="py-name">session</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1908"></a><tt class="py-lineno">1908</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div></div><a name="L1909"></a><tt class="py-lineno">1909</tt>  <tt class="py-line"> </tt>
<a name="L1910"></a><tt class="py-lineno">1910</tt>  <tt class="py-line"> </tt>
<a name="BEAUTIFY"></a><div id="BEAUTIFY-def"><a name="L1911"></a><tt class="py-lineno">1911</tt> <a class="py-toggle" href="#" id="BEAUTIFY-toggle" onclick="return toggle('BEAUTIFY');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.BEAUTIFY-class.html">BEAUTIFY</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BEAUTIFY-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BEAUTIFY-expanded"><a name="L1912"></a><tt class="py-lineno">1912</tt>  <tt class="py-line"> </tt>
<a name="L1913"></a><tt class="py-lineno">1913</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1914"></a><tt class="py-lineno">1914</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L1915"></a><tt class="py-lineno">1915</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1916"></a><tt class="py-lineno">1916</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()</tt> </tt>
<a name="L1917"></a><tt class="py-lineno">1917</tt>  <tt class="py-line"><tt class="py-docstring">        '&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;b&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td style="font-weight:bold;"&gt;hello&lt;/td&gt;&lt;td valign="top"&gt;:&lt;/td&gt;&lt;td&gt;&lt;div&gt;world&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'</tt> </tt>
<a name="L1918"></a><tt class="py-lineno">1918</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1919"></a><tt class="py-lineno">1919</tt>  <tt class="py-line"><tt class="py-docstring">    turns any list, dictionary, etc into decent looking html.</tt> </tt>
<a name="L1920"></a><tt class="py-lineno">1920</tt>  <tt class="py-line"><tt class="py-docstring">    Two special attributes are</tt> </tt>
<a name="L1921"></a><tt class="py-lineno">1921</tt>  <tt class="py-line"><tt class="py-docstring">    :sorted: a function that takes the dict and returned sorted keys</tt> </tt>
<a name="L1922"></a><tt class="py-lineno">1922</tt>  <tt class="py-line"><tt class="py-docstring">    :keyfilter: a funciton that takes a key and returns its representation</tt> </tt>
<a name="L1923"></a><tt class="py-lineno">1923</tt>  <tt class="py-line"><tt class="py-docstring">                or None if the key is to be skipped. By default key[:1]=='_' is skipped.</tt> </tt>
<a name="L1924"></a><tt class="py-lineno">1924</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1925"></a><tt class="py-lineno">1925</tt>  <tt class="py-line"> </tt>
<a name="L1926"></a><tt class="py-lineno">1926</tt>  <tt class="py-line">    <tt id="link-446" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-446', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'div'</tt> </tt>
<a name="L1927"></a><tt class="py-lineno">1927</tt>  <tt class="py-line"> </tt>
<a name="L1928"></a><tt class="py-lineno">1928</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="BEAUTIFY.no_underscore"></a><div id="BEAUTIFY.no_underscore-def"><a name="L1929"></a><tt class="py-lineno">1929</tt> <a class="py-toggle" href="#" id="BEAUTIFY.no_underscore-toggle" onclick="return toggle('BEAUTIFY.no_underscore');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.BEAUTIFY-class.html#no_underscore">no_underscore</a><tt class="py-op">(</tt><tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BEAUTIFY.no_underscore-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BEAUTIFY.no_underscore-expanded"><a name="L1930"></a><tt class="py-lineno">1930</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">'_'</tt><tt class="py-op">:</tt> </tt>
<a name="L1931"></a><tt class="py-lineno">1931</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1932"></a><tt class="py-lineno">1932</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">key</tt> </tt>
</div><a name="L1933"></a><tt class="py-lineno">1933</tt>  <tt class="py-line"> </tt>
<a name="BEAUTIFY.__init__"></a><div id="BEAUTIFY.__init__-def"><a name="L1934"></a><tt class="py-lineno">1934</tt> <a class="py-toggle" href="#" id="BEAUTIFY.__init__-toggle" onclick="return toggle('BEAUTIFY.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.BEAUTIFY-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">component</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BEAUTIFY.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BEAUTIFY.__init__-expanded"><a name="L1935"></a><tt class="py-lineno">1935</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">component</tt><tt class="py-op">]</tt> </tt>
<a name="L1936"></a><tt class="py-lineno">1936</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt> </tt>
<a name="L1937"></a><tt class="py-lineno">1937</tt>  <tt class="py-line">        <tt class="py-name">sorter</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-447" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-447', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'sorted'</tt><tt class="py-op">,</tt><tt class="py-name">sorted</tt><tt class="py-op">)</tt> </tt>
<a name="L1938"></a><tt class="py-lineno">1938</tt>  <tt class="py-line">        <tt class="py-name">keyfilter</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-448" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-448', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'keyfilter'</tt><tt class="py-op">,</tt><tt id="link-449" class="py-name" targets="Class web2py.gluon.html.BEAUTIFY=web2py.gluon.html.BEAUTIFY-class.html"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-449', 'BEAUTIFY', 'link-449');">BEAUTIFY</a></tt><tt class="py-op">.</tt><tt id="link-450" class="py-name" targets="Static Method web2py.gluon.html.BEAUTIFY.no_underscore()=web2py.gluon.html.BEAUTIFY-class.html#no_underscore"><a title="web2py.gluon.html.BEAUTIFY.no_underscore" class="py-name" href="#" onclick="return doclink('link-450', 'no_underscore', 'link-450');">no_underscore</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1939"></a><tt class="py-lineno">1939</tt>  <tt class="py-line">        <tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1940"></a><tt class="py-lineno">1940</tt>  <tt class="py-line">        <tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">copy</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L1941"></a><tt class="py-lineno">1941</tt>  <tt class="py-line">        <tt class="py-name">level</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'level'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-451" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-451', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'level'</tt><tt class="py-op">,</tt><tt class="py-number">6</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
<a name="L1942"></a><tt class="py-lineno">1942</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'_class'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1943"></a><tt class="py-lineno">1943</tt>  <tt class="py-line">            <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt> <tt class="py-op">+=</tt> <tt class="py-string">'i'</tt> </tt>
<a name="L1944"></a><tt class="py-lineno">1944</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">level</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1945"></a><tt class="py-lineno">1945</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L1946"></a><tt class="py-lineno">1946</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
<a name="L1947"></a><tt class="py-lineno">1947</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-string">'xml'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-452" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-452', 'xml', 'link-15');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1948"></a><tt class="py-lineno">1948</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-453" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-453', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L1949"></a><tt class="py-lineno">1949</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1950"></a><tt class="py-lineno">1950</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-string">'keys'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-454" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-454', 'keys', 'link-454');">keys</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1951"></a><tt class="py-lineno">1951</tt>  <tt class="py-line">                <tt id="link-455" class="py-name" targets="Method web2py.gluon.tools.Crud.rows()=web2py.gluon.tools.Crud-class.html#rows"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-455', 'rows', 'link-455');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1952"></a><tt class="py-lineno">1952</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1953"></a><tt class="py-lineno">1953</tt>  <tt class="py-line">                    <tt id="link-456" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-456', 'keys', 'link-454');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">sorter</tt> <tt class="py-keyword">and</tt> <tt class="py-name">sorter</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">c</tt> </tt>
<a name="L1954"></a><tt class="py-lineno">1954</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-457" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-457', 'keys', 'link-454');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1955"></a><tt class="py-lineno">1955</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt><tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">keyfilter</tt><tt class="py-op">:</tt> </tt>
<a name="L1956"></a><tt class="py-lineno">1956</tt>  <tt class="py-line">                            <tt class="py-name">filtered_key</tt> <tt class="py-op">=</tt> <tt class="py-name">keyfilter</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L1957"></a><tt class="py-lineno">1957</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1958"></a><tt class="py-lineno">1958</tt>  <tt class="py-line">                            <tt class="py-name">filtered_key</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L1959"></a><tt class="py-lineno">1959</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">filtered_key</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1960"></a><tt class="py-lineno">1960</tt>  <tt class="py-line">                            <tt class="py-keyword">continue</tt> </tt>
<a name="L1961"></a><tt class="py-lineno">1961</tt>  <tt class="py-line">                        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L1962"></a><tt class="py-lineno">1962</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt id="link-458" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-458', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">LambdaType</tt><tt class="py-op">:</tt> </tt>
<a name="L1963"></a><tt class="py-lineno">1963</tt>  <tt class="py-line">                            <tt class="py-keyword">continue</tt> </tt>
<a name="L1964"></a><tt class="py-lineno">1964</tt>  <tt class="py-line">                        <tt id="link-459" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-459', 'rows', 'link-455');">rows</a></tt><tt class="py-op">.</tt><tt id="link-460" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-460', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-461" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-461', 'TR', 'link-311');">TR</a></tt><tt class="py-op">(</tt><tt id="link-462" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-462', 'TD', 'link-306');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">filtered_key</tt><tt class="py-op">,</tt> <tt class="py-name">_style</tt><tt class="py-op">=</tt><tt class="py-string">'font-weight:bold;'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1965"></a><tt class="py-lineno">1965</tt>  <tt class="py-line">                                       <tt id="link-463" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-463', 'TD', 'link-306');">TD</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt><tt class="py-name">_valign</tt><tt class="py-op">=</tt><tt class="py-string">'top'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1966"></a><tt class="py-lineno">1966</tt>  <tt class="py-line">                                       <tt id="link-464" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-464', 'TD', 'link-306');">TD</a></tt><tt class="py-op">(</tt><tt id="link-465" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-465', 'BEAUTIFY', 'link-449');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1967"></a><tt class="py-lineno">1967</tt>  <tt class="py-line">                    <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-466" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-466', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-467" class="py-name" targets="Class web2py.gluon.html.TABLE=web2py.gluon.html.TABLE-class.html"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-467', 'TABLE', 'link-467');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-468" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-468', 'rows', 'link-455');">rows</a></tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1968"></a><tt class="py-lineno">1968</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L1969"></a><tt class="py-lineno">1969</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L1970"></a><tt class="py-lineno">1970</tt>  <tt class="py-line">                    <tt class="py-keyword">pass</tt> </tt>
<a name="L1971"></a><tt class="py-lineno">1971</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1972"></a><tt class="py-lineno">1972</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-469" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-469', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1973"></a><tt class="py-lineno">1973</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1974"></a><tt class="py-lineno">1974</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-470" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-470', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-471" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-471', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1975"></a><tt class="py-lineno">1975</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1976"></a><tt class="py-lineno">1976</tt>  <tt class="py-line">                <tt id="link-472" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-472', 'items', 'link-29');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-473" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-473', 'TR', 'link-311');">TR</a></tt><tt class="py-op">(</tt><tt id="link-474" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-474', 'TD', 'link-306');">TD</a></tt><tt class="py-op">(</tt><tt id="link-475" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-475', 'BEAUTIFY', 'link-449');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1977"></a><tt class="py-lineno">1977</tt>  <tt class="py-line">                         <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">c</tt><tt class="py-op">]</tt> </tt>
<a name="L1978"></a><tt class="py-lineno">1978</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-476" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-476', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-477" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-477', 'TABLE', 'link-467');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-478" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-478', 'items', 'link-29');">items</a></tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1979"></a><tt class="py-lineno">1979</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">FieldStorage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1980"></a><tt class="py-lineno">1980</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-479" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-479', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'FieldStorage object'</tt><tt class="py-op">)</tt> </tt>
<a name="L1981"></a><tt class="py-lineno">1981</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1982"></a><tt class="py-lineno">1982</tt>  <tt class="py-line">                <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-480" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-480', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1983"></a><tt class="py-lineno">1983</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">components</tt> </tt>
</div></div><a name="L1984"></a><tt class="py-lineno">1984</tt>  <tt class="py-line"> </tt>
<a name="L1985"></a><tt class="py-lineno">1985</tt>  <tt class="py-line"> </tt>
<a name="MENU"></a><div id="MENU-def"><a name="L1986"></a><tt class="py-lineno">1986</tt> <a class="py-toggle" href="#" id="MENU-toggle" onclick="return toggle('MENU');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.MENU-class.html">MENU</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MENU-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MENU-expanded"><a name="L1987"></a><tt class="py-lineno">1987</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1988"></a><tt class="py-lineno">1988</tt>  <tt class="py-line"><tt class="py-docstring">    Used to build menus</tt> </tt>
<a name="L1989"></a><tt class="py-lineno">1989</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1990"></a><tt class="py-lineno">1990</tt>  <tt class="py-line"><tt class="py-docstring">    Optional arguments</tt> </tt>
<a name="L1991"></a><tt class="py-lineno">1991</tt>  <tt class="py-line"><tt class="py-docstring">      _class: defaults to 'web2py-menu web2py-menu-vertical'</tt> </tt>
<a name="L1992"></a><tt class="py-lineno">1992</tt>  <tt class="py-line"><tt class="py-docstring">      ul_class: defaults to 'web2py-menu-vertical'</tt> </tt>
<a name="L1993"></a><tt class="py-lineno">1993</tt>  <tt class="py-line"><tt class="py-docstring">      li_class: defaults to 'web2py-menu-expand'</tt> </tt>
<a name="L1994"></a><tt class="py-lineno">1994</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1995"></a><tt class="py-lineno">1995</tt>  <tt class="py-line"><tt class="py-docstring">    Example:</tt> </tt>
<a name="L1996"></a><tt class="py-lineno">1996</tt>  <tt class="py-line"><tt class="py-docstring">        menu = MENU([['name', False, URL(...), [submenu]], ...])</tt> </tt>
<a name="L1997"></a><tt class="py-lineno">1997</tt>  <tt class="py-line"><tt class="py-docstring">        {{=menu}}</tt> </tt>
<a name="L1998"></a><tt class="py-lineno">1998</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1999"></a><tt class="py-lineno">1999</tt>  <tt class="py-line"> </tt>
<a name="L2000"></a><tt class="py-lineno">2000</tt>  <tt class="py-line">    <tt id="link-481" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-481', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'ul'</tt> </tt>
<a name="L2001"></a><tt class="py-lineno">2001</tt>  <tt class="py-line"> </tt>
<a name="MENU.__init__"></a><div id="MENU.__init__-def"><a name="L2002"></a><tt class="py-lineno">2002</tt> <a class="py-toggle" href="#" id="MENU.__init__-toggle" onclick="return toggle('MENU.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MENU-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MENU.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MENU.__init__-expanded"><a name="L2003"></a><tt class="py-lineno">2003</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt> </tt>
<a name="L2004"></a><tt class="py-lineno">2004</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> </tt>
<a name="L2005"></a><tt class="py-lineno">2005</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'_class'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L2006"></a><tt class="py-lineno">2006</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py-menu web2py-menu-vertical'</tt> </tt>
<a name="L2007"></a><tt class="py-lineno">2007</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'ul_class'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L2008"></a><tt class="py-lineno">2008</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'ul_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py-menu-vertical'</tt> </tt>
<a name="L2009"></a><tt class="py-lineno">2009</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'li_class'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L2010"></a><tt class="py-lineno">2010</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'li_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py-menu-expand'</tt> </tt>
<a name="L2011"></a><tt class="py-lineno">2011</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'li_active'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L2012"></a><tt class="py-lineno">2012</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'li_active'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py-menu-active'</tt> </tt>
</div><a name="L2013"></a><tt class="py-lineno">2013</tt>  <tt class="py-line"> </tt>
<a name="MENU.serialize"></a><div id="MENU.serialize-def"><a name="L2014"></a><tt class="py-lineno">2014</tt> <a class="py-toggle" href="#" id="MENU.serialize-toggle" onclick="return toggle('MENU.serialize');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MENU-class.html#serialize">serialize</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">level</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MENU.serialize-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MENU.serialize-expanded"><a name="L2015"></a><tt class="py-lineno">2015</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">level</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2016"></a><tt class="py-lineno">2016</tt>  <tt class="py-line">            <tt class="py-name">ul</tt> <tt class="py-op">=</tt> <tt id="link-482" class="py-name" targets="Class web2py.gluon.html.UL=web2py.gluon.html.UL-class.html"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-482', 'UL', 'link-482');">UL</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L2017"></a><tt class="py-lineno">2017</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2018"></a><tt class="py-lineno">2018</tt>  <tt class="py-line">            <tt class="py-name">ul</tt> <tt class="py-op">=</tt> <tt id="link-483" class="py-name"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-483', 'UL', 'link-482');">UL</a></tt><tt class="py-op">(</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'ul_class'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2019"></a><tt class="py-lineno">2019</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">data</tt><tt class="py-op">:</tt> </tt>
<a name="L2020"></a><tt class="py-lineno">2020</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt id="link-484" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-484', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">active</tt><tt class="py-op">,</tt> <tt class="py-name">link</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
<a name="L2021"></a><tt class="py-lineno">2021</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">link</tt><tt class="py-op">,</tt><tt id="link-485" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-485', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2022"></a><tt class="py-lineno">2022</tt>  <tt class="py-line">                <tt class="py-name">li</tt> <tt class="py-op">=</tt> <tt id="link-486" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-486', 'LI', 'link-299');">LI</a></tt><tt class="py-op">(</tt><tt class="py-name">link</tt><tt class="py-op">)</tt> </tt>
<a name="L2023"></a><tt class="py-lineno">2023</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'no_link_url'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'no_link_url'</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-name">link</tt><tt class="py-op">:</tt> </tt>
<a name="L2024"></a><tt class="py-lineno">2024</tt>  <tt class="py-line">                <tt class="py-name">li</tt> <tt class="py-op">=</tt> <tt id="link-487" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-487', 'LI', 'link-299');">LI</a></tt><tt class="py-op">(</tt><tt id="link-488" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-488', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-489" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-489', 'name', 'link-74');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2025"></a><tt class="py-lineno">2025</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">link</tt><tt class="py-op">:</tt> </tt>
<a name="L2026"></a><tt class="py-lineno">2026</tt>  <tt class="py-line">                <tt class="py-name">li</tt> <tt class="py-op">=</tt> <tt id="link-490" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-490', 'LI', 'link-299');">LI</a></tt><tt class="py-op">(</tt><tt id="link-491" class="py-name" targets="Class web2py.gluon.html.A=web2py.gluon.html.A-class.html"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-491', 'A', 'link-491');">A</a></tt><tt class="py-op">(</tt><tt id="link-492" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-492', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">link</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2027"></a><tt class="py-lineno">2027</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2028"></a><tt class="py-lineno">2028</tt>  <tt class="py-line">                <tt class="py-name">li</tt> <tt class="py-op">=</tt> <tt id="link-493" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-493', 'LI', 'link-299');">LI</a></tt><tt class="py-op">(</tt><tt id="link-494" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-494', 'A', 'link-491');">A</a></tt><tt class="py-op">(</tt><tt id="link-495" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-495', 'name', 'link-74');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-string">'#'</tt><tt class="py-op">,</tt> </tt>
<a name="L2029"></a><tt class="py-lineno">2029</tt>  <tt class="py-line">                          <tt class="py-name">_onclick</tt><tt class="py-op">=</tt><tt class="py-string">'javascript:void(0);return false;'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2030"></a><tt class="py-lineno">2030</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-496" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-496', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">3</tt> <tt class="py-keyword">and</tt> <tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L2031"></a><tt class="py-lineno">2031</tt>  <tt class="py-line">                <tt class="py-name">li</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'li_class'</tt><tt class="py-op">]</tt> </tt>
<a name="L2032"></a><tt class="py-lineno">2032</tt>  <tt class="py-line">                <tt class="py-name">li</tt><tt class="py-op">.</tt><tt id="link-497" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-497', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-498" class="py-name" targets="Method web2py.gluon.html.MENU.serialize()=web2py.gluon.html.MENU-class.html#serialize"><a title="web2py.gluon.html.MENU.serialize" class="py-name" href="#" onclick="return doclink('link-498', 'serialize', 'link-498');">serialize</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">level</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2033"></a><tt class="py-lineno">2033</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">active</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-string">'active_url'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'active_url'</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-name">link</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2034"></a><tt class="py-lineno">2034</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">li</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L2035"></a><tt class="py-lineno">2035</tt>  <tt class="py-line">                    <tt class="py-name">li</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">li</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt><tt class="py-op">+</tt><tt class="py-string">' '</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'li_active'</tt><tt class="py-op">]</tt> </tt>
<a name="L2036"></a><tt class="py-lineno">2036</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2037"></a><tt class="py-lineno">2037</tt>  <tt class="py-line">                    <tt class="py-name">li</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'li_active'</tt><tt class="py-op">]</tt> </tt>
<a name="L2038"></a><tt class="py-lineno">2038</tt>  <tt class="py-line">            <tt class="py-name">ul</tt><tt class="py-op">.</tt><tt id="link-499" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-499', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">li</tt><tt class="py-op">)</tt> </tt>
<a name="L2039"></a><tt class="py-lineno">2039</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ul</tt> </tt>
</div><a name="L2040"></a><tt class="py-lineno">2040</tt>  <tt class="py-line"> </tt>
<a name="MENU.xml"></a><div id="MENU.xml-def"><a name="L2041"></a><tt class="py-lineno">2041</tt> <a class="py-toggle" href="#" id="MENU.xml-toggle" onclick="return toggle('MENU.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MENU-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MENU.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MENU.xml-expanded"><a name="L2042"></a><tt class="py-lineno">2042</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-500" class="py-name"><a title="web2py.gluon.html.MENU.serialize" class="py-name" href="#" onclick="return doclink('link-500', 'serialize', 'link-498');">serialize</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-501" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-501', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2043"></a><tt class="py-lineno">2043</tt>  <tt class="py-line"> </tt>
<a name="L2044"></a><tt class="py-lineno">2044</tt>  <tt class="py-line"> </tt>
<a name="embed64"></a><div id="embed64-def"><a name="L2045"></a><tt class="py-lineno">2045</tt> <a class="py-toggle" href="#" id="embed64-toggle" onclick="return toggle('embed64');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#embed64">embed64</a><tt class="py-op">(</tt> </tt>
<a name="L2046"></a><tt class="py-lineno">2046</tt>  <tt class="py-line">    <tt class="py-param">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2047"></a><tt class="py-lineno">2047</tt>  <tt class="py-line">    <tt class="py-param">file</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2048"></a><tt class="py-lineno">2048</tt>  <tt class="py-line">    <tt class="py-param">data</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2049"></a><tt class="py-lineno">2049</tt>  <tt class="py-line">    <tt class="py-param">extension</tt> <tt class="py-op">=</tt> <tt class="py-string">'image/gif'</tt><tt class="py-op">,</tt> </tt>
<a name="L2050"></a><tt class="py-lineno">2050</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="embed64-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="embed64-expanded"><a name="L2051"></a><tt class="py-lineno">2051</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2052"></a><tt class="py-lineno">2052</tt>  <tt class="py-line"><tt class="py-docstring">    helper to encode the provided (binary) data into base64.</tt> </tt>
<a name="L2053"></a><tt class="py-lineno">2053</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2054"></a><tt class="py-lineno">2054</tt>  <tt class="py-line"><tt class="py-docstring">    :param filename: if provided, opens and reads this file in 'rb' mode</tt> </tt>
<a name="L2055"></a><tt class="py-lineno">2055</tt>  <tt class="py-line"><tt class="py-docstring">    :param file: if provided, reads this file</tt> </tt>
<a name="L2056"></a><tt class="py-lineno">2056</tt>  <tt class="py-line"><tt class="py-docstring">    :param data: if provided, uses the provided data</tt> </tt>
<a name="L2057"></a><tt class="py-lineno">2057</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2058"></a><tt class="py-lineno">2058</tt>  <tt class="py-line"> </tt>
<a name="L2059"></a><tt class="py-lineno">2059</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-502" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-502', 'exists', 'link-502');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2060"></a><tt class="py-lineno">2060</tt>  <tt class="py-line">        <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L2061"></a><tt class="py-lineno">2061</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-503" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-503', 'read', 'link-503');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2062"></a><tt class="py-lineno">2062</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-504" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-504', 'close', 'link-504');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2063"></a><tt class="py-lineno">2063</tt>  <tt class="py-line">    <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">base64</tt><tt class="py-op">.</tt><tt class="py-name">b64encode</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L2064"></a><tt class="py-lineno">2064</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">'data:%s;base64,%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">extension</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2065"></a><tt class="py-lineno">2065</tt>  <tt class="py-line"> </tt>
<a name="L2066"></a><tt class="py-lineno">2066</tt>  <tt class="py-line"> </tt>
<a name="test"></a><div id="test-def"><a name="L2067"></a><tt class="py-lineno">2067</tt> <a class="py-toggle" href="#" id="test-toggle" onclick="return toggle('test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#test">test</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="test-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="test-expanded"><a name="L2068"></a><tt class="py-lineno">2068</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2069"></a><tt class="py-lineno">2069</tt>  <tt class="py-line"><tt class="py-docstring">    Example:</tt> </tt>
<a name="L2070"></a><tt class="py-lineno">2070</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2071"></a><tt class="py-lineno">2071</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; from validators import *</tt> </tt>
<a name="L2072"></a><tt class="py-lineno">2072</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print DIV(A('click me', _href=URL(a='a', c='b', f='c')), BR(), HR(), DIV(SPAN(\"World\"), _class='unknown')).xml()</tt> </tt>
<a name="L2073"></a><tt class="py-lineno">2073</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;div&gt;&lt;a href=\"/a/b/c\"&gt;click me&lt;/a&gt;&lt;br /&gt;&lt;hr /&gt;&lt;div class=\"unknown\"&gt;&lt;span&gt;World&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</tt> </tt>
<a name="L2074"></a><tt class="py-lineno">2074</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print DIV(UL(\"doc\",\"cat\",\"mouse\")).xml()</tt> </tt>
<a name="L2075"></a><tt class="py-lineno">2075</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;div&gt;&lt;ul&gt;&lt;li&gt;doc&lt;/li&gt;&lt;li&gt;cat&lt;/li&gt;&lt;li&gt;mouse&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</tt> </tt>
<a name="L2076"></a><tt class="py-lineno">2076</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print DIV(UL(\"doc\", LI(\"cat\", _class='feline'), 18)).xml()</tt> </tt>
<a name="L2077"></a><tt class="py-lineno">2077</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;div&gt;&lt;ul&gt;&lt;li&gt;doc&lt;/li&gt;&lt;li class=\"feline\"&gt;cat&lt;/li&gt;&lt;li&gt;18&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</tt> </tt>
<a name="L2078"></a><tt class="py-lineno">2078</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print TABLE(['a', 'b', 'c'], TR('d', 'e', 'f'), TR(TD(1), TD(2), TD(3))).xml()</tt> </tt>
<a name="L2079"></a><tt class="py-lineno">2079</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;table&gt;&lt;tr&gt;&lt;td&gt;a&lt;/td&gt;&lt;td&gt;b&lt;/td&gt;&lt;td&gt;c&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;d&lt;/td&gt;&lt;td&gt;e&lt;/td&gt;&lt;td&gt;f&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</tt> </tt>
<a name="L2080"></a><tt class="py-lineno">2080</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; form=FORM(INPUT(_type='text', _name='myvar', requires=IS_EXPR('int(value)&lt;10')))</tt> </tt>
<a name="L2081"></a><tt class="py-lineno">2081</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.xml()</tt> </tt>
<a name="L2082"></a><tt class="py-lineno">2082</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;form action=\"\" enctype=\"multipart/form-data\" method=\"post\"&gt;&lt;input name=\"myvar\" type=\"text\" /&gt;&lt;/form&gt;</tt> </tt>
<a name="L2083"></a><tt class="py-lineno">2083</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.accepts({'myvar':'34'}, formname=None)</tt> </tt>
<a name="L2084"></a><tt class="py-lineno">2084</tt>  <tt class="py-line"><tt class="py-docstring">    False</tt> </tt>
<a name="L2085"></a><tt class="py-lineno">2085</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.xml()</tt> </tt>
<a name="L2086"></a><tt class="py-lineno">2086</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;form action="" enctype="multipart/form-data" method="post"&gt;&lt;input name="myvar" type="text" value="34" /&gt;&lt;div class="error" id="myvar__error"&gt;invalid expression&lt;/div&gt;&lt;/form&gt;</tt> </tt>
<a name="L2087"></a><tt class="py-lineno">2087</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.accepts({'myvar':'4'}, formname=None, keepvalues=True)</tt> </tt>
<a name="L2088"></a><tt class="py-lineno">2088</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L2089"></a><tt class="py-lineno">2089</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.xml()</tt> </tt>
<a name="L2090"></a><tt class="py-lineno">2090</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;form action=\"\" enctype=\"multipart/form-data\" method=\"post\"&gt;&lt;input name=\"myvar\" type=\"text\" value=\"4\" /&gt;&lt;/form&gt;</tt> </tt>
<a name="L2091"></a><tt class="py-lineno">2091</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; form=FORM(SELECT('cat', 'dog', _name='myvar'))</tt> </tt>
<a name="L2092"></a><tt class="py-lineno">2092</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.accepts({'myvar':'dog'}, formname=None, keepvalues=True)</tt> </tt>
<a name="L2093"></a><tt class="py-lineno">2093</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L2094"></a><tt class="py-lineno">2094</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.xml()</tt> </tt>
<a name="L2095"></a><tt class="py-lineno">2095</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;form action=\"\" enctype=\"multipart/form-data\" method=\"post\"&gt;&lt;select name=\"myvar\"&gt;&lt;option value=\"cat\"&gt;cat&lt;/option&gt;&lt;option selected=\"selected\" value=\"dog\"&gt;dog&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;</tt> </tt>
<a name="L2096"></a><tt class="py-lineno">2096</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; form=FORM(INPUT(_type='text', _name='myvar', requires=IS_MATCH('^\w+$', 'only alphanumeric!')))</tt> </tt>
<a name="L2097"></a><tt class="py-lineno">2097</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.accepts({'myvar':'as df'}, formname=None)</tt> </tt>
<a name="L2098"></a><tt class="py-lineno">2098</tt>  <tt class="py-line"><tt class="py-docstring">    False</tt> </tt>
<a name="L2099"></a><tt class="py-lineno">2099</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print form.xml()</tt> </tt>
<a name="L2100"></a><tt class="py-lineno">2100</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;form action=\"\" enctype=\"multipart/form-data\" method=\"post\"&gt;&lt;input name=\"myvar\" type=\"text\" value=\"as df\" /&gt;&lt;div class=\"error\" id=\"myvar__error\"&gt;only alphanumeric!&lt;/div&gt;&lt;/form&gt;</tt> </tt>
<a name="L2101"></a><tt class="py-lineno">2101</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; session={}</tt> </tt>
<a name="L2102"></a><tt class="py-lineno">2102</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; form=FORM(INPUT(value=\"Hello World\", _name=\"var\", requires=IS_MATCH('^\w+$')))</tt> </tt>
<a name="L2103"></a><tt class="py-lineno">2103</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; if form.accepts({}, session,formname=None): print 'passed'</tt> </tt>
<a name="L2104"></a><tt class="py-lineno">2104</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; if form.accepts({'var':'test ', '_formkey': session['_formkey[None]']}, session, formname=None): print 'passed'</tt> </tt>
<a name="L2105"></a><tt class="py-lineno">2105</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2106"></a><tt class="py-lineno">2106</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L2107"></a><tt class="py-lineno">2107</tt>  <tt class="py-line"> </tt>
<a name="L2108"></a><tt class="py-lineno">2108</tt>  <tt class="py-line"> </tt>
<a name="web2pyHTMLParser"></a><div id="web2pyHTMLParser-def"><a name="L2109"></a><tt class="py-lineno">2109</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser-toggle" onclick="return toggle('web2pyHTMLParser');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html">web2pyHTMLParser</a><tt class="py-op">(</tt><tt class="py-base-class">HTMLParser</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="web2pyHTMLParser-expanded"><a name="L2110"></a><tt class="py-lineno">2110</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2111"></a><tt class="py-lineno">2111</tt>  <tt class="py-line"><tt class="py-docstring">    obj = web2pyHTMLParser(text) parses and html/xml text into web2py helpers.</tt> </tt>
<a name="L2112"></a><tt class="py-lineno">2112</tt>  <tt class="py-line"><tt class="py-docstring">    obj.tree contains the root of the tree, and tree can be manipulated</tt> </tt>
<a name="L2113"></a><tt class="py-lineno">2113</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2114"></a><tt class="py-lineno">2114</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; str(web2pyHTMLParser('hello&lt;div a="b" c=3&gt;wor&amp;lt;ld&lt;span&gt;xxx&lt;/span&gt;y&lt;script/&gt;yy&lt;/div&gt;zzz').tree)</tt> </tt>
<a name="L2115"></a><tt class="py-lineno">2115</tt>  <tt class="py-line"><tt class="py-docstring">    'hello&lt;div a="b" c="3"&gt;wor&amp;lt;ld&lt;span&gt;xxx&lt;/span&gt;y&lt;script&gt;&lt;/script&gt;yy&lt;/div&gt;zzz'</tt> </tt>
<a name="L2116"></a><tt class="py-lineno">2116</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; str(web2pyHTMLParser('&lt;div&gt;a&lt;span&gt;b&lt;/div&gt;c').tree)</tt> </tt>
<a name="L2117"></a><tt class="py-lineno">2117</tt>  <tt class="py-line"><tt class="py-docstring">    '&lt;div&gt;a&lt;span&gt;b&lt;/span&gt;&lt;/div&gt;c'</tt> </tt>
<a name="L2118"></a><tt class="py-lineno">2118</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; tree = web2pyHTMLParser('hello&lt;div a="b"&gt;world&lt;/div&gt;').tree</tt> </tt>
<a name="L2119"></a><tt class="py-lineno">2119</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; tree.element(_a='b')['_c']=5</tt> </tt>
<a name="L2120"></a><tt class="py-lineno">2120</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; str(tree)</tt> </tt>
<a name="L2121"></a><tt class="py-lineno">2121</tt>  <tt class="py-line"><tt class="py-docstring">    'hello&lt;div a="b" c="5"&gt;world&lt;/div&gt;'</tt> </tt>
<a name="L2122"></a><tt class="py-lineno">2122</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="web2pyHTMLParser.__init__"></a><div id="web2pyHTMLParser.__init__-def"><a name="L2123"></a><tt class="py-lineno">2123</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser.__init__-toggle" onclick="return toggle('web2pyHTMLParser.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">text</tt><tt class="py-op">,</tt><tt class="py-param">closed</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'input'</tt><tt class="py-op">,</tt><tt class="py-string">'link'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="web2pyHTMLParser.__init__-expanded"><a name="L2124"></a><tt class="py-lineno">2124</tt>  <tt class="py-line">        <tt class="py-name">HTMLParser</tt><tt class="py-op">.</tt><tt id="link-505" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-505', '__init__', 'link-395');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L2125"></a><tt class="py-lineno">2125</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt id="link-506" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-506', 'TAG', 'link-218');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2126"></a><tt class="py-lineno">2126</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closed</tt> <tt class="py-op">=</tt> <tt class="py-name">closed</tt> </tt>
<a name="L2127"></a><tt class="py-lineno">2127</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-507" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-507', 'x', 'link-25');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-508" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-508', 'x', 'link-25');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">__all__</tt> <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">eval</tt><tt class="py-op">(</tt><tt id="link-509" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-509', 'x', 'link-25');">x</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-510" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-510', 'DIV', 'link-98');">DIV</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L2128"></a><tt class="py-lineno">2128</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-511" class="py-name" targets="Method web2py.gluon.dal.Rows.last()=web2py.gluon.dal.Rows-class.html#last"><a title="web2py.gluon.dal.Rows.last" class="py-name" href="#" onclick="return doclink('link-511', 'last', 'link-511');">last</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2129"></a><tt class="py-lineno">2129</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">feed</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
</div><a name="web2pyHTMLParser.handle_starttag"></a><div id="web2pyHTMLParser.handle_starttag-def"><a name="L2130"></a><tt class="py-lineno">2130</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser.handle_starttag-toggle" onclick="return toggle('web2pyHTMLParser.handle_starttag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_starttag">handle_starttag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tagname</tt><tt class="py-op">,</tt> <tt class="py-param">attrs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser.handle_starttag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="web2pyHTMLParser.handle_starttag-expanded"><a name="L2131"></a><tt class="py-lineno">2131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">tagname</tt><tt class="py-op">.</tt><tt id="link-512" class="py-name" targets="Method web2py.gluon.dal.Expression.upper()=web2py.gluon.dal.Expression-class.html#upper"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-512', 'upper', 'link-512');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tags</tt><tt class="py-op">:</tt> </tt>
<a name="L2132"></a><tt class="py-lineno">2132</tt>  <tt class="py-line">            <tt id="link-513" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-513', 'tag', 'link-82');">tag</a></tt><tt class="py-op">=</tt><tt class="py-name">eval</tt><tt class="py-op">(</tt><tt class="py-name">tagname</tt><tt class="py-op">.</tt><tt id="link-514" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-514', 'upper', 'link-512');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2133"></a><tt class="py-lineno">2133</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2134"></a><tt class="py-lineno">2134</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">tagname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closed</tt><tt class="py-op">:</tt> <tt class="py-name">tagname</tt><tt class="py-op">+=</tt><tt class="py-string">'/'</tt> </tt>
<a name="L2135"></a><tt class="py-lineno">2135</tt>  <tt class="py-line">            <tt id="link-515" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-515', 'tag', 'link-82');">tag</a></tt> <tt class="py-op">=</tt> <tt id="link-516" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-516', 'TAG', 'link-218');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-name">tagname</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2136"></a><tt class="py-lineno">2136</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attrs</tt><tt class="py-op">:</tt> <tt id="link-517" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-517', 'tag', 'link-82');">tag</a></tt><tt class="py-op">[</tt><tt class="py-string">'_'</tt><tt class="py-op">+</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">value</tt> </tt>
<a name="L2137"></a><tt class="py-lineno">2137</tt>  <tt class="py-line">        <tt id="link-518" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-518', 'tag', 'link-82');">tag</a></tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> </tt>
<a name="L2138"></a><tt class="py-lineno">2138</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-519" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-519', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt id="link-520" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-520', 'tag', 'link-82');">tag</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2139"></a><tt class="py-lineno">2139</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-521" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-521', 'tag', 'link-82');">tag</a></tt><tt class="py-op">.</tt><tt id="link-522" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-522', 'tag', 'link-82');">tag</a></tt><tt class="py-op">.</tt><tt id="link-523" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-523', 'endswith', 'link-27');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2140"></a><tt class="py-lineno">2140</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">=</tt><tt id="link-524" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-524', 'tag', 'link-82');">tag</a></tt> </tt>
<a name="L2141"></a><tt class="py-lineno">2141</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2142"></a><tt class="py-lineno">2142</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-525" class="py-name"><a title="web2py.gluon.dal.Rows.last" class="py-name" href="#" onclick="return doclink('link-525', 'last', 'link-511');">last</a></tt> <tt class="py-op">=</tt> <tt id="link-526" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-526', 'tag', 'link-82');">tag</a></tt><tt class="py-op">.</tt><tt id="link-527" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-527', 'tag', 'link-82');">tag</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
</div><a name="web2pyHTMLParser.handle_data"></a><div id="web2pyHTMLParser.handle_data-def"><a name="L2143"></a><tt class="py-lineno">2143</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser.handle_data-toggle" onclick="return toggle('web2pyHTMLParser.handle_data');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_data">handle_data</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser.handle_data-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="web2pyHTMLParser.handle_data-expanded"><a name="L2144"></a><tt class="py-lineno">2144</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2145"></a><tt class="py-lineno">2145</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-528" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-528', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-529" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-529', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">,</tt><tt class="py-string">'xmlcharref'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2146"></a><tt class="py-lineno">2146</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2147"></a><tt class="py-lineno">2147</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-530" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-530', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-531" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-531', 'decode', 'link-531');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'latin1'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-532" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-532', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">,</tt><tt class="py-string">'xmlcharref'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="web2pyHTMLParser.handle_charref"></a><div id="web2pyHTMLParser.handle_charref-def"><a name="L2148"></a><tt class="py-lineno">2148</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser.handle_charref-toggle" onclick="return toggle('web2pyHTMLParser.handle_charref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_charref">handle_charref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser.handle_charref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="web2pyHTMLParser.handle_charref-expanded"><a name="L2149"></a><tt class="py-lineno">2149</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-533" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-533', 'name', 'link-74');">name</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-534" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-534', 'lower', 'link-354');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-string">'x'</tt><tt class="py-op">:</tt> </tt>
<a name="L2150"></a><tt class="py-lineno">2150</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-535" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-535', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">unichr</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-536" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-536', 'name', 'link-74');">name</a></tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">16</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-537" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-537', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2151"></a><tt class="py-lineno">2151</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2152"></a><tt class="py-lineno">2152</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-538" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-538', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">unichr</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-539" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-539', 'name', 'link-74');">name</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-540" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-540', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="web2pyHTMLParser.handle_entityref"></a><div id="web2pyHTMLParser.handle_entityref-def"><a name="L2153"></a><tt class="py-lineno">2153</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser.handle_entityref-toggle" onclick="return toggle('web2pyHTMLParser.handle_entityref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_entityref">handle_entityref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser.handle_entityref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="web2pyHTMLParser.handle_entityref-expanded"><a name="L2154"></a><tt class="py-lineno">2154</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-541" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-541', 'append', 'link-30');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">unichr</tt><tt class="py-op">(</tt><tt class="py-name">name2codepoint</tt><tt class="py-op">[</tt><tt id="link-542" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-542', 'name', 'link-74');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-543" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-543', 'encode', 'link-17');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="web2pyHTMLParser.handle_endtag"></a><div id="web2pyHTMLParser.handle_endtag-def"><a name="L2155"></a><tt class="py-lineno">2155</tt> <a class="py-toggle" href="#" id="web2pyHTMLParser.handle_endtag-toggle" onclick="return toggle('web2pyHTMLParser.handle_endtag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_endtag">handle_endtag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tagname</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyHTMLParser.handle_endtag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="web2pyHTMLParser.handle_endtag-expanded"><a name="L2156"></a><tt class="py-lineno">2156</tt>  <tt class="py-line">        <tt class="py-comment"># this deals with unbalanced tags</tt> </tt>
<a name="L2157"></a><tt class="py-lineno">2157</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">tagname</tt><tt class="py-op">==</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-544" class="py-name"><a title="web2py.gluon.dal.Rows.last" class="py-name" href="#" onclick="return doclink('link-544', 'last', 'link-511');">last</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2158"></a><tt class="py-lineno">2158</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L2159"></a><tt class="py-lineno">2159</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L2160"></a><tt class="py-lineno">2160</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2161"></a><tt class="py-lineno">2161</tt>  <tt class="py-line">                <tt class="py-name">parent_tagname</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-545" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-545', 'tag', 'link-82');">tag</a></tt> </tt>
<a name="L2162"></a><tt class="py-lineno">2162</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> </tt>
<a name="L2163"></a><tt class="py-lineno">2163</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2164"></a><tt class="py-lineno">2164</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">RuntimeError</tt><tt class="py-op">,</tt> <tt class="py-string">"unable to balance tag %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">tagname</tt> </tt>
<a name="L2165"></a><tt class="py-lineno">2165</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">parent_tagname</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-546" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-546', 'len', 'link-75');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">tagname</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-name">tagname</tt><tt class="py-op">:</tt> <tt class="py-keyword">break</tt> </tt>
</div></div><a name="L2166"></a><tt class="py-lineno">2166</tt>  <tt class="py-line"> </tt>
<a name="markdown_serializer"></a><div id="markdown_serializer-def"><a name="L2167"></a><tt class="py-lineno">2167</tt> <a class="py-toggle" href="#" id="markdown_serializer-toggle" onclick="return toggle('markdown_serializer');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#markdown_serializer">markdown_serializer</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">,</tt><tt class="py-param">tag</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">attr</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="markdown_serializer-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="markdown_serializer-expanded"><a name="L2168"></a><tt class="py-lineno">2168</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-547" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-547', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'\s+'</tt><tt class="py-op">,</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L2169"></a><tt class="py-lineno">2169</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-548" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-548', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'br'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'\n\n'</tt> </tt>
<a name="L2170"></a><tt class="py-lineno">2170</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-549" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-549', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h1'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2171"></a><tt class="py-lineno">2171</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-550" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-550', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h2'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">*</tt><tt class="py-number">2</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2172"></a><tt class="py-lineno">2172</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-551" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-551', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h3'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">*</tt><tt class="py-number">3</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2173"></a><tt class="py-lineno">2173</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-552" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-552', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h4'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2174"></a><tt class="py-lineno">2174</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-553" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-553', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'p'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2175"></a><tt class="py-lineno">2175</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-554" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-554', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'b'</tt> <tt class="py-keyword">or</tt> <tt id="link-555" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-555', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'strong'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'**%s**'</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt> </tt>
<a name="L2176"></a><tt class="py-lineno">2176</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-556" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-556', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'em'</tt> <tt class="py-keyword">or</tt> <tt id="link-557" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-557', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'i'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'*%s*'</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt> </tt>
<a name="L2177"></a><tt class="py-lineno">2177</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-558" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-558', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'tt'</tt> <tt class="py-keyword">or</tt> <tt id="link-559" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-559', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'code'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'`%s`'</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt> </tt>
<a name="L2178"></a><tt class="py-lineno">2178</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-560" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-560', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'[%s](%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-561" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-561', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_href'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2179"></a><tt class="py-lineno">2179</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-562" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-562', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'![%s](%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-563" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-563', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_alt'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-564" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-564', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_src'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2180"></a><tt class="py-lineno">2180</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L2181"></a><tt class="py-lineno">2181</tt>  <tt class="py-line"> </tt>
<a name="markmin_serializer"></a><div id="markmin_serializer-def"><a name="L2182"></a><tt class="py-lineno">2182</tt> <a class="py-toggle" href="#" id="markmin_serializer-toggle" onclick="return toggle('markmin_serializer');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html-module.html#markmin_serializer">markmin_serializer</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">,</tt><tt class="py-param">tag</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">attr</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="markmin_serializer-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="markmin_serializer-expanded"><a name="L2183"></a><tt class="py-lineno">2183</tt>  <tt class="py-line">    <tt class="py-comment"># if tag is None: return re.sub('\s+',' ',text)</tt> </tt>
<a name="L2184"></a><tt class="py-lineno">2184</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-565" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-565', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'br'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'\n\n'</tt> </tt>
<a name="L2185"></a><tt class="py-lineno">2185</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-566" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-566', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h1'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'# '</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2186"></a><tt class="py-lineno">2186</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-567" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-567', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h2'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">*</tt><tt class="py-number">2</tt><tt class="py-op">+</tt><tt class="py-string">' '</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2187"></a><tt class="py-lineno">2187</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-568" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-568', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h3'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">*</tt><tt class="py-number">3</tt><tt class="py-op">+</tt><tt class="py-string">' '</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2188"></a><tt class="py-lineno">2188</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-569" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-569', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'h4'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'#'</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">+</tt><tt class="py-string">' '</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2189"></a><tt class="py-lineno">2189</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-570" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-570', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'p'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n\n'</tt> </tt>
<a name="L2190"></a><tt class="py-lineno">2190</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-571" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-571', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'li'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'\n- '</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt> </tt>
<a name="L2191"></a><tt class="py-lineno">2191</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-572" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-572', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'tr'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">text</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">'\n'</tt> </tt>
<a name="L2192"></a><tt class="py-lineno">2192</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-573" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-573', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'table'</tt><tt class="py-op">,</tt><tt class="py-string">'blockquote'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'\n-----\n'</tt><tt class="py-op">+</tt><tt class="py-name">text</tt><tt class="py-op">+</tt><tt class="py-string">'\n------\n'</tt> </tt>
<a name="L2193"></a><tt class="py-lineno">2193</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-574" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-574', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'td'</tt><tt class="py-op">,</tt><tt class="py-string">'th'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">' | '</tt><tt class="py-op">+</tt><tt class="py-name">text</tt> </tt>
<a name="L2194"></a><tt class="py-lineno">2194</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-575" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-575', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt><tt class="py-string">'strong'</tt><tt class="py-op">,</tt><tt class="py-string">'label'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'**%s**'</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt> </tt>
<a name="L2195"></a><tt class="py-lineno">2195</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-576" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-576', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'em'</tt><tt class="py-op">,</tt><tt class="py-string">'i'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">"''%s''"</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt> </tt>
<a name="L2196"></a><tt class="py-lineno">2196</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-577" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-577', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'tt'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'``%s``'</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt id="link-578" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-578', 'strip', 'link-143');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2197"></a><tt class="py-lineno">2197</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-579" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-579', 'tag', 'link-82');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'code'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'``\n%s``'</tt> <tt class="py-op">%</tt> <tt class="py-name">text</tt> </tt>
<a name="L2198"></a><tt class="py-lineno">2198</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-580" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-580', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'[[%s %s]]'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-581" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-581', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_href'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2199"></a><tt class="py-lineno">2199</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-582" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-582', 'tag', 'link-82');">tag</a></tt><tt class="py-op">==</tt><tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-string">'[[%s %s left]]'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-583" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-583', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_alt'</tt><tt class="py-op">,</tt><tt class="py-string">'no title'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-584" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-584', 'get', 'link-291');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_src'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2200"></a><tt class="py-lineno">2200</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L2201"></a><tt class="py-lineno">2201</tt>  <tt class="py-line"> </tt>
<a name="L2202"></a><tt class="py-lineno">2202</tt>  <tt class="py-line"> </tt>
<a name="MARKMIN"></a><div id="MARKMIN-def"><a name="L2203"></a><tt class="py-lineno">2203</tt> <a class="py-toggle" href="#" id="MARKMIN-toggle" onclick="return toggle('MARKMIN');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a><tt class="py-op">(</tt><tt class="py-base-class">XmlComponent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MARKMIN-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MARKMIN-expanded"><a name="L2204"></a><tt class="py-lineno">2204</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2205"></a><tt class="py-lineno">2205</tt>  <tt class="py-line"><tt class="py-docstring">    For documentation: http://web2py.com/examples/static/markmin.html</tt> </tt>
<a name="L2206"></a><tt class="py-lineno">2206</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="MARKMIN.__init__"></a><div id="MARKMIN.__init__-def"><a name="L2207"></a><tt class="py-lineno">2207</tt> <a class="py-toggle" href="#" id="MARKMIN.__init__-toggle" onclick="return toggle('MARKMIN.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MARKMIN-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">,</tt> <tt class="py-param">extra</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">allowed</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">sep</tt><tt class="py-op">=</tt><tt class="py-string">'p'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MARKMIN.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MARKMIN.__init__-expanded"><a name="L2208"></a><tt class="py-lineno">2208</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt> </tt>
<a name="L2209"></a><tt class="py-lineno">2209</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extra</tt> <tt class="py-op">=</tt> <tt class="py-name">extra</tt> </tt>
<a name="L2210"></a><tt class="py-lineno">2210</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed</tt> </tt>
<a name="L2211"></a><tt class="py-lineno">2211</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt> <tt class="py-op">=</tt> <tt class="py-name">sep</tt> </tt>
</div><a name="L2212"></a><tt class="py-lineno">2212</tt>  <tt class="py-line"> </tt>
<a name="MARKMIN.xml"></a><div id="MARKMIN.xml-def"><a name="L2213"></a><tt class="py-lineno">2213</tt> <a class="py-toggle" href="#" id="MARKMIN.xml-toggle" onclick="return toggle('MARKMIN.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MARKMIN-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MARKMIN.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MARKMIN.xml-expanded"><a name="L2214"></a><tt class="py-lineno">2214</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2215"></a><tt class="py-lineno">2215</tt>  <tt class="py-line"><tt class="py-docstring">        calls the gluon.contrib.markmin render function to convert the wiki syntax</tt> </tt>
<a name="L2216"></a><tt class="py-lineno">2216</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2217"></a><tt class="py-lineno">2217</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-585" class="py-name"><a title="web2py.gluon.globals.Response.render
web2py.gluon.template.render" class="py-name" href="#" onclick="return doclink('link-585', 'render', 'link-4');">render</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-name">extra</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extra</tt><tt class="py-op">,</tt><tt class="py-name">allowed</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed</tt><tt class="py-op">,</tt><tt class="py-name">sep</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2218"></a><tt class="py-lineno">2218</tt>  <tt class="py-line"> </tt>
<a name="MARKMIN.__str__"></a><div id="MARKMIN.__str__-def"><a name="L2219"></a><tt class="py-lineno">2219</tt> <a class="py-toggle" href="#" id="MARKMIN.__str__-toggle" onclick="return toggle('MARKMIN.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MARKMIN-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MARKMIN.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MARKMIN.__str__-expanded"><a name="L2220"></a><tt class="py-lineno">2220</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-586" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-586', 'xml', 'link-15');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2221"></a><tt class="py-lineno">2221</tt>  <tt class="py-line"> </tt>
<a name="MARKMIN.flatten"></a><div id="MARKMIN.flatten-def"><a name="L2222"></a><tt class="py-lineno">2222</tt> <a class="py-toggle" href="#" id="MARKMIN.flatten-toggle" onclick="return toggle('MARKMIN.flatten');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MARKMIN-class.html#flatten">flatten</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">render</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MARKMIN.flatten-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MARKMIN.flatten-expanded"><a name="L2223"></a><tt class="py-lineno">2223</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2224"></a><tt class="py-lineno">2224</tt>  <tt class="py-line"><tt class="py-docstring">        return the text stored by the MARKMIN object rendered by the render function</tt> </tt>
<a name="L2225"></a><tt class="py-lineno">2225</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2226"></a><tt class="py-lineno">2226</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> </tt>
</div><a name="L2227"></a><tt class="py-lineno">2227</tt>  <tt class="py-line"> </tt>
<a name="MARKMIN.elements"></a><div id="MARKMIN.elements-def"><a name="L2228"></a><tt class="py-lineno">2228</tt> <a class="py-toggle" href="#" id="MARKMIN.elements-toggle" onclick="return toggle('MARKMIN.elements');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.html.MARKMIN-class.html#elements">elements</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MARKMIN.elements-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MARKMIN.elements-expanded"><a name="L2229"></a><tt class="py-lineno">2229</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2230"></a><tt class="py-lineno">2230</tt>  <tt class="py-line"><tt class="py-docstring">        to be considered experimental since the behavior of this method is questionable</tt> </tt>
<a name="L2231"></a><tt class="py-lineno">2231</tt>  <tt class="py-line"><tt class="py-docstring">        another options could be TAG(self.text).elements(*args,**kargs)</tt> </tt>
<a name="L2232"></a><tt class="py-lineno">2232</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2233"></a><tt class="py-lineno">2233</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L2234"></a><tt class="py-lineno">2234</tt>  <tt class="py-line"> </tt>
<a name="L2235"></a><tt class="py-lineno">2235</tt>  <tt class="py-line"> </tt>
<a name="L2236"></a><tt class="py-lineno">2236</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L2237"></a><tt class="py-lineno">2237</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L2238"></a><tt class="py-lineno">2238</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2239"></a><tt class="py-lineno">2239</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:09 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.A-class.html version [f778d0c1e3].

















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.A</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;A
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.A-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class A</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#A">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">A</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.A-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#A.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'a'"><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#A.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.B-class.html version [76e056e366].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.B</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;B
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.B-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class B</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#B">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">B</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'b'"><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.BEAUTIFY-class.html version [29b9d42f7a].












































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.BEAUTIFY</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;BEAUTIFY
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.BEAUTIFY-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BEAUTIFY</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#BEAUTIFY">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">BEAUTIFY</strong>
</pre>

<hr />
<pre class="literalblock">

example::

    &gt;&gt;&gt; BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
    '&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;b&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;font-weight:bold;&quot;&gt;hello&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;:&lt;/td&gt;&lt;td&gt;&lt;div&gt;world&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'

turns any list, dictionary, etc into decent looking html.
Two special attributes are
:sorted: a function that takes the dict and returned sorted keys
:keyfilter: a funciton that takes a key and returns its representation
            or None if the key is to be skipped. By default key[:1]=='_' is skipped.

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.BEAUTIFY-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">component</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      :param *components: any components that should be nested in this 
      element :param **attributes: any attributes you want to give to this 
      element</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#BEAUTIFY.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="no_underscore"></a><span class="summary-sig-name">no_underscore</span>(<span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#BEAUTIFY.no_underscore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'div'">'div'</code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">component</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#BEAUTIFY.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>:param *components: any components that should be nested in this 
  element :param **attributes: any attributes you want to give to this 
  element</p>
  :raises SyntaxError: when a stand alone tag receives components
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#__init__">DIV.__init__</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.BODY-class.html version [1635add987].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.BODY</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;BODY
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.BODY-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BODY</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#BODY">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">BODY</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'body'"><code class="variable-quote">'</code><code class="variable-string">body</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.BR-class.html version [9f2c90f163].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.BR</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;BR
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.BR-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BR</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#BR">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">BR</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'br/'"><code class="variable-quote">'</code><code class="variable-string">br/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.BUTTON-class.html version [04b6110bdc].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.BUTTON</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;BUTTON
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.BUTTON-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BUTTON</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#BUTTON">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">BUTTON</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'button'"><code class="variable-quote">'</code><code class="variable-string">button</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.CAT-class.html version [993a43e91b].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.CAT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;CAT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.CAT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CAT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#CAT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">CAT</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="''"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:00 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.CENTER-class.html version [e3263e1c88].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.CENTER</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;CENTER
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.CENTER-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CENTER</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#CENTER">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">CENTER</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'center'"><code class="variable-quote">'</code><code class="variable-string">center</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.CODE-class.html version [a87c5b4520].






































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.CODE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;CODE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.CODE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CODE</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#CODE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">CODE</strong>
</pre>

<hr />
<p>displays code in HTML with syntax highlighting.</p>
  :param attributes: optional attributes:
  <ul>
    <li>
      language: indicates the language, otherwise PYTHON is assumed
    </li>
    <li>
      link: can provide a link
    </li>
    <li>
      styles: for styles
    </li>
  </ul>
  Example:
<pre class="literalblock">
   {{=CODE(&quot;print 'hello world'&quot;, language='python', link=None,
       counter=1, styles={}, highlight_line=None)}}
</pre>
  <p>supported languages are &quot;python&quot;, &quot;html_plain&quot;, 
  &quot;c&quot;, &quot;cpp&quot;, &quot;web2py&quot;, &quot;html&quot;. The
  &quot;html&quot; language interprets {{ and }} tags as &quot;web2py&quot;
  code, &quot;html_plain&quot; doesn't.</p>
  <p>if a link='/examples/global/vars/' is provided web2py keywords are 
  linked to the online docs.</p>
  the counter is used for line numbering, counter can be None or a 
  prompt string.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.CODE-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#CODE.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#tag">tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#CODE.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.COL-class.html version [bc360c4958].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.COL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;COL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.COL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class COL</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#COL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">COL</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'col'"><code class="variable-quote">'</code><code class="variable-string">col</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.COLGROUP-class.html version [9a5f5114cd].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.COLGROUP</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;COLGROUP
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.COLGROUP-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class COLGROUP</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#COLGROUP">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">COLGROUP</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'colgroup'"><code class="variable-quote">'</code><code class="variable-string">colgroup</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.DIV-class.html version [30fd838995].





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.DIV</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;DIV
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.DIV-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DIV</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+    
           |    
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+
               |
              <strong class="uidshort">DIV</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.html.A-class.html">A</a>,
    <a href="web2py.gluon.html.B-class.html">B</a>,
    <a href="web2py.gluon.html.BEAUTIFY-class.html">BEAUTIFY</a>,
    <a href="web2py.gluon.html.BODY-class.html">BODY</a>,
    <a href="web2py.gluon.html.BR-class.html">BR</a>,
    <a href="web2py.gluon.html.CAT-class.html">CAT</a>,
    <a href="web2py.gluon.html.CENTER-class.html">CENTER</a>,
    <a href="web2py.gluon.html.CODE-class.html">CODE</a>,
    <a href="web2py.gluon.html.EM-class.html">EM</a>,
    <a href="web2py.gluon.html.EMBED-class.html">EMBED</a>,
    <a href="web2py.gluon.html.FIELDSET-class.html">FIELDSET</a>,
    <a href="web2py.gluon.html.FORM-class.html">FORM</a>,
    <a href="web2py.gluon.html.H1-class.html">H1</a>,
    <a href="web2py.gluon.html.H2-class.html">H2</a>,
    <a href="web2py.gluon.html.H3-class.html">H3</a>,
    <a href="web2py.gluon.html.H4-class.html">H4</a>,
    <a href="web2py.gluon.html.H5-class.html">H5</a>,
    <a href="web2py.gluon.html.H6-class.html">H6</a>,
    <a href="web2py.gluon.html.HEAD-class.html">HEAD</a>,
    <a href="web2py.gluon.html.HR-class.html">HR</a>,
    <a href="web2py.gluon.html.HTML-class.html">HTML</a>,
    <a href="web2py.gluon.html.I-class.html">I</a>,
    <a href="web2py.gluon.html.IFRAME-class.html">IFRAME</a>,
    <a href="web2py.gluon.html.IMG-class.html">IMG</a>,
    <a href="web2py.gluon.html.INPUT-class.html">INPUT</a>,
    <a href="web2py.gluon.html.LABEL-class.html">LABEL</a>,
    <a href="web2py.gluon.html.LEGEND-class.html">LEGEND</a>,
    <a href="web2py.gluon.html.LI-class.html">LI</a>,
    <a href="web2py.gluon.html.LINK-class.html">LINK</a>,
    <a href="web2py.gluon.html.MENU-class.html">MENU</a>,
    <a href="web2py.gluon.html.META-class.html">META</a>,
    <a href="web2py.gluon.html.OBJECT-class.html">OBJECT</a>,
    <a href="web2py.gluon.html.UL-class.html">UL</a>,
    <a href="web2py.gluon.html.OPTGROUP-class.html">OPTGROUP</a>,
    <a href="web2py.gluon.html.OPTION-class.html">OPTION</a>,
    <a href="web2py.gluon.html.P-class.html">P</a>,
    <a href="web2py.gluon.html.PRE-class.html">PRE</a>,
    <a href="web2py.gluon.html.SCRIPT-class.html">SCRIPT</a>,
    <a href="web2py.gluon.html.SPAN-class.html">SPAN</a>,
    <a href="web2py.gluon.html.TABLE-class.html">TABLE</a>,
    <a href="web2py.gluon.html.STYLE-class.html">STYLE</a>,
    <a href="web2py.gluon.html.TBODY-class.html">TBODY</a>,
    <a href="web2py.gluon.html.TD-class.html">TD</a>,
    <a href="web2py.gluon.html.TFOOT-class.html">TFOOT</a>,
    <a href="web2py.gluon.html.TH-class.html">TH</a>,
    <a href="web2py.gluon.html.THEAD-class.html">THEAD</a>,
    <a href="web2py.gluon.html.TITLE-class.html">TITLE</a>,
    <a href="web2py.gluon.html.TR-class.html">TR</a>,
    <a href="web2py.gluon.html.TT-class.html">TT</a>,
    <a href="web2py.gluon.html.XHTML-class.html">XHTML</a>,
    <a href="web2py.gluon.html.BUTTON-class.html">BUTTON</a>,
    <a href="web2py.gluon.html.COL-class.html">COL</a>,
    <a href="web2py.gluon.html.COLGROUP-class.html">COLGROUP</a>
</dd></dl>

<hr />
<p>HTML helper, for easy generating and manipulating a DOM structure. 
  Little or no validation is done.</p>
  <p>Behaves like a dictionary regarding updating of attributes. Behaves 
  like a list regarding inserting/appending components.</p>
  example:
<pre class="literalblock">
   &gt;&gt;&gt; DIV('hello', 'world', _style='color:red;').xml()
   '&lt;div style=&quot;color:red;&quot;&gt;helloworld&lt;/div&gt;'
</pre>
  <p>all other HTML helpers are derived from DIV.</p>
  _something=&quot;value&quot; attributes are transparently translated 
  into something=&quot;value&quot; HTML attributes<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*components</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      :param *components: any components that should be nested in this 
      element :param **attributes: any attributes you want to give to this 
      element</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update"></a><span class="summary-sig-name">update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      dictionary like updating of the tag attributes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#append" class="summary-sig-name">append</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      list style appending of components</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.append">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#insert" class="summary-sig-name">insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      list style inserting of components</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span><br />
      gets attribute with name 'i' or component #i.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#__setitem__" class="summary-sig-name">__setitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      sets attribute with name 'i' or component #i.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#__delitem__" class="summary-sig-name">__delitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span><br />
      deletes attribute with name 'i' or component #i.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__delitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span><br />
      returns the number of included components</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__nonzero__"></a><span class="summary-sig-name">__nonzero__</span>(<span class="summary-sig-arg">self</span>)</span><br />
      always return True</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__nonzero__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#_wrap_components" class="summary-sig-name">_wrap_components</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">allowed_parents</span>,
        <span class="summary-sig-arg">wrap_parent</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">wrap_lambda</span>=<span class="summary-sig-default">1</span>)</span><br />
      helper for _fixup.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._wrap_components">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#_postprocessing" class="summary-sig-name">_postprocessing</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of attributes (normally the ones not prefixed with 
      '_').</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._postprocessing">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_traverse"></a><span class="summary-sig-name">_traverse</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">status</span>,
        <span class="summary-sig-arg">hideerror</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._traverse">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#_validate" class="summary-sig-name">_validate</a>(<span class="summary-sig-arg">self</span>)</span><br />
      nothing to validate yet.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_setnode"></a><span class="summary-sig-name">_setnode</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._setnode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#_xml" class="summary-sig-name">_xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      helper for xml generation.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(COMPONENT) returns equals COMPONENT.xml()</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#flatten" class="summary-sig-name">flatten</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">render</span>=<span class="summary-sig-default">1</span>)</span><br />
      return the text stored by the DIV object rendered by the render 
      function the render function must take text, tagname, and attributes 
      render=None is equivalent to render=lambda text, tag, attr: text</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.flatten">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#elements" class="summary-sig-name">elements</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      find all component that match the supplied attribute dictionary, 
      or None if nothing could be found</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.elements">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.DIV-class.html#element" class="summary-sig-name">element</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      find the first component that matches the supplied attribute 
      dictionary, or None if nothing could be found</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.element">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="siblings"></a><span class="summary-sig-name">siblings</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      find all sibling components that match the supplied argument list 
      and attribute dictionary, or None if nothing could be found</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.siblings">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sibling"></a><span class="summary-sig-name">sibling</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      find the first sibling component that match the supplied argument 
      list and attribute dictionary, or None if nothing could be found</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.sibling">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'div'"><code class="variable-quote">'</code><code class="variable-string">div</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_tag"></a><span class="summary-name">regex_tag</span> = <code title="re.compile(r'^[\w-:]+')">re.compile(r'^<code class="re-group">[</code>\w-:<code class="re-group">]</code><code class="re-op">+</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_id"></a><span class="summary-name">regex_id</span> = <code title="re.compile(r'#([\w-]+)')">re.compile(r'#<code class="re-group">(</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_class"></a><span class="summary-name">regex_class</span> = <code title="re.compile(r'\.([\w-]+)')">re.compile(r'\.<code class="re-group">(</code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_attr"></a><span class="summary-name">regex_attr</span> = <code title="re.compile(r'\[([\w-:]+)=(.*?)\]')">re.compile(r'\[<code class="re-group">(</code><code class="re-group">[</code>\w-:<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>=<code class="re-group">(</code>.<code class="re-op">*?</code><code class="re-group">)</code>\]')</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*components</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>:param *components: any components that should be nested in this 
  element :param **attributes: any attributes you want to give to this 
  element</p>
  :raises SyntaxError: when a stand alone tag receives components
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="append"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">append</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.append">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  list style appending of components
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>a=DIV()
<span class="py-prompt">&gt;&gt;&gt; </span>a.append(SPAN(<span class="py-string">'x'</span>))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> a
<span class="py-output">&lt;div&gt;&lt;span&gt;x&lt;/span&gt;&lt;/div&gt;</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="insert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">i</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  list style inserting of components
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>a=DIV()
<span class="py-prompt">&gt;&gt;&gt; </span>a.insert(0,SPAN(<span class="py-string">'x'</span>))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> a
<span class="py-output">&lt;div&gt;&lt;span&gt;x&lt;/span&gt;&lt;/div&gt;</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__getitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">i</span>)</span>
    <br /><em class="fname">(Indexing operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__getitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

gets attribute with name 'i' or component #i.
If attribute 'i' is not found returns None

:param i: index
   if i is a string: the name of the attribute
   otherwise references to number of the component

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__setitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">i</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Index assignment operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__setitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

sets attribute with name 'i' or component #i.

:param i: index
   if i is a string: the name of the attribute
   otherwise references to number of the component
:param value: the new value

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__delitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">i</span>)</span>
    <br /><em class="fname">(Index deletion operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__delitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

deletes attribute with name 'i' or component #i.

:param i: index
   if i is a string: the name of the attribute
   otherwise references to number of the component

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_wrap_components"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_wrap_components</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">allowed_parents</span>,
        <span class="sig-arg">wrap_parent</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">wrap_lambda</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._wrap_components">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

helper for _fixup. Checks if a component is in allowed_parents,
otherwise wraps it in wrap_parent

:param allowed_parents: (tuple) classes that the component should be an
    instance of
:param wrap_parent: the class to wrap the component in, if needed
:param wrap_lambda: lambda to use for wrapping, if needed

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_postprocessing"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_postprocessing</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._postprocessing">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of attributes (normally the ones not prefixed with '_').</p>
  Nothing to postprocess yet. May be overridden by subclasses
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_validate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_validate</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._validate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  nothing to validate yet. May be overridden by subclasses
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_xml"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV._xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

helper for xml generation. Returns separately:
- the component attributes
- the generated xml of the inner components

Component attributes start with an underscore ('_') and
do not have a False or None value. The underscore is removed.
A value of True is replaced with the attribute name.

:returns: tuple: (attributes, components)

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.XmlComponent-class.html#xml">XmlComponent.xml</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(COMPONENT) returns equals COMPONENT.xml()
  <dl class="fields">
    <dt>Overrides:
      object.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="flatten"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">flatten</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">render</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.flatten">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  return the text stored by the DIV object rendered by the render 
  function the render function must take text, tagname, and attributes 
  render=None is equivalent to render=lambda text, tag, attr: text
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>markdown = <span class="py-keyword">lambda</span> text,tag=None,attributes={}:                         {None: re.sub(<span class="py-string">'\s+'</span>,<span class="py-string">' '</span>,text),                          <span class="py-string">'h1'</span>:<span class="py-string">'#'</span>+text+<span class="py-string">'\n\n'</span>,                          <span class="py-string">'p'</span>:text+<span class="py-string">'\n'</span>}.get(tag,text)
<span class="py-prompt">&gt;&gt;&gt; </span>a=TAG(<span class="py-string">'&lt;h1&gt;Header&lt;/h1&gt;&lt;p&gt;this is a     test&lt;/p&gt;'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>a.flatten(markdown)
<span class="py-output">'#Header\n\nthis is a test\n'</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="elements"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">elements</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.elements">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>find all component that match the supplied attribute dictionary, or 
  None if nothing could be found</p>
  All components of the components are searched.
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>a = DIV(DIV(SPAN(<span class="py-string">'x'</span>),3,DIV(SPAN(<span class="py-string">'y'</span>))))
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">for</span> c <span class="py-keyword">in</span> a.elements(<span class="py-string">'span'</span>,first_only=True): c[0]=<span class="py-string">'z'</span>
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> a
<span class="py-output">&lt;div&gt;&lt;div&gt;&lt;span&gt;z&lt;/span&gt;3&lt;div&gt;&lt;span&gt;y&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">for</span> c <span class="py-keyword">in</span> a.elements(<span class="py-string">'span'</span>): c[0]=<span class="py-string">'z'</span>
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> a
<span class="py-output">&lt;div&gt;&lt;div&gt;&lt;span&gt;z&lt;/span&gt;3&lt;div&gt;&lt;span&gt;z&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</span></pre>
  It also supports a syntax compatible with jQuery
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>a=TAG(<span class="py-string">'&lt;div&gt;&lt;span&gt;&lt;a id=&quot;1-1&quot; u:v=$&gt;hello&lt;/a&gt;&lt;/span&gt;&lt;p class=&quot;this is a test&quot;&gt;world&lt;/p&gt;&lt;/div&gt;'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">for</span> e <span class="py-keyword">in</span> a.elements(<span class="py-string">'div a#1-1, p.is'</span>): <span class="py-keyword">print</span> e.flatten()
<span class="py-output">hello</span>
<span class="py-output">world</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">for</span> e <span class="py-keyword">in</span> a.elements(<span class="py-string">'#1-1'</span>): <span class="py-keyword">print</span> e.flatten()
<span class="py-output">hello</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>a.elements(<span class="py-string">'a[u:v=$]'</span>)[0].xml()
<span class="py-output">'&lt;a id=&quot;1-1&quot; u:v=&quot;$&quot;&gt;hello&lt;/a&gt;'</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>a=FORM( INPUT(_type=<span class="py-string">'text'</span>), SELECT(range(1)), TEXTAREA() )
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">for</span> c <span class="py-keyword">in</span> a.elements(<span class="py-string">'input, select, textarea'</span>): c[<span class="py-string">'_disabled'</span>] = <span class="py-string">'disabled'</span>
<span class="py-prompt">&gt;&gt;&gt; </span>a.xml()
<span class="py-output">'&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;input disabled=&quot;disabled&quot; type=&quot;text&quot; /&gt;&lt;select disabled=&quot;disabled&quot;&gt;&lt;option value=&quot;0&quot;&gt;0&lt;/option&gt;&lt;/select&gt;&lt;textarea cols=&quot;40&quot; disabled=&quot;disabled&quot; rows=&quot;10&quot;&gt;&lt;/textarea&gt;&lt;/form&gt;'</span></pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="element"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">element</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#DIV.element">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>find the first component that matches the supplied attribute 
  dictionary, or None if nothing could be found</p>
  Also the components of the components are searched.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.EM-class.html version [ff7a71b520].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.EM</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;EM
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.EM-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class EM</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#EM">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">EM</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'em'"><code class="variable-quote">'</code><code class="variable-string">em</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.EMBED-class.html version [562b01e136].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.EMBED</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;EMBED
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.EMBED-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class EMBED</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#EMBED">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">EMBED</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'embed/'"><code class="variable-quote">'</code><code class="variable-string">embed/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.FIELDSET-class.html version [3dae8c1431].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.FIELDSET</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;FIELDSET
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.FIELDSET-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FIELDSET</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FIELDSET">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">FIELDSET</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'fieldset'"><code class="variable-quote">'</code><code class="variable-string">fieldset</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.FORM-class.html version [98a4f6927b].
















































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.FORM</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;FORM
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.FORM-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FORM</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">FORM</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.sqlhtml.SQLFORM-class.html">sqlhtml.SQLFORM</a>
</dd></dl>

<hr />
example:
<pre class="literalblock">
   &gt;&gt;&gt; from validators import IS_NOT_EMPTY
   &gt;&gt;&gt; form=FORM(INPUT(_name=&quot;test&quot;, requires=IS_NOT_EMPTY()))
   &gt;&gt;&gt; form.xml()
   '&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;test&quot; type=&quot;text&quot; /&gt;&lt;/form&gt;'
</pre>
  <p>a FORM is container for INPUT, TEXTAREA, SELECT and other helpers</p>
  form has one important method:
<pre class="literalblock">
   form.accepts(request.vars, session)
</pre>
  if form is accepted (and all validators pass) form.vars contains the 
  accepted vars, otherwise form.errors contains the errors. in case of 
  errors the form is modified to present the errors to the user.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.FORM-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*components</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      :param *components: any components that should be nested in this 
      element :param **attributes: any attributes you want to give to this 
      element</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.FORM-class.html#_postprocessing" class="summary-sig-name">_postprocessing</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of attributes (normally the ones not prefixed with 
      '_').</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM._postprocessing">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="accepts"></a><span class="summary-sig-name">accepts</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">vars</span>,
        <span class="summary-sig-arg">session</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">formname</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">keepvalues</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hideerror</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.accepts">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="hidden_fields"></a><span class="summary-sig-name">hidden_fields</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.hidden_fields">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.FORM-class.html#process" class="summary-sig-name">process</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">values</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">session</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">**args</span>)</span><br />
      Perform the .validate() method but returns the form

Usage in controllers:
# directly on return
def action():
    #some code here
    return dict(form=FORM(...).process(...))

You can use it with FORM, SQLFORM or FORM based plugins

Examples:
#response.flash messages
def action():
    form = SQLFORM(db.table).process(message_onsuccess='Sucess!')
    retutn dict(form=form)

# callback function
# callback receives True or False as first arg, and a list of args.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.process">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.FORM-class.html#validate" class="summary-sig-name">validate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">values</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">session</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">formname</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">keepvalues</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">hideerror</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">onsuccess</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">flash</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">onfailure</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">flash</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">message_onsuccess</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">message_onfailure</span>=<span class="summary-sig-default">1</span>)</span><br />
      This function validates the form, 
you can use it instead of directly form.accepts.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.FORM-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'form'"><code class="variable-quote">'</code><code class="variable-string">form</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*components</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>:param *components: any components that should be nested in this 
  element :param **attributes: any attributes you want to give to this 
  element</p>
  :raises SyntaxError: when a stand alone tag receives components
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#__init__">DIV.__init__</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_postprocessing"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_postprocessing</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM._postprocessing">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of attributes (normally the ones not prefixed with '_').</p>
  Nothing to postprocess yet. May be overridden by subclasses
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_postprocessing">DIV._postprocessing</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="process"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">process</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">values</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">session</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.process">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Perform the .validate() method but returns the form

Usage in controllers:
# directly on return
def action():
    #some code here
    return dict(form=FORM(...).process(...))

You can use it with FORM, SQLFORM or FORM based plugins

Examples:
#response.flash messages
def action():
    form = SQLFORM(db.table).process(message_onsuccess='Sucess!')
    retutn dict(form=form)

# callback function
# callback receives True or False as first arg, and a list of args.
def my_callback(status, msg):
   response.flash = &quot;Success! &quot;+msg if status else &quot;Errors occured&quot;

# after argument can be 'flash' to response.flash messages
# or a function name to use as callback or None to do nothing.
def action():
    return dict(form=SQLFORM(db.table).process(onsuccess=my_callback)

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="validate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">validate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">values</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">session</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">formname</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">keepvalues</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">hideerror</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">onsuccess</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">flash</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">onfailure</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">flash</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">message_onsuccess</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">message_onfailure</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.validate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

This function validates the form, 
you can use it instead of directly form.accepts.

Usage:
In controller

def action():
    form=FORM(INPUT(_name=&quot;test&quot;, requires=IS_NOT_EMPTY()))
    form.validate() #you can pass some args here - see below
    return dict(form=form)

This can receive a bunch of arguments        

onsuccess = 'flash' - will show message_onsuccess in response.flash
            None - will do nothing
            can be a function (lambda form: pass)
onfailure = 'flash' - will show message_onfailure in response.flash
            None - will do nothing
            can be a function (lambda form: pass)

values = values to test the validation - dictionary, response.vars, session or other - Default to (request.vars, session)
message_onsuccess
message_onfailure

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#FORM.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.H1-class.html version [addbcdaf68].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.H1</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;H1
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.H1-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class H1</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#H1">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">H1</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'h1'"><code class="variable-quote">'</code><code class="variable-string">h1</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.H2-class.html version [47230b2e8b].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.H2</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;H2
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.H2-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class H2</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#H2">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">H2</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'h2'"><code class="variable-quote">'</code><code class="variable-string">h2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.H3-class.html version [ea39d09542].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.H3</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;H3
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.H3-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class H3</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#H3">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">H3</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'h3'"><code class="variable-quote">'</code><code class="variable-string">h3</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.H4-class.html version [1e5c25a9dd].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.H4</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;H4
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.H4-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class H4</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#H4">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">H4</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'h4'"><code class="variable-quote">'</code><code class="variable-string">h4</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.H5-class.html version [691497d1b9].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.H5</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;H5
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.H5-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class H5</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#H5">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">H5</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'h5'"><code class="variable-quote">'</code><code class="variable-string">h5</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.H6-class.html version [5430bc41bf].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.H6</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;H6
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.H6-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class H6</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#H6">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">H6</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'h6'"><code class="variable-quote">'</code><code class="variable-string">h6</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.HEAD-class.html version [e901afb86d].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.HEAD</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;HEAD
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.HEAD-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HEAD</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#HEAD">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">HEAD</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'head'"><code class="variable-quote">'</code><code class="variable-string">head</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.HR-class.html version [ebb94d83cd].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.HR</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;HR
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.HR-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HR</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#HR">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">HR</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'hr/'"><code class="variable-quote">'</code><code class="variable-string">hr/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.HTML-class.html version [5b31ac3ac1].













































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.HTML</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;HTML
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.HTML-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HTML</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#HTML">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">HTML</strong>
</pre>

<hr />
<p>There are four predefined document type definitions. They can be 
  specified in the 'doctype' parameter:</p>
  <p>-'strict' enables strict doctype -'transitional' enables transitional 
  doctype (default) -'frameset' enables frameset doctype -'html5' enables 
  HTML 5 doctype -any other string will be treated as user's own 
  doctype</p>
  <p>'lang' parameter specifies the language of the document. Defaults to 
  'en'.</p>
  See also :class:`DIV`<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.HTML-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#HTML.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'html'"><code class="variable-quote">'</code><code class="variable-string">html</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HTML-class.html#strict" class="summary-name">strict</a> = <code title="'''&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.or\
g/TR/html4/strict.dtd&quot;&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;h</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HTML-class.html#transitional" class="summary-name">transitional</a> = <code title="'''&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;htt\
p://www.w3.org/TR/html4/loose.dtd&quot;&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 T</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.HTML-class.html#frameset" class="summary-name">frameset</a> = <code title="'''&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Frameset//EN&quot; &quot;http://\
www.w3.org/TR/html4/frameset.dtd&quot;&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Frame</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="html5"></a><span class="summary-name">html5</span> = <code title="'''&lt;!DOCTYPE HTML&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE HTML&gt;\n</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#HTML.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="strict"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">strict</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.or</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">g/TR/html4/strict.dtd&quot;&gt;</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="transitional"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">transitional</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;htt</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">p://www.w3.org/TR/html4/loose.dtd&quot;&gt;</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="frameset"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">frameset</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Frameset//EN&quot; &quot;http://</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">www.w3.org/TR/html4/frameset.dtd&quot;&gt;</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.I-class.html version [7b5c5b12f8].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.I</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;I
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.I-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class I</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#I">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">I</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'i'"><code class="variable-quote">'</code><code class="variable-string">i</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.IFRAME-class.html version [21c33eb3e3].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.IFRAME</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;IFRAME
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.IFRAME-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IFRAME</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#IFRAME">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">IFRAME</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'iframe'"><code class="variable-quote">'</code><code class="variable-string">iframe</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.IMG-class.html version [11843c218a].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.IMG</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;IMG
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.IMG-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IMG</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#IMG">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">IMG</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'img/'"><code class="variable-quote">'</code><code class="variable-string">img/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.INPUT-class.html version [98d72b4044].








































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.INPUT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;INPUT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.INPUT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class INPUT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">INPUT</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.html.SELECT-class.html">SELECT</a>,
    <a href="web2py.gluon.html.TEXTAREA-class.html">TEXTAREA</a>
</dd></dl>

<hr />
<pre class="literalblock">

INPUT Component

examples::

    &gt;&gt;&gt; INPUT(_type='text', _name='name', value='Max').xml()
    '&lt;input name=&quot;name&quot; type=&quot;text&quot; value=&quot;Max&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='checkbox', _name='checkbox', value='on').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;checkbox&quot; type=&quot;checkbox&quot; value=&quot;on&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()
    '&lt;input checked=&quot;checked&quot; name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;yes&quot; /&gt;'

    &gt;&gt;&gt; INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()
    '&lt;input name=&quot;radio&quot; type=&quot;radio&quot; value=&quot;no&quot; /&gt;'

the input helper takes two special attributes value= and requires=.

:param value: used to pass the initial value for the input field.
    value differs from _value because it works for checkboxes, radio,
    textarea and select/option too.

    - for a checkbox value should be '' or 'on'.
    - for a radio or select/option value should be the _value
        of the checked/selected item.

:param requires: should be None, or a validator or a list of validators
    for the value of the field.

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.INPUT-class.html#_validate" class="summary-sig-name">_validate</a>(<span class="summary-sig-arg">self</span>)</span><br />
      nothing to validate yet.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT._validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.INPUT-class.html#_postprocessing" class="summary-sig-name">_postprocessing</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of attributes (normally the ones not prefixed with 
      '_').</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT._postprocessing">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.INPUT-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'input/'"><code class="variable-quote">'</code><code class="variable-string">input/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_validate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_validate</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT._validate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  nothing to validate yet. May be overridden by subclasses
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_validate">DIV._validate</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_postprocessing"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_postprocessing</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT._postprocessing">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of attributes (normally the ones not prefixed with '_').</p>
  Nothing to postprocess yet. May be overridden by subclasses
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_postprocessing">DIV._postprocessing</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#INPUT.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.LABEL-class.html version [c6c8c8201f].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.LABEL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;LABEL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.LABEL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class LABEL</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#LABEL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">LABEL</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'label'"><code class="variable-quote">'</code><code class="variable-string">label</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.LEGEND-class.html version [9af1325424].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.LEGEND</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;LEGEND
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.LEGEND-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class LEGEND</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#LEGEND">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">LEGEND</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'legend'"><code class="variable-quote">'</code><code class="variable-string">legend</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.LI-class.html version [31fe1ad440].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.LI</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;LI
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.LI-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class LI</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#LI">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">LI</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'li'"><code class="variable-quote">'</code><code class="variable-string">li</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.LINK-class.html version [ea3a21fbec].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.LINK</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;LINK
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.LINK-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class LINK</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#LINK">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">LINK</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'link/'"><code class="variable-quote">'</code><code class="variable-string">link/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.MARKMIN-class.html version [e8a1d40082].

























































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.MARKMIN</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;MARKMIN
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.MARKMIN-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MARKMIN</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+    
           |    
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+
               |
              <strong class="uidshort">MARKMIN</strong>
</pre>

<hr />
For documentation: http://web2py.com/examples/static/markmin.html<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.MARKMIN-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">extra</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">allowed</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">sep</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.MARKMIN-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      calls the gluon.contrib.markmin render function to convert the 
      wiki syntax</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.MARKMIN-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="flatten"></a><span class="summary-sig-name">flatten</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">render</span>=<span class="summary-sig-default">1</span>)</span><br />
      return the text stored by the MARKMIN object rendered by the 
      render function</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.flatten">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="elements"></a><span class="summary-sig-name">elements</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      to be considered experimental since the behavior of this method is
      questionable another options could be 
      TAG(self.text).elements(*args,**kargs)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.elements">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>,
        <span class="sig-arg">extra</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">allowed</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">sep</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  calls the gluon.contrib.markmin render function to convert the wiki 
  syntax
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.XmlComponent-class.html#xml">XmlComponent.xml</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MARKMIN.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.MENU-class.html version [98e5b2ac14].



































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.MENU</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;MENU
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.MENU-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MENU</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MENU">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">MENU</strong>
</pre>

<hr />
<pre class="literalblock">

Used to build menus

Optional arguments
  _class: defaults to 'web2py-menu web2py-menu-vertical'
  ul_class: defaults to 'web2py-menu-vertical'
  li_class: defaults to 'web2py-menu-expand'

Example:
    menu = MENU([['name', False, URL(...), [submenu]], ...])
    {{=menu}}

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.MENU-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">**args</span>)</span><br />
      :param *components: any components that should be nested in this 
      element :param **attributes: any attributes you want to give to this 
      element</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MENU.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serialize"></a><span class="summary-sig-name">serialize</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">level</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MENU.serialize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.MENU-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#MENU.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'ul'"><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">**args</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MENU.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>:param *components: any components that should be nested in this 
  element :param **attributes: any attributes you want to give to this 
  element</p>
  :raises SyntaxError: when a stand alone tag receives components
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#__init__">DIV.__init__</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#MENU.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.META-class.html version [4277516f23].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.META</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;META
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.META-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class META</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#META">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">META</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'meta/'"><code class="variable-quote">'</code><code class="variable-string">meta/</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.OBJECT-class.html version [37bc31528c].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.OBJECT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;OBJECT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.OBJECT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OBJECT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#OBJECT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">OBJECT</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'object'"><code class="variable-quote">'</code><code class="variable-string">object</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.OL-class.html version [dfd352c2d7].



























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.OL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;OL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.OL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OL</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#OL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+            
           |            
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+        
               |        
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+    
                   |    
                  <a href="web2py.gluon.html.UL-class.html">UL</a> --+
                       |
                      <strong class="uidshort">OL</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.UL-class.html">UL</a></code></b> (private):
      <code><a href="web2py.gluon.html.UL-class.html#_fixup">_fixup</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'ol'"><code class="variable-quote">'</code><code class="variable-string">ol</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.OPTGROUP-class.html version [d16b317279].



















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.OPTGROUP</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;OPTGROUP
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.OPTGROUP-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OPTGROUP</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#OPTGROUP">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">OPTGROUP</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.OPTGROUP-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#OPTGROUP._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'optgroup'"><code class="variable-quote">'</code><code class="variable-string">optgroup</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#OPTGROUP._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.OPTION-class.html version [ec220c7b19].



















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.OPTION</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;OPTION
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.OPTION-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OPTION</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#OPTION">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">OPTION</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.OPTION-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#OPTION._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'option'"><code class="variable-quote">'</code><code class="variable-string">option</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#OPTION._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.P-class.html version [edaf60a08f].





















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.P</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;P
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.P-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class P</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#P">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">P</strong>
</pre>

<hr />
<p>Will replace ``\n`` by ``&lt;br /&gt;`` if the `cr2br` attribute is 
  provided.</p>
  see also :class:`DIV`<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.P-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#P.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'p'"><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#P.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.PRE-class.html version [7bc1129656].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.PRE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;PRE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.PRE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class PRE</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#PRE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">PRE</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'pre'"><code class="variable-quote">'</code><code class="variable-string">pre</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.SCRIPT-class.html version [b07e17418a].

















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.SCRIPT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;SCRIPT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.SCRIPT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SCRIPT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#SCRIPT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">SCRIPT</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.SCRIPT-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#SCRIPT.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'script'"><code class="variable-quote">'</code><code class="variable-string">script</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#SCRIPT.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.SELECT-class.html version [240e05e400].









































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.SELECT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;SELECT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.SELECT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SELECT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#SELECT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+            
           |            
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+        
               |        
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+    
                   |    
               <a href="web2py.gluon.html.INPUT-class.html">INPUT</a> --+
                       |
                      <strong class="uidshort">SELECT</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   &gt;&gt;&gt; from validators import IS_IN_SET
   &gt;&gt;&gt; SELECT('yes', 'no', _name='selector', value='yes',
   ...    requires=IS_IN_SET(['yes', 'no'])).xml()
   '&lt;select name=&quot;selector&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;yes&quot;&gt;yes&lt;/option&gt;&lt;option value=&quot;no&quot;&gt;no&lt;/option&gt;&lt;/select&gt;'
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.SELECT-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#SELECT._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.SELECT-class.html#_postprocessing" class="summary-sig-name">_postprocessing</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of attributes (normally the ones not prefixed with 
      '_').</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#SELECT._postprocessing">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.INPUT-class.html">INPUT</a></code></b>:
      <code><a href="web2py.gluon.html.INPUT-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.INPUT-class.html">INPUT</a></code></b> (private):
      <code><a href="web2py.gluon.html.INPUT-class.html#_validate">_validate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'select'"><code class="variable-quote">'</code><code class="variable-string">select</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#SELECT._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_postprocessing"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_postprocessing</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#SELECT._postprocessing">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of attributes (normally the ones not prefixed with '_').</p>
  Nothing to postprocess yet. May be overridden by subclasses
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.INPUT-class.html#_postprocessing">INPUT._postprocessing</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.SPAN-class.html version [a566cd3553].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.SPAN</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;SPAN
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.SPAN-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SPAN</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#SPAN">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">SPAN</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'span'"><code class="variable-quote">'</code><code class="variable-string">span</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.STYLE-class.html version [97c785cce6].

















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.STYLE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;STYLE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.STYLE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class STYLE</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#STYLE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">STYLE</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.STYLE-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#STYLE.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'style'"><code class="variable-quote">'</code><code class="variable-string">style</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#STYLE.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TABLE-class.html version [a37ed87427].





























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TABLE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TABLE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TABLE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TABLE</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TABLE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TABLE</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.sqlhtml.SQLTABLE-class.html">sqlhtml.SQLTABLE</a>
</dd></dl>

<hr />
<p>TABLE Component.</p>
  <p>If subcomponents are not TR/TBODY/THEAD/TFOOT-components they will be 
  wrapped in a TR</p>
  see also :class:`DIV`<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.TABLE-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TABLE._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'table'"><code class="variable-quote">'</code><code class="variable-string">table</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TABLE._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TBODY-class.html version [2d87050f29].



















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TBODY</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TBODY
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TBODY-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TBODY</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TBODY">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TBODY</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.TBODY-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TBODY._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'tbody'"><code class="variable-quote">'</code><code class="variable-string">tbody</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TBODY._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TD-class.html version [d0b7dd5842].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TD</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TD
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TD-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TD</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TD">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TD</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'td'"><code class="variable-quote">'</code><code class="variable-string">td</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TEXTAREA-class.html version [78dabbe178].






























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TEXTAREA</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TEXTAREA
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TEXTAREA-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TEXTAREA</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TEXTAREA">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+            
           |            
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+        
               |        
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+    
                   |    
               <a href="web2py.gluon.html.INPUT-class.html">INPUT</a> --+
                       |
                      <strong class="uidshort">TEXTAREA</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   TEXTAREA(_name='sometext', value='blah '*100, requires=IS_NOT_EMPTY())
</pre>
  'blah blah blah ...' will be the content of the textarea field.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.TEXTAREA-class.html#_postprocessing" class="summary-sig-name">_postprocessing</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of attributes (normally the ones not prefixed with 
      '_').</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TEXTAREA._postprocessing">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.INPUT-class.html">INPUT</a></code></b>:
      <code><a href="web2py.gluon.html.INPUT-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.INPUT-class.html">INPUT</a></code></b> (private):
      <code><a href="web2py.gluon.html.INPUT-class.html#_validate">_validate</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'textarea'"><code class="variable-quote">'</code><code class="variable-string">textarea</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_postprocessing"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_postprocessing</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TEXTAREA._postprocessing">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of attributes (normally the ones not prefixed with '_').</p>
  Nothing to postprocess yet. May be overridden by subclasses
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.INPUT-class.html#_postprocessing">INPUT._postprocessing</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TFOOT-class.html version [bdb5980fdc].



















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TFOOT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TFOOT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TFOOT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TFOOT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TFOOT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TFOOT</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.TFOOT-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TFOOT._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'tfoot'"><code class="variable-quote">'</code><code class="variable-string">tfoot</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TFOOT._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TH-class.html version [867786066c].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TH</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TH
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TH-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TH</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TH">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TH</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'th'"><code class="variable-quote">'</code><code class="variable-string">th</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.THEAD-class.html version [711ceac1ad].



















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.THEAD</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;THEAD
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.THEAD-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class THEAD</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#THEAD">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">THEAD</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.THEAD-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#THEAD._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'thead'"><code class="variable-quote">'</code><code class="variable-string">thead</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#THEAD._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TITLE-class.html version [4713aa96ff].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TITLE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TITLE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TITLE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TITLE</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TITLE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TITLE</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'title'"><code class="variable-quote">'</code><code class="variable-string">title</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TR-class.html version [3f28a2fb41].
























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TR</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TR
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TR-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TR</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TR">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TR</strong>
</pre>

<hr />
<p>TR Component.</p>
  <p>If subcomponents are not TD/TH-components they will be wrapped in a 
  TD</p>
  see also :class:`DIV`<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.TR-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#TR._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'tr'"><code class="variable-quote">'</code><code class="variable-string">tr</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TR._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.TT-class.html version [1da78823d0].























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.TT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;TT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.TT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TT</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#TT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">TT</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'tt'"><code class="variable-quote">'</code><code class="variable-string">tt</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.UL-class.html version [302744e135].





























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.UL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;UL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.UL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class UL</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#UL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">UL</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.html.OL-class.html">OL</a>
</dd></dl>

<hr />
<p>UL Component.</p>
  <p>If subcomponents are not LI-components they will be wrapped in a 
  LI</p>
  see also :class:`DIV`<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.UL-class.html#_fixup" class="summary-sig-name">_fixup</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Handling of provided components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#UL._fixup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'ul'"><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_fixup"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_fixup</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#UL._fixup">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Handling of provided components.</p>
  Nothing to fixup yet. May be overridden by subclasses, eg for wrapping
  some components in another component or blocking them.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#_fixup">DIV._fixup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.XHTML-class.html version [18a5234b59].














































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.XHTML</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;XHTML
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.XHTML-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class XHTML</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XHTML">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+        
           |        
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+    
               |    
             <a href="web2py.gluon.html.DIV-class.html">DIV</a> --+
                   |
                  <strong class="uidshort">XHTML</strong>
</pre>

<hr />
<p>This is XHTML version of the HTML helper.</p>
  <p>There are three predefined document type definitions. They can be 
  specified in the 'doctype' parameter:</p>
  <p>-'strict' enables strict doctype -'transitional' enables transitional 
  doctype (default) -'frameset' enables frameset doctype -any other string 
  will be treated as user's own doctype</p>
  <p>'lang' parameter specifies the language of the document and the xml 
  document. Defaults to 'en'.</p>
  <p>'xmlns' parameter specifies the xml namespace. Defaults to 
  'http://www.w3.org/1999/xhtml'.</p>
  See also :class:`DIV`<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.XHTML-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XHTML.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tag"></a><span class="summary-name">tag</span> = <code title="'html'"><code class="variable-quote">'</code><code class="variable-string">html</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XHTML-class.html#strict" class="summary-name">strict</a> = <code title="'''&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://ww\
w.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict/</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XHTML-class.html#transitional" class="summary-name">transitional</a> = <code title="'''&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;htt\
p://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 T</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.html.XHTML-class.html#frameset" class="summary-name">frameset</a> = <code title="'''&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot; &quot;http://\
www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&quot;&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frame</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="xmlns"></a><span class="summary-name">xmlns</span> = <code title="'http://www.w3.org/1999/xhtml'"><code class="variable-quote">'</code><code class="variable-string">http://www.w3.org/1999/xhtml</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XHTML.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#xml">DIV.xml</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="strict"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">strict</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://ww</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">w.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="transitional"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">transitional</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;htt</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">p://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="frameset"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">frameset</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot; &quot;http://</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&quot;&gt;</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.XML-class.html version [6a4887778e].
























































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.XML</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;XML
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.XML-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class XML</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+    
           |    
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+
               |
              <strong class="uidshort">XML</strong>
</pre>

<hr />
<p>use it to wrap a string that contains XML/HTML so that it will not be 
  escaped by the template</p>
  example:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>XML(<span class="py-string">'&lt;h1&gt;Hello&lt;/h1&gt;'</span>).xml()
<span class="py-output">'&lt;h1&gt;Hello&lt;/h1&gt;'</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.XML-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">sanitize</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">permitted_tags</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">br/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">i</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">li</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ol</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">c</code><code class="variable-ellipsis">...</code></span>,
        <span class="summary-sig-arg">allowed_attributes</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">href</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">title</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">type</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">img</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">src</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>)</span><br />
      :param text: the XML text
:param sanitize: sanitize text using the permitted tags and allowed
    attributes (default False)
:param permitted_tags: list of permitted tags (default: simple list of
    tags)
:param allowed_attributes: dictionary of allowed attributed (default
    for A, IMG and BlockQuote).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.XML-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.XML-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__add__"></a><span class="summary-sig-name">__add__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__add__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__radd__"></a><span class="summary-sig-name">__radd__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__radd__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__cmp__"></a><span class="summary-sig-name">__cmp__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__cmp__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.XML-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__hash__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getslice__"></a><span class="summary-sig-name">__getslice__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>,
        <span class="summary-sig-arg">j</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__getslice__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="flatten"></a><span class="summary-sig-name">flatten</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">render</span>=<span class="summary-sig-default">1</span>)</span><br />
      return the text stored by the XML object rendered by the render 
      function</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.flatten">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="elements"></a><span class="summary-sig-name">elements</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kargs</span>)</span><br />
      to be considered experimental since the behavior of this method is
      questionable another options could be 
      TAG(self.text).elements(*args,**kargs)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.elements">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>,
        <span class="sig-arg">sanitize</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">permitted_tags</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">br/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">i</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">li</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ol</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">c</code><code class="variable-ellipsis">...</code></span>,
        <span class="sig-arg">allowed_attributes</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">href</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">title</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">type</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">img</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">src</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param text: the XML text
:param sanitize: sanitize text using the permitted tags and allowed
    attributes (default False)
:param permitted_tags: list of permitted tags (default: simple list of
    tags)
:param allowed_attributes: dictionary of allowed attributed (default
    for A, IMG and BlockQuote).
    The key is the tag; the value is a list of allowed attributes.

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.XmlComponent-class.html#xml">XmlComponent.xml</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XML.__hash__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  hash(x)
  <dl class="fields">
    <dt>Overrides:
      object.__hash__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.XmlComponent-class.html version [a967ed3e51].

















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.XmlComponent</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;XmlComponent
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.XmlComponent-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class XmlComponent</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#XmlComponent">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">XmlComponent</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.html.DIV-class.html">DIV</a>,
    <a href="web2py.gluon.html.MARKMIN-class.html">MARKMIN</a>,
    <a href="web2py.gluon.html.XML-class.html">XML</a>,
    <a href="web2py.gluon.html.__TAG__-class.html">__TAG__</a>
</dd></dl>

<hr />
Abstract root for all Html components<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xml"></a><span class="summary-sig-name">xml</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#XmlComponent.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.__TAG__-class.html version [4becefb1f6].





















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.__TAG__</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;__TAG__
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.__TAG__-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class __TAG__</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#__TAG__">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
  object --+    
           |    
<a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a> --+
               |
              <strong class="uidshort">__TAG__</strong>
</pre>

<hr />
TAG factory example:
<pre class="literalblock">
   &gt;&gt;&gt; print TAG.first(TAG.second('test'), _key = 3)
   &lt;first key=&quot;3&quot;&gt;&lt;second&gt;test&lt;/second&gt;&lt;/first&gt;
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#__TAG__.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#__TAG__.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">html</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#__TAG__.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.XmlComponent-class.html">XmlComponent</a></code></b>:
      <code><a href="web2py.gluon.html.XmlComponent-class.html#xml">xml</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.html.web2pyHTMLParser-class.html version [e2ecc8b067].










































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.html.web2pyHTMLParser</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.html-module.html">Module&nbsp;html</a> ::
        Class&nbsp;web2pyHTMLParser
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.html.web2pyHTMLParser-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class web2pyHTMLParser</h1><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
markupbase.ParserBase --+    
                        |    
    HTMLParser.HTMLParser --+
                            |
                           <strong class="uidshort">web2pyHTMLParser</strong>
</pre>

<hr />
obj = web2pyHTMLParser(text) parses and html/xml text into web2py 
  helpers. obj.tree contains the root of the tree, and tree can be 
  manipulated
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>str(web2pyHTMLParser(<span class="py-string">'hello&lt;div a=&quot;b&quot; c=3&gt;wor&amp;lt;ld&lt;span&gt;xxx&lt;/span&gt;y&lt;script/&gt;yy&lt;/div&gt;zzz'</span>).tree)
<span class="py-output">'hello&lt;div a=&quot;b&quot; c=&quot;3&quot;&gt;wor&amp;lt;ld&lt;span&gt;xxx&lt;/span&gt;y&lt;script&gt;&lt;/script&gt;yy&lt;/div&gt;zzz'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>str(web2pyHTMLParser(<span class="py-string">'&lt;div&gt;a&lt;span&gt;b&lt;/div&gt;c'</span>).tree)
<span class="py-output">'&lt;div&gt;a&lt;span&gt;b&lt;/span&gt;&lt;/div&gt;c'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>tree = web2pyHTMLParser(<span class="py-string">'hello&lt;div a=&quot;b&quot;&gt;world&lt;/div&gt;'</span>).tree
<span class="py-prompt">&gt;&gt;&gt; </span>tree.element(_a=<span class="py-string">'b'</span>)[<span class="py-string">'_c'</span>]=5
<span class="py-prompt">&gt;&gt;&gt; </span>str(tree)
<span class="py-output">'hello&lt;div a=&quot;b&quot; c=&quot;5&quot;&gt;world&lt;/div&gt;'</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">closed</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">input</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">link</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span><br />
      Initialize and reset this instance.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_starttag" class="summary-sig-name">handle_starttag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tagname</span>,
        <span class="summary-sig-arg">attrs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_starttag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_data" class="summary-sig-name">handle_data</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_data">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_charref" class="summary-sig-name">handle_charref</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_charref">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_entityref" class="summary-sig-name">handle_entityref</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_entityref">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.html.web2pyHTMLParser-class.html#handle_endtag" class="summary-sig-name">handle_endtag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tagname</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_endtag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>HTMLParser.HTMLParser</code></b>:
      <code>check_for_whole_start_tag</code>,
      <code>clear_cdata_mode</code>,
      <code>close</code>,
      <code>error</code>,
      <code>feed</code>,
      <code>get_starttag_text</code>,
      <code>goahead</code>,
      <code>handle_comment</code>,
      <code>handle_decl</code>,
      <code>handle_pi</code>,
      <code>handle_startendtag</code>,
      <code>parse_endtag</code>,
      <code>parse_pi</code>,
      <code>parse_starttag</code>,
      <code>reset</code>,
      <code>set_cdata_mode</code>,
      <code>unescape</code>,
      <code>unknown_decl</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>markupbase.ParserBase</code></b>:
      <code>getpos</code>,
      <code>parse_comment</code>,
      <code>parse_declaration</code>,
      <code>parse_marked_section</code>,
      <code>updatepos</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>markupbase.ParserBase</code></b> (private):
      <code>_parse_doctype_attlist</code>,
      <code>_parse_doctype_element</code>,
      <code>_parse_doctype_entity</code>,
      <code>_parse_doctype_notation</code>,
      <code>_parse_doctype_subset</code>,
      <code>_scan_name</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>HTMLParser.HTMLParser</code></b>:
      <code>CDATA_CONTENT_ELEMENTS</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>markupbase.ParserBase</code></b> (private):
      <code>_decl_otherchars</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>,
        <span class="sig-arg">closed</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">input</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">link</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Initialize and reset this instance.
  <dl class="fields">
    <dt>Overrides:
      HTMLParser.HTMLParser.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_starttag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_starttag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tagname</span>,
        <span class="sig-arg">attrs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_starttag">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      HTMLParser.HTMLParser.handle_starttag
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_data"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_data</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_data">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      HTMLParser.HTMLParser.handle_data
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_charref"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_charref</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_charref">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      HTMLParser.HTMLParser.handle_charref
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_entityref"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_entityref</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_entityref">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      HTMLParser.HTMLParser.handle_entityref
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_endtag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_endtag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tagname</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.html-pysrc.html#web2pyHTMLParser.handle_endtag">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      HTMLParser.HTMLParser.handle_endtag
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.http-module.html version [6ce42b522a].










































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.http</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;http
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.http-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module http</h1><span class="codelink"><a href="web2py.gluon.http-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="exceptions.Exception-class.html" class="summary-name">BaseException</a><br />
      Common base class for all non-exit exceptions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.http.HTTP-class.html" class="summary-name">HTTP</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="redirect"></a><span class="summary-sig-name">redirect</span>(<span class="summary-sig-arg">location</span>,
        <span class="summary-sig-arg">how</span>=<span class="summary-sig-default">303</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.http-pysrc.html#redirect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.http-module.html#defined_status" class="summary-name">defined_status</a> = <code title="{200: 'OK',
 201: 'CREATED',
 202: 'ACCEPTED',
 203: 'NON-AUTHORITATIVE INFORMATION',
 204: 'NO CONTENT',
 205: 'RESET CONTENT',
 206: 'PARTIAL CONTENT',
 301: 'MOVED PERMANENTLY',
..."><code class="variable-group">{</code>200<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">OK</code><code class="variable-quote">'</code><code class="variable-op">, </code>201<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CREATED</code><code class="variable-quote">'</code><code class="variable-op">, </code>202<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ACCEPTED</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="defined_status"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">defined_status</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code>200<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">OK</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 201<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">CREATED</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 202<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ACCEPTED</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 203<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NON-AUTHORITATIVE INFORMATION</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 204<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">NO CONTENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 205<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">RESET CONTENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 206<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">PARTIAL CONTENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 301<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">MOVED PERMANENTLY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.http-pysrc.html version [7b89febbf3].






























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.http</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;http
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.http-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.http-module.html">Module web2py.gluon.http</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'HTTP'</tt><tt class="py-op">,</tt> <tt class="py-string">'redirect'</tt><tt class="py-op">]</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.http.defined_status=web2py.gluon.http-module.html#defined_status"><a title="web2py.gluon.http.defined_status" class="py-name" href="#" onclick="return doclink('link-0', 'defined_status', 'link-0');">defined_status</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">    <tt class="py-number">200</tt><tt class="py-op">:</tt> <tt class="py-string">'OK'</tt><tt class="py-op">,</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line">    <tt class="py-number">201</tt><tt class="py-op">:</tt> <tt class="py-string">'CREATED'</tt><tt class="py-op">,</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">    <tt class="py-number">202</tt><tt class="py-op">:</tt> <tt class="py-string">'ACCEPTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">    <tt class="py-number">203</tt><tt class="py-op">:</tt> <tt class="py-string">'NON-AUTHORITATIVE INFORMATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">    <tt class="py-number">204</tt><tt class="py-op">:</tt> <tt class="py-string">'NO CONTENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">    <tt class="py-number">205</tt><tt class="py-op">:</tt> <tt class="py-string">'RESET CONTENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">    <tt class="py-number">206</tt><tt class="py-op">:</tt> <tt class="py-string">'PARTIAL CONTENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">    <tt class="py-number">301</tt><tt class="py-op">:</tt> <tt class="py-string">'MOVED PERMANENTLY'</tt><tt class="py-op">,</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">    <tt class="py-number">302</tt><tt class="py-op">:</tt> <tt class="py-string">'FOUND'</tt><tt class="py-op">,</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">    <tt class="py-number">303</tt><tt class="py-op">:</tt> <tt class="py-string">'SEE OTHER'</tt><tt class="py-op">,</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-number">304</tt><tt class="py-op">:</tt> <tt class="py-string">'NOT MODIFIED'</tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">    <tt class="py-number">305</tt><tt class="py-op">:</tt> <tt class="py-string">'USE PROXY'</tt><tt class="py-op">,</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">    <tt class="py-number">307</tt><tt class="py-op">:</tt> <tt class="py-string">'TEMPORARY REDIRECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">    <tt class="py-number">400</tt><tt class="py-op">:</tt> <tt class="py-string">'BAD REQUEST'</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-number">401</tt><tt class="py-op">:</tt> <tt class="py-string">'UNAUTHORIZED'</tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt class="py-number">403</tt><tt class="py-op">:</tt> <tt class="py-string">'FORBIDDEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-number">404</tt><tt class="py-op">:</tt> <tt class="py-string">'NOT FOUND'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-number">405</tt><tt class="py-op">:</tt> <tt class="py-string">'METHOD NOT ALLOWED'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">    <tt class="py-number">406</tt><tt class="py-op">:</tt> <tt class="py-string">'NOT ACCEPTABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt class="py-number">407</tt><tt class="py-op">:</tt> <tt class="py-string">'PROXY AUTHENTICATION REQUIRED'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-number">408</tt><tt class="py-op">:</tt> <tt class="py-string">'REQUEST TIMEOUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-number">409</tt><tt class="py-op">:</tt> <tt class="py-string">'CONFLICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-number">410</tt><tt class="py-op">:</tt> <tt class="py-string">'GONE'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-number">411</tt><tt class="py-op">:</tt> <tt class="py-string">'LENGTH REQUIRED'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-number">412</tt><tt class="py-op">:</tt> <tt class="py-string">'PRECONDITION FAILED'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-number">413</tt><tt class="py-op">:</tt> <tt class="py-string">'REQUEST ENTITY TOO LARGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-number">414</tt><tt class="py-op">:</tt> <tt class="py-string">'REQUEST-URI TOO LONG'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">    <tt class="py-number">415</tt><tt class="py-op">:</tt> <tt class="py-string">'UNSUPPORTED MEDIA TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-number">416</tt><tt class="py-op">:</tt> <tt class="py-string">'REQUESTED RANGE NOT SATISFIABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-number">417</tt><tt class="py-op">:</tt> <tt class="py-string">'EXPECTATION FAILED'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-number">500</tt><tt class="py-op">:</tt> <tt class="py-string">'INTERNAL SERVER ERROR'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-number">501</tt><tt class="py-op">:</tt> <tt class="py-string">'NOT IMPLEMENTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-number">502</tt><tt class="py-op">:</tt> <tt class="py-string">'BAD GATEWAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-number">503</tt><tt class="py-op">:</tt> <tt class="py-string">'SERVICE UNAVAILABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-number">504</tt><tt class="py-op">:</tt> <tt class="py-string">'GATEWAY TIMEOUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt class="py-number">505</tt><tt class="py-op">:</tt> <tt class="py-string">'HTTP VERSION NOT SUPPORTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt class="py-op">}</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-comment"># If web2py is executed with python2.4 we need</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># to use Exception instead of BaseException</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-name">BaseException</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-name">BaseException</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-1', 'Exception', 'link-1');">Exception</a></tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"> </tt>
<a name="HTTP"></a><div id="HTTP-def"><a name="L60"></a><tt class="py-lineno"> 60</tt> <a class="py-toggle" href="#" id="HTTP-toggle" onclick="return toggle('HTTP');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.http.HTTP-class.html">HTTP</a><tt class="py-op">(</tt><tt class="py-base-class">BaseException</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTP-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="HTTP-expanded"><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"> </tt>
<a name="HTTP.__init__"></a><div id="HTTP.__init__-def"><a name="L62"></a><tt class="py-lineno"> 62</tt> <a class="py-toggle" href="#" id="HTTP.__init__-toggle" onclick="return toggle('HTTP.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.http.HTTP-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-param">status</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt class="py-param">body</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-op">**</tt><tt class="py-param">headers</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTP.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTP.__init__-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">status</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-name">body</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-name">headers</tt> </tt>
</div><a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"> </tt>
<a name="HTTP.to"></a><div id="HTTP.to-def"><a name="L72"></a><tt class="py-lineno"> 72</tt> <a class="py-toggle" href="#" id="HTTP.to-toggle" onclick="return toggle('HTTP.to');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.http.HTTP-class.html#to">to</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">responder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTP.to-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTP.to-expanded"><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-keyword">in</tt> <tt id="link-2" class="py-name"><a title="web2py.gluon.http.defined_status" class="py-name" href="#" onclick="return doclink('link-2', 'defined_status', 'link-0');">defined_status</a></tt><tt class="py-op">:</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">            <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-string">'%d %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name"><a title="web2py.gluon.http.defined_status" class="py-name" href="#" onclick="return doclink('link-3', 'defined_status', 'link-0');">defined_status</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">            <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">' '</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'Content-Type'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/html; charset=UTF-8'</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'4'</tt><tt class="py-op">:</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">body</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                <tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-name">status</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-4" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-4', 'len', 'link-4');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">body</tt><tt class="py-op">)</tt><tt class="py-op">&lt;</tt><tt class="py-number">512</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-5', 'startswith', 'link-5');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'text/html'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">                    <tt class="py-name">body</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&lt;!-- %s //--&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">*</tt><tt class="py-number">512</tt><tt class="py-op">)</tt> <tt class="py-comment">### trick IE</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-6', 'len', 'link-4');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">body</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-7" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-7', 'k', 'link-7');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-8', 'items', 'link-8');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">v</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">                    <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-9', 'append', 'link-9');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-10', 'k', 'link-7');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">                <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-11', 'append', 'link-9');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-12" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-12', 'k', 'link-7');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">responder</tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-string">'__iter__'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">body</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">body</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
</div><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="HTTP.message"></a><div id="HTTP.message-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="HTTP.message-toggle" onclick="return toggle('HTTP.message');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.http.HTTP-class.html#message">message</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTP.message-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTP.message-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">        compose a message describing this exception</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring">        "status defined_status [web2py_error]"</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring">        message elements that are not defined are omitted</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt id="link-13" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-13', 'msg', 'link-13');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%(status)d'</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-keyword">in</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon.http.defined_status" class="py-name" href="#" onclick="return doclink('link-14', 'defined_status', 'link-0');">defined_status</a></tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt id="link-15" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-15', 'msg', 'link-13');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%(status)d %(defined_status)s'</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'web2py_error'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">            <tt id="link-16" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-16', 'msg', 'link-13');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' [%(web2py_error)s]'</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-17" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-17', 'msg', 'link-13');">msg</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                          <tt id="link-18" class="py-name"><a title="web2py.gluon.http.defined_status" class="py-name" href="#" onclick="return doclink('link-18', 'defined_status', 'link-0');">defined_status</a></tt><tt class="py-op">=</tt><tt id="link-19" class="py-name"><a title="web2py.gluon.http.defined_status" class="py-name" href="#" onclick="return doclink('link-19', 'defined_status', 'link-0');">defined_status</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-20', 'get', 'link-20');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                          <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-21', 'get', 'link-20');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py_error'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="HTTP.__str__"></a><div id="HTTP.__str__-def"><a name="L117"></a><tt class="py-lineno">117</tt> <a class="py-toggle" href="#" id="HTTP.__str__-toggle" onclick="return toggle('HTTP.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.http.HTTP-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTP.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTP.__str__-expanded"><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-docstring">"stringify me"</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-22', 'message', 'link-22');">message</a></tt> </tt>
</div></div><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"> </tt>
<a name="redirect"></a><div id="redirect-def"><a name="L122"></a><tt class="py-lineno">122</tt> <a class="py-toggle" href="#" id="redirect-toggle" onclick="return toggle('redirect');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.http-module.html#redirect">redirect</a><tt class="py-op">(</tt><tt class="py-param">location</tt><tt class="py-op">,</tt> <tt class="py-param">how</tt><tt class="py-op">=</tt><tt class="py-number">303</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="redirect-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="redirect-expanded"><a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">    <tt class="py-name">location</tt> <tt class="py-op">=</tt> <tt class="py-name">location</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">'%0D'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'%0A'</tt><tt class="py-op">)</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt class="py-keyword">raise</tt> <tt id="link-23" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-23', 'HTTP', 'link-23');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-name">how</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">               <tt class="py-string">'You are being redirected &lt;a href="%s"&gt;here&lt;/a&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">location</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">               <tt class="py-name">Location</tt><tt class="py-op">=</tt><tt class="py-name">location</tt><tt class="py-op">)</tt> </tt>
</div><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.http.HTTP-class.html version [b058fe165d].






















































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.http.HTTP</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.http-module.html">Module&nbsp;http</a> ::
        Class&nbsp;HTTP
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.http.HTTP-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HTTP</h1><span class="codelink"><a href="web2py.gluon.http-pysrc.html#HTTP">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+    
                       |    
exceptions.BaseException --+
                           |
                          <strong class="uidshort">HTTP</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.http.HTTP-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">status</span>,
        <span class="summary-sig-arg">body</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">**headers</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.http-pysrc.html#HTTP.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="to"></a><span class="summary-sig-name">to</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">responder</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.http-pysrc.html#HTTP.to">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.http.HTTP-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      stringify me</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.http-pysrc.html#HTTP.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.http.HTTP-class.html#message" class="summary-name">message</a><br />
      compose a message describing this exception
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">status</span>,
        <span class="sig-arg">body</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">**headers</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.http-pysrc.html#HTTP.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      exceptions.BaseException.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.http-pysrc.html#HTTP.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  stringify me
  <dl class="fields">
    <dt>Overrides:
      exceptions.BaseException.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Property Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-PropertyDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="message"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">message</h3>
  <p>compose a message describing this exception</p>
  <p>&quot;status defined_status [web2py_error]&quot;</p>
  message elements that are not defined are omitted
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><i>unreachable</i>.message(<span class="summary-sig-arg">self</span>)</span>
        - compose a message describing this exception
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
    <dt>Delete Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.import_all-module.html version [ab566a9b0d].














































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.import_all</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;import_all
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.import_all-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module import_all</h1><span class="codelink"><a href="web2py.gluon.import_all-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  <p>This file is not strictly required by web2py. It is used for three 
  purposes:</p>
  1) check that all required modules are installed properly 2) provide 
  py2exe and py2app a list of modules to be packaged in the binary 3) 
  (optional) preload modules in memory to speed up http responses<br /><br />

<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.import_all-module.html#contributed_modules" class="summary-name">contributed_modules</a> = <code title="['gluon.myregex',
 'gluon.contenttype',
 'gluon.http',
 'gluon.sanitizer',
 'gluon.cache',
 'gluon.serializers',
 'gluon.decoder',
 'gluon.main',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">gluon.myregex</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">gluon.contenttype</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="python_version"></a><span class="summary-name">python_version</span> = <code title="'2.5'"><code class="variable-quote">'</code><code class="variable-string">2.5</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="alert_dependency"></a><span class="summary-name">alert_dependency</span> = <code title="['hashlib', 'uuid']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">hashlib</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">uuid</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.import_all-module.html#py26_deprecated" class="summary-name">py26_deprecated</a> = <code title="['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">mhlib</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">multifile</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">mimify</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">sets</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">Mi</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="py27_deprecated"></a><span class="summary-name">py27_deprecated</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.import_all-module.html#base_modules" class="summary-name">base_modules</a> = <code title="['aifc',
 'anydbm',
 'array',
 'asynchat',
 'asyncore',
 'atexit',
 'audioop',
 'base64',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">aifc</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">anydbm</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">array</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">asynchat</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">asynco</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="candidate"></a><span class="summary-name">candidate</span> = <code title="'gluon.contrib.pyrtf.Renderer'"><code class="variable-quote">'</code><code class="variable-string">gluon.contrib.pyrtf.Renderer</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="dirs"></a><span class="summary-name">dirs</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.import_all-module.html#files" class="summary-name">files</a> = <code title="['test_router.pyc',
 'test_template.py',
 'test_cache.pyc',
 'test_html.pyc',
 'test_template.pyc',
 'test_is_url.py',
 'test_cache.py',
 'test_utils.pyc',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">test_router.pyc</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">test_template.py</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">test_cache.py</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="module"></a><span class="summary-name">module</span> = <code title="'gluon.contrib.pyrtf.Renderer'"><code class="variable-quote">'</code><code class="variable-string">gluon.contrib.pyrtf.Renderer</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="name"></a><span class="summary-name">name</span> = <code title="'test_utils.py'"><code class="variable-quote">'</code><code class="variable-string">test_utils.py</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="root"></a><span class="summary-name">root</span> = <code title="'gluon/tests'"><code class="variable-quote">'</code><code class="variable-string">gluon/tests</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="contributed_modules"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">contributed_modules</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">gluon.myregex</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.contenttype</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.http</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.sanitizer</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.cache</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.serializers</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.decoder</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">gluon.main</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="py26_deprecated"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">py26_deprecated</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">mhlib</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">multifile</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">mimify</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">sets</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MimeWriter</code><code class="variable-quote">'</code><code class="variable-group">]</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="base_modules"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">base_modules</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">aifc</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">anydbm</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">array</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">asynchat</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">asyncore</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">atexit</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">audioop</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">base64</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="files"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">files</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">test_router.pyc</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_template.py</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_cache.pyc</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_html.pyc</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_template.pyc</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_is_url.py</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_cache.py</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">test_utils.pyc</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.import_all-pysrc.html version [7b0dd0251d].










































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.import_all</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;import_all
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.import_all-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.import_all-module.html">Module web2py.gluon.import_all</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">This file is not strictly required by web2py. It is used for three purposes:</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">1) check that all required modules are installed properly</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">2) provide py2exe and py2app a list of modules to be packaged in the binary</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">3) (optional) preload modules in memory to speed up http responses</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.import_all.base_modules=web2py.gluon.import_all-module.html#base_modules"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-0', 'base_modules', 'link-0');">base_modules</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'aifc'</tt><tt class="py-op">,</tt> <tt class="py-string">'anydbm'</tt><tt class="py-op">,</tt> <tt class="py-string">'array'</tt><tt class="py-op">,</tt> <tt class="py-string">'asynchat'</tt><tt class="py-op">,</tt> <tt class="py-string">'asyncore'</tt><tt class="py-op">,</tt> <tt class="py-string">'atexit'</tt><tt class="py-op">,</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">                <tt class="py-string">'audioop'</tt><tt class="py-op">,</tt> <tt class="py-string">'base64'</tt><tt class="py-op">,</tt> <tt class="py-string">'BaseHTTPServer'</tt><tt class="py-op">,</tt> <tt class="py-string">'Bastion'</tt><tt class="py-op">,</tt> <tt class="py-string">'binascii'</tt><tt class="py-op">,</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">                <tt class="py-string">'binhex'</tt><tt class="py-op">,</tt> <tt class="py-string">'bisect'</tt><tt class="py-op">,</tt> <tt class="py-string">'bz2'</tt><tt class="py-op">,</tt> <tt class="py-string">'calendar'</tt><tt class="py-op">,</tt> <tt class="py-string">'cgi'</tt><tt class="py-op">,</tt> <tt class="py-string">'CGIHTTPServer'</tt><tt class="py-op">,</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">                <tt class="py-string">'cgitb'</tt><tt class="py-op">,</tt> <tt class="py-string">'chunk'</tt><tt class="py-op">,</tt> <tt class="py-string">'cmath'</tt><tt class="py-op">,</tt> <tt class="py-string">'cmd'</tt><tt class="py-op">,</tt> <tt class="py-string">'code'</tt><tt class="py-op">,</tt> <tt class="py-string">'codecs'</tt><tt class="py-op">,</tt> <tt class="py-string">'codeop'</tt><tt class="py-op">,</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">                <tt class="py-string">'collections'</tt><tt class="py-op">,</tt> <tt class="py-string">'colorsys'</tt><tt class="py-op">,</tt> <tt class="py-string">'compileall'</tt><tt class="py-op">,</tt> <tt class="py-string">'compiler'</tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">                <tt class="py-string">'compiler.ast'</tt><tt class="py-op">,</tt> <tt class="py-string">'compiler.visitor'</tt><tt class="py-op">,</tt> <tt class="py-string">'ConfigParser'</tt><tt class="py-op">,</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">                <tt class="py-string">'contextlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'Cookie'</tt><tt class="py-op">,</tt> <tt class="py-string">'cookielib'</tt><tt class="py-op">,</tt> <tt class="py-string">'copy'</tt><tt class="py-op">,</tt> <tt class="py-string">'copy_reg'</tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">                <tt class="py-string">'cPickle'</tt><tt class="py-op">,</tt> <tt class="py-string">'cProfile'</tt><tt class="py-op">,</tt> <tt class="py-string">'cStringIO'</tt><tt class="py-op">,</tt> <tt class="py-string">'csv'</tt><tt class="py-op">,</tt> <tt class="py-string">'ctypes'</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">                <tt class="py-string">'datetime'</tt><tt class="py-op">,</tt> <tt class="py-string">'decimal'</tt><tt class="py-op">,</tt> <tt class="py-string">'difflib'</tt><tt class="py-op">,</tt> <tt class="py-string">'dircache'</tt><tt class="py-op">,</tt> <tt class="py-string">'dis'</tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">                <tt class="py-string">'doctest'</tt><tt class="py-op">,</tt> <tt class="py-string">'DocXMLRPCServer'</tt><tt class="py-op">,</tt> <tt class="py-string">'dumbdbm'</tt><tt class="py-op">,</tt> <tt class="py-string">'dummy_thread'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">                <tt class="py-string">'dummy_threading'</tt><tt class="py-op">,</tt> <tt class="py-string">'email'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.charset'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.encoders'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">                <tt class="py-string">'email.errors'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.generator'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.header'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">                <tt class="py-string">'email.iterators'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.message'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.mime'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">                <tt class="py-string">'email.mime.audio'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.mime.base'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.mime.image'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">                <tt class="py-string">'email.mime.message'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.mime.multipart'</tt><tt class="py-op">,</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">                <tt class="py-string">'email.mime.nonmultipart'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.mime.text'</tt><tt class="py-op">,</tt> <tt class="py-string">'email.parser'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">                <tt class="py-string">'email.utils'</tt><tt class="py-op">,</tt> <tt class="py-string">'encodings.idna'</tt><tt class="py-op">,</tt> <tt class="py-string">'errno'</tt><tt class="py-op">,</tt> <tt class="py-string">'exceptions'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">                <tt class="py-string">'filecmp'</tt><tt class="py-op">,</tt> <tt class="py-string">'fileinput'</tt><tt class="py-op">,</tt> <tt class="py-string">'fnmatch'</tt><tt class="py-op">,</tt> <tt class="py-string">'formatter'</tt><tt class="py-op">,</tt> <tt class="py-string">'fpformat'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">                <tt class="py-string">'ftplib'</tt><tt class="py-op">,</tt> <tt class="py-string">'functools'</tt><tt class="py-op">,</tt> <tt class="py-string">'gc'</tt><tt class="py-op">,</tt> <tt class="py-string">'getopt'</tt><tt class="py-op">,</tt> <tt class="py-string">'getpass'</tt><tt class="py-op">,</tt> <tt class="py-string">'gettext'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">                <tt class="py-string">'glob'</tt><tt class="py-op">,</tt> <tt class="py-string">'gzip'</tt><tt class="py-op">,</tt> <tt class="py-string">'hashlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'heapq'</tt><tt class="py-op">,</tt> <tt class="py-string">'hmac'</tt><tt class="py-op">,</tt> <tt class="py-string">'hotshot'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">                <tt class="py-string">'hotshot.stats'</tt><tt class="py-op">,</tt> <tt class="py-string">'htmlentitydefs'</tt><tt class="py-op">,</tt> <tt class="py-string">'htmllib'</tt><tt class="py-op">,</tt> <tt class="py-string">'HTMLParser'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">                <tt class="py-string">'httplib'</tt><tt class="py-op">,</tt> <tt class="py-string">'imaplib'</tt><tt class="py-op">,</tt> <tt class="py-string">'imghdr'</tt><tt class="py-op">,</tt> <tt class="py-string">'imp'</tt><tt class="py-op">,</tt> <tt class="py-string">'inspect'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">                <tt class="py-string">'itertools'</tt><tt class="py-op">,</tt> <tt class="py-string">'keyword'</tt><tt class="py-op">,</tt> <tt class="py-string">'linecache'</tt><tt class="py-op">,</tt> <tt class="py-string">'locale'</tt><tt class="py-op">,</tt> <tt class="py-string">'logging'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">                <tt class="py-string">'macpath'</tt><tt class="py-op">,</tt> <tt class="py-string">'mailbox'</tt><tt class="py-op">,</tt> <tt class="py-string">'mailcap'</tt><tt class="py-op">,</tt> <tt class="py-string">'marshal'</tt><tt class="py-op">,</tt> <tt class="py-string">'math'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">                <tt class="py-string">'mimetools'</tt><tt class="py-op">,</tt> <tt class="py-string">'mimetypes'</tt><tt class="py-op">,</tt> <tt class="py-string">'mmap'</tt><tt class="py-op">,</tt> <tt class="py-string">'modulefinder'</tt><tt class="py-op">,</tt> <tt class="py-string">'mutex'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">                <tt class="py-string">'netrc'</tt><tt class="py-op">,</tt> <tt class="py-string">'new'</tt><tt class="py-op">,</tt> <tt class="py-string">'nntplib'</tt><tt class="py-op">,</tt> <tt class="py-string">'operator'</tt><tt class="py-op">,</tt> <tt class="py-string">'optparse'</tt><tt class="py-op">,</tt> <tt class="py-string">'os'</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">                <tt class="py-string">'parser'</tt><tt class="py-op">,</tt> <tt class="py-string">'pdb'</tt><tt class="py-op">,</tt> <tt class="py-string">'pickle'</tt><tt class="py-op">,</tt> <tt class="py-string">'pickletools'</tt><tt class="py-op">,</tt> <tt class="py-string">'pkgutil'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">                <tt class="py-string">'platform'</tt><tt class="py-op">,</tt> <tt class="py-string">'poplib'</tt><tt class="py-op">,</tt> <tt class="py-string">'pprint'</tt><tt class="py-op">,</tt> <tt class="py-string">'py_compile'</tt><tt class="py-op">,</tt> <tt class="py-string">'pyclbr'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">                <tt class="py-string">'pydoc'</tt><tt class="py-op">,</tt> <tt class="py-string">'Queue'</tt><tt class="py-op">,</tt> <tt class="py-string">'quopri'</tt><tt class="py-op">,</tt> <tt class="py-string">'random'</tt><tt class="py-op">,</tt> <tt class="py-string">'re'</tt><tt class="py-op">,</tt> <tt class="py-string">'repr'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">                <tt class="py-string">'rexec'</tt><tt class="py-op">,</tt> <tt class="py-string">'rfc822'</tt><tt class="py-op">,</tt> <tt class="py-string">'rlcompleter'</tt><tt class="py-op">,</tt> <tt class="py-string">'robotparser'</tt><tt class="py-op">,</tt> <tt class="py-string">'runpy'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">                <tt class="py-string">'sched'</tt><tt class="py-op">,</tt> <tt class="py-string">'select'</tt><tt class="py-op">,</tt> <tt class="py-string">'sgmllib'</tt><tt class="py-op">,</tt> <tt class="py-string">'shelve'</tt><tt class="py-op">,</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">                <tt class="py-string">'shlex'</tt><tt class="py-op">,</tt> <tt class="py-string">'shutil'</tt><tt class="py-op">,</tt> <tt class="py-string">'signal'</tt><tt class="py-op">,</tt> <tt class="py-string">'SimpleHTTPServer'</tt><tt class="py-op">,</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">                <tt class="py-string">'SimpleXMLRPCServer'</tt><tt class="py-op">,</tt> <tt class="py-string">'site'</tt><tt class="py-op">,</tt> <tt class="py-string">'smtpd'</tt><tt class="py-op">,</tt> <tt class="py-string">'smtplib'</tt><tt class="py-op">,</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">                <tt class="py-string">'sndhdr'</tt><tt class="py-op">,</tt> <tt class="py-string">'socket'</tt><tt class="py-op">,</tt> <tt class="py-string">'SocketServer'</tt><tt class="py-op">,</tt> <tt class="py-string">'sqlite3'</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">                <tt class="py-string">'stat'</tt><tt class="py-op">,</tt> <tt class="py-string">'statvfs'</tt><tt class="py-op">,</tt> <tt class="py-string">'string'</tt><tt class="py-op">,</tt> <tt class="py-string">'StringIO'</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                <tt class="py-string">'stringprep'</tt><tt class="py-op">,</tt> <tt class="py-string">'struct'</tt><tt class="py-op">,</tt> <tt class="py-string">'subprocess'</tt><tt class="py-op">,</tt> <tt class="py-string">'sunau'</tt><tt class="py-op">,</tt> <tt class="py-string">'symbol'</tt><tt class="py-op">,</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">                <tt class="py-string">'tabnanny'</tt><tt class="py-op">,</tt> <tt class="py-string">'tarfile'</tt><tt class="py-op">,</tt> <tt class="py-string">'telnetlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'tempfile'</tt><tt class="py-op">,</tt> <tt class="py-string">'textwrap'</tt><tt class="py-op">,</tt> <tt class="py-string">'thread'</tt><tt class="py-op">,</tt> <tt class="py-string">'threading'</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                <tt class="py-string">'time'</tt><tt class="py-op">,</tt> <tt class="py-string">'timeit'</tt><tt class="py-op">,</tt> <tt class="py-string">'Tix'</tt><tt class="py-op">,</tt> <tt class="py-string">'Tkinter'</tt><tt class="py-op">,</tt> <tt class="py-string">'token'</tt><tt class="py-op">,</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">                <tt class="py-string">'tokenize'</tt><tt class="py-op">,</tt> <tt class="py-string">'trace'</tt><tt class="py-op">,</tt> <tt class="py-string">'traceback'</tt><tt class="py-op">,</tt> <tt class="py-string">'types'</tt><tt class="py-op">,</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">                <tt class="py-string">'unicodedata'</tt><tt class="py-op">,</tt> <tt class="py-string">'unittest'</tt><tt class="py-op">,</tt> <tt class="py-string">'urllib'</tt><tt class="py-op">,</tt> <tt class="py-string">'urllib2'</tt><tt class="py-op">,</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">                <tt class="py-string">'urlparse'</tt><tt class="py-op">,</tt> <tt class="py-string">'user'</tt><tt class="py-op">,</tt> <tt class="py-string">'UserDict'</tt><tt class="py-op">,</tt> <tt class="py-string">'UserList'</tt><tt class="py-op">,</tt> <tt class="py-string">'UserString'</tt><tt class="py-op">,</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">                <tt class="py-string">'uu'</tt><tt class="py-op">,</tt> <tt class="py-string">'uuid'</tt><tt class="py-op">,</tt> <tt class="py-string">'warnings'</tt><tt class="py-op">,</tt> <tt class="py-string">'wave'</tt><tt class="py-op">,</tt> <tt class="py-string">'weakref'</tt><tt class="py-op">,</tt> <tt class="py-string">'webbrowser'</tt><tt class="py-op">,</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">                <tt class="py-string">'whichdb'</tt><tt class="py-op">,</tt> <tt class="py-string">'wsgiref'</tt><tt class="py-op">,</tt> <tt class="py-string">'wsgiref.handlers'</tt><tt class="py-op">,</tt> <tt class="py-string">'wsgiref.headers'</tt><tt class="py-op">,</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">                <tt class="py-string">'wsgiref.simple_server'</tt><tt class="py-op">,</tt> <tt class="py-string">'wsgiref.util'</tt><tt class="py-op">,</tt> <tt class="py-string">'wsgiref.validate'</tt><tt class="py-op">,</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">                <tt class="py-string">'xdrlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.dom'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.dom.minidom'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.dom.pulldom'</tt><tt class="py-op">,</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">                <tt class="py-string">'xml.etree.ElementTree'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.parsers.expat'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.sax'</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">                <tt class="py-string">'xml.sax.handler'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.sax.saxutils'</tt><tt class="py-op">,</tt> <tt class="py-string">'xml.sax.xmlreader'</tt><tt class="py-op">,</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">                <tt class="py-string">'xmlrpclib'</tt><tt class="py-op">,</tt> <tt class="py-string">'zipfile'</tt><tt class="py-op">,</tt> <tt class="py-string">'zipimport'</tt><tt class="py-op">,</tt> <tt class="py-string">'zlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'mhlib'</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">                <tt class="py-string">'MimeWriter'</tt><tt class="py-op">,</tt> <tt class="py-string">'mimify'</tt><tt class="py-op">,</tt> <tt class="py-string">'multifile'</tt><tt class="py-op">,</tt> <tt class="py-string">'sets'</tt><tt class="py-op">]</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable web2py.gluon.import_all.contributed_modules=web2py.gluon.import_all-module.html#contributed_modules"><a title="web2py.gluon.import_all.contributed_modules" class="py-name" href="#" onclick="return doclink('link-1', 'contributed_modules', 'link-1');">contributed_modules</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-keyword">for</tt> <tt id="link-2" class="py-name" targets="Variable web2py.gluon.import_all.root=web2py.gluon.import_all-module.html#root"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-2', 'root', 'link-2');">root</a></tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Variable web2py.gluon.import_all.dirs=web2py.gluon.import_all-module.html#dirs"><a title="web2py.gluon.import_all.dirs" class="py-name" href="#" onclick="return doclink('link-3', 'dirs', 'link-3');">dirs</a></tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Variable web2py.gluon.import_all.files=web2py.gluon.import_all-module.html#files"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-4', 'files', 'link-4');">files</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">walk</tt><tt class="py-op">(</tt><tt class="py-string">'gluon'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt id="link-5" class="py-name" targets="Variable web2py.gluon.import_all.candidate=web2py.gluon.import_all-module.html#candidate"><a title="web2py.gluon.import_all.candidate" class="py-name" href="#" onclick="return doclink('link-5', 'candidate', 'link-5');">candidate</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'.'</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-6', 'join', 'link-6');">join</a></tt><tt class="py-op">(</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">      <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-7', 'join', 'link-6');">join</a></tt><tt class="py-op">(</tt><tt id="link-8" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-8', 'root', 'link-2');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">splitext</tt><tt class="py-op">(</tt><tt id="link-9" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-9', 'name', 'link-9');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">      <tt class="py-keyword">for</tt> <tt id="link-10" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-10', 'name', 'link-9');">name</a></tt> <tt class="py-keyword">in</tt> <tt id="link-11" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-11', 'files', 'link-4');">files</a></tt> <tt class="py-keyword">if</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-12', 'name', 'link-9');">name</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-13', 'endswith', 'link-13');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-keyword">and</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-14', 'root', 'link-2');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-op">[</tt><tt class="py-string">'gluon'</tt><tt class="py-op">,</tt> <tt class="py-string">'tests'</tt><tt class="py-op">]</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">      <tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt id="link-15" class="py-name"><a title="web2py.gluon.import_all.contributed_modules" class="py-name" href="#" onclick="return doclink('link-15', 'contributed_modules', 'link-1');">contributed_modules</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-16', 'append', 'link-16');">append</a></tt><tt class="py-op">(</tt><tt id="link-17" class="py-name"><a title="web2py.gluon.import_all.candidate" class="py-name" href="#" onclick="return doclink('link-17', 'candidate', 'link-5');">candidate</a></tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-comment"># Python base version</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-18" class="py-name" targets="Variable web2py.gluon.import_all.python_version=web2py.gluon.import_all-module.html#python_version"><a title="web2py.gluon.import_all.python_version" class="py-name" href="#" onclick="return doclink('link-18', 'python_version', 'link-18');">python_version</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-19', 'version', 'link-19');">version</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-comment"># Modules which we want to raise an Exception if they are missing</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-20" class="py-name" targets="Variable web2py.gluon.import_all.alert_dependency=web2py.gluon.import_all-module.html#alert_dependency"><a title="web2py.gluon.import_all.alert_dependency" class="py-name" href="#" onclick="return doclink('link-20', 'alert_dependency', 'link-20');">alert_dependency</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'hashlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'uuid'</tt><tt class="py-op">]</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-comment"># Now we remove the blacklisted modules if we are using the stated</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># python version.</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># List of modules deprecated in Python 2.6 or 2.7 that are in the above set</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-21" class="py-name" targets="Variable web2py.gluon.import_all.py26_deprecated=web2py.gluon.import_all-module.html#py26_deprecated"><a title="web2py.gluon.import_all.py26_deprecated" class="py-name" href="#" onclick="return doclink('link-21', 'py26_deprecated', 'link-21');">py26_deprecated</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'mhlib'</tt><tt class="py-op">,</tt> <tt class="py-string">'multifile'</tt><tt class="py-op">,</tt> <tt class="py-string">'mimify'</tt><tt class="py-op">,</tt> <tt class="py-string">'sets'</tt><tt class="py-op">,</tt> <tt class="py-string">'MimeWriter'</tt><tt class="py-op">]</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt id="link-22" class="py-name" targets="Variable web2py.gluon.import_all.py27_deprecated=web2py.gluon.import_all-module.html#py27_deprecated"><a title="web2py.gluon.import_all.py27_deprecated" class="py-name" href="#" onclick="return doclink('link-22', 'py27_deprecated', 'link-22');">py27_deprecated</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># ['optparse'] but we need it for now</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.import_all.python_version" class="py-name" href="#" onclick="return doclink('link-23', 'python_version', 'link-18');">python_version</a></tt> <tt class="py-op">&gt;=</tt> <tt class="py-string">'2.6'</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">    <tt id="link-24" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-24', 'base_modules', 'link-0');">base_modules</a></tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-string">'json'</tt><tt class="py-op">,</tt> <tt class="py-string">'multiprocessing'</tt><tt class="py-op">]</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt id="link-25" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-25', 'base_modules', 'link-0');">base_modules</a></tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-26', 'base_modules', 'link-0');">base_modules</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">difference</tt><tt class="py-op">(</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.import_all.py26_deprecated" class="py-name" href="#" onclick="return doclink('link-27', 'py26_deprecated', 'link-21');">py26_deprecated</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.import_all.python_version" class="py-name" href="#" onclick="return doclink('link-28', 'python_version', 'link-18');">python_version</a></tt> <tt class="py-op">&gt;=</tt> <tt class="py-string">'2.7'</tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt id="link-29" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-29', 'base_modules', 'link-0');">base_modules</a></tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-string">'argparse'</tt><tt class="py-op">]</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt id="link-30" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-30', 'base_modules', 'link-0');">base_modules</a></tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-31', 'base_modules', 'link-0');">base_modules</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">difference</tt><tt class="py-op">(</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.import_all.py27_deprecated" class="py-name" href="#" onclick="return doclink('link-32', 'py27_deprecated', 'link-22');">py27_deprecated</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-comment"># Now iterate in the base_modules, trying to do the import</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">for</tt> <tt id="link-33" class="py-name" targets="Variable web2py.gluon.import_all.module=web2py.gluon.import_all-module.html#module"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-33', 'module', 'link-33');">module</a></tt> <tt class="py-keyword">in</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.import_all.base_modules" class="py-name" href="#" onclick="return doclink('link-34', 'base_modules', 'link-0');">base_modules</a></tt> <tt class="py-op">+</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.import_all.contributed_modules" class="py-name" href="#" onclick="return doclink('link-35', 'contributed_modules', 'link-1');">contributed_modules</a></tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">         <tt class="py-name">__import__</tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-36', 'module', 'link-33');">module</a></tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-37', 'globals', 'link-37');">globals</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-comment"># Raise an exception if the current module is a dependency</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.import_all.module" class="py-name" href="#" onclick="return doclink('link-38', 'module', 'link-33');">module</a></tt> <tt class="py-keyword">in</tt> <tt id="link-39" class="py-name"><a title="web2py.gluon.import_all.alert_dependency" class="py-name" href="#" onclick="return doclink('link-39', 'alert_dependency', 'link-20');">alert_dependency</a></tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">            <tt id="link-40" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-40', 'msg', 'link-40');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Missing dependency: %(module)s\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">            <tt id="link-41" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-41', 'msg', 'link-40');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">"Try the following command: "</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt id="link-42" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-42', 'msg', 'link-40');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">"easy_install-%(python_version)s -U %(module)s"</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ImportError</tt><tt class="py-op">,</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-43', 'msg', 'link-40');">msg</a></tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:07 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.languages-module.html version [b32d97ebcd].














































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.languages</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;languages
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.languages-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module languages</h1><span class="codelink"><a href="web2py.gluon.languages-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.languages.lazyT-class.html" class="summary-name">lazyT</a><br />
      never to be called explicitly, returned by 
        translator.__call__
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.languages.translator-class.html" class="summary-name">translator</a><br />
      this class is instantiated by gluon.compileapp.build_environment
        as the T object
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read_dict_aux"></a><span class="summary-sig-name">read_dict_aux</span>(<span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#read_dict_aux">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read_dict"></a><span class="summary-sig-name">read_dict</span>(<span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#read_dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages-module.html#utf8_repr" class="summary-sig-name">utf8_repr</a>(<span class="summary-sig-arg">s</span>)</span><br />
      # note that we use raw strings to avoid having to use double back 
      slashes below</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#utf8_repr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write_dict"></a><span class="summary-sig-name">write_dict</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">contents</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#write_dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="findT"></a><span class="summary-sig-name">findT</span>(<span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">language</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">en-us</code><code class="variable-quote">'</code></span>)</span><br />
      must be run by the admin app</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#findT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="lazyT_unpickle"></a><span class="summary-sig-name">lazyT_unpickle</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT_unpickle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="lazyT_pickle"></a><span class="summary-sig-name">lazyT_pickle</span>(<span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT_pickle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update_all_languages"></a><span class="summary-sig-name">update_all_languages</span>(<span class="summary-sig-arg">application_path</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#update_all_languages">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="is_gae"></a><span class="summary-name">is_gae</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE" class="summary-name">PY_STRING_LITERAL_RE</a> = <code title="'(?&lt;=[^\\w]T\\()(?P&lt;name&gt;[uU]?[rR]?(?:\'\'\'(?:[^\']|\'{1,2}(?!\'))*\'\
\'\')|(?:\'(?:[^\'\\\\]|\\\\.)*\')|(?:&quot;&quot;&quot;(?:[^&quot;]|&quot;{1,2}(?!&quot;))*&quot;&quot;&quot;)|(?:\
&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;))'"><code class="variable-quote">'</code><code class="variable-string">(?&lt;=[^\\w]T\\()(?P&lt;name&gt;[uU]?[rR]?(?:\</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.languages-module.html#regex_translate" class="summary-name">regex_translate</a> = <code title="re.compile(r'(?s)(?&lt;=[^\w]T\()(?P&lt;name&gt;[uU]?[rR]?(?:\'\'\'(?:[^\']|\'{\
1,2}(?!\'))*\'\'\')|(?:\'(?:[^\'\\]|\\.)*\')|(?:&quot;&quot;&quot;(?:[^&quot;]|&quot;{1,2}(?!&quot;)\
)*&quot;&quot;&quot;)|(?:&quot;(?:[^&quot;\\]|\\.)*&quot;))')">re.compile(r'<code class="re-flags">(?s)</code><code class="re-group">(?&lt;=</code><code class="re-group">[</code><code class="re-op">^</code>\w<code class="re-group">]</code>T\(<code class="re-group">)</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">[</code>uU<code class="re-group">]</code><code class="re-op">?</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.languages-module.html#regex_language" class="summary-name">regex_language</a> = <code title="re.compile(r'^[a-zA-Z]{2}(-[a-zA-Z]{2})?(-[a-zA-Z]+)?$')">re.compile(r'^<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="utf8_repr"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">utf8_repr</span>(<span class="sig-arg">s</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#utf8_repr">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p># note that we use raw strings to avoid having to use double back 
  slashes below</p>
  <p>utf8_repr() works same as repr() when processing ascii string 
  &gt;&gt;&gt; utf8_repr('abc') == utf8_repr(&quot;abc&quot;) == 
  repr('abc') == repr(&quot;abc&quot;) == &quot;'abc'&quot; True 
  &gt;&gt;&gt; utf8_repr('a&quot;b&quot;c') == repr('a&quot;b&quot;c') == 
  '\'a&quot;b&quot;c\'' True &gt;&gt;&gt; utf8_repr(&quot;a'b'c&quot;) == 
  repr(&quot;a'b'c&quot;) == '&quot;a\'b\'c&quot;' True &gt;&gt;&gt; 
  utf8_repr('a\'b&quot;c') == repr('a\'b&quot;c') == 
  utf8_repr(&quot;a'b\&quot;c&quot;) == repr(&quot;a'b\&quot;c&quot;) == 
  '\'a\\\'b&quot;c\'' True &gt;&gt;&gt; utf8_repr('a\r\nb') == 
  repr('a\r\nb') == &quot;'a\\r\\nb'&quot; # Test for \r, \n True</p>
  Unlike repr(), utf8_repr() remains utf8 content when processing utf8 
  string &gt;&gt;&gt; utf8_repr('&#20013;&#25991;&#23383;') == utf8_repr(&quot;&#20013;&#25991;&#23383;&quot;) == 
  &quot;'&#20013;&#25991;&#23383;'&quot; != repr('&#20013;&#25991;&#23383;') True &gt;&gt;&gt; 
  utf8_repr('&#20013;&quot;&#25991;&quot;&#23383;') == &quot;'&#20013;\&quot;&#25991;\&quot;&#23383;'&quot; != 
  repr('&#20013;&quot;&#25991;&quot;&#23383;') True &gt;&gt;&gt; utf8_repr(&quot;&#20013;'&#25991;'&#23383;&quot;) ==
  '&quot;&#20013;\'&#25991;\'&#23383;&quot;' != repr(&quot;&#20013;'&#25991;'&#23383;&quot;) True &gt;&gt;&gt; 
  utf8_repr('&#20013;\'&#25991;&quot;&#23383;') == utf8_repr(&quot;&#20013;'&#25991;\&quot;&#23383;&quot;) == 
  '\'&#20013;\\\'&#25991;&quot;&#23383;\'' != repr('&#20013;\'&#25991;&quot;&#23383;') == 
  repr(&quot;&#20013;'&#25991;\&quot;&#23383;&quot;) True &gt;&gt;&gt; utf8_repr('&#20013;\r\n&#25991;') == 
  &quot;'&#20013;\\r\\n&#25991;'&quot; != repr('&#20013;\r\n&#25991;') # Test for \r, \n True
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="PY_STRING_LITERAL_RE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">PY_STRING_LITERAL_RE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">(?&lt;=[^\\w]T\\()(?P&lt;name&gt;[uU]?[rR]?(?:\'\'\'(?:[^\']|\'{1,2}(?!\'))*\'</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">\'\')|(?:\'(?:[^\'\\\\]|\\\\.)*\')|(?:&quot;&quot;&quot;(?:[^&quot;]|&quot;{1,2}(?!&quot;))*&quot;&quot;&quot;)|(?:</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;))</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_translate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_translate</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?s)</code><code class="re-group">(?&lt;=</code><code class="re-group">[</code><code class="re-op">^</code>\w<code class="re-group">]</code>T\(<code class="re-group">)</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">[</code>uU<code class="re-group">]</code><code class="re-op">?</code><code class="re-group">[</code>rR<code class="re-group">]</code><code class="re-op">?</code><code class="re-group">(?:</code>\'\'\'<code class="re-group">(?:</code><code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">|</code>\'<code class="re-op">{</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-op">1,2}</code><code class="re-group">(?!</code>\'<code class="re-group">)</code><code class="re-group">)</code><code class="re-op">*</code>\'\'\'<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>\'<code class="re-group">(?:</code><code class="re-group">[</code><code class="re-op">^</code>\'\\<code class="re-group">]</code><code class="re-op">|</code>\\.<code class="re-group">)</code><code class="re-op">*</code>\'<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>&quot;&quot;&quot;<code class="re-group">(?:</code><code class="re-group">[^</code>&quot;<code class="re-group">]</code><code class="re-op">|</code>&quot;<code class="re-op">{1,2}</code><code class="re-group">(?!</code>&quot;<code class="re-group">)</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-op">*</code>&quot;&quot;&quot;<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>&quot;<code class="re-group">(?:</code><code class="re-group">[</code><code class="re-op">^</code>&quot;\\<code class="re-group">]</code><code class="re-op">|</code>\\.<code class="re-group">)</code><code class="re-op">*</code>&quot;<code class="re-group">)</code><code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_language"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_language</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'^<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-op">?</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.languages-pysrc.html version [f0d761253d].




































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.languages</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;languages
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.languages-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.languages-module.html">Module web2py.gluon.languages</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cgi</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.portalocker=web2py.gluon.portalocker-module.html"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-0', 'portalocker', 'link-0');">portalocker</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">marshal</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">copy_reg</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-1', 'fileutils', 'link-1');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-2', 'listdir', 'link-2');">listdir</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-3', 'settings', 'link-3');">settings</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.cfs=web2py.gluon.cfs-module.html,Variable web2py.gluon.cfs.cfs=web2py.gluon.cfs-module.html#cfs"><a title="web2py.gluon.cfs
web2py.gluon.cfs.cfs" class="py-name" href="#" onclick="return doclink('link-4', 'cfs', 'link-4');">cfs</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Function web2py.gluon.cfs.getcfs()=web2py.gluon.cfs-module.html#getcfs"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-5', 'getcfs', 'link-5');">getcfs</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'translator'</tt><tt class="py-op">,</tt> <tt class="py-string">'findT'</tt><tt class="py-op">,</tt> <tt class="py-string">'update_all_languages'</tt><tt class="py-op">]</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable web2py.gluon.compileapp.is_gae=web2py.gluon.compileapp-module.html#is_gae,Variable web2py.gluon.languages.is_gae=web2py.gluon.languages-module.html#is_gae"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-6', 'is_gae', 'link-6');">is_gae</a></tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-7', 'settings', 'link-3');">settings</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-8', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-comment"># pattern to find T(blah blah blah) expressions</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable web2py.gluon.languages.PY_STRING_LITERAL_RE=web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE"><a title="web2py.gluon.languages.PY_STRING_LITERAL_RE" class="py-name" href="#" onclick="return doclink('link-9', 'PY_STRING_LITERAL_RE', 'link-9');">PY_STRING_LITERAL_RE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?&lt;=[^\w]T\()(?P&lt;name&gt;'</tt>\ </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">     <tt class="py-op">+</tt> <tt class="py-string">r"[uU]?[rR]?(?:'''(?:[^']|'{1,2}(?!'))*''')|"</tt>\ </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">     <tt class="py-op">+</tt> <tt class="py-string">r"(?:'(?:[^'\\]|\\.)*')|"</tt> <tt class="py-op">+</tt> <tt class="py-string">r'(?:"""(?:[^"]|"{1,2}(?!"))*""")|'</tt>\ </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">     <tt class="py-op">+</tt> <tt class="py-string">r'(?:"(?:[^"\\]|\\.)*"))'</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable web2py.gluon.languages.regex_translate=web2py.gluon.languages-module.html#regex_translate"><a title="web2py.gluon.languages.regex_translate" class="py-name" href="#" onclick="return doclink('link-10', 'regex_translate', 'link-10');">regex_translate</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt id="link-11" class="py-name"><a title="web2py.gluon.languages.PY_STRING_LITERAL_RE" class="py-name" href="#" onclick="return doclink('link-11', 'PY_STRING_LITERAL_RE', 'link-9');">PY_STRING_LITERAL_RE</a></tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-comment"># patter for a valid accept_language</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt id="link-12" class="py-name" targets="Variable web2py.gluon.languages.regex_language=web2py.gluon.languages-module.html#regex_language"><a title="web2py.gluon.languages.regex_language" class="py-name" href="#" onclick="return doclink('link-12', 'regex_language', 'link-12');">regex_language</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^[a-zA-Z]{2}(\-[a-zA-Z]{2})?(\-[a-zA-Z]+)?$'</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="read_dict_aux"></a><div id="read_dict_aux-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="read_dict_aux-toggle" onclick="return toggle('read_dict_aux');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#read_dict_aux">read_dict_aux</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="read_dict_aux-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="read_dict_aux-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt id="link-13" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-13', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Function web2py.gluon.portalocker.lock()=web2py.gluon.portalocker-module.html#lock"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-14', 'lock', 'link-14');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">,</tt> <tt id="link-15" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-15', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_SH=web2py.gluon.portalocker-module.html#LOCK_SH"><a title="web2py.gluon.portalocker.LOCK_SH" class="py-name" href="#" onclick="return doclink('link-16', 'LOCK_SH', 'link-16');">LOCK_SH</a></tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-name">lang_text</tt> <tt class="py-op">=</tt> <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-17', 'read', 'link-17');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt id="link-18" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-18', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Function web2py.gluon.portalocker.unlock()=web2py.gluon.portalocker-module.html#unlock"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-19', 'unlock', 'link-19');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-20', 'close', 'link-20');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">lang_text</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-21', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">eval</tt><tt class="py-op">(</tt><tt class="py-name">lang_text</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-22', 'error', 'link-22');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Syntax error in %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
</div><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"> </tt>
<a name="read_dict"></a><div id="read_dict-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="read_dict-toggle" onclick="return toggle('read_dict');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#read_dict">read_dict</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="read_dict-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="read_dict-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.cfs.getcfs" class="py-name" href="#" onclick="return doclink('link-23', 'getcfs', 'link-5');">getcfs</a></tt><tt class="py-op">(</tt><tt class="py-string">'language:%s'</tt><tt class="py-op">%</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                  <tt class="py-keyword">lambda</tt> <tt class="py-name">filename</tt><tt class="py-op">=</tt><tt class="py-name">filename</tt><tt class="py-op">:</tt><tt id="link-24" class="py-name" targets="Function web2py.gluon.languages.read_dict_aux()=web2py.gluon.languages-module.html#read_dict_aux"><a title="web2py.gluon.languages.read_dict_aux" class="py-name" href="#" onclick="return doclink('link-24', 'read_dict_aux', 'link-24');">read_dict_aux</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"> </tt>
<a name="utf8_repr"></a><div id="utf8_repr-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="utf8_repr-toggle" onclick="return toggle('utf8_repr');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#utf8_repr">utf8_repr</a><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="utf8_repr-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="utf8_repr-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt class="py-docstring">r''' # note that we use raw strings to avoid having to use double back slashes below</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">    utf8_repr() works same as repr() when processing ascii string</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('abc') == utf8_repr("abc") == repr('abc') == repr("abc") == "'abc'"</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('a"b"c') == repr('a"b"c') == '\'a"b"c\''</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr("a'b'c") == repr("a'b'c") == '"a\'b\'c"'</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('a\'b"c') == repr('a\'b"c') == utf8_repr("a'b\"c") == repr("a'b\"c") == '\'a\\\'b"c\''</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('a\r\nb') == repr('a\r\nb') == "'a\\r\\nb'" # Test for \r, \n</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">    Unlike repr(), utf8_repr() remains utf8 content when processing utf8 string</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('&#20013;&#25991;&#23383;') == utf8_repr("&#20013;&#25991;&#23383;") == "'&#20013;&#25991;&#23383;'" != repr('&#20013;&#25991;&#23383;')</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('&#20013;"&#25991;"&#23383;') == "'&#20013;\"&#25991;\"&#23383;'" != repr('&#20013;"&#25991;"&#23383;')</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr("&#20013;'&#25991;'&#23383;") == '"&#20013;\'&#25991;\'&#23383;"' != repr("&#20013;'&#25991;'&#23383;")</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('&#20013;\'&#25991;"&#23383;') == utf8_repr("&#20013;'&#25991;\"&#23383;") == '\'&#20013;\\\'&#25991;"&#23383;\'' != repr('&#20013;\'&#25991;"&#23383;') == repr("&#20013;'&#25991;\"&#23383;")</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; utf8_repr('&#20013;\r\n&#25991;') == "'&#20013;\\r\\n&#25991;'" != repr('&#20013;\r\n&#25991;') # Test for \r, \n</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-25', 's', 'link-25');">s</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-26', 'find', 'link-26');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">"'"</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-27', 's', 'link-25');">s</a></tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-28', 'find', 'link-26');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># only single quote exists</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt id="link-29" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-29', 's', 'link-25');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-30', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'"'</tt><tt class="py-op">,</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-31', 's', 'link-25');">s</a></tt><tt class="py-op">,</tt> <tt class="py-string">'"'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># s = ''.join(['"', s.replace('"','\\"'), '"'])</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt id="link-32" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-32', 's', 'link-25');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-33', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"'"</tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-34', 's', 'link-25');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"'"</tt><tt class="py-op">,</tt><tt class="py-string">"\\'"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"'"</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-35', 's', 'link-25');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"\n"</tt><tt class="py-op">,</tt><tt class="py-string">"\\n"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"\r"</tt><tt class="py-op">,</tt><tt class="py-string">"\\r"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"> </tt>
<a name="write_dict"></a><div id="write_dict-def"><a name="L92"></a><tt class="py-lineno"> 92</tt> <a class="py-toggle" href="#" id="write_dict-toggle" onclick="return toggle('write_dict');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#write_dict">write_dict</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">contents</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="write_dict-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="write_dict-expanded"><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'w'</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-36', 'error', 'link-22');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Unable to write to file %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt id="link-37" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-37', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-38', 'lock', 'link-14');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">,</tt> <tt id="link-39" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-39', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_EX=web2py.gluon.portalocker-module.html#LOCK_EX"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-40', 'LOCK_EX', 'link-40');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-41', 'write', 'link-41');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'# coding: utf8\n{\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">contents</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-42', 'write', 'link-41');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s: %s,\n'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-43" class="py-name" targets="Function web2py.gluon.languages.utf8_repr()=web2py.gluon.languages-module.html#utf8_repr"><a title="web2py.gluon.languages.utf8_repr" class="py-name" href="#" onclick="return doclink('link-43', 'utf8_repr', 'link-43');">utf8_repr</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name"><a title="web2py.gluon.languages.utf8_repr" class="py-name" href="#" onclick="return doclink('link-44', 'utf8_repr', 'link-43');">utf8_repr</a></tt><tt class="py-op">(</tt><tt class="py-name">contents</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-45', 'write', 'link-41');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'}\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt id="link-46" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-46', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-47', 'unlock', 'link-19');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">    <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-48', 'close', 'link-20');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"> </tt>
<a name="lazyT"></a><div id="lazyT-def"><a name="L107"></a><tt class="py-lineno">107</tt> <a class="py-toggle" href="#" id="lazyT-toggle" onclick="return toggle('lazyT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html">lazyT</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="lazyT-expanded"><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"><tt class="py-docstring">    never to be called explicitly, returned by translator.__call__</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt id="link-49" class="py-name" targets="Variable web2py.gluon.languages.lazyT.m=web2py.gluon.languages.lazyT-class.html#m"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-49', 'm', 'link-49');">m</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt id="link-50" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-50', 's', 'link-25');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt id="link-51" class="py-name" targets="Variable web2py.gluon.languages.lazyT.T=web2py.gluon.languages.lazyT-class.html#T"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-51', 'T', 'link-51');">T</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__init__"></a><div id="lazyT.__init__-def"><a name="L117"></a><tt class="py-lineno">117</tt> <a class="py-toggle" href="#" id="lazyT.__init__-toggle" onclick="return toggle('lazyT.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-param">message</tt><tt class="py-op">,</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-param">symbols</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt class="py-param">T</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__init__-expanded"><a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-52', 'm', 'link-49');">m</a></tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-53', 'message', 'link-53');">message</a></tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-54', 's', 'link-25');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">symbols</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-55', 'T', 'link-51');">T</a></tt> <tt class="py-op">=</tt> <tt id="link-56" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-56', 'T', 'link-51');">T</a></tt> </tt>
</div><a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__repr__"></a><div id="lazyT.__repr__-def"><a name="L127"></a><tt class="py-lineno">127</tt> <a class="py-toggle" href="#" id="lazyT.__repr__-toggle" onclick="return toggle('lazyT.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__repr__-expanded"><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;lazyT %s&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-57', 'm', 'link-49');">m</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt> </tt>
</div><a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__str__"></a><div id="lazyT.__str__-def"><a name="L130"></a><tt class="py-lineno">130</tt> <a class="py-toggle" href="#" id="lazyT.__str__-toggle" onclick="return toggle('lazyT.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__str__-expanded"><a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-58', 'T', 'link-51');">T</a></tt><tt class="py-op">.</tt><tt id="link-59" class="py-name" targets="Method web2py.gluon.languages.translator.translate()=web2py.gluon.languages.translator-class.html#translate,Function web2py.gluon.validators.translate()=web2py.gluon.validators-module.html#translate"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-59', 'translate', 'link-59');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-60', 'm', 'link-49');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-61', 's', 'link-25');">s</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__eq__"></a><div id="lazyT.__eq__-def"><a name="L133"></a><tt class="py-lineno">133</tt> <a class="py-toggle" href="#" id="lazyT.__eq__-toggle" onclick="return toggle('lazyT.__eq__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__eq__">__eq__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__eq__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__eq__-expanded"><a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-62', 'T', 'link-51');">T</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-63', 'translate', 'link-59');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-64', 'm', 'link-49');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-65', 's', 'link-25');">s</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">other</tt> </tt>
</div><a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__ne__"></a><div id="lazyT.__ne__-def"><a name="L136"></a><tt class="py-lineno">136</tt> <a class="py-toggle" href="#" id="lazyT.__ne__-toggle" onclick="return toggle('lazyT.__ne__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__ne__">__ne__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__ne__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__ne__-expanded"><a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-66', 'T', 'link-51');">T</a></tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-67', 'translate', 'link-59');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-68', 'm', 'link-49');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-69', 's', 'link-25');">s</a></tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">other</tt> </tt>
</div><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__add__"></a><div id="lazyT.__add__-def"><a name="L139"></a><tt class="py-lineno">139</tt> <a class="py-toggle" href="#" id="lazyT.__add__-toggle" onclick="return toggle('lazyT.__add__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__add__">__add__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__add__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__add__-expanded"><a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
</div><a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__radd__"></a><div id="lazyT.__radd__-def"><a name="L142"></a><tt class="py-lineno">142</tt> <a class="py-toggle" href="#" id="lazyT.__radd__-toggle" onclick="return toggle('lazyT.__radd__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__radd__">__radd__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__radd__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__radd__-expanded"><a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__cmp__"></a><div id="lazyT.__cmp__-def"><a name="L145"></a><tt class="py-lineno">145</tt> <a class="py-toggle" href="#" id="lazyT.__cmp__-toggle" onclick="return toggle('lazyT.__cmp__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__cmp__">__cmp__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__cmp__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__cmp__-expanded"><a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">cmp</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__hash__"></a><div id="lazyT.__hash__-def"><a name="L148"></a><tt class="py-lineno">148</tt> <a class="py-toggle" href="#" id="lazyT.__hash__-toggle" onclick="return toggle('lazyT.__hash__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__hash__">__hash__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__hash__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__hash__-expanded"><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hash</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__getattr__"></a><div id="lazyT.__getattr__-def"><a name="L151"></a><tt class="py-lineno">151</tt> <a class="py-toggle" href="#" id="lazyT.__getattr__-toggle" onclick="return toggle('lazyT.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__getattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__getattr__-expanded"><a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-70" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-70', 'name', 'link-70');">name</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__getitem__"></a><div id="lazyT.__getitem__-def"><a name="L154"></a><tt class="py-lineno">154</tt> <a class="py-toggle" href="#" id="lazyT.__getitem__-toggle" onclick="return toggle('lazyT.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__getitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__getitem__-expanded"><a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
</div><a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__getslice__"></a><div id="lazyT.__getslice__-def"><a name="L157"></a><tt class="py-lineno">157</tt> <a class="py-toggle" href="#" id="lazyT.__getslice__-toggle" onclick="return toggle('lazyT.__getslice__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__getslice__">__getslice__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">,</tt> <tt class="py-param">j</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__getslice__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__getslice__-expanded"><a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">:</tt><tt class="py-name">j</tt><tt class="py-op">]</tt> </tt>
</div><a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__iter__"></a><div id="lazyT.__iter__-def"><a name="L160"></a><tt class="py-lineno">160</tt> <a class="py-toggle" href="#" id="lazyT.__iter__-toggle" onclick="return toggle('lazyT.__iter__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__iter__">__iter__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__iter__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__iter__-expanded"><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">yield</tt> <tt class="py-name">c</tt> </tt>
</div><a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__len__"></a><div id="lazyT.__len__-def"><a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="lazyT.__len__-toggle" onclick="return toggle('lazyT.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__len__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__len__-expanded"><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-71" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-71', 'len', 'link-71');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"> </tt>
<a name="lazyT.xml"></a><div id="lazyT.xml-def"><a name="L166"></a><tt class="py-lineno">166</tt> <a class="py-toggle" href="#" id="lazyT.xml-toggle" onclick="return toggle('lazyT.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.xml-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.xml-expanded"><a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"> </tt>
<a name="lazyT.encode"></a><div id="lazyT.encode-def"><a name="L169"></a><tt class="py-lineno">169</tt> <a class="py-toggle" href="#" id="lazyT.encode-toggle" onclick="return toggle('lazyT.encode');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.encode-expanded"><a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-72" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-72', 'encode', 'link-72');">encode</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-73" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-73', 'b', 'link-73');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"> </tt>
<a name="lazyT.decode"></a><div id="lazyT.decode-def"><a name="L172"></a><tt class="py-lineno">172</tt> <a class="py-toggle" href="#" id="lazyT.decode-toggle" onclick="return toggle('lazyT.decode');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.decode-expanded"><a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-74', 'decode', 'link-74');">decode</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-75', 'b', 'link-73');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line"> </tt>
<a name="lazyT.read"></a><div id="lazyT.read-def"><a name="L175"></a><tt class="py-lineno">175</tt> <a class="py-toggle" href="#" id="lazyT.read-toggle" onclick="return toggle('lazyT.read');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.read-expanded"><a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line"> </tt>
<a name="lazyT.__mod__"></a><div id="lazyT.__mod__-def"><a name="L178"></a><tt class="py-lineno">178</tt> <a class="py-toggle" href="#" id="lazyT.__mod__-toggle" onclick="return toggle('lazyT.__mod__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.lazyT-class.html#__mod__">__mod__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">symbols</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT.__mod__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lazyT.__mod__-expanded"><a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-76', 'T', 'link-51');">T</a></tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-77', 'translate', 'link-59');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-78', 'm', 'link-49');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">symbols</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"> </tt>
<a name="translator"></a><div id="translator-def"><a name="L182"></a><tt class="py-lineno">182</tt> <a class="py-toggle" href="#" id="translator-toggle" onclick="return toggle('translator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html">translator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="translator-expanded"><a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line"> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"><tt class="py-docstring">    this class is instantiated by gluon.compileapp.build_environment</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line"><tt class="py-docstring">    as the T object</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line"><tt class="py-docstring">    ::</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"><tt class="py-docstring">        T.force(None) # turns off translation</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line"><tt class="py-docstring">        T.force('fr, it') # forces web2py to translate using fr.py or it.py</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring">        T(\"Hello World\") # translates \"Hello World\" using the selected file</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring">    notice 1: there is no need to force since, by default, T uses</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring">    accept_language to determine a translation file.</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-docstring">    notice 2: en and en-en are considered different languages!</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"> </tt>
<a name="translator.__init__"></a><div id="translator.__init__-def"><a name="L201"></a><tt class="py-lineno">201</tt> <a class="py-toggle" href="#" id="translator.__init__-toggle" onclick="return toggle('translator.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="translator.__init__-expanded"><a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">current_languages</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'en'</tt><tt class="py-op">]</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">accepted_language</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language_file</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_accept_language</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-79', 'env', 'link-79');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_accept_language</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requested_languages</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name" targets="Method web2py.gluon.languages.translator.force()=web2py.gluon.languages.translator-class.html#force"><a title="web2py.gluon.languages.translator.force" class="py-name" href="#" onclick="return doclink('link-80', 'force', 'link-80');">force</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_accept_language</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lazy</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">otherTs</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
</div><a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"> </tt>
<a name="translator.get_possible_languages"></a><div id="translator.get_possible_languages-def"><a name="L212"></a><tt class="py-lineno">212</tt> <a class="py-toggle" href="#" id="translator.get_possible_languages-toggle" onclick="return toggle('translator.get_possible_languages');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html#get_possible_languages">get_possible_languages</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator.get_possible_languages-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="translator.get_possible_languages-expanded"><a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-name">possible_languages</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">current_languages</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-name">file_ending</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">"\.py$"</tt><tt class="py-op">)</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">langfile</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-81', 'listdir', 'link-2');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-82', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt><tt class="py-string">'languages'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">file_ending</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-83', 'search', 'link-83');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">langfile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                <tt class="py-name">possible_languages</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-84', 'append', 'link-84');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">file_ending</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-name">langfile</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">possible_languages</tt> </tt>
</div><a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"> </tt>
<a name="translator.set_current_languages"></a><div id="translator.set_current_languages-def"><a name="L220"></a><tt class="py-lineno">220</tt> <a class="py-toggle" href="#" id="translator.set_current_languages-toggle" onclick="return toggle('translator.set_current_languages');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html#set_current_languages">set_current_languages</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">languages</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator.set_current_languages-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="translator.set_current_languages-expanded"><a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-85', 'len', 'link-71');">len</a></tt><tt class="py-op">(</tt><tt id="link-86" class="py-name" targets="Module web2py.gluon.languages=web2py.gluon.languages-module.html"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-86', 'languages', 'link-86');">languages</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-87', 'languages', 'link-86');">languages</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">            <tt id="link-88" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-88', 'languages', 'link-86');">languages</a></tt> <tt class="py-op">=</tt> <tt id="link-89" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-89', 'languages', 'link-86');">languages</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">current_languages</tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-90', 'languages', 'link-86');">languages</a></tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.languages.translator.force" class="py-name" href="#" onclick="return doclink('link-91', 'force', 'link-80');">force</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_accept_language</tt><tt class="py-op">)</tt> </tt>
</div><a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"> </tt>
<a name="translator.force"></a><div id="translator.force-def"><a name="L226"></a><tt class="py-lineno">226</tt> <a class="py-toggle" href="#" id="translator.force-toggle" onclick="return toggle('translator.force');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html#force">force</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">languages</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator.force-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="translator.force-expanded"><a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-92" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-92', 'languages', 'link-86');">languages</a></tt> <tt class="py-keyword">or</tt> <tt id="link-93" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-93', 'languages', 'link-86');">languages</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">            <tt id="link-94" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-94', 'languages', 'link-86');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-95', 'len', 'link-71');">len</a></tt><tt class="py-op">(</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-96', 'languages', 'link-86');">languages</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-97', 'languages', 'link-86');">languages</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">            <tt id="link-98" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-98', 'languages', 'link-86');">languages</a></tt> <tt class="py-op">=</tt> <tt id="link-99" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-99', 'languages', 'link-86');">languages</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-100', 'languages', 'link-86');">languages</a></tt><tt class="py-op">:</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-101', 'languages', 'link-86');">languages</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">                <tt class="py-name">accept_languages</tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-102', 'languages', 'link-86');">languages</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">';'</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">                <tt id="link-103" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-103', 'languages', 'link-86');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">                <tt class="py-op">[</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-104', 'languages', 'link-86');">languages</a></tt><tt class="py-op">.</tt><tt id="link-105" class="py-name" targets="Method web2py.gluon.template.BlockNode.extend()=web2py.gluon.template.BlockNode-class.html#extend,Method web2py.gluon.template.Content.extend()=web2py.gluon.template.Content-class.html#extend,Method web2py.gluon.template.TemplateParser.extend()=web2py.gluon.template.TemplateParser-class.html#extend"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-105', 'extend', 'link-105');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">al</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">al</tt> <tt class="py-keyword">in</tt> <tt class="py-name">accept_languages</tt><tt class="py-op">]</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">                <tt id="link-106" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-106', 'languages', 'link-86');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-107', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-108', 'lower', 'link-108');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-109" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-109', 'languages', 'link-86');">languages</a></tt> \ </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">                                 <tt class="py-keyword">if</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.languages.regex_language" class="py-name" href="#" onclick="return doclink('link-110', 'regex_language', 'link-12');">regex_language</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-111', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">language</tt> <tt class="py-keyword">in</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-112', 'languages', 'link-86');">languages</a></tt><tt class="py-op">:</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">language</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">current_languages</tt><tt class="py-op">:</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">accepted_language</tt> <tt class="py-op">=</tt> <tt class="py-name">language</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">                <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-113', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'languages/'</tt><tt class="py-op">,</tt> <tt class="py-name">language</tt> <tt class="py-op">+</tt> <tt class="py-string">'.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-114', 'exists', 'link-114');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">accepted_language</tt> <tt class="py-op">=</tt> <tt class="py-name">language</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language_file</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt id="link-115" class="py-name" targets="Function web2py.gluon.languages.read_dict()=web2py.gluon.languages-module.html#read_dict"><a title="web2py.gluon.languages.read_dict" class="py-name" href="#" onclick="return doclink('link-115', 'read_dict', 'link-115');">read_dict</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-116" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-116', 'languages', 'link-86');">languages</a></tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language_file</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt>  <tt class="py-comment"># ## no language by default</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-117" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-117', 'languages', 'link-86');">languages</a></tt> </tt>
</div><a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"> </tt>
<a name="translator.__call__"></a><div id="translator.__call__-def"><a name="L253"></a><tt class="py-lineno">253</tt> <a class="py-toggle" href="#" id="translator.__call__-toggle" onclick="return toggle('translator.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">,</tt> <tt class="py-param">symbols</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt><tt class="py-param">language</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="translator.__call__-expanded"><a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">language</tt><tt class="py-op">:</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lazy</tt><tt class="py-op">:</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt id="link-118" class="py-name" targets="Class web2py.gluon.languages.lazyT=web2py.gluon.languages.lazyT-class.html"><a title="web2py.gluon.languages.lazyT" class="py-name" href="#" onclick="return doclink('link-118', 'lazyT', 'link-118');">lazyT</a></tt><tt class="py-op">(</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-119', 'message', 'link-53');">message</a></tt><tt class="py-op">,</tt> <tt class="py-name">symbols</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-120', 'translate', 'link-59');">translate</a></tt><tt class="py-op">(</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-121', 'message', 'link-53');">message</a></tt><tt class="py-op">,</tt> <tt class="py-name">symbols</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">                <tt class="py-name">otherT</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">otherTs</tt><tt class="py-op">[</tt><tt class="py-name">language</tt><tt class="py-op">]</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">                <tt class="py-name">otherT</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">otherTs</tt><tt class="py-op">[</tt><tt class="py-name">language</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-122" class="py-name" targets="Class web2py.gluon.languages.translator=web2py.gluon.languages.translator-class.html"><a title="web2py.gluon.languages.translator" class="py-name" href="#" onclick="return doclink('link-122', 'translator', 'link-122');">translator</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line">                <tt class="py-name">otherT</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.languages.translator.force" class="py-name" href="#" onclick="return doclink('link-123', 'force', 'link-80');">force</a></tt><tt class="py-op">(</tt><tt class="py-name">language</tt><tt class="py-op">)</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">otherT</tt><tt class="py-op">(</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-124', 'message', 'link-53');">message</a></tt><tt class="py-op">,</tt><tt class="py-name">symbols</tt><tt class="py-op">)</tt> </tt>
</div><a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line"> </tt>
<a name="translator.translate"></a><div id="translator.translate-def"><a name="L267"></a><tt class="py-lineno">267</tt> <a class="py-toggle" href="#" id="translator.translate-toggle" onclick="return toggle('translator.translate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages.translator-class.html#translate">translate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">,</tt> <tt class="py-param">symbols</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translator.translate-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="translator.translate-expanded"><a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-docstring">        user ## to add a comment into a translation string</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line"><tt class="py-docstring">        the comment can be useful do discriminate different possible</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line"><tt class="py-docstring">        translations for the same string (for example different locations)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"><tt class="py-docstring">        T(' hello world ') -&gt; ' hello world '</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"><tt class="py-docstring">        T(' hello world ## token') -&gt; 'hello world'</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line"><tt class="py-docstring">        T('hello ## world ## token') -&gt; 'hello ## world'</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line"><tt class="py-docstring">        the ## notation is ignored in multiline strings and strings that</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line"><tt class="py-docstring">        start with ##. this is to allow markmin syntax to be translated</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-125" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-125', 'message', 'link-53');">message</a></tt><tt class="py-op">.</tt><tt id="link-126" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-126', 'startswith', 'link-126');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'#'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'\n'</tt> <tt class="py-keyword">in</tt> <tt id="link-127" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-127', 'message', 'link-53');">message</a></tt><tt class="py-op">:</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">            <tt class="py-name">tokens</tt> <tt class="py-op">=</tt> <tt id="link-128" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-128', 'message', 'link-53');">message</a></tt><tt class="py-op">.</tt><tt class="py-name">rsplit</tt><tt class="py-op">(</tt><tt class="py-string">'##'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">            <tt class="py-comment"># this allows markmin syntax in translations</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">tokens</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-129" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-129', 'message', 'link-53');">message</a></tt><tt class="py-op">]</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-130', 'len', 'link-71');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">tokens</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">            <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-131', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">            <tt id="link-132" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-132', 'message', 'link-53');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">'##'</tt> <tt class="py-op">+</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-133" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-133', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">        <tt class="py-name">mt</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-134', 'get', 'link-134');">get</a></tt><tt class="py-op">(</tt><tt id="link-135" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-135', 'message', 'link-53');">message</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mt</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t</tt><tt class="py-op">[</tt><tt id="link-136" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-136', 'message', 'link-53');">message</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">mt</tt> <tt class="py-op">=</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language_file</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-137" class="py-name"><a title="web2py.gluon.compileapp.is_gae
web2py.gluon.languages.is_gae" class="py-name" href="#" onclick="return doclink('link-137', 'is_gae', 'link-6');">is_gae</a></tt><tt class="py-op">:</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">                <tt id="link-138" class="py-name" targets="Function web2py.gluon.languages.write_dict()=web2py.gluon.languages-module.html#write_dict"><a title="web2py.gluon.languages.write_dict" class="py-name" href="#" onclick="return doclink('link-138', 'write_dict', 'link-138');">write_dict</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language_file</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t</tt><tt class="py-op">)</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">symbols</tt> <tt class="py-keyword">or</tt> <tt class="py-name">symbols</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">mt</tt> <tt class="py-op">%</tt> <tt class="py-name">symbols</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">mt</tt> </tt>
</div></div><a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line"> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line"> </tt>
<a name="findT"></a><div id="findT-def"><a name="L298"></a><tt class="py-lineno">298</tt> <a class="py-toggle" href="#" id="findT-toggle" onclick="return toggle('findT');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#findT">findT</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">language</tt><tt class="py-op">=</tt><tt class="py-string">'en-us'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="findT-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="findT-expanded"><a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line"><tt class="py-docstring">    must be run by the admin app</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-139', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'languages'</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.py'</tt> <tt class="py-op">%</tt> <tt class="py-name">language</tt><tt class="py-op">)</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">    <tt class="py-name">sentences</tt> <tt class="py-op">=</tt> <tt id="link-140" class="py-name"><a title="web2py.gluon.languages.read_dict" class="py-name" href="#" onclick="return doclink('link-140', 'read_dict', 'link-115');">read_dict</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">    <tt class="py-name">mp</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-141', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'models'</tt><tt class="py-op">)</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">    <tt class="py-name">cp</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-142', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">)</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">    <tt class="py-name">vp</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-143', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'views'</tt><tt class="py-op">)</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt id="link-144" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-144', 'listdir', 'link-2');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">mp</tt><tt class="py-op">,</tt> <tt class="py-string">'.+\.py'</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-145" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-145', 'listdir', 'link-2');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">cp</tt><tt class="py-op">,</tt> <tt class="py-string">'.+\.py'</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt>\ </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">         <tt class="py-op">+</tt> <tt id="link-146" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-146', 'listdir', 'link-2');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">vp</tt><tt class="py-op">,</tt> <tt class="py-string">'.+\.html'</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">        <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt id="link-147" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-147', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-148', 'lock', 'link-14');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">,</tt> <tt id="link-149" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-149', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="web2py.gluon.portalocker.LOCK_SH" class="py-name" href="#" onclick="return doclink('link-150', 'LOCK_SH', 'link-16');">LOCK_SH</a></tt><tt class="py-op">)</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-151', 'read', 'link-17');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">        <tt id="link-152" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-152', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-153', 'unlock', 'link-19');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-154', 'close', 'link-20');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">        <tt id="link-155" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-155', 'items', 'link-155');">items</a></tt> <tt class="py-op">=</tt> <tt id="link-156" class="py-name"><a title="web2py.gluon.languages.regex_translate" class="py-name" href="#" onclick="return doclink('link-156', 'regex_translate', 'link-10');">regex_translate</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-157" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-157', 'items', 'link-155');">items</a></tt><tt class="py-op">:</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">                <tt id="link-158" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-158', 'message', 'link-53');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">eval</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-159" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-159', 'message', 'link-53');">message</a></tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-160', 'startswith', 'link-126');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'#'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'\n'</tt> <tt class="py-keyword">in</tt> <tt id="link-161" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-161', 'message', 'link-53');">message</a></tt><tt class="py-op">:</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">                    <tt class="py-name">tokens</tt> <tt class="py-op">=</tt> <tt id="link-162" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-162', 'message', 'link-53');">message</a></tt><tt class="py-op">.</tt><tt class="py-name">rsplit</tt><tt class="py-op">(</tt><tt class="py-string">'##'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">                    <tt class="py-comment"># this allows markmin syntax in translations</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">tokens</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-163', 'message', 'link-53');">message</a></tt><tt class="py-op">]</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-164" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-164', 'len', 'link-71');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">tokens</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">                    <tt id="link-165" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-165', 'message', 'link-53');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-166', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'##'</tt> <tt class="py-op">+</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-167', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-168" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-168', 'message', 'link-53');">message</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-169" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-169', 'message', 'link-53');">message</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">sentences</tt><tt class="py-op">:</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">                    <tt class="py-name">sentences</tt><tt class="py-op">[</tt><tt id="link-170" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-170', 'message', 'link-53');">message</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-171" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-171', 'message', 'link-53');">message</a></tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">    <tt id="link-172" class="py-name"><a title="web2py.gluon.languages.write_dict" class="py-name" href="#" onclick="return doclink('link-172', 'write_dict', 'link-138');">write_dict</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">sentences</tt><tt class="py-op">)</tt> </tt>
</div><a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line"><tt class="py-comment">### important to allow safe session.flash=T(....)</tt> </tt>
<a name="lazyT_unpickle"></a><div id="lazyT_unpickle-def"><a name="L332"></a><tt class="py-lineno">332</tt> <a class="py-toggle" href="#" id="lazyT_unpickle-toggle" onclick="return toggle('lazyT_unpickle');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#lazyT_unpickle">lazyT_unpickle</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT_unpickle-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="lazyT_unpickle-expanded"><a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">marshal</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="lazyT_pickle"></a><div id="lazyT_pickle-def"><a name="L334"></a><tt class="py-lineno">334</tt> <a class="py-toggle" href="#" id="lazyT_pickle-toggle" onclick="return toggle('lazyT_pickle');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#lazyT_pickle">lazyT_pickle</a><tt class="py-op">(</tt><tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lazyT_pickle-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="lazyT_pickle-expanded"><a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-173" class="py-name" targets="Function web2py.gluon.languages.lazyT_unpickle()=web2py.gluon.languages-module.html#lazyT_unpickle"><a title="web2py.gluon.languages.lazyT_unpickle" class="py-name" href="#" onclick="return doclink('link-173', 'lazyT_unpickle', 'link-173');">lazyT_unpickle</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">marshal</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
</div><a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"><tt class="py-name">copy_reg</tt><tt class="py-op">.</tt><tt class="py-name">pickle</tt><tt class="py-op">(</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.languages.lazyT" class="py-name" href="#" onclick="return doclink('link-174', 'lazyT', 'link-118');">lazyT</a></tt><tt class="py-op">,</tt> <tt id="link-175" class="py-name" targets="Function web2py.gluon.languages.lazyT_pickle()=web2py.gluon.languages-module.html#lazyT_pickle"><a title="web2py.gluon.languages.lazyT_pickle" class="py-name" href="#" onclick="return doclink('link-175', 'lazyT_pickle', 'link-175');">lazyT_pickle</a></tt><tt class="py-op">,</tt> <tt id="link-176" class="py-name"><a title="web2py.gluon.languages.lazyT_unpickle" class="py-name" href="#" onclick="return doclink('link-176', 'lazyT_unpickle', 'link-173');">lazyT_unpickle</a></tt><tt class="py-op">)</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"> </tt>
<a name="update_all_languages"></a><div id="update_all_languages-def"><a name="L338"></a><tt class="py-lineno">338</tt> <a class="py-toggle" href="#" id="update_all_languages-toggle" onclick="return toggle('update_all_languages');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.languages-module.html#update_all_languages">update_all_languages</a><tt class="py-op">(</tt><tt class="py-param">application_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="update_all_languages-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="update_all_languages-expanded"><a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-177" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-177', 'join', 'link-30');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">application_path</tt><tt class="py-op">,</tt> <tt class="py-string">'languages/'</tt><tt class="py-op">)</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">language</tt> <tt class="py-keyword">in</tt> <tt id="link-178" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-178', 'listdir', 'link-2');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'^\w+(\-\w+)?\.py$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">        <tt id="link-179" class="py-name" targets="Function web2py.gluon.languages.findT()=web2py.gluon.languages-module.html#findT"><a title="web2py.gluon.languages.findT" class="py-name" href="#" onclick="return doclink('link-179', 'findT', 'link-179');">findT</a></tt><tt class="py-op">(</tt><tt class="py-name">application_path</tt><tt class="py-op">,</tt> <tt class="py-name">language</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line"> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.languages.lazyT-class.html version [608a957eab].




























































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.languages.lazyT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.languages-module.html">Module&nbsp;languages</a> ::
        Class&nbsp;lazyT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.languages.lazyT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class lazyT</h1><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">lazyT</strong>
</pre>

<hr />
never to be called explicitly, returned by translator.__call__<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages.lazyT-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">symbols</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">T</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages.lazyT-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages.lazyT-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__eq__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__ne__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__add__"></a><span class="summary-sig-name">__add__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__add__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__radd__"></a><span class="summary-sig-name">__radd__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__radd__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__cmp__"></a><span class="summary-sig-name">__cmp__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__cmp__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages.lazyT-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__hash__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getslice__"></a><span class="summary-sig-name">__getslice__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>,
        <span class="summary-sig-arg">j</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__getslice__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xml"></a><span class="summary-sig-name">xml</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="encode"></a><span class="summary-sig-name">encode</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.encode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="decode"></a><span class="summary-sig-name">decode</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.decode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__mod__"></a><span class="summary-sig-name">__mod__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">symbols</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__mod__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="m"></a><span class="summary-name">m</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="s"></a><span class="summary-name">s</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="T"></a><span class="summary-name">T</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">message</span>,
        <span class="sig-arg">symbols</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">T</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      object.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT.__hash__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  hash(x)
  <dl class="fields">
    <dt>Overrides:
      object.__hash__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.languages.translator-class.html version [13b6665364].

























































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.languages.translator</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.languages-module.html">Module&nbsp;languages</a> ::
        Class&nbsp;translator
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.languages.translator-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class translator</h1><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">translator</strong>
</pre>

<hr />
<p>this class is instantiated by gluon.compileapp.build_environment as 
  the T object</p>
  :
<pre class="literalblock">
   T.force(None) # turns off translation
   T.force('fr, it') # forces web2py to translate using fr.py or it.py

   T(&quot;Hello World&quot;) # translates &quot;Hello World&quot; using the selected file
</pre>
  <p>notice 1: there is no need to force since, by default, T uses 
  accept_language to determine a translation file.</p>
  notice 2: en and en-en are considered different languages!<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages.translator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_possible_languages"></a><span class="summary-sig-name">get_possible_languages</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.get_possible_languages">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_current_languages"></a><span class="summary-sig-name">set_current_languages</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*languages</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.set_current_languages">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="force"></a><span class="summary-sig-name">force</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*languages</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.force">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">symbols</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">language</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.languages.translator-class.html#translate" class="summary-sig-name">translate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">symbols</span>)</span><br />
      user ## 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)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.translate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="translate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">translate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">message</span>,
        <span class="sig-arg">symbols</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#translator.translate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>user ## 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)</p>
  <p>T(' hello world ') -&gt; ' hello world ' T(' hello world ## token') 
  -&gt; 'hello world' T('hello ## world ## token') -&gt; 'hello ## 
  world'</p>
  the ## notation is ignored in multiline strings and strings that start
  with ##. this is to allow markmin syntax to be translated
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.main-module.html version [e85679a056].
































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.main</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;main
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.main-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module main</h1><span class="codelink"><a href="web2py.gluon.main-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Contains:

- wsgibase: the gluon wsgi application

</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.main.HttpServer-class.html" class="summary-name">HttpServer</a><br />
      the web2py web server (Rocket)
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main-module.html#get_client" class="summary-sig-name">get_client</a>(<span class="summary-sig-arg">env</span>)</span><br />
      guess the client address from the environment variables</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#get_client">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="copystream_progress"></a><span class="summary-sig-name">copystream_progress</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">chunk_size</span>=<span class="summary-sig-default">100000</span>)</span><br />
      copies request.env.wsgi_input into request.body and stores 
      progress upload status in cache.ram X-Progress-ID:length and 
      X-Progress-ID:uploaded</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#copystream_progress">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main-module.html#serve_controller" class="summary-sig-name">serve_controller</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>,
        <span class="summary-sig-arg">session</span>)</span><br />
      this function is used to generate a dynamic page.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#serve_controller">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main-module.html#start_response_aux" class="summary-sig-name">start_response_aux</a>(<span class="summary-sig-arg">status</span>,
        <span class="summary-sig-arg">headers</span>,
        <span class="summary-sig-arg">exc_info</span>,
        <span class="summary-sig-arg">response</span>=<span class="summary-sig-default">1</span>)</span><br />
      in controller you can use::...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#start_response_aux">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main-module.html#middleware_aux" class="summary-sig-name">middleware_aux</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>,
        <span class="summary-sig-arg">*middleware_apps</span>)</span><br />
      In you controller use:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#middleware_aux">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="environ_aux"></a><span class="summary-sig-name">environ_aux</span>(<span class="summary-sig-arg">environ</span>,
        <span class="summary-sig-arg">request</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#environ_aux">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parse_get_post_vars"></a><span class="summary-sig-name">parse_get_post_vars</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">environ</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#parse_get_post_vars">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main-module.html#wsgibase" class="summary-sig-name">wsgibase</a>(<span class="summary-sig-arg">environ</span>,
        <span class="summary-sig-arg">responder</span>)</span><br />
      this is the gluon wsgi application.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#wsgibase">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="save_password"></a><span class="summary-sig-name">save_password</span>(<span class="summary-sig-arg">password</span>,
        <span class="summary-sig-arg">port</span>)</span><br />
      used by main() to save the password in the parameters_port.py 
      file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#save_password">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main-module.html#appfactory" class="summary-sig-name">appfactory</a>(<span class="summary-sig-arg">wsgiapp</span>=<span class="summary-sig-default">&lt;function wsgibase at 0x13d0410&gt;</span>,
        <span class="summary-sig-arg">logfilename</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">httpserver.log</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">profilerfilename</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">profiler.log</code><code class="variable-quote">'</code></span>)</span><br />
      generates a wsgi application that does logging and profiling and calls
wsgibase

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#appfactory">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="web2py_path"></a><span class="summary-name">web2py_path</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logpath"></a><span class="summary-name">logpath</span> = <code title="'/home/mdipierro/web2py/logging.conf'"><code class="variable-quote">'</code><code class="variable-string">/home/mdipierro/web2py/logging.conf</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="requests"></a><span class="summary-name">requests</span> = <code title="0">0</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_client"></a><span class="summary-name">regex_client</span> = <code title="re.compile(r'[\w-:]+(\.[\w-]+)*\.?')">re.compile(r'<code class="re-group">[</code>\w-:<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">(</code>\.<code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-op">*</code>\.<code class="re-op">?</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.main-module.html#version_info" class="summary-name">version_info</a> = <code title="open(abspath('VERSION', gluon= True), 'r')">&lt;closed file '/home/mdipierro/web2py/VERSION', <code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="web2py_version"></a><span class="summary-name">web2py_version</span> = <code title="'''Version 1.98.2 (2011-08-03 18:44:38)
'''"><code class="variable-quote">'</code><code class="variable-string">Version 1.98.2 (2011-08-03 18:44:38)\n</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="get_client"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_client</span>(<span class="sig-arg">env</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#get_client">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>guess the client address from the environment variables</p>
  first tries 'http_x_forwarded_for', secondly 'remote_addr' if all 
  fails assume '127.0.0.1' (running locally)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="serve_controller"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">serve_controller</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">response</span>,
        <span class="sig-arg">session</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#serve_controller">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  this function is used to generate a dynamic page. It first runs all 
  models, then runs the function in the controller, and then tries to 
  render the output using a view/template. this function must run from the 
  [application] folder. A typical example would be the call to the url 
  /[application]/[controller]/[function] that would result in a call to 
  [function]() in applications/[application]/[controller].py rendered by 
  applications/[application]/views/[controller]/[function].html
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="start_response_aux"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">start_response_aux</span>(<span class="sig-arg">status</span>,
        <span class="sig-arg">headers</span>,
        <span class="sig-arg">exc_info</span>,
        <span class="sig-arg">response</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#start_response_aux">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

in controller you can use::

- request.wsgi.environ
- request.wsgi.start_response

to call third party WSGI applications

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="middleware_aux"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">middleware_aux</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">response</span>,
        <span class="sig-arg">*middleware_apps</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#middleware_aux">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  In you controller use:
<pre class="literalblock">
   @request.wsgi.middleware(middleware1, middleware2, ...)
</pre>
  to decorate actions with WSGI middleware. actions must return strings.
  uses a simulated environment so it may have weird behavior in some 
  cases
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="wsgibase"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">wsgibase</span>(<span class="sig-arg">environ</span>,
        <span class="sig-arg">responder</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#wsgibase">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

this is the gluon wsgi application. the first function called when a page
is requested (static or dynamic). it can be called by paste.httpserver
or by apache mod_wsgi.

  - fills request with info
  - the environment variables, replacing '.' with '_'
  - adds web2py path and version info
  - compensates for fcgi missing path_info and query_string
  - validates the path in url

The url path must be either:

1. for static pages:

  - /&lt;application&gt;/static/&lt;file&gt;

2. for dynamic pages:

  - /&lt;application&gt;[/&lt;controller&gt;[/&lt;function&gt;[/&lt;sub&gt;]]][.&lt;extension&gt;]
  - (sub may go several levels deep, currently 3 levels are supported:
     sub1/sub2/sub3)

The naming conventions are:

  - application, controller, function and extension may only contain
    [a-zA-Z0-9_]
  - file and sub may also contain '-', '=', '.' and '/'

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="appfactory"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">appfactory</span>(<span class="sig-arg">wsgiapp</span>=<span class="sig-default">&lt;function wsgibase at 0x13d0410&gt;</span>,
        <span class="sig-arg">logfilename</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">httpserver.log</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">profilerfilename</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">profiler.log</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#appfactory">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

generates a wsgi application that does logging and profiling and calls
wsgibase

.. function:: gluon.main.appfactory(
        [wsgiapp=wsgibase
        [, logfilename='httpserver.log'
        [, profilerfilename='profiler.log']]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="version_info"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">version_info</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
open(abspath('VERSION', gluon= True), 'r')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.main-pysrc.html version [68c2220c95].





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.main</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;main
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.main-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.main-module.html">Module web2py.gluon.main</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">Contains:</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">- wsgibase: the gluon wsgi application</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">gc</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cgi</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">Cookie</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">copy</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-0', 'time', 'link-0');">time</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-1', 'thread', 'link-1');">thread</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-2', 'datetime', 'link-2');">datetime</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">signal</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Variable web2py.gluon.rocket.Connection.socket=web2py.gluon.rocket.Connection-class.html#socket"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-3', 'socket', 'link-3');">socket</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">tempfile</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">random</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">string</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">platform</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-4', 'fileutils', 'link-4');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-5', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-6', 'write_file', 'link-6');">write_file</a></tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-7', 'settings', 'link-7');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-8', 'global_settings', 'link-8');">global_settings</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name" targets="Module web2py.gluon.admin=web2py.gluon.admin-module.html"><a title="web2py.gluon.admin" class="py-name" href="#" onclick="return doclink('link-9', 'admin', 'link-9');">admin</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name" targets="Function web2py.gluon.admin.add_path_first()=web2py.gluon.admin-module.html#add_path_first"><a title="web2py.gluon.admin.add_path_first" class="py-name" href="#" onclick="return doclink('link-10', 'add_path_first', 'link-10');">add_path_first</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.admin.create_missing_folders()=web2py.gluon.admin-module.html#create_missing_folders"><a title="web2py.gluon.admin.create_missing_folders" class="py-name" href="#" onclick="return doclink('link-11', 'create_missing_folders', 'link-11');">create_missing_folders</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Function web2py.gluon.admin.create_missing_app_folders()=web2py.gluon.admin-module.html#create_missing_app_folders"><a title="web2py.gluon.admin.create_missing_app_folders" class="py-name" href="#" onclick="return doclink('link-12', 'create_missing_app_folders', 'link-12');">create_missing_app_folders</a></tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-13" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-13', 'globals', 'link-13');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-14" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-14', 'current', 'link-14');">current</a></tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name" targets="Module web2py.gluon.custom_import=web2py.gluon.custom_import-module.html"><a title="web2py.gluon.custom_import" class="py-name" href="#" onclick="return doclink('link-15', 'custom_import', 'link-15');">custom_import</a></tt> <tt class="py-keyword">import</tt> <tt id="link-16" class="py-name" targets="Function web2py.gluon.custom_import.custom_import_install()=web2py.gluon.custom_import-module.html#custom_import_install"><a title="web2py.gluon.custom_import.custom_import_install" class="py-name" href="#" onclick="return doclink('link-16', 'custom_import_install', 'link-16');">custom_import_install</a></tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">simplejson</tt> <tt class="py-keyword">import</tt> <tt class="py-name">dumps</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-comment">#  Remarks:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  calling script has inserted path to script directory into sys.path</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  applications_parent (path to applications/, site-packages/ etc)</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  defaults to that directory set sys.path to</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  ("", gluon_parent/site-packages, gluon_parent, ...)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  this is wrong:</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  web2py_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  because we do not want the path to this file which may be Library.zip</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  gluon_parent is the directory containing gluon, web2py.py, logging.conf</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  and the handlers.</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  applications_parent (web2py_path) is the directory containing applications/</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  and routes.py</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  The two are identical unless web2py_path is changed via the web2py.py -f folder option</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  main.web2py_path is the same as applications_parent (for backward compatibility)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">,</tt> <tt class="py-string">'mkdir'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt id="link-17" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-17', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-18', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt id="link-19" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-19', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">db_sessions</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt id="link-20" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-20', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-21', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py_path'</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getcwd</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt id="link-22" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-22', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-23', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt id="link-24" class="py-name" targets="Variable web2py.gluon.main.web2py_path=web2py.gluon.main-module.html#web2py_path"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-24', 'web2py_path', 'link-24');">web2py_path</a></tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-25', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt> <tt class="py-comment"># backward compatibility</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt id="link-26" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-26', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">app_folders</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt id="link-27" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-27', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">debugging</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt id="link-28" class="py-name"><a title="web2py.gluon.custom_import.custom_import_install" class="py-name" href="#" onclick="return doclink('link-28', 'custom_import_install', 'link-16');">custom_import_install</a></tt><tt class="py-op">(</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-29', 'web2py_path', 'link-24');">web2py_path</a></tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt id="link-30" class="py-name"><a title="web2py.gluon.admin.create_missing_folders" class="py-name" href="#" onclick="return doclink('link-30', 'create_missing_folders', 'link-11');">create_missing_folders</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-comment"># set up logging for subsequent imports</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">config</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt id="link-31" class="py-name" targets="Variable web2py.gluon.main.logpath=web2py.gluon.main-module.html#logpath"><a title="web2py.gluon.main.logpath" class="py-name" href="#" onclick="return doclink('link-31', 'logpath', 'link-31');">logpath</a></tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-32', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">"logging.conf"</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-33', 'exists', 'link-33');">exists</a></tt><tt class="py-op">(</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.main.logpath" class="py-name" href="#" onclick="return doclink('link-34', 'logpath', 'link-31');">logpath</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">    <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">fileConfig</tt><tt class="py-op">(</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-35', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">"logging.conf"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">basicConfig</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt id="link-36" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-36', 'logger', 'link-36');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-37" class="py-name" targets="Module web2py.gluon.restricted=web2py.gluon.restricted-module.html,Function web2py.gluon.restricted.restricted()=web2py.gluon.restricted-module.html#restricted"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-37', 'restricted', 'link-37');">restricted</a></tt> <tt class="py-keyword">import</tt> <tt id="link-38" class="py-name" targets="Class web2py.gluon.restricted.RestrictedError=web2py.gluon.restricted.RestrictedError-class.html"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-38', 'RestrictedError', 'link-38');">RestrictedError</a></tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-39" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-39', 'http', 'link-39');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-40" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-40', 'HTTP', 'link-40');">HTTP</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name" targets="Function web2py.gluon.http.redirect()=web2py.gluon.http-module.html#redirect"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-41', 'redirect', 'link-41');">redirect</a></tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-42" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-42', 'globals', 'link-13');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-43" class="py-name" targets="Class web2py.gluon.globals.Request=web2py.gluon.globals.Request-class.html"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-43', 'Request', 'link-43');">Request</a></tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name" targets="Class web2py.gluon.globals.Response=web2py.gluon.globals.Response-class.html"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-44', 'Response', 'link-44');">Response</a></tt><tt class="py-op">,</tt> <tt id="link-45" class="py-name" targets="Class web2py.gluon.globals.Session=web2py.gluon.globals.Session-class.html"><a title="web2py.gluon.globals.Session" class="py-name" href="#" onclick="return doclink('link-45', 'Session', 'link-45');">Session</a></tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-46" class="py-name" targets="Module web2py.gluon.compileapp=web2py.gluon.compileapp-module.html"><a title="web2py.gluon.compileapp" class="py-name" href="#" onclick="return doclink('link-46', 'compileapp', 'link-46');">compileapp</a></tt> <tt class="py-keyword">import</tt> <tt id="link-47" class="py-name" targets="Function web2py.gluon.compileapp.build_environment()=web2py.gluon.compileapp-module.html#build_environment"><a title="web2py.gluon.compileapp.build_environment" class="py-name" href="#" onclick="return doclink('link-47', 'build_environment', 'link-47');">build_environment</a></tt><tt class="py-op">,</tt> <tt id="link-48" class="py-name" targets="Function web2py.gluon.compileapp.run_models_in()=web2py.gluon.compileapp-module.html#run_models_in"><a title="web2py.gluon.compileapp.run_models_in" class="py-name" href="#" onclick="return doclink('link-48', 'run_models_in', 'link-48');">run_models_in</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt id="link-49" class="py-name" targets="Function web2py.gluon.compileapp.run_controller_in()=web2py.gluon.compileapp-module.html#run_controller_in"><a title="web2py.gluon.compileapp.run_controller_in" class="py-name" href="#" onclick="return doclink('link-49', 'run_controller_in', 'link-49');">run_controller_in</a></tt><tt class="py-op">,</tt> <tt id="link-50" class="py-name" targets="Function web2py.gluon.compileapp.run_view_in()=web2py.gluon.compileapp-module.html#run_view_in"><a title="web2py.gluon.compileapp.run_view_in" class="py-name" href="#" onclick="return doclink('link-50', 'run_view_in', 'link-50');">run_view_in</a></tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-51" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-51', 'fileutils', 'link-4');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-52" class="py-name" targets="Function web2py.gluon.fileutils.copystream()=web2py.gluon.fileutils-module.html#copystream"><a title="web2py.gluon.fileutils.copystream" class="py-name" href="#" onclick="return doclink('link-52', 'copystream', 'link-52');">copystream</a></tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-53" class="py-name" targets="Module web2py.gluon.contenttype=web2py.gluon.contenttype-module.html,Function web2py.gluon.contenttype.contenttype()=web2py.gluon.contenttype-module.html#contenttype"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-53', 'contenttype', 'link-53');">contenttype</a></tt> <tt class="py-keyword">import</tt> <tt id="link-54" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-54', 'contenttype', 'link-53');">contenttype</a></tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-55" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-55', 'dal', 'link-55');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-56" class="py-name" targets="Class web2py.gluon.dal.BaseAdapter=web2py.gluon.dal.BaseAdapter-class.html"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-56', 'BaseAdapter', 'link-56');">BaseAdapter</a></tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-57" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-57', 'settings', 'link-7');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-58" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-58', 'global_settings', 'link-8');">global_settings</a></tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-59" class="py-name" targets="Function web2py.gluon.tools.validators()=web2py.gluon.tools-module.html#validators,Module web2py.gluon.validators=web2py.gluon.validators-module.html"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-59', 'validators', 'link-59');">validators</a></tt> <tt class="py-keyword">import</tt> <tt id="link-60" class="py-name" targets="Class web2py.gluon.validators.CRYPT=web2py.gluon.validators.CRYPT-class.html"><a title="web2py.gluon.validators.CRYPT" class="py-name" href="#" onclick="return doclink('link-60', 'CRYPT', 'link-60');">CRYPT</a></tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-61" class="py-name" targets="Module web2py.gluon.cache=web2py.gluon.cache-module.html"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-61', 'cache', 'link-61');">cache</a></tt> <tt class="py-keyword">import</tt> <tt id="link-62" class="py-name" targets="Class web2py.gluon.cache.Cache=web2py.gluon.cache.Cache-class.html"><a title="web2py.gluon.cache.Cache" class="py-name" href="#" onclick="return doclink('link-62', 'Cache', 'link-62');">Cache</a></tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-63" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-63', 'html', 'link-63');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-64" class="py-name" targets="Function web2py.gluon.html.URL()=web2py.gluon.html-module.html#URL"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-64', 'URL', 'link-64');">URL</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">Url</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-65" class="py-name" targets="Module web2py.gluon.newcron=web2py.gluon.newcron-module.html"><a title="web2py.gluon.newcron" class="py-name" href="#" onclick="return doclink('link-65', 'newcron', 'link-65');">newcron</a></tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-66" class="py-name" targets="Module web2py.gluon.rewrite=web2py.gluon.rewrite-module.html"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-66', 'rewrite', 'link-66');">rewrite</a></tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'wsgibase'</tt><tt class="py-op">,</tt> <tt class="py-string">'save_password'</tt><tt class="py-op">,</tt> <tt class="py-string">'appfactory'</tt><tt class="py-op">,</tt> <tt class="py-string">'HttpServer'</tt><tt class="py-op">]</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt id="link-67" class="py-name" targets="Variable web2py.gluon.main.requests=web2py.gluon.main-module.html#requests"><a title="web2py.gluon.main.requests" class="py-name" href="#" onclick="return doclink('link-67', 'requests', 'link-67');">requests</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt>    <tt class="py-comment"># gc timer</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-comment"># Security Checks: validate URL and session_id here,</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># accept_language is validated in languages</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-comment"># pattern used to validate client address</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-68" class="py-name" targets="Variable web2py.gluon.main.regex_client=web2py.gluon.main-module.html#regex_client"><a title="web2py.gluon.main.regex_client" class="py-name" href="#" onclick="return doclink('link-68', 'regex_client', 'link-68');">regex_client</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'[\w\-:]+(\.[\w\-]+)*\.?'</tt><tt class="py-op">)</tt>  <tt class="py-comment"># ## to account for IPV6</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt id="link-69" class="py-name" targets="Variable sqlite3.dbapi2.version_info=sqlite3.dbapi2-module.html#version_info,Variable web2py.gluon.contrib.pymysql.version_info=web2py.gluon.contrib.pymysql-module.html#version_info,Variable web2py.gluon.main.version_info=web2py.gluon.main-module.html#version_info"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-69', 'version_info', 'link-69');">version_info</a></tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-70', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'VERSION'</tt><tt class="py-op">,</tt> <tt id="link-71" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-71', 'gluon', 'link-71');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt id="link-72" class="py-name" targets="Variable web2py.gluon.main.web2py_version=web2py.gluon.main-module.html#web2py_version"><a title="web2py.gluon.main.web2py_version" class="py-name" href="#" onclick="return doclink('link-72', 'web2py_version', 'link-72');">web2py_version</a></tt> <tt class="py-op">=</tt> <tt id="link-73" class="py-name"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-73', 'version_info', 'link-69');">version_info</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-74', 'read', 'link-74');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt id="link-75" class="py-name"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-75', 'version_info', 'link-69');">version_info</a></tt><tt class="py-op">.</tt><tt id="link-76" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-76', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt id="link-77" class="py-name" targets="Module web2py.gluon.rocket=web2py.gluon.rocket-module.html"><a title="web2py.gluon.rocket" class="py-name" href="#" onclick="return doclink('link-77', 'rocket', 'link-77');">rocket</a></tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-78" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-78', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt id="link-79" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-79', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'unable to import Rocket'</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt id="link-80" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-80', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-81" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-81', 'load', 'link-81');">load</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="get_client"></a><div id="get_client-def"><a name="L117"></a><tt class="py-lineno">117</tt> <a class="py-toggle" href="#" id="get_client-toggle" onclick="return toggle('get_client');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#get_client">get_client</a><tt class="py-op">(</tt><tt class="py-param">env</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_client-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_client-expanded"><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">    guess the client address from the environment variables</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-docstring">    first tries 'http_x_forwarded_for', secondly 'remote_addr'</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"><tt class="py-docstring">    if all fails assume '127.0.0.1' (running locally)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt class="py-name">g</tt> <tt class="py-op">=</tt> <tt id="link-82" class="py-name"><a title="web2py.gluon.main.regex_client" class="py-name" href="#" onclick="return doclink('link-82', 'regex_client', 'link-68');">regex_client</a></tt><tt class="py-op">.</tt><tt id="link-83" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-83', 'search', 'link-83');">search</a></tt><tt class="py-op">(</tt><tt id="link-84" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-84', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-85', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'http_x_forwarded_for'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">g</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">    <tt class="py-name">g</tt> <tt class="py-op">=</tt> <tt id="link-86" class="py-name"><a title="web2py.gluon.main.regex_client" class="py-name" href="#" onclick="return doclink('link-86', 'regex_client', 'link-68');">regex_client</a></tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-87', 'search', 'link-83');">search</a></tt><tt class="py-op">(</tt><tt id="link-88" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-88', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-89', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'remote_addr'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">g</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">'127.0.0.1'</tt> </tt>
</div><a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"> </tt>
<a name="copystream_progress"></a><div id="copystream_progress-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="copystream_progress-toggle" onclick="return toggle('copystream_progress');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#copystream_progress">copystream_progress</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">chunk_size</tt><tt class="py-op">=</tt> <tt class="py-number">10</tt><tt class="py-op">**</tt><tt class="py-number">5</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="copystream_progress-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="copystream_progress-expanded"><a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"><tt class="py-docstring">    copies request.env.wsgi_input into request.body</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"><tt class="py-docstring">    and stores progress upload status in cache.ram</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"><tt class="py-docstring">    X-Progress-ID:length and X-Progress-ID:uploaded</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-90', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">content_length</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">    <tt class="py-name">source</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-91', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">wsgi_input</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-92', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">content_length</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">    <tt class="py-name">dest</tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">TemporaryFile</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'X-Progress-ID'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt id="link-93" class="py-name"><a title="web2py.gluon.fileutils.copystream" class="py-name" href="#" onclick="return doclink('link-93', 'copystream', 'link-52');">copystream</a></tt><tt class="py-op">(</tt><tt class="py-name">source</tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">dest</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">    <tt class="py-name">cache_key</tt> <tt class="py-op">=</tt> <tt class="py-string">'X-Progress-ID:'</tt><tt class="py-op">+</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-string">'X-Progress-ID'</tt><tt class="py-op">]</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">    <tt id="link-94" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-94', 'cache', 'link-61');">cache</a></tt> <tt class="py-op">=</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.cache.Cache" class="py-name" href="#" onclick="return doclink('link-95', 'Cache', 'link-62');">Cache</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">    <tt id="link-96" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-96', 'cache', 'link-61');">cache</a></tt><tt class="py-op">.</tt><tt class="py-name">ram</tt><tt class="py-op">(</tt><tt class="py-name">cache_key</tt><tt class="py-op">+</tt><tt class="py-string">':length'</tt><tt class="py-op">,</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt class="py-name">size</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">    <tt id="link-97" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-97', 'cache', 'link-61');">cache</a></tt><tt class="py-op">.</tt><tt class="py-name">ram</tt><tt class="py-op">(</tt><tt class="py-name">cache_key</tt><tt class="py-op">+</tt><tt class="py-string">':uploaded'</tt><tt class="py-op">,</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">    <tt class="py-keyword">while</tt> <tt class="py-name">size</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">source</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-98', 'read', 'link-74');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt id="link-99" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-99', 'cache', 'link-61');">cache</a></tt><tt class="py-op">.</tt><tt class="py-name">ram</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name" targets="Method web2py.gluon.cache.CacheAbstract.increment()=web2py.gluon.cache.CacheAbstract-class.html#increment,Method web2py.gluon.cache.CacheInRam.increment()=web2py.gluon.cache.CacheInRam-class.html#increment,Method web2py.gluon.cache.CacheOnDisk.increment()=web2py.gluon.cache.CacheOnDisk-class.html#increment"><a title="web2py.gluon.cache.CacheAbstract.increment
web2py.gluon.cache.CacheInRam.increment
web2py.gluon.cache.CacheOnDisk.increment" class="py-name" href="#" onclick="return doclink('link-100', 'increment', 'link-100');">increment</a></tt><tt class="py-op">(</tt><tt class="py-name">cache_key</tt><tt class="py-op">+</tt><tt class="py-string">':uploaded'</tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">source</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-101', 'read', 'link-74');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt id="link-102" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-102', 'cache', 'link-61');">cache</a></tt><tt class="py-op">.</tt><tt class="py-name">ram</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.cache.CacheAbstract.increment
web2py.gluon.cache.CacheInRam.increment
web2py.gluon.cache.CacheOnDisk.increment" class="py-name" href="#" onclick="return doclink('link-103', 'increment', 'link-100');">increment</a></tt><tt class="py-op">(</tt><tt class="py-name">cache_key</tt><tt class="py-op">+</tt><tt class="py-string">':uploaded'</tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt id="link-104" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-104', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">size</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-name">size</tt> <tt class="py-op">-=</tt> <tt class="py-name">length</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">        <tt class="py-name">dest</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-105', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">    <tt class="py-name">dest</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">    <tt id="link-106" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-106', 'cache', 'link-61');">cache</a></tt><tt class="py-op">.</tt><tt class="py-name">ram</tt><tt class="py-op">(</tt><tt class="py-name">cache_key</tt><tt class="py-op">+</tt><tt class="py-string">':length'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">    <tt id="link-107" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-107', 'cache', 'link-61');">cache</a></tt><tt class="py-op">.</tt><tt class="py-name">ram</tt><tt class="py-op">(</tt><tt class="py-name">cache_key</tt><tt class="py-op">+</tt><tt class="py-string">':uploaded'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">dest</tt> </tt>
</div><a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"> </tt>
<a name="serve_controller"></a><div id="serve_controller-def"><a name="L172"></a><tt class="py-lineno">172</tt> <a class="py-toggle" href="#" id="serve_controller-toggle" onclick="return toggle('serve_controller');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#serve_controller">serve_controller</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">,</tt> <tt class="py-param">session</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="serve_controller-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="serve_controller-expanded"><a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line"><tt class="py-docstring">    this function is used to generate a dynamic page.</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line"><tt class="py-docstring">    It first runs all models, then runs the function in the controller,</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"><tt class="py-docstring">    and then tries to render the output using a view/template.</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line"><tt class="py-docstring">    this function must run from the [application] folder.</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"><tt class="py-docstring">    A typical example would be the call to the url</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line"><tt class="py-docstring">    /[application]/[controller]/[function] that would result in a call</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"><tt class="py-docstring">    to [function]() in applications/[application]/[controller].py</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"><tt class="py-docstring">    rendered by applications/[application]/views/[controller]/[function].html</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line"> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># build environment for controller and view</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">    <tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt id="link-108" class="py-name"><a title="web2py.gluon.compileapp.build_environment" class="py-name" href="#" onclick="return doclink('link-108', 'build_environment', 'link-47');">build_environment</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">    <tt class="py-comment"># set default view, controller can override it</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">                                  <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">,</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">                                  <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">    <tt class="py-comment"># also, make sure the flash is passed through</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># process models, controller and view (if required)</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">    <tt id="link-109" class="py-name"><a title="web2py.gluon.compileapp.run_models_in" class="py-name" href="#" onclick="return doclink('link-109', 'run_models_in', 'link-48');">run_models_in</a></tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt> <tt class="py-op">=</tt> <tt class="py-name">copy</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">    <tt class="py-name">page</tt> <tt class="py-op">=</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.compileapp.run_controller_in" class="py-name" href="#" onclick="return doclink('link-110', 'run_controller_in', 'link-49');">run_controller_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">page</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">page</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">page</tt><tt class="py-op">:</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">page</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt id="link-111" class="py-name"><a title="web2py.gluon.compileapp.run_view_in" class="py-name" href="#" onclick="return doclink('link-111', 'run_view_in', 'link-50');">run_view_in</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_view_environment</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-name">page</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">    <tt class="py-comment"># logic to garbage collect after exec, not always, once every 100 requests</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">global</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.main.requests" class="py-name" href="#" onclick="return doclink('link-112', 'requests', 'link-67');">requests</a></tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">    <tt id="link-113" class="py-name"><a title="web2py.gluon.main.requests" class="py-name" href="#" onclick="return doclink('link-113', 'requests', 'link-67');">requests</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'requests'</tt> <tt class="py-keyword">in</tt> <tt id="link-114" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-114', 'globals', 'link-13');">globals</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.main.requests" class="py-name" href="#" onclick="return doclink('link-115', 'requests', 'link-67');">requests</a></tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">100</tt> <tt class="py-keyword">or</tt> <tt class="py-number">0</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-116" class="py-name"><a title="web2py.gluon.main.requests" class="py-name" href="#" onclick="return doclink('link-116', 'requests', 'link-67');">requests</a></tt><tt class="py-op">:</tt> <tt class="py-name">gc</tt><tt class="py-op">.</tt><tt class="py-name">collect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">    <tt class="py-comment"># end garbage collection logic</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">raise</tt> <tt id="link-117" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-117', 'HTTP', 'link-40');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">page</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
</div><a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"> </tt>
<a name="start_response_aux"></a><div id="start_response_aux-def"><a name="L218"></a><tt class="py-lineno">218</tt> <a class="py-toggle" href="#" id="start_response_aux-toggle" onclick="return toggle('start_response_aux');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#start_response_aux">start_response_aux</a><tt class="py-op">(</tt><tt class="py-param">status</tt><tt class="py-op">,</tt> <tt class="py-param">headers</tt><tt class="py-op">,</tt> <tt class="py-param">exc_info</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="start_response_aux-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="start_response_aux-expanded"><a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"><tt class="py-docstring">    in controller you can use::</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line"><tt class="py-docstring">    - request.wsgi.environ</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line"><tt class="py-docstring">    - request.wsgi.start_response</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"><tt class="py-docstring">    to call third party WSGI applications</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">:</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-118', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">escape</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">kargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"> </tt>
<a name="middleware_aux"></a><div id="middleware_aux-def"><a name="L232"></a><tt class="py-lineno">232</tt> <a class="py-toggle" href="#" id="middleware_aux-toggle" onclick="return toggle('middleware_aux');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#middleware_aux">middleware_aux</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">middleware_apps</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="middleware_aux-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="middleware_aux-expanded"><a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"><tt class="py-docstring">    In you controller use::</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line"><tt class="py-docstring">        @request.wsgi.middleware(middleware1, middleware2, ...)</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"><tt class="py-docstring">    to decorate actions with WSGI middleware. actions must return strings.</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"><tt class="py-docstring">    uses a simulated environment so it may have weird behavior in some cases</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">middleware</tt><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">app</tt><tt class="py-op">(</tt><tt class="py-param">environ</tt><tt class="py-op">,</tt> <tt class="py-param">start_response</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">            <tt id="link-119" class="py-name" targets="Method web2py.gluon.rocket.WSGIWorker.start_response()=web2py.gluon.rocket.WSGIWorker-class.html#start_response"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-119', 'start_response', 'link-119');">start_response</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-120', 'items', 'link-120');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">data</tt><tt class="py-op">]</tt> </tt>
</div><a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">middleware_apps</tt><tt class="py-op">:</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">            <tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">item</tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">caller</tt><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">app</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">wsgi</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">wsgi</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-121', 'start_response', 'link-119');">start_response</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">caller</tt><tt class="py-op">=</tt><tt class="py-name">caller</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">app</tt><tt class="py-op">:</tt> <tt class="py-name">caller</tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
</div><a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">middleware</tt> </tt>
</div><a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line"> </tt>
<a name="environ_aux"></a><div id="environ_aux-def"><a name="L255"></a><tt class="py-lineno">255</tt> <a class="py-toggle" href="#" id="environ_aux-toggle" onclick="return toggle('environ_aux');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#environ_aux">environ_aux</a><tt class="py-op">(</tt><tt class="py-param">environ</tt><tt class="py-op">,</tt><tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="environ_aux-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="environ_aux-expanded"><a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">    <tt class="py-name">new_environ</tt> <tt class="py-op">=</tt> <tt class="py-name">copy</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">    <tt class="py-name">new_environ</tt><tt class="py-op">[</tt><tt class="py-string">'wsgi.input'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">    <tt class="py-name">new_environ</tt><tt class="py-op">[</tt><tt class="py-string">'wsgi.version'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">new_environ</tt> </tt>
</div><a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"> </tt>
<a name="parse_get_post_vars"></a><div id="parse_get_post_vars-def"><a name="L261"></a><tt class="py-lineno">261</tt> <a class="py-toggle" href="#" id="parse_get_post_vars-toggle" onclick="return toggle('parse_get_post_vars');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#parse_get_post_vars">parse_get_post_vars</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">environ</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="parse_get_post_vars-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="parse_get_post_vars-expanded"><a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">    <tt class="py-comment"># always parse variables in URL for GET, POST, PUT, DELETE, etc. in get_vars</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">dget</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">parse_qsl</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-122', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">query_string</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">keep_blank_values</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dget</tt><tt class="py-op">:</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">:</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">            <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-comment"># parse POST variables on POST, PUT, BOTH only in post_vars</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt id="link-123" class="py-name" targets="Function web2py.gluon.main.copystream_progress()=web2py.gluon.main-module.html#copystream_progress"><a title="web2py.gluon.main.copystream_progress" class="py-name" href="#" onclick="return doclink('link-123', 'copystream_progress', 'link-123');">copystream_progress</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> <tt class="py-comment">### stores request body</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-124', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">request_method</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'POST'</tt><tt class="py-op">,</tt> <tt class="py-string">'PUT'</tt><tt class="py-op">,</tt> <tt class="py-string">'BOTH'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt class="py-name">dpost</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">FieldStorage</tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">,</tt><tt class="py-name">environ</tt><tt class="py-op">=</tt><tt class="py-name">environ</tt><tt class="py-op">,</tt><tt class="py-name">keep_blank_values</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">        <tt class="py-comment"># The same detection used by FieldStorage to detect multipart POSTs</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">is_multipart</tt> <tt class="py-op">=</tt> <tt class="py-name">dpost</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">10</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'multipart/'</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-name">isle25</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-125', 'version_info', 'link-69');">version_info</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-number">5</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line"> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">listify</tt><tt class="py-op">(</tt><tt class="py-param">a</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">a</tt> </tt>
</div><a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">            <tt id="link-126" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-126', 'keys', 'link-126');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dpost</tt><tt class="py-op">)</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">:</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">            <tt id="link-127" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-127', 'keys', 'link-126');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-128" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-128', 'keys', 'link-126');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">            <tt class="py-name">dpk</tt> <tt class="py-op">=</tt> <tt class="py-name">dpost</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">            <tt class="py-comment"># if en element is not a file replace it with its value else leave it alone</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">dpk</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">dpk</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">:</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">                    <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-129" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-129', 'x', 'link-129');">x</a></tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-keyword">for</tt> <tt id="link-130" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-130', 'x', 'link-129');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">dpk</tt><tt class="py-op">]</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">                    <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-131" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-131', 'x', 'link-129');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-132" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-132', 'x', 'link-129');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">dpk</tt><tt class="py-op">]</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">dpk</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">:</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">dpk</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">dpk</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">            <tt class="py-name">pvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">listify</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">                <tt class="py-name">gvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">listify</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isle25</tt><tt class="py-op">:</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">                    <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">pvalue</tt> <tt class="py-op">+</tt> <tt class="py-name">gvalue</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">is_multipart</tt><tt class="py-op">:</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">                    <tt class="py-name">pvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">pvalue</tt><tt class="py-op">[</tt><tt id="link-133" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-133', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">gvalue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">                    <tt class="py-name">pvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">pvalue</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt id="link-134" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-134', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">gvalue</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">            <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-135" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-135', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">pvalue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-136" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-136', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">pvalue</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">pvalue</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">pvalue</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div><a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line"> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"> </tt>
<a name="wsgibase"></a><div id="wsgibase-def"><a name="L316"></a><tt class="py-lineno">316</tt> <a class="py-toggle" href="#" id="wsgibase-toggle" onclick="return toggle('wsgibase');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#wsgibase">wsgibase</a><tt class="py-op">(</tt><tt class="py-param">environ</tt><tt class="py-op">,</tt> <tt class="py-param">responder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="wsgibase-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="wsgibase-expanded"><a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line"><tt class="py-docstring">    this is the gluon wsgi application. the first function called when a page</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line"><tt class="py-docstring">    is requested (static or dynamic). it can be called by paste.httpserver</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line"><tt class="py-docstring">    or by apache mod_wsgi.</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"><tt class="py-docstring">      - fills request with info</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line"><tt class="py-docstring">      - the environment variables, replacing '.' with '_'</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line"><tt class="py-docstring">      - adds web2py path and version info</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"><tt class="py-docstring">      - compensates for fcgi missing path_info and query_string</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line"><tt class="py-docstring">      - validates the path in url</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line"><tt class="py-docstring">    The url path must be either:</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"><tt class="py-docstring">    1. for static pages:</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line"><tt class="py-docstring">      - /&lt;application&gt;/static/&lt;file&gt;</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line"><tt class="py-docstring">    2. for dynamic pages:</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"><tt class="py-docstring">      - /&lt;application&gt;[/&lt;controller&gt;[/&lt;function&gt;[/&lt;sub&gt;]]][.&lt;extension&gt;]</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"><tt class="py-docstring">      - (sub may go several levels deep, currently 3 levels are supported:</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line"><tt class="py-docstring">         sub1/sub2/sub3)</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"><tt class="py-docstring">    The naming conventions are:</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line"><tt class="py-docstring">      - application, controller, function and extension may only contain</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"><tt class="py-docstring">        [a-zA-Z0-9_]</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"><tt class="py-docstring">      - file and sub may also contain '-', '=', '.' and '/'</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line"> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">    <tt id="link-137" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-137', 'current', 'link-14');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name" targets="Method web2py.gluon.cache.CacheAbstract.clear()=web2py.gluon.cache.CacheAbstract-class.html#clear,Method web2py.gluon.cache.CacheInRam.clear()=web2py.gluon.cache.CacheInRam-class.html#clear,Method web2py.gluon.cache.CacheOnDisk.clear()=web2py.gluon.cache.CacheOnDisk-class.html#clear"><a title="web2py.gluon.cache.CacheAbstract.clear
web2py.gluon.cache.CacheInRam.clear
web2py.gluon.cache.CacheOnDisk.clear" class="py-name" href="#" onclick="return doclink('link-138', 'clear', 'link-138');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-139" class="py-name"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-139', 'Request', 'link-43');">Request</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">    <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-140" class="py-name"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-140', 'Response', 'link-44');">Response</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">    <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-141" class="py-name"><a title="web2py.gluon.globals.Session" class="py-name" href="#" onclick="return doclink('link-141', 'Session', 'link-45');">Session</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-142', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-143', 'web2py_path', 'link-24');">web2py_path</a></tt> <tt class="py-op">=</tt> <tt id="link-144" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-144', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-145', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="web2py.gluon.main.web2py_version" class="py-name" href="#" onclick="return doclink('link-146', 'web2py_version', 'link-72');">web2py_version</a></tt> <tt class="py-op">=</tt> <tt id="link-147" class="py-name"><a title="web2py.gluon.main.web2py_version" class="py-name" href="#" onclick="return doclink('link-147', 'web2py_version', 'link-72');">web2py_version</a></tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-148', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-149', 'update', 'link-149');">update</a></tt><tt class="py-op">(</tt><tt id="link-150" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-150', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">)</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">    <tt class="py-name">static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># handle fcgi missing path_info and query_string</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># select rewrite parameters</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># rewrite incoming URL</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># parse rewritten header variables</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># parse rewritten URL</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># serve file if static</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-151', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">                        <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-152', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'REQUEST_URI'</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">                    <tt class="py-comment"># for fcgi, get path_info and query_string from request_uri</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt id="link-153" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-153', 'items', 'link-120');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REQUEST_URI'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">)</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">                    <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-154" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-154', 'items', 'link-120');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-155" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-155', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-156', 'items', 'link-120');">items</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">                        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-157" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-157', 'items', 'link-120');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">                        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-158', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">                    <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-159', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'SERVER_NAME'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">                                                      <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-160', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'SERVER_PORT'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line"> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-161" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-161', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-162" class="py-name" targets="Function web2py.gluon.rewrite.url_in()=web2py.gluon.rewrite-module.html#url_in"><a title="web2py.gluon.rewrite.url_in" class="py-name" href="#" onclick="return doclink('link-162', 'url_in', 'link-162');">url_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">static_file</tt><tt class="py-op">:</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-163', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-164', 'get', 'link-21');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'query_string'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">10</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'attachment'</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Disposition'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'attachment'</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name" targets="Method web2py.gluon.globals.Response.stream()=web2py.gluon.globals.Response-class.html#stream"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-165', 'stream', 'link-165');">stream</a></tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line"> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># fill in request items</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">                <tt class="py-name">http_host</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-166', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_host</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line"> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">                <tt class="py-name">local_hosts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">http_host</tt><tt class="py-op">,</tt><tt class="py-string">'::1'</tt><tt class="py-op">,</tt><tt class="py-string">'127.0.0.1'</tt><tt class="py-op">,</tt><tt class="py-string">'::ffff:127.0.0.1'</tt><tt class="py-op">]</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-167" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-167', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt><tt class="py-op">:</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line">                    <tt class="py-name">local_hosts</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt id="link-168" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-168', 'socket', 'link-3');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">gethostname</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">                                    <tt id="link-169" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-169', 'socket', 'link-3');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">gethostbyname</tt><tt class="py-op">(</tt><tt class="py-name">http_host</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">client</tt> <tt class="py-op">=</tt> <tt id="link-170" class="py-name" targets="Function web2py.gluon.main.get_client()=web2py.gluon.main-module.html#get_client"><a title="web2py.gluon.main.get_client" class="py-name" href="#" onclick="return doclink('link-170', 'get_client', 'link-170');">get_client</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-171" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-171', 'env', 'link-84');">env</a></tt><tt class="py-op">)</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt id="link-172" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-172', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">                                         <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">                <tt class="py-name">x_req_with</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-173', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_x_requested_with</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-174', 'lower', 'link-174');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">ajax</tt> <tt class="py-op">=</tt> <tt class="py-name">x_req_with</tt> <tt class="py-op">==</tt> <tt class="py-string">'xmlhttprequest'</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cid</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-175" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-175', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_web2py_component_element</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_local</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-176', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">local_hosts</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_https</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-177" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-177', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">wsgi_url_scheme</tt> \ </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">                    <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'https'</tt><tt class="py-op">,</tt> <tt class="py-string">'HTTPS'</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-178" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-178', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">https</tt> <tt class="py-op">==</tt> <tt class="py-string">'on'</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line"> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># compute a request.uuid to be used for tickets and toolbar</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">uuid</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name" targets="Method web2py.gluon.globals.Request.compute_uuid()=web2py.gluon.globals.Request-class.html#compute_uuid"><a title="web2py.gluon.globals.Request.compute_uuid" class="py-name" href="#" onclick="return doclink('link-179', 'compute_uuid', 'link-179');">compute_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line"> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># access the requested application</tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-180', 'exists', 'link-33');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt id="link-181" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-181', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-182', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">!=</tt> <tt class="py-string">'welcome'</tt><tt class="py-op">:</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">                        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-string">'welcome'</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">                        <tt id="link-183" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-183', 'redirect', 'link-41');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">Url</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-184" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-184', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-185', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_handler</tt><tt class="py-op">:</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line">                        <tt id="link-186" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-186', 'redirect', 'link-41');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">Url</tt><tt class="py-op">(</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-187', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-188" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-188', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_handler</tt><tt class="py-op">[</tt><tt class="py-string">'application'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">                                     <tt id="link-189" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-189', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-190', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_handler</tt><tt class="py-op">[</tt><tt class="py-string">'controller'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">                                     <tt id="link-191" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-191', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-192', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_handler</tt><tt class="py-op">[</tt><tt class="py-string">'function'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">                                     <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-193" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-193', 'HTTP', 'link-40');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">                                   <tt id="link-194" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-194', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-195', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line">                                   <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid application'</tt><tt class="py-op">)</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-196', 'url', 'link-196');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">Url</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">                                       <tt class="py-name">extension</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">raw_extension</tt><tt class="py-op">)</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line"> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># build missing folders</tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line">                <tt id="link-197" class="py-name"><a title="web2py.gluon.admin.create_missing_app_folders" class="py-name" href="#" onclick="return doclink('link-197', 'create_missing_app_folders', 'link-12');">create_missing_app_folders</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line"> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># get the GET and POST data</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line">                <tt id="link-198" class="py-name" targets="Function web2py.gluon.main.parse_get_post_vars()=web2py.gluon.main-module.html#parse_get_post_vars"><a title="web2py.gluon.main.parse_get_post_vars" class="py-name" href="#" onclick="return doclink('link-198', 'parse_get_post_vars', 'link-198');">parse_get_post_vars</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line"> </tt>
<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># expose wsgi hooks for convenience</tt> </tt>
<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">wsgi</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name" targets="Function web2py.gluon.main.environ_aux()=web2py.gluon.main-module.html#environ_aux"><a title="web2py.gluon.main.environ_aux" class="py-name" href="#" onclick="return doclink('link-199', 'environ_aux', 'link-199');">environ_aux</a></tt><tt class="py-op">(</tt><tt class="py-name">environ</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">wsgi</tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-200', 'start_response', 'link-119');">start_response</a></tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">status</tt><tt class="py-op">=</tt><tt class="py-string">'200'</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> \ </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line">                    <tt class="py-name">exec_info</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">=</tt><tt class="py-name">response</tt><tt class="py-op">:</tt> \ </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line">                    <tt id="link-201" class="py-name" targets="Function web2py.gluon.main.start_response_aux()=web2py.gluon.main-module.html#start_response_aux"><a title="web2py.gluon.main.start_response_aux" class="py-name" href="#" onclick="return doclink('link-201', 'start_response_aux', 'link-201');">start_response_aux</a></tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">,</tt> <tt class="py-name">exec_info</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">wsgi</tt><tt class="py-op">.</tt><tt class="py-name">middleware</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">:</tt> <tt id="link-202" class="py-name" targets="Function web2py.gluon.main.middleware_aux()=web2py.gluon.main-module.html#middleware_aux"><a title="web2py.gluon.main.middleware_aux" class="py-name" href="#" onclick="return doclink('link-202', 'middleware_aux', 'link-202');">middleware_aux</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">response</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># load cookies</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-203" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-203', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_cookie</tt><tt class="py-op">:</tt> </tt>
<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line">                    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">                        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">.</tt><tt id="link-204" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-204', 'load', 'link-81');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-205" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-205', 'env', 'link-84');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_cookie</tt><tt class="py-op">)</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">                    <tt class="py-keyword">except</tt> <tt class="py-name">Cookie</tt><tt class="py-op">.</tt><tt class="py-name">CookieError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">                        <tt class="py-keyword">pass</tt> <tt class="py-comment"># invalid cookies</tt> </tt>
<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"> </tt>
<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># try load session or create new session file</tt> </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-206" class="py-name" targets="Method web2py.gluon.globals.Session.connect()=web2py.gluon.globals.Session-class.html#connect"><a title="web2py.gluon.globals.Session.connect" class="py-name" href="#" onclick="return doclink('link-206', 'connect', 'link-206');">connect</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line"> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># set no-cache headers</tt> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-207" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-207', 'contenttype', 'link-53');">contenttype</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">+</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Cache-Control'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">                    <tt class="py-string">'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'</tt> </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Expires'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">                    <tt id="link-208" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-208', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%a, %d %b %Y %H:%M:%S GMT'</tt><tt class="py-op">,</tt> <tt id="link-209" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-209', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">gmtime</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">                <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Pragma'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'no-cache'</tt> </tt>
<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line"> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># run controller</tt> </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">                <tt id="link-210" class="py-name" targets="Function web2py.gluon.main.serve_controller()=web2py.gluon.main-module.html#serve_controller"><a title="web2py.gluon.main.serve_controller" class="py-name" href="#" onclick="return doclink('link-210', 'serve_controller', 'link-210');">serve_controller</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">)</tt> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line"> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-211" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-211', 'HTTP', 'link-40');">HTTP</a></tt><tt class="py-op">,</tt> <tt class="py-name">http_response</tt><tt class="py-op">:</tt> </tt>
<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">static_file</tt><tt class="py-op">:</tt> </tt>
<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt id="link-212" class="py-name" targets="Method web2py.gluon.http.HTTP.to()=web2py.gluon.http.HTTP-class.html#to"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-212', 'to', 'link-212');">to</a></tt><tt class="py-op">(</tt><tt class="py-name">responder</tt><tt class="py-op">)</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line"> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">:</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">                    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-213" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-213', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line"> </tt>
<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># on success, try store session in database</tt> </tt>
<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-214" class="py-name" targets="Method web2py.gluon.globals.Session._try_store_in_db()=web2py.gluon.globals.Session-class.html#_try_store_in_db"><a title="web2py.gluon.globals.Session._try_store_in_db" class="py-name" href="#" onclick="return doclink('link-214', '_try_store_in_db', 'link-214');">_try_store_in_db</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line"> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># on success, commit database</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_custom_commit</tt><tt class="py-op">:</tt> </tt>
<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_custom_commit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">                    <tt id="link-215" class="py-name"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-215', 'BaseAdapter', 'link-56');">BaseAdapter</a></tt><tt class="py-op">.</tt><tt id="link-216" class="py-name" targets="Static Method web2py.gluon.dal.ConnectionPool.close_all_instances()=web2py.gluon.dal.ConnectionPool-class.html#close_all_instances"><a title="web2py.gluon.dal.ConnectionPool.close_all_instances" class="py-name" href="#" onclick="return doclink('link-216', 'close_all_instances', 'link-216');">close_all_instances</a></tt><tt class="py-op">(</tt><tt class="py-string">'commit'</tt><tt class="py-op">)</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line"> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># if session not in db try store session on filesystem</tt> </tt>
<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># this must be done after trying to commit database!</tt> </tt>
<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-217" class="py-name" targets="Method web2py.gluon.globals.Session._try_store_on_disk()=web2py.gluon.globals.Session-class.html#_try_store_on_disk"><a title="web2py.gluon.globals.Session._try_store_on_disk" class="py-name" href="#" onclick="return doclink('link-217', '_try_store_on_disk', 'link-217');">_try_store_on_disk</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line"> </tt>
<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># store cookies in headers</tt> </tt>
<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cid</tt><tt class="py-op">:</tt> </tt>
<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line"> </tt>
<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'web2py-component-flash'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">                        <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'web2py-component-flash'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">                            <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">js</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'web2py-component-command'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
<a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line">                        <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'web2py-component-command'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line">                            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">js</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_forget</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">:</tt> </tt>
<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line">                    <tt class="py-keyword">del</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt> </tt>
<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_secure</tt><tt class="py-op">:</tt> </tt>
<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'secure'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-218" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-218', 'len', 'link-104');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">                    <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Set-Cookie'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">                        <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">cookie</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">11</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">cookie</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">.</tt><tt id="link-219" class="py-name" targets="Method web2py.gluon.rocket.Headers.values()=web2py.gluon.rocket.Headers-class.html#values"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-219', 'values', 'link-219');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line">                <tt class="py-name">ticket</tt><tt class="py-op">=</tt><tt class="py-name">None</tt> </tt>
<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line"> </tt>
<a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-220" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-220', 'RestrictedError', 'link-38');">RestrictedError</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line"> </tt>
<a name="L539"></a><tt class="py-lineno">539</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">:</tt> </tt>
<a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">                    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-221" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-221', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line"> </tt>
<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line">                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># on application error, rollback database</tt> </tt>
<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">                <tt class="py-name">ticket</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-222" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.log()=web2py.gluon.restricted.RestrictedError-class.html#log,Variable web2py.gluon.rocket.log=web2py.gluon.rocket-module.html#log,Method web2py.gluon.winservice.Service.log()=web2py.gluon.winservice.Service-class.html#log"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-222', 'log', 'link-222');">log</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'unknown'</tt> </tt>
<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_custom_rollback</tt><tt class="py-op">:</tt> </tt>
<a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_custom_rollback</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L550"></a><tt class="py-lineno">550</tt>  <tt class="py-line">                    <tt id="link-223" class="py-name"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-223', 'BaseAdapter', 'link-56');">BaseAdapter</a></tt><tt class="py-op">.</tt><tt id="link-224" class="py-name"><a title="web2py.gluon.dal.ConnectionPool.close_all_instances" class="py-name" href="#" onclick="return doclink('link-224', 'close_all_instances', 'link-216');">close_all_instances</a></tt><tt class="py-op">(</tt><tt class="py-string">'rollback'</tt><tt class="py-op">)</tt> </tt>
<a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line"> </tt>
<a name="L552"></a><tt class="py-lineno">552</tt>  <tt class="py-line">                <tt class="py-name">http_response</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line">                    <tt id="link-225" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-225', 'HTTP', 'link-40');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">500</tt><tt class="py-op">,</tt> </tt>
<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line">                         <tt id="link-226" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-226', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-227', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message_ticket</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">ticket</tt><tt class="py-op">=</tt><tt class="py-name">ticket</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line">                         <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'ticket %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ticket</tt><tt class="py-op">)</tt> </tt>
<a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line"> </tt>
<a name="L557"></a><tt class="py-lineno">557</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line"> </tt>
<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">:</tt> </tt>
<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-228', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line"> </tt>
<a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line">            <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L563"></a><tt class="py-lineno">563</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># on application error, rollback database</tt> </tt>
<a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_custom_rollback</tt><tt class="py-op">:</tt> </tt>
<a name="L568"></a><tt class="py-lineno">568</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">_custom_rollback</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L570"></a><tt class="py-lineno">570</tt>  <tt class="py-line">                    <tt id="link-229" class="py-name"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-229', 'BaseAdapter', 'link-56');">BaseAdapter</a></tt><tt class="py-op">.</tt><tt id="link-230" class="py-name"><a title="web2py.gluon.dal.ConnectionPool.close_all_instances" class="py-name" href="#" onclick="return doclink('link-230', 'close_all_instances', 'link-216');">close_all_instances</a></tt><tt class="py-op">(</tt><tt class="py-string">'rollback'</tt><tt class="py-op">)</tt> </tt>
<a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L572"></a><tt class="py-lineno">572</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L573"></a><tt class="py-lineno">573</tt>  <tt class="py-line">            <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-231" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-231', 'RestrictedError', 'link-38');">RestrictedError</a></tt><tt class="py-op">(</tt><tt class="py-string">'Framework'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L574"></a><tt class="py-lineno">574</tt>  <tt class="py-line">            <tt class="py-name">ticket</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-232" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-232', 'log', 'link-222');">log</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'unrecoverable'</tt> </tt>
<a name="L575"></a><tt class="py-lineno">575</tt>  <tt class="py-line">            <tt class="py-name">http_response</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L576"></a><tt class="py-lineno">576</tt>  <tt class="py-line">                <tt id="link-233" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-233', 'HTTP', 'link-40');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">500</tt><tt class="py-op">,</tt> </tt>
<a name="L577"></a><tt class="py-lineno">577</tt>  <tt class="py-line">                     <tt id="link-234" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-234', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-235" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-235', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message_ticket</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">ticket</tt><tt class="py-op">=</tt><tt class="py-name">ticket</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L578"></a><tt class="py-lineno">578</tt>  <tt class="py-line">                     <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'ticket %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ticket</tt><tt class="py-op">)</tt> </tt>
<a name="L579"></a><tt class="py-lineno">579</tt>  <tt class="py-line"> </tt>
<a name="L580"></a><tt class="py-lineno">580</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L581"></a><tt class="py-lineno">581</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-string">'session_file'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">:</tt> </tt>
<a name="L582"></a><tt class="py-lineno">582</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_file</tt><tt class="py-op">.</tt><tt id="link-236" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-236', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L583"></a><tt class="py-lineno">583</tt>  <tt class="py-line"><tt class="py-comment">#         if global_settings.debugging:</tt> </tt>
<a name="L584"></a><tt class="py-lineno">584</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#             import gluon.debug</tt> </tt>
<a name="L585"></a><tt class="py-lineno">585</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#             gluon.debug.stop_trace()</tt> </tt>
<a name="L586"></a><tt class="py-lineno">586</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L587"></a><tt class="py-lineno">587</tt>  <tt class="py-line">    <tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-237" class="py-name" targets="Method web2py.gluon.globals.Session._unlock()=web2py.gluon.globals.Session-class.html#_unlock"><a title="web2py.gluon.globals.Session._unlock" class="py-name" href="#" onclick="return doclink('link-237', '_unlock', 'link-237');">_unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L588"></a><tt class="py-lineno">588</tt>  <tt class="py-line">    <tt class="py-name">http_response</tt><tt class="py-op">,</tt> <tt class="py-name">new_environ</tt> <tt class="py-op">=</tt> <tt id="link-238" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-238', 'rewrite', 'link-66');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-239" class="py-name" targets="Function web2py.gluon.rewrite.try_rewrite_on_error()=web2py.gluon.rewrite-module.html#try_rewrite_on_error"><a title="web2py.gluon.rewrite.try_rewrite_on_error" class="py-name" href="#" onclick="return doclink('link-239', 'try_rewrite_on_error', 'link-239');">try_rewrite_on_error</a></tt><tt class="py-op">(</tt> </tt>
<a name="L589"></a><tt class="py-lineno">589</tt>  <tt class="py-line">        <tt class="py-name">http_response</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">,</tt> <tt class="py-name">ticket</tt><tt class="py-op">)</tt> </tt>
<a name="L590"></a><tt class="py-lineno">590</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">http_response</tt><tt class="py-op">:</tt> </tt>
<a name="L591"></a><tt class="py-lineno">591</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-240" class="py-name" targets="Function web2py.gluon.main.wsgibase()=web2py.gluon.main-module.html#wsgibase"><a title="web2py.gluon.main.wsgibase" class="py-name" href="#" onclick="return doclink('link-240', 'wsgibase', 'link-240');">wsgibase</a></tt><tt class="py-op">(</tt><tt class="py-name">new_environ</tt><tt class="py-op">,</tt><tt class="py-name">responder</tt><tt class="py-op">)</tt> </tt>
<a name="L592"></a><tt class="py-lineno">592</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-241" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-241', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_crontype</tt> <tt class="py-op">==</tt> <tt class="py-string">'soft'</tt><tt class="py-op">:</tt> </tt>
<a name="L593"></a><tt class="py-lineno">593</tt>  <tt class="py-line">        <tt id="link-242" class="py-name"><a title="web2py.gluon.newcron" class="py-name" href="#" onclick="return doclink('link-242', 'newcron', 'link-65');">newcron</a></tt><tt class="py-op">.</tt><tt id="link-243" class="py-name" targets="Class web2py.gluon.newcron.softcron=web2py.gluon.newcron.softcron-class.html"><a title="web2py.gluon.newcron.softcron" class="py-name" href="#" onclick="return doclink('link-243', 'softcron', 'link-243');">softcron</a></tt><tt class="py-op">(</tt><tt id="link-244" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-244', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-245" class="py-name" targets="Method web2py.gluon.main.HttpServer.start()=web2py.gluon.main.HttpServer-class.html#start,Method web2py.gluon.rocket.Rocket.start()=web2py.gluon.rocket.Rocket-class.html#start,Method web2py.gluon.rocket.ThreadPool.start()=web2py.gluon.rocket.ThreadPool-class.html#start,Function web2py.gluon.widget.start()=web2py.gluon.widget-module.html#start,Method web2py.gluon.widget.web2pyDialog.start()=web2py.gluon.widget.web2pyDialog-class.html#start,Method web2py.gluon.winservice.Service.start()=web2py.gluon.winservice.Service-class.html#start,Method web2py.gluon.winservice.Web2pyService.start()=web2py.gluon.winservice.Web2pyService-class.html#start"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-245', 'start', 'link-245');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L594"></a><tt class="py-lineno">594</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt id="link-246" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-246', 'to', 'link-212');">to</a></tt><tt class="py-op">(</tt><tt class="py-name">responder</tt><tt class="py-op">)</tt> </tt>
</div><a name="L595"></a><tt class="py-lineno">595</tt>  <tt class="py-line">     </tt>
<a name="L596"></a><tt class="py-lineno">596</tt>  <tt class="py-line"> </tt>
<a name="save_password"></a><div id="save_password-def"><a name="L597"></a><tt class="py-lineno">597</tt> <a class="py-toggle" href="#" id="save_password-toggle" onclick="return toggle('save_password');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#save_password">save_password</a><tt class="py-op">(</tt><tt class="py-param">password</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="save_password-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="save_password-expanded"><a name="L598"></a><tt class="py-lineno">598</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L599"></a><tt class="py-lineno">599</tt>  <tt class="py-line"><tt class="py-docstring">    used by main() to save the password in the parameters_port.py file.</tt> </tt>
<a name="L600"></a><tt class="py-lineno">600</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L601"></a><tt class="py-lineno">601</tt>  <tt class="py-line"> </tt>
<a name="L602"></a><tt class="py-lineno">602</tt>  <tt class="py-line">    <tt class="py-name">password_file</tt> <tt class="py-op">=</tt> <tt id="link-247" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-247', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'parameters_%i.py'</tt> <tt class="py-op">%</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L603"></a><tt class="py-lineno">603</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">password</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;random&gt;'</tt><tt class="py-op">:</tt> </tt>
<a name="L604"></a><tt class="py-lineno">604</tt>  <tt class="py-line">        <tt class="py-comment"># make up a new password</tt> </tt>
<a name="L605"></a><tt class="py-lineno">605</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">chars</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">letters</tt> <tt class="py-op">+</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">digits</tt> </tt>
<a name="L606"></a><tt class="py-lineno">606</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-248" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-248', 'join', 'link-248');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">chars</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L607"></a><tt class="py-lineno">607</tt>  <tt class="py-line">        <tt class="py-name">cpassword</tt> <tt class="py-op">=</tt> <tt id="link-249" class="py-name"><a title="web2py.gluon.validators.CRYPT" class="py-name" href="#" onclick="return doclink('link-249', 'CRYPT', 'link-60');">CRYPT</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L608"></a><tt class="py-lineno">608</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'******************* IMPORTANT!!! ************************'</tt> </tt>
<a name="L609"></a><tt class="py-lineno">609</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'your admin password is "%s"'</tt> <tt class="py-op">%</tt> <tt class="py-name">password</tt> </tt>
<a name="L610"></a><tt class="py-lineno">610</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'*********************************************************'</tt> </tt>
<a name="L611"></a><tt class="py-lineno">611</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">password</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;recycle&gt;'</tt><tt class="py-op">:</tt> </tt>
<a name="L612"></a><tt class="py-lineno">612</tt>  <tt class="py-line">        <tt class="py-comment"># reuse the current password if any</tt> </tt>
<a name="L613"></a><tt class="py-lineno">613</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-250" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-250', 'exists', 'link-33');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">password_file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L614"></a><tt class="py-lineno">614</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L615"></a><tt class="py-lineno">615</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L616"></a><tt class="py-lineno">616</tt>  <tt class="py-line">            <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L617"></a><tt class="py-lineno">617</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">password</tt><tt class="py-op">.</tt><tt id="link-251" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-251', 'startswith', 'link-251');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;pam_user:'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L618"></a><tt class="py-lineno">618</tt>  <tt class="py-line">        <tt class="py-comment"># use the pam password for specified user</tt> </tt>
<a name="L619"></a><tt class="py-lineno">619</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">cpassword</tt> <tt class="py-op">=</tt> <tt class="py-name">password</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L620"></a><tt class="py-lineno">620</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L621"></a><tt class="py-lineno">621</tt>  <tt class="py-line">        <tt class="py-comment"># use provided password</tt> </tt>
<a name="L622"></a><tt class="py-lineno">622</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">cpassword</tt> <tt class="py-op">=</tt> <tt id="link-252" class="py-name"><a title="web2py.gluon.validators.CRYPT" class="py-name" href="#" onclick="return doclink('link-252', 'CRYPT', 'link-60');">CRYPT</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L623"></a><tt class="py-lineno">623</tt>  <tt class="py-line">    <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">password_file</tt><tt class="py-op">,</tt> <tt class="py-string">'w'</tt><tt class="py-op">)</tt> </tt>
<a name="L624"></a><tt class="py-lineno">624</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">password</tt><tt class="py-op">:</tt> </tt>
<a name="L625"></a><tt class="py-lineno">625</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-253" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-253', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'password="%s"\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">cpassword</tt><tt class="py-op">)</tt> </tt>
<a name="L626"></a><tt class="py-lineno">626</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L627"></a><tt class="py-lineno">627</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-254" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-254', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'password=None\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L628"></a><tt class="py-lineno">628</tt>  <tt class="py-line">    <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-255" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-255', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L629"></a><tt class="py-lineno">629</tt>  <tt class="py-line"> </tt>
<a name="L630"></a><tt class="py-lineno">630</tt>  <tt class="py-line"> </tt>
<a name="appfactory"></a><div id="appfactory-def"><a name="L631"></a><tt class="py-lineno">631</tt> <a class="py-toggle" href="#" id="appfactory-toggle" onclick="return toggle('appfactory');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main-module.html#appfactory">appfactory</a><tt class="py-op">(</tt><tt class="py-param">wsgiapp</tt><tt class="py-op">=</tt><tt id="link-256" class="py-name"><a title="web2py.gluon.main.wsgibase" class="py-name" href="#" onclick="return doclink('link-256', 'wsgibase', 'link-240');">wsgibase</a></tt><tt class="py-op">,</tt> </tt>
<a name="L632"></a><tt class="py-lineno">632</tt>  <tt class="py-line">               <tt class="py-param">logfilename</tt><tt class="py-op">=</tt><tt class="py-string">'httpserver.log'</tt><tt class="py-op">,</tt> </tt>
<a name="L633"></a><tt class="py-lineno">633</tt>  <tt class="py-line">               <tt class="py-param">profilerfilename</tt><tt class="py-op">=</tt><tt class="py-string">'profiler.log'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="appfactory-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="appfactory-expanded"><a name="L634"></a><tt class="py-lineno">634</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L635"></a><tt class="py-lineno">635</tt>  <tt class="py-line"><tt class="py-docstring">    generates a wsgi application that does logging and profiling and calls</tt> </tt>
<a name="L636"></a><tt class="py-lineno">636</tt>  <tt class="py-line"><tt class="py-docstring">    wsgibase</tt> </tt>
<a name="L637"></a><tt class="py-lineno">637</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L638"></a><tt class="py-lineno">638</tt>  <tt class="py-line"><tt class="py-docstring">    .. function:: gluon.main.appfactory(</tt> </tt>
<a name="L639"></a><tt class="py-lineno">639</tt>  <tt class="py-line"><tt class="py-docstring">            [wsgiapp=wsgibase</tt> </tt>
<a name="L640"></a><tt class="py-lineno">640</tt>  <tt class="py-line"><tt class="py-docstring">            [, logfilename='httpserver.log'</tt> </tt>
<a name="L641"></a><tt class="py-lineno">641</tt>  <tt class="py-line"><tt class="py-docstring">            [, profilerfilename='profiler.log']]])</tt> </tt>
<a name="L642"></a><tt class="py-lineno">642</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L643"></a><tt class="py-lineno">643</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L644"></a><tt class="py-lineno">644</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">profilerfilename</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-257" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-257', 'exists', 'link-33');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">profilerfilename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L645"></a><tt class="py-lineno">645</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">profilerfilename</tt><tt class="py-op">)</tt> </tt>
<a name="L646"></a><tt class="py-lineno">646</tt>  <tt class="py-line">    <tt id="link-258" class="py-name" targets="Variable web2py.gluon.cache.CacheInRam.locker=web2py.gluon.cache.CacheInRam-class.html#locker"><a title="web2py.gluon.cache.CacheInRam.locker" class="py-name" href="#" onclick="return doclink('link-258', 'locker', 'link-258');">locker</a></tt> <tt class="py-op">=</tt> <tt id="link-259" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-259', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">allocate_lock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L647"></a><tt class="py-lineno">647</tt>  <tt class="py-line"> </tt>
<a name="L648"></a><tt class="py-lineno">648</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">app_with_logging</tt><tt class="py-op">(</tt><tt class="py-param">environ</tt><tt class="py-op">,</tt> <tt class="py-param">responder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L649"></a><tt class="py-lineno">649</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L650"></a><tt class="py-lineno">650</tt>  <tt class="py-line"><tt class="py-docstring">        a wsgi app that does logging and profiling and calls wsgibase</tt> </tt>
<a name="L651"></a><tt class="py-lineno">651</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L652"></a><tt class="py-lineno">652</tt>  <tt class="py-line">        <tt class="py-name">status_headers</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L653"></a><tt class="py-lineno">653</tt>  <tt class="py-line"> </tt>
<a name="L654"></a><tt class="py-lineno">654</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">responder2</tt><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">,</tt> <tt class="py-param">h</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L655"></a><tt class="py-lineno">655</tt>  <tt class="py-line">            <tt class="py-docstring">"""</tt> </tt>
<a name="L656"></a><tt class="py-lineno">656</tt>  <tt class="py-line"><tt class="py-docstring">            wsgi responder app</tt> </tt>
<a name="L657"></a><tt class="py-lineno">657</tt>  <tt class="py-line"><tt class="py-docstring">            """</tt> </tt>
<a name="L658"></a><tt class="py-lineno">658</tt>  <tt class="py-line">            <tt class="py-name">status_headers</tt><tt class="py-op">.</tt><tt id="link-260" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-260', 'append', 'link-260');">append</a></tt><tt class="py-op">(</tt><tt id="link-261" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-261', 's', 'link-261');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L659"></a><tt class="py-lineno">659</tt>  <tt class="py-line">            <tt class="py-name">status_headers</tt><tt class="py-op">.</tt><tt id="link-262" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-262', 'append', 'link-260');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">h</tt><tt class="py-op">)</tt> </tt>
<a name="L660"></a><tt class="py-lineno">660</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">responder</tt><tt class="py-op">(</tt><tt id="link-263" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-263', 's', 'link-261');">s</a></tt><tt class="py-op">,</tt> <tt class="py-name">h</tt><tt class="py-op">)</tt> </tt>
</div><a name="L661"></a><tt class="py-lineno">661</tt>  <tt class="py-line"> </tt>
<a name="L662"></a><tt class="py-lineno">662</tt>  <tt class="py-line">        <tt class="py-name">time_in</tt> <tt class="py-op">=</tt> <tt id="link-264" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-264', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-265" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-265', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L663"></a><tt class="py-lineno">663</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L664"></a><tt class="py-lineno">664</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">profilerfilename</tt><tt class="py-op">:</tt> </tt>
<a name="L665"></a><tt class="py-lineno">665</tt>  <tt class="py-line">            <tt class="py-name">ret</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">wsgiapp</tt><tt class="py-op">(</tt><tt class="py-name">environ</tt><tt class="py-op">,</tt> <tt class="py-name">responder2</tt><tt class="py-op">)</tt> </tt>
<a name="L666"></a><tt class="py-lineno">666</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L667"></a><tt class="py-lineno">667</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">cProfile</tt> </tt>
<a name="L668"></a><tt class="py-lineno">668</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">pstats</tt> </tt>
<a name="L669"></a><tt class="py-lineno">669</tt>  <tt class="py-line">            <tt id="link-266" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-266', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'profiler is on. this makes web2py slower and serial'</tt><tt class="py-op">)</tt> </tt>
<a name="L670"></a><tt class="py-lineno">670</tt>  <tt class="py-line"> </tt>
<a name="L671"></a><tt class="py-lineno">671</tt>  <tt class="py-line">            <tt id="link-267" class="py-name"><a title="web2py.gluon.cache.CacheInRam.locker" class="py-name" href="#" onclick="return doclink('link-267', 'locker', 'link-258');">locker</a></tt><tt class="py-op">.</tt><tt id="link-268" class="py-name" targets="Method web2py.gluon.newcron.Token.acquire()=web2py.gluon.newcron.Token-class.html#acquire"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-268', 'acquire', 'link-268');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L672"></a><tt class="py-lineno">672</tt>  <tt class="py-line">            <tt class="py-name">cProfile</tt><tt class="py-op">.</tt><tt class="py-name">runctx</tt><tt class="py-op">(</tt><tt class="py-string">'ret[0] = wsgiapp(environ, responder2)'</tt><tt class="py-op">,</tt> </tt>
<a name="L673"></a><tt class="py-lineno">673</tt>  <tt class="py-line">                            <tt id="link-269" class="py-name"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-269', 'globals', 'link-13');">globals</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">profilerfilename</tt><tt class="py-op">+</tt><tt class="py-string">'.tmp'</tt><tt class="py-op">)</tt> </tt>
<a name="L674"></a><tt class="py-lineno">674</tt>  <tt class="py-line">            <tt class="py-name">stat</tt> <tt class="py-op">=</tt> <tt class="py-name">pstats</tt><tt class="py-op">.</tt><tt class="py-name">Stats</tt><tt class="py-op">(</tt><tt class="py-name">profilerfilename</tt><tt class="py-op">+</tt><tt class="py-string">'.tmp'</tt><tt class="py-op">)</tt> </tt>
<a name="L675"></a><tt class="py-lineno">675</tt>  <tt class="py-line">            <tt class="py-name">stat</tt><tt class="py-op">.</tt><tt id="link-270" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-270', 'stream', 'link-165');">stream</a></tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L676"></a><tt class="py-lineno">676</tt>  <tt class="py-line">            <tt class="py-name">stat</tt><tt class="py-op">.</tt><tt class="py-name">strip_dirs</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sort_stats</tt><tt class="py-op">(</tt><tt class="py-string">"time"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">print_stats</tt><tt class="py-op">(</tt><tt class="py-number">80</tt><tt class="py-op">)</tt> </tt>
<a name="L677"></a><tt class="py-lineno">677</tt>  <tt class="py-line">            <tt class="py-name">profile_out</tt> <tt class="py-op">=</tt> <tt class="py-name">stat</tt><tt class="py-op">.</tt><tt id="link-271" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-271', 'stream', 'link-165');">stream</a></tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L678"></a><tt class="py-lineno">678</tt>  <tt class="py-line">            <tt class="py-name">profile_file</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">profilerfilename</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
<a name="L679"></a><tt class="py-lineno">679</tt>  <tt class="py-line">            <tt class="py-name">profile_file</tt><tt class="py-op">.</tt><tt id="link-272" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-272', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s\n%s\n%s\n%s\n\n'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L680"></a><tt class="py-lineno">680</tt>  <tt class="py-line">               <tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'='</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">,</tt> <tt class="py-name">profile_out</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L681"></a><tt class="py-lineno">681</tt>  <tt class="py-line">            <tt class="py-name">profile_file</tt><tt class="py-op">.</tt><tt id="link-273" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-273', 'close', 'link-76');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L682"></a><tt class="py-lineno">682</tt>  <tt class="py-line">            <tt id="link-274" class="py-name"><a title="web2py.gluon.cache.CacheInRam.locker" class="py-name" href="#" onclick="return doclink('link-274', 'locker', 'link-258');">locker</a></tt><tt class="py-op">.</tt><tt id="link-275" class="py-name" targets="Method web2py.gluon.newcron.Token.release()=web2py.gluon.newcron.Token-class.html#release"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-275', 'release', 'link-275');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L683"></a><tt class="py-lineno">683</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L684"></a><tt class="py-lineno">684</tt>  <tt class="py-line">            <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s, %s, %s, %s, %s, %s, %f\n'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L685"></a><tt class="py-lineno">685</tt>  <tt class="py-line">                <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REMOTE_ADDR'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L686"></a><tt class="py-lineno">686</tt>  <tt class="py-line">                <tt id="link-276" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-276', 'datetime', 'link-2');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-277" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-277', 'datetime', 'link-2');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">today</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%Y-%m-%d %H:%M:%S'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L687"></a><tt class="py-lineno">687</tt>  <tt class="py-line">                <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REQUEST_METHOD'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L688"></a><tt class="py-lineno">688</tt>  <tt class="py-line">                <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">,</tt> <tt class="py-string">'%2C'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L689"></a><tt class="py-lineno">689</tt>  <tt class="py-line">                <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'SERVER_PROTOCOL'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L690"></a><tt class="py-lineno">690</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">status_headers</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L691"></a><tt class="py-lineno">691</tt>  <tt class="py-line">                <tt id="link-278" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-278', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-279" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-279', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">time_in</tt><tt class="py-op">,</tt> </tt>
<a name="L692"></a><tt class="py-lineno">692</tt>  <tt class="py-line">                <tt class="py-op">)</tt> </tt>
<a name="L693"></a><tt class="py-lineno">693</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">logfilename</tt><tt class="py-op">:</tt> </tt>
<a name="L694"></a><tt class="py-lineno">694</tt>  <tt class="py-line">                <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt id="link-280" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-280', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L695"></a><tt class="py-lineno">695</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">logfilename</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L696"></a><tt class="py-lineno">696</tt>  <tt class="py-line">                <tt id="link-281" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-281', 'write_file', 'link-6');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">logfilename</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
<a name="L697"></a><tt class="py-lineno">697</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L698"></a><tt class="py-lineno">698</tt>  <tt class="py-line">                <tt class="py-name">logfilename</tt><tt class="py-op">.</tt><tt id="link-282" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-282', 'write', 'link-105');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L699"></a><tt class="py-lineno">699</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L700"></a><tt class="py-lineno">700</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L701"></a><tt class="py-lineno">701</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div><a name="L702"></a><tt class="py-lineno">702</tt>  <tt class="py-line"> </tt>
<a name="L703"></a><tt class="py-lineno">703</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">app_with_logging</tt> </tt>
</div><a name="L704"></a><tt class="py-lineno">704</tt>  <tt class="py-line"> </tt>
<a name="L705"></a><tt class="py-lineno">705</tt>  <tt class="py-line"> </tt>
<a name="HttpServer"></a><div id="HttpServer-def"><a name="L706"></a><tt class="py-lineno">706</tt> <a class="py-toggle" href="#" id="HttpServer-toggle" onclick="return toggle('HttpServer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.main.HttpServer-class.html">HttpServer</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HttpServer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="HttpServer-expanded"><a name="L707"></a><tt class="py-lineno">707</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L708"></a><tt class="py-lineno">708</tt>  <tt class="py-line"><tt class="py-docstring">    the web2py web server (Rocket)</tt> </tt>
<a name="L709"></a><tt class="py-lineno">709</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L710"></a><tt class="py-lineno">710</tt>  <tt class="py-line"> </tt>
<a name="HttpServer.__init__"></a><div id="HttpServer.__init__-def"><a name="L711"></a><tt class="py-lineno">711</tt> <a class="py-toggle" href="#" id="HttpServer.__init__-toggle" onclick="return toggle('HttpServer.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main.HttpServer-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L712"></a><tt class="py-lineno">712</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L713"></a><tt class="py-lineno">713</tt>  <tt class="py-line">        <tt class="py-param">ip</tt><tt class="py-op">=</tt><tt class="py-string">'127.0.0.1'</tt><tt class="py-op">,</tt> </tt>
<a name="L714"></a><tt class="py-lineno">714</tt>  <tt class="py-line">        <tt class="py-param">port</tt><tt class="py-op">=</tt><tt class="py-number">8000</tt><tt class="py-op">,</tt> </tt>
<a name="L715"></a><tt class="py-lineno">715</tt>  <tt class="py-line">        <tt class="py-param">password</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L716"></a><tt class="py-lineno">716</tt>  <tt class="py-line">        <tt class="py-param">pid_filename</tt><tt class="py-op">=</tt><tt class="py-string">'httpserver.pid'</tt><tt class="py-op">,</tt> </tt>
<a name="L717"></a><tt class="py-lineno">717</tt>  <tt class="py-line">        <tt class="py-param">log_filename</tt><tt class="py-op">=</tt><tt class="py-string">'httpserver.log'</tt><tt class="py-op">,</tt> </tt>
<a name="L718"></a><tt class="py-lineno">718</tt>  <tt class="py-line">        <tt class="py-param">profiler_filename</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L719"></a><tt class="py-lineno">719</tt>  <tt class="py-line">        <tt class="py-param">ssl_certificate</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L720"></a><tt class="py-lineno">720</tt>  <tt class="py-line">        <tt class="py-param">ssl_private_key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L721"></a><tt class="py-lineno">721</tt>  <tt class="py-line">        <tt class="py-param">min_threads</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L722"></a><tt class="py-lineno">722</tt>  <tt class="py-line">        <tt class="py-param">max_threads</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L723"></a><tt class="py-lineno">723</tt>  <tt class="py-line">        <tt class="py-param">server_name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L724"></a><tt class="py-lineno">724</tt>  <tt class="py-line">        <tt class="py-param">request_queue_size</tt><tt class="py-op">=</tt><tt class="py-number">5</tt><tt class="py-op">,</tt> </tt>
<a name="L725"></a><tt class="py-lineno">725</tt>  <tt class="py-line">        <tt class="py-param">timeout</tt><tt class="py-op">=</tt><tt class="py-number">10</tt><tt class="py-op">,</tt> </tt>
<a name="L726"></a><tt class="py-lineno">726</tt>  <tt class="py-line">        <tt class="py-param">shutdown_timeout</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-comment"># Rocket does not use a shutdown timeout</tt> </tt>
<a name="L727"></a><tt class="py-lineno">727</tt>  <tt class="py-line">        <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L728"></a><tt class="py-lineno">728</tt>  <tt class="py-line">        <tt class="py-param">interfaces</tt><tt class="py-op">=</tt><tt class="py-name">None</tt> <tt class="py-comment"># Rocket is able to use several interfaces - must be list of socket-tuples as string</tt> </tt>
<a name="L729"></a><tt class="py-lineno">729</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HttpServer.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HttpServer.__init__-expanded"><a name="L730"></a><tt class="py-lineno">730</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L731"></a><tt class="py-lineno">731</tt>  <tt class="py-line"><tt class="py-docstring">        starts the web server.</tt> </tt>
<a name="L732"></a><tt class="py-lineno">732</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L733"></a><tt class="py-lineno">733</tt>  <tt class="py-line"> </tt>
<a name="L734"></a><tt class="py-lineno">734</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">interfaces</tt><tt class="py-op">:</tt> </tt>
<a name="L735"></a><tt class="py-lineno">735</tt>  <tt class="py-line">            <tt class="py-comment"># if interfaces is specified, it must be tested for rocket parameter correctness</tt> </tt>
<a name="L736"></a><tt class="py-lineno">736</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># not necessarily completely tested (e.g. content of tuples or ip-format)</tt> </tt>
<a name="L737"></a><tt class="py-lineno">737</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">import</tt> <tt id="link-283" class="py-name" targets="Variable web2py.gluon.dal.BaseAdapter.types=web2py.gluon.dal.BaseAdapter-class.html#types,Variable web2py.gluon.dal.CouchDBAdapter.types=web2py.gluon.dal.CouchDBAdapter-class.html#types,Variable web2py.gluon.dal.DB2Adapter.types=web2py.gluon.dal.DB2Adapter-class.html#types,Variable web2py.gluon.dal.FireBirdAdapter.types=web2py.gluon.dal.FireBirdAdapter-class.html#types,Variable web2py.gluon.dal.GoogleDatastoreAdapter.types=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types,Variable web2py.gluon.dal.InformixAdapter.types=web2py.gluon.dal.InformixAdapter-class.html#types,Variable web2py.gluon.dal.IngresAdapter.types=web2py.gluon.dal.IngresAdapter-class.html#types,Variable web2py.gluon.dal.IngresUnicodeAdapter.types=web2py.gluon.dal.IngresUnicodeAdapter-class.html#types,Variable web2py.gluon.dal.MSSQL2Adapter.types=web2py.gluon.dal.MSSQL2Adapter-class.html#types,Variable web2py.gluon.dal.MSSQLAdapter.types=web2py.gluon.dal.MSSQLAdapter-class.html#types,Variable web2py.gluon.dal.MongoDBAdapter.types=web2py.gluon.dal.MongoDBAdapter-class.html#types,Variable web2py.gluon.dal.MySQLAdapter.types=web2py.gluon.dal.MySQLAdapter-class.html#types,Variable web2py.gluon.dal.OracleAdapter.types=web2py.gluon.dal.OracleAdapter-class.html#types,Variable web2py.gluon.dal.PostgreSQLAdapter.types=web2py.gluon.dal.PostgreSQLAdapter-class.html#types,Variable web2py.gluon.dal.SAPDBAdapter.types=web2py.gluon.dal.SAPDBAdapter-class.html#types,Variable web2py.gluon.dal.TeradataAdapter.types=web2py.gluon.dal.TeradataAdapter-class.html#types"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-283', 'types', 'link-283');">types</a></tt> </tt>
<a name="L738"></a><tt class="py-lineno">738</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">interfaces</tt><tt class="py-op">,</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-284', 'types', 'link-283');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">ListType</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L739"></a><tt class="py-lineno">739</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">interfaces</tt><tt class="py-op">:</tt> </tt>
<a name="L740"></a><tt class="py-lineno">740</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt><tt id="link-285" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-285', 'types', 'link-283');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">TupleType</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L741"></a><tt class="py-lineno">741</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt class="py-string">"Wrong format for rocket interfaces parameter - see http://packages.python.org/rocket/"</tt> </tt>
<a name="L742"></a><tt class="py-lineno">742</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L743"></a><tt class="py-lineno">743</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-string">"Wrong format for rocket interfaces parameter - see http://packages.python.org/rocket/"</tt> </tt>
<a name="L744"></a><tt class="py-lineno">744</tt>  <tt class="py-line"> </tt>
<a name="L745"></a><tt class="py-lineno">745</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">path</tt><tt class="py-op">:</tt> </tt>
<a name="L746"></a><tt class="py-lineno">746</tt>  <tt class="py-line">            <tt class="py-comment"># if a path is specified change the global variables so that web2py</tt> </tt>
<a name="L747"></a><tt class="py-lineno">747</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># runs from there instead of cwd or os.environ['web2py_path']</tt> </tt>
<a name="L748"></a><tt class="py-lineno">748</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">global</tt> <tt id="link-286" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-286', 'web2py_path', 'link-24');">web2py_path</a></tt> </tt>
<a name="L749"></a><tt class="py-lineno">749</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">normpath</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L750"></a><tt class="py-lineno">750</tt>  <tt class="py-line">            <tt id="link-287" class="py-name"><a title="web2py.gluon.main.web2py_path" class="py-name" href="#" onclick="return doclink('link-287', 'web2py_path', 'link-24');">web2py_path</a></tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt> </tt>
<a name="L751"></a><tt class="py-lineno">751</tt>  <tt class="py-line">            <tt id="link-288" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-288', 'global_settings', 'link-8');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt> </tt>
<a name="L752"></a><tt class="py-lineno">752</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-289" class="py-name" targets="Method web2py.gluon.winservice.Web2pyService.chdir()=web2py.gluon.winservice.Web2pyService-class.html#chdir"><a title="web2py.gluon.winservice.Web2pyService.chdir" class="py-name" href="#" onclick="return doclink('link-289', 'chdir', 'link-289');">chdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L753"></a><tt class="py-lineno">753</tt>  <tt class="py-line">            <tt class="py-op">[</tt><tt id="link-290" class="py-name"><a title="web2py.gluon.admin.add_path_first" class="py-name" href="#" onclick="return doclink('link-290', 'add_path_first', 'link-10');">add_path_first</a></tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt id="link-291" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-291', 'abspath', 'link-5');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'site-packages'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L754"></a><tt class="py-lineno">754</tt>  <tt class="py-line"> </tt>
<a name="L755"></a><tt class="py-lineno">755</tt>  <tt class="py-line">        <tt id="link-292" class="py-name" targets="Function web2py.gluon.main.save_password()=web2py.gluon.main-module.html#save_password"><a title="web2py.gluon.main.save_password" class="py-name" href="#" onclick="return doclink('link-292', 'save_password', 'link-292');">save_password</a></tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L756"></a><tt class="py-lineno">756</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pid_filename</tt> <tt class="py-op">=</tt> <tt class="py-name">pid_filename</tt> </tt>
<a name="L757"></a><tt class="py-lineno">757</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">server_name</tt><tt class="py-op">:</tt> </tt>
<a name="L758"></a><tt class="py-lineno">758</tt>  <tt class="py-line">            <tt class="py-name">server_name</tt> <tt class="py-op">=</tt> <tt id="link-293" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-293', 'socket', 'link-3');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">gethostname</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L759"></a><tt class="py-lineno">759</tt>  <tt class="py-line">        <tt id="link-294" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-294', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'starting web server...'</tt><tt class="py-op">)</tt> </tt>
<a name="L760"></a><tt class="py-lineno">760</tt>  <tt class="py-line">        <tt id="link-295" class="py-name"><a title="web2py.gluon.rocket" class="py-name" href="#" onclick="return doclink('link-295', 'rocket', 'link-77');">rocket</a></tt><tt class="py-op">.</tt><tt id="link-296" class="py-name" targets="Variable web2py.gluon.rocket.SERVER_NAME=web2py.gluon.rocket-module.html#SERVER_NAME"><a title="web2py.gluon.rocket.SERVER_NAME" class="py-name" href="#" onclick="return doclink('link-296', 'SERVER_NAME', 'link-296');">SERVER_NAME</a></tt> <tt class="py-op">=</tt> <tt class="py-name">server_name</tt> </tt>
<a name="L761"></a><tt class="py-lineno">761</tt>  <tt class="py-line">        <tt class="py-name">sock_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">]</tt> </tt>
<a name="L762"></a><tt class="py-lineno">762</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ssl_certificate</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ssl_private_key</tt><tt class="py-op">:</tt> </tt>
<a name="L763"></a><tt class="py-lineno">763</tt>  <tt class="py-line">            <tt id="link-297" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-297', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'SSL is off'</tt><tt class="py-op">)</tt> </tt>
<a name="L764"></a><tt class="py-lineno">764</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt id="link-298" class="py-name"><a title="web2py.gluon.rocket" class="py-name" href="#" onclick="return doclink('link-298', 'rocket', 'link-77');">rocket</a></tt><tt class="py-op">.</tt><tt id="link-299" class="py-name" targets="Variable web2py.gluon.rocket.Connection.ssl=web2py.gluon.rocket.Connection-class.html#ssl"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-299', 'ssl', 'link-299');">ssl</a></tt><tt class="py-op">:</tt> </tt>
<a name="L765"></a><tt class="py-lineno">765</tt>  <tt class="py-line">            <tt id="link-300" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-300', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'Python "ssl" module unavailable. SSL is OFF'</tt><tt class="py-op">)</tt> </tt>
<a name="L766"></a><tt class="py-lineno">766</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-301" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-301', 'exists', 'link-33');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">ssl_certificate</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L767"></a><tt class="py-lineno">767</tt>  <tt class="py-line">            <tt id="link-302" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-302', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'unable to open SSL certificate. SSL is OFF'</tt><tt class="py-op">)</tt> </tt>
<a name="L768"></a><tt class="py-lineno">768</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-303" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-303', 'exists', 'link-33');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">ssl_private_key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L769"></a><tt class="py-lineno">769</tt>  <tt class="py-line">            <tt id="link-304" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-304', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'unable to open SSL private key. SSL is OFF'</tt><tt class="py-op">)</tt> </tt>
<a name="L770"></a><tt class="py-lineno">770</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L771"></a><tt class="py-lineno">771</tt>  <tt class="py-line">            <tt class="py-name">sock_list</tt><tt class="py-op">.</tt><tt id="link-305" class="py-name" targets="Method web2py.gluon.template.BlockNode.extend()=web2py.gluon.template.BlockNode-class.html#extend,Method web2py.gluon.template.Content.extend()=web2py.gluon.template.Content-class.html#extend,Method web2py.gluon.template.TemplateParser.extend()=web2py.gluon.template.TemplateParser-class.html#extend"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-305', 'extend', 'link-305');">extend</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">ssl_private_key</tt><tt class="py-op">,</tt> <tt class="py-name">ssl_certificate</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L772"></a><tt class="py-lineno">772</tt>  <tt class="py-line">            <tt id="link-306" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-306', 'logger', 'link-36');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'SSL is ON'</tt><tt class="py-op">)</tt> </tt>
<a name="L773"></a><tt class="py-lineno">773</tt>  <tt class="py-line">        <tt class="py-name">app_info</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'wsgi_app'</tt><tt class="py-op">:</tt> <tt id="link-307" class="py-name" targets="Function web2py.gluon.main.appfactory()=web2py.gluon.main-module.html#appfactory"><a title="web2py.gluon.main.appfactory" class="py-name" href="#" onclick="return doclink('link-307', 'appfactory', 'link-307');">appfactory</a></tt><tt class="py-op">(</tt><tt id="link-308" class="py-name"><a title="web2py.gluon.main.wsgibase" class="py-name" href="#" onclick="return doclink('link-308', 'wsgibase', 'link-240');">wsgibase</a></tt><tt class="py-op">,</tt> </tt>
<a name="L774"></a><tt class="py-lineno">774</tt>  <tt class="py-line">                                           <tt class="py-name">log_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L775"></a><tt class="py-lineno">775</tt>  <tt class="py-line">                                           <tt class="py-name">profiler_filename</tt><tt class="py-op">)</tt> <tt class="py-op">}</tt> </tt>
<a name="L776"></a><tt class="py-lineno">776</tt>  <tt class="py-line"> </tt>
<a name="L777"></a><tt class="py-lineno">777</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-309" class="py-name" targets="Variable web2py.gluon.winservice.Web2pyService.server=web2py.gluon.winservice.Web2pyService-class.html#server"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-309', 'server', 'link-309');">server</a></tt> <tt class="py-op">=</tt> <tt id="link-310" class="py-name"><a title="web2py.gluon.rocket" class="py-name" href="#" onclick="return doclink('link-310', 'rocket', 'link-77');">rocket</a></tt><tt class="py-op">.</tt><tt id="link-311" class="py-name" targets="Class web2py.gluon.rocket.Rocket=web2py.gluon.rocket.Rocket-class.html"><a title="web2py.gluon.rocket.Rocket" class="py-name" href="#" onclick="return doclink('link-311', 'Rocket', 'link-311');">Rocket</a></tt><tt class="py-op">(</tt><tt class="py-name">interfaces</tt> <tt class="py-keyword">or</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">sock_list</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L778"></a><tt class="py-lineno">778</tt>  <tt class="py-line">                                    <tt class="py-name">method</tt><tt class="py-op">=</tt><tt class="py-string">'wsgi'</tt><tt class="py-op">,</tt> </tt>
<a name="L779"></a><tt class="py-lineno">779</tt>  <tt class="py-line">                                    <tt class="py-name">app_info</tt><tt class="py-op">=</tt><tt class="py-name">app_info</tt><tt class="py-op">,</tt> </tt>
<a name="L780"></a><tt class="py-lineno">780</tt>  <tt class="py-line">                                    <tt class="py-name">min_threads</tt><tt class="py-op">=</tt><tt class="py-name">min_threads</tt><tt class="py-op">,</tt> </tt>
<a name="L781"></a><tt class="py-lineno">781</tt>  <tt class="py-line">                                    <tt class="py-name">max_threads</tt><tt class="py-op">=</tt><tt class="py-name">max_threads</tt><tt class="py-op">,</tt> </tt>
<a name="L782"></a><tt class="py-lineno">782</tt>  <tt class="py-line">                                    <tt class="py-name">queue_size</tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">request_queue_size</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L783"></a><tt class="py-lineno">783</tt>  <tt class="py-line">                                    <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L784"></a><tt class="py-lineno">784</tt>  <tt class="py-line">                                    <tt class="py-name">handle_signals</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L785"></a><tt class="py-lineno">785</tt>  <tt class="py-line">                                    <tt class="py-op">)</tt> </tt>
</div><a name="L786"></a><tt class="py-lineno">786</tt>  <tt class="py-line"> </tt>
<a name="L787"></a><tt class="py-lineno">787</tt>  <tt class="py-line"> </tt>
<a name="HttpServer.start"></a><div id="HttpServer.start-def"><a name="L788"></a><tt class="py-lineno">788</tt> <a class="py-toggle" href="#" id="HttpServer.start-toggle" onclick="return toggle('HttpServer.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main.HttpServer-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HttpServer.start-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HttpServer.start-expanded"><a name="L789"></a><tt class="py-lineno">789</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L790"></a><tt class="py-lineno">790</tt>  <tt class="py-line"><tt class="py-docstring">        start the web server</tt> </tt>
<a name="L791"></a><tt class="py-lineno">791</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L792"></a><tt class="py-lineno">792</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L793"></a><tt class="py-lineno">793</tt>  <tt class="py-line">            <tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">signal</tt><tt class="py-op">(</tt><tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">SIGTERM</tt><tt class="py-op">,</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-312" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-312', 'b', 'link-312');">b</a></tt><tt class="py-op">,</tt> <tt id="link-313" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-313', 's', 'link-261');">s</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">:</tt> <tt id="link-314" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-314', 's', 'link-261');">s</a></tt><tt class="py-op">.</tt><tt id="link-315" class="py-name" targets="Method web2py.gluon.main.HttpServer.stop()=web2py.gluon.main.HttpServer-class.html#stop,Method web2py.gluon.rocket.Monitor.stop()=web2py.gluon.rocket.Monitor-class.html#stop,Method web2py.gluon.rocket.Rocket.stop()=web2py.gluon.rocket.Rocket-class.html#stop,Method web2py.gluon.rocket.ThreadPool.stop()=web2py.gluon.rocket.ThreadPool-class.html#stop,Method web2py.gluon.widget.web2pyDialog.stop()=web2py.gluon.widget.web2pyDialog-class.html#stop,Method web2py.gluon.winservice.Service.stop()=web2py.gluon.winservice.Service-class.html#stop,Method web2py.gluon.winservice.Web2pyService.stop()=web2py.gluon.winservice.Web2pyService-class.html#stop"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-315', 'stop', 'link-315');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L794"></a><tt class="py-lineno">794</tt>  <tt class="py-line">            <tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">signal</tt><tt class="py-op">(</tt><tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">SIGINT</tt><tt class="py-op">,</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-316" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-316', 'b', 'link-312');">b</a></tt><tt class="py-op">,</tt> <tt id="link-317" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-317', 's', 'link-261');">s</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">:</tt> <tt id="link-318" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-318', 's', 'link-261');">s</a></tt><tt class="py-op">.</tt><tt id="link-319" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-319', 'stop', 'link-315');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L795"></a><tt class="py-lineno">795</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L796"></a><tt class="py-lineno">796</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L797"></a><tt class="py-lineno">797</tt>  <tt class="py-line">        <tt id="link-320" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-320', 'write_file', 'link-6');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pid_filename</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getpid</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L798"></a><tt class="py-lineno">798</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-321" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-321', 'server', 'link-309');">server</a></tt><tt class="py-op">.</tt><tt id="link-322" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-322', 'start', 'link-245');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L799"></a><tt class="py-lineno">799</tt>  <tt class="py-line"> </tt>
<a name="HttpServer.stop"></a><div id="HttpServer.stop-def"><a name="L800"></a><tt class="py-lineno">800</tt> <a class="py-toggle" href="#" id="HttpServer.stop-toggle" onclick="return toggle('HttpServer.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.main.HttpServer-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stoplogging</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HttpServer.stop-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HttpServer.stop-expanded"><a name="L801"></a><tt class="py-lineno">801</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L802"></a><tt class="py-lineno">802</tt>  <tt class="py-line"><tt class="py-docstring">        stop cron and the web server</tt> </tt>
<a name="L803"></a><tt class="py-lineno">803</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L804"></a><tt class="py-lineno">804</tt>  <tt class="py-line">        <tt id="link-323" class="py-name"><a title="web2py.gluon.newcron" class="py-name" href="#" onclick="return doclink('link-323', 'newcron', 'link-65');">newcron</a></tt><tt class="py-op">.</tt><tt id="link-324" class="py-name" targets="Function web2py.gluon.newcron.stopcron()=web2py.gluon.newcron-module.html#stopcron"><a title="web2py.gluon.newcron.stopcron" class="py-name" href="#" onclick="return doclink('link-324', 'stopcron', 'link-324');">stopcron</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L805"></a><tt class="py-lineno">805</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-325" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-325', 'server', 'link-309');">server</a></tt><tt class="py-op">.</tt><tt id="link-326" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-326', 'stop', 'link-315');">stop</a></tt><tt class="py-op">(</tt><tt class="py-name">stoplogging</tt><tt class="py-op">)</tt> </tt>
<a name="L806"></a><tt class="py-lineno">806</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L807"></a><tt class="py-lineno">807</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pid_filename</tt><tt class="py-op">)</tt> </tt>
<a name="L808"></a><tt class="py-lineno">808</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L809"></a><tt class="py-lineno">809</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="L810"></a><tt class="py-lineno">810</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:09 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.main.HttpServer-class.html version [092b33f577].






















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.main.HttpServer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.main-module.html">Module&nbsp;main</a> ::
        Class&nbsp;HttpServer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.main.HttpServer-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HttpServer</h1><span class="codelink"><a href="web2py.gluon.main-pysrc.html#HttpServer">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">HttpServer</strong>
</pre>

<hr />
the web2py web server (Rocket)<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.main.HttpServer-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ip</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">127.0.0.1</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">8000</span>,
        <span class="summary-sig-arg">password</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pid_filename</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">httpserver.pid</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">log_filename</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">httpserver.log</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">profiler_filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">ssl_certificate</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">ssl_private_key</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">min_threads</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">max_threads</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">server_name</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">request_queue_size</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">shutdown_timeout</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">interfaces</span>=<span class="summary-sig-default">1</span>)</span><br />
      starts the web server.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#HttpServer.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">self</span>)</span><br />
      start the web server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#HttpServer.start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop"></a><span class="summary-sig-name">stop</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stoplogging</span>=<span class="summary-sig-default">True</span>)</span><br />
      stop cron and the web server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.main-pysrc.html#HttpServer.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ip</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">127.0.0.1</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">port</span>=<span class="sig-default">8000</span>,
        <span class="sig-arg">password</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pid_filename</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">httpserver.pid</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">log_filename</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">httpserver.log</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">profiler_filename</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">ssl_certificate</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">ssl_private_key</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">min_threads</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">max_threads</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">server_name</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">request_queue_size</span>=<span class="sig-default">5</span>,
        <span class="sig-arg">timeout</span>=<span class="sig-default">10</span>,
        <span class="sig-arg">shutdown_timeout</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">path</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">interfaces</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.main-pysrc.html#HttpServer.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  starts the web server.
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.myregex-module.html version [27c3fcabeb].







































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.myregex</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;myregex
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.myregex-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module myregex</h1><span class="codelink"><a href="web2py.gluon.myregex-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.myregex-module.html#regex_tables" class="summary-name">regex_tables</a> = <code title="re.compile(r'(?m)^\w+\.define_table\(\s*[\'&quot;](?P&lt;name&gt;[\w_]+)[\'&quot;]')">re.compile(r'<code class="re-flags">(?m)</code>^\w<code class="re-op">+</code>\.define_table\(\s<code class="re-op">*</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code><code class="re-group">(?</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.myregex-module.html#regex_expose" class="summary-name">regex_expose</a> = <code title="re.compile(r'(?m)^def\s+(?P&lt;name&gt;(?:[a-zA-Z0-9]\w*)|(?:_[a-zA-Z0-9]\w*\
))\(\)\s*:')">re.compile(r'<code class="re-flags">(?m)</code>^def\s<code class="re-op">+</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">(?:</code><code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z0<code class="re-op">-</code>9<code class="re-group">]</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.myregex-module.html#regex_include" class="summary-name">regex_include</a> = <code title="re.compile(r'(?P&lt;all&gt;\{\{\s*include\s+[\'&quot;](?P&lt;name&gt;[^\'&quot;]*)[\'&quot;]\s*\}\
\})')">re.compile(r'<code class="re-group">(?P&lt;</code><code class="re-ref">all</code><code class="re-group">&gt;</code>\{\{\s<code class="re-op">*</code>include\s<code class="re-op">+</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code><code class="re-group">(?P</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.myregex-module.html#regex_extend" class="summary-name">regex_extend</a> = <code title="re.compile(r'(?m)^\s*(?P&lt;all&gt;\{\{\s*extend\s+[\'&quot;](?P&lt;name&gt;[^\'&quot;]+)[\'\
&quot;]\s*\}\})')">re.compile(r'<code class="re-flags">(?m)</code>^\s<code class="re-op">*</code><code class="re-group">(?P&lt;</code><code class="re-ref">all</code><code class="re-group">&gt;</code>\{\{\s<code class="re-op">*</code>extend\s<code class="re-op">+</code><code class="re-group">[</code>\<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="regex_tables"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_tables</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?m)</code>^\w<code class="re-op">+</code>\.define_table\(\s<code class="re-op">*</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_expose"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_expose</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?m)</code>^def\s<code class="re-op">+</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">(?:</code><code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z0<code class="re-op">-</code>9<code class="re-group">]</code>\w<code class="re-op">*</code><code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>_<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z0<code class="re-op">-</code>9<code class="re-group">]</code>\w<code class="re-op">*</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-group">)</code>\(\)\s<code class="re-op">*</code>:')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_include"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_include</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-group">(?P&lt;</code><code class="re-ref">all</code><code class="re-group">&gt;</code>\{\{\s<code class="re-op">*</code>include\s<code class="re-op">+</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">[</code><code class="re-op">^</code>\'&quot;<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code>\s<code class="re-op">*</code>\}<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
\}<code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_extend"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_extend</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?m)</code>^\s<code class="re-op">*</code><code class="re-group">(?P&lt;</code><code class="re-ref">all</code><code class="re-group">&gt;</code>\{\{\s<code class="re-op">*</code>extend\s<code class="re-op">+</code><code class="re-group">[</code>\'&quot;<code class="re-group">]</code><code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">[</code><code class="re-op">^</code>\'&quot;<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">[</code>\'<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
&quot;<code class="re-group">]</code>\s<code class="re-op">*</code>\}\}<code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.myregex-pysrc.html version [51b8151960].























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.myregex</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;myregex
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.myregex-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.myregex-module.html">Module web2py.gluon.myregex</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment"># pattern to find defined tables</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.myregex.regex_tables=web2py.gluon.myregex-module.html#regex_tables"><a title="web2py.gluon.myregex.regex_tables" class="py-name" href="#" onclick="return doclink('link-0', 'regex_tables', 'link-0');">regex_tables</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt>\ </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">    <tt class="py-string">"""^[\w]+\.define_table\(\s*[\'\"](?P&lt;name&gt;[\w_]+)[\'\"]"""</tt><tt class="py-op">,</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">    <tt class="py-name">flags</tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">M</tt><tt class="py-op">)</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-comment"># pattern to find exposed functions in controller</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable web2py.gluon.myregex.regex_expose=web2py.gluon.myregex-module.html#regex_expose"><a title="web2py.gluon.myregex.regex_expose" class="py-name" href="#" onclick="return doclink('link-1', 'regex_expose', 'link-1');">regex_expose</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt>\ </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">    <tt class="py-string">'^def\s+(?P&lt;name&gt;(?:[a-zA-Z0-9]\w*)|(?:_[a-zA-Z0-9]\w*))\(\)\s*:'</tt><tt class="py-op">,</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">    <tt class="py-name">flags</tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">M</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable web2py.gluon.myregex.regex_include=web2py.gluon.myregex-module.html#regex_include"><a title="web2py.gluon.myregex.regex_include" class="py-name" href="#" onclick="return doclink('link-2', 'regex_include', 'link-2');">regex_include</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt>\ </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">    <tt class="py-string">'(?P&lt;all&gt;\{\{\s*include\s+[\'"](?P&lt;name&gt;[^\'"]*)[\'"]\s*\}\})'</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable web2py.gluon.myregex.regex_extend=web2py.gluon.myregex-module.html#regex_extend"><a title="web2py.gluon.myregex.regex_extend" class="py-name" href="#" onclick="return doclink('link-3', 'regex_extend', 'link-3');">regex_extend</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt>\ </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">    <tt class="py-string">'^\s*(?P&lt;all&gt;\{\{\s*extend\s+[\'"](?P&lt;name&gt;[^\'"]+)[\'"]\s*\}\})'</tt><tt class="py-op">,</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">MULTILINE</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron-module.html version [f86e28bd63].


































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;newcron
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module newcron</h1><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html">source&nbsp;code</a></span><br /><br />
Created by Attila Csipa &lt;web2py@csipa.in.rs&gt; Modified by Massimo
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt;<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.newcron.extcron-class.html" class="summary-name">extcron</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.newcron.hardcron-class.html" class="summary-name">hardcron</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.newcron.softcron-class.html" class="summary-name">softcron</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.newcron.Token-class.html" class="summary-name">Token</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.newcron.cronlauncher-class.html" class="summary-name">cronlauncher</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stopcron"></a><span class="summary-sig-name">stopcron</span>()</span><br />
      graceful shutdown of cron</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#stopcron">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rangetolist"></a><span class="summary-sig-name">rangetolist</span>(<span class="summary-sig-arg">s</span>,
        <span class="summary-sig-arg">period</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">min</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#rangetolist">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parsecronline"></a><span class="summary-sig-name">parsecronline</span>(<span class="summary-sig-arg">line</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#parsecronline">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="crondance"></a><span class="summary-sig-name">crondance</span>(<span class="summary-sig-arg">applications_parent</span>,
        <span class="summary-sig-arg">ctype</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">soft</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">startup</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#crondance">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py.cron&quot;)">logging.getLogger(&quot;web2py.cron&quot;)</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_cron_stopping"></a><span class="summary-name">_cron_stopping</span> = <code title="True">True</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron-pysrc.html version [9bd2024050].





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;newcron
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.newcron-module.html">Module web2py.gluon.newcron</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">Created by Attila Csipa &lt;web2py@csipa.in.rs&gt;</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Modified by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">threading</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-0', 'time', 'link-0');">time</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sched</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-1', 'datetime', 'link-1');">datetime</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">platform</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.portalocker=web2py.gluon.portalocker-module.html"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-2', 'portalocker', 'link-2');">portalocker</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-3', 'fileutils', 'link-3');">fileutils</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cPickle</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-4', 'settings', 'link-4');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-5', 'global_settings', 'link-5');">global_settings</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-6', 'logger', 'link-6');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py.cron"</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable web2py.gluon.newcron._cron_stopping=web2py.gluon.newcron-module.html#_cron_stopping"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-7', '_cron_stopping', 'link-7');">_cron_stopping</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="stopcron"></a><div id="stopcron-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="stopcron-toggle" onclick="return toggle('stopcron');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron-module.html#stopcron">stopcron</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="stopcron-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="stopcron-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-docstring">"graceful shutdown of cron"</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-8" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-8', '_cron_stopping', 'link-7');">_cron_stopping</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt id="link-9" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-9', '_cron_stopping', 'link-7');">_cron_stopping</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"> </tt>
<a name="extcron"></a><div id="extcron-def"><a name="L31"></a><tt class="py-lineno"> 31</tt> <a class="py-toggle" href="#" id="extcron-toggle" onclick="return toggle('extcron');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.newcron.extcron-class.html">extcron</a><tt class="py-op">(</tt><tt class="py-base-class">threading</tt><tt class="py-op">.</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="extcron-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="extcron-expanded"><a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="extcron.__init__"></a><div id="extcron.__init__-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="extcron.__init__-toggle" onclick="return toggle('extcron.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.extcron-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">applications_parent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="extcron.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="extcron.__init__-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-10', '__init__', 'link-10');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">setDaemon</tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">applications_parent</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt id="link-11" class="py-name" targets="Function web2py.gluon.newcron.crondance()=web2py.gluon.newcron-module.html#crondance"><a title="web2py.gluon.newcron.crondance" class="py-name" href="#" onclick="return doclink('link-11', 'crondance', 'link-11');">crondance</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'external'</tt><tt class="py-op">,</tt> <tt class="py-name">startup</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
</div><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"> </tt>
<a name="extcron.run"></a><div id="extcron.run-def"><a name="L39"></a><tt class="py-lineno"> 39</tt> <a class="py-toggle" href="#" id="extcron.run-toggle" onclick="return toggle('extcron.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.extcron-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="extcron.run-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="extcron.run-expanded"><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-12', '_cron_stopping', 'link-7');">_cron_stopping</a></tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt id="link-13" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-13', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Module web2py.gluon.debug=web2py.gluon.debug-module.html"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-14', 'debug', 'link-14');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'external cron invocation'</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">            <tt id="link-15" class="py-name"><a title="web2py.gluon.newcron.crondance" class="py-name" href="#" onclick="return doclink('link-15', 'crondance', 'link-11');">crondance</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'external'</tt><tt class="py-op">,</tt> <tt class="py-name">startup</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"> </tt>
<a name="hardcron"></a><div id="hardcron-def"><a name="L44"></a><tt class="py-lineno"> 44</tt> <a class="py-toggle" href="#" id="hardcron-toggle" onclick="return toggle('hardcron');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.newcron.hardcron-class.html">hardcron</a><tt class="py-op">(</tt><tt class="py-base-class">threading</tt><tt class="py-op">.</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="hardcron-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="hardcron-expanded"><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"> </tt>
<a name="hardcron.__init__"></a><div id="hardcron.__init__-def"><a name="L46"></a><tt class="py-lineno"> 46</tt> <a class="py-toggle" href="#" id="hardcron.__init__-toggle" onclick="return toggle('hardcron.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.hardcron-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">applications_parent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="hardcron.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="hardcron.__init__-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-16', '__init__', 'link-10');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">setDaemon</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">applications_parent</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt id="link-17" class="py-name"><a title="web2py.gluon.newcron.crondance" class="py-name" href="#" onclick="return doclink('link-17', 'crondance', 'link-11');">crondance</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'hard'</tt><tt class="py-op">,</tt> <tt class="py-name">startup</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
</div><a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"> </tt>
<a name="hardcron.launch"></a><div id="hardcron.launch-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="hardcron.launch-toggle" onclick="return toggle('hardcron.launch');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.hardcron-class.html#launch">launch</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="hardcron.launch-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="hardcron.launch-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-18', '_cron_stopping', 'link-7');">_cron_stopping</a></tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">            <tt id="link-19" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-19', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-20', 'debug', 'link-14');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'hard cron invocation'</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">            <tt id="link-21" class="py-name"><a title="web2py.gluon.newcron.crondance" class="py-name" href="#" onclick="return doclink('link-21', 'crondance', 'link-11');">crondance</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'hard'</tt><tt class="py-op">,</tt> <tt class="py-name">startup</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
</div><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="hardcron.run"></a><div id="hardcron.run-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="hardcron.run-toggle" onclick="return toggle('hardcron.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.hardcron-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="hardcron.run-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="hardcron.run-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt id="link-22" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-22', 's', 'link-22');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sched</tt><tt class="py-op">.</tt><tt class="py-name">scheduler</tt><tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-23', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-24', 'time', 'link-0');">time</a></tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-25', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt id="link-26" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-26', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'Hard cron daemon started'</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-27', '_cron_stopping', 'link-7');">_cron_stopping</a></tt><tt class="py-op">:</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-28', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-29', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">            <tt id="link-30" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-30', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">enter</tt><tt class="py-op">(</tt><tt class="py-number">60</tt> <tt class="py-op">-</tt> <tt class="py-name">now</tt> <tt class="py-op">%</tt> <tt class="py-number">60</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method web2py.gluon.newcron.hardcron.launch()=web2py.gluon.newcron.hardcron-class.html#launch"><a title="web2py.gluon.newcron.hardcron.launch" class="py-name" href="#" onclick="return doclink('link-31', 'launch', 'link-31');">launch</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">            <tt id="link-32" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-32', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Method web2py.gluon.newcron.cronlauncher.run()=web2py.gluon.newcron.cronlauncher-class.html#run,Method web2py.gluon.newcron.extcron.run()=web2py.gluon.newcron.extcron-class.html#run,Method web2py.gluon.newcron.hardcron.run()=web2py.gluon.newcron.hardcron-class.html#run,Method web2py.gluon.newcron.softcron.run()=web2py.gluon.newcron.softcron-class.html#run,Method web2py.gluon.rocket.Listener.run()=web2py.gluon.rocket.Listener-class.html#run,Method web2py.gluon.rocket.Monitor.run()=web2py.gluon.rocket.Monitor-class.html#run,Method web2py.gluon.rocket.Worker.run()=web2py.gluon.rocket.Worker-class.html#run,Function web2py.gluon.shell.run()=web2py.gluon.shell-module.html#run,Method web2py.gluon.tools.Service.run()=web2py.gluon.tools.Service-class.html#run"><a title="web2py.gluon.newcron.cronlauncher.run
web2py.gluon.newcron.extcron.run
web2py.gluon.newcron.hardcron.run
web2py.gluon.newcron.softcron.run
web2py.gluon.rocket.Listener.run
web2py.gluon.rocket.Monitor.run
web2py.gluon.rocket.Worker.run
web2py.gluon.shell.run
web2py.gluon.tools.Service.run" class="py-name" href="#" onclick="return doclink('link-33', 'run', 'link-33');">run</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"> </tt>
<a name="softcron"></a><div id="softcron-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="softcron-toggle" onclick="return toggle('softcron');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.newcron.softcron-class.html">softcron</a><tt class="py-op">(</tt><tt class="py-base-class">threading</tt><tt class="py-op">.</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="softcron-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="softcron-expanded"><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"> </tt>
<a name="softcron.__init__"></a><div id="softcron.__init__-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="softcron.__init__-toggle" onclick="return toggle('softcron.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.softcron-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">applications_parent</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="softcron.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="softcron.__init__-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-34', '__init__', 'link-10');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">applications_parent</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt id="link-35" class="py-name"><a title="web2py.gluon.newcron.crondance" class="py-name" href="#" onclick="return doclink('link-35', 'crondance', 'link-11');">crondance</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'soft'</tt><tt class="py-op">,</tt> <tt class="py-name">startup</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
</div><a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"> </tt>
<a name="softcron.run"></a><div id="softcron.run-def"><a name="L72"></a><tt class="py-lineno"> 72</tt> <a class="py-toggle" href="#" id="softcron.run-toggle" onclick="return toggle('softcron.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.softcron-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="softcron.run-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="softcron.run-expanded"><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-36" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-36', '_cron_stopping', 'link-7');">_cron_stopping</a></tt><tt class="py-op">:</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">            <tt id="link-37" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-37', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-38', 'debug', 'link-14');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'soft cron invocation'</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">            <tt id="link-39" class="py-name"><a title="web2py.gluon.newcron.crondance" class="py-name" href="#" onclick="return doclink('link-39', 'crondance', 'link-11');">crondance</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'soft'</tt><tt class="py-op">,</tt> <tt class="py-name">startup</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"> </tt>
<a name="Token"></a><div id="Token-def"><a name="L77"></a><tt class="py-lineno"> 77</tt> <a class="py-toggle" href="#" id="Token-toggle" onclick="return toggle('Token');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.newcron.Token-class.html">Token</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Token-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Token-expanded"><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="Token.__init__"></a><div id="Token.__init__-def"><a name="L79"></a><tt class="py-lineno"> 79</tt> <a class="py-toggle" href="#" id="Token.__init__-toggle" onclick="return toggle('Token.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.Token-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Token.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Token.__init__-expanded"><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-40', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">'cron.master'</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-41', 'exists', 'link-41');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">            <tt id="link-42" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-42', 'fileutils', 'link-3');">fileutils</a></tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-43', 'write_file', 'link-43');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt id="link-44" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-44', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-45', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"> </tt>
<a name="Token.acquire"></a><div id="Token.acquire-def"><a name="L86"></a><tt class="py-lineno"> 86</tt> <a class="py-toggle" href="#" id="Token.acquire-toggle" onclick="return toggle('Token.acquire');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.Token-class.html#acquire">acquire</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">startup</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Token.acquire-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Token.acquire-expanded"><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">        returns the time when the lock is acquired or</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">        None if cron already running</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">        lock is implemented by writing a pickle (start, stop) in cron.master</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">        start is time when cron job starts and stop is time when cron completed</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring">        stop == 0 if job started but did not yet complete</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">        if a cron job started within less than 60 seconds, acquire returns None</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-docstring">        if a cron job started before 60 seconds and did not stop,</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-docstring">        a warning is issue "Stale cron.master detected"</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-46" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-46', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-47" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_EX=web2py.gluon.portalocker-module.html#LOCK_EX"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-47', 'LOCK_EX', 'link-47');">LOCK_EX</a></tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">            <tt id="link-48" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-48', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON: Disabled because no file locking'</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-string">'rb+'</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">            <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">            <tt id="link-49" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-49', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name" targets="Function web2py.gluon.portalocker.lock()=web2py.gluon.portalocker-module.html#lock"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-50', 'lock', 'link-50');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">,</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-51', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-52', 'LOCK_EX', 'link-47');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt id="link-53" class="py-name" targets="Method web2py.gluon.main.HttpServer.start()=web2py.gluon.main.HttpServer-class.html#start,Method web2py.gluon.rocket.Rocket.start()=web2py.gluon.rocket.Rocket-class.html#start,Method web2py.gluon.rocket.ThreadPool.start()=web2py.gluon.rocket.ThreadPool-class.html#start,Function web2py.gluon.widget.start()=web2py.gluon.widget-module.html#start,Method web2py.gluon.widget.web2pyDialog.start()=web2py.gluon.widget.web2pyDialog-class.html#start,Method web2py.gluon.winservice.Service.start()=web2py.gluon.winservice.Service-class.html#start,Method web2py.gluon.winservice.Web2pyService.start()=web2py.gluon.winservice.Web2pyService-class.html#start"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-53', 'start', 'link-53');">start</a></tt><tt class="py-op">,</tt> <tt id="link-54" class="py-name" targets="Method web2py.gluon.main.HttpServer.stop()=web2py.gluon.main.HttpServer-class.html#stop,Method web2py.gluon.rocket.Monitor.stop()=web2py.gluon.rocket.Monitor-class.html#stop,Method web2py.gluon.rocket.Rocket.stop()=web2py.gluon.rocket.Rocket-class.html#stop,Method web2py.gluon.rocket.ThreadPool.stop()=web2py.gluon.rocket.ThreadPool-class.html#stop,Method web2py.gluon.widget.web2pyDialog.stop()=web2py.gluon.widget.web2pyDialog-class.html#stop,Method web2py.gluon.winservice.Service.stop()=web2py.gluon.winservice.Service-class.html#stop,Method web2py.gluon.winservice.Web2pyService.stop()=web2py.gluon.winservice.Web2pyService-class.html#stop"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-54', 'stop', 'link-54');">stop</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt>  <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-55', 'load', 'link-55');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-56', 'start', 'link-53');">start</a></tt><tt class="py-op">,</tt> <tt id="link-57" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-57', 'stop', 'link-54');">stop</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">startup</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> <tt class="py-op">-</tt> <tt id="link-58" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-58', 'start', 'link-53');">start</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">59.99</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-59" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-59', 'stop', 'link-54');">stop</a></tt><tt class="py-op">:</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                    <tt class="py-comment"># this happens if previous cron job longer than 1 minute</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt id="link-60" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-60', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON: Stale cron.master detected'</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                <tt id="link-61" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-61', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-62', 'debug', 'link-14');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON: Acquiring lock'</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">                <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dump</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">            <tt id="link-63" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-63', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Function web2py.gluon.portalocker.unlock()=web2py.gluon.portalocker-module.html#unlock"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-64', 'unlock', 'link-64');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ret</tt><tt class="py-op">:</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">            <tt class="py-comment"># do this so no need to release</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-65', 'close', 'link-65');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt>
</div><a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"> </tt>
<a name="Token.release"></a><div id="Token.release-def"><a name="L124"></a><tt class="py-lineno">124</tt> <a class="py-toggle" href="#" id="Token.release-toggle" onclick="return toggle('Token.release');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.Token-class.html#release">release</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Token.release-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Token.release-expanded"><a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"><tt class="py-docstring">        this function writes into cron.master the time when cron job</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">        was completed</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">.</tt><tt class="py-name">closed</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt id="link-66" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-66', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-67', 'lock', 'link-50');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">,</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-68', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-69', 'LOCK_EX', 'link-47');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">            <tt id="link-70" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-70', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-71', 'debug', 'link-14');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON: Releasing cron lock'</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt id="link-72" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-72', 'start', 'link-53');">start</a></tt><tt class="py-op">,</tt> <tt id="link-73" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-73', 'stop', 'link-54');">stop</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt>  <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-74', 'load', 'link-55');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-75" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-75', 'start', 'link-53');">start</a></tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">:</tt> <tt class="py-comment"># if this is my lock</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">                <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dump</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt><tt id="link-76" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-76', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-77', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">            <tt id="link-78" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-78', 'portalocker', 'link-2');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-79', 'unlock', 'link-64');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">master</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-80', 'close', 'link-65');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"> </tt>
<a name="rangetolist"></a><div id="rangetolist-def"><a name="L141"></a><tt class="py-lineno">141</tt> <a class="py-toggle" href="#" id="rangetolist-toggle" onclick="return toggle('rangetolist');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron-module.html#rangetolist">rangetolist</a><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">,</tt> <tt class="py-param">period</tt><tt class="py-op">=</tt><tt class="py-string">'min'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="rangetolist-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="rangetolist-expanded"><a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">    <tt class="py-name">retval</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-81" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-81', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt id="link-82" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-82', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">period</tt> <tt class="py-op">==</tt> <tt class="py-string">'min'</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt id="link-83" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-83', 's', 'link-22');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-84', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'0-59'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">period</tt> <tt class="py-op">==</tt> <tt class="py-string">'hr'</tt><tt class="py-op">:</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">            <tt id="link-85" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-85', 's', 'link-22');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-86" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-86', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'0-23'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">period</tt> <tt class="py-op">==</tt> <tt class="py-string">'dom'</tt><tt class="py-op">:</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">            <tt id="link-87" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-87', 's', 'link-22');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-88" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-88', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'1-31'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">period</tt> <tt class="py-op">==</tt> <tt class="py-string">'mon'</tt><tt class="py-op">:</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">            <tt id="link-89" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-89', 's', 'link-22');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-90', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'1-12'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">period</tt> <tt class="py-op">==</tt> <tt class="py-string">'dow'</tt><tt class="py-op">:</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt id="link-91" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-91', 's', 'link-22');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-92" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-92', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'0-6'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">    <tt id="link-93" class="py-name" targets="Variable web2py.gluon.languages.lazyT.m=web2py.gluon.languages.lazyT-class.html#m"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-93', 'm', 'link-93');">m</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(\d+)-(\d+)/(\d+)'</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">    <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-94', 'm', 'link-93');">m</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-95', 's', 'link-22');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op">%</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">                <tt class="py-name">retval</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-96', 'append', 'link-96');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">retval</tt> </tt>
</div><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="parsecronline"></a><div id="parsecronline-def"><a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="parsecronline-toggle" onclick="return toggle('parsecronline');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron-module.html#parsecronline">parsecronline</a><tt class="py-op">(</tt><tt class="py-param">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="parsecronline-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="parsecronline-expanded"><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">    <tt class="py-name">task</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-97', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@reboot'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@reboot'</tt><tt class="py-op">,</tt> <tt class="py-string">'-1 * * * *'</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-98', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@yearly'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@yearly'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 0 1 1 *'</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-99', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@annually'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@annually'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 0 1 1 *'</tt><tt class="py-op">)</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-100', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@monthly'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@monthly'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 0 1 * *'</tt><tt class="py-op">)</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-101', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@weekly'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@weekly'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 0 * * 0'</tt><tt class="py-op">)</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-102', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@daily'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@daily'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 0 * * *'</tt><tt class="py-op">)</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-103', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@midnight'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@midnight'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 0 * * *'</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-104', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'@hourly'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">        <tt class="py-name">line</tt><tt class="py-op">=</tt><tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'@hourly'</tt><tt class="py-op">,</tt> <tt class="py-string">'0 * * * *'</tt><tt class="py-op">)</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">    <tt id="link-105" class="py-name" targets="Variable web2py.gluon.rewrite.params=web2py.gluon.rewrite-module.html#params"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-105', 'params', 'link-105');">params</a></tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-106', 'strip', 'link-106');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-number">6</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-107" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-107', 'len', 'link-107');">len</a></tt><tt class="py-op">(</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-108', 'params', 'link-105');">params</a></tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">7</tt><tt class="py-op">:</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">    <tt class="py-name">daysofweek</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'sun'</tt><tt class="py-op">:</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-string">'mon'</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-string">'tue'</tt><tt class="py-op">:</tt><tt class="py-number">2</tt><tt class="py-op">,</tt><tt class="py-string">'wed'</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">,</tt><tt class="py-string">'thu'</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">,</tt><tt class="py-string">'fri'</tt><tt class="py-op">:</tt><tt class="py-number">5</tt><tt class="py-op">,</tt><tt class="py-string">'sat'</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">}</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-109', 's', 'link-22');">s</a></tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt id="link-110" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-110', 'params', 'link-105');">params</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">5</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">'min'</tt><tt class="py-op">,</tt> <tt class="py-string">'hr'</tt><tt class="py-op">,</tt> <tt class="py-string">'dom'</tt><tt class="py-op">,</tt> <tt class="py-string">'mon'</tt><tt class="py-op">,</tt> <tt class="py-string">'dow'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-111" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-111', 's', 'link-22');">s</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">'*'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">            <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">            <tt class="py-name">vals</tt> <tt class="py-op">=</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-112', 's', 'link-22');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">val</tt> <tt class="py-keyword">in</tt> <tt class="py-name">vals</tt><tt class="py-op">:</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">val</tt> <tt class="py-op">!=</tt> <tt class="py-string">'-1'</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'-'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">val</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">val</tt><tt class="py-op">:</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">                    <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/1'</tt> <tt class="py-op">%</tt> <tt class="py-name">val</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">val</tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">                    <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">+=</tt> <tt id="link-113" class="py-name" targets="Function web2py.gluon.newcron.rangetolist()=web2py.gluon.newcron-module.html#rangetolist"><a title="web2py.gluon.newcron.rangetolist" class="py-name" href="#" onclick="return doclink('link-113', 'rangetolist', 'link-113');">rangetolist</a></tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">val</tt><tt class="py-op">==</tt><tt class="py-string">'-1'</tt><tt class="py-op">:</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">                    <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-114', 'append', 'link-96');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">id</tt><tt class="py-op">==</tt><tt class="py-string">'dow'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">val</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-115', 'lower', 'link-115');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">daysofweek</tt><tt class="py-op">:</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">                    <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-116', 'append', 'link-96');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">daysofweek</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-117', 'lower', 'link-115');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">    <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-string">'user'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-118" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-118', 'params', 'link-105');">params</a></tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">    <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-string">'cmd'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-119" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-119', 'params', 'link-105');">params</a></tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">]</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">task</tt> </tt>
</div><a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"> </tt>
<a name="cronlauncher"></a><div id="cronlauncher-def"><a name="L203"></a><tt class="py-lineno">203</tt> <a class="py-toggle" href="#" id="cronlauncher-toggle" onclick="return toggle('cronlauncher');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.newcron.cronlauncher-class.html">cronlauncher</a><tt class="py-op">(</tt><tt class="py-base-class">threading</tt><tt class="py-op">.</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="cronlauncher-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="cronlauncher-expanded"><a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"> </tt>
<a name="cronlauncher.__init__"></a><div id="cronlauncher.__init__-def"><a name="L205"></a><tt class="py-lineno">205</tt> <a class="py-toggle" href="#" id="cronlauncher.__init__-toggle" onclick="return toggle('cronlauncher.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.cronlauncher-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cmd</tt><tt class="py-op">,</tt> <tt class="py-param">shell</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="cronlauncher.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="cronlauncher.__init__-expanded"><a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-120', '__init__', 'link-10');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">platform</tt><tt class="py-op">.</tt><tt class="py-name">system</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'Windows'</tt><tt class="py-op">:</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">            <tt id="link-121" class="py-name" targets="Module web2py.gluon.shell=web2py.gluon.shell-module.html"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-121', 'shell', 'link-121');">shell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">cmd</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">            <tt class="py-name">cmd</tt> <tt class="py-op">=</tt> <tt class="py-string">' '</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-122', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">cmd</tt><tt class="py-op">)</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cmd</tt> <tt class="py-op">=</tt> <tt class="py-name">cmd</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-123', 'shell', 'link-121');">shell</a></tt> <tt class="py-op">=</tt> <tt id="link-124" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-124', 'shell', 'link-121');">shell</a></tt> </tt>
</div><a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line"> </tt>
<a name="cronlauncher.run"></a><div id="cronlauncher.run-def"><a name="L214"></a><tt class="py-lineno">214</tt> <a class="py-toggle" href="#" id="cronlauncher.run-toggle" onclick="return toggle('cronlauncher.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron.cronlauncher-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="cronlauncher.run-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="cronlauncher.run-expanded"><a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">subprocess</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">        <tt class="py-name">proc</tt> <tt class="py-op">=</tt> <tt class="py-name">subprocess</tt><tt class="py-op">.</tt><tt class="py-name">Popen</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cmd</tt><tt class="py-op">,</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                                <tt class="py-name">stdin</tt><tt class="py-op">=</tt><tt class="py-name">subprocess</tt><tt class="py-op">.</tt><tt class="py-name">PIPE</tt><tt class="py-op">,</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                                <tt class="py-name">stdout</tt><tt class="py-op">=</tt><tt class="py-name">subprocess</tt><tt class="py-op">.</tt><tt class="py-name">PIPE</tt><tt class="py-op">,</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                                <tt class="py-name">stderr</tt><tt class="py-op">=</tt><tt class="py-name">subprocess</tt><tt class="py-op">.</tt><tt class="py-name">PIPE</tt><tt class="py-op">,</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">                                <tt id="link-125" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-125', 'shell', 'link-121');">shell</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-126', 'shell', 'link-121');">shell</a></tt><tt class="py-op">)</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">stdoutdata</tt><tt class="py-op">,</tt><tt class="py-name">stderrdata</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">proc</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name" targets="Function web2py.gluon.debug.communicate()=web2py.gluon.debug-module.html#communicate"><a title="web2py.gluon.debug.communicate" class="py-name" href="#" onclick="return doclink('link-127', 'communicate', 'link-127');">communicate</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">proc</tt><tt class="py-op">.</tt><tt class="py-name">returncode</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">            <tt id="link-128" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-128', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                <tt class="py-string">'WEB2PY CRON Call returned code %s:\n%s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">                    <tt class="py-op">(</tt><tt class="py-name">proc</tt><tt class="py-op">.</tt><tt class="py-name">returncode</tt><tt class="py-op">,</tt> <tt class="py-name">stdoutdata</tt><tt class="py-op">+</tt><tt class="py-name">stderrdata</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">            <tt id="link-129" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-129', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-130', 'debug', 'link-14');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON Call returned success:\n%s'</tt> \ </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">                              <tt class="py-op">%</tt> <tt class="py-name">stdoutdata</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"> </tt>
<a name="crondance"></a><div id="crondance-def"><a name="L230"></a><tt class="py-lineno">230</tt> <a class="py-toggle" href="#" id="crondance-toggle" onclick="return toggle('crondance');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.newcron-module.html#crondance">crondance</a><tt class="py-op">(</tt><tt class="py-param">applications_parent</tt><tt class="py-op">,</tt> <tt class="py-param">ctype</tt><tt class="py-op">=</tt><tt class="py-string">'soft'</tt><tt class="py-op">,</tt> <tt class="py-param">startup</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="crondance-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="crondance-expanded"><a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">    <tt class="py-name">apppath</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-131', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">applications_parent</tt><tt class="py-op">,</tt><tt class="py-string">'applications'</tt><tt class="py-op">)</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">    <tt class="py-name">cron_path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-132', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">apppath</tt><tt class="py-op">,</tt><tt class="py-string">'admin'</tt><tt class="py-op">,</tt><tt class="py-string">'cron'</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">    <tt class="py-name">token</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name" targets="Class web2py.gluon.newcron.Token=web2py.gluon.newcron.Token-class.html"><a title="web2py.gluon.newcron.Token" class="py-name" href="#" onclick="return doclink('link-133', 'Token', 'link-133');">Token</a></tt><tt class="py-op">(</tt><tt class="py-name">cron_path</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">    <tt class="py-name">cronmaster</tt> <tt class="py-op">=</tt> <tt class="py-name">token</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name" targets="Method web2py.gluon.newcron.Token.acquire()=web2py.gluon.newcron.Token-class.html#acquire"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-134', 'acquire', 'link-134');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-name">startup</tt><tt class="py-op">=</tt><tt class="py-name">startup</tt><tt class="py-op">)</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">cronmaster</tt><tt class="py-op">:</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">    <tt class="py-name">now_s</tt> <tt class="py-op">=</tt> <tt id="link-135" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-135', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">localtime</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">    <tt class="py-name">checks</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'min'</tt><tt class="py-op">,</tt><tt class="py-name">now_s</tt><tt class="py-op">.</tt><tt class="py-name">tm_min</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'hr'</tt><tt class="py-op">,</tt><tt class="py-name">now_s</tt><tt class="py-op">.</tt><tt class="py-name">tm_hour</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'mon'</tt><tt class="py-op">,</tt><tt class="py-name">now_s</tt><tt class="py-op">.</tt><tt class="py-name">tm_mon</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'dom'</tt><tt class="py-op">,</tt><tt class="py-name">now_s</tt><tt class="py-op">.</tt><tt class="py-name">tm_mday</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-string">'dow'</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">now_s</tt><tt class="py-op">.</tt><tt class="py-name">tm_wday</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">%</tt><tt class="py-number">7</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line"> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">    <tt class="py-name">apps</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-136" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-136', 'x', 'link-136');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-137" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-137', 'x', 'link-136');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-138', 'listdir', 'link-138');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">apppath</tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-139', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">apppath</tt><tt class="py-op">,</tt> <tt id="link-140" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-140', 'x', 'link-136');">x</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">app</tt> <tt class="py-keyword">in</tt> <tt class="py-name">apps</tt><tt class="py-op">:</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-141" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-141', '_cron_stopping', 'link-7');">_cron_stopping</a></tt><tt class="py-op">:</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt><tt class="py-op">;</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt id="link-142" class="py-name" targets="Function web2py.gluon.admin.apath()=web2py.gluon.admin-module.html#apath"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-142', 'apath', 'link-142');">apath</a></tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-143', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">apppath</tt><tt class="py-op">,</tt><tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-name">cronpath</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-144', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt id="link-145" class="py-name"><a title="web2py.gluon.admin.apath" class="py-name" href="#" onclick="return doclink('link-145', 'apath', 'link-142');">apath</a></tt><tt class="py-op">,</tt> <tt class="py-string">'cron'</tt><tt class="py-op">)</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-name">crontab</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-146', 'join', 'link-40');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">cronpath</tt><tt class="py-op">,</tt> <tt class="py-string">'crontab'</tt><tt class="py-op">)</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-147', 'exists', 'link-41');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">crontab</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">            <tt class="py-keyword">continue</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">            <tt class="py-name">cronlines</tt> <tt class="py-op">=</tt> <tt id="link-148" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-148', 'fileutils', 'link-3');">fileutils</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name" targets="Function web2py.gluon.fileutils.readlines_file()=web2py.gluon.fileutils-module.html#readlines_file"><a title="web2py.gluon.fileutils.readlines_file" class="py-name" href="#" onclick="return doclink('link-149', 'readlines_file', 'link-149');">readlines_file</a></tt><tt class="py-op">(</tt><tt class="py-name">crontab</tt><tt class="py-op">,</tt> <tt class="py-string">'rt'</tt><tt class="py-op">)</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">            <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-150" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-150', 'x', 'link-136');">x</a></tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-151', 'strip', 'link-106');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-152" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-152', 'x', 'link-136');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">cronlines</tt> <tt class="py-keyword">if</tt> <tt id="link-153" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-153', 'x', 'link-136');">x</a></tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-154', 'strip', 'link-106');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-155" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-155', 'x', 'link-136');">x</a></tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-156', 'strip', 'link-106');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-157" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-157', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'#'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">            <tt class="py-name">tasks</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-158" class="py-name" targets="Function web2py.gluon.newcron.parsecronline()=web2py.gluon.newcron-module.html#parsecronline"><a title="web2py.gluon.newcron.parsecronline" class="py-name" href="#" onclick="return doclink('link-158', 'parsecronline', 'link-158');">parsecronline</a></tt><tt class="py-op">(</tt><tt class="py-name">cline</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">cline</tt> <tt class="py-keyword">in</tt> <tt class="py-name">lines</tt><tt class="py-op">]</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-159" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-159', 'Exception', 'link-159');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">            <tt id="link-160" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-160', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt id="link-161" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-161', 'error', 'link-161');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON: crontab read error %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">            <tt class="py-keyword">continue</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">task</tt> <tt class="py-keyword">in</tt> <tt class="py-name">tasks</tt><tt class="py-op">:</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-162" class="py-name"><a title="web2py.gluon.newcron._cron_stopping" class="py-name" href="#" onclick="return doclink('link-162', '_cron_stopping', 'link-7');">_cron_stopping</a></tt><tt class="py-op">:</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt><tt class="py-op">;</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">            <tt class="py-name">commands</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">executable</tt><tt class="py-op">]</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">            <tt class="py-name">w2p_path</tt> <tt class="py-op">=</tt> <tt id="link-163" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-163', 'fileutils', 'link-3');">fileutils</a></tt><tt class="py-op">.</tt><tt id="link-164" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-164', 'abspath', 'link-164');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py.py'</tt><tt class="py-op">,</tt> <tt id="link-165" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-165', 'gluon', 'link-165');">gluon</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-166', 'exists', 'link-41');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">w2p_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">                <tt class="py-name">commands</tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-167', 'append', 'link-96');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">w2p_path</tt><tt class="py-op">)</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-168" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-168', 'global_settings', 'link-5');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt> <tt class="py-op">!=</tt> <tt id="link-169" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-169', 'global_settings', 'link-5');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">gluon_parent</tt><tt class="py-op">:</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">                <tt class="py-name">commands</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name" targets="Method web2py.gluon.template.BlockNode.extend()=web2py.gluon.template.BlockNode-class.html#extend,Method web2py.gluon.template.Content.extend()=web2py.gluon.template.Content-class.html#extend,Method web2py.gluon.template.TemplateParser.extend()=web2py.gluon.template.TemplateParser-class.html#extend"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-170', 'extend', 'link-170');">extend</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'-f'</tt><tt class="py-op">,</tt> <tt id="link-171" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-171', 'global_settings', 'link-5');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">            <tt class="py-name">citems</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-172" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-172', 'k', 'link-172');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">task</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">task</tt><tt class="py-op">[</tt><tt id="link-173" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-173', 'k', 'link-172');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-174" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-174', 'k', 'link-172');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">checks</tt><tt class="py-op">]</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">            <tt class="py-name">task_min</tt><tt class="py-op">=</tt> <tt class="py-name">task</tt><tt class="py-op">.</tt><tt id="link-175" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-175', 'get', 'link-175');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'min'</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">task</tt><tt class="py-op">:</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">startup</tt> <tt class="py-keyword">and</tt> <tt class="py-name">task_min</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">task_min</tt> <tt class="py-op">!=</tt> <tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-176" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-176', 'b', 'link-176');">b</a></tt><tt class="py-op">:</tt> <tt class="py-name">a</tt> <tt class="py-keyword">or</tt> <tt id="link-177" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-177', 'b', 'link-176');">b</a></tt><tt class="py-op">,</tt> <tt class="py-name">citems</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">            <tt id="link-178" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-178', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'WEB2PY CRON (%s): %s executing %s in %s at %s'</tt> \ </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">                             <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">task</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-179', 'get', 'link-175');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'cmd'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">                                <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getcwd</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-180" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-180', 'datetime', 'link-1');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-181', 'datetime', 'link-1');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">            <tt class="py-name">action</tt><tt class="py-op">,</tt> <tt class="py-name">command</tt><tt class="py-op">,</tt> <tt class="py-name">models</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">task</tt><tt class="py-op">[</tt><tt class="py-string">'cmd'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">command</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-182', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'**'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">,</tt><tt class="py-name">models</tt><tt class="py-op">,</tt><tt class="py-name">command</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-name">command</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">command</tt><tt class="py-op">.</tt><tt id="link-183" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-183', 'startswith', 'link-82');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">,</tt><tt class="py-name">models</tt><tt class="py-op">,</tt><tt class="py-name">command</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">,</tt><tt class="py-string">'-M'</tt><tt class="py-op">,</tt><tt class="py-name">command</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">                <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-name">False</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">action</tt> <tt class="py-keyword">and</tt> <tt class="py-name">command</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-184', 'endswith', 'link-184');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'.py'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">                <tt class="py-name">commands</tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-185', 'extend', 'link-170');">extend</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'-J'</tt><tt class="py-op">,</tt>                <tt class="py-comment"># cron job</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">                                 <tt class="py-name">models</tt><tt class="py-op">,</tt>              <tt class="py-comment"># import models?</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">                                 <tt class="py-string">'-S'</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt>           <tt class="py-comment"># app name</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">                                 <tt class="py-string">'-a'</tt><tt class="py-op">,</tt> <tt class="py-string">'"&lt;recycle&gt;"'</tt><tt class="py-op">,</tt> <tt class="py-comment"># password</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">                                 <tt class="py-string">'-R'</tt><tt class="py-op">,</tt> <tt class="py-name">command</tt><tt class="py-op">)</tt><tt class="py-op">)</tt>      <tt class="py-comment"># command</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">                <tt id="link-186" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-186', 'shell', 'link-121');">shell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">action</tt><tt class="py-op">:</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">                <tt class="py-name">commands</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-187', 'extend', 'link-170');">extend</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'-J'</tt><tt class="py-op">,</tt>                  <tt class="py-comment"># cron job</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">                                 <tt class="py-name">models</tt><tt class="py-op">,</tt>                <tt class="py-comment"># import models?</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">                                 <tt class="py-string">'-S'</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">+</tt><tt class="py-string">'/'</tt><tt class="py-op">+</tt><tt class="py-name">command</tt><tt class="py-op">,</tt> <tt class="py-comment"># app name</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">                                 <tt class="py-string">'-a'</tt><tt class="py-op">,</tt> <tt class="py-string">'"&lt;recycle&gt;"'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt>  <tt class="py-comment"># password</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">                <tt id="link-188" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-188', 'shell', 'link-121');">shell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">                <tt class="py-name">commands</tt> <tt class="py-op">=</tt> <tt class="py-name">command</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">                <tt id="link-189" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-189', 'shell', 'link-121');">shell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">                <tt id="link-190" class="py-name" targets="Class web2py.gluon.newcron.cronlauncher=web2py.gluon.newcron.cronlauncher-class.html"><a title="web2py.gluon.newcron.cronlauncher" class="py-name" href="#" onclick="return doclink('link-190', 'cronlauncher', 'link-190');">cronlauncher</a></tt><tt class="py-op">(</tt><tt class="py-name">commands</tt><tt class="py-op">,</tt> <tt id="link-191" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-191', 'shell', 'link-121');">shell</a></tt><tt class="py-op">=</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-192', 'shell', 'link-121');">shell</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-193', 'start', 'link-53');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-194" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-194', 'Exception', 'link-159');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">                <tt id="link-195" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-195', 'logger', 'link-6');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">                    <tt class="py-string">'WEB2PY CRON: Execution error for %s: %s'</tt> \ </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">                        <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">task</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-196', 'get', 'link-175');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'cmd'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">    <tt class="py-name">token</tt><tt class="py-op">.</tt><tt id="link-197" class="py-name" targets="Method web2py.gluon.newcron.Token.release()=web2py.gluon.newcron.Token-class.html#release"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-197', 'release', 'link-197');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:08 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron.Token-class.html version [9ba2119fd9].






















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron.Token</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.newcron-module.html">Module&nbsp;newcron</a> ::
        Class&nbsp;Token
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron.Token-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Token</h1><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#Token">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Token</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.Token-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#Token.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.Token-class.html#acquire" class="summary-sig-name">acquire</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">startup</span>=<span class="summary-sig-default">True</span>)</span><br />
      returns the time when the lock is acquired or None if cron already
      running</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#Token.acquire">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="release"></a><span class="summary-sig-name">release</span>(<span class="summary-sig-arg">self</span>)</span><br />
      this function writes into cron.master the time when cron job was 
      completed</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#Token.release">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#Token.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="acquire"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">acquire</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">startup</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#Token.acquire">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>returns the time when the lock is acquired or None if cron already 
  running</p>
  lock is implemented by writing a pickle (start, stop) in cron.master 
  start is time when cron job starts and stop is time when cron completed 
  stop == 0 if job started but did not yet complete if a cron job started 
  within less than 60 seconds, acquire returns None if a cron job started 
  before 60 seconds and did not stop, a warning is issue &quot;Stale 
  cron.master detected&quot;
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron.cronlauncher-class.html version [0f2ad75d98].













































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron.cronlauncher</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.newcron-module.html">Module&nbsp;newcron</a> ::
        Class&nbsp;cronlauncher
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron.cronlauncher-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class cronlauncher</h1><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#cronlauncher">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">cronlauncher</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.cronlauncher-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cmd</span>,
        <span class="summary-sig-arg">shell</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#cronlauncher.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.cronlauncher-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#cronlauncher.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cmd</span>,
        <span class="sig-arg">shell</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#cronlauncher.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#cronlauncher.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron.extcron-class.html version [6f5e36ade8].











































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron.extcron</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.newcron-module.html">Module&nbsp;newcron</a> ::
        Class&nbsp;extcron
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron.extcron-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class extcron</h1><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#extcron">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">extcron</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.extcron-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">applications_parent</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#extcron.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.extcron-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#extcron.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">applications_parent</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#extcron.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#extcron.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron.hardcron-class.html version [9abcc7fc37].



























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron.hardcron</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.newcron-module.html">Module&nbsp;newcron</a> ::
        Class&nbsp;hardcron
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron.hardcron-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class hardcron</h1><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#hardcron">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">hardcron</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.hardcron-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">applications_parent</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#hardcron.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="launch"></a><span class="summary-sig-name">launch</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#hardcron.launch">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.hardcron-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#hardcron.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">applications_parent</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#hardcron.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#hardcron.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.newcron.softcron-class.html version [0eda98b583].











































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.newcron.softcron</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.newcron-module.html">Module&nbsp;newcron</a> ::
        Class&nbsp;softcron
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.newcron.softcron-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class softcron</h1><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#softcron">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">softcron</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.softcron-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">applications_parent</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#softcron.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.newcron.softcron-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#softcron.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">applications_parent</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#softcron.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.newcron-pysrc.html#softcron.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.portalocker-module.html version [9831377c12].













































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.portalocker</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;portalocker
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.portalocker-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module portalocker</h1><span class="codelink"><a href="web2py.gluon.portalocker-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

Cross-platform (posix/nt) API for flock-style file locking.

Synopsis:

   import portalocker
   file = open(&quot;somefile&quot;, &quot;r+&quot;)
   portalocker.lock(file, portalocker.LOCK_EX)
   file.seek(12)
   file.write(&quot;foo&quot;)
   file.close()

If you know what you're doing, you may choose to

   portalocker.unlock(file)

before closing the file, but why?

Methods:

   lock( file, flags )
   unlock( file )

Constants:

   LOCK_EX
   LOCK_SH
   LOCK_NB

I learned the win32 technique for locking files from sample code
provided by John Nielsen &lt;nielsenjf@my-deja.com&gt; in the documentation
that accompanies the win32 modules.

Author: Jonathan Feinberg &lt;jdf@pobox.com&gt;
Version: $Id: portalocker.py,v 1.3 2001/05/29 18:47:55 Administrator Exp $

</pre><br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="lock"></a><span class="summary-sig-name">lock</span>(<span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">flags</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.portalocker-pysrc.html#lock">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unlock"></a><span class="summary-sig-name">unlock</span>(<span class="summary-sig-arg">file</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.portalocker-pysrc.html#unlock">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="os_locking"></a><span class="summary-name">os_locking</span> = <code title="'posix'"><code class="variable-quote">'</code><code class="variable-string">posix</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__overlapped"></a><span class="summary-name">__overlapped</span> = <code title="pywintypes.OVERLAPPED()">pywintypes.OVERLAPPED()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LOCK_EX"></a><span class="summary-name">LOCK_EX</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LOCK_SH"></a><span class="summary-name">LOCK_SH</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="LOCK_NB"></a><span class="summary-name">LOCK_NB</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.portalocker-pysrc.html version [752e06577e].











































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.portalocker</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;portalocker
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.portalocker-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.portalocker-module.html">Module web2py.gluon.portalocker</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># portalocker.py - Cross-platform (posix/nt) API for flock-style file locking.</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                  Requires python 1.5.2 or better.</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">Cross-platform (posix/nt) API for flock-style file locking.</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">Synopsis:</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">   import portalocker</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">   file = open(\"somefile\", \"r+\")</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">   portalocker.lock(file, portalocker.LOCK_EX)</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">   file.seek(12)</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">   file.write(\"foo\")</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring">   file.close()</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">If you know what you're doing, you may choose to</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring">   portalocker.unlock(file)</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">before closing the file, but why?</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">Methods:</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">   lock( file, flags )</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-docstring">   unlock( file )</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">Constants:</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">   LOCK_EX</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">   LOCK_SH</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring">   LOCK_NB</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-docstring">I learned the win32 technique for locking files from sample code</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-docstring">provided by John Nielsen &lt;nielsenjf@my-deja.com&gt; in the documentation</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring">that accompanies the win32 modules.</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">Author: Jonathan Feinberg &lt;jdf@pobox.com&gt;</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">Version: $Id: portalocker.py,v 1.3 2001/05/29 18:47:55 Administrator Exp $</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">platform</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-0', 'logger', 'link-0');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable web2py.gluon.portalocker.os_locking=web2py.gluon.portalocker-module.html#os_locking"><a title="web2py.gluon.portalocker.os_locking" class="py-name" href="#" onclick="return doclink('link-1', 'os_locking', 'link-1');">os_locking</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">fcntl</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt id="link-2" class="py-name"><a title="web2py.gluon.portalocker.os_locking" class="py-name" href="#" onclick="return doclink('link-2', 'os_locking', 'link-1');">os_locking</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'posix'</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">win32con</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">win32file</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">pywintypes</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">    <tt id="link-3" class="py-name"><a title="web2py.gluon.portalocker.os_locking" class="py-name" href="#" onclick="return doclink('link-3', 'os_locking', 'link-1');">os_locking</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'windows'</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-4" class="py-name"><a title="web2py.gluon.portalocker.os_locking" class="py-name" href="#" onclick="return doclink('link-4', 'os_locking', 'link-1');">os_locking</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'windows'</tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">    <tt id="link-5" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_EX=web2py.gluon.portalocker-module.html#LOCK_EX"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-5', 'LOCK_EX', 'link-5');">LOCK_EX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">win32con</tt><tt class="py-op">.</tt><tt class="py-name">LOCKFILE_EXCLUSIVE_LOCK</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt id="link-6" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_SH=web2py.gluon.portalocker-module.html#LOCK_SH"><a title="web2py.gluon.portalocker.LOCK_SH" class="py-name" href="#" onclick="return doclink('link-6', 'LOCK_SH', 'link-6');">LOCK_SH</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt>  <tt class="py-comment"># the default</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt id="link-7" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_NB=web2py.gluon.portalocker-module.html#LOCK_NB"><a title="web2py.gluon.portalocker.LOCK_NB" class="py-name" href="#" onclick="return doclink('link-7', 'LOCK_NB', 'link-7');">LOCK_NB</a></tt> <tt class="py-op">=</tt> <tt class="py-name">win32con</tt><tt class="py-op">.</tt><tt class="py-name">LOCKFILE_FAIL_IMMEDIATELY</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt class="py-comment"># is there any reason not to reuse the following structure?</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">    <tt id="link-8" class="py-name" targets="Variable web2py.gluon.portalocker.__overlapped=web2py.gluon.portalocker-module.html#__overlapped"><a title="web2py.gluon.portalocker.__overlapped" class="py-name" href="#" onclick="return doclink('link-8', '__overlapped', 'link-8');">__overlapped</a></tt> <tt class="py-op">=</tt> <tt class="py-name">pywintypes</tt><tt class="py-op">.</tt><tt class="py-name">OVERLAPPED</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="lock"></a><div id="lock-def"><a name="L71"></a><tt class="py-lineno"> 71</tt> <a class="py-toggle" href="#" id="lock-toggle" onclick="return toggle('lock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.portalocker-module.html#lock">lock</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">,</tt> <tt class="py-param">flags</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lock-expanded"><a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt class="py-name">hfile</tt> <tt class="py-op">=</tt> <tt class="py-name">win32file</tt><tt class="py-op">.</tt><tt class="py-name">_get_osfhandle</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Variable web2py.gluon.rocket.Connection.fileno=web2py.gluon.rocket.Connection-class.html#fileno"><a title="web2py.gluon.rocket.Connection.fileno" class="py-name" href="#" onclick="return doclink('link-9', 'fileno', 'link-9');">fileno</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">win32file</tt><tt class="py-op">.</tt><tt class="py-name">LockFileEx</tt><tt class="py-op">(</tt><tt class="py-name">hfile</tt><tt class="py-op">,</tt> <tt class="py-name">flags</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0x7fff0000</tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name"><a title="web2py.gluon.portalocker.__overlapped" class="py-name" href="#" onclick="return doclink('link-10', '__overlapped', 'link-8');">__overlapped</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"> </tt>
<a name="unlock"></a><div id="unlock-def"><a name="L75"></a><tt class="py-lineno"> 75</tt> <a class="py-toggle" href="#" id="unlock-toggle" onclick="return toggle('unlock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.portalocker-module.html#unlock">unlock</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="unlock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="unlock-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-name">hfile</tt> <tt class="py-op">=</tt> <tt class="py-name">win32file</tt><tt class="py-op">.</tt><tt class="py-name">_get_osfhandle</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="web2py.gluon.rocket.Connection.fileno" class="py-name" href="#" onclick="return doclink('link-11', 'fileno', 'link-9');">fileno</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-name">win32file</tt><tt class="py-op">.</tt><tt class="py-name">UnlockFileEx</tt><tt class="py-op">(</tt><tt class="py-name">hfile</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0x7fff0000</tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.portalocker.__overlapped" class="py-name" href="#" onclick="return doclink('link-12', '__overlapped', 'link-8');">__overlapped</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-keyword">elif</tt> <tt id="link-13" class="py-name"><a title="web2py.gluon.portalocker.os_locking" class="py-name" href="#" onclick="return doclink('link-13', 'os_locking', 'link-1');">os_locking</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'posix'</tt><tt class="py-op">:</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt id="link-14" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-14', 'LOCK_EX', 'link-5');">LOCK_EX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">fcntl</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-15', 'LOCK_EX', 'link-5');">LOCK_EX</a></tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt id="link-16" class="py-name"><a title="web2py.gluon.portalocker.LOCK_SH" class="py-name" href="#" onclick="return doclink('link-16', 'LOCK_SH', 'link-6');">LOCK_SH</a></tt> <tt class="py-op">=</tt> <tt class="py-name">fcntl</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="web2py.gluon.portalocker.LOCK_SH" class="py-name" href="#" onclick="return doclink('link-17', 'LOCK_SH', 'link-6');">LOCK_SH</a></tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt id="link-18" class="py-name"><a title="web2py.gluon.portalocker.LOCK_NB" class="py-name" href="#" onclick="return doclink('link-18', 'LOCK_NB', 'link-7');">LOCK_NB</a></tt> <tt class="py-op">=</tt> <tt class="py-name">fcntl</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="web2py.gluon.portalocker.LOCK_NB" class="py-name" href="#" onclick="return doclink('link-19', 'LOCK_NB', 'link-7');">LOCK_NB</a></tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="lock"></a><div id="lock-def"><a name="L85"></a><tt class="py-lineno"> 85</tt> <a class="py-toggle" href="#" id="lock-toggle" onclick="return toggle('lock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.portalocker-module.html#lock">lock</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">,</tt> <tt class="py-param">flags</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lock-expanded"><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-name">fcntl</tt><tt class="py-op">.</tt><tt class="py-name">flock</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.rocket.Connection.fileno" class="py-name" href="#" onclick="return doclink('link-20', 'fileno', 'link-9');">fileno</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">flags</tt><tt class="py-op">)</tt> </tt>
</div><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
<a name="unlock"></a><div id="unlock-def"><a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="unlock-toggle" onclick="return toggle('unlock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.portalocker-module.html#unlock">unlock</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="unlock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="unlock-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-name">fcntl</tt><tt class="py-op">.</tt><tt class="py-name">flock</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.rocket.Connection.fileno" class="py-name" href="#" onclick="return doclink('link-21', 'fileno', 'link-9');">fileno</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">fcntl</tt><tt class="py-op">.</tt><tt class="py-name">LOCK_UN</tt><tt class="py-op">)</tt> </tt>
</div><a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">platform</tt><tt class="py-op">.</tt><tt class="py-name">system</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'Windows'</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt id="link-22" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-22', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-23', 'error', 'link-23');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'no file locking, you must install the win32 extensions from: http://sourceforge.net/projects/pywin32/files/'</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt id="link-24" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-24', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Module web2py.gluon.debug=web2py.gluon.debug-module.html"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-25', 'debug', 'link-25');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'no file locking, this will cause problems'</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt id="link-26" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-26', 'LOCK_EX', 'link-5');">LOCK_EX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt id="link-27" class="py-name"><a title="web2py.gluon.portalocker.LOCK_SH" class="py-name" href="#" onclick="return doclink('link-27', 'LOCK_SH', 'link-6');">LOCK_SH</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">    <tt id="link-28" class="py-name"><a title="web2py.gluon.portalocker.LOCK_NB" class="py-name" href="#" onclick="return doclink('link-28', 'LOCK_NB', 'link-7');">LOCK_NB</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"> </tt>
<a name="lock"></a><div id="lock-def"><a name="L102"></a><tt class="py-lineno">102</tt> <a class="py-toggle" href="#" id="lock-toggle" onclick="return toggle('lock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.portalocker-module.html#lock">lock</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">,</tt> <tt class="py-param">flags</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="lock-expanded"><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="unlock"></a><div id="unlock-def"><a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="unlock-toggle" onclick="return toggle('unlock');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.portalocker-module.html#unlock">unlock</a><tt class="py-op">(</tt><tt class="py-param">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="unlock-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="unlock-expanded"><a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-29" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-29', 'time', 'link-29');">time</a></tt> <tt class="py-keyword">import</tt> <tt id="link-30" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-30', 'time', 'link-29');">time</a></tt><tt class="py-op">,</tt> <tt class="py-name">strftime</tt><tt class="py-op">,</tt> <tt class="py-name">localtime</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt id="link-31" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.log()=web2py.gluon.restricted.RestrictedError-class.html#log,Variable web2py.gluon.rocket.log=web2py.gluon.rocket-module.html#log,Method web2py.gluon.winservice.Service.log()=web2py.gluon.winservice.Service-class.html#log"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-31', 'log', 'link-31');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-string">'log.txt'</tt><tt class="py-op">,</tt> <tt class="py-string">'a+'</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt id="link-32" class="py-name" targets="Function web2py.gluon.portalocker.lock()=web2py.gluon.portalocker-module.html#lock"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-32', 'lock', 'link-32');">lock</a></tt><tt class="py-op">(</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-33', 'log', 'link-31');">log</a></tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-34', 'LOCK_EX', 'link-5');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">    <tt class="py-name">timestamp</tt> <tt class="py-op">=</tt> <tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%m/%d/%Y %H:%M:%S\n'</tt><tt class="py-op">,</tt> <tt class="py-name">localtime</tt><tt class="py-op">(</tt><tt id="link-35" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-35', 'time', 'link-29');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt id="link-36" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-36', 'log', 'link-31');">log</a></tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-37', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">timestamp</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'Wrote lines. Hit enter to release lock.'</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">    <tt class="py-name">dummy</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdin</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.readline()=web2py.gluon.dal.DatabaseStoredFile-class.html#readline,Method web2py.gluon.debug.Pipe.readline()=web2py.gluon.debug.Pipe-class.html#readline,Method web2py.gluon.rocket.ChunkedReader.readline()=web2py.gluon.rocket.ChunkedReader-class.html#readline"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-38', 'readline', 'link-38');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt id="link-39" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-39', 'log', 'link-31');">log</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-40', 'close', 'link-40');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:08 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.reserved_sql_keywords-module.html version [3a8937131a].







































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.reserved_sql_keywords</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;reserved_sql_keywords
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.reserved_sql_keywords-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module reserved_sql_keywords</h1><span class="codelink"><a href="web2py.gluon.reserved_sql_keywords-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__author__"></a><span class="summary-name">__author__</span> = <code title="'Thadeus Burgess &lt;thadeusb@thadeusb.com&gt;'"><code class="variable-quote">'</code><code class="variable-string">Thadeus Burgess &lt;thadeusb@thadeusb.com&gt;</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#COMMON" class="summary-name">COMMON</a> = <code title="set(['ALTER',
     'AND',
     'AS',
     'BY',
     'CASE',
     'CREATE',
     'DELETE',
     'DISTINCT',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">D</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL" class="summary-name">POSTGRESQL</a> = <code title="set(['ALL',
     'ANALYSE',
     'ANALYZE',
     'AND',
     'ANY',
     'ARRAY',
     'AS',
     'ASC',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ANALYSE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ANALYZE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ANY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL_NONRESERVED" class="summary-name">POSTGRESQL_NONRESERVED</a> = <code title="set(['A',
     'ABORT',
     'ABS',
     'ABSENT',
     'ABSOLUTE',
     'ACCESS',
     'ACCORDING',
     'ACTION',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABSENT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD" class="summary-name">FIREBIRD</a> = <code title="set(['ABS',
     'ACTIVE',
     'ADMIN',
     'AFTER',
     'ASCENDING',
     'AUTO',
     'AUTODDL',
     'BASED',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ACTIVE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ADMIN</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AFTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ASCENDING</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD_NONRESERVED" class="summary-name">FIREBIRD_NONRESERVED</a> = <code title="set(['ABS',
     'ACCENT',
     'ACOS',
     'ALWAYS',
     'ASCII_CHAR',
     'ASCII_VAL',
     'ASIN',
     'ATAN',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ACCENT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ACOS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALWAYS</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#MYSQL" class="summary-name">MYSQL</a> = <code title="set(['ACCESSIBLE',
     'ADD',
     'ALL',
     'ALTER',
     'ANALYZE',
     'AND',
     'AS',
     'ASC',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ACCESSIBLE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ANALYZE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#MSSQL" class="summary-name">MSSQL</a> = <code title="set(['ADD',
     'ALL',
     'ALTER',
     'AND',
     'ANY',
     'AS',
     'ASC',
     'AUTHORIZATION',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ANY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ASC</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#ORACLE" class="summary-name">ORACLE</a> = <code title="set(['ACCESS',
     'ADD',
     'ALL',
     'ALTER',
     'AND',
     'ANY',
     'AS',
     'ASC',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ACCESS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ANY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#SQLITE" class="summary-name">SQLITE</a> = <code title="set(['ABORT',
     'ACTION',
     'ADD',
     'AFTER',
     'ALL',
     'ALTER',
     'ANALYZE',
     'AND',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ACTION</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AFTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#JDBCSQLITE" class="summary-name">JDBCSQLITE</a> = <code title="set(['ABORT',
     'ACTION',
     'ADD',
     'AFTER',
     'ALL',
     'ALTER',
     'ANALYZE',
     'AND',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ACTION</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AFTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#JDBCPOSTGRESQL" class="summary-name">JDBCPOSTGRESQL</a> = <code title="set(['ALTER',
     'AND',
     'AS',
     'BY',
     'CASE',
     'CREATE',
     'DELETE',
     'DISTINCT',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CRE</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#INGRES" class="summary-name">INGRES</a> = <code title="set(['ALTER',
     'AND',
     'AS',
     'BY',
     'CASE',
     'CREATE',
     'DELETE',
     'DISTINCT',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">D</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#INFORMIX" class="summary-name">INFORMIX</a> = <code title="set(['ALTER',
     'AND',
     'AS',
     'BY',
     'CASE',
     'CREATE',
     'DELETE',
     'DISTINCT',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#DB2" class="summary-name">DB2</a> = <code title="set(['ALTER',
     'AND',
     'AS',
     'BY',
     'CASE',
     'CREATE',
     'DELETE',
     'DISTINCT',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">DELE</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.reserved_sql_keywords-module.html#ADAPTERS" class="summary-name">ADAPTERS</a> = <code title="{'all': set(['A',
             'ABORT',
             'ABS',
             'ABSENT',
             'ABSOLUTE',
             'ACCENT',
             'ACCESS',
             'ACCESSIBLE',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">all</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABSENT</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ABSOLU</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="COMMON"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">COMMON</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DELETE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DISTINCT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="POSTGRESQL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">POSTGRESQL</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANALYSE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANALYZE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ARRAY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASC</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="POSTGRESQL_NONRESERVED"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">POSTGRESQL_NONRESERVED</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ABSENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ABSOLUTE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACCESS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACCORDING</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACTION</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="FIREBIRD"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">FIREBIRD</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACTIVE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ADMIN</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AFTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASCENDING</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AUTO</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AUTODDL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">BASED</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="FIREBIRD_NONRESERVED"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">FIREBIRD_NONRESERVED</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACCENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACOS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALWAYS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASCII_CHAR</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASCII_VAL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASIN</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ATAN</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="MYSQL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">MYSQL</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ACCESSIBLE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANALYZE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASC</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="MSSQL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">MSSQL</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASC</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AUTHORIZATION</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ORACLE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ORACLE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ACCESS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ASC</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="SQLITE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">SQLITE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACTION</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AFTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANALYZE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="JDBCSQLITE"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">JDBCSQLITE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ACTION</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ADD</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AFTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALL</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">ANALYZE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="JDBCPOSTGRESQL"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">JDBCPOSTGRESQL</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DELETE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DISTINCT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="INGRES"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">INGRES</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DELETE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DISTINCT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="INFORMIX"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">INFORMIX</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DELETE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DISTINCT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="DB2"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">DB2</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">ALTER</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AND</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">AS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">BY</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CASE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">CREATE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DELETE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">DISTINCT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ADAPTERS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ADAPTERS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">all</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ABORT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ABS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ABSENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ABSOLUTE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ACCENT</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ACCESS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
             <code class="variable-quote">'</code><code class="variable-string">ACCESSIBLE</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.reserved_sql_keywords-pysrc.html version [acfd6e6533].















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.reserved_sql_keywords</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;reserved_sql_keywords
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.reserved_sql_keywords-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.reserved_sql_keywords-module.html">Module web2py.gluon.reserved_sql_keywords</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment"># encoding utf-8</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.__author__=web2py.gluon.reserved_sql_keywords-module.html#__author__"><a title="web2py.gluon.reserved_sql_keywords.__author__" class="py-name" href="#" onclick="return doclink('link-0', '__author__', 'link-0');">__author__</a></tt> <tt class="py-op">=</tt> <tt class="py-docstring">"Thadeus Burgess &lt;thadeusb@thadeusb.com&gt;"</tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-comment">#    we classify as "non-reserved" those key words that are explicitly known</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    to the parser but are allowed as column or table names. Some key words</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    that are otherwise non-reserved cannot be used as function or data type n</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    ames and are in the nonreserved list. (Most of these words represent</tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    built-in functions or data types with special syntax. The function</tt> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    or type is still available but it cannot be redefined by the user.)</tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    Labeled "reserved" are those tokens that are not allowed as column or</tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    table names. Some reserved key words are allowable as names for</tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    functions or data typesself.</tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-comment"># Note at the bottom of the list is a dict containing references to the</tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># tuples, and also if you add a list don't forget to remove its default</tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># set of COMMON.</tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-comment"># Keywords that are adapter specific. Such as a list of "postgresql"</tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># or "mysql" keywords</tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-comment"># These are keywords that are common to all SQL dialects, and should</tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># never be used as a table or column. Even if you use one of these</tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># the cursor will throw an OperationalError for the SQL syntax.</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-1" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.COMMON=web2py.gluon.reserved_sql_keywords-module.html#COMMON"><a title="web2py.gluon.reserved_sql_keywords.COMMON" class="py-name" href="#" onclick="return doclink('link-1', 'COMMON', 'link-1');">COMMON</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line">    <tt class="py-string">'INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line">    <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line">    <tt class="py-string">'UPDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line">    <tt class="py-string">'DROP'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line">    <tt class="py-string">'CREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line">    <tt class="py-string">'ALTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"> </tt>
<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line">    <tt class="py-string">'WHERE'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line">    <tt class="py-string">'FROM'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line">    <tt class="py-string">'INNER'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">    <tt class="py-string">'JOIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line">    <tt class="py-string">'AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">    <tt class="py-string">'OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">    <tt class="py-string">'LIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">    <tt class="py-string">'IN'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">    <tt class="py-string">'SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line"> </tt>
<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">    <tt class="py-string">'BY'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">    <tt class="py-string">'GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">    <tt class="py-string">'ORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">    <tt class="py-string">'LEFT'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">    <tt class="py-string">'OUTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line"> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">    <tt class="py-string">'IF'</tt><tt class="py-op">,</tt> </tt>
<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">    <tt class="py-string">'END'</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">    <tt class="py-string">'THEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line">    <tt class="py-string">'LOOP'</tt><tt class="py-op">,</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">    <tt class="py-string">'AS'</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">    <tt class="py-string">'ELSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line">    <tt class="py-string">'FOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line">    <tt class="py-string">'CASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">    <tt class="py-string">'WHEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line">    <tt class="py-string">'MIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line">    <tt class="py-string">'MAX'</tt><tt class="py-op">,</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCT'</tt><tt class="py-op">,</tt> </tt>
<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line"> </tt>
<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.POSTGRESQL=web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL"><a title="web2py.gluon.reserved_sql_keywords.POSTGRESQL" class="py-name" href="#" onclick="return doclink('link-2', 'POSTGRESQL', 'link-2');">POSTGRESQL</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line">    <tt class="py-string">'FALSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">    <tt class="py-string">'TRUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line">    <tt class="py-string">'ALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line">    <tt class="py-string">'ANALYSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line">    <tt class="py-string">'ANALYZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line">    <tt class="py-string">'AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line">    <tt class="py-string">'ANY'</tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line">    <tt class="py-string">'ARRAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line">    <tt class="py-string">'AS'</tt><tt class="py-op">,</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line">    <tt class="py-string">'ASC'</tt><tt class="py-op">,</tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line">    <tt class="py-string">'ASYMMETRIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line">    <tt class="py-string">'AUTHORIZATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line">    <tt class="py-string">'BETWEEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line">    <tt class="py-string">'BIGINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line">    <tt class="py-string">'BINARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line">    <tt class="py-string">'BIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line">    <tt class="py-string">'BOOLEAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line">    <tt class="py-string">'BOTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line">    <tt class="py-string">'CASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line">    <tt class="py-string">'CAST'</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line">    <tt class="py-string">'CHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line">    <tt class="py-string">'CHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line">    <tt class="py-string">'COALESCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line">    <tt class="py-string">'COLLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">    <tt class="py-string">'COLUMN'</tt><tt class="py-op">,</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line">    <tt class="py-string">'CREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line">    <tt class="py-string">'CROSS'</tt><tt class="py-op">,</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_ROLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line">    <tt class="py-string">'DEC'</tt><tt class="py-op">,</tt> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line">    <tt class="py-string">'DECIMAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">    <tt class="py-string">'DEFAULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line">    <tt class="py-string">'DEFERRABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line">    <tt class="py-string">'DESC'</tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCT'</tt><tt class="py-op">,</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line">    <tt class="py-string">'DO'</tt><tt class="py-op">,</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line">    <tt class="py-string">'ELSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line">    <tt class="py-string">'END'</tt><tt class="py-op">,</tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">    <tt class="py-string">'EXCEPT'</tt><tt class="py-op">,</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line">    <tt class="py-string">'EXISTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">    <tt class="py-string">'EXTRACT'</tt><tt class="py-op">,</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line">    <tt class="py-string">'FETCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line">    <tt class="py-string">'FLOAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line">    <tt class="py-string">'FOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line">    <tt class="py-string">'FOREIGN'</tt><tt class="py-op">,</tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line">    <tt class="py-string">'FREEZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line">    <tt class="py-string">'FROM'</tt><tt class="py-op">,</tt> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line">    <tt class="py-string">'FULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line">    <tt class="py-string">'GRANT'</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line">    <tt class="py-string">'GREATEST'</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line">    <tt class="py-string">'GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line">    <tt class="py-string">'HAVING'</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line">    <tt class="py-string">'ILIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line">    <tt class="py-string">'IN'</tt><tt class="py-op">,</tt> </tt>
<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line">    <tt class="py-string">'INITIALLY'</tt><tt class="py-op">,</tt> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">    <tt class="py-string">'INNER'</tt><tt class="py-op">,</tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">    <tt class="py-string">'INOUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">    <tt class="py-string">'INT'</tt><tt class="py-op">,</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">    <tt class="py-string">'INTEGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">    <tt class="py-string">'INTERSECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">    <tt class="py-string">'INTERVAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">    <tt class="py-string">'INTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">    <tt class="py-string">'IS'</tt><tt class="py-op">,</tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">    <tt class="py-string">'ISNULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">    <tt class="py-string">'JOIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">    <tt class="py-string">'LEADING'</tt><tt class="py-op">,</tt> </tt>
<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">    <tt class="py-string">'LEAST'</tt><tt class="py-op">,</tt> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line">    <tt class="py-string">'LEFT'</tt><tt class="py-op">,</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line">    <tt class="py-string">'LIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line">    <tt class="py-string">'LIMIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line">    <tt class="py-string">'LOCALTIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">    <tt class="py-string">'LOCALTIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line">    <tt class="py-string">'NATIONAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line">    <tt class="py-string">'NATURAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line">    <tt class="py-string">'NCHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line">    <tt class="py-string">'NEW'</tt><tt class="py-op">,</tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line">    <tt class="py-string">'NONE'</tt><tt class="py-op">,</tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line">    <tt class="py-string">'NOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line">    <tt class="py-string">'NOTNULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line">    <tt class="py-string">'NULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line">    <tt class="py-string">'NULLIF'</tt><tt class="py-op">,</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line">    <tt class="py-string">'NUMERIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line">    <tt class="py-string">'OFF'</tt><tt class="py-op">,</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line">    <tt class="py-string">'OFFSET'</tt><tt class="py-op">,</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line">    <tt class="py-string">'OLD'</tt><tt class="py-op">,</tt> </tt>
<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line">    <tt class="py-string">'ONLY'</tt><tt class="py-op">,</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">    <tt class="py-string">'OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line">    <tt class="py-string">'ORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line">    <tt class="py-string">'OUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line">    <tt class="py-string">'OUTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">    <tt class="py-string">'OVERLAPS'</tt><tt class="py-op">,</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line">    <tt class="py-string">'OVERLAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line">    <tt class="py-string">'PLACING'</tt><tt class="py-op">,</tt> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line">    <tt class="py-string">'POSITION'</tt><tt class="py-op">,</tt> </tt>
<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line">    <tt class="py-string">'PRECISION'</tt><tt class="py-op">,</tt> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">    <tt class="py-string">'PRIMARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line">    <tt class="py-string">'REAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">    <tt class="py-string">'REFERENCES'</tt><tt class="py-op">,</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line">    <tt class="py-string">'RETURNING'</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line">    <tt class="py-string">'RIGHT'</tt><tt class="py-op">,</tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line">    <tt class="py-string">'ROW'</tt><tt class="py-op">,</tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line">    <tt class="py-string">'SESSION_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">    <tt class="py-string">'SETOF'</tt><tt class="py-op">,</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">    <tt class="py-string">'SIMILAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line">    <tt class="py-string">'SMALLINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line">    <tt class="py-string">'SOME'</tt><tt class="py-op">,</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line">    <tt class="py-string">'SUBSTRING'</tt><tt class="py-op">,</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line">    <tt class="py-string">'SYMMETRIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line">    <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line">    <tt class="py-string">'THEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line">    <tt class="py-string">'TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line">    <tt class="py-string">'TIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line">    <tt class="py-string">'TO'</tt><tt class="py-op">,</tt> </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line">    <tt class="py-string">'TRAILING'</tt><tt class="py-op">,</tt> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line">    <tt class="py-string">'TREAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">    <tt class="py-string">'TRIM'</tt><tt class="py-op">,</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">    <tt class="py-string">'UNION'</tt><tt class="py-op">,</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">    <tt class="py-string">'UNIQUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">    <tt class="py-string">'USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">    <tt class="py-string">'USING'</tt><tt class="py-op">,</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line">    <tt class="py-string">'VALUES'</tt><tt class="py-op">,</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line">    <tt class="py-string">'VARCHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">    <tt class="py-string">'VARIADIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line">    <tt class="py-string">'VERBOSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">    <tt class="py-string">'WHEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line">    <tt class="py-string">'WHERE'</tt><tt class="py-op">,</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line">    <tt class="py-string">'WITH'</tt><tt class="py-op">,</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line">    <tt class="py-string">'XMLATTRIBUTES'</tt><tt class="py-op">,</tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line">    <tt class="py-string">'XMLCONCAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line">    <tt class="py-string">'XMLELEMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line">    <tt class="py-string">'XMLFOREST'</tt><tt class="py-op">,</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line">    <tt class="py-string">'XMLPARSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">    <tt class="py-string">'XMLPI'</tt><tt class="py-op">,</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">    <tt class="py-string">'XMLROOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">    <tt class="py-string">'XMLSERIALIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line"> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line"> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.POSTGRESQL_NONRESERVED=web2py.gluon.reserved_sql_keywords-module.html#POSTGRESQL_NONRESERVED"><a title="web2py.gluon.reserved_sql_keywords.POSTGRESQL_NONRESERVED" class="py-name" href="#" onclick="return doclink('link-3', 'POSTGRESQL_NONRESERVED', 'link-3');">POSTGRESQL_NONRESERVED</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">    <tt class="py-string">'A'</tt><tt class="py-op">,</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">    <tt class="py-string">'ABORT'</tt><tt class="py-op">,</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">    <tt class="py-string">'ABS'</tt><tt class="py-op">,</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">    <tt class="py-string">'ABSENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">    <tt class="py-string">'ABSOLUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">    <tt class="py-string">'ACCESS'</tt><tt class="py-op">,</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">    <tt class="py-string">'ACCORDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">    <tt class="py-string">'ACTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">    <tt class="py-string">'ADA'</tt><tt class="py-op">,</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">    <tt class="py-string">'ADD'</tt><tt class="py-op">,</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">    <tt class="py-string">'ADMIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">    <tt class="py-string">'AFTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">    <tt class="py-string">'AGGREGATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">    <tt class="py-string">'ALIAS'</tt><tt class="py-op">,</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">    <tt class="py-string">'ALLOCATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">    <tt class="py-string">'ALSO'</tt><tt class="py-op">,</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line">    <tt class="py-string">'ALTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">    <tt class="py-string">'ALWAYS'</tt><tt class="py-op">,</tt> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line">    <tt class="py-string">'ARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line">    <tt class="py-string">'ARRAY_AGG'</tt><tt class="py-op">,</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">    <tt class="py-string">'ASENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line">    <tt class="py-string">'ASSERTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line">    <tt class="py-string">'ASSIGNMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">    <tt class="py-string">'AT'</tt><tt class="py-op">,</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">    <tt class="py-string">'ATOMIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">    <tt class="py-string">'ATTRIBUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">    <tt class="py-string">'ATTRIBUTES'</tt><tt class="py-op">,</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">    <tt class="py-string">'AVG'</tt><tt class="py-op">,</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">    <tt class="py-string">'BACKWARD'</tt><tt class="py-op">,</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">    <tt class="py-string">'BASE64'</tt><tt class="py-op">,</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">    <tt class="py-string">'BEFORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">    <tt class="py-string">'BEGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line">    <tt class="py-string">'BERNOULLI'</tt><tt class="py-op">,</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line">    <tt class="py-string">'BIT_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">    <tt class="py-string">'BITVAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">    <tt class="py-string">'BLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">    <tt class="py-string">'BOM'</tt><tt class="py-op">,</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line">    <tt class="py-string">'BREADTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">    <tt class="py-string">'BY'</tt><tt class="py-op">,</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">    <tt class="py-string">'C'</tt><tt class="py-op">,</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">    <tt class="py-string">'CACHE'</tt><tt class="py-op">,</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">    <tt class="py-string">'CALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">    <tt class="py-string">'CALLED'</tt><tt class="py-op">,</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line">    <tt class="py-string">'CARDINALITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">    <tt class="py-string">'CASCADE'</tt><tt class="py-op">,</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line">    <tt class="py-string">'CASCADED'</tt><tt class="py-op">,</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line">    <tt class="py-string">'CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line">    <tt class="py-string">'CATALOG_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line">    <tt class="py-string">'CEIL'</tt><tt class="py-op">,</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line">    <tt class="py-string">'CEILING'</tt><tt class="py-op">,</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">    <tt class="py-string">'CHAIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">    <tt class="py-string">'CHAR_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER_SET_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER_SET_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER_SET_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTERISTICS'</tt><tt class="py-op">,</tt> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTERS'</tt><tt class="py-op">,</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">    <tt class="py-string">'CHECKED'</tt><tt class="py-op">,</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line">    <tt class="py-string">'CHECKPOINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line">    <tt class="py-string">'CLASS'</tt><tt class="py-op">,</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line">    <tt class="py-string">'CLASS_ORIGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line">    <tt class="py-string">'CLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line">    <tt class="py-string">'CLOSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">    <tt class="py-string">'CLUSTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line">    <tt class="py-string">'COBOL'</tt><tt class="py-op">,</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">    <tt class="py-string">'COLLATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line">    <tt class="py-string">'COLLATION_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">    <tt class="py-string">'COLLATION_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line">    <tt class="py-string">'COLLATION_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line">    <tt class="py-string">'COLLECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line">    <tt class="py-string">'COLUMN_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">    <tt class="py-string">'COLUMNS'</tt><tt class="py-op">,</tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">    <tt class="py-string">'COMMAND_FUNCTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line">    <tt class="py-string">'COMMAND_FUNCTION_CODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">    <tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">    <tt class="py-string">'COMMIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line">    <tt class="py-string">'COMMITTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line">    <tt class="py-string">'COMPLETION'</tt><tt class="py-op">,</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line">    <tt class="py-string">'CONCURRENTLY'</tt><tt class="py-op">,</tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line">    <tt class="py-string">'CONDITION'</tt><tt class="py-op">,</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">    <tt class="py-string">'CONDITION_NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line">    <tt class="py-string">'CONFIGURATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">    <tt class="py-string">'CONNECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line">    <tt class="py-string">'CONNECTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line">    <tt class="py-string">'CONNECTION_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRUCTOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line">    <tt class="py-string">'CONTAINS'</tt><tt class="py-op">,</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line">    <tt class="py-string">'CONTENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">    <tt class="py-string">'CONTINUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">    <tt class="py-string">'CONVERSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">    <tt class="py-string">'CONVERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line">    <tt class="py-string">'COPY'</tt><tt class="py-op">,</tt> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">    <tt class="py-string">'CORR'</tt><tt class="py-op">,</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line">    <tt class="py-string">'CORRESPONDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">    <tt class="py-string">'COST'</tt><tt class="py-op">,</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">    <tt class="py-string">'COUNT'</tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">    <tt class="py-string">'COVAR_POP'</tt><tt class="py-op">,</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">    <tt class="py-string">'COVAR_SAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">    <tt class="py-string">'CREATEDB'</tt><tt class="py-op">,</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">    <tt class="py-string">'CREATEROLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">    <tt class="py-string">'CREATEUSER'</tt><tt class="py-op">,</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">    <tt class="py-string">'CSV'</tt><tt class="py-op">,</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">    <tt class="py-string">'CUBE'</tt><tt class="py-op">,</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">    <tt class="py-string">'CUME_DIST'</tt><tt class="py-op">,</tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_DEFAULT_TRANSFORM_GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_PATH'</tt><tt class="py-op">,</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TRANSFORM_GROUP_FOR_TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">    <tt class="py-string">'CURSOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">    <tt class="py-string">'CURSOR_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">    <tt class="py-string">'CYCLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">    <tt class="py-string">'DATA'</tt><tt class="py-op">,</tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">    <tt class="py-string">'DATABASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">    <tt class="py-string">'DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">    <tt class="py-string">'DATETIME_INTERVAL_CODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">    <tt class="py-string">'DATETIME_INTERVAL_PRECISION'</tt><tt class="py-op">,</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">    <tt class="py-string">'DAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">    <tt class="py-string">'DEALLOCATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">    <tt class="py-string">'DECLARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">    <tt class="py-string">'DEFAULTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">    <tt class="py-string">'DEFERRED'</tt><tt class="py-op">,</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">    <tt class="py-string">'DEFINED'</tt><tt class="py-op">,</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">    <tt class="py-string">'DEFINER'</tt><tt class="py-op">,</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">    <tt class="py-string">'DEGREE'</tt><tt class="py-op">,</tt> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">    <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">    <tt class="py-string">'DELIMITER'</tt><tt class="py-op">,</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line">    <tt class="py-string">'DELIMITERS'</tt><tt class="py-op">,</tt> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">    <tt class="py-string">'DENSE_RANK'</tt><tt class="py-op">,</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">    <tt class="py-string">'DEPTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">    <tt class="py-string">'DEREF'</tt><tt class="py-op">,</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line">    <tt class="py-string">'DERIVED'</tt><tt class="py-op">,</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">    <tt class="py-string">'DESCRIBE'</tt><tt class="py-op">,</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">    <tt class="py-string">'DESCRIPTOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">    <tt class="py-string">'DESTROY'</tt><tt class="py-op">,</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">    <tt class="py-string">'DESTRUCTOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">    <tt class="py-string">'DETERMINISTIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">    <tt class="py-string">'DIAGNOSTICS'</tt><tt class="py-op">,</tt> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">    <tt class="py-string">'DICTIONARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line">    <tt class="py-string">'DISABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line">    <tt class="py-string">'DISCARD'</tt><tt class="py-op">,</tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">    <tt class="py-string">'DISCONNECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">    <tt class="py-string">'DISPATCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">    <tt class="py-string">'DOCUMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">    <tt class="py-string">'DOMAIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">    <tt class="py-string">'DOUBLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">    <tt class="py-string">'DROP'</tt><tt class="py-op">,</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">    <tt class="py-string">'DYNAMIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">    <tt class="py-string">'DYNAMIC_FUNCTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">    <tt class="py-string">'DYNAMIC_FUNCTION_CODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">    <tt class="py-string">'EACH'</tt><tt class="py-op">,</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">    <tt class="py-string">'ELEMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">    <tt class="py-string">'EMPTY'</tt><tt class="py-op">,</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">    <tt class="py-string">'ENABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">    <tt class="py-string">'ENCODING'</tt><tt class="py-op">,</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">    <tt class="py-string">'ENCRYPTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">    <tt class="py-string">'END-EXEC'</tt><tt class="py-op">,</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">    <tt class="py-string">'ENUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">    <tt class="py-string">'EQUALS'</tt><tt class="py-op">,</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">    <tt class="py-string">'ESCAPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">    <tt class="py-string">'EVERY'</tt><tt class="py-op">,</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">    <tt class="py-string">'EXCEPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">    <tt class="py-string">'EXCLUDE'</tt><tt class="py-op">,</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">    <tt class="py-string">'EXCLUDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">    <tt class="py-string">'EXCLUSIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">    <tt class="py-string">'EXEC'</tt><tt class="py-op">,</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">    <tt class="py-string">'EXECUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">    <tt class="py-string">'EXISTING'</tt><tt class="py-op">,</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">    <tt class="py-string">'EXP'</tt><tt class="py-op">,</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">    <tt class="py-string">'EXPLAIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">    <tt class="py-string">'EXTERNAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">    <tt class="py-string">'FAMILY'</tt><tt class="py-op">,</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">    <tt class="py-string">'FILTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">    <tt class="py-string">'FINAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">    <tt class="py-string">'FIRST'</tt><tt class="py-op">,</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">    <tt class="py-string">'FIRST_VALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">    <tt class="py-string">'FLAG'</tt><tt class="py-op">,</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">    <tt class="py-string">'FLOOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">    <tt class="py-string">'FOLLOWING'</tt><tt class="py-op">,</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">    <tt class="py-string">'FORCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">    <tt class="py-string">'FORTRAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">    <tt class="py-string">'FORWARD'</tt><tt class="py-op">,</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">    <tt class="py-string">'FOUND'</tt><tt class="py-op">,</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">    <tt class="py-string">'FREE'</tt><tt class="py-op">,</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">    <tt class="py-string">'FUNCTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">    <tt class="py-string">'FUSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">    <tt class="py-string">'G'</tt><tt class="py-op">,</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">    <tt class="py-string">'GENERAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">    <tt class="py-string">'GENERATED'</tt><tt class="py-op">,</tt> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">    <tt class="py-string">'GET'</tt><tt class="py-op">,</tt> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line">    <tt class="py-string">'GLOBAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">    <tt class="py-string">'GO'</tt><tt class="py-op">,</tt> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">    <tt class="py-string">'GOTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line">    <tt class="py-string">'GRANTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line">    <tt class="py-string">'GROUPING'</tt><tt class="py-op">,</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">    <tt class="py-string">'HANDLER'</tt><tt class="py-op">,</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line">    <tt class="py-string">'HEADER'</tt><tt class="py-op">,</tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">    <tt class="py-string">'HEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">    <tt class="py-string">'HIERARCHY'</tt><tt class="py-op">,</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line">    <tt class="py-string">'HOLD'</tt><tt class="py-op">,</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line">    <tt class="py-string">'HOST'</tt><tt class="py-op">,</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">    <tt class="py-string">'HOUR'</tt><tt class="py-op">,</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line"><tt class="py-comment">#    'ID',</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">    <tt class="py-string">'IDENTITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">    <tt class="py-string">'IF'</tt><tt class="py-op">,</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">    <tt class="py-string">'IGNORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">    <tt class="py-string">'IMMEDIATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line">    <tt class="py-string">'IMMUTABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line">    <tt class="py-string">'IMPLEMENTATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">    <tt class="py-string">'IMPLICIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">    <tt class="py-string">'INCLUDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">    <tt class="py-string">'INCREMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">    <tt class="py-string">'INDENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">    <tt class="py-string">'INDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">    <tt class="py-string">'INDEXES'</tt><tt class="py-op">,</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line">    <tt class="py-string">'INDICATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line">    <tt class="py-string">'INFIX'</tt><tt class="py-op">,</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line">    <tt class="py-string">'INHERIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">    <tt class="py-string">'INHERITS'</tt><tt class="py-op">,</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">    <tt class="py-string">'INITIALIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">    <tt class="py-string">'INPUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">    <tt class="py-string">'INSENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">    <tt class="py-string">'INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">    <tt class="py-string">'INSTANCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line">    <tt class="py-string">'INSTANTIABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line">    <tt class="py-string">'INSTEAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">    <tt class="py-string">'INTERSECTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">    <tt class="py-string">'INVOKER'</tt><tt class="py-op">,</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">    <tt class="py-string">'ISOLATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">    <tt class="py-string">'ITERATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">    <tt class="py-string">'K'</tt><tt class="py-op">,</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">    <tt class="py-string">'KEY'</tt><tt class="py-op">,</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line">    <tt class="py-string">'KEY_MEMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line">    <tt class="py-string">'KEY_TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">    <tt class="py-string">'LAG'</tt><tt class="py-op">,</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">    <tt class="py-string">'LANCOMPILER'</tt><tt class="py-op">,</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line">    <tt class="py-string">'LANGUAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line">    <tt class="py-string">'LARGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line">    <tt class="py-string">'LAST'</tt><tt class="py-op">,</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line">    <tt class="py-string">'LAST_VALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line">    <tt class="py-string">'LATERAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line">    <tt class="py-string">'LC_COLLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">    <tt class="py-string">'LC_CTYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">    <tt class="py-string">'LEAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">    <tt class="py-string">'LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">    <tt class="py-string">'LESS'</tt><tt class="py-op">,</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">    <tt class="py-string">'LEVEL'</tt><tt class="py-op">,</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">    <tt class="py-string">'LIKE_REGEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">    <tt class="py-string">'LISTEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">    <tt class="py-string">'LN'</tt><tt class="py-op">,</tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line">    <tt class="py-string">'LOAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line">    <tt class="py-string">'LOCAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">    <tt class="py-string">'LOCATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line">    <tt class="py-string">'LOCATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line">    <tt class="py-string">'LOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line">    <tt class="py-string">'LOGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line">    <tt class="py-string">'LOWER'</tt><tt class="py-op">,</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line">    <tt class="py-string">'M'</tt><tt class="py-op">,</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">    <tt class="py-string">'MAP'</tt><tt class="py-op">,</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line">    <tt class="py-string">'MAPPING'</tt><tt class="py-op">,</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line">    <tt class="py-string">'MATCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">    <tt class="py-string">'MATCHED'</tt><tt class="py-op">,</tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line">    <tt class="py-string">'MAX'</tt><tt class="py-op">,</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line">    <tt class="py-string">'MAX_CARDINALITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">    <tt class="py-string">'MAXVALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line">    <tt class="py-string">'MEMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">    <tt class="py-string">'MERGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">    <tt class="py-string">'MESSAGE_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line">    <tt class="py-string">'MESSAGE_OCTET_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line">    <tt class="py-string">'MESSAGE_TEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">    <tt class="py-string">'METHOD'</tt><tt class="py-op">,</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line">    <tt class="py-string">'MIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line">    <tt class="py-string">'MINUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line">    <tt class="py-string">'MINVALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line">    <tt class="py-string">'MOD'</tt><tt class="py-op">,</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line">    <tt class="py-string">'MODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">    <tt class="py-string">'MODIFIES'</tt><tt class="py-op">,</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line">    <tt class="py-string">'MODIFY'</tt><tt class="py-op">,</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line">    <tt class="py-string">'MODULE'</tt><tt class="py-op">,</tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">    <tt class="py-string">'MONTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line">    <tt class="py-string">'MORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line">    <tt class="py-string">'MOVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line">    <tt class="py-string">'MULTISET'</tt><tt class="py-op">,</tt> </tt>
<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line">    <tt class="py-string">'MUMPS'</tt><tt class="py-op">,</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line"><tt class="py-comment">#    'NAME',</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">    <tt class="py-string">'NAMES'</tt><tt class="py-op">,</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line">    <tt class="py-string">'NAMESPACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line">    <tt class="py-string">'NCLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">    <tt class="py-string">'NESTING'</tt><tt class="py-op">,</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line">    <tt class="py-string">'NEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line">    <tt class="py-string">'NFC'</tt><tt class="py-op">,</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line">    <tt class="py-string">'NFD'</tt><tt class="py-op">,</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line">    <tt class="py-string">'NFKC'</tt><tt class="py-op">,</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line">    <tt class="py-string">'NFKD'</tt><tt class="py-op">,</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">    <tt class="py-string">'NIL'</tt><tt class="py-op">,</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line">    <tt class="py-string">'NO'</tt><tt class="py-op">,</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">    <tt class="py-string">'NOCREATEDB'</tt><tt class="py-op">,</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line">    <tt class="py-string">'NOCREATEROLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">    <tt class="py-string">'NOCREATEUSER'</tt><tt class="py-op">,</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line">    <tt class="py-string">'NOINHERIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line">    <tt class="py-string">'NOLOGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">    <tt class="py-string">'NORMALIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line">    <tt class="py-string">'NORMALIZED'</tt><tt class="py-op">,</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line">    <tt class="py-string">'NOSUPERUSER'</tt><tt class="py-op">,</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line">    <tt class="py-string">'NOTHING'</tt><tt class="py-op">,</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line">    <tt class="py-string">'NOTIFY'</tt><tt class="py-op">,</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line">    <tt class="py-string">'NOWAIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line">    <tt class="py-string">'NTH_VALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line">    <tt class="py-string">'NTILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line">    <tt class="py-string">'NULLABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line">    <tt class="py-string">'NULLS'</tt><tt class="py-op">,</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line">    <tt class="py-string">'NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line">    <tt class="py-string">'OBJECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line">    <tt class="py-string">'OCCURRENCES_REGEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line">    <tt class="py-string">'OCTET_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line">    <tt class="py-string">'OCTETS'</tt><tt class="py-op">,</tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line">    <tt class="py-string">'OF'</tt><tt class="py-op">,</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line">    <tt class="py-string">'OIDS'</tt><tt class="py-op">,</tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line">    <tt class="py-string">'OPEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line">    <tt class="py-string">'OPERATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line">    <tt class="py-string">'OPERATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line">    <tt class="py-string">'OPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line">    <tt class="py-string">'OPTIONS'</tt><tt class="py-op">,</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">    <tt class="py-string">'ORDERING'</tt><tt class="py-op">,</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line">    <tt class="py-string">'ORDINALITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line">    <tt class="py-string">'OTHERS'</tt><tt class="py-op">,</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line">    <tt class="py-string">'OUTPUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">    <tt class="py-string">'OVER'</tt><tt class="py-op">,</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line">    <tt class="py-string">'OVERRIDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line">    <tt class="py-string">'OWNED'</tt><tt class="py-op">,</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line">    <tt class="py-string">'OWNER'</tt><tt class="py-op">,</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">    <tt class="py-string">'P'</tt><tt class="py-op">,</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line">    <tt class="py-string">'PAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER'</tt><tt class="py-op">,</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER_MODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER_ORDINAL_POSITION'</tt><tt class="py-op">,</tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER_SPECIFIC_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER_SPECIFIC_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER_SPECIFIC_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETERS'</tt><tt class="py-op">,</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line">    <tt class="py-string">'PARSER'</tt><tt class="py-op">,</tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">    <tt class="py-string">'PARTIAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line">    <tt class="py-string">'PARTITION'</tt><tt class="py-op">,</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">    <tt class="py-string">'PASCAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">    <tt class="py-string">'PASSING'</tt><tt class="py-op">,</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line"><tt class="py-comment">#    'PASSWORD',</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">    <tt class="py-string">'PATH'</tt><tt class="py-op">,</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">    <tt class="py-string">'PERCENT_RANK'</tt><tt class="py-op">,</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line">    <tt class="py-string">'PERCENTILE_CONT'</tt><tt class="py-op">,</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">    <tt class="py-string">'PERCENTILE_DISC'</tt><tt class="py-op">,</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">    <tt class="py-string">'PLANS'</tt><tt class="py-op">,</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">    <tt class="py-string">'PLI'</tt><tt class="py-op">,</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">    <tt class="py-string">'POSITION_REGEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">    <tt class="py-string">'POSTFIX'</tt><tt class="py-op">,</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">    <tt class="py-string">'POWER'</tt><tt class="py-op">,</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">    <tt class="py-string">'PRECEDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">    <tt class="py-string">'PREFIX'</tt><tt class="py-op">,</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">    <tt class="py-string">'PREORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">    <tt class="py-string">'PREPARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">    <tt class="py-string">'PREPARED'</tt><tt class="py-op">,</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">    <tt class="py-string">'PRESERVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">    <tt class="py-string">'PRIOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">    <tt class="py-string">'PRIVILEGES'</tt><tt class="py-op">,</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">    <tt class="py-string">'PROCEDURAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">    <tt class="py-string">'PROCEDURE'</tt><tt class="py-op">,</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line">    <tt class="py-string">'PUBLIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">    <tt class="py-string">'QUOTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">    <tt class="py-string">'RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">    <tt class="py-string">'RANK'</tt><tt class="py-op">,</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line">    <tt class="py-string">'READ'</tt><tt class="py-op">,</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">    <tt class="py-string">'READS'</tt><tt class="py-op">,</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line">    <tt class="py-string">'REASSIGN'</tt><tt class="py-op">,</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">    <tt class="py-string">'RECHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line">    <tt class="py-string">'RECURSIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">    <tt class="py-string">'REF'</tt><tt class="py-op">,</tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">    <tt class="py-string">'REFERENCING'</tt><tt class="py-op">,</tt> </tt>
<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">    <tt class="py-string">'REGR_AVGX'</tt><tt class="py-op">,</tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">    <tt class="py-string">'REGR_AVGY'</tt><tt class="py-op">,</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">    <tt class="py-string">'REGR_COUNT'</tt><tt class="py-op">,</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line">    <tt class="py-string">'REGR_INTERCEPT'</tt><tt class="py-op">,</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line">    <tt class="py-string">'REGR_R2'</tt><tt class="py-op">,</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">    <tt class="py-string">'REGR_SLOPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">    <tt class="py-string">'REGR_SXX'</tt><tt class="py-op">,</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">    <tt class="py-string">'REGR_SXY'</tt><tt class="py-op">,</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">    <tt class="py-string">'REGR_SYY'</tt><tt class="py-op">,</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">    <tt class="py-string">'REINDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">    <tt class="py-string">'RELATIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">    <tt class="py-string">'RELEASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">    <tt class="py-string">'RENAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">    <tt class="py-string">'REPEATABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">    <tt class="py-string">'REPLACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line">    <tt class="py-string">'REPLICA'</tt><tt class="py-op">,</tt> </tt>
<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line">    <tt class="py-string">'RESET'</tt><tt class="py-op">,</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">    <tt class="py-string">'RESPECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line">    <tt class="py-string">'RESTART'</tt><tt class="py-op">,</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line">    <tt class="py-string">'RESTRICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line">    <tt class="py-string">'RESULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line">    <tt class="py-string">'RETURN'</tt><tt class="py-op">,</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line">    <tt class="py-string">'RETURNED_CARDINALITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line">    <tt class="py-string">'RETURNED_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line">    <tt class="py-string">'RETURNED_OCTET_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">    <tt class="py-string">'RETURNED_SQLSTATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">    <tt class="py-string">'RETURNS'</tt><tt class="py-op">,</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">    <tt class="py-string">'REVOKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"><tt class="py-comment">#    'ROLE',</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line">    <tt class="py-string">'ROLLBACK'</tt><tt class="py-op">,</tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line">    <tt class="py-string">'ROLLUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line">    <tt class="py-string">'ROUTINE'</tt><tt class="py-op">,</tt> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line">    <tt class="py-string">'ROUTINE_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line">    <tt class="py-string">'ROUTINE_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line">    <tt class="py-string">'ROUTINE_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line">    <tt class="py-string">'ROW_COUNT'</tt><tt class="py-op">,</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line">    <tt class="py-string">'ROW_NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line">    <tt class="py-string">'ROWS'</tt><tt class="py-op">,</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line">    <tt class="py-string">'RULE'</tt><tt class="py-op">,</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line">    <tt class="py-string">'SAVEPOINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line">    <tt class="py-string">'SCALE'</tt><tt class="py-op">,</tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line">    <tt class="py-string">'SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">    <tt class="py-string">'SCHEMA_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">    <tt class="py-string">'SCOPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">    <tt class="py-string">'SCOPE_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">    <tt class="py-string">'SCOPE_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">    <tt class="py-string">'SCOPE_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line">    <tt class="py-string">'SCROLL'</tt><tt class="py-op">,</tt> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line">    <tt class="py-string">'SEARCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line">    <tt class="py-string">'SECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">    <tt class="py-string">'SECTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">    <tt class="py-string">'SECURITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">    <tt class="py-string">'SELF'</tt><tt class="py-op">,</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">    <tt class="py-string">'SENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line">    <tt class="py-string">'SEQUENCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">    <tt class="py-string">'SERIALIZABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">    <tt class="py-string">'SERVER'</tt><tt class="py-op">,</tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">    <tt class="py-string">'SERVER_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">    <tt class="py-string">'SESSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">    <tt class="py-string">'SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">    <tt class="py-string">'SETS'</tt><tt class="py-op">,</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">    <tt class="py-string">'SHARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">    <tt class="py-string">'SHOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">    <tt class="py-string">'SIMPLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">    <tt class="py-string">'SIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">    <tt class="py-string">'SOURCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">    <tt class="py-string">'SPACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">    <tt class="py-string">'SPECIFIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">    <tt class="py-string">'SPECIFIC_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">    <tt class="py-string">'SPECIFICTYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">    <tt class="py-string">'SQL'</tt><tt class="py-op">,</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">    <tt class="py-string">'SQLCODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">    <tt class="py-string">'SQLERROR'</tt><tt class="py-op">,</tt> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">    <tt class="py-string">'SQLEXCEPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">    <tt class="py-string">'SQLSTATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">    <tt class="py-string">'SQLWARNING'</tt><tt class="py-op">,</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">    <tt class="py-string">'SQRT'</tt><tt class="py-op">,</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">    <tt class="py-string">'STABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">    <tt class="py-string">'STANDALONE'</tt><tt class="py-op">,</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">    <tt class="py-string">'START'</tt><tt class="py-op">,</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line">    <tt class="py-string">'STATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">    <tt class="py-string">'STATEMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">    <tt class="py-string">'STATIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line">    <tt class="py-string">'STATISTICS'</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">    <tt class="py-string">'STDDEV_POP'</tt><tt class="py-op">,</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">    <tt class="py-string">'STDDEV_SAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">    <tt class="py-string">'STDIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line">    <tt class="py-string">'STDOUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line">    <tt class="py-string">'STORAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line">    <tt class="py-string">'STRICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line">    <tt class="py-string">'STRIP'</tt><tt class="py-op">,</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line">    <tt class="py-string">'STRUCTURE'</tt><tt class="py-op">,</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line">    <tt class="py-string">'STYLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line">    <tt class="py-string">'SUBCLASS_ORIGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line">    <tt class="py-string">'SUBLIST'</tt><tt class="py-op">,</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line">    <tt class="py-string">'SUBMULTISET'</tt><tt class="py-op">,</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">    <tt class="py-string">'SUBSTRING_REGEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">    <tt class="py-string">'SUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">    <tt class="py-string">'SUPERUSER'</tt><tt class="py-op">,</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">    <tt class="py-string">'SYSID'</tt><tt class="py-op">,</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">    <tt class="py-string">'SYSTEM'</tt><tt class="py-op">,</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">    <tt class="py-string">'SYSTEM_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line">    <tt class="py-string">'T'</tt><tt class="py-op">,</tt> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line"><tt class="py-comment">#    'TABLE_NAME',</tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line">    <tt class="py-string">'TABLESAMPLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line">    <tt class="py-string">'TABLESPACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line">    <tt class="py-string">'TEMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line">    <tt class="py-string">'TEMPLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line">    <tt class="py-string">'TEMPORARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line">    <tt class="py-string">'TERMINATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line">    <tt class="py-string">'TEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">    <tt class="py-string">'THAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line">    <tt class="py-string">'TIES'</tt><tt class="py-op">,</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line">    <tt class="py-string">'TIMEZONE_HOUR'</tt><tt class="py-op">,</tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line">    <tt class="py-string">'TIMEZONE_MINUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line">    <tt class="py-string">'TOP_LEVEL_COUNT'</tt><tt class="py-op">,</tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line">    <tt class="py-string">'TRANSACTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line">    <tt class="py-string">'TRANSACTION_ACTIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line">    <tt class="py-string">'TRANSACTIONS_COMMITTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line">    <tt class="py-string">'TRANSACTIONS_ROLLED_BACK'</tt><tt class="py-op">,</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line">    <tt class="py-string">'TRANSFORM'</tt><tt class="py-op">,</tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">    <tt class="py-string">'TRANSFORMS'</tt><tt class="py-op">,</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line">    <tt class="py-string">'TRANSLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line">    <tt class="py-string">'TRANSLATE_REGEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">    <tt class="py-string">'TRANSLATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">    <tt class="py-string">'TRIM_ARRAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">    <tt class="py-string">'TRUNCATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">    <tt class="py-string">'TRUSTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line">    <tt class="py-string">'TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line">    <tt class="py-string">'UESCAPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line">    <tt class="py-string">'UNBOUNDED'</tt><tt class="py-op">,</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line">    <tt class="py-string">'UNCOMMITTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">    <tt class="py-string">'UNDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">    <tt class="py-string">'UNENCRYPTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line">    <tt class="py-string">'UNKNOWN'</tt><tt class="py-op">,</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">    <tt class="py-string">'UNLISTEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line">    <tt class="py-string">'UNNAMED'</tt><tt class="py-op">,</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line">    <tt class="py-string">'UNNEST'</tt><tt class="py-op">,</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line">    <tt class="py-string">'UNTIL'</tt><tt class="py-op">,</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line">    <tt class="py-string">'UNTYPED'</tt><tt class="py-op">,</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line">    <tt class="py-string">'UPDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">    <tt class="py-string">'UPPER'</tt><tt class="py-op">,</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line">    <tt class="py-string">'URI'</tt><tt class="py-op">,</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line">    <tt class="py-string">'USAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line">    <tt class="py-string">'USER_DEFINED_TYPE_CATALOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">    <tt class="py-string">'USER_DEFINED_TYPE_CODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">    <tt class="py-string">'USER_DEFINED_TYPE_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line">    <tt class="py-string">'USER_DEFINED_TYPE_SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">    <tt class="py-string">'VACUUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line">    <tt class="py-string">'VALID'</tt><tt class="py-op">,</tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">    <tt class="py-string">'VALIDATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">    <tt class="py-string">'VALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">    <tt class="py-string">'VAR_POP'</tt><tt class="py-op">,</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line">    <tt class="py-string">'VAR_SAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line">    <tt class="py-string">'VARBINARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">    <tt class="py-string">'VARIABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">    <tt class="py-string">'VARYING'</tt><tt class="py-op">,</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line">    <tt class="py-string">'VERSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line">    <tt class="py-string">'VIEW'</tt><tt class="py-op">,</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">    <tt class="py-string">'VOLATILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">    <tt class="py-string">'WHENEVER'</tt><tt class="py-op">,</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line">    <tt class="py-string">'WHITESPACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">    <tt class="py-string">'WIDTH_BUCKET'</tt><tt class="py-op">,</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">    <tt class="py-string">'WINDOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line">    <tt class="py-string">'WITHIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">    <tt class="py-string">'WITHOUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">    <tt class="py-string">'WORK'</tt><tt class="py-op">,</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">    <tt class="py-string">'WRAPPER'</tt><tt class="py-op">,</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">    <tt class="py-string">'WRITE'</tt><tt class="py-op">,</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line">    <tt class="py-string">'XML'</tt><tt class="py-op">,</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">    <tt class="py-string">'XMLAGG'</tt><tt class="py-op">,</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">    <tt class="py-string">'XMLBINARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">    <tt class="py-string">'XMLCAST'</tt><tt class="py-op">,</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">    <tt class="py-string">'XMLCOMMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line">    <tt class="py-string">'XMLDECLARATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">    <tt class="py-string">'XMLDOCUMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line">    <tt class="py-string">'XMLEXISTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">    <tt class="py-string">'XMLITERATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">    <tt class="py-string">'XMLNAMESPACES'</tt><tt class="py-op">,</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">    <tt class="py-string">'XMLQUERY'</tt><tt class="py-op">,</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line">    <tt class="py-string">'XMLSCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">    <tt class="py-string">'XMLTABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line">    <tt class="py-string">'XMLTEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line">    <tt class="py-string">'XMLVALIDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line">    <tt class="py-string">'YEAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">    <tt class="py-string">'YES'</tt><tt class="py-op">,</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line">    <tt class="py-string">'ZONE'</tt><tt class="py-op">,</tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line"> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line"><tt class="py-comment">#Thanks villas</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-4" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.FIREBIRD=web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD"><a title="web2py.gluon.reserved_sql_keywords.FIREBIRD" class="py-name" href="#" onclick="return doclink('link-4', 'FIREBIRD', 'link-4');">FIREBIRD</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">    <tt class="py-string">'ABS'</tt><tt class="py-op">,</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">    <tt class="py-string">'ACTIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">    <tt class="py-string">'ADMIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line">    <tt class="py-string">'AFTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line">    <tt class="py-string">'ASCENDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">    <tt class="py-string">'AUTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line">    <tt class="py-string">'AUTODDL'</tt><tt class="py-op">,</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">    <tt class="py-string">'BASED'</tt><tt class="py-op">,</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line">    <tt class="py-string">'BASENAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">    <tt class="py-string">'BASE_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">    <tt class="py-string">'BEFORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line">    <tt class="py-string">'BIT_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line">    <tt class="py-string">'BLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">    <tt class="py-string">'BLOBEDIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line">    <tt class="py-string">'BOOLEAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line">    <tt class="py-string">'BOTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line">    <tt class="py-string">'BUFFER'</tt><tt class="py-op">,</tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line">    <tt class="py-string">'CACHE'</tt><tt class="py-op">,</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">    <tt class="py-string">'CHAR_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">    <tt class="py-string">'CHECK_POINT_LEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">    <tt class="py-string">'CHECK_POINT_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line">    <tt class="py-string">'CLOSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">    <tt class="py-string">'COMMITTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">    <tt class="py-string">'COMPILETIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">    <tt class="py-string">'COMPUTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line">    <tt class="py-string">'CONDITIONAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line">    <tt class="py-string">'CONNECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">    <tt class="py-string">'CONTAINING'</tt><tt class="py-op">,</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line">    <tt class="py-string">'CROSS'</tt><tt class="py-op">,</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line">    <tt class="py-string">'CSTRING'</tt><tt class="py-op">,</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_CONNECTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_ROLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TRANSACTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line">    <tt class="py-string">'DATABASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line">    <tt class="py-string">'DB_KEY'</tt><tt class="py-op">,</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line">    <tt class="py-string">'DEBUG'</tt><tt class="py-op">,</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line">    <tt class="py-string">'DESCENDING'</tt><tt class="py-op">,</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line">    <tt class="py-string">'DISCONNECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">    <tt class="py-string">'DISPLAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line">    <tt class="py-string">'DO'</tt><tt class="py-op">,</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">    <tt class="py-string">'ECHO'</tt><tt class="py-op">,</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">    <tt class="py-string">'EDIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">    <tt class="py-string">'ENTRY_POINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line">    <tt class="py-string">'EVENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line">    <tt class="py-string">'EXIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">    <tt class="py-string">'EXTERN'</tt><tt class="py-op">,</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">    <tt class="py-string">'FALSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line">    <tt class="py-string">'FETCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">    <tt class="py-string">'FILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">    <tt class="py-string">'FILTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line">    <tt class="py-string">'FREE_IT'</tt><tt class="py-op">,</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">    <tt class="py-string">'FUNCTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">    <tt class="py-string">'GDSCODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">    <tt class="py-string">'GENERATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">    <tt class="py-string">'GEN_ID'</tt><tt class="py-op">,</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line">    <tt class="py-string">'GLOBAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line">    <tt class="py-string">'GROUP_COMMIT_WAIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">    <tt class="py-string">'GROUP_COMMIT_WAIT_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">    <tt class="py-string">'HELP'</tt><tt class="py-op">,</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">    <tt class="py-string">'IF'</tt><tt class="py-op">,</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">    <tt class="py-string">'INACTIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">    <tt class="py-string">'INDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">    <tt class="py-string">'INIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line">    <tt class="py-string">'INPUT_TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line">    <tt class="py-string">'INSENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">    <tt class="py-string">'ISQL'</tt><tt class="py-op">,</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">    <tt class="py-string">'LC_MESSAGES'</tt><tt class="py-op">,</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line">    <tt class="py-string">'LC_TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">    <tt class="py-string">'LEADING'</tt><tt class="py-op">,</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line">    <tt class="py-string">'LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line">    <tt class="py-string">'LEV'</tt><tt class="py-op">,</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line">    <tt class="py-string">'LOGFILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">    <tt class="py-string">'LOG_BUFFER_SIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">    <tt class="py-string">'LOG_BUF_SIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">    <tt class="py-string">'LONG'</tt><tt class="py-op">,</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line">    <tt class="py-string">'LOWER'</tt><tt class="py-op">,</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line">    <tt class="py-string">'MANUAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line">    <tt class="py-string">'MAXIMUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line">    <tt class="py-string">'MAXIMUM_SEGMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line">    <tt class="py-string">'MAX_SEGMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line">    <tt class="py-string">'MERGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line">    <tt class="py-string">'MESSAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line">    <tt class="py-string">'MINIMUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line">    <tt class="py-string">'MODULE_NAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line">    <tt class="py-string">'NOAUTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line">    <tt class="py-string">'NUM_LOG_BUFS'</tt><tt class="py-op">,</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line">    <tt class="py-string">'NUM_LOG_BUFFERS'</tt><tt class="py-op">,</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line">    <tt class="py-string">'OCTET_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line">    <tt class="py-string">'OPEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">    <tt class="py-string">'OUTPUT_TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line">    <tt class="py-string">'OVERFLOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line">    <tt class="py-string">'PAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line">    <tt class="py-string">'PAGELENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line">    <tt class="py-string">'PAGES'</tt><tt class="py-op">,</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">    <tt class="py-string">'PAGE_SIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line">    <tt class="py-string">'PARAMETER'</tt><tt class="py-op">,</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line"><tt class="py-comment">#    'PASSWORD',</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">    <tt class="py-string">'PLAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">    <tt class="py-string">'POST_EVENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line">    <tt class="py-string">'QUIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line">    <tt class="py-string">'RAW_PARTITIONS'</tt><tt class="py-op">,</tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line">    <tt class="py-string">'RDB$DB_KEY'</tt><tt class="py-op">,</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">    <tt class="py-string">'RECORD_VERSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">    <tt class="py-string">'RECREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">    <tt class="py-string">'RECURSIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">    <tt class="py-string">'RELEASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line">    <tt class="py-string">'RESERV'</tt><tt class="py-op">,</tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">    <tt class="py-string">'RESERVING'</tt><tt class="py-op">,</tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line">    <tt class="py-string">'RETAIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line">    <tt class="py-string">'RETURN'</tt><tt class="py-op">,</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line">    <tt class="py-string">'RETURNING_VALUES'</tt><tt class="py-op">,</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line">    <tt class="py-string">'RETURNS'</tt><tt class="py-op">,</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line"><tt class="py-comment">#    'ROLE',</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">    <tt class="py-string">'ROW_COUNT'</tt><tt class="py-op">,</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">    <tt class="py-string">'ROWS'</tt><tt class="py-op">,</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line">    <tt class="py-string">'RUNTIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line">    <tt class="py-string">'SAVEPOINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">    <tt class="py-string">'SECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line">    <tt class="py-string">'SENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line">    <tt class="py-string">'SHADOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line">    <tt class="py-string">'SHARED'</tt><tt class="py-op">,</tt> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line">    <tt class="py-string">'SHELL'</tt><tt class="py-op">,</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line">    <tt class="py-string">'SHOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">    <tt class="py-string">'SINGULAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">    <tt class="py-string">'SNAPSHOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">    <tt class="py-string">'SORT'</tt><tt class="py-op">,</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">    <tt class="py-string">'STABILITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">    <tt class="py-string">'START'</tt><tt class="py-op">,</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">    <tt class="py-string">'STARTING'</tt><tt class="py-op">,</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line">    <tt class="py-string">'STARTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line">    <tt class="py-string">'STATEMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line">    <tt class="py-string">'STATIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">    <tt class="py-string">'STATISTICS'</tt><tt class="py-op">,</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line">    <tt class="py-string">'SUB_TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">    <tt class="py-string">'SUSPEND'</tt><tt class="py-op">,</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">    <tt class="py-string">'TERMINATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">    <tt class="py-string">'TRAILING'</tt><tt class="py-op">,</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">    <tt class="py-string">'TRIM'</tt><tt class="py-op">,</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line">    <tt class="py-string">'TRUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">    <tt class="py-string">'TYPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line">    <tt class="py-string">'UNCOMMITTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">    <tt class="py-string">'UNKNOWN'</tt><tt class="py-op">,</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">    <tt class="py-string">'USING'</tt><tt class="py-op">,</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line">    <tt class="py-string">'VARIABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line">    <tt class="py-string">'VERSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">    <tt class="py-string">'WAIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">    <tt class="py-string">'WEEKDAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">    <tt class="py-string">'WHILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line">    <tt class="py-string">'YEARDAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.FIREBIRD_NONRESERVED=web2py.gluon.reserved_sql_keywords-module.html#FIREBIRD_NONRESERVED"><a title="web2py.gluon.reserved_sql_keywords.FIREBIRD_NONRESERVED" class="py-name" href="#" onclick="return doclink('link-5', 'FIREBIRD_NONRESERVED', 'link-5');">FIREBIRD_NONRESERVED</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line">    <tt class="py-string">'BACKUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line">    <tt class="py-string">'BLOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line">    <tt class="py-string">'COALESCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">    <tt class="py-string">'COLLATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line">    <tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line">    <tt class="py-string">'DELETING'</tt><tt class="py-op">,</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">    <tt class="py-string">'DIFFERENCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line">    <tt class="py-string">'IIF'</tt><tt class="py-op">,</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line">    <tt class="py-string">'INSERTING'</tt><tt class="py-op">,</tt> </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line">    <tt class="py-string">'LAST'</tt><tt class="py-op">,</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">    <tt class="py-string">'LEAVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line">    <tt class="py-string">'LOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line">    <tt class="py-string">'NEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line">    <tt class="py-string">'NULLIF'</tt><tt class="py-op">,</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line">    <tt class="py-string">'NULLS'</tt><tt class="py-op">,</tt> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line">    <tt class="py-string">'RESTART'</tt><tt class="py-op">,</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line">    <tt class="py-string">'RETURNING'</tt><tt class="py-op">,</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line">    <tt class="py-string">'SCALAR_ARRAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line">    <tt class="py-string">'SEQUENCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line">    <tt class="py-string">'STATEMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">    <tt class="py-string">'UPDATING'</tt><tt class="py-op">,</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">    <tt class="py-string">'ABS'</tt><tt class="py-op">,</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">    <tt class="py-string">'ACCENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">    <tt class="py-string">'ACOS'</tt><tt class="py-op">,</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">    <tt class="py-string">'ALWAYS'</tt><tt class="py-op">,</tt> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">    <tt class="py-string">'ASCII_CHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">    <tt class="py-string">'ASCII_VAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line">    <tt class="py-string">'ASIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line">    <tt class="py-string">'ATAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line">    <tt class="py-string">'ATAN2'</tt><tt class="py-op">,</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line">    <tt class="py-string">'BACKUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line">    <tt class="py-string">'BIN_AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">    <tt class="py-string">'BIN_OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line">    <tt class="py-string">'BIN_SHL'</tt><tt class="py-op">,</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line">    <tt class="py-string">'BIN_SHR'</tt><tt class="py-op">,</tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">    <tt class="py-string">'BIN_XOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">    <tt class="py-string">'BLOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line">    <tt class="py-string">'CEIL'</tt><tt class="py-op">,</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">    <tt class="py-string">'CEILING'</tt><tt class="py-op">,</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line">    <tt class="py-string">'COLLATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line">    <tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line">    <tt class="py-string">'COS'</tt><tt class="py-op">,</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line">    <tt class="py-string">'COSH'</tt><tt class="py-op">,</tt> </tt>
<a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line">    <tt class="py-string">'COT'</tt><tt class="py-op">,</tt> </tt>
<a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line">    <tt class="py-string">'DATEADD'</tt><tt class="py-op">,</tt> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">    <tt class="py-string">'DATEDIFF'</tt><tt class="py-op">,</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line">    <tt class="py-string">'DECODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line">    <tt class="py-string">'DIFFERENCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line">    <tt class="py-string">'EXP'</tt><tt class="py-op">,</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">    <tt class="py-string">'FLOOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line">    <tt class="py-string">'GEN_UUID'</tt><tt class="py-op">,</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line">    <tt class="py-string">'GENERATED'</tt><tt class="py-op">,</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line">    <tt class="py-string">'HASH'</tt><tt class="py-op">,</tt> </tt>
<a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line">    <tt class="py-string">'IIF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">    <tt class="py-string">'LIST'</tt><tt class="py-op">,</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">    <tt class="py-string">'LN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">    <tt class="py-string">'LOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">    <tt class="py-string">'LOG10'</tt><tt class="py-op">,</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">    <tt class="py-string">'LPAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">    <tt class="py-string">'MATCHED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line">    <tt class="py-string">'MATCHING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">    <tt class="py-string">'MAXVALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">    <tt class="py-string">'MILLISECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">    <tt class="py-string">'MINVALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">    <tt class="py-string">'MOD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">    <tt class="py-string">'NEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">    <tt class="py-string">'OVERLAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">    <tt class="py-string">'PAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">    <tt class="py-string">'PI'</tt><tt class="py-op">,</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">    <tt class="py-string">'PLACING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">    <tt class="py-string">'POWER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">    <tt class="py-string">'PRESERVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">    <tt class="py-string">'RAND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line">    <tt class="py-string">'REPLACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">    <tt class="py-string">'RESTART'</tt><tt class="py-op">,</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">    <tt class="py-string">'RETURNING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line">    <tt class="py-string">'REVERSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line">    <tt class="py-string">'ROUND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">    <tt class="py-string">'RPAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">    <tt class="py-string">'SCALAR_ARRAY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">    <tt class="py-string">'SEQUENCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">    <tt class="py-string">'SIGN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">    <tt class="py-string">'SIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">    <tt class="py-string">'SINH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">    <tt class="py-string">'SPACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">    <tt class="py-string">'SQRT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">    <tt class="py-string">'TAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">    <tt class="py-string">'TANH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">    <tt class="py-string">'TEMPORARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line">    <tt class="py-string">'TRUNC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">    <tt class="py-string">'WEEK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line"> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line"><tt class="py-comment"># Thanks Jonathan Lundell</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-6" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.MYSQL=web2py.gluon.reserved_sql_keywords-module.html#MYSQL"><a title="web2py.gluon.reserved_sql_keywords.MYSQL" class="py-name" href="#" onclick="return doclink('link-6', 'MYSQL', 'link-6');">MYSQL</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">    <tt class="py-string">'ACCESSIBLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">    <tt class="py-string">'ADD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">    <tt class="py-string">'ALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">    <tt class="py-string">'ALTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">    <tt class="py-string">'ANALYZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">    <tt class="py-string">'AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">    <tt class="py-string">'AS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">    <tt class="py-string">'ASC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line">    <tt class="py-string">'ASENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line">    <tt class="py-string">'BEFORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line">    <tt class="py-string">'BETWEEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line">    <tt class="py-string">'BIGINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">    <tt class="py-string">'BINARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line">    <tt class="py-string">'BLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">    <tt class="py-string">'BOTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">    <tt class="py-string">'BY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line">    <tt class="py-string">'CALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line">    <tt class="py-string">'CASCADE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">    <tt class="py-string">'CASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line">    <tt class="py-string">'CHANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">    <tt class="py-string">'CHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line">    <tt class="py-string">'CHARACTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">    <tt class="py-string">'CHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line">    <tt class="py-string">'COLLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line">    <tt class="py-string">'COLUMN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">    <tt class="py-string">'CONDITION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">    <tt class="py-string">'CONTINUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">    <tt class="py-string">'CONVERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">    <tt class="py-string">'CREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line">    <tt class="py-string">'CROSS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">    <tt class="py-string">'CURSOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">    <tt class="py-string">'DATABASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">    <tt class="py-string">'DATABASES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">    <tt class="py-string">'DAY_HOUR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line">    <tt class="py-string">'DAY_MICROSECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line">    <tt class="py-string">'DAY_MINUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">    <tt class="py-string">'DAY_SECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">    <tt class="py-string">'DEC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line">    <tt class="py-string">'DECIMAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">    <tt class="py-string">'DECLARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">    <tt class="py-string">'DEFAULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line">    <tt class="py-string">'DELAYED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line">    <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">    <tt class="py-string">'DESC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line">    <tt class="py-string">'DESCRIBE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line">    <tt class="py-string">'DETERMINISTIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCTROW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line">    <tt class="py-string">'DIV'</tt><tt class="py-op">,</tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line">    <tt class="py-string">'DOUBLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line">    <tt class="py-string">'DROP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">    <tt class="py-string">'DUAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line">    <tt class="py-string">'EACH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line">    <tt class="py-string">'ELSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">    <tt class="py-string">'ELSEIF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">    <tt class="py-string">'ENCLOSED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">    <tt class="py-string">'ESCAPED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">    <tt class="py-string">'EXISTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line">    <tt class="py-string">'EXIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">    <tt class="py-string">'EXPLAIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">    <tt class="py-string">'FALSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">    <tt class="py-string">'FETCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">    <tt class="py-string">'FLOAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">    <tt class="py-string">'FLOAT4'</tt><tt class="py-op">,</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">    <tt class="py-string">'FLOAT8'</tt><tt class="py-op">,</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line">    <tt class="py-string">'FOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">    <tt class="py-string">'FORCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">    <tt class="py-string">'FOREIGN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">    <tt class="py-string">'FROM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">    <tt class="py-string">'FULLTEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">    <tt class="py-string">'GRANT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">    <tt class="py-string">'GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">    <tt class="py-string">'HAVING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">    <tt class="py-string">'HIGH_PRIORITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">    <tt class="py-string">'HOUR_MICROSECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">    <tt class="py-string">'HOUR_MINUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">    <tt class="py-string">'HOUR_SECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">    <tt class="py-string">'IF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">    <tt class="py-string">'IGNORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">    <tt class="py-string">'IGNORE_SERVER_IDS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">    <tt class="py-string">'IGNORE_SERVER_IDS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">    <tt class="py-string">'IN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line">    <tt class="py-string">'INDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">    <tt class="py-string">'INFILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">    <tt class="py-string">'INNER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">    <tt class="py-string">'INOUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">    <tt class="py-string">'INSENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">    <tt class="py-string">'INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">    <tt class="py-string">'INT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">    <tt class="py-string">'INT1'</tt><tt class="py-op">,</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">    <tt class="py-string">'INT2'</tt><tt class="py-op">,</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">    <tt class="py-string">'INT3'</tt><tt class="py-op">,</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">    <tt class="py-string">'INT4'</tt><tt class="py-op">,</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">    <tt class="py-string">'INT8'</tt><tt class="py-op">,</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">    <tt class="py-string">'INTEGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line">    <tt class="py-string">'INTERVAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line">    <tt class="py-string">'INTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">    <tt class="py-string">'IS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line">    <tt class="py-string">'ITERATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">    <tt class="py-string">'JOIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line">    <tt class="py-string">'KEY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line">    <tt class="py-string">'KEYS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line">    <tt class="py-string">'KILL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">    <tt class="py-string">'LEADING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line">    <tt class="py-string">'LEAVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line">    <tt class="py-string">'LEFT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line">    <tt class="py-string">'LIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line">    <tt class="py-string">'LIMIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line">    <tt class="py-string">'LINEAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line">    <tt class="py-string">'LINES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line">    <tt class="py-string">'LOAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line">    <tt class="py-string">'LOCALTIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line">    <tt class="py-string">'LOCALTIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">    <tt class="py-string">'LOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line">    <tt class="py-string">'LONG'</tt><tt class="py-op">,</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line">    <tt class="py-string">'LONGBLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line">    <tt class="py-string">'LONGTEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">    <tt class="py-string">'LOOP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line">    <tt class="py-string">'LOW_PRIORITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line">    <tt class="py-string">'MASTER_HEARTBEAT_PERIOD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line">    <tt class="py-string">'MASTER_HEARTBEAT_PERIOD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line">    <tt class="py-string">'MASTER_SSL_VERIFY_SERVER_CERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">    <tt class="py-string">'MATCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line">    <tt class="py-string">'MAXVALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">    <tt class="py-string">'MAXVALUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">    <tt class="py-string">'MEDIUMBLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line">    <tt class="py-string">'MEDIUMINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line">    <tt class="py-string">'MEDIUMTEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line">    <tt class="py-string">'MIDDLEINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line">    <tt class="py-string">'MINUTE_MICROSECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line">    <tt class="py-string">'MINUTE_SECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">    <tt class="py-string">'MOD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">    <tt class="py-string">'MODIFIES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line">    <tt class="py-string">'NATURAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">    <tt class="py-string">'NO_WRITE_TO_BINLOG'</tt><tt class="py-op">,</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">    <tt class="py-string">'NOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">    <tt class="py-string">'NULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">    <tt class="py-string">'NUMERIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line">    <tt class="py-string">'OPTIMIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">    <tt class="py-string">'OPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">    <tt class="py-string">'OPTIONALLY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line">    <tt class="py-string">'OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">    <tt class="py-string">'ORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">    <tt class="py-string">'OUT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line">    <tt class="py-string">'OUTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line">    <tt class="py-string">'OUTFILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line">    <tt class="py-string">'PRECISION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line">    <tt class="py-string">'PRIMARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">    <tt class="py-string">'PROCEDURE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">    <tt class="py-string">'PURGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line">    <tt class="py-string">'RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line">    <tt class="py-string">'READ'</tt><tt class="py-op">,</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line">    <tt class="py-string">'READ_WRITE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line">    <tt class="py-string">'READS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line">    <tt class="py-string">'REAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line">    <tt class="py-string">'REFERENCES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line">    <tt class="py-string">'REGEXP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line">    <tt class="py-string">'RELEASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line">    <tt class="py-string">'RENAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">    <tt class="py-string">'REPEAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line">    <tt class="py-string">'REPLACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line">    <tt class="py-string">'REQUIRE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line">    <tt class="py-string">'RESIGNAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line">    <tt class="py-string">'RESIGNAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line">    <tt class="py-string">'RESTRICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">    <tt class="py-string">'RETURN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">    <tt class="py-string">'REVOKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line">    <tt class="py-string">'RIGHT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line">    <tt class="py-string">'RLIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">    <tt class="py-string">'SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line">    <tt class="py-string">'SCHEMAS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">    <tt class="py-string">'SECOND_MICROSECOND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line">    <tt class="py-string">'SENSITIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">    <tt class="py-string">'SEPARATOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line">    <tt class="py-string">'SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line">    <tt class="py-string">'SHOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line">    <tt class="py-string">'SIGNAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line">    <tt class="py-string">'SIGNAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">    <tt class="py-string">'SMALLINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line">    <tt class="py-string">'SPATIAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">    <tt class="py-string">'SPECIFIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line">    <tt class="py-string">'SQL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line">    <tt class="py-string">'SQL_BIG_RESULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">    <tt class="py-string">'SQL_CALC_FOUND_ROWS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line">    <tt class="py-string">'SQL_SMALL_RESULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line">    <tt class="py-string">'SQLEXCEPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line">    <tt class="py-string">'SQLSTATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line">    <tt class="py-string">'SQLWARNING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">    <tt class="py-string">'SSL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line">    <tt class="py-string">'STARTING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line">    <tt class="py-string">'STRAIGHT_JOIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line">    <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line">    <tt class="py-string">'TERMINATED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line">    <tt class="py-string">'THEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line">    <tt class="py-string">'TINYBLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line">    <tt class="py-string">'TINYINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line">    <tt class="py-string">'TINYTEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line">    <tt class="py-string">'TO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line">    <tt class="py-string">'TRAILING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line">    <tt class="py-string">'TRUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line">    <tt class="py-string">'UNDO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line">    <tt class="py-string">'UNION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line">    <tt class="py-string">'UNIQUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line">    <tt class="py-string">'UNLOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1253"></a><tt class="py-lineno">1253</tt>  <tt class="py-line">    <tt class="py-string">'UNSIGNED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line">    <tt class="py-string">'UPDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line">    <tt class="py-string">'USAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line">    <tt class="py-string">'USE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line">    <tt class="py-string">'USING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line">    <tt class="py-string">'UTC_DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line">    <tt class="py-string">'UTC_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line">    <tt class="py-string">'UTC_TIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line">    <tt class="py-string">'VALUES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line">    <tt class="py-string">'VARBINARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line">    <tt class="py-string">'VARCHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line">    <tt class="py-string">'VARCHARACTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line">    <tt class="py-string">'VARYING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line">    <tt class="py-string">'WHEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line">    <tt class="py-string">'WHERE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line">    <tt class="py-string">'WHILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1269"></a><tt class="py-lineno">1269</tt>  <tt class="py-line">    <tt class="py-string">'WITH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line">    <tt class="py-string">'WRITE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line">    <tt class="py-string">'XOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line">    <tt class="py-string">'YEAR_MONTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line">    <tt class="py-string">'ZEROFILL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line"> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.MSSQL=web2py.gluon.reserved_sql_keywords-module.html#MSSQL"><a title="web2py.gluon.reserved_sql_keywords.MSSQL" class="py-name" href="#" onclick="return doclink('link-7', 'MSSQL', 'link-7');">MSSQL</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line">    <tt class="py-string">'ADD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line">    <tt class="py-string">'ALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line">    <tt class="py-string">'ALTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line">    <tt class="py-string">'AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line">    <tt class="py-string">'ANY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line">    <tt class="py-string">'AS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line">    <tt class="py-string">'ASC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">    <tt class="py-string">'AUTHORIZATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line">    <tt class="py-string">'BACKUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line">    <tt class="py-string">'BEGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line">    <tt class="py-string">'BETWEEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line">    <tt class="py-string">'BREAK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line">    <tt class="py-string">'BROWSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line">    <tt class="py-string">'BULK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line">    <tt class="py-string">'BY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line">    <tt class="py-string">'CASCADE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line">    <tt class="py-string">'CASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line">    <tt class="py-string">'CHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line">    <tt class="py-string">'CHECKPOINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line">    <tt class="py-string">'CLOSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line">    <tt class="py-string">'CLUSTERED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line">    <tt class="py-string">'COALESCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line">    <tt class="py-string">'COLLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1300"></a><tt class="py-lineno">1300</tt>  <tt class="py-line">    <tt class="py-string">'COLUMN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1301"></a><tt class="py-lineno">1301</tt>  <tt class="py-line">    <tt class="py-string">'COMMIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line">    <tt class="py-string">'COMPUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line">    <tt class="py-string">'CONTAINS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line">    <tt class="py-string">'CONTAINSTABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line">    <tt class="py-string">'CONTINUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line">    <tt class="py-string">'CONVERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line">    <tt class="py-string">'CREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line">    <tt class="py-string">'CROSS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line">    <tt class="py-string">'CURSOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line">    <tt class="py-string">'DATABASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line">    <tt class="py-string">'DBCC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line">    <tt class="py-string">'DEALLOCATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line">    <tt class="py-string">'DECLARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line">    <tt class="py-string">'DEFAULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line">    <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line">    <tt class="py-string">'DENY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line">    <tt class="py-string">'DESC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line">    <tt class="py-string">'DISK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line">    <tt class="py-string">'DISTRIBUTED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line">    <tt class="py-string">'DOUBLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line">    <tt class="py-string">'DROP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line">    <tt class="py-string">'DUMMY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line">    <tt class="py-string">'DUMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line">    <tt class="py-string">'ELSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line">    <tt class="py-string">'END'</tt><tt class="py-op">,</tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line">    <tt class="py-string">'ERRLVL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line">    <tt class="py-string">'ESCAPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line">    <tt class="py-string">'EXCEPT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line">    <tt class="py-string">'EXEC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line">    <tt class="py-string">'EXECUTE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line">    <tt class="py-string">'EXISTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1339"></a><tt class="py-lineno">1339</tt>  <tt class="py-line">    <tt class="py-string">'EXIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line">    <tt class="py-string">'FETCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line">    <tt class="py-string">'FILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line">    <tt class="py-string">'FILLFACTOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line">    <tt class="py-string">'FOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line">    <tt class="py-string">'FOREIGN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line">    <tt class="py-string">'FREETEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line">    <tt class="py-string">'FREETEXTTABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line">    <tt class="py-string">'FROM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">    <tt class="py-string">'FULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">    <tt class="py-string">'FUNCTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">    <tt class="py-string">'GOTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">    <tt class="py-string">'GRANT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">    <tt class="py-string">'GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line">    <tt class="py-string">'HAVING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line">    <tt class="py-string">'HOLDLOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line">    <tt class="py-string">'IDENTITY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line">    <tt class="py-string">'IDENTITY_INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line">    <tt class="py-string">'IDENTITYCOL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line">    <tt class="py-string">'IF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line">    <tt class="py-string">'IN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line">    <tt class="py-string">'INDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">    <tt class="py-string">'INNER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">    <tt class="py-string">'INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line">    <tt class="py-string">'INTERSECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line">    <tt class="py-string">'INTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line">    <tt class="py-string">'IS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line">    <tt class="py-string">'JOIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line">    <tt class="py-string">'KEY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line">    <tt class="py-string">'KILL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line">    <tt class="py-string">'LEFT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">    <tt class="py-string">'LIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line">    <tt class="py-string">'LINENO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line">    <tt class="py-string">'LOAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">    <tt class="py-string">'NATIONAL '</tt><tt class="py-op">,</tt> </tt>
<a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line">    <tt class="py-string">'NOCHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line">    <tt class="py-string">'NONCLUSTERED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line">    <tt class="py-string">'NOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">    <tt class="py-string">'NULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line">    <tt class="py-string">'NULLIF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">    <tt class="py-string">'OF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">    <tt class="py-string">'OFF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line">    <tt class="py-string">'OFFSETS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1382"></a><tt class="py-lineno">1382</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line">    <tt class="py-string">'OPEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1384"></a><tt class="py-lineno">1384</tt>  <tt class="py-line">    <tt class="py-string">'OPENDATASOURCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line">    <tt class="py-string">'OPENQUERY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line">    <tt class="py-string">'OPENROWSET'</tt><tt class="py-op">,</tt> </tt>
<a name="L1387"></a><tt class="py-lineno">1387</tt>  <tt class="py-line">    <tt class="py-string">'OPENXML'</tt><tt class="py-op">,</tt> </tt>
<a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line">    <tt class="py-string">'OPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line">    <tt class="py-string">'OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line">    <tt class="py-string">'ORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1391"></a><tt class="py-lineno">1391</tt>  <tt class="py-line">    <tt class="py-string">'OUTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line">    <tt class="py-string">'OVER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1393"></a><tt class="py-lineno">1393</tt>  <tt class="py-line">    <tt class="py-string">'PERCENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line">    <tt class="py-string">'PLAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line">    <tt class="py-string">'PRECISION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1396"></a><tt class="py-lineno">1396</tt>  <tt class="py-line">    <tt class="py-string">'PRIMARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line">    <tt class="py-string">'PRINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">    <tt class="py-string">'PROC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line">    <tt class="py-string">'PROCEDURE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line">    <tt class="py-string">'PUBLIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1401"></a><tt class="py-lineno">1401</tt>  <tt class="py-line">    <tt class="py-string">'RAISERROR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1402"></a><tt class="py-lineno">1402</tt>  <tt class="py-line">    <tt class="py-string">'READ'</tt><tt class="py-op">,</tt> </tt>
<a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">    <tt class="py-string">'READTEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line">    <tt class="py-string">'RECONFIGURE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line">    <tt class="py-string">'REFERENCES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1406"></a><tt class="py-lineno">1406</tt>  <tt class="py-line">    <tt class="py-string">'REPLICATION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line">    <tt class="py-string">'RESTORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line">    <tt class="py-string">'RESTRICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line">    <tt class="py-string">'RETURN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line">    <tt class="py-string">'REVOKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line">    <tt class="py-string">'RIGHT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line">    <tt class="py-string">'ROLLBACK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line">    <tt class="py-string">'ROWCOUNT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line">    <tt class="py-string">'ROWGUIDCOL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1415"></a><tt class="py-lineno">1415</tt>  <tt class="py-line">    <tt class="py-string">'RULE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line">    <tt class="py-string">'SAVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1417"></a><tt class="py-lineno">1417</tt>  <tt class="py-line">    <tt class="py-string">'SCHEMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line">    <tt class="py-string">'SESSION_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1420"></a><tt class="py-lineno">1420</tt>  <tt class="py-line">    <tt class="py-string">'SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line">    <tt class="py-string">'SETUSER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">    <tt class="py-string">'SHUTDOWN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line">    <tt class="py-string">'SOME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1424"></a><tt class="py-lineno">1424</tt>  <tt class="py-line">    <tt class="py-string">'STATISTICS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">    <tt class="py-string">'SYSTEM_USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line">    <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line">    <tt class="py-string">'TEXTSIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1428"></a><tt class="py-lineno">1428</tt>  <tt class="py-line">    <tt class="py-string">'THEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1429"></a><tt class="py-lineno">1429</tt>  <tt class="py-line">    <tt class="py-string">'TO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">    <tt class="py-string">'TOP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line">    <tt class="py-string">'TRAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1432"></a><tt class="py-lineno">1432</tt>  <tt class="py-line">    <tt class="py-string">'TRANSACTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line">    <tt class="py-string">'TRUNCATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line">    <tt class="py-string">'TSEQUAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1436"></a><tt class="py-lineno">1436</tt>  <tt class="py-line">    <tt class="py-string">'UNION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line">    <tt class="py-string">'UNIQUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">    <tt class="py-string">'UPDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line">    <tt class="py-string">'UPDATETEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1440"></a><tt class="py-lineno">1440</tt>  <tt class="py-line">    <tt class="py-string">'USE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">    <tt class="py-string">'USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line">    <tt class="py-string">'VALUES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line">    <tt class="py-string">'VARYING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1444"></a><tt class="py-lineno">1444</tt>  <tt class="py-line">    <tt class="py-string">'VIEW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line">    <tt class="py-string">'WAITFOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line">    <tt class="py-string">'WHEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line">    <tt class="py-string">'WHERE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line">    <tt class="py-string">'WHILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1449"></a><tt class="py-lineno">1449</tt>  <tt class="py-line">    <tt class="py-string">'WITH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line">    <tt class="py-string">'WRITETEXT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line"> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.ORACLE=web2py.gluon.reserved_sql_keywords-module.html#ORACLE"><a title="web2py.gluon.reserved_sql_keywords.ORACLE" class="py-name" href="#" onclick="return doclink('link-8', 'ORACLE', 'link-8');">ORACLE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L1454"></a><tt class="py-lineno">1454</tt>  <tt class="py-line">    <tt class="py-string">'ACCESS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">    <tt class="py-string">'ADD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line">    <tt class="py-string">'ALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line">    <tt class="py-string">'ALTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line">    <tt class="py-string">'AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1459"></a><tt class="py-lineno">1459</tt>  <tt class="py-line">    <tt class="py-string">'ANY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line">    <tt class="py-string">'AS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line">    <tt class="py-string">'ASC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line">    <tt class="py-string">'AUDIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line">    <tt class="py-string">'BETWEEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1464"></a><tt class="py-lineno">1464</tt>  <tt class="py-line">    <tt class="py-string">'BY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line">    <tt class="py-string">'CHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1466"></a><tt class="py-lineno">1466</tt>  <tt class="py-line">    <tt class="py-string">'CHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">    <tt class="py-string">'CLUSTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line">    <tt class="py-string">'COLUMN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1469"></a><tt class="py-lineno">1469</tt>  <tt class="py-line">    <tt class="py-string">'COMMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line">    <tt class="py-string">'COMPRESS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">    <tt class="py-string">'CONNECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line">    <tt class="py-string">'CREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1473"></a><tt class="py-lineno">1473</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line">    <tt class="py-string">'DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">    <tt class="py-string">'DECIMAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line">    <tt class="py-string">'DEFAULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line">    <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1478"></a><tt class="py-lineno">1478</tt>  <tt class="py-line">    <tt class="py-string">'DESC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">    <tt class="py-string">'DROP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line">    <tt class="py-string">'ELSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line">    <tt class="py-string">'EXCLUSIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line">    <tt class="py-string">'EXISTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line">    <tt class="py-string">'FILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1485"></a><tt class="py-lineno">1485</tt>  <tt class="py-line">    <tt class="py-string">'FLOAT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1486"></a><tt class="py-lineno">1486</tt>  <tt class="py-line">    <tt class="py-string">'FOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line">    <tt class="py-string">'FROM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line">    <tt class="py-string">'GRANT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line">    <tt class="py-string">'GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1490"></a><tt class="py-lineno">1490</tt>  <tt class="py-line">    <tt class="py-string">'HAVING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line">    <tt class="py-string">'IDENTIFIED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line">    <tt class="py-string">'IMMEDIATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line">    <tt class="py-string">'IN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line">    <tt class="py-string">'INCREMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line">    <tt class="py-string">'INDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line">    <tt class="py-string">'INITIAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line">    <tt class="py-string">'INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line">    <tt class="py-string">'INTEGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line">    <tt class="py-string">'INTERSECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line">    <tt class="py-string">'INTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line">    <tt class="py-string">'IS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line">    <tt class="py-string">'LEVEL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line">    <tt class="py-string">'LIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line">    <tt class="py-string">'LOCK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line">    <tt class="py-string">'LONG'</tt><tt class="py-op">,</tt> </tt>
<a name="L1506"></a><tt class="py-lineno">1506</tt>  <tt class="py-line">    <tt class="py-string">'MAXEXTENTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line">    <tt class="py-string">'MINUS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line">    <tt class="py-string">'MLSLABEL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line">    <tt class="py-string">'MODE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line">    <tt class="py-string">'MODIFY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line">    <tt class="py-string">'NOAUDIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line">    <tt class="py-string">'NOCOMPRESS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1513"></a><tt class="py-lineno">1513</tt>  <tt class="py-line">    <tt class="py-string">'NOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1514"></a><tt class="py-lineno">1514</tt>  <tt class="py-line">    <tt class="py-string">'NOWAIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line">    <tt class="py-string">'NULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line">    <tt class="py-string">'NUMBER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line">    <tt class="py-string">'OF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line">    <tt class="py-string">'OFFLINE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line">    <tt class="py-string">'ONLINE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line">    <tt class="py-string">'OPTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line">    <tt class="py-string">'OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line">    <tt class="py-string">'ORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line">    <tt class="py-string">'PCTFREE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line">    <tt class="py-string">'PRIOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">    <tt class="py-string">'PRIVILEGES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line">    <tt class="py-string">'PUBLIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line">    <tt class="py-string">'RAW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line">    <tt class="py-string">'RENAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1530"></a><tt class="py-lineno">1530</tt>  <tt class="py-line">    <tt class="py-string">'RESOURCE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1531"></a><tt class="py-lineno">1531</tt>  <tt class="py-line">    <tt class="py-string">'REVOKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1532"></a><tt class="py-lineno">1532</tt>  <tt class="py-line">    <tt class="py-string">'ROW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1533"></a><tt class="py-lineno">1533</tt>  <tt class="py-line">    <tt class="py-string">'ROWID'</tt><tt class="py-op">,</tt> </tt>
<a name="L1534"></a><tt class="py-lineno">1534</tt>  <tt class="py-line">    <tt class="py-string">'ROWNUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1535"></a><tt class="py-lineno">1535</tt>  <tt class="py-line">    <tt class="py-string">'ROWS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1536"></a><tt class="py-lineno">1536</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1537"></a><tt class="py-lineno">1537</tt>  <tt class="py-line">    <tt class="py-string">'SESSION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1538"></a><tt class="py-lineno">1538</tt>  <tt class="py-line">    <tt class="py-string">'SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L1539"></a><tt class="py-lineno">1539</tt>  <tt class="py-line">    <tt class="py-string">'SHARE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1540"></a><tt class="py-lineno">1540</tt>  <tt class="py-line">    <tt class="py-string">'SIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1541"></a><tt class="py-lineno">1541</tt>  <tt class="py-line">    <tt class="py-string">'SMALLINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1542"></a><tt class="py-lineno">1542</tt>  <tt class="py-line">    <tt class="py-string">'START'</tt><tt class="py-op">,</tt> </tt>
<a name="L1543"></a><tt class="py-lineno">1543</tt>  <tt class="py-line">    <tt class="py-string">'SUCCESSFUL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1544"></a><tt class="py-lineno">1544</tt>  <tt class="py-line">    <tt class="py-string">'SYNONYM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1545"></a><tt class="py-lineno">1545</tt>  <tt class="py-line">    <tt class="py-string">'SYSDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1546"></a><tt class="py-lineno">1546</tt>  <tt class="py-line">    <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1547"></a><tt class="py-lineno">1547</tt>  <tt class="py-line">    <tt class="py-string">'THEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1548"></a><tt class="py-lineno">1548</tt>  <tt class="py-line">    <tt class="py-string">'TO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1549"></a><tt class="py-lineno">1549</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1550"></a><tt class="py-lineno">1550</tt>  <tt class="py-line">    <tt class="py-string">'UID'</tt><tt class="py-op">,</tt> </tt>
<a name="L1551"></a><tt class="py-lineno">1551</tt>  <tt class="py-line">    <tt class="py-string">'UNION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1552"></a><tt class="py-lineno">1552</tt>  <tt class="py-line">    <tt class="py-string">'UNIQUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1553"></a><tt class="py-lineno">1553</tt>  <tt class="py-line">    <tt class="py-string">'UPDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1554"></a><tt class="py-lineno">1554</tt>  <tt class="py-line">    <tt class="py-string">'USER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1555"></a><tt class="py-lineno">1555</tt>  <tt class="py-line">    <tt class="py-string">'VALIDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1556"></a><tt class="py-lineno">1556</tt>  <tt class="py-line">    <tt class="py-string">'VALUES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1557"></a><tt class="py-lineno">1557</tt>  <tt class="py-line">    <tt class="py-string">'VARCHAR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1558"></a><tt class="py-lineno">1558</tt>  <tt class="py-line">    <tt class="py-string">'VARCHAR2'</tt><tt class="py-op">,</tt> </tt>
<a name="L1559"></a><tt class="py-lineno">1559</tt>  <tt class="py-line">    <tt class="py-string">'VIEW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1560"></a><tt class="py-lineno">1560</tt>  <tt class="py-line">    <tt class="py-string">'WHENEVER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1561"></a><tt class="py-lineno">1561</tt>  <tt class="py-line">    <tt class="py-string">'WHERE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1562"></a><tt class="py-lineno">1562</tt>  <tt class="py-line">    <tt class="py-string">'WITH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1563"></a><tt class="py-lineno">1563</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1564"></a><tt class="py-lineno">1564</tt>  <tt class="py-line"> </tt>
<a name="L1565"></a><tt class="py-lineno">1565</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.SQLITE=web2py.gluon.reserved_sql_keywords-module.html#SQLITE"><a title="web2py.gluon.reserved_sql_keywords.SQLITE" class="py-name" href="#" onclick="return doclink('link-9', 'SQLITE', 'link-9');">SQLITE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
<a name="L1566"></a><tt class="py-lineno">1566</tt>  <tt class="py-line">    <tt class="py-string">'ABORT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1567"></a><tt class="py-lineno">1567</tt>  <tt class="py-line">    <tt class="py-string">'ACTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1568"></a><tt class="py-lineno">1568</tt>  <tt class="py-line">    <tt class="py-string">'ADD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1569"></a><tt class="py-lineno">1569</tt>  <tt class="py-line">    <tt class="py-string">'AFTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1570"></a><tt class="py-lineno">1570</tt>  <tt class="py-line">    <tt class="py-string">'ALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1571"></a><tt class="py-lineno">1571</tt>  <tt class="py-line">    <tt class="py-string">'ALTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1572"></a><tt class="py-lineno">1572</tt>  <tt class="py-line">    <tt class="py-string">'ANALYZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1573"></a><tt class="py-lineno">1573</tt>  <tt class="py-line">    <tt class="py-string">'AND'</tt><tt class="py-op">,</tt> </tt>
<a name="L1574"></a><tt class="py-lineno">1574</tt>  <tt class="py-line">    <tt class="py-string">'AS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1575"></a><tt class="py-lineno">1575</tt>  <tt class="py-line">    <tt class="py-string">'ASC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1576"></a><tt class="py-lineno">1576</tt>  <tt class="py-line">    <tt class="py-string">'ATTACH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1577"></a><tt class="py-lineno">1577</tt>  <tt class="py-line">    <tt class="py-string">'AUTOINCREMENT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1578"></a><tt class="py-lineno">1578</tt>  <tt class="py-line">    <tt class="py-string">'BEFORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1579"></a><tt class="py-lineno">1579</tt>  <tt class="py-line">    <tt class="py-string">'BEGIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1580"></a><tt class="py-lineno">1580</tt>  <tt class="py-line">    <tt class="py-string">'BETWEEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1581"></a><tt class="py-lineno">1581</tt>  <tt class="py-line">    <tt class="py-string">'BY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1582"></a><tt class="py-lineno">1582</tt>  <tt class="py-line">    <tt class="py-string">'CASCADE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1583"></a><tt class="py-lineno">1583</tt>  <tt class="py-line">    <tt class="py-string">'CASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1584"></a><tt class="py-lineno">1584</tt>  <tt class="py-line">    <tt class="py-string">'CAST'</tt><tt class="py-op">,</tt> </tt>
<a name="L1585"></a><tt class="py-lineno">1585</tt>  <tt class="py-line">    <tt class="py-string">'CHECK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1586"></a><tt class="py-lineno">1586</tt>  <tt class="py-line">    <tt class="py-string">'COLLATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1587"></a><tt class="py-lineno">1587</tt>  <tt class="py-line">    <tt class="py-string">'COLUMN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1588"></a><tt class="py-lineno">1588</tt>  <tt class="py-line">    <tt class="py-string">'COMMIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1589"></a><tt class="py-lineno">1589</tt>  <tt class="py-line">    <tt class="py-string">'CONFLICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1590"></a><tt class="py-lineno">1590</tt>  <tt class="py-line">    <tt class="py-string">'CONSTRAINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1591"></a><tt class="py-lineno">1591</tt>  <tt class="py-line">    <tt class="py-string">'CREATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1592"></a><tt class="py-lineno">1592</tt>  <tt class="py-line">    <tt class="py-string">'CROSS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1593"></a><tt class="py-lineno">1593</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1594"></a><tt class="py-lineno">1594</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1595"></a><tt class="py-lineno">1595</tt>  <tt class="py-line">    <tt class="py-string">'CURRENT_TIMESTAMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1596"></a><tt class="py-lineno">1596</tt>  <tt class="py-line">    <tt class="py-string">'DATABASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1597"></a><tt class="py-lineno">1597</tt>  <tt class="py-line">    <tt class="py-string">'DEFAULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1598"></a><tt class="py-lineno">1598</tt>  <tt class="py-line">    <tt class="py-string">'DEFERRABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1599"></a><tt class="py-lineno">1599</tt>  <tt class="py-line">    <tt class="py-string">'DEFERRED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1600"></a><tt class="py-lineno">1600</tt>  <tt class="py-line">    <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1601"></a><tt class="py-lineno">1601</tt>  <tt class="py-line">    <tt class="py-string">'DESC'</tt><tt class="py-op">,</tt> </tt>
<a name="L1602"></a><tt class="py-lineno">1602</tt>  <tt class="py-line">    <tt class="py-string">'DETACH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1603"></a><tt class="py-lineno">1603</tt>  <tt class="py-line">    <tt class="py-string">'DISTINCT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1604"></a><tt class="py-lineno">1604</tt>  <tt class="py-line">    <tt class="py-string">'DROP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1605"></a><tt class="py-lineno">1605</tt>  <tt class="py-line">    <tt class="py-string">'EACH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1606"></a><tt class="py-lineno">1606</tt>  <tt class="py-line">    <tt class="py-string">'ELSE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1607"></a><tt class="py-lineno">1607</tt>  <tt class="py-line">    <tt class="py-string">'END'</tt><tt class="py-op">,</tt> </tt>
<a name="L1608"></a><tt class="py-lineno">1608</tt>  <tt class="py-line">    <tt class="py-string">'ESCAPE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1609"></a><tt class="py-lineno">1609</tt>  <tt class="py-line">    <tt class="py-string">'EXCEPT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1610"></a><tt class="py-lineno">1610</tt>  <tt class="py-line">    <tt class="py-string">'EXCLUSIVE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1611"></a><tt class="py-lineno">1611</tt>  <tt class="py-line">    <tt class="py-string">'EXISTS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1612"></a><tt class="py-lineno">1612</tt>  <tt class="py-line">    <tt class="py-string">'EXPLAIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1613"></a><tt class="py-lineno">1613</tt>  <tt class="py-line">    <tt class="py-string">'FAIL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1614"></a><tt class="py-lineno">1614</tt>  <tt class="py-line">    <tt class="py-string">'FOR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1615"></a><tt class="py-lineno">1615</tt>  <tt class="py-line">    <tt class="py-string">'FOREIGN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1616"></a><tt class="py-lineno">1616</tt>  <tt class="py-line">    <tt class="py-string">'FROM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1617"></a><tt class="py-lineno">1617</tt>  <tt class="py-line">    <tt class="py-string">'FULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1618"></a><tt class="py-lineno">1618</tt>  <tt class="py-line">    <tt class="py-string">'GLOB'</tt><tt class="py-op">,</tt> </tt>
<a name="L1619"></a><tt class="py-lineno">1619</tt>  <tt class="py-line">    <tt class="py-string">'GROUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1620"></a><tt class="py-lineno">1620</tt>  <tt class="py-line">    <tt class="py-string">'HAVING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1621"></a><tt class="py-lineno">1621</tt>  <tt class="py-line">    <tt class="py-string">'IF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1622"></a><tt class="py-lineno">1622</tt>  <tt class="py-line">    <tt class="py-string">'IGNORE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1623"></a><tt class="py-lineno">1623</tt>  <tt class="py-line">    <tt class="py-string">'IMMEDIATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1624"></a><tt class="py-lineno">1624</tt>  <tt class="py-line">    <tt class="py-string">'IN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1625"></a><tt class="py-lineno">1625</tt>  <tt class="py-line">    <tt class="py-string">'INDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L1626"></a><tt class="py-lineno">1626</tt>  <tt class="py-line">    <tt class="py-string">'INDEXED'</tt><tt class="py-op">,</tt> </tt>
<a name="L1627"></a><tt class="py-lineno">1627</tt>  <tt class="py-line">    <tt class="py-string">'INITIALLY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1628"></a><tt class="py-lineno">1628</tt>  <tt class="py-line">    <tt class="py-string">'INNER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1629"></a><tt class="py-lineno">1629</tt>  <tt class="py-line">    <tt class="py-string">'INSERT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1630"></a><tt class="py-lineno">1630</tt>  <tt class="py-line">    <tt class="py-string">'INSTEAD'</tt><tt class="py-op">,</tt> </tt>
<a name="L1631"></a><tt class="py-lineno">1631</tt>  <tt class="py-line">    <tt class="py-string">'INTERSECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1632"></a><tt class="py-lineno">1632</tt>  <tt class="py-line">    <tt class="py-string">'INTO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1633"></a><tt class="py-lineno">1633</tt>  <tt class="py-line">    <tt class="py-string">'IS'</tt><tt class="py-op">,</tt> </tt>
<a name="L1634"></a><tt class="py-lineno">1634</tt>  <tt class="py-line">    <tt class="py-string">'ISNULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1635"></a><tt class="py-lineno">1635</tt>  <tt class="py-line">    <tt class="py-string">'JOIN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1636"></a><tt class="py-lineno">1636</tt>  <tt class="py-line">    <tt class="py-string">'KEY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1637"></a><tt class="py-lineno">1637</tt>  <tt class="py-line">    <tt class="py-string">'LEFT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1638"></a><tt class="py-lineno">1638</tt>  <tt class="py-line">    <tt class="py-string">'LIKE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1639"></a><tt class="py-lineno">1639</tt>  <tt class="py-line">    <tt class="py-string">'LIMIT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1640"></a><tt class="py-lineno">1640</tt>  <tt class="py-line">    <tt class="py-string">'MATCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L1641"></a><tt class="py-lineno">1641</tt>  <tt class="py-line">    <tt class="py-string">'NATURAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1642"></a><tt class="py-lineno">1642</tt>  <tt class="py-line">    <tt class="py-string">'NO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1643"></a><tt class="py-lineno">1643</tt>  <tt class="py-line">    <tt class="py-string">'NOT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1644"></a><tt class="py-lineno">1644</tt>  <tt class="py-line">    <tt class="py-string">'NOTNULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1645"></a><tt class="py-lineno">1645</tt>  <tt class="py-line">    <tt class="py-string">'NULL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1646"></a><tt class="py-lineno">1646</tt>  <tt class="py-line">    <tt class="py-string">'OF'</tt><tt class="py-op">,</tt> </tt>
<a name="L1647"></a><tt class="py-lineno">1647</tt>  <tt class="py-line">    <tt class="py-string">'OFFSET'</tt><tt class="py-op">,</tt> </tt>
<a name="L1648"></a><tt class="py-lineno">1648</tt>  <tt class="py-line">    <tt class="py-string">'ON'</tt><tt class="py-op">,</tt> </tt>
<a name="L1649"></a><tt class="py-lineno">1649</tt>  <tt class="py-line">    <tt class="py-string">'OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L1650"></a><tt class="py-lineno">1650</tt>  <tt class="py-line">    <tt class="py-string">'ORDER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1651"></a><tt class="py-lineno">1651</tt>  <tt class="py-line">    <tt class="py-string">'OUTER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1652"></a><tt class="py-lineno">1652</tt>  <tt class="py-line">    <tt class="py-string">'PLAN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1653"></a><tt class="py-lineno">1653</tt>  <tt class="py-line">    <tt class="py-string">'PRAGMA'</tt><tt class="py-op">,</tt> </tt>
<a name="L1654"></a><tt class="py-lineno">1654</tt>  <tt class="py-line">    <tt class="py-string">'PRIMARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1655"></a><tt class="py-lineno">1655</tt>  <tt class="py-line">    <tt class="py-string">'QUERY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1656"></a><tt class="py-lineno">1656</tt>  <tt class="py-line">    <tt class="py-string">'RAISE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1657"></a><tt class="py-lineno">1657</tt>  <tt class="py-line">    <tt class="py-string">'REFERENCES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1658"></a><tt class="py-lineno">1658</tt>  <tt class="py-line">    <tt class="py-string">'REGEXP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1659"></a><tt class="py-lineno">1659</tt>  <tt class="py-line">    <tt class="py-string">'REINDEX'</tt><tt class="py-op">,</tt> </tt>
<a name="L1660"></a><tt class="py-lineno">1660</tt>  <tt class="py-line">    <tt class="py-string">'RELEASE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1661"></a><tt class="py-lineno">1661</tt>  <tt class="py-line">    <tt class="py-string">'RENAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L1662"></a><tt class="py-lineno">1662</tt>  <tt class="py-line">    <tt class="py-string">'REPLACE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1663"></a><tt class="py-lineno">1663</tt>  <tt class="py-line">    <tt class="py-string">'RESTRICT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1664"></a><tt class="py-lineno">1664</tt>  <tt class="py-line">    <tt class="py-string">'RIGHT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1665"></a><tt class="py-lineno">1665</tt>  <tt class="py-line">    <tt class="py-string">'ROLLBACK'</tt><tt class="py-op">,</tt> </tt>
<a name="L1666"></a><tt class="py-lineno">1666</tt>  <tt class="py-line">    <tt class="py-string">'ROW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1667"></a><tt class="py-lineno">1667</tt>  <tt class="py-line">    <tt class="py-string">'SAVEPOINT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1668"></a><tt class="py-lineno">1668</tt>  <tt class="py-line">    <tt class="py-string">'SELECT'</tt><tt class="py-op">,</tt> </tt>
<a name="L1669"></a><tt class="py-lineno">1669</tt>  <tt class="py-line">    <tt class="py-string">'SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L1670"></a><tt class="py-lineno">1670</tt>  <tt class="py-line">    <tt class="py-string">'TABLE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1671"></a><tt class="py-lineno">1671</tt>  <tt class="py-line">    <tt class="py-string">'TEMP'</tt><tt class="py-op">,</tt> </tt>
<a name="L1672"></a><tt class="py-lineno">1672</tt>  <tt class="py-line">    <tt class="py-string">'TEMPORARY'</tt><tt class="py-op">,</tt> </tt>
<a name="L1673"></a><tt class="py-lineno">1673</tt>  <tt class="py-line">    <tt class="py-string">'THEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1674"></a><tt class="py-lineno">1674</tt>  <tt class="py-line">    <tt class="py-string">'TO'</tt><tt class="py-op">,</tt> </tt>
<a name="L1675"></a><tt class="py-lineno">1675</tt>  <tt class="py-line">    <tt class="py-string">'TRANSACTION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1676"></a><tt class="py-lineno">1676</tt>  <tt class="py-line">    <tt class="py-string">'TRIGGER'</tt><tt class="py-op">,</tt> </tt>
<a name="L1677"></a><tt class="py-lineno">1677</tt>  <tt class="py-line">    <tt class="py-string">'UNION'</tt><tt class="py-op">,</tt> </tt>
<a name="L1678"></a><tt class="py-lineno">1678</tt>  <tt class="py-line">    <tt class="py-string">'UNIQUE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1679"></a><tt class="py-lineno">1679</tt>  <tt class="py-line">    <tt class="py-string">'UPDATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1680"></a><tt class="py-lineno">1680</tt>  <tt class="py-line">    <tt class="py-string">'USING'</tt><tt class="py-op">,</tt> </tt>
<a name="L1681"></a><tt class="py-lineno">1681</tt>  <tt class="py-line">    <tt class="py-string">'VACUUM'</tt><tt class="py-op">,</tt> </tt>
<a name="L1682"></a><tt class="py-lineno">1682</tt>  <tt class="py-line">    <tt class="py-string">'VALUES'</tt><tt class="py-op">,</tt> </tt>
<a name="L1683"></a><tt class="py-lineno">1683</tt>  <tt class="py-line">    <tt class="py-string">'VIEW'</tt><tt class="py-op">,</tt> </tt>
<a name="L1684"></a><tt class="py-lineno">1684</tt>  <tt class="py-line">    <tt class="py-string">'VIRTUAL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1685"></a><tt class="py-lineno">1685</tt>  <tt class="py-line">    <tt class="py-string">'WHEN'</tt><tt class="py-op">,</tt> </tt>
<a name="L1686"></a><tt class="py-lineno">1686</tt>  <tt class="py-line">    <tt class="py-string">'WHERE'</tt><tt class="py-op">,</tt> </tt>
<a name="L1687"></a><tt class="py-lineno">1687</tt>  <tt class="py-line"><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1688"></a><tt class="py-lineno">1688</tt>  <tt class="py-line"> </tt>
<a name="L1689"></a><tt class="py-lineno">1689</tt>  <tt class="py-line"><tt class="py-comment"># remove from here when you add a list.</tt> </tt>
<a name="L1690"></a><tt class="py-lineno">1690</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-10" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.JDBCSQLITE=web2py.gluon.reserved_sql_keywords-module.html#JDBCSQLITE"><a title="web2py.gluon.reserved_sql_keywords.JDBCSQLITE" class="py-name" href="#" onclick="return doclink('link-10', 'JDBCSQLITE', 'link-10');">JDBCSQLITE</a></tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.SQLITE" class="py-name" href="#" onclick="return doclink('link-11', 'SQLITE', 'link-9');">SQLITE</a></tt> </tt>
<a name="L1691"></a><tt class="py-lineno">1691</tt>  <tt class="py-line"><tt id="link-12" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.DB2=web2py.gluon.reserved_sql_keywords-module.html#DB2"><a title="web2py.gluon.reserved_sql_keywords.DB2" class="py-name" href="#" onclick="return doclink('link-12', 'DB2', 'link-12');">DB2</a></tt> <tt class="py-op">=</tt> <tt id="link-13" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.INFORMIX=web2py.gluon.reserved_sql_keywords-module.html#INFORMIX"><a title="web2py.gluon.reserved_sql_keywords.INFORMIX" class="py-name" href="#" onclick="return doclink('link-13', 'INFORMIX', 'link-13');">INFORMIX</a></tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.INGRES=web2py.gluon.reserved_sql_keywords-module.html#INGRES"><a title="web2py.gluon.reserved_sql_keywords.INGRES" class="py-name" href="#" onclick="return doclink('link-14', 'INGRES', 'link-14');">INGRES</a></tt> <tt class="py-op">=</tt> <tt id="link-15" class="py-name" targets="Variable web2py.gluon.reserved_sql_keywords.JDBCPOSTGRESQL=web2py.gluon.reserved_sql_keywords-module.html#JDBCPOSTGRESQL"><a title="web2py.gluon.reserved_sql_keywords.JDBCPOSTGRESQL" class="py-name" href="#" onclick="return doclink('link-15', 'JDBCPOSTGRESQL', 'link-15');">JDBCPOSTGRESQL</a></tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.COMMON" class="py-name" href="#" onclick="return doclink('link-16', 'COMMON', 'link-1');">COMMON</a></tt> </tt>
<a name="L1692"></a><tt class="py-lineno">1692</tt>  <tt class="py-line"> </tt>
<a name="L1693"></a><tt class="py-lineno">1693</tt>  <tt class="py-line"><tt id="link-17" class="py-name" targets="Variable web2py.gluon.dal.ADAPTERS=web2py.gluon.dal-module.html#ADAPTERS,Variable web2py.gluon.reserved_sql_keywords.ADAPTERS=web2py.gluon.reserved_sql_keywords-module.html#ADAPTERS"><a title="web2py.gluon.dal.ADAPTERS
web2py.gluon.reserved_sql_keywords.ADAPTERS" class="py-name" href="#" onclick="return doclink('link-17', 'ADAPTERS', 'link-17');">ADAPTERS</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L1694"></a><tt class="py-lineno">1694</tt>  <tt class="py-line">    <tt class="py-string">'sqlite'</tt><tt class="py-op">:</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.SQLITE" class="py-name" href="#" onclick="return doclink('link-18', 'SQLITE', 'link-9');">SQLITE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1695"></a><tt class="py-lineno">1695</tt>  <tt class="py-line">    <tt class="py-string">'mysql'</tt><tt class="py-op">:</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.MYSQL" class="py-name" href="#" onclick="return doclink('link-19', 'MYSQL', 'link-6');">MYSQL</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1696"></a><tt class="py-lineno">1696</tt>  <tt class="py-line">    <tt class="py-string">'postgres'</tt><tt class="py-op">:</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.POSTGRESQL" class="py-name" href="#" onclick="return doclink('link-20', 'POSTGRESQL', 'link-2');">POSTGRESQL</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1697"></a><tt class="py-lineno">1697</tt>  <tt class="py-line">    <tt class="py-string">'postgres_nonreserved'</tt><tt class="py-op">:</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.POSTGRESQL_NONRESERVED" class="py-name" href="#" onclick="return doclink('link-21', 'POSTGRESQL_NONRESERVED', 'link-3');">POSTGRESQL_NONRESERVED</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1698"></a><tt class="py-lineno">1698</tt>  <tt class="py-line">    <tt class="py-string">'oracle'</tt><tt class="py-op">:</tt> <tt id="link-22" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.ORACLE" class="py-name" href="#" onclick="return doclink('link-22', 'ORACLE', 'link-8');">ORACLE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1699"></a><tt class="py-lineno">1699</tt>  <tt class="py-line">    <tt class="py-string">'mssql'</tt><tt class="py-op">:</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.MSSQL" class="py-name" href="#" onclick="return doclink('link-23', 'MSSQL', 'link-7');">MSSQL</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1700"></a><tt class="py-lineno">1700</tt>  <tt class="py-line">    <tt class="py-string">'mssql2'</tt><tt class="py-op">:</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.MSSQL" class="py-name" href="#" onclick="return doclink('link-24', 'MSSQL', 'link-7');">MSSQL</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1701"></a><tt class="py-lineno">1701</tt>  <tt class="py-line">    <tt class="py-string">'db2'</tt><tt class="py-op">:</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.DB2" class="py-name" href="#" onclick="return doclink('link-25', 'DB2', 'link-12');">DB2</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1702"></a><tt class="py-lineno">1702</tt>  <tt class="py-line">    <tt class="py-string">'informix'</tt><tt class="py-op">:</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.INFORMIX" class="py-name" href="#" onclick="return doclink('link-26', 'INFORMIX', 'link-13');">INFORMIX</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1703"></a><tt class="py-lineno">1703</tt>  <tt class="py-line">    <tt class="py-string">'firebird'</tt><tt class="py-op">:</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.FIREBIRD" class="py-name" href="#" onclick="return doclink('link-27', 'FIREBIRD', 'link-4');">FIREBIRD</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1704"></a><tt class="py-lineno">1704</tt>  <tt class="py-line">    <tt class="py-string">'firebird_embedded'</tt><tt class="py-op">:</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.FIREBIRD" class="py-name" href="#" onclick="return doclink('link-28', 'FIREBIRD', 'link-4');">FIREBIRD</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1705"></a><tt class="py-lineno">1705</tt>  <tt class="py-line">    <tt class="py-string">'firebird_nonreserved'</tt><tt class="py-op">:</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.FIREBIRD_NONRESERVED" class="py-name" href="#" onclick="return doclink('link-29', 'FIREBIRD_NONRESERVED', 'link-5');">FIREBIRD_NONRESERVED</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1706"></a><tt class="py-lineno">1706</tt>  <tt class="py-line">    <tt class="py-string">'ingres'</tt><tt class="py-op">:</tt> <tt id="link-30" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.INGRES" class="py-name" href="#" onclick="return doclink('link-30', 'INGRES', 'link-14');">INGRES</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1707"></a><tt class="py-lineno">1707</tt>  <tt class="py-line">    <tt class="py-string">'ingresu'</tt><tt class="py-op">:</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.INGRES" class="py-name" href="#" onclick="return doclink('link-31', 'INGRES', 'link-14');">INGRES</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1708"></a><tt class="py-lineno">1708</tt>  <tt class="py-line">    <tt class="py-string">'jdbc:sqlite'</tt><tt class="py-op">:</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.JDBCSQLITE" class="py-name" href="#" onclick="return doclink('link-32', 'JDBCSQLITE', 'link-10');">JDBCSQLITE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1709"></a><tt class="py-lineno">1709</tt>  <tt class="py-line">    <tt class="py-string">'jdbc:postgres'</tt><tt class="py-op">:</tt> <tt id="link-33" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.JDBCPOSTGRESQL" class="py-name" href="#" onclick="return doclink('link-33', 'JDBCPOSTGRESQL', 'link-15');">JDBCPOSTGRESQL</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1710"></a><tt class="py-lineno">1710</tt>  <tt class="py-line">    <tt class="py-string">'common'</tt><tt class="py-op">:</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.reserved_sql_keywords.COMMON" class="py-name" href="#" onclick="return doclink('link-34', 'COMMON', 'link-1');">COMMON</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1711"></a><tt class="py-lineno">1711</tt>  <tt class="py-line"><tt class="py-op">}</tt> </tt>
<a name="L1712"></a><tt class="py-lineno">1712</tt>  <tt class="py-line"> </tt>
<a name="L1713"></a><tt class="py-lineno">1713</tt>  <tt class="py-line"><tt id="link-35" class="py-name"><a title="web2py.gluon.dal.ADAPTERS
web2py.gluon.reserved_sql_keywords.ADAPTERS" class="py-name" href="#" onclick="return doclink('link-35', 'ADAPTERS', 'link-17');">ADAPTERS</a></tt><tt class="py-op">[</tt><tt class="py-string">'all'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-36" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-36', 'b', 'link-36');">b</a></tt><tt class="py-op">:</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt class="py-name">union</tt><tt class="py-op">(</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-37', 'b', 'link-36');">b</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt id="link-38" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-38', 'x', 'link-38');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-39" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-39', 'x', 'link-38');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-40" class="py-name"><a title="web2py.gluon.dal.ADAPTERS
web2py.gluon.reserved_sql_keywords.ADAPTERS" class="py-name" href="#" onclick="return doclink('link-40', 'ADAPTERS', 'link-17');">ADAPTERS</a></tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method web2py.gluon.rocket.Headers.values()=web2py.gluon.rocket.Headers-class.html#values"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-41', 'values', 'link-41');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1714"></a><tt class="py-lineno">1714</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.restricted-module.html version [06ba297d7b].













































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.restricted</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;restricted
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.restricted-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module restricted</h1><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.restricted.TicketStorage-class.html" class="summary-name">TicketStorage</a><br />
      defines the ticket object and the default values of its members 
        (None)
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.restricted.RestrictedError-class.html" class="summary-name">RestrictedError</a><br />
      class used to wrap an exception that occurs in the restricted 
        environment below.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compile2"></a><span class="summary-sig-name">compile2</span>(<span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">layer</span>)</span><br />
      The +'
' is necessary else compile fails when code ends in a comment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#compile2">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.restricted-module.html#restricted" class="summary-sig-name">restricted</a>(<span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">environment</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">layer</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">Unknown</code><code class="variable-quote">'</code></span>)</span><br />
      runs code in environment and returns the output.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#restricted">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="snapshot"></a><span class="summary-sig-name">snapshot</span>(<span class="summary-sig-arg">info</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">context</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">code</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">environment</span>=<span class="summary-sig-default">1</span>)</span><br />
      Return a dict describing a given traceback (based on 
      cgitb.text).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#snapshot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="restricted"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">restricted</span>(<span class="sig-arg">code</span>,
        <span class="sig-arg">environment</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">layer</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">Unknown</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#restricted">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  runs code in environment and returns the output. if an exception 
  occurs in code it raises a RestrictedError containing the traceback. 
  layer is passed to RestrictedError to identify where the error 
  occurred.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.restricted-pysrc.html version [50d9c26e40].






























































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.restricted</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;restricted
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.restricted-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.restricted-module.html">Module web2py.gluon.restricted</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cPickle</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Variable web2py.gluon.dal.BaseAdapter.types=web2py.gluon.dal.BaseAdapter-class.html#types,Variable web2py.gluon.dal.CouchDBAdapter.types=web2py.gluon.dal.CouchDBAdapter-class.html#types,Variable web2py.gluon.dal.DB2Adapter.types=web2py.gluon.dal.DB2Adapter-class.html#types,Variable web2py.gluon.dal.FireBirdAdapter.types=web2py.gluon.dal.FireBirdAdapter-class.html#types,Variable web2py.gluon.dal.GoogleDatastoreAdapter.types=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types,Variable web2py.gluon.dal.InformixAdapter.types=web2py.gluon.dal.InformixAdapter-class.html#types,Variable web2py.gluon.dal.IngresAdapter.types=web2py.gluon.dal.IngresAdapter-class.html#types,Variable web2py.gluon.dal.IngresUnicodeAdapter.types=web2py.gluon.dal.IngresUnicodeAdapter-class.html#types,Variable web2py.gluon.dal.MSSQL2Adapter.types=web2py.gluon.dal.MSSQL2Adapter-class.html#types,Variable web2py.gluon.dal.MSSQLAdapter.types=web2py.gluon.dal.MSSQLAdapter-class.html#types,Variable web2py.gluon.dal.MongoDBAdapter.types=web2py.gluon.dal.MongoDBAdapter-class.html#types,Variable web2py.gluon.dal.MySQLAdapter.types=web2py.gluon.dal.MySQLAdapter-class.html#types,Variable web2py.gluon.dal.OracleAdapter.types=web2py.gluon.dal.OracleAdapter-class.html#types,Variable web2py.gluon.dal.PostgreSQLAdapter.types=web2py.gluon.dal.PostgreSQLAdapter-class.html#types,Variable web2py.gluon.dal.SAPDBAdapter.types=web2py.gluon.dal.SAPDBAdapter-class.html#types,Variable web2py.gluon.dal.TeradataAdapter.types=web2py.gluon.dal.TeradataAdapter-class.html#types"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-0', 'types', 'link-0');">types</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-1', 'datetime', 'link-1');">datetime</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-2', 'utils', 'link-2');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Function web2py.gluon.utils.web2py_uuid()=web2py.gluon.utils-module.html#web2py_uuid"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-3', 'web2py_uuid', 'link-3');">web2py_uuid</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-4', 'storage', 'link-4');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-5', 'Storage', 'link-5');">Storage</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-6', 'http', 'link-6');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-7" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-7', 'HTTP', 'link-7');">HTTP</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-8" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-8', 'html', 'link-8');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-9" class="py-name" targets="Class web2py.gluon.html.BEAUTIFY=web2py.gluon.html.BEAUTIFY-class.html"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-9', 'BEAUTIFY', 'link-9');">BEAUTIFY</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-10', 'logger', 'link-10');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'RestrictedError'</tt><tt class="py-op">,</tt> <tt class="py-string">'restricted'</tt><tt class="py-op">,</tt> <tt class="py-string">'TicketStorage'</tt><tt class="py-op">,</tt> <tt class="py-string">'compile2'</tt><tt class="py-op">]</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage"></a><div id="TicketStorage-def"><a name="L27"></a><tt class="py-lineno"> 27</tt> <a class="py-toggle" href="#" id="TicketStorage-toggle" onclick="return toggle('TicketStorage');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html">TicketStorage</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TicketStorage-expanded"><a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">    defines the ticket object and the default values of its members (None)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage.__init__"></a><div id="TicketStorage.__init__-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="TicketStorage.__init__-toggle" onclick="return toggle('TicketStorage.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-param">db</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-param">tablename</tt><tt class="py-op">=</tt><tt class="py-string">'web2py_ticket'</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage.__init__-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tablename</tt> <tt class="py-op">=</tt> <tt class="py-name">tablename</tt> </tt>
</div><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage.store"></a><div id="TicketStorage.store-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="TicketStorage.store-toggle" onclick="return toggle('TicketStorage.store');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#store">store</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage.store-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage.store-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">        stores the ticket. It will figure out if this must be on disk or in db</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">:</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.restricted.TicketStorage._store_in_db()=web2py.gluon.restricted.TicketStorage-class.html#_store_in_db"><a title="web2py.gluon.restricted.TicketStorage._store_in_db" class="py-name" href="#" onclick="return doclink('link-11', '_store_in_db', 'link-11');">_store_in_db</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_data</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method web2py.gluon.restricted.TicketStorage._store_on_disk()=web2py.gluon.restricted.TicketStorage-class.html#_store_on_disk"><a title="web2py.gluon.restricted.TicketStorage._store_on_disk" class="py-name" href="#" onclick="return doclink('link-12', '_store_on_disk', 'link-12');">_store_on_disk</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage._store_in_db"></a><div id="TicketStorage._store_in_db-def"><a name="L50"></a><tt class="py-lineno"> 50</tt> <a class="py-toggle" href="#" id="TicketStorage._store_in_db-toggle" onclick="return toggle('TicketStorage._store_in_db');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#_store_in_db">_store_in_db</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage._store_in_db-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage._store_in_db-expanded"><a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method web2py.gluon.restricted.TicketStorage._get_table()=web2py.gluon.restricted.TicketStorage-class.html#_get_table"><a title="web2py.gluon.restricted.TicketStorage._get_table" class="py-name" href="#" onclick="return doclink('link-13', '_get_table', 'link-13');">_get_table</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-14', 'insert', 'link-14');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">ticket_id</tt><tt class="py-op">=</tt><tt class="py-name">ticket_id</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">                     <tt class="py-name">ticket_data</tt><tt class="py-op">=</tt><tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">ticket_data</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                     <tt class="py-name">created_datetime</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt id="link-15" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-15', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-16', 'error', 'link-16');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'In FILE: %(layer)s\n\n%(traceback)s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">ticket_data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage._store_on_disk"></a><div id="TicketStorage._store_on_disk-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="TicketStorage._store_on_disk-toggle" onclick="return toggle('TicketStorage._store_on_disk');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#_store_on_disk">_store_on_disk</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage._store_on_disk-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage._store_on_disk-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">ef</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method web2py.gluon.restricted.TicketStorage._error_file()=web2py.gluon.restricted.TicketStorage-class.html#_error_file"><a title="web2py.gluon.restricted.TicketStorage._error_file" class="py-name" href="#" onclick="return doclink('link-17', '_error_file', 'link-17');">_error_file</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">            <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dump</tt><tt class="py-op">(</tt><tt class="py-name">ticket_data</tt><tt class="py-op">,</tt> <tt class="py-name">ef</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">            <tt class="py-name">ef</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-18', 'close', 'link-18');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage._error_file"></a><div id="TicketStorage._error_file-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="TicketStorage._error_file-toggle" onclick="return toggle('TicketStorage._error_file');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#_error_file">_error_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage._error_file-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage._error_file-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt id="link-19" class="py-name" targets="Variable web2py.gluon.import_all.root=web2py.gluon.import_all-module.html#root"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-19', 'root', 'link-19');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">app</tt><tt class="py-op">:</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">            <tt id="link-20" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-20', 'root', 'link-19');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-21', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-22', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-23', 'root', 'link-19');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'..'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">errors_folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-24', 'abspath', 'link-24');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-25', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-26', 'root', 'link-19');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'errors'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-comment">#.replace('\\', '/')</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-27', 'join', 'link-21');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">errors_folder</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt>
</div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage._get_table"></a><div id="TicketStorage._get_table-def"><a name="L71"></a><tt class="py-lineno"> 71</tt> <a class="py-toggle" href="#" id="TicketStorage._get_table-toggle" onclick="return toggle('TicketStorage._get_table');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#_get_table">_get_table</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">db</tt><tt class="py-op">,</tt> <tt class="py-param">tablename</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage._get_table-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage._get_table-expanded"><a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt class="py-name">tablename</tt> <tt class="py-op">=</tt> <tt class="py-name">tablename</tt> <tt class="py-op">+</tt> <tt class="py-string">'_'</tt> <tt class="py-op">+</tt> <tt class="py-name">app</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-28', 'get', 'link-28');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">table</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">            <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.rollback()=web2py.gluon.dal.BaseAdapter-class.html#rollback,Method web2py.gluon.dal.DAL.rollback()=web2py.gluon.dal.DAL-class.html#rollback,Method web2py.gluon.dal.NoSQLAdapter.rollback()=web2py.gluon.dal.NoSQLAdapter-class.html#rollback"><a title="web2py.gluon.dal.BaseAdapter.rollback
web2py.gluon.dal.DAL.rollback
web2py.gluon.dal.NoSQLAdapter.rollback" class="py-name" href="#" onclick="return doclink('link-29', 'rollback', 'link-29');">rollback</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>   <tt class="py-comment"># not necessary but one day</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">                            <tt class="py-comment"># any app may store tickets on DB</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method web2py.gluon.dal.DAL.define_table()=web2py.gluon.dal.DAL-class.html#define_table"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-30', 'define_table', 'link-30');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">                <tt class="py-name">tablename</tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">                <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Class web2py.gluon.dal.Field=web2py.gluon.dal.Field-class.html"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-31', 'Field', 'link-31');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'ticket_id'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">100</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">                <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-32', 'Field', 'link-31');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'ticket_data'</tt><tt class="py-op">,</tt> <tt class="py-string">'text'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">                <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-33', 'Field', 'link-31');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_datetime'</tt><tt class="py-op">,</tt> <tt class="py-string">'datetime'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                <tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">table</tt> </tt>
</div><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="TicketStorage.load"></a><div id="TicketStorage.load-def"><a name="L85"></a><tt class="py-lineno"> 85</tt> <a class="py-toggle" href="#" id="TicketStorage.load-toggle" onclick="return toggle('TicketStorage.load');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.TicketStorage-class.html#load">load</a><tt class="py-op">(</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-param">request</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-param">app</tt><tt class="py-op">,</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-param">ticket_id</tt><tt class="py-op">,</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TicketStorage.load-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TicketStorage.load-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">            <tt class="py-name">ef</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.restricted.TicketStorage._error_file" class="py-name" href="#" onclick="return doclink('link-34', '_error_file', 'link-17');">_error_file</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-35', 'load', 'link-35');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">ef</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                <tt class="py-name">ef</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-36', 'close', 'link-18');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.restricted.TicketStorage._get_table" class="py-name" href="#" onclick="return doclink('link-37', '_get_table', 'link-13');">_get_table</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt id="link-38" class="py-name" targets="Method web2py.gluon.tools.Crud.rows()=web2py.gluon.tools.Crud-class.html#rows"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-38', 'rows', 'link-38');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">ticket_id</tt> <tt class="py-op">==</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.select()=web2py.gluon.dal.BaseAdapter-class.html#select,Method web2py.gluon.dal.CouchDBAdapter.select()=web2py.gluon.dal.CouchDBAdapter-class.html#select,Method web2py.gluon.dal.GoogleDatastoreAdapter.select()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select,Method web2py.gluon.dal.MongoDBAdapter.select()=web2py.gluon.dal.MongoDBAdapter-class.html#select,Method web2py.gluon.dal.Set.select()=web2py.gluon.dal.Set-class.html#select,Method web2py.gluon.tools.Crud.select()=web2py.gluon.tools.Crud-class.html#select"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-39', 'select', 'link-39');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-40" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-40', 'rows', 'link-38');">rows</a></tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt id="link-41" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-41', 'rows', 'link-38');">rows</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">ticket_data</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div></div><a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"> </tt>
<a name="RestrictedError"></a><div id="RestrictedError-def"><a name="L104"></a><tt class="py-lineno">104</tt> <a class="py-toggle" href="#" id="RestrictedError-toggle" onclick="return toggle('RestrictedError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.restricted.RestrictedError-class.html">RestrictedError</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RestrictedError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="RestrictedError-expanded"><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring">    class used to wrap an exception that occurs in the restricted environment</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">    below. the traceback is used to log the exception and generate a ticket.</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt>
<a name="RestrictedError.__init__"></a><div id="RestrictedError.__init__-def"><a name="L110"></a><tt class="py-lineno">110</tt> <a class="py-toggle" href="#" id="RestrictedError.__init__-toggle" onclick="return toggle('RestrictedError.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.RestrictedError-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-param">layer</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-param">code</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-param">output</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-param">environment</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RestrictedError.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RestrictedError.__init__-expanded"><a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring">        layer here is some description of where in the system the exception</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">        occurred.</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">layer</tt> <tt class="py-op">=</tt> <tt class="py-name">layer</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-name">code</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Method web2py.gluon.template.BlockNode.output()=web2py.gluon.template.BlockNode-class.html#output"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-42', 'output', 'link-42');">output</a></tt> <tt class="py-op">=</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-43', 'output', 'link-42');">output</a></tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">layer</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt> <tt class="py-op">=</tt> <tt class="py-string">'no traceback because template parting error'</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Function web2py.gluon.restricted.snapshot()=web2py.gluon.restricted-module.html#snapshot"><a title="web2py.gluon.restricted.snapshot" class="py-name" href="#" onclick="return doclink('link-44', 'snapshot', 'link-44');">snapshot</a></tt> <tt class="py-op">=</tt> <tt id="link-45" class="py-name"><a title="web2py.gluon.restricted.snapshot" class="py-name" href="#" onclick="return doclink('link-45', 'snapshot', 'link-44');">snapshot</a></tt><tt class="py-op">(</tt><tt class="py-name">context</tt><tt class="py-op">=</tt><tt class="py-number">10</tt><tt class="py-op">,</tt><tt class="py-name">code</tt><tt class="py-op">=</tt><tt class="py-name">code</tt><tt class="py-op">,</tt><tt class="py-name">environment</tt><tt class="py-op">=</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="web2py.gluon.restricted.snapshot" class="py-name" href="#" onclick="return doclink('link-46', 'snapshot', 'link-44');">snapshot</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt> <tt class="py-op">=</tt> <tt class="py-string">'(no error)'</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.restricted.snapshot" class="py-name" href="#" onclick="return doclink('link-47', 'snapshot', 'link-44');">snapshot</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt> </tt>
</div><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"> </tt>
<a name="RestrictedError.log"></a><div id="RestrictedError.log-def"><a name="L139"></a><tt class="py-lineno">139</tt> <a class="py-toggle" href="#" id="RestrictedError.log-toggle" onclick="return toggle('RestrictedError.log');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.RestrictedError-class.html#log">log</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RestrictedError.log-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RestrictedError.log-expanded"><a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring">        logs the exception.</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">                <tt class="py-string">'layer'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">layer</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">                <tt class="py-string">'code'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">code</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">                <tt class="py-string">'output'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-48', 'output', 'link-42');">output</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">                <tt class="py-string">'traceback'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">                <tt class="py-string">'snapshot'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="web2py.gluon.restricted.snapshot" class="py-name" href="#" onclick="return doclink('link-49', 'snapshot', 'link-44');">snapshot</a></tt><tt class="py-op">,</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">                <tt class="py-op">}</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt class="py-name">ticket_storage</tt> <tt class="py-op">=</tt> <tt id="link-50" class="py-name" targets="Class web2py.gluon.restricted.TicketStorage=web2py.gluon.restricted.TicketStorage-class.html"><a title="web2py.gluon.restricted.TicketStorage" class="py-name" href="#" onclick="return doclink('link-50', 'TicketStorage', 'link-50');">TicketStorage</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">tickets_db</tt><tt class="py-op">)</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">            <tt class="py-name">ticket_storage</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Method web2py.gluon.dal.Field.store()=web2py.gluon.dal.Field-class.html#store,Method web2py.gluon.restricted.TicketStorage.store()=web2py.gluon.restricted.TicketStorage-class.html#store"><a title="web2py.gluon.dal.Field.store
web2py.gluon.restricted.TicketStorage.store" class="py-name" href="#" onclick="return doclink('link-51', 'store', 'link-51');">store</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uuid</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uuid</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt id="link-52" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-52', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-53', 'error', 'link-16');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"> </tt>
<a name="RestrictedError.load"></a><div id="RestrictedError.load-def"><a name="L160"></a><tt class="py-lineno">160</tt> <a class="py-toggle" href="#" id="RestrictedError.load-toggle" onclick="return toggle('RestrictedError.load');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted.RestrictedError-class.html#load">load</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">,</tt> <tt class="py-param">ticket_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RestrictedError.load-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RestrictedError.load-expanded"><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring">        loads a logged exception.</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-name">ticket_storage</tt> <tt class="py-op">=</tt> <tt id="link-54" class="py-name"><a title="web2py.gluon.restricted.TicketStorage" class="py-name" href="#" onclick="return doclink('link-54', 'TicketStorage', 'link-50');">TicketStorage</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">tickets_db</tt><tt class="py-op">)</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">ticket_storage</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-55', 'load', 'link-35');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">ticket_id</tt><tt class="py-op">)</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">layer</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">[</tt><tt class="py-string">'layer'</tt><tt class="py-op">]</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">[</tt><tt class="py-string">'code'</tt><tt class="py-op">]</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-56', 'output', 'link-42');">output</a></tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">[</tt><tt class="py-string">'output'</tt><tt class="py-op">]</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">[</tt><tt class="py-string">'traceback'</tt><tt class="py-op">]</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.restricted.snapshot" class="py-name" href="#" onclick="return doclink('link-57', 'snapshot', 'link-44');">snapshot</a></tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-58', 'get', 'link-28');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'snapshot'</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line"> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"> </tt>
<a name="compile2"></a><div id="compile2-def"><a name="L174"></a><tt class="py-lineno">174</tt> <a class="py-toggle" href="#" id="compile2-toggle" onclick="return toggle('compile2');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted-module.html#compile2">compile2</a><tt class="py-op">(</tt><tt class="py-param">code</tt><tt class="py-op">,</tt><tt class="py-param">layer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="compile2-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="compile2-expanded"><a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"><tt class="py-docstring">    The +'\n' is necessary else compile fails when code ends in a comment.</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">,</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-name">layer</tt><tt class="py-op">,</tt> <tt class="py-string">'exec'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line"> </tt>
<a name="restricted"></a><div id="restricted-def"><a name="L180"></a><tt class="py-lineno">180</tt> <a class="py-toggle" href="#" id="restricted-toggle" onclick="return toggle('restricted');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted-module.html#restricted">restricted</a><tt class="py-op">(</tt><tt class="py-param">code</tt><tt class="py-op">,</tt> <tt class="py-param">environment</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-param">layer</tt><tt class="py-op">=</tt><tt class="py-string">'Unknown'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="restricted-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="restricted-expanded"><a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line"><tt class="py-docstring">    runs code in environment and returns the output. if an exception occurs</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line"><tt class="py-docstring">    in code it raises a RestrictedError containing the traceback. layer is</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"><tt class="py-docstring">    passed to RestrictedError to identify where the error occurred.</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'__file__'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">layer</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt id="link-59" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-59', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">CodeType</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">            <tt class="py-name">ccode</tt> <tt class="py-op">=</tt> <tt class="py-name">code</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">            <tt class="py-name">ccode</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name" targets="Function web2py.gluon.restricted.compile2()=web2py.gluon.restricted-module.html#compile2"><a title="web2py.gluon.restricted.compile2" class="py-name" href="#" onclick="return doclink('link-60', 'compile2', 'link-60');">compile2</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">,</tt><tt class="py-name">layer</tt><tt class="py-op">)</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">        <tt class="py-keyword">exec</tt> <tt class="py-name">ccode</tt> <tt class="py-keyword">in</tt> <tt class="py-name">environment</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-61" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-61', 'HTTP', 'link-7');">HTTP</a></tt><tt class="py-op">:</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-62" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-62', 'Exception', 'link-62');">Exception</a></tt><tt class="py-op">,</tt> <tt id="link-63" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-63', 'error', 'link-16');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt class="py-comment"># XXX Show exception in Wing IDE if running in debugger</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'WINGDB_ACTIVE'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">            <tt class="py-name">etype</tt><tt class="py-op">,</tt> <tt class="py-name">evalue</tt><tt class="py-op">,</tt> <tt class="py-name">tb</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">excepthook</tt><tt class="py-op">(</tt><tt class="py-name">etype</tt><tt class="py-op">,</tt> <tt class="py-name">evalue</tt><tt class="py-op">,</tt> <tt class="py-name">tb</tt><tt class="py-op">)</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-64" class="py-name" targets="Class web2py.gluon.restricted.RestrictedError=web2py.gluon.restricted.RestrictedError-class.html"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-64', 'RestrictedError', 'link-64');">RestrictedError</a></tt><tt class="py-op">(</tt><tt class="py-name">layer</tt><tt class="py-op">,</tt> <tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
</div><a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"> </tt>
<a name="snapshot"></a><div id="snapshot-def"><a name="L202"></a><tt class="py-lineno">202</tt> <a class="py-toggle" href="#" id="snapshot-toggle" onclick="return toggle('snapshot');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.restricted-module.html#snapshot">snapshot</a><tt class="py-op">(</tt><tt class="py-param">info</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">=</tt><tt class="py-number">5</tt><tt class="py-op">,</tt> <tt class="py-param">code</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">environment</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="snapshot-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="snapshot-expanded"><a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">    <tt class="py-docstring">"""Return a dict describing a given traceback (based on cgitb.text)."""</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">os</tt><tt class="py-op">,</tt> <tt id="link-65" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-65', 'types', 'link-0');">types</a></tt><tt class="py-op">,</tt> <tt id="link-66" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-66', 'time', 'link-66');">time</a></tt><tt class="py-op">,</tt> <tt class="py-name">traceback</tt><tt class="py-op">,</tt> <tt class="py-name">linecache</tt><tt class="py-op">,</tt> <tt class="py-name">inspect</tt><tt class="py-op">,</tt> <tt class="py-name">pydoc</tt><tt class="py-op">,</tt> <tt class="py-name">cgitb</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">    <tt class="py-comment"># if no exception info given, get current:</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">etype</tt><tt class="py-op">,</tt> <tt class="py-name">evalue</tt><tt class="py-op">,</tt> <tt class="py-name">etb</tt> <tt class="py-op">=</tt> <tt class="py-name">info</tt> <tt class="py-keyword">or</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line"> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">etype</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt id="link-67" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-67', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">ClassType</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-name">etype</tt> <tt class="py-op">=</tt> <tt class="py-name">etype</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">    <tt class="py-comment"># create a snapshot dict with some basic information</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-68" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-68', 's', 'link-68');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">    <tt id="link-69" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-69', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'pyver'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'Python '</tt> <tt class="py-op">+</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-70', 'version', 'link-70');">version</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">': '</tt> <tt class="py-op">+</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">executable</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">    <tt id="link-71" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-71', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'date'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-72', 'time', 'link-66');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">ctime</tt><tt class="py-op">(</tt><tt id="link-73" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-73', 'time', 'link-66');">time</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-74', 'time', 'link-66');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">    <tt class="py-comment"># start to process frames</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">records</tt> <tt class="py-op">=</tt> <tt class="py-name">inspect</tt><tt class="py-op">.</tt><tt class="py-name">getinnerframes</tt><tt class="py-op">(</tt><tt class="py-name">etb</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">    <tt id="link-75" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-75', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'frames'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">frame</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">lnum</tt><tt class="py-op">,</tt> <tt class="py-name">func</tt><tt class="py-op">,</tt> <tt class="py-name">lines</tt><tt class="py-op">,</tt> <tt class="py-name">index</tt> <tt class="py-keyword">in</tt> <tt class="py-name">records</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-name">file</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-76', 'abspath', 'link-24');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'?'</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">varargs</tt><tt class="py-op">,</tt> <tt class="py-name">varkw</tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt> <tt class="py-op">=</tt> <tt class="py-name">inspect</tt><tt class="py-op">.</tt><tt class="py-name">getargvalues</tt><tt class="py-op">(</tt><tt class="py-name">frame</tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-name">call</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">func</tt> <tt class="py-op">!=</tt> <tt class="py-string">'?'</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">            <tt class="py-name">call</tt> <tt class="py-op">=</tt> <tt class="py-name">inspect</tt><tt class="py-op">.</tt><tt class="py-name">formatargvalues</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">varargs</tt><tt class="py-op">,</tt> <tt class="py-name">varkw</tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">,</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">                    <tt class="py-name">formatvalue</tt><tt class="py-op">=</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> <tt class="py-string">'='</tt> <tt class="py-op">+</tt> <tt class="py-name">pydoc</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line"> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">        <tt class="py-comment"># basic frame information</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'file'</tt><tt class="py-op">:</tt> <tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'func'</tt><tt class="py-op">:</tt> <tt class="py-name">func</tt><tt class="py-op">,</tt> <tt class="py-string">'call'</tt><tt class="py-op">:</tt> <tt class="py-name">call</tt><tt class="py-op">,</tt> <tt class="py-string">'lines'</tt><tt class="py-op">:</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-string">'lnum'</tt><tt class="py-op">:</tt> <tt class="py-name">lnum</tt><tt class="py-op">}</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">        <tt id="link-77" class="py-name" targets="Module web2py.gluon.highlight=web2py.gluon.highlight-module.html,Method web2py.gluon.highlight.Highlighter.highlight()=web2py.gluon.highlight.Highlighter-class.html#highlight,Function web2py.gluon.highlight.highlight()=web2py.gluon.highlight-module.html#highlight"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-77', 'highlight', 'link-77');">highlight</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">reader</tt><tt class="py-op">(</tt><tt class="py-param">lnum</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-name">lnum</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">            <tt id="link-78" class="py-name"><a title="web2py.gluon.highlight
web2py.gluon.highlight.Highlighter.highlight
web2py.gluon.highlight.highlight" class="py-name" href="#" onclick="return doclink('link-78', 'highlight', 'link-77');">highlight</a></tt><tt class="py-op">[</tt><tt class="py-name">lnum</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">linecache</tt><tt class="py-op">.</tt><tt class="py-name">getline</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">lnum</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> <tt class="py-name">lnum</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
</div><a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-name">vars</tt> <tt class="py-op">=</tt> <tt class="py-name">cgitb</tt><tt class="py-op">.</tt><tt class="py-name">scanvars</tt><tt class="py-op">(</tt><tt class="py-name">reader</tt><tt class="py-op">,</tt> <tt class="py-name">frame</tt><tt class="py-op">,</tt> <tt class="py-name">locals</tt><tt class="py-op">)</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-comment"># if it is a view, replace with generated code</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">file</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-79', 'endswith', 'link-79');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'html'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">            <tt class="py-name">lmin</tt> <tt class="py-op">=</tt> <tt class="py-name">lnum</tt><tt class="py-op">&gt;</tt><tt class="py-name">context</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">lnum</tt><tt class="py-op">-</tt><tt class="py-name">context</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-number">0</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">            <tt class="py-name">lmax</tt> <tt class="py-op">=</tt> <tt class="py-name">lnum</tt><tt class="py-op">+</tt><tt class="py-name">context</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">            <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">code</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"\n"</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-name">lmin</tt><tt class="py-op">:</tt><tt class="py-name">lmax</tt><tt class="py-op">]</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">            <tt class="py-name">index</tt> <tt class="py-op">=</tt> <tt id="link-80" class="py-name" targets="Variable datetime.date.min=datetime.date-class.html#min,Variable datetime.datetime.min=datetime.datetime-class.html#min,Variable datetime.time.min=datetime.time-class.html#min,Method web2py.gluon.dal.Expression.min()=web2py.gluon.dal.Expression-class.html#min"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-80', 'min', 'link-80');">min</a></tt><tt class="py-op">(</tt><tt class="py-name">context</tt><tt class="py-op">,</tt> <tt class="py-name">lnum</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">index</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">            <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">lnum</tt> <tt class="py-op">-</tt> <tt class="py-name">index</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">lines</tt><tt class="py-op">:</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">                <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-string">'lines'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">                <tt class="py-name">i</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line"> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-comment"># dump local variables (referenced in current line only)</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-string">'dump'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-81" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-81', 'name', 'link-81');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">where</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-82" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-82', 'name', 'link-81');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-string">'dump'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-keyword">continue</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">cgitb</tt><tt class="py-op">.</tt><tt class="py-name">__UNDEF__</tt><tt class="py-op">:</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">where</tt> <tt class="py-op">==</tt> <tt class="py-string">'global'</tt><tt class="py-op">:</tt> <tt id="link-83" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-83', 'name', 'link-81');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'global '</tt> <tt class="py-op">+</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-84', 'name', 'link-81');">name</a></tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">where</tt> <tt class="py-op">!=</tt> <tt class="py-string">'local'</tt><tt class="py-op">:</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-85', 'name', 'link-81');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">where</tt> <tt class="py-op">+</tt> <tt id="link-86" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-86', 'name', 'link-81');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">                <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-string">'dump'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-87', 'name', 'link-81');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">pydoc</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">                <tt class="py-name">f</tt><tt class="py-op">[</tt><tt class="py-string">'dump'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-88" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-88', 'name', 'link-81');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'undefined'</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">        <tt id="link-89" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-89', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'frames'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-90', 'append', 'link-90');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line"> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line">    <tt class="py-comment"># add exception type, value and attributes</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-91" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-91', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'etype'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">etype</tt><tt class="py-op">)</tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">    <tt id="link-92" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-92', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'evalue'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">evalue</tt><tt class="py-op">)</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">    <tt id="link-93" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-93', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'exception'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">evalue</tt><tt class="py-op">,</tt> <tt class="py-name">BaseException</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-94', 'name', 'link-81');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">dir</tt><tt class="py-op">(</tt><tt class="py-name">evalue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">            <tt class="py-comment"># prevent py26 DeprecatedWarning:</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-95', 'name', 'link-81');">name</a></tt><tt class="py-op">!=</tt><tt class="py-string">'message'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name" targets="Variable sqlite3.dbapi2.version_info=sqlite3.dbapi2-module.html#version_info,Variable web2py.gluon.contrib.pymysql.version_info=web2py.gluon.contrib.pymysql-module.html#version_info,Variable web2py.gluon.main.version_info=web2py.gluon.main-module.html#version_info"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-96', 'version_info', 'link-96');">version_info</a></tt><tt class="py-op">&lt;</tt><tt class="py-op">(</tt><tt class="py-number">2.6</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">pydoc</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">evalue</tt><tt class="py-op">,</tt> <tt id="link-97" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-97', 'name', 'link-81');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">                <tt id="link-98" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-98', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'exception'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-99', 'name', 'link-81');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-comment"># add all local values (of last frame) to the snapshot</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-100" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-100', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'locals'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt id="link-101" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-101', 'name', 'link-81');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">locals</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-102', 'items', 'link-102');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt id="link-103" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-103', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt class="py-string">'locals'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-104', 'name', 'link-81');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">pydoc</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line"> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">    <tt class="py-comment"># add web2py environment variables</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">for</tt> <tt id="link-105" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-105', 'k', 'link-105');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">environment</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-106', 'items', 'link-102');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-107" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-107', 'k', 'link-105');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'request'</tt><tt class="py-op">,</tt> <tt class="py-string">'response'</tt><tt class="py-op">,</tt> <tt class="py-string">'session'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">            <tt id="link-108" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-108', 's', 'link-68');">s</a></tt><tt class="py-op">[</tt><tt id="link-109" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-109', 'k', 'link-105');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.html.BEAUTIFY" class="py-name" href="#" onclick="return doclink('link-110', 'BEAUTIFY', 'link-9');">BEAUTIFY</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-111" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-111', 's', 'link-68');">s</a></tt> </tt>
</div><a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.restricted.RestrictedError-class.html version [8cbd3440b3].




















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.restricted.RestrictedError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.restricted-module.html">Module&nbsp;restricted</a> ::
        Class&nbsp;RestrictedError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.restricted.RestrictedError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class RestrictedError</h1><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#RestrictedError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+
                               |
                              <strong class="uidshort">RestrictedError</strong>
</pre>

<hr />
class used to wrap an exception that occurs in the restricted 
  environment below. the traceback is used to log the exception and 
  generate a ticket.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.restricted.RestrictedError-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">layer</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">code</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">output</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">environment</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      layer here is some description of where in the system the 
      exception occurred.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#RestrictedError.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="log"></a><span class="summary-sig-name">log</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>)</span><br />
      logs the exception.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#RestrictedError.log">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="load"></a><span class="summary-sig-name">load</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">ticket_id</span>)</span><br />
      loads a logged exception.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#RestrictedError.load">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">layer</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">code</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">output</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">environment</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#RestrictedError.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  layer here is some description of where in the system the exception 
  occurred.
  <dl class="fields">
    <dt>Overrides:
      exceptions.Exception.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.restricted.TicketStorage-class.html version [d802399b10].





















































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.restricted.TicketStorage</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.restricted-module.html">Module&nbsp;restricted</a> ::
        Class&nbsp;TicketStorage
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.restricted.TicketStorage-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TicketStorage</h1><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
 object --+        
          |        
       dict --+    
              |    
<a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a> --+
                  |
                 <strong class="uidshort">TicketStorage</strong>
</pre>

<hr />
defines the ticket object and the default values of its members 
  (None)<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.restricted.TicketStorage-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">tablename</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">web2py_ticket</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.restricted.TicketStorage-class.html#store" class="summary-sig-name">store</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">ticket_id</span>,
        <span class="summary-sig-arg">ticket_data</span>)</span><br />
      stores the ticket.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage.store">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_store_in_db"></a><span class="summary-sig-name">_store_in_db</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">ticket_id</span>,
        <span class="summary-sig-arg">ticket_data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage._store_in_db">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_store_on_disk"></a><span class="summary-sig-name">_store_on_disk</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">ticket_id</span>,
        <span class="summary-sig-arg">ticket_data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage._store_on_disk">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_error_file"></a><span class="summary-sig-name">_error_file</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">ticket_id</span>,
        <span class="summary-sig-arg">mode</span>,
        <span class="summary-sig-arg">app</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage._error_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_table"></a><span class="summary-sig-name">_get_table</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">db</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">app</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage._get_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="load"></a><span class="summary-sig-name">load</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">ticket_id</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage.load">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">storage.Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">db</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">tablename</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">web2py_ticket</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new empty dictionary

</pre></dd>
    <dt>Overrides:
      dict.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="store"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">store</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">ticket_id</span>,
        <span class="sig-arg">ticket_data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.restricted-pysrc.html#TicketStorage.store">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  stores the ticket. It will figure out if this must be on disk or in 
  db
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rewrite-module.html version [4fd757034e].




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rewrite</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;rewrite
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rewrite-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module rewrite</h1><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  <p>gluon.rewrite parses incoming URLs and formats outgoing URLs for 
  gluon.html.URL.</p>
  <p>In addition, it rewrites both incoming and outgoing URLs based on the 
  (optional) user-supplied routes.py, which also allows for rewriting of 
  certain error messages.</p>
  routes.py supports two styles of URL rewriting, depending on whether 
  'routers' is defined. Refer to router.example.py and routes.example.py 
  for additional documentation.<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite.MapUrlIn-class.html" class="summary-name">MapUrlIn</a><br />
      logic for mapping incoming URLs
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite.MapUrlOut-class.html" class="summary-name">MapUrlOut</a><br />
      logic for mapping outgoing URLs
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_router_default"></a><span class="summary-sig-name">_router_default</span>()</span><br />
      return new copy of default base router</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#_router_default">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_params_default"></a><span class="summary-sig-name">_params_default</span>(<span class="summary-sig-arg">app</span>=<span class="summary-sig-default">1</span>)</span><br />
      return new copy of default parameters</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#_params_default">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="url_in"></a><span class="summary-sig-name">url_in</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">environ</span>)</span><br />
      parse and rewrite incoming URL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#url_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="url_out"></a><span class="summary-sig-name">url_out</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">env</span>,
        <span class="summary-sig-arg">application</span>,
        <span class="summary-sig-arg">controller</span>,
        <span class="summary-sig-arg">function</span>,
        <span class="summary-sig-arg">args</span>,
        <span class="summary-sig-arg">other</span>,
        <span class="summary-sig-arg">scheme</span>,
        <span class="summary-sig-arg">host</span>,
        <span class="summary-sig-arg">port</span>)</span><br />
      assemble and rewrite outgoing URL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#url_out">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="try_rewrite_on_error"></a><span class="summary-sig-name">try_rewrite_on_error</span>(<span class="summary-sig-arg">http_response</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">environ</span>,
        <span class="summary-sig-arg">ticket</span>=<span class="summary-sig-default">1</span>)</span><br />
      called from main.wsgibase to rewrite the http response.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#try_rewrite_on_error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="try_redirect_on_error"></a><span class="summary-sig-name">try_redirect_on_error</span>(<span class="summary-sig-arg">http_object</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">ticket</span>=<span class="summary-sig-default">1</span>)</span><br />
      called from main.wsgibase to rewrite the http response</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#try_redirect_on_error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rewrite-module.html#load" class="summary-sig-name">load</a>(<span class="summary-sig-arg">routes</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">routes.py</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">app</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">rdict</span>=<span class="summary-sig-default">1</span>)</span><br />
      load: read (if file) and parse routes store results in params 
      (called from main.py at web2py initialization time) If data is 
      present, it's used instead of the routes.py contents.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#load">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="compile_regex"></a><span class="summary-sig-name">compile_regex</span>(<span class="summary-sig-arg">k</span>,
        <span class="summary-sig-arg">v</span>)</span><br />
      Preprocess and compile the regular expressions in routes_app/in/out

The resulting regex will match a pattern of the form:

    [remote address]:[protocol]://[host]:[method] [path]

We allow abbreviated regexes on input; here we try to complete them.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#compile_regex">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="load_routers"></a><span class="summary-sig-name">load_routers</span>(<span class="summary-sig-arg">all_apps</span>)</span><br />
      load-time post-processing of routers</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#load_routers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="regex_uri"></a><span class="summary-sig-name">regex_uri</span>(<span class="summary-sig-arg">e</span>,
        <span class="summary-sig-arg">regexes</span>,
        <span class="summary-sig-arg">tag</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">1</span>)</span><br />
      filter incoming URI against a list of regexes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#regex_uri">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="regex_select"></a><span class="summary-sig-name">regex_select</span>(<span class="summary-sig-arg">env</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">app</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">request</span>=<span class="summary-sig-default">1</span>)</span><br />
      select a set of regex rewrite params for the current request</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#regex_select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="regex_filter_in"></a><span class="summary-sig-name">regex_filter_in</span>(<span class="summary-sig-arg">e</span>)</span><br />
      regex rewrite incoming URL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#regex_filter_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="regex_url_in"></a><span class="summary-sig-name">regex_url_in</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">environ</span>)</span><br />
      rewrite and parse incoming URL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#regex_url_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="regex_filter_out"></a><span class="summary-sig-name">regex_filter_out</span>(<span class="summary-sig-arg">url</span>,
        <span class="summary-sig-arg">e</span>=<span class="summary-sig-default">1</span>)</span><br />
      regex rewrite outgoing URL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#regex_filter_out">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="filter_url"></a><span class="summary-sig-name">filter_url</span>(<span class="summary-sig-arg">url</span>,
        <span class="summary-sig-arg">method</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">get</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">remote</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">0.0.0.0</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">out</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">app</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">lang</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">domain</span>=<span class="summary-sig-default"><code class="variable-group">(</code>None<code class="variable-op">, </code>None<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">env</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">scheme</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">host</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">1</span>)</span><br />
      doctest/unittest interface to regex_filter_in() and 
      regex_filter_out()</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#filter_url">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="filter_err"></a><span class="summary-sig-name">filter_err</span>(<span class="summary-sig-arg">status</span>,
        <span class="summary-sig-arg">application</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">app</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">ticket</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">tkt</code><code class="variable-quote">'</code></span>)</span><br />
      doctest/unittest interface to routes_onerror</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#filter_err">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_url_in"></a><span class="summary-sig-name">map_url_in</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">env</span>,
        <span class="summary-sig-arg">app</span>=<span class="summary-sig-default">True</span>)</span><br />
      route incoming URL</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#map_url_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rewrite-module.html#map_url_out" class="summary-sig-name">map_url_out</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">env</span>,
        <span class="summary-sig-arg">application</span>,
        <span class="summary-sig-arg">controller</span>,
        <span class="summary-sig-arg">function</span>,
        <span class="summary-sig-arg">args</span>,
        <span class="summary-sig-arg">other</span>,
        <span class="summary-sig-arg">scheme</span>,
        <span class="summary-sig-arg">host</span>,
        <span class="summary-sig-arg">port</span>)</span><br />
      supply /a/c/f (or /a/lang/c/f) portion of outgoing url

The basic rule is that we can only make transformations
that map_url_in can reverse.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#map_url_out">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_effective_router"></a><span class="summary-sig-name">get_effective_router</span>(<span class="summary-sig-arg">appname</span>)</span><br />
      return a private copy of the effective router for the specified 
      application</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#get_effective_router">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger('web2py.rewrite')">logging.getLogger('web2py.rewrite')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="thread"></a><span class="summary-name">thread</span> = <code title="threading.local()">threading.local()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="params_apps"></a><span class="summary-name">params_apps</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite-module.html#params" class="summary-name">params</a> = <code title="&lt;Storage {'routes_out': [], 'name': 'BASE', 'routes_apps_raw': [], 'er\
ror_message': '&lt;html&gt;&lt;body&gt;&lt;h1&gt;%s&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;', 'default_functi\
on': 'index', 'default_controller': 'default', 'routes_app': [], 'rout\
es_in': [], 'default_application': 'init', 'error_message_ticket': '&lt;h\
tml&gt;&lt;body&gt;&lt;h1&gt;Internal error&lt;/h1&gt;Ticket issued: &lt;a href=&quot;/admin/defaul\
t/ticket/%(ticket)s&quot; target=&quot;_blank&quot;&gt;%(ticket)s&lt;/a&gt;&lt;/body&gt;&lt;!-- this is\
 junk text else IE does not display the page: xxxxxxxxxxxxxxxxxxxxxxxx\
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\
...">&lt;Storage {'routes_out': [], 'name': 'BASE', 'routes_a<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="routers"></a><span class="summary-name">routers</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite-module.html#ROUTER_KEYS" class="summary-name">ROUTER_KEYS</a> = <code title="set(['acfe_match',
     'applications',
     'args_match',
     'controllers',
     'default_application',
     'default_controller',
     'default_function',
     'default_language',
..."><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">acfe_match</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">applications</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">args_match</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite-module.html#ROUTER_BASE_KEYS" class="summary-name">ROUTER_BASE_KEYS</a> = <code title="set(['applications', 'default_application', 'domains', 'path_prefix'])"><code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">applications</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">default_application</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_at"></a><span class="summary-name">regex_at</span> = <code title="re.compile(r'(?&lt;!\\)\$[a-zA-Z]\w*')">re.compile(r'<code class="re-group">(?&lt;!</code>\\<code class="re-group">)</code>\$<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code>\w<code class="re-op">*</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_anything"></a><span class="summary-name">regex_anything</span> = <code title="re.compile(r'(?&lt;!\\)\$anything')">re.compile(r'<code class="re-group">(?&lt;!</code>\\<code class="re-group">)</code>\$anything')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_space"></a><span class="summary-name">regex_space</span> = <code title="re.compile(r'(\+|\s|%20)+')">re.compile(r'<code class="re-group">(</code>\+<code class="re-op">|</code>\s<code class="re-op">|</code>%20<code class="re-group">)</code><code class="re-op">+</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite-module.html#regex_static" class="summary-name">regex_static</a> = <code title="re.compile(r'(?x)(^/(?P&lt;b&gt;\w+)/static/(?P&lt;x&gt;(\w[-=\./]?)*)$)')">re.compile(r'<code class="re-flags">(?x)</code><code class="re-group">(</code>^/<code class="re-group">(?P&lt;</code><code class="re-ref">b</code><code class="re-group">&gt;</code>\w<code class="re-op">+</code><code class="re-group">)</code>/static/<code class="re-group">(?P&lt;</code><code class="re-ref">x</code><code class="re-group">&gt;</code><code class="re-group">(</code>\w<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite-module.html#regex_url" class="summary-name">regex_url</a> = <code title="re.compile(r'(?x)(^(/(?P&lt;a&gt;[\w\s\+]+)(/(?P&lt;c&gt;[\w\s\+]+)(/(?P&lt;f&gt;[\w\s\+\
]+)(\.(?P&lt;e&gt;[\w\s\+]+))?(/(?P&lt;r&gt;.*))?)?)?)?/?$)')">re.compile(r'<code class="re-flags">(?x)</code><code class="re-group">(</code>^<code class="re-group">(</code>/<code class="re-group">(?P&lt;</code><code class="re-ref">a</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w\s\+<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>/<code class="re-group">(?P&lt;</code><code class="re-ref">c</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w\s<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_args"></a><span class="summary-name">regex_args</span> = <code title="re.compile(r'(?x)(^(?P&lt;s&gt;([\w@/-][=\.]?)*)?/?$)')">re.compile(r'<code class="re-flags">(?x)</code><code class="re-group">(</code>^<code class="re-group">(?P&lt;</code><code class="re-ref">s</code><code class="re-group">&gt;</code><code class="re-group">(</code><code class="re-group">[</code>\w@/-<code class="re-group">]</code><code class="re-group">[</code>=\.<code class="re-group">]</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>/<code class="re-op">?</code>$<code class="re-group">)</code>')</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="load"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">load</span>(<span class="sig-arg">routes</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">routes.py</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">app</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">data</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">rdict</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#load">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  load: read (if file) and parse routes store results in params (called 
  from main.py at web2py initialization time) If data is present, it's used
  instead of the routes.py contents. If rdict is present, it must be a dict
  to be used for routers (unit test)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="map_url_out"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">map_url_out</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">env</span>,
        <span class="sig-arg">application</span>,
        <span class="sig-arg">controller</span>,
        <span class="sig-arg">function</span>,
        <span class="sig-arg">args</span>,
        <span class="sig-arg">other</span>,
        <span class="sig-arg">scheme</span>,
        <span class="sig-arg">host</span>,
        <span class="sig-arg">port</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#map_url_out">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

supply /a/c/f (or /a/lang/c/f) portion of outgoing url

The basic rule is that we can only make transformations
that map_url_in can reverse.

Suppose that the incoming arguments are a,c,f,args,lang
and that the router defaults are da, dc, df, dl.

We can perform these transformations trivially if args=[] and lang=None or dl:

/da/dc/df =&gt; /
/a/dc/df =&gt; /a
/a/c/df =&gt; /a/c

We would also like to be able to strip the default application or application/controller
from URLs with function/args present, thus:

    /da/c/f/args  =&gt; /c/f/args
    /da/dc/f/args =&gt; /f/args

We use [applications] and [controllers] and [functions] to suppress ambiguous omissions.

We assume that language names do not collide with a/c/f names.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="params"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">params</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
&lt;Storage {'routes_out': [], 'name': 'BASE', 'routes_apps_raw': [], 'er<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ror_message': '&lt;html&gt;&lt;body&gt;&lt;h1&gt;%s&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;', 'default_functi<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
on': 'index', 'default_controller': 'default', 'routes_app': [], 'rout<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
es_in': [], 'default_application': 'init', 'error_message_ticket': '&lt;h<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
tml&gt;&lt;body&gt;&lt;h1&gt;Internal error&lt;/h1&gt;Ticket issued: &lt;a href=&quot;/admin/defaul<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
t/ticket/%(ticket)s&quot; target=&quot;_blank&quot;&gt;%(ticket)s&lt;/a&gt;&lt;/body&gt;&lt;!-- this is<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 junk text else IE does not display the page: xxxxxxxxxxxxxxxxxxxxxxxx<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ROUTER_KEYS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ROUTER_KEYS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">acfe_match</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">applications</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">args_match</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">controllers</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">default_application</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">default_controller</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">default_function</code><code class="variable-quote">'</code><code class="variable-op">,</code>
     <code class="variable-quote">'</code><code class="variable-string">default_language</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ROUTER_BASE_KEYS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ROUTER_BASE_KEYS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">set([</code><code class="variable-quote">'</code><code class="variable-string">applications</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">default_application</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">domains</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">path_prefix</code><code class="variable-quote">'</code><code class="variable-group">])</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_static"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_static</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?x)</code><code class="re-group">(</code>^/<code class="re-group">(?P&lt;</code><code class="re-ref">b</code><code class="re-group">&gt;</code>\w<code class="re-op">+</code><code class="re-group">)</code>/static/<code class="re-group">(?P&lt;</code><code class="re-ref">x</code><code class="re-group">&gt;</code><code class="re-group">(</code>\w<code class="re-group">[</code>-=\./<code class="re-group">]</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">*</code><code class="re-group">)</code>$<code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_url"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_url</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?x)</code><code class="re-group">(</code>^<code class="re-group">(</code>/<code class="re-group">(?P&lt;</code><code class="re-ref">a</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w\s\+<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>/<code class="re-group">(?P&lt;</code><code class="re-ref">c</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w\s\+<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>/<code class="re-group">(?P&lt;</code><code class="re-ref">f</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w\s\+<code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>\.<code class="re-group">(?P&lt;</code><code class="re-ref">e</code><code class="re-group">&gt;</code><code class="re-group">[</code>\w\s\+<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>/<code class="re-group">(?P&lt;</code><code class="re-ref">r</code><code class="re-group">&gt;</code>.<code class="re-op">*</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">?</code>/<code class="re-op">?</code>$<code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rewrite-pysrc.html version [11da0e715c].



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rewrite</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;rewrite
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rewrite-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.rewrite-module.html">Module web2py.gluon.rewrite</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">#!/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-docstring">gluon.rewrite parses incoming URLs and formats outgoing URLs for gluon.html.URL.</tt> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-docstring">In addition, it rewrites both incoming and outgoing URLs based on the (optional) user-supplied routes.py,</tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-docstring">which also allows for rewriting of certain error messages.</tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-docstring">routes.py supports two styles of URL rewriting, depending on whether 'routers' is defined.</tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-docstring">Refer to router.example.py and routes.example.py for additional documentation.</tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">threading</tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-0', 'storage', 'link-0');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-1', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name" targets="Class web2py.gluon.storage.List=web2py.gluon.storage.List-class.html"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-2', 'List', 'link-2');">List</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-3', 'http', 'link-3');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-4', 'HTTP', 'link-4');">HTTP</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-5', 'fileutils', 'link-5');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-6', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-7', 'read_file', 'link-7');">read_file</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-8" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-8', 'settings', 'link-8');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-9" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-9', 'global_settings', 'link-9');">global_settings</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-10', 'logger', 'link-10');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'web2py.rewrite'</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"><tt id="link-11" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-11', 'thread', 'link-11');">thread</a></tt> <tt class="py-op">=</tt> <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">local</tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># thread-local storage for routing parameters</tt> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"> </tt>
<a name="_router_default"></a><div id="_router_default-def"><a name="L34"></a><tt class="py-lineno">  34</tt> <a class="py-toggle" href="#" id="_router_default-toggle" onclick="return toggle('_router_default');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#_router_default">_router_default</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_router_default-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_router_default-expanded"><a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line">    <tt class="py-docstring">"return new copy of default base router"</tt> </tt>
<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line">    <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-12', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">        <tt class="py-name">default_application</tt> <tt class="py-op">=</tt> <tt class="py-string">'init'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line">            <tt class="py-name">applications</tt> <tt class="py-op">=</tt> <tt class="py-string">'ALL'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">        <tt class="py-name">default_controller</tt> <tt class="py-op">=</tt> <tt class="py-string">'default'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">            <tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-string">'DEFAULT'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">        <tt class="py-name">default_function</tt> <tt class="py-op">=</tt> <tt class="py-string">'index'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">            <tt class="py-name">functions</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">        <tt class="py-name">default_language</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">            <tt id="link-13" class="py-name" targets="Module web2py.gluon.languages=web2py.gluon.languages-module.html"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-13', 'languages', 'link-13');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">        <tt class="py-name">root_static</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'favicon.ico'</tt><tt class="py-op">,</tt> <tt class="py-string">'robots.txt'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">        <tt class="py-name">domains</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">        <tt class="py-name">exclusive_domain</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">        <tt class="py-name">map_hyphen</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-name">acfe_match</tt> <tt class="py-op">=</tt> <tt class="py-string">r'\w+$'</tt><tt class="py-op">,</tt>              <tt class="py-comment"># legal app/ctlr/fcn/ext</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">        <tt class="py-name">file_match</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(\w+[-=./]?)+$'</tt><tt class="py-op">,</tt>    <tt class="py-comment"># legal file (path) name</tt> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">        <tt class="py-name">args_match</tt> <tt class="py-op">=</tt> <tt class="py-string">r'([\w@ -]+[=.]?)*$'</tt><tt class="py-op">,</tt> <tt class="py-comment"># legal arg in args</tt> </tt>
<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">    <tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">router</tt> </tt>
</div><a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line"> </tt>
<a name="_params_default"></a><div id="_params_default-def"><a name="L55"></a><tt class="py-lineno">  55</tt> <a class="py-toggle" href="#" id="_params_default-toggle" onclick="return toggle('_params_default');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#_params_default">_params_default</a><tt class="py-op">(</tt><tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_params_default-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_params_default-expanded"><a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">    <tt class="py-docstring">"return new copy of default parameters"</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line">    <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-14', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-15', 'name', 'link-15');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">app</tt> <tt class="py-keyword">or</tt> <tt class="py-string">"BASE"</tt> </tt>
<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> <tt class="py-op">=</tt> <tt class="py-name">app</tt> <tt class="py-keyword">or</tt> <tt class="py-string">"init"</tt> </tt>
<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt> <tt class="py-op">=</tt> <tt class="py-string">"default"</tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt> <tt class="py-op">=</tt> <tt class="py-string">"index"</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">routes_app</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">routes_in</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">routes_out</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">routes_apps_raw</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">error_handler</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;html&gt;&lt;body&gt;&lt;h1&gt;%s&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;'</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">error_message_ticket</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line">        <tt class="py-string">'&lt;html&gt;&lt;body&gt;&lt;h1&gt;Internal error&lt;/h1&gt;Ticket issued: &lt;a href="/admin/default/ticket/%(ticket)s" target="_blank"&gt;%(ticket)s&lt;/a&gt;&lt;/body&gt;&lt;!-- this is junk text else IE does not display the page: '</tt><tt class="py-op">+</tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">*</tt><tt class="py-number">512</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">' //--&gt;&lt;/html&gt;'</tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line">    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Variable web2py.gluon.rewrite.routers=web2py.gluon.rewrite-module.html#routers"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-16', 'routers', 'link-16');">routers</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">p</tt> </tt>
</div><a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line"><tt id="link-17" class="py-name" targets="Variable web2py.gluon.rewrite.params_apps=web2py.gluon.rewrite-module.html#params_apps"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-17', 'params_apps', 'link-17');">params_apps</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable web2py.gluon.rewrite.params=web2py.gluon.rewrite-module.html#params"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-18', 'params', 'link-18');">params</a></tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name" targets="Function web2py.gluon.rewrite._params_default()=web2py.gluon.rewrite-module.html#_params_default"><a title="web2py.gluon.rewrite._params_default" class="py-name" href="#" onclick="return doclink('link-19', '_params_default', 'link-19');">_params_default</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt>  <tt class="py-comment"># regex rewrite parameters</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line"><tt id="link-20" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-20', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-21', 'params', 'link-18');">params</a></tt>              <tt class="py-comment"># default to base regex rewrite parameters</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"><tt id="link-22" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-22', 'routers', 'link-16');">routers</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt id="link-23" class="py-name" targets="Variable web2py.gluon.rewrite.ROUTER_KEYS=web2py.gluon.rewrite-module.html#ROUTER_KEYS"><a title="web2py.gluon.rewrite.ROUTER_KEYS" class="py-name" href="#" onclick="return doclink('link-23', 'ROUTER_KEYS', 'link-23');">ROUTER_KEYS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'default_application'</tt><tt class="py-op">,</tt> <tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-string">'default_controller'</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line">    <tt class="py-string">'default_function'</tt><tt class="py-op">,</tt> <tt class="py-string">'functions'</tt><tt class="py-op">,</tt> <tt class="py-string">'default_language'</tt><tt class="py-op">,</tt> <tt class="py-string">'languages'</tt><tt class="py-op">,</tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line">    <tt class="py-string">'domain'</tt><tt class="py-op">,</tt> <tt class="py-string">'domains'</tt><tt class="py-op">,</tt> <tt class="py-string">'root_static'</tt><tt class="py-op">,</tt> <tt class="py-string">'path_prefix'</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line">    <tt class="py-string">'exclusive_domain'</tt><tt class="py-op">,</tt> <tt class="py-string">'map_hyphen'</tt><tt class="py-op">,</tt> <tt class="py-string">'map_static'</tt><tt class="py-op">,</tt> </tt>
<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line">    <tt class="py-string">'acfe_match'</tt><tt class="py-op">,</tt> <tt class="py-string">'file_match'</tt><tt class="py-op">,</tt> <tt class="py-string">'args_match'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt id="link-24" class="py-name" targets="Variable web2py.gluon.rewrite.ROUTER_BASE_KEYS=web2py.gluon.rewrite-module.html#ROUTER_BASE_KEYS"><a title="web2py.gluon.rewrite.ROUTER_BASE_KEYS" class="py-name" href="#" onclick="return doclink('link-24', 'ROUTER_BASE_KEYS', 'link-24');">ROUTER_BASE_KEYS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-string">'default_application'</tt><tt class="py-op">,</tt> <tt class="py-string">'domains'</tt><tt class="py-op">,</tt> <tt class="py-string">'path_prefix'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line"> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-comment">#  The external interface to rewrite consists of:</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  load: load routing configuration file(s)</tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  url_in: parse and rewrite incoming URL</tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  url_out: assemble and rewrite outgoing URL</tt> </tt>
<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  thread.routes.default_application</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  thread.routes.error_message</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  thread.routes.error_message_ticket</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  thread.routes.try_redirect_on_error</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  thread.routes.error_handler</tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  filter_url: helper for doctest &amp; unittest</tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  filter_err: helper for doctest &amp; unittest</tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#  regex_filter_out: doctest</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="url_in"></a><div id="url_in-def"><a name="L103"></a><tt class="py-lineno"> 103</tt> <a class="py-toggle" href="#" id="url_in-toggle" onclick="return toggle('url_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#url_in">url_in</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">environ</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="url_in-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="url_in-expanded"><a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line">    <tt class="py-docstring">"parse and rewrite incoming URL"</tt> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-25', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-26" class="py-name" targets="Function web2py.gluon.rewrite.map_url_in()=web2py.gluon.rewrite-module.html#map_url_in"><a title="web2py.gluon.rewrite.map_url_in" class="py-name" href="#" onclick="return doclink('link-26', 'map_url_in', 'link-26');">map_url_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-27" class="py-name" targets="Function web2py.gluon.rewrite.regex_url_in()=web2py.gluon.rewrite-module.html#regex_url_in"><a title="web2py.gluon.rewrite.regex_url_in" class="py-name" href="#" onclick="return doclink('link-27', 'regex_url_in', 'link-27');">regex_url_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
</div><a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"> </tt>
<a name="url_out"></a><div id="url_out-def"><a name="L109"></a><tt class="py-lineno"> 109</tt> <a class="py-toggle" href="#" id="url_out-toggle" onclick="return toggle('url_out');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#url_out">url_out</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">env</tt><tt class="py-op">,</tt> <tt class="py-param">application</tt><tt class="py-op">,</tt> <tt class="py-param">controller</tt><tt class="py-op">,</tt> <tt class="py-param">function</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">,</tt> <tt class="py-param">scheme</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="url_out-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="url_out-expanded"><a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line">    <tt class="py-docstring">"assemble and rewrite outgoing URL"</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-28', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line">        <tt id="link-29" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlOut.acf()=web2py.gluon.rewrite.MapUrlOut-class.html#acf"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-29', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name" targets="Function web2py.gluon.rewrite.map_url_out()=web2py.gluon.rewrite-module.html#map_url_out"><a title="web2py.gluon.rewrite.map_url_out" class="py-name" href="#" onclick="return doclink('link-30', 'map_url_out', 'link-30');">map_url_out</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt id="link-31" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-31', 'env', 'link-31');">env</a></tt><tt class="py-op">,</tt> <tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">        <tt id="link-32" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-32', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-33', 'acf', 'link-29');">acf</a></tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">        <tt id="link-34" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-34', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s/%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line">        <tt id="link-35" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-35', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt id="link-36" class="py-name" targets="Function web2py.gluon.rewrite.regex_filter_out()=web2py.gluon.rewrite-module.html#regex_filter_out"><a title="web2py.gluon.rewrite.regex_filter_out" class="py-name" href="#" onclick="return doclink('link-36', 'regex_filter_out', 'link-36');">regex_filter_out</a></tt><tt class="py-op">(</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-37', 'url', 'link-32');">url</a></tt><tt class="py-op">,</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-38', 'env', 'link-31');">env</a></tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line">    <tt class="py-comment">#</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#  fill in scheme and host if absolute URL is requested</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#  scheme can be a string, eg 'http', 'https', 'ws', 'wss'</tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">scheme</tt> <tt class="py-keyword">or</tt> <tt class="py-name">port</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">host</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt>    <tt class="py-comment"># scheme or port implies host</tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line">            <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">scheme</tt> <tt class="py-keyword">or</tt> <tt class="py-name">scheme</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-39', 'env', 'link-31');">env</a></tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line">            <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-40', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-41', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'WSGI_URL_SCHEME'</tt><tt class="py-op">,</tt> <tt class="py-string">'http'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-42', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line">            <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-string">'http'</tt> <tt class="py-comment"># some reasonable default in case we need it</tt> </tt>
<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">host</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">host</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">            <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-43', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_host</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">host</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">port</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">            <tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">            <tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-string">':%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">port</tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">        <tt id="link-44" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-44', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s://%s%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt id="link-45" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-45', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-46" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-46', 'url', 'link-32');">url</a></tt> </tt>
</div><a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line"> </tt>
<a name="try_rewrite_on_error"></a><div id="try_rewrite_on_error-def"><a name="L140"></a><tt class="py-lineno"> 140</tt> <a class="py-toggle" href="#" id="try_rewrite_on_error-toggle" onclick="return toggle('try_rewrite_on_error');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#try_rewrite_on_error">try_rewrite_on_error</a><tt class="py-op">(</tt><tt class="py-param">http_response</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">environ</tt><tt class="py-op">,</tt> <tt class="py-param">ticket</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="try_rewrite_on_error-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="try_rewrite_on_error-expanded"><a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"><tt class="py-docstring">    called from main.wsgibase to rewrite the http response.</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line">    <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">http_response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">status</tt><tt class="py-op">&gt;=</tt><tt class="py-number">399</tt> <tt class="py-keyword">and</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-47', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt><tt class="py-op">:</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">        <tt id="link-48" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-48', 'keys', 'link-48');">keys</a></tt><tt class="py-op">=</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line">                  <tt class="py-string">'%s/*'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line">                  <tt class="py-string">'*/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line">                  <tt class="py-string">'*/*'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">uri</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-49', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt><tt class="py-op">:</tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-50" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-50', 'keys', 'link-48');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">uri</tt> <tt class="py-op">==</tt> <tt class="py-string">'!'</tt><tt class="py-op">:</tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line">                    <tt class="py-comment"># do nothing!</tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">return</tt> <tt class="py-name">http_response</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-string">'?'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">uri</tt><tt class="py-op">:</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line">                    <tt class="py-name">path_info</tt><tt class="py-op">,</tt> <tt class="py-name">query_string</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line">                    <tt class="py-name">query_string</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&amp;'</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line">                    <tt class="py-name">path_info</tt><tt class="py-op">,</tt> <tt class="py-name">query_string</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt> </tt>
<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line">                <tt class="py-name">query_string</tt> <tt class="py-op">+=</tt> \ </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line">                    <tt class="py-string">'code=%s&amp;ticket=%s&amp;requested_uri=%s&amp;request_url=%s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">                    <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">ticket</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-51', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">request_uri</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-52', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-53', 'startswith', 'link-53');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'http://'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-54', 'startswith', 'link-53');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'https://'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line">                    <tt class="py-comment"># make up a response</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt id="link-55" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-55', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">path_info</tt><tt class="py-op">+</tt><tt class="py-string">'?'</tt><tt class="py-op">+</tt><tt class="py-name">query_string</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">                    <tt id="link-56" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-56', 'message', 'link-56');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'You are being redirected &lt;a href="%s"&gt;here&lt;/a&gt;'</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-57" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-57', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">303</tt><tt class="py-op">,</tt> <tt id="link-58" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-58', 'message', 'link-56');">message</a></tt> <tt class="py-op">%</tt> <tt id="link-59" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-59', 'url', 'link-32');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">Location</tt><tt class="py-op">=</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-60', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">path_info</tt><tt class="py-op">!=</tt><tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line">                    <tt class="py-comment"># rewrite request, call wsgibase recursively, avoid loop</tt> </tt>
<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">path_info</tt> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">                    <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">query_string</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">    <tt class="py-comment"># do nothing!</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">return</tt> <tt class="py-name">http_response</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt> </tt>
</div><a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line"> </tt>
<a name="try_redirect_on_error"></a><div id="try_redirect_on_error-def"><a name="L176"></a><tt class="py-lineno"> 176</tt> <a class="py-toggle" href="#" id="try_redirect_on_error-toggle" onclick="return toggle('try_redirect_on_error');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#try_redirect_on_error">try_redirect_on_error</a><tt class="py-op">(</tt><tt class="py-param">http_object</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">ticket</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="try_redirect_on_error-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="try_redirect_on_error-expanded"><a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line">    <tt class="py-docstring">"called from main.wsgibase to rewrite the http response"</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line">    <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">http_object</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">status</tt><tt class="py-op">&gt;</tt><tt class="py-number">399</tt> <tt class="py-keyword">and</tt> <tt id="link-61" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-61', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt><tt class="py-op">:</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">        <tt id="link-62" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-62', 'keys', 'link-48');">keys</a></tt><tt class="py-op">=</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line">                  <tt class="py-string">'%s/*'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line">                  <tt class="py-string">'*/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line">                  <tt class="py-string">'*/*'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">redir</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-63" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-63', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt><tt class="py-op">:</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-64', 'keys', 'link-48');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">redir</tt> <tt class="py-op">==</tt> <tt class="py-string">'!'</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-string">'?'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">redir</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line">                    <tt id="link-65" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-65', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s&amp;code=%s&amp;ticket=%s&amp;requested_uri=%s&amp;request_url=%s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line">                        <tt class="py-op">(</tt><tt class="py-name">redir</tt><tt class="py-op">,</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">ticket</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-66', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">request_uri</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-67', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">                    <tt id="link-68" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-68', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s?code=%s&amp;ticket=%s&amp;requested_uri=%s&amp;request_url=%s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">                        <tt class="py-op">(</tt><tt class="py-name">redir</tt><tt class="py-op">,</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">ticket</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-69', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">request_uri</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-70', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt id="link-71" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-71', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">303</tt><tt class="py-op">,</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">                            <tt class="py-string">'You are being redirected &lt;a href="%s"&gt;here&lt;/a&gt;'</tt> <tt class="py-op">%</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-72', 'url', 'link-32');">url</a></tt><tt class="py-op">,</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">                            <tt class="py-name">Location</tt><tt class="py-op">=</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-73', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">http_object</tt> </tt>
</div><a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line"> </tt>
<a name="load"></a><div id="load-def"><a name="L200"></a><tt class="py-lineno"> 200</tt> <a class="py-toggle" href="#" id="load-toggle" onclick="return toggle('load');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#load">load</a><tt class="py-op">(</tt><tt class="py-param">routes</tt><tt class="py-op">=</tt><tt class="py-string">'routes.py'</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">rdict</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="load-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="load-expanded"><a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line"><tt class="py-docstring">    load: read (if file) and parse routes</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line"><tt class="py-docstring">    store results in params</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line"><tt class="py-docstring">    (called from main.py at web2py initialization time)</tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"><tt class="py-docstring">    If data is present, it's used instead of the routes.py contents.</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line"><tt class="py-docstring">    If rdict is present, it must be a dict to be used for routers (unit test)</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-74" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-74', 'params', 'link-18');">params</a></tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt id="link-75" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-75', 'routers', 'link-16');">routers</a></tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">        <tt class="py-comment"># reinitialize</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">global</tt> <tt id="link-76" class="py-name"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-76', 'params_apps', 'link-17');">params_apps</a></tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">        <tt id="link-77" class="py-name"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-77', 'params_apps', 'link-17');">params_apps</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">        <tt id="link-78" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-78', 'params', 'link-18');">params</a></tt> <tt class="py-op">=</tt> <tt id="link-79" class="py-name"><a title="web2py.gluon.rewrite._params_default" class="py-name" href="#" onclick="return doclink('link-79', '_params_default', 'link-19');">_params_default</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt>  <tt class="py-comment"># regex rewrite parameters</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">        <tt id="link-80" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-80', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-81" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-81', 'params', 'link-18');">params</a></tt>              <tt class="py-comment"># default to base regex rewrite parameters</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">        <tt id="link-82" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-82', 'routers', 'link-16');">routers</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line"> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">rdict</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">        <tt class="py-name">symbols</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-83" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-83', 'routers', 'link-16');">routers</a></tt><tt class="py-op">=</tt><tt class="py-name">rdict</tt><tt class="py-op">)</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'rdict'</tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">data</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'routes'</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">                <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-84', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">routes</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">                <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-85', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">routes</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-86', 'exists', 'link-86');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-87', 'read_file', 'link-7');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">,</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">        <tt class="py-name">symbols</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line">            <tt class="py-keyword">exec</tt> <tt class="py-op">(</tt><tt class="py-name">data</tt> <tt class="py-op">+</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">symbols</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line">            <tt id="link-88" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-88', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-89" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-89', 'error', 'link-89');">error</a></tt><tt class="py-op">(</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line">                <tt class="py-string">'%s has a syntax error and will not be loaded\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">path</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">                <tt class="py-op">+</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">e</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line"> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">    <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.rewrite._params_default" class="py-name" href="#" onclick="return doclink('link-90', '_params_default', 'link-19');">_params_default</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line"> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">sym</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'routes_app'</tt><tt class="py-op">,</tt> <tt class="py-string">'routes_in'</tt><tt class="py-op">,</tt> <tt class="py-string">'routes_out'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sym</tt> <tt class="py-keyword">in</tt> <tt class="py-name">symbols</tt><tt class="py-op">:</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-91" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-91', 'k', 'link-91');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">symbols</tt><tt class="py-op">[</tt><tt class="py-name">sym</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">                <tt class="py-name">p</tt><tt class="py-op">[</tt><tt class="py-name">sym</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-92', 'append', 'link-92');">append</a></tt><tt class="py-op">(</tt><tt id="link-93" class="py-name" targets="Function web2py.gluon.rewrite.compile_regex()=web2py.gluon.rewrite-module.html#compile_regex"><a title="web2py.gluon.rewrite.compile_regex" class="py-name" href="#" onclick="return doclink('link-93', 'compile_regex', 'link-93');">compile_regex</a></tt><tt class="py-op">(</tt><tt id="link-94" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-94', 'k', 'link-91');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">sym</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'routes_onerror'</tt><tt class="py-op">,</tt> <tt class="py-string">'routes_apps_raw'</tt><tt class="py-op">,</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line">                <tt class="py-string">'error_handler'</tt><tt class="py-op">,</tt><tt class="py-string">'error_message'</tt><tt class="py-op">,</tt> <tt class="py-string">'error_message_ticket'</tt><tt class="py-op">,</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">                <tt class="py-string">'default_application'</tt><tt class="py-op">,</tt><tt class="py-string">'default_controller'</tt><tt class="py-op">,</tt> <tt class="py-string">'default_function'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sym</tt> <tt class="py-keyword">in</tt> <tt class="py-name">symbols</tt><tt class="py-op">:</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">            <tt class="py-name">p</tt><tt class="py-op">[</tt><tt class="py-name">sym</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">symbols</tt><tt class="py-op">[</tt><tt class="py-name">sym</tt><tt class="py-op">]</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-string">'routers'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">symbols</tt><tt class="py-op">:</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">        <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-95', 'routers', 'link-16');">routers</a></tt> <tt class="py-op">=</tt> <tt id="link-96" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-96', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">symbols</tt><tt class="py-op">[</tt><tt class="py-string">'routers'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-97', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-98', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">                <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-99', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-100', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-101', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line"> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">        <tt id="link-102" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-102', 'params', 'link-18');">params</a></tt> <tt class="py-op">=</tt> <tt class="py-name">p</tt>                  <tt class="py-comment"># install base rewrite parameters</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line">        <tt id="link-103" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-103', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-104" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-104', 'params', 'link-18');">params</a></tt>      <tt class="py-comment"># install default as current routes</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line">        <tt class="py-comment">#</tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  create the BASE router if routers in use</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-105" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-105', 'routers', 'link-16');">routers</a></tt> <tt class="py-op">=</tt> <tt id="link-106" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-106', 'params', 'link-18');">params</a></tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-107', 'routers', 'link-16');">routers</a></tt>    <tt class="py-comment"># establish routers if present</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-108', 'routers', 'link-16');">routers</a></tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">            <tt id="link-109" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-109', 'routers', 'link-16');">routers</a></tt> <tt class="py-op">=</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-110', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-111', 'routers', 'link-16');">routers</a></tt><tt class="py-op">)</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-112', 'routers', 'link-16');">routers</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">            <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-113" class="py-name" targets="Function web2py.gluon.rewrite._router_default()=web2py.gluon.rewrite-module.html#_router_default"><a title="web2py.gluon.rewrite._router_default" class="py-name" href="#" onclick="return doclink('link-113', '_router_default', 'link-113');">_router_default</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-114" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-114', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">:</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-115', 'update', 'link-115');">update</a></tt><tt class="py-op">(</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-116', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line">            <tt id="link-117" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-117', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt> <tt class="py-op">=</tt> <tt class="py-name">router</tt> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line"> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">        <tt class="py-comment">#  scan each app in applications/</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#    create a router, if routers are in use</tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#    parse the app-specific routes.py if present</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">all_apps</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">appname</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-name">app</tt> <tt class="py-keyword">for</tt> <tt class="py-name">app</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-118', 'listdir', 'link-118');">listdir</a></tt><tt class="py-op">(</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-119', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">app</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-120', 'startswith', 'link-53');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-121', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">appname</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line">               <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-122', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">appname</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">                <tt class="py-name">all_apps</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-123', 'append', 'link-92');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">appname</tt><tt class="py-op">)</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-124" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-124', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">                    <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-125" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-125', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-126', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">)</tt>   <tt class="py-comment"># new copy</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">appname</tt> <tt class="py-keyword">in</tt> <tt id="link-127" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-127', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line">                        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-128" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-128', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">appname</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-129', 'keys', 'link-48');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon.rewrite.ROUTER_BASE_KEYS" class="py-name" href="#" onclick="return doclink('link-130', 'ROUTER_BASE_KEYS', 'link-24');">ROUTER_BASE_KEYS</a></tt><tt class="py-op">:</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">                                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"BASE-only key '%s' in router '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">appname</tt><tt class="py-op">)</tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">                        <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-131', 'update', 'link-115');">update</a></tt><tt class="py-op">(</tt><tt id="link-132" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-132', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">appname</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line">                    <tt id="link-133" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-133', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">appname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">router</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-134', 'exists', 'link-86');">exists</a></tt><tt class="py-op">(</tt><tt id="link-135" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-135', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">appname</tt><tt class="py-op">,</tt> <tt class="py-name">routes</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">                    <tt id="link-136" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-136', 'load', 'link-136');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">routes</tt><tt class="py-op">,</tt> <tt class="py-name">appname</tt><tt class="py-op">)</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-137" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-137', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line">            <tt id="link-138" class="py-name" targets="Function web2py.gluon.rewrite.load_routers()=web2py.gluon.rewrite-module.html#load_routers"><a title="web2py.gluon.rewrite.load_routers" class="py-name" href="#" onclick="return doclink('link-138', 'load_routers', 'link-138');">load_routers</a></tt><tt class="py-op">(</tt><tt class="py-name">all_apps</tt><tt class="py-op">)</tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-comment"># app</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line">        <tt id="link-139" class="py-name"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-139', 'params_apps', 'link-17');">params_apps</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">p</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-140" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-140', 'routers', 'link-16');">routers</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-141', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-keyword">in</tt> <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-142', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line">                <tt id="link-143" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-143', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-144', 'update', 'link-115');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-145', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line"> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">    <tt id="link-146" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-146', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-147" class="py-name" targets="Module web2py.gluon.debug=web2py.gluon.debug-module.html"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-147', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'URL rewrite is on. configuration in %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
</div><a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line"> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line"> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line"><tt id="link-148" class="py-name" targets="Variable web2py.gluon.rewrite.regex_at=web2py.gluon.rewrite-module.html#regex_at"><a title="web2py.gluon.rewrite.regex_at" class="py-name" href="#" onclick="return doclink('link-148', 'regex_at', 'link-148');">regex_at</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(?&lt;!\\)\$[a-zA-Z]\w*'</tt><tt class="py-op">)</tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line"><tt id="link-149" class="py-name" targets="Variable web2py.gluon.rewrite.regex_anything=web2py.gluon.rewrite-module.html#regex_anything"><a title="web2py.gluon.rewrite.regex_anything" class="py-name" href="#" onclick="return doclink('link-149', 'regex_anything', 'link-149');">regex_anything</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(?&lt;!\\)\$anything'</tt><tt class="py-op">)</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line"> </tt>
<a name="compile_regex"></a><div id="compile_regex-def"><a name="L309"></a><tt class="py-lineno"> 309</tt> <a class="py-toggle" href="#" id="compile_regex-toggle" onclick="return toggle('compile_regex');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#compile_regex">compile_regex</a><tt class="py-op">(</tt><tt class="py-param">k</tt><tt class="py-op">,</tt> <tt class="py-param">v</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="compile_regex-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="compile_regex-expanded"><a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line"><tt class="py-docstring">    Preprocess and compile the regular expressions in routes_app/in/out</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line"><tt class="py-docstring">    The resulting regex will match a pattern of the form:</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line"><tt class="py-docstring">        [remote address]:[protocol]://[host]:[method] [path]</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line"><tt class="py-docstring">    We allow abbreviated regexes on input; here we try to complete them.</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">    <tt class="py-name">k0</tt> <tt class="py-op">=</tt> <tt id="link-150" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-150', 'k', 'link-91');">k</a></tt>  <tt class="py-comment"># original k for error reporting</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">    <tt class="py-comment"># bracket regex in ^...$ if not already done</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-151" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-151', 'k', 'link-91');">k</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'^'</tt><tt class="py-op">:</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">        <tt id="link-152" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-152', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'^%s'</tt> <tt class="py-op">%</tt> <tt id="link-153" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-153', 'k', 'link-91');">k</a></tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-154" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-154', 'k', 'link-91');">k</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'$'</tt><tt class="py-op">:</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">        <tt id="link-155" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-155', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s$'</tt> <tt class="py-op">%</tt> <tt id="link-156" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-156', 'k', 'link-91');">k</a></tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">    <tt class="py-comment"># if there are no :-separated parts, prepend a catch-all for the IP address</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-157" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-157', 'k', 'link-91');">k</a></tt><tt class="py-op">.</tt><tt id="link-158" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-158', 'find', 'link-158');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">        <tt class="py-comment"># k = '^.*?:%s' % k[1:]</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-159" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-159', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'^.*?:https?://[^:/]+:[a-z]+ %s'</tt> <tt class="py-op">%</tt> <tt id="link-160" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-160', 'k', 'link-91');">k</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">    <tt class="py-comment"># if there's no ://, provide a catch-all for the protocol, host &amp; method</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-161" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-161', 'k', 'link-91');">k</a></tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-162', 'find', 'link-158');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'://'</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">        <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt id="link-163" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-163', 'k', 'link-91');">k</a></tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-164', 'find', 'link-158');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">':/'</tt><tt class="py-op">)</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"routes pattern syntax error: path needs leading '/' [%s]"</tt> <tt class="py-op">%</tt> <tt class="py-name">k0</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">        <tt id="link-165" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-165', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-string">r'%s:https?://[^:/]+:[a-z]+ %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-166" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-166', 'k', 'link-91');">k</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-167" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-167', 'k', 'link-91');">k</a></tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">    <tt class="py-comment"># $anything -&gt; ?P&lt;anything&gt;.*</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-168" class="py-name"><a title="web2py.gluon.rewrite.regex_anything" class="py-name" href="#" onclick="return doclink('link-168', 'regex_anything', 'link-149');">regex_anything</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt id="link-169" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-169', 'k', 'link-91');">k</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">        <tt id="link-170" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-170', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt id="link-171" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-171', 'k', 'link-91');">k</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-string">'(?P&lt;anything&gt;.*)'</tt><tt class="py-op">)</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">    <tt class="py-comment"># $a (etc) -&gt; ?P&lt;a&gt;\w+</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-172" class="py-name"><a title="web2py.gluon.rewrite.regex_at" class="py-name" href="#" onclick="return doclink('link-172', 'regex_at', 'link-148');">regex_at</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt id="link-173" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-173', 'k', 'link-91');">k</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">        <tt id="link-174" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-174', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt id="link-175" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-175', 'k', 'link-91');">k</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-string">r'(?P&lt;%s&gt;\w+)'</tt> <tt class="py-op">%</tt> <tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">    <tt class="py-comment"># same for replacement pattern, but with \g</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-176" class="py-name"><a title="web2py.gluon.rewrite.regex_at" class="py-name" href="#" onclick="return doclink('link-176', 'regex_at', 'link-148');">regex_at</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">        <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-string">r'\g&lt;%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">item</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt id="link-177" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-177', 'k', 'link-91');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
</div><a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line"> </tt>
<a name="load_routers"></a><div id="load_routers-def"><a name="L346"></a><tt class="py-lineno"> 346</tt> <a class="py-toggle" href="#" id="load_routers-toggle" onclick="return toggle('load_routers');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#load_routers">load_routers</a><tt class="py-op">(</tt><tt class="py-param">all_apps</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="load_routers-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="load_routers-expanded"><a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line">    <tt class="py-docstring">"load-time post-processing of routers"</tt> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line"> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">app</tt> <tt class="py-keyword">in</tt> <tt id="link-178" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-178', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-179', 'keys', 'link-48');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">        <tt class="py-comment"># initialize apps with routers that aren't present, on behalf of unit tests</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">all_apps</tt><tt class="py-op">:</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">            <tt class="py-name">all_apps</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-180', 'append', 'link-92');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">            <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-181" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-181', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt id="link-182" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-182', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">)</tt>   <tt class="py-comment"># new copy</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-op">!=</tt> <tt class="py-string">'BASE'</tt><tt class="py-op">:</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-183" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-183', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-184', 'keys', 'link-48');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-185" class="py-name"><a title="web2py.gluon.rewrite.ROUTER_BASE_KEYS" class="py-name" href="#" onclick="return doclink('link-185', 'ROUTER_BASE_KEYS', 'link-24');">ROUTER_BASE_KEYS</a></tt><tt class="py-op">:</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"BASE-only key '%s' in router '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-186" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-186', 'update', 'link-115');">update</a></tt><tt class="py-op">(</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-187', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line">            <tt id="link-188" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-188', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">router</tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line">        <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-189" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-189', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-190', 'keys', 'link-48');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-191" class="py-name"><a title="web2py.gluon.rewrite.ROUTER_KEYS" class="py-name" href="#" onclick="return doclink('link-191', 'ROUTER_KEYS', 'link-23');">ROUTER_KEYS</a></tt><tt class="py-op">:</tt> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"unknown key '%s' in router '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">:</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">)</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt><tt class="py-op">:</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt><tt class="py-op">)</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-192', 'languages', 'link-13');">languages</a></tt><tt class="py-op">:</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-193', 'languages', 'link-13');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-194', 'languages', 'link-13');">languages</a></tt><tt class="py-op">)</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-195', 'languages', 'link-13');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-op">!=</tt> <tt class="py-string">'BASE'</tt><tt class="py-op">:</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">base_only</tt> <tt class="py-keyword">in</tt> <tt id="link-196" class="py-name"><a title="web2py.gluon.rewrite.ROUTER_BASE_KEYS" class="py-name" href="#" onclick="return doclink('link-196', 'ROUTER_BASE_KEYS', 'link-24');">ROUTER_BASE_KEYS</a></tt><tt class="py-op">:</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-name">base_only</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'domain'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">router</tt><tt class="py-op">:</tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">                <tt id="link-197" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-197', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">[</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">domain</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">app</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">==</tt> <tt class="py-string">'DEFAULT'</tt><tt class="py-op">:</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt id="link-198" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-198', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">                    <tt class="py-name">cpath</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-199', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">)</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">cname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-200', 'listdir', 'link-118');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-name">cpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt id="link-201" class="py-name"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-201', 'abspath', 'link-6');">abspath</a></tt><tt class="py-op">(</tt><tt class="py-name">cpath</tt><tt class="py-op">,</tt> <tt class="py-name">cname</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">cname</tt><tt class="py-op">.</tt><tt id="link-202" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-202', 'endswith', 'link-202');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'.py'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">                            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">cname</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">:</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-string">'static'</tt><tt class="py-op">)</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt><tt class="py-op">)</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt><tt class="py-op">:</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt><tt class="py-op">)</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line"> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-203" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-203', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-204" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-204', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-op">==</tt> <tt class="py-string">'ALL'</tt><tt class="py-op">:</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">        <tt id="link-205" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-205', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">all_apps</tt><tt class="py-op">)</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-206" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-206', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">        <tt id="link-207" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-207', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt id="link-208" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-208', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">)</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">        <tt id="link-209" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-209', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line"> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">app</tt> <tt class="py-keyword">in</tt> <tt id="link-210" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-210', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt id="link-211" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-211', 'keys', 'link-48');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">        <tt class="py-comment"># set router name</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-212" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-212', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">app</tt><tt class="py-op">]</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">        <tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-213" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-213', 'name', 'link-15');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">app</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">        <tt class="py-comment"># compile URL validation patterns</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">acfe_match</tt><tt class="py-op">)</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">        <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_file_match</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">file_match</tt><tt class="py-op">)</tt> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">args_match</tt><tt class="py-op">:</tt> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">            <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_args_match</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">args_match</tt><tt class="py-op">)</tt> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line">        <tt class="py-comment"># convert path_prefix to a list of path elements</tt> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt><tt class="py-op">:</tt> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line">                <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt> <tt class="py-op">=</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt><tt class="py-op">.</tt><tt id="link-214" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-214', 'strip', 'link-214');">strip</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line"> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">    <tt class="py-comment">#  rewrite BASE.domains as tuples</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#      key:   'domain[:port]' -&gt; (domain, port)</tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#      value: 'application[/controller] -&gt; (application, controller)</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#      (port and controller may be None)</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">domains</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-215" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-215', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">:</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">domain</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-216" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-216', 'strip', 'link-214');">strip</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-217" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-217', 'strip', 'link-214');">strip</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-218" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-218', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">.</tt><tt id="link-219" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-219', 'items', 'link-219');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">            <tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">domain</tt><tt class="py-op">:</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">domain</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">domain</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line">            <tt class="py-name">ctlr</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">app</tt><tt class="py-op">:</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">ctlr</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">app</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">app</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">all_apps</tt> <tt class="py-keyword">and</tt> <tt class="py-name">app</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-220" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-220', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"unknown app '%s' in domains"</tt> <tt class="py-op">%</tt> <tt class="py-name">app</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">            <tt class="py-name">domains</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-name">domain</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-name">ctlr</tt><tt class="py-op">)</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">    <tt id="link-221" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-221', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt> <tt class="py-op">=</tt> <tt class="py-name">domains</tt> </tt>
</div><a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line"> </tt>
<a name="regex_uri"></a><div id="regex_uri-def"><a name="L435"></a><tt class="py-lineno"> 435</tt> <a class="py-toggle" href="#" id="regex_uri-toggle" onclick="return toggle('regex_uri');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#regex_uri">regex_uri</a><tt class="py-op">(</tt><tt class="py-param">e</tt><tt class="py-op">,</tt> <tt class="py-param">regexes</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="regex_uri-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="regex_uri-expanded"><a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line">    <tt class="py-docstring">"filter incoming URI against a list of regexes"</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">    <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-222" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-222', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">,</tt> <tt class="py-string">'localhost'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-223" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-223', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">    <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">host</tt><tt class="py-op">.</tt><tt id="link-224" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-224', 'find', 'link-158');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">        <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">host</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">    <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s:%s://%s:%s %s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-225" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-225', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'REMOTE_ADDR'</tt><tt class="py-op">,</tt><tt class="py-string">'localhost'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line">         <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-226" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-226', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'WSGI_URL_SCHEME'</tt><tt class="py-op">,</tt> <tt class="py-string">'http'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-227', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line">         <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-228', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'REQUEST_METHOD'</tt><tt class="py-op">,</tt> <tt class="py-string">'get'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-229" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-229', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-230" class="py-name" targets="Variable web2py.gluon.validators.IS_EMAIL.regex=web2py.gluon.validators.IS_EMAIL-class.html#regex,Variable web2py.gluon.validators.IS_IPV4.regex=web2py.gluon.validators.IS_IPV4-class.html#regex"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-230', 'regex', 'link-230');">regex</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">regexes</tt><tt class="py-op">:</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-231" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-231', 'regex', 'link-230');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">            <tt class="py-name">rewritten</tt> <tt class="py-op">=</tt> <tt id="link-232" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-232', 'regex', 'link-230');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">            <tt id="link-233" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-233', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-234" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-234', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s: [%s] [%s] -&gt; %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-235" class="py-name" targets="Variable web2py.gluon.html.A.tag=web2py.gluon.html.A-class.html#tag,Variable web2py.gluon.html.B.tag=web2py.gluon.html.B-class.html#tag,Variable web2py.gluon.html.BEAUTIFY.tag=web2py.gluon.html.BEAUTIFY-class.html#tag,Variable web2py.gluon.html.BODY.tag=web2py.gluon.html.BODY-class.html#tag,Variable web2py.gluon.html.BR.tag=web2py.gluon.html.BR-class.html#tag,Variable web2py.gluon.html.BUTTON.tag=web2py.gluon.html.BUTTON-class.html#tag,Variable web2py.gluon.html.CAT.tag=web2py.gluon.html.CAT-class.html#tag,Variable web2py.gluon.html.CENTER.tag=web2py.gluon.html.CENTER-class.html#tag,Variable web2py.gluon.html.COL.tag=web2py.gluon.html.COL-class.html#tag,Variable web2py.gluon.html.COLGROUP.tag=web2py.gluon.html.COLGROUP-class.html#tag,Variable web2py.gluon.html.DIV.tag=web2py.gluon.html.DIV-class.html#tag,Variable web2py.gluon.html.EM.tag=web2py.gluon.html.EM-class.html#tag,Variable web2py.gluon.html.EMBED.tag=web2py.gluon.html.EMBED-class.html#tag,Variable web2py.gluon.html.FIELDSET.tag=web2py.gluon.html.FIELDSET-class.html#tag,Variable web2py.gluon.html.FORM.tag=web2py.gluon.html.FORM-class.html#tag,Variable web2py.gluon.html.H1.tag=web2py.gluon.html.H1-class.html#tag,Variable web2py.gluon.html.H2.tag=web2py.gluon.html.H2-class.html#tag,Variable web2py.gluon.html.H3.tag=web2py.gluon.html.H3-class.html#tag,Variable web2py.gluon.html.H4.tag=web2py.gluon.html.H4-class.html#tag,Variable web2py.gluon.html.H5.tag=web2py.gluon.html.H5-class.html#tag,Variable web2py.gluon.html.H6.tag=web2py.gluon.html.H6-class.html#tag,Variable web2py.gluon.html.HEAD.tag=web2py.gluon.html.HEAD-class.html#tag,Variable web2py.gluon.html.HR.tag=web2py.gluon.html.HR-class.html#tag,Variable web2py.gluon.html.HTML.tag=web2py.gluon.html.HTML-class.html#tag,Variable web2py.gluon.html.I.tag=web2py.gluon.html.I-class.html#tag,Variable web2py.gluon.html.IFRAME.tag=web2py.gluon.html.IFRAME-class.html#tag,Variable web2py.gluon.html.IMG.tag=web2py.gluon.html.IMG-class.html#tag,Variable web2py.gluon.html.INPUT.tag=web2py.gluon.html.INPUT-class.html#tag,Variable web2py.gluon.html.LABEL.tag=web2py.gluon.html.LABEL-class.html#tag,Variable web2py.gluon.html.LEGEND.tag=web2py.gluon.html.LEGEND-class.html#tag,Variable web2py.gluon.html.LI.tag=web2py.gluon.html.LI-class.html#tag,Variable web2py.gluon.html.LINK.tag=web2py.gluon.html.LINK-class.html#tag,Variable web2py.gluon.html.MENU.tag=web2py.gluon.html.MENU-class.html#tag,Variable web2py.gluon.html.META.tag=web2py.gluon.html.META-class.html#tag,Variable web2py.gluon.html.OBJECT.tag=web2py.gluon.html.OBJECT-class.html#tag,Variable web2py.gluon.html.OL.tag=web2py.gluon.html.OL-class.html#tag,Variable web2py.gluon.html.OPTGROUP.tag=web2py.gluon.html.OPTGROUP-class.html#tag,Variable web2py.gluon.html.OPTION.tag=web2py.gluon.html.OPTION-class.html#tag,Variable web2py.gluon.html.P.tag=web2py.gluon.html.P-class.html#tag,Variable web2py.gluon.html.PRE.tag=web2py.gluon.html.PRE-class.html#tag,Variable web2py.gluon.html.SCRIPT.tag=web2py.gluon.html.SCRIPT-class.html#tag,Variable web2py.gluon.html.SELECT.tag=web2py.gluon.html.SELECT-class.html#tag,Variable web2py.gluon.html.SPAN.tag=web2py.gluon.html.SPAN-class.html#tag,Variable web2py.gluon.html.STYLE.tag=web2py.gluon.html.STYLE-class.html#tag,Variable web2py.gluon.html.TABLE.tag=web2py.gluon.html.TABLE-class.html#tag,Variable web2py.gluon.html.TBODY.tag=web2py.gluon.html.TBODY-class.html#tag,Variable web2py.gluon.html.TD.tag=web2py.gluon.html.TD-class.html#tag,Variable web2py.gluon.html.TEXTAREA.tag=web2py.gluon.html.TEXTAREA-class.html#tag,Variable web2py.gluon.html.TFOOT.tag=web2py.gluon.html.TFOOT-class.html#tag,Variable web2py.gluon.html.TH.tag=web2py.gluon.html.TH-class.html#tag,Variable web2py.gluon.html.THEAD.tag=web2py.gluon.html.THEAD-class.html#tag,Variable web2py.gluon.html.TITLE.tag=web2py.gluon.html.TITLE-class.html#tag,Variable web2py.gluon.html.TR.tag=web2py.gluon.html.TR-class.html#tag,Variable web2py.gluon.html.TT.tag=web2py.gluon.html.TT-class.html#tag,Variable web2py.gluon.html.UL.tag=web2py.gluon.html.UL-class.html#tag,Variable web2py.gluon.html.XHTML.tag=web2py.gluon.html.XHTML-class.html#tag"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-235', 'tag', 'link-235');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">rewritten</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">rewritten</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">    <tt id="link-236" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-236', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-237" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-237', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s: [%s] -&gt; %s (not rewritten)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-238" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-238', 'tag', 'link-235');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">default</tt> </tt>
</div><a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line"> </tt>
<a name="regex_select"></a><div id="regex_select-def"><a name="L454"></a><tt class="py-lineno"> 454</tt> <a class="py-toggle" href="#" id="regex_select-toggle" onclick="return toggle('regex_select');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#regex_select">regex_select</a><tt class="py-op">(</tt><tt class="py-param">env</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="regex_select-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="regex_select-expanded"><a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line"><tt class="py-docstring">    select a set of regex rewrite params for the current request</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">app</tt><tt class="py-op">:</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line">        <tt id="link-239" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-239', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-240" class="py-name"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-240', 'params_apps', 'link-17');">params_apps</a></tt><tt class="py-op">.</tt><tt id="link-241" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-241', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt id="link-242" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-242', 'params', 'link-18');">params</a></tt><tt class="py-op">)</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt id="link-243" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-243', 'env', 'link-31');">env</a></tt> <tt class="py-keyword">and</tt> <tt id="link-244" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-244', 'params', 'link-18');">params</a></tt><tt class="py-op">.</tt><tt class="py-name">routes_app</tt><tt class="py-op">:</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-245" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-245', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">            <tt id="link-246" class="py-name"><a title="web2py.gluon.rewrite.map_url_in" class="py-name" href="#" onclick="return doclink('link-246', 'map_url_in', 'link-26');">map_url_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt id="link-247" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-247', 'env', 'link-31');">env</a></tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">            <tt class="py-name">app</tt> <tt class="py-op">=</tt> <tt id="link-248" class="py-name" targets="Function web2py.gluon.rewrite.regex_uri()=web2py.gluon.rewrite-module.html#regex_uri"><a title="web2py.gluon.rewrite.regex_uri" class="py-name" href="#" onclick="return doclink('link-248', 'regex_uri', 'link-248');">regex_uri</a></tt><tt class="py-op">(</tt><tt id="link-249" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-249', 'env', 'link-31');">env</a></tt><tt class="py-op">,</tt> <tt id="link-250" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-250', 'params', 'link-18');">params</a></tt><tt class="py-op">.</tt><tt class="py-name">routes_app</tt><tt class="py-op">,</tt> <tt class="py-string">"routes_app"</tt><tt class="py-op">)</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">            <tt id="link-251" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-251', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-252" class="py-name"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-252', 'params_apps', 'link-17');">params_apps</a></tt><tt class="py-op">.</tt><tt id="link-253" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-253', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt id="link-254" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-254', 'params', 'link-18');">params</a></tt><tt class="py-op">)</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">        <tt id="link-255" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-255', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-256" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-256', 'params', 'link-18');">params</a></tt> <tt class="py-comment"># default to base rewrite parameters</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">    <tt id="link-257" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-257', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-258" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-258', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"select routing parameters: %s"</tt> <tt class="py-op">%</tt> <tt id="link-259" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-259', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt id="link-260" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-260', 'name', 'link-15');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">app</tt>  <tt class="py-comment"># for doctest</tt> </tt>
</div><a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"> </tt>
<a name="regex_filter_in"></a><div id="regex_filter_in-def"><a name="L471"></a><tt class="py-lineno"> 471</tt> <a class="py-toggle" href="#" id="regex_filter_in-toggle" onclick="return toggle('regex_filter_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#regex_filter_in">regex_filter_in</a><tt class="py-op">(</tt><tt class="py-param">e</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="regex_filter_in-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="regex_filter_in-expanded"><a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">    <tt class="py-docstring">"regex rewrite incoming URL"</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line">    <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-261" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-261', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line">    <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'WEB2PY_ORIGINAL_URI'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">(</tt><tt class="py-name">query</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">query</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-262" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-262', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_in</tt><tt class="py-op">:</tt> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-263" class="py-name"><a title="web2py.gluon.rewrite.regex_uri" class="py-name" href="#" onclick="return doclink('link-263', 'regex_uri', 'link-248');">regex_uri</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt id="link-264" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-264', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_in</tt><tt class="py-op">,</tt> <tt class="py-string">"routes_in"</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line">        <tt id="link-265" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-265', 'items', 'link-219');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">        <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-266" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-266', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-267" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-267', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt id="link-268" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-268', 'items', 'link-219');">items</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">query</tt><tt class="py-op">:</tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">                <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt id="link-269" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-269', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">'&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-name">query</tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line">                <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt id="link-270" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-270', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">            <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">query</tt> </tt>
<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line">    <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'REQUEST_URI'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">(</tt><tt class="py-name">query</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">query</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">e</tt> </tt>
</div><a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line"> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line"> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line"><tt class="py-comment"># pattern to replace spaces with underscore in URL</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#   also the html escaped variants '+' and '%20' are covered</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-271" class="py-name" targets="Variable web2py.gluon.rewrite.regex_space=web2py.gluon.rewrite-module.html#regex_space"><a title="web2py.gluon.rewrite.regex_space" class="py-name" href="#" onclick="return doclink('link-271', 'regex_space', 'link-271');">regex_space</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'(\+|\s|%20)+'</tt><tt class="py-op">)</tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line"> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line"><tt class="py-comment"># pattern to find valid paths in url /application/controller/...</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#   this could be:</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#     for static pages:</tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#        /&lt;b:application&gt;/static/&lt;x:file&gt;</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#     for dynamic pages:</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#        /&lt;a:application&gt;[/&lt;c:controller&gt;[/&lt;f:function&gt;[.&lt;e:ext&gt;][/&lt;s:args&gt;]]]</tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#   application, controller, function and ext may only contain [a-zA-Z0-9_]</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#   file and args may also contain '-', '=', '.' and '/'</tt> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#   apps in routes_apps_raw must parse raw_args into args</tt> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line"><tt id="link-272" class="py-name" targets="Variable web2py.gluon.rewrite.regex_static=web2py.gluon.rewrite-module.html#regex_static"><a title="web2py.gluon.rewrite.regex_static" class="py-name" href="#" onclick="return doclink('link-272', 'regex_static', 'link-272');">regex_static</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'''</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line"><tt class="py-string">     (^                              # static pages</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line"><tt class="py-string">         /(?P&lt;b&gt; \w+)                # b=app</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"><tt class="py-string">         /static                     # /b/static</tt> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line"><tt class="py-string">         /(?P&lt;x&gt; (\w[\-\=\./]?)* )   # x=file</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line"><tt class="py-string">     $)</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line"><tt class="py-string">     '''</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">X</tt><tt class="py-op">)</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line"> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line"><tt id="link-273" class="py-name" targets="Variable web2py.gluon.rewrite.regex_url=web2py.gluon.rewrite-module.html#regex_url"><a title="web2py.gluon.rewrite.regex_url" class="py-name" href="#" onclick="return doclink('link-273', 'regex_url', 'link-273');">regex_url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'''</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line"><tt class="py-string">     (^(                                  # (/a/c/f.e/s)</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line"><tt class="py-string">         /(?P&lt;a&gt; [\w\s+]+ )               # /a=app</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line"><tt class="py-string">         (                                # (/c.f.e/s)</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line"><tt class="py-string">             /(?P&lt;c&gt; [\w\s+]+ )           # /a/c=controller</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line"><tt class="py-string">             (                            # (/f.e/s)</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"><tt class="py-string">                 /(?P&lt;f&gt; [\w\s+]+ )       # /a/c/f=function</tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line"><tt class="py-string">                 (                        # (.e)</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line"><tt class="py-string">                     \.(?P&lt;e&gt; [\w\s+]+ )  # /a/c/f.e=extension</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line"><tt class="py-string">                 )?</tt> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line"><tt class="py-string">                 (                        # (/s)</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line"><tt class="py-string">                     /(?P&lt;r&gt;              # /a/c/f.e/r=raw_args</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line"><tt class="py-string">                     .*</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line"><tt class="py-string">                     )</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"><tt class="py-string">                 )?</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"><tt class="py-string">             )?</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line"><tt class="py-string">         )?</tt> </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line"><tt class="py-string">     )?</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line"><tt class="py-string">     /?$)</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"><tt class="py-string">     '''</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">X</tt><tt class="py-op">)</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line"> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line"><tt id="link-274" class="py-name" targets="Variable web2py.gluon.rewrite.regex_args=web2py.gluon.rewrite-module.html#regex_args"><a title="web2py.gluon.rewrite.regex_args" class="py-name" href="#" onclick="return doclink('link-274', 'regex_args', 'link-274');">regex_args</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'''</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"><tt class="py-string">     (^</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line"><tt class="py-string">         (?P&lt;s&gt;</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line"><tt class="py-string">             ( [\w@/-][=.]? )*          # s=args</tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-string">         )?</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-string">     /?$)    # trailing slash</tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"><tt class="py-string">     '''</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">X</tt><tt class="py-op">)</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"> </tt>
<a name="regex_url_in"></a><div id="regex_url_in-def"><a name="L540"></a><tt class="py-lineno"> 540</tt> <a class="py-toggle" href="#" id="regex_url_in-toggle" onclick="return toggle('regex_url_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#regex_url_in">regex_url_in</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">environ</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="regex_url_in-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="regex_url_in-expanded"><a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line">    <tt class="py-docstring">"rewrite and parse incoming URL"</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># select application</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># rewrite URL if routes_in is defined</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># update request.env</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line">    <tt id="link-275" class="py-name" targets="Function web2py.gluon.rewrite.regex_select()=web2py.gluon.rewrite-module.html#regex_select"><a title="web2py.gluon.rewrite.regex_select" class="py-name" href="#" onclick="return doclink('link-275', 'regex_select', 'link-275');">regex_select</a></tt><tt class="py-op">(</tt><tt id="link-276" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-276', 'env', 'link-31');">env</a></tt><tt class="py-op">=</tt><tt class="py-name">environ</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-277" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-277', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_in</tt><tt class="py-op">:</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line">        <tt class="py-name">environ</tt> <tt class="py-op">=</tt> <tt id="link-278" class="py-name" targets="Function web2py.gluon.rewrite.regex_filter_in()=web2py.gluon.rewrite-module.html#regex_filter_in"><a title="web2py.gluon.rewrite.regex_filter_in" class="py-name" href="#" onclick="return doclink('link-278', 'regex_filter_in', 'link-278');">regex_filter_in</a></tt><tt class="py-op">(</tt><tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line"> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-279" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-279', 'items', 'link-219');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-280" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-280', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">.</tt><tt id="link-281" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-281', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line"> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-282" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-282', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">path_info</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">)</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line"> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># serve if a static file</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line">    <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt id="link-283" class="py-name"><a title="web2py.gluon.rewrite.regex_static" class="py-name" href="#" onclick="return doclink('link-283', 'regex_static', 'link-272');">regex_static</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.rewrite.regex_space" class="py-name" href="#" onclick="return doclink('link-284', 'regex_space', 'link-271');">regex_space</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">match</tt> <tt class="py-keyword">and</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">        <tt class="py-name">static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-285" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-285', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-286" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-286', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">,</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line">                                   <tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'b'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">                                   <tt class="py-string">'static'</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line"> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># parse application, controller and function</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ##################################################</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'%20'</tt><tt class="py-op">,</tt> <tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">    <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt id="link-287" class="py-name"><a title="web2py.gluon.rewrite.regex_url" class="py-name" href="#" onclick="return doclink('link-287', 'regex_url', 'link-273');">regex_url</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">match</tt> <tt class="py-keyword">or</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'c'</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'static'</tt><tt class="py-op">:</tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-288" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-288', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">                   <tt id="link-289" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-289', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">                   <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid path'</tt><tt class="py-op">)</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line"> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">        <tt id="link-290" class="py-name"><a title="web2py.gluon.rewrite.regex_space" class="py-name" href="#" onclick="return doclink('link-290', 'regex_space', 'link-271');">regex_space</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt id="link-291" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-291', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt><tt class="py-op">)</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">        <tt id="link-292" class="py-name"><a title="web2py.gluon.rewrite.regex_space" class="py-name" href="#" onclick="return doclink('link-292', 'regex_space', 'link-271');">regex_space</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'c'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt id="link-293" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-293', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt><tt class="py-op">)</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line">        <tt id="link-294" class="py-name"><a title="web2py.gluon.rewrite.regex_space" class="py-name" href="#" onclick="return doclink('link-294', 'regex_space', 'link-271');">regex_space</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'f'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt id="link-295" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-295', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt><tt class="py-op">)</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">    <tt class="py-name">group_e</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">raw_extension</tt> <tt class="py-op">=</tt> <tt class="py-name">group_e</tt> <tt class="py-keyword">and</tt> <tt id="link-296" class="py-name"><a title="web2py.gluon.rewrite.regex_space" class="py-name" href="#" onclick="return doclink('link-296', 'regex_space', 'link-271');">regex_space</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-name">group_e</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">None</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">raw_extension</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'html'</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">raw_args</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt id="link-297" class="py-name"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-297', 'List', 'link-2');">List</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-keyword">in</tt> <tt id="link-298" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-298', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_apps_raw</tt><tt class="py-op">:</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">        <tt class="py-comment"># application is responsible for parsing args</tt> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">raw_args</tt><tt class="py-op">:</tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">        <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt id="link-299" class="py-name"><a title="web2py.gluon.rewrite.regex_args" class="py-name" href="#" onclick="return doclink('link-299', 'regex_args', 'link-274');">regex_args</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">raw_args</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">            <tt class="py-name">group_s</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'s'</tt><tt class="py-op">)</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">            <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line">                <tt id="link-300" class="py-name"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-300', 'List', 'link-2');">List</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">group_s</tt> <tt class="py-keyword">and</tt> <tt class="py-name">group_s</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt><tt class="py-op">:</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># adjust for trailing empty arg</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-301" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-301', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">                       <tt id="link-302" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-302', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid path (args)'</tt><tt class="py-op">)</tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">)</tt> </tt>
</div><a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line"> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line"> </tt>
<a name="regex_filter_out"></a><div id="regex_filter_out-def"><a name="L610"></a><tt class="py-lineno"> 610</tt> <a class="py-toggle" href="#" id="regex_filter_out-toggle" onclick="return toggle('regex_filter_out');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#regex_filter_out">regex_filter_out</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">e</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="regex_filter_out-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="regex_filter_out-expanded"><a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">    <tt class="py-docstring">"regex rewrite outgoing URL"</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-303" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-303', 'thread', 'link-11');">thread</a></tt><tt class="py-op">,</tt> <tt class="py-string">'routes'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line">        <tt id="link-304" class="py-name"><a title="web2py.gluon.rewrite.regex_select" class="py-name" href="#" onclick="return doclink('link-304', 'regex_select', 'link-275');">regex_select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>    <tt class="py-comment"># ensure thread.routes is set (for application threads)</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-305" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-305', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-306" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-306', 'url', 'link-32');">url</a></tt>  <tt class="py-comment"># already filtered</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-307" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-307', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_out</tt><tt class="py-op">:</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line">        <tt id="link-308" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-308', 'items', 'link-219');">items</a></tt> <tt class="py-op">=</tt> <tt id="link-309" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-309', 'url', 'link-32');">url</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line">            <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-310" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-310', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'http_host'</tt><tt class="py-op">,</tt> <tt class="py-string">'localhost'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-311" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-311', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line">            <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">host</tt><tt class="py-op">.</tt><tt id="link-312" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-312', 'find', 'link-158');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">                <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">host</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">            <tt id="link-313" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-313', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s:%s://%s:%s %s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">                 <tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-314" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-314', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'remote_addr'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line">                  <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-315" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-315', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'wsgi_url_scheme'</tt><tt class="py-op">,</tt> <tt class="py-string">'http'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-316" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-316', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line">                  <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-317" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-317', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'request_method'</tt><tt class="py-op">,</tt> <tt class="py-string">'get'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-318" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-318', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-319" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-319', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line">            <tt id="link-320" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-320', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">':http://localhost:get %s'</tt> <tt class="py-op">%</tt> <tt id="link-321" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-321', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-322" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-322', 'regex', 'link-230');">regex</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-323" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-323', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_out</tt><tt class="py-op">:</tt> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-324" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-324', 'regex', 'link-230');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt id="link-325" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-325', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line">                <tt class="py-name">rewritten</tt> <tt class="py-op">=</tt> <tt class="py-string">'?'</tt><tt class="py-op">.</tt><tt id="link-326" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-326', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-327" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-327', 'regex', 'link-230');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-328" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-328', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt id="link-329" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-329', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line">                <tt id="link-330" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-330', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-331" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-331', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'routes_out: [%s] -&gt; %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-332" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-332', 'url', 'link-32');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">rewritten</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">rewritten</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line">    <tt id="link-333" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-333', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-334" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-334', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'routes_out: [%s] not rewritten'</tt> <tt class="py-op">%</tt> <tt id="link-335" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-335', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-336" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-336', 'url', 'link-32');">url</a></tt> </tt>
</div><a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line"> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"> </tt>
<a name="filter_url"></a><div id="filter_url-def"><a name="L638"></a><tt class="py-lineno"> 638</tt> <a class="py-toggle" href="#" id="filter_url-toggle" onclick="return toggle('filter_url');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#filter_url">filter_url</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">=</tt><tt class="py-string">'get'</tt><tt class="py-op">,</tt> <tt class="py-param">remote</tt><tt class="py-op">=</tt><tt class="py-string">'0.0.0.0'</tt><tt class="py-op">,</tt> <tt class="py-param">out</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">lang</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">        <tt class="py-param">domain</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-param">env</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">scheme</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="filter_url-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="filter_url-expanded"><a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">    <tt class="py-docstring">"doctest/unittest interface to regex_filter_in() and regex_filter_out()"</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">    <tt id="link-337" class="py-name"><a title="web2py.gluon.rewrite.regex_url" class="py-name" href="#" onclick="return doclink('link-337', 'regex_url', 'link-273');">regex_url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'^(?P&lt;scheme&gt;http|https|HTTP|HTTPS)\://(?P&lt;host&gt;[^/]*)(?P&lt;uri&gt;.*)'</tt><tt class="py-op">)</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">    <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt id="link-338" class="py-name"><a title="web2py.gluon.rewrite.regex_url" class="py-name" href="#" onclick="return doclink('link-338', 'regex_url', 'link-273');">regex_url</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt id="link-339" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-339', 'url', 'link-32');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">    <tt class="py-name">urlscheme</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'scheme'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-340" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-340', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line">    <tt class="py-name">urlhost</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'host'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-341" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-341', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line">    <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'uri'</tt><tt class="py-op">)</tt> </tt>
<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line">    <tt id="link-342" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-342', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt id="link-343" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-343', 'find', 'link-158');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">)</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-344" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-344', 'k', 'link-91');">k</a></tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">        <tt id="link-345" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-345', 'k', 'link-91');">k</a></tt> <tt class="py-op">=</tt> <tt id="link-346" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-346', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">uri</tt><tt class="py-op">)</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">path_info</tt><tt class="py-op">,</tt> <tt class="py-name">query_string</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">uri</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-347" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-347', 'k', 'link-91');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">uri</tt><tt class="py-op">[</tt><tt id="link-348" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-348', 'k', 'link-91');">k</a></tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">    <tt class="py-name">path_info</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">unquote</tt><tt class="py-op">(</tt><tt class="py-name">path_info</tt><tt class="py-op">)</tt>   <tt class="py-comment"># simulate server</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line">    <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">         <tt class="py-string">'REMOTE_ADDR'</tt><tt class="py-op">:</tt> <tt class="py-name">remote</tt><tt class="py-op">,</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">         <tt class="py-string">'REQUEST_METHOD'</tt><tt class="py-op">:</tt> <tt class="py-name">method</tt><tt class="py-op">,</tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">         <tt class="py-string">'WSGI_URL_SCHEME'</tt><tt class="py-op">:</tt> <tt class="py-name">urlscheme</tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">         <tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">:</tt> <tt class="py-name">urlhost</tt><tt class="py-op">,</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">         <tt class="py-string">'REQUEST_URI'</tt><tt class="py-op">:</tt> <tt class="py-name">uri</tt><tt class="py-op">,</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">         <tt class="py-string">'PATH_INFO'</tt><tt class="py-op">:</tt> <tt class="py-name">path_info</tt><tt class="py-op">,</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">         <tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">:</tt> <tt class="py-name">query_string</tt><tt class="py-op">,</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">         <tt class="py-comment">#for filter_out request.env use lowercase</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">         <tt class="py-string">'remote_addr'</tt><tt class="py-op">:</tt> <tt class="py-name">remote</tt><tt class="py-op">,</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">         <tt class="py-string">'request_method'</tt><tt class="py-op">:</tt> <tt class="py-name">method</tt><tt class="py-op">,</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">         <tt class="py-string">'wsgi_url_scheme'</tt><tt class="py-op">:</tt> <tt class="py-name">urlscheme</tt><tt class="py-op">,</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">         <tt class="py-string">'http_host'</tt><tt class="py-op">:</tt> <tt class="py-name">urlhost</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">    <tt class="py-op">}</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line"> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-349" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-349', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">    <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">"applications_parent"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-350" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-350', 'global_settings', 'link-9');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-351" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-351', 'env', 'link-31');">env</a></tt> <tt class="py-op">=</tt> <tt id="link-352" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-352', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uri_language</tt> <tt class="py-op">=</tt> <tt class="py-name">lang</tt> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line"> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">    <tt class="py-comment">#  determine application only</tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">app</tt><tt class="py-op">:</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-353" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-353', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-354" class="py-name"><a title="web2py.gluon.rewrite.map_url_in" class="py-name" href="#" onclick="return doclink('link-354', 'map_url_in', 'link-26');">map_url_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-name">app</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-355" class="py-name"><a title="web2py.gluon.rewrite.regex_select" class="py-name" href="#" onclick="return doclink('link-355', 'regex_select', 'link-275');">regex_select</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line"> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">    <tt class="py-comment">#  rewrite outbound URL</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">out</tt><tt class="py-op">:</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-356" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-356', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-357" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-357', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">domain</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">        <tt id="link-358" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-358', 'items', 'link-219');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">path_info</tt><tt class="py-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-359" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-359', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt><tt class="py-op">:</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line">            <tt id="link-360" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-360', 'items', 'link-219');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># adjust trailing empty args</tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt id="link-361" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-361', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt id="link-362" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-362', 'items', 'link-219');">items</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-string">"at least /a/c/f is required"</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line">        <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-363" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-363', 'items', 'link-219');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line">        <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-364" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-364', 'items', 'link-219');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line">        <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt id="link-365" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-365', 'items', 'link-219');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-366" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-366', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-367" class="py-name"><a title="web2py.gluon.rewrite.regex_filter_out" class="py-name" href="#" onclick="return doclink('link-367', 'regex_filter_out', 'link-36');">regex_filter_out</a></tt><tt class="py-op">(</tt><tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line">        <tt id="link-368" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-368', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">=</tt> <tt id="link-369" class="py-name"><a title="web2py.gluon.rewrite.map_url_out" class="py-name" href="#" onclick="return doclink('link-369', 'map_url_out', 'link-30');">map_url_out</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-370" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-370', 'items', 'link-219');">items</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-371" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-371', 'items', 'link-219');">items</a></tt><tt class="py-op">:</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">            <tt id="link-372" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-372', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-373" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-373', 'acf', 'link-29');">acf</a></tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-374" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-374', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt id="link-375" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-375', 'items', 'link-219');">items</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-376" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-376', 'items', 'link-219');">items</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt><tt class="py-op">:</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">                <tt id="link-377" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-377', 'url', 'link-32');">url</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">            <tt id="link-378" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-378', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt id="link-379" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-379', 'acf', 'link-29');">acf</a></tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">query_string</tt><tt class="py-op">:</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line">            <tt id="link-380" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-380', 'url', 'link-32');">url</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">query_string</tt> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-381" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-381', 'url', 'link-32');">url</a></tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line"> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line">    <tt class="py-comment">#  rewrite inbound URL</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-op">(</tt><tt class="py-name">static</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-382" class="py-name" targets="Function web2py.gluon.rewrite.url_in()=web2py.gluon.rewrite-module.html#url_in"><a title="web2py.gluon.rewrite.url_in" class="py-name" href="#" onclick="return doclink('link-382', 'url_in', 'link-382');">url_in</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">static</tt><tt class="py-op">:</tt> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">static</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line">    <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">"/%s/%s/%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">)</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">!=</tt> <tt class="py-string">'html'</tt><tt class="py-op">:</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">".%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">" %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">" ?%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uri_language</tt><tt class="py-op">:</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">" (%s)"</tt> <tt class="py-op">%</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uri_language</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-383" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-383', 'env', 'link-31');">env</a></tt><tt class="py-op">:</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-384" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-384', 'env', 'link-31');">env</a></tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
</div><a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line"> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line"> </tt>
<a name="filter_err"></a><div id="filter_err-def"><a name="L721"></a><tt class="py-lineno"> 721</tt> <a class="py-toggle" href="#" id="filter_err-toggle" onclick="return toggle('filter_err');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#filter_err">filter_err</a><tt class="py-op">(</tt><tt class="py-param">status</tt><tt class="py-op">,</tt> <tt class="py-param">application</tt><tt class="py-op">=</tt><tt class="py-string">'app'</tt><tt class="py-op">,</tt> <tt class="py-param">ticket</tt><tt class="py-op">=</tt><tt class="py-string">'tkt'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="filter_err-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="filter_err-expanded"><a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line">    <tt class="py-docstring">"doctest/unittest interface to routes_onerror"</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">399</tt> <tt class="py-keyword">and</tt> <tt id="link-385" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-385', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt><tt class="py-op">:</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line">        <tt id="link-386" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-386', 'keys', 'link-48');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line">                  <tt class="py-string">'%s/*'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">application</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">                  <tt class="py-string">'*/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">                  <tt class="py-string">'*/*'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">redir</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-387" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-387', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">routes_onerror</tt><tt class="py-op">:</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-388" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-388', 'keys', 'link-48');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">redir</tt> <tt class="py-op">==</tt> <tt class="py-string">'!'</tt><tt class="py-op">:</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-string">'?'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">redir</tt><tt class="py-op">:</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">                    <tt id="link-389" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-389', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">redir</tt> <tt class="py-op">+</tt> <tt class="py-string">'&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-string">'code=%s&amp;ticket=%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">ticket</tt><tt class="py-op">)</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line">                    <tt id="link-390" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-390', 'url', 'link-32');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">redir</tt> <tt class="py-op">+</tt> <tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-string">'code=%s&amp;ticket=%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt><tt class="py-name">ticket</tt><tt class="py-op">)</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt id="link-391" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-391', 'url', 'link-32');">url</a></tt> <tt class="py-comment"># redirection</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">status</tt> <tt class="py-comment"># no action</tt> </tt>
</div><a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line"> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line"><tt class="py-comment">#  router support</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="MapUrlIn"></a><div id="MapUrlIn-def"><a name="L741"></a><tt class="py-lineno"> 741</tt> <a class="py-toggle" href="#" id="MapUrlIn-toggle" onclick="return toggle('MapUrlIn');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html">MapUrlIn</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MapUrlIn-expanded"><a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">    <tt class="py-docstring">"logic for mapping incoming URLs"</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.__init__"></a><div id="MapUrlIn.__init__-def"><a name="L744"></a><tt class="py-lineno"> 744</tt> <a class="py-toggle" href="#" id="MapUrlIn.__init__-toggle" onclick="return toggle('MapUrlIn.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">env</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.__init__-expanded"><a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line">        <tt class="py-docstring">"initialize a map-in object"</tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-392" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-392', 'env', 'link-31');">env</a></tt> <tt class="py-op">=</tt> <tt id="link-393" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-393', 'env', 'link-31');">env</a></tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line"> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-string">'html'</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line"> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-394" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-394', 'languages', 'link-13');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">exclusive_domain</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line"> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-395" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-395', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-396" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-396', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-397" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-397', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-398" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-398', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">path</tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-399" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-399', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'WEB2PY_ORIGINAL_URI'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-400" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-400', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">query</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">query</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line"> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">        <tt class="py-comment"># to handle empty args, strip exactly one trailing slash, if present</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># .../arg1// represents one trailing empty arg</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-401" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-401', 'endswith', 'link-202');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt id="link-402" class="py-name"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-402', 'List', 'link-2');">List</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt> <tt class="py-keyword">and</tt> <tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line"> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">        <tt class="py-comment"># see http://www.python.org/dev/peps/pep-3333/#url-reconstruction for URL composition</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-403" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-403', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-404" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-404', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'REMOTE_ADDR'</tt><tt class="py-op">,</tt><tt class="py-string">'localhost'</tt><tt class="py-op">)</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-405" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-405', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-406" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-406', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'WSGI_URL_SCHEME'</tt><tt class="py-op">,</tt> <tt class="py-string">'http'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-407" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-407', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-408" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-408', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-409" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-409', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'REQUEST_METHOD'</tt><tt class="py-op">,</tt> <tt class="py-string">'get'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-410" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-410', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-411" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-411', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-412" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-412', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">)</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">:</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-413" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-413', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-414" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-414', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'SERVER_NAME'</tt><tt class="py-op">)</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-415" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-415', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-416" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-416', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'SERVER_PORT'</tt><tt class="py-op">)</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">:</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-string">'localhost'</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-string">'80'</tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">:</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">:</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">scheme</tt> <tt class="py-op">==</tt> <tt class="py-string">'https'</tt><tt class="py-op">:</tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-string">'443'</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-string">'80'</tt> </tt>
</div><a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_prefix"></a><div id="MapUrlIn.map_prefix-def"><a name="L796"></a><tt class="py-lineno"> 796</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_prefix-toggle" onclick="return toggle('MapUrlIn.map_prefix');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_prefix">map_prefix</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_prefix-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_prefix-expanded"><a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">        <tt class="py-docstring">"strip path prefix, if present in its entirety"</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line">        <tt class="py-name">prefix</tt> <tt class="py-op">=</tt> <tt id="link-417" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-417', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">prefix</tt><tt class="py-op">:</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line">            <tt class="py-name">prefixlen</tt> <tt class="py-op">=</tt> <tt id="link-418" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-418', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">)</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">prefixlen</tt> <tt class="py-op">&gt;</tt> <tt id="link-419" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-419', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt class="py-name">prefixlen</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">prefix</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt>  <tt class="py-comment"># prefix didn't match</tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt id="link-420" class="py-name"><a title="web2py.gluon.storage.List" class="py-name" href="#" onclick="return doclink('link-420', 'List', 'link-2');">List</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-name">prefixlen</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># strip the prefix</tt> </tt>
</div><a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_app"></a><div id="MapUrlIn.map_app-def"><a name="L808"></a><tt class="py-lineno"> 808</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_app-toggle" onclick="return toggle('MapUrlIn.map_app');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_app">map_app</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_app-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_app-expanded"><a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line">        <tt class="py-docstring">"determine application name"</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">        <tt class="py-name">base</tt> <tt class="py-op">=</tt> <tt id="link-421" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-421', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt>  <tt class="py-comment"># base router</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">        <tt id="link-422" class="py-name" targets="Variable web2py.gluon.rewrite.MapUrlIn.arg0=web2py.gluon.rewrite.MapUrlIn-class.html#arg0"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-422', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-423" class="py-name" targets="Variable web2py.gluon.rewrite.MapUrlIn.harg0=web2py.gluon.rewrite.MapUrlIn-class.html#harg0"><a title="web2py.gluon.rewrite.MapUrlIn.harg0" class="py-name" href="#" onclick="return doclink('link-423', 'harg0', 'link-423');">harg0</a></tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-keyword">and</tt> <tt id="link-424" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-424', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt id="link-425" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-425', 'arg0', 'link-422');">arg0</a></tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">:</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-426" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-426', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'domain_application'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-427" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-427', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'domain_controller'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">:</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">domains</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-428" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-428', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'domain_application'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-429" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-429', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'domain_controller'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-430" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-430', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt id="link-431" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-431', 'arg0', 'link-422');">arg0</a></tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-432" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.pop_arg_if()=web2py.gluon.rewrite.MapUrlIn-class.html#pop_arg_if"><a title="web2py.gluon.rewrite.MapUrlIn.pop_arg_if" class="py-name" href="#" onclick="return doclink('link-432', 'pop_arg_if', 'link-432');">pop_arg_if</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt id="link-433" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-433', 'arg0', 'link-422');">arg0</a></tt><tt class="py-op">)</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line"> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">base</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-434" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-434', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-435" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-435', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">"invalid application: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line"> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-436" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-436', 'routers', 'link-16');">routers</a></tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">          <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">!=</tt> <tt id="link-437" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-437', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt class="py-string">'welcome'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-438" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-438', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-439" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-439', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line">                <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">"unknown application: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line"> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">        <tt class="py-comment">#  set the application router</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-440" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-440', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-441" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-441', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"select application=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">)</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-442" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-442', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-443" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-443', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt>                <tt class="py-comment"># support gluon.main.wsgibase init-&gt;welcome</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-444" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-444', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">]</tt>   <tt class="py-comment"># application router</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-445" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-445', 'languages', 'link-13');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-446" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-446', 'languages', 'link-13');">languages</a></tt> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">exclusive_domain</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">exclusive_domain</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_file_match</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_file_match</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_args_match</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_args_match</tt> </tt>
</div><a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_root_static"></a><div id="MapUrlIn.map_root_static-def"><a name="L858"></a><tt class="py-lineno"> 858</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_root_static-toggle" onclick="return toggle('MapUrlIn.map_root_static');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_root_static">map_root_static</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_root_static-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_root_static-expanded"><a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line"><tt class="py-docstring">        handle root-static files (no hyphen mapping)</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line"><tt class="py-docstring">        a root-static file is one whose incoming URL expects it to be at the root,</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line"><tt class="py-docstring">        typically robots.txt &amp; favicon.ico</tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-447" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-447', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-448" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-448', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">root_static</tt><tt class="py-op">:</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-string">'static'</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">            <tt class="py-name">root_static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-449" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-449', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-450" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-450', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">,</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">                                   <tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line">                                   <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-451" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-451', 'arg0', 'link-422');">arg0</a></tt><tt class="py-op">)</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line">            <tt id="link-452" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-452', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-453" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-453', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"route: root static=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">root_static_file</tt><tt class="py-op">)</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">root_static_file</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_language"></a><div id="MapUrlIn.map_language-def"><a name="L874"></a><tt class="py-lineno"> 874</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_language-toggle" onclick="return toggle('MapUrlIn.map_language');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_language">map_language</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_language-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_language-expanded"><a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line">        <tt class="py-docstring">"handle language (no hyphen mapping)"</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line">        <tt id="link-454" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-454', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-455" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-455', 'arg0', 'link-422');">arg0</a></tt>  <tt class="py-comment"># no hyphen mapping</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-456" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-456', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-457" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-457', 'languages', 'link-13');">languages</a></tt> <tt class="py-keyword">and</tt> <tt id="link-458" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-458', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-459" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-459', 'languages', 'link-13');">languages</a></tt><tt class="py-op">:</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">=</tt> <tt id="link-460" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-460', 'arg0', 'link-422');">arg0</a></tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">:</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line">            <tt id="link-461" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-461', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-462" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-462', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"route: language=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">)</tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-463" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.pop_arg_if" class="py-name" href="#" onclick="return doclink('link-463', 'pop_arg_if', 'link-432');">pop_arg_if</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">==</tt> <tt id="link-464" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-464', 'arg0', 'link-422');">arg0</a></tt><tt class="py-op">)</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line">            <tt id="link-465" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-465', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-466" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-466', 'arg0', 'link-422');">arg0</a></tt> </tt>
</div><a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_controller"></a><div id="MapUrlIn.map_controller-def"><a name="L886"></a><tt class="py-lineno"> 886</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_controller-toggle" onclick="return toggle('MapUrlIn.map_controller');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_controller">map_controller</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_controller-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_controller-expanded"><a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line">        <tt class="py-docstring">"identify controller"</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">        <tt class="py-comment">#  handle controller</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-467" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-467', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-468" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.harg0" class="py-name" href="#" onclick="return doclink('link-468', 'harg0', 'link-423');">harg0</a></tt>    <tt class="py-comment"># map hyphens</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-469" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-469', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-keyword">and</tt> <tt id="link-470" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-470', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt id="link-471" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-471', 'arg0', 'link-422');">arg0</a></tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-472" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.pop_arg_if" class="py-name" href="#" onclick="return doclink('link-472', 'pop_arg_if', 'link-432');">pop_arg_if</a></tt><tt class="py-op">(</tt><tt id="link-473" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-473', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">)</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">        <tt id="link-474" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-474', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-475" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-475', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"route: controller=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">)</tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-476" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-476', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-477" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-477', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid controller'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_static"></a><div id="MapUrlIn.map_static-def"><a name="L901"></a><tt class="py-lineno"> 901</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_static-toggle" onclick="return toggle('MapUrlIn.map_static');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_static">map_static</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_static-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_static-expanded"><a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line"><tt class="py-docstring">        handle static files</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line"><tt class="py-docstring">        file_match but no hyphen mapping</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">!=</tt> <tt class="py-string">'static'</tt><tt class="py-op">:</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">        <tt class="py-name">file</tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-478" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-478', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_file_match</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-479" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-479', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-480" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-480', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid static file'</tt><tt class="py-op">)</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line">        <tt class="py-comment">#</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  support language-specific static subdirectories,</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  eg /appname/en/static/filename =&gt; applications/appname/static/en/filename</tt> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  if language-specific file doesn't exist, try same file in static</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">:</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">            <tt class="py-name">static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-481" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-481', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-482" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-482', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">,</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">                                   <tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">                                   <tt class="py-string">'static'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">            <tt class="py-name">static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-483" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-483', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-484" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-484', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">applications_parent</tt><tt class="py-op">,</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line">                                   <tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line">                                   <tt class="py-string">'static'</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line">        <tt id="link-485" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-485', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-486" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-486', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"route: static=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">static_file</tt><tt class="py-op">)</tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">static_file</tt> </tt>
</div><a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.map_function"></a><div id="MapUrlIn.map_function-def"><a name="L928"></a><tt class="py-lineno"> 928</tt> <a class="py-toggle" href="#" id="MapUrlIn.map_function-toggle" onclick="return toggle('MapUrlIn.map_function');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#map_function">map_function</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.map_function-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.map_function-expanded"><a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">        <tt class="py-docstring">"handle function.extension"</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">        <tt id="link-487" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-487', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-488" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.harg0" class="py-name" href="#" onclick="return doclink('link-488', 'harg0', 'link-423');">harg0</a></tt>    <tt class="py-comment"># map hyphens</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-489" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-489', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-keyword">and</tt> <tt id="link-490" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-490', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt><tt class="py-op">:</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt> <tt class="py-keyword">or</tt> <tt class="py-string">""</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-491" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.pop_arg_if" class="py-name" href="#" onclick="return doclink('link-491', 'pop_arg_if', 'link-432');">pop_arg_if</a></tt><tt class="py-op">(</tt><tt id="link-492" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-492', 'arg0', 'link-422');">arg0</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">==</tt> <tt id="link-493" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-493', 'arg0', 'link-422');">arg0</a></tt><tt class="py-op">)</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line">            <tt class="py-name">func_ext</tt> <tt class="py-op">=</tt> <tt id="link-494" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-494', 'arg0', 'link-422');">arg0</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-495" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-495', 'len', 'link-267');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">func_ext</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">func_ext</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">func_ext</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt id="link-496" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-496', 'arg0', 'link-422');">arg0</a></tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-497" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.pop_arg_if" class="py-name" href="#" onclick="return doclink('link-497', 'pop_arg_if', 'link-432');">pop_arg_if</a></tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">        <tt id="link-498" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-498', 'logger', 'link-10');">logger</a></tt><tt class="py-op">.</tt><tt id="link-499" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-499', 'debug', 'link-147');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"route: function.ext=%s.%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line"> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-500" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-500', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-501" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-501', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid function'</tt><tt class="py-op">)</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_acfe_match</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-502" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-502', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-503" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-503', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">                       <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid extension'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.validate_args"></a><div id="MapUrlIn.validate_args-def"><a name="L951"></a><tt class="py-lineno"> 951</tt> <a class="py-toggle" href="#" id="MapUrlIn.validate_args-toggle" onclick="return toggle('MapUrlIn.validate_args');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#validate_args">validate_args</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.validate_args-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.validate_args-expanded"><a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line"><tt class="py-docstring">        check args against validation pattern</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">arg</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">_args_match</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">arg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-504" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-504', 'HTTP', 'link-4');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">400</tt><tt class="py-op">,</tt> <tt id="link-505" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-505', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt><tt class="py-op">,</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line">                           <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid arg &lt;%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">arg</tt><tt class="py-op">)</tt> </tt>
</div><a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.update_request"></a><div id="MapUrlIn.update_request-def"><a name="L960"></a><tt class="py-lineno"> 960</tt> <a class="py-toggle" href="#" id="MapUrlIn.update_request-toggle" onclick="return toggle('MapUrlIn.update_request');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#update_request">update_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.update_request-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.update_request-expanded"><a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line"><tt class="py-docstring">        update request from self</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line"><tt class="py-docstring">        build env.request_uri</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line"><tt class="py-docstring">        make lower-case versions of http headers in env</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">:</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uri_language</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line">        <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">)</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt><tt class="py-op">:</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line">            <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">)</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">!=</tt> <tt class="py-string">'html'</tt><tt class="py-op">:</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line">            <tt class="py-name">uri</tt> <tt class="py-op">+=</tt> <tt class="py-string">'.'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">:</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line">            <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">,</tt> <tt class="py-name">uri</tt><tt class="py-op">)</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line">        <tt class="py-name">uri</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-506" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-506', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-507" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-507', 'x', 'link-507');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-508" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-508', 'x', 'link-507');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">        <tt class="py-name">uri</tt> <tt class="py-op">+=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">query</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'?'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">query</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-509" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-509', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-string">'REQUEST_URI'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-510" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-510', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt id="link-511" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-511', 'items', 'link-219');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-512" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-512', 'env', 'link-31');">env</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">.</tt><tt id="link-513" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-513', 'lower', 'link-42');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line"> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="MapUrlIn.arg0"></a><div id="MapUrlIn.arg0-def"><a name="L987"></a><tt class="py-lineno"> 987</tt> <a class="py-toggle" href="#" id="MapUrlIn.arg0-toggle" onclick="return toggle('MapUrlIn.arg0');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#arg0">arg0</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.arg0-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.arg0-expanded"><a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line">        <tt class="py-docstring">"return first arg"</tt> </tt>
<a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div><a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line"> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="MapUrlIn.harg0"></a><div id="MapUrlIn.harg0-def"><a name="L992"></a><tt class="py-lineno"> 992</tt> <a class="py-toggle" href="#" id="MapUrlIn.harg0-toggle" onclick="return toggle('MapUrlIn.harg0');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#harg0">harg0</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.harg0-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.harg0-expanded"><a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line">        <tt class="py-docstring">"return first arg with optional hyphen mapping"</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div><a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line"> </tt>
<a name="MapUrlIn.pop_arg_if"></a><div id="MapUrlIn.pop_arg_if-def"><a name="L998"></a><tt class="py-lineno"> 998</tt> <a class="py-toggle" href="#" id="MapUrlIn.pop_arg_if-toggle" onclick="return toggle('MapUrlIn.pop_arg_if');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlIn-class.html#pop_arg_if">pop_arg_if</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dopop</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlIn.pop_arg_if-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlIn.pop_arg_if-expanded"><a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line">        <tt class="py-docstring">"conditionally remove first arg and return new first arg"</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">dopop</tt><tt class="py-op">:</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line"> </tt>
<a name="MapUrlOut"></a><div id="MapUrlOut-def"><a name="L1003"></a><tt class="py-lineno">1003</tt> <a class="py-toggle" href="#" id="MapUrlOut-toggle" onclick="return toggle('MapUrlOut');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlOut-class.html">MapUrlOut</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlOut-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MapUrlOut-expanded"><a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">    <tt class="py-docstring">"logic for mapping outgoing URLs"</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line"> </tt>
<a name="MapUrlOut.__init__"></a><div id="MapUrlOut.__init__-def"><a name="L1006"></a><tt class="py-lineno">1006</tt> <a class="py-toggle" href="#" id="MapUrlOut.__init__-toggle" onclick="return toggle('MapUrlOut.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlOut-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">env</tt><tt class="py-op">,</tt> <tt class="py-param">application</tt><tt class="py-op">,</tt> <tt class="py-param">controller</tt><tt class="py-op">,</tt> <tt class="py-param">function</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">,</tt> <tt class="py-param">scheme</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlOut.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlOut.__init__-expanded"><a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">        <tt class="py-docstring">"initialize a map-out object"</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> <tt class="py-op">=</tt> <tt id="link-514" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-514', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">application</tt> <tt class="py-keyword">in</tt> <tt id="link-515" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-515', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-516" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-516', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">application</tt><tt class="py-op">]</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt id="link-517" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-517', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-518" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-518', 'env', 'link-31');">env</a></tt> <tt class="py-op">=</tt> <tt id="link-519" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-519', 'env', 'link-31');">env</a></tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">application</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">controller</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">function</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt> <tt class="py-op">=</tt> <tt class="py-name">other</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">scheme</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-name">host</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-name">port</tt> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line"> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-op">=</tt> <tt id="link-520" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-520', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-521" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-521', 'languages', 'link-13');">languages</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-522" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-522', 'languages', 'link-13');">languages</a></tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">exclusive_domain</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">exclusive_domain</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-523" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_static()=web2py.gluon.rewrite.MapUrlIn-class.html#map_static"><a title="web2py.gluon.rewrite.MapUrlIn.map_static" class="py-name" href="#" onclick="return doclink('link-523', 'map_static', 'link-523');">map_static</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt id="link-524" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.map_static" class="py-name" href="#" onclick="return doclink('link-524', 'map_static', 'link-523');">map_static</a></tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt> <tt class="py-op">=</tt> <tt id="link-525" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-525', 'routers', 'link-16');">routers</a></tt><tt class="py-op">.</tt><tt class="py-name">BASE</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line"> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-526" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-526', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-527" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-527', 'env', 'link-31');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line"> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">exclusive_domain</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">host</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'cross-domain conflict: must specify host'</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line"> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">        <tt class="py-name">lang</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">uri_language</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">lang</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-528" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-528', 'languages', 'link-13');">languages</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">lang</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-529" class="py-name"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-529', 'languages', 'link-13');">languages</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">=</tt> <tt class="py-name">lang</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line"> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_language</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_function</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line"> </tt>
<a name="MapUrlOut.omit_lang"></a><div id="MapUrlOut.omit_lang-def"><a name="L1052"></a><tt class="py-lineno">1052</tt> <a class="py-toggle" href="#" id="MapUrlOut.omit_lang-toggle" onclick="return toggle('MapUrlOut.omit_lang');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlOut-class.html#omit_lang">omit_lang</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlOut.omit_lang-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlOut.omit_lang-expanded"><a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">        <tt class="py-docstring">"omit language if possible"</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line"> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_language</tt><tt class="py-op">:</tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_language</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line"> </tt>
<a name="MapUrlOut.omit_acf"></a><div id="MapUrlOut.omit_acf-def"><a name="L1058"></a><tt class="py-lineno">1058</tt> <a class="py-toggle" href="#" id="MapUrlOut.omit_acf-toggle" onclick="return toggle('MapUrlOut.omit_acf');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlOut-class.html#omit_acf">omit_acf</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlOut.omit_acf-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlOut.omit_acf-expanded"><a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">        <tt class="py-docstring">"omit what we can of a/c/f"</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line"> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">        <tt class="py-name">router</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">router</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line"> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">        <tt class="py-comment">#  Handle the easy no-args case of tail-defaults: /a/c  /a  /</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">==</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt><tt class="py-op">:</tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_function</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">==</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt><tt class="py-op">:</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt><tt class="py-op">:</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line"> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">        <tt class="py-comment">#  omit default application</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  (which might be the domain default application)</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">default_application</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_application</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt class="py-name">default_application</tt><tt class="py-op">:</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line"> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">        <tt class="py-comment">#  omit controller if default controller</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">default_controller</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_application</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">domain_controller</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">router</tt><tt class="py-op">.</tt><tt class="py-name">default_controller</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">==</tt> <tt class="py-name">default_controller</tt><tt class="py-op">:</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line"> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">        <tt class="py-comment">#  omit function if default controller/function</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_function</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt><tt class="py-op">:</tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_function</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line"> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line">        <tt class="py-comment">#  prohibit ambiguous cases</tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  because we presume the lang string to be unambiguous, its presence protects application omission</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_language</tt><tt class="py-op">:</tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt><tt class="py-op">:</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt><tt class="py-op">:</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">functions</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_function</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt><tt class="py-op">:</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controllers</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt><tt class="py-op">:</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">applications</tt><tt class="py-op">:</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line"> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">        <tt class="py-comment">#  handle static as a special case</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#  (easier for external static handling)</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">==</tt> <tt class="py-string">'static'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">.</tt><tt id="link-530" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-530', 'startswith', 'link-53');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'static/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-531" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.map_static" class="py-name" href="#" onclick="return doclink('link-531', 'map_static', 'link-523');">map_static</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt><tt class="py-op">:</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_language</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_function</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line"> </tt>
<a name="MapUrlOut.build_acf"></a><div id="MapUrlOut.build_acf-def"><a name="L1123"></a><tt class="py-lineno">1123</tt> <a class="py-toggle" href="#" id="MapUrlOut.build_acf-toggle" onclick="return toggle('MapUrlOut.build_acf');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlOut-class.html#build_acf">build_acf</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlOut.build_acf-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlOut.build_acf-expanded"><a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">        <tt class="py-docstring">"build acf from components"</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">        <tt id="link-532" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-532', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">map_hyphen</tt><tt class="py-op">:</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">)</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">)</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">!=</tt> <tt class="py-string">'static'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">.</tt><tt id="link-533" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-533', 'startswith', 'link-53');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'static/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">)</tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_application</tt><tt class="py-op">:</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">            <tt id="link-534" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-534', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_language</tt><tt class="py-op">:</tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">            <tt id="link-535" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-535', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">language</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_controller</tt><tt class="py-op">:</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">            <tt id="link-536" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-536', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">omit_function</tt><tt class="py-op">:</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">            <tt id="link-537" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-537', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt><tt class="py-op">:</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">            <tt id="link-538" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-538', 'acf', 'link-29');">acf</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt id="link-539" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-539', 'join', 'link-285');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path_prefix</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-540" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-540', 'acf', 'link-29');">acf</a></tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-541" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-541', 'acf', 'link-29');">acf</a></tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-542" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-542', 'acf', 'link-29');">acf</a></tt> <tt class="py-keyword">or</tt> <tt class="py-string">'/'</tt> </tt>
</div><a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line"> </tt>
<a name="MapUrlOut.acf"></a><div id="MapUrlOut.acf-def"><a name="L1145"></a><tt class="py-lineno">1145</tt> <a class="py-toggle" href="#" id="MapUrlOut.acf-toggle" onclick="return toggle('MapUrlOut.acf');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite.MapUrlOut-class.html#acf">acf</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MapUrlOut.acf-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MapUrlOut.acf-expanded"><a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line">        <tt class="py-docstring">"convert components to /app/lang/controller/function"</tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line"> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-543" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-543', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt>         <tt class="py-comment"># use regex filter</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-544" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlOut.omit_lang()=web2py.gluon.rewrite.MapUrlOut-class.html#omit_lang"><a title="web2py.gluon.rewrite.MapUrlOut.omit_lang" class="py-name" href="#" onclick="return doclink('link-544', 'omit_lang', 'link-544');">omit_lang</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>        <tt class="py-comment"># try to omit language</tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-545" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlOut.omit_acf()=web2py.gluon.rewrite.MapUrlOut-class.html#omit_acf"><a title="web2py.gluon.rewrite.MapUrlOut.omit_acf" class="py-name" href="#" onclick="return doclink('link-545', 'omit_acf', 'link-545');">omit_acf</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>         <tt class="py-comment"># try to omit a/c/f</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-546" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlOut.build_acf()=web2py.gluon.rewrite.MapUrlOut-class.html#build_acf"><a title="web2py.gluon.rewrite.MapUrlOut.build_acf" class="py-name" href="#" onclick="return doclink('link-546', 'build_acf', 'link-546');">build_acf</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># build and return the /a/lang/c/f string</tt> </tt>
</div></div><a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line"> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line"> </tt>
<a name="map_url_in"></a><div id="map_url_in-def"><a name="L1155"></a><tt class="py-lineno">1155</tt> <a class="py-toggle" href="#" id="map_url_in-toggle" onclick="return toggle('map_url_in');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#map_url_in">map_url_in</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">env</tt><tt class="py-op">,</tt> <tt class="py-param">app</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="map_url_in-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="map_url_in-expanded"><a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line">    <tt class="py-docstring">"route incoming URL"</tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line"> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line">    <tt class="py-comment">#  initialize router-url object</tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-547" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-547', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-548" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-548', 'params', 'link-18');">params</a></tt>  <tt class="py-comment"># default to base routes</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line">    <tt class="py-name">map</tt> <tt class="py-op">=</tt> <tt id="link-549" class="py-name" targets="Class web2py.gluon.rewrite.MapUrlIn=web2py.gluon.rewrite.MapUrlIn-class.html"><a title="web2py.gluon.rewrite.MapUrlIn" class="py-name" href="#" onclick="return doclink('link-549', 'MapUrlIn', 'link-549');">MapUrlIn</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt id="link-550" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-550', 'env', 'link-31');">env</a></tt><tt class="py-op">=</tt><tt id="link-551" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-551', 'env', 'link-31');">env</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-552" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_prefix()=web2py.gluon.rewrite.MapUrlIn-class.html#map_prefix"><a title="web2py.gluon.rewrite.MapUrlIn.map_prefix" class="py-name" href="#" onclick="return doclink('link-552', 'map_prefix', 'link-552');">map_prefix</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># strip prefix if present</tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-553" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_app()=web2py.gluon.rewrite.MapUrlIn-class.html#map_app"><a title="web2py.gluon.rewrite.MapUrlIn.map_app" class="py-name" href="#" onclick="return doclink('link-553', 'map_app', 'link-553');">map_app</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>     <tt class="py-comment"># determine application</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line"> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line">    <tt class="py-comment">#  configure thread.routes for error rewrite</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-554" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-554', 'params', 'link-18');">params</a></tt><tt class="py-op">.</tt><tt class="py-name">routes_app</tt><tt class="py-op">:</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">        <tt id="link-555" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-555', 'thread', 'link-11');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt> <tt class="py-op">=</tt> <tt id="link-556" class="py-name"><a title="web2py.gluon.rewrite.params_apps" class="py-name" href="#" onclick="return doclink('link-556', 'params_apps', 'link-17');">params_apps</a></tt><tt class="py-op">.</tt><tt id="link-557" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-557', 'get', 'link-41');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt id="link-558" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-558', 'params', 'link-18');">params</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line"> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">app</tt><tt class="py-op">:</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line"> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line">    <tt class="py-name">root_static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-559" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_root_static()=web2py.gluon.rewrite.MapUrlIn-class.html#map_root_static"><a title="web2py.gluon.rewrite.MapUrlIn.map_root_static" class="py-name" href="#" onclick="return doclink('link-559', 'map_root_static', 'link-559');">map_root_static</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># handle root-static files</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">root_static_file</tt><tt class="py-op">:</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">root_static_file</tt><tt class="py-op">,</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-560" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-560', 'env', 'link-31');">env</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-561" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_language()=web2py.gluon.rewrite.MapUrlIn-class.html#map_language"><a title="web2py.gluon.rewrite.MapUrlIn.map_language" class="py-name" href="#" onclick="return doclink('link-561', 'map_language', 'link-561');">map_language</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-562" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_controller()=web2py.gluon.rewrite.MapUrlIn-class.html#map_controller"><a title="web2py.gluon.rewrite.MapUrlIn.map_controller" class="py-name" href="#" onclick="return doclink('link-562', 'map_controller', 'link-562');">map_controller</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">    <tt class="py-name">static_file</tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-563" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.map_static" class="py-name" href="#" onclick="return doclink('link-563', 'map_static', 'link-523');">map_static</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">static_file</tt><tt class="py-op">:</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">,</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-564" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-564', 'env', 'link-31');">env</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-565" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.map_function()=web2py.gluon.rewrite.MapUrlIn-class.html#map_function"><a title="web2py.gluon.rewrite.MapUrlIn.map_function" class="py-name" href="#" onclick="return doclink('link-565', 'map_function', 'link-565');">map_function</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-566" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.validate_args()=web2py.gluon.rewrite.MapUrlIn-class.html#validate_args"><a title="web2py.gluon.rewrite.MapUrlIn.validate_args" class="py-name" href="#" onclick="return doclink('link-566', 'validate_args', 'link-566');">validate_args</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">    <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-567" class="py-name" targets="Method web2py.gluon.rewrite.MapUrlIn.update_request()=web2py.gluon.rewrite.MapUrlIn-class.html#update_request"><a title="web2py.gluon.rewrite.MapUrlIn.update_request" class="py-name" href="#" onclick="return doclink('link-567', 'update_request', 'link-567');">update_request</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-568" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-568', 'env', 'link-31');">env</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line"> </tt>
<a name="map_url_out"></a><div id="map_url_out-def"><a name="L1186"></a><tt class="py-lineno">1186</tt> <a class="py-toggle" href="#" id="map_url_out-toggle" onclick="return toggle('map_url_out');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#map_url_out">map_url_out</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">env</tt><tt class="py-op">,</tt> <tt class="py-param">application</tt><tt class="py-op">,</tt> <tt class="py-param">controller</tt><tt class="py-op">,</tt> <tt class="py-param">function</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">,</tt> <tt class="py-param">scheme</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="map_url_out-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="map_url_out-expanded"><a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line"><tt class="py-docstring">    supply /a/c/f (or /a/lang/c/f) portion of outgoing url</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line"><tt class="py-docstring">    The basic rule is that we can only make transformations</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line"><tt class="py-docstring">    that map_url_in can reverse.</tt> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line"><tt class="py-docstring">    Suppose that the incoming arguments are a,c,f,args,lang</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line"><tt class="py-docstring">    and that the router defaults are da, dc, df, dl.</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line"><tt class="py-docstring">    We can perform these transformations trivially if args=[] and lang=None or dl:</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line"><tt class="py-docstring">    /da/dc/df =&gt; /</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line"><tt class="py-docstring">    /a/dc/df =&gt; /a</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line"><tt class="py-docstring">    /a/c/df =&gt; /a/c</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line"><tt class="py-docstring">    We would also like to be able to strip the default application or application/controller</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line"><tt class="py-docstring">    from URLs with function/args present, thus:</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line"><tt class="py-docstring">        /da/c/f/args  =&gt; /c/f/args</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line"><tt class="py-docstring">        /da/dc/f/args =&gt; /f/args</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line"><tt class="py-docstring">    We use [applications] and [controllers] and [functions] to suppress ambiguous omissions.</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line"><tt class="py-docstring">    We assume that language names do not collide with a/c/f names.</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">    <tt class="py-name">map</tt> <tt class="py-op">=</tt> <tt id="link-569" class="py-name" targets="Class web2py.gluon.rewrite.MapUrlOut=web2py.gluon.rewrite.MapUrlOut-class.html"><a title="web2py.gluon.rewrite.MapUrlOut" class="py-name" href="#" onclick="return doclink('link-569', 'MapUrlOut', 'link-569');">MapUrlOut</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt id="link-570" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-570', 'env', 'link-31');">env</a></tt><tt class="py-op">,</tt> <tt class="py-name">application</tt><tt class="py-op">,</tt> <tt class="py-name">controller</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">map</tt><tt class="py-op">.</tt><tt id="link-571" class="py-name"><a title="web2py.gluon.rewrite.MapUrlOut.acf" class="py-name" href="#" onclick="return doclink('link-571', 'acf', 'link-29');">acf</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line"> </tt>
<a name="get_effective_router"></a><div id="get_effective_router-def"><a name="L1215"></a><tt class="py-lineno">1215</tt> <a class="py-toggle" href="#" id="get_effective_router-toggle" onclick="return toggle('get_effective_router');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rewrite-module.html#get_effective_router">get_effective_router</a><tt class="py-op">(</tt><tt class="py-param">appname</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_effective_router-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="get_effective_router-expanded"><a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">    <tt class="py-docstring">"return a private copy of the effective router for the specified application"</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-572" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-572', 'routers', 'link-16');">routers</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">appname</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-573" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-573', 'routers', 'link-16');">routers</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-574" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-574', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt id="link-575" class="py-name"><a title="web2py.gluon.rewrite.routers" class="py-name" href="#" onclick="return doclink('link-575', 'routers', 'link-16');">routers</a></tt><tt class="py-op">[</tt><tt class="py-name">appname</tt><tt class="py-op">]</tt><tt class="py-op">)</tt>  <tt class="py-comment"># return a copy</tt> </tt>
</div><a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rewrite.MapUrlIn-class.html version [894993d987].





















































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rewrite.MapUrlIn</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rewrite-module.html">Module&nbsp;rewrite</a> ::
        Class&nbsp;MapUrlIn
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rewrite.MapUrlIn-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MapUrlIn</h1><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">MapUrlIn</strong>
</pre>

<hr />
logic for mapping incoming URLs<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">env</span>=<span class="summary-sig-default">1</span>)</span><br />
      initialize a map-in object</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_prefix"></a><span class="summary-sig-name">map_prefix</span>(<span class="summary-sig-arg">self</span>)</span><br />
      strip path prefix, if present in its entirety</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_prefix">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_app"></a><span class="summary-sig-name">map_app</span>(<span class="summary-sig-arg">self</span>)</span><br />
      determine application name</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_app">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rewrite.MapUrlIn-class.html#map_root_static" class="summary-sig-name">map_root_static</a>(<span class="summary-sig-arg">self</span>)</span><br />
      handle root-static files (no hyphen mapping)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_root_static">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_language"></a><span class="summary-sig-name">map_language</span>(<span class="summary-sig-arg">self</span>)</span><br />
      handle language (no hyphen mapping)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_language">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_controller"></a><span class="summary-sig-name">map_controller</span>(<span class="summary-sig-arg">self</span>)</span><br />
      identify controller</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_controller">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_static"></a><span class="summary-sig-name">map_static</span>(<span class="summary-sig-arg">self</span>)</span><br />
      handle static files file_match but no hyphen mapping</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_static">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="map_function"></a><span class="summary-sig-name">map_function</span>(<span class="summary-sig-arg">self</span>)</span><br />
      handle function.extension</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_function">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="validate_args"></a><span class="summary-sig-name">validate_args</span>(<span class="summary-sig-arg">self</span>)</span><br />
      check args against validation pattern</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.validate_args">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update_request"></a><span class="summary-sig-name">update_request</span>(<span class="summary-sig-arg">self</span>)</span><br />
      update request from self build env.request_uri make lower-case 
      versions of http headers in env</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.update_request">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="pop_arg_if"></a><span class="summary-sig-name">pop_arg_if</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dopop</span>)</span><br />
      conditionally remove first arg and return new first arg</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.pop_arg_if">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite.MapUrlIn-class.html#arg0" class="summary-name">arg0</a><br />
      return first arg
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rewrite.MapUrlIn-class.html#harg0" class="summary-name">harg0</a><br />
      return first arg with optional hyphen mapping
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">env</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  initialize a map-in object
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="map_root_static"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">map_root_static</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlIn.map_root_static">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>handle root-static files (no hyphen mapping)</p>
  a root-static file is one whose incoming URL expects it to be at the 
  root, typically robots.txt &amp; favicon.ico
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Property Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-PropertyDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="arg0"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">arg0</h3>
  return first arg
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><i>unreachable</i>.arg0(<span class="summary-sig-arg">self</span>)</span>
        - return first arg
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
    <dt>Delete Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="harg0"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">harg0</h3>
  return first arg with optional hyphen mapping
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><i>unreachable</i>.harg0(<span class="summary-sig-arg">self</span>)</span>
        - return first arg with optional hyphen mapping
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
    <dt>Delete Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rewrite.MapUrlOut-class.html version [08c1f2da91].











































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rewrite.MapUrlOut</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rewrite-module.html">Module&nbsp;rewrite</a> ::
        Class&nbsp;MapUrlOut
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rewrite.MapUrlOut-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MapUrlOut</h1><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">MapUrlOut</strong>
</pre>

<hr />
logic for mapping outgoing URLs<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rewrite.MapUrlOut-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">env</span>,
        <span class="summary-sig-arg">application</span>,
        <span class="summary-sig-arg">controller</span>,
        <span class="summary-sig-arg">function</span>,
        <span class="summary-sig-arg">args</span>,
        <span class="summary-sig-arg">other</span>,
        <span class="summary-sig-arg">scheme</span>,
        <span class="summary-sig-arg">host</span>,
        <span class="summary-sig-arg">port</span>)</span><br />
      initialize a map-out object</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="omit_lang"></a><span class="summary-sig-name">omit_lang</span>(<span class="summary-sig-arg">self</span>)</span><br />
      omit language if possible</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut.omit_lang">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="omit_acf"></a><span class="summary-sig-name">omit_acf</span>(<span class="summary-sig-arg">self</span>)</span><br />
      omit what we can of a/c/f</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut.omit_acf">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="build_acf"></a><span class="summary-sig-name">build_acf</span>(<span class="summary-sig-arg">self</span>)</span><br />
      build acf from components</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut.build_acf">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acf"></a><span class="summary-sig-name">acf</span>(<span class="summary-sig-arg">self</span>)</span><br />
      convert components to /app/lang/controller/function</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut.acf">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">env</span>,
        <span class="sig-arg">application</span>,
        <span class="sig-arg">controller</span>,
        <span class="sig-arg">function</span>,
        <span class="sig-arg">args</span>,
        <span class="sig-arg">other</span>,
        <span class="sig-arg">scheme</span>,
        <span class="sig-arg">host</span>,
        <span class="sig-arg">port</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rewrite-pysrc.html#MapUrlOut.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  initialize a map-out object
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket-module.html version [f74f937a0f].






































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;rocket
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module rocket</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.NullHandler-class.html" class="summary-name">NullHandler</a><br />
      A Logging handler to prevent library errors.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Connection-class.html" class="summary-name">Connection</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Listener-class.html" class="summary-name">Listener</a><br />
      The Listener class is a class responsible for accepting 
        connections and queuing them to be processed by a worker 
        thread.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Rocket-class.html" class="summary-name">Rocket</a><br />
      The Rocket class is responsible for handling threads and 
        accepting and dispatching connections.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Monitor-class.html" class="summary-name">Monitor</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.ThreadPool-class.html" class="summary-name">ThreadPool</a><br />
      The ThreadPool class is a container class for all the worker 
        threads.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SSLError-class.html" class="summary-name">SSLError</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Headers-class.html" class="summary-name">Headers</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.FileWrapper-class.html" class="summary-name">FileWrapper</a><br />
      Wrapper to convert file-like objects to iterables
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Worker-class.html" class="summary-name">Worker</a><br />
      The Worker class is a base class responsible for receiving 
        connections and (a subclass) will run an application to process the
        the connection
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SocketTimeout-class.html" class="summary-name">SocketTimeout</a><br />
      Exception for when a socket times out between requests.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.BadRequest-class.html" class="summary-name">BadRequest</a><br />
      Exception for when a client sends an incomprehensible 
        request.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SocketClosed-class.html" class="summary-name">SocketClosed</a><br />
      Exception for when a socket is closed by the client.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.ChunkedReader-class.html" class="summary-name">ChunkedReader</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.WSGIWorker-class.html" class="summary-name">WSGIWorker</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#b" class="summary-sig-name">b</a>(<span class="summary-sig-arg">val</span>)</span><br />
      Convert string/unicode/bytes literals into bytes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#b">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#u" class="summary-sig-name">u</a>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">us-ascii</code><code class="variable-quote">'</code></span>)</span><br />
      Convert bytes into string/unicode.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#u">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CherryPyWSGIServer"></a><span class="summary-sig-name">CherryPyWSGIServer</span>(<span class="summary-sig-arg">bind_addr</span>,
        <span class="summary-sig-arg">wsgi_app</span>,
        <span class="summary-sig-arg">numthreads</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">server_name</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">max</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">request_queue_size</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">shutdown_timeout</span>=<span class="summary-sig-default">5</span>)</span><br />
      A Cherrypy wsgiserver-compatible wrapper.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#CherryPyWSGIServer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#_formatparam" class="summary-sig-name">_formatparam</a>(<span class="summary-sig-arg">param</span>,
        <span class="summary-sig-arg">value</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">quote</span>=<span class="summary-sig-default">1</span>)</span><br />
      Convenience function to format and return a key=value pair.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#_formatparam">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_method"></a><span class="summary-sig-name">get_method</span>(<span class="summary-sig-arg">method</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#get_method">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="demo_app"></a><span class="summary-sig-name">demo_app</span>(<span class="summary-sig-arg">environ</span>,
        <span class="summary-sig-arg">start_response</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#demo_app">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="demo"></a><span class="summary-sig-name">demo</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#demo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VERSION"></a><span class="summary-name">VERSION</span> = <code title="'1.2.2'"><code class="variable-quote">'</code><code class="variable-string">1.2.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVER_NAME"></a><span class="summary-name">SERVER_NAME</span> = <code title="'www'"><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVER_SOFTWARE"></a><span class="summary-name">SERVER_SOFTWARE</span> = <code title="'Rocket 1.2.2'"><code class="variable-quote">'</code><code class="variable-string">Rocket 1.2.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTTP_SERVER_SOFTWARE"></a><span class="summary-name">HTTP_SERVER_SOFTWARE</span> = <code title="'Rocket 1.2.2 Python/2.5.2'"><code class="variable-quote">'</code><code class="variable-string">Rocket 1.2.2 Python/2.5.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BUF_SIZE"></a><span class="summary-name">BUF_SIZE</span> = <code title="16384">16384</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SOCKET_TIMEOUT"></a><span class="summary-name">SOCKET_TIMEOUT</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="THREAD_STOP_CHECK_INTERVAL"></a><span class="summary-name">THREAD_STOP_CHECK_INTERVAL</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="IS_JYTHON"></a><span class="summary-name">IS_JYTHON</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="IGNORE_ERRORS_ON_CLOSE"></a><span class="summary-name">IGNORE_ERRORS_ON_CLOSE</span> = <code title="set([103, 104])"><code class="variable-group">set([</code>103<code class="variable-op">, </code>104<code class="variable-group">])</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_LISTEN_QUEUE_SIZE"></a><span class="summary-name">DEFAULT_LISTEN_QUEUE_SIZE</span> = <code title="5">5</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_MIN_THREADS"></a><span class="summary-name">DEFAULT_MIN_THREADS</span> = <code title="10">10</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_MAX_THREADS"></a><span class="summary-name">DEFAULT_MAX_THREADS</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#DEFAULTS" class="summary-name">DEFAULTS</a> = <code title="{'LISTEN_QUEUE_SIZE': 5, 'MAX_THREADS': 0, 'MIN_THREADS': 10}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">LISTEN_QUEUE_SIZE</code><code class="variable-quote">'</code><code class="variable-op">: </code>5<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MAX_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>0<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MIN_THR</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="PY3K"></a><span class="summary-name">PY3K</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="has_ssl"></a><span class="summary-name">has_ssl</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('Rocket.Errors.ThreadPool')">logging.getLogger('Rocket.Errors.ThreadPool')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="re_SLASH"></a><span class="summary-name">re_SLASH</span> = <code title="re.compile(r'(?i)%2F')">re.compile(r'<code class="re-flags">(?i)</code>%2F')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#re_REQUEST_LINE" class="summary-name">re_REQUEST_LINE</a> = <code title="re.compile(r'(?x)^(?P&lt;method&gt;OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CO\
NNECT) ((?P&lt;scheme&gt;[^:/]+)(://)(?P&lt;host&gt;[^/]+))?(?P&lt;path&gt;(\*|/[^ \?]*)\
)(\?(?P&lt;query_string&gt;[^ ]+))? (?P&lt;protocol&gt;HTTPS?/1\.[01])$')">re.compile(r'<code class="re-flags">(?x)</code>^<code class="re-group">(?P&lt;</code><code class="re-ref">method</code><code class="re-group">&gt;</code>OPTIONS<code class="re-op">|</code>GET<code class="re-op">|</code>HEA<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#LOG_LINE" class="summary-name">LOG_LINE</a> = <code title="'%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(size)s'"><code class="variable-quote">'</code><code class="variable-string">%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#RESPONSE" class="summary-name">RESPONSE</a> = <code title="'''HTTP/1.1 %s
Content-Length: %i
Content-Type: %s

%s
'''"><code class="variable-quote">'</code><code class="variable-string">HTTP/1.1 %s\nContent-Length: %i\nContent-Type: %s\</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#HTTP_METHODS" class="summary-name">HTTP_METHODS</a> = <code title="set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONN\
ECT'])">set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', '<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_tspecials"></a><span class="summary-name">_tspecials</span> = <code title="re.compile(r'[ \(\)&lt;&gt;@,;:\\&quot;/\[\]\?=]')">re.compile(r'<code class="re-group">[</code> \(\)&lt;&gt;@,;:\\&quot;/\[\]\?=<code class="re-group">]</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NEWLINE"></a><span class="summary-name">NEWLINE</span> = <code title="'''\r
'''"><code class="variable-quote">'</code><code class="variable-string">\r\n</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HEADER_RESPONSE"></a><span class="summary-name">HEADER_RESPONSE</span> = <code title="'''HTTP/1.1 %s\r
%s'''"><code class="variable-quote">'</code><code class="variable-string">HTTP/1.1 %s\r\n%s</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#BASE_ENV" class="summary-name">BASE_ENV</a> = <code title="{'SCRIPT_NAME': '',
 'SERVER_NAME': 'www',
 'wsgi.errors': &lt;epydoc.docintrospecter._DevNull instance at 0x2b630b3\
2a440&gt;,
 'wsgi.file_wrapper': &lt;class web2py.gluon.rocket.FileWrapper at 0x13da\
350&gt;,
 'wsgi.multiprocess': False,
 'wsgi.run_once': False,
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">SCRIPT_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">SERVER_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">wsgi.err</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="b"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">b</span>(<span class="sig-arg">val</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#b">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert string/unicode/bytes literals into bytes.  This allows for the
  same code to run on Python 2.x and 3.x.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="u"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">u</span>(<span class="sig-arg">val</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">us-ascii</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#u">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert bytes into string/unicode.  This allows for the same code to 
  run on Python 2.x and 3.x.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_formatparam"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_formatparam</span>(<span class="sig-arg">param</span>,
        <span class="sig-arg">value</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">quote</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#_formatparam">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Convenience function to format and return a key=value pair.</p>
  This will quote the value if needed or if quote is true.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="DEFAULTS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">DEFAULTS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">LISTEN_QUEUE_SIZE</code><code class="variable-quote">'</code><code class="variable-op">: </code>5<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MAX_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>0<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MIN_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>10<code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="re_REQUEST_LINE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">re_REQUEST_LINE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?x)</code>^<code class="re-group">(?P&lt;</code><code class="re-ref">method</code><code class="re-group">&gt;</code>OPTIONS<code class="re-op">|</code>GET<code class="re-op">|</code>HEAD<code class="re-op">|</code>POST<code class="re-op">|</code>PUT<code class="re-op">|</code>DELETE<code class="re-op">|</code>TRACE<code class="re-op">|</code>CO<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
NNECT<code class="re-group">)</code> <code class="re-group">(</code><code class="re-group">(?P&lt;</code><code class="re-ref">scheme</code><code class="re-group">&gt;</code><code class="re-group">[</code><code class="re-op">^</code>:/<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>://<code class="re-group">)</code><code class="re-group">(?P&lt;</code><code class="re-ref">host</code><code class="re-group">&gt;</code><code class="re-group">[^</code>/<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(?P&lt;</code><code class="re-ref">path</code><code class="re-group">&gt;</code><code class="re-group">(</code>\*<code class="re-op">|</code>/<code class="re-group">[</code><code class="re-op">^</code> \?<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-group">(</code>\?<code class="re-group">(?P&lt;</code><code class="re-ref">query_string</code><code class="re-group">&gt;</code><code class="re-group">[^</code> <code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code> <code class="re-group">(?P&lt;</code><code class="re-ref">protocol</code><code class="re-group">&gt;</code>HTTPS<code class="re-op">?</code>/1\.<code class="re-group">[</code>01<code class="re-group">]</code><code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="LOG_LINE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">LOG_LINE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(size)s</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="RESPONSE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">RESPONSE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">HTTP/1.1 %s</code>
<code class="variable-string">Content-Length: %i</code>
<code class="variable-string">Content-Type: %s</code>
<code class="variable-string"></code>
<code class="variable-string">%s</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="HTTP_METHODS"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">HTTP_METHODS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONN<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ECT'])
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="BASE_ENV"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">BASE_ENV</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">SCRIPT_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">SERVER_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.errors</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;epydoc.docintrospecter._DevNull instance at 0x2b630b3<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
2a440&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.file_wrapper</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class web2py.gluon.rocket.FileWrapper at 0x13da<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
350&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.multiprocess</code><code class="variable-quote">'</code><code class="variable-op">: </code>False<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.run_once</code><code class="variable-quote">'</code><code class="variable-op">: </code>False<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket-pysrc.html version [b4481f1ec0].



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;rocket
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.rocket-module.html">Module web2py.gluon.rocket</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"># This file is part of the Rocket Web Server</tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright (c) 2010 Timothy Farrell</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">errno</tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Variable web2py.gluon.rocket.Connection.socket=web2py.gluon.rocket.Connection-class.html#socket"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-0', 'socket', 'link-0');">socket</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">platform</tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-comment"># Define Constants</tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-1" class="py-name" targets="Variable web2py.gluon.contrib.pymysql.VERSION=web2py.gluon.contrib.pymysql-module.html#VERSION,Variable web2py.gluon.rocket.VERSION=web2py.gluon.rocket-module.html#VERSION"><a title="web2py.gluon.contrib.pymysql.VERSION
web2py.gluon.rocket.VERSION" class="py-name" href="#" onclick="return doclink('link-1', 'VERSION', 'link-1');">VERSION</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'1.2.2'</tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable web2py.gluon.rocket.SERVER_NAME=web2py.gluon.rocket-module.html#SERVER_NAME"><a title="web2py.gluon.rocket.SERVER_NAME" class="py-name" href="#" onclick="return doclink('link-2', 'SERVER_NAME', 'link-2');">SERVER_NAME</a></tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-3', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">gethostname</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable web2py.gluon.rocket.SERVER_SOFTWARE=web2py.gluon.rocket-module.html#SERVER_SOFTWARE"><a title="web2py.gluon.rocket.SERVER_SOFTWARE" class="py-name" href="#" onclick="return doclink('link-4', 'SERVER_SOFTWARE', 'link-4');">SERVER_SOFTWARE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Rocket %s'</tt> <tt class="py-op">%</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.contrib.pymysql.VERSION
web2py.gluon.rocket.VERSION" class="py-name" href="#" onclick="return doclink('link-5', 'VERSION', 'link-1');">VERSION</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable web2py.gluon.rocket.HTTP_SERVER_SOFTWARE=web2py.gluon.rocket-module.html#HTTP_SERVER_SOFTWARE"><a title="web2py.gluon.rocket.HTTP_SERVER_SOFTWARE" class="py-name" href="#" onclick="return doclink('link-6', 'HTTP_SERVER_SOFTWARE', 'link-6');">HTTP_SERVER_SOFTWARE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%s Python/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-7" class="py-name"><a title="web2py.gluon.rocket.SERVER_SOFTWARE" class="py-name" href="#" onclick="return doclink('link-7', 'SERVER_SOFTWARE', 'link-4');">SERVER_SOFTWARE</a></tt><tt class="py-op">,</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-8', 'version', 'link-8');">version</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable web2py.gluon.rocket.BUF_SIZE=web2py.gluon.rocket-module.html#BUF_SIZE"><a title="web2py.gluon.rocket.BUF_SIZE" class="py-name" href="#" onclick="return doclink('link-9', 'BUF_SIZE', 'link-9');">BUF_SIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">16384</tt> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable web2py.gluon.rocket.SOCKET_TIMEOUT=web2py.gluon.rocket-module.html#SOCKET_TIMEOUT"><a title="web2py.gluon.rocket.SOCKET_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-10', 'SOCKET_TIMEOUT', 'link-10');">SOCKET_TIMEOUT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> <tt class="py-comment"># in secs</tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt id="link-11" class="py-name" targets="Variable web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL=web2py.gluon.rocket-module.html#THREAD_STOP_CHECK_INTERVAL"><a title="web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL" class="py-name" href="#" onclick="return doclink('link-11', 'THREAD_STOP_CHECK_INTERVAL', 'link-11');">THREAD_STOP_CHECK_INTERVAL</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> <tt class="py-comment"># in secs, How often should threads check for a server stop message?</tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt id="link-12" class="py-name" targets="Variable web2py.gluon.rocket.IS_JYTHON=web2py.gluon.rocket-module.html#IS_JYTHON"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-12', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt> <tt class="py-op">=</tt> <tt class="py-name">platform</tt><tt class="py-op">.</tt><tt class="py-name">system</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'Java'</tt> <tt class="py-comment"># Handle special cases for Jython</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt id="link-13" class="py-name" targets="Variable web2py.gluon.rocket.IGNORE_ERRORS_ON_CLOSE=web2py.gluon.rocket-module.html#IGNORE_ERRORS_ON_CLOSE"><a title="web2py.gluon.rocket.IGNORE_ERRORS_ON_CLOSE" class="py-name" href="#" onclick="return doclink('link-13', 'IGNORE_ERRORS_ON_CLOSE', 'link-13');">IGNORE_ERRORS_ON_CLOSE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">ECONNABORTED</tt><tt class="py-op">,</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">ECONNRESET</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt id="link-14" class="py-name" targets="Variable web2py.gluon.rocket.DEFAULT_LISTEN_QUEUE_SIZE=web2py.gluon.rocket-module.html#DEFAULT_LISTEN_QUEUE_SIZE"><a title="web2py.gluon.rocket.DEFAULT_LISTEN_QUEUE_SIZE" class="py-name" href="#" onclick="return doclink('link-14', 'DEFAULT_LISTEN_QUEUE_SIZE', 'link-14');">DEFAULT_LISTEN_QUEUE_SIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt id="link-15" class="py-name" targets="Variable web2py.gluon.rocket.DEFAULT_MIN_THREADS=web2py.gluon.rocket-module.html#DEFAULT_MIN_THREADS"><a title="web2py.gluon.rocket.DEFAULT_MIN_THREADS" class="py-name" href="#" onclick="return doclink('link-15', 'DEFAULT_MIN_THREADS', 'link-15');">DEFAULT_MIN_THREADS</a></tt> <tt class="py-op">=</tt> <tt class="py-number">10</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt id="link-16" class="py-name" targets="Variable web2py.gluon.rocket.DEFAULT_MAX_THREADS=web2py.gluon.rocket-module.html#DEFAULT_MAX_THREADS"><a title="web2py.gluon.rocket.DEFAULT_MAX_THREADS" class="py-name" href="#" onclick="return doclink('link-16', 'DEFAULT_MAX_THREADS', 'link-16');">DEFAULT_MAX_THREADS</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt id="link-17" class="py-name" targets="Variable web2py.gluon.rocket.DEFAULTS=web2py.gluon.rocket-module.html#DEFAULTS"><a title="web2py.gluon.rocket.DEFAULTS" class="py-name" href="#" onclick="return doclink('link-17', 'DEFAULTS', 'link-17');">DEFAULTS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">LISTEN_QUEUE_SIZE</tt> <tt class="py-op">=</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.rocket.DEFAULT_LISTEN_QUEUE_SIZE" class="py-name" href="#" onclick="return doclink('link-18', 'DEFAULT_LISTEN_QUEUE_SIZE', 'link-14');">DEFAULT_LISTEN_QUEUE_SIZE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line">                <tt class="py-name">MIN_THREADS</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.rocket.DEFAULT_MIN_THREADS" class="py-name" href="#" onclick="return doclink('link-19', 'DEFAULT_MIN_THREADS', 'link-15');">DEFAULT_MIN_THREADS</a></tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line">                <tt class="py-name">MAX_THREADS</tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.rocket.DEFAULT_MAX_THREADS" class="py-name" href="#" onclick="return doclink('link-20', 'DEFAULT_MAX_THREADS', 'link-16');">DEFAULT_MAX_THREADS</a></tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt id="link-21" class="py-name" targets="Variable web2py.gluon.rocket.PY3K=web2py.gluon.rocket-module.html#PY3K"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-21', 'PY3K', 'link-21');">PY3K</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Variable sqlite3.dbapi2.version_info=sqlite3.dbapi2-module.html#version_info,Variable web2py.gluon.contrib.pymysql.version_info=web2py.gluon.contrib.pymysql-module.html#version_info,Variable web2py.gluon.main.version_info=web2py.gluon.main-module.html#version_info"><a title="sqlite3.dbapi2.version_info
web2py.gluon.contrib.pymysql.version_info
web2py.gluon.main.version_info" class="py-name" href="#" onclick="return doclink('link-22', 'version_info', 'link-22');">version_info</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">2</tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"> </tt>
<a name="NullHandler"></a><div id="NullHandler-def"><a name="L32"></a><tt class="py-lineno">  32</tt> <a class="py-toggle" href="#" id="NullHandler-toggle" onclick="return toggle('NullHandler');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.NullHandler-class.html">NullHandler</a><tt class="py-op">(</tt><tt class="py-base-class">logging</tt><tt class="py-op">.</tt><tt class="py-base-class">Handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullHandler-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="NullHandler-expanded"><a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line">    <tt class="py-docstring">"A Logging handler to prevent library errors."</tt> </tt>
<a name="NullHandler.emit"></a><div id="NullHandler.emit-def"><a name="L34"></a><tt class="py-lineno">  34</tt> <a class="py-toggle" href="#" id="NullHandler.emit-toggle" onclick="return toggle('NullHandler.emit');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.NullHandler-class.html#emit">emit</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">record</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullHandler.emit-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="NullHandler.emit-expanded"><a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-23', 'PY3K', 'link-21');">PY3K</a></tt><tt class="py-op">:</tt> </tt>
<a name="b"></a><div id="b-def"><a name="L38"></a><tt class="py-lineno">  38</tt> <a class="py-toggle" href="#" id="b-toggle" onclick="return toggle('b');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#b">b</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="b-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="b-expanded"><a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">        <tt class="py-docstring">""" Convert string/unicode/bytes literals into bytes.  This allows for</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line"><tt class="py-docstring">        the same code to run on Python 2.x and 3.x. """</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-24', 'encode', 'link-24');">encode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
</div><a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line"> </tt>
<a name="u"></a><div id="u-def"><a name="L46"></a><tt class="py-lineno">  46</tt> <a class="py-toggle" href="#" id="u-toggle" onclick="return toggle('u');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#u">u</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt class="py-string">"us-ascii"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="u-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="u-expanded"><a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">        <tt class="py-docstring">""" Convert bytes into string/unicode.  This allows for the</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line"><tt class="py-docstring">        same code to run on Python 2.x and 3.x. """</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">bytes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-25', 'decode', 'link-25');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
</div><a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line"> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line"><tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="b"></a><div id="b-def"><a name="L55"></a><tt class="py-lineno">  55</tt> <a class="py-toggle" href="#" id="b-toggle" onclick="return toggle('b');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#b">b</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="b-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="b-expanded"><a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">        <tt class="py-docstring">""" Convert string/unicode/bytes literals into bytes.  This allows for</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line"><tt class="py-docstring">        the same code to run on Python 2.x and 3.x. """</tt> </tt>
<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-26', 'encode', 'link-24');">encode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
</div><a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line"> </tt>
<a name="u"></a><div id="u-def"><a name="L63"></a><tt class="py-lineno">  63</tt> <a class="py-toggle" href="#" id="u-toggle" onclick="return toggle('u');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#u">u</a><tt class="py-op">(</tt><tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt class="py-string">"us-ascii"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="u-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="u-expanded"><a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line">        <tt class="py-docstring">""" Convert bytes into string/unicode.  This allows for the</tt> </tt>
<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"><tt class="py-docstring">        same code to run on Python 2.x and 3.x. """</tt> </tt>
<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-27', 'decode', 'link-25');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">val</tt> </tt>
</div><a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'VERSION'</tt><tt class="py-op">,</tt> <tt class="py-string">'SERVER_SOFTWARE'</tt><tt class="py-op">,</tt> <tt class="py-string">'HTTP_SERVER_SOFTWARE'</tt><tt class="py-op">,</tt> <tt class="py-string">'BUF_SIZE'</tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line">           <tt class="py-string">'IS_JYTHON'</tt><tt class="py-op">,</tt> <tt class="py-string">'IGNORE_ERRORS_ON_CLOSE'</tt><tt class="py-op">,</tt> <tt class="py-string">'DEFAULTS'</tt><tt class="py-op">,</tt> <tt class="py-string">'PY3K'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'u'</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line">           <tt class="py-string">'Rocket'</tt><tt class="py-op">,</tt> <tt class="py-string">'CherryPyWSGIServer'</tt><tt class="py-op">,</tt> <tt class="py-string">'SERVER_NAME'</tt><tt class="py-op">,</tt> <tt class="py-string">'NullHandler'</tt><tt class="py-op">]</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\__init__.py</tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\connection.py</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-28" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-28', 'time', 'link-28');">time</a></tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-29', 'socket', 'link-0');">socket</a></tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt id="link-30" class="py-name" targets="Variable web2py.gluon.rocket.Connection.ssl=web2py.gluon.rocket.Connection-class.html#ssl"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-30', 'ssl', 'link-30');">ssl</a></tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line">    <tt id="link-31" class="py-name" targets="Variable web2py.gluon.rocket.has_ssl=web2py.gluon.rocket-module.html#has_ssl"><a title="web2py.gluon.rocket.has_ssl" class="py-name" href="#" onclick="return doclink('link-31', 'has_ssl', 'link-31');">has_ssl</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">    <tt id="link-32" class="py-name"><a title="web2py.gluon.rocket.has_ssl" class="py-name" href="#" onclick="return doclink('link-32', 'has_ssl', 'link-31');">has_ssl</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="Connection"></a><div id="Connection-def"><a name="L92"></a><tt class="py-lineno">  92</tt> <a class="py-toggle" href="#" id="Connection-toggle" onclick="return toggle('Connection');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.Connection-class.html">Connection</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Connection-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Connection-expanded"><a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">    <tt class="py-name">__slots__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">        <tt class="py-string">'setblocking'</tt><tt class="py-op">,</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line">        <tt class="py-string">'sendall'</tt><tt class="py-op">,</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line">        <tt class="py-string">'shutdown'</tt><tt class="py-op">,</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line">        <tt class="py-string">'makefile'</tt><tt class="py-op">,</tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line">        <tt class="py-string">'fileno'</tt><tt class="py-op">,</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">        <tt class="py-string">'client_addr'</tt><tt class="py-op">,</tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">        <tt class="py-string">'client_port'</tt><tt class="py-op">,</tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line">        <tt class="py-string">'server_port'</tt><tt class="py-op">,</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line">        <tt class="py-string">'socket'</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line">        <tt class="py-string">'start_time'</tt><tt class="py-op">,</tt> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line">        <tt class="py-string">'ssl'</tt><tt class="py-op">,</tt> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line">        <tt class="py-string">'secure'</tt> </tt>
<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"> </tt>
<a name="Connection.__init__"></a><div id="Connection.__init__-def"><a name="L108"></a><tt class="py-lineno"> 108</tt> <a class="py-toggle" href="#" id="Connection.__init__-toggle" onclick="return toggle('Connection.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Connection-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sock_tuple</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">,</tt> <tt class="py-param">secure</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Connection.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Connection.__init__-expanded"><a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Variable web2py.gluon.rocket.Connection.client_addr=web2py.gluon.rocket.Connection-class.html#client_addr"><a title="web2py.gluon.rocket.Connection.client_addr" class="py-name" href="#" onclick="return doclink('link-33', 'client_addr', 'link-33');">client_addr</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Variable web2py.gluon.rocket.Connection.client_port=web2py.gluon.rocket.Connection-class.html#client_port"><a title="web2py.gluon.rocket.Connection.client_port" class="py-name" href="#" onclick="return doclink('link-34', 'client_port', 'link-34');">client_port</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sock_tuple</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Variable web2py.gluon.rocket.Connection.server_port=web2py.gluon.rocket.Connection-class.html#server_port"><a title="web2py.gluon.rocket.Connection.server_port" class="py-name" href="#" onclick="return doclink('link-35', 'server_port', 'link-35');">server_port</a></tt> <tt class="py-op">=</tt> <tt class="py-name">port</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-36', 'socket', 'link-0');">socket</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sock_tuple</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Variable web2py.gluon.rocket.Connection.start_time=web2py.gluon.rocket.Connection-class.html#start_time"><a title="web2py.gluon.rocket.Connection.start_time" class="py-name" href="#" onclick="return doclink('link-37', 'start_time', 'link-37');">start_time</a></tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-38', 'time', 'link-28');">time</a></tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-39', 'time', 'link-28');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-40', 'ssl', 'link-30');">ssl</a></tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="web2py.gluon.rocket.has_ssl" class="py-name" href="#" onclick="return doclink('link-41', 'has_ssl', 'link-31');">has_ssl</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-42', 'socket', 'link-0');">socket</a></tt><tt class="py-op">,</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-43', 'ssl', 'link-30');">ssl</a></tt><tt class="py-op">.</tt><tt class="py-name">SSLSocket</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Method web2py.gluon.globals.Session.secure()=web2py.gluon.globals.Session-class.html#secure,Variable web2py.gluon.rocket.Connection.secure=web2py.gluon.rocket.Connection-class.html#secure"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-44', 'secure', 'link-44');">secure</a></tt> <tt class="py-op">=</tt> <tt id="link-45" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-45', 'secure', 'link-44');">secure</a></tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line"> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-46" class="py-name"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-46', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line">            <tt class="py-comment"># In Jython we must set TCP_NODELAY here since it does not</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># inherit from the listening socket.</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># See: http://bugs.jython.org/issue1309</tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-47', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">setsockopt</tt><tt class="py-op">(</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-48', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">IPPROTO_TCP</tt><tt class="py-op">,</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-49', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">TCP_NODELAY</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-50', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">settimeout</tt><tt class="py-op">(</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.rocket.SOCKET_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-51', 'SOCKET_TIMEOUT', 'link-10');">SOCKET_TIMEOUT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name" targets="Variable web2py.gluon.rocket.Connection.sendall=web2py.gluon.rocket.Connection-class.html#sendall"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-52', 'sendall', 'link-52');">sendall</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-53', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-54', 'sendall', 'link-52');">sendall</a></tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Variable web2py.gluon.rocket.Connection.shutdown=web2py.gluon.rocket.Connection-class.html#shutdown"><a title="web2py.gluon.rocket.Connection.shutdown" class="py-name" href="#" onclick="return doclink('link-55', 'shutdown', 'link-55');">shutdown</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-56', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.rocket.Connection.shutdown" class="py-name" href="#" onclick="return doclink('link-57', 'shutdown', 'link-55');">shutdown</a></tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name" targets="Variable web2py.gluon.rocket.Connection.fileno=web2py.gluon.rocket.Connection-class.html#fileno"><a title="web2py.gluon.rocket.Connection.fileno" class="py-name" href="#" onclick="return doclink('link-58', 'fileno', 'link-58');">fileno</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-59', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.rocket.Connection.fileno" class="py-name" href="#" onclick="return doclink('link-60', 'fileno', 'link-58');">fileno</a></tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Variable web2py.gluon.rocket.Connection.makefile=web2py.gluon.rocket.Connection-class.html#makefile"><a title="web2py.gluon.rocket.Connection.makefile" class="py-name" href="#" onclick="return doclink('link-61', 'makefile', 'link-61');">makefile</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-62', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.rocket.Connection.makefile" class="py-name" href="#" onclick="return doclink('link-63', 'makefile', 'link-61');">makefile</a></tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Variable web2py.gluon.rocket.Connection.setblocking=web2py.gluon.rocket.Connection-class.html#setblocking"><a title="web2py.gluon.rocket.Connection.setblocking" class="py-name" href="#" onclick="return doclink('link-64', 'setblocking', 'link-64');">setblocking</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-65', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.rocket.Connection.setblocking" class="py-name" href="#" onclick="return doclink('link-66', 'setblocking', 'link-64');">setblocking</a></tt> </tt>
</div><a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"> </tt>
<a name="Connection.close"></a><div id="Connection.close-def"><a name="L130"></a><tt class="py-lineno"> 130</tt> <a class="py-toggle" href="#" id="Connection.close-toggle" onclick="return toggle('Connection.close');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Connection-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Connection.close-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Connection.close-expanded"><a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-67', 'socket', 'link-0');">socket</a></tt><tt class="py-op">,</tt> <tt class="py-string">'_sock'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-68', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">_sock</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-69', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-70" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-70', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-71" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-71', 'error', 'link-71');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">                <tt class="py-name">info</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">info</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">errno</tt> <tt class="py-op">!=</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-72', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">EBADF</tt><tt class="py-op">:</tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">info</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">                    <tt class="py-keyword">pass</tt> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-73', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-74', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line"> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\connection.py</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\listener.py</tt> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-75" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-75', 'socket', 'link-0');">socket</a></tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">threading</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Thread</tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt id="link-76" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-76', 'ssl', 'link-30');">ssl</a></tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-77" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-77', 'ssl', 'link-30');">ssl</a></tt> <tt class="py-keyword">import</tt> <tt id="link-78" class="py-name" targets="Class web2py.gluon.rocket.SSLError=web2py.gluon.rocket.SSLError-class.html"><a title="web2py.gluon.rocket.SSLError" class="py-name" href="#" onclick="return doclink('link-78', 'SSLError', 'link-78');">SSLError</a></tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line">    <tt id="link-79" class="py-name"><a title="web2py.gluon.rocket.has_ssl" class="py-name" href="#" onclick="return doclink('link-79', 'has_ssl', 'link-31');">has_ssl</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line">    <tt id="link-80" class="py-name"><a title="web2py.gluon.rocket.has_ssl" class="py-name" href="#" onclick="return doclink('link-80', 'has_ssl', 'link-31');">has_ssl</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="SSLError"></a><div id="SSLError-def"><a name="L158"></a><tt class="py-lineno"> 158</tt> <a class="py-toggle" href="#" id="SSLError-toggle" onclick="return toggle('SSLError');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.SSLError-class.html">SSLError</a><tt class="py-op">(</tt><tt class="py-base-class">socket</tt><tt class="py-op">.</tt><tt class="py-base-class">error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SSLError-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SSLError-expanded"><a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line"><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="Listener"></a><div id="Listener-def"><a name="L163"></a><tt class="py-lineno"> 163</tt> <a class="py-toggle" href="#" id="Listener-toggle" onclick="return toggle('Listener');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.Listener-class.html">Listener</a><tt class="py-op">(</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Listener-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Listener-expanded"><a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line">    <tt class="py-docstring">"""The Listener class is a class responsible for accepting connections</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"><tt class="py-docstring">    and queuing them to be processed by a worker thread."""</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line"> </tt>
<a name="Listener.__init__"></a><div id="Listener.__init__-def"><a name="L167"></a><tt class="py-lineno"> 167</tt> <a class="py-toggle" href="#" id="Listener.__init__-toggle" onclick="return toggle('Listener.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Listener-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">interface</tt><tt class="py-op">,</tt> <tt class="py-param">queue_size</tt><tt class="py-op">,</tt> <tt class="py-param">active_queue</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Listener.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Listener.__init__-expanded"><a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line">        <tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-81', '__init__', 'link-81');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line"> </tt>
<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line">        <tt class="py-comment"># Instance variables</tt> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">active_queue</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt> <tt class="py-op">=</tt> <tt class="py-name">interface</tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">addr</tt> <tt class="py-op">=</tt> <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-82', 'secure', 'link-44');">secure</a></tt> <tt class="py-op">=</tt> <tt id="link-83" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-83', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">4</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line">                      <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-84', 'exists', 'link-84');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line">                      <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-85', 'exists', 'link-84');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ready</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line"> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">        <tt class="py-comment"># Error Log</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'Rocket.Errors.Port%i'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-86" class="py-name" targets="Class web2py.gluon.rocket.NullHandler=web2py.gluon.rocket.NullHandler-class.html"><a title="web2py.gluon.rocket.NullHandler" class="py-name" href="#" onclick="return doclink('link-86', 'NullHandler', 'link-86');">NullHandler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line"> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line">        <tt class="py-comment"># Build the socket</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">listener</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-87', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-88', 'socket', 'link-0');">socket</a></tt><tt class="py-op">(</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-89', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">AF_INET</tt><tt class="py-op">,</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-90', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">SOCK_STREAM</tt><tt class="py-op">)</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">listener</tt><tt class="py-op">:</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-91', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">"Failed to get socket."</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line"> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-92', 'secure', 'link-44');">secure</a></tt><tt class="py-op">:</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-93" class="py-name"><a title="web2py.gluon.rocket.has_ssl" class="py-name" href="#" onclick="return doclink('link-93', 'has_ssl', 'link-31');">has_ssl</a></tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-94', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">"ssl module required to serve HTTPS."</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-95', 'exists', 'link-84');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-96', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">"Cannot find key file "</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line">                          <tt class="py-string">"'%s'.  Cannot bind to %s:%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-97', 'exists', 'link-84');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-98', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">"Cannot find certificate file "</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line">                          <tt class="py-string">"'%s'.  Cannot bind to %s:%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line">        <tt class="py-comment"># Set socket options</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line">            <tt class="py-name">listener</tt><tt class="py-op">.</tt><tt class="py-name">setsockopt</tt><tt class="py-op">(</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-99', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">SOL_SOCKET</tt><tt class="py-op">,</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-100', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">SO_REUSEADDR</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">            <tt id="link-101" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-101', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Cannot share socket.  Using %s:%i exclusively."</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-102', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">addr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line"> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-103" class="py-name"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-103', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt><tt class="py-op">:</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">                <tt class="py-name">listener</tt><tt class="py-op">.</tt><tt class="py-name">setsockopt</tt><tt class="py-op">(</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-104', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">IPPROTO_TCP</tt><tt class="py-op">,</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">                                    <tt id="link-105" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-105', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">TCP_NODELAY</tt><tt class="py-op">,</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">                                    <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">            <tt id="link-106" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-106', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Cannot set TCP_NODELAY, things might run a little slower"</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-107', 'msg', 'link-101');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line"> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">            <tt class="py-name">listener</tt><tt class="py-op">.</tt><tt class="py-name">bind</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">addr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">            <tt id="link-108" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-108', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Socket %s:%i in use by other process and it won't share."</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-109', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt id="link-110" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-110', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">addr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">            <tt class="py-comment"># We want socket operations to timeout periodically so we can</tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># check if the server is shutting down</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">listener</tt><tt class="py-op">.</tt><tt class="py-name">settimeout</tt><tt class="py-op">(</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL" class="py-name" href="#" onclick="return doclink('link-111', 'THREAD_STOP_CHECK_INTERVAL', 'link-11');">THREAD_STOP_CHECK_INTERVAL</a></tt><tt class="py-op">)</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">            <tt class="py-comment"># Listen for new connections allowing queue_size number of</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># connections to wait before rejecting a connection.</tt> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">listener</tt><tt class="py-op">.</tt><tt class="py-name">listen</tt><tt class="py-op">(</tt><tt class="py-name">queue_size</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listener</tt> <tt class="py-op">=</tt> <tt class="py-name">listener</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line"> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ready</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line"> </tt>
<a name="Listener.wrap_socket"></a><div id="Listener.wrap_socket-def"><a name="L239"></a><tt class="py-lineno"> 239</tt> <a class="py-toggle" href="#" id="Listener.wrap_socket-toggle" onclick="return toggle('Listener.wrap_socket');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Listener-class.html#wrap_socket">wrap_socket</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sock</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Listener.wrap_socket-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Listener.wrap_socket-expanded"><a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">            <tt class="py-name">sock</tt> <tt class="py-op">=</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-112', 'ssl', 'link-30');">ssl</a></tt><tt class="py-op">.</tt><tt id="link-113" class="py-name" targets="Method web2py.gluon.rocket.Listener.wrap_socket()=web2py.gluon.rocket.Listener-class.html#wrap_socket"><a title="web2py.gluon.rocket.Listener.wrap_socket" class="py-name" href="#" onclick="return doclink('link-113', 'wrap_socket', 'link-113');">wrap_socket</a></tt><tt class="py-op">(</tt><tt class="py-name">sock</tt><tt class="py-op">,</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">                                   <tt class="py-name">keyfile</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">                                   <tt class="py-name">certfile</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">                                   <tt class="py-name">server_side</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">                                   <tt class="py-name">ssl_version</tt> <tt class="py-op">=</tt> <tt id="link-114" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-114', 'ssl', 'link-30');">ssl</a></tt><tt class="py-op">.</tt><tt class="py-name">PROTOCOL_SSLv23</tt><tt class="py-op">)</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-115" class="py-name"><a title="web2py.gluon.rocket.SSLError" class="py-name" href="#" onclick="return doclink('link-115', 'SSLError', 'link-78');">SSLError</a></tt><tt class="py-op">:</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">            <tt class="py-comment"># Generally this happens when an HTTP request is received on a</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># secure socket. We don't do anything because it will be detected</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># by Worker and dealt with appropriately.</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">pass</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line"> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">sock</tt> </tt>
</div><a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line"> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line"> </tt>
<a name="Listener.run"></a><div id="Listener.run-def"><a name="L255"></a><tt class="py-lineno"> 255</tt> <a class="py-toggle" href="#" id="Listener.run-toggle" onclick="return toggle('Listener.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Listener-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Listener.run-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Listener.run-expanded"><a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ready</tt><tt class="py-op">:</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'Listener started when not ready.'</tt><tt class="py-op">)</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line"> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name" targets="Module web2py.gluon.debug=web2py.gluon.debug-module.html"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-116', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Entering main loop.'</tt><tt class="py-op">)</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line">                <tt class="py-name">sock</tt><tt class="py-op">,</tt> <tt class="py-name">addr</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listener</tt><tt class="py-op">.</tt><tt class="py-name">accept</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-117', 'secure', 'link-44');">secure</a></tt><tt class="py-op">:</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">                    <tt class="py-name">sock</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="web2py.gluon.rocket.Listener.wrap_socket" class="py-name" href="#" onclick="return doclink('link-118', 'wrap_socket', 'link-113');">wrap_socket</a></tt><tt class="py-op">(</tt><tt class="py-name">sock</tt><tt class="py-op">)</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line"> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">sock</tt><tt class="py-op">,</tt> <tt class="py-name">addr</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-119', 'secure', 'link-44');">secure</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line"> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-120" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-120', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">:</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">                <tt class="py-comment"># socket.timeout will be raised every THREAD_STOP_CHECK_INTERVAL</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># seconds.  When that happens, we check if it's time to die.</tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ready</tt><tt class="py-op">:</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-121', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Listener exiting.'</tt><tt class="py-op">)</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-122', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\listener.py</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\main.py</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-123" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-123', 'time', 'link-28');">time</a></tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-124" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-124', 'socket', 'link-0');">socket</a></tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line"> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">queue</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Queue</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">Queue</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Queue</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line"> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line"><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line"> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line"> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line"> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line"> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line"><tt class="py-comment"># Setup Logging</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-125" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.log()=web2py.gluon.restricted.RestrictedError-class.html#log,Variable web2py.gluon.rocket.log=web2py.gluon.rocket-module.html#log,Method web2py.gluon.winservice.Service.log()=web2py.gluon.winservice.Service-class.html#log"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-125', 'log', 'link-125');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'Rocket'</tt><tt class="py-op">)</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line"><tt id="link-126" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-126', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-127" class="py-name"><a title="web2py.gluon.rocket.NullHandler" class="py-name" href="#" onclick="return doclink('link-127', 'NullHandler', 'link-86');">NullHandler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line"> </tt>
<a name="Rocket"></a><div id="Rocket-def"><a name="L312"></a><tt class="py-lineno"> 312</tt> <a class="py-toggle" href="#" id="Rocket-toggle" onclick="return toggle('Rocket');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html">Rocket</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Rocket-expanded"><a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">    <tt class="py-docstring">"""The Rocket class is responsible for handling threads and accepting and</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line"><tt class="py-docstring">    dispatching connections."""</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line"> </tt>
<a name="Rocket.__init__"></a><div id="Rocket.__init__-def"><a name="L316"></a><tt class="py-lineno"> 316</tt> <a class="py-toggle" href="#" id="Rocket.__init__-toggle" onclick="return toggle('Rocket.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">                 <tt class="py-param">interfaces</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'127.0.0.1'</tt><tt class="py-op">,</tt> <tt class="py-number">8000</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">                 <tt class="py-param">method</tt> <tt class="py-op">=</tt> <tt class="py-string">'wsgi'</tt><tt class="py-op">,</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">                 <tt class="py-param">app_info</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">                 <tt class="py-param">min_threads</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">                 <tt class="py-param">max_threads</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">                 <tt class="py-param">queue_size</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">                 <tt class="py-param">timeout</tt> <tt class="py-op">=</tt> <tt class="py-number">600</tt><tt class="py-op">,</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">                 <tt class="py-param">handle_signals</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Rocket.__init__-expanded"><a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line"> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">handle_signals</tt> <tt class="py-op">=</tt> <tt class="py-name">handle_signals</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line"> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">interfaces</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">interfaces</tt><tt class="py-op">]</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt> <tt class="py-op">=</tt> <tt class="py-name">interfaces</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line"> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">min_threads</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">            <tt class="py-name">min_threads</tt> <tt class="py-op">=</tt> <tt id="link-128" class="py-name"><a title="web2py.gluon.rocket.DEFAULTS" class="py-name" href="#" onclick="return doclink('link-128', 'DEFAULTS', 'link-17');">DEFAULTS</a></tt><tt class="py-op">[</tt><tt class="py-string">'MIN_THREADS'</tt><tt class="py-op">]</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line"> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">max_threads</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">            <tt class="py-name">max_threads</tt> <tt class="py-op">=</tt> <tt id="link-129" class="py-name"><a title="web2py.gluon.rocket.DEFAULTS" class="py-name" href="#" onclick="return doclink('link-129', 'DEFAULTS', 'link-17');">DEFAULTS</a></tt><tt class="py-op">[</tt><tt class="py-string">'MAX_THREADS'</tt><tt class="py-op">]</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line"> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">queue_size</tt><tt class="py-op">:</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-130" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-130', 'socket', 'link-0');">socket</a></tt><tt class="py-op">,</tt> <tt class="py-string">'SOMAXCONN'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">                <tt class="py-name">queue_size</tt> <tt class="py-op">=</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-131', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">SOMAXCONN</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">                <tt class="py-name">queue_size</tt> <tt class="py-op">=</tt> <tt id="link-132" class="py-name"><a title="web2py.gluon.rocket.DEFAULTS" class="py-name" href="#" onclick="return doclink('link-132', 'DEFAULTS', 'link-17');">DEFAULTS</a></tt><tt class="py-op">[</tt><tt class="py-string">'LISTEN_QUEUE_SIZE'</tt><tt class="py-op">]</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line"> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">max_threads</tt> <tt class="py-keyword">and</tt> <tt class="py-name">queue_size</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">max_threads</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">            <tt class="py-name">queue_size</tt> <tt class="py-op">=</tt> <tt class="py-name">max_threads</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line"> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">app_info</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">            <tt class="py-name">app_info</tt><tt class="py-op">[</tt><tt class="py-string">'server_software'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="web2py.gluon.rocket.SERVER_SOFTWARE" class="py-name" href="#" onclick="return doclink('link-133', 'SERVER_SOFTWARE', 'link-4');">SERVER_SOFTWARE</a></tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line"> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line">        <tt class="py-name">monitor_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">Queue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">        <tt class="py-name">active_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">Queue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line"> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_monitor</tt> <tt class="py-op">=</tt> <tt id="link-134" class="py-name" targets="Class web2py.gluon.rocket.Monitor=web2py.gluon.rocket.Monitor-class.html"><a title="web2py.gluon.rocket.Monitor" class="py-name" href="#" onclick="return doclink('link-134', 'Monitor', 'link-134');">Monitor</a></tt><tt class="py-op">(</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">,</tt> <tt class="py-name">active_queue</tt><tt class="py-op">,</tt> <tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line"> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_threadpool</tt> <tt class="py-op">=</tt> <tt id="link-135" class="py-name" targets="Class web2py.gluon.rocket.ThreadPool=web2py.gluon.rocket.ThreadPool-class.html"><a title="web2py.gluon.rocket.ThreadPool" class="py-name" href="#" onclick="return doclink('link-135', 'ThreadPool', 'link-135');">ThreadPool</a></tt><tt class="py-op">(</tt><tt id="link-136" class="py-name" targets="Function web2py.gluon.rocket.get_method()=web2py.gluon.rocket-module.html#get_method"><a title="web2py.gluon.rocket.get_method" class="py-name" href="#" onclick="return doclink('link-136', 'get_method', 'link-136');">get_method</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">                                      <tt class="py-name">app_info</tt> <tt class="py-op">=</tt> <tt class="py-name">app_info</tt><tt class="py-op">,</tt> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">                                      <tt class="py-name">active_queue</tt><tt class="py-op">=</tt><tt class="py-name">active_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line">                                      <tt class="py-name">monitor_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">monitor_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line">                                      <tt class="py-name">min_threads</tt><tt class="py-op">=</tt><tt class="py-name">min_threads</tt><tt class="py-op">,</tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">                                      <tt class="py-name">max_threads</tt><tt class="py-op">=</tt><tt class="py-name">max_threads</tt><tt class="py-op">)</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line"> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-comment"># Build our socket listeners</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-137" class="py-name" targets="Class web2py.gluon.rocket.Listener=web2py.gluon.rocket.Listener-class.html"><a title="web2py.gluon.rocket.Listener" class="py-name" href="#" onclick="return doclink('link-137', 'Listener', 'link-137');">Listener</a></tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">queue_size</tt><tt class="py-op">,</tt> <tt class="py-name">active_queue</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">]</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">ndx</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-138" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-138', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">[</tt><tt class="py-name">ndx</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">ready</tt><tt class="py-op">:</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">                <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">[</tt><tt class="py-name">ndx</tt><tt class="py-op">]</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line"> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">:</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">            <tt id="link-139" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-139', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">critical</tt><tt class="py-op">(</tt><tt class="py-string">"No interfaces to listen on...closing."</tt><tt class="py-op">)</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line"> </tt>
<a name="Rocket._sigterm"></a><div id="Rocket._sigterm-def"><a name="L373"></a><tt class="py-lineno"> 373</tt> <a class="py-toggle" href="#" id="Rocket._sigterm-toggle" onclick="return toggle('Rocket._sigterm');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html#_sigterm">_sigterm</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">signum</tt><tt class="py-op">,</tt> <tt class="py-param">frame</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket._sigterm-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Rocket._sigterm-expanded"><a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">        <tt id="link-140" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-140', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'Received SIGTERM'</tt><tt class="py-op">)</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name" targets="Method web2py.gluon.main.HttpServer.stop()=web2py.gluon.main.HttpServer-class.html#stop,Method web2py.gluon.rocket.Monitor.stop()=web2py.gluon.rocket.Monitor-class.html#stop,Method web2py.gluon.rocket.Rocket.stop()=web2py.gluon.rocket.Rocket-class.html#stop,Method web2py.gluon.rocket.ThreadPool.stop()=web2py.gluon.rocket.ThreadPool-class.html#stop,Method web2py.gluon.widget.web2pyDialog.stop()=web2py.gluon.widget.web2pyDialog-class.html#stop,Method web2py.gluon.winservice.Service.stop()=web2py.gluon.winservice.Service-class.html#stop,Method web2py.gluon.winservice.Web2pyService.stop()=web2py.gluon.winservice.Web2pyService-class.html#stop"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-141', 'stop', 'link-141');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line"> </tt>
<a name="Rocket._sighup"></a><div id="Rocket._sighup-def"><a name="L377"></a><tt class="py-lineno"> 377</tt> <a class="py-toggle" href="#" id="Rocket._sighup-toggle" onclick="return toggle('Rocket._sighup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html#_sighup">_sighup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">signum</tt><tt class="py-op">,</tt> <tt class="py-param">frame</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket._sighup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Rocket._sighup-expanded"><a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">        <tt id="link-142" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-142', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'Received SIGHUP'</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name" targets="Method web2py.gluon.rocket.Rocket.restart()=web2py.gluon.rocket.Rocket-class.html#restart"><a title="web2py.gluon.rocket.Rocket.restart" class="py-name" href="#" onclick="return doclink('link-143', 'restart', 'link-143');">restart</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line"> </tt>
<a name="Rocket.start"></a><div id="Rocket.start-def"><a name="L381"></a><tt class="py-lineno"> 381</tt> <a class="py-toggle" href="#" id="Rocket.start-toggle" onclick="return toggle('Rocket.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket.start-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Rocket.start-expanded"><a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">        <tt id="link-144" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-144', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'Starting %s'</tt> <tt class="py-op">%</tt> <tt id="link-145" class="py-name"><a title="web2py.gluon.rocket.SERVER_SOFTWARE" class="py-name" href="#" onclick="return doclink('link-145', 'SERVER_SOFTWARE', 'link-4');">SERVER_SOFTWARE</a></tt><tt class="py-op">)</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line"> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">        <tt class="py-comment"># Set up our shutdown signals</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">handle_signals</tt><tt class="py-op">:</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">                <tt class="py-keyword">import</tt> <tt class="py-name">signal</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">                <tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">signal</tt><tt class="py-op">(</tt><tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">SIGTERM</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name" targets="Method web2py.gluon.rocket.Rocket._sigterm()=web2py.gluon.rocket.Rocket-class.html#_sigterm"><a title="web2py.gluon.rocket.Rocket._sigterm" class="py-name" href="#" onclick="return doclink('link-146', '_sigterm', 'link-146');">_sigterm</a></tt><tt class="py-op">)</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">                <tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">signal</tt><tt class="py-op">(</tt><tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">SIGUSR1</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name" targets="Method web2py.gluon.rocket.Rocket._sighup()=web2py.gluon.rocket.Rocket-class.html#_sighup"><a title="web2py.gluon.rocket.Rocket._sighup" class="py-name" href="#" onclick="return doclink('link-147', '_sighup', 'link-147');">_sighup</a></tt><tt class="py-op">)</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">                <tt id="link-148" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-148', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-149', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'This platform does not support signals.'</tt><tt class="py-op">)</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line"> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">        <tt class="py-comment"># Start our worker threads</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_threadpool</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name" targets="Method web2py.gluon.main.HttpServer.start()=web2py.gluon.main.HttpServer-class.html#start,Method web2py.gluon.rocket.Rocket.start()=web2py.gluon.rocket.Rocket-class.html#start,Method web2py.gluon.rocket.ThreadPool.start()=web2py.gluon.rocket.ThreadPool-class.html#start,Function web2py.gluon.widget.start()=web2py.gluon.widget-module.html#start,Method web2py.gluon.widget.web2pyDialog.start()=web2py.gluon.widget.web2pyDialog-class.html#start,Method web2py.gluon.winservice.Service.start()=web2py.gluon.winservice.Service-class.html#start,Method web2py.gluon.winservice.Web2pyService.start()=web2py.gluon.winservice.Web2pyService-class.html#start"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-150', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line"> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">        <tt class="py-comment"># Start our monitor thread</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_monitor</tt><tt class="py-op">.</tt><tt class="py-name">setDaemon</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_monitor</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-151', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line"> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">        <tt class="py-comment"># I know that EXPR and A or B is bad but I'm keeping it for Py2.4</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># compatibility.</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">str_extract</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">l</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">addr</tt><tt class="py-op">,</tt> <tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">l</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-152', 'secure', 'link-44');">secure</a></tt> <tt class="py-keyword">and</tt> <tt class="py-string">'*'</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line"> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">        <tt id="link-153" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-153', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Listening on sockets: '</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">        <tt id="link-154" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-154', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-155', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s:%i%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">str_extract</tt><tt class="py-op">(</tt><tt class="py-name">l</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">l</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">        <tt id="link-156" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-156', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt id="link-157" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-157', 'msg', 'link-101');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line"> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">l</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">:</tt> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">            <tt class="py-name">l</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-158', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line"> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">        <tt class="py-name">tp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_threadpool</tt> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">        <tt id="link-159" class="py-name" targets="Method web2py.gluon.rocket.ThreadPool.dynamic_resize()=web2py.gluon.rocket.ThreadPool-class.html#dynamic_resize"><a title="web2py.gluon.rocket.ThreadPool.dynamic_resize" class="py-name" href="#" onclick="return doclink('link-159', 'dynamic_resize', 'link-159');">dynamic_resize</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tp</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="web2py.gluon.rocket.ThreadPool.dynamic_resize" class="py-name" href="#" onclick="return doclink('link-160', 'dynamic_resize', 'link-159');">dynamic_resize</a></tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line"> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">tp</tt><tt class="py-op">.</tt><tt class="py-name">stop_server</tt><tt class="py-op">:</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line">                <tt id="link-161" class="py-name"><a title="web2py.gluon.rocket.ThreadPool.dynamic_resize" class="py-name" href="#" onclick="return doclink('link-161', 'dynamic_resize', 'link-159');">dynamic_resize</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">                <tt id="link-162" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-162', 'time', 'link-28');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL" class="py-name" href="#" onclick="return doclink('link-163', 'THREAD_STOP_CHECK_INTERVAL', 'link-11');">THREAD_STOP_CHECK_INTERVAL</a></tt><tt class="py-op">)</tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyboardInterrupt</tt><tt class="py-op">:</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line">                <tt class="py-comment"># Capture a keyboard interrupt when running from a console</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">break</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">tp</tt><tt class="py-op">.</tt><tt class="py-name">stop_server</tt><tt class="py-op">:</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">                    <tt id="link-164" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-164', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-165', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line"> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-166', 'stop', 'link-141');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"> </tt>
<a name="Rocket.stop"></a><div id="Rocket.stop-def"><a name="L428"></a><tt class="py-lineno"> 428</tt> <a class="py-toggle" href="#" id="Rocket.stop-toggle" onclick="return toggle('Rocket.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stoplogging</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket.stop-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Rocket.stop-expanded"><a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">        <tt id="link-167" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-167', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Stopping Server"</tt><tt class="py-op">)</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line"> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">        <tt class="py-comment"># Stop listeners</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">l</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listeners</tt><tt class="py-op">:</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">            <tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">ready</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">isAlive</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line">                <tt class="py-name">l</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-168', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line"> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line">        <tt class="py-comment"># Stop Worker threads</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_threadpool</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-169', 'stop', 'link-141');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line"> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">        <tt class="py-comment"># Stop Monitor</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_monitor</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-170', 'stop', 'link-141');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_monitor</tt><tt class="py-op">.</tt><tt class="py-name">isAlive</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_monitor</tt><tt class="py-op">.</tt><tt id="link-171" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-171', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line"> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">stoplogging</tt><tt class="py-op">:</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">            <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-172" class="py-name"><a title="web2py.gluon.rocket.Connection.shutdown" class="py-name" href="#" onclick="return doclink('link-172', 'shutdown', 'link-55');">shutdown</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line"> </tt>
<a name="Rocket.restart"></a><div id="Rocket.restart-def"><a name="L448"></a><tt class="py-lineno"> 448</tt> <a class="py-toggle" href="#" id="Rocket.restart-toggle" onclick="return toggle('Rocket.restart');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Rocket-class.html#restart">restart</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Rocket.restart-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Rocket.restart-expanded"><a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-173', 'stop', 'link-141');">stop</a></tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-174', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line"> </tt>
<a name="CherryPyWSGIServer"></a><div id="CherryPyWSGIServer-def"><a name="L452"></a><tt class="py-lineno"> 452</tt> <a class="py-toggle" href="#" id="CherryPyWSGIServer-toggle" onclick="return toggle('CherryPyWSGIServer');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#CherryPyWSGIServer">CherryPyWSGIServer</a><tt class="py-op">(</tt><tt class="py-param">bind_addr</tt><tt class="py-op">,</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line">                       <tt class="py-param">wsgi_app</tt><tt class="py-op">,</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">                       <tt class="py-param">numthreads</tt> <tt class="py-op">=</tt> <tt class="py-number">10</tt><tt class="py-op">,</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">                       <tt class="py-param">server_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line">                       <tt class="py-param">max</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line">                       <tt class="py-param">request_queue_size</tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt><tt class="py-op">,</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line">                       <tt class="py-param">timeout</tt> <tt class="py-op">=</tt> <tt class="py-number">10</tt><tt class="py-op">,</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line">                       <tt class="py-param">shutdown_timeout</tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CherryPyWSGIServer-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CherryPyWSGIServer-expanded"><a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line">    <tt class="py-docstring">""" A Cherrypy wsgiserver-compatible wrapper. """</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line">    <tt class="py-name">max_threads</tt> <tt class="py-op">=</tt> <tt id="link-175" class="py-name" targets="Variable datetime.date.max=datetime.date-class.html#max,Variable datetime.datetime.max=datetime.datetime-class.html#max,Variable datetime.time.max=datetime.time-class.html#max,Method web2py.gluon.dal.Expression.max()=web2py.gluon.dal.Expression-class.html#max"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-175', 'max', 'link-175');">max</a></tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">max_threads</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">        <tt class="py-name">max_threads</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-176" class="py-name" targets="Class web2py.gluon.rocket.Rocket=web2py.gluon.rocket.Rocket-class.html"><a title="web2py.gluon.rocket.Rocket" class="py-name" href="#" onclick="return doclink('link-176', 'Rocket', 'link-176');">Rocket</a></tt><tt class="py-op">(</tt><tt class="py-name">bind_addr</tt><tt class="py-op">,</tt> <tt class="py-string">'wsgi'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'wsgi_app'</tt><tt class="py-op">:</tt> <tt class="py-name">wsgi_app</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">                  <tt class="py-name">min_threads</tt> <tt class="py-op">=</tt> <tt class="py-name">numthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">                  <tt class="py-name">max_threads</tt> <tt class="py-op">=</tt> <tt class="py-name">max_threads</tt><tt class="py-op">,</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">                  <tt class="py-name">queue_size</tt> <tt class="py-op">=</tt> <tt class="py-name">request_queue_size</tt><tt class="py-op">,</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">                  <tt class="py-name">timeout</tt> <tt class="py-op">=</tt> <tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
</div><a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line"> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\main.py</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\monitor.py</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt id="link-177" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-177', 'time', 'link-28');">time</a></tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-178" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.select()=web2py.gluon.dal.BaseAdapter-class.html#select,Method web2py.gluon.dal.CouchDBAdapter.select()=web2py.gluon.dal.CouchDBAdapter-class.html#select,Method web2py.gluon.dal.GoogleDatastoreAdapter.select()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select,Method web2py.gluon.dal.MongoDBAdapter.select()=web2py.gluon.dal.MongoDBAdapter-class.html#select,Method web2py.gluon.dal.Set.select()=web2py.gluon.dal.Set-class.html#select,Method web2py.gluon.tools.Crud.select()=web2py.gluon.tools.Crud-class.html#select"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-178', 'select', 'link-178');">select</a></tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">threading</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Thread</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line"> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line"><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="Monitor"></a><div id="Monitor-def"><a name="L482"></a><tt class="py-lineno"> 482</tt> <a class="py-toggle" href="#" id="Monitor-toggle" onclick="return toggle('Monitor');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.Monitor-class.html">Monitor</a><tt class="py-op">(</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Monitor-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Monitor-expanded"><a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line">    <tt class="py-comment"># Monitor worker class.</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="Monitor.__init__"></a><div id="Monitor.__init__-def"><a name="L485"></a><tt class="py-lineno"> 485</tt> <a class="py-toggle" href="#" id="Monitor.__init__-toggle" onclick="return toggle('Monitor.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Monitor-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">                 <tt class="py-param">monitor_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">                 <tt class="py-param">active_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line">                 <tt class="py-param">timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line">                 <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">                 <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Monitor.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Monitor.__init__-expanded"><a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line">        <tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-179', '__init__', 'link-81');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line"> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line">        <tt class="py-comment"># Instance Variables</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">monitor_queue</tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">active_queue</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt> <tt class="py-op">=</tt> <tt class="py-name">timeout</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line"> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line"> </tt>
<a name="Monitor.run"></a><div id="Monitor.run-def"><a name="L502"></a><tt class="py-lineno"> 502</tt> <a class="py-toggle" href="#" id="Monitor.run-toggle" onclick="return toggle('Monitor.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Monitor-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Monitor.run-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Monitor.run-expanded"><a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-180', 'name', 'link-180');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">getName</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-181', 'log', 'link-125');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'Rocket.Monitor'</tt><tt class="py-op">)</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-182', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-183" class="py-name"><a title="web2py.gluon.rocket.NullHandler" class="py-name" href="#" onclick="return doclink('link-183', 'NullHandler', 'link-86');">NullHandler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">        <tt class="py-name">conn_list</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line">        <tt class="py-name">list_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line"> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-184', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-185', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Entering monitor loop.'</tt><tt class="py-op">)</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line"> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">        <tt class="py-comment"># Enter thread main loop</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">while</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active</tt><tt class="py-op">:</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">            <tt class="py-comment"># Move the queued connections to the selection pool</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">.</tt><tt class="py-name">empty</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-186', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-187', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-188" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-188', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'In "receive timed-out connections" loop.'</tt><tt class="py-op">)</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line"> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">                <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-189', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line"> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">c</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line">                    <tt class="py-comment"># A non-client is a signal to die</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-190', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-191', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Received a death threat.'</tt><tt class="py-op">)</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line"> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-192', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-193', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Received a timed out connection.'</tt><tt class="py-op">)</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line">                    <tt class="py-keyword">assert</tt><tt class="py-op">(</tt><tt class="py-name">c</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">)</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-194" class="py-name"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-194', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt><tt class="py-op">:</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line">                    <tt class="py-comment"># Jython requires a socket to be in Non-blocking mode in</tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># order to select on it.</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.rocket.Connection.setblocking" class="py-name" href="#" onclick="return doclink('link-195', 'setblocking', 'link-64');">setblocking</a></tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-196', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-197" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-197', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Adding connection to monitor list.'</tt><tt class="py-op">)</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">                <tt class="py-name">list_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line">            <tt class="py-comment"># Wait on those connections</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-198" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-198', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-199" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-199', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Blocking on connections'</tt><tt class="py-op">)</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">list_changed</tt><tt class="py-op">:</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line">                <tt class="py-name">conn_list</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">)</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line">                <tt class="py-name">list_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line">                <tt class="py-name">readable</tt> <tt class="py-op">=</tt> <tt id="link-200" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-200', 'select', 'link-178');">select</a></tt><tt class="py-op">.</tt><tt id="link-201" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-201', 'select', 'link-178');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">conn_list</tt><tt class="py-op">,</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">                                         <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">                                         <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">                                         <tt id="link-202" class="py-name"><a title="web2py.gluon.rocket.THREAD_STOP_CHECK_INTERVAL" class="py-name" href="#" onclick="return doclink('link-202', 'THREAD_STOP_CHECK_INTERVAL', 'link-11');">THREAD_STOP_CHECK_INTERVAL</a></tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active</tt><tt class="py-op">:</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line"> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">            <tt class="py-comment"># If we have any readable connections, put them back</tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">readable</tt><tt class="py-op">:</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-203" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-203', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-204" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-204', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Restoring readable connection'</tt><tt class="py-op">)</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line"> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-205" class="py-name"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-205', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt><tt class="py-op">:</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">                    <tt class="py-comment"># Jython requires a socket to be in Non-blocking mode in</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># order to select on it, but the rest of the code requires</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># that it be in blocking mode.</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-206" class="py-name"><a title="web2py.gluon.rocket.Connection.setblocking" class="py-name" href="#" onclick="return doclink('link-206', 'setblocking', 'link-64');">setblocking</a></tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line"> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">                <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name"><a title="web2py.gluon.rocket.Connection.start_time" class="py-name" href="#" onclick="return doclink('link-207', 'start_time', 'link-37');">start_time</a></tt> <tt class="py-op">=</tt> <tt id="link-208" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-208', 'time', 'link-28');">time</a></tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-209', 'time', 'link-28');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line"> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">                <tt class="py-name">list_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line"> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">            <tt class="py-comment"># If we have any stale connections, kill them off.</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">:</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">                <tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt id="link-210" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-210', 'time', 'link-28');">time</a></tt><tt class="py-op">.</tt><tt id="link-211" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-211', 'time', 'link-28');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">                <tt class="py-name">stale</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">:</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">now</tt> <tt class="py-op">-</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="web2py.gluon.rocket.Connection.start_time" class="py-name" href="#" onclick="return doclink('link-212', 'start_time', 'link-37');">start_time</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">:</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">                        <tt class="py-name">stale</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line"> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">stale</tt><tt class="py-op">:</tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">                        <tt class="py-comment"># "EXPR and A or B" kept for Py2.4 compatibility</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-213" class="py-name"><a title="web2py.gluon.rocket.Connection.client_addr" class="py-name" href="#" onclick="return doclink('link-213', 'client_addr', 'link-33');">client_addr</a></tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-214" class="py-name"><a title="web2py.gluon.rocket.Connection.server_port" class="py-name" href="#" onclick="return doclink('link-214', 'server_port', 'link-35');">server_port</a></tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-215" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-215', 'ssl', 'link-30');">ssl</a></tt> <tt class="py-keyword">and</tt> <tt class="py-string">'*'</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-216" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-216', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-217" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-217', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Flushing stale connection: %s:%i%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line"> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line">                    <tt class="py-name">list_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line"> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">                    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">                        <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-218', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">                    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">                        <tt class="py-keyword">del</tt> <tt class="py-name">c</tt> </tt>
</div><a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line"> </tt>
<a name="Monitor.stop"></a><div id="Monitor.stop-def"><a name="L601"></a><tt class="py-lineno"> 601</tt> <a class="py-toggle" href="#" id="Monitor.stop-toggle" onclick="return toggle('Monitor.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Monitor-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Monitor.stop-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Monitor.stop-expanded"><a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line"> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-219" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-219', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-220" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-220', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Flushing waiting connections'</tt><tt class="py-op">)</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line"> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connections</tt><tt class="py-op">:</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-221" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-221', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">                <tt class="py-keyword">del</tt> <tt class="py-name">c</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line"> </tt>
<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-222" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-222', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-223" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-223', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Flushing queued connections'</tt><tt class="py-op">)</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line"> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">.</tt><tt class="py-name">empty</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line">            <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">.</tt><tt id="link-224" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-224', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line"> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">c</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line"> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-225" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-225', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line">                <tt class="py-keyword">del</tt> <tt class="py-name">c</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line"> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line">        <tt class="py-comment"># Place a None sentry value to cause the monitor to die.</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\monitor.py</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\threadpool.py</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line"><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line"><tt class="py-comment"># Setup Logging</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-226" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-226', 'log', 'link-125');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'Rocket.Errors.ThreadPool'</tt><tt class="py-op">)</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line"><tt id="link-227" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-227', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-228" class="py-name"><a title="web2py.gluon.rocket.NullHandler" class="py-name" href="#" onclick="return doclink('link-228', 'NullHandler', 'link-86');">NullHandler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool"></a><div id="ThreadPool-def"><a name="L642"></a><tt class="py-lineno"> 642</tt> <a class="py-toggle" href="#" id="ThreadPool-toggle" onclick="return toggle('ThreadPool');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html">ThreadPool</a><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ThreadPool-expanded"><a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">    <tt class="py-docstring">"""The ThreadPool class is a container class for all the worker threads. It</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line"><tt class="py-docstring">    manages the number of actively running threads."""</tt> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.__init__"></a><div id="ThreadPool.__init__-def"><a name="L646"></a><tt class="py-lineno"> 646</tt> <a class="py-toggle" href="#" id="ThreadPool.__init__-toggle" onclick="return toggle('ThreadPool.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">                 <tt class="py-param">method</tt><tt class="py-op">,</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">                 <tt class="py-param">app_info</tt><tt class="py-op">,</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">                 <tt class="py-param">active_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">                 <tt class="py-param">monitor_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line">                 <tt class="py-param">min_threads</tt><tt class="py-op">=</tt><tt id="link-229" class="py-name"><a title="web2py.gluon.rocket.DEFAULTS" class="py-name" href="#" onclick="return doclink('link-229', 'DEFAULTS', 'link-17');">DEFAULTS</a></tt><tt class="py-op">[</tt><tt class="py-string">'MIN_THREADS'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">                 <tt class="py-param">max_threads</tt><tt class="py-op">=</tt><tt id="link-230" class="py-name"><a title="web2py.gluon.rocket.DEFAULTS" class="py-name" href="#" onclick="return doclink('link-230', 'DEFAULTS', 'link-17');">DEFAULTS</a></tt><tt class="py-op">[</tt><tt class="py-string">'MAX_THREADS'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">                 <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.__init__-expanded"><a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line"> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">            <tt id="link-231" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-231', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-232" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-232', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Initializing ThreadPool."</tt><tt class="py-op">)</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line"> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">check_for_dead_threads</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">active_queue</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line"> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">worker_class</tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_threads</tt> <tt class="py-op">=</tt> <tt class="py-name">min_threads</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threads</tt> <tt class="py-op">=</tt> <tt class="py-name">max_threads</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">monitor_queue</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_server</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line"> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">        <tt class="py-comment"># TODO - Optimize this based on some real-world usage data</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grow_threshold</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">max_threads</tt><tt class="py-op">/</tt><tt class="py-number">10</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-number">2</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line"> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">app_info</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">            <tt class="py-name">app_info</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line"> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">        <tt class="py-name">app_info</tt><tt class="py-op">.</tt><tt id="link-233" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-233', 'update', 'link-233');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">max_threads</tt><tt class="py-op">=</tt><tt class="py-name">max_threads</tt><tt class="py-op">,</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">                        <tt class="py-name">min_threads</tt><tt class="py-op">=</tt><tt class="py-name">min_threads</tt><tt class="py-op">)</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line"> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt> <tt class="py-op">=</tt> <tt class="py-name">app_info</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line"> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-234" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-234', 'x', 'link-234');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">min_threads</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line">            <tt class="py-name">worker</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">worker_class</tt><tt class="py-op">(</tt><tt class="py-name">app_info</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">)</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">worker</tt><tt class="py-op">)</tt> </tt>
</div><a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.start"></a><div id="ThreadPool.start-def"><a name="L685"></a><tt class="py-lineno"> 685</tt> <a class="py-toggle" href="#" id="ThreadPool.start-toggle" onclick="return toggle('ThreadPool.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.start-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.start-expanded"><a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_server</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line">            <tt id="link-235" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-235', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-236" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-236', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Starting threads."</tt><tt class="py-op">)</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line"> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-237" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-237', 'thread', 'link-237');">thread</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">:</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line">            <tt id="link-238" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-238', 'thread', 'link-237');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">setDaemon</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line">            <tt id="link-239" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-239', 'thread', 'link-237');">thread</a></tt><tt class="py-op">.</tt><tt id="link-240" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-240', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.stop"></a><div id="ThreadPool.stop-def"><a name="L694"></a><tt class="py-lineno"> 694</tt> <a class="py-toggle" href="#" id="ThreadPool.stop-toggle" onclick="return toggle('ThreadPool.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.stop-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.stop-expanded"><a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">            <tt id="link-241" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-241', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-242" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-242', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Stopping threads."</tt><tt class="py-op">)</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line"> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_server</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line"> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">        <tt class="py-comment"># Prompt the threads to die</tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">:</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line"> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line">        <tt class="py-comment"># Give them the gun</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">:</tt> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line">            <tt class="py-name">t</tt><tt class="py-op">.</tt><tt id="link-243" class="py-name" targets="Method web2py.gluon.rocket.Worker.kill()=web2py.gluon.rocket.Worker-class.html#kill"><a title="web2py.gluon.rocket.Worker.kill" class="py-name" href="#" onclick="return doclink('link-243', 'kill', 'link-243');">kill</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line"> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">        <tt class="py-comment"># Wait until they pull the trigger</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">:</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line">            <tt class="py-name">t</tt><tt class="py-op">.</tt><tt id="link-244" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-244', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line"> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line">        <tt class="py-comment"># Clean up the mess</tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-245" class="py-name" targets="Method web2py.gluon.rocket.ThreadPool.bring_out_your_dead()=web2py.gluon.rocket.ThreadPool-class.html#bring_out_your_dead"><a title="web2py.gluon.rocket.ThreadPool.bring_out_your_dead" class="py-name" href="#" onclick="return doclink('link-245', 'bring_out_your_dead', 'link-245');">bring_out_your_dead</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.bring_out_your_dead"></a><div id="ThreadPool.bring_out_your_dead-def"><a name="L715"></a><tt class="py-lineno"> 715</tt> <a class="py-toggle" href="#" id="ThreadPool.bring_out_your_dead-toggle" onclick="return toggle('ThreadPool.bring_out_your_dead');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#bring_out_your_dead">bring_out_your_dead</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.bring_out_your_dead-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.bring_out_your_dead-expanded"><a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line">        <tt class="py-comment"># Remove dead threads from the pool</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">        <tt class="py-name">dead_threads</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">t</tt> <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">isAlive</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dead_threads</tt><tt class="py-op">:</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">                <tt id="link-246" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-246', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-247" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-247', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Removing dead thread: %s."</tt> <tt class="py-op">%</tt> <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">getName</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">                <tt class="py-comment"># Py2.4 complains here so we put it in a try block</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">)</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">check_for_dead_threads</tt> <tt class="py-op">-=</tt> <tt id="link-248" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-248', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">dead_threads</tt><tt class="py-op">)</tt> </tt>
</div><a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.grow"></a><div id="ThreadPool.grow-def"><a name="L729"></a><tt class="py-lineno"> 729</tt> <a class="py-toggle" href="#" id="ThreadPool.grow-toggle" onclick="return toggle('ThreadPool.grow');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#grow">grow</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">amount</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.grow-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.grow-expanded"><a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_server</tt><tt class="py-op">:</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line"> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">amount</tt><tt class="py-op">:</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">            <tt class="py-name">amount</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threads</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line"> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">        <tt class="py-name">amount</tt> <tt class="py-op">=</tt> <tt id="link-249" class="py-name" targets="Variable datetime.date.min=datetime.date-class.html#min,Variable datetime.datetime.min=datetime.datetime-class.html#min,Variable datetime.time.min=datetime.time-class.html#min,Method web2py.gluon.dal.Expression.min()=web2py.gluon.dal.Expression-class.html#min"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-249', 'min', 'link-249');">min</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">amount</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threads</tt> <tt class="py-op">-</tt> <tt id="link-250" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-250', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line"> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line">            <tt id="link-251" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-251', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-252" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-252', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Growing by %i."</tt> <tt class="py-op">%</tt> <tt class="py-name">amount</tt><tt class="py-op">)</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line"> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-253" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-253', 'x', 'link-234');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">amount</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">            <tt class="py-name">worker</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">worker_class</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt><tt class="py-op">,</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">)</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line"> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">            <tt class="py-name">worker</tt><tt class="py-op">.</tt><tt class="py-name">setDaemon</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">worker</tt><tt class="py-op">)</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line">            <tt class="py-name">worker</tt><tt class="py-op">.</tt><tt id="link-254" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-254', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.shrink"></a><div id="ThreadPool.shrink-def"><a name="L750"></a><tt class="py-lineno"> 750</tt> <a class="py-toggle" href="#" id="ThreadPool.shrink-toggle" onclick="return toggle('ThreadPool.shrink');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#shrink">shrink</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">amount</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.shrink-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.shrink-expanded"><a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">            <tt id="link-255" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-255', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-256" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-256', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Shrinking by %i."</tt> <tt class="py-op">%</tt> <tt class="py-name">amount</tt><tt class="py-op">)</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line"> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">check_for_dead_threads</tt> <tt class="py-op">+=</tt> <tt class="py-name">amount</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line"> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-257" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-257', 'x', 'link-234');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">amount</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line"> </tt>
<a name="ThreadPool.dynamic_resize"></a><div id="ThreadPool.dynamic_resize-def"><a name="L759"></a><tt class="py-lineno"> 759</tt> <a class="py-toggle" href="#" id="ThreadPool.dynamic_resize-toggle" onclick="return toggle('ThreadPool.dynamic_resize');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ThreadPool-class.html#dynamic_resize">dynamic_resize</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ThreadPool.dynamic_resize-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ThreadPool.dynamic_resize-expanded"><a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threads</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_threads</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threads</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">check_for_dead_threads</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-258" class="py-name"><a title="web2py.gluon.rocket.ThreadPool.bring_out_your_dead" class="py-name" href="#" onclick="return doclink('link-258', 'bring_out_your_dead', 'link-245');">bring_out_your_dead</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line"> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">            <tt class="py-name">queueSize</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">.</tt><tt class="py-name">qsize</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line">            <tt class="py-name">threadCount</tt> <tt class="py-op">=</tt> <tt id="link-259" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-259', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threads</tt><tt class="py-op">)</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line"> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">                <tt id="link-260" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-260', 'log', 'link-125');">log</a></tt><tt class="py-op">.</tt><tt id="link-261" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-261', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Examining ThreadPool. %i threads and %i Q'd conxions"</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">                          <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">threadCount</tt><tt class="py-op">,</tt> <tt class="py-name">queueSize</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line"> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">queueSize</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> <tt class="py-keyword">and</tt> <tt class="py-name">threadCount</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_threads</tt><tt class="py-op">:</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-262" class="py-name" targets="Method web2py.gluon.rocket.ThreadPool.shrink()=web2py.gluon.rocket.ThreadPool-class.html#shrink"><a title="web2py.gluon.rocket.ThreadPool.shrink" class="py-name" href="#" onclick="return doclink('link-262', 'shrink', 'link-262');">shrink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line"> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">queueSize</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grow_threshold</tt><tt class="py-op">:</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line"> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-263" class="py-name" targets="Method web2py.gluon.rocket.ThreadPool.grow()=web2py.gluon.rocket.ThreadPool-class.html#grow"><a title="web2py.gluon.rocket.ThreadPool.grow" class="py-name" href="#" onclick="return doclink('link-263', 'grow', 'link-263');">grow</a></tt><tt class="py-op">(</tt><tt class="py-name">queueSize</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line"> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\threadpool.py</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\worker.py</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-264" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-264', 'socket', 'link-0');">socket</a></tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line"><tt class="py-comment">#from wsgiref.headers import Headers</tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">from</tt> <tt class="py-name">threading</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Thread</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-265" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-265', 'datetime', 'link-265');">datetime</a></tt> <tt class="py-keyword">import</tt> <tt id="link-266" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-266', 'datetime', 'link-265');">datetime</a></tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line"> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">urllib</tt> <tt class="py-keyword">import</tt> <tt class="py-name">unquote</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt id="link-267" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.parse()=web2py.gluon.dal.BaseAdapter-class.html#parse,Method web2py.gluon.template.TemplateParser.parse()=web2py.gluon.template.TemplateParser-class.html#parse"><a title="web2py.gluon.dal.BaseAdapter.parse
web2py.gluon.template.TemplateParser.parse" class="py-name" href="#" onclick="return doclink('link-267', 'parse', 'link-267');">parse</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">unquote</tt> </tt>
<a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line"> </tt>
<a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">io</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">cStringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">StringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line"> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-268" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-268', 'ssl', 'link-30');">ssl</a></tt> <tt class="py-keyword">import</tt> <tt id="link-269" class="py-name"><a title="web2py.gluon.rocket.SSLError" class="py-name" href="#" onclick="return doclink('link-269', 'SSLError', 'link-78');">SSLError</a></tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="SSLError"></a><div id="SSLError-def"><a name="L807"></a><tt class="py-lineno"> 807</tt> <a class="py-toggle" href="#" id="SSLError-toggle" onclick="return toggle('SSLError');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.SSLError-class.html">SSLError</a><tt class="py-op">(</tt><tt class="py-base-class">socket</tt><tt class="py-op">.</tt><tt class="py-base-class">error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SSLError-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SSLError-expanded"><a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line"><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line"> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line"><tt class="py-comment"># Define Constants</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-270" class="py-name" targets="Variable web2py.gluon.rocket.re_SLASH=web2py.gluon.rocket-module.html#re_SLASH"><a title="web2py.gluon.rocket.re_SLASH" class="py-name" href="#" onclick="return doclink('link-270', 're_SLASH', 'link-270');">re_SLASH</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'%2F'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">IGNORECASE</tt><tt class="py-op">)</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line"><tt id="link-271" class="py-name" targets="Variable web2py.gluon.rocket.re_REQUEST_LINE=web2py.gluon.rocket-module.html#re_REQUEST_LINE"><a title="web2py.gluon.rocket.re_REQUEST_LINE" class="py-name" href="#" onclick="return doclink('link-271', 're_REQUEST_LINE', 'link-271');">re_REQUEST_LINE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r"""^</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line"><tt class="py-string">(?P&lt;method&gt;OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT)   # Request Method</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line"><tt class="py-string">\                                                            # (single space)</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line"><tt class="py-string">(</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line"><tt class="py-string">    (?P&lt;scheme&gt;[^:/]+)                                       # Scheme</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line"><tt class="py-string">    (://)  #</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line"><tt class="py-string">    (?P&lt;host&gt;[^/]+)                                          # Host</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line"><tt class="py-string">)? #</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line"><tt class="py-string">(?P&lt;path&gt;(\*|/[^ \?]*))                                      # Path</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line"><tt class="py-string">(\? (?P&lt;query_string&gt;[^ ]+))?                                # Query String</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line"><tt class="py-string">\                                                            # (single space)</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line"><tt class="py-string">(?P&lt;protocol&gt;HTTPS?/1\.[01])                                 # Protocol</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line"><tt class="py-string">$</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line"><tt class="py-string">"""</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">X</tt><tt class="py-op">)</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line"><tt id="link-272" class="py-name" targets="Variable web2py.gluon.rocket.LOG_LINE=web2py.gluon.rocket-module.html#LOG_LINE"><a title="web2py.gluon.rocket.LOG_LINE" class="py-name" href="#" onclick="return doclink('link-272', 'LOG_LINE', 'link-272');">LOG_LINE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%(client_ip)s - "%(request_line)s" - %(status)s %(size)s'</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line"><tt id="link-273" class="py-name" targets="Variable web2py.gluon.rocket.RESPONSE=web2py.gluon.rocket-module.html#RESPONSE"><a title="web2py.gluon.rocket.RESPONSE" class="py-name" href="#" onclick="return doclink('link-273', 'RESPONSE', 'link-273');">RESPONSE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'''\</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line"><tt class="py-string">HTTP/1.1 %s</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line"><tt class="py-string">Content-Length: %i</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line"><tt class="py-string">Content-Type: %s</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line"><tt class="py-string">%s</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line"><tt class="py-string">'''</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-274" class="py-name"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-274', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt><tt class="py-op">:</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line">    <tt id="link-275" class="py-name" targets="Variable web2py.gluon.rocket.HTTP_METHODS=web2py.gluon.rocket-module.html#HTTP_METHODS"><a title="web2py.gluon.rocket.HTTP_METHODS" class="py-name" href="#" onclick="return doclink('link-275', 'HTTP_METHODS', 'link-275');">HTTP_METHODS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'OPTIONS'</tt><tt class="py-op">,</tt> <tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-string">'HEAD'</tt><tt class="py-op">,</tt> <tt class="py-string">'POST'</tt><tt class="py-op">,</tt> <tt class="py-string">'PUT'</tt><tt class="py-op">,</tt> <tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> <tt class="py-string">'TRACE'</tt><tt class="py-op">,</tt> <tt class="py-string">'CONNECT'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line"> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line"><tt class="py-comment">###</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># The Headers and FileWrapper classes are ripped straight from the Python</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Standard Library. I've removed some docstrings and integrated my BUF_SIZE.</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># See the Python License here: http://docs.python.org/license.html</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">###</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line"><tt class="py-comment"># Regular expression that matches `special' characters in parameters, the</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># existance of which force quoting of the parameter value.</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line"><tt id="link-276" class="py-name" targets="Variable web2py.gluon.rocket._tspecials=web2py.gluon.rocket-module.html#_tspecials"><a title="web2py.gluon.rocket._tspecials" class="py-name" href="#" onclick="return doclink('link-276', '_tspecials', 'link-276');">_tspecials</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[ \(\)&lt;&gt;@,;:\\"/\[\]\?=]'</tt><tt class="py-op">)</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line"> </tt>
<a name="_formatparam"></a><div id="_formatparam-def"><a name="L851"></a><tt class="py-lineno"> 851</tt> <a class="py-toggle" href="#" id="_formatparam-toggle" onclick="return toggle('_formatparam');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#_formatparam">_formatparam</a><tt class="py-op">(</tt><tt class="py-param">param</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">quote</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_formatparam-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_formatparam-expanded"><a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">    <tt class="py-docstring">"""Convenience function to format and return a key=value pair.</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line"><tt class="py-docstring">    This will quote the value if needed or if quote is true.</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt id="link-277" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-277', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">quote</tt> <tt class="py-keyword">or</tt> <tt id="link-278" class="py-name"><a title="web2py.gluon.rocket._tspecials" class="py-name" href="#" onclick="return doclink('link-278', '_tspecials', 'link-276');">_tspecials</a></tt><tt class="py-op">.</tt><tt id="link-279" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-279', 'search', 'link-279');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\\\'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\"'</tt><tt class="py-op">)</tt> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">'%s="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">param</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">'%s=%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">param</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">param</tt> </tt>
</div><a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line"> </tt>
<a name="Headers"></a><div id="Headers-def"><a name="L865"></a><tt class="py-lineno"> 865</tt> <a class="py-toggle" href="#" id="Headers-toggle" onclick="return toggle('Headers');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html">Headers</a><tt class="py-op">:</tt> </tt>
</div><div id="Headers-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Headers-expanded"><a name="Headers.__init__"></a><div id="Headers.__init__-def"><a name="L866"></a><tt class="py-lineno"> 866</tt> <a class="py-toggle" href="#" id="Headers.__init__-toggle" onclick="return toggle('Headers.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">headers</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__init__-expanded"><a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Headers must be a list of name/value tuples"</tt><tt class="py-op">)</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt> <tt class="py-op">=</tt> <tt class="py-name">headers</tt> </tt>
</div><a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line"> </tt>
<a name="Headers.__len__"></a><div id="Headers.__len__-def"><a name="L871"></a><tt class="py-lineno"> 871</tt> <a class="py-toggle" href="#" id="Headers.__len__-toggle" onclick="return toggle('Headers.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__len__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__len__-expanded"><a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-280" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-280', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">)</tt> </tt>
</div><a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"> </tt>
<a name="Headers.__setitem__"></a><div id="Headers.__setitem__-def"><a name="L874"></a><tt class="py-lineno"> 874</tt> <a class="py-toggle" href="#" id="Headers.__setitem__-toggle" onclick="return toggle('Headers.__setitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__setitem__">__setitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__setitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__setitem__-expanded"><a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line">        <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt id="link-281" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-281', 'name', 'link-180');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">.</tt><tt id="link-282" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-282', 'append', 'link-282');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-283" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-283', 'name', 'link-180');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line"> </tt>
<a name="Headers.__delitem__"></a><div id="Headers.__delitem__-def"><a name="L878"></a><tt class="py-lineno"> 878</tt> <a class="py-toggle" href="#" id="Headers.__delitem__-toggle" onclick="return toggle('Headers.__delitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__delitem__">__delitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__delitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__delitem__-expanded"><a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line">        <tt id="link-284" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-284', 'name', 'link-180');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-285" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-285', 'name', 'link-180');">name</a></tt><tt class="py-op">.</tt><tt id="link-286" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-286', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">kv</tt> <tt class="py-keyword">for</tt> <tt class="py-name">kv</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt> <tt class="py-keyword">if</tt> <tt class="py-name">kv</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-287" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-287', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt id="link-288" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-288', 'name', 'link-180');">name</a></tt><tt class="py-op">]</tt> </tt>
</div><a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line"> </tt>
<a name="Headers.__getitem__"></a><div id="Headers.__getitem__-def"><a name="L882"></a><tt class="py-lineno"> 882</tt> <a class="py-toggle" href="#" id="Headers.__getitem__-toggle" onclick="return toggle('Headers.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__getitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__getitem__-expanded"><a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-289" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-289', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt id="link-290" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-290', 'name', 'link-180');">name</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line"> </tt>
<a name="Headers.has_key"></a><div id="Headers.has_key-def"><a name="L885"></a><tt class="py-lineno"> 885</tt> <a class="py-toggle" href="#" id="Headers.has_key-toggle" onclick="return toggle('Headers.has_key');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#has_key">has_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.has_key-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.has_key-expanded"><a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-291" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-291', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt id="link-292" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-292', 'name', 'link-180');">name</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line"> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">    <tt id="link-293" class="py-name" targets="Method web2py.gluon.dal.DAL.__contains__()=web2py.gluon.dal.DAL-class.html#__contains__,Method web2py.gluon.tools.PluginManager.__contains__()=web2py.gluon.tools.PluginManager-class.html#__contains__"><a title="web2py.gluon.dal.DAL.__contains__
web2py.gluon.tools.PluginManager.__contains__" class="py-name" href="#" onclick="return doclink('link-293', '__contains__', 'link-293');">__contains__</a></tt> <tt class="py-op">=</tt> <tt id="link-294" class="py-name" targets="Method web2py.gluon.rocket.Headers.has_key()=web2py.gluon.rocket.Headers-class.html#has_key"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-294', 'has_key', 'link-294');">has_key</a></tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line"> </tt>
<a name="Headers.get_all"></a><div id="Headers.get_all-def"><a name="L890"></a><tt class="py-lineno"> 890</tt> <a class="py-toggle" href="#" id="Headers.get_all-toggle" onclick="return toggle('Headers.get_all');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#get_all">get_all</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.get_all-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.get_all-expanded"><a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">        <tt id="link-295" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-295', 'name', 'link-180');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-296" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-296', 'name', 'link-180');">name</a></tt><tt class="py-op">.</tt><tt id="link-297" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-297', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">kv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">kv</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt> <tt class="py-keyword">if</tt> <tt class="py-name">kv</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-298" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-298', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt id="link-299" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-299', 'name', 'link-180');">name</a></tt><tt class="py-op">]</tt> </tt>
</div><a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line"> </tt>
<a name="Headers.get"></a><div id="Headers.get-def"><a name="L894"></a><tt class="py-lineno"> 894</tt> <a class="py-toggle" href="#" id="Headers.get-toggle" onclick="return toggle('Headers.get');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#get">get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">,</tt><tt class="py-param">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.get-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.get-expanded"><a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line">        <tt id="link-300" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-300', 'name', 'link-180');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-301" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-301', 'name', 'link-180');">name</a></tt><tt class="py-op">.</tt><tt id="link-302" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-302', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-303" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-303', 'k', 'link-303');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">:</tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-304" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-304', 'k', 'link-303');">k</a></tt><tt class="py-op">.</tt><tt id="link-305" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-305', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt id="link-306" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-306', 'name', 'link-180');">name</a></tt><tt class="py-op">:</tt> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">v</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">default</tt> </tt>
</div><a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line"> </tt>
<a name="Headers.keys"></a><div id="Headers.keys-def"><a name="L901"></a><tt class="py-lineno"> 901</tt> <a class="py-toggle" href="#" id="Headers.keys-toggle" onclick="return toggle('Headers.keys');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#keys">keys</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.keys-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.keys-expanded"><a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt id="link-307" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-307', 'k', 'link-303');">k</a></tt> <tt class="py-keyword">for</tt> <tt id="link-308" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-308', 'k', 'link-303');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">]</tt> </tt>
</div><a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line"> </tt>
<a name="Headers.values"></a><div id="Headers.values-def"><a name="L904"></a><tt class="py-lineno"> 904</tt> <a class="py-toggle" href="#" id="Headers.values-toggle" onclick="return toggle('Headers.values');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#values">values</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.values-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.values-expanded"><a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">v</tt> <tt class="py-keyword">for</tt> <tt id="link-309" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-309', 'k', 'link-303');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">]</tt> </tt>
</div><a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line"> </tt>
<a name="Headers.items"></a><div id="Headers.items-def"><a name="L907"></a><tt class="py-lineno"> 907</tt> <a class="py-toggle" href="#" id="Headers.items-toggle" onclick="return toggle('Headers.items');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#items">items</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.items-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.items-expanded"><a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
</div><a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line"> </tt>
<a name="Headers.__repr__"></a><div id="Headers.__repr__-def"><a name="L910"></a><tt class="py-lineno"> 910</tt> <a class="py-toggle" href="#" id="Headers.__repr__-toggle" onclick="return toggle('Headers.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__repr__-expanded"><a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"Headers(%r)"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt> </tt>
</div><a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line"> </tt>
<a name="Headers.__str__"></a><div id="Headers.__str__-def"><a name="L913"></a><tt class="py-lineno"> 913</tt> <a class="py-toggle" href="#" id="Headers.__str__-toggle" onclick="return toggle('Headers.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.__str__-expanded"><a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'\r\n'</tt><tt class="py-op">.</tt><tt id="link-310" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-310', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"%s: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">kv</tt> <tt class="py-keyword">for</tt> <tt class="py-name">kv</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">]</tt><tt class="py-op">+</tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line"> </tt>
<a name="Headers.setdefault"></a><div id="Headers.setdefault-def"><a name="L916"></a><tt class="py-lineno"> 916</tt> <a class="py-toggle" href="#" id="Headers.setdefault-toggle" onclick="return toggle('Headers.setdefault');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#setdefault">setdefault</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.setdefault-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.setdefault-expanded"><a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-311" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-311', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt id="link-312" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-312', 'name', 'link-180');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">.</tt><tt id="link-313" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-313', 'append', 'link-282');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-314" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-314', 'name', 'link-180');">name</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
</div><a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line"> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line"> </tt>
<a name="Headers.add_header"></a><div id="Headers.add_header-def"><a name="L925"></a><tt class="py-lineno"> 925</tt> <a class="py-toggle" href="#" id="Headers.add_header-toggle" onclick="return toggle('Headers.add_header');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Headers-class.html#add_header">add_header</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">_name</tt><tt class="py-op">,</tt> <tt class="py-param">_value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">_params</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Headers.add_header-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Headers.add_header-expanded"><a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">        <tt class="py-name">parts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">_value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">            <tt class="py-name">parts</tt><tt class="py-op">.</tt><tt id="link-315" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-315', 'append', 'link-282');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">_value</tt><tt class="py-op">)</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-316" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-316', 'k', 'link-303');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_params</tt><tt class="py-op">.</tt><tt id="link-317" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-317', 'items', 'link-317');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">v</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">                <tt class="py-name">parts</tt><tt class="py-op">.</tt><tt id="link-318" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-318', 'append', 'link-282');">append</a></tt><tt class="py-op">(</tt><tt id="link-319" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-319', 'k', 'link-303');">k</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line">                <tt class="py-name">parts</tt><tt class="py-op">.</tt><tt id="link-320" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-320', 'append', 'link-282');">append</a></tt><tt class="py-op">(</tt><tt id="link-321" class="py-name" targets="Function web2py.gluon.rocket._formatparam()=web2py.gluon.rocket-module.html#_formatparam"><a title="web2py.gluon.rocket._formatparam" class="py-name" href="#" onclick="return doclink('link-321', '_formatparam', 'link-321');">_formatparam</a></tt><tt class="py-op">(</tt><tt id="link-322" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-322', 'k', 'link-303');">k</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_headers</tt><tt class="py-op">.</tt><tt id="link-323" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-323', 'append', 'link-282');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-324" class="py-name" targets="Variable psycopg2.tz.FixedOffsetTimezone._name=psycopg2.tz.FixedOffsetTimezone-class.html#_name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-324', '_name', 'link-324');">_name</a></tt><tt class="py-op">,</tt> <tt class="py-string">"; "</tt><tt class="py-op">.</tt><tt id="link-325" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-325', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">parts</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line"> </tt>
<a name="FileWrapper"></a><div id="FileWrapper-def"><a name="L936"></a><tt class="py-lineno"> 936</tt> <a class="py-toggle" href="#" id="FileWrapper-toggle" onclick="return toggle('FileWrapper');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.FileWrapper-class.html">FileWrapper</a><tt class="py-op">:</tt> </tt>
</div><div id="FileWrapper-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="FileWrapper-expanded"><a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">    <tt class="py-docstring">"""Wrapper to convert file-like objects to iterables"""</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line"> </tt>
<a name="FileWrapper.__init__"></a><div id="FileWrapper.__init__-def"><a name="L939"></a><tt class="py-lineno"> 939</tt> <a class="py-toggle" href="#" id="FileWrapper.__init__-toggle" onclick="return toggle('FileWrapper.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.FileWrapper-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filelike</tt><tt class="py-op">,</tt> <tt class="py-param">blksize</tt><tt class="py-op">=</tt><tt id="link-326" class="py-name"><a title="web2py.gluon.rocket.BUF_SIZE" class="py-name" href="#" onclick="return doclink('link-326', 'BUF_SIZE', 'link-9');">BUF_SIZE</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FileWrapper.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FileWrapper.__init__-expanded"><a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filelike</tt> <tt class="py-op">=</tt> <tt class="py-name">filelike</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blksize</tt> <tt class="py-op">=</tt> <tt class="py-name">blksize</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">filelike</tt><tt class="py-op">,</tt><tt class="py-string">'close'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-327" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-327', 'close', 'link-69');">close</a></tt> <tt class="py-op">=</tt> <tt class="py-name">filelike</tt><tt class="py-op">.</tt><tt id="link-328" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-328', 'close', 'link-69');">close</a></tt> </tt>
</div><a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line"> </tt>
<a name="FileWrapper.__getitem__"></a><div id="FileWrapper.__getitem__-def"><a name="L945"></a><tt class="py-lineno"> 945</tt> <a class="py-toggle" href="#" id="FileWrapper.__getitem__-toggle" onclick="return toggle('FileWrapper.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.FileWrapper-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FileWrapper.__getitem__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FileWrapper.__getitem__-expanded"><a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filelike</tt><tt class="py-op">.</tt><tt id="link-329" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-329', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blksize</tt><tt class="py-op">)</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">data</tt><tt class="py-op">:</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">IndexError</tt> </tt>
</div><a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line"> </tt>
<a name="FileWrapper.__iter__"></a><div id="FileWrapper.__iter__-def"><a name="L951"></a><tt class="py-lineno"> 951</tt> <a class="py-toggle" href="#" id="FileWrapper.__iter__-toggle" onclick="return toggle('FileWrapper.__iter__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.FileWrapper-class.html#__iter__">__iter__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FileWrapper.__iter__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FileWrapper.__iter__-expanded"><a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line"> </tt>
<a name="FileWrapper.next"></a><div id="FileWrapper.next-def"><a name="L954"></a><tt class="py-lineno"> 954</tt> <a class="py-toggle" href="#" id="FileWrapper.next-toggle" onclick="return toggle('FileWrapper.next');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.FileWrapper-class.html#next">next</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FileWrapper.next-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FileWrapper.next-expanded"><a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filelike</tt><tt class="py-op">.</tt><tt id="link-330" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-330', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blksize</tt><tt class="py-op">)</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">data</tt><tt class="py-op">:</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">StopIteration</tt> </tt>
</div></div><a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"> </tt>
<a name="Worker"></a><div id="Worker-def"><a name="L960"></a><tt class="py-lineno"> 960</tt> <a class="py-toggle" href="#" id="Worker-toggle" onclick="return toggle('Worker');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html">Worker</a><tt class="py-op">(</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Worker-expanded"><a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line">    <tt class="py-docstring">"""The Worker class is a base class responsible for receiving connections</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line"><tt class="py-docstring">    and (a subclass) will run an application to process the the connection """</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line"> </tt>
<a name="Worker.__init__"></a><div id="Worker.__init__-def"><a name="L964"></a><tt class="py-lineno"> 964</tt> <a class="py-toggle" href="#" id="Worker.__init__-toggle" onclick="return toggle('Worker.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line">                 <tt class="py-param">app_info</tt><tt class="py-op">,</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">                 <tt class="py-param">active_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">                 <tt class="py-param">monitor_queue</tt><tt class="py-op">,</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">                 <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">                 <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.__init__-expanded"><a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line"> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">        <tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-331" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-331', '__init__', 'link-81');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line"> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line">        <tt class="py-comment"># Instance Variables</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt> <tt class="py-op">=</tt> <tt class="py-name">app_info</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">active_queue</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">monitor_queue</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line"> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-string">"200 OK"</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line"> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">        <tt class="py-comment"># Request Log</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">req_log</tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'Rocket.Requests'</tt><tt class="py-op">)</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">req_log</tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-332" class="py-name"><a title="web2py.gluon.rocket.NullHandler" class="py-name" href="#" onclick="return doclink('link-332', 'NullHandler', 'link-86');">NullHandler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line"> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line">        <tt class="py-comment"># Error Log</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'Rocket.Errors.'</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">getName</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-333" class="py-name"><a title="web2py.gluon.rocket.NullHandler" class="py-name" href="#" onclick="return doclink('link-333', 'NullHandler', 'link-86');">NullHandler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line"> </tt>
<a name="Worker._handleError"></a><div id="Worker._handleError-def"><a name="L990"></a><tt class="py-lineno"> 990</tt> <a class="py-toggle" href="#" id="Worker._handleError-toggle" onclick="return toggle('Worker._handleError');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#_handleError">_handleError</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">typ</tt><tt class="py-op">,</tt> <tt class="py-param">val</tt><tt class="py-op">,</tt> <tt class="py-param">tb</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker._handleError-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker._handleError-expanded"><a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt id="link-334" class="py-name"><a title="web2py.gluon.rocket.SSLError" class="py-name" href="#" onclick="return doclink('link-334', 'SSLError', 'link-78');">SSLError</a></tt><tt class="py-op">:</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'timed out'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line">                <tt class="py-name">typ</tt> <tt class="py-op">=</tt> <tt id="link-335" class="py-name" targets="Class web2py.gluon.rocket.SocketTimeout=web2py.gluon.rocket.SocketTimeout-class.html"><a title="web2py.gluon.rocket.SocketTimeout" class="py-name" href="#" onclick="return doclink('link-335', 'SocketTimeout', 'link-335');">SocketTimeout</a></tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt id="link-336" class="py-name"><a title="web2py.gluon.rocket.SocketTimeout" class="py-name" href="#" onclick="return doclink('link-336', 'SocketTimeout', 'link-335');">SocketTimeout</a></tt><tt class="py-op">:</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-337" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-337', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Socket timed out'</tt><tt class="py-op">)</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">monitor_queue</tt><tt class="py-op">.</tt><tt class="py-name">put</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">)</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt id="link-338" class="py-name" targets="Class web2py.gluon.rocket.SocketClosed=web2py.gluon.rocket.SocketClosed-class.html"><a title="web2py.gluon.rocket.SocketClosed" class="py-name" href="#" onclick="return doclink('link-338', 'SocketClosed', 'link-338');">SocketClosed</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-339" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-339', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Client closed socket'</tt><tt class="py-op">)</tt> </tt>
<a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt id="link-340" class="py-name" targets="Class web2py.gluon.rocket.BadRequest=web2py.gluon.rocket.BadRequest-class.html"><a title="web2py.gluon.rocket.BadRequest" class="py-name" href="#" onclick="return doclink('link-340', 'BadRequest', 'link-340');">BadRequest</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-341" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-341', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Client sent a bad request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt id="link-342" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-342', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-343" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-343', 'error', 'link-71');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt id="link-344" class="py-name"><a title="web2py.gluon.rocket.IGNORE_ERRORS_ON_CLOSE" class="py-name" href="#" onclick="return doclink('link-344', 'IGNORE_ERRORS_ON_CLOSE', 'link-13');">IGNORE_ERRORS_ON_CLOSE</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-345" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-345', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Ignorable socket Error received...'</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">                                       <tt class="py-string">'closing connection.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-string">"999 Utter Server Failure"</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">                <tt class="py-name">tb_fmt</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exception</tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">tb</tt><tt class="py-op">)</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-346" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-346', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Unhandled Error when serving '</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">                                   <tt class="py-string">'connection:\n'</tt> <tt class="py-op">+</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt id="link-347" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-347', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">tb_fmt</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line"> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">        <tt class="py-name">tb_fmt</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exception</tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">,</tt> <tt class="py-name">val</tt><tt class="py-op">,</tt> <tt class="py-name">tb</tt><tt class="py-op">)</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-348" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-348', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt id="link-349" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-349', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">tb_fmt</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-350" class="py-name" targets="Method web2py.gluon.rocket.Worker.send_response()=web2py.gluon.rocket.Worker-class.html#send_response"><a title="web2py.gluon.rocket.Worker.send_response" class="py-name" href="#" onclick="return doclink('link-350', 'send_response', 'link-350');">send_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'500 Server Error'</tt><tt class="py-op">)</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line"> </tt>
<a name="Worker.run"></a><div id="Worker.run-def"><a name="L1029"></a><tt class="py-lineno">1029</tt> <a class="py-toggle" href="#" id="Worker.run-toggle" onclick="return toggle('Worker.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.run-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.run-expanded"><a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-351" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-351', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Entering main loop.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line"> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">        <tt class="py-comment"># Enter thread main loop</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line">            <tt class="py-name">conn</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_queue</tt><tt class="py-op">.</tt><tt id="link-352" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-352', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line"> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">conn</tt><tt class="py-op">:</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">                <tt class="py-comment"># A non-client is a signal to die</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-353" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-353', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Received a death threat.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">conn</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line"> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">conn</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">                <tt class="py-name">conn</tt> <tt class="py-op">=</tt> <tt id="link-354" class="py-name" targets="Class web2py.gluon.rocket.Connection=web2py.gluon.rocket.Connection-class.html"><a title="web2py.gluon.rocket.Connection" class="py-name" href="#" onclick="return doclink('link-354', 'Connection', 'link-354');">Connection</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">conn</tt><tt class="py-op">)</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line"> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt> <tt class="py-op">=</tt> <tt class="py-name">conn</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line"> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-355" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-355', 'ssl', 'link-30');">ssl</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-356" class="py-name"><a title="web2py.gluon.globals.Session.secure
web2py.gluon.rocket.Connection.secure" class="py-name" href="#" onclick="return doclink('link-356', 'secure', 'link-44');">secure</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'Received HTTP connection on HTTPS port.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-357" class="py-name"><a title="web2py.gluon.rocket.Worker.send_response" class="py-name" href="#" onclick="return doclink('link-357', 'send_response', 'link-350');">send_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'400 Bad Request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line">                <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-358" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-358', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-359" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-359', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Received a connection.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line"> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">            <tt class="py-comment"># Enter connection serve loop</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-360" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-360', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Serving a request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-361" class="py-name" targets="Method web2py.gluon.rocket.WSGIWorker.run_app()=web2py.gluon.rocket.WSGIWorker-class.html#run_app,Method web2py.gluon.rocket.Worker.run_app()=web2py.gluon.rocket.Worker-class.html#run_app"><a title="web2py.gluon.rocket.WSGIWorker.run_app
web2py.gluon.rocket.Worker.run_app" class="py-name" href="#" onclick="return doclink('link-361', 'run_app', 'link-361');">run_app</a></tt><tt class="py-op">(</tt><tt class="py-name">conn</tt><tt class="py-op">)</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line">                    <tt class="py-name">log_info</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">client_ip</tt> <tt class="py-op">=</tt> <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-362" class="py-name"><a title="web2py.gluon.rocket.Connection.client_addr" class="py-name" href="#" onclick="return doclink('link-362', 'client_addr', 'link-33');">client_addr</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">                                    <tt id="link-363" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-363', 'time', 'link-28');">time</a></tt> <tt class="py-op">=</tt> <tt id="link-364" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-364', 'datetime', 'link-265');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%c'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">                                    <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">                                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt><tt class="py-op">,</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">                                    <tt class="py-name">request_line</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_line</tt><tt class="py-op">)</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">req_log</tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt id="link-365" class="py-name"><a title="web2py.gluon.rocket.LOG_LINE" class="py-name" href="#" onclick="return doclink('link-365', 'LOG_LINE', 'link-272');">LOG_LINE</a></tt> <tt class="py-op">%</tt> <tt class="py-name">log_info</tt><tt class="py-op">)</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">                    <tt class="py-name">exc</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">                    <tt class="py-name">handled</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-366" class="py-name" targets="Method web2py.gluon.rocket.Worker._handleError()=web2py.gluon.rocket.Worker-class.html#_handleError"><a title="web2py.gluon.rocket.Worker._handleError" class="py-name" href="#" onclick="return doclink('link-366', '_handleError', 'link-366');">_handleError</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">exc</tt><tt class="py-op">)</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">handled</tt><tt class="py-op">:</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">                        <tt class="py-keyword">break</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_line</tt><tt class="py-op">:</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">                            <tt class="py-name">log_info</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">client_ip</tt> <tt class="py-op">=</tt> <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-367" class="py-name"><a title="web2py.gluon.rocket.Connection.client_addr" class="py-name" href="#" onclick="return doclink('link-367', 'client_addr', 'link-33');">client_addr</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">                                            <tt id="link-368" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-368', 'time', 'link-28');">time</a></tt> <tt class="py-op">=</tt> <tt id="link-369" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-369', 'datetime', 'link-265');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%c'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line">                                            <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line">                                            <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt><tt class="py-op">,</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">                                            <tt class="py-name">request_line</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_line</tt> <tt class="py-op">+</tt> <tt class="py-string">' - not stopping'</tt><tt class="py-op">)</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">req_log</tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt id="link-370" class="py-name"><a title="web2py.gluon.rocket.LOG_LINE" class="py-name" href="#" onclick="return doclink('link-370', 'LOG_LINE', 'link-272');">LOG_LINE</a></tt> <tt class="py-op">%</tt> <tt class="py-name">log_info</tt><tt class="py-op">)</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line"> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt><tt class="py-op">:</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">                    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line">                        <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-371" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-371', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line">                    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-372" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-372', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line"> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
</div><a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line"> </tt>
<a name="Worker.run_app"></a><div id="Worker.run_app-def"><a name="L1093"></a><tt class="py-lineno">1093</tt> <a class="py-toggle" href="#" id="Worker.run_app-toggle" onclick="return toggle('Worker.run_app');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#run_app">run_app</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">conn</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.run_app-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.run_app-expanded"><a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line">        <tt class="py-comment"># Must be overridden with a method reads the request from the socket</tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># and sends a response.</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">(</tt><tt class="py-string">'Overload this method!'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line"> </tt>
<a name="Worker.send_response"></a><div id="Worker.send_response-def"><a name="L1099"></a><tt class="py-lineno">1099</tt> <a class="py-toggle" href="#" id="Worker.send_response-toggle" onclick="return toggle('Worker.send_response');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#send_response">send_response</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">status</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.send_response-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.send_response-expanded"><a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">        <tt class="py-name">stat_msg</tt> <tt class="py-op">=</tt> <tt class="py-name">status</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">        <tt id="link-373" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-373', 'msg', 'link-101');">msg</a></tt> <tt class="py-op">=</tt> <tt id="link-374" class="py-name"><a title="web2py.gluon.rocket.RESPONSE" class="py-name" href="#" onclick="return doclink('link-374', 'RESPONSE', 'link-273');">RESPONSE</a></tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">                          <tt id="link-375" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-375', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">stat_msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">                          <tt class="py-string">'text/plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line">                          <tt class="py-name">stat_msg</tt><tt class="py-op">)</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-376" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-376', 'sendall', 'link-52');">sendall</a></tt><tt class="py-op">(</tt><tt id="link-377" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-377', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt id="link-378" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-378', 'msg', 'link-101');">msg</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-379" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-379', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-380" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-380', 'error', 'link-71');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-381" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-381', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Tried to send "%s" to client but received socket'</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">                           <tt class="py-string">' error'</tt> <tt class="py-op">%</tt> <tt class="py-name">status</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line"> </tt>
<a name="Worker.kill"></a><div id="Worker.kill-def"><a name="L1112"></a><tt class="py-lineno">1112</tt> <a class="py-toggle" href="#" id="Worker.kill-toggle" onclick="return toggle('Worker.kill');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#kill">kill</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.kill-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.kill-expanded"><a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">isAlive</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'conn'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-382" class="py-name"><a title="web2py.gluon.rocket.Connection.shutdown" class="py-name" href="#" onclick="return doclink('link-382', 'shutdown', 'link-55');">shutdown</a></tt><tt class="py-op">(</tt><tt id="link-383" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-383', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">SHUT_RDWR</tt><tt class="py-op">)</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-384" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-384', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-385" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-385', 'error', 'link-71');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">                <tt class="py-name">info</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">info</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt id="link-386" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-386', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">EBADF</tt><tt class="py-op">:</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-387" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-387', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Error on shutdown: '</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">info</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line"> </tt>
<a name="Worker.read_request_line"></a><div id="Worker.read_request_line-def"><a name="L1121"></a><tt class="py-lineno">1121</tt> <a class="py-toggle" href="#" id="Worker.read_request_line-toggle" onclick="return toggle('Worker.read_request_line');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#read_request_line">read_request_line</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sock_file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.read_request_line-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.read_request_line-expanded"><a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_line</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">            <tt class="py-comment"># Grab the request line</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">sock_file</tt><tt class="py-op">.</tt><tt id="link-388" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.readline()=web2py.gluon.dal.DatabaseStoredFile-class.html#readline,Method web2py.gluon.debug.Pipe.readline()=web2py.gluon.debug.Pipe-class.html#readline,Method web2py.gluon.rocket.ChunkedReader.readline()=web2py.gluon.rocket.ChunkedReader-class.html#readline"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-388', 'readline', 'link-388');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-389" class="py-name"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-389', 'PY3K', 'link-21');">PY3K</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">                <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-390" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-390', 'decode', 'link-25');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'ISO-8859-1'</tt><tt class="py-op">)</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line"> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">d</tt> <tt class="py-op">==</tt> <tt class="py-string">'\r\n'</tt><tt class="py-op">:</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">                <tt class="py-comment"># Allow an extra NEWLINE at the beginning per HTTP 1.1 spec</tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-391" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-391', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Client sent newline'</tt><tt class="py-op">)</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line"> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">                <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">sock_file</tt><tt class="py-op">.</tt><tt id="link-392" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-392', 'readline', 'link-388');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-393" class="py-name"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-393', 'PY3K', 'link-21');">PY3K</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">                    <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-394" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-394', 'decode', 'link-25');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'ISO-8859-1'</tt><tt class="py-op">)</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-395" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-395', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">:</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-396" class="py-name"><a title="web2py.gluon.rocket.SocketTimeout" class="py-name" href="#" onclick="return doclink('link-396', 'SocketTimeout', 'link-335');">SocketTimeout</a></tt><tt class="py-op">(</tt><tt class="py-string">"Socket timed out before request."</tt><tt class="py-op">)</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line"> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-397" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-397', 'strip', 'link-397');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line"> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">d</tt><tt class="py-op">:</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-398" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-398', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Client did not send a recognizable request.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-399" class="py-name"><a title="web2py.gluon.rocket.SocketClosed" class="py-name" href="#" onclick="return doclink('link-399', 'SocketClosed', 'link-338');">SocketClosed</a></tt><tt class="py-op">(</tt><tt class="py-string">'Client closed socket.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line"> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_line</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line"> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">        <tt class="py-comment"># NOTE: I've replaced the traditional method of procedurally breaking</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># apart the request line with a (rather unsightly) regular expression.</tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># However, Java's regexp support sucks so bad that it actually takes</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># longer in Jython to process the regexp than procedurally. So I've</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># left the old code here for Jython's sake...for now.</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt id="link-400" class="py-name"><a title="web2py.gluon.rocket.IS_JYTHON" class="py-name" href="#" onclick="return doclink('link-400', 'IS_JYTHON', 'link-12');">IS_JYTHON</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-401" class="py-name" targets="Method web2py.gluon.rocket.Worker._read_request_line_jython()=web2py.gluon.rocket.Worker-class.html#_read_request_line_jython"><a title="web2py.gluon.rocket.Worker._read_request_line_jython" class="py-name" href="#" onclick="return doclink('link-401', '_read_request_line_jython', 'link-401');">_read_request_line_jython</a></tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line"> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line">        <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt id="link-402" class="py-name"><a title="web2py.gluon.rocket.re_REQUEST_LINE" class="py-name" href="#" onclick="return doclink('link-402', 're_REQUEST_LINE', 'link-271');">re_REQUEST_LINE</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line"> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-403" class="py-name"><a title="web2py.gluon.rocket.Worker.send_response" class="py-name" href="#" onclick="return doclink('link-403', 'send_response', 'link-350');">send_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'400 Bad Request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-404" class="py-name"><a title="web2py.gluon.rocket.BadRequest" class="py-name" href="#" onclick="return doclink('link-404', 'BadRequest', 'link-340');">BadRequest</a></tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line"> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">        <tt class="py-name">req</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">groupdict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-405" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-405', 'k', 'link-303');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">req</tt><tt class="py-op">.</tt><tt id="link-406" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-406', 'items', 'link-317');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">v</tt><tt class="py-op">:</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line">                <tt class="py-name">req</tt><tt class="py-op">[</tt><tt id="link-407" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-407', 'k', 'link-303');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-408" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-408', 'k', 'link-303');">k</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'path'</tt><tt class="py-op">:</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">                <tt class="py-name">req</tt><tt class="py-op">[</tt><tt class="py-string">'path'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">r'%2F'</tt><tt class="py-op">.</tt><tt id="link-409" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-409', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unquote</tt><tt class="py-op">(</tt><tt id="link-410" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-410', 'x', 'link-234');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-411" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-411', 'x', 'link-234');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-412" class="py-name"><a title="web2py.gluon.rocket.re_SLASH" class="py-name" href="#" onclick="return doclink('link-412', 're_SLASH', 'link-270');">re_SLASH</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line"> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">req</tt> </tt>
</div><a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line"> </tt>
<a name="Worker._read_request_line_jython"></a><div id="Worker._read_request_line_jython-def"><a name="L1172"></a><tt class="py-lineno">1172</tt> <a class="py-toggle" href="#" id="Worker._read_request_line_jython-toggle" onclick="return toggle('Worker._read_request_line_jython');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#_read_request_line_jython">_read_request_line_jython</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">d</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker._read_request_line_jython-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker._read_request_line_jython-expanded"><a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-413" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-413', 'strip', 'link-397');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-name">proto</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">proto</tt><tt class="py-op">.</tt><tt id="link-414" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-414', 'startswith', 'link-414');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">               <tt class="py-name">proto</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'1.0'</tt><tt class="py-op">,</tt> <tt class="py-string">'1.1'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">               <tt class="py-name">method</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-415" class="py-name"><a title="web2py.gluon.rocket.HTTP_METHODS" class="py-name" href="#" onclick="return doclink('link-415', 'HTTP_METHODS', 'link-275');">HTTP_METHODS</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-416" class="py-name"><a title="web2py.gluon.rocket.Worker.send_response" class="py-name" href="#" onclick="return doclink('link-416', 'send_response', 'link-350');">send_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'400 Bad Request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-417" class="py-name"><a title="web2py.gluon.rocket.BadRequest" class="py-name" href="#" onclick="return doclink('link-417', 'BadRequest', 'link-340');">BadRequest</a></tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-418" class="py-name"><a title="web2py.gluon.rocket.Worker.send_response" class="py-name" href="#" onclick="return doclink('link-418', 'send_response', 'link-350');">send_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'400 Bad Request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-419" class="py-name"><a title="web2py.gluon.rocket.BadRequest" class="py-name" href="#" onclick="return doclink('link-419', 'BadRequest', 'link-340');">BadRequest</a></tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line"> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line">        <tt class="py-name">req</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">=</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">protocol</tt> <tt class="py-op">=</tt> <tt class="py-name">proto</tt><tt class="py-op">)</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">        <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">        <tt class="py-name">host</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">uri</tt> <tt class="py-op">==</tt> <tt class="py-string">'*'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt id="link-420" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-420', 'startswith', 'link-414');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'://'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">uri</tt><tt class="py-op">:</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line">            <tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">rest</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'://'</tt><tt class="py-op">)</tt> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line">            <tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">rest</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">path</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-421" class="py-name"><a title="web2py.gluon.rocket.Worker.send_response" class="py-name" href="#" onclick="return doclink('link-421', 'send_response', 'link-350');">send_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'400 Bad Request'</tt><tt class="py-op">)</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-422" class="py-name"><a title="web2py.gluon.rocket.BadRequest" class="py-name" href="#" onclick="return doclink('link-422', 'BadRequest', 'link-340');">BadRequest</a></tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line"> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line">        <tt class="py-name">query_string</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'?'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">path</tt><tt class="py-op">:</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line">            <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">query_string</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line"> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">r'%2F'</tt><tt class="py-op">.</tt><tt id="link-423" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-423', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unquote</tt><tt class="py-op">(</tt><tt id="link-424" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-424', 'x', 'link-234');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-425" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-425', 'x', 'link-234');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-426" class="py-name"><a title="web2py.gluon.rocket.re_SLASH" class="py-name" href="#" onclick="return doclink('link-426', 're_SLASH', 'link-270');">re_SLASH</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line"> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line">        <tt class="py-name">req</tt><tt class="py-op">.</tt><tt id="link-427" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-427', 'update', 'link-233');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">=</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line">                   <tt class="py-name">query_string</tt><tt class="py-op">=</tt><tt class="py-name">query_string</tt><tt class="py-op">,</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">                   <tt class="py-name">scheme</tt><tt class="py-op">=</tt><tt class="py-name">scheme</tt><tt class="py-op">.</tt><tt id="link-428" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-428', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line">                   <tt class="py-name">host</tt><tt class="py-op">=</tt><tt class="py-name">host</tt><tt class="py-op">)</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">req</tt> </tt>
</div><a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line"> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line"> </tt>
<a name="Worker.read_headers"></a><div id="Worker.read_headers-def"><a name="L1211"></a><tt class="py-lineno">1211</tt> <a class="py-toggle" href="#" id="Worker.read_headers-toggle" onclick="return toggle('Worker.read_headers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.Worker-class.html#read_headers">read_headers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sock_file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Worker.read_headers-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Worker.read_headers-expanded"><a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">        <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">        <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">sock_file</tt><tt class="py-op">.</tt><tt id="link-429" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-429', 'readline', 'link-388');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line"> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line">        <tt class="py-name">lname</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">        <tt class="py-name">lval</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-430" class="py-name"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-430', 'PY3K', 'link-21');">PY3K</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line">                    <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">l</tt><tt class="py-op">,</tt> <tt class="py-string">'ISO-8859-1'</tt><tt class="py-op">)</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">UnicodeDecodeError</tt><tt class="py-op">:</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'Client sent invalid header: '</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">l</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line"> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">l</tt> <tt class="py-op">==</tt> <tt class="py-string">'\r\n'</tt><tt class="py-op">:</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line"> </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">l</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-string">' \t'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">lname</tt><tt class="py-op">:</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">                <tt class="py-comment"># Some headers take more than one line</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">lval</tt> <tt class="py-op">+=</tt> <tt class="py-string">','</tt> <tt class="py-op">+</tt> <tt class="py-name">l</tt><tt class="py-op">.</tt><tt id="link-431" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-431', 'strip', 'link-397');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">                <tt class="py-comment"># HTTP header values are latin-1 encoded</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line">                <tt class="py-comment"># HTTP header names are us-ascii encoded</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line">                <tt class="py-name">lname</tt> <tt class="py-op">=</tt> <tt class="py-name">l</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-432" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-432', 'strip', 'link-397');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-433" class="py-name" targets="Method web2py.gluon.dal.Expression.upper()=web2py.gluon.dal.Expression-class.html#upper"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-433', 'upper', 'link-433');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">                <tt class="py-name">lval</tt> <tt class="py-op">=</tt> <tt class="py-name">l</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-434" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-434', 'strip', 'link-397');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">lname</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">lval</tt><tt class="py-op">)</tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line"> </tt>
<a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line">            <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">sock_file</tt><tt class="py-op">.</tt><tt id="link-435" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-435', 'readline', 'link-388');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">headers</tt> </tt>
</div></div><a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line"> </tt>
<a name="SocketTimeout"></a><div id="SocketTimeout-def"><a name="L1242"></a><tt class="py-lineno">1242</tt> <a class="py-toggle" href="#" id="SocketTimeout-toggle" onclick="return toggle('SocketTimeout');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.SocketTimeout-class.html">SocketTimeout</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SocketTimeout-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SocketTimeout-expanded"><a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line">    <tt class="py-docstring">"Exception for when a socket times out between requests."</tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line"> </tt>
<a name="BadRequest"></a><div id="BadRequest-def"><a name="L1246"></a><tt class="py-lineno">1246</tt> <a class="py-toggle" href="#" id="BadRequest-toggle" onclick="return toggle('BadRequest');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.BadRequest-class.html">BadRequest</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BadRequest-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BadRequest-expanded"><a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line">    <tt class="py-docstring">"Exception for when a client sends an incomprehensible request."</tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line"> </tt>
<a name="SocketClosed"></a><div id="SocketClosed-def"><a name="L1250"></a><tt class="py-lineno">1250</tt> <a class="py-toggle" href="#" id="SocketClosed-toggle" onclick="return toggle('SocketClosed');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.SocketClosed-class.html">SocketClosed</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SocketClosed-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SocketClosed-expanded"><a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line">    <tt class="py-docstring">"Exception for when a socket is closed by the client."</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L1253"></a><tt class="py-lineno">1253</tt>  <tt class="py-line"> </tt>
<a name="ChunkedReader"></a><div id="ChunkedReader-def"><a name="L1254"></a><tt class="py-lineno">1254</tt> <a class="py-toggle" href="#" id="ChunkedReader-toggle" onclick="return toggle('ChunkedReader');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.ChunkedReader-class.html">ChunkedReader</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ChunkedReader-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ChunkedReader-expanded"><a name="ChunkedReader.__init__"></a><div id="ChunkedReader.__init__-def"><a name="L1255"></a><tt class="py-lineno">1255</tt> <a class="py-toggle" href="#" id="ChunkedReader.__init__-toggle" onclick="return toggle('ChunkedReader.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ChunkedReader-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sock_file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ChunkedReader.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ChunkedReader.__init__-expanded"><a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-436" class="py-name" targets="Method web2py.gluon.globals.Response.stream()=web2py.gluon.globals.Response-class.html#stream"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-436', 'stream', 'link-436');">stream</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sock_file</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line"> </tt>
<a name="ChunkedReader._read_header"></a><div id="ChunkedReader._read_header-def"><a name="L1259"></a><tt class="py-lineno">1259</tt> <a class="py-toggle" href="#" id="ChunkedReader._read_header-toggle" onclick="return toggle('ChunkedReader._read_header');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ChunkedReader-class.html#_read_header">_read_header</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ChunkedReader._read_header-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ChunkedReader._read_header-expanded"><a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line">        <tt class="py-name">chunk_len</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line">            <tt class="py-keyword">while</tt> <tt class="py-string">""</tt> <tt class="py-op">==</tt> <tt class="py-name">chunk_len</tt><tt class="py-op">:</tt> </tt>
<a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line">                <tt class="py-name">chunk_len</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-437" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-437', 'stream', 'link-436');">stream</a></tt><tt class="py-op">.</tt><tt id="link-438" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-438', 'readline', 'link-388');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-439" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-439', 'strip', 'link-397');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">chunk_len</tt><tt class="py-op">,</tt> <tt class="py-number">16</tt><tt class="py-op">)</tt> </tt>
<a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line"> </tt>
<a name="ChunkedReader.read"></a><div id="ChunkedReader.read-def"><a name="L1268"></a><tt class="py-lineno">1268</tt> <a class="py-toggle" href="#" id="ChunkedReader.read-toggle" onclick="return toggle('ChunkedReader.read');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ChunkedReader-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ChunkedReader.read-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ChunkedReader.read-expanded"><a name="L1269"></a><tt class="py-lineno">1269</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-440" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-440', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line">        <tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunk_size</tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line">                <tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-441" class="py-name" targets="Method web2py.gluon.rocket.ChunkedReader._read_header()=web2py.gluon.rocket.ChunkedReader-class.html#_read_header"><a title="web2py.gluon.rocket.ChunkedReader._read_header" class="py-name" href="#" onclick="return doclink('link-441', '_read_header', 'link-441');">_read_header</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line"> </tt>
<a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-442" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-442', 'stream', 'link-436');">stream</a></tt><tt class="py-op">.</tt><tt id="link-443" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-443', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line">                <tt class="py-name">chunk_size</tt> <tt class="py-op">-=</tt> <tt class="py-name">size</tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-444" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-444', 'stream', 'link-436');">stream</a></tt><tt class="py-op">.</tt><tt id="link-445" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-445', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line">                <tt class="py-name">size</tt> <tt class="py-op">-=</tt> <tt class="py-name">chunk_size</tt> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">                <tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line"> </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-name">chunk_size</tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
</div><a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line"> </tt>
<a name="ChunkedReader.readline"></a><div id="ChunkedReader.readline-def"><a name="L1289"></a><tt class="py-lineno">1289</tt> <a class="py-toggle" href="#" id="ChunkedReader.readline-toggle" onclick="return toggle('ChunkedReader.readline');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ChunkedReader-class.html#readline">readline</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ChunkedReader.readline-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ChunkedReader.readline-expanded"><a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-446" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-446', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line">        <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-447" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-447', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">c</tt> <tt class="py-keyword">and</tt> <tt class="py-name">c</tt> <tt class="py-op">!=</tt> <tt id="link-448" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-448', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">+=</tt> <tt class="py-name">c</tt> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line">            <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-449" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-449', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">+=</tt> <tt class="py-name">c</tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">data</tt> </tt>
</div><a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line"> </tt>
<a name="ChunkedReader.readlines"></a><div id="ChunkedReader.readlines-def"><a name="L1298"></a><tt class="py-lineno">1298</tt> <a class="py-toggle" href="#" id="ChunkedReader.readlines-toggle" onclick="return toggle('ChunkedReader.readlines');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.ChunkedReader-class.html#readlines">readlines</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ChunkedReader.readlines-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ChunkedReader.readlines-expanded"><a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line">        <tt class="py-keyword">yield</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-450" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-450', 'readline', 'link-388');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1300"></a><tt class="py-lineno">1300</tt>  <tt class="py-line"> </tt>
<a name="get_method"></a><div id="get_method-def"><a name="L1301"></a><tt class="py-lineno">1301</tt> <a class="py-toggle" href="#" id="get_method-toggle" onclick="return toggle('get_method');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#get_method">get_method</a><tt class="py-op">(</tt><tt class="py-param">method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_method-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="get_method-expanded"><a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line"> </tt>
<a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line">    <tt class="py-name">methods</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">wsgi</tt><tt class="py-op">=</tt><tt id="link-451" class="py-name" targets="Class web2py.gluon.rocket.WSGIWorker=web2py.gluon.rocket.WSGIWorker-class.html"><a title="web2py.gluon.rocket.WSGIWorker" class="py-name" href="#" onclick="return doclink('link-451', 'WSGIWorker', 'link-451');">WSGIWorker</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">methods</tt><tt class="py-op">[</tt><tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-452" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-452', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
</div><a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line"> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\worker.py</tt> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\methods\__init__.py</tt> </tt>
<a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\methods\__init__.py</tt> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Monolithic build...start of module: rocket\methods\wsgi.py</tt> </tt>
<a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line"><tt class="py-comment"># Import System Modules</tt> </tt>
<a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-453" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-453', 'socket', 'link-0');">socket</a></tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line"><tt class="py-comment">#from wsgiref.headers import Headers</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#from wsgiref.util import FileWrapper</tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Import Package Modules</tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># package imports removed in monolithic build</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line"> </tt>
<a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-454" class="py-name"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-454', 'PY3K', 'link-21');">PY3K</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-455" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-455', 'utils', 'link-455');">utils</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">formatdate</tt> </tt>
<a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line"><tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line">    <tt class="py-comment"># Caps Utils for Py2.4 compatibility</tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">from</tt> <tt class="py-name">email</tt><tt class="py-op">.</tt><tt class="py-name">Utils</tt> <tt class="py-keyword">import</tt> <tt class="py-name">formatdate</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line"> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line"><tt class="py-comment"># Define Constants</tt> </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-456" class="py-name" targets="Variable web2py.gluon.rocket.NEWLINE=web2py.gluon.rocket-module.html#NEWLINE"><a title="web2py.gluon.rocket.NEWLINE" class="py-name" href="#" onclick="return doclink('link-456', 'NEWLINE', 'link-456');">NEWLINE</a></tt> <tt class="py-op">=</tt> <tt id="link-457" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-457', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line"><tt id="link-458" class="py-name" targets="Variable web2py.gluon.rocket.HEADER_RESPONSE=web2py.gluon.rocket-module.html#HEADER_RESPONSE"><a title="web2py.gluon.rocket.HEADER_RESPONSE" class="py-name" href="#" onclick="return doclink('link-458', 'HEADER_RESPONSE', 'link-458');">HEADER_RESPONSE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'''HTTP/1.1 %s\r\n%s'''</tt> </tt>
<a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line"><tt id="link-459" class="py-name" targets="Variable web2py.gluon.rocket.BASE_ENV=web2py.gluon.rocket-module.html#BASE_ENV"><a title="web2py.gluon.rocket.BASE_ENV" class="py-name" href="#" onclick="return doclink('link-459', 'BASE_ENV', 'link-459');">BASE_ENV</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'SERVER_NAME'</tt><tt class="py-op">:</tt> <tt id="link-460" class="py-name"><a title="web2py.gluon.rocket.SERVER_NAME" class="py-name" href="#" onclick="return doclink('link-460', 'SERVER_NAME', 'link-2');">SERVER_NAME</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line">            <tt class="py-string">'SCRIPT_NAME'</tt><tt class="py-op">:</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt>  <tt class="py-comment"># Direct call WSGI does not need a name</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line">            <tt class="py-string">'wsgi.errors'</tt><tt class="py-op">:</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">,</tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line">            <tt class="py-string">'wsgi.version'</tt><tt class="py-op">:</tt> <tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line">            <tt class="py-string">'wsgi.multiprocess'</tt><tt class="py-op">:</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line">            <tt class="py-string">'wsgi.run_once'</tt><tt class="py-op">:</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line">            <tt class="py-string">'wsgi.file_wrapper'</tt><tt class="py-op">:</tt> <tt id="link-461" class="py-name" targets="Class web2py.gluon.rocket.FileWrapper=web2py.gluon.rocket.FileWrapper-class.html"><a title="web2py.gluon.rocket.FileWrapper" class="py-name" href="#" onclick="return doclink('link-461', 'FileWrapper', 'link-461');">FileWrapper</a></tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line">            <tt class="py-op">}</tt> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker"></a><div id="WSGIWorker-def"><a name="L1339"></a><tt class="py-lineno">1339</tt> <a class="py-toggle" href="#" id="WSGIWorker-toggle" onclick="return toggle('WSGIWorker');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a><tt class="py-op">(</tt><tt class="py-base-class">Worker</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="WSGIWorker-expanded"><a name="WSGIWorker.__init__"></a><div id="WSGIWorker.__init__-def"><a name="L1340"></a><tt class="py-lineno">1340</tt> <a class="py-toggle" href="#" id="WSGIWorker.__init__-toggle" onclick="return toggle('WSGIWorker.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.__init__-expanded"><a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line">        <tt class="py-docstring">"""Builds some instance variables that will last the life of the</tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line"><tt class="py-docstring">        thread."""</tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line">        <tt id="link-462" class="py-name" targets="Class web2py.gluon.rocket.Worker=web2py.gluon.rocket.Worker-class.html"><a title="web2py.gluon.rocket.Worker" class="py-name" href="#" onclick="return doclink('link-462', 'Worker', 'link-462');">Worker</a></tt><tt class="py-op">.</tt><tt id="link-463" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-463', '__init__', 'link-81');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line"> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line">            <tt class="py-name">multithreaded</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt><tt class="py-op">.</tt><tt id="link-464" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-464', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'max_threads'</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-number">1</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">            <tt class="py-name">multithreaded</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">base_environ</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">'SERVER_SOFTWARE'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt><tt class="py-op">[</tt><tt class="py-string">'server_software'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">                                  <tt class="py-string">'wsgi.multithread'</tt><tt class="py-op">:</tt> <tt class="py-name">multithreaded</tt><tt class="py-op">,</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">                                  <tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">base_environ</tt><tt class="py-op">.</tt><tt id="link-465" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-465', 'update', 'link-233');">update</a></tt><tt class="py-op">(</tt><tt id="link-466" class="py-name"><a title="web2py.gluon.rocket.BASE_ENV" class="py-name" href="#" onclick="return doclink('link-466', 'BASE_ENV', 'link-459');">BASE_ENV</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line">        <tt class="py-comment"># Grab our application</tt> </tt>
<a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app_info</tt><tt class="py-op">.</tt><tt id="link-467" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-467', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'wsgi_app'</tt><tt class="py-op">)</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line"> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app</tt><tt class="py-op">,</tt> <tt class="py-string">"__call__"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"The wsgi_app specified (%s) is not a valid WSGI application."</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line"> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker.build_environ"></a><div id="WSGIWorker.build_environ-def"><a name="L1360"></a><tt class="py-lineno">1360</tt> <a class="py-toggle" href="#" id="WSGIWorker.build_environ-toggle" onclick="return toggle('WSGIWorker.build_environ');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#build_environ">build_environ</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sock_file</tt><tt class="py-op">,</tt> <tt class="py-param">conn</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.build_environ-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.build_environ-expanded"><a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">        <tt class="py-docstring">""" Build the execution environment. """</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">        <tt class="py-comment"># Grab the request line</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-468" class="py-name" targets="Method web2py.gluon.rocket.Worker.read_request_line()=web2py.gluon.rocket.Worker-class.html#read_request_line"><a title="web2py.gluon.rocket.Worker.read_request_line" class="py-name" href="#" onclick="return doclink('link-468', 'read_request_line', 'link-468');">read_request_line</a></tt><tt class="py-op">(</tt><tt class="py-name">sock_file</tt><tt class="py-op">)</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line"> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line">        <tt class="py-comment"># Copy the Base Environment</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">environ</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">base_environ</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line"> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line">        <tt class="py-comment"># Grab the headers</tt> </tt>
<a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt id="link-469" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-469', 'k', 'link-303');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-470" class="py-name" targets="Method web2py.gluon.rocket.Worker.read_headers()=web2py.gluon.rocket.Worker-class.html#read_headers"><a title="web2py.gluon.rocket.Worker.read_headers" class="py-name" href="#" onclick="return doclink('link-470', 'read_headers', 'link-470');">read_headers</a></tt><tt class="py-op">(</tt><tt class="py-name">sock_file</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-471" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-471', 'items', 'link-317');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_'</tt><tt class="py-op">+</tt><tt id="link-472" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-472', 'k', 'link-303');">k</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
<a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line"> </tt>
<a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line">        <tt class="py-comment"># Add CGI Variables</tt> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REQUEST_METHOD'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">[</tt><tt class="py-string">'method'</tt><tt class="py-op">]</tt> </tt>
<a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line">        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">[</tt><tt class="py-string">'path'</tt><tt class="py-op">]</tt> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line">        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'SERVER_PROTOCOL'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">[</tt><tt class="py-string">'protocol'</tt><tt class="py-op">]</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line">        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'SERVER_PORT'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-473" class="py-name"><a title="web2py.gluon.rocket.Connection.server_port" class="py-name" href="#" onclick="return doclink('link-473', 'server_port', 'link-35');">server_port</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REMOTE_PORT'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-474" class="py-name"><a title="web2py.gluon.rocket.Connection.client_port" class="py-name" href="#" onclick="return doclink('link-474', 'client_port', 'link-34');">client_port</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line">        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REMOTE_ADDR'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-475" class="py-name"><a title="web2py.gluon.rocket.Connection.client_addr" class="py-name" href="#" onclick="return doclink('link-475', 'client_addr', 'link-33');">client_addr</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">        <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'QUERY_STRING'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">[</tt><tt class="py-string">'query_string'</tt><tt class="py-op">]</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'HTTP_CONTENT_LENGTH'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">environ</tt><tt class="py-op">:</tt> </tt>
<a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'CONTENT_LENGTH'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'HTTP_CONTENT_LENGTH'</tt><tt class="py-op">]</tt> </tt>
<a name="L1382"></a><tt class="py-lineno">1382</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'HTTP_CONTENT_TYPE'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">environ</tt><tt class="py-op">:</tt> </tt>
<a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'CONTENT_TYPE'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'HTTP_CONTENT_TYPE'</tt><tt class="py-op">]</tt> </tt>
<a name="L1384"></a><tt class="py-lineno">1384</tt>  <tt class="py-line"> </tt>
<a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line">        <tt class="py-comment"># Save the request method for later</tt> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_method</tt> <tt class="py-op">=</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'REQUEST_METHOD'</tt><tt class="py-op">]</tt> </tt>
<a name="L1387"></a><tt class="py-lineno">1387</tt>  <tt class="py-line"> </tt>
<a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line">        <tt class="py-comment"># Add Dynamic WSGI Variables</tt> </tt>
<a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-476" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-476', 'ssl', 'link-30');">ssl</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'wsgi.url_scheme'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'https'</tt> </tt>
<a name="L1391"></a><tt class="py-lineno">1391</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'HTTPS'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'on'</tt> </tt>
<a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1393"></a><tt class="py-lineno">1393</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'wsgi.url_scheme'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'http'</tt> </tt>
<a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line"> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-477" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-477', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_TRANSFER_ENCODING'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'chunked'</tt><tt class="py-op">:</tt> </tt>
<a name="L1396"></a><tt class="py-lineno">1396</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'wsgi.input'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-478" class="py-name" targets="Class web2py.gluon.rocket.ChunkedReader=web2py.gluon.rocket.ChunkedReader-class.html"><a title="web2py.gluon.rocket.ChunkedReader" class="py-name" href="#" onclick="return doclink('link-478', 'ChunkedReader', 'link-478');">ChunkedReader</a></tt><tt class="py-op">(</tt><tt class="py-name">sock_file</tt><tt class="py-op">)</tt> </tt>
<a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">            <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'wsgi.input'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">sock_file</tt> </tt>
<a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line"> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">environ</tt> </tt>
</div><a name="L1401"></a><tt class="py-lineno">1401</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker.send_headers"></a><div id="WSGIWorker.send_headers-def"><a name="L1402"></a><tt class="py-lineno">1402</tt> <a class="py-toggle" href="#" id="WSGIWorker.send_headers-toggle" onclick="return toggle('WSGIWorker.send_headers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#send_headers">send_headers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">sections</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.send_headers-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.send_headers-expanded"><a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">        <tt class="py-name">h_set</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header_set</tt> </tt>
<a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line"> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line">        <tt class="py-comment"># Does the app want us to send output chunked?</tt> </tt>
<a name="L1406"></a><tt class="py-lineno">1406</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunked</tt> <tt class="py-op">=</tt> <tt class="py-name">h_set</tt><tt class="py-op">.</tt><tt id="link-479" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-479', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'transfer-encoding'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-480" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-480', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'chunked'</tt> </tt>
<a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line"> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line">        <tt class="py-comment"># Add a Date header if it's not there already</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'date'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">h_set</tt><tt class="py-op">:</tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line">            <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Date'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">formatdate</tt><tt class="py-op">(</tt><tt class="py-name">usegmt</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line"> </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line">        <tt class="py-comment"># Add a Server header if it's not there already</tt> </tt>
<a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'server'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">h_set</tt><tt class="py-op">:</tt> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line">            <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Server'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-481" class="py-name"><a title="web2py.gluon.rocket.HTTP_SERVER_SOFTWARE" class="py-name" href="#" onclick="return doclink('link-481', 'HTTP_SERVER_SOFTWARE', 'link-6');">HTTP_SERVER_SOFTWARE</a></tt> </tt>
<a name="L1415"></a><tt class="py-lineno">1415</tt>  <tt class="py-line"> </tt>
<a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'content-length'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">h_set</tt><tt class="py-op">:</tt> </tt>
<a name="L1417"></a><tt class="py-lineno">1417</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'content-length'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line">            <tt id="link-482" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-482', 's', 'link-482');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1420"></a><tt class="py-lineno">1420</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-483" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-483', 's', 'link-482');">s</a></tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt> <tt class="py-keyword">or</tt> <tt id="link-484" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-484', 's', 'link-482');">s</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-number">204</tt><tt class="py-op">,</tt> <tt class="py-number">205</tt><tt class="py-op">,</tt> <tt class="py-number">304</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunked</tt><tt class="py-op">:</tt> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">sections</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line">                        <tt class="py-comment"># Add a Content-Length header if it's not there already</tt> </tt>
<a name="L1424"></a><tt class="py-lineno">1424</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-485" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-485', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt id="link-486" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-486', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line">                        <tt class="py-comment"># If they sent us more than one section, we blow chunks</tt> </tt>
<a name="L1428"></a><tt class="py-lineno">1428</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Transfer-Encoding'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'Chunked'</tt> </tt>
<a name="L1429"></a><tt class="py-lineno">1429</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunked</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-487" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-487', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Adding header...'</tt> </tt>
<a name="L1432"></a><tt class="py-lineno">1432</tt>  <tt class="py-line">                                               <tt class="py-string">'Transfer-Encoding: Chunked'</tt><tt class="py-op">)</tt> </tt>
<a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line"> </tt>
<a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'connection'</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">h_set</tt><tt class="py-op">:</tt> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line">            <tt class="py-comment"># If the application did not provide a connection header, fill it in</tt> </tt>
<a name="L1436"></a><tt class="py-lineno">1436</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">client_conn</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-488" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-488', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_CONNECTION'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-489" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-489', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'SERVER_PROTOCOL'</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'HTTP/1.1'</tt><tt class="py-op">:</tt> </tt>
<a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">                <tt class="py-comment"># HTTP = 1.1 defaults to keep-alive connections</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">client_conn</tt><tt class="py-op">:</tt> </tt>
<a name="L1440"></a><tt class="py-lineno">1440</tt>  <tt class="py-line">                    <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Connection'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">client_conn</tt> </tt>
<a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line">                    <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Connection'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'keep-alive'</tt> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1444"></a><tt class="py-lineno">1444</tt>  <tt class="py-line">                <tt class="py-comment"># HTTP &lt; 1.1 supports keep-alive but it's quirky so we don't support it</tt> </tt>
<a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">h_set</tt><tt class="py-op">[</tt><tt class="py-string">'Connection'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'close'</tt> </tt>
<a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line"> </tt>
<a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line">        <tt class="py-comment"># Close our connection if we need to.</tt> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">h_set</tt><tt class="py-op">.</tt><tt id="link-490" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-490', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'connection'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-491" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-491', 'lower', 'link-286');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'close'</tt> </tt>
<a name="L1449"></a><tt class="py-lineno">1449</tt>  <tt class="py-line"> </tt>
<a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line">        <tt class="py-comment"># Build our output headers</tt> </tt>
<a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">header_data</tt> <tt class="py-op">=</tt> <tt id="link-492" class="py-name"><a title="web2py.gluon.rocket.HEADER_RESPONSE" class="py-name" href="#" onclick="return doclink('link-492', 'HEADER_RESPONSE', 'link-458');">HEADER_RESPONSE</a></tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">h_set</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line"> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line">        <tt class="py-comment"># Send the headers</tt> </tt>
<a name="L1454"></a><tt class="py-lineno">1454</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-493" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-493', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Sending Headers: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">header_data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-494" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-494', 'sendall', 'link-52');">sendall</a></tt><tt class="py-op">(</tt><tt id="link-495" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-495', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-name">header_data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers_sent</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker.write_warning"></a><div id="WSGIWorker.write_warning-def"><a name="L1459"></a><tt class="py-lineno">1459</tt> <a class="py-toggle" href="#" id="WSGIWorker.write_warning-toggle" onclick="return toggle('WSGIWorker.write_warning');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#write_warning">write_warning</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">sections</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.write_warning-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.write_warning-expanded"><a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">'WSGI app called write method directly.  This is '</tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line">                             <tt class="py-string">'deprecated behavior.  Please update your app.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-496" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-496', 'write', 'link-496');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">sections</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker.write"></a><div id="WSGIWorker.write-def"><a name="L1464"></a><tt class="py-lineno">1464</tt> <a class="py-toggle" href="#" id="WSGIWorker.write-toggle" onclick="return toggle('WSGIWorker.write');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">sections</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.write-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.write-expanded"><a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line">        <tt class="py-docstring">""" Write the data to the output socket. """</tt> </tt>
<a name="L1466"></a><tt class="py-lineno">1466</tt>  <tt class="py-line"> </tt>
<a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-497" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-497', 'error', 'link-71');">error</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-498" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-498', 'error', 'link-71');">error</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1469"></a><tt class="py-lineno">1469</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-499" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-499', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-500" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-500', 'error', 'link-71');">error</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line"> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers_sent</tt><tt class="py-op">:</tt> </tt>
<a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-501" class="py-name" targets="Method web2py.gluon.rocket.WSGIWorker.send_headers()=web2py.gluon.rocket.WSGIWorker-class.html#send_headers"><a title="web2py.gluon.rocket.WSGIWorker.send_headers" class="py-name" href="#" onclick="return doclink('link-501', 'send_headers', 'link-501');">send_headers</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">sections</tt><tt class="py-op">)</tt> </tt>
<a name="L1473"></a><tt class="py-lineno">1473</tt>  <tt class="py-line"> </tt>
<a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_method</tt> <tt class="py-op">!=</tt> <tt class="py-string">'HEAD'</tt><tt class="py-op">:</tt> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunked</tt><tt class="py-op">:</tt> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-502" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-502', 'sendall', 'link-52');">sendall</a></tt><tt class="py-op">(</tt><tt id="link-503" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-503', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-string">'%x\r\n%s\r\n'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-504" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-504', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1478"></a><tt class="py-lineno">1478</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-505" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-505', 'sendall', 'link-52');">sendall</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-506" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-506', 'socket', 'link-0');">socket</a></tt><tt class="py-op">.</tt><tt id="link-507" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-507', 'error', 'link-71');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line">                <tt class="py-comment"># But some clients will close the connection before that</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># resulting in a socket error.</tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">closeConnection</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker.start_response"></a><div id="WSGIWorker.start_response-def"><a name="L1485"></a><tt class="py-lineno">1485</tt> <a class="py-toggle" href="#" id="WSGIWorker.start_response-toggle" onclick="return toggle('WSGIWorker.start_response');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#start_response">start_response</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">status</tt><tt class="py-op">,</tt> <tt class="py-param">response_headers</tt><tt class="py-op">,</tt> <tt class="py-param">exc_info</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.start_response-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.start_response-expanded"><a name="L1486"></a><tt class="py-lineno">1486</tt>  <tt class="py-line">        <tt class="py-docstring">""" Store the HTTP status and headers to be sent when self.write is</tt> </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line"><tt class="py-docstring">        called. """</tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">exc_info</tt><tt class="py-op">:</tt> </tt>
<a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1490"></a><tt class="py-lineno">1490</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers_sent</tt><tt class="py-op">:</tt> </tt>
<a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line">                    <tt class="py-comment"># Re-raise original exception if headers sent</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># because this violates WSGI specification.</tt> </tt>
<a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">raise</tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line">                <tt class="py-name">exc_info</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header_set</tt><tt class="py-op">:</tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">AssertionError</tt><tt class="py-op">(</tt><tt class="py-string">"Headers already set!"</tt><tt class="py-op">)</tt> </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line"> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-508" class="py-name"><a title="web2py.gluon.rocket.PY3K" class="py-name" href="#" onclick="return doclink('link-508', 'PY3K', 'link-21');">PY3K</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-string">'ISO-8859-1'</tt><tt class="py-op">)</tt> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">status</tt> </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line">        <tt class="py-comment"># Make sure headers are bytes objects</tt> </tt>
<a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header_set</tt> <tt class="py-op">=</tt> <tt id="link-509" class="py-name" targets="Class web2py.gluon.rocket.Headers=web2py.gluon.rocket.Headers-class.html"><a title="web2py.gluon.rocket.Headers" class="py-name" href="#" onclick="return doclink('link-509', 'Headers', 'link-509');">Headers</a></tt><tt class="py-op">(</tt><tt class="py-name">response_headers</tt><tt class="py-op">)</tt> </tt>
<a name="L1506"></a><tt class="py-lineno">1506</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">UnicodeDecodeError</tt><tt class="py-op">:</tt> </tt>
<a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-510" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-510', 'error', 'link-71');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'500 Internal Server Error'</tt><tt class="py-op">,</tt> </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line">                          <tt class="py-string">'HTTP Headers should be bytes'</tt><tt class="py-op">)</tt> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-511" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-511', 'error', 'link-71');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Received HTTP Headers from client that contain'</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line">                               <tt class="py-string">' invalid characters for Latin-1 encoding.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line"> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-512" class="py-name" targets="Method web2py.gluon.rocket.WSGIWorker.write_warning()=web2py.gluon.rocket.WSGIWorker-class.html#write_warning"><a title="web2py.gluon.rocket.WSGIWorker.write_warning" class="py-name" href="#" onclick="return doclink('link-512', 'write_warning', 'link-512');">write_warning</a></tt> </tt>
</div><a name="L1513"></a><tt class="py-lineno">1513</tt>  <tt class="py-line"> </tt>
<a name="WSGIWorker.run_app"></a><div id="WSGIWorker.run_app-def"><a name="L1514"></a><tt class="py-lineno">1514</tt> <a class="py-toggle" href="#" id="WSGIWorker.run_app-toggle" onclick="return toggle('WSGIWorker.run_app');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket.WSGIWorker-class.html#run_app">run_app</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">conn</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WSGIWorker.run_app-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="WSGIWorker.run_app-expanded"><a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header_set</tt> <tt class="py-op">=</tt> <tt id="link-513" class="py-name"><a title="web2py.gluon.rocket.Headers" class="py-name" href="#" onclick="return doclink('link-513', 'Headers', 'link-509');">Headers</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers_sent</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-514" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-514', 'error', 'link-71');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunked</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line">        <tt class="py-name">sections</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line">        <tt id="link-515" class="py-name" targets="Method web2py.gluon.template.BlockNode.output()=web2py.gluon.template.BlockNode-class.html#output"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-515', 'output', 'link-515');">output</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line"> </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-516" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-516', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Getting sock_file'</tt><tt class="py-op">)</tt> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line"> </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">        <tt class="py-comment"># Build our file-like object</tt> </tt>
<a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">sock_file</tt> <tt class="py-op">=</tt> <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-517" class="py-name"><a title="web2py.gluon.rocket.Connection.makefile" class="py-name" href="#" onclick="return doclink('link-517', 'makefile', 'link-61');">makefile</a></tt><tt class="py-op">(</tt><tt class="py-string">'rb'</tt><tt class="py-op">,</tt><tt id="link-518" class="py-name"><a title="web2py.gluon.rocket.BUF_SIZE" class="py-name" href="#" onclick="return doclink('link-518', 'BUF_SIZE', 'link-9');">BUF_SIZE</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line"> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1530"></a><tt class="py-lineno">1530</tt>  <tt class="py-line">            <tt class="py-comment"># Read the headers and build our WSGI environment</tt> </tt>
<a name="L1531"></a><tt class="py-lineno">1531</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt> <tt class="py-op">=</tt> <tt class="py-name">environ</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-519" class="py-name" targets="Method web2py.gluon.rocket.WSGIWorker.build_environ()=web2py.gluon.rocket.WSGIWorker-class.html#build_environ"><a title="web2py.gluon.rocket.WSGIWorker.build_environ" class="py-name" href="#" onclick="return doclink('link-519', 'build_environ', 'link-519');">build_environ</a></tt><tt class="py-op">(</tt><tt class="py-name">sock_file</tt><tt class="py-op">,</tt> <tt class="py-name">conn</tt><tt class="py-op">)</tt> </tt>
<a name="L1532"></a><tt class="py-lineno">1532</tt>  <tt class="py-line"> </tt>
<a name="L1533"></a><tt class="py-lineno">1533</tt>  <tt class="py-line">            <tt class="py-comment"># Handle 100 Continue</tt> </tt>
<a name="L1534"></a><tt class="py-lineno">1534</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-520" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-520', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'HTTP_EXPECT'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'100-continue'</tt><tt class="py-op">:</tt> </tt>
<a name="L1535"></a><tt class="py-lineno">1535</tt>  <tt class="py-line">                <tt class="py-name">res</tt> <tt class="py-op">=</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'SERVER_PROTOCOL'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">' 100 Continue\r\n\r\n'</tt> </tt>
<a name="L1536"></a><tt class="py-lineno">1536</tt>  <tt class="py-line">                <tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-521" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-521', 'sendall', 'link-52');">sendall</a></tt><tt class="py-op">(</tt><tt id="link-522" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-522', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-name">res</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1537"></a><tt class="py-lineno">1537</tt>  <tt class="py-line"> </tt>
<a name="L1538"></a><tt class="py-lineno">1538</tt>  <tt class="py-line">            <tt class="py-comment"># Send it to our WSGI application</tt> </tt>
<a name="L1539"></a><tt class="py-lineno">1539</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt id="link-523" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-523', 'output', 'link-515');">output</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">app</tt><tt class="py-op">(</tt><tt class="py-name">environ</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-524" class="py-name" targets="Method web2py.gluon.rocket.WSGIWorker.start_response()=web2py.gluon.rocket.WSGIWorker-class.html#start_response"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-524', 'start_response', 'link-524');">start_response</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1540"></a><tt class="py-lineno">1540</tt>  <tt class="py-line"> </tt>
<a name="L1541"></a><tt class="py-lineno">1541</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-525" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-525', 'output', 'link-515');">output</a></tt><tt class="py-op">,</tt> <tt class="py-string">'__len__'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-526" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-526', 'output', 'link-515');">output</a></tt><tt class="py-op">,</tt> <tt class="py-string">'__iter__'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1542"></a><tt class="py-lineno">1542</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-527" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-527', 'error', 'link-71');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'500 Internal Server Error'</tt><tt class="py-op">,</tt> </tt>
<a name="L1543"></a><tt class="py-lineno">1543</tt>  <tt class="py-line">                              <tt class="py-string">'WSGI applications must return a list or '</tt> </tt>
<a name="L1544"></a><tt class="py-lineno">1544</tt>  <tt class="py-line">                              <tt class="py-string">'generator type.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1545"></a><tt class="py-lineno">1545</tt>  <tt class="py-line"> </tt>
<a name="L1546"></a><tt class="py-lineno">1546</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-528" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-528', 'output', 'link-515');">output</a></tt><tt class="py-op">,</tt> <tt class="py-string">'__len__'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1547"></a><tt class="py-lineno">1547</tt>  <tt class="py-line">                <tt class="py-name">sections</tt> <tt class="py-op">=</tt> <tt id="link-529" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-529', 'len', 'link-83');">len</a></tt><tt class="py-op">(</tt><tt id="link-530" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-530', 'output', 'link-515');">output</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1548"></a><tt class="py-lineno">1548</tt>  <tt class="py-line"> </tt>
<a name="L1549"></a><tt class="py-lineno">1549</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">data</tt> <tt class="py-keyword">in</tt> <tt id="link-531" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-531', 'output', 'link-515');">output</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1550"></a><tt class="py-lineno">1550</tt>  <tt class="py-line">                <tt class="py-comment"># Don't send headers until body appears</tt> </tt>
<a name="L1551"></a><tt class="py-lineno">1551</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">data</tt><tt class="py-op">:</tt> </tt>
<a name="L1552"></a><tt class="py-lineno">1552</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-532" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-532', 'write', 'link-496');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">sections</tt><tt class="py-op">)</tt> </tt>
<a name="L1553"></a><tt class="py-lineno">1553</tt>  <tt class="py-line"> </tt>
<a name="L1554"></a><tt class="py-lineno">1554</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chunked</tt><tt class="py-op">:</tt> </tt>
<a name="L1555"></a><tt class="py-lineno">1555</tt>  <tt class="py-line">                <tt class="py-comment"># If chunked, send our final chunk length</tt> </tt>
<a name="L1556"></a><tt class="py-lineno">1556</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn</tt><tt class="py-op">.</tt><tt id="link-533" class="py-name"><a title="web2py.gluon.rocket.Connection.sendall" class="py-name" href="#" onclick="return doclink('link-533', 'sendall', 'link-52');">sendall</a></tt><tt class="py-op">(</tt><tt id="link-534" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-534', 'b', 'link-377');">b</a></tt><tt class="py-op">(</tt><tt class="py-string">'0\r\n\r\n'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1557"></a><tt class="py-lineno">1557</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">headers_sent</tt><tt class="py-op">:</tt> </tt>
<a name="L1558"></a><tt class="py-lineno">1558</tt>  <tt class="py-line">                <tt class="py-comment"># Send headers if the body was empty</tt> </tt>
<a name="L1559"></a><tt class="py-lineno">1559</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-535" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.send_headers" class="py-name" href="#" onclick="return doclink('link-535', 'send_headers', 'link-501');">send_headers</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">sections</tt><tt class="py-op">)</tt> </tt>
<a name="L1560"></a><tt class="py-lineno">1560</tt>  <tt class="py-line"> </tt>
<a name="L1561"></a><tt class="py-lineno">1561</tt>  <tt class="py-line">        <tt class="py-comment"># Don't capture exceptions here.  The Worker class handles</tt> </tt>
<a name="L1562"></a><tt class="py-lineno">1562</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># them appropriately.</tt> </tt>
<a name="L1563"></a><tt class="py-lineno">1563</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L1564"></a><tt class="py-lineno">1564</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1565"></a><tt class="py-lineno">1565</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">err_log</tt><tt class="py-op">.</tt><tt id="link-536" class="py-name"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-536', 'debug', 'link-116');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'Finally closing output and sock_file'</tt><tt class="py-op">)</tt> </tt>
<a name="L1566"></a><tt class="py-lineno">1566</tt>  <tt class="py-line"> </tt>
<a name="L1567"></a><tt class="py-lineno">1567</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-537" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-537', 'output', 'link-515');">output</a></tt><tt class="py-op">,</tt><tt class="py-string">'close'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1568"></a><tt class="py-lineno">1568</tt>  <tt class="py-line">                <tt id="link-538" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-538', 'output', 'link-515');">output</a></tt><tt class="py-op">.</tt><tt id="link-539" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-539', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1569"></a><tt class="py-lineno">1569</tt>  <tt class="py-line"> </tt>
<a name="L1570"></a><tt class="py-lineno">1570</tt>  <tt class="py-line">            <tt class="py-name">sock_file</tt><tt class="py-op">.</tt><tt id="link-540" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-540', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1571"></a><tt class="py-lineno">1571</tt>  <tt class="py-line"> </tt>
<a name="L1572"></a><tt class="py-lineno">1572</tt>  <tt class="py-line"><tt class="py-comment"># Monolithic build...end of module: rocket\methods\wsgi.py</tt> </tt>
<a name="L1573"></a><tt class="py-lineno">1573</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1574"></a><tt class="py-lineno">1574</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L1575"></a><tt class="py-lineno">1575</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># the following code is not part of Rocket but was added in web2py for testing purposes</tt> </tt>
<a name="L1576"></a><tt class="py-lineno">1576</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L1577"></a><tt class="py-lineno">1577</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="demo_app"></a><div id="demo_app-def"><a name="L1578"></a><tt class="py-lineno">1578</tt> <a class="py-toggle" href="#" id="demo_app-toggle" onclick="return toggle('demo_app');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#demo_app">demo_app</a><tt class="py-op">(</tt><tt class="py-param">environ</tt><tt class="py-op">,</tt> <tt class="py-param">start_response</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="demo_app-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="demo_app-expanded"><a name="L1579"></a><tt class="py-lineno">1579</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt class="py-name">static_folder</tt> </tt>
<a name="L1580"></a><tt class="py-lineno">1580</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L1581"></a><tt class="py-lineno">1581</tt>  <tt class="py-line">    <tt id="link-541" class="py-name" targets="Variable web2py.gluon.dal.BaseAdapter.types=web2py.gluon.dal.BaseAdapter-class.html#types,Variable web2py.gluon.dal.CouchDBAdapter.types=web2py.gluon.dal.CouchDBAdapter-class.html#types,Variable web2py.gluon.dal.DB2Adapter.types=web2py.gluon.dal.DB2Adapter-class.html#types,Variable web2py.gluon.dal.FireBirdAdapter.types=web2py.gluon.dal.FireBirdAdapter-class.html#types,Variable web2py.gluon.dal.GoogleDatastoreAdapter.types=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types,Variable web2py.gluon.dal.InformixAdapter.types=web2py.gluon.dal.InformixAdapter-class.html#types,Variable web2py.gluon.dal.IngresAdapter.types=web2py.gluon.dal.IngresAdapter-class.html#types,Variable web2py.gluon.dal.IngresUnicodeAdapter.types=web2py.gluon.dal.IngresUnicodeAdapter-class.html#types,Variable web2py.gluon.dal.MSSQL2Adapter.types=web2py.gluon.dal.MSSQL2Adapter-class.html#types,Variable web2py.gluon.dal.MSSQLAdapter.types=web2py.gluon.dal.MSSQLAdapter-class.html#types,Variable web2py.gluon.dal.MongoDBAdapter.types=web2py.gluon.dal.MongoDBAdapter-class.html#types,Variable web2py.gluon.dal.MySQLAdapter.types=web2py.gluon.dal.MySQLAdapter-class.html#types,Variable web2py.gluon.dal.OracleAdapter.types=web2py.gluon.dal.OracleAdapter-class.html#types,Variable web2py.gluon.dal.PostgreSQLAdapter.types=web2py.gluon.dal.PostgreSQLAdapter-class.html#types,Variable web2py.gluon.dal.SAPDBAdapter.types=web2py.gluon.dal.SAPDBAdapter-class.html#types,Variable web2py.gluon.dal.TeradataAdapter.types=web2py.gluon.dal.TeradataAdapter-class.html#types"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-541', 'types', 'link-541');">types</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'htm'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/html'</tt><tt class="py-op">,</tt><tt class="py-string">'html'</tt><tt class="py-op">:</tt> <tt class="py-string">'text/html'</tt><tt class="py-op">,</tt><tt class="py-string">'gif'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/gif'</tt><tt class="py-op">,</tt> </tt>
<a name="L1582"></a><tt class="py-lineno">1582</tt>  <tt class="py-line">             <tt class="py-string">'jpg'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/jpeg'</tt><tt class="py-op">,</tt><tt class="py-string">'png'</tt><tt class="py-op">:</tt> <tt class="py-string">'image/png'</tt><tt class="py-op">,</tt><tt class="py-string">'pdf'</tt><tt class="py-op">:</tt> <tt class="py-string">'applications/pdf'</tt><tt class="py-op">}</tt> </tt>
<a name="L1583"></a><tt class="py-lineno">1583</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">static_folder</tt><tt class="py-op">:</tt> </tt>
<a name="L1584"></a><tt class="py-lineno">1584</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">static_folder</tt><tt class="py-op">.</tt><tt id="link-542" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-542', 'startswith', 'link-414');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1585"></a><tt class="py-lineno">1585</tt>  <tt class="py-line">            <tt class="py-name">static_folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-543" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-543', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getcwd</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">static_folder</tt><tt class="py-op">)</tt> </tt>
<a name="L1586"></a><tt class="py-lineno">1586</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-544" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-544', 'join', 'link-155');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">static_folder</tt><tt class="py-op">,</tt> <tt class="py-name">environ</tt><tt class="py-op">[</tt><tt class="py-string">'PATH_INFO'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'index.html'</tt><tt class="py-op">)</tt> </tt>
<a name="L1587"></a><tt class="py-lineno">1587</tt>  <tt class="py-line">        <tt class="py-name">type</tt> <tt class="py-op">=</tt> <tt id="link-545" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-545', 'types', 'link-541');">types</a></tt><tt class="py-op">.</tt><tt id="link-546" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-546', 'get', 'link-189');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-string">'text'</tt><tt class="py-op">)</tt> </tt>
<a name="L1588"></a><tt class="py-lineno">1588</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-547" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-547', 'exists', 'link-84');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1589"></a><tt class="py-lineno">1589</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1590"></a><tt class="py-lineno">1590</tt>  <tt class="py-line">                <tt class="py-name">pathfile</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt><tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L1591"></a><tt class="py-lineno">1591</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1592"></a><tt class="py-lineno">1592</tt>  <tt class="py-line">                    <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">pathfile</tt><tt class="py-op">.</tt><tt id="link-548" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-548', 'read', 'link-329');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1593"></a><tt class="py-lineno">1593</tt>  <tt class="py-line">                <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L1594"></a><tt class="py-lineno">1594</tt>  <tt class="py-line">                    <tt class="py-name">pathfile</tt><tt class="py-op">.</tt><tt id="link-549" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-549', 'close', 'link-69');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1595"></a><tt class="py-lineno">1595</tt>  <tt class="py-line">                <tt id="link-550" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-550', 'start_response', 'link-524');">start_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'200 OK'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">,</tt> <tt class="py-name">type</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1596"></a><tt class="py-lineno">1596</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L1597"></a><tt class="py-lineno">1597</tt>  <tt class="py-line">                <tt id="link-551" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-551', 'start_response', 'link-524');">start_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'404 NOT FOUND'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1598"></a><tt class="py-lineno">1598</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-string">'404 NOT FOUND'</tt> </tt>
<a name="L1599"></a><tt class="py-lineno">1599</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1600"></a><tt class="py-lineno">1600</tt>  <tt class="py-line">            <tt id="link-552" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-552', 'start_response', 'link-524');">start_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'500 INTERNAL SERVER ERROR'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1601"></a><tt class="py-lineno">1601</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-string">'500 INTERNAL SERVER ERROR'</tt> </tt>
<a name="L1602"></a><tt class="py-lineno">1602</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1603"></a><tt class="py-lineno">1603</tt>  <tt class="py-line">        <tt id="link-553" class="py-name"><a title="web2py.gluon.rocket.WSGIWorker.start_response" class="py-name" href="#" onclick="return doclink('link-553', 'start_response', 'link-524');">start_response</a></tt><tt class="py-op">(</tt><tt class="py-string">'200 OK'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">,</tt> <tt class="py-string">'text/html'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1604"></a><tt class="py-lineno">1604</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello from Rocket Web Server&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;'</tt> </tt>
<a name="L1605"></a><tt class="py-lineno">1605</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">data</tt><tt class="py-op">]</tt> </tt>
</div><a name="L1606"></a><tt class="py-lineno">1606</tt>  <tt class="py-line"> </tt>
<a name="demo"></a><div id="demo-def"><a name="L1607"></a><tt class="py-lineno">1607</tt> <a class="py-toggle" href="#" id="demo-toggle" onclick="return toggle('demo');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.rocket-module.html#demo">demo</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="demo-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="demo-expanded"><a name="L1608"></a><tt class="py-lineno">1608</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">optparse</tt> <tt class="py-keyword">import</tt> <tt class="py-name">OptionParser</tt> </tt>
<a name="L1609"></a><tt class="py-lineno">1609</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt class="py-name">OptionParser</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1610"></a><tt class="py-lineno">1610</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">"-i"</tt><tt class="py-op">,</tt> <tt class="py-string">"--ip"</tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">"ip"</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">"127.0.0.1"</tt><tt class="py-op">,</tt> </tt>
<a name="L1611"></a><tt class="py-lineno">1611</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">"ip address of the network interface"</tt><tt class="py-op">)</tt> </tt>
<a name="L1612"></a><tt class="py-lineno">1612</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">"-p"</tt><tt class="py-op">,</tt> <tt class="py-string">"--port"</tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">"port"</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">"8000"</tt><tt class="py-op">,</tt> </tt>
<a name="L1613"></a><tt class="py-lineno">1613</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">"post where to run web server"</tt><tt class="py-op">)</tt> </tt>
<a name="L1614"></a><tt class="py-lineno">1614</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">"-s"</tt><tt class="py-op">,</tt> <tt class="py-string">"--static"</tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">"static"</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1615"></a><tt class="py-lineno">1615</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">"folder containing static files"</tt><tt class="py-op">)</tt> </tt>
<a name="L1616"></a><tt class="py-lineno">1616</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt id="link-554" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-554', 'options', 'link-554');">options</a></tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">parse_args</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1617"></a><tt class="py-lineno">1617</tt>  <tt class="py-line">    <tt class="py-keyword">global</tt> <tt class="py-name">static_folder</tt> </tt>
<a name="L1618"></a><tt class="py-lineno">1618</tt>  <tt class="py-line">    <tt class="py-name">static_folder</tt> <tt class="py-op">=</tt> <tt id="link-555" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-555', 'options', 'link-554');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">static</tt> </tt>
<a name="L1619"></a><tt class="py-lineno">1619</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'Rocket running on %s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-556" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-556', 'options', 'link-554');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt id="link-557" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-557', 'options', 'link-554');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L1620"></a><tt class="py-lineno">1620</tt>  <tt class="py-line">    <tt class="py-name">r</tt><tt class="py-op">=</tt><tt id="link-558" class="py-name"><a title="web2py.gluon.rocket.Rocket" class="py-name" href="#" onclick="return doclink('link-558', 'Rocket', 'link-176');">Rocket</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-559" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-559', 'options', 'link-554');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-560" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-560', 'options', 'link-554');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">'wsgi'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'wsgi_app'</tt><tt class="py-op">:</tt><tt id="link-561" class="py-name" targets="Function web2py.gluon.rocket.demo_app()=web2py.gluon.rocket-module.html#demo_app"><a title="web2py.gluon.rocket.demo_app" class="py-name" href="#" onclick="return doclink('link-561', 'demo_app', 'link-561');">demo_app</a></tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L1621"></a><tt class="py-lineno">1621</tt>  <tt class="py-line">    <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-562" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-562', 'start', 'link-150');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1622"></a><tt class="py-lineno">1622</tt>  <tt class="py-line"> </tt>
<a name="L1623"></a><tt class="py-lineno">1623</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt><tt class="py-op">==</tt><tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L1624"></a><tt class="py-lineno">1624</tt>  <tt class="py-line">    <tt id="link-563" class="py-name" targets="Function web2py.gluon.rocket.demo()=web2py.gluon.rocket-module.html#demo"><a title="web2py.gluon.rocket.demo" class="py-name" href="#" onclick="return doclink('link-563', 'demo', 'link-563');">demo</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1625"></a><tt class="py-lineno">1625</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.BadRequest-class.html version [651b63d531].








































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.BadRequest</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;BadRequest
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.BadRequest-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BadRequest</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#BadRequest">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+
                               |
                              <strong class="uidshort">BadRequest</strong>
</pre>

<hr />
Exception for when a client sends an incomprehensible request.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.ChunkedReader-class.html version [a3e63b2fa3].























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.ChunkedReader</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;ChunkedReader
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.ChunkedReader-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ChunkedReader</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">ChunkedReader</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.ChunkedReader-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sock_file</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_read_header"></a><span class="summary-sig-name">_read_header</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader._read_header">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">size</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader.read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="readline"></a><span class="summary-sig-name">readline</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader.readline">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="readlines"></a><span class="summary-sig-name">readlines</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader.readlines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sock_file</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ChunkedReader.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.Connection-class.html version [ad196c58f0].






























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.Connection</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;Connection
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.Connection-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Connection</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Connection">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Connection</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Connection-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sock_tuple</span>,
        <span class="summary-sig-arg">port</span>,
        <span class="summary-sig-arg">secure</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Connection.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="close"></a><span class="summary-sig-name">close</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Connection.close">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="client_addr"></a><span class="summary-name">client_addr</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="client_port"></a><span class="summary-name">client_port</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="fileno"></a><span class="summary-name">fileno</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="makefile"></a><span class="summary-name">makefile</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="secure"></a><span class="summary-name">secure</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="sendall"></a><span class="summary-name">sendall</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="server_port"></a><span class="summary-name">server_port</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="setblocking"></a><span class="summary-name">setblocking</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="shutdown"></a><span class="summary-name">shutdown</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="socket"></a><span class="summary-name">socket</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ssl"></a><span class="summary-name">ssl</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="start_time"></a><span class="summary-name">start_time</span>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sock_tuple</span>,
        <span class="sig-arg">port</span>,
        <span class="sig-arg">secure</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Connection.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.FileWrapper-class.html version [8c90c0c649].












































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.FileWrapper</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;FileWrapper
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.FileWrapper-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FileWrapper</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#FileWrapper">source&nbsp;code</a></span><br /><br />
Wrapper to convert file-like objects to iterables<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filelike</span>,
        <span class="summary-sig-arg">blksize</span>=<span class="summary-sig-default">16384</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#FileWrapper.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#FileWrapper.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#FileWrapper.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="next"></a><span class="summary-sig-name">next</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#FileWrapper.next">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.Headers-class.html version [2e33dc67c8].






















































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.Headers</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;Headers
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.Headers-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Headers</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers">source&nbsp;code</a></span><br /><br />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">headers</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__setitem__"></a><span class="summary-sig-name">__setitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">val</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__setitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__delitem__"></a><span class="summary-sig-name">__delitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__delitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="has_key"></a><span class="summary-sig-name">has_key</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.has_key">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__contains__"></a><span class="summary-sig-name">__contains__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.has_key">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_all"></a><span class="summary-sig-name">get_all</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.get_all">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get"></a><span class="summary-sig-name">get</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.get">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="keys"></a><span class="summary-sig-name">keys</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.keys">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="values"></a><span class="summary-sig-name">values</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.values">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="items"></a><span class="summary-sig-name">items</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.items">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__repr__"></a><span class="summary-sig-name">__repr__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__str__"></a><span class="summary-sig-name">__str__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setdefault"></a><span class="summary-sig-name">setdefault</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.setdefault">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_header"></a><span class="summary-sig-name">add_header</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">_name</span>,
        <span class="summary-sig-arg">_value</span>,
        <span class="summary-sig-arg">**_params</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Headers.add_header">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.Listener-class.html version [7580afb6ae].







































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.Listener</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;Listener
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.Listener-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Listener</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Listener">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">Listener</strong>
</pre>

<hr />
The Listener class is a class responsible for accepting connections 
  and queuing them to be processed by a worker thread.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Listener-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">interface</span>,
        <span class="summary-sig-arg">queue_size</span>,
        <span class="summary-sig-arg">active_queue</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Listener.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="wrap_socket"></a><span class="summary-sig-name">wrap_socket</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sock</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Listener.wrap_socket">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Listener-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Listener.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">interface</span>,
        <span class="sig-arg">queue_size</span>,
        <span class="sig-arg">active_queue</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Listener.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Listener.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.Monitor-class.html version [e0283ec8a4].



































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.Monitor</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;Monitor
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.Monitor-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Monitor</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Monitor">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">Monitor</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Monitor-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">monitor_queue</span>,
        <span class="summary-sig-arg">active_queue</span>,
        <span class="summary-sig-arg">timeout</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Monitor.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Monitor-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Monitor.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop"></a><span class="summary-sig-name">stop</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Monitor.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">monitor_queue</span>,
        <span class="sig-arg">active_queue</span>,
        <span class="sig-arg">timeout</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Monitor.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Monitor.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.NullHandler-class.html version [7d5333f4d6].








































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.NullHandler</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;NullHandler
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.NullHandler-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class NullHandler</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#NullHandler">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
logging.Filterer --+    
                   |    
     logging.Handler --+
                       |
                      <strong class="uidshort">NullHandler</strong>
</pre>

<hr />
A Logging handler to prevent library errors.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.NullHandler-class.html#emit" class="summary-sig-name">emit</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>)</span><br />
      Do whatever it takes to actually log the specified logging 
      record.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#NullHandler.emit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>logging.Handler</code></b>:
      <code>__init__</code>,
      <code>acquire</code>,
      <code>close</code>,
      <code>createLock</code>,
      <code>flush</code>,
      <code>format</code>,
      <code>handle</code>,
      <code>handleError</code>,
      <code>release</code>,
      <code>setFormatter</code>,
      <code>setLevel</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>logging.Filterer</code></b>:
      <code>addFilter</code>,
      <code>filter</code>,
      <code>removeFilter</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="emit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">emit</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">record</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#NullHandler.emit">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Do whatever it takes to actually log the specified logging record.</p>
  This version is intended to be implemented by subclasses and so raises
  a NotImplementedError.
  <dl class="fields">
    <dt>Overrides:
      logging.Handler.emit
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.Rocket-class.html version [33e74898b0].




























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.Rocket</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;Rocket
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.Rocket-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Rocket</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Rocket</strong>
</pre>

<hr />
The Rocket class is responsible for handling threads and accepting and
  dispatching connections.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Rocket-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">interfaces</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">127.0.0.1</code><code class="variable-quote">'</code><code class="variable-op">, </code>8000<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">method</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">wsgi</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">app_info</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">min_threads</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">max_threads</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">queue_size</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">600</span>,
        <span class="summary-sig-arg">handle_signals</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_sigterm"></a><span class="summary-sig-name">_sigterm</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">signum</span>,
        <span class="summary-sig-arg">frame</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket._sigterm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_sighup"></a><span class="summary-sig-name">_sighup</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">signum</span>,
        <span class="summary-sig-arg">frame</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket._sighup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket.start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop"></a><span class="summary-sig-name">stop</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stoplogging</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="restart"></a><span class="summary-sig-name">restart</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket.restart">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">interfaces</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">127.0.0.1</code><code class="variable-quote">'</code><code class="variable-op">, </code>8000<code class="variable-group">)</code></span>,
        <span class="sig-arg">method</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">wsgi</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">app_info</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">min_threads</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">max_threads</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">queue_size</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">timeout</span>=<span class="sig-default">600</span>,
        <span class="sig-arg">handle_signals</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Rocket.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.SSLError-class.html version [d2b28b62bc].








































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.SSLError</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;SSLError
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.SSLError-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SSLError</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#SSLError">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+    
                               |    
                    socket.error --+
                                   |
                                  <strong class="uidshort">SSLError</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.SocketClosed-class.html version [726b4508b3].








































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.SocketClosed</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;SocketClosed
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.SocketClosed-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SocketClosed</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#SocketClosed">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+
                               |
                              <strong class="uidshort">SocketClosed</strong>
</pre>

<hr />
Exception for when a socket is closed by the client.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.SocketTimeout-class.html version [cb588b8631].








































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.SocketTimeout</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;SocketTimeout
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.SocketTimeout-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SocketTimeout</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#SocketTimeout">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+
                               |
                              <strong class="uidshort">SocketTimeout</strong>
</pre>

<hr />
Exception for when a socket times out between requests.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__init__">__init__</a></code>,
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.ThreadPool-class.html version [f0c9541be1].


































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.ThreadPool</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;ThreadPool
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.ThreadPool-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ThreadPool</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool">source&nbsp;code</a></span><br /><br />
The ThreadPool class is a container class for all the worker threads. 
  It manages the number of actively running threads.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">method</span>,
        <span class="summary-sig-arg">app_info</span>,
        <span class="summary-sig-arg">active_queue</span>,
        <span class="summary-sig-arg">monitor_queue</span>,
        <span class="summary-sig-arg">min_threads</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">max_threads</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop"></a><span class="summary-sig-name">stop</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="bring_out_your_dead"></a><span class="summary-sig-name">bring_out_your_dead</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.bring_out_your_dead">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="grow"></a><span class="summary-sig-name">grow</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">amount</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.grow">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="shrink"></a><span class="summary-sig-name">shrink</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">amount</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.shrink">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dynamic_resize"></a><span class="summary-sig-name">dynamic_resize</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#ThreadPool.dynamic_resize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.WSGIWorker-class.html version [e8e022554d].






























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.WSGIWorker</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;WSGIWorker
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.WSGIWorker-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class WSGIWorker</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+            
                 |            
threading._Verbose --+        
                     |        
      threading.Thread --+    
                         |    
                    <a href="web2py.gluon.rocket.Worker-class.html">Worker</a> --+
                             |
                            <strong class="uidshort">WSGIWorker</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.WSGIWorker-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Builds some instance variables that will last the life of the 
      thread.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="build_environ"></a><span class="summary-sig-name">build_environ</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sock_file</span>,
        <span class="summary-sig-arg">conn</span>)</span><br />
      Build the execution environment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.build_environ">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="send_headers"></a><span class="summary-sig-name">send_headers</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">sections</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.send_headers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write_warning"></a><span class="summary-sig-name">write_warning</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">sections</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.write_warning">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">sections</span>=<span class="summary-sig-default">1</span>)</span><br />
      Write the data to the output socket.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start_response"></a><span class="summary-sig-name">start_response</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">status</span>,
        <span class="summary-sig-arg">response_headers</span>,
        <span class="summary-sig-arg">exc_info</span>=<span class="summary-sig-default">1</span>)</span><br />
      Store the HTTP status and headers to be sent when self.write is 
      called.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.start_response">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.WSGIWorker-class.html#run_app" class="summary-sig-name">run_app</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">conn</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.run_app">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.rocket.Worker-class.html">Worker</a></code></b>:
      <code><a href="web2py.gluon.rocket.Worker-class.html#kill">kill</a></code>,
      <code><a href="web2py.gluon.rocket.Worker-class.html#read_headers">read_headers</a></code>,
      <code><a href="web2py.gluon.rocket.Worker-class.html#read_request_line">read_request_line</a></code>,
      <code><a href="web2py.gluon.rocket.Worker-class.html#run">run</a></code>,
      <code><a href="web2py.gluon.rocket.Worker-class.html#send_response">send_response</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.rocket.Worker-class.html">Worker</a></code></b> (private):
      <code><a href="web2py.gluon.rocket.Worker-class.html#_handleError">_handleError</a></code>,
      <code><a href="web2py.gluon.rocket.Worker-class.html#_read_request_line_jython">_read_request_line_jython</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Builds some instance variables that will last the life of the 
  thread.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.rocket.Worker-class.html#__init__">Worker.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run_app"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run_app</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">conn</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#WSGIWorker.run_app">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.rocket.Worker-class.html#run_app">Worker.run_app</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.rocket.Worker-class.html version [b6709670c1].




















































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket.Worker</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.rocket-module.html">Module&nbsp;rocket</a> ::
        Class&nbsp;Worker
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket.Worker-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Worker</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        <strong class="uidshort">Worker</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.rocket.WSGIWorker-class.html">WSGIWorker</a>
</dd></dl>

<hr />
The Worker class is a base class responsible for receiving connections
  and (a subclass) will run an application to process the the 
  connection<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Worker-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">app_info</span>,
        <span class="summary-sig-arg">active_queue</span>,
        <span class="summary-sig-arg">monitor_queue</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_handleError"></a><span class="summary-sig-name">_handleError</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">typ</span>,
        <span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">tb</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker._handleError">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket.Worker-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="run_app"></a><span class="summary-sig-name">run_app</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">conn</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.run_app">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="send_response"></a><span class="summary-sig-name">send_response</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">status</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.send_response">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="kill"></a><span class="summary-sig-name">kill</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.kill">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read_request_line"></a><span class="summary-sig-name">read_request_line</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sock_file</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.read_request_line">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_read_request_line_jython"></a><span class="summary-sig-name">_read_request_line_jython</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">d</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker._read_request_line_jython">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read_headers"></a><span class="summary-sig-name">read_headers</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sock_file</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.read_headers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b>:
      <code>__repr__</code>,
      <code>getName</code>,
      <code>isAlive</code>,
      <code>isDaemon</code>,
      <code>join</code>,
      <code>setDaemon</code>,
      <code>setName</code>,
      <code>start</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading.Thread</code></b> (private):
      <code>_set_daemon</code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>threading._Verbose</code></b> (private):
      <code>_note</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">app_info</span>,
        <span class="sig-arg">active_queue</span>,
        <span class="sig-arg">monitor_queue</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#Worker.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      threading.Thread.run
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sanitizer-module.html version [23b78e7017].












































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sanitizer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sanitizer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sanitizer-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module sanitizer</h1><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html">source&nbsp;code</a></span><br /><br />
:
<pre class="literalblock">
   # from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496942
   # Title: Cross-site scripting (XSS) defense
   # Submitter: Josh Goldfoot (other recipes)
   # Last Updated: 2006/08/05
   # Version no: 1.0
</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sanitizer.XssCleaner-class.html" class="summary-name">XssCleaner</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xssescape"></a><span class="summary-sig-name">xssescape</span>(<span class="summary-sig-arg">text</span>)</span><br />
      Gets rid of &lt; and &gt; and &amp; and, for good measure, :</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#xssescape">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sanitize"></a><span class="summary-sig-name">sanitize</span>(<span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">permitted_tags</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">br/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">i</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">li</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ol</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">c</code><code class="variable-ellipsis">...</code></span>,
        <span class="summary-sig-arg">allowed_attributes</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">href</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">title</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">type</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">img</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">src</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>,
        <span class="summary-sig-arg">escape</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#sanitize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sanitizer-pysrc.html version [3639cbca25].









































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sanitizer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sanitizer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sanitizer-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.sanitizer-module.html">Module web2py.gluon.sanitizer</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">::</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">    # from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496942</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">    # Title: Cross-site scripting (XSS) defense</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">    # Submitter: Josh Goldfoot (other recipes)</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">    # Last Updated: 2006/08/05</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">    # Version no: 1.0</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">htmllib</tt> <tt class="py-keyword">import</tt> <tt class="py-name">HTMLParser</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">cgi</tt> <tt class="py-keyword">import</tt> <tt class="py-name">escape</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">urlparse</tt> <tt class="py-keyword">import</tt> <tt class="py-name">urlparse</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Method web2py.gluon.dal.Field.formatter()=web2py.gluon.dal.Field-class.html#formatter,Method web2py.gluon.validators.IS_DATE.formatter()=web2py.gluon.validators.IS_DATE-class.html#formatter,Method web2py.gluon.validators.IS_DATETIME.formatter()=web2py.gluon.validators.IS_DATETIME-class.html#formatter,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter,Method web2py.gluon.validators.IS_EMPTY_OR.formatter()=web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter,Method web2py.gluon.validators.Validator.formatter()=web2py.gluon.validators.Validator-class.html#formatter"><a title="web2py.gluon.dal.Field.formatter
web2py.gluon.validators.IS_DATE.formatter
web2py.gluon.validators.IS_DATETIME.formatter
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter
web2py.gluon.validators.IS_EMPTY_OR.formatter
web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter
web2py.gluon.validators.Validator.formatter" class="py-name" href="#" onclick="return doclink('link-0', 'formatter', 'link-0');">formatter</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">AbstractFormatter</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">htmlentitydefs</tt> <tt class="py-keyword">import</tt> <tt class="py-name">entitydefs</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Method web2py.gluon.dal.Rows.xml()=web2py.gluon.dal.Rows-class.html#xml,Method web2py.gluon.html.A.xml()=web2py.gluon.html.A-class.html#xml,Method web2py.gluon.html.CODE.xml()=web2py.gluon.html.CODE-class.html#xml,Method web2py.gluon.html.DIV.xml()=web2py.gluon.html.DIV-class.html#xml,Method web2py.gluon.html.FORM.xml()=web2py.gluon.html.FORM-class.html#xml,Method web2py.gluon.html.HTML.xml()=web2py.gluon.html.HTML-class.html#xml,Method web2py.gluon.html.INPUT.xml()=web2py.gluon.html.INPUT-class.html#xml,Method web2py.gluon.html.MARKMIN.xml()=web2py.gluon.html.MARKMIN-class.html#xml,Method web2py.gluon.html.MENU.xml()=web2py.gluon.html.MENU-class.html#xml,Method web2py.gluon.html.P.xml()=web2py.gluon.html.P-class.html#xml,Method web2py.gluon.html.SCRIPT.xml()=web2py.gluon.html.SCRIPT-class.html#xml,Method web2py.gluon.html.STYLE.xml()=web2py.gluon.html.STYLE-class.html#xml,Method web2py.gluon.html.XHTML.xml()=web2py.gluon.html.XHTML-class.html#xml,Method web2py.gluon.html.XML.xml()=web2py.gluon.html.XML-class.html#xml,Method web2py.gluon.html.XmlComponent.xml()=web2py.gluon.html.XmlComponent-class.html#xml,Method web2py.gluon.languages.lazyT.xml()=web2py.gluon.languages.lazyT-class.html#xml,Function web2py.gluon.serializers.xml()=web2py.gluon.serializers-module.html#xml,Method web2py.gluon.tools.Recaptcha.xml()=web2py.gluon.tools.Recaptcha-class.html#xml,Method web2py.gluon.tools.Service.xml()=web2py.gluon.tools.Service-class.html#xml"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-1', 'xml', 'link-1');">xml</a></tt><tt class="py-op">.</tt><tt class="py-name">sax</tt><tt class="py-op">.</tt><tt class="py-name">saxutils</tt> <tt class="py-keyword">import</tt> <tt class="py-name">quoteattr</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'sanitize'</tt><tt class="py-op">]</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="xssescape"></a><div id="xssescape-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="xssescape-toggle" onclick="return toggle('xssescape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer-module.html#xssescape">xssescape</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="xssescape-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="xssescape-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-docstring">"""Gets rid of &lt; and &gt; and &amp; and, for good measure, :"""</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">quote</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt> <tt class="py-string">'&amp;#58;'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner"></a><div id="XssCleaner-def"><a name="L32"></a><tt class="py-lineno"> 32</tt> <a class="py-toggle" href="#" id="XssCleaner-toggle" onclick="return toggle('XssCleaner');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html">XssCleaner</a><tt class="py-op">(</tt><tt class="py-base-class">HTMLParser</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="XssCleaner-expanded"><a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.__init__"></a><div id="XssCleaner.__init__-def"><a name="L34"></a><tt class="py-lineno"> 34</tt> <a class="py-toggle" href="#" id="XssCleaner.__init__-toggle" onclick="return toggle('XssCleaner.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-param">permitted_tags</tt><tt class="py-op">=</tt><tt class="py-op">[</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">            <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">            <tt class="py-string">'b'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">            <tt class="py-string">'blockquote'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">            <tt class="py-string">'br/'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-string">'i'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">            <tt class="py-string">'li'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">            <tt class="py-string">'ol'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">            <tt class="py-string">'ul'</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">            <tt class="py-string">'p'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">            <tt class="py-string">'cite'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">            <tt class="py-string">'code'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">            <tt class="py-string">'pre'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">            <tt class="py-string">'img/'</tt><tt class="py-op">,</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">            <tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-param">allowed_attributes</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'alt'</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">                            <tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'blockquote'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-name">fmt</tt><tt class="py-op">=</tt><tt class="py-name">AbstractFormatter</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-name">strip_disallowed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.__init__-expanded"><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">HTMLParser</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-2', '__init__', 'link-2');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">fmt</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">i</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">permitted_tags</tt> <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'/'</tt><tt class="py-op">]</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">permitted_tags</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">                                  <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt><tt class="py-op">]</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed_attributes</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-comment"># The only schemes allowed in URLs (for href and src attributes).</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># Adding "javascript" or "vbscript" to this list would not be smart.</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'http'</tt><tt class="py-op">,</tt> <tt class="py-string">'https'</tt><tt class="py-op">,</tt> <tt class="py-string">'ftp'</tt><tt class="py-op">]</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-comment">#to strip or escape disallowed tags?</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strip_disallowed</tt> <tt class="py-op">=</tt> <tt class="py-name">strip_disallowed</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_data"></a><div id="XssCleaner.handle_data-def"><a name="L75"></a><tt class="py-lineno"> 75</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_data-toggle" onclick="return toggle('XssCleaner.handle_data');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_data">handle_data</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_data-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_data-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">data</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt><tt class="py-op">:</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-3" class="py-name" targets="Function web2py.gluon.sanitizer.xssescape()=web2py.gluon.sanitizer-module.html#xssescape"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-3', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_charref"></a><div id="XssCleaner.handle_charref-def"><a name="L79"></a><tt class="py-lineno"> 79</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_charref-toggle" onclick="return toggle('XssCleaner.handle_charref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_charref">handle_charref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ref</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_charref-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_charref-expanded"><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt><tt class="py-op">:</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-4" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-4', 'len', 'link-4');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">ref</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">7</tt> <tt class="py-keyword">and</tt> <tt class="py-name">ref</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&amp;#%s;'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-5', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&amp;#%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt><tt class="py-op">)</tt> </tt>
</div><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_entityref"></a><div id="XssCleaner.handle_entityref-def"><a name="L87"></a><tt class="py-lineno"> 87</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_entityref-toggle" onclick="return toggle('XssCleaner.handle_entityref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_entityref">handle_entityref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ref</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_entityref-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_entityref-expanded"><a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt><tt class="py-op">:</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">ref</tt> <tt class="py-keyword">in</tt> <tt class="py-name">entitydefs</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&amp;%s;'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-6" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-6', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&amp;%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt><tt class="py-op">)</tt> </tt>
</div><a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_comment"></a><div id="XssCleaner.handle_comment-def"><a name="L95"></a><tt class="py-lineno"> 95</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_comment-toggle" onclick="return toggle('XssCleaner.handle_comment');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_comment">handle_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">comment</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_comment-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_comment-expanded"><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt><tt class="py-op">:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">comment</tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-7" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-7', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;!--%s--&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">comment</tt><tt class="py-op">)</tt> </tt>
</div><a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_starttag"></a><div id="XssCleaner.handle_starttag-def"><a name="L101"></a><tt class="py-lineno">101</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_starttag-toggle" onclick="return toggle('XssCleaner.handle_starttag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_starttag">handle_starttag</a><tt class="py-op">(</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-param">tag</tt><tt class="py-op">,</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-param">method</tt><tt class="py-op">,</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-param">attrs</tt><tt class="py-op">,</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_starttag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_starttag-expanded"><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-8" class="py-name" targets="Variable web2py.gluon.html.A.tag=web2py.gluon.html.A-class.html#tag,Variable web2py.gluon.html.B.tag=web2py.gluon.html.B-class.html#tag,Variable web2py.gluon.html.BEAUTIFY.tag=web2py.gluon.html.BEAUTIFY-class.html#tag,Variable web2py.gluon.html.BODY.tag=web2py.gluon.html.BODY-class.html#tag,Variable web2py.gluon.html.BR.tag=web2py.gluon.html.BR-class.html#tag,Variable web2py.gluon.html.BUTTON.tag=web2py.gluon.html.BUTTON-class.html#tag,Variable web2py.gluon.html.CAT.tag=web2py.gluon.html.CAT-class.html#tag,Variable web2py.gluon.html.CENTER.tag=web2py.gluon.html.CENTER-class.html#tag,Variable web2py.gluon.html.COL.tag=web2py.gluon.html.COL-class.html#tag,Variable web2py.gluon.html.COLGROUP.tag=web2py.gluon.html.COLGROUP-class.html#tag,Variable web2py.gluon.html.DIV.tag=web2py.gluon.html.DIV-class.html#tag,Variable web2py.gluon.html.EM.tag=web2py.gluon.html.EM-class.html#tag,Variable web2py.gluon.html.EMBED.tag=web2py.gluon.html.EMBED-class.html#tag,Variable web2py.gluon.html.FIELDSET.tag=web2py.gluon.html.FIELDSET-class.html#tag,Variable web2py.gluon.html.FORM.tag=web2py.gluon.html.FORM-class.html#tag,Variable web2py.gluon.html.H1.tag=web2py.gluon.html.H1-class.html#tag,Variable web2py.gluon.html.H2.tag=web2py.gluon.html.H2-class.html#tag,Variable web2py.gluon.html.H3.tag=web2py.gluon.html.H3-class.html#tag,Variable web2py.gluon.html.H4.tag=web2py.gluon.html.H4-class.html#tag,Variable web2py.gluon.html.H5.tag=web2py.gluon.html.H5-class.html#tag,Variable web2py.gluon.html.H6.tag=web2py.gluon.html.H6-class.html#tag,Variable web2py.gluon.html.HEAD.tag=web2py.gluon.html.HEAD-class.html#tag,Variable web2py.gluon.html.HR.tag=web2py.gluon.html.HR-class.html#tag,Variable web2py.gluon.html.HTML.tag=web2py.gluon.html.HTML-class.html#tag,Variable web2py.gluon.html.I.tag=web2py.gluon.html.I-class.html#tag,Variable web2py.gluon.html.IFRAME.tag=web2py.gluon.html.IFRAME-class.html#tag,Variable web2py.gluon.html.IMG.tag=web2py.gluon.html.IMG-class.html#tag,Variable web2py.gluon.html.INPUT.tag=web2py.gluon.html.INPUT-class.html#tag,Variable web2py.gluon.html.LABEL.tag=web2py.gluon.html.LABEL-class.html#tag,Variable web2py.gluon.html.LEGEND.tag=web2py.gluon.html.LEGEND-class.html#tag,Variable web2py.gluon.html.LI.tag=web2py.gluon.html.LI-class.html#tag,Variable web2py.gluon.html.LINK.tag=web2py.gluon.html.LINK-class.html#tag,Variable web2py.gluon.html.MENU.tag=web2py.gluon.html.MENU-class.html#tag,Variable web2py.gluon.html.META.tag=web2py.gluon.html.META-class.html#tag,Variable web2py.gluon.html.OBJECT.tag=web2py.gluon.html.OBJECT-class.html#tag,Variable web2py.gluon.html.OL.tag=web2py.gluon.html.OL-class.html#tag,Variable web2py.gluon.html.OPTGROUP.tag=web2py.gluon.html.OPTGROUP-class.html#tag,Variable web2py.gluon.html.OPTION.tag=web2py.gluon.html.OPTION-class.html#tag,Variable web2py.gluon.html.P.tag=web2py.gluon.html.P-class.html#tag,Variable web2py.gluon.html.PRE.tag=web2py.gluon.html.PRE-class.html#tag,Variable web2py.gluon.html.SCRIPT.tag=web2py.gluon.html.SCRIPT-class.html#tag,Variable web2py.gluon.html.SELECT.tag=web2py.gluon.html.SELECT-class.html#tag,Variable web2py.gluon.html.SPAN.tag=web2py.gluon.html.SPAN-class.html#tag,Variable web2py.gluon.html.STYLE.tag=web2py.gluon.html.STYLE-class.html#tag,Variable web2py.gluon.html.TABLE.tag=web2py.gluon.html.TABLE-class.html#tag,Variable web2py.gluon.html.TBODY.tag=web2py.gluon.html.TBODY-class.html#tag,Variable web2py.gluon.html.TD.tag=web2py.gluon.html.TD-class.html#tag,Variable web2py.gluon.html.TEXTAREA.tag=web2py.gluon.html.TEXTAREA-class.html#tag,Variable web2py.gluon.html.TFOOT.tag=web2py.gluon.html.TFOOT-class.html#tag,Variable web2py.gluon.html.TH.tag=web2py.gluon.html.TH-class.html#tag,Variable web2py.gluon.html.THEAD.tag=web2py.gluon.html.THEAD-class.html#tag,Variable web2py.gluon.html.TITLE.tag=web2py.gluon.html.TITLE-class.html#tag,Variable web2py.gluon.html.TR.tag=web2py.gluon.html.TR-class.html#tag,Variable web2py.gluon.html.TT.tag=web2py.gluon.html.TT-class.html#tag,Variable web2py.gluon.html.UL.tag=web2py.gluon.html.UL-class.html#tag,Variable web2py.gluon.html.XHTML.tag=web2py.gluon.html.XHTML-class.html#tag"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-8', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strip_disallowed</tt><tt class="py-op">:</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-9" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-9', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;%s&gt;'</tt> <tt class="py-op">%</tt> <tt id="link-10" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-10', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">            <tt class="py-name">bt</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;'</tt> <tt class="py-op">+</tt> <tt id="link-11" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-11', 'tag', 'link-8');">tag</a></tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-12" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-12', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                <tt class="py-name">attrs</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes_here</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-13" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-13', 'x', 'link-13');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-14" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-14', 'x', 'link-13');">x</a></tt> <tt class="py-keyword">in</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">[</tt><tt id="link-15" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-15', 'tag', 'link-8');">tag</a></tt><tt class="py-op">]</tt> <tt class="py-keyword">if</tt> <tt id="link-16" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-16', 'x', 'link-13');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">attrs</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">                         <tt class="py-keyword">and</tt> <tt id="link-17" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-17', 'len', 'link-4');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt id="link-18" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-18', 'x', 'link-13');">x</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">attribute</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes_here</tt><tt class="py-op">:</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">attribute</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'background'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.url_is_acceptable()=web2py.gluon.sanitizer.XssCleaner-class.html#url_is_acceptable"><a title="web2py.gluon.sanitizer.XssCleaner.url_is_acceptable" class="py-name" href="#" onclick="return doclink('link-19', 'url_is_acceptable', 'link-19');">url_is_acceptable</a></tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">                            <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">attribute</tt><tt class="py-op">,</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">                                    <tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                        <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s=%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-20', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">attribute</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">                                <tt class="py-name">quoteattr</tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">bt</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;a'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">bt</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;img'</tt><tt class="py-op">:</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-21', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">                <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">' /'</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">            <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&gt;'</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-name">bt</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-22', 'insert', 'link-22');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-23', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_endtag"></a><div id="XssCleaner.handle_endtag-def"><a name="L135"></a><tt class="py-lineno">135</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_endtag-toggle" onclick="return toggle('XssCleaner.handle_endtag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_endtag">handle_endtag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_endtag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_endtag-expanded"><a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">bracketed</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-24', 'tag', 'link-8');">tag</a></tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-25', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strip_disallowed</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">in_disallowed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-26', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">bracketed</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-27', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-name">bracketed</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-28', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.unknown_starttag"></a><div id="XssCleaner.unknown_starttag-def"><a name="L146"></a><tt class="py-lineno">146</tt> <a class="py-toggle" href="#" id="XssCleaner.unknown_starttag-toggle" onclick="return toggle('XssCleaner.unknown_starttag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#unknown_starttag">unknown_starttag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.unknown_starttag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.unknown_starttag-expanded"><a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.html.web2pyHTMLParser.handle_starttag()=web2py.gluon.html.web2pyHTMLParser-class.html#handle_starttag,Method web2py.gluon.sanitizer.XssCleaner.handle_starttag()=web2py.gluon.sanitizer.XssCleaner-class.html#handle_starttag"><a title="web2py.gluon.html.web2pyHTMLParser.handle_starttag
web2py.gluon.sanitizer.XssCleaner.handle_starttag" class="py-name" href="#" onclick="return doclink('link-29', 'handle_starttag', 'link-29');">handle_starttag</a></tt><tt class="py-op">(</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-30', 'tag', 'link-8');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
</div><a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.unknown_endtag"></a><div id="XssCleaner.unknown_endtag-def"><a name="L149"></a><tt class="py-lineno">149</tt> <a class="py-toggle" href="#" id="XssCleaner.unknown_endtag-toggle" onclick="return toggle('XssCleaner.unknown_endtag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#unknown_endtag">unknown_endtag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.unknown_endtag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.unknown_endtag-expanded"><a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method web2py.gluon.html.web2pyHTMLParser.handle_endtag()=web2py.gluon.html.web2pyHTMLParser-class.html#handle_endtag,Method web2py.gluon.sanitizer.XssCleaner.handle_endtag()=web2py.gluon.sanitizer.XssCleaner-class.html#handle_endtag"><a title="web2py.gluon.html.web2pyHTMLParser.handle_endtag
web2py.gluon.sanitizer.XssCleaner.handle_endtag" class="py-name" href="#" onclick="return doclink('link-31', 'handle_endtag', 'link-31');">handle_endtag</a></tt><tt class="py-op">(</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-32', 'tag', 'link-8');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.url_is_acceptable"></a><div id="XssCleaner.url_is_acceptable-def"><a name="L152"></a><tt class="py-lineno">152</tt> <a class="py-toggle" href="#" id="XssCleaner.url_is_acceptable-toggle" onclick="return toggle('XssCleaner.url_is_acceptable');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#url_is_acceptable">url_is_acceptable</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.url_is_acceptable-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.url_is_acceptable-expanded"><a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"><tt class="py-docstring">        Accepts relative and absolute urls</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-name">parsed</tt> <tt class="py-op">=</tt> <tt class="py-name">urlparse</tt><tt class="py-op">(</tt><tt id="link-33" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-33', 'url', 'link-33');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">parsed</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">parsed</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> \ </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">            <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">parsed</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt> <tt class="py-keyword">and</tt> <tt class="py-name">parsed</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-34', 'startswith', 'link-34');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.strip"></a><div id="XssCleaner.strip-def"><a name="L161"></a><tt class="py-lineno">161</tt> <a class="py-toggle" href="#" id="XssCleaner.strip-toggle" onclick="return toggle('XssCleaner.strip');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#strip">strip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">rawstring</tt><tt class="py-op">,</tt> <tt class="py-param">escape</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.strip-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.strip-expanded"><a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line"><tt class="py-docstring">        Returns the argument stripped of potentially harmful</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"><tt class="py-docstring">        HTML or Javascript code</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"><tt class="py-docstring">        @type escape: boolean</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line"><tt class="py-docstring">        @param escape: If True (default) it escapes the potentially harmful</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"><tt class="py-docstring">          content, otherwise remove it</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">rawstring</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">rawstring</tt><tt class="py-op">)</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-35', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt><tt class="py-op">:</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">            <tt class="py-name">rawstring</tt> <tt class="py-op">=</tt> <tt class="py-name">rawstring</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"&lt;%s/&gt;"</tt> <tt class="py-op">%</tt> <tt id="link-36" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-36', 'tag', 'link-8');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-string">"&lt;%s /&gt;"</tt> <tt class="py-op">%</tt> <tt id="link-37" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-37', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">escape</tt><tt class="py-op">:</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">strip_disallowed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">feed</tt><tt class="py-op">(</tt><tt class="py-name">rawstring</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">endtag</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">endtag</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt><tt class="py-op">:</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">endtag</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> </tt>
</div><a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.xtags"></a><div id="XssCleaner.xtags-def"><a name="L183"></a><tt class="py-lineno">183</tt> <a class="py-toggle" href="#" id="XssCleaner.xtags-toggle" onclick="return toggle('XssCleaner.xtags');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer.XssCleaner-class.html#xtags">xtags</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.xtags-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.xtags-expanded"><a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a printable string informing the user which tags are allowed</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line"> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-name">tg</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-38" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-38', 'x', 'link-13');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">            <tt class="py-name">tg</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&lt;'</tt> <tt class="py-op">+</tt> <tt id="link-39" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-39', 'x', 'link-13');">x</a></tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-40" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-40', 'x', 'link-13');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">y</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">[</tt><tt id="link-41" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-41', 'x', 'link-13');">x</a></tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">                    <tt class="py-name">tg</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s=""'</tt> <tt class="py-op">%</tt> <tt class="py-name">y</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">            <tt class="py-name">tg</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&gt; '</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-42" class="py-name"><a title="web2py.gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-42', 'xssescape', 'link-3');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">tg</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-43', 'strip', 'link-43');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"> </tt>
<a name="sanitize"></a><div id="sanitize-def"><a name="L198"></a><tt class="py-lineno">198</tt> <a class="py-toggle" href="#" id="sanitize-toggle" onclick="return toggle('sanitize');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sanitizer-module.html#sanitize">sanitize</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">,</tt> <tt class="py-param">permitted_tags</tt><tt class="py-op">=</tt><tt class="py-op">[</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">        <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">        <tt class="py-string">'b'</tt><tt class="py-op">,</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">        <tt class="py-string">'blockquote'</tt><tt class="py-op">,</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">        <tt class="py-string">'br/'</tt><tt class="py-op">,</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">        <tt class="py-string">'i'</tt><tt class="py-op">,</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">        <tt class="py-string">'li'</tt><tt class="py-op">,</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-string">'ol'</tt><tt class="py-op">,</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-string">'ul'</tt><tt class="py-op">,</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt class="py-string">'p'</tt><tt class="py-op">,</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-string">'cite'</tt><tt class="py-op">,</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-string">'code'</tt><tt class="py-op">,</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-string">'pre'</tt><tt class="py-op">,</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-string">'img/'</tt><tt class="py-op">,</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">        <tt class="py-string">'h1'</tt><tt class="py-op">,</tt><tt class="py-string">'h2'</tt><tt class="py-op">,</tt><tt class="py-string">'h3'</tt><tt class="py-op">,</tt><tt class="py-string">'h4'</tt><tt class="py-op">,</tt><tt class="py-string">'h5'</tt><tt class="py-op">,</tt><tt class="py-string">'h6'</tt><tt class="py-op">,</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-string">'table'</tt><tt class="py-op">,</tt><tt class="py-string">'tr'</tt><tt class="py-op">,</tt><tt class="py-string">'td'</tt><tt class="py-op">,</tt><tt class="py-string">'div'</tt><tt class="py-op">,</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">             <tt class="py-param">allowed_attributes</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">        <tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'alt'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">        <tt class="py-string">'blockquote'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">        <tt class="py-string">'td'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'colspan'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">        <tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">             <tt class="py-name">escape</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="sanitize-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="sanitize-expanded"><a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-44" class="py-name" targets="Class web2py.gluon.sanitizer.XssCleaner=web2py.gluon.sanitizer.XssCleaner-class.html"><a title="web2py.gluon.sanitizer.XssCleaner" class="py-name" href="#" onclick="return doclink('link-44', 'XssCleaner', 'link-44');">XssCleaner</a></tt><tt class="py-op">(</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">=</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">,</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                      <tt class="py-name">allowed_attributes</tt><tt class="py-op">=</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-45', 'strip', 'link-43');">strip</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">escape</tt><tt class="py-op">)</tt> </tt>
</div><a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sanitizer.XssCleaner-class.html version [0c43de2900].





















































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sanitizer.XssCleaner</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sanitizer-module.html">Module&nbsp;sanitizer</a> ::
        Class&nbsp;XssCleaner
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sanitizer.XssCleaner-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class XssCleaner</h1><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
markupbase.ParserBase --+        
                        |        
       sgmllib.SGMLParser --+    
                            |    
           htmllib.HTMLParser --+
                                |
                               <strong class="uidshort">XssCleaner</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">permitted_tags</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">br/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">i</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">li</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ol</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">c</code><code class="variable-ellipsis">...</code></span>,
        <span class="summary-sig-arg">allowed_attributes</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">href</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">title</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">type</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">img</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">src</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>,
        <span class="summary-sig-arg">fmt</span>=<span class="summary-sig-default">&lt;class formatter.AbstractFormatter at 0xa77cb0&gt;</span>,
        <span class="summary-sig-arg">strip_disallowed</span>=<span class="summary-sig-default">True</span>)</span><br />
      Creates an instance of the HTMLParser class.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_data" class="summary-sig-name">handle_data</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_data">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_charref" class="summary-sig-name">handle_charref</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ref</span>)</span><br />
      Handle character reference, no need to override.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_charref">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_entityref" class="summary-sig-name">handle_entityref</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ref</span>)</span><br />
      Handle entity references, no need to override.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_entityref">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_comment" class="summary-sig-name">handle_comment</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">comment</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_comment">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_starttag" class="summary-sig-name">handle_starttag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tag</span>,
        <span class="summary-sig-arg">method</span>,
        <span class="summary-sig-arg">attrs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_starttag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#handle_endtag" class="summary-sig-name">handle_endtag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tag</span>,
        <span class="summary-sig-arg">attrs</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_endtag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#unknown_starttag" class="summary-sig-name">unknown_starttag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tag</span>,
        <span class="summary-sig-arg">attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.unknown_starttag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#unknown_endtag" class="summary-sig-name">unknown_endtag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tag</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.unknown_endtag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="url_is_acceptable"></a><span class="summary-sig-name">url_is_acceptable</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">url</span>)</span><br />
      Accepts relative and absolute urls</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.url_is_acceptable">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sanitizer.XssCleaner-class.html#strip" class="summary-sig-name">strip</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rawstring</span>,
        <span class="summary-sig-arg">escape</span>=<span class="summary-sig-default">True</span>)</span><br />
      Returns the argument stripped of potentially harmful HTML or 
      Javascript code</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.strip">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xtags"></a><span class="summary-sig-name">xtags</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns a printable string informing the user which tags are 
      allowed</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.xtags">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>htmllib.HTMLParser</code></b>:
      <code>anchor_bgn</code>,
      <code>anchor_end</code>,
      <code>ddpop</code>,
      <code>do_base</code>,
      <code>do_br</code>,
      <code>do_dd</code>,
      <code>do_dt</code>,
      <code>do_hr</code>,
      <code>do_img</code>,
      <code>do_isindex</code>,
      <code>do_li</code>,
      <code>do_link</code>,
      <code>do_meta</code>,
      <code>do_nextid</code>,
      <code>do_p</code>,
      <code>do_plaintext</code>,
      <code>end_a</code>,
      <code>end_address</code>,
      <code>end_b</code>,
      <code>end_blockquote</code>,
      <code>end_body</code>,
      <code>end_cite</code>,
      <code>end_code</code>,
      <code>end_dir</code>,
      <code>end_dl</code>,
      <code>end_em</code>,
      <code>end_h1</code>,
      <code>end_h2</code>,
      <code>end_h3</code>,
      <code>end_h4</code>,
      <code>end_h5</code>,
      <code>end_h6</code>,
      <code>end_head</code>,
      <code>end_html</code>,
      <code>end_i</code>,
      <code>end_kbd</code>,
      <code>end_listing</code>,
      <code>end_menu</code>,
      <code>end_ol</code>,
      <code>end_pre</code>,
      <code>end_samp</code>,
      <code>end_strong</code>,
      <code>end_title</code>,
      <code>end_tt</code>,
      <code>end_ul</code>,
      <code>end_var</code>,
      <code>end_xmp</code>,
      <code>error</code>,
      <code>handle_image</code>,
      <code>reset</code>,
      <code>save_bgn</code>,
      <code>save_end</code>,
      <code>start_a</code>,
      <code>start_address</code>,
      <code>start_b</code>,
      <code>start_blockquote</code>,
      <code>start_body</code>,
      <code>start_cite</code>,
      <code>start_code</code>,
      <code>start_dir</code>,
      <code>start_dl</code>,
      <code>start_em</code>,
      <code>start_h1</code>,
      <code>start_h2</code>,
      <code>start_h3</code>,
      <code>start_h4</code>,
      <code>start_h5</code>,
      <code>start_h6</code>,
      <code>start_head</code>,
      <code>start_html</code>,
      <code>start_i</code>,
      <code>start_kbd</code>,
      <code>start_listing</code>,
      <code>start_menu</code>,
      <code>start_ol</code>,
      <code>start_pre</code>,
      <code>start_samp</code>,
      <code>start_strong</code>,
      <code>start_title</code>,
      <code>start_tt</code>,
      <code>start_ul</code>,
      <code>start_var</code>,
      <code>start_xmp</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>sgmllib.SGMLParser</code></b>:
      <code>close</code>,
      <code>convert_charref</code>,
      <code>convert_codepoint</code>,
      <code>convert_entityref</code>,
      <code>feed</code>,
      <code>finish_endtag</code>,
      <code>finish_shorttag</code>,
      <code>finish_starttag</code>,
      <code>get_starttag_text</code>,
      <code>goahead</code>,
      <code>handle_decl</code>,
      <code>handle_pi</code>,
      <code>parse_endtag</code>,
      <code>parse_pi</code>,
      <code>parse_starttag</code>,
      <code>report_unbalanced</code>,
      <code>setliteral</code>,
      <code>setnomoretags</code>,
      <code>unknown_charref</code>,
      <code>unknown_entityref</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>sgmllib.SGMLParser</code></b> (private):
      <code>_convert_ref</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>markupbase.ParserBase</code></b>:
      <code>getpos</code>,
      <code>parse_comment</code>,
      <code>parse_declaration</code>,
      <code>parse_marked_section</code>,
      <code>unknown_decl</code>,
      <code>updatepos</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>markupbase.ParserBase</code></b> (private):
      <code>_parse_doctype_attlist</code>,
      <code>_parse_doctype_element</code>,
      <code>_parse_doctype_entity</code>,
      <code>_parse_doctype_notation</code>,
      <code>_parse_doctype_subset</code>,
      <code>_scan_name</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>sgmllib.SGMLParser</code></b>:
      <code>entity_or_charref</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>sgmllib.SGMLParser</code></b> (private):
      <code>_decl_otherchars</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">permitted_tags</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">br/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">i</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">li</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ol</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ul</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">p</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">c</code><code class="variable-ellipsis">...</code></span>,
        <span class="sig-arg">allowed_attributes</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">a</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">href</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">title</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">blockquote</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">type</code><code class="variable-quote">'</code><code class="variable-group">]</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">img</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">src</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>,
        <span class="sig-arg">fmt</span>=<span class="sig-default">&lt;class formatter.AbstractFormatter at 0xa77cb0&gt;</span>,
        <span class="sig-arg">strip_disallowed</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Creates an instance of the HTMLParser class.</p>
  The formatter parameter is the formatter instance associated with the 
  parser.
  <dl class="fields">
    <dt>Overrides:
      htmllib.HTMLParser.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_data"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_data</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_data">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      htmllib.HTMLParser.handle_data
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_charref"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_charref</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ref</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_charref">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Handle character reference, no need to override.
  <dl class="fields">
    <dt>Overrides:
      sgmllib.SGMLParser.handle_charref
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_entityref"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_entityref</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ref</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_entityref">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Handle entity references, no need to override.
  <dl class="fields">
    <dt>Overrides:
      sgmllib.SGMLParser.handle_entityref
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_comment"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_comment</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">comment</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_comment">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      sgmllib.SGMLParser.handle_comment
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_starttag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_starttag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tag</span>,
        <span class="sig-arg">method</span>,
        <span class="sig-arg">attrs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_starttag">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      sgmllib.SGMLParser.handle_starttag
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="handle_endtag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">handle_endtag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tag</span>,
        <span class="sig-arg">attrs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.handle_endtag">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      sgmllib.SGMLParser.handle_endtag
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="unknown_starttag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unknown_starttag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tag</span>,
        <span class="sig-arg">attributes</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.unknown_starttag">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      htmllib.HTMLParser.unknown_starttag
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="unknown_endtag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unknown_endtag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tag</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.unknown_endtag">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      htmllib.HTMLParser.unknown_endtag
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="strip"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">strip</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">rawstring</span>,
        <span class="sig-arg">escape</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sanitizer-pysrc.html#XssCleaner.strip">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Returns the argument stripped of potentially harmful HTML or 
  Javascript code
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>escape</code></strong> (boolean) - If True (default) it escapes the potentially harmful content, 
          otherwise remove it</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.serializers-module.html version [581c663b6c].














































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.serializers</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;serializers
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.serializers-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module serializers</h1><span class="codelink"><a href="web2py.gluon.serializers-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="custom_json"></a><span class="summary-sig-name">custom_json</span>(<span class="summary-sig-arg">o</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.serializers-pysrc.html#custom_json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xml_rec"></a><span class="summary-sig-name">xml_rec</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.serializers-pysrc.html#xml_rec">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="xml"></a><span class="summary-sig-name">xml</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">UTF-8</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">key</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">document</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.serializers-pysrc.html#xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="json"></a><span class="summary-sig-name">json</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">&lt;function custom_json at 0xc0db18&gt;</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.serializers-pysrc.html#json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="csv"></a><span class="summary-sig-name">csv</span>(<span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.serializers-pysrc.html#csv">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rss"></a><span class="summary-sig-name">rss</span>(<span class="summary-sig-arg">feed</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.serializers-pysrc.html#rss">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.serializers-pysrc.html version [96244d03e5].
























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.serializers</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;serializers
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.serializers-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.serializers-module.html">Module web2py.gluon.serializers</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-1', 'storage', 'link-1');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-2', 'Storage', 'link-2');">Storage</a></tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-3', 'html', 'link-3');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Variable web2py.gluon.TAG=web2py.gluon-module.html#TAG,Variable web2py.gluon.html.TAG=web2py.gluon.html-module.html#TAG,Variable web2py.gluon.tools.TAG=web2py.gluon.tools-module.html#TAG"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-4', 'TAG', 'link-4');">TAG</a></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-5', 'html', 'link-3');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.html.xmlescape()=web2py.gluon.html-module.html#xmlescape"><a title="web2py.gluon.html.xmlescape" class="py-name" href="#" onclick="return doclink('link-6', 'xmlescape', 'link-6');">xmlescape</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name" targets="Module web2py.gluon.languages=web2py.gluon.languages-module.html"><a title="web2py.gluon.languages" class="py-name" href="#" onclick="return doclink('link-7', 'languages', 'link-7');">languages</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Class web2py.gluon.languages.lazyT=web2py.gluon.languages.lazyT-class.html"><a title="web2py.gluon.languages.lazyT" class="py-name" href="#" onclick="return doclink('link-8', 'lazyT', 'link-8');">lazyT</a></tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">simplejson</tt> <tt class="py-keyword">as</tt> <tt class="py-name">simplejson</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">rss2</tt> <tt class="py-keyword">as</tt> <tt class="py-name">rss2</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"> </tt>
<a name="custom_json"></a><div id="custom_json-def"><a name="L14"></a><tt class="py-lineno">14</tt> <a class="py-toggle" href="#" id="custom_json-toggle" onclick="return toggle('custom_json');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.serializers-module.html#custom_json">custom_json</a><tt class="py-op">(</tt><tt class="py-param">o</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="custom_json-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="custom_json-expanded"><a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">,</tt><tt class="py-string">'custom_json'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Function web2py.gluon.serializers.custom_json()=web2py.gluon.serializers-module.html#custom_json"><a title="web2py.gluon.serializers.custom_json" class="py-name" href="#" onclick="return doclink('link-9', 'custom_json', 'link-9');">custom_json</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">o</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="web2py.gluon.serializers.custom_json" class="py-name" href="#" onclick="return doclink('link-10', 'custom_json', 'link-9');">custom_json</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt id="link-11" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-11', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Class datetime.date=datetime.date-class.html"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-12', 'date', 'link-12');">date</a></tt><tt class="py-op">,</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line">                      <tt id="link-13" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-13', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-14', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">,</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">                      <tt id="link-15" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-15', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-16', 'time', 'link-16');">time</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">o</tt><tt class="py-op">.</tt><tt class="py-name">isoformat</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">19</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'T'</tt><tt class="py-op">,</tt><tt class="py-string">' '</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">long</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name"><a title="web2py.gluon.languages.lazyT" class="py-name" href="#" onclick="return doclink('link-17', 'lazyT', 'link-8');">lazyT</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">,</tt><tt class="py-string">'as_list'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method web2py.gluon.dal.Rows.as_list()=web2py.gluon.dal.Rows-class.html#as_list"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-18', 'as_list', 'link-18');">as_list</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">o</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-19', 'as_list', 'link-18');">as_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">,</tt><tt class="py-string">'as_dict'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method web2py.gluon.dal.Row.as_dict()=web2py.gluon.dal.Row-class.html#as_dict,Method web2py.gluon.dal.Rows.as_dict()=web2py.gluon.dal.Rows-class.html#as_dict"><a title="web2py.gluon.dal.Row.as_dict
web2py.gluon.dal.Rows.as_dict" class="py-name" href="#" onclick="return doclink('link-20', 'as_dict', 'link-20');">as_dict</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">o</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.dal.Row.as_dict
web2py.gluon.dal.Rows.as_dict" class="py-name" href="#" onclick="return doclink('link-21', 'as_dict', 'link-20');">as_dict</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">o</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">" is not JSON serializable"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"> </tt>
<a name="xml_rec"></a><div id="xml_rec-def"><a name="L33"></a><tt class="py-lineno">33</tt> <a class="py-toggle" href="#" id="xml_rec-toggle" onclick="return toggle('xml_rec');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.serializers-module.html#xml_rec">xml_rec</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="xml_rec-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="xml_rec-expanded"><a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-string">'custom_xml'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">custom_xml</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">custom_xml</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">,</tt> <tt id="link-22" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-22', 'Storage', 'link-2');">Storage</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-23" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-23', 'TAG', 'link-4');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-24" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-24', 'TAG', 'link-4');">TAG</a></tt><tt class="py-op">[</tt><tt id="link-25" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-25', 'k', 'link-25');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name" targets="Function web2py.gluon.serializers.xml_rec()=web2py.gluon.serializers-module.html#xml_rec"><a title="web2py.gluon.serializers.xml_rec" class="py-name" href="#" onclick="return doclink('link-26', 'xml_rec', 'link-26');">xml_rec</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-27" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-27', 'k', 'link-25');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-28', 'items', 'link-28');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-29', 'TAG', 'link-4');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-30', 'TAG', 'link-4');">TAG</a></tt><tt class="py-op">.</tt><tt class="py-name">item</tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.serializers.xml_rec" class="py-name" href="#" onclick="return doclink('link-31', 'xml_rec', 'link-26');">xml_rec</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-string">'as_list'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-32', 'as_list', 'link-18');">as_list</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.serializers.xml_rec" class="py-name" href="#" onclick="return doclink('link-33', 'xml_rec', 'link-26');">xml_rec</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-34', 'as_list', 'link-18');">as_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-string">'as_dict'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.dal.Row.as_dict
web2py.gluon.dal.Rows.as_dict" class="py-name" href="#" onclick="return doclink('link-35', 'as_dict', 'link-20');">as_dict</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.serializers.xml_rec" class="py-name" href="#" onclick="return doclink('link-36', 'xml_rec', 'link-26');">xml_rec</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.dal.Row.as_dict
web2py.gluon.dal.Rows.as_dict" class="py-name" href="#" onclick="return doclink('link-37', 'as_dict', 'link-20');">as_dict</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.html.xmlescape" class="py-name" href="#" onclick="return doclink('link-38', 'xmlescape', 'link-6');">xmlescape</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line"> </tt>
<a name="xml"></a><div id="xml-def"><a name="L48"></a><tt class="py-lineno">48</tt> <a class="py-toggle" href="#" id="xml-toggle" onclick="return toggle('xml');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.serializers-module.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt class="py-string">'UTF-8'</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">=</tt><tt class="py-string">'document'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="xml-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="xml-expanded"><a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-string">'&lt;?xml version="1.0" encoding="%s"?&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">encoding</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.serializers.xml_rec" class="py-name" href="#" onclick="return doclink('link-39', 'xml_rec', 'link-26');">xml_rec</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line"> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"> </tt>
<a name="json"></a><div id="json-def"><a name="L52"></a><tt class="py-lineno">52</tt> <a class="py-toggle" href="#" id="json-toggle" onclick="return toggle('json');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.serializers-module.html#json">json</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt><tt class="py-param">default</tt><tt class="py-op">=</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.serializers.custom_json" class="py-name" href="#" onclick="return doclink('link-40', 'custom_json', 'link-9');">custom_json</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="json-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="json-expanded"><a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
</div><a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line"> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line"> </tt>
<a name="csv"></a><div id="csv-def"><a name="L56"></a><tt class="py-lineno">56</tt> <a class="py-toggle" href="#" id="csv-toggle" onclick="return toggle('csv');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.serializers-module.html#csv">csv</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="csv-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="csv-expanded"><a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"> </tt>
<a name="rss"></a><div id="rss-def"><a name="L60"></a><tt class="py-lineno">60</tt> <a class="py-toggle" href="#" id="rss-toggle" onclick="return toggle('rss');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.serializers-module.html#rss">rss</a><tt class="py-op">(</tt><tt class="py-param">feed</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="rss-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="rss-expanded"><a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'entries'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">feed</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'items'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">feed</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">        <tt class="py-name">feed</tt><tt class="py-op">[</tt><tt class="py-string">'entries'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">feed</tt><tt class="py-op">[</tt><tt class="py-string">'items'</tt><tt class="py-op">]</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">    <tt class="py-name">now</tt><tt class="py-op">=</tt><tt id="link-41" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-41', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-42', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line">    <tt id="link-43" class="py-name" targets="Function web2py.gluon.serializers.rss()=web2py.gluon.serializers-module.html#rss,Method web2py.gluon.tools.Service.rss()=web2py.gluon.tools.Service-class.html#rss"><a title="web2py.gluon.serializers.rss
web2py.gluon.tools.Service.rss" class="py-name" href="#" onclick="return doclink('link-43', 'rss', 'link-43');">rss</a></tt> <tt class="py-op">=</tt> <tt class="py-name">rss2</tt><tt class="py-op">.</tt><tt class="py-name">RSS2</tt><tt class="py-op">(</tt><tt class="py-name">title</tt> <tt class="py-op">=</tt> <tt class="py-name">feed</tt><tt class="py-op">[</tt><tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">                    <tt class="py-name">link</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">feed</tt><tt class="py-op">[</tt><tt class="py-string">'link'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">                    <tt class="py-name">description</tt> <tt class="py-op">=</tt> <tt class="py-name">feed</tt><tt class="py-op">[</tt><tt class="py-string">'description'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">                    <tt class="py-name">lastBuildDate</tt> <tt class="py-op">=</tt> <tt class="py-name">feed</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-44', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_on'</tt><tt class="py-op">,</tt> <tt class="py-name">now</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">                    <tt id="link-45" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-45', 'items', 'link-28');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">rss2</tt><tt class="py-op">.</tt><tt class="py-name">RSSItem</tt><tt class="py-op">(</tt>\ </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line">                                        <tt class="py-name">title</tt><tt class="py-op">=</tt><tt class="py-name">entry</tt><tt class="py-op">[</tt><tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">                                        <tt class="py-name">link</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">[</tt><tt class="py-string">'link'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">                                        <tt class="py-name">description</tt><tt class="py-op">=</tt><tt class="py-name">entry</tt><tt class="py-op">[</tt><tt class="py-string">'description'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line">                                        <tt class="py-name">pubDate</tt><tt class="py-op">=</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-46', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_on'</tt><tt class="py-op">,</tt> <tt class="py-name">now</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">                                        <tt class="py-op">)</tt>\ </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">                                    <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">feed</tt><tt class="py-op">[</tt><tt class="py-string">'entries'</tt><tt class="py-op">]</tt> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line">                                    <tt class="py-op">]</tt> </tt>
<a name="L76"></a><tt class="py-lineno">76</tt>  <tt class="py-line">                    <tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno">77</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">rss2</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.serializers.rss
web2py.gluon.tools.Service.rss" class="py-name" href="#" onclick="return doclink('link-47', 'rss', 'link-43');">rss</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L78"></a><tt class="py-lineno">78</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.settings-module.html version [fff7c202aa].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.settings</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;settings
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.settings-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module settings</h1><span class="codelink"><a href="web2py.gluon.settings-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.settings-module.html#global_settings" class="summary-name">global_settings</a> = <code title="&lt;Storage {'debugging': False, 'gluon_parent': '/home/mdipierro/web2py'\
, 'is_jython': False, 'applications_parent': '/home/mdipierro/web2py',\
 'app_folders': set([]), 'db_sessions': set([])}&gt;">&lt;Storage {'debugging': False, 'gluon_parent'<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.settings-module.html#settings" class="summary-name">settings</a> = <code title="&lt;Storage {'debugging': False, 'gluon_parent': '/home/mdipierro/web2py'\
, 'is_jython': False, 'applications_parent': '/home/mdipierro/web2py',\
 'app_folders': set([]), 'db_sessions': set([])}&gt;">&lt;Storage {'debugging': False, 'gluon_parent': '/hom<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="global_settings"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">global_settings</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
&lt;Storage {'debugging': False, 'gluon_parent': '/home/mdipierro/web2py'<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
, 'is_jython': False, 'applications_parent': '/home/mdipierro/web2py',<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 'app_folders': set([]), 'db_sessions': set([])}&gt;
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="settings"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">settings</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
&lt;Storage {'debugging': False, 'gluon_parent': '/home/mdipierro/web2py'<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
, 'is_jython': False, 'applications_parent': '/home/mdipierro/web2py',<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 'app_folders': set([]), 'db_sessions': set([])}&gt;
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.settings-pysrc.html version [800fd79f7c].






































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.settings</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;settings
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.settings-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.settings-module.html">Module web2py.gluon.settings</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-0', 'storage', 'link-0');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-1', 'Storage', 'link-1');">Storage</a></tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-2', 'global_settings', 'link-2');">global_settings</a></tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-3', 'Storage', 'link-1');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-4', 'settings', 'link-4');">settings</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-5', 'global_settings', 'link-2');">global_settings</a></tt>  <tt class="py-comment"># legacy compatibility</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:07 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.shell-module.html version [4c84b22959].








































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.shell</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;shell
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.shell-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module shell</h1><span class="codelink"><a href="web2py.gluon.shell-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Developed by Massimo Di 
  Pierro &lt;mdipierro@cs.depaul.edu&gt;, limodou &lt;limodou@gmail.com&gt;
  and srackham &lt;srackham@gmail.com&gt;. License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.shell-module.html#exec_environment" class="summary-sig-name">exec_environment</a>(<span class="summary-sig-arg">pyfile</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">request</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">response</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">session</span>=<span class="summary-sig-default">1</span>)</span><br />
      ..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#exec_environment">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.shell-module.html#env" class="summary-sig-name">env</a>(<span class="summary-sig-arg">a</span>,
        <span class="summary-sig-arg">import_models</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">c</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">f</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">dir</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">extra_request</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      Return web2py execution environment for application (a), 
      controller (c), function (f).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#env">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="exec_pythonrc"></a><span class="summary-sig-name">exec_pythonrc</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#exec_pythonrc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.shell-module.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">appname</span>,
        <span class="summary-sig-arg">plain</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">import_models</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">startfile</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">bpython</span>=<span class="summary-sig-default">True</span>)</span><br />
      Start interactive shell or run Python script (startfile) in web2py
      controller environment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.shell-module.html#parse_path_info" class="summary-sig-name">parse_path_info</a>(<span class="summary-sig-arg">path_info</span>)</span><br />
      Parse path info formatted like a/c/f where c and f are optional 
      and a leading / accepted.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#parse_path_info">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="die"></a><span class="summary-sig-name">die</span>(<span class="summary-sig-arg">msg</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#die">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.shell-module.html#test" class="summary-sig-name">test</a>(<span class="summary-sig-arg">testpath</span>,
        <span class="summary-sig-arg">import_models</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>)</span><br />
      Run doctests in web2py environment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#test">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_usage"></a><span class="summary-sig-name">get_usage</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#get_usage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="execute_from_command_line"></a><span class="summary-sig-name">execute_from_command_line</span>(<span class="summary-sig-arg">argv</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.shell-pysrc.html#execute_from_command_line">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="exec_environment"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">exec_environment</span>(<span class="sig-arg">pyfile</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">request</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">response</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">session</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.shell-pysrc.html#exec_environment">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

.. function:: gluon.shell.exec_environment([pyfile=''[, request=Request()
    [, response=Response[, session=Session()]]]])

    Environment builder and module loader.


    Builds a web2py environment and optionally executes a Python
    file into the environment.
    A Storage dictionary containing the resulting environment is returned.
    The working directory must be web2py root -- this is the web2py default.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="env"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">env</span>(<span class="sig-arg">a</span>,
        <span class="sig-arg">import_models</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">c</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">f</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">dir</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">extra_request</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.shell-pysrc.html#env">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Return web2py execution environment for application (a), controller 
  (c), function (f). If import_models is True the exec all application 
  models into the environment.</p>
  extra_request allows you to pass along any extra variables to the 
  request object before your models get executed. This was mainly done to 
  support web2py_utils.test_runner, however you can use it with any wrapper
  scripts that need access to the web2py environment.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">appname</span>,
        <span class="sig-arg">plain</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">import_models</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">startfile</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">bpython</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.shell-pysrc.html#run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Start interactive shell or run Python script (startfile) in web2py 
  controller environment. appname is formatted like:</p>
  a      web2py application name a/c    exec the controller c into the 
  application environment
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse_path_info"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parse_path_info</span>(<span class="sig-arg">path_info</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.shell-pysrc.html#parse_path_info">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Parse path info formatted like a/c/f where c and f are optional and a 
  leading / accepted. Return tuple (a, c, f). If invalid path_info a is set
  to None. If c or f are omitted they are set to None.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="test"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">test</span>(<span class="sig-arg">testpath</span>,
        <span class="sig-arg">import_models</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">verbose</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.shell-pysrc.html#test">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Run doctests in web2py environment. testpath is formatted like:</p>
  <p>a      tests all controllers in application a a/c    tests controller 
  c in application a a/c/f  test function f in controller c, application 
  a</p>
  Where a, c and f are application, controller and function names 
  respectively. If the testpath is a file name the file is tested. If a 
  controller is specified models are executed by default.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.shell-pysrc.html version [b8f1d47055].
































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.shell</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;shell
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.shell-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.shell-module.html">Module web2py.gluon.shell</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Developed by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;,</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">limodou &lt;limodou@gmail.com&gt; and srackham &lt;srackham@gmail.com&gt;.</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">code</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Variable web2py.gluon.dal.BaseAdapter.types=web2py.gluon.dal.BaseAdapter-class.html#types,Variable web2py.gluon.dal.CouchDBAdapter.types=web2py.gluon.dal.CouchDBAdapter-class.html#types,Variable web2py.gluon.dal.DB2Adapter.types=web2py.gluon.dal.DB2Adapter-class.html#types,Variable web2py.gluon.dal.FireBirdAdapter.types=web2py.gluon.dal.FireBirdAdapter-class.html#types,Variable web2py.gluon.dal.GoogleDatastoreAdapter.types=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#types,Variable web2py.gluon.dal.InformixAdapter.types=web2py.gluon.dal.InformixAdapter-class.html#types,Variable web2py.gluon.dal.IngresAdapter.types=web2py.gluon.dal.IngresAdapter-class.html#types,Variable web2py.gluon.dal.IngresUnicodeAdapter.types=web2py.gluon.dal.IngresUnicodeAdapter-class.html#types,Variable web2py.gluon.dal.MSSQL2Adapter.types=web2py.gluon.dal.MSSQL2Adapter-class.html#types,Variable web2py.gluon.dal.MSSQLAdapter.types=web2py.gluon.dal.MSSQLAdapter-class.html#types,Variable web2py.gluon.dal.MongoDBAdapter.types=web2py.gluon.dal.MongoDBAdapter-class.html#types,Variable web2py.gluon.dal.MySQLAdapter.types=web2py.gluon.dal.MySQLAdapter-class.html#types,Variable web2py.gluon.dal.OracleAdapter.types=web2py.gluon.dal.OracleAdapter-class.html#types,Variable web2py.gluon.dal.PostgreSQLAdapter.types=web2py.gluon.dal.PostgreSQLAdapter-class.html#types,Variable web2py.gluon.dal.SAPDBAdapter.types=web2py.gluon.dal.SAPDBAdapter-class.html#types,Variable web2py.gluon.dal.TeradataAdapter.types=web2py.gluon.dal.TeradataAdapter-class.html#types"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-0', 'types', 'link-0');">types</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">optparse</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">glob</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-1', 'fileutils', 'link-1');">fileutils</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-2', 'settings', 'link-2');">settings</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-3', 'utils', 'link-3');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Function web2py.gluon.utils.web2py_uuid()=web2py.gluon.utils-module.html#web2py_uuid"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-4', 'web2py_uuid', 'link-4');">web2py_uuid</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.compileapp=web2py.gluon.compileapp-module.html"><a title="web2py.gluon.compileapp" class="py-name" href="#" onclick="return doclink('link-5', 'compileapp', 'link-5');">compileapp</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.compileapp.build_environment()=web2py.gluon.compileapp-module.html#build_environment"><a title="web2py.gluon.compileapp.build_environment" class="py-name" href="#" onclick="return doclink('link-6', 'build_environment', 'link-6');">build_environment</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Function web2py.gluon.compileapp.read_pyc()=web2py.gluon.compileapp-module.html#read_pyc"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-7', 'read_pyc', 'link-7');">read_pyc</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Function web2py.gluon.compileapp.run_models_in()=web2py.gluon.compileapp-module.html#run_models_in"><a title="web2py.gluon.compileapp.run_models_in" class="py-name" href="#" onclick="return doclink('link-8', 'run_models_in', 'link-8');">run_models_in</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name" targets="Module web2py.gluon.restricted=web2py.gluon.restricted-module.html,Function web2py.gluon.restricted.restricted()=web2py.gluon.restricted-module.html#restricted"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-9', 'restricted', 'link-9');">restricted</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name" targets="Class web2py.gluon.restricted.RestrictedError=web2py.gluon.restricted.RestrictedError-class.html"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-10', 'RestrictedError', 'link-10');">RestrictedError</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-11" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-11', 'globals', 'link-11');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-12" class="py-name" targets="Class web2py.gluon.globals.Request=web2py.gluon.globals.Request-class.html"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-12', 'Request', 'link-12');">Request</a></tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name" targets="Class web2py.gluon.globals.Response=web2py.gluon.globals.Response-class.html"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-13', 'Response', 'link-13');">Response</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class web2py.gluon.globals.Session=web2py.gluon.globals.Session-class.html"><a title="web2py.gluon.globals.Session" class="py-name" href="#" onclick="return doclink('link-14', 'Session', 'link-14');">Session</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-15', 'storage', 'link-15');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-16" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-16', 'Storage', 'link-16');">Storage</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-17" class="py-name" targets="Module web2py.gluon.admin=web2py.gluon.admin-module.html"><a title="web2py.gluon.admin" class="py-name" href="#" onclick="return doclink('link-17', 'admin', 'link-17');">admin</a></tt> <tt class="py-keyword">import</tt> <tt id="link-18" class="py-name" targets="Function web2py.gluon.fileutils.w2p_unpack()=web2py.gluon.fileutils-module.html#w2p_unpack"><a title="web2py.gluon.fileutils.w2p_unpack" class="py-name" href="#" onclick="return doclink('link-18', 'w2p_unpack', 'link-18');">w2p_unpack</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt id="link-19" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-19', 'logger', 'link-19');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="exec_environment"></a><div id="exec_environment-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="exec_environment-toggle" onclick="return toggle('exec_environment');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#exec_environment">exec_environment</a><tt class="py-op">(</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-param">pyfile</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-param">request</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-param">response</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-param">session</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="exec_environment-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="exec_environment-expanded"><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">    .. function:: gluon.shell.exec_environment([pyfile=''[, request=Request()</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">        [, response=Response[, session=Session()]]]])</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">        Environment builder and module loader.</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">        Builds a web2py environment and optionally executes a Python</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">        file into the environment.</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">        A Storage dictionary containing the resulting environment is returned.</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring">        The working directory must be web2py root -- this is the web2py default.</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">==</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-20', 'Request', 'link-12');">Request</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">==</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-21', 'Response', 'link-13');">Response</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">session</tt><tt class="py-op">==</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name"><a title="web2py.gluon.globals.Session" class="py-name" href="#" onclick="return doclink('link-22', 'Session', 'link-14');">Session</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">mo</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-string">r'(|.*/)applications/(?P&lt;appname&gt;[^/]+)'</tt><tt class="py-op">,</tt> <tt class="py-name">pyfile</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mo</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">            <tt class="py-name">appname</tt> <tt class="py-op">=</tt> <tt class="py-name">mo</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'appname'</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-23', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">appname</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">            <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt id="link-24" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-24', 'env', 'link-24');">env</a></tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.compileapp.build_environment" class="py-name" href="#" onclick="return doclink('link-25', 'build_environment', 'link-6');">build_environment</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> <tt class="py-name">store_current</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">pyfile</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-name">pycfile</tt> <tt class="py-op">=</tt> <tt class="py-name">pyfile</tt> <tt class="py-op">+</tt> <tt class="py-string">'c'</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">pycfile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">            <tt class="py-keyword">exec</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-26', 'read_pyc', 'link-7');">read_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">pycfile</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-27', 'env', 'link-24');">env</a></tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">            <tt class="py-name">execfile</tt><tt class="py-op">(</tt><tt class="py-name">pyfile</tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-28', 'env', 'link-24');">env</a></tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-29', 'Storage', 'link-16');">Storage</a></tt><tt class="py-op">(</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-30', 'env', 'link-24');">env</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"> </tt>
<a name="env"></a><div id="env-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="env-toggle" onclick="return toggle('env');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#env">env</a><tt class="py-op">(</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">    <tt class="py-param">a</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">    <tt class="py-param">import_models</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-param">c</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">    <tt class="py-param">f</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">    <tt class="py-param">dir</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">    <tt class="py-param">extra_request</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="env-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="env-expanded"><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"><tt class="py-docstring">    Return web2py execution environment for application (a), controller (c),</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-docstring">    function (f).</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-docstring">    If import_models is True the exec all application models into the</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-docstring">    environment.</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">    extra_request allows you to pass along any extra</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">    variables to the request object before your models</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">    get executed. This was mainly done to support</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">    web2py_utils.test_runner, however you can use it</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">    with any wrapper scripts that need access to the</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring">    web2py environment.</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-31', 'Request', 'link-12');">Request</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-32', 'Response', 'link-13');">Response</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-33" class="py-name"><a title="web2py.gluon.globals.Session" class="py-name" href="#" onclick="return doclink('link-33', 'Session', 'link-14');">Session</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">    <tt class="py-comment"># Populate the dummy environment with sensible defaults.</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">dir</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-34', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">dir</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'default'</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'index'</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">view</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s.html'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                                    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">function</tt><tt class="py-op">)</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-35', 'env', 'link-24');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">path_info</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-36', 'env', 'link-24');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_host</tt> <tt class="py-op">=</tt> <tt class="py-string">'127.0.0.1:8000'</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-37', 'env', 'link-24');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-op">=</tt> <tt class="py-string">'127.0.0.1'</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-38', 'env', 'link-24');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-39', 'settings', 'link-2');">settings</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-40', 'global_settings', 'link-40');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_runtime_gae</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt id="link-41" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-41', 'k', 'link-41');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">extra_request</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-42', 'items', 'link-42');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">[</tt><tt id="link-43" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-43', 'k', 'link-41');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">    <tt class="py-comment"># Monkey patch so credentials checks pass.</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">check_credentials</tt><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">other_application</tt><tt class="py-op">=</tt><tt class="py-string">'admin'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt id="link-44" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-44', 'fileutils', 'link-1');">fileutils</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name" targets="Function web2py.gluon.fileutils.check_credentials()=web2py.gluon.fileutils-module.html#check_credentials"><a title="web2py.gluon.fileutils.check_credentials" class="py-name" href="#" onclick="return doclink('link-45', 'check_credentials', 'link-45');">check_credentials</a></tt> <tt class="py-op">=</tt> <tt id="link-46" class="py-name"><a title="web2py.gluon.fileutils.check_credentials" class="py-name" href="#" onclick="return doclink('link-46', 'check_credentials', 'link-45');">check_credentials</a></tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.compileapp.build_environment" class="py-name" href="#" onclick="return doclink('link-47', 'build_environment', 'link-6');">build_environment</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">import_models</tt><tt class="py-op">:</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt id="link-48" class="py-name"><a title="web2py.gluon.compileapp.run_models_in" class="py-name" href="#" onclick="return doclink('link-48', 'run_models_in', 'link-8');">run_models_in</a></tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-49', 'RestrictedError', 'link-10');">RestrictedError</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-50', 'write', 'link-50');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt><tt class="py-op">+</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">    <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'__name__'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'__main__'</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">environment</tt> </tt>
</div><a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"> </tt>
<a name="exec_pythonrc"></a><div id="exec_pythonrc-def"><a name="L139"></a><tt class="py-lineno">139</tt> <a class="py-toggle" href="#" id="exec_pythonrc-toggle" onclick="return toggle('exec_pythonrc');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#exec_pythonrc">exec_pythonrc</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="exec_pythonrc-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="exec_pythonrc-expanded"><a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">    <tt class="py-name">pythonrc</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">environ</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-51', 'get', 'link-51');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'PYTHONSTARTUP'</tt><tt class="py-op">)</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">pythonrc</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">pythonrc</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">            <tt class="py-name">execfile</tt><tt class="py-op">(</tt><tt class="py-name">pythonrc</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
</div><a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"> </tt>
<a name="run"></a><div id="run-def"><a name="L148"></a><tt class="py-lineno">148</tt> <a class="py-toggle" href="#" id="run-toggle" onclick="return toggle('run');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#run">run</a><tt class="py-op">(</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">    <tt class="py-param">appname</tt><tt class="py-op">,</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">    <tt class="py-param">plain</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">    <tt class="py-param">import_models</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">    <tt class="py-param">startfile</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">    <tt class="py-param">bpython</tt><tt class="py-op">=</tt><tt class="py-name">False</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="run-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="run-expanded"><a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"><tt class="py-docstring">    Start interactive shell or run Python script (startfile) in web2py</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line"><tt class="py-docstring">    controller environment. appname is formatted like:</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"><tt class="py-docstring">    a      web2py application name</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line"><tt class="py-docstring">    a/c    exec the controller c into the application environment</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-52" class="py-name" targets="Function web2py.gluon.shell.parse_path_info()=web2py.gluon.shell-module.html#parse_path_info"><a title="web2py.gluon.shell.parse_path_info" class="py-name" href="#" onclick="return doclink('link-52', 'parse_path_info', 'link-52');">parse_path_info</a></tt><tt class="py-op">(</tt><tt class="py-name">appname</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">    <tt class="py-name">errmsg</tt> <tt class="py-op">=</tt> <tt class="py-string">'invalid application name: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">appname</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">a</tt><tt class="py-op">:</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt id="link-53" class="py-name" targets="Function web2py.gluon.shell.die()=web2py.gluon.shell-module.html#die"><a title="web2py.gluon.shell.die" class="py-name" href="#" onclick="return doclink('link-53', 'die', 'link-53');">die</a></tt><tt class="py-op">(</tt><tt class="py-name">errmsg</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">    <tt class="py-name">adir</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-54', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-55', 'exists', 'link-55');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">adir</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">raw_input</tt><tt class="py-op">(</tt><tt class="py-string">'application %s does not exist, create (y/n)?'</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">                      <tt class="py-op">%</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-56', 'lower', 'link-56');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'y'</tt><tt class="py-op">,</tt> <tt class="py-string">'yes'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">adir</tt><tt class="py-op">)</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">            <tt id="link-57" class="py-name"><a title="web2py.gluon.fileutils.w2p_unpack" class="py-name" href="#" onclick="return doclink('link-57', 'w2p_unpack', 'link-18');">w2p_unpack</a></tt><tt class="py-op">(</tt><tt class="py-string">'welcome.w2p'</tt><tt class="py-op">,</tt> <tt class="py-name">adir</tt><tt class="py-op">)</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">subfolder</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'models'</tt><tt class="py-op">,</tt><tt class="py-string">'views'</tt><tt class="py-op">,</tt><tt class="py-string">'controllers'</tt><tt class="py-op">,</tt> <tt class="py-string">'databases'</tt><tt class="py-op">,</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                              <tt class="py-string">'modules'</tt><tt class="py-op">,</tt><tt class="py-string">'cron'</tt><tt class="py-op">,</tt><tt class="py-string">'errors'</tt><tt class="py-op">,</tt><tt class="py-string">'sessions'</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                              <tt class="py-string">'languages'</tt><tt class="py-op">,</tt><tt class="py-string">'static'</tt><tt class="py-op">,</tt><tt class="py-string">'private'</tt><tt class="py-op">,</tt><tt class="py-string">'uploads'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">                <tt class="py-name">subpath</tt> <tt class="py-op">=</tt>  <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-58', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">adir</tt><tt class="py-op">,</tt><tt class="py-name">subfolder</tt><tt class="py-op">)</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-59', 'exists', 'link-55');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">subpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">                    <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">mkdir</tt><tt class="py-op">(</tt><tt class="py-name">subpath</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">            <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-60', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">adir</tt><tt class="py-op">,</tt><tt class="py-string">'models/db.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-61', 'exists', 'link-55');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-62', 'fileutils', 'link-1');">fileutils</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-63', 'read_file', 'link-63');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">                <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;your secret key&gt;'</tt><tt class="py-op">,</tt><tt class="py-string">'sha512:'</tt><tt class="py-op">+</tt><tt id="link-64" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-64', 'web2py_uuid', 'link-4');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">                <tt id="link-65" class="py-name"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-65', 'fileutils', 'link-1');">fileutils</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-66', 'write_file', 'link-66');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">:</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-name">import_models</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">    <tt class="py-name">_env</tt> <tt class="py-op">=</tt> <tt id="link-67" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-67', 'env', 'link-24');">env</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">import_models</tt><tt class="py-op">=</tt><tt class="py-name">import_models</tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-name">cfile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-68', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt> <tt class="py-op">+</tt> <tt class="py-string">'.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">cfile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">            <tt class="py-name">cfile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-69', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'compiled'</tt><tt class="py-op">,</tt> <tt class="py-string">"controllers_%s_%s.pyc"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">cfile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">                <tt id="link-70" class="py-name"><a title="web2py.gluon.shell.die" class="py-name" href="#" onclick="return doclink('link-70', 'die', 'link-53');">die</a></tt><tt class="py-op">(</tt><tt class="py-name">errmsg</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">                <tt class="py-keyword">exec</tt> <tt id="link-71" class="py-name"><a title="web2py.gluon.compileapp.read_pyc" class="py-name" href="#" onclick="return doclink('link-71', 'read_pyc', 'link-7');">read_pyc</a></tt><tt class="py-op">(</tt><tt class="py-name">cfile</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_env</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">            <tt class="py-name">execfile</tt><tt class="py-op">(</tt><tt class="py-name">cfile</tt><tt class="py-op">,</tt> <tt class="py-name">_env</tt><tt class="py-op">)</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">        <tt class="py-keyword">exec</tt> <tt class="py-op">(</tt><tt class="py-string">'print %s()'</tt> <tt class="py-op">%</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">_env</tt><tt class="py-op">)</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">startfile</tt><tt class="py-op">:</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">        <tt id="link-72" class="py-name" targets="Function web2py.gluon.shell.exec_pythonrc()=web2py.gluon.shell-module.html#exec_pythonrc"><a title="web2py.gluon.shell.exec_pythonrc" class="py-name" href="#" onclick="return doclink('link-72', 'exec_pythonrc', 'link-72');">exec_pythonrc</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">            <tt class="py-name">execfile</tt><tt class="py-op">(</tt><tt class="py-name">startfile</tt><tt class="py-op">,</tt> <tt class="py-name">_env</tt><tt class="py-op">)</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-73" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-73', 'RestrictedError', 'link-10');">RestrictedError</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">traceback</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">plain</tt><tt class="py-op">:</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">bpython</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">                    <tt class="py-keyword">import</tt> <tt class="py-name">bpython</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">                    <tt class="py-name">bpython</tt><tt class="py-op">.</tt><tt class="py-name">embed</tt><tt class="py-op">(</tt><tt class="py-name">locals_</tt><tt class="py-op">=</tt><tt class="py-name">_env</tt><tt class="py-op">)</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">                    <tt id="link-74" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-74', 'logger', 'link-19');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">                        <tt class="py-string">'import bpython error; trying ipython...'</tt><tt class="py-op">)</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                    <tt class="py-keyword">import</tt> <tt class="py-name">IPython</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">                    <tt class="py-comment"># following 2 lines fix a problem with IPython; thanks Michael Toomim</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-string">'__builtins__'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_env</tt><tt class="py-op">:</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">                        <tt class="py-keyword">del</tt> <tt class="py-name">_env</tt><tt class="py-op">[</tt><tt class="py-string">'__builtins__'</tt><tt class="py-op">]</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">                    <tt id="link-75" class="py-name" targets="Module web2py.gluon.shell=web2py.gluon.shell-module.html"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-75', 'shell', 'link-75');">shell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">IPython</tt><tt class="py-op">.</tt><tt class="py-name">Shell</tt><tt class="py-op">.</tt><tt class="py-name">IPShell</tt><tt class="py-op">(</tt><tt class="py-name">argv</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">user_ns</tt><tt class="py-op">=</tt><tt class="py-name">_env</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                    <tt id="link-76" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-76', 'shell', 'link-75');">shell</a></tt><tt class="py-op">.</tt><tt class="py-name">mainloop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">                    <tt id="link-77" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-77', 'logger', 'link-19');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">                        <tt class="py-string">'import IPython error; use default python shell'</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt id="link-78" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.readline()=web2py.gluon.dal.DatabaseStoredFile-class.html#readline,Method web2py.gluon.debug.Pipe.readline()=web2py.gluon.debug.Pipe-class.html#readline,Method web2py.gluon.rocket.ChunkedReader.readline()=web2py.gluon.rocket.ChunkedReader-class.html#readline"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-78', 'readline', 'link-78');">readline</a></tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">rlcompleter</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">            <tt id="link-79" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-79', 'readline', 'link-78');">readline</a></tt><tt class="py-op">.</tt><tt class="py-name">set_completer</tt><tt class="py-op">(</tt><tt class="py-name">rlcompleter</tt><tt class="py-op">.</tt><tt class="py-name">Completer</tt><tt class="py-op">(</tt><tt class="py-name">_env</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">complete</tt><tt class="py-op">)</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">            <tt id="link-80" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.readline
web2py.gluon.debug.Pipe.readline
web2py.gluon.rocket.ChunkedReader.readline" class="py-name" href="#" onclick="return doclink('link-80', 'readline', 'link-78');">readline</a></tt><tt class="py-op">.</tt><tt class="py-name">parse_and_bind</tt><tt class="py-op">(</tt><tt class="py-string">'tab:complete'</tt><tt class="py-op">)</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">        <tt id="link-81" class="py-name"><a title="web2py.gluon.shell.exec_pythonrc" class="py-name" href="#" onclick="return doclink('link-81', 'exec_pythonrc', 'link-72');">exec_pythonrc</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-name">code</tt><tt class="py-op">.</tt><tt class="py-name">interact</tt><tt class="py-op">(</tt><tt class="py-name">local</tt><tt class="py-op">=</tt><tt class="py-name">_env</tt><tt class="py-op">)</tt> </tt>
</div><a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"> </tt>
<a name="parse_path_info"></a><div id="parse_path_info-def"><a name="L241"></a><tt class="py-lineno">241</tt> <a class="py-toggle" href="#" id="parse_path_info-toggle" onclick="return toggle('parse_path_info');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#parse_path_info">parse_path_info</a><tt class="py-op">(</tt><tt class="py-param">path_info</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="parse_path_info-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="parse_path_info-expanded"><a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line"><tt class="py-docstring">    Parse path info formatted like a/c/f where c and f are optional</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"><tt class="py-docstring">    and a leading / accepted.</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line"><tt class="py-docstring">    Return tuple (a, c, f). If invalid path_info a is set to None.</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"><tt class="py-docstring">    If c or f are omitted they are set to None.</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line"> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">    <tt class="py-name">mo</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-string">r'^/?(?P&lt;a&gt;\w+)(/(?P&lt;c&gt;\w+)(/(?P&lt;f&gt;\w+))?)?$'</tt><tt class="py-op">,</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">                  <tt class="py-name">path_info</tt><tt class="py-op">)</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">mo</tt><tt class="py-op">:</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">mo</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">mo</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'c'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">mo</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'f'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line"> </tt>
<a name="die"></a><div id="die-def"><a name="L257"></a><tt class="py-lineno">257</tt> <a class="py-toggle" href="#" id="die-toggle" onclick="return toggle('die');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#die">die</a><tt class="py-op">(</tt><tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="die-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="die-expanded"><a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-op">&gt;&gt;</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">,</tt> <tt id="link-82" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-82', 'msg', 'link-82');">msg</a></tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">    <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"> </tt>
<a name="test"></a><div id="test-def"><a name="L262"></a><tt class="py-lineno">262</tt> <a class="py-toggle" href="#" id="test-toggle" onclick="return toggle('test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#test">test</a><tt class="py-op">(</tt><tt class="py-param">testpath</tt><tt class="py-op">,</tt> <tt class="py-param">import_models</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-param">verbose</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="test-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="test-expanded"><a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-docstring">    Run doctests in web2py environment. testpath is formatted like:</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line"><tt class="py-docstring">    a      tests all controllers in application a</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line"><tt class="py-docstring">    a/c    tests controller c in application a</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line"><tt class="py-docstring">    a/c/f  test function f in controller c, application a</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line"><tt class="py-docstring">    Where a, c and f are application, controller and function names</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line"><tt class="py-docstring">    respectively. If the testpath is a file name the file is tested.</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line"><tt class="py-docstring">    If a controller is specified models are executed by default.</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">testpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">        <tt class="py-name">mo</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-string">r'(|.*/)applications/(?P&lt;a&gt;[^/]+)'</tt><tt class="py-op">,</tt> <tt class="py-name">testpath</tt><tt class="py-op">)</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">mo</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">            <tt id="link-83" class="py-name"><a title="web2py.gluon.shell.die" class="py-name" href="#" onclick="return doclink('link-83', 'die', 'link-53');">die</a></tt><tt class="py-op">(</tt><tt class="py-string">'test file is not in application directory: %s'</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">                 <tt class="py-op">%</tt> <tt class="py-name">testpath</tt><tt class="py-op">)</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">        <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">mo</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt id="link-84" class="py-name" targets="Variable web2py.gluon.import_all.files=web2py.gluon.import_all-module.html#files"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-84', 'files', 'link-84');">files</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">testpath</tt><tt class="py-op">]</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.shell.parse_path_info" class="py-name" href="#" onclick="return doclink('link-85', 'parse_path_info', 'link-52');">parse_path_info</a></tt><tt class="py-op">(</tt><tt class="py-name">testpath</tt><tt class="py-op">)</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-name">errmsg</tt> <tt class="py-op">=</tt> <tt class="py-string">'invalid test path: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">testpath</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">a</tt><tt class="py-op">:</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">            <tt id="link-86" class="py-name"><a title="web2py.gluon.shell.die" class="py-name" href="#" onclick="return doclink('link-86', 'die', 'link-53');">die</a></tt><tt class="py-op">(</tt><tt class="py-name">errmsg</tt><tt class="py-op">)</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">        <tt class="py-name">cdir</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-87', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications'</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'controllers'</tt><tt class="py-op">)</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">cdir</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">            <tt id="link-88" class="py-name"><a title="web2py.gluon.shell.die" class="py-name" href="#" onclick="return doclink('link-88', 'die', 'link-53');">die</a></tt><tt class="py-op">(</tt><tt class="py-name">errmsg</tt><tt class="py-op">)</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">:</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">            <tt class="py-name">cfile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-89', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">cdir</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt> <tt class="py-op">+</tt> <tt class="py-string">'.py'</tt><tt class="py-op">)</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">cfile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">                <tt id="link-90" class="py-name"><a title="web2py.gluon.shell.die" class="py-name" href="#" onclick="return doclink('link-90', 'die', 'link-53');">die</a></tt><tt class="py-op">(</tt><tt class="py-name">errmsg</tt><tt class="py-op">)</tt> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">            <tt id="link-91" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-91', 'files', 'link-84');">files</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">cfile</tt><tt class="py-op">]</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">            <tt id="link-92" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-92', 'files', 'link-84');">files</a></tt> <tt class="py-op">=</tt> <tt class="py-name">glob</tt><tt class="py-op">.</tt><tt class="py-name">glob</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-93', 'join', 'link-23');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">cdir</tt><tt class="py-op">,</tt> <tt class="py-string">'*.py'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">testfile</tt> <tt class="py-keyword">in</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.import_all.files" class="py-name" href="#" onclick="return doclink('link-94', 'files', 'link-84');">files</a></tt><tt class="py-op">:</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">        <tt class="py-name">globs</tt> <tt class="py-op">=</tt> <tt id="link-95" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-95', 'env', 'link-24');">env</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">import_models</tt><tt class="py-op">)</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">        <tt class="py-name">ignores</tt> <tt class="py-op">=</tt> <tt class="py-name">globs</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-96', 'keys', 'link-96');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">        <tt class="py-name">execfile</tt><tt class="py-op">(</tt><tt class="py-name">testfile</tt><tt class="py-op">,</tt> <tt class="py-name">globs</tt><tt class="py-op">)</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line"> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">doctest_object</tt><tt class="py-op">(</tt><tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">            <tt class="py-docstring">"""doctest obj and enclosed methods and classes."""</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line"> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-97', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">FunctionType</tt><tt class="py-op">,</tt> <tt id="link-98" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-98', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">TypeType</tt><tt class="py-op">,</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">                             <tt id="link-99" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-99', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">ClassType</tt><tt class="py-op">,</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-100', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">MethodType</tt><tt class="py-op">,</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line">                             <tt id="link-101" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-101', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">UnboundMethodType</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line"> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">                <tt class="py-comment"># Reload environment before each test.</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">                <tt class="py-name">globs</tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-102', 'env', 'link-24');">env</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">import_models</tt><tt class="py-op">=</tt><tt class="py-name">import_models</tt><tt class="py-op">)</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">                <tt class="py-name">execfile</tt><tt class="py-op">(</tt><tt class="py-name">testfile</tt><tt class="py-op">,</tt> <tt class="py-name">globs</tt><tt class="py-op">)</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">                <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">run_docstring_examples</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">globs</tt><tt class="py-op">=</tt><tt class="py-name">globs</tt><tt class="py-op">,</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">                        <tt id="link-103" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-103', 'name', 'link-103');">name</a></tt><tt class="py-op">=</tt><tt class="py-string">'%s: %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">basename</tt><tt class="py-op">(</tt><tt class="py-name">testfile</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line">                        <tt id="link-104" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-104', 'name', 'link-103');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">verbose</tt><tt class="py-op">=</tt><tt class="py-name">verbose</tt><tt class="py-op">)</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-105', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">TypeType</tt><tt class="py-op">,</tt> <tt id="link-106" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.types
web2py.gluon.dal.CouchDBAdapter.types
web2py.gluon.dal.DB2Adapter.types
web2py.gluon.dal.FireBirdAdapter.types
web2py.gluon.dal.GoogleDatastoreAdapter.types
web2py.gluon.dal.InformixAdapter.types
web2py.gluon.dal.IngresAdapter.types
web2py.gluon.dal.IngresUnicodeAdapter.types
web2py.gluon.dal.MSSQL2Adapter.types
web2py.gluon.dal.MSSQLAdapter.types
web2py.gluon.dal.MongoDBAdapter.types
web2py.gluon.dal.MySQLAdapter.types
web2py.gluon.dal.OracleAdapter.types
web2py.gluon.dal.PostgreSQLAdapter.types
web2py.gluon.dal.SAPDBAdapter.types
web2py.gluon.dal.TeradataAdapter.types" class="py-name" href="#" onclick="return doclink('link-106', 'types', 'link-0');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">ClassType</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">attr_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dir</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line"> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">                        <tt class="py-comment"># Execute . operator so decorators are executed.</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">                        <tt class="py-name">o</tt> <tt class="py-op">=</tt> <tt class="py-name">eval</tt><tt class="py-op">(</tt><tt class="py-string">'%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-107', 'name', 'link-103');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">attr_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">globs</tt><tt class="py-op">)</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">                        <tt class="py-name">doctest_object</tt><tt class="py-op">(</tt><tt class="py-name">attr_name</tt><tt class="py-op">,</tt> <tt class="py-name">o</tt><tt class="py-op">)</tt> </tt>
</div><a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-108', 'name', 'link-103');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">obj</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">globs</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-109', 'items', 'link-42');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-110', 'name', 'link-103');">name</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ignores</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">f</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">f</tt> <tt class="py-op">==</tt> <tt id="link-111" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-111', 'name', 'link-103');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">                <tt class="py-name">doctest_object</tt><tt class="py-op">(</tt><tt id="link-112" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-112', 'name', 'link-103');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
</div><a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line"> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"> </tt>
<a name="get_usage"></a><div id="get_usage-def"><a name="L331"></a><tt class="py-lineno">331</tt> <a class="py-toggle" href="#" id="get_usage-toggle" onclick="return toggle('get_usage');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#get_usage">get_usage</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_usage-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_usage-expanded"><a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">    <tt class="py-name">usage</tt> <tt class="py-op">=</tt> <tt class="py-string">"""</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line"><tt class="py-string">  %prog [options] pythonfile</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">usage</tt> </tt>
</div><a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"> </tt>
<a name="execute_from_command_line"></a><div id="execute_from_command_line-def"><a name="L338"></a><tt class="py-lineno">338</tt> <a class="py-toggle" href="#" id="execute_from_command_line-toggle" onclick="return toggle('execute_from_command_line');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.shell-module.html#execute_from_command_line">execute_from_command_line</a><tt class="py-op">(</tt><tt class="py-param">argv</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="execute_from_command_line-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="execute_from_command_line-expanded"><a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">argv</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">        <tt class="py-name">argv</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line"> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt class="py-name">optparse</tt><tt class="py-op">.</tt><tt class="py-name">OptionParser</tt><tt class="py-op">(</tt><tt class="py-name">usage</tt><tt class="py-op">=</tt><tt id="link-113" class="py-name" targets="Function web2py.gluon.shell.get_usage()=web2py.gluon.shell-module.html#get_usage"><a title="web2py.gluon.shell.get_usage" class="py-name" href="#" onclick="return doclink('link-113', 'get_usage', 'link-113');">get_usage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-S'</tt><tt class="py-op">,</tt> <tt class="py-string">'--shell'</tt><tt class="py-op">,</tt> <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'shell'</tt><tt class="py-op">,</tt> <tt class="py-name">metavar</tt><tt class="py-op">=</tt><tt class="py-string">'APPNAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'run web2py in interactive shell or IPython(if installed) '</tt> <tt class="py-op">+</tt> \ </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">            <tt class="py-string">'with specified appname'</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">    <tt id="link-114" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-114', 'msg', 'link-82');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'run web2py in interactive shell or bpython (if installed) with'</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">    <tt id="link-115" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-115', 'msg', 'link-82');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' specified appname (if app does not exist it will be created).'</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">    <tt id="link-116" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-116', 'msg', 'link-82');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'\n Use combined with --shell'</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">        <tt class="py-string">'-B'</tt><tt class="py-op">,</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">        <tt class="py-string">'--bpython'</tt><tt class="py-op">,</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">        <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">        <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'bpython'</tt><tt class="py-op">,</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-117', 'msg', 'link-82');">msg</a></tt><tt class="py-op">,</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">        <tt class="py-op">)</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">        <tt class="py-string">'-P'</tt><tt class="py-op">,</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">        <tt class="py-string">'--plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">        <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">        <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line">        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'only use plain python shell, should be used with --shell option'</tt><tt class="py-op">,</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">        <tt class="py-op">)</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">        <tt class="py-string">'-M'</tt><tt class="py-op">,</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">        <tt class="py-string">'--import_models'</tt><tt class="py-op">,</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">        <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">        <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'import_models'</tt><tt class="py-op">,</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'auto import model files, default is False, '</tt> <tt class="py-op">+</tt> \ </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">            <tt class="py-string">' should be used with --shell option'</tt><tt class="py-op">,</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">        <tt class="py-op">)</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">        <tt class="py-string">'-R'</tt><tt class="py-op">,</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">        <tt class="py-string">'--run'</tt><tt class="py-op">,</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">        <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'run'</tt><tt class="py-op">,</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line">        <tt class="py-name">metavar</tt><tt class="py-op">=</tt><tt class="py-string">'PYTHON_FILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'run PYTHON_FILE in web2py environment, '</tt> <tt class="py-op">+</tt> \ </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">            <tt class="py-string">'should be used with --shell option'</tt><tt class="py-op">,</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">        <tt class="py-op">)</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line"> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt id="link-118" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-118', 'options', 'link-118');">options</a></tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">parse_args</tt><tt class="py-op">(</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line"> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-119" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-119', 'len', 'link-119');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">        <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">print_help</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">        <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line"> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-120" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-120', 'len', 'link-119');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">        <tt class="py-name">startfile</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line">        <tt class="py-name">startfile</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">    <tt id="link-121" class="py-name" targets="Method web2py.gluon.newcron.cronlauncher.run()=web2py.gluon.newcron.cronlauncher-class.html#run,Method web2py.gluon.newcron.extcron.run()=web2py.gluon.newcron.extcron-class.html#run,Method web2py.gluon.newcron.hardcron.run()=web2py.gluon.newcron.hardcron-class.html#run,Method web2py.gluon.newcron.softcron.run()=web2py.gluon.newcron.softcron-class.html#run,Method web2py.gluon.rocket.Listener.run()=web2py.gluon.rocket.Listener-class.html#run,Method web2py.gluon.rocket.Monitor.run()=web2py.gluon.rocket.Monitor-class.html#run,Method web2py.gluon.rocket.Worker.run()=web2py.gluon.rocket.Worker-class.html#run,Function web2py.gluon.shell.run()=web2py.gluon.shell-module.html#run,Method web2py.gluon.tools.Service.run()=web2py.gluon.tools.Service-class.html#run"><a title="web2py.gluon.newcron.cronlauncher.run
web2py.gluon.newcron.extcron.run
web2py.gluon.newcron.hardcron.run
web2py.gluon.newcron.softcron.run
web2py.gluon.rocket.Listener.run
web2py.gluon.rocket.Monitor.run
web2py.gluon.rocket.Worker.run
web2py.gluon.shell.run
web2py.gluon.tools.Service.run" class="py-name" href="#" onclick="return doclink('link-121', 'run', 'link-121');">run</a></tt><tt class="py-op">(</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-122', 'options', 'link-118');">options</a></tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-123', 'shell', 'link-75');">shell</a></tt><tt class="py-op">,</tt> <tt id="link-124" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-124', 'options', 'link-118');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">plain</tt><tt class="py-op">,</tt> <tt class="py-name">startfile</tt><tt class="py-op">=</tt><tt class="py-name">startfile</tt><tt class="py-op">,</tt> <tt class="py-name">bpython</tt><tt class="py-op">=</tt><tt id="link-125" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-125', 'options', 'link-118');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">bpython</tt><tt class="py-op">)</tt> </tt>
</div><a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line"> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">    <tt id="link-126" class="py-name" targets="Function web2py.gluon.shell.execute_from_command_line()=web2py.gluon.shell-module.html#execute_from_command_line"><a title="web2py.gluon.shell.execute_from_command_line" class="py-name" href="#" onclick="return doclink('link-126', 'execute_from_command_line', 'link-126');">execute_from_command_line</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:08 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sql-module.html version [8f4ab78faa].















































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sql</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sql
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sql-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module sql</h1><span class="codelink"><a href="web2py.gluon.sql-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.DAL-class.html" class="summary-name">DAL</a><br />
      an instance of this class represents a database connection
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.dal.Field-class.html" class="summary-name">Field</a><br />
      an instance of this class represents a database field
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="drivers"></a><span class="summary-name">drivers</span> = <code title="['SQLite3', 'pymysql', 'PostgreSQL']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">SQLite3</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">pymysql</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">PostgreSQL</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sql-pysrc.html version [5b6ff9af99].

































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sql</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sql
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sql-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.sql-module.html">Module web2py.gluon.sql</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">1</tt>  <tt class="py-line"><tt class="py-comment"># this file exists for backward compatibility</tt> </tt>
<a name="L2"></a><tt class="py-lineno">2</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">3</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'DAL'</tt><tt class="py-op">,</tt><tt class="py-string">'Field'</tt><tt class="py-op">,</tt><tt class="py-string">'drivers'</tt><tt class="py-op">]</tt> </tt>
<a name="L4"></a><tt class="py-lineno">4</tt>  <tt class="py-line"> </tt>
<a name="L5"></a><tt class="py-lineno">5</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-0', 'dal', 'link-0');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.dal.DAL=web2py.gluon.dal.DAL-class.html"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-1', 'DAL', 'link-1');">DAL</a></tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name" targets="Class web2py.gluon.dal.Field=web2py.gluon.dal.Field-class.html"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-2', 'Field', 'link-2');">Field</a></tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Class web2py.gluon.dal.Table=web2py.gluon.dal.Table-class.html"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-3', 'Table', 'link-3');">Table</a></tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Class web2py.gluon.dal.Query=web2py.gluon.dal.Query-class.html"><a title="web2py.gluon.dal.Query" class="py-name" href="#" onclick="return doclink('link-4', 'Query', 'link-4');">Query</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Class web2py.gluon.dal.Set=web2py.gluon.dal.Set-class.html"><a title="web2py.gluon.dal.Set" class="py-name" href="#" onclick="return doclink('link-5', 'Set', 'link-5');">Set</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Class web2py.gluon.dal.Expression=web2py.gluon.dal.Expression-class.html"><a title="web2py.gluon.dal.Expression" class="py-name" href="#" onclick="return doclink('link-6', 'Expression', 'link-6');">Expression</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Class web2py.gluon.dal.Row=web2py.gluon.dal.Row-class.html"><a title="web2py.gluon.dal.Row" class="py-name" href="#" onclick="return doclink('link-7', 'Row', 'link-7');">Row</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class web2py.gluon.dal.Rows=web2py.gluon.dal.Rows-class.html"><a title="web2py.gluon.dal.Rows" class="py-name" href="#" onclick="return doclink('link-8', 'Rows', 'link-8');">Rows</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Variable web2py.gluon.dal.drivers=web2py.gluon.dal-module.html#drivers,Variable web2py.gluon.sql.drivers=web2py.gluon.sql-module.html#drivers"><a title="web2py.gluon.dal.drivers
web2py.gluon.sql.drivers" class="py-name" href="#" onclick="return doclink('link-9', 'drivers', 'link-9');">drivers</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Class web2py.gluon.dal.BaseAdapter=web2py.gluon.dal.BaseAdapter-class.html"><a title="web2py.gluon.dal.BaseAdapter" class="py-name" href="#" onclick="return doclink('link-10', 'BaseAdapter', 'link-10');">BaseAdapter</a></tt><tt class="py-op">,</tt> <tt class="py-name">SQLField</tt><tt class="py-op">,</tt> <tt class="py-name">SQLTable</tt><tt class="py-op">,</tt> <tt class="py-name">SQLXorable</tt><tt class="py-op">,</tt> <tt class="py-name">SQLQuery</tt><tt class="py-op">,</tt> <tt class="py-name">SQLSet</tt><tt class="py-op">,</tt> <tt class="py-name">SQLRows</tt><tt class="py-op">,</tt> <tt class="py-name">SQLStorage</tt><tt class="py-op">,</tt> <tt class="py-name">SQLDB</tt><tt class="py-op">,</tt> <tt class="py-name">GQLDB</tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Class web2py.gluon.dal.SQLALL=web2py.gluon.dal.SQLALL-class.html"><a title="web2py.gluon.dal.SQLALL" class="py-name" href="#" onclick="return doclink('link-11', 'SQLALL', 'link-11');">SQLALL</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Class web2py.gluon.dal.SQLCustomType=web2py.gluon.dal.SQLCustomType-class.html"><a title="web2py.gluon.dal.SQLCustomType" class="py-name" href="#" onclick="return doclink('link-12', 'SQLCustomType', 'link-12');">SQLCustomType</a></tt> </tt>
<a name="L6"></a><tt class="py-lineno">6</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml-module.html version [85cd1307e2].





























































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sqlhtml
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module sqlhtml</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Holds:

- SQLFORM: provide a form for a table (with/without record)
- SQLTABLE: provides a table for a set of records
- form_factory: provides a SQLFORM for an non-db backed table

</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.FormWidget-class.html" class="summary-name">FormWidget</a><br />
      helper for SQLFORM to generate form input fields (widget), 
        related to the fieldtype
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.StringWidget-class.html" class="summary-name">StringWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.IntegerWidget-class.html" class="summary-name">IntegerWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.DoubleWidget-class.html" class="summary-name">DoubleWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.DecimalWidget-class.html" class="summary-name">DecimalWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.TimeWidget-class.html" class="summary-name">TimeWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.DateWidget-class.html" class="summary-name">DateWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.DatetimeWidget-class.html" class="summary-name">DatetimeWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.TextWidget-class.html" class="summary-name">TextWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.BooleanWidget-class.html" class="summary-name">BooleanWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html" class="summary-name">OptionsWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.ListWidget-class.html" class="summary-name">ListWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html" class="summary-name">MultipleOptionsWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.RadioWidget-class.html" class="summary-name">RadioWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html" class="summary-name">CheckboxesWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.PasswordWidget-class.html" class="summary-name">PasswordWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.UploadWidget-class.html" class="summary-name">UploadWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html" class="summary-name">AutocompleteWidget</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.SQLFORM-class.html" class="summary-name">SQLFORM</a><br />
      SQLFORM is used to map a table (and a current record) into an HTML form

given a SQLTable stored in db.table

generates an insert form::

    SQLFORM(db.table)

generates an update form::

    record=db.table[some_id]
    SQLFORM(db.table, record)

generates an update with a delete button::

    SQLFORM(db.table, record, deletable=True)

if record is an int::

    record=db.table[record]

optional arguments:

:param fields: a list of fields that should be placed in the form,
    default is all.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.SQLTABLE-class.html" class="summary-name">SQLTABLE</a><br />
      given a Rows object, as returned by a db().select(), generates
an html table with the rows.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="represent"></a><span class="summary-sig-name">represent</span>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">record</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#represent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="safe_int"></a><span class="summary-sig-name">safe_int</span>(<span class="summary-sig-arg">x</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#safe_int">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="safe_float"></a><span class="summary-sig-name">safe_float</span>(<span class="summary-sig-arg">x</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#safe_float">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml-module.html#form_factory" class="summary-sig-name">form_factory</a>(<span class="summary-sig-arg">*fields</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a SQLFORM for the given fields.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.factory">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="table_field"></a><span class="summary-name">table_field</span> = <code title="re.compile(r'[\w_]+\.[\w_]+')">re.compile(r'<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>\.<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="widget_class"></a><span class="summary-name">widget_class</span> = <code title="re.compile(r'^\w*')">re.compile(r'^\w<code class="re-op">*</code>')</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="form_factory"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">form_factory</span>(<span class="sig-arg">*fields</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.factory">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a SQLFORM for the given fields.</p>
  Internally will build a non-database based data model to hold the 
  fields.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html version [d3355e996d].
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sqlhtml
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.sqlhtml-module.html">Module web2py.gluon.sqlhtml</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-docstring">Holds:</tt> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-docstring">- SQLFORM: provide a form for a table (with/without record)</tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-docstring">- SQLTABLE: provides a table for a set of records</tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-docstring">- form_factory: provides a SQLFORM for an non-db backed table</tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-0', 'http', 'link-0');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1', 'HTTP', 'link-1');">HTTP</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-2', 'html', 'link-2');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class web2py.gluon.html.XML=web2py.gluon.html.XML-class.html"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-3', 'XML', 'link-3');">XML</a></tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Class web2py.gluon.html.SPAN=web2py.gluon.html.SPAN-class.html"><a title="web2py.gluon.html.SPAN" class="py-name" href="#" onclick="return doclink('link-4', 'SPAN', 'link-4');">SPAN</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Variable web2py.gluon.TAG=web2py.gluon-module.html#TAG,Variable web2py.gluon.html.TAG=web2py.gluon.html-module.html#TAG,Variable web2py.gluon.tools.TAG=web2py.gluon.tools-module.html#TAG"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-5', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Class web2py.gluon.html.A=web2py.gluon.html.A-class.html"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-6', 'A', 'link-6');">A</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.DIV()=web2py.gluon.dal.BaseAdapter-class.html#DIV,Method web2py.gluon.dal.NoSQLAdapter.DIV()=web2py.gluon.dal.NoSQLAdapter-class.html#DIV,Class web2py.gluon.html.DIV=web2py.gluon.html.DIV-class.html"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-7', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class web2py.gluon.html.UL=web2py.gluon.html.UL-class.html"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-8', 'UL', 'link-8');">UL</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Class web2py.gluon.html.LI=web2py.gluon.html.LI-class.html"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-9', 'LI', 'link-9');">LI</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Class web2py.gluon.html.TEXTAREA=web2py.gluon.html.TEXTAREA-class.html"><a title="web2py.gluon.html.TEXTAREA" class="py-name" href="#" onclick="return doclink('link-10', 'TEXTAREA', 'link-10');">TEXTAREA</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Class web2py.gluon.html.BR=web2py.gluon.html.BR-class.html"><a title="web2py.gluon.html.BR" class="py-name" href="#" onclick="return doclink('link-11', 'BR', 'link-11');">BR</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Class web2py.gluon.html.IMG=web2py.gluon.html.IMG-class.html"><a title="web2py.gluon.html.IMG" class="py-name" href="#" onclick="return doclink('link-12', 'IMG', 'link-12');">IMG</a></tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name" targets="Class web2py.gluon.html.SCRIPT=web2py.gluon.html.SCRIPT-class.html"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-13', 'SCRIPT', 'link-13');">SCRIPT</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-14', 'html', 'link-2');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-15" class="py-name" targets="Class web2py.gluon.html.FORM=web2py.gluon.html.FORM-class.html"><a title="web2py.gluon.html.FORM" class="py-name" href="#" onclick="return doclink('link-15', 'FORM', 'link-15');">FORM</a></tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name" targets="Class web2py.gluon.html.INPUT=web2py.gluon.html.INPUT-class.html"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-16', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Class web2py.gluon.html.LABEL=web2py.gluon.html.LABEL-class.html"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-17', 'LABEL', 'link-17');">LABEL</a></tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name" targets="Class web2py.gluon.html.OPTION=web2py.gluon.html.OPTION-class.html"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-18', 'OPTION', 'link-18');">OPTION</a></tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Class web2py.gluon.html.SELECT=web2py.gluon.html.SELECT-class.html"><a title="web2py.gluon.html.SELECT" class="py-name" href="#" onclick="return doclink('link-19', 'SELECT', 'link-19');">SELECT</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-20', 'html', 'link-2');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-21" class="py-name" targets="Class web2py.gluon.html.TABLE=web2py.gluon.html.TABLE-class.html"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-21', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">,</tt> <tt id="link-22" class="py-name" targets="Class web2py.gluon.html.THEAD=web2py.gluon.html.THEAD-class.html"><a title="web2py.gluon.html.THEAD" class="py-name" href="#" onclick="return doclink('link-22', 'THEAD', 'link-22');">THEAD</a></tt><tt class="py-op">,</tt> <tt id="link-23" class="py-name" targets="Class web2py.gluon.html.TBODY=web2py.gluon.html.TBODY-class.html"><a title="web2py.gluon.html.TBODY" class="py-name" href="#" onclick="return doclink('link-23', 'TBODY', 'link-23');">TBODY</a></tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name" targets="Class web2py.gluon.html.TR=web2py.gluon.html.TR-class.html"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-24', 'TR', 'link-24');">TR</a></tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name" targets="Class web2py.gluon.html.TD=web2py.gluon.html.TD-class.html"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-25', 'TD', 'link-25');">TD</a></tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name" targets="Class web2py.gluon.html.TH=web2py.gluon.html.TH-class.html"><a title="web2py.gluon.html.TH" class="py-name" href="#" onclick="return doclink('link-26', 'TH', 'link-26');">TH</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-27', 'html', 'link-2');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-28" class="py-name" targets="Function web2py.gluon.html.URL()=web2py.gluon.html-module.html#URL"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-28', 'URL', 'link-28');">URL</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">Url</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-29" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-29', 'dal', 'link-29');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-30" class="py-name" targets="Class web2py.gluon.dal.DAL=web2py.gluon.dal.DAL-class.html"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-30', 'DAL', 'link-30');">DAL</a></tt><tt class="py-op">,</tt> <tt id="link-31" class="py-name" targets="Class web2py.gluon.dal.Table=web2py.gluon.dal.Table-class.html"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-31', 'Table', 'link-31');">Table</a></tt><tt class="py-op">,</tt> <tt id="link-32" class="py-name" targets="Class web2py.gluon.dal.Row=web2py.gluon.dal.Row-class.html"><a title="web2py.gluon.dal.Row" class="py-name" href="#" onclick="return doclink('link-32', 'Row', 'link-32');">Row</a></tt><tt class="py-op">,</tt> <tt id="link-33" class="py-name" targets="Variable web2py.gluon.dal.CALLABLETYPES=web2py.gluon.dal-module.html#CALLABLETYPES"><a title="web2py.gluon.dal.CALLABLETYPES" class="py-name" href="#" onclick="return doclink('link-33', 'CALLABLETYPES', 'link-33');">CALLABLETYPES</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-34" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-34', 'storage', 'link-34');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-35" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-35', 'Storage', 'link-35');">Storage</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-36" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-36', 'utils', 'link-36');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-37" class="py-name" targets="Function web2py.gluon.utils.md5_hash()=web2py.gluon.utils-module.html#md5_hash"><a title="web2py.gluon.utils.md5_hash" class="py-name" href="#" onclick="return doclink('link-37', 'md5_hash', 'link-37');">md5_hash</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-38" class="py-name" targets="Function web2py.gluon.tools.validators()=web2py.gluon.tools-module.html#validators,Module web2py.gluon.validators=web2py.gluon.validators-module.html"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-38', 'validators', 'link-38');">validators</a></tt> <tt class="py-keyword">import</tt> <tt id="link-39" class="py-name" targets="Class web2py.gluon.validators.IS_EMPTY_OR=web2py.gluon.validators.IS_EMPTY_OR-class.html"><a title="web2py.gluon.validators.IS_EMPTY_OR" class="py-name" href="#" onclick="return doclink('link-39', 'IS_EMPTY_OR', 'link-39');">IS_EMPTY_OR</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"><tt id="link-40" class="py-name" targets="Variable web2py.gluon.dal.table_field=web2py.gluon.dal-module.html#table_field,Variable web2py.gluon.sqlhtml.table_field=web2py.gluon.sqlhtml-module.html#table_field"><a title="web2py.gluon.dal.table_field
web2py.gluon.sqlhtml.table_field" class="py-name" href="#" onclick="return doclink('link-40', 'table_field', 'link-40');">table_field</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'[\w_]+\.[\w_]+'</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"><tt id="link-41" class="py-name" targets="Variable web2py.gluon.sqlhtml.widget_class=web2py.gluon.sqlhtml-module.html#widget_class"><a title="web2py.gluon.sqlhtml.widget_class" class="py-name" href="#" onclick="return doclink('link-41', 'widget_class', 'link-41');">widget_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^\w*'</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line"> </tt>
<a name="represent"></a><div id="represent-def"><a name="L35"></a><tt class="py-lineno">  35</tt> <a class="py-toggle" href="#" id="represent-toggle" onclick="return toggle('represent');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml-module.html#represent">represent</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">,</tt><tt class="py-param">record</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="represent-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="represent-expanded"><a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line">    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.represent()=web2py.gluon.dal.BaseAdapter-class.html#represent,Method web2py.gluon.dal.CouchDBAdapter.represent()=web2py.gluon.dal.CouchDBAdapter-class.html#represent,Method web2py.gluon.dal.MSSQL2Adapter.represent()=web2py.gluon.dal.MSSQL2Adapter-class.html#represent,Method web2py.gluon.dal.NoSQLAdapter.represent()=web2py.gluon.dal.NoSQLAdapter-class.html#represent,Static Method web2py.gluon.sqlhtml.UploadWidget.represent()=web2py.gluon.sqlhtml.UploadWidget-class.html#represent,Function web2py.gluon.sqlhtml.represent()=web2py.gluon.sqlhtml-module.html#represent"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-42', 'represent', 'link-42');">represent</a></tt> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">func_code</tt><tt class="py-op">.</tt><tt class="py-name">co_argcount</tt><tt class="py-op">-</tt><tt id="link-43" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-43', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">func_defaults</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">n</tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">n</tt><tt class="py-op">==</tt><tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">RuntimeError</tt><tt class="py-op">,</tt> <tt class="py-string">"field representation must take 1 or 2 args"</tt> </tt>
</div><a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line"> </tt>
<a name="safe_int"></a><div id="safe_int-def"><a name="L47"></a><tt class="py-lineno">  47</tt> <a class="py-toggle" href="#" id="safe_int-toggle" onclick="return toggle('safe_int');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml-module.html#safe_int">safe_int</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="safe_int-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="safe_int-expanded"><a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-44" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-44', 'x', 'link-44');">x</a></tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line"> </tt>
<a name="safe_float"></a><div id="safe_float-def"><a name="L53"></a><tt class="py-lineno">  53</tt> <a class="py-toggle" href="#" id="safe_float-toggle" onclick="return toggle('safe_float');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml-module.html#safe_float">safe_float</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="safe_float-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="safe_float-expanded"><a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt id="link-45" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-45', 'x', 'link-44');">x</a></tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"> </tt>
<a name="FormWidget"></a><div id="FormWidget-def"><a name="L59"></a><tt class="py-lineno">  59</tt> <a class="py-toggle" href="#" id="FormWidget-toggle" onclick="return toggle('FormWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FormWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="FormWidget-expanded"><a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line"><tt class="py-docstring">    helper for SQLFORM to generate form input fields (widget),</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line"><tt class="py-docstring">    related to the fieldtype</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="FormWidget._attributes"></a><div id="FormWidget._attributes-def"><a name="L66"></a><tt class="py-lineno">  66</tt> <a class="py-toggle" href="#" id="FormWidget._attributes-toggle" onclick="return toggle('FormWidget._attributes');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">widget_attributes</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FormWidget._attributes-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FormWidget._attributes-expanded"><a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line"><tt class="py-docstring">        helper to build a common set of attributes</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"><tt class="py-docstring">        :param field: the field involved, some attributes are derived from this</tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-docstring">        :param widget_attributes:  widget related attributes</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-docstring">        :param attributes: any other supplied attributes</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line">            <tt class="py-name">_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s_%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">,</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-46', 'name', 'link-46');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line">            <tt class="py-name">_class</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.sqlhtml.widget_class" class="py-name" href="#" onclick="return doclink('link-47', 'widget_class', 'link-41');">widget_class</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line">            <tt id="link-48" class="py-name" targets="Variable psycopg2.tz.FixedOffsetTimezone._name=psycopg2.tz.FixedOffsetTimezone-class.html#_name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-48', '_name', 'link-48');">_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-49', 'name', 'link-46');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line">            <tt id="link-50" class="py-name" targets="Method web2py.gluon.tools.Auth.requires()=web2py.gluon.tools.Auth-class.html#requires"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-50', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-51', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line">        <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-52', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">widget_attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line">        <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-53', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">attr</tt> </tt>
</div><a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line"> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="FormWidget.widget"></a><div id="FormWidget.widget-def"><a name="L85"></a><tt class="py-lineno">  85</tt> <a class="py-toggle" href="#" id="FormWidget.widget-toggle" onclick="return toggle('FormWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FormWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FormWidget.widget-expanded"><a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-docstring">        generates the widget for the field.</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line"><tt class="py-docstring">        When serialized, will provide an INPUT tag:</tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-docstring">        - id = tablename_fieldname</tt> </tt>
<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line"><tt class="py-docstring">        - class = field.type</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line"><tt class="py-docstring">        - name = fieldname</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-docstring">        :param field: the field needing the widget</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: value</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-docstring">        :param attributes: any other attributes to be applied</tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line"> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"> </tt>
<a name="StringWidget"></a><div id="StringWidget-def"><a name="L102"></a><tt class="py-lineno"> 102</tt> <a class="py-toggle" href="#" id="StringWidget-toggle" onclick="return toggle('StringWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a><tt class="py-op">(</tt><tt class="py-base-class">FormWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="StringWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="StringWidget-expanded"><a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="StringWidget.widget"></a><div id="StringWidget.widget-def"><a name="L105"></a><tt class="py-lineno"> 105</tt> <a class="py-toggle" href="#" id="StringWidget.widget-toggle" onclick="return toggle('StringWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="StringWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="StringWidget.widget-expanded"><a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"><tt class="py-docstring">        generates an INPUT text tag.</tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line">        <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">            <tt class="py-name">_type</tt> <tt class="py-op">=</tt> <tt class="py-string">'text'</tt><tt class="py-op">,</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-54" class="py-name" targets="Class web2py.gluon.sqlhtml.StringWidget=web2py.gluon.sqlhtml.StringWidget-class.html"><a title="web2py.gluon.sqlhtml.StringWidget" class="py-name" href="#" onclick="return doclink('link-54', 'StringWidget', 'link-54');">StringWidget</a></tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Static Method web2py.gluon.sqlhtml.FormWidget._attributes()=web2py.gluon.sqlhtml.FormWidget-class.html#_attributes"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-55', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-56" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-56', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"> </tt>
<a name="IntegerWidget"></a><div id="IntegerWidget-def"><a name="L121"></a><tt class="py-lineno"> 121</tt> <a class="py-toggle" href="#" id="IntegerWidget-toggle" onclick="return toggle('IntegerWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.IntegerWidget-class.html">IntegerWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IntegerWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IntegerWidget-expanded"><a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"> </tt>
<a name="DoubleWidget"></a><div id="DoubleWidget-def"><a name="L126"></a><tt class="py-lineno"> 126</tt> <a class="py-toggle" href="#" id="DoubleWidget-toggle" onclick="return toggle('DoubleWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.DoubleWidget-class.html">DoubleWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DoubleWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DoubleWidget-expanded"><a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line"> </tt>
<a name="DecimalWidget"></a><div id="DecimalWidget-def"><a name="L131"></a><tt class="py-lineno"> 131</tt> <a class="py-toggle" href="#" id="DecimalWidget-toggle" onclick="return toggle('DecimalWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.DecimalWidget-class.html">DecimalWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DecimalWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DecimalWidget-expanded"><a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line"> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line"> </tt>
<a name="TimeWidget"></a><div id="TimeWidget-def"><a name="L136"></a><tt class="py-lineno"> 136</tt> <a class="py-toggle" href="#" id="TimeWidget-toggle" onclick="return toggle('TimeWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.TimeWidget-class.html">TimeWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TimeWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TimeWidget-expanded"><a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line"> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line"> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line"> </tt>
<a name="DateWidget"></a><div id="DateWidget-def"><a name="L141"></a><tt class="py-lineno"> 141</tt> <a class="py-toggle" href="#" id="DateWidget-toggle" onclick="return toggle('DateWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.DateWidget-class.html">DateWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DateWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DateWidget-expanded"><a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"> </tt>
<a name="DatetimeWidget"></a><div id="DatetimeWidget-def"><a name="L146"></a><tt class="py-lineno"> 146</tt> <a class="py-toggle" href="#" id="DatetimeWidget-toggle" onclick="return toggle('DatetimeWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.DatetimeWidget-class.html">DatetimeWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DatetimeWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DatetimeWidget-expanded"><a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"> </tt>
<a name="TextWidget"></a><div id="TextWidget-def"><a name="L151"></a><tt class="py-lineno"> 151</tt> <a class="py-toggle" href="#" id="TextWidget-toggle" onclick="return toggle('TextWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.TextWidget-class.html">TextWidget</a><tt class="py-op">(</tt><tt class="py-base-class">FormWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TextWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TextWidget-expanded"><a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="TextWidget.widget"></a><div id="TextWidget.widget-def"><a name="L154"></a><tt class="py-lineno"> 154</tt> <a class="py-toggle" href="#" id="TextWidget.widget-toggle" onclick="return toggle('TextWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.TextWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TextWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TextWidget.widget-expanded"><a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">        generates a TEXTAREA tag.</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line"> </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line">        <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">,</tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name" targets="Class web2py.gluon.sqlhtml.TextWidget=web2py.gluon.sqlhtml.TextWidget-class.html"><a title="web2py.gluon.sqlhtml.TextWidget" class="py-name" href="#" onclick="return doclink('link-57', 'TextWidget', 'link-57');">TextWidget</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-58', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-59" class="py-name"><a title="web2py.gluon.html.TEXTAREA" class="py-name" href="#" onclick="return doclink('link-59', 'TEXTAREA', 'link-10');">TEXTAREA</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line"> </tt>
<a name="BooleanWidget"></a><div id="BooleanWidget-def"><a name="L169"></a><tt class="py-lineno"> 169</tt> <a class="py-toggle" href="#" id="BooleanWidget-toggle" onclick="return toggle('BooleanWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.BooleanWidget-class.html">BooleanWidget</a><tt class="py-op">(</tt><tt class="py-base-class">FormWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BooleanWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BooleanWidget-expanded"><a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line"> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="BooleanWidget.widget"></a><div id="BooleanWidget.widget-def"><a name="L172"></a><tt class="py-lineno"> 172</tt> <a class="py-toggle" href="#" id="BooleanWidget.widget-toggle" onclick="return toggle('BooleanWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.BooleanWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BooleanWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BooleanWidget.widget-expanded"><a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line"><tt class="py-docstring">        generates an INPUT checkbox tag.</tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">            <tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'checkbox'</tt><tt class="py-op">,</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line">            <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name" targets="Class web2py.gluon.sqlhtml.BooleanWidget=web2py.gluon.sqlhtml.BooleanWidget-class.html"><a title="web2py.gluon.sqlhtml.BooleanWidget" class="py-name" href="#" onclick="return doclink('link-60', 'BooleanWidget', 'link-60');">BooleanWidget</a></tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-61', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line"> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-62" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-62', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line"> </tt>
<a name="OptionsWidget"></a><div id="OptionsWidget-def"><a name="L188"></a><tt class="py-lineno"> 188</tt> <a class="py-toggle" href="#" id="OptionsWidget-toggle" onclick="return toggle('OptionsWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a><tt class="py-op">(</tt><tt class="py-base-class">FormWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OptionsWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="OptionsWidget-expanded"><a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"> </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="OptionsWidget.has_options"></a><div id="OptionsWidget.has_options-def"><a name="L191"></a><tt class="py-lineno"> 191</tt> <a class="py-toggle" href="#" id="OptionsWidget.has_options-toggle" onclick="return toggle('OptionsWidget.has_options');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options">has_options</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OptionsWidget.has_options-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="OptionsWidget.has_options-expanded"><a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line"><tt class="py-docstring">        checks if the field has selectable options</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line"><tt class="py-docstring">        :param field: the field needing checking</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line"><tt class="py-docstring">        :returns: True if the field has options</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-63', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> <tt class="py-string">'options'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line"> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="OptionsWidget.widget"></a><div id="OptionsWidget.widget-def"><a name="L202"></a><tt class="py-lineno"> 202</tt> <a class="py-toggle" href="#" id="OptionsWidget.widget-toggle" onclick="return toggle('OptionsWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.OptionsWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="OptionsWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="OptionsWidget.widget-expanded"><a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line"><tt class="py-docstring">        generates a SELECT tag, including OPTIONs (only 1 option allowed)</tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line">        <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">            <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name" targets="Class web2py.gluon.sqlhtml.OptionsWidget=web2py.gluon.sqlhtml.OptionsWidget-class.html"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-64', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-65', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line"> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">        <tt id="link-66" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-66', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-67', 'requires', 'link-50');">requires</a></tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-68', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">            <tt id="link-69" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-69', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-70', 'requires', 'link-50');">requires</a></tt><tt class="py-op">]</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-71" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-71', 'requires', 'link-50');">requires</a></tt><tt class="py-op">:</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-72" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-72', 'requires', 'link-50');">requires</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'options'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">                <tt id="link-73" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-73', 'options', 'link-73');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-74" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-74', 'requires', 'link-50');">requires</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-75', 'options', 'link-73');">options</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'widget cannot determine options of %s'</tt> \ </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-name">field</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">        <tt class="py-name">opts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-76', 'OPTION', 'link-18');">OPTION</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt id="link-77" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-77', 'k', 'link-77');">k</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-78" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-78', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt id="link-79" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-79', 'options', 'link-73');">options</a></tt><tt class="py-op">]</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line"> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-80" class="py-name"><a title="web2py.gluon.html.SELECT" class="py-name" href="#" onclick="return doclink('link-80', 'SELECT', 'link-19');">SELECT</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">opts</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line"> </tt>
<a name="ListWidget"></a><div id="ListWidget-def"><a name="L226"></a><tt class="py-lineno"> 226</tt> <a class="py-toggle" href="#" id="ListWidget-toggle" onclick="return toggle('ListWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.ListWidget-class.html">ListWidget</a><tt class="py-op">(</tt><tt class="py-base-class">StringWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ListWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ListWidget-expanded"><a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="ListWidget.widget"></a><div id="ListWidget.widget-def"><a name="L228"></a><tt class="py-lineno"> 228</tt> <a class="py-toggle" href="#" id="ListWidget.widget-toggle" onclick="return toggle('ListWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.ListWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ListWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ListWidget.widget-expanded"><a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">        <tt class="py-name">_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s_%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">,</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-81', 'name', 'link-46');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">        <tt id="link-82" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-82', '_name', 'link-48');">_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-83', 'name', 'link-46');">name</a></tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">==</tt><tt class="py-string">'list:integer'</tt><tt class="py-op">:</tt> <tt class="py-name">_class</tt> <tt class="py-op">=</tt> <tt class="py-string">'integer'</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">_class</tt> <tt class="py-op">=</tt> <tt class="py-string">'string'</tt> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">        <tt id="link-84" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-84', 'items', 'link-84');">items</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-85', 'LI', 'link-9');">LI</a></tt><tt class="py-op">(</tt><tt id="link-86" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-86', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">_id</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">_class</tt><tt class="py-op">,</tt><tt id="link-87" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-87', '_name', 'link-48');">_name</a></tt><tt class="py-op">=</tt><tt id="link-88" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-88', '_name', 'link-48');">_name</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">v</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line">                   <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line">        <tt class="py-name">script</tt><tt class="py-op">=</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-89', 'SCRIPT', 'link-13');">SCRIPT</a></tt><tt class="py-op">(</tt><tt class="py-string">"""</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line"><tt class="py-string">// from http://refactormycode.com/codes/694-expanding-input-list-using-jquery</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line"><tt class="py-string">(function(){</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line"><tt class="py-string">jQuery.fn.grow_input = function() {</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line"><tt class="py-string">  return this.each(function() {</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line"><tt class="py-string">    var ul = this;</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line"><tt class="py-string">    jQuery(ul).find(":text").after('&lt;a href="javascript:void(0)&gt;+&lt;/a&gt;').keypress(function (e) { return (e.which == 13) ? pe(ul) : true; }).next().click(function(){ pe(ul) });</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line"><tt class="py-string">  });</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line"><tt class="py-string">};</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line"><tt class="py-string">function pe(ul) {</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line"><tt class="py-string">  var new_line = ml(ul);</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line"><tt class="py-string">  rel(ul);</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line"><tt class="py-string">  new_line.appendTo(ul);</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line"><tt class="py-string">  new_line.find(":text").focus();</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line"><tt class="py-string">  return false;</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line"><tt class="py-string">function ml(ul) {</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line"><tt class="py-string">  var line = jQuery(ul).find("li:first").clone(true);</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line"><tt class="py-string">  line.find(':text').val('');</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line"><tt class="py-string">  return line;</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line"><tt class="py-string">function rel(ul) {</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line"><tt class="py-string">  jQuery(ul).find("li").each(function() {</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line"><tt class="py-string">    var trimmed = jQuery.trim(jQuery(this.firstChild).val());</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line"><tt class="py-string">    if (trimmed=='') jQuery(this).remove(); else jQuery(this.firstChild).val(trimmed);</tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line"><tt class="py-string">  });</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line"><tt class="py-string">})();</tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line"><tt class="py-string">jQuery(document).ready(function(){jQuery('#%s_grow_input').grow_input();});</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line"><tt class="py-string">"""</tt> <tt class="py-op">%</tt> <tt class="py-name">_id</tt><tt class="py-op">)</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line">        <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'_id'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">_id</tt><tt class="py-op">+</tt><tt class="py-string">'_grow_input'</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-90" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-90', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-91', 'UL', 'link-8');">UL</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-92', 'items', 'link-84');">items</a></tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">script</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line"> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line"> </tt>
<a name="MultipleOptionsWidget"></a><div id="MultipleOptionsWidget-def"><a name="L269"></a><tt class="py-lineno"> 269</tt> <a class="py-toggle" href="#" id="MultipleOptionsWidget-toggle" onclick="return toggle('MultipleOptionsWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html">MultipleOptionsWidget</a><tt class="py-op">(</tt><tt class="py-base-class">OptionsWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultipleOptionsWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MultipleOptionsWidget-expanded"><a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line"> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="MultipleOptionsWidget.widget"></a><div id="MultipleOptionsWidget.widget-def"><a name="L272"></a><tt class="py-lineno"> 272</tt> <a class="py-toggle" href="#" id="MultipleOptionsWidget.widget-toggle" onclick="return toggle('MultipleOptionsWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">=</tt><tt class="py-number">5</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultipleOptionsWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MultipleOptionsWidget.widget-expanded"><a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line"><tt class="py-docstring">        generates a SELECT tag, including OPTIONs (multiple options allowed)</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line"><tt class="py-docstring">        :param size: optional param (default=5) to indicate how many rows must</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line"><tt class="py-docstring">            be shown</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line"> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">        <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-93', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_size</tt><tt class="py-op">=</tt><tt class="py-name">size</tt><tt class="py-op">,</tt> <tt class="py-name">_multiple</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-94" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-94', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">.</tt><tt id="link-95" class="py-name" targets="Static Method web2py.gluon.sqlhtml.BooleanWidget.widget()=web2py.gluon.sqlhtml.BooleanWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.CheckboxesWidget.widget()=web2py.gluon.sqlhtml.CheckboxesWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.FormWidget.widget()=web2py.gluon.sqlhtml.FormWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.ListWidget.widget()=web2py.gluon.sqlhtml.ListWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.MultipleOptionsWidget.widget()=web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.OptionsWidget.widget()=web2py.gluon.sqlhtml.OptionsWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.PasswordWidget.widget()=web2py.gluon.sqlhtml.PasswordWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.RadioWidget.widget()=web2py.gluon.sqlhtml.RadioWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.StringWidget.widget()=web2py.gluon.sqlhtml.StringWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.TextWidget.widget()=web2py.gluon.sqlhtml.TextWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.UploadWidget.widget()=web2py.gluon.sqlhtml.UploadWidget-class.html#widget,Module web2py.gluon.widget=web2py.gluon.widget-module.html"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-95', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line"> </tt>
<a name="RadioWidget"></a><div id="RadioWidget-def"><a name="L287"></a><tt class="py-lineno"> 287</tt> <a class="py-toggle" href="#" id="RadioWidget-toggle" onclick="return toggle('RadioWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.RadioWidget-class.html">RadioWidget</a><tt class="py-op">(</tt><tt class="py-base-class">OptionsWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RadioWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="RadioWidget-expanded"><a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line"> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RadioWidget.widget"></a><div id="RadioWidget.widget-def"><a name="L290"></a><tt class="py-lineno"> 290</tt> <a class="py-toggle" href="#" id="RadioWidget.widget-toggle" onclick="return toggle('RadioWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.RadioWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RadioWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="RadioWidget.widget-expanded"><a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line"><tt class="py-docstring">        generates a TABLE tag, including INPUT radios (only 1 option allowed)</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-96" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-96', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-97', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line"> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">        <tt id="link-98" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-98', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-99', 'requires', 'link-50');">requires</a></tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-100', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line">            <tt id="link-101" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-101', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-102', 'requires', 'link-50');">requires</a></tt><tt class="py-op">]</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-103" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-103', 'requires', 'link-50');">requires</a></tt><tt class="py-op">:</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-104', 'requires', 'link-50');">requires</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'options'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line">                <tt id="link-105" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-105', 'options', 'link-73');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-106" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-106', 'requires', 'link-50');">requires</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-107', 'options', 'link-73');">options</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'widget cannot determine options of %s'</tt> \ </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-name">field</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line"> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">        <tt id="link-108" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-108', 'options', 'link-73');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-109" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-109', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-110" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-110', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt id="link-111" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-111', 'options', 'link-73');">options</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">        <tt class="py-name">opts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">        <tt class="py-name">cols</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-112', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'cols'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line">        <tt class="py-name">totals</tt> <tt class="py-op">=</tt> <tt id="link-113" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-113', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt id="link-114" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-114', 'options', 'link-73');">options</a></tt><tt class="py-op">)</tt> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">        <tt class="py-name">mods</tt> <tt class="py-op">=</tt> <tt class="py-name">totals</tt><tt class="py-op">%</tt><tt class="py-name">cols</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line">        <tt id="link-115" class="py-name" targets="Method web2py.gluon.tools.Crud.rows()=web2py.gluon.tools.Crud-class.html#rows"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-115', 'rows', 'link-115');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">totals</tt><tt class="py-op">/</tt><tt class="py-name">cols</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mods</tt><tt class="py-op">:</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">            <tt id="link-116" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-116', 'rows', 'link-115');">rows</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line"> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">r_index</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-117', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">            <tt class="py-name">tds</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt id="link-118" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-118', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt id="link-119" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-119', 'options', 'link-73');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">r_index</tt><tt class="py-op">*</tt><tt class="py-name">cols</tt><tt class="py-op">:</tt><tt class="py-op">(</tt><tt class="py-name">r_index</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">*</tt><tt class="py-name">cols</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">                <tt class="py-name">tds</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-120', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-121', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-122', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'radio'</tt><tt class="py-op">,</tt> <tt id="link-123" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-123', '_name', 'link-48');">_name</a></tt><tt class="py-op">=</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-124', 'name', 'link-46');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">                         <tt id="link-125" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-125', 'requires', 'link-50');">requires</a></tt><tt class="py-op">=</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-126', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'requires'</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">                         <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt id="link-127" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-127', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">                         <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">            <tt class="py-name">opts</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-128', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-129" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-129', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt class="py-name">tds</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line"> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">opts</tt><tt class="py-op">:</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">            <tt class="py-name">opts</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'hideerror'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-130" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-130', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">opts</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line"> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line"> </tt>
<a name="CheckboxesWidget"></a><div id="CheckboxesWidget-def"><a name="L332"></a><tt class="py-lineno"> 332</tt> <a class="py-toggle" href="#" id="CheckboxesWidget-toggle" onclick="return toggle('CheckboxesWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html">CheckboxesWidget</a><tt class="py-op">(</tt><tt class="py-base-class">OptionsWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CheckboxesWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CheckboxesWidget-expanded"><a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line"> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="CheckboxesWidget.widget"></a><div id="CheckboxesWidget.widget-def"><a name="L335"></a><tt class="py-lineno"> 335</tt> <a class="py-toggle" href="#" id="CheckboxesWidget.widget-toggle" onclick="return toggle('CheckboxesWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CheckboxesWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CheckboxesWidget.widget-expanded"><a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line"><tt class="py-docstring">        generates a TABLE tag, including INPUT checkboxes (multiple allowed)</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line"> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">        <tt class="py-comment"># was values = re.compile('[\w\-:]+').findall(str(value))</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">            <tt id="link-131" class="py-name" targets="Method web2py.gluon.rocket.Headers.values()=web2py.gluon.rocket.Headers-class.html#values"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-131', 'values', 'link-131');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">            <tt id="link-132" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-132', 'values', 'link-131');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line"> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-133', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">.</tt><tt id="link-134" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-134', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line"> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">        <tt id="link-135" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-135', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-136', 'requires', 'link-50');">requires</a></tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-137', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">            <tt id="link-138" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-138', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-139" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-139', 'requires', 'link-50');">requires</a></tt><tt class="py-op">]</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-140" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-140', 'requires', 'link-50');">requires</a></tt><tt class="py-op">:</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-141" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-141', 'requires', 'link-50');">requires</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'options'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">                <tt id="link-142" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-142', 'options', 'link-73');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-143" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-143', 'requires', 'link-50');">requires</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-144', 'options', 'link-73');">options</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'widget cannot determine options of %s'</tt> \ </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-name">field</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line"> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line">        <tt id="link-145" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-145', 'options', 'link-73');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-146" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-146', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-147" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-147', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt id="link-148" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-148', 'options', 'link-73');">options</a></tt> <tt class="py-keyword">if</tt> <tt id="link-149" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-149', 'k', 'link-77');">k</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">''</tt><tt class="py-op">]</tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">        <tt class="py-name">opts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">        <tt class="py-name">cols</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-150', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'cols'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-name">totals</tt> <tt class="py-op">=</tt> <tt id="link-151" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-151', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-152', 'options', 'link-73');">options</a></tt><tt class="py-op">)</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">        <tt class="py-name">mods</tt> <tt class="py-op">=</tt> <tt class="py-name">totals</tt> <tt class="py-op">%</tt> <tt class="py-name">cols</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt id="link-153" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-153', 'rows', 'link-115');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">totals</tt> <tt class="py-op">/</tt> <tt class="py-name">cols</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mods</tt><tt class="py-op">:</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">            <tt id="link-154" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-154', 'rows', 'link-115');">rows</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line"> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">r_index</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-155', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">            <tt class="py-name">tds</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt id="link-156" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-156', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt id="link-157" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-157', 'options', 'link-73');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">r_index</tt><tt class="py-op">*</tt><tt class="py-name">cols</tt><tt class="py-op">:</tt><tt class="py-op">(</tt><tt class="py-name">r_index</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">*</tt><tt class="py-name">cols</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-158" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-158', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt id="link-159" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-159', 'values', 'link-131');">values</a></tt><tt class="py-op">:</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">                    <tt class="py-name">r_value</tt> <tt class="py-op">=</tt> <tt id="link-160" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-160', 'k', 'link-77');">k</a></tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">                    <tt class="py-name">r_value</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">                <tt class="py-name">tds</tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-161', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-162" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-162', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-163', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'checkbox'</tt><tt class="py-op">,</tt> <tt id="link-164" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-164', '_name', 'link-48');">_name</a></tt><tt class="py-op">=</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-165', 'name', 'link-46');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">                         <tt id="link-166" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-166', 'requires', 'link-50');">requires</a></tt><tt class="py-op">=</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-167', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'requires'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">                         <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt id="link-168" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-168', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">                         <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">r_value</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">            <tt class="py-name">opts</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-169', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-170" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-170', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt class="py-name">tds</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line"> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">opts</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">            <tt class="py-name">opts</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'hideerror'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-171" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-171', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">opts</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line"> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line"> </tt>
<a name="PasswordWidget"></a><div id="PasswordWidget-def"><a name="L387"></a><tt class="py-lineno"> 387</tt> <a class="py-toggle" href="#" id="PasswordWidget-toggle" onclick="return toggle('PasswordWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.PasswordWidget-class.html">PasswordWidget</a><tt class="py-op">(</tt><tt class="py-base-class">FormWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PasswordWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="PasswordWidget-expanded"><a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line"> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">    <tt id="link-172" class="py-name" targets="Variable web2py.gluon.sqlhtml.PasswordWidget.DEFAULT_PASSWORD_DISPLAY=web2py.gluon.sqlhtml.PasswordWidget-class.html#DEFAULT_PASSWORD_DISPLAY"><a title="web2py.gluon.sqlhtml.PasswordWidget.DEFAULT_PASSWORD_DISPLAY" class="py-name" href="#" onclick="return doclink('link-172', 'DEFAULT_PASSWORD_DISPLAY', 'link-172');">DEFAULT_PASSWORD_DISPLAY</a></tt> <tt class="py-op">=</tt> <tt class="py-number">8</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line"> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="PasswordWidget.widget"></a><div id="PasswordWidget.widget-def"><a name="L392"></a><tt class="py-lineno"> 392</tt> <a class="py-toggle" href="#" id="PasswordWidget.widget-toggle" onclick="return toggle('PasswordWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.PasswordWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PasswordWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PasswordWidget.widget-expanded"><a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line"><tt class="py-docstring">        generates a INPUT password tag.</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line"><tt class="py-docstring">        If a value is present it will be shown as a number of '*', not related</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line"><tt class="py-docstring">        to the length of the actual value.</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line"> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">            <tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">            <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">value</tt> <tt class="py-keyword">and</tt> <tt id="link-173" class="py-name" targets="Class web2py.gluon.sqlhtml.PasswordWidget=web2py.gluon.sqlhtml.PasswordWidget-class.html"><a title="web2py.gluon.sqlhtml.PasswordWidget" class="py-name" href="#" onclick="return doclink('link-173', 'PasswordWidget', 'link-173');">PasswordWidget</a></tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget.DEFAULT_PASSWORD_DISPLAY" class="py-name" href="#" onclick="return doclink('link-174', 'DEFAULT_PASSWORD_DISPLAY', 'link-172');">DEFAULT_PASSWORD_DISPLAY</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-175" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget" class="py-name" href="#" onclick="return doclink('link-175', 'PasswordWidget', 'link-173');">PasswordWidget</a></tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-176', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line"> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-177" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-177', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line"> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line"> </tt>
<a name="UploadWidget"></a><div id="UploadWidget-def"><a name="L410"></a><tt class="py-lineno"> 410</tt> <a class="py-toggle" href="#" id="UploadWidget-toggle" onclick="return toggle('UploadWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a><tt class="py-op">(</tt><tt class="py-base-class">FormWidget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="UploadWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="UploadWidget-expanded"><a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line"> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">    <tt id="link-178" class="py-name" targets="Variable web2py.gluon.sqlhtml.UploadWidget.DEFAULT_WIDTH=web2py.gluon.sqlhtml.UploadWidget-class.html#DEFAULT_WIDTH"><a title="web2py.gluon.sqlhtml.UploadWidget.DEFAULT_WIDTH" class="py-name" href="#" onclick="return doclink('link-178', 'DEFAULT_WIDTH', 'link-178');">DEFAULT_WIDTH</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'150px'</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line">    <tt id="link-179" class="py-name" targets="Variable web2py.gluon.sqlhtml.UploadWidget.ID_DELETE_SUFFIX=web2py.gluon.sqlhtml.UploadWidget-class.html#ID_DELETE_SUFFIX"><a title="web2py.gluon.sqlhtml.UploadWidget.ID_DELETE_SUFFIX" class="py-name" href="#" onclick="return doclink('link-179', 'ID_DELETE_SUFFIX', 'link-179');">ID_DELETE_SUFFIX</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'__delete'</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line">    <tt id="link-180" class="py-name" targets="Variable web2py.gluon.sqlhtml.UploadWidget.GENERIC_DESCRIPTION=web2py.gluon.sqlhtml.UploadWidget-class.html#GENERIC_DESCRIPTION"><a title="web2py.gluon.sqlhtml.UploadWidget.GENERIC_DESCRIPTION" class="py-name" href="#" onclick="return doclink('link-180', 'GENERIC_DESCRIPTION', 'link-180');">GENERIC_DESCRIPTION</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'file'</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">    <tt id="link-181" class="py-name" targets="Variable web2py.gluon.sqlhtml.UploadWidget.DELETE_FILE=web2py.gluon.sqlhtml.UploadWidget-class.html#DELETE_FILE"><a title="web2py.gluon.sqlhtml.UploadWidget.DELETE_FILE" class="py-name" href="#" onclick="return doclink('link-181', 'DELETE_FILE', 'link-181');">DELETE_FILE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'delete'</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="UploadWidget.widget"></a><div id="UploadWidget.widget-def"><a name="L418"></a><tt class="py-lineno"> 418</tt> <a class="py-toggle" href="#" id="UploadWidget.widget-toggle" onclick="return toggle('UploadWidget.widget');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.UploadWidget-class.html#widget">widget</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">download_url</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="UploadWidget.widget-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="UploadWidget.widget-expanded"><a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-docstring">        generates a INPUT file tag.</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line"><tt class="py-docstring">        Optionally provides an A link to the file, including a checkbox so</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line"><tt class="py-docstring">        the file can be deleted.</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line"><tt class="py-docstring">        All is wrapped in a DIV.</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line"><tt class="py-docstring">        see also: :meth:`FormWidget.widget`</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line"><tt class="py-docstring">        :param download_url: Optional URL to link to the file (default = None)</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line"> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">            <tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'file'</tt><tt class="py-op">,</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-182" class="py-name" targets="Class web2py.gluon.sqlhtml.UploadWidget=web2py.gluon.sqlhtml.UploadWidget-class.html"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-182', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-183" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-183', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line"> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line">        <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-184" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-184', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line"> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">download_url</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">            <tt id="link-185" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-185', 'url', 'link-185');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">download_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">value</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">br</tt><tt class="py-op">,</tt> <tt class="py-name">image</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-186', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-187" class="py-name" targets="Static Method web2py.gluon.sqlhtml.UploadWidget.is_image()=web2py.gluon.sqlhtml.UploadWidget-class.html#is_image"><a title="web2py.gluon.sqlhtml.UploadWidget.is_image" class="py-name" href="#" onclick="return doclink('link-187', 'is_image', 'link-187');">is_image</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">                <tt class="py-name">br</tt> <tt class="py-op">=</tt> <tt id="link-188" class="py-name"><a title="web2py.gluon.html.BR" class="py-name" href="#" onclick="return doclink('link-188', 'BR', 'link-11');">BR</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">                <tt class="py-name">image</tt> <tt class="py-op">=</tt> <tt id="link-189" class="py-name"><a title="web2py.gluon.html.IMG" class="py-name" href="#" onclick="return doclink('link-189', 'IMG', 'link-12');">IMG</a></tt><tt class="py-op">(</tt><tt class="py-name">_src</tt> <tt class="py-op">=</tt> <tt id="link-190" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-190', 'url', 'link-185');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">_width</tt> <tt class="py-op">=</tt> <tt id="link-191" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-191', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.DEFAULT_WIDTH" class="py-name" href="#" onclick="return doclink('link-192', 'DEFAULT_WIDTH', 'link-178');">DEFAULT_WIDTH</a></tt><tt class="py-op">)</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line"> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line">            <tt id="link-193" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-193', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">"requires"</tt><tt class="py-op">]</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-194" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-194', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-195', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> <tt id="link-196" class="py-name"><a title="web2py.gluon.validators.IS_EMPTY_OR" class="py-name" href="#" onclick="return doclink('link-196', 'IS_EMPTY_OR', 'link-39');">IS_EMPTY_OR</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-197" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-197', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">inp</tt><tt class="py-op">,</tt> <tt class="py-string">'['</tt><tt class="py-op">,</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">                          <tt id="link-198" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-198', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt id="link-199" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-199', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.GENERIC_DESCRIPTION" class="py-name" href="#" onclick="return doclink('link-200', 'GENERIC_DESCRIPTION', 'link-180');">GENERIC_DESCRIPTION</a></tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt> <tt class="py-op">=</tt> <tt id="link-201" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-201', 'url', 'link-185');">url</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">                          <tt class="py-string">'|'</tt><tt class="py-op">,</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">                          <tt id="link-202" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-202', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'checkbox'</tt><tt class="py-op">,</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">                                <tt id="link-203" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-203', '_name', 'link-48');">_name</a></tt><tt class="py-op">=</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-204" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-204', 'name', 'link-46');">name</a></tt> <tt class="py-op">+</tt> <tt id="link-205" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-205', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-206" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.ID_DELETE_SUFFIX" class="py-name" href="#" onclick="return doclink('link-206', 'ID_DELETE_SUFFIX', 'link-179');">ID_DELETE_SUFFIX</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line">                          <tt id="link-207" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-207', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-208" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.DELETE_FILE" class="py-name" href="#" onclick="return doclink('link-208', 'DELETE_FILE', 'link-181');">DELETE_FILE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line">                          <tt class="py-string">']'</tt><tt class="py-op">,</tt> <tt class="py-name">br</tt><tt class="py-op">,</tt> <tt class="py-name">image</tt><tt class="py-op">)</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-209" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-209', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">inp</tt><tt class="py-op">,</tt> <tt class="py-string">'['</tt><tt class="py-op">,</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line">                          <tt id="link-210" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-210', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt id="link-211" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-211', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.GENERIC_DESCRIPTION" class="py-name" href="#" onclick="return doclink('link-212', 'GENERIC_DESCRIPTION', 'link-180');">GENERIC_DESCRIPTION</a></tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt> <tt class="py-op">=</tt> <tt id="link-213" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-213', 'url', 'link-185');">url</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line">                          <tt class="py-string">']'</tt><tt class="py-op">,</tt> <tt class="py-name">br</tt><tt class="py-op">,</tt> <tt class="py-name">image</tt><tt class="py-op">)</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inp</tt> </tt>
</div><a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="UploadWidget.represent"></a><div id="UploadWidget.represent-def"><a name="L461"></a><tt class="py-lineno"> 461</tt> <a class="py-toggle" href="#" id="UploadWidget.represent-toggle" onclick="return toggle('UploadWidget.represent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.UploadWidget-class.html#represent">represent</a><tt class="py-op">(</tt><tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">download_url</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="UploadWidget.represent-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="UploadWidget.represent-expanded"><a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line"><tt class="py-docstring">        how to represent the file:</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line"><tt class="py-docstring">        - with download url and if it is an image: &lt;A href=...&gt;&lt;IMG ...&gt;&lt;/A&gt;</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line"><tt class="py-docstring">        - otherwise with download url: &lt;A href=...&gt;file&lt;/A&gt;</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line"><tt class="py-docstring">        - otherwise: file</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line"><tt class="py-docstring">        :param field: the field</tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: the field value</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line"><tt class="py-docstring">        :param download_url: url for the file download (default = None)</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line"> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line">        <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-214" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-214', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-215" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.GENERIC_DESCRIPTION" class="py-name" href="#" onclick="return doclink('link-215', 'GENERIC_DESCRIPTION', 'link-180');">GENERIC_DESCRIPTION</a></tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line"> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">download_url</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line">            <tt id="link-216" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-216', 'url', 'link-185');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">download_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">value</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-217" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-217', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.is_image" class="py-name" href="#" onclick="return doclink('link-218', 'is_image', 'link-187');">is_image</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-219" class="py-name"><a title="web2py.gluon.html.IMG" class="py-name" href="#" onclick="return doclink('link-219', 'IMG', 'link-12');">IMG</a></tt><tt class="py-op">(</tt><tt class="py-name">_src</tt> <tt class="py-op">=</tt> <tt id="link-220" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-220', 'url', 'link-185');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">_width</tt> <tt class="py-op">=</tt> <tt id="link-221" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-221', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-222" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.DEFAULT_WIDTH" class="py-name" href="#" onclick="return doclink('link-222', 'DEFAULT_WIDTH', 'link-178');">DEFAULT_WIDTH</a></tt><tt class="py-op">)</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line">            <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-223" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-223', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt class="py-name">inp</tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt> <tt class="py-op">=</tt> <tt id="link-224" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-224', 'url', 'link-185');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line"> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inp</tt> </tt>
</div><a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line"> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="UploadWidget.is_image"></a><div id="UploadWidget.is_image-def"><a name="L485"></a><tt class="py-lineno"> 485</tt> <a class="py-toggle" href="#" id="UploadWidget.is_image-toggle" onclick="return toggle('UploadWidget.is_image');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.UploadWidget-class.html#is_image">is_image</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="UploadWidget.is_image-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="UploadWidget.is_image-expanded"><a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line"><tt class="py-docstring">        Tries to check if the filename provided references to an image</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line"><tt class="py-docstring">        Checking is based on filename extension. Currently recognized:</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line"><tt class="py-docstring">           gif, png, jp(e)g, bmp</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: filename</tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line">        <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-225" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-225', 'lower', 'link-225');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'gif'</tt><tt class="py-op">,</tt> <tt class="py-string">'png'</tt><tt class="py-op">,</tt> <tt class="py-string">'jpg'</tt><tt class="py-op">,</tt> <tt class="py-string">'jpeg'</tt><tt class="py-op">,</tt> <tt class="py-string">'bmp'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div></div><a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line"> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"> </tt>
<a name="AutocompleteWidget"></a><div id="AutocompleteWidget-def"><a name="L501"></a><tt class="py-lineno"> 501</tt> <a class="py-toggle" href="#" id="AutocompleteWidget-toggle" onclick="return toggle('AutocompleteWidget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html">AutocompleteWidget</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="AutocompleteWidget-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="AutocompleteWidget-expanded"><a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line"> </tt>
<a name="AutocompleteWidget.__init__"></a><div id="AutocompleteWidget.__init__-def"><a name="L503"></a><tt class="py-lineno"> 503</tt> <a class="py-toggle" href="#" id="AutocompleteWidget.__init__-toggle" onclick="return toggle('AutocompleteWidget.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">id_field</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">db</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line">                 <tt class="py-param">orderby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">limitby</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">                 <tt class="py-param">keyword</tt><tt class="py-op">=</tt><tt class="py-string">'_autocomplete_%(fieldname)s'</tt><tt class="py-op">,</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line">                 <tt class="py-param">min_length</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="AutocompleteWidget.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="AutocompleteWidget.__init__-expanded"><a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt> <tt class="py-op">=</tt> <tt class="py-name">keyword</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">=</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-226" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-226', 'name', 'link-46');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt> <tt class="py-keyword">or</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">orderby</tt> <tt class="py-op">=</tt> <tt class="py-name">orderby</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">limitby</tt> <tt class="py-op">=</tt> <tt class="py-name">limitby</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_length</tt> <tt class="py-op">=</tt> <tt class="py-name">min_length</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">]</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">id_field</tt><tt class="py-op">:</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_reference</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-227', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">id_field</tt><tt class="py-op">)</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_reference</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-string">'application'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-228', 'url', 'link-185');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">Url</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-229" class="py-name" targets="Method web2py.gluon.sqlhtml.AutocompleteWidget.callback()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#callback,Function web2py.gluon.tools.callback()=web2py.gluon.tools-module.html#callback"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-229', 'callback', 'link-229');">callback</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-230" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-230', 'url', 'link-185');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt> </tt>
</div><a name="AutocompleteWidget.callback"></a><div id="AutocompleteWidget.callback-def"><a name="L524"></a><tt class="py-lineno"> 524</tt> <a class="py-toggle" href="#" id="AutocompleteWidget.callback-toggle" onclick="return toggle('AutocompleteWidget.callback');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#callback">callback</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="AutocompleteWidget.callback-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="AutocompleteWidget.callback-expanded"><a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line">            <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line">            <tt id="link-231" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-231', 'rows', 'link-115');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-232" class="py-name" targets="Method web2py.gluon.dal.Expression.like()=web2py.gluon.dal.Expression-class.html#like"><a title="web2py.gluon.dal.Expression.like" class="py-name" href="#" onclick="return doclink('link-232', 'like', 'link-232');">like</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">]</tt><tt class="py-op">+</tt><tt class="py-string">'%'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt>\ </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line">                <tt class="py-op">.</tt><tt id="link-233" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.select()=web2py.gluon.dal.BaseAdapter-class.html#select,Method web2py.gluon.dal.CouchDBAdapter.select()=web2py.gluon.dal.CouchDBAdapter-class.html#select,Method web2py.gluon.dal.GoogleDatastoreAdapter.select()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select,Method web2py.gluon.dal.MongoDBAdapter.select()=web2py.gluon.dal.MongoDBAdapter-class.html#select,Method web2py.gluon.dal.Set.select()=web2py.gluon.dal.Set-class.html#select,Method web2py.gluon.tools.Crud.select()=web2py.gluon.tools.Crud-class.html#select"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-233', 'select', 'link-233');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">orderby</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">orderby</tt><tt class="py-op">,</tt><tt class="py-name">limitby</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">limitby</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-234" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-234', 'rows', 'link-115');">rows</a></tt><tt class="py-op">:</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_reference</tt><tt class="py-op">:</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line">                    <tt class="py-name">id_field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-235" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-235', 'HTTP', 'link-1');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt id="link-236" class="py-name"><a title="web2py.gluon.html.SELECT" class="py-name" href="#" onclick="return doclink('link-236', 'SELECT', 'link-19');">SELECT</a></tt><tt class="py-op">(</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'autocomplete'</tt><tt class="py-op">,</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line">                                          <tt class="py-name">_size</tt><tt class="py-op">=</tt><tt id="link-237" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-237', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt id="link-238" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-238', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_multiple</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt id="link-239" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-239', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt id="link-240" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-240', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line">                                          <tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-241" class="py-name"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-241', 'OPTION', 'link-18');">OPTION</a></tt><tt class="py-op">(</tt><tt id="link-242" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-242', 's', 'link-242');">s</a></tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-243" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-243', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">_value</tt><tt class="py-op">=</tt><tt id="link-244" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-244', 's', 'link-242');">s</a></tt><tt class="py-op">[</tt><tt class="py-name">id_field</tt><tt class="py-op">.</tt><tt id="link-245" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-245', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line">                                                   <tt class="py-name">_selected</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt id="link-246" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-246', 'k', 'link-77');">k</a></tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line">                                                <tt class="py-keyword">for</tt> <tt id="link-247" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-247', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt><tt id="link-248" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-248', 's', 'link-242');">s</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt id="link-249" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-249', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-250" class="py-name" targets="Method web2py.gluon.dal.Rows.xml()=web2py.gluon.dal.Rows-class.html#xml,Method web2py.gluon.html.A.xml()=web2py.gluon.html.A-class.html#xml,Method web2py.gluon.html.CODE.xml()=web2py.gluon.html.CODE-class.html#xml,Method web2py.gluon.html.DIV.xml()=web2py.gluon.html.DIV-class.html#xml,Method web2py.gluon.html.FORM.xml()=web2py.gluon.html.FORM-class.html#xml,Method web2py.gluon.html.HTML.xml()=web2py.gluon.html.HTML-class.html#xml,Method web2py.gluon.html.INPUT.xml()=web2py.gluon.html.INPUT-class.html#xml,Method web2py.gluon.html.MARKMIN.xml()=web2py.gluon.html.MARKMIN-class.html#xml,Method web2py.gluon.html.MENU.xml()=web2py.gluon.html.MENU-class.html#xml,Method web2py.gluon.html.P.xml()=web2py.gluon.html.P-class.html#xml,Method web2py.gluon.html.SCRIPT.xml()=web2py.gluon.html.SCRIPT-class.html#xml,Method web2py.gluon.html.STYLE.xml()=web2py.gluon.html.STYLE-class.html#xml,Method web2py.gluon.html.XHTML.xml()=web2py.gluon.html.XHTML-class.html#xml,Method web2py.gluon.html.XML.xml()=web2py.gluon.html.XML-class.html#xml,Method web2py.gluon.html.XmlComponent.xml()=web2py.gluon.html.XmlComponent-class.html#xml,Method web2py.gluon.languages.lazyT.xml()=web2py.gluon.languages.lazyT-class.html#xml,Function web2py.gluon.serializers.xml()=web2py.gluon.serializers-module.html#xml,Method web2py.gluon.tools.Recaptcha.xml()=web2py.gluon.tools.Recaptcha-class.html#xml,Method web2py.gluon.tools.Service.xml()=web2py.gluon.tools.Service-class.html#xml"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-250', 'xml', 'link-250');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-251" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-251', 'HTTP', 'link-1');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt id="link-252" class="py-name"><a title="web2py.gluon.html.SELECT" class="py-name" href="#" onclick="return doclink('link-252', 'SELECT', 'link-19');">SELECT</a></tt><tt class="py-op">(</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'autocomplete'</tt><tt class="py-op">,</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line">                                          <tt class="py-name">_size</tt><tt class="py-op">=</tt><tt id="link-253" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-253', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt id="link-254" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-254', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_multiple</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt id="link-255" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-255', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt id="link-256" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-256', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line">                                          <tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-257" class="py-name"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-257', 'OPTION', 'link-18');">OPTION</a></tt><tt class="py-op">(</tt><tt id="link-258" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-258', 's', 'link-242');">s</a></tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-259" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-259', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line">                                                   <tt class="py-name">_selected</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt id="link-260" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-260', 'k', 'link-77');">k</a></tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line">                                                <tt class="py-keyword">for</tt> <tt id="link-261" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-261', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt><tt id="link-262" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-262', 's', 'link-242');">s</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt id="link-263" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-263', 'rows', 'link-115');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-264" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-264', 'xml', 'link-250');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-265" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-265', 'HTTP', 'link-1');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
</div><a name="AutocompleteWidget.__call__"></a><div id="AutocompleteWidget.__call__-def"><a name="L546"></a><tt class="py-lineno"> 546</tt> <a class="py-toggle" href="#" id="AutocompleteWidget.__call__-toggle" onclick="return toggle('AutocompleteWidget.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">field</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="AutocompleteWidget.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="AutocompleteWidget.__call__-expanded"><a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">        <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line">            <tt class="py-name">_type</tt> <tt class="py-op">=</tt> <tt class="py-string">'text'</tt><tt class="py-op">,</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">        <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-266" class="py-name"><a title="web2py.gluon.sqlhtml.StringWidget" class="py-name" href="#" onclick="return doclink('link-266', 'StringWidget', 'link-54');">StringWidget</a></tt><tt class="py-op">.</tt><tt id="link-267" class="py-name"><a title="web2py.gluon.sqlhtml.FormWidget._attributes" class="py-name" href="#" onclick="return doclink('link-267', '_attributes', 'link-55');">_attributes</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line">        <tt class="py-name">div_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">+</tt><tt class="py-string">'_div'</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">        <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_autocomplete'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">'off'</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_reference</tt><tt class="py-op">:</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">            <tt class="py-name">key2</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">+</tt><tt class="py-string">'_aux'</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line">            <tt class="py-name">key3</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">+</tt><tt class="py-string">'_auto'</tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_class'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">'string'</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line">            <tt id="link-268" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-268', 'name', 'link-46');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_name'</tt><tt class="py-op">]</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'requires'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attr</tt><tt class="py-op">:</tt> <tt class="py-keyword">del</tt> <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'requires'</tt><tt class="py-op">]</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_name'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">key2</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">            <tt class="py-name">record</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-269" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-269', 'select', 'link-233');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-270" class="py-name" targets="Method web2py.gluon.dal.Rows.first()=web2py.gluon.dal.Rows-class.html#first"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-270', 'first', 'link-270');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'value'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-271" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-271', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onblur'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">"jQuery('#%(div_id)s').delay(3000).fadeOut('slow');"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">div_id</tt><tt class="py-op">=</tt><tt class="py-name">div_id</tt><tt class="py-op">,</tt><tt id="link-272" class="py-name" targets="Function web2py.gluon.rocket.u()=web2py.gluon.rocket-module.html#u"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-272', 'u', 'link-272');">u</a></tt><tt class="py-op">=</tt><tt class="py-string">'F'</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">)</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onkeyup'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"jQuery('#%(key3)s').val('');var e=event.which?event.which:event.keyCode; function %(u)s(){jQuery('#%(id)s').val(jQuery('#%(key)s :selected').text());jQuery('#%(key3)s').val(jQuery('#%(key)s').val())}; if(e==39) %(u)s(); else if(e==40) {if(jQuery('#%(key)s option:selected').next().length)jQuery('#%(key)s option:selected').attr('selected',null).next().attr('selected','selected'); %(u)s();} else if(e==38) {if(jQuery('#%(key)s option:selected').prev().length)jQuery('#%(key)s option:selected').attr('selected',null).prev().attr('selected','selected'); %(u)s();} else if(jQuery('#%(id)s').val().length&gt;=%(min_length)s) jQuery.get('%(url)s?%(key)s='+escape(jQuery('#%(id)s').val()),function(data){if(data=='')jQuery('#%(key3)s').val('');else{jQuery('#%(id)s').next('.error').hide();jQuery('#%(div_id)s').html(data).show().focus();jQuery('#%(div_id)s select').css('width',jQuery('#%(id)s').css('width'));jQuery('#%(key3)s').val(jQuery('#%(key)s').val());jQuery('#%(key)s').change(%(u)s);jQuery('#%(key)s').click(%(u)s);};}); else jQuery('#%(div_id)s').fadeOut('slow');"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-273" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-273', 'url', 'link-185');">url</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-274" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-274', 'url', 'link-185');">url</a></tt><tt class="py-op">,</tt><tt class="py-name">min_length</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_length</tt><tt class="py-op">,</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">                     <tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">,</tt><tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_id'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">key2</tt><tt class="py-op">=</tt><tt class="py-name">key2</tt><tt class="py-op">,</tt><tt class="py-name">key3</tt><tt class="py-op">=</tt><tt class="py-name">key3</tt><tt class="py-op">,</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line">                     <tt id="link-275" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-275', 'name', 'link-46');">name</a></tt><tt class="py-op">=</tt><tt id="link-276" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-276', 'name', 'link-46');">name</a></tt><tt class="py-op">,</tt><tt class="py-name">div_id</tt><tt class="py-op">=</tt><tt class="py-name">div_id</tt><tt class="py-op">,</tt><tt id="link-277" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-277', 'u', 'link-272');">u</a></tt><tt class="py-op">=</tt><tt class="py-string">'F'</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">)</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_length</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">                <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onfocus'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onkeyup'</tt><tt class="py-op">]</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-278" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-278', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt id="link-279" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-279', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-280" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-280', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'hidden'</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">key3</tt><tt class="py-op">,</tt><tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">                                               <tt id="link-281" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-281', '_name', 'link-48');">_name</a></tt><tt class="py-op">=</tt><tt id="link-282" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-282', 'name', 'link-46');">name</a></tt><tt class="py-op">,</tt><tt id="link-283" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-283', 'requires', 'link-50');">requires</a></tt><tt class="py-op">=</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-284', 'requires', 'link-50');">requires</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">                           <tt id="link-285" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-285', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">div_id</tt><tt class="py-op">,</tt><tt class="py-name">_style</tt><tt class="py-op">=</tt><tt class="py-string">'position:absolute;'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_name'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-286" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-286', 'name', 'link-46');">name</a></tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onblur'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">"jQuery('#%(div_id)s').delay(3000).fadeOut('slow');"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">div_id</tt><tt class="py-op">=</tt><tt class="py-name">div_id</tt><tt class="py-op">,</tt><tt id="link-287" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-287', 'u', 'link-272');">u</a></tt><tt class="py-op">=</tt><tt class="py-string">'F'</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">)</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onkeyup'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"var e=event.which?event.which:event.keyCode; function %(u)s(){jQuery('#%(id)s').val(jQuery('#%(key)s').val())}; if(e==39) %(u)s(); else if(e==40) {if(jQuery('#%(key)s option:selected').next().length)jQuery('#%(key)s option:selected').attr('selected',null).next().attr('selected','selected'); %(u)s();} else if(e==38) {if(jQuery('#%(key)s option:selected').prev().length)jQuery('#%(key)s option:selected').attr('selected',null).prev().attr('selected','selected'); %(u)s();} else if(jQuery('#%(id)s').val().length&gt;=%(min_length)s) jQuery.get('%(url)s?%(key)s='+escape(jQuery('#%(id)s').val()),function(data){jQuery('#%(id)s').next('.error').hide();jQuery('#%(div_id)s').html(data).show().focus();jQuery('#%(div_id)s select').css('width',jQuery('#%(id)s').css('width'));jQuery('#%(key)s').change(%(u)s);jQuery('#%(key)s').click(%(u)s);}); else jQuery('#%(div_id)s').fadeOut('slow');"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-288" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-288', 'url', 'link-185');">url</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-289" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-289', 'url', 'link-185');">url</a></tt><tt class="py-op">,</tt><tt class="py-name">min_length</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_length</tt><tt class="py-op">,</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">                     <tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">,</tt><tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_id'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">div_id</tt><tt class="py-op">=</tt><tt class="py-name">div_id</tt><tt class="py-op">,</tt><tt id="link-290" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-290', 'u', 'link-272');">u</a></tt><tt class="py-op">=</tt><tt class="py-string">'F'</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keyword</tt><tt class="py-op">)</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">min_length</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">                <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onfocus'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'_onkeyup'</tt><tt class="py-op">]</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-291" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-291', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt id="link-292" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-292', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-293" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-293', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">div_id</tt><tt class="py-op">,</tt><tt class="py-name">_style</tt><tt class="py-op">=</tt><tt class="py-string">'position:absolute;'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line"> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line"> </tt>
<a name="SQLFORM"></a><div id="SQLFORM-def"><a name="L587"></a><tt class="py-lineno"> 587</tt> <a class="py-toggle" href="#" id="SQLFORM-toggle" onclick="return toggle('SQLFORM');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLFORM-class.html">SQLFORM</a><tt class="py-op">(</tt><tt class="py-base-class">FORM</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLFORM-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SQLFORM-expanded"><a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line"> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line"><tt class="py-docstring">    SQLFORM is used to map a table (and a current record) into an HTML form</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line"><tt class="py-docstring">    given a SQLTable stored in db.table</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line"><tt class="py-docstring">    generates an insert form::</tt> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line"><tt class="py-docstring">        SQLFORM(db.table)</tt> </tt>
<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line"><tt class="py-docstring">    generates an update form::</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line"><tt class="py-docstring">        record=db.table[some_id]</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line"><tt class="py-docstring">        SQLFORM(db.table, record)</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line"><tt class="py-docstring">    generates an update with a delete button::</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line"><tt class="py-docstring">        SQLFORM(db.table, record, deletable=True)</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line"><tt class="py-docstring">    if record is an int::</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line"><tt class="py-docstring">        record=db.table[record]</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line"><tt class="py-docstring">    optional arguments:</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line"><tt class="py-docstring">    :param fields: a list of fields that should be placed in the form,</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line"><tt class="py-docstring">        default is all.</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line"><tt class="py-docstring">    :param labels: a dictionary with labels for each field, keys are the field</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line"><tt class="py-docstring">        names.</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line"><tt class="py-docstring">    :param col3: a dictionary with content for an optional third column</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line"><tt class="py-docstring">            (right of each field). keys are field names.</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line"><tt class="py-docstring">    :param linkto: the URL of a controller/function to access referencedby</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line"><tt class="py-docstring">        records</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line"><tt class="py-docstring">            see controller appadmin.py for examples</tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line"><tt class="py-docstring">    :param upload: the URL of a controller/function to download an uploaded file</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line"><tt class="py-docstring">            see controller appadmin.py for examples</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"><tt class="py-docstring">    any named optional attribute is passed to the &lt;form&gt; tag</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line"><tt class="py-docstring">            for example _class, _id, _style, _action, _method, etc.</tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line">    <tt class="py-comment"># usability improvements proposal by fpp - 4 May 2008 :</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># - correct labels (for points to field id, not field name)</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># - add label for delete checkbox</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># - add translatable label for record ID</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># - add third column to right of fields, populated from the col3 dict</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line">    <tt id="link-294" class="py-name" targets="Variable web2py.gluon.sqlhtml.SQLFORM.widgets=web2py.gluon.sqlhtml.SQLFORM-class.html#widgets"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-294', 'widgets', 'link-294');">widgets</a></tt> <tt class="py-op">=</tt> <tt id="link-295" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-295', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line">        <tt class="py-name">string</tt> <tt class="py-op">=</tt> <tt id="link-296" class="py-name"><a title="web2py.gluon.sqlhtml.StringWidget" class="py-name" href="#" onclick="return doclink('link-296', 'StringWidget', 'link-54');">StringWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt id="link-297" class="py-name"><a title="web2py.gluon.sqlhtml.TextWidget" class="py-name" href="#" onclick="return doclink('link-297', 'TextWidget', 'link-57');">TextWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt id="link-298" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget" class="py-name" href="#" onclick="return doclink('link-298', 'PasswordWidget', 'link-173');">PasswordWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">        <tt class="py-name">integer</tt> <tt class="py-op">=</tt> <tt id="link-299" class="py-name" targets="Class web2py.gluon.sqlhtml.IntegerWidget=web2py.gluon.sqlhtml.IntegerWidget-class.html"><a title="web2py.gluon.sqlhtml.IntegerWidget" class="py-name" href="#" onclick="return doclink('link-299', 'IntegerWidget', 'link-299');">IntegerWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">        <tt class="py-name">double</tt> <tt class="py-op">=</tt> <tt id="link-300" class="py-name" targets="Class web2py.gluon.sqlhtml.DoubleWidget=web2py.gluon.sqlhtml.DoubleWidget-class.html"><a title="web2py.gluon.sqlhtml.DoubleWidget" class="py-name" href="#" onclick="return doclink('link-300', 'DoubleWidget', 'link-300');">DoubleWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">        <tt class="py-name">decimal</tt> <tt class="py-op">=</tt> <tt id="link-301" class="py-name" targets="Class web2py.gluon.sqlhtml.DecimalWidget=web2py.gluon.sqlhtml.DecimalWidget-class.html"><a title="web2py.gluon.sqlhtml.DecimalWidget" class="py-name" href="#" onclick="return doclink('link-301', 'DecimalWidget', 'link-301');">DecimalWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">        <tt id="link-302" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-302', 'time', 'link-302');">time</a></tt> <tt class="py-op">=</tt> <tt id="link-303" class="py-name" targets="Class web2py.gluon.sqlhtml.TimeWidget=web2py.gluon.sqlhtml.TimeWidget-class.html"><a title="web2py.gluon.sqlhtml.TimeWidget" class="py-name" href="#" onclick="return doclink('link-303', 'TimeWidget', 'link-303');">TimeWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line">        <tt id="link-304" class="py-name" targets="Class datetime.date=datetime.date-class.html"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-304', 'date', 'link-304');">date</a></tt> <tt class="py-op">=</tt> <tt id="link-305" class="py-name" targets="Class web2py.gluon.sqlhtml.DateWidget=web2py.gluon.sqlhtml.DateWidget-class.html"><a title="web2py.gluon.sqlhtml.DateWidget" class="py-name" href="#" onclick="return doclink('link-305', 'DateWidget', 'link-305');">DateWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line">        <tt id="link-306" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-306', 'datetime', 'link-306');">datetime</a></tt> <tt class="py-op">=</tt> <tt id="link-307" class="py-name" targets="Class web2py.gluon.sqlhtml.DatetimeWidget=web2py.gluon.sqlhtml.DatetimeWidget-class.html"><a title="web2py.gluon.sqlhtml.DatetimeWidget" class="py-name" href="#" onclick="return doclink('link-307', 'DatetimeWidget', 'link-307');">DatetimeWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line">        <tt class="py-name">upload</tt> <tt class="py-op">=</tt> <tt id="link-308" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-308', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">        <tt class="py-name">boolean</tt> <tt class="py-op">=</tt> <tt id="link-309" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget" class="py-name" href="#" onclick="return doclink('link-309', 'BooleanWidget', 'link-60');">BooleanWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">        <tt class="py-name">blob</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">        <tt id="link-310" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-310', 'options', 'link-73');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-311" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-311', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">        <tt class="py-name">multiple</tt> <tt class="py-op">=</tt> <tt id="link-312" class="py-name" targets="Class web2py.gluon.sqlhtml.MultipleOptionsWidget=web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html"><a title="web2py.gluon.sqlhtml.MultipleOptionsWidget" class="py-name" href="#" onclick="return doclink('link-312', 'MultipleOptionsWidget', 'link-312');">MultipleOptionsWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line">        <tt class="py-name">radio</tt> <tt class="py-op">=</tt> <tt id="link-313" class="py-name" targets="Class web2py.gluon.sqlhtml.RadioWidget=web2py.gluon.sqlhtml.RadioWidget-class.html"><a title="web2py.gluon.sqlhtml.RadioWidget" class="py-name" href="#" onclick="return doclink('link-313', 'RadioWidget', 'link-313');">RadioWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">        <tt class="py-name">checkboxes</tt> <tt class="py-op">=</tt> <tt id="link-314" class="py-name" targets="Class web2py.gluon.sqlhtml.CheckboxesWidget=web2py.gluon.sqlhtml.CheckboxesWidget-class.html"><a title="web2py.gluon.sqlhtml.CheckboxesWidget" class="py-name" href="#" onclick="return doclink('link-314', 'CheckboxesWidget', 'link-314');">CheckboxesWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">        <tt class="py-name">autocomplete</tt> <tt class="py-op">=</tt> <tt id="link-315" class="py-name" targets="Class web2py.gluon.sqlhtml.AutocompleteWidget=web2py.gluon.sqlhtml.AutocompleteWidget-class.html"><a title="web2py.gluon.sqlhtml.AutocompleteWidget" class="py-name" href="#" onclick="return doclink('link-315', 'AutocompleteWidget', 'link-315');">AutocompleteWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">        <tt class="py-name">list</tt> <tt class="py-op">=</tt> <tt id="link-316" class="py-name" targets="Class web2py.gluon.sqlhtml.ListWidget=web2py.gluon.sqlhtml.ListWidget-class.html"><a title="web2py.gluon.sqlhtml.ListWidget" class="py-name" href="#" onclick="return doclink('link-316', 'ListWidget', 'link-316');">ListWidget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line"> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">    <tt id="link-317" class="py-name" targets="Variable web2py.gluon.sqlhtml.SQLFORM.FIELDNAME_REQUEST_DELETE=web2py.gluon.sqlhtml.SQLFORM-class.html#FIELDNAME_REQUEST_DELETE"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDNAME_REQUEST_DELETE" class="py-name" href="#" onclick="return doclink('link-317', 'FIELDNAME_REQUEST_DELETE', 'link-317');">FIELDNAME_REQUEST_DELETE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'delete_this_record'</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">    <tt id="link-318" class="py-name" targets="Variable web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD=web2py.gluon.sqlhtml.SQLFORM-class.html#FIELDKEY_DELETE_RECORD"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD" class="py-name" href="#" onclick="return doclink('link-318', 'FIELDKEY_DELETE_RECORD', 'link-318');">FIELDKEY_DELETE_RECORD</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'delete_record'</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">    <tt id="link-319" class="py-name" targets="Variable web2py.gluon.sqlhtml.SQLFORM.ID_LABEL_SUFFIX=web2py.gluon.sqlhtml.SQLFORM-class.html#ID_LABEL_SUFFIX"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_LABEL_SUFFIX" class="py-name" href="#" onclick="return doclink('link-319', 'ID_LABEL_SUFFIX', 'link-319');">ID_LABEL_SUFFIX</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'__label'</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">    <tt id="link-320" class="py-name" targets="Variable web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX=web2py.gluon.sqlhtml.SQLFORM-class.html#ID_ROW_SUFFIX"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX" class="py-name" href="#" onclick="return doclink('link-320', 'ID_ROW_SUFFIX', 'link-320');">ID_ROW_SUFFIX</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'__row'</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line"> </tt>
<a name="SQLFORM.__init__"></a><div id="SQLFORM.__init__-def"><a name="L662"></a><tt class="py-lineno"> 662</tt> <a class="py-toggle" href="#" id="SQLFORM.__init__-toggle" onclick="return toggle('SQLFORM.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLFORM-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">        <tt class="py-param">table</tt><tt class="py-op">,</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">        <tt class="py-param">record</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">        <tt class="py-param">deletable</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">        <tt class="py-param">linkto</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">        <tt class="py-param">upload</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">        <tt class="py-param">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">        <tt class="py-param">labels</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">        <tt class="py-param">col3</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">        <tt class="py-param">submit_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Submit'</tt><tt class="py-op">,</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">        <tt class="py-param">delete_label</tt> <tt class="py-op">=</tt> <tt class="py-string">'Check to delete:'</tt><tt class="py-op">,</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">        <tt class="py-param">showid</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">        <tt class="py-param">readonly</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">        <tt class="py-param">comments</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line">        <tt class="py-param">keepopts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">        <tt class="py-param">ignore_rw</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">        <tt class="py-param">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line">        <tt class="py-param">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-string">'table3cols'</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">        <tt class="py-param">buttons</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'submit'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">        <tt class="py-param">separator</tt> <tt class="py-op">=</tt> <tt class="py-string">': '</tt><tt class="py-op">,</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">        <tt class="py-op">**</tt><tt class="py-param">attributes</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLFORM.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SQLFORM.__init__-expanded"><a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line"><tt class="py-docstring">        SQLFORM(db.table,</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line"><tt class="py-docstring">               record=None,</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line"><tt class="py-docstring">               fields=['name'],</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line"><tt class="py-docstring">               labels={'name': 'Your name'},</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line"><tt class="py-docstring">               linkto=URL(r=request, f='table/db/')</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line"> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ignore_rw</tt> <tt class="py-op">=</tt> <tt class="py-name">ignore_rw</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-name">formstyle</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">        <tt class="py-name">nbsp</tt> <tt class="py-op">=</tt> <tt id="link-321" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-321', 'XML', 'link-3');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">'&amp;nbsp;'</tt><tt class="py-op">)</tt> <tt class="py-comment"># Firefox2 does not display fields with blanks</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">        <tt id="link-322" class="py-name"><a title="web2py.gluon.html.FORM" class="py-name" href="#" onclick="return doclink('link-322', 'FORM', 'link-15');">FORM</a></tt><tt class="py-op">.</tt><tt id="link-323" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-323', '__init__', 'link-323');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">        <tt class="py-name">ofields</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">        <tt class="py-name">keyed</tt> <tt class="py-op">=</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt><tt class="py-string">'_primarykey'</tt><tt class="py-op">)</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line"> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">        <tt class="py-comment"># if no fields are provided, build it from the provided table</tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># will only use writable or readable fields, unless forced to ignore</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">fields</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-324" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-324', 'name', 'link-46');">name</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">ignore_rw</tt> <tt class="py-keyword">or</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">writable</tt> <tt class="py-keyword">or</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">compute</tt><tt class="py-op">]</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line">        <tt class="py-comment"># make sure we have an id</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">                <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt><tt id="link-325" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-325', 'Table', 'link-31');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">.</tt><tt id="link-326" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-326', 'insert', 'link-326');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line"> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line"> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line">        <tt class="py-comment"># try to retrieve the indicated record using its id</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># otherwise ignore it</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">long</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-327" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-327', 'HTTP', 'link-1');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> <tt class="py-string">"Object not found"</tt><tt class="py-op">)</tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">            <tt class="py-name">record</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_id</tt> <tt class="py-op">==</tt> <tt class="py-name">record</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-328" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-328', 'select', 'link-233');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-329" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-329', 'first', 'link-270');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-330" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-330', 'HTTP', 'link-1');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> <tt class="py-string">"Object not found"</tt><tt class="py-op">)</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line"> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">record_id</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-331" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-331', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt id="link-332" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-332', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-333" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-333', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-334" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-334', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-335" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-335', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line">        <tt class="py-name">xfields</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt> <tt class="py-op">=</tt> <tt id="link-336" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-336', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">dspval</tt> <tt class="py-op">=</tt> <tt id="link-337" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-337', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">inpval</tt> <tt class="py-op">=</tt> <tt id="link-338" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-338', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt id="link-339" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-339', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt> <tt class="py-op">=</tt> <tt id="link-340" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-340', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-341" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-341', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt id="link-342" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-342', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">linkto</tt> <tt class="py-op">=</tt> <tt id="link-343" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-343', 'Storage', 'link-35');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line"> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line">        <tt class="py-name">sep</tt> <tt class="py-op">=</tt> <tt class="py-name">separator</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line">         </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">fieldname</tt><tt class="py-op">.</tt><tt id="link-344" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-344', 'find', 'link-344');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line"> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">            <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">            <tt class="py-name">comment</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line"> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">comments</tt><tt class="py-op">:</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line">                <tt class="py-name">comment</tt> <tt class="py-op">=</tt> <tt class="py-name">col3</tt><tt class="py-op">.</tt><tt id="link-345" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-345', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">)</tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">comment</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">                <tt class="py-name">comment</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">comment</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line"> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">labels</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">labels</tt><tt class="py-op">:</tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">                <tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt class="py-name">labels</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line">                <tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">label</tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">label</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line"> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">            <tt class="py-name">field_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s_%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">,</tt> <tt class="py-name">fieldname</tt><tt class="py-op">)</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line"> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">            <tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt id="link-346" class="py-name"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-346', 'LABEL', 'link-17');">LABEL</a></tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-name">_for</tt><tt class="py-op">=</tt><tt class="py-name">field_id</tt><tt class="py-op">,</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">                          <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">field_id</tt><tt class="py-op">+</tt><tt id="link-347" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLFORM=web2py.gluon.sqlhtml.SQLFORM-class.html"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-347', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-348" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_LABEL_SUFFIX" class="py-name" href="#" onclick="return doclink('link-348', 'ID_LABEL_SUFFIX', 'link-319');">ID_LABEL_SUFFIX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line"> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">            <tt class="py-name">row_id</tt> <tt class="py-op">=</tt> <tt class="py-name">field_id</tt><tt class="py-op">+</tt><tt id="link-349" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-349', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-350" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX" class="py-name" href="#" onclick="return doclink('link-350', 'ID_ROW_SUFFIX', 'link-320');">ID_ROW_SUFFIX</a></tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'id'</tt><tt class="py-op">:</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">dspval</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">nbsp</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">inpval</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line">                <tt id="link-351" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-351', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">showid</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'id'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fields</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">:</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">                        <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">]</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">                        <tt id="link-352" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-352', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt id="link-353" class="py-name"><a title="web2py.gluon.html.SPAN" class="py-name" href="#" onclick="return doclink('link-353', 'SPAN', 'link-4');">SPAN</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">field_id</tt><tt class="py-op">)</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">dspval</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">                        <tt class="py-name">xfields</tt><tt class="py-op">.</tt><tt id="link-354" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-354', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">row_id</tt><tt class="py-op">,</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt id="link-355" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-355', 'widget', 'link-95');">widget</a></tt><tt class="py-op">,</tt><tt class="py-name">comment</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-356" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-356', 'widget', 'link-95');">widget</a></tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt id="link-357" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-357', 'widget', 'link-95');">widget</a></tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line"> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">readonly</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ignore_rw</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">:</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line"> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line">                <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line">                <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">default</tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">default</tt><tt class="py-op">,</tt><tt id="link-358" class="py-name"><a title="web2py.gluon.dal.CALLABLETYPES" class="py-name" href="#" onclick="return doclink('link-358', 'CALLABLETYPES', 'link-33');">CALLABLETYPES</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line">                    <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">default</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line"> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line">            <tt class="py-name">cond</tt> <tt class="py-op">=</tt> <tt class="py-name">readonly</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">ignore_rw</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">writable</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">)</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line"> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">default</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">cond</tt><tt class="py-op">:</tt> </tt>
<a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line">                <tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-359" class="py-name" targets="Method web2py.gluon.dal.Field.formatter()=web2py.gluon.dal.Field-class.html#formatter,Method web2py.gluon.validators.IS_DATE.formatter()=web2py.gluon.validators.IS_DATE-class.html#formatter,Method web2py.gluon.validators.IS_DATETIME.formatter()=web2py.gluon.validators.IS_DATETIME-class.html#formatter,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter,Method web2py.gluon.validators.IS_EMPTY_OR.formatter()=web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter,Method web2py.gluon.validators.Validator.formatter()=web2py.gluon.validators.Validator-class.html#formatter"><a title="web2py.gluon.dal.Field.formatter
web2py.gluon.validators.IS_DATE.formatter
web2py.gluon.validators.IS_DATETIME.formatter
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter
web2py.gluon.validators.IS_EMPTY_OR.formatter
web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter
web2py.gluon.validators.Validator.formatter" class="py-name" href="#" onclick="return doclink('link-359', 'formatter', 'link-359');">formatter</a></tt><tt class="py-op">(</tt><tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line">            <tt class="py-name">dspval</tt> <tt class="py-op">=</tt> <tt class="py-name">default</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">            <tt class="py-name">inpval</tt> <tt class="py-op">=</tt> <tt class="py-name">default</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line"> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">cond</tt><tt class="py-op">:</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line"> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">                <tt class="py-comment"># ## if field.represent is available else</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ## ignore blob and preview uploaded images</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># ## format everything else</tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-360" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-360', 'represent', 'link-42');">represent</a></tt><tt class="py-op">:</tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-361" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-361', 'represent', 'link-42');">represent</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt> </tt>
<a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'blob'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'upload'</tt><tt class="py-op">:</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt id="link-362" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-362', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-363" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-363', 'represent', 'link-42');">represent</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-name">upload</tt><tt class="py-op">)</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'boolean'</tt><tt class="py-op">:</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-364" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-364', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">boolean</tt><tt class="py-op">.</tt><tt id="link-365" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-365', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-name">_disabled</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-366" class="py-name"><a title="web2py.gluon.dal.Field.formatter
web2py.gluon.validators.IS_DATE.formatter
web2py.gluon.validators.IS_DATETIME.formatter
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter
web2py.gluon.validators.IS_EMPTY_OR.formatter
web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter
web2py.gluon.validators.Validator.formatter" class="py-name" href="#" onclick="return doclink('link-366', 'formatter', 'link-359');">formatter</a></tt><tt class="py-op">(</tt><tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'upload'</tt><tt class="py-op">:</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-string">'widget'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-367" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-367', 'widget', 'link-95');">widget</a></tt><tt class="py-op">:</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-368" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-368', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-name">upload</tt><tt class="py-op">)</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-369" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-369', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">upload</tt><tt class="py-op">.</tt><tt id="link-370" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-370', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">,</tt> <tt class="py-name">upload</tt><tt class="py-op">)</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-string">'widget'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-371" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-371', 'widget', 'link-95');">widget</a></tt><tt class="py-op">:</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-372" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-372', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'boolean'</tt><tt class="py-op">:</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-373" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-373', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">boolean</tt><tt class="py-op">.</tt><tt id="link-374" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-374', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">default</tt><tt class="py-op">:</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line">                    <tt class="py-name">inpval</tt> <tt class="py-op">=</tt> <tt class="py-string">'checked'</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line">                    <tt class="py-name">inpval</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-375" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-375', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">.</tt><tt id="link-376" class="py-name" targets="Static Method web2py.gluon.sqlhtml.OptionsWidget.has_options()=web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options"><a title="web2py.gluon.sqlhtml.OptionsWidget.has_options" class="py-name" href="#" onclick="return doclink('link-376', 'has_options', 'link-376');">has_options</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-377" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-377', 'requires', 'link-50');">requires</a></tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-378" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-378', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt id="link-379" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-379', 'options', 'link-73');">options</a></tt><tt class="py-op">.</tt><tt id="link-380" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-380', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">                    <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-381" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-381', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">.</tt><tt id="link-382" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-382', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">keepopts</tt><tt class="py-op">:</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">                    <tt class="py-name">inpval</tt> <tt class="py-op">=</tt> <tt id="link-383" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-383', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">inp</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">)</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-384" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-384', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'list:'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-385" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-385', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">list</tt><tt class="py-op">.</tt><tt id="link-386" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-386', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'text'</tt><tt class="py-op">:</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-387" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-387', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt id="link-388" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-388', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'password'</tt><tt class="py-op">:</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-389" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-389', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt id="link-390" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-390', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">                    <tt class="py-name">dspval</tt> <tt class="py-op">=</tt> <tt id="link-391" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget" class="py-name" href="#" onclick="return doclink('link-391', 'PasswordWidget', 'link-173');">PasswordWidget</a></tt><tt class="py-op">.</tt><tt id="link-392" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget.DEFAULT_PASSWORD_DISPLAY" class="py-name" href="#" onclick="return doclink('link-392', 'DEFAULT_PASSWORD_DISPLAY', 'link-172');">DEFAULT_PASSWORD_DISPLAY</a></tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line">                    <tt class="py-name">dspval</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'blob'</tt><tt class="py-op">:</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">                <tt class="py-name">inp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-393" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-393', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt id="link-394" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-394', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line"> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line">            <tt class="py-name">xfields</tt><tt class="py-op">.</tt><tt id="link-395" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-395', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">row_id</tt><tt class="py-op">,</tt><tt class="py-name">label</tt><tt class="py-op">,</tt><tt class="py-name">inp</tt><tt class="py-op">,</tt><tt class="py-name">comment</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">dspval</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">dspval</tt> <tt class="py-keyword">or</tt> <tt class="py-name">nbsp</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">inpval</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">inpval</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-396" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-396', 'widget', 'link-95');">widget</a></tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">inp</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line"> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">        <tt class="py-comment"># if a record is provided and found, as is linkto</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># build a link</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">linkto</tt><tt class="py-op">:</tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line">            <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">linkto</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">rtable</tt><tt class="py-op">,</tt> <tt class="py-name">rfield</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_referenced_by</tt><tt class="py-op">:</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line">                    <tt class="py-name">rfld</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">[</tt><tt class="py-name">rtable</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">rfield</tt><tt class="py-op">]</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">                    <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-string">'%s.%s==%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt><tt class="py-name">rfld</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">rfld</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">[</tt><tt class="py-number">10</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line">                    <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-string">'%s.%s==%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">[</tt><tt class="py-name">rtable</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">rfield</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line">                <tt class="py-name">lname</tt> <tt class="py-op">=</tt> <tt class="py-name">olname</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">rtable</tt><tt class="py-op">,</tt> <tt class="py-name">rfield</tt><tt class="py-op">)</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">ofields</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">olname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ofields</tt><tt class="py-op">:</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">labels</tt> <tt class="py-keyword">and</tt> <tt class="py-name">lname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">labels</tt><tt class="py-op">:</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line">                    <tt class="py-name">lname</tt> <tt class="py-op">=</tt> <tt class="py-name">labels</tt><tt class="py-op">[</tt><tt class="py-name">lname</tt><tt class="py-op">]</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line">                <tt id="link-397" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-397', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt id="link-398" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-398', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt class="py-name">lname</tt><tt class="py-op">,</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line">                           <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'reference'</tt><tt class="py-op">,</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line">                           <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-string">'%s/%s?query=%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linkto</tt><tt class="py-op">,</tt> <tt class="py-name">rtable</tt><tt class="py-op">,</tt> <tt class="py-name">query</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line">                <tt class="py-name">xfields</tt><tt class="py-op">.</tt><tt id="link-399" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-399', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">olname</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-string">'__'</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt id="link-400" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-400', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-401" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX" class="py-name" href="#" onclick="return doclink('link-401', 'ID_ROW_SUFFIX', 'link-320');">ID_ROW_SUFFIX</a></tt><tt class="py-op">,</tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line">                                <tt class="py-string">''</tt><tt class="py-op">,</tt><tt id="link-402" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-402', 'widget', 'link-95');">widget</a></tt><tt class="py-op">,</tt><tt class="py-name">col3</tt><tt class="py-op">.</tt><tt id="link-403" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-403', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">olname</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">linkto</tt><tt class="py-op">[</tt><tt class="py-name">olname</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt> <tt class="py-string">'__'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-404" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-404', 'widget', 'link-95');">widget</a></tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line"><tt class="py-comment">#                 &lt;/block&gt;</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line">        <tt class="py-comment"># when deletable, add delete? checkbox</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">deletable</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">deletable</tt><tt class="py-op">:</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line">            <tt id="link-405" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-405', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt id="link-406" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-406', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'checkbox'</tt><tt class="py-op">,</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line">                            <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'delete'</tt><tt class="py-op">,</tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">                            <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-407" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD" class="py-name" href="#" onclick="return doclink('link-407', 'FIELDKEY_DELETE_RECORD', 'link-318');">FIELDKEY_DELETE_RECORD</a></tt><tt class="py-op">,</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line">                            <tt id="link-408" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-408', '_name', 'link-48');">_name</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-409" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDNAME_REQUEST_DELETE" class="py-name" href="#" onclick="return doclink('link-409', 'FIELDNAME_REQUEST_DELETE', 'link-317');">FIELDNAME_REQUEST_DELETE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line">                            <tt class="py-op">)</tt> </tt>
<a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line">            <tt class="py-name">xfields</tt><tt class="py-op">.</tt><tt id="link-410" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-410', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-411" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD" class="py-name" href="#" onclick="return doclink('link-411', 'FIELDKEY_DELETE_RECORD', 'link-318');">FIELDKEY_DELETE_RECORD</a></tt><tt class="py-op">+</tt><tt id="link-412" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-412', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-413" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX" class="py-name" href="#" onclick="return doclink('link-413', 'ID_ROW_SUFFIX', 'link-320');">ID_ROW_SUFFIX</a></tt><tt class="py-op">,</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line">                            <tt id="link-414" class="py-name"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-414', 'LABEL', 'link-17');">LABEL</a></tt><tt class="py-op">(</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">                                <tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line">                                <tt class="py-name">_for</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-415" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD" class="py-name" href="#" onclick="return doclink('link-415', 'FIELDKEY_DELETE_RECORD', 'link-318');">FIELDKEY_DELETE_RECORD</a></tt><tt class="py-op">,</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line">                                <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-416" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD" class="py-name" href="#" onclick="return doclink('link-416', 'FIELDKEY_DELETE_RECORD', 'link-318');">FIELDKEY_DELETE_RECORD</a></tt><tt class="py-op">+</tt><tt id="link-417" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-417', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-418" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_LABEL_SUFFIX" class="py-name" href="#" onclick="return doclink('link-418', 'ID_LABEL_SUFFIX', 'link-319');">ID_LABEL_SUFFIX</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">                            <tt id="link-419" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-419', 'widget', 'link-95');">widget</a></tt><tt class="py-op">,</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">                            <tt class="py-name">col3</tt><tt class="py-op">.</tt><tt id="link-420" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-420', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-421" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDKEY_DELETE_RECORD" class="py-name" href="#" onclick="return doclink('link-421', 'FIELDKEY_DELETE_RECORD', 'link-318');">FIELDKEY_DELETE_RECORD</a></tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">deletable</tt> <tt class="py-op">=</tt> <tt id="link-422" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-422', 'widget', 'link-95');">widget</a></tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line">        <tt class="py-comment"># when writable, add submit button</tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">submit</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">readonly</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'submit'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">buttons</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">            <tt id="link-423" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-423', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt id="link-424" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-424', 'INPUT', 'link-16');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'submit'</tt><tt class="py-op">,</tt> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">                           <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">submit_button</tt><tt class="py-op">)</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">            <tt class="py-name">xfields</tt><tt class="py-op">.</tt><tt id="link-425" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-425', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'submit_record'</tt><tt class="py-op">+</tt><tt id="link-426" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-426', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-427" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX" class="py-name" href="#" onclick="return doclink('link-427', 'ID_ROW_SUFFIX', 'link-320');">ID_ROW_SUFFIX</a></tt><tt class="py-op">,</tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line">                            <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-428" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-428', 'widget', 'link-95');">widget</a></tt><tt class="py-op">,</tt><tt class="py-name">col3</tt><tt class="py-op">.</tt><tt id="link-429" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-429', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'submit_button'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">submit</tt> <tt class="py-op">=</tt> <tt id="link-430" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-430', 'widget', 'link-95');">widget</a></tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line">        <tt class="py-comment"># if a record is provided and found</tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># make sure it's id is stored in the form</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'hidden'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'hidden'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'hidden'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">]</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line"> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt id="link-431" class="py-name" targets="Method web2py.gluon.custom_import._BaseImporter.begin()=web2py.gluon.custom_import._BaseImporter-class.html#begin,Method web2py.gluon.custom_import._DateTrackerImporter.begin()=web2py.gluon.custom_import._DateTrackerImporter-class.html#begin"><a title="web2py.gluon.custom_import._BaseImporter.begin
web2py.gluon.custom_import._DateTrackerImporter.begin" class="py-name" href="#" onclick="return doclink('link-431', 'begin', 'link-431');">begin</a></tt><tt class="py-op">,</tt> <tt id="link-432" class="py-name" targets="Method web2py.gluon.custom_import._BaseImporter.end()=web2py.gluon.custom_import._BaseImporter-class.html#end,Method web2py.gluon.custom_import._DateTrackerImporter.end()=web2py.gluon.custom_import._DateTrackerImporter-class.html#end"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-432', 'end', 'link-432');">end</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-433" class="py-name" targets="Method web2py.gluon.html.DIV._xml()=web2py.gluon.html.DIV-class.html#_xml"><a title="web2py.gluon.html.DIV._xml" class="py-name" href="#" onclick="return doclink('link-433', '_xml', 'link-433');">_xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-434" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.begin
web2py.gluon.custom_import._DateTrackerImporter.begin" class="py-name" href="#" onclick="return doclink('link-434', 'begin', 'link-431');">begin</a></tt> <tt class="py-op">=</tt> <tt id="link-435" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-435', 'XML', 'link-3');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">"&lt;%s %s&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-436" class="py-name" targets="Variable web2py.gluon.html.A.tag=web2py.gluon.html.A-class.html#tag,Variable web2py.gluon.html.B.tag=web2py.gluon.html.B-class.html#tag,Variable web2py.gluon.html.BEAUTIFY.tag=web2py.gluon.html.BEAUTIFY-class.html#tag,Variable web2py.gluon.html.BODY.tag=web2py.gluon.html.BODY-class.html#tag,Variable web2py.gluon.html.BR.tag=web2py.gluon.html.BR-class.html#tag,Variable web2py.gluon.html.BUTTON.tag=web2py.gluon.html.BUTTON-class.html#tag,Variable web2py.gluon.html.CAT.tag=web2py.gluon.html.CAT-class.html#tag,Variable web2py.gluon.html.CENTER.tag=web2py.gluon.html.CENTER-class.html#tag,Variable web2py.gluon.html.COL.tag=web2py.gluon.html.COL-class.html#tag,Variable web2py.gluon.html.COLGROUP.tag=web2py.gluon.html.COLGROUP-class.html#tag,Variable web2py.gluon.html.DIV.tag=web2py.gluon.html.DIV-class.html#tag,Variable web2py.gluon.html.EM.tag=web2py.gluon.html.EM-class.html#tag,Variable web2py.gluon.html.EMBED.tag=web2py.gluon.html.EMBED-class.html#tag,Variable web2py.gluon.html.FIELDSET.tag=web2py.gluon.html.FIELDSET-class.html#tag,Variable web2py.gluon.html.FORM.tag=web2py.gluon.html.FORM-class.html#tag,Variable web2py.gluon.html.H1.tag=web2py.gluon.html.H1-class.html#tag,Variable web2py.gluon.html.H2.tag=web2py.gluon.html.H2-class.html#tag,Variable web2py.gluon.html.H3.tag=web2py.gluon.html.H3-class.html#tag,Variable web2py.gluon.html.H4.tag=web2py.gluon.html.H4-class.html#tag,Variable web2py.gluon.html.H5.tag=web2py.gluon.html.H5-class.html#tag,Variable web2py.gluon.html.H6.tag=web2py.gluon.html.H6-class.html#tag,Variable web2py.gluon.html.HEAD.tag=web2py.gluon.html.HEAD-class.html#tag,Variable web2py.gluon.html.HR.tag=web2py.gluon.html.HR-class.html#tag,Variable web2py.gluon.html.HTML.tag=web2py.gluon.html.HTML-class.html#tag,Variable web2py.gluon.html.I.tag=web2py.gluon.html.I-class.html#tag,Variable web2py.gluon.html.IFRAME.tag=web2py.gluon.html.IFRAME-class.html#tag,Variable web2py.gluon.html.IMG.tag=web2py.gluon.html.IMG-class.html#tag,Variable web2py.gluon.html.INPUT.tag=web2py.gluon.html.INPUT-class.html#tag,Variable web2py.gluon.html.LABEL.tag=web2py.gluon.html.LABEL-class.html#tag,Variable web2py.gluon.html.LEGEND.tag=web2py.gluon.html.LEGEND-class.html#tag,Variable web2py.gluon.html.LI.tag=web2py.gluon.html.LI-class.html#tag,Variable web2py.gluon.html.LINK.tag=web2py.gluon.html.LINK-class.html#tag,Variable web2py.gluon.html.MENU.tag=web2py.gluon.html.MENU-class.html#tag,Variable web2py.gluon.html.META.tag=web2py.gluon.html.META-class.html#tag,Variable web2py.gluon.html.OBJECT.tag=web2py.gluon.html.OBJECT-class.html#tag,Variable web2py.gluon.html.OL.tag=web2py.gluon.html.OL-class.html#tag,Variable web2py.gluon.html.OPTGROUP.tag=web2py.gluon.html.OPTGROUP-class.html#tag,Variable web2py.gluon.html.OPTION.tag=web2py.gluon.html.OPTION-class.html#tag,Variable web2py.gluon.html.P.tag=web2py.gluon.html.P-class.html#tag,Variable web2py.gluon.html.PRE.tag=web2py.gluon.html.PRE-class.html#tag,Variable web2py.gluon.html.SCRIPT.tag=web2py.gluon.html.SCRIPT-class.html#tag,Variable web2py.gluon.html.SELECT.tag=web2py.gluon.html.SELECT-class.html#tag,Variable web2py.gluon.html.SPAN.tag=web2py.gluon.html.SPAN-class.html#tag,Variable web2py.gluon.html.STYLE.tag=web2py.gluon.html.STYLE-class.html#tag,Variable web2py.gluon.html.TABLE.tag=web2py.gluon.html.TABLE-class.html#tag,Variable web2py.gluon.html.TBODY.tag=web2py.gluon.html.TBODY-class.html#tag,Variable web2py.gluon.html.TD.tag=web2py.gluon.html.TD-class.html#tag,Variable web2py.gluon.html.TEXTAREA.tag=web2py.gluon.html.TEXTAREA-class.html#tag,Variable web2py.gluon.html.TFOOT.tag=web2py.gluon.html.TFOOT-class.html#tag,Variable web2py.gluon.html.TH.tag=web2py.gluon.html.TH-class.html#tag,Variable web2py.gluon.html.THEAD.tag=web2py.gluon.html.THEAD-class.html#tag,Variable web2py.gluon.html.TITLE.tag=web2py.gluon.html.TITLE-class.html#tag,Variable web2py.gluon.html.TR.tag=web2py.gluon.html.TR-class.html#tag,Variable web2py.gluon.html.TT.tag=web2py.gluon.html.TT-class.html#tag,Variable web2py.gluon.html.UL.tag=web2py.gluon.html.UL-class.html#tag,Variable web2py.gluon.html.XHTML.tag=web2py.gluon.html.XHTML-class.html#tag"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-436', 'tag', 'link-436');">tag</a></tt><tt class="py-op">,</tt> <tt id="link-437" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.begin
web2py.gluon.custom_import._DateTrackerImporter.begin" class="py-name" href="#" onclick="return doclink('link-437', 'begin', 'link-431');">begin</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-438" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-438', 'end', 'link-432');">end</a></tt> <tt class="py-op">=</tt> <tt id="link-439" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-439', 'XML', 'link-3');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s&lt;/%s&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-440" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-440', 'end', 'link-432');">end</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-441" class="py-name"><a title="web2py.gluon.html.A.tag
web2py.gluon.html.B.tag
web2py.gluon.html.BEAUTIFY.tag
web2py.gluon.html.BODY.tag
web2py.gluon.html.BR.tag
web2py.gluon.html.BUTTON.tag
web2py.gluon.html.CAT.tag
web2py.gluon.html.CENTER.tag
web2py.gluon.html.COL.tag
web2py.gluon.html.COLGROUP.tag
web2py.gluon.html.DIV.tag
web2py.gluon.html.EM.tag
web2py.gluon.html.EMBED.tag
web2py.gluon.html.FIELDSET.tag
web2py.gluon.html.FORM.tag
web2py.gluon.html.H1.tag
web2py.gluon.html.H2.tag
web2py.gluon.html.H3.tag
web2py.gluon.html.H4.tag
web2py.gluon.html.H5.tag
web2py.gluon.html.H6.tag
web2py.gluon.html.HEAD.tag
web2py.gluon.html.HR.tag
web2py.gluon.html.HTML.tag
web2py.gluon.html.I.tag
web2py.gluon.html.IFRAME.tag
web2py.gluon.html.IMG.tag
web2py.gluon.html.INPUT.tag
web2py.gluon.html.LABEL.tag
web2py.gluon.html.LEGEND.tag
web2py.gluon.html.LI.tag
web2py.gluon.html.LINK.tag
web2py.gluon.html.MENU.tag
web2py.gluon.html.META.tag
web2py.gluon.html.OBJECT.tag
web2py.gluon.html.OL.tag
web2py.gluon.html.OPTGROUP.tag
web2py.gluon.html.OPTION.tag
web2py.gluon.html.P.tag
web2py.gluon.html.PRE.tag
web2py.gluon.html.SCRIPT.tag
web2py.gluon.html.SELECT.tag
web2py.gluon.html.SPAN.tag
web2py.gluon.html.STYLE.tag
web2py.gluon.html.TABLE.tag
web2py.gluon.html.TBODY.tag
web2py.gluon.html.TD.tag
web2py.gluon.html.TEXTAREA.tag
web2py.gluon.html.TFOOT.tag
web2py.gluon.html.TH.tag
web2py.gluon.html.THEAD.tag
web2py.gluon.html.TITLE.tag
web2py.gluon.html.TR.tag
web2py.gluon.html.TT.tag
web2py.gluon.html.UL.tag
web2py.gluon.html.XHTML.tag" class="py-name" href="#" onclick="return doclink('link-441', 'tag', 'link-436');">tag</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-442" class="py-name" targets="Method web2py.gluon.sqlhtml.SQLFORM.createform()=web2py.gluon.sqlhtml.SQLFORM-class.html#createform"><a title="web2py.gluon.sqlhtml.SQLFORM.createform" class="py-name" href="#" onclick="return doclink('link-442', 'createform', 'link-442');">createform</a></tt><tt class="py-op">(</tt><tt class="py-name">xfields</tt><tt class="py-op">)</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">table</tt><tt class="py-op">]</tt> </tt>
</div><a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line"> </tt>
<a name="SQLFORM.createform"></a><div id="SQLFORM.createform-def"><a name="L916"></a><tt class="py-lineno"> 916</tt> <a class="py-toggle" href="#" id="SQLFORM.createform-toggle" onclick="return toggle('SQLFORM.createform');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLFORM-class.html#createform">createform</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">xfields</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLFORM.createform-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SQLFORM.createform-expanded"><a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">==</tt> <tt class="py-string">'table3cols'</tt><tt class="py-op">:</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-443" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-443', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-444" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-444', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xfields</tt><tt class="py-op">:</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">                <tt class="py-name">td_b</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-445" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-445', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt id="link-446" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-446', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">)</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-447" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-447', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-448" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-448', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt id="link-449" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-449', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fl'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">                                <tt class="py-name">td_b</tt><tt class="py-op">,</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line">                                <tt id="link-450" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-450', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fc'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">==</tt> <tt class="py-string">'table2cols'</tt><tt class="py-op">:</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-451" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-451', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-452" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-452', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xfields</tt><tt class="py-op">:</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line">                <tt class="py-name">td_b</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-453" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-453', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt id="link-454" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-454', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">,</tt><tt class="py-name">_colspan</tt><tt class="py-op">=</tt><tt class="py-string">"2"</tt><tt class="py-op">)</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-455" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-455', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-456" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-456', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt id="link-457" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-457', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fl'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">                                <tt id="link-458" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-458', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fc'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">id</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">                                <tt class="py-op">+</tt><tt class="py-string">'1'</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'even'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-459" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-459', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-460" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-460', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt class="py-name">td_b</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">id</tt><tt class="py-op">+</tt><tt class="py-string">'2'</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'odd'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">==</tt> <tt class="py-string">'divs'</tt><tt class="py-op">:</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-461" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-461', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-462" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-462', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xfields</tt><tt class="py-op">:</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line">                <tt class="py-name">div_b</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-463" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-463', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-464" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-464', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">)</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-465" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-465', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-466" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-466', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-467" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-467', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fl'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">                                 <tt class="py-name">div_b</tt><tt class="py-op">,</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line">                                 <tt id="link-468" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-468', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fc'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">==</tt> <tt class="py-string">'ul'</tt><tt class="py-op">:</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-469" class="py-name"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-469', 'UL', 'link-8');">UL</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-470" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-470', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xfields</tt><tt class="py-op">:</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">                <tt class="py-name">div_b</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-471" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-471', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-472" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-472', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">)</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-473" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-473', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-474" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-474', 'LI', 'link-9');">LI</a></tt><tt class="py-op">(</tt><tt id="link-475" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-475', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fl'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line">                                <tt class="py-name">div_b</tt><tt class="py-op">,</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line">                                <tt id="link-476" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-476', 'DIV', 'link-7');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fc'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt><tt class="py-op">:</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-477" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-477', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-478" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-478', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xfields</tt><tt class="py-op">:</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">                <tt class="py-name">td_b</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-479" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-479', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt id="link-480" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-480', 'b', 'link-444');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">)</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line">                <tt class="py-name">newrows</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-name">td_b</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">newrows</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">!=</tt> <tt class="py-string">"tuple"</tt><tt class="py-op">:</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">                    <tt class="py-name">newrows</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">newrows</tt><tt class="py-op">]</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">newrow</tt> <tt class="py-keyword">in</tt> <tt class="py-name">newrows</tt><tt class="py-op">:</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line">                    <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-481" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-481', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">newrow</tt><tt class="py-op">)</tt> </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">RuntimeError</tt><tt class="py-op">,</tt> <tt class="py-string">'formstyle not supported'</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">table</tt> </tt>
</div><a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line"> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"> </tt>
<a name="SQLFORM.accepts"></a><div id="SQLFORM.accepts-def"><a name="L960"></a><tt class="py-lineno"> 960</tt> <a class="py-toggle" href="#" id="SQLFORM.accepts-toggle" onclick="return toggle('SQLFORM.accepts');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLFORM-class.html#accepts">accepts</a><tt class="py-op">(</tt> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line">        <tt class="py-param">request_vars</tt><tt class="py-op">,</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line">        <tt class="py-param">session</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line">        <tt class="py-param">formname</tt><tt class="py-op">=</tt><tt class="py-string">'%(tablename)s/%(record_id)s'</tt><tt class="py-op">,</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line">        <tt class="py-param">keepvalues</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">        <tt class="py-param">dbio</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">        <tt class="py-param">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">        <tt class="py-param">detect_record_change</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLFORM.accepts-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SQLFORM.accepts-expanded"><a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line"> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line"><tt class="py-docstring">        similar FORM.accepts but also does insert, update or delete in DAL.</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line"><tt class="py-docstring">        but if detect_record_change == True than:</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line"><tt class="py-docstring">          form.record_changed = False (record is properly validated/submitted)</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line"><tt class="py-docstring">          form.record_changed = True (record cannot be submitted because changed)</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line"><tt class="py-docstring">        elseif detect_record_change == False than:</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line"><tt class="py-docstring">          form.record_changed = None</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line"> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'Request'</tt><tt class="py-op">:</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">            <tt class="py-name">request_vars</tt> <tt class="py-op">=</tt> <tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line"> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">        <tt class="py-name">keyed</tt> <tt class="py-op">=</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-string">'_primarykey'</tt><tt class="py-op">)</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line"> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line">        <tt class="py-comment"># implement logic to detect whether record exist but has been modified</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># server side</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">detect_record_change</tt><tt class="py-op">:</tt> </tt>
<a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_changed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line">                <tt class="py-name">serialized</tt> <tt class="py-op">=</tt> <tt class="py-string">'|'</tt><tt class="py-op">.</tt><tt id="link-482" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-482', 'join', 'link-482');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt id="link-483" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-483', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-484" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-484', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_hash</tt> <tt class="py-op">=</tt> <tt id="link-485" class="py-name"><a title="web2py.gluon.utils.md5_hash" class="py-name" href="#" onclick="return doclink('link-485', 'md5_hash', 'link-37');">md5_hash</a></tt><tt class="py-op">(</tt><tt class="py-name">serialized</tt><tt class="py-op">)</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line"> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">        <tt class="py-comment"># logic to deal with record_id for keyed tables</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line">                <tt class="py-name">formname_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'.'</tt><tt class="py-op">.</tt><tt id="link-486" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-486', 'join', 'link-482');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt id="link-487" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-487', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line">                                       <tt class="py-keyword">for</tt> <tt id="link-488" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-488', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">                                       <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">,</tt><tt id="link-489" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-489', 'k', 'link-77');">k</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">                <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-490" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-490', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">request_vars</tt><tt class="py-op">[</tt><tt id="link-491" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-491', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-492" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-492', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">)</tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">formname_id</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">                                            <tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-493" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-493', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'id'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">            <tt class="py-name">keepvalues</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">                <tt class="py-name">formname_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'create'</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">                <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-494" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-494', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-495" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-495', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">formname_id</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'create'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line"> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">keyed</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">            <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">record_id</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line"> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">formname</tt><tt class="py-op">:</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">            <tt class="py-name">formname</tt> <tt class="py-op">=</tt> <tt class="py-name">formname</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">tablename</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">,</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">                                       <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">formname_id</tt><tt class="py-op">)</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line"> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">        <tt class="py-comment"># ## THIS IS FOR UNIQUE RECORDS, read IS_NOT_IN_DB</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line">            <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">            <tt id="link-496" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-496', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-497" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-497', 'requires', 'link-50');">requires</a></tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-498" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-498', 'requires', 'link-50');">requires</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">                <tt id="link-499" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-499', 'requires', 'link-50');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-500" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-500', 'requires', 'link-50');">requires</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">            <tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-501" class="py-name" targets="Method web2py.gluon.validators.IS_EMPTY_OR.set_self_id()=web2py.gluon.validators.IS_EMPTY_OR-class.html#set_self_id,Method web2py.gluon.validators.IS_IN_DB.set_self_id()=web2py.gluon.validators.IS_IN_DB-class.html#set_self_id,Method web2py.gluon.validators.IS_NOT_IN_DB.set_self_id()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#set_self_id"><a title="web2py.gluon.validators.IS_EMPTY_OR.set_self_id
web2py.gluon.validators.IS_IN_DB.set_self_id
web2py.gluon.validators.IS_NOT_IN_DB.set_self_id" class="py-name" href="#" onclick="return doclink('link-501', 'set_self_id', 'link-501');">set_self_id</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-502" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-502', 'requires', 'link-50');">requires</a></tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-string">'set_self_id'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">]</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line"> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-comment"># ## END</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">        <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">            <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line"> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt id="link-503" class="py-name"><a title="web2py.gluon.html.FORM" class="py-name" href="#" onclick="return doclink('link-503', 'FORM', 'link-15');">FORM</a></tt><tt class="py-op">.</tt><tt id="link-504" class="py-name" targets="Method web2py.gluon.html.FORM.accepts()=web2py.gluon.html.FORM-class.html#accepts,Method web2py.gluon.sqlhtml.SQLFORM.accepts()=web2py.gluon.sqlhtml.SQLFORM-class.html#accepts"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-504', 'accepts', 'link-504');">accepts</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">            <tt class="py-name">request_vars</tt><tt class="py-op">,</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line">            <tt class="py-name">formname</tt><tt class="py-op">,</tt> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">            <tt class="py-name">keepvalues</tt><tt class="py-op">,</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">            <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">hideerror</tt><tt class="py-op">,</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line"> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ret</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">:</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">            <tt class="py-comment">### if there are errors in update mode</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># and some errors refers to an already uploaded file</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># delete error if</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># - user not trying to upload a new file</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># - there is existing file and user is not trying to delete it</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># this is because removing the file may not pass validation</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">.</tt><tt id="link-505" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-505', 'keys', 'link-505');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt> \ </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">                        <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'upload'</tt> \ </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">                        <tt class="py-keyword">and</tt> <tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-506" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-506', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line">                        <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> \ </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line">                        <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt> <tt class="py-op">+</tt> <tt id="link-507" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget" class="py-name" href="#" onclick="return doclink('link-507', 'UploadWidget', 'link-182');">UploadWidget</a></tt><tt class="py-op">.</tt><tt id="link-508" class="py-name"><a title="web2py.gluon.sqlhtml.UploadWidget.ID_DELETE_SUFFIX" class="py-name" href="#" onclick="return doclink('link-508', 'ID_DELETE_SUFFIX', 'link-179');">ID_DELETE_SUFFIX</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">request_vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">                    <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">:</tt> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">                <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line"> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">        <tt class="py-name">requested_delete</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line">            <tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-509" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-509', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-510" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.FIELDNAME_REQUEST_DELETE" class="py-name" href="#" onclick="return doclink('link-510', 'FIELDNAME_REQUEST_DELETE', 'link-317');">FIELDNAME_REQUEST_DELETE</a></tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line"> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-511" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-511', 'end', 'link-432');">end</a></tt> <tt class="py-op">=</tt> <tt id="link-512" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-512', 'TAG', 'link-5');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-513" class="py-name" targets="Method web2py.gluon.html.FORM.hidden_fields()=web2py.gluon.html.FORM-class.html#hidden_fields"><a title="web2py.gluon.html.FORM.hidden_fields" class="py-name" href="#" onclick="return doclink('link-513', 'hidden_fields', 'link-513');">hidden_fields</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-514" class="py-name"><a title="web2py.gluon.custom_import._BaseImporter.end
web2py.gluon.custom_import._DateTrackerImporter.end" class="py-name" href="#" onclick="return doclink('link-514', 'end', 'link-432');">end</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line"> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">        <tt class="py-name">auch</tt> <tt class="py-op">=</tt> <tt class="py-name">record_id</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt> <tt class="py-keyword">and</tt> <tt class="py-name">requested_delete</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line"> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">        <tt class="py-comment"># auch is true when user tries to delete a record</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># that does not pass validation, yet it should be deleted</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ret</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">auch</tt><tt class="py-op">:</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">                <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">                <tt class="py-comment">### this is a workaround! widgets should always have default not None!</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-515" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-515', 'widget', 'link-95');">widget</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-516" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-516', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'list:'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">                        <tt class="py-keyword">not</tt> <tt id="link-517" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget" class="py-name" href="#" onclick="return doclink('link-517', 'OptionsWidget', 'link-64');">OptionsWidget</a></tt><tt class="py-op">.</tt><tt id="link-518" class="py-name"><a title="web2py.gluon.sqlhtml.OptionsWidget.has_options" class="py-name" href="#" onclick="return doclink('link-518', 'has_options', 'link-376');">has_options</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">                    <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-519" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-519', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-520" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.widgets" class="py-name" href="#" onclick="return doclink('link-520', 'widgets', 'link-294');">widgets</a></tt><tt class="py-op">.</tt><tt class="py-name">list</tt><tt class="py-op">.</tt><tt id="link-521" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-521', 'widget', 'link-95');">widget</a></tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-string">'widget'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-522" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-522', 'widget', 'link-95');">widget</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request_vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">                        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line">                        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">                        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">default</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line">                    <tt class="py-name">row_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s_%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt id="link-523" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-523', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-524" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.ID_ROW_SUFFIX" class="py-name" href="#" onclick="return doclink('link-524', 'ID_ROW_SUFFIX', 'link-320');">ID_ROW_SUFFIX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line">                    <tt id="link-525" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-525', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-526" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-526', 'widget', 'link-95');">widget</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">row_id</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt id="link-527" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-527', 'widget', 'link-95');">widget</a></tt> <tt class="py-op">]</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-528" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-528', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'list:'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field_parent</tt><tt class="py-op">[</tt><tt class="py-name">row_id</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-529" class="py-name" targets="Method web2py.gluon.html.DIV._traverse()=web2py.gluon.html.DIV-class.html#_traverse"><a title="web2py.gluon.html.DIV._traverse" class="py-name" href="#" onclick="return doclink('link-529', '_traverse', 'link-529');">_traverse</a></tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">hideerror</tt><tt class="py-op">)</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-530" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-530', 'widget', 'link-95');">widget</a></tt><tt class="py-op">[</tt> <tt class="py-name">fieldname</tt> <tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-531" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-531', 'widget', 'link-95');">widget</a></tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line"> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt> <tt class="py-keyword">and</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'user is tampering with form\'s record_id: '</tt> \ </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">                <tt class="py-string">'%s != %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line"> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt> <tt class="py-keyword">and</tt> <tt class="py-name">dbio</tt><tt class="py-op">:</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-532" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-532', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line"> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">requested_delete</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt class="py-name">deletable</tt><tt class="py-op">:</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">dbio</tt><tt class="py-op">:</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">                    <tt class="py-name">qry</tt> <tt class="py-op">=</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt id="link-533" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-533', 'x', 'link-44');">x</a></tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">:</tt> <tt id="link-534" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-534', 'x', 'link-44');">x</a></tt> <tt class="py-op">&amp;</tt> <tt class="py-name">y</tt><tt class="py-op">,</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">                                 <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt id="link-535" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-535', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">record_id</tt><tt class="py-op">[</tt><tt id="link-536" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-536', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt id="link-537" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-537', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line">                    <tt class="py-name">qry</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_id</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">(</tt><tt class="py-name">qry</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-538" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.delete()=web2py.gluon.dal.BaseAdapter-class.html#delete,Method web2py.gluon.dal.CouchDBAdapter.delete()=web2py.gluon.dal.CouchDBAdapter-class.html#delete,Method web2py.gluon.dal.GoogleDatastoreAdapter.delete()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#delete,Method web2py.gluon.dal.MongoDBAdapter.delete()=web2py.gluon.dal.MongoDBAdapter-class.html#delete,Method web2py.gluon.dal.Set.delete()=web2py.gluon.dal.Set-class.html#delete,Method web2py.gluon.tools.Crud.delete()=web2py.gluon.tools.Crud-class.html#delete"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-538', 'delete', 'link-538');">delete</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">.</tt><tt id="link-539" class="py-name" targets="Method web2py.gluon.cache.CacheAbstract.clear()=web2py.gluon.cache.CacheAbstract-class.html#clear,Method web2py.gluon.cache.CacheInRam.clear()=web2py.gluon.cache.CacheInRam-class.html#clear,Method web2py.gluon.cache.CacheOnDisk.clear()=web2py.gluon.cache.CacheOnDisk-class.html#clear"><a title="web2py.gluon.cache.CacheAbstract.clear
web2py.gluon.cache.CacheInRam.clear
web2py.gluon.cache.CacheOnDisk.clear" class="py-name" href="#" onclick="return doclink('link-539', 'clear', 'link-539');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">component</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-540" class="py-name" targets="Method web2py.gluon.html.DIV.elements()=web2py.gluon.html.DIV-class.html#elements,Method web2py.gluon.html.MARKMIN.elements()=web2py.gluon.html.MARKMIN-class.html#elements,Method web2py.gluon.html.XML.elements()=web2py.gluon.html.XML-class.html#elements"><a title="web2py.gluon.html.DIV.elements
web2py.gluon.html.MARKMIN.elements
web2py.gluon.html.XML.elements" class="py-name" href="#" onclick="return doclink('link-540', 'elements', 'link-540');">elements</a></tt><tt class="py-op">(</tt><tt class="py-string">'input, select, textarea'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">                <tt class="py-name">component</tt><tt class="py-op">[</tt><tt class="py-string">'_disabled'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line"> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line"> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ignore_rw</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">writable</tt><tt class="py-op">:</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">                <tt class="py-comment">### this happens because FORM has no knowledge of writable</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment">### and thinks that a missing boolean field is a None</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'boolean'</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-541" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-541', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">                    <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line"> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">            <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'id'</tt><tt class="py-op">:</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'boolean'</tt><tt class="py-op">:</tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-542" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-542', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'password'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt>\ </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt id="link-543" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-543', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> \ </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">                    <tt id="link-544" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget" class="py-name" href="#" onclick="return doclink('link-544', 'PasswordWidget', 'link-173');">PasswordWidget</a></tt><tt class="py-op">.</tt><tt id="link-545" class="py-name"><a title="web2py.gluon.sqlhtml.PasswordWidget.DEFAULT_PASSWORD_DISPLAY" class="py-name" href="#" onclick="return doclink('link-545', 'DEFAULT_PASSWORD_DISPLAY', 'link-172');">DEFAULT_PASSWORD_DISPLAY</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt>  <tt class="py-comment"># do not update if password was not changed</tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'upload'</tt><tt class="py-op">:</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line">                <tt class="py-name">fd</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s__delete'</tt> <tt class="py-op">%</tt> <tt class="py-name">fieldname</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">f</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt> <tt class="py-keyword">or</tt> <tt class="py-name">f</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-546" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-546', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fd</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line">                        <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">                        <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-string">'file'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line">                    <tt class="py-op">(</tt><tt class="py-name">source_file</tt><tt class="py-op">,</tt> <tt class="py-name">original_filename</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line">                    <tt class="py-comment">### do not know why this happens, it should not</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-op">(</tt><tt class="py-name">source_file</tt><tt class="py-op">,</tt> <tt class="py-name">original_filename</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line">                        <tt class="py-op">(</tt><tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'file.txt'</tt><tt class="py-op">)</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line">                <tt class="py-name">newfilename</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-547" class="py-name" targets="Method web2py.gluon.dal.Field.store()=web2py.gluon.dal.Field-class.html#store,Method web2py.gluon.restricted.TicketStorage.store()=web2py.gluon.restricted.TicketStorage-class.html#store"><a title="web2py.gluon.dal.Field.store
web2py.gluon.restricted.TicketStorage.store" class="py-name" href="#" onclick="return doclink('link-547', 'store', 'link-547');">store</a></tt><tt class="py-op">(</tt><tt class="py-name">source_file</tt><tt class="py-op">,</tt> <tt class="py-name">original_filename</tt><tt class="py-op">)</tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">                <tt class="py-comment"># this line is for backward compatibility only</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-string">'%s_newfilename'</tt> <tt class="py-op">%</tt> <tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">newfilename</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line">                <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">newfilename</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">uploadfield</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">                    <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">uploadfield</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">source_file</tt><tt class="py-op">.</tt><tt id="link-548" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-548', 'read', 'link-548');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line">                <tt class="py-comment"># proposed by Hamdy (accept?) do we need fields at this point?</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">                <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">default</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">!=</tt> <tt class="py-string">'blob'</tt><tt class="py-op">:</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'no data'</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt><tt class="py-op">.</tt><tt id="link-549" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-549', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'list:string'</tt><tt class="py-op">:</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line">                    <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> <tt class="py-keyword">and</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-550" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-550', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'list:'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">                    <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-551" class="py-name" targets="Function web2py.gluon.sqlhtml.safe_int()=web2py.gluon.sqlhtml-module.html#safe_int"><a title="web2py.gluon.sqlhtml.safe_int" class="py-name" href="#" onclick="return doclink('link-551', 'safe_int', 'link-551');">safe_int</a></tt><tt class="py-op">(</tt><tt id="link-552" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-552', 'x', 'link-44');">x</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-553" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-553', 'x', 'link-44');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt> <tt class="py-keyword">and</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'integer'</tt><tt class="py-op">:</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">                    <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-554" class="py-name"><a title="web2py.gluon.sqlhtml.safe_int" class="py-name" href="#" onclick="return doclink('link-554', 'safe_int', 'link-551');">safe_int</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-555" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-555', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'reference'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt id="link-556" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-556', 'Table', 'link-31');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line">                    <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-557" class="py-name"><a title="web2py.gluon.sqlhtml.safe_int" class="py-name" href="#" onclick="return doclink('link-557', 'safe_int', 'link-551');">safe_int</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'double'</tt><tt class="py-op">:</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">                    <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-558" class="py-name" targets="Function web2py.gluon.sqlhtml.safe_float()=web2py.gluon.sqlhtml-module.html#safe_float"><a title="web2py.gluon.sqlhtml.safe_float" class="py-name" href="#" onclick="return doclink('link-558', 'safe_float', 'link-558');">safe_float</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line"> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">fieldname</tt> <tt class="py-op">!=</tt> <tt class="py-string">'id'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt>\ </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line">                 <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fields</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fieldname</tt>\ </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line">                 <tt class="py-keyword">in</tt> <tt class="py-name">request_vars</tt><tt class="py-op">:</tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line">                <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line"> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">dbio</tt><tt class="py-op">:</tt>             </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'delete_this_record'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line">                <tt class="py-comment"># this should never happen but seems to happen to some</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">del</tt> <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-string">'delete_this_record'</tt><tt class="py-op">]</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">field</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">:</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-559" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-559', 'name', 'link-46');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">fields</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">writable</tt><tt class="py-op">==</tt><tt class="py-name">False</tt><tt class="py-op">:</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt><tt class="py-op">:</tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line">                        <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-560" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-560', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-561" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-561', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-562" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-562', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">default</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line">                        <tt class="py-name">fields</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-563" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-563', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-564" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-564', 'name', 'link-46');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">default</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">keyed</tt><tt class="py-op">:</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt id="link-565" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-565', 'x', 'link-44');">x</a></tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">:</tt> <tt id="link-566" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-566', 'x', 'link-44');">x</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">y</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">.</tt><tt id="link-567" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-567', 'values', 'link-131');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># if record_id</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line">                        <tt class="py-name">qry</tt> <tt class="py-op">=</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt id="link-568" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-568', 'x', 'link-44');">x</a></tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">:</tt> <tt id="link-569" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-569', 'x', 'link-44');">x</a></tt> <tt class="py-op">&amp;</tt> <tt class="py-name">y</tt><tt class="py-op">,</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line">                            <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">[</tt><tt id="link-570" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-570', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt id="link-571" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-571', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt id="link-572" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-572', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">(</tt><tt class="py-name">qry</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-573" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-573', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">                    <tt class="py-name">pk</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-574" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-574', 'insert', 'link-326');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">pk</tt><tt class="py-op">:</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-575" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-575', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">pk</tt><tt class="py-op">)</tt> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">                        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt><tt class="py-op">:</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_id</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-576" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-576', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-577" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-577', 'insert', 'link-326');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt>
</div><a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line"> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="SQLFORM.factory"></a><div id="SQLFORM.factory-def"><a name="L1227"></a><tt class="py-lineno">1227</tt> <a class="py-toggle" href="#" id="SQLFORM.factory-toggle" onclick="return toggle('SQLFORM.factory');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLFORM-class.html#factory">factory</a><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">fields</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLFORM.factory-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SQLFORM.factory-expanded"><a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line"><tt class="py-docstring">        generates a SQLFORM for the given fields.</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line"><tt class="py-docstring">        Internally will build a non-database based data model</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line"><tt class="py-docstring">        to hold the fields.</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line">        <tt class="py-comment"># Define a table name, this way it can be logical to our CSS.</tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># And if you switch from using SQLFORM to SQLFORM.factory</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># your same css definitions will still apply.</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line">        <tt class="py-name">table_name</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt id="link-578" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-578', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'table_name'</tt><tt class="py-op">,</tt> <tt class="py-string">'no_table'</tt><tt class="py-op">)</tt> </tt>
<a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line"> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line">        <tt class="py-comment"># So it won't interfear with SQLDB.define_table</tt> </tt>
<a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-string">'table_name'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'table_name'</tt><tt class="py-op">]</tt> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line"> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-579" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-579', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">(</tt><tt id="link-580" class="py-name"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-580', 'DAL', 'link-30');">DAL</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-581" class="py-name" targets="Method web2py.gluon.dal.DAL.define_table()=web2py.gluon.dal.DAL-class.html#define_table"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-581', 'define_table', 'link-581');">define_table</a></tt><tt class="py-op">(</tt><tt class="py-name">table_name</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line"> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line"> </tt>
<a name="SQLTABLE"></a><div id="SQLTABLE-def"><a name="L1247"></a><tt class="py-lineno">1247</tt> <a class="py-toggle" href="#" id="SQLTABLE-toggle" onclick="return toggle('SQLTABLE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLTABLE-class.html">SQLTABLE</a><tt class="py-op">(</tt><tt class="py-base-class">TABLE</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLTABLE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="SQLTABLE-expanded"><a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line"> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line"><tt class="py-docstring">    given a Rows object, as returned by a db().select(), generates</tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line"><tt class="py-docstring">    an html table with the rows.</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1253"></a><tt class="py-lineno">1253</tt>  <tt class="py-line"><tt class="py-docstring">    optional arguments:</tt> </tt>
<a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line"><tt class="py-docstring">    :param linkto: URL (or lambda to generate a URL) to edit individual records</tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line"><tt class="py-docstring">    :param upload: URL to download uploaded files</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line"><tt class="py-docstring">    :param orderby: Add an orderby link to column headers.</tt> </tt>
<a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line"><tt class="py-docstring">    :param headers: dictionary of headers to headers redefinions</tt> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line"><tt class="py-docstring">                    headers can also be a string to gerenare the headers from data</tt> </tt>
<a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line"><tt class="py-docstring">                    for now only headers="fieldname:capitalize",</tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line"><tt class="py-docstring">                    headers="labels" and headers=None are supported</tt> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line"><tt class="py-docstring">    :param truncate: length at which to truncate text in table cells.</tt> </tt>
<a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line"><tt class="py-docstring">        Defaults to 16 characters.</tt> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line"><tt class="py-docstring">    :param columns: a list or dict contaning the names of the columns to be shown</tt> </tt>
<a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line"><tt class="py-docstring">        Defaults to all</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line"><tt class="py-docstring">    Optional names attributes for passed to the &lt;table&gt; tag</tt> </tt>
<a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1269"></a><tt class="py-lineno">1269</tt>  <tt class="py-line"><tt class="py-docstring">    The keys of headers and columns must be of the form "tablename.fieldname"</tt> </tt>
<a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line"><tt class="py-docstring">    Simple linkto example::</tt> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line"><tt class="py-docstring">        rows = db.select(db.sometable.ALL)</tt> </tt>
<a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line"><tt class="py-docstring">        table = SQLTABLE(rows, linkto='someurl')</tt> </tt>
<a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line"><tt class="py-docstring">    This will link rows[id] to .../sometable/value_of_id</tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line"><tt class="py-docstring">    More advanced linkto example::</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line"><tt class="py-docstring">        def mylink(field, type, ref):</tt> </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line"><tt class="py-docstring">            return URL(r=request, args=[field])</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line"><tt class="py-docstring">        rows = db.select(db.sometable.ALL)</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line"><tt class="py-docstring">        table = SQLTABLE(rows, linkto=mylink)</tt> </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line"><tt class="py-docstring">    This will link rows[id] to</tt> </tt>
<a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line"><tt class="py-docstring">        current_app/current_controlle/current_function/value_of_id</tt> </tt>
<a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line"><tt class="py-docstring">    New Implements: 24 June 2011:</tt> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line"><tt class="py-docstring">    -----------------------------</tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line"><tt class="py-docstring">    :param selectid: The id you want to select</tt> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line"><tt class="py-docstring">    :param renderstyle: Boolean render the style with the table</tt> </tt>
<a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line"><tt class="py-docstring">    :param extracolums = [{'label':A('Extra',_href='#'),</tt> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line"><tt class="py-docstring">                    'class': '', #class name of the header</tt> </tt>
<a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line"><tt class="py-docstring">                    'width':'', #width in pixels or %</tt> </tt>
<a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line"><tt class="py-docstring">                    'content':lambda row, rc: A('Edit',_href='edit/%s'%row.id),                     </tt> </tt>
<a name="L1300"></a><tt class="py-lineno">1300</tt>  <tt class="py-line"><tt class="py-docstring">                    'selected': False #agregate class selected to this column</tt> </tt>
<a name="L1301"></a><tt class="py-lineno">1301</tt>  <tt class="py-line"><tt class="py-docstring">                    }]</tt> </tt>
<a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line"><tt class="py-docstring">                    </tt> </tt>
<a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line"><tt class="py-docstring">                    </tt> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line"><tt class="py-docstring">    :param headers = {'table.id':{'label':'Id',</tt> </tt>
<a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line"><tt class="py-docstring">                           'class':'', #class name of the header</tt> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line"><tt class="py-docstring">                           'width':'', #width in pixels or %</tt> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line"><tt class="py-docstring">                           'truncate': 16, #truncate the content to...</tt> </tt>
<a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line"><tt class="py-docstring">                           'selected': False #agregate class selected to this column</tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line"><tt class="py-docstring">                           }, </tt> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line"><tt class="py-docstring">               'table.myfield':{'label':'My field',</tt> </tt>
<a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line"><tt class="py-docstring">                                'class':'', #class name of the header</tt> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line"><tt class="py-docstring">                                'width':'', #width in pixels or %</tt> </tt>
<a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line"><tt class="py-docstring">                                'truncate': 16, #truncate the content to...</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line"><tt class="py-docstring">                                'selected': False #agregate class selected to this column</tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line"><tt class="py-docstring">                                },</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line"><tt class="py-docstring">               }</tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line"><tt class="py-docstring">               </tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line"><tt class="py-docstring">    table = SQLTABLE(rows, headers=headers, extracolums=extracolums)</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line"> </tt>
<a name="SQLTABLE.__init__"></a><div id="SQLTABLE.__init__-def"><a name="L1323"></a><tt class="py-lineno">1323</tt> <a class="py-toggle" href="#" id="SQLTABLE.__init__-toggle" onclick="return toggle('SQLTABLE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line">        <tt class="py-param">sqlrows</tt><tt class="py-op">,</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line">        <tt class="py-param">linkto</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line">        <tt class="py-param">upload</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line">        <tt class="py-param">orderby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line">        <tt class="py-param">headers</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line">        <tt class="py-param">truncate</tt><tt class="py-op">=</tt><tt class="py-number">16</tt><tt class="py-op">,</tt> </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line">        <tt class="py-param">columns</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt>         </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line">        <tt class="py-param">th_link</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line">        <tt class="py-param">extracolumns</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line">        <tt class="py-param">selectid</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line">        <tt class="py-param">renderstyle</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line">        <tt class="py-op">**</tt><tt class="py-param">attributes</tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLTABLE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SQLTABLE.__init__-expanded"><a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line"> </tt>
<a name="L1339"></a><tt class="py-lineno">1339</tt>  <tt class="py-line">        <tt id="link-582" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-582', 'TABLE', 'link-21');">TABLE</a></tt><tt class="py-op">.</tt><tt id="link-583" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-583', '__init__', 'link-323');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sqlrows</tt> <tt class="py-op">=</tt> <tt class="py-name">sqlrows</tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">components</tt><tt class="py-op">,</tt> <tt class="py-name">row</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">sqlrows</tt><tt class="py-op">:</tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">columns</tt><tt class="py-op">:</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line">            <tt class="py-name">columns</tt> <tt class="py-op">=</tt> <tt class="py-name">sqlrows</tt><tt class="py-op">.</tt><tt class="py-name">colnames</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">headers</tt><tt class="py-op">==</tt><tt class="py-string">'fieldname:capitalize'</tt><tt class="py-op">:</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">            <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">columns</tt><tt class="py-op">:</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">                <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">' '</tt><tt class="py-op">.</tt><tt id="link-584" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-584', 'join', 'link-482');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">w</tt><tt class="py-op">.</tt><tt class="py-name">capitalize</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">w</tt> <tt class="py-keyword">in</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">headers</tt><tt class="py-op">==</tt><tt class="py-string">'labels'</tt><tt class="py-op">:</tt> </tt>
<a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line">            <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">columns</tt><tt class="py-op">:</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line">                <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">sqlrows</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">t</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">]</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line">                <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">label</tt> </tt>
<a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">headers</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">columns</tt><tt class="py-op">:</tt><tt class="py-comment">#new implement dict</tt> </tt>
<a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-585" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-585', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">                    <tt class="py-name">coldict</tt> <tt class="py-op">=</tt> <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-586" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-586', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">)</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">                    <tt class="py-name">attrcol</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">coldict</tt><tt class="py-op">[</tt><tt class="py-string">'width'</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line">                        <tt class="py-name">attrcol</tt><tt class="py-op">.</tt><tt id="link-587" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-587', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">_width</tt><tt class="py-op">=</tt><tt class="py-name">coldict</tt><tt class="py-op">[</tt><tt class="py-string">'width'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">coldict</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line">                        <tt class="py-name">attrcol</tt><tt class="py-op">.</tt><tt id="link-588" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-588', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">coldict</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line">                    <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-589" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-589', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-590" class="py-name"><a title="web2py.gluon.html.TH" class="py-name" href="#" onclick="return doclink('link-590', 'TH', 'link-26');">TH</a></tt><tt class="py-op">(</tt><tt class="py-name">coldict</tt><tt class="py-op">[</tt><tt class="py-string">'label'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attrcol</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">orderby</tt><tt class="py-op">:</tt> </tt>
<a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line">                    <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-591" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-591', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-592" class="py-name"><a title="web2py.gluon.html.TH" class="py-name" href="#" onclick="return doclink('link-592', 'TH', 'link-26');">TH</a></tt><tt class="py-op">(</tt><tt id="link-593" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-593', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-594" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-594', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">                                    <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">th_link</tt><tt class="py-op">+</tt><tt class="py-string">'?orderby='</tt> <tt class="py-op">+</tt> <tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line">                    <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-595" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-595', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-596" class="py-name"><a title="web2py.gluon.html.TH" class="py-name" href="#" onclick="return doclink('link-596', 'TH', 'link-26');">TH</a></tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-597" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-597', 'get', 'link-112');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">                     </tt>
<a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">extracolumns</tt><tt class="py-op">:</tt><tt class="py-comment">#new implement dict</tt> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">extracolumns</tt><tt class="py-op">:</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line">                    <tt class="py-name">attrcol</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'width'</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line">                        <tt class="py-name">attrcol</tt><tt class="py-op">.</tt><tt id="link-598" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-598', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">_width</tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'width'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">                        <tt class="py-name">attrcol</tt><tt class="py-op">.</tt><tt id="link-599" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-599', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line">                    <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-600" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-600', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-601" class="py-name"><a title="web2py.gluon.html.TH" class="py-name" href="#" onclick="return doclink('link-601', 'TH', 'link-26');">TH</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'label'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attrcol</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1382"></a><tt class="py-lineno">1382</tt>  <tt class="py-line">                     </tt>
<a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line">            <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-602" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-602', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-603" class="py-name"><a title="web2py.gluon.html.THEAD" class="py-name" href="#" onclick="return doclink('link-603', 'THEAD', 'link-22');">THEAD</a></tt><tt class="py-op">(</tt><tt id="link-604" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-604', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">row</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1384"></a><tt class="py-lineno">1384</tt>  <tt class="py-line">         </tt>
<a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line"> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line">        <tt class="py-name">tbody</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1387"></a><tt class="py-lineno">1387</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">rc</tt><tt class="py-op">,</tt> <tt class="py-name">record</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">sqlrows</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line">            <tt class="py-name">row</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">rc</tt> <tt class="py-op">%</tt> <tt class="py-number">2</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line">                <tt class="py-name">_class</tt> <tt class="py-op">=</tt> <tt class="py-string">'even'</tt> </tt>
<a name="L1391"></a><tt class="py-lineno">1391</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line">                <tt class="py-name">_class</tt> <tt class="py-op">=</tt> <tt class="py-string">'odd'</tt> </tt>
<a name="L1393"></a><tt class="py-lineno">1393</tt>  <tt class="py-line">                 </tt>
<a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">selectid</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt><tt class="py-comment">#new implement</tt> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">==</tt><tt class="py-name">selectid</tt><tt class="py-op">:</tt> </tt>
<a name="L1396"></a><tt class="py-lineno">1396</tt>  <tt class="py-line">                    <tt class="py-name">_class</tt> <tt class="py-op">+=</tt> <tt class="py-string">' rowselected'</tt> </tt>
<a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line">                     </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">colname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">columns</tt><tt class="py-op">:</tt> </tt>
<a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-605" class="py-name"><a title="web2py.gluon.dal.table_field
web2py.gluon.sqlhtml.table_field" class="py-name" href="#" onclick="return doclink('link-605', 'table_field', 'link-40');">table_field</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">colname</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-string">"_extra"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">colname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">_extra</tt><tt class="py-op">:</tt> </tt>
<a name="L1401"></a><tt class="py-lineno">1401</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">_extra</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt> </tt>
<a name="L1402"></a><tt class="py-lineno">1402</tt>  <tt class="py-line">                        <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-606" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-606', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-607" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-607', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">                        <tt class="py-keyword">continue</tt> </tt>
<a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt class="py-name">KeyError</tt><tt class="py-op">(</tt><tt class="py-string">"Column %s not found (SQLTABLE)"</tt> <tt class="py-op">%</tt> <tt class="py-name">colname</tt><tt class="py-op">)</tt> </tt>
<a name="L1406"></a><tt class="py-lineno">1406</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">fieldname</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">colname</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line">                    <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">sqlrows</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">tablename</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line">                    <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">tablename</tt> <tt class="py-keyword">in</tt> <tt class="py-name">record</tt> \ </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line">                        <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">,</tt><tt id="link-608" class="py-name"><a title="web2py.gluon.dal.Row" class="py-name" href="#" onclick="return doclink('link-608', 'Row', 'link-32');">Row</a></tt><tt class="py-op">)</tt> \ </tt>
<a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line">                        <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">tablename</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt id="link-609" class="py-name"><a title="web2py.gluon.dal.Row" class="py-name" href="#" onclick="return doclink('link-609', 'Row', 'link-32');">Row</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">tablename</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1415"></a><tt class="py-lineno">1415</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L1417"></a><tt class="py-lineno">1417</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'something wrong in Rows object'</tt> </tt>
<a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line">                <tt class="py-name">r_old</tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt> </tt>
<a name="L1420"></a><tt class="py-lineno">1420</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">:</tt> </tt>
<a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line">                    <tt class="py-keyword">pass</tt> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">linkto</tt> <tt class="py-keyword">and</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'id'</tt><tt class="py-op">:</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line">                    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1424"></a><tt class="py-lineno">1424</tt>  <tt class="py-line">                        <tt class="py-name">href</tt> <tt class="py-op">=</tt> <tt class="py-name">linkto</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-string">'table'</tt><tt class="py-op">,</tt> <tt class="py-name">tablename</tt><tt class="py-op">)</tt> </tt>
<a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">                    <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">:</tt> </tt>
<a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line">                        <tt class="py-name">href</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linkto</tt><tt class="py-op">,</tt> <tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">r_old</tt><tt class="py-op">)</tt> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-610" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-610', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">href</tt><tt class="py-op">)</tt> </tt>
<a name="L1428"></a><tt class="py-lineno">1428</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-611" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-611', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'reference'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1429"></a><tt class="py-lineno">1429</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">linkto</tt><tt class="py-op">:</tt> </tt>
<a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">                        <tt class="py-name">ref</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">[</tt><tt class="py-number">10</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line">                        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1432"></a><tt class="py-lineno">1432</tt>  <tt class="py-line">                            <tt class="py-name">href</tt> <tt class="py-op">=</tt> <tt class="py-name">linkto</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-string">'reference'</tt><tt class="py-op">,</tt> <tt class="py-name">ref</tt><tt class="py-op">)</tt> </tt>
<a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line">                        <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">:</tt> </tt>
<a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line">                            <tt class="py-name">href</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linkto</tt><tt class="py-op">,</tt> <tt class="py-name">ref</tt><tt class="py-op">,</tt> <tt class="py-name">r_old</tt><tt class="py-op">)</tt> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-name">ref</tt><tt class="py-op">.</tt><tt id="link-612" class="py-name"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-612', 'find', 'link-344');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1436"></a><tt class="py-lineno">1436</tt>  <tt class="py-line">                                <tt class="py-name">tref</tt><tt class="py-op">,</tt><tt class="py-name">fref</tt> <tt class="py-op">=</tt> <tt class="py-name">ref</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line">                                <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">sqlrows</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">tref</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-string">'_primarykey'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">                                    <tt class="py-name">href</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s/%s?%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linkto</tt><tt class="py-op">,</tt> <tt class="py-name">tref</tt><tt class="py-op">,</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-name">fref</tt><tt class="py-op">:</tt><tt class="py-name">r</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-613" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-613', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt id="link-614" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-614', 'represent', 'link-42');">represent</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt class="py-name">r</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">href</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1440"></a><tt class="py-lineno">1440</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-615" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-615', 'represent', 'link-42');">represent</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-616" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-616', 'represent', 'link-42');">represent</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt class="py-name">r</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt> </tt>
<a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">linkto</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_table</tt><tt class="py-op">,</tt><tt class="py-string">'_primarykey'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt><tt class="py-op">:</tt> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line">                    <tt class="py-comment"># have to test this with multi-key tables</tt> </tt>
<a name="L1444"></a><tt class="py-lineno">1444</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> <tt class="py-op">[</tt> \ </tt>
<a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line">                                <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">tablename</tt> <tt class="py-keyword">in</tt> <tt class="py-name">record</tt> \ </tt>
<a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line">                                      <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">,</tt> <tt id="link-617" class="py-name"><a title="web2py.gluon.dal.Row" class="py-name" href="#" onclick="return doclink('link-617', 'Row', 'link-32');">Row</a></tt><tt class="py-op">)</tt> \ </tt>
<a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line">                                      <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">tablename</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-618" class="py-name"><a title="web2py.gluon.dal.Row" class="py-name" href="#" onclick="return doclink('link-618', 'Row', 'link-32');">Row</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line">                                 <tt class="py-op">(</tt><tt id="link-619" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-619', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-name">tablename</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-620" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-620', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt id="link-621" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-621', 'k', 'link-77');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">record</tt><tt class="py-op">[</tt><tt id="link-622" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-622', 'k', 'link-77');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1449"></a><tt class="py-lineno">1449</tt>  <tt class="py-line">                                    <tt class="py-keyword">for</tt> <tt id="link-623" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-623', 'k', 'link-77');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_table</tt><tt class="py-op">.</tt><tt class="py-name">_primarykey</tt> <tt class="py-op">]</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-624" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-624', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-string">'%s/%s?%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">linkto</tt><tt class="py-op">,</tt> <tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-625" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-625', 'startswith', 'link-384');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'list:'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-626" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-626', 'represent', 'link-42');">represent</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt class="py-name">r</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-627" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-627', 'represent', 'link-42');">represent</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1454"></a><tt class="py-lineno">1454</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-628" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-628', 'represent', 'link-42');">represent</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt class="py-name">r</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt> </tt>
<a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'blob'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-string">'DATA'</tt> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'upload'</tt><tt class="py-op">:</tt> </tt>
<a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">upload</tt> <tt class="py-keyword">and</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L1459"></a><tt class="py-lineno">1459</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-629" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-629', 'A', 'link-6');">A</a></tt><tt class="py-op">(</tt><tt class="py-string">'file'</tt><tt class="py-op">,</tt> <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">upload</tt><tt class="py-op">,</tt> <tt class="py-name">r</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-string">'file'</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1464"></a><tt class="py-lineno">1464</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'string'</tt><tt class="py-op">,</tt><tt class="py-string">'text'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-630" class="py-name"><a title="web2py.gluon.dal.Field.formatter
web2py.gluon.validators.IS_DATE.formatter
web2py.gluon.validators.IS_DATETIME.formatter
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter
web2py.gluon.validators.IS_EMPTY_OR.formatter
web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter
web2py.gluon.validators.Validator.formatter" class="py-name" href="#" onclick="return doclink('link-630', 'formatter', 'link-359');">formatter</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1466"></a><tt class="py-lineno">1466</tt>  <tt class="py-line">                    <tt class="py-name">ur</tt> <tt class="py-op">=</tt> <tt class="py-name">unicode</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-string">'utf8'</tt><tt class="py-op">)</tt>                     </tt>
<a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">headers</tt><tt class="py-op">!=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">:</tt> <tt class="py-comment">#new implement dict</tt> </tt>
<a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1469"></a><tt class="py-lineno">1469</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'truncate'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line">                                    <tt class="py-keyword">and</tt> <tt id="link-631" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-631', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">ur</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'truncate'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">                                <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">ur</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'truncate'</tt><tt class="py-op">]</tt> <tt class="py-op">-</tt> <tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
<a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line">                                <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-632" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-632', 'encode', 'link-632');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'...'</tt> </tt>
<a name="L1473"></a><tt class="py-lineno">1473</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-633" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.truncate()=web2py.gluon.dal.BaseAdapter-class.html#truncate,Method web2py.gluon.dal.GoogleDatastoreAdapter.truncate()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#truncate,Method web2py.gluon.dal.Table.truncate()=web2py.gluon.dal.Table-class.html#truncate"><a title="web2py.gluon.dal.BaseAdapter.truncate
web2py.gluon.dal.GoogleDatastoreAdapter.truncate
web2py.gluon.dal.Table.truncate" class="py-name" href="#" onclick="return doclink('link-633', 'truncate', 'link-633');">truncate</a></tt><tt class="py-op">!=</tt><tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt id="link-634" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-634', 'len', 'link-43');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">ur</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt id="link-635" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.truncate
web2py.gluon.dal.GoogleDatastoreAdapter.truncate
web2py.gluon.dal.Table.truncate" class="py-name" href="#" onclick="return doclink('link-635', 'truncate', 'link-633');">truncate</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line">                        <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">ur</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-636" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.truncate
web2py.gluon.dal.GoogleDatastoreAdapter.truncate
web2py.gluon.dal.Table.truncate" class="py-name" href="#" onclick="return doclink('link-636', 'truncate', 'link-633');">truncate</a></tt> <tt class="py-op">-</tt> <tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-637" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-637', 'encode', 'link-632');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'...'</tt> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">                         </tt>
<a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line">                <tt class="py-name">attrcol</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-comment">#new implement dict</tt> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">headers</tt><tt class="py-op">!=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">:</tt> </tt>
<a name="L1478"></a><tt class="py-lineno">1478</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line">                        <tt class="py-name">colclass</tt><tt class="py-op">=</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'selected'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line">                            <tt class="py-name">colclass</tt><tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-name">colname</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">" colselected"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-638" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-638', 'strip', 'link-638');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">colclass</tt><tt class="py-op">!=</tt><tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line">                            <tt class="py-name">attrcol</tt><tt class="py-op">.</tt><tt id="link-639" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-639', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">colclass</tt><tt class="py-op">)</tt> </tt>
<a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line">                         </tt>
<a name="L1485"></a><tt class="py-lineno">1485</tt>  <tt class="py-line">                <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-640" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-640', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-641" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-641', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attrcol</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1486"></a><tt class="py-lineno">1486</tt>  <tt class="py-line">                 </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">extracolumns</tt><tt class="py-op">:</tt><tt class="py-comment">#new implement dict</tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">extracolumns</tt><tt class="py-op">:</tt> </tt>
<a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line">                    <tt class="py-name">attrcol</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1490"></a><tt class="py-lineno">1490</tt>  <tt class="py-line">                    <tt class="py-name">colclass</tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt> </tt>
<a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'selected'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line">                        <tt class="py-name">colclass</tt><tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'class'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">" colselected"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-642" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-642', 'strip', 'link-638');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">colclass</tt><tt class="py-op">!=</tt><tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line">                        <tt class="py-name">attrcol</tt><tt class="py-op">.</tt><tt id="link-643" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-643', 'update', 'link-52');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">colclass</tt><tt class="py-op">)</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line">                    <tt class="py-name">contentfunc</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-string">'content'</tt><tt class="py-op">]</tt> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line">                    <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-644" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-644', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-645" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-645', 'TD', 'link-25');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">contentfunc</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">,</tt> <tt class="py-name">rc</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attrcol</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line">                     </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line">            <tt class="py-name">tbody</tt><tt class="py-op">.</tt><tt id="link-646" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-646', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-647" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-647', 'TR', 'link-24');">TR</a></tt><tt class="py-op">(</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-name">_class</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">row</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line">             </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">renderstyle</tt><tt class="py-op">:</tt> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line">            <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-648" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-648', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-649" class="py-name" targets="Class web2py.gluon.html.STYLE=web2py.gluon.html.STYLE-class.html"><a title="web2py.gluon.html.STYLE" class="py-name" href="#" onclick="return doclink('link-649', 'STYLE', 'link-649');">STYLE</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-650" class="py-name" targets="Method web2py.gluon.sqlhtml.SQLTABLE.style()=web2py.gluon.sqlhtml.SQLTABLE-class.html#style"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-650', 'style', 'link-650');">style</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line">         </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line">        <tt class="py-name">components</tt><tt class="py-op">.</tt><tt id="link-651" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-651', 'append', 'link-120');">append</a></tt><tt class="py-op">(</tt><tt id="link-652" class="py-name"><a title="web2py.gluon.html.TBODY" class="py-name" href="#" onclick="return doclink('link-652', 'TBODY', 'link-23');">TBODY</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">tbody</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line">         </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line">     </tt>
<a name="SQLTABLE.style"></a><div id="SQLTABLE.style-def"><a name="L1506"></a><tt class="py-lineno">1506</tt> <a class="py-toggle" href="#" id="SQLTABLE.style-toggle" onclick="return toggle('SQLTABLE.style');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.sqlhtml.SQLTABLE-class.html#style">style</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQLTABLE.style-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="SQLTABLE.style-expanded"><a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line">         </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line">        <tt class="py-name">css</tt> <tt class="py-op">=</tt> <tt class="py-string">'''</tt> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line"><tt class="py-string">        table tbody tr.odd {</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line"><tt class="py-string">            background-color: #DFD;</tt> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line"><tt class="py-string">        }</tt> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line"><tt class="py-string">        table tbody tr.even {</tt> </tt>
<a name="L1513"></a><tt class="py-lineno">1513</tt>  <tt class="py-line"><tt class="py-string">            background-color: #EFE;</tt> </tt>
<a name="L1514"></a><tt class="py-lineno">1514</tt>  <tt class="py-line"><tt class="py-string">        }</tt> </tt>
<a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line"><tt class="py-string">        table tbody tr.rowselected {</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line"><tt class="py-string">            background-color: #FDD;</tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line"><tt class="py-string">        }</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line"><tt class="py-string">        table tbody tr td.colselected {</tt> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line"><tt class="py-string">            background-color: #FDD;</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line"><tt class="py-string">        }</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line"><tt class="py-string">        table tbody tr:hover {</tt> </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line"><tt class="py-string">            background: #DDF;</tt> </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line"><tt class="py-string">        }</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line"><tt class="py-string">        '''</tt> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line">         </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">css</tt> </tt>
</div></div><a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line"> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line"><tt class="py-name">form_factory</tt> <tt class="py-op">=</tt> <tt id="link-653" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-653', 'SQLFORM', 'link-347');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-654" class="py-name" targets="Static Method web2py.gluon.sqlhtml.SQLFORM.factory()=web2py.gluon.sqlhtml.SQLFORM-class.html#factory,Static Method web2py.gluon.sqlhtml.SQLFORM.factory()=web2py.gluon.sqlhtml.SQLFORM-class.html#factory"><a title="web2py.gluon.sqlhtml.SQLFORM.factory
web2py.gluon.sqlhtml.SQLFORM.factory" class="py-name" href="#" onclick="return doclink('link-654', 'factory', 'link-654');">factory</a></tt> <tt class="py-comment"># for backward compatibility, deprecated</tt> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.AutocompleteWidget-class.html version [e91a87be60].







































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.AutocompleteWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;AutocompleteWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class AutocompleteWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#AutocompleteWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">AutocompleteWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">id_field</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">orderby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">limitby</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>10<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">keyword</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">_autocomplete_%(fieldname)s</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">min_length</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#AutocompleteWidget.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="callback"></a><span class="summary-sig-name">callback</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#AutocompleteWidget.callback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#AutocompleteWidget.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">id_field</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">orderby</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">limitby</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>10<code class="variable-group">)</code></span>,
        <span class="sig-arg">keyword</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">_autocomplete_%(fieldname)s</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">min_length</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#AutocompleteWidget.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.BooleanWidget-class.html version [08938972d4].


















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.BooleanWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;BooleanWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.BooleanWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BooleanWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#BooleanWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+
             |
            <strong class="uidshort">BooleanWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.BooleanWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates an INPUT checkbox tag.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#BooleanWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#BooleanWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates an INPUT checkbox tag.</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">FormWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.CheckboxesWidget-class.html version [4f090369f9].

























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.CheckboxesWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;CheckboxesWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CheckboxesWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#CheckboxesWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
 <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a> --+
                 |
                <strong class="uidshort">CheckboxesWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a TABLE tag, including INPUT checkboxes (multiple 
      allowed)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#CheckboxesWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options">has_options</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#CheckboxesWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a TABLE tag, including INPUT checkboxes (multiple 
  allowed)</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#widget">OptionsWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.DateWidget-class.html version [72b32f43b6].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.DateWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;DateWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.DateWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DateWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#DateWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">DateWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.DatetimeWidget-class.html version [c10a4ab6e4].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.DatetimeWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;DatetimeWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.DatetimeWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DatetimeWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#DatetimeWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">DatetimeWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.DecimalWidget-class.html version [17f96e5e6b].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.DecimalWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;DecimalWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.DecimalWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DecimalWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#DecimalWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">DecimalWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.DoubleWidget-class.html version [a9be972484].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.DoubleWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;DoubleWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.DoubleWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DoubleWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#DoubleWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">DoubleWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.FormWidget-class.html version [338a187a3c].












































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.FormWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;FormWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.FormWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FormWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#FormWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">FormWidget</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.sqlhtml.BooleanWidget-class.html">BooleanWidget</a>,
    <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a>,
    <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a>,
    <a href="web2py.gluon.sqlhtml.PasswordWidget-class.html">PasswordWidget</a>,
    <a href="web2py.gluon.sqlhtml.TextWidget-class.html">TextWidget</a>,
    <a href="web2py.gluon.sqlhtml.UploadWidget-class.html">UploadWidget</a>
</dd></dl>

<hr />
helper for SQLFORM to generate form input fields (widget), related to 
  the fieldtype<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes" class="summary-sig-name">_attributes</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">widget_attributes</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      helper to build a common set of attributes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#FormWidget._attributes">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates the widget for the field.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#FormWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_attributes"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_attributes</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">widget_attributes</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#FormWidget._attributes">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>helper to build a common set of attributes</p>
  :param field: the field involved, some attributes are derived from 
  this :param widget_attributes:  widget related attributes :param 
  attributes: any other supplied attributes
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#FormWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

generates the widget for the field.

When serialized, will provide an INPUT tag:

- id = tablename_fieldname
- class = field.type
- name = fieldname

:param field: the field needing the widget
:param value: value
:param attributes: any other attributes to be applied

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.IntegerWidget-class.html version [a62cbb9a79].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.IntegerWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;IntegerWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.IntegerWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IntegerWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#IntegerWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">IntegerWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.ListWidget-class.html version [1a94f33f59].





















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.ListWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;ListWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.ListWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ListWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#ListWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">ListWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.ListWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates an INPUT text tag.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#ListWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#ListWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates an INPUT text tag.</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">StringWidget.widget</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html version [f2a494bd6d].

































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.MultipleOptionsWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;MultipleOptionsWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MultipleOptionsWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#MultipleOptionsWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
 <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a> --+
                 |
                <strong class="uidshort">MultipleOptionsWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a SELECT tag, including OPTIONs (multiple options allowed)...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#MultipleOptionsWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options">has_options</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">size</span>=<span class="sig-default">5</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#MultipleOptionsWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

generates a SELECT tag, including OPTIONs (multiple options allowed)

see also: :meth:`FormWidget.widget`

:param size: optional param (default=5) to indicate how many rows must
    be shown

</pre>
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#widget">OptionsWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.OptionsWidget-class.html version [9b11fe669d].

































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.OptionsWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;OptionsWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.OptionsWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OptionsWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#OptionsWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+
             |
            <strong class="uidshort">OptionsWidget</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.sqlhtml.CheckboxesWidget-class.html">CheckboxesWidget</a>,
    <a href="web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html">MultipleOptionsWidget</a>,
    <a href="web2py.gluon.sqlhtml.RadioWidget-class.html">RadioWidget</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options" class="summary-sig-name">has_options</a>(<span class="summary-sig-arg">field</span>)</span><br />
      checks if the field has selectable options</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#OptionsWidget.has_options">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a SELECT tag, including OPTIONs (only 1 option 
      allowed)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#OptionsWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="has_options"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">has_options</span>(<span class="sig-arg">field</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#OptionsWidget.has_options">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>checks if the field has selectable options</p>
  :param field: the field needing checking :returns: True if the field 
  has options
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#OptionsWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a SELECT tag, including OPTIONs (only 1 option allowed)</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">FormWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.PasswordWidget-class.html version [f1e8b8d8da].












































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.PasswordWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;PasswordWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.PasswordWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class PasswordWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#PasswordWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+
             |
            <strong class="uidshort">PasswordWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.PasswordWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a INPUT password tag.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#PasswordWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_PASSWORD_DISPLAY"></a><span class="summary-name">DEFAULT_PASSWORD_DISPLAY</span> = <code title="'********'"><code class="variable-quote">'</code><code class="variable-string">********</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#PasswordWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a INPUT password tag. If a value is present it will be shown
  as a number of '*', not related to the length of the actual value.</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">FormWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.RadioWidget-class.html version [ae1acf17b8].

























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.RadioWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;RadioWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.RadioWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class RadioWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#RadioWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
 <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a> --+
                 |
                <strong class="uidshort">RadioWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.RadioWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a TABLE tag, including INPUT radios (only 1 option 
      allowed)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#RadioWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html">OptionsWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#has_options">has_options</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#RadioWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a TABLE tag, including INPUT radios (only 1 option 
  allowed)</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.OptionsWidget-class.html#widget">OptionsWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.SQLFORM-class.html version [edc7f7054d].












































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.SQLFORM</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;SQLFORM
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.SQLFORM-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQLFORM</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
       object --+            
                |            
<a href="web2py.gluon.html.XmlComponent-class.html">html.XmlComponent</a> --+        
                    |        
             <a href="web2py.gluon.html.DIV-class.html">html.DIV</a> --+    
                        |    
                <a href="web2py.gluon.html.FORM-class.html">html.FORM</a> --+
                            |
                           <strong class="uidshort">SQLFORM</strong>
</pre>

<hr />
<pre class="literalblock">

SQLFORM is used to map a table (and a current record) into an HTML form

given a SQLTable stored in db.table

generates an insert form::

    SQLFORM(db.table)

generates an update form::

    record=db.table[some_id]
    SQLFORM(db.table, record)

generates an update with a delete button::

    SQLFORM(db.table, record, deletable=True)

if record is an int::

    record=db.table[record]

optional arguments:

:param fields: a list of fields that should be placed in the form,
    default is all.
:param labels: a dictionary with labels for each field, keys are the field
    names.
:param col3: a dictionary with content for an optional third column
        (right of each field). keys are field names.
:param linkto: the URL of a controller/function to access referencedby
    records
        see controller appadmin.py for examples
:param upload: the URL of a controller/function to download an uploaded file
        see controller appadmin.py for examples

any named optional attribute is passed to the &lt;form&gt; tag
        for example _class, _id, _style, _action, _method, etc.

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#__init__" class="summary-sig-name">__init__</a>()</span><br />
      SQLFORM(db.table,...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="createform"></a><span class="summary-sig-name">createform</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">xfields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.createform">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#accepts" class="summary-sig-name">accepts</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request_vars</span>,
        <span class="summary-sig-arg">session</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">formname</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">%(tablename)s/%(record_id)s</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">keepvalues</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">dbio</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">hideerror</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">detect_record_change</span>=<span class="summary-sig-default">True</span>)</span><br />
      similar FORM.accepts but also does insert, update or delete in DAL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.accepts">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.FORM-class.html">html.FORM</a></code></b>:
      <code><a href="web2py.gluon.html.FORM-class.html#hidden_fields">hidden_fields</a></code>,
      <code><a href="web2py.gluon.html.FORM-class.html#process">process</a></code>,
      <code><a href="web2py.gluon.html.FORM-class.html#validate">validate</a></code>,
      <code><a href="web2py.gluon.html.FORM-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.FORM-class.html">html.FORM</a></code></b> (private):
      <code><a href="web2py.gluon.html.FORM-class.html#_postprocessing">_postprocessing</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">html.DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">html.DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_fixup">_fixup</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.SQLFORM-class.html#factory" class="summary-sig-name">factory</a>(<span class="summary-sig-arg">*fields</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a SQLFORM for the given fields.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.factory">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.sqlhtml.SQLFORM-class.html#widgets" class="summary-name">widgets</a> = <code title="&lt;Storage {'multiple': &lt;class 'web2py.gluon.sqlhtml.MultipleOptionsWidg\
et'&gt;, 'string': &lt;class 'web2py.gluon.sqlhtml.StringWidget'&gt;, 'text': &lt;\
class 'web2py.gluon.sqlhtml.TextWidget'&gt;, 'datetime': &lt;class 'web2py.g\
luon.sqlhtml.DatetimeWidget'&gt;, 'boolean': &lt;class 'web2py.gluon.sqlhtml\
.BooleanWidget'&gt;, 'radio': &lt;class 'web2py.gluon.sqlhtml.RadioWidget'&gt;,\
 'date': &lt;class 'web2py.gluon.sqlhtml.DateWidget'&gt;, 'integer': &lt;class \
'web2py.gluon.sqlhtml.IntegerWidget'&gt;, 'password': &lt;class 'web2py.gluo\
n.sqlhtml.PasswordWidget'&gt;, 'double': &lt;class 'web2py.gluon.sqlhtml.Dou\
...">&lt;Storage {'multiple': &lt;class 'web2py.gluon.sqlhtml.M<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FIELDNAME_REQUEST_DELETE"></a><span class="summary-name">FIELDNAME_REQUEST_DELETE</span> = <code title="'delete_this_record'"><code class="variable-quote">'</code><code class="variable-string">delete_this_record</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FIELDKEY_DELETE_RECORD"></a><span class="summary-name">FIELDKEY_DELETE_RECORD</span> = <code title="'delete_record'"><code class="variable-quote">'</code><code class="variable-string">delete_record</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ID_LABEL_SUFFIX"></a><span class="summary-name">ID_LABEL_SUFFIX</span> = <code title="'__label'"><code class="variable-quote">'</code><code class="variable-string">__label</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ID_ROW_SUFFIX"></a><span class="summary-name">ID_ROW_SUFFIX</span> = <code title="'__row'"><code class="variable-quote">'</code><code class="variable-string">__row</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.FORM-class.html">html.FORM</a></code></b>:
      <code><a href="web2py.gluon.html.FORM-class.html#tag">tag</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">html.DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>()</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

SQLFORM(db.table,
       record=None,
       fields=['name'],
       labels={'name': 'Your name'},
       linkto=URL(r=request, f='table/db/')

</pre>
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.FORM-class.html#__init__">html.FORM.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="accepts"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">accepts</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request_vars</span>,
        <span class="sig-arg">session</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">formname</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">%(tablename)s/%(record_id)s</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">keepvalues</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">dbio</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">hideerror</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">detect_record_change</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.accepts">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

similar FORM.accepts but also does insert, update or delete in DAL.
but if detect_record_change == True than:
  form.record_changed = False (record is properly validated/submitted)
  form.record_changed = True (record cannot be submitted because changed)
elseif detect_record_change == False than:
  form.record_changed = None

</pre>
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.FORM-class.html#accepts">html.FORM.accepts</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="factory"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">factory</span>(<span class="sig-arg">*fields</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLFORM.factory">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a SQLFORM for the given fields.</p>
  Internally will build a non-database based data model to hold the 
  fields.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widgets"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">widgets</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
&lt;Storage {'multiple': &lt;class 'web2py.gluon.sqlhtml.MultipleOptionsWidg<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
et'&gt;, 'string': &lt;class 'web2py.gluon.sqlhtml.StringWidget'&gt;, 'text': &lt;<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
class 'web2py.gluon.sqlhtml.TextWidget'&gt;, 'datetime': &lt;class 'web2py.g<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
luon.sqlhtml.DatetimeWidget'&gt;, 'boolean': &lt;class 'web2py.gluon.sqlhtml<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
.BooleanWidget'&gt;, 'radio': &lt;class 'web2py.gluon.sqlhtml.RadioWidget'&gt;,<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 'date': &lt;class 'web2py.gluon.sqlhtml.DateWidget'&gt;, 'integer': &lt;class <span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
'web2py.gluon.sqlhtml.IntegerWidget'&gt;, 'password': &lt;class 'web2py.gluo<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
n.sqlhtml.PasswordWidget'&gt;, 'double': &lt;class 'web2py.gluon.sqlhtml.Dou<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.SQLTABLE-class.html version [1564b6b370].









































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.SQLTABLE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;SQLTABLE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.SQLTABLE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQLTABLE</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLTABLE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
       object --+            
                |            
<a href="web2py.gluon.html.XmlComponent-class.html">html.XmlComponent</a> --+        
                    |        
             <a href="web2py.gluon.html.DIV-class.html">html.DIV</a> --+    
                        |    
               <a href="web2py.gluon.html.TABLE-class.html">html.TABLE</a> --+
                            |
                           <strong class="uidshort">SQLTABLE</strong>
</pre>

<hr />
<pre class="literalblock">

given a Rows object, as returned by a db().select(), generates
an html table with the rows.

optional arguments:

:param linkto: URL (or lambda to generate a URL) to edit individual records
:param upload: URL to download uploaded files
:param orderby: Add an orderby link to column headers.
:param headers: dictionary of headers to headers redefinions
                headers can also be a string to gerenare the headers from data
                for now only headers=&quot;fieldname:capitalize&quot;,
                headers=&quot;labels&quot; and headers=None are supported
:param truncate: length at which to truncate text in table cells.
    Defaults to 16 characters.
:param columns: a list or dict contaning the names of the columns to be shown
    Defaults to all

Optional names attributes for passed to the &lt;table&gt; tag

The keys of headers and columns must be of the form &quot;tablename.fieldname&quot;

Simple linkto example::

    rows = db.select(db.sometable.ALL)
    table = SQLTABLE(rows, linkto='someurl')

This will link rows[id] to .../sometable/value_of_id


More advanced linkto example::

    def mylink(field, type, ref):
        return URL(r=request, args=[field])

    rows = db.select(db.sometable.ALL)
    table = SQLTABLE(rows, linkto=mylink)

This will link rows[id] to
    current_app/current_controlle/current_function/value_of_id
    
New Implements: 24 June 2011:
-----------------------------

:param selectid: The id you want to select
:param renderstyle: Boolean render the style with the table

:param extracolums = [{'label':A('Extra',_href='#'),
                'class': '', #class name of the header
                'width':'', #width in pixels or %
                'content':lambda row, rc: A('Edit',_href='edit/%s'%row.id),                     
                'selected': False #agregate class selected to this column
                }]
                
                
:param headers = {'table.id':{'label':'Id',
                       'class':'', #class name of the header
                       'width':'', #width in pixels or %
                       'truncate': 16, #truncate the content to...
                       'selected': False #agregate class selected to this column
                       }, 
           'table.myfield':{'label':'My field',
                            'class':'', #class name of the header
                            'width':'', #width in pixels or %
                            'truncate': 16, #truncate the content to...
                            'selected': False #agregate class selected to this column
                            },
           }
           
table = SQLTABLE(rows, headers=headers, extracolums=extracolums)

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sqlrows</span>,
        <span class="summary-sig-arg">linkto</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">upload</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">orderby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">headers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">truncate</span>=<span class="summary-sig-default">16</span>,
        <span class="summary-sig-arg">columns</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">th_link</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">extracolumns</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">selectid</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">renderstyle</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      :param *components: any components that should be nested in this 
      element :param **attributes: any attributes you want to give to this 
      element</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLTABLE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="style"></a><span class="summary-sig-name">style</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLTABLE.style">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.TABLE-class.html">html.TABLE</a></code></b> (private):
      <code><a href="web2py.gluon.html.TABLE-class.html#_fixup">_fixup</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">html.DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__len__">__len__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__nonzero__">__nonzero__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#__str__">__str__</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#append">append</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#element">element</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#elements">elements</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#flatten">flatten</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#insert">insert</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#sibling">sibling</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#siblings">siblings</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#update">update</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#xml">xml</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">html.DIV</a></code></b> (private):
      <code><a href="web2py.gluon.html.DIV-class.html#_postprocessing">_postprocessing</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_setnode">_setnode</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_traverse">_traverse</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_validate">_validate</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_wrap_components">_wrap_components</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#_xml">_xml</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.TABLE-class.html">html.TABLE</a></code></b>:
      <code><a href="web2py.gluon.html.TABLE-class.html#tag">tag</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.html.DIV-class.html">html.DIV</a></code></b>:
      <code><a href="web2py.gluon.html.DIV-class.html#regex_attr">regex_attr</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_class">regex_class</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_id">regex_id</a></code>,
      <code><a href="web2py.gluon.html.DIV-class.html#regex_tag">regex_tag</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sqlrows</span>,
        <span class="sig-arg">linkto</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">upload</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">orderby</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">headers</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">truncate</span>=<span class="sig-default">16</span>,
        <span class="sig-arg">columns</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">th_link</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">extracolumns</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">selectid</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">renderstyle</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#SQLTABLE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>:param *components: any components that should be nested in this 
  element :param **attributes: any attributes you want to give to this 
  element</p>
  :raises SyntaxError: when a stand alone tag receives components
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.html.DIV-class.html#__init__">html.DIV.__init__</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.StringWidget-class.html version [0ecfd8d20e].





























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.StringWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;StringWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.StringWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class StringWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#StringWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+
             |
            <strong class="uidshort">StringWidget</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.sqlhtml.DateWidget-class.html">DateWidget</a>,
    <a href="web2py.gluon.sqlhtml.DatetimeWidget-class.html">DatetimeWidget</a>,
    <a href="web2py.gluon.sqlhtml.DecimalWidget-class.html">DecimalWidget</a>,
    <a href="web2py.gluon.sqlhtml.DoubleWidget-class.html">DoubleWidget</a>,
    <a href="web2py.gluon.sqlhtml.IntegerWidget-class.html">IntegerWidget</a>,
    <a href="web2py.gluon.sqlhtml.ListWidget-class.html">ListWidget</a>,
    <a href="web2py.gluon.sqlhtml.TimeWidget-class.html">TimeWidget</a>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates an INPUT text tag.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#StringWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#StringWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates an INPUT text tag.</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">FormWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.TextWidget-class.html version [36972c8e6f].


















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.TextWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;TextWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.TextWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TextWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#TextWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+
             |
            <strong class="uidshort">TextWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.TextWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a TEXTAREA tag.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#TextWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#TextWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a TEXTAREA tag.</p>
  see also: :meth:`FormWidget.widget`
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">FormWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.TimeWidget-class.html version [d23e90b78a].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.TimeWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;TimeWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.TimeWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TimeWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#TimeWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+    
             |    
  <a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a> --+
                 |
                <strong class="uidshort">TimeWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html">StringWidget</a></code></b>:
      <code><a href="web2py.gluon.sqlhtml.StringWidget-class.html#widget">widget</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.sqlhtml.UploadWidget-class.html version [b0f6dd97bb].











































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.sqlhtml.UploadWidget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.sqlhtml-module.html">Module&nbsp;sqlhtml</a> ::
        Class&nbsp;UploadWidget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.sqlhtml.UploadWidget-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class UploadWidget</h1><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
<a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a> --+
             |
            <strong class="uidshort">UploadWidget</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#widget" class="summary-sig-name">widget</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">download_url</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">**attributes</span>)</span><br />
      generates a INPUT file tag.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget.widget">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#represent" class="summary-sig-name">represent</a>(<span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">download_url</span>=<span class="summary-sig-default">1</span>)</span><br />
      how to represent the file:...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget.represent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.sqlhtml.UploadWidget-class.html#is_image" class="summary-sig-name">is_image</a>(<span class="summary-sig-arg">value</span>)</span><br />
      Tries to check if the filename provided references to an image

Checking is based on filename extension.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget.is_image">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html">FormWidget</a></code></b> (private):
      <code><a href="web2py.gluon.sqlhtml.FormWidget-class.html#_attributes">_attributes</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_WIDTH"></a><span class="summary-name">DEFAULT_WIDTH</span> = <code title="'150px'"><code class="variable-quote">'</code><code class="variable-string">150px</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ID_DELETE_SUFFIX"></a><span class="summary-name">ID_DELETE_SUFFIX</span> = <code title="'__delete'"><code class="variable-quote">'</code><code class="variable-string">__delete</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="GENERIC_DESCRIPTION"></a><span class="summary-name">GENERIC_DESCRIPTION</span> = <code title="'file'"><code class="variable-quote">'</code><code class="variable-string">file</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DELETE_FILE"></a><span class="summary-name">DELETE_FILE</span> = <code title="'delete'"><code class="variable-quote">'</code><code class="variable-string">delete</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="widget"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">widget</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">download_url</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">**attributes</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget.widget">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>generates a INPUT file tag.</p>
  <p>Optionally provides an A link to the file, including a checkbox so the
  file can be deleted. All is wrapped in a DIV.</p>
  <p>see also: :meth:`FormWidget.widget`</p>
  :param download_url: Optional URL to link to the file (default = 
  None)
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.sqlhtml.FormWidget-class.html#widget">FormWidget.widget</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="represent"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">represent</span>(<span class="sig-arg">field</span>,
        <span class="sig-arg">value</span>,
        <span class="sig-arg">download_url</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget.represent">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

how to represent the file:

- with download url and if it is an image: &lt;A href=...&gt;&lt;IMG ...&gt;&lt;/A&gt;
- otherwise with download url: &lt;A href=...&gt;file&lt;/A&gt;
- otherwise: file

:param field: the field
:param value: the field value
:param download_url: url for the file download (default = None)

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="is_image"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">is_image</span>(<span class="sig-arg">value</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.sqlhtml-pysrc.html#UploadWidget.is_image">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Tries to check if the filename provided references to an image

Checking is based on filename extension. Currently recognized:
   gif, png, jp(e)g, bmp

:param value: filename

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage-module.html version [22860bb95b].















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;storage
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module storage</h1><span class="codelink"><a href="web2py.gluon.storage-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Provides:

- List; like list but returns None instead of IndexOutOfBounds
- Storage; like dictionary allowing also for `obj.foo` for `obj['foo']`

</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.storage.List-class.html" class="summary-name">List</a><br />
      Like a regular python list but a[i] if i is out of bounds return
        None instead of IndexOutOfBounds
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.storage.Storage-class.html" class="summary-name">Storage</a><br />
      A Storage object is like a dictionary except `obj.foo` can be 
        used in addition to `obj['foo']`.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.storage.StorageList-class.html" class="summary-name">StorageList</a><br />
      like Storage but missing elements default to [] instead of 
        None
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.storage.Settings-class.html" class="summary-name">Settings</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.storage.Messages-class.html" class="summary-name">Messages</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="load_storage"></a><span class="summary-sig-name">load_storage</span>(<span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#load_storage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="save_storage"></a><span class="summary-sig-name">save_storage</span>(<span class="summary-sig-arg">storage</span>,
        <span class="summary-sig-arg">filename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#save_storage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage-pysrc.html version [7202e1902a].










































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;storage
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.storage-module.html">Module web2py.gluon.storage</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">Provides:</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">- List; like list but returns None instead of IndexOutOfBounds</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">- Storage; like dictionary allowing also for `obj.foo` for `obj['foo']`</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cPickle</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.portalocker=web2py.gluon.portalocker-module.html"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-0', 'portalocker', 'link-0');">portalocker</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'List'</tt><tt class="py-op">,</tt> <tt class="py-string">'Storage'</tt><tt class="py-op">,</tt> <tt class="py-string">'Settings'</tt><tt class="py-op">,</tt> <tt class="py-string">'Messages'</tt><tt class="py-op">,</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">           <tt class="py-string">'StorageList'</tt><tt class="py-op">,</tt> <tt class="py-string">'load_storage'</tt><tt class="py-op">,</tt> <tt class="py-string">'save_storage'</tt><tt class="py-op">]</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="List"></a><div id="List-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="List-toggle" onclick="return toggle('List');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.storage.List-class.html">List</a><tt class="py-op">(</tt><tt class="py-base-class">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="List-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="List-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">    Like a regular python list but a[i] if i is out of bounds return None</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring">    instead of IndexOutOfBounds</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="List.__call__"></a><div id="List.__call__-def"><a name="L28"></a><tt class="py-lineno"> 28</tt> <a class="py-toggle" href="#" id="List.__call__-toggle" onclick="return toggle('List.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.List-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">,</tt> <tt class="py-param">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="List.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="List.__call__-expanded"><a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-number">0</tt><tt class="py-op">&lt;=</tt><tt class="py-name">i</tt><tt class="py-op">&lt;</tt><tt id="link-1" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-1', 'len', 'link-1');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">default</tt> </tt>
</div></div><a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"> </tt>
<a name="Storage"></a><div id="Storage-def"><a name="L34"></a><tt class="py-lineno"> 34</tt> <a class="py-toggle" href="#" id="Storage-toggle" onclick="return toggle('Storage');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html">Storage</a><tt class="py-op">(</tt><tt class="py-base-class">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Storage-expanded"><a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring">    A Storage object is like a dictionary except `obj.foo` can be used</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring">    in addition to `obj['foo']`.</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; o = Storage(a=1)</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print o.a</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring">        1</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; o['a']</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring">        1</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; o.a = 2</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print o['a']</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring">        2</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; del o.a</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print o.a</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">        None</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="Storage.__getattr__"></a><div id="Storage.__getattr__-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="Storage.__getattr__-toggle" onclick="return toggle('Storage.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.__getattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.__getattr__-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"> </tt>
<a name="Storage.__setattr__"></a><div id="Storage.__setattr__-def"><a name="L63"></a><tt class="py-lineno"> 63</tt> <a class="py-toggle" href="#" id="Storage.__setattr__-toggle" onclick="return toggle('Storage.__setattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.__setattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.__setattr__-expanded"><a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">                <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="Storage.__delattr__"></a><div id="Storage.__delattr__-def"><a name="L70"></a><tt class="py-lineno"> 70</tt> <a class="py-toggle" href="#" id="Storage.__delattr__-toggle" onclick="return toggle('Storage.__delattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.__delattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.__delattr__-expanded"><a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">,</tt> <tt class="py-string">"missing key=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt> </tt>
</div><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="Storage.__repr__"></a><div id="Storage.__repr__-def"><a name="L76"></a><tt class="py-lineno"> 76</tt> <a class="py-toggle" href="#" id="Storage.__repr__-toggle" onclick="return toggle('Storage.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.__repr__-expanded"><a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;Storage '</tt> <tt class="py-op">+</tt> <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.dal.DAL.__repr__()=web2py.gluon.dal.DAL-class.html#__repr__,Method web2py.gluon.dal.GAEF.__repr__()=web2py.gluon.dal.GAEF-class.html#__repr__,Method web2py.gluon.dal.Row.__repr__()=web2py.gluon.dal.Row-class.html#__repr__,Method web2py.gluon.dal.Table.__repr__()=web2py.gluon.dal.Table-class.html#__repr__,Method web2py.gluon.languages.lazyT.__repr__()=web2py.gluon.languages.lazyT-class.html#__repr__,Method web2py.gluon.rocket.Headers.__repr__()=web2py.gluon.rocket.Headers-class.html#__repr__,Method web2py.gluon.storage.Storage.__repr__()=web2py.gluon.storage.Storage-class.html#__repr__,Method web2py.gluon.template.BlockNode.__repr__()=web2py.gluon.template.BlockNode-class.html#__repr__,Method web2py.gluon.template.SuperNode.__repr__()=web2py.gluon.template.SuperNode-class.html#__repr__"><a title="web2py.gluon.dal.DAL.__repr__
web2py.gluon.dal.GAEF.__repr__
web2py.gluon.dal.Row.__repr__
web2py.gluon.dal.Table.__repr__
web2py.gluon.languages.lazyT.__repr__
web2py.gluon.rocket.Headers.__repr__
web2py.gluon.storage.Storage.__repr__
web2py.gluon.template.BlockNode.__repr__
web2py.gluon.template.SuperNode.__repr__" class="py-name" href="#" onclick="return doclink('link-2', '__repr__', 'link-2');">__repr__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'&gt;'</tt> </tt>
</div><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="Storage.__getstate__"></a><div id="Storage.__getstate__-def"><a name="L79"></a><tt class="py-lineno"> 79</tt> <a class="py-toggle" href="#" id="Storage.__getstate__-toggle" onclick="return toggle('Storage.__getstate__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.__getstate__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.__getstate__-expanded"><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"> </tt>
<a name="Storage.__setstate__"></a><div id="Storage.__setstate__-def"><a name="L82"></a><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="Storage.__setstate__-toggle" onclick="return toggle('Storage.__setstate__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.__setstate__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.__setstate__-expanded"><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-3" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-3', 'k', 'link-3');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-4', 'items', 'link-4');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt id="link-5" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-5', 'k', 'link-3');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
</div><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"> </tt>
<a name="Storage.getlist"></a><div id="Storage.getlist-def"><a name="L86"></a><tt class="py-lineno"> 86</tt> <a class="py-toggle" href="#" id="Storage.getlist-toggle" onclick="return toggle('Storage.getlist');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.getlist-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.getlist-expanded"><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return a Storage value as a list.</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">        If the value is a list it will be returned as-is.</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">        If object is None, an empty list will be returned.</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">        Otherwise, [value] will be returned.</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring">        Example output for a query string of ?x=abc&amp;y=abc&amp;y=def</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request = Storage()</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars = Storage()</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.x = 'abc'</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.y = ['abc', 'def']</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getlist('x')</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">        ['abc']</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getlist('y')</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-docstring">        ['abc', 'def']</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getlist('z')</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-docstring">        []</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-6', 'get', 'link-6');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
</div><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"> </tt>
<a name="Storage.getfirst"></a><div id="Storage.getfirst-def"><a name="L113"></a><tt class="py-lineno">113</tt> <a class="py-toggle" href="#" id="Storage.getfirst-toggle" onclick="return toggle('Storage.getfirst');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.getfirst-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.getfirst-expanded"><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the first or only value when given a request.vars-style key.</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"><tt class="py-docstring">        If the value is a list, its first item will be returned;</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-docstring">        otherwise, the value will be returned as-is.</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">        Example output for a query string of ?x=abc&amp;y=abc&amp;y=def</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request = Storage()</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars = Storage()</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.x = 'abc'</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.y = ['abc', 'def']</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getfirst('x')</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"><tt class="py-docstring">        'abc'</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getfirst('y')</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">        'abc'</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getfirst('z')</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method web2py.gluon.storage.Storage.getlist()=web2py.gluon.storage.Storage-class.html#getlist"><a title="web2py.gluon.storage.Storage.getlist" class="py-name" href="#" onclick="return doclink('link-7', 'getlist', 'link-7');">getlist</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-8" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-8', 'len', 'link-1');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">value</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"> </tt>
<a name="Storage.getlast"></a><div id="Storage.getlast-def"><a name="L136"></a><tt class="py-lineno">136</tt> <a class="py-toggle" href="#" id="Storage.getlast-toggle" onclick="return toggle('Storage.getlast');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Storage.getlast-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Storage.getlast-expanded"><a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-docstring">"""Returns the last or only single value when given a request.vars-style key.</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">        If the value is a list, the last item will be returned;</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">        otherwise, the value will be returned as-is.</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"><tt class="py-docstring">        Simulated output with a query string of ?x=abc&amp;y=abc&amp;y=def</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request = Storage()</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars = Storage()</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.x = 'abc'</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.y = ['abc', 'def']</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getlast('x')</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"><tt class="py-docstring">        'abc'</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getlast('y')</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"><tt class="py-docstring">        'def'</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; request.vars.getlast('z')</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="web2py.gluon.storage.Storage.getlist" class="py-name" href="#" onclick="return doclink('link-9', 'getlist', 'link-7');">getlist</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-10" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-10', 'len', 'link-1');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">value</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div></div><a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"> </tt>
<a name="StorageList"></a><div id="StorageList-def"><a name="L159"></a><tt class="py-lineno">159</tt> <a class="py-toggle" href="#" id="StorageList-toggle" onclick="return toggle('StorageList');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.storage.StorageList-class.html">StorageList</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="StorageList-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="StorageList-expanded"><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-docstring">    like Storage but missing elements default to [] instead of None</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="StorageList.__getattr__"></a><div id="StorageList.__getattr__-def"><a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="StorageList.__getattr__-toggle" onclick="return toggle('StorageList.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.StorageList-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="StorageList.__getattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="StorageList.__getattr__-expanded"><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"> </tt>
<a name="load_storage"></a><div id="load_storage-def"><a name="L170"></a><tt class="py-lineno">170</tt> <a class="py-toggle" href="#" id="load_storage-toggle" onclick="return toggle('load_storage');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage-module.html#load_storage">load_storage</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="load_storage-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="load_storage-expanded"><a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">    <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">        <tt id="link-11" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-11', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Function web2py.gluon.portalocker.lock()=web2py.gluon.portalocker-module.html#lock"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-12', 'lock', 'link-12');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-13', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Variable web2py.gluon.portalocker.LOCK_EX=web2py.gluon.portalocker-module.html#LOCK_EX"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-14', 'LOCK_EX', 'link-14');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">        <tt id="link-15" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-15', 'storage', 'link-15');">storage</a></tt> <tt class="py-op">=</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-16', 'load', 'link-16');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt id="link-17" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-17', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Function web2py.gluon.portalocker.unlock()=web2py.gluon.portalocker-module.html#unlock"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-18', 'unlock', 'link-18');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-19', 'close', 'link-19');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-20" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-20', 'Storage', 'link-20');">Storage</a></tt><tt class="py-op">(</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-21', 'storage', 'link-15');">storage</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line"> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"> </tt>
<a name="save_storage"></a><div id="save_storage-def"><a name="L181"></a><tt class="py-lineno">181</tt> <a class="py-toggle" href="#" id="save_storage-toggle" onclick="return toggle('save_storage');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage-module.html#save_storage">save_storage</a><tt class="py-op">(</tt><tt class="py-param">storage</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="save_storage-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="save_storage-expanded"><a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">    <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt id="link-22" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-22', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-23', 'lock', 'link-12');">lock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-24', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="web2py.gluon.portalocker.LOCK_EX" class="py-name" href="#" onclick="return doclink('link-25', 'LOCK_EX', 'link-14');">LOCK_EX</a></tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">        <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dump</tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-26', 'storage', 'link-15');">storage</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt id="link-27" class="py-name"><a title="web2py.gluon.portalocker" class="py-name" href="#" onclick="return doclink('link-27', 'portalocker', 'link-0');">portalocker</a></tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="web2py.gluon.portalocker.unlock" class="py-name" href="#" onclick="return doclink('link-28', 'unlock', 'link-18');">unlock</a></tt><tt class="py-op">(</tt><tt class="py-name">fp</tt><tt class="py-op">)</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">    <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-29', 'close', 'link-19');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"> </tt>
<a name="Settings"></a><div id="Settings-def"><a name="L191"></a><tt class="py-lineno">191</tt> <a class="py-toggle" href="#" id="Settings-toggle" onclick="return toggle('Settings');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.storage.Settings-class.html">Settings</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Settings-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Settings-expanded"><a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"> </tt>
<a name="Settings.__setattr__"></a><div id="Settings.__setattr__-def"><a name="L193"></a><tt class="py-lineno">193</tt> <a class="py-toggle" href="#" id="Settings.__setattr__-toggle" onclick="return toggle('Settings.__setattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Settings-class.html#__setattr__">__setattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Settings.__setattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Settings.__setattr__-expanded"><a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-op">!=</tt> <tt class="py-string">'lock_keys'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-30', 'get', 'link-6');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'lock_keys'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt>\ </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">             <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'setting key \'%s\' does not exist'</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-op">!=</tt> <tt class="py-string">'lock_values'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-31', 'get', 'link-6');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'lock_values'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'setting value cannot be changed: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div></div><a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"> </tt>
<a name="Messages"></a><div id="Messages-def"><a name="L202"></a><tt class="py-lineno">202</tt> <a class="py-toggle" href="#" id="Messages-toggle" onclick="return toggle('Messages');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.storage.Messages-class.html">Messages</a><tt class="py-op">(</tt><tt class="py-base-class">Storage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Messages-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Messages-expanded"><a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"> </tt>
<a name="Messages.__init__"></a><div id="Messages.__init__-def"><a name="L204"></a><tt class="py-lineno">204</tt> <a class="py-toggle" href="#" id="Messages.__init__-toggle" onclick="return toggle('Messages.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Messages-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">T</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Messages.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Messages.__init__-expanded"><a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'T'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name" targets="Variable web2py.gluon.languages.lazyT.T=web2py.gluon.languages.lazyT-class.html#T"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-32', 'T', 'link-32');">T</a></tt> </tt>
</div><a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"> </tt>
<a name="Messages.__setattr__"></a><div id="Messages.__setattr__-def"><a name="L207"></a><tt class="py-lineno">207</tt> <a class="py-toggle" href="#" id="Messages.__setattr__-toggle" onclick="return toggle('Messages.__setattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Messages-class.html#__setattr__">__setattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Messages.__setattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Messages.__setattr__-expanded"><a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-op">!=</tt> <tt class="py-string">'lock_keys'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-33', 'get', 'link-6');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'lock_keys'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt>\ </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">             <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'setting key \'%s\' does not exist'</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-op">!=</tt> <tt class="py-string">'lock_values'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-34', 'get', 'link-6');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'lock_values'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">'setting value cannot be changed: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"> </tt>
<a name="Messages.__getattr__"></a><div id="Messages.__getattr__-def"><a name="L215"></a><tt class="py-lineno">215</tt> <a class="py-toggle" href="#" id="Messages.__getattr__-toggle" onclick="return toggle('Messages.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.storage.Messages-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Messages.__getattr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Messages.__getattr__-expanded"><a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'T'</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
</div></div><a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage.List-class.html version [2adef8ff7c].














































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage.List</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.storage-module.html">Module&nbsp;storage</a> ::
        Class&nbsp;List
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage.List-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class List</h1><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#List">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      list --+
             |
            <strong class="uidshort">List</strong>
</pre>

<hr />
Like a regular python list but a[i] if i is out of bounds return None 
  instead of IndexOutOfBounds<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>,
        <span class="summary-sig-arg">default</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#List.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>list</code></b>:
      <code>__add__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__delslice__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__iadd__</code>,
      <code>__imul__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__mul__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__repr__</code>,
      <code>__reversed__</code>,
      <code>__rmul__</code>,
      <code>__setitem__</code>,
      <code>__setslice__</code>,
      <code>append</code>,
      <code>count</code>,
      <code>extend</code>,
      <code>index</code>,
      <code>insert</code>,
      <code>pop</code>,
      <code>remove</code>,
      <code>reverse</code>,
      <code>sort</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage.Messages-class.html version [6479cfbe5f].






















































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage.Messages</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.storage-module.html">Module&nbsp;storage</a> ::
        Class&nbsp;Messages
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage.Messages-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Messages</h1><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
      dict --+    
             |    
       <a href="web2py.gluon.storage.Storage-class.html">Storage</a> --+
                 |
                <strong class="uidshort">Messages</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Messages-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">T</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Messages-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Messages-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">T</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
new empty dictionary

</pre></dd>
    <dt>Overrides:
      dict.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.storage.Storage-class.html#__setattr__">Storage.__setattr__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__getattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Qualification operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Messages.__getattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.storage.Storage-class.html#__getattr__">Storage.__getattr__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage.Settings-class.html version [ea231522f4].





























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage.Settings</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.storage-module.html">Module&nbsp;storage</a> ::
        Class&nbsp;Settings
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage.Settings-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Settings</h1><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Settings">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
      dict --+    
             |    
       <a href="web2py.gluon.storage.Storage-class.html">Storage</a> --+
                 |
                <strong class="uidshort">Settings</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Settings-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Settings.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getattr__">__getattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Settings.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.storage.Storage-class.html#__setattr__">Storage.__setattr__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage.Storage-class.html version [3ed9ef189a].



































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage.Storage</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.storage-module.html">Module&nbsp;storage</a> ::
        Class&nbsp;Storage
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage.Storage-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Storage</h1><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      dict --+
             |
            <strong class="uidshort">Storage</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.globals.Request-class.html">globals.Request</a>,
    <a href="web2py.gluon.globals.Response-class.html">globals.Response</a>,
    <a href="web2py.gluon.globals.Session-class.html">globals.Session</a>,
    <a href="web2py.gluon.storage.Messages-class.html">Messages</a>,
    <a href="web2py.gluon.storage.Settings-class.html">Settings</a>,
    <a href="web2py.gluon.storage.StorageList-class.html">StorageList</a>,
    <a href="web2py.gluon.restricted.TicketStorage-class.html">restricted.TicketStorage</a>
</dd></dl>

<hr />
A Storage object is like a dictionary except `obj.foo` can be used in 
  addition to `obj['foo']`.
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>o = Storage(a=1)
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> o.a
<span class="py-output">1</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>o[<span class="py-string">'a'</span>]
<span class="py-output">1</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>o.a = 2
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> o[<span class="py-string">'a'</span>]
<span class="py-output">2</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">del</span> o.a
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> o.a
<span class="py-output">None</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Storage-class.html#__delattr__" class="summary-sig-name">__delattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      x.__delattr__('name') &lt;==&gt; del x.name</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__delattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getstate__"></a><span class="summary-sig-name">__getstate__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__getstate__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Storage-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Storage-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      x.__setattr__('name', value) &lt;==&gt; x.name = value</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__setattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__setstate__"></a><span class="summary-sig-name">__setstate__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__setstate__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Storage-class.html#getfirst" class="summary-sig-name">getfirst</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      Return the first or only value when given a request.vars-style 
      key.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.getfirst">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Storage-class.html#getlast" class="summary-sig-name">getlast</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      Returns the last or only single value when given a 
      request.vars-style key.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.getlast">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.Storage-class.html#getlist" class="summary-sig-name">getlist</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      Return a Storage value as a list.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.getlist">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__delattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__delattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__delattr__('name') &lt;==&gt; del x.name
  <dl class="fields">
    <dt>Overrides:
      object.__delattr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      dict.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__setattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.__setattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__setattr__('name', value) &lt;==&gt; x.name = value
  <dl class="fields">
    <dt>Overrides:
      object.__setattr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="getfirst"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getfirst</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.getfirst">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Return the first or only value when given a request.vars-style 
  key.</p>
  <p>If the value is a list, its first item will be returned; otherwise, 
  the value will be returned as-is.</p>
  Example output for a query string of ?x=abc&amp;y=abc&amp;y=def 
  &gt;&gt;&gt; request = Storage() &gt;&gt;&gt; request.vars = Storage() 
  &gt;&gt;&gt; request.vars.x = 'abc' &gt;&gt;&gt; request.vars.y = ['abc',
  'def'] &gt;&gt;&gt; request.vars.getfirst('x') 'abc' &gt;&gt;&gt; 
  request.vars.getfirst('y') 'abc' &gt;&gt;&gt; 
  request.vars.getfirst('z')
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="getlast"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getlast</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.getlast">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Returns the last or only single value when given a request.vars-style 
  key.</p>
  <p>If the value is a list, the last item will be returned; otherwise, the
  value will be returned as-is.</p>
  Simulated output with a query string of ?x=abc&amp;y=abc&amp;y=def 
  &gt;&gt;&gt; request = Storage() &gt;&gt;&gt; request.vars = Storage() 
  &gt;&gt;&gt; request.vars.x = 'abc' &gt;&gt;&gt; request.vars.y = ['abc',
  'def'] &gt;&gt;&gt; request.vars.getlast('x') 'abc' &gt;&gt;&gt; 
  request.vars.getlast('y') 'def' &gt;&gt;&gt; 
  request.vars.getlast('z')
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="getlist"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getlist</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#Storage.getlist">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Return a Storage value as a list.</p>
  <p>If the value is a list it will be returned as-is. If object is None, 
  an empty list will be returned. Otherwise, [value] will be returned.</p>
  Example output for a query string of ?x=abc&amp;y=abc&amp;y=def 
  &gt;&gt;&gt; request = Storage() &gt;&gt;&gt; request.vars = Storage() 
  &gt;&gt;&gt; request.vars.x = 'abc' &gt;&gt;&gt; request.vars.y = ['abc',
  'def'] &gt;&gt;&gt; request.vars.getlist('x') ['abc'] &gt;&gt;&gt; 
  request.vars.getlist('y') ['abc', 'def'] &gt;&gt;&gt; 
  request.vars.getlist('z') []
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.storage.StorageList-class.html version [05265dd36e].






























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.storage.StorageList</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.storage-module.html">Module&nbsp;storage</a> ::
        Class&nbsp;StorageList
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.storage.StorageList-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class StorageList</h1><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#StorageList">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
      dict --+    
             |    
       <a href="web2py.gluon.storage.Storage-class.html">Storage</a> --+
                 |
                <strong class="uidshort">StorageList</strong>
</pre>

<hr />
like Storage but missing elements default to [] instead of None<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.storage.StorageList-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.storage-pysrc.html#StorageList.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.storage.Storage-class.html">Storage</a></code></b>:
      <code><a href="web2py.gluon.storage.Storage-class.html#__delattr__">__delattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__getstate__">__getstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setattr__">__setattr__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#__setstate__">__setstate__</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getfirst">getfirst</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlast">getlast</a></code>,
      <code><a href="web2py.gluon.storage.Storage-class.html#getlist">getlist</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>dict</code></b>:
      <code>__cmp__</code>,
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__eq__</code>,
      <code>__ge__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__gt__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__iter__</code>,
      <code>__le__</code>,
      <code>__len__</code>,
      <code>__lt__</code>,
      <code>__ne__</code>,
      <code>__new__</code>,
      <code>__setitem__</code>,
      <code>clear</code>,
      <code>copy</code>,
      <code>fromkeys</code>,
      <code>get</code>,
      <code>has_key</code>,
      <code>items</code>,
      <code>iteritems</code>,
      <code>iterkeys</code>,
      <code>itervalues</code>,
      <code>keys</code>,
      <code>pop</code>,
      <code>popitem</code>,
      <code>setdefault</code>,
      <code>update</code>,
      <code>values</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__getattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Qualification operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.storage-pysrc.html#StorageList.__getattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.storage.Storage-class.html#__getattr__">Storage.__getattr__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.streamer-module.html version [55c2cca87c].























































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.streamer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;streamer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.streamer-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module streamer</h1><span class="codelink"><a href="web2py.gluon.streamer-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="streamer"></a><span class="summary-sig-name">streamer</span>(<span class="summary-sig-arg">stream</span>,
        <span class="summary-sig-arg">chunk_size</span>=<span class="summary-sig-default">65536</span>,
        <span class="summary-sig-arg">bytes</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.streamer-pysrc.html#streamer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stream_file_or_304_or_206"></a><span class="summary-sig-name">stream_file_or_304_or_206</span>(<span class="summary-sig-arg">static_file</span>,
        <span class="summary-sig-arg">chunk_size</span>=<span class="summary-sig-default">65536</span>,
        <span class="summary-sig-arg">request</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">headers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.streamer-pysrc.html#stream_file_or_304_or_206">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_start_range"></a><span class="summary-name">regex_start_range</span> = <code title="re.compile(r'\d+(?=-)')">re.compile(r'\d<code class="re-op">+</code><code class="re-group">(?=</code>-<code class="re-group">)</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex_stop_range"></a><span class="summary-name">regex_stop_range</span> = <code title="re.compile(r'(?&lt;=-)\d+')">re.compile(r'<code class="re-group">(?&lt;=</code>-<code class="re-group">)</code>\d<code class="re-op">+</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_CHUNK_SIZE"></a><span class="summary-name">DEFAULT_CHUNK_SIZE</span> = <code title="65536">65536</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.streamer-pysrc.html version [ae3e5a2180].






















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.streamer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;streamer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.streamer-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.streamer-module.html">Module web2py.gluon.streamer</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">stat</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-0', 'time', 'link-0');">time</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">errno</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module web2py.gluon.rewrite=web2py.gluon.rewrite-module.html"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-1', 'rewrite', 'link-1');">rewrite</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.http=web2py.gluon.http-module.html"><a title="web2py.gluon.http" class="py-name" href="#" onclick="return doclink('link-2', 'http', 'link-2');">http</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-3', 'HTTP', 'link-3');">HTTP</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.contenttype=web2py.gluon.contenttype-module.html,Function web2py.gluon.contenttype.contenttype()=web2py.gluon.contenttype-module.html#contenttype"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-4', 'contenttype', 'link-4');">contenttype</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-5', 'contenttype', 'link-4');">contenttype</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable web2py.gluon.streamer.regex_start_range=web2py.gluon.streamer-module.html#regex_start_range"><a title="web2py.gluon.streamer.regex_start_range" class="py-name" href="#" onclick="return doclink('link-6', 'regex_start_range', 'link-6');">regex_start_range</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'\d+(?=\-)'</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable web2py.gluon.streamer.regex_stop_range=web2py.gluon.streamer-module.html#regex_stop_range"><a title="web2py.gluon.streamer.regex_stop_range" class="py-name" href="#" onclick="return doclink('link-7', 'regex_stop_range', 'link-7');">regex_stop_range</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'(?&lt;=\-)\d+'</tt><tt class="py-op">)</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable web2py.gluon.streamer.DEFAULT_CHUNK_SIZE=web2py.gluon.streamer-module.html#DEFAULT_CHUNK_SIZE"><a title="web2py.gluon.streamer.DEFAULT_CHUNK_SIZE" class="py-name" href="#" onclick="return doclink('link-8', 'DEFAULT_CHUNK_SIZE', 'link-8');">DEFAULT_CHUNK_SIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">64</tt><tt class="py-op">*</tt><tt class="py-number">1024</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="streamer"></a><div id="streamer-def"><a name="L25"></a><tt class="py-lineno"> 25</tt> <a class="py-toggle" href="#" id="streamer-toggle" onclick="return toggle('streamer');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.streamer-module.html#streamer">streamer</a><tt class="py-op">(</tt><tt class="py-param">stream</tt><tt class="py-op">,</tt> <tt class="py-param">chunk_size</tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="web2py.gluon.streamer.DEFAULT_CHUNK_SIZE" class="py-name" href="#" onclick="return doclink('link-9', 'DEFAULT_CHUNK_SIZE', 'link-8');">DEFAULT_CHUNK_SIZE</a></tt><tt class="py-op">,</tt> <tt class="py-param">bytes</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="streamer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="streamer-expanded"><a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">    <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-keyword">while</tt> <tt class="py-name">bytes</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">offset</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">bytes</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">bytes</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">bytes</tt> <tt class="py-op">-</tt> <tt class="py-name">offset</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">            <tt class="py-name">chunk_size</tt> <tt class="py-op">=</tt> <tt class="py-name">bytes</tt> <tt class="py-op">-</tt> <tt class="py-name">offset</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name" targets="Method web2py.gluon.globals.Response.stream()=web2py.gluon.globals.Response-class.html#stream"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-10', 'stream', 'link-10');">stream</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-11', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">        <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-12', 'len', 'link-12');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">length</tt><tt class="py-op">:</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">            <tt class="py-keyword">yield</tt> <tt class="py-name">data</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">            <tt class="py-keyword">break</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-name">offset</tt> <tt class="py-op">+=</tt> <tt class="py-name">length</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt id="link-13" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-13', 'stream', 'link-10');">stream</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-14', 'close', 'link-14');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"> </tt>
<a name="stream_file_or_304_or_206"></a><div id="stream_file_or_304_or_206-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="stream_file_or_304_or_206-toggle" onclick="return toggle('stream_file_or_304_or_206');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.streamer-module.html#stream_file_or_304_or_206">stream_file_or_304_or_206</a><tt class="py-op">(</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-param">static_file</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-param">chunk_size</tt> <tt class="py-op">=</tt> <tt id="link-15" class="py-name"><a title="web2py.gluon.streamer.DEFAULT_CHUNK_SIZE" class="py-name" href="#" onclick="return doclink('link-15', 'DEFAULT_CHUNK_SIZE', 'link-8');">DEFAULT_CHUNK_SIZE</a></tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-param">request</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-param">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-param">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="stream_file_or_304_or_206-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="stream_file_or_304_or_206-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name"><a title="web2py.gluon.rewrite" class="py-name" href="#" onclick="return doclink('link-16', 'rewrite', 'link-1');">rewrite</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-17', 'thread', 'link-17');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">routes</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-string">'invalid request'</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EISDIR</tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-18', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt> <tt class="py-name">error_message</tt><tt class="py-op">,</tt> <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'file is a directory'</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EACCES</tt><tt class="py-op">:</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-19', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt> <tt class="py-name">error_message</tt><tt class="py-op">,</tt> <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'inaccessible file'</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-20', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> <tt class="py-name">error_message</tt><tt class="py-op">,</tt> <tt class="py-name">web2py_error</tt><tt class="py-op">=</tt><tt class="py-string">'invalid file'</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-21', 'close', 'link-14');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">    <tt class="py-name">stat_file</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">stat</tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-name">fsize</tt> <tt class="py-op">=</tt> <tt class="py-name">stat_file</tt><tt class="py-op">[</tt><tt class="py-name">stat</tt><tt class="py-op">.</tt><tt class="py-name">ST_SIZE</tt><tt class="py-op">]</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">    <tt class="py-name">mtime</tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-22', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">'%a, %d %b %Y %H:%M:%S GMT'</tt><tt class="py-op">,</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">                          <tt id="link-23" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-23', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">gmtime</tt><tt class="py-op">(</tt><tt class="py-name">stat_file</tt><tt class="py-op">[</tt><tt class="py-name">stat</tt><tt class="py-op">.</tt><tt class="py-name">ST_MTIME</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-24', 'contenttype', 'link-4');">contenttype</a></tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Last-Modified'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">mtime</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Pragma'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'cache'</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Cache-Control'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'private'</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-25', 'env', 'link-25');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_if_modified_since</tt> <tt class="py-op">==</tt> <tt class="py-name">mtime</tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-26" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-26', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">304</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-op">{</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">:</tt> <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-27', 'env', 'link-25');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_range</tt><tt class="py-op">:</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-name">start_items</tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.streamer.regex_start_range" class="py-name" href="#" onclick="return doclink('link-28', 'regex_start_range', 'link-6');">regex_start_range</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-29', 'env', 'link-25');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_range</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">start_items</tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">            <tt class="py-name">start_items</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-name">stop_items</tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="web2py.gluon.streamer.regex_stop_range" class="py-name" href="#" onclick="return doclink('link-30', 'regex_stop_range', 'link-7');">regex_stop_range</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-31', 'env', 'link-25');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_range</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">stop_items</tt> <tt class="py-keyword">or</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">stop_items</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">fsize</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">            <tt class="py-name">stop_items</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">fsize</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">part</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">start_items</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">stop_items</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">fsize</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-name">part</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">-</tt> <tt class="py-name">part</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt id="link-32" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-32', 'stream', 'link-10');">stream</a></tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EISDIR</tt><tt class="py-op">,</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EACCES</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-33" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-33', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-34" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-34', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt id="link-35" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-35', 'stream', 'link-10');">stream</a></tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-name">part</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Range'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'bytes %i-%i/%i'</tt> <tt class="py-op">%</tt> <tt class="py-name">part</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'%i'</tt> <tt class="py-op">%</tt> <tt class="py-name">bytes</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-number">206</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt id="link-36" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-36', 'stream', 'link-10');">stream</a></tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">static_file</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EISDIR</tt><tt class="py-op">,</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EACCES</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-37" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-37', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-38" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-38', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">fsize</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-number">200</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">request</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-39', 'env', 'link-25');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_use_wsgi_file_wrapper</tt><tt class="py-op">:</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-name">wrapped</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-40', 'env', 'link-25');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">wsgi_file_wrapper</tt><tt class="py-op">(</tt><tt id="link-41" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-41', 'stream', 'link-10');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-name">wrapped</tt> <tt class="py-op">=</tt> <tt id="link-42" class="py-name" targets="Module web2py.gluon.streamer=web2py.gluon.streamer-module.html,Function web2py.gluon.streamer.streamer()=web2py.gluon.streamer-module.html#streamer"><a title="web2py.gluon.streamer
web2py.gluon.streamer.streamer" class="py-name" href="#" onclick="return doclink('link-42', 'streamer', 'link-42');">streamer</a></tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-43', 'stream', 'link-10');">stream</a></tt><tt class="py-op">,</tt> <tt class="py-name">chunk_size</tt><tt class="py-op">=</tt><tt class="py-name">chunk_size</tt><tt class="py-op">,</tt> <tt class="py-name">bytes</tt><tt class="py-op">=</tt><tt class="py-name">bytes</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">    <tt class="py-keyword">raise</tt> <tt id="link-44" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-44', 'HTTP', 'link-3');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">wrapped</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
</div><a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template-module.html version [506ca3853b].

















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;template
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module template</h1><span class="codelink"><a href="web2py.gluon.template-pysrc.html">source&nbsp;code</a></span><br /><br />
<pre class="literalblock">

This file is part of the web2py Web Framework (Copyrighted, 2007-2011).
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Author: Thadeus Burgess

Contributors:

- Thank you to Massimo Di Pierro for creating the original gluon/template.py
- Thank you to Jonathan Lundell for extensively testing the regex on Jython.
- Thank you to Limodou (creater of uliweb) who inspired the block-element support for web2py.

</pre><br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.Node-class.html" class="summary-name">Node</a><br />
      Basic Container Object
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.SuperNode-class.html" class="summary-name">SuperNode</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.BlockNode-class.html" class="summary-name">BlockNode</a><br />
      Block Container.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.Content-class.html" class="summary-name">Content</a><br />
      Parent Container -- Used as the root level BlockNode.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.TemplateParser-class.html" class="summary-name">TemplateParser</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parse_template"></a><span class="summary-sig-name">parse_template</span>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">views/</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">context</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">lexers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">delimiters</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">{{</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">}}</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span><br />
      filename can be a view filename in the views folder or an input 
      stream path is the path of a views folder context is a dictionary of 
      symbols used to render the template</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#parse_template">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template-module.html#get_parsed" class="summary-sig-name">get_parsed</a>(<span class="summary-sig-arg">text</span>)</span><br />
      Returns the indented python code of text.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#get_parsed">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="render"></a><span class="summary-sig-name">render</span>(<span class="summary-sig-arg">content</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">hello world</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">stream</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">context</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">lexers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">delimiters</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">{{</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">}}</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#render">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="get_parsed"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_parsed</span>(<span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#get_parsed">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Returns the indented python code of text. Useful for unit testing.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template-pysrc.html version [250231be3f].



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;template
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.template-module.html">Module web2py.gluon.template</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework (Copyrighted, 2007-2011).</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">Author: Thadeus Burgess</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">Contributors:</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">- Thank you to Massimo Di Pierro for creating the original gluon/template.py</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">- Thank you to Jonathan Lundell for extensively testing the regex on Jython.</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">- Thank you to Limodou (creater of uliweb) who inspired the block-element support for web2py.</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cgi</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module web2py.gluon.restricted=web2py.gluon.restricted-module.html,Function web2py.gluon.restricted.restricted()=web2py.gluon.restricted-module.html#restricted"><a title="web2py.gluon.restricted
web2py.gluon.restricted.restricted" class="py-name" href="#" onclick="return doclink('link-0', 'restricted', 'link-0');">restricted</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class web2py.gluon.restricted.RestrictedError=web2py.gluon.restricted.RestrictedError-class.html"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-1', 'RestrictedError', 'link-1');">RestrictedError</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="RestrictedError"></a><div id="RestrictedError-def"><a name="L25"></a><tt class="py-lineno"> 25</tt> <a class="py-toggle" href="#" id="RestrictedError-toggle" onclick="return toggle('RestrictedError');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template-module.html#RestrictedError">RestrictedError</a><tt class="py-op">(</tt><tt class="py-param">a</tt><tt class="py-op">,</tt><tt class="py-param">b</tt><tt class="py-op">,</tt><tt class="py-param">c</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RestrictedError-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RestrictedError-expanded"><a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2', 'error', 'link-2');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">':'</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-3" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-3', 'b', 'link-3');">b</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">':'</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">RuntimeError</tt> </tt>
</div><a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="Node"></a><div id="Node-def"><a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="Node-toggle" onclick="return toggle('Node');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.template.Node-class.html">Node</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Node-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Node-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">    Basic Container Object</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="Node.__init__"></a><div id="Node.__init__-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="Node.__init__-toggle" onclick="return toggle('Node.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Node-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Node.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Node.__init__-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt> </tt>
</div><a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
<a name="Node.__str__"></a><div id="Node.__str__-def"><a name="L37"></a><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="Node.__str__-toggle" onclick="return toggle('Node.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Node-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Node.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Node.__str__-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="SuperNode"></a><div id="SuperNode-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="SuperNode-toggle" onclick="return toggle('SuperNode');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.template.SuperNode-class.html">SuperNode</a><tt class="py-op">(</tt><tt class="py-base-class">Node</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SuperNode-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="SuperNode-expanded"><a name="SuperNode.__init__"></a><div id="SuperNode.__init__-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="SuperNode.__init__-toggle" onclick="return toggle('SuperNode.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.SuperNode-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SuperNode.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SuperNode.__init__-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-4', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-5', 'name', 'link-4');">name</a></tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt> </tt>
</div><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"> </tt>
<a name="SuperNode.__str__"></a><div id="SuperNode.__str__-def"><a name="L46"></a><tt class="py-lineno"> 46</tt> <a class="py-toggle" href="#" id="SuperNode.__str__-toggle" onclick="return toggle('SuperNode.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.SuperNode-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SuperNode.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SuperNode.__str__-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">(</tt><tt class="py-string">"Undefined parent block ``%s``. \n"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-6', 'name', 'link-4');">name</a></tt> <tt class="py-op">+</tt> \ </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-string">"You must define a block before referencing it.\nMake sure you have not left out an ``{{end}}`` tag."</tt> <tt class="py-op">)</tt> </tt>
</div><a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"> </tt>
<a name="SuperNode.__repr__"></a><div id="SuperNode.__repr__-def"><a name="L53"></a><tt class="py-lineno"> 53</tt> <a class="py-toggle" href="#" id="SuperNode.__repr__-toggle" onclick="return toggle('SuperNode.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.SuperNode-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SuperNode.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SuperNode.__repr__-expanded"><a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"%s-&gt;%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-7', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"> </tt>
<a name="BlockNode"></a><div id="BlockNode-def"><a name="L56"></a><tt class="py-lineno"> 56</tt> <a class="py-toggle" href="#" id="BlockNode-toggle" onclick="return toggle('BlockNode');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html">BlockNode</a><tt class="py-op">(</tt><tt class="py-base-class">Node</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="BlockNode-expanded"><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-docstring">    Block Container.</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">    This Node can contain other Nodes and will render in a hierarchical order</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">    of when nodes were added.</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">    ie::</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-docstring">        {{ block test }}</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-docstring">            This is default block test</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-docstring">        {{ end }}</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="BlockNode.__init__"></a><div id="BlockNode.__init__-def"><a name="L69"></a><tt class="py-lineno"> 69</tt> <a class="py-toggle" href="#" id="BlockNode.__init__-toggle" onclick="return toggle('BlockNode.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'{{'</tt><tt class="py-op">,</tt><tt class="py-string">'}}'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BlockNode.__init__-expanded"><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">        name - Name of this Node.</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-8', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-9', 'name', 'link-4');">name</a></tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">right</tt> <tt class="py-op">=</tt> <tt class="py-name">delimiters</tt> </tt>
</div><a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"> </tt>
<a name="BlockNode.__repr__"></a><div id="BlockNode.__repr__-def"><a name="L78"></a><tt class="py-lineno"> 78</tt> <a class="py-toggle" href="#" id="BlockNode.__repr__-toggle" onclick="return toggle('BlockNode.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BlockNode.__repr__-expanded"><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'%sblock %s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">left</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-10', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">right</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">:</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">            <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-11', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-12', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">'%send%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">right</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-13', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
</div><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="BlockNode.__str__"></a><div id="BlockNode.__str__-def"><a name="L85"></a><tt class="py-lineno"> 85</tt> <a class="py-toggle" href="#" id="BlockNode.__str__-toggle" onclick="return toggle('BlockNode.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BlockNode.__str__-expanded"><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-docstring">        Get this BlockNodes content, not including child Nodes</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class web2py.gluon.template.BlockNode=web2py.gluon.template.BlockNode-class.html"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-14', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-15', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-16', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
</div><a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="BlockNode.append"></a><div id="BlockNode.append-def"><a name="L95"></a><tt class="py-lineno"> 95</tt> <a class="py-toggle" href="#" id="BlockNode.append-toggle" onclick="return toggle('BlockNode.append');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html#append">append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">node</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode.append-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BlockNode.append-expanded"><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">        Add an element to the nodes.</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword Arguments</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-docstring">        - node -- Node object or string to append.</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Class web2py.gluon.template.Node=web2py.gluon.template.Node-class.html"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-17', 'Node', 'link-17');">Node</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-18', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Invalid type; must be instance of ``str`` or ``BlockNode``. %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
</div><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"> </tt>
<a name="BlockNode.extend"></a><div id="BlockNode.extend-def"><a name="L108"></a><tt class="py-lineno">108</tt> <a class="py-toggle" href="#" id="BlockNode.extend-toggle" onclick="return toggle('BlockNode.extend');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html#extend">extend</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode.extend-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BlockNode.extend-expanded"><a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"><tt class="py-docstring">        Extend the list of nodes with another BlockNode class.</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword Arguments</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring">        - other -- BlockNode or Content object to extend from.</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-19', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method web2py.gluon.template.BlockNode.extend()=web2py.gluon.template.BlockNode-class.html#extend,Method web2py.gluon.template.Content.extend()=web2py.gluon.template.Content-class.html#extend,Method web2py.gluon.template.TemplateParser.extend()=web2py.gluon.template.TemplateParser-class.html#extend"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-20', 'extend', 'link-20');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Invalid type; must be instance of ``BlockNode``. %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
</div><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"> </tt>
<a name="BlockNode.output"></a><div id="BlockNode.output-def"><a name="L121"></a><tt class="py-lineno">121</tt> <a class="py-toggle" href="#" id="BlockNode.output-toggle" onclick="return toggle('BlockNode.output');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.BlockNode-class.html#output">output</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">blocks</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BlockNode.output-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BlockNode.output-expanded"><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-docstring">        Merges all nodes into a single string.</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"><tt class="py-docstring">        blocks -- Dictionary of blocks that are extending</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"><tt class="py-docstring">        from this template.</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">        <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-comment"># Get each of our nodes</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">            <tt class="py-comment"># If we have a block level node.</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-21', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                <tt class="py-comment"># If we can override this block.</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-22', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">blocks</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">                    <tt class="py-comment"># Override block from vars.</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-23', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">blocks</tt><tt class="py-op">[</tt><tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-24', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method web2py.gluon.template.BlockNode.output()=web2py.gluon.template.BlockNode-class.html#output"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-25', 'output', 'link-25');">output</a></tt><tt class="py-op">(</tt><tt class="py-name">blocks</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">                <tt class="py-comment"># Else we take the default</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">                    <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-26', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-27', 'output', 'link-25');">output</a></tt><tt class="py-op">(</tt><tt class="py-name">blocks</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">            <tt class="py-comment"># Else its just a string</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">                <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-28', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-comment"># Now combine all of our lines together.</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-29', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"> </tt>
<a name="Content"></a><div id="Content-def"><a name="L146"></a><tt class="py-lineno">146</tt> <a class="py-toggle" href="#" id="Content-toggle" onclick="return toggle('Content');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html">Content</a><tt class="py-op">(</tt><tt class="py-base-class">BlockNode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Content-expanded"><a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"><tt class="py-docstring">    Parent Container -- Used as the root level BlockNode.</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"><tt class="py-docstring">    Contains functions that operate as such.</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="Content.__init__"></a><div id="Content.__init__-def"><a name="L152"></a><tt class="py-lineno">152</tt> <a class="py-toggle" href="#" id="Content.__init__-toggle" onclick="return toggle('Content.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt> <tt class="py-op">=</tt> <tt class="py-string">"ContentBlock"</tt><tt class="py-op">,</tt> <tt class="py-param">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content.__init__-expanded"><a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword Arguments</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"><tt class="py-docstring">        name -- Unique name for this BlockNode</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-30', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-31', 'name', 'link-4');">name</a></tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt> </tt>
</div><a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="Content.__str__"></a><div id="Content.__str__-def"><a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="Content.__str__-toggle" onclick="return toggle('Content.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content.__str__-expanded"><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">        <tt class="py-comment"># For each of our nodes</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">:</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">            <tt class="py-comment"># If it is a block node.</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-32', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">                <tt class="py-comment"># And the node has a name that corresponds with a block in us</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-33', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">:</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">                    <tt class="py-comment"># Use the overriding output.</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-34', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">[</tt><tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-35', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-36', 'output', 'link-25');">output</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                    <tt class="py-comment"># Otherwise we just use the nodes output.</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-37', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.template.BlockNode.output" class="py-name" href="#" onclick="return doclink('link-38', 'output', 'link-25');">output</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">                <tt class="py-comment"># It is just a string, so include it.</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-39', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-comment"># Merge our list together.</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-40', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
</div><a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"> </tt>
<a name="Content._insert"></a><div id="Content._insert-def"><a name="L182"></a><tt class="py-lineno">182</tt> <a class="py-toggle" href="#" id="Content._insert-toggle" onclick="return toggle('Content._insert');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#_insert">_insert</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">,</tt> <tt class="py-param">index</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content._insert-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content._insert-expanded"><a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"><tt class="py-docstring">        Inserts object at index.</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-41', 'Node', 'link-17');">Node</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-42', 'insert', 'link-42');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">index</tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Invalid type, must be instance of ``str`` or ``Node``."</tt><tt class="py-op">)</tt> </tt>
</div><a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"> </tt>
<a name="Content.insert"></a><div id="Content.insert-def"><a name="L191"></a><tt class="py-lineno">191</tt> <a class="py-toggle" href="#" id="Content.insert-toggle" onclick="return toggle('Content.insert');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#insert">insert</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">,</tt> <tt class="py-param">index</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content.insert-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content.insert-expanded"><a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"><tt class="py-docstring">        Inserts object at index.</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-docstring">        You may pass a list of objects and have them inserted.</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">            <tt class="py-comment"># Must reverse so the order stays the same.</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">reverse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">other</tt><tt class="py-op">:</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter._insert()=web2py.gluon.dal.BaseAdapter-class.html#_insert,Method web2py.gluon.dal.NoSQLAdapter._insert()=web2py.gluon.dal.NoSQLAdapter-class.html#_insert,Method web2py.gluon.dal.Table._insert()=web2py.gluon.dal.Table-class.html#_insert,Method web2py.gluon.template.Content._insert()=web2py.gluon.template.Content-class.html#_insert"><a title="web2py.gluon.dal.BaseAdapter._insert
web2py.gluon.dal.NoSQLAdapter._insert
web2py.gluon.dal.Table._insert
web2py.gluon.template.Content._insert" class="py-name" href="#" onclick="return doclink('link-43', '_insert', 'link-43');">_insert</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-name">index</tt><tt class="py-op">)</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="web2py.gluon.dal.BaseAdapter._insert
web2py.gluon.dal.NoSQLAdapter._insert
web2py.gluon.dal.Table._insert
web2py.gluon.template.Content._insert" class="py-name" href="#" onclick="return doclink('link-44', '_insert', 'link-43');">_insert</a></tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">index</tt><tt class="py-op">)</tt> </tt>
</div><a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"> </tt>
<a name="Content.append"></a><div id="Content.append-def"><a name="L205"></a><tt class="py-lineno">205</tt> <a class="py-toggle" href="#" id="Content.append-toggle" onclick="return toggle('Content.append');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#append">append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">node</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content.append-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content.append-expanded"><a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"><tt class="py-docstring">        Adds a node to list. If it is a BlockNode then we assign a block for it.</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-45" class="py-name"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-45', 'Node', 'link-17');">Node</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-46', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-47" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-47', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">[</tt><tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-48', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">node</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Invalid type, must be instance of ``str`` or ``BlockNode``. %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
</div><a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"> </tt>
<a name="Content.extend"></a><div id="Content.extend-def"><a name="L216"></a><tt class="py-lineno">216</tt> <a class="py-toggle" href="#" id="Content.extend-toggle" onclick="return toggle('Content.extend');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#extend">extend</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content.extend-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content.extend-expanded"><a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-docstring">        Extends the objects list of nodes with another objects nodes</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt id="link-49" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-49', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-50', 'extend', 'link-20');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-51', 'update', 'link-51');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Invalid type; must be instance of ``BlockNode``. %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">other</tt><tt class="py-op">)</tt> </tt>
</div><a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"> </tt>
<a name="Content.clear_content"></a><div id="Content.clear_content-def"><a name="L226"></a><tt class="py-lineno">226</tt> <a class="py-toggle" href="#" id="Content.clear_content-toggle" onclick="return toggle('Content.clear_content');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.Content-class.html#clear_content">clear_content</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Content.clear_content-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Content.clear_content-expanded"><a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser"></a><div id="TemplateParser-def"><a name="L229"></a><tt class="py-lineno">229</tt> <a class="py-toggle" href="#" id="TemplateParser-toggle" onclick="return toggle('TemplateParser');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html">TemplateParser</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TemplateParser-expanded"><a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">    <tt id="link-52" class="py-name" targets="Variable web2py.gluon.template.TemplateParser.r_tag=web2py.gluon.template.TemplateParser-class.html#r_tag"><a title="web2py.gluon.template.TemplateParser.r_tag" class="py-name" href="#" onclick="return doclink('link-52', 'r_tag', 'link-52');">r_tag</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(\{\{.*?\}\})'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line"> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">    <tt id="link-53" class="py-name" targets="Variable web2py.gluon.template.TemplateParser.r_multiline=web2py.gluon.template.TemplateParser-class.html#r_multiline"><a title="web2py.gluon.template.TemplateParser.r_multiline" class="py-name" href="#" onclick="return doclink('link-53', 'r_multiline', 'link-53');">r_multiline</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(""".*?""")|(\'\'\'.*?\'\'\')'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">    <tt class="py-comment"># These are used for re-indentation.</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># Indent + 1</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-54" class="py-name" targets="Variable web2py.gluon.template.TemplateParser.re_block=web2py.gluon.template.TemplateParser-class.html#re_block"><a title="web2py.gluon.template.TemplateParser.re_block" class="py-name" href="#" onclick="return doclink('link-54', 're_block', 'link-54');">re_block</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^(elif |else:|except:|except |finally:).*$'</tt><tt class="py-op">,</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">                      <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">    <tt class="py-comment"># Indent - 1</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-55" class="py-name" targets="Variable web2py.gluon.template.TemplateParser.re_unblock=web2py.gluon.template.TemplateParser-class.html#re_unblock"><a title="web2py.gluon.template.TemplateParser.re_unblock" class="py-name" href="#" onclick="return doclink('link-55', 're_unblock', 'link-55');">re_unblock</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^(return|continue|break|raise)( .*)?$'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">    <tt class="py-comment"># Indent - 1</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt id="link-56" class="py-name" targets="Variable web2py.gluon.template.TemplateParser.re_pass=web2py.gluon.template.TemplateParser-class.html#re_pass"><a title="web2py.gluon.template.TemplateParser.re_pass" class="py-name" href="#" onclick="return doclink('link-56', 're_pass', 'link-56');">re_pass</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^pass( .*)?$'</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.__init__"></a><div id="TemplateParser.__init__-def"><a name="L244"></a><tt class="py-lineno">244</tt> <a class="py-toggle" href="#" id="TemplateParser.__init__-toggle" onclick="return toggle('TemplateParser.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">,</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">                 <tt class="py-param">name</tt>    <tt class="py-op">=</tt> <tt class="py-string">"ParserContainer"</tt><tt class="py-op">,</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">                 <tt class="py-param">context</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">                 <tt class="py-param">path</tt>    <tt class="py-op">=</tt> <tt class="py-string">'views/'</tt><tt class="py-op">,</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">                 <tt class="py-param">writer</tt>  <tt class="py-op">=</tt> <tt class="py-string">'response.write'</tt><tt class="py-op">,</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">                 <tt class="py-param">lexers</tt>  <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">                 <tt class="py-param">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'{{'</tt><tt class="py-op">,</tt><tt class="py-string">'}}'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">                 <tt class="py-param">_super_nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">                 <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.__init__-expanded"><a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line"><tt class="py-docstring">        text -- text to parse</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"><tt class="py-docstring">        context -- context to parse in</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line"><tt class="py-docstring">        path -- folder path to templates</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"><tt class="py-docstring">        writer -- string of writer class to use</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line"><tt class="py-docstring">        lexers -- dict of custom lexers to use.</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line"><tt class="py-docstring">        delimiters -- for example ('{{','}}')</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"><tt class="py-docstring">        _super_nodes -- a list of nodes to check for inclusion</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"><tt class="py-docstring">                        this should only be set by "self.extend"</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"><tt class="py-docstring">                        It contains a list of SuperNodes from a child</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line"><tt class="py-docstring">                        template that need to be handled.</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">        <tt class="py-comment"># Keep a root level name.</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-57', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-58" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-58', 'name', 'link-4');">name</a></tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">        <tt class="py-comment"># Raw text to start parsing.</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">        <tt class="py-comment"># Writer to use (refer to the default for an example).</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># This will end up as</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># "%s(%s, escape=False)" % (self.writer, value)</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt> <tt class="py-op">=</tt> <tt class="py-name">writer</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line"> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">        <tt class="py-comment"># Dictionary of custom name lexers to use.</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">lexers</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lexers</tt> <tt class="py-op">=</tt> <tt class="py-name">lexers</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lexers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">        <tt class="py-comment"># Path of templates</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">path</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt class="py-comment"># Context for templates.</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt class="py-name">context</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line"> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-comment"># allow optional alternative delimiters</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-name">delimiters</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">delimiters</tt><tt class="py-op">!=</tt><tt class="py-op">(</tt><tt class="py-string">'{{'</tt><tt class="py-op">,</tt><tt class="py-string">'}}'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">            <tt class="py-name">escaped_delimiters</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">delimiters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">delimiters</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.template.TemplateParser.r_tag" class="py-name" href="#" onclick="return doclink('link-59', 'r_tag', 'link-52');">r_tag</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'(%s.*?%s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">escaped_delimiters</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">DOTALL</tt><tt class="py-op">)</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line"> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line"> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">        <tt class="py-comment"># Create a root level Content that everything will go into.</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name" targets="Class web2py.gluon.template.Content=web2py.gluon.template.Content-class.html"><a title="web2py.gluon.template.Content" class="py-name" href="#" onclick="return doclink('link-60', 'Content', 'link-60');">Content</a></tt><tt class="py-op">(</tt><tt id="link-61" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-61', 'name', 'link-4');">name</a></tt><tt class="py-op">=</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-62', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line"> </tt>
<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-comment"># Stack will hold our current stack of nodes.</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># As we descend into a node, it will be added to the stack</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># And when we leave, it will be removed from the stack.</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># self.content should stay on the stack at all times.</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stack</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">]</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line"> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">        <tt class="py-comment"># This variable will hold a reference to every super block</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># that we come across in this template.</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">super_nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line"> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">        <tt class="py-comment"># This variable will hold a reference to the child</tt> </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># super nodes that need handling.</tt> </tt>
<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">child_super_nodes</tt> <tt class="py-op">=</tt> <tt class="py-name">_super_nodes</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt class="py-comment"># This variable will hold a reference to every block</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># that we come across in this template</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">        <tt class="py-comment"># Begin parsing.</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.parse()=web2py.gluon.dal.BaseAdapter-class.html#parse,Method web2py.gluon.template.TemplateParser.parse()=web2py.gluon.template.TemplateParser-class.html#parse"><a title="web2py.gluon.dal.BaseAdapter.parse
web2py.gluon.template.TemplateParser.parse" class="py-name" href="#" onclick="return doclink('link-63', 'parse', 'link-63');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
</div><a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.to_string"></a><div id="TemplateParser.to_string-def"><a name="L317"></a><tt class="py-lineno">317</tt> <a class="py-toggle" href="#" id="TemplateParser.to_string-toggle" onclick="return toggle('TemplateParser.to_string');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#to_string">to_string</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.to_string-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.to_string-expanded"><a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line"><tt class="py-docstring">        Return the parsed template with correct indentation.</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line"><tt class="py-docstring">        Used to make it easier to port to python3.</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Method web2py.gluon.template.TemplateParser.reindent()=web2py.gluon.template.TemplateParser-class.html#reindent"><a title="web2py.gluon.template.TemplateParser.reindent" class="py-name" href="#" onclick="return doclink('link-64', 'reindent', 'link-64');">reindent</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.__str__"></a><div id="TemplateParser.__str__-def"><a name="L325"></a><tt class="py-lineno">325</tt> <a class="py-toggle" href="#" id="TemplateParser.__str__-toggle" onclick="return toggle('TemplateParser.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.__str__-expanded"><a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">        <tt class="py-docstring">"Make sure str works exactly the same as python 3"</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Method web2py.gluon.template.TemplateParser.to_string()=web2py.gluon.template.TemplateParser-class.html#to_string"><a title="web2py.gluon.template.TemplateParser.to_string" class="py-name" href="#" onclick="return doclink('link-65', 'to_string', 'link-65');">to_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.__unicode__"></a><div id="TemplateParser.__unicode__-def"><a name="L329"></a><tt class="py-lineno">329</tt> <a class="py-toggle" href="#" id="TemplateParser.__unicode__-toggle" onclick="return toggle('TemplateParser.__unicode__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#__unicode__">__unicode__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.__unicode__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.__unicode__-expanded"><a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">        <tt class="py-docstring">"Make sure str works exactly the same as python 3"</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.template.TemplateParser.to_string" class="py-name" href="#" onclick="return doclink('link-66', 'to_string', 'link-65');">to_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.reindent"></a><div id="TemplateParser.reindent-def"><a name="L333"></a><tt class="py-lineno">333</tt> <a class="py-toggle" href="#" id="TemplateParser.reindent-toggle" onclick="return toggle('TemplateParser.reindent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#reindent">reindent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.reindent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.reindent-expanded"><a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line"><tt class="py-docstring">        Reindents a string of unindented python code.</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">        <tt class="py-comment"># Get each of our lines into an array.</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">        <tt class="py-comment"># Our new lines</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">new_lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line"> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">        <tt class="py-comment"># Keeps track of how many indents we have.</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># Used for when we need to drop a level of indentation</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># only to reindent on the next line.</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">credit</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line"> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">        <tt class="py-comment"># Current indentation</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-67" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-67', 'k', 'link-67');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line"> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">        <tt class="py-comment">#################</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># THINGS TO KNOW</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#################</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">        <tt class="py-comment"># k += 1 means indent</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># k -= 1 means unindent</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># credit = 1 means unindent on the next line.</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">raw_line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">lines</tt><tt class="py-op">:</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">            <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">raw_line</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-68', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line"> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">            <tt class="py-comment"># ignore empty lines</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">line</tt><tt class="py-op">:</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line"> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">            <tt class="py-comment"># If we have a line that contains python code that</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># should be unindented for this line of code.</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># and then reindented for the next line.</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt id="link-69" class="py-name" targets="Class web2py.gluon.template.TemplateParser=web2py.gluon.template.TemplateParser-class.html"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-69', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.template.TemplateParser.re_block" class="py-name" href="#" onclick="return doclink('link-70', 're_block', 'link-54');">re_block</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">                <tt id="link-71" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-71', 'k', 'link-67');">k</a></tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-72', 'k', 'link-67');">k</a></tt> <tt class="py-op">+</tt> <tt class="py-name">credit</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line"> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">            <tt class="py-comment"># We obviously can't have a negative indentation</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt id="link-73" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-73', 'k', 'link-67');">k</a></tt> <tt class="py-op">=</tt> <tt id="link-74" class="py-name" targets="Variable datetime.date.max=datetime.date-class.html#max,Variable datetime.datetime.max=datetime.datetime-class.html#max,Variable datetime.time.max=datetime.time-class.html#max,Method web2py.gluon.dal.Expression.max()=web2py.gluon.dal.Expression-class.html#max"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-74', 'max', 'link-74');">max</a></tt><tt class="py-op">(</tt><tt id="link-75" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-75', 'k', 'link-67');">k</a></tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line"> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">            <tt class="py-comment"># Add the indentation!</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">new_lines</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-76', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">*</tt><tt id="link-77" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-77', 'k', 'link-67');">k</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line"> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line">            <tt class="py-comment"># Bank account back to 0 again :(</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">credit</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line"> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">            <tt class="py-comment"># If we are a pass block, we obviously de-dent.</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt id="link-78" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-78', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="web2py.gluon.template.TemplateParser.re_pass" class="py-name" href="#" onclick="return doclink('link-79', 're_pass', 'link-56');">re_pass</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">                <tt id="link-80" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-80', 'k', 'link-67');">k</a></tt> <tt class="py-op">-=</tt> <tt class="py-number">1</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line"> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">            <tt class="py-comment"># If we are any of the following, de-dent.</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># However, we should stay on the same level</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># But the line right after us will be de-dented.</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># So we add one credit to keep us at the level</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># while moving back one indentation level.</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt id="link-81" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-81', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.template.TemplateParser.re_unblock" class="py-name" href="#" onclick="return doclink('link-82', 're_unblock', 'link-55');">re_unblock</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">                <tt class="py-name">credit</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">                <tt id="link-83" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-83', 'k', 'link-67');">k</a></tt> <tt class="py-op">-=</tt> <tt class="py-number">1</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line"> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">            <tt class="py-comment"># If we are an if statement, a try, or a semi-colon we</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># probably need to indent the next line.</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-84', 'endswith', 'link-84');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-85', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'#'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">                <tt id="link-86" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-86', 'k', 'link-67');">k</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line"> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">        <tt class="py-comment"># This must come before so that we can raise an error with the</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># right content.</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">new_text</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-87', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">new_lines</tt><tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line"> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-88" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-88', 'k', 'link-67');">k</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name" targets="Method web2py.gluon.template.TemplateParser._raise_error()=web2py.gluon.template.TemplateParser-class.html#_raise_error"><a title="web2py.gluon.template.TemplateParser._raise_error" class="py-name" href="#" onclick="return doclink('link-89', '_raise_error', 'link-89');">_raise_error</a></tt><tt class="py-op">(</tt><tt class="py-string">'missing "pass" in view'</tt><tt class="py-op">,</tt> <tt class="py-name">new_text</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-90" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-90', 'k', 'link-67');">k</a></tt> <tt class="py-op">&lt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.template.TemplateParser._raise_error" class="py-name" href="#" onclick="return doclink('link-91', '_raise_error', 'link-89');">_raise_error</a></tt><tt class="py-op">(</tt><tt class="py-string">'too many "pass" in view'</tt><tt class="py-op">,</tt> <tt class="py-name">new_text</tt><tt class="py-op">)</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line"> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">new_text</tt> </tt>
</div><a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser._raise_error"></a><div id="TemplateParser._raise_error-def"><a name="L411"></a><tt class="py-lineno">411</tt> <a class="py-toggle" href="#" id="TemplateParser._raise_error-toggle" onclick="return toggle('TemplateParser._raise_error');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#_raise_error">_raise_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser._raise_error-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser._raise_error-expanded"><a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"><tt class="py-docstring">        Raise an error using itself as the filename and textual content.</tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-92" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-92', 'RestrictedError', 'link-1');">RestrictedError</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-93', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">text</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt id="link-94" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-94', 'message', 'link-94');">message</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser._get_file_text"></a><div id="TemplateParser._get_file_text-def"><a name="L417"></a><tt class="py-lineno">417</tt> <a class="py-toggle" href="#" id="TemplateParser._get_file_text-toggle" onclick="return toggle('TemplateParser._get_file_text');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#_get_file_text">_get_file_text</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser._get_file_text-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser._get_file_text-expanded"><a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line"><tt class="py-docstring">        Attempt to open ``filename`` and retrieve its text.</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line"><tt class="py-docstring">        This will use self.path to search for the file.</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line"> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">        <tt class="py-comment"># If they didn't specify a filename, how can we find one!</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">filename</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-95', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.template.TemplateParser._raise_error" class="py-name" href="#" onclick="return doclink('link-96', '_raise_error', 'link-89');">_raise_error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Invalid template filename'</tt><tt class="py-op">)</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line"> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line">        <tt class="py-comment"># Get the filename; filename looks like ``"template.html"``.</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># We need to eval to remove the quotes and get the string type.</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">eval</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line"> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">        <tt class="py-comment"># Get the path of the file on the system.</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">filepath</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-97', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line"> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">        <tt class="py-comment"># try to read the text.</tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">            <tt class="py-name">fileobj</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filepath</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">fileobj</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-98', 'read', 'link-98');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line">            <tt class="py-name">fileobj</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-99', 'close', 'link-99');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.template.TemplateParser._raise_error" class="py-name" href="#" onclick="return doclink('link-100', '_raise_error', 'link-89');">_raise_error</a></tt><tt class="py-op">(</tt><tt class="py-string">'Unable to open included view file: '</tt> <tt class="py-op">+</tt> <tt class="py-name">filepath</tt><tt class="py-op">)</tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line"> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.include"></a><div id="TemplateParser.include-def"><a name="L445"></a><tt class="py-lineno">445</tt> <a class="py-toggle" href="#" id="TemplateParser.include-toggle" onclick="return toggle('TemplateParser.include');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#include">include</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">content</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.include-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.include-expanded"><a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line"><tt class="py-docstring">        Include ``filename`` here.</tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name" targets="Method web2py.gluon.template.TemplateParser._get_file_text()=web2py.gluon.template.TemplateParser-class.html#_get_file_text"><a title="web2py.gluon.template.TemplateParser._get_file_text" class="py-name" href="#" onclick="return doclink('link-101', '_get_file_text', 'link-101');">_get_file_text</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line"> </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line">        <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-102', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">                           <tt id="link-103" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-103', 'name', 'link-4');">name</a></tt>    <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line">                           <tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">,</tt> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">                           <tt class="py-name">path</tt>    <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line">                           <tt class="py-name">writer</tt>  <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">,</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">                           <tt class="py-name">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">delimiters</tt><tt class="py-op">)</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">        <tt class="py-name">content</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-104', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">)</tt> </tt>
</div><a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.extend"></a><div id="TemplateParser.extend-def"><a name="L460"></a><tt class="py-lineno">460</tt> <a class="py-toggle" href="#" id="TemplateParser.extend-toggle" onclick="return toggle('TemplateParser.extend');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#extend">extend</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.extend-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.extend-expanded"><a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line"><tt class="py-docstring">        Extend ``filename``. Anything not declared in a block defined by the</tt> </tt>
<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"><tt class="py-docstring">        parent will be placed in the parent templates ``{{include}}`` block.</tt> </tt>
<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.template.TemplateParser._get_file_text" class="py-name" href="#" onclick="return doclink('link-105', '_get_file_text', 'link-101');">_get_file_text</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line"> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line">        <tt class="py-comment"># Create out nodes list to send to the parent</tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">super_nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line">        <tt class="py-comment"># We want to include any non-handled nodes.</tt> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">super_nodes</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-106', 'extend', 'link-20');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">child_super_nodes</tt><tt class="py-op">)</tt> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line">        <tt class="py-comment"># And our nodes as well.</tt> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">super_nodes</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-107', 'extend', 'link-20');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">super_nodes</tt><tt class="py-op">)</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line"> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">        <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt id="link-108" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-108', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">                    <tt id="link-109" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-109', 'name', 'link-4');">name</a></tt>         <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">                    <tt class="py-name">context</tt>      <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">,</tt> </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">                    <tt class="py-name">path</tt>         <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> </tt>
<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">                    <tt class="py-name">writer</tt>       <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">,</tt> </tt>
<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">                    <tt class="py-name">delimiters</tt>   <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">delimiters</tt><tt class="py-op">,</tt> </tt>
<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">                    <tt class="py-name">_super_nodes</tt> <tt class="py-op">=</tt> <tt class="py-name">super_nodes</tt><tt class="py-op">)</tt> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line"> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">        <tt class="py-comment"># Make a temporary buffer that is unique for parent</tt> </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># template.</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt id="link-110" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-110', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">(</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-111', 'name', 'link-4');">name</a></tt><tt class="py-op">=</tt><tt class="py-string">'__include__'</tt> <tt class="py-op">+</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">delimiters</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">delimiters</tt><tt class="py-op">)</tt> </tt>
<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">        <tt class="py-name">pre</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line"> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">        <tt class="py-comment"># Iterate through each of our nodes</tt> </tt>
<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt><tt class="py-op">:</tt> </tt>
<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">            <tt class="py-comment"># If a node is a block</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-112', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">                <tt class="py-comment"># That happens to be in the parent template</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-113', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">:</tt> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">                    <tt class="py-comment"># Do not include it</tt> </tt>
<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">continue</tt> </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line"> </tt>
<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt id="link-114" class="py-name"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-114', 'Node', 'link-17');">Node</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">                <tt class="py-comment"># Or if the node was before the extension</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># we should not include it</tt> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">node</tt><tt class="py-op">.</tt><tt class="py-name">pre_extend</tt><tt class="py-op">:</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">                    <tt class="py-name">pre</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-115', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line"> </tt>
<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line">            <tt class="py-comment"># Otherwise, it should go int the</tt> </tt>
<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># Parent templates {{include}} section.</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">buf</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-116', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">                <tt class="py-name">buf</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-117', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line"> </tt>
<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line">        <tt class="py-comment"># Clear our current nodes. We will be replacing this with</tt> </tt>
<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># the parent nodes.</tt> </tt>
<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt class="py-name">nodes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line"> </tt>
<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">        <tt class="py-comment"># Set our include, unique by filename</tt> </tt>
<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">[</tt><tt class="py-string">'__include__'</tt> <tt class="py-op">+</tt> <tt class="py-name">filename</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">buf</tt> </tt>
<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line"> </tt>
<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">        <tt class="py-comment"># Make sure our pre_extended nodes go first</tt> </tt>
<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-118', 'insert', 'link-42');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">pre</tt><tt class="py-op">)</tt> </tt>
<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line"> </tt>
<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">        <tt class="py-comment"># Then we extend our blocks</tt> </tt>
<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-119', 'extend', 'link-20');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">)</tt> </tt>
<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line"> </tt>
<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">        <tt class="py-comment"># Work off the parent node.</tt> </tt>
<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt class="py-name">t</tt><tt class="py-op">.</tt><tt class="py-name">content</tt> </tt>
</div><a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line"> </tt>
<a name="TemplateParser.parse"></a><div id="TemplateParser.parse-def"><a name="L525"></a><tt class="py-lineno">525</tt> <a class="py-toggle" href="#" id="TemplateParser.parse-toggle" onclick="return toggle('TemplateParser.parse');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template.TemplateParser-class.html#parse">parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TemplateParser.parse-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TemplateParser.parse-expanded"><a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line"> </tt>
<a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line">        <tt class="py-comment"># Basically, r_tag.split will split the text into</tt> </tt>
<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># an array containing, 'non-tag', 'tag', 'non-tag', 'tag'</tt> </tt>
<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># so if we alternate this variable, we know</tt> </tt>
<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># what to look for. This is alternate to</tt> </tt>
<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># line.startswith("{{")</tt> </tt>
<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">in_tag</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">        <tt id="link-120" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-120', 'extend', 'link-20');">extend</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">        <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line"> </tt>
<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line">        <tt class="py-comment"># Use a list to store everything in</tt> </tt>
<a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># This is because later the code will "look ahead"</tt> </tt>
<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># for missing strings or brackets.</tt> </tt>
<a name="L539"></a><tt class="py-lineno">539</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">ij</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.template.TemplateParser.r_tag" class="py-name" href="#" onclick="return doclink('link-121', 'r_tag', 'link-52');">r_tag</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">        <tt class="py-comment"># j = current index</tt> </tt>
<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># i = current item</tt> </tt>
<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">j</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-122" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-122', 'len', 'link-122');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">ij</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line">            <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">ij</tt><tt class="py-op">[</tt><tt class="py-name">j</tt><tt class="py-op">]</tt> </tt>
<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line"> </tt>
<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">:</tt> </tt>
<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-123" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-123', 'len', 'link-122');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stack</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.template.TemplateParser._raise_error" class="py-name" href="#" onclick="return doclink('link-124', '_raise_error', 'link-89');">_raise_error</a></tt><tt class="py-op">(</tt><tt class="py-string">'The "end" tag is unmatched, please check if you have a starting "block" tag'</tt><tt class="py-op">)</tt> </tt>
<a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line"> </tt>
<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line">                <tt class="py-comment"># Our current element in the stack.</tt> </tt>
<a name="L550"></a><tt class="py-lineno">550</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">top</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stack</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line"> </tt>
<a name="L552"></a><tt class="py-lineno">552</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">in_tag</tt><tt class="py-op">:</tt> </tt>
<a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line">                    <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">i</tt> </tt>
<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line"> </tt>
<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line">                    <tt class="py-comment"># If we are missing any strings!!!!</tt> </tt>
<a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># This usually happens with the following example</tt> </tt>
<a name="L557"></a><tt class="py-lineno">557</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># template code</tt> </tt>
<a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment">#</tt> </tt>
<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># {{a = '}}'}}</tt> </tt>
<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># or</tt> </tt>
<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># {{a = '}}blahblah{{'}}</tt> </tt>
<a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment">#</tt> </tt>
<a name="L563"></a><tt class="py-lineno">563</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># This will fix these</tt> </tt>
<a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># This is commented out because the current template</tt> </tt>
<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># system has this same limitation. Since this has a</tt> </tt>
<a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># performance hit on larger templates, I do not recommend</tt> </tt>
<a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># using this code on production systems. This is still here</tt> </tt>
<a name="L568"></a><tt class="py-lineno">568</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># for "i told you it *can* be fixed" purposes.</tt> </tt>
<a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment">#</tt> </tt>
<a name="L570"></a><tt class="py-lineno">570</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment">#</tt> </tt>
<a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                    if line.count("'") % 2 != 0 or line.count('"') % 2 != 0:</tt> </tt>
<a name="L572"></a><tt class="py-lineno">572</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L573"></a><tt class="py-lineno">573</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # Look ahead</tt> </tt>
<a name="L574"></a><tt class="py-lineno">574</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        la = 1</tt> </tt>
<a name="L575"></a><tt class="py-lineno">575</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        nextline = ij[j+la]</tt> </tt>
<a name="L576"></a><tt class="py-lineno">576</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L577"></a><tt class="py-lineno">577</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # As long as we have not found our ending</tt> </tt>
<a name="L578"></a><tt class="py-lineno">578</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # brackets keep going</tt> </tt>
<a name="L579"></a><tt class="py-lineno">579</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        while '}}' not in nextline:</tt> </tt>
<a name="L580"></a><tt class="py-lineno">580</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            la += 1</tt> </tt>
<a name="L581"></a><tt class="py-lineno">581</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            nextline += ij[j+la]</tt> </tt>
<a name="L582"></a><tt class="py-lineno">582</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            # clear this line, so we</tt> </tt>
<a name="L583"></a><tt class="py-lineno">583</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            # don't attempt to parse it</tt> </tt>
<a name="L584"></a><tt class="py-lineno">584</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            # this is why there is an "if i"</tt> </tt>
<a name="L585"></a><tt class="py-lineno">585</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            # around line 530</tt> </tt>
<a name="L586"></a><tt class="py-lineno">586</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                            ij[j+la] = ''</tt> </tt>
<a name="L587"></a><tt class="py-lineno">587</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L588"></a><tt class="py-lineno">588</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # retrieve our index.</tt> </tt>
<a name="L589"></a><tt class="py-lineno">589</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        index = nextline.index('}}')</tt> </tt>
<a name="L590"></a><tt class="py-lineno">590</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L591"></a><tt class="py-lineno">591</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # Everything before the new brackets</tt> </tt>
<a name="L592"></a><tt class="py-lineno">592</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        before = nextline[:index+2]</tt> </tt>
<a name="L593"></a><tt class="py-lineno">593</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L594"></a><tt class="py-lineno">594</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # Everything after</tt> </tt>
<a name="L595"></a><tt class="py-lineno">595</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        after = nextline[index+2:]</tt> </tt>
<a name="L596"></a><tt class="py-lineno">596</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L597"></a><tt class="py-lineno">597</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # Make the next line everything after</tt> </tt>
<a name="L598"></a><tt class="py-lineno">598</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # so it parses correctly, this *should* be</tt> </tt>
<a name="L599"></a><tt class="py-lineno">599</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # all html</tt> </tt>
<a name="L600"></a><tt class="py-lineno">600</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        ij[j+1] = after</tt> </tt>
<a name="L601"></a><tt class="py-lineno">601</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L602"></a><tt class="py-lineno">602</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        # Add everything before to the current line</tt> </tt>
<a name="L603"></a><tt class="py-lineno">603</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#                        line += before</tt> </tt>
<a name="L604"></a><tt class="py-lineno">604</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L605"></a><tt class="py-lineno">605</tt>  <tt class="py-line">                    <tt class="py-comment"># Get rid of '{{' and '}}'</tt> </tt>
<a name="L606"></a><tt class="py-lineno">606</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-125', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L607"></a><tt class="py-lineno">607</tt>  <tt class="py-line"> </tt>
<a name="L608"></a><tt class="py-lineno">608</tt>  <tt class="py-line">                    <tt class="py-comment"># This is bad juju, but let's do it anyway</tt> </tt>
<a name="L609"></a><tt class="py-lineno">609</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">line</tt><tt class="py-op">:</tt> </tt>
<a name="L610"></a><tt class="py-lineno">610</tt>  <tt class="py-line">                        <tt class="py-keyword">continue</tt> </tt>
<a name="L611"></a><tt class="py-lineno">611</tt>  <tt class="py-line"> </tt>
<a name="L612"></a><tt class="py-lineno">612</tt>  <tt class="py-line">                    <tt class="py-comment"># We do not want to replace the newlines in code,</tt> </tt>
<a name="L613"></a><tt class="py-lineno">613</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># only in block comments.</tt> </tt>
<a name="L614"></a><tt class="py-lineno">614</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">def</tt> <tt class="py-def-name">remove_newline</tt><tt class="py-op">(</tt><tt class="py-param">re_val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L615"></a><tt class="py-lineno">615</tt>  <tt class="py-line">                        <tt class="py-comment"># Take the entire match and replace newlines with</tt> </tt>
<a name="L616"></a><tt class="py-lineno">616</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># escaped newlines.</tt> </tt>
<a name="L617"></a><tt class="py-lineno">617</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">return</tt> <tt class="py-name">re_val</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\n'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L618"></a><tt class="py-lineno">618</tt>  <tt class="py-line"> </tt>
<a name="L619"></a><tt class="py-lineno">619</tt>  <tt class="py-line">                    <tt class="py-comment"># Perform block comment escaping.</tt> </tt>
<a name="L620"></a><tt class="py-lineno">620</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># This performs escaping ON anything</tt> </tt>
<a name="L621"></a><tt class="py-lineno">621</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># in between """ and """</tt> </tt>
<a name="L622"></a><tt class="py-lineno">622</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-126', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="web2py.gluon.template.TemplateParser.r_multiline" class="py-name" href="#" onclick="return doclink('link-127', 'r_multiline', 'link-53');">r_multiline</a></tt><tt class="py-op">,</tt> </tt>
<a name="L623"></a><tt class="py-lineno">623</tt>  <tt class="py-line">                                <tt class="py-name">remove_newline</tt><tt class="py-op">,</tt> </tt>
<a name="L624"></a><tt class="py-lineno">624</tt>  <tt class="py-line">                                <tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L625"></a><tt class="py-lineno">625</tt>  <tt class="py-line"> </tt>
<a name="L626"></a><tt class="py-lineno">626</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-128', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L627"></a><tt class="py-lineno">627</tt>  <tt class="py-line">                        <tt class="py-comment"># IE: {{=response.title}}</tt> </tt>
<a name="L628"></a><tt class="py-lineno">628</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt id="link-129" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-129', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">'='</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-130', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L629"></a><tt class="py-lineno">629</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L630"></a><tt class="py-lineno">630</tt>  <tt class="py-line">                        <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L631"></a><tt class="py-lineno">631</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-131', 'len', 'link-122');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L632"></a><tt class="py-lineno">632</tt>  <tt class="py-line">                            <tt class="py-comment"># Example</tt> </tt>
<a name="L633"></a><tt class="py-lineno">633</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># {{ include }}</tt> </tt>
<a name="L634"></a><tt class="py-lineno">634</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># {{ end }}</tt> </tt>
<a name="L635"></a><tt class="py-lineno">635</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt id="link-132" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-132', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L636"></a><tt class="py-lineno">636</tt>  <tt class="py-line">                            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L637"></a><tt class="py-lineno">637</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L638"></a><tt class="py-lineno">638</tt>  <tt class="py-line">                            <tt class="py-comment"># Example</tt> </tt>
<a name="L639"></a><tt class="py-lineno">639</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># {{ block pie }}</tt> </tt>
<a name="L640"></a><tt class="py-lineno">640</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># {{ include "layout.html" }}</tt> </tt>
<a name="L641"></a><tt class="py-lineno">641</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># {{ for i in range(10): }}</tt> </tt>
<a name="L642"></a><tt class="py-lineno">642</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt id="link-133" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-133', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L643"></a><tt class="py-lineno">643</tt>  <tt class="py-line">                            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L644"></a><tt class="py-lineno">644</tt>  <tt class="py-line"> </tt>
<a name="L645"></a><tt class="py-lineno">645</tt>  <tt class="py-line">                    <tt class="py-comment"># This will replace newlines in block comments</tt> </tt>
<a name="L646"></a><tt class="py-lineno">646</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># with the newline character. This is so that they</tt> </tt>
<a name="L647"></a><tt class="py-lineno">647</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># retain their formatting, but squish down to one</tt> </tt>
<a name="L648"></a><tt class="py-lineno">648</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># line in the rendered template.</tt> </tt>
<a name="L649"></a><tt class="py-lineno">649</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L650"></a><tt class="py-lineno">650</tt>  <tt class="py-line">                    <tt class="py-comment"># First check if we have any custom lexers</tt> </tt>
<a name="L651"></a><tt class="py-lineno">651</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt id="link-134" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-134', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lexers</tt><tt class="py-op">:</tt> </tt>
<a name="L652"></a><tt class="py-lineno">652</tt>  <tt class="py-line">                        <tt class="py-comment"># Pass the information to the lexer</tt> </tt>
<a name="L653"></a><tt class="py-lineno">653</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># and allow it to inject in the environment</tt> </tt>
<a name="L654"></a><tt class="py-lineno">654</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L655"></a><tt class="py-lineno">655</tt>  <tt class="py-line">                        <tt class="py-comment"># You can define custom names such as</tt> </tt>
<a name="L656"></a><tt class="py-lineno">656</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># '{{&lt;&lt;variable}}' which could potentially</tt> </tt>
<a name="L657"></a><tt class="py-lineno">657</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># write unescaped version of the variable.</tt> </tt>
<a name="L658"></a><tt class="py-lineno">658</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lexers</tt><tt class="py-op">[</tt><tt id="link-135" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-135', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">parser</tt>    <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> </tt>
<a name="L659"></a><tt class="py-lineno">659</tt>  <tt class="py-line">                                          <tt class="py-name">value</tt>     <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">,</tt> </tt>
<a name="L660"></a><tt class="py-lineno">660</tt>  <tt class="py-line">                                          <tt class="py-name">top</tt>       <tt class="py-op">=</tt> <tt class="py-name">top</tt><tt class="py-op">,</tt> </tt>
<a name="L661"></a><tt class="py-lineno">661</tt>  <tt class="py-line">                                          <tt class="py-name">stack</tt>     <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stack</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L662"></a><tt class="py-lineno">662</tt>  <tt class="py-line"> </tt>
<a name="L663"></a><tt class="py-lineno">663</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-136" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-136', 'name', 'link-4');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'='</tt><tt class="py-op">:</tt> </tt>
<a name="L664"></a><tt class="py-lineno">664</tt>  <tt class="py-line">                        <tt class="py-comment"># So we have a variable to insert into</tt> </tt>
<a name="L665"></a><tt class="py-lineno">665</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># the template</tt> </tt>
<a name="L666"></a><tt class="py-lineno">666</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-string">"\n%s(%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L667"></a><tt class="py-lineno">667</tt>  <tt class="py-line">                        <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-137', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-138" class="py-name"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-138', 'Node', 'link-17');">Node</a></tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">,</tt> <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L668"></a><tt class="py-lineno">668</tt>  <tt class="py-line"> </tt>
<a name="L669"></a><tt class="py-lineno">669</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-139" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-139', 'name', 'link-4');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'block'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-140', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L670"></a><tt class="py-lineno">670</tt>  <tt class="py-line">                        <tt class="py-comment"># Make a new node with name.</tt> </tt>
<a name="L671"></a><tt class="py-lineno">671</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">node</tt> <tt class="py-op">=</tt> <tt id="link-141" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-141', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">(</tt><tt id="link-142" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-142', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-143', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L672"></a><tt class="py-lineno">672</tt>  <tt class="py-line">                                         <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt><tt class="py-op">,</tt> </tt>
<a name="L673"></a><tt class="py-lineno">673</tt>  <tt class="py-line">                                         <tt class="py-name">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">delimiters</tt><tt class="py-op">)</tt> </tt>
<a name="L674"></a><tt class="py-lineno">674</tt>  <tt class="py-line"> </tt>
<a name="L675"></a><tt class="py-lineno">675</tt>  <tt class="py-line">                        <tt class="py-comment"># Append this node to our active node</tt> </tt>
<a name="L676"></a><tt class="py-lineno">676</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-144', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L677"></a><tt class="py-lineno">677</tt>  <tt class="py-line"> </tt>
<a name="L678"></a><tt class="py-lineno">678</tt>  <tt class="py-line">                        <tt class="py-comment"># Make sure to add the node to the stack.</tt> </tt>
<a name="L679"></a><tt class="py-lineno">679</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># so anything after this gets added</tt> </tt>
<a name="L680"></a><tt class="py-lineno">680</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># to this node. This allows us to</tt> </tt>
<a name="L681"></a><tt class="py-lineno">681</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># "nest" nodes.</tt> </tt>
<a name="L682"></a><tt class="py-lineno">682</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stack</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-145', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L683"></a><tt class="py-lineno">683</tt>  <tt class="py-line"> </tt>
<a name="L684"></a><tt class="py-lineno">684</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-146" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-146', 'name', 'link-4');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'end'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-147', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L685"></a><tt class="py-lineno">685</tt>  <tt class="py-line">                        <tt class="py-comment"># We are done with this node.</tt> </tt>
<a name="L686"></a><tt class="py-lineno">686</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L687"></a><tt class="py-lineno">687</tt>  <tt class="py-line">                        <tt class="py-comment"># Save an instance of it</tt> </tt>
<a name="L688"></a><tt class="py-lineno">688</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">[</tt><tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-148', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">top</tt> </tt>
<a name="L689"></a><tt class="py-lineno">689</tt>  <tt class="py-line"> </tt>
<a name="L690"></a><tt class="py-lineno">690</tt>  <tt class="py-line">                        <tt class="py-comment"># Pop it.</tt> </tt>
<a name="L691"></a><tt class="py-lineno">691</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stack</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L692"></a><tt class="py-lineno">692</tt>  <tt class="py-line"> </tt>
<a name="L693"></a><tt class="py-lineno">693</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-149" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-149', 'name', 'link-4');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'super'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-150', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L694"></a><tt class="py-lineno">694</tt>  <tt class="py-line">                        <tt class="py-comment"># Get our correct target name</tt> </tt>
<a name="L695"></a><tt class="py-lineno">695</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># If they just called {{super}} without a name</tt> </tt>
<a name="L696"></a><tt class="py-lineno">696</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># attempt to assume the top blocks name.</tt> </tt>
<a name="L697"></a><tt class="py-lineno">697</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L698"></a><tt class="py-lineno">698</tt>  <tt class="py-line">                            <tt class="py-name">target_node</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L699"></a><tt class="py-lineno">699</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L700"></a><tt class="py-lineno">700</tt>  <tt class="py-line">                            <tt class="py-name">target_node</tt> <tt class="py-op">=</tt> <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-151', 'name', 'link-4');">name</a></tt> </tt>
<a name="L701"></a><tt class="py-lineno">701</tt>  <tt class="py-line"> </tt>
<a name="L702"></a><tt class="py-lineno">702</tt>  <tt class="py-line">                        <tt class="py-comment"># Create a SuperNode instance</tt> </tt>
<a name="L703"></a><tt class="py-lineno">703</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">node</tt> <tt class="py-op">=</tt> <tt id="link-152" class="py-name" targets="Class web2py.gluon.template.SuperNode=web2py.gluon.template.SuperNode-class.html"><a title="web2py.gluon.template.SuperNode" class="py-name" href="#" onclick="return doclink('link-152', 'SuperNode', 'link-152');">SuperNode</a></tt><tt class="py-op">(</tt><tt id="link-153" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-153', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">target_node</tt><tt class="py-op">,</tt> </tt>
<a name="L704"></a><tt class="py-lineno">704</tt>  <tt class="py-line">                                            <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt><tt class="py-op">)</tt> </tt>
<a name="L705"></a><tt class="py-lineno">705</tt>  <tt class="py-line"> </tt>
<a name="L706"></a><tt class="py-lineno">706</tt>  <tt class="py-line">                        <tt class="py-comment"># Add this to our list to be taken care of</tt> </tt>
<a name="L707"></a><tt class="py-lineno">707</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">super_nodes</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-154', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L708"></a><tt class="py-lineno">708</tt>  <tt class="py-line"> </tt>
<a name="L709"></a><tt class="py-lineno">709</tt>  <tt class="py-line">                        <tt class="py-comment"># And put in in the tree</tt> </tt>
<a name="L710"></a><tt class="py-lineno">710</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-155', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L711"></a><tt class="py-lineno">711</tt>  <tt class="py-line"> </tt>
<a name="L712"></a><tt class="py-lineno">712</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-156" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-156', 'name', 'link-4');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'include'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-157" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-157', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L713"></a><tt class="py-lineno">713</tt>  <tt class="py-line">                        <tt class="py-comment"># If we know the target file to include</tt> </tt>
<a name="L714"></a><tt class="py-lineno">714</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L715"></a><tt class="py-lineno">715</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name" targets="Method web2py.gluon.template.TemplateParser.include()=web2py.gluon.template.TemplateParser-class.html#include"><a title="web2py.gluon.template.TemplateParser.include" class="py-name" href="#" onclick="return doclink('link-158', 'include', 'link-158');">include</a></tt><tt class="py-op">(</tt><tt class="py-name">top</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L716"></a><tt class="py-lineno">716</tt>  <tt class="py-line"> </tt>
<a name="L717"></a><tt class="py-lineno">717</tt>  <tt class="py-line">                        <tt class="py-comment"># Otherwise, make a temporary include node</tt> </tt>
<a name="L718"></a><tt class="py-lineno">718</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># That the child node will know to hook into.</tt> </tt>
<a name="L719"></a><tt class="py-lineno">719</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L720"></a><tt class="py-lineno">720</tt>  <tt class="py-line">                            <tt class="py-name">include_node</tt> <tt class="py-op">=</tt> <tt id="link-159" class="py-name"><a title="web2py.gluon.template.BlockNode" class="py-name" href="#" onclick="return doclink('link-159', 'BlockNode', 'link-14');">BlockNode</a></tt><tt class="py-op">(</tt><tt id="link-160" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-160', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'__include__'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-161', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L721"></a><tt class="py-lineno">721</tt>  <tt class="py-line">                                                     <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt><tt class="py-op">,</tt> </tt>
<a name="L722"></a><tt class="py-lineno">722</tt>  <tt class="py-line">                                                     <tt class="py-name">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">delimiters</tt><tt class="py-op">)</tt> </tt>
<a name="L723"></a><tt class="py-lineno">723</tt>  <tt class="py-line">                            <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-162', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">include_node</tt><tt class="py-op">)</tt> </tt>
<a name="L724"></a><tt class="py-lineno">724</tt>  <tt class="py-line"> </tt>
<a name="L725"></a><tt class="py-lineno">725</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt id="link-163" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-163', 'name', 'link-4');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'extend'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-164', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L726"></a><tt class="py-lineno">726</tt>  <tt class="py-line">                        <tt class="py-comment"># We need to extend the following</tt> </tt>
<a name="L727"></a><tt class="py-lineno">727</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># template.</tt> </tt>
<a name="L728"></a><tt class="py-lineno">728</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt id="link-165" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-165', 'extend', 'link-20');">extend</a></tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L729"></a><tt class="py-lineno">729</tt>  <tt class="py-line">                        <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L730"></a><tt class="py-lineno">730</tt>  <tt class="py-line"> </tt>
<a name="L731"></a><tt class="py-lineno">731</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L732"></a><tt class="py-lineno">732</tt>  <tt class="py-line">                        <tt class="py-comment"># If we don't know where it belongs</tt> </tt>
<a name="L733"></a><tt class="py-lineno">733</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># we just add it anyways without formatting.</tt> </tt>
<a name="L734"></a><tt class="py-lineno">734</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">if</tt> <tt class="py-name">line</tt> <tt class="py-keyword">and</tt> <tt class="py-name">in_tag</tt><tt class="py-op">:</tt> </tt>
<a name="L735"></a><tt class="py-lineno">735</tt>  <tt class="py-line"> </tt>
<a name="L736"></a><tt class="py-lineno">736</tt>  <tt class="py-line">                            <tt class="py-comment"># Split on the newlines &gt;.&lt;</tt> </tt>
<a name="L737"></a><tt class="py-lineno">737</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-name">tokens</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L738"></a><tt class="py-lineno">738</tt>  <tt class="py-line"> </tt>
<a name="L739"></a><tt class="py-lineno">739</tt>  <tt class="py-line">                            <tt class="py-comment"># We need to look for any instances of</tt> </tt>
<a name="L740"></a><tt class="py-lineno">740</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># for i in range(10):</tt> </tt>
<a name="L741"></a><tt class="py-lineno">741</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment">#   = i</tt> </tt>
<a name="L742"></a><tt class="py-lineno">742</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># pass</tt> </tt>
<a name="L743"></a><tt class="py-lineno">743</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-comment"># So we can properly put a response.write() in place.</tt> </tt>
<a name="L744"></a><tt class="py-lineno">744</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-name">continuation</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L745"></a><tt class="py-lineno">745</tt>  <tt class="py-line">                            <tt class="py-name">len_parsed</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L746"></a><tt class="py-lineno">746</tt>  <tt class="py-line">                            <tt class="py-keyword">for</tt> <tt id="link-166" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-166', 'k', 'link-67');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-167', 'len', 'link-122');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">tokens</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L747"></a><tt class="py-lineno">747</tt>  <tt class="py-line"> </tt>
<a name="L748"></a><tt class="py-lineno">748</tt>  <tt class="py-line">                                <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-168" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-168', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-169" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-169', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-170', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L749"></a><tt class="py-lineno">749</tt>  <tt class="py-line">                                <tt class="py-name">len_parsed</tt> <tt class="py-op">+=</tt> <tt id="link-171" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-171', 'len', 'link-122');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-172" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-172', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L750"></a><tt class="py-lineno">750</tt>  <tt class="py-line"> </tt>
<a name="L751"></a><tt class="py-lineno">751</tt>  <tt class="py-line">                                <tt class="py-keyword">if</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-173" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-173', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-174', 'startswith', 'link-85');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L752"></a><tt class="py-lineno">752</tt>  <tt class="py-line">                                    <tt class="py-keyword">if</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-175" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-175', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-176', 'endswith', 'link-84');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L753"></a><tt class="py-lineno">753</tt>  <tt class="py-line">                                        <tt class="py-name">continuation</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L754"></a><tt class="py-lineno">754</tt>  <tt class="py-line">                                        <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-177" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-177', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"\n%s(%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">,</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-178" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-178', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-179', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L755"></a><tt class="py-lineno">755</tt>  <tt class="py-line">                                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L756"></a><tt class="py-lineno">756</tt>  <tt class="py-line">                                        <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-180" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-180', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"\n%s(%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">,</tt> <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-181" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-181', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-182', 'strip', 'link-68');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L757"></a><tt class="py-lineno">757</tt>  <tt class="py-line">                                <tt class="py-keyword">elif</tt> <tt class="py-name">continuation</tt><tt class="py-op">:</tt> </tt>
<a name="L758"></a><tt class="py-lineno">758</tt>  <tt class="py-line">                                    <tt class="py-name">tokens</tt><tt class="py-op">[</tt><tt id="link-183" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-183', 'k', 'link-67');">k</a></tt><tt class="py-op">]</tt> <tt class="py-op">+=</tt> <tt class="py-string">')'</tt> </tt>
<a name="L759"></a><tt class="py-lineno">759</tt>  <tt class="py-line">                                    <tt class="py-name">continuation</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L760"></a><tt class="py-lineno">760</tt>  <tt class="py-line"> </tt>
<a name="L761"></a><tt class="py-lineno">761</tt>  <tt class="py-line"> </tt>
<a name="L762"></a><tt class="py-lineno">762</tt>  <tt class="py-line">                            <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-string">"\n%s"</tt> <tt class="py-op">%</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-184', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">tokens</tt><tt class="py-op">)</tt> </tt>
<a name="L763"></a><tt class="py-lineno">763</tt>  <tt class="py-line">                            <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-185', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-186" class="py-name"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-186', 'Node', 'link-17');">Node</a></tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">,</tt> <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L764"></a><tt class="py-lineno">764</tt>  <tt class="py-line"> </tt>
<a name="L765"></a><tt class="py-lineno">765</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L766"></a><tt class="py-lineno">766</tt>  <tt class="py-line">                    <tt class="py-comment"># It is HTML so just include it.</tt> </tt>
<a name="L767"></a><tt class="py-lineno">767</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-string">"\n%s(%r, escape=False)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">,</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
<a name="L768"></a><tt class="py-lineno">768</tt>  <tt class="py-line">                    <tt class="py-name">top</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-187', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-188" class="py-name"><a title="web2py.gluon.template.Node" class="py-name" href="#" onclick="return doclink('link-188', 'Node', 'link-17');">Node</a></tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">,</tt> <tt class="py-name">pre_extend</tt> <tt class="py-op">=</tt> <tt class="py-name">pre_extend</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L769"></a><tt class="py-lineno">769</tt>  <tt class="py-line"> </tt>
<a name="L770"></a><tt class="py-lineno">770</tt>  <tt class="py-line">            <tt class="py-comment"># Remember: tag, not tag, tag, not tag</tt> </tt>
<a name="L771"></a><tt class="py-lineno">771</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">in_tag</tt> <tt class="py-op">=</tt> <tt class="py-keyword">not</tt> <tt class="py-name">in_tag</tt> </tt>
<a name="L772"></a><tt class="py-lineno">772</tt>  <tt class="py-line"> </tt>
<a name="L773"></a><tt class="py-lineno">773</tt>  <tt class="py-line">        <tt class="py-comment"># Make a list of items to remove from child</tt> </tt>
<a name="L774"></a><tt class="py-lineno">774</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">to_rm</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L775"></a><tt class="py-lineno">775</tt>  <tt class="py-line"> </tt>
<a name="L776"></a><tt class="py-lineno">776</tt>  <tt class="py-line">        <tt class="py-comment"># Go through each of the children nodes</tt> </tt>
<a name="L777"></a><tt class="py-lineno">777</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">child_super_nodes</tt><tt class="py-op">:</tt> </tt>
<a name="L778"></a><tt class="py-lineno">778</tt>  <tt class="py-line">            <tt class="py-comment"># If we declared a block that this node wants to include</tt> </tt>
<a name="L779"></a><tt class="py-lineno">779</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-189', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">:</tt> </tt>
<a name="L780"></a><tt class="py-lineno">780</tt>  <tt class="py-line">                <tt class="py-comment"># Go ahead and include it!</tt> </tt>
<a name="L781"></a><tt class="py-lineno">781</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">node</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocks</tt><tt class="py-op">[</tt><tt class="py-name">node</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-190', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L782"></a><tt class="py-lineno">782</tt>  <tt class="py-line">                <tt class="py-comment"># Since we processed this child, we don't need to</tt> </tt>
<a name="L783"></a><tt class="py-lineno">783</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># pass it along to the parent</tt> </tt>
<a name="L784"></a><tt class="py-lineno">784</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">to_rm</tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-191', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L785"></a><tt class="py-lineno">785</tt>  <tt class="py-line"> </tt>
<a name="L786"></a><tt class="py-lineno">786</tt>  <tt class="py-line">        <tt class="py-comment"># Remove some of the processed nodes</tt> </tt>
<a name="L787"></a><tt class="py-lineno">787</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">node</tt> <tt class="py-keyword">in</tt> <tt class="py-name">to_rm</tt><tt class="py-op">:</tt> </tt>
<a name="L788"></a><tt class="py-lineno">788</tt>  <tt class="py-line">            <tt class="py-comment"># Since this is a pointer, it works beautifully.</tt> </tt>
<a name="L789"></a><tt class="py-lineno">789</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># Sometimes I miss C-Style pointers... I want my asterisk...</tt> </tt>
<a name="L790"></a><tt class="py-lineno">790</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">child_super_nodes</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">)</tt> </tt>
<a name="L791"></a><tt class="py-lineno">791</tt>  <tt class="py-line"> </tt>
<a name="L792"></a><tt class="py-lineno">792</tt>  <tt class="py-line">        <tt class="py-comment"># If we need to extend a template.</tt> </tt>
<a name="L793"></a><tt class="py-lineno">793</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt id="link-192" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-192', 'extend', 'link-20');">extend</a></tt><tt class="py-op">:</tt> </tt>
<a name="L794"></a><tt class="py-lineno">794</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-193', 'extend', 'link-20');">extend</a></tt><tt class="py-op">(</tt><tt id="link-194" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-194', 'extend', 'link-20');">extend</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L795"></a><tt class="py-lineno">795</tt>  <tt class="py-line"> </tt>
<a name="L796"></a><tt class="py-lineno">796</tt>  <tt class="py-line"><tt class="py-comment"># We need this for integration with gluon</tt> </tt>
<a name="parse_template"></a><div id="parse_template-def"><a name="L797"></a><tt class="py-lineno">797</tt> <a class="py-toggle" href="#" id="parse_template-toggle" onclick="return toggle('parse_template');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template-module.html#parse_template">parse_template</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L798"></a><tt class="py-lineno">798</tt>  <tt class="py-line">                   <tt class="py-param">path</tt>    <tt class="py-op">=</tt> <tt class="py-string">'views/'</tt><tt class="py-op">,</tt> </tt>
<a name="L799"></a><tt class="py-lineno">799</tt>  <tt class="py-line">                   <tt class="py-param">context</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L800"></a><tt class="py-lineno">800</tt>  <tt class="py-line">                   <tt class="py-param">lexers</tt>  <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L801"></a><tt class="py-lineno">801</tt>  <tt class="py-line">                   <tt class="py-param">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'{{'</tt><tt class="py-op">,</tt><tt class="py-string">'}}'</tt><tt class="py-op">)</tt> </tt>
<a name="L802"></a><tt class="py-lineno">802</tt>  <tt class="py-line">                   <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="parse_template-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="parse_template-expanded"><a name="L803"></a><tt class="py-lineno">803</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L804"></a><tt class="py-lineno">804</tt>  <tt class="py-line"><tt class="py-docstring">    filename can be a view filename in the views folder or an input stream</tt> </tt>
<a name="L805"></a><tt class="py-lineno">805</tt>  <tt class="py-line"><tt class="py-docstring">    path is the path of a views folder</tt> </tt>
<a name="L806"></a><tt class="py-lineno">806</tt>  <tt class="py-line"><tt class="py-docstring">    context is a dictionary of symbols used to render the template</tt> </tt>
<a name="L807"></a><tt class="py-lineno">807</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L808"></a><tt class="py-lineno">808</tt>  <tt class="py-line"> </tt>
<a name="L809"></a><tt class="py-lineno">809</tt>  <tt class="py-line">    <tt class="py-comment"># First, if we have a str try to open the file</tt> </tt>
<a name="L810"></a><tt class="py-lineno">810</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L811"></a><tt class="py-lineno">811</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L812"></a><tt class="py-lineno">812</tt>  <tt class="py-line">            <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-195', 'join', 'link-13');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L813"></a><tt class="py-lineno">813</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-196', 'read', 'link-98');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L814"></a><tt class="py-lineno">814</tt>  <tt class="py-line">            <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-197" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-197', 'close', 'link-99');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L815"></a><tt class="py-lineno">815</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L816"></a><tt class="py-lineno">816</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-198" class="py-name"><a title="web2py.gluon.restricted.RestrictedError" class="py-name" href="#" onclick="return doclink('link-198', 'RestrictedError', 'link-1');">RestrictedError</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-string">'Unable to find the file'</tt><tt class="py-op">)</tt> </tt>
<a name="L817"></a><tt class="py-lineno">817</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L818"></a><tt class="py-lineno">818</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">.</tt><tt id="link-199" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-199', 'read', 'link-98');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L819"></a><tt class="py-lineno">819</tt>  <tt class="py-line"> </tt>
<a name="L820"></a><tt class="py-lineno">820</tt>  <tt class="py-line">    <tt class="py-comment"># Use the file contents to get a parsed template and return it.</tt> </tt>
<a name="L821"></a><tt class="py-lineno">821</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-200" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-200', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">=</tt><tt class="py-name">context</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">=</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">lexers</tt><tt class="py-op">=</tt><tt class="py-name">lexers</tt><tt class="py-op">,</tt> <tt class="py-name">delimiters</tt><tt class="py-op">=</tt><tt class="py-name">delimiters</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L822"></a><tt class="py-lineno">822</tt>  <tt class="py-line"> </tt>
<a name="get_parsed"></a><div id="get_parsed-def"><a name="L823"></a><tt class="py-lineno">823</tt> <a class="py-toggle" href="#" id="get_parsed-toggle" onclick="return toggle('get_parsed');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template-module.html#get_parsed">get_parsed</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_parsed-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_parsed-expanded"><a name="L824"></a><tt class="py-lineno">824</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L825"></a><tt class="py-lineno">825</tt>  <tt class="py-line"><tt class="py-docstring">    Returns the indented python code of text. Useful for unit testing.</tt> </tt>
<a name="L826"></a><tt class="py-lineno">826</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L827"></a><tt class="py-lineno">827</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L828"></a><tt class="py-lineno">828</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-201" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-201', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L829"></a><tt class="py-lineno">829</tt>  <tt class="py-line"> </tt>
<a name="L830"></a><tt class="py-lineno">830</tt>  <tt class="py-line"><tt class="py-comment"># And this is a generic render function.</tt> </tt>
<a name="L831"></a><tt class="py-lineno">831</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Here for integration with gluon.</tt> </tt>
<a name="render"></a><div id="render-def"><a name="L832"></a><tt class="py-lineno">832</tt> <a class="py-toggle" href="#" id="render-toggle" onclick="return toggle('render');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.template-module.html#render">render</a><tt class="py-op">(</tt><tt class="py-param">content</tt> <tt class="py-op">=</tt> <tt class="py-string">"hello world"</tt><tt class="py-op">,</tt> </tt>
<a name="L833"></a><tt class="py-lineno">833</tt>  <tt class="py-line">           <tt class="py-param">stream</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L834"></a><tt class="py-lineno">834</tt>  <tt class="py-line">           <tt class="py-param">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L835"></a><tt class="py-lineno">835</tt>  <tt class="py-line">           <tt class="py-param">path</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L836"></a><tt class="py-lineno">836</tt>  <tt class="py-line">           <tt class="py-param">context</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L837"></a><tt class="py-lineno">837</tt>  <tt class="py-line">           <tt class="py-param">lexers</tt>  <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L838"></a><tt class="py-lineno">838</tt>  <tt class="py-line">           <tt class="py-param">delimiters</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">'{{'</tt><tt class="py-op">,</tt><tt class="py-string">'}}'</tt><tt class="py-op">)</tt> </tt>
<a name="L839"></a><tt class="py-lineno">839</tt>  <tt class="py-line">           <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="render-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="render-expanded"><a name="L840"></a><tt class="py-lineno">840</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L841"></a><tt class="py-lineno">841</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render()</tt> </tt>
<a name="L842"></a><tt class="py-lineno">842</tt>  <tt class="py-line"><tt class="py-docstring">    'hello world'</tt> </tt>
<a name="L843"></a><tt class="py-lineno">843</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='abc')</tt> </tt>
<a name="L844"></a><tt class="py-lineno">844</tt>  <tt class="py-line"><tt class="py-docstring">    'abc'</tt> </tt>
<a name="L845"></a><tt class="py-lineno">845</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='abc\\'')</tt> </tt>
<a name="L846"></a><tt class="py-lineno">846</tt>  <tt class="py-line"><tt class="py-docstring">    "abc'"</tt> </tt>
<a name="L847"></a><tt class="py-lineno">847</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='a"\\'bc')</tt> </tt>
<a name="L848"></a><tt class="py-lineno">848</tt>  <tt class="py-line"><tt class="py-docstring">    'a"\\'bc'</tt> </tt>
<a name="L849"></a><tt class="py-lineno">849</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='a\\nbc')</tt> </tt>
<a name="L850"></a><tt class="py-lineno">850</tt>  <tt class="py-line"><tt class="py-docstring">    'a\\nbc'</tt> </tt>
<a name="L851"></a><tt class="py-lineno">851</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='a"bcd"e')</tt> </tt>
<a name="L852"></a><tt class="py-lineno">852</tt>  <tt class="py-line"><tt class="py-docstring">    'a"bcd"e'</tt> </tt>
<a name="L853"></a><tt class="py-lineno">853</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content="'''a\\nc'''")</tt> </tt>
<a name="L854"></a><tt class="py-lineno">854</tt>  <tt class="py-line"><tt class="py-docstring">    "'''a\\nc'''"</tt> </tt>
<a name="L855"></a><tt class="py-lineno">855</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content="'''a\\'c'''")</tt> </tt>
<a name="L856"></a><tt class="py-lineno">856</tt>  <tt class="py-line"><tt class="py-docstring">    "'''a\'c'''"</tt> </tt>
<a name="L857"></a><tt class="py-lineno">857</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='{{for i in range(a):}}{{=i}}&lt;br /&gt;{{pass}}', context=dict(a=5))</tt> </tt>
<a name="L858"></a><tt class="py-lineno">858</tt>  <tt class="py-line"><tt class="py-docstring">    '0&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;'</tt> </tt>
<a name="L859"></a><tt class="py-lineno">859</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='{%for i in range(a):%}{%=i%}&lt;br /&gt;{%pass%}', context=dict(a=5),delimiters=('{%','%}'))</tt> </tt>
<a name="L860"></a><tt class="py-lineno">860</tt>  <tt class="py-line"><tt class="py-docstring">    '0&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;'</tt> </tt>
<a name="L861"></a><tt class="py-lineno">861</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content="{{='''hello\\nworld'''}}")</tt> </tt>
<a name="L862"></a><tt class="py-lineno">862</tt>  <tt class="py-line"><tt class="py-docstring">    'hello\\nworld'</tt> </tt>
<a name="L863"></a><tt class="py-lineno">863</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; render(content='{{for i in range(3):\\n=i\\npass}}')</tt> </tt>
<a name="L864"></a><tt class="py-lineno">864</tt>  <tt class="py-line"><tt class="py-docstring">    '012'</tt> </tt>
<a name="L865"></a><tt class="py-lineno">865</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L866"></a><tt class="py-lineno">866</tt>  <tt class="py-line">    <tt class="py-comment"># Here to avoid circular Imports</tt> </tt>
<a name="L867"></a><tt class="py-lineno">867</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L868"></a><tt class="py-lineno">868</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-202" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-202', 'globals', 'link-202');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-203" class="py-name" targets="Class web2py.gluon.globals.Response=web2py.gluon.globals.Response-class.html"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-203', 'Response', 'link-203');">Response</a></tt> </tt>
<a name="L869"></a><tt class="py-lineno">869</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L870"></a><tt class="py-lineno">870</tt>  <tt class="py-line">        <tt class="py-comment"># Working standalone. Build a mock Response object.</tt> </tt>
<a name="L871"></a><tt class="py-lineno">871</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">class</tt> <tt class="py-def-name">Response</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L872"></a><tt class="py-lineno">872</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">__init__</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L873"></a><tt class="py-lineno">873</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L874"></a><tt class="py-lineno">874</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">write</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">,</tt> <tt class="py-param">escape</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L875"></a><tt class="py-lineno">875</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">escape</tt><tt class="py-op">:</tt> </tt>
<a name="L876"></a><tt class="py-lineno">876</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-204" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-204', 'write', 'link-204');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L877"></a><tt class="py-lineno">877</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt><tt class="py-string">'xml'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-205" class="py-name" targets="Method web2py.gluon.dal.Rows.xml()=web2py.gluon.dal.Rows-class.html#xml,Method web2py.gluon.html.A.xml()=web2py.gluon.html.A-class.html#xml,Method web2py.gluon.html.CODE.xml()=web2py.gluon.html.CODE-class.html#xml,Method web2py.gluon.html.DIV.xml()=web2py.gluon.html.DIV-class.html#xml,Method web2py.gluon.html.FORM.xml()=web2py.gluon.html.FORM-class.html#xml,Method web2py.gluon.html.HTML.xml()=web2py.gluon.html.HTML-class.html#xml,Method web2py.gluon.html.INPUT.xml()=web2py.gluon.html.INPUT-class.html#xml,Method web2py.gluon.html.MARKMIN.xml()=web2py.gluon.html.MARKMIN-class.html#xml,Method web2py.gluon.html.MENU.xml()=web2py.gluon.html.MENU-class.html#xml,Method web2py.gluon.html.P.xml()=web2py.gluon.html.P-class.html#xml,Method web2py.gluon.html.SCRIPT.xml()=web2py.gluon.html.SCRIPT-class.html#xml,Method web2py.gluon.html.STYLE.xml()=web2py.gluon.html.STYLE-class.html#xml,Method web2py.gluon.html.XHTML.xml()=web2py.gluon.html.XHTML-class.html#xml,Method web2py.gluon.html.XML.xml()=web2py.gluon.html.XML-class.html#xml,Method web2py.gluon.html.XmlComponent.xml()=web2py.gluon.html.XmlComponent-class.html#xml,Method web2py.gluon.languages.lazyT.xml()=web2py.gluon.languages.lazyT-class.html#xml,Function web2py.gluon.serializers.xml()=web2py.gluon.serializers-module.html#xml,Method web2py.gluon.tools.Recaptcha.xml()=web2py.gluon.tools.Recaptcha-class.html#xml,Method web2py.gluon.tools.Service.xml()=web2py.gluon.tools.Service-class.html#xml"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-205', 'xml', 'link-205');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L878"></a><tt class="py-lineno">878</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-206" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-206', 'write', 'link-204');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-207', 'xml', 'link-205');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L879"></a><tt class="py-lineno">879</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L880"></a><tt class="py-lineno">880</tt>  <tt class="py-line">                    <tt class="py-comment"># make it a string</tt> </tt>
<a name="L881"></a><tt class="py-lineno">881</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L882"></a><tt class="py-lineno">882</tt>  <tt class="py-line">                        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L883"></a><tt class="py-lineno">883</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L884"></a><tt class="py-lineno">884</tt>  <tt class="py-line">                        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-208" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-208', 'encode', 'link-208');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">,</tt> <tt class="py-string">'xmlcharrefreplace'</tt><tt class="py-op">)</tt> </tt>
<a name="L885"></a><tt class="py-lineno">885</tt>  <tt class="py-line">                    <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"'"</tt><tt class="py-op">,</tt><tt class="py-string">"&amp;#x27;"</tt><tt class="py-op">)</tt> </tt>
<a name="L886"></a><tt class="py-lineno">886</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-209', 'write', 'link-204');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L887"></a><tt class="py-lineno">887</tt>  <tt class="py-line"> </tt>
<a name="L888"></a><tt class="py-lineno">888</tt>  <tt class="py-line">        <tt class="py-comment"># A little helper to avoid escaping.</tt> </tt>
<a name="L889"></a><tt class="py-lineno">889</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">class</tt> <tt class="py-def-name">NOESCAPE</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L890"></a><tt class="py-lineno">890</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">__init__</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L891"></a><tt class="py-lineno">891</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L892"></a><tt class="py-lineno">892</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">xml</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L893"></a><tt class="py-lineno">893</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt> </tt>
</div></div><a name="L894"></a><tt class="py-lineno">894</tt>  <tt class="py-line">        <tt class="py-comment"># Add it to the context so we can use it.</tt> </tt>
<a name="L895"></a><tt class="py-lineno">895</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">context</tt><tt class="py-op">[</tt><tt class="py-string">'NOESCAPE'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">NOESCAPE</tt> </tt>
<a name="L896"></a><tt class="py-lineno">896</tt>  <tt class="py-line"> </tt>
<a name="L897"></a><tt class="py-lineno">897</tt>  <tt class="py-line">    <tt class="py-comment"># If we don't have anything to render, why bother?</tt> </tt>
<a name="L898"></a><tt class="py-lineno">898</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">content</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-210" class="py-name" targets="Method web2py.gluon.globals.Response.stream()=web2py.gluon.globals.Response-class.html#stream"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-210', 'stream', 'link-210');">stream</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">filename</tt><tt class="py-op">:</tt> </tt>
<a name="L899"></a><tt class="py-lineno">899</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"Must specify a stream or filename or content"</tt> </tt>
<a name="L900"></a><tt class="py-lineno">900</tt>  <tt class="py-line"> </tt>
<a name="L901"></a><tt class="py-lineno">901</tt>  <tt class="py-line">    <tt class="py-comment"># Here for legacy purposes, probably can be reduced to something more simple.</tt> </tt>
<a name="L902"></a><tt class="py-lineno">902</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">close_stream</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L903"></a><tt class="py-lineno">903</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-211" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-211', 'stream', 'link-210');">stream</a></tt><tt class="py-op">:</tt> </tt>
<a name="L904"></a><tt class="py-lineno">904</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt><tt class="py-op">:</tt> </tt>
<a name="L905"></a><tt class="py-lineno">905</tt>  <tt class="py-line">            <tt id="link-212" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-212', 'stream', 'link-210');">stream</a></tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L906"></a><tt class="py-lineno">906</tt>  <tt class="py-line">            <tt class="py-name">close_stream</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L907"></a><tt class="py-lineno">907</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">content</tt><tt class="py-op">:</tt> </tt>
<a name="L908"></a><tt class="py-lineno">908</tt>  <tt class="py-line">            <tt id="link-213" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-213', 'stream', 'link-210');">stream</a></tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-name">content</tt><tt class="py-op">)</tt> </tt>
<a name="L909"></a><tt class="py-lineno">909</tt>  <tt class="py-line"> </tt>
<a name="L910"></a><tt class="py-lineno">910</tt>  <tt class="py-line">    <tt class="py-comment"># Get a response class.</tt> </tt>
<a name="L911"></a><tt class="py-lineno">911</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">context</tt><tt class="py-op">[</tt><tt class="py-string">'response'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-214" class="py-name"><a title="web2py.gluon.globals.Response" class="py-name" href="#" onclick="return doclink('link-214', 'Response', 'link-203');">Response</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L912"></a><tt class="py-lineno">912</tt>  <tt class="py-line"> </tt>
<a name="L913"></a><tt class="py-lineno">913</tt>  <tt class="py-line">    <tt class="py-comment"># Execute the template.</tt> </tt>
<a name="L914"></a><tt class="py-lineno">914</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-215" class="py-name"><a title="web2py.gluon.template.TemplateParser" class="py-name" href="#" onclick="return doclink('link-215', 'TemplateParser', 'link-69');">TemplateParser</a></tt><tt class="py-op">(</tt><tt id="link-216" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-216', 'stream', 'link-210');">stream</a></tt><tt class="py-op">.</tt><tt id="link-217" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-217', 'read', 'link-98');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">=</tt><tt class="py-name">context</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">=</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">lexers</tt><tt class="py-op">=</tt><tt class="py-name">lexers</tt><tt class="py-op">,</tt> <tt class="py-name">delimiters</tt><tt class="py-op">=</tt><tt class="py-name">delimiters</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L915"></a><tt class="py-lineno">915</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L916"></a><tt class="py-lineno">916</tt>  <tt class="py-line">        <tt class="py-keyword">exec</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">context</tt> </tt>
<a name="L917"></a><tt class="py-lineno">917</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt id="link-218" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-218', 'Exception', 'link-218');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L918"></a><tt class="py-lineno">918</tt>  <tt class="py-line">        <tt class="py-comment"># for i,line in enumerate(code.split('\n')): print i,line</tt> </tt>
<a name="L919"></a><tt class="py-lineno">919</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">raise</tt> </tt>
<a name="L920"></a><tt class="py-lineno">920</tt>  <tt class="py-line"> </tt>
<a name="L921"></a><tt class="py-lineno">921</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">close_stream</tt><tt class="py-op">:</tt> </tt>
<a name="L922"></a><tt class="py-lineno">922</tt>  <tt class="py-line">        <tt id="link-219" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-219', 'stream', 'link-210');">stream</a></tt><tt class="py-op">.</tt><tt id="link-220" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-220', 'close', 'link-99');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L923"></a><tt class="py-lineno">923</tt>  <tt class="py-line"> </tt>
<a name="L924"></a><tt class="py-lineno">924</tt>  <tt class="py-line">    <tt class="py-comment"># Returned the rendered content.</tt> </tt>
<a name="L925"></a><tt class="py-lineno">925</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">return</tt> <tt class="py-name">context</tt><tt class="py-op">[</tt><tt class="py-string">'response'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L926"></a><tt class="py-lineno">926</tt>  <tt class="py-line"> </tt>
<a name="L927"></a><tt class="py-lineno">927</tt>  <tt class="py-line"> </tt>
<a name="L928"></a><tt class="py-lineno">928</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L929"></a><tt class="py-lineno">929</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L930"></a><tt class="py-lineno">930</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L931"></a><tt class="py-lineno">931</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template.BlockNode-class.html version [6aecc39ca0].



























































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template.BlockNode</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.template-module.html">Module&nbsp;template</a> ::
        Class&nbsp;BlockNode
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template.BlockNode-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class BlockNode</h1><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      <a href="web2py.gluon.template.Node-class.html">Node</a> --+
             |
            <strong class="uidshort">BlockNode</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.template.Content-class.html">Content</a>
</dd></dl>

<hr />
<p>Block Container.</p>
  <p>This Node can contain other Nodes and will render in a hierarchical 
  order of when nodes were added.</p>
  ie:
<pre class="literalblock">
   {{ block test }}
       This is default block test
   {{ end }}
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.BlockNode-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pre_extend</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">delimiters</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">{{</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">}}</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span><br />
      name - Name of this Node.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.BlockNode-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.BlockNode-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Get this BlockNodes content, not including child Nodes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.BlockNode-class.html#append" class="summary-sig-name">append</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">node</span>)</span><br />
      Add an element to the nodes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.append">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.BlockNode-class.html#extend" class="summary-sig-name">extend</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      Extend the list of nodes with another BlockNode class.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.extend">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.BlockNode-class.html#output" class="summary-sig-name">output</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">blocks</span>)</span><br />
      Merges all nodes into a single string.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.output">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pre_extend</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">delimiters</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">{{</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">}}</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  name - Name of this Node.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.Node-class.html#__init__">Node.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      object.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Get this BlockNodes content, not including child Nodes
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.Node-class.html#__str__">Node.__str__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="append"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">append</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">node</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.append">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Add an element to the nodes.

Keyword Arguments

- node -- Node object or string to append.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="extend"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extend</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.extend">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Extend the list of nodes with another BlockNode class.

Keyword Arguments

- other -- BlockNode or Content object to extend from.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="output"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">output</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">blocks</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#BlockNode.output">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Merges all nodes into a single string.</p>
  blocks -- Dictionary of blocks that are extending from this 
  template.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template.Content-class.html version [b5705562dd].







































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template.Content</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.template-module.html">Module&nbsp;template</a> ::
        Class&nbsp;Content
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template.Content-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Content</h1><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
      <a href="web2py.gluon.template.Node-class.html">Node</a> --+    
             |    
     <a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a> --+
                 |
                <strong class="uidshort">Content</strong>
</pre>

<hr />
<p>Parent Container -- Used as the root level BlockNode.</p>
  Contains functions that operate as such.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Content-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">ContentBlock</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pre_extend</span>=<span class="summary-sig-default">True</span>)</span><br />
      Keyword Arguments</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Content-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Get this BlockNodes content, not including child Nodes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_insert"></a><span class="summary-sig-name">_insert</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>,
        <span class="summary-sig-arg">index</span>=<span class="summary-sig-default">0</span>)</span><br />
      Inserts object at index.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content._insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Content-class.html#insert" class="summary-sig-name">insert</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>,
        <span class="summary-sig-arg">index</span>=<span class="summary-sig-default">0</span>)</span><br />
      Inserts object at index.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.insert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Content-class.html#append" class="summary-sig-name">append</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">node</span>)</span><br />
      Adds a node to list.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.append">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Content-class.html#extend" class="summary-sig-name">extend</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      Extends the objects list of nodes with another objects nodes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.extend">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="clear_content"></a><span class="summary-sig-name">clear_content</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.clear_content">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a></code></b>:
      <code><a href="web2py.gluon.template.BlockNode-class.html#__repr__">__repr__</a></code>,
      <code><a href="web2py.gluon.template.BlockNode-class.html#output">output</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">ContentBlock</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pre_extend</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Keyword Arguments</p>
  name -- Unique name for this BlockNode
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.BlockNode-class.html#__init__">BlockNode.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Get this BlockNodes content, not including child Nodes
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.BlockNode-class.html#__str__">BlockNode.__str__</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="insert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">insert</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>,
        <span class="sig-arg">index</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.insert">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Inserts object at index.</p>
  You may pass a list of objects and have them inserted.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="append"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">append</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">node</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.append">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Adds a node to list. If it is a BlockNode then we assign a block for 
  it.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.BlockNode-class.html#append">BlockNode.append</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="extend"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extend</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Content.extend">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Extends the objects list of nodes with another objects nodes
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.BlockNode-class.html#extend">BlockNode.extend</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template.Node-class.html version [d501b4ab8c].








































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template.Node</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.template-module.html">Module&nbsp;template</a> ::
        Class&nbsp;Node
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template.Node-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Node</h1><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Node">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Node</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.template.BlockNode-class.html">BlockNode</a>,
    <a href="web2py.gluon.template.SuperNode-class.html">SuperNode</a>
</dd></dl>

<hr />
Basic Container Object<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Node-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">pre_extend</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Node.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.Node-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#Node.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">pre_extend</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Node.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#Node.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template.SuperNode-class.html version [5767e3e489].








































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template.SuperNode</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.template-module.html">Module&nbsp;template</a> ::
        Class&nbsp;SuperNode
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template.SuperNode-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SuperNode</h1><span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
      <a href="web2py.gluon.template.Node-class.html">Node</a> --+
             |
            <strong class="uidshort">SuperNode</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.SuperNode-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">pre_extend</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.SuperNode-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.SuperNode-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">pre_extend</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.Node-class.html#__init__">Node.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  str(x)
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.template.Node-class.html#__str__">Node.__str__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#SuperNode.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  repr(x)
  <dl class="fields">
    <dt>Overrides:
      object.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.template.TemplateParser-class.html version [9d42f2d6b0].



















































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.template.TemplateParser</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.template-module.html">Module&nbsp;template</a> ::
        Class&nbsp;TemplateParser
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.template.TemplateParser-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TemplateParser</h1><span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">TemplateParser</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.TemplateParser-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">ParserContainer</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">context</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">views/</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">writer</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">response.write</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">lexers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">delimiters</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">{{</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">}}</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">_super_nodes</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      text -- text to parse
context -- context to parse in
path -- folder path to templates
writer -- string of writer class to use
lexers -- dict of custom lexers to use.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.TemplateParser-class.html#to_string" class="summary-sig-name">to_string</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Return the parsed template with correct indentation.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.to_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.TemplateParser-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Make sure str works exactly the same as python 3</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__unicode__"></a><span class="summary-sig-name">__unicode__</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Make sure str works exactly the same as python 3</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.__unicode__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="reindent"></a><span class="summary-sig-name">reindent</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Reindents a string of unindented python code.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.reindent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_raise_error"></a><span class="summary-sig-name">_raise_error</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">text</span>=<span class="summary-sig-default">1</span>)</span><br />
      Raise an error using itself as the filename and textual 
      content.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser._raise_error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.TemplateParser-class.html#_get_file_text" class="summary-sig-name">_get_file_text</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      Attempt to open ``filename`` and retrieve its text.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser._get_file_text">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="include"></a><span class="summary-sig-name">include</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">content</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      Include ``filename`` here.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.include">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.template.TemplateParser-class.html#extend" class="summary-sig-name">extend</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      Extend ``filename``.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.extend">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parse"></a><span class="summary-sig-name">parse</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.parse">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="r_tag"></a><span class="summary-name">r_tag</span> = <code title="re.compile(r'(?s)(\{\{.*?\}\})')">re.compile(r'<code class="re-flags">(?s)</code><code class="re-group">(</code>\{\{.<code class="re-op">*?</code>\}\}<code class="re-group">)</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="r_multiline"></a><span class="summary-name">r_multiline</span> = <code title="re.compile(r'(?s)(&quot;&quot;&quot;.*?&quot;&quot;&quot;)|(\'\'\'.*?\'\'\')')">re.compile(r'<code class="re-flags">(?s)</code><code class="re-group">(</code>&quot;&quot;&quot;.<code class="re-op">*?</code>&quot;&quot;&quot;<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(</code>\'\'\'.<code class="re-op">*?</code>\'\'\'<code class="re-group">)</code>')</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.TemplateParser-class.html#re_block" class="summary-name">re_block</a> = <code title="re.compile(r'(?s)^(elif |else:|except:|except |finally:).*$')">re.compile(r'<code class="re-flags">(?s)</code>^<code class="re-group">(</code>elif <code class="re-op">|</code>else:<code class="re-op">|</code>except:<code class="re-op">|</code>except <code class="re-op">|</code>fina<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.template.TemplateParser-class.html#re_unblock" class="summary-name">re_unblock</a> = <code title="re.compile(r'(?s)^(return|continue|break|raise)( .*)?$')">re.compile(r'<code class="re-flags">(?s)</code>^<code class="re-group">(</code>return<code class="re-op">|</code>continue<code class="re-op">|</code>break<code class="re-op">|</code>raise<code class="re-group">)</code><code class="re-group">(</code> <code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="re_pass"></a><span class="summary-name">re_pass</span> = <code title="re.compile(r'(?s)^pass( .*)?$')">re.compile(r'<code class="re-flags">(?s)</code>^pass<code class="re-group">(</code> .<code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>$')</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>,
        <span class="sig-arg">name</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">ParserContainer</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">context</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">path</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">views/</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">writer</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">response.write</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">lexers</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="sig-arg">delimiters</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">{{</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">}}</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>,
        <span class="sig-arg">_super_nodes</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

text -- text to parse
context -- context to parse in
path -- folder path to templates
writer -- string of writer class to use
lexers -- dict of custom lexers to use.
delimiters -- for example ('{{','}}')
_super_nodes -- a list of nodes to check for inclusion
                this should only be set by &quot;self.extend&quot;
                It contains a list of SuperNodes from a child
                template that need to be handled.

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="to_string"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">to_string</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.to_string">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Return the parsed template with correct indentation.</p>
  Used to make it easier to port to python3.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Make sure str works exactly the same as python 3
  <dl class="fields">
    <dt>Overrides:
      object.__str__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_get_file_text"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_get_file_text</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser._get_file_text">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Attempt to open ``filename`` and retrieve its text.</p>
  This will use self.path to search for the file.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="extend"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extend</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.template-pysrc.html#TemplateParser.extend">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Extend ``filename``. Anything not declared in a block defined by the 
  parent will be placed in the parent templates ``{{include}}`` block.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="re_block"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">re_block</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?s)</code>^<code class="re-group">(</code>elif <code class="re-op">|</code>else:<code class="re-op">|</code>except:<code class="re-op">|</code>except <code class="re-op">|</code>finally:<code class="re-group">)</code>.<code class="re-op">*</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="re_unblock"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">re_unblock</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?s)</code>^<code class="re-group">(</code>return<code class="re-op">|</code>continue<code class="re-op">|</code>break<code class="re-op">|</code>raise<code class="re-group">)</code><code class="re-group">(</code> .<code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools-module.html version [74144a5a07].




























































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;tools
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module tools</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Mail-class.html" class="summary-name">Mail</a><br />
      Class for configuring and sending emails with alternative text /
        html body, multiple attachments and encryption support
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Recaptcha-class.html" class="summary-name">Recaptcha</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Auth-class.html" class="summary-name">Auth</a><br />
      Class for authentication, authorization, role based access control.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Crud-class.html" class="summary-name">Crud</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Service-class.html" class="summary-name">Service</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.PluginManager-class.html" class="summary-name">PluginManager</a><br />
      Plugin Manager is similar to a storage object but it is a single
        level singleton this means that multiple instances within the same 
        thread share the same attributes Its constructor is also 
        special.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="DEFAULT"></a><span class="summary-sig-name">DEFAULT</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#DEFAULT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="callback"></a><span class="summary-sig-name">callback</span>(<span class="summary-sig-arg">actions</span>,
        <span class="summary-sig-arg">form</span>,
        <span class="summary-sig-arg">tablename</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#callback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="validators"></a><span class="summary-sig-name">validators</span>(<span class="summary-sig-arg">*a</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#validators">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="call_or_redirect"></a><span class="summary-sig-name">call_or_redirect</span>(<span class="summary-sig-arg">f</span>,
        <span class="summary-sig-arg">*args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#call_or_redirect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="addrow"></a><span class="summary-sig-name">addrow</span>(<span class="summary-sig-arg">form</span>,
        <span class="summary-sig-arg">a</span>,
        <span class="summary-sig-arg">b</span>,
        <span class="summary-sig-arg">c</span>,
        <span class="summary-sig-arg">style</span>,
        <span class="summary-sig-arg">_id</span>,
        <span class="summary-sig-arg">position</span>=<span class="summary-sig-default">-1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#addrow">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="fetch"></a><span class="summary-sig-name">fetch</span>(<span class="summary-sig-arg">url</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">headers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">cookie</span>=<span class="summary-sig-default">&lt;SimpleCookie: &gt;</span>,
        <span class="summary-sig-arg">user_agent</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">Mozilla/5.0</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#fetch">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="geocode"></a><span class="summary-sig-name">geocode</span>(<span class="summary-sig-arg">address</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#geocode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="universal_caller"></a><span class="summary-sig-name">universal_caller</span>(<span class="summary-sig-arg">f</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#universal_caller">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools-module.html#completion" class="summary-sig-name">completion</a>(<span class="summary-sig-arg">callback</span>)</span><br />
      Executes a task on completion of the called action.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#completion">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="prettydate"></a><span class="summary-sig-name">prettydate</span>(<span class="summary-sig-arg">d</span>,
        <span class="summary-sig-arg">T</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x2543668&gt;</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#prettydate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="test_thread_separation"></a><span class="summary-sig-name">test_thread_separation</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#test_thread_separation">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools-module.html#regex_geocode" class="summary-name">regex_geocode</a> = <code title="re.compile(r'&lt;coordinates&gt;(?P&lt;la&gt;[^,]*),(?P&lt;lo&gt;[^,]*).*?&lt;/coordinates&gt;\
')">re.compile(r'&lt;coordinates&gt;<code class="re-group">(?P&lt;</code><code class="re-ref">la</code><code class="re-group">&gt;</code><code class="re-group">[^</code>,<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code>,<code class="re-group">(?P&lt;</code><code class="re-ref">lo</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ON"></a><span class="summary-name">ON</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="TAG"></a><span class="summary-name">TAG</span> = <code title="&lt;gluon.html.__TAG__ object at 0x2128f10&gt;">&lt;gluon.html.__TAG__ object at 0x2128f10&gt;</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="current"></a><span class="summary-name">current</span> = <code title="&lt;thread._local object at 0x1f4ab10&gt;">&lt;thread._local object at 0x1f4ab10&gt;</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="completion"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">completion</span>(<span class="sig-arg">callback</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#completion">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Executes a task on completion of the called action. For example:

    from gluon.tools import completion
    @completion(lambda d: logging.info(repr(d)))
    def index():
        return dict(message='hello')

It logs the output of the function every time input is called.
The argument of completion is executed in a new thread.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="regex_geocode"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_geocode</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'&lt;coordinates&gt;<code class="re-group">(?P&lt;</code><code class="re-ref">la</code><code class="re-group">&gt;</code><code class="re-group">[^</code>,<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code>,<code class="re-group">(?P&lt;</code><code class="re-ref">lo</code><code class="re-group">&gt;</code><code class="re-group">[^</code>,<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code>.<code class="re-op">*?</code>&lt;/coordinates&gt;<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools-pysrc.html version [8335dd38ee].











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;tools
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.tools-module.html">Module web2py.gluon.tools</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">#!/bin/python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">base64</tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cPickle</tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-1', 'thread', 'link-1');">thread</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-2', 'time', 'link-2');">time</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">copy</tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">smtplib</tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib2</tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">Cookie</tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">email</tt> <tt class="py-keyword">import</tt> <tt class="py-name">MIMEBase</tt><tt class="py-op">,</tt> <tt class="py-name">MIMEMultipart</tt><tt class="py-op">,</tt> <tt class="py-name">MIMEText</tt><tt class="py-op">,</tt> <tt class="py-name">Encoders</tt><tt class="py-op">,</tt> <tt class="py-name">Header</tt><tt class="py-op">,</tt> <tt class="py-name">message_from_string</tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.contenttype=web2py.gluon.contenttype-module.html,Function web2py.gluon.contenttype.contenttype()=web2py.gluon.contenttype-module.html#contenttype"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-3', 'contenttype', 'link-3');">contenttype</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-4', 'contenttype', 'link-3');">contenttype</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.storage=web2py.gluon.storage-module.html"><a title="web2py.gluon.storage" class="py-name" href="#" onclick="return doclink('link-5', 'storage', 'link-5');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Class web2py.gluon.storage.Storage=web2py.gluon.storage.Storage-class.html"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-6', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Class web2py.gluon.storage.StorageList=web2py.gluon.storage.StorageList-class.html"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-7', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class web2py.gluon.storage.Settings=web2py.gluon.storage.Settings-class.html"><a title="web2py.gluon.storage.Settings" class="py-name" href="#" onclick="return doclink('link-8', 'Settings', 'link-8');">Settings</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Class web2py.gluon.storage.Messages=web2py.gluon.storage.Messages-class.html"><a title="web2py.gluon.storage.Messages" class="py-name" href="#" onclick="return doclink('link-9', 'Messages', 'link-9');">Messages</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-10" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-10', 'utils', 'link-10');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.utils.web2py_uuid()=web2py.gluon.utils-module.html#web2py_uuid"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-11', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-12" class="py-name" targets="Package web2py.gluon=web2py.gluon-module.html"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-12', 'gluon', 'link-12');">gluon</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-13" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-13', 'fileutils', 'link-13');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-14" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-14', 'read_file', 'link-14');">read_file</a></tt> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-15" class="py-name" targets="Module web2py.gluon.serializers=web2py.gluon.serializers-module.html"><a title="web2py.gluon.serializers" class="py-name" href="#" onclick="return doclink('link-15', 'serializers', 'link-15');">serializers</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">simplejson</tt> <tt class="py-keyword">as</tt> <tt class="py-name">simplejson</tt> </tt>
<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'Mail'</tt><tt class="py-op">,</tt> <tt class="py-string">'Auth'</tt><tt class="py-op">,</tt> <tt class="py-string">'Recaptcha'</tt><tt class="py-op">,</tt> <tt class="py-string">'Crud'</tt><tt class="py-op">,</tt> <tt class="py-string">'Service'</tt><tt class="py-op">,</tt> <tt class="py-string">'PluginManager'</tt><tt class="py-op">,</tt> <tt class="py-string">'fetch'</tt><tt class="py-op">,</tt> <tt class="py-string">'geocode'</tt><tt class="py-op">,</tt> <tt class="py-string">'prettydate'</tt><tt class="py-op">]</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line"> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line"><tt id="link-16" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-16', 'logger', 'link-16');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line"> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line"><tt id="link-17" class="py-name" targets="Function web2py.gluon.dal.DEFAULT()=web2py.gluon.dal-module.html#DEFAULT,Function web2py.gluon.tools.DEFAULT()=web2py.gluon.tools-module.html#DEFAULT"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-17', 'DEFAULT', 'link-17');">DEFAULT</a></tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt class="py-name">None</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line"> </tt>
<a name="callback"></a><div id="callback-def"><a name="L43"></a><tt class="py-lineno">  43</tt> <a class="py-toggle" href="#" id="callback-toggle" onclick="return toggle('callback');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#callback">callback</a><tt class="py-op">(</tt><tt class="py-param">actions</tt><tt class="py-op">,</tt><tt class="py-param">form</tt><tt class="py-op">,</tt><tt class="py-param">tablename</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="callback-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="callback-expanded"><a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">actions</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">tablename</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">actions</tt><tt class="py-op">,</tt><tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">            <tt class="py-name">actions</tt> <tt class="py-op">=</tt> <tt class="py-name">actions</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-18', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">actions</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">            <tt class="py-name">actions</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">actions</tt><tt class="py-op">]</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-op">[</tt><tt class="py-name">action</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">action</tt> <tt class="py-keyword">in</tt> <tt class="py-name">actions</tt><tt class="py-op">]</tt> </tt>
</div><a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line"> </tt>
<a name="validators"></a><div id="validators-def"><a name="L51"></a><tt class="py-lineno">  51</tt> <a class="py-toggle" href="#" id="validators-toggle" onclick="return toggle('validators');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#validators">validators</a><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="validators-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="validators-expanded"><a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">    <tt id="link-19" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-19', 'b', 'link-19');">b</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">a</tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">            <tt id="link-20" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-20', 'b', 'link-19');">b</a></tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-21', 'b', 'link-19');">b</a></tt> <tt class="py-op">+</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line">            <tt id="link-22" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-22', 'b', 'link-19');">b</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-23', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-24', 'b', 'link-19');">b</a></tt> </tt>
</div><a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line"> </tt>
<a name="call_or_redirect"></a><div id="call_or_redirect-def"><a name="L60"></a><tt class="py-lineno">  60</tt> <a class="py-toggle" href="#" id="call_or_redirect-toggle" onclick="return toggle('call_or_redirect');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#call_or_redirect">call_or_redirect</a><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="call_or_redirect-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="call_or_redirect-expanded"><a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line">        <tt id="link-25" class="py-name" targets="Function web2py.gluon.http.redirect()=web2py.gluon.http-module.html#redirect"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-25', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line">        <tt id="link-26" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-26', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
</div><a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"> </tt>
<a name="Mail"></a><div id="Mail-def"><a name="L66"></a><tt class="py-lineno">  66</tt> <a class="py-toggle" href="#" id="Mail-toggle" onclick="return toggle('Mail');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Mail-class.html">Mail</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Mail-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Mail-expanded"><a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line"><tt class="py-docstring">    Class for configuring and sending emails with alternative text / html</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line"><tt class="py-docstring">    body, multiple attachments and encryption support</tt> </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-docstring">    Works with SMTP and Google App Engine.</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"> </tt>
<a name="Mail.Attachment"></a><div id="Mail.Attachment-def"><a name="L74"></a><tt class="py-lineno">  74</tt> <a class="py-toggle" href="#" id="Mail.Attachment-toggle" onclick="return toggle('Mail.Attachment');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Mail.Attachment-class.html">Attachment</a><tt class="py-op">(</tt><tt class="py-base-class">MIMEBase</tt><tt class="py-op">.</tt><tt class="py-base-class">MIMEBase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Mail.Attachment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Mail.Attachment-expanded"><a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line"><tt class="py-docstring">        Email attachment</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"><tt class="py-docstring">        Arguments::</tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line"><tt class="py-docstring">            payload: path to file or file-like object with read() method</tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"><tt class="py-docstring">            filename: name of the attachment stored in message; if set to</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line"><tt class="py-docstring">                      None, it will be fetched from payload path; file-like</tt> </tt>
<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line"><tt class="py-docstring">                      object payload must have explicit filename specified</tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"><tt class="py-docstring">            content_id: id of the attachment; automatically contained within</tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt class="py-docstring">                        &lt; and &gt;</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line"><tt class="py-docstring">            content_type: content type of the attachment; if set to None,</tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-docstring">                          it will be fetched from filename using gluon.contenttype</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-docstring">                          module</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line"><tt class="py-docstring">            encoding: encoding of all strings passed to this function (except</tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-docstring">                      attachment body)</tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line"><tt class="py-docstring">        Content ID is used to identify attachments within the html body;</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line"><tt class="py-docstring">        in example, attached image with content ID 'photo' may be used in</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"><tt class="py-docstring">        html message as a source of img tag &lt;img src="cid:photo" /&gt;.</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-docstring">        Examples::</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-docstring">            #Create attachment from text file:</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line"><tt class="py-docstring">            attachment = Mail.Attachment('/path/to/file.txt')</tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Type: text/plain</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line"><tt class="py-docstring">            MIME-Version: 1.0</tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Disposition: attachment; filename="file.txt"</tt> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Transfer-Encoding: base64</tt> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line"><tt class="py-docstring">            SOMEBASE64CONTENT=</tt> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring">            #Create attachment from image file with custom filename and cid:</tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring">            attachment = Mail.Attachment('/path/to/file.png',</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">                                             filename='photo.png',</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"><tt class="py-docstring">                                             content_id='photo')</tt> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Type: image/png</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"><tt class="py-docstring">            MIME-Version: 1.0</tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Disposition: attachment; filename="photo.png"</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Id: &lt;photo&gt;</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-docstring">            Content-Transfer-Encoding: base64</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring">            SOMEOTHERBASE64CONTENT=</tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"> </tt>
<a name="Mail.Attachment.__init__"></a><div id="Mail.Attachment.__init__-def"><a name="L122"></a><tt class="py-lineno"> 122</tt> <a class="py-toggle" href="#" id="Mail.Attachment.__init__-toggle" onclick="return toggle('Mail.Attachment.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Mail.Attachment-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line">            <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line">            <tt class="py-param">payload</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line">            <tt class="py-param">filename</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line">            <tt class="py-param">content_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line">            <tt class="py-param">content_type</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line">            <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Mail.Attachment.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="Mail.Attachment.__init__-expanded"><a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">payload</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">                    <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">basename</tt><tt class="py-op">(</tt><tt class="py-name">payload</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">                <tt class="py-name">payload</tt> <tt class="py-op">=</tt> <tt id="link-27" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-27', 'read_file', 'link-14');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-name">payload</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">filename</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-28" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-28', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">(</tt><tt class="py-string">'Missing attachment name'</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">                <tt class="py-name">payload</tt> <tt class="py-op">=</tt> <tt class="py-name">payload</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-29', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-30', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">content_type</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">                <tt class="py-name">content_type</tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="web2py.gluon.contenttype
web2py.gluon.contenttype.contenttype" class="py-name" href="#" onclick="return doclink('link-31', 'contenttype', 'link-3');">contenttype</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">my_filename</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> </tt>
<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">my_payload</tt> <tt class="py-op">=</tt> <tt class="py-name">payload</tt> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line">            <tt class="py-name">MIMEBase</tt><tt class="py-op">.</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-32', '__init__', 'link-32');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">content_type</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">set_payload</tt><tt class="py-op">(</tt><tt class="py-name">payload</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Disposition'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'attachment; filename="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-name">filename</tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">content_id</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Id'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">content_id</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-33', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line">            <tt class="py-name">Encoders</tt><tt class="py-op">.</tt><tt class="py-name">encode_base64</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"> </tt>
<a name="Mail.__init__"></a><div id="Mail.__init__-def"><a name="L149"></a><tt class="py-lineno"> 149</tt> <a class="py-toggle" href="#" id="Mail.__init__-toggle" onclick="return toggle('Mail.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Mail-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">server</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">sender</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">login</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">tls</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Mail.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Mail.__init__-expanded"><a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring">        Main Mail object</tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">        Arguments::</tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring">            server: SMTP server address in address:port notation</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">            sender: sender email address</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring">            login: sender login name and password in login:password notation</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring">                   or None if no authentication is required</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"><tt class="py-docstring">            tls: enables/disables encryption (True by default)</tt> </tt>
<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line"><tt class="py-docstring">        In Google App Engine use::</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line"><tt class="py-docstring">            server='gae'</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"><tt class="py-docstring">        For sake of backward compatibility all fields are optional and default</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line"><tt class="py-docstring">        to None, however, to be able to send emails at least server and sender</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"><tt class="py-docstring">        must be specified. They are available under following fields:</tt> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.server</tt> </tt>
<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.sender</tt> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.login</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line"><tt class="py-docstring">        When server is 'logging', email is logged but not sent (debug mode)</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line"><tt class="py-docstring">        Optionally you can use PGP encryption or X509:</tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.cipher_type = None</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.sign = True</tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.sign_passphrase = None</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.encrypt = True</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.x509_sign_keyfile = None</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.x509_sign_certfile = None</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line"><tt class="py-docstring">            mail.settings.x509_crypt_certfiles = None</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line"><tt class="py-docstring">            cipher_type       : None</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"><tt class="py-docstring">                                gpg - need a python-pyme package and gpgme lib</tt> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line"><tt class="py-docstring">                                x509 - smime</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line"><tt class="py-docstring">            sign              : sign the message (True or False)</tt> </tt>
<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"><tt class="py-docstring">            sign_passphrase   : passphrase for key signing</tt> </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line"><tt class="py-docstring">            encrypt           : encrypt the message</tt> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line"><tt class="py-docstring">                             ... x509 only ...</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line"><tt class="py-docstring">            x509_sign_keyfile : the signers private key filename (PEM format)</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line"><tt class="py-docstring">            x509_sign_certfile: the signers certificate filename (PEM format)</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line"><tt class="py-docstring">            x509_crypt_certfiles: the certificates file to encrypt the messages</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line"><tt class="py-docstring">                                  with can be a file name or a list of</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line"><tt class="py-docstring">                                  file names (PEM format)</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line"><tt class="py-docstring">        Examples::</tt> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line"><tt class="py-docstring">            #Create Mail object with authentication data for remote server:</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line"><tt class="py-docstring">            mail = Mail('example.com:25', 'me@example.com', 'me:password')</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line"> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line">        <tt id="link-34" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-34', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-35', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt id="link-36" class="py-name"><a title="web2py.gluon.storage.Settings" class="py-name" href="#" onclick="return doclink('link-36', 'Settings', 'link-8');">Settings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line">        <tt id="link-37" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-37', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Variable web2py.gluon.winservice.Web2pyService.server=web2py.gluon.winservice.Web2pyService-class.html#server"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-38', 'server', 'link-38');">server</a></tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-39', 'server', 'link-38');">server</a></tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line">        <tt id="link-40" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-40', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt> <tt class="py-op">=</tt> <tt class="py-name">sender</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line">        <tt id="link-41" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-41', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-42" class="py-name" targets="Method web2py.gluon.tools.Auth.login()=web2py.gluon.tools.Auth-class.html#login"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-42', 'login', 'link-42');">login</a></tt> <tt class="py-op">=</tt> <tt id="link-43" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-43', 'login', 'link-42');">login</a></tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line">        <tt id="link-44" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-44', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">tls</tt> <tt class="py-op">=</tt> <tt class="py-name">tls</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">        <tt id="link-45" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-45', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Variable web2py.gluon.rocket.Connection.ssl=web2py.gluon.rocket.Connection-class.html#ssl"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-46', 'ssl', 'link-46');">ssl</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">        <tt id="link-47" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-47', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cipher_type</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">        <tt id="link-48" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-48', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sign</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line">        <tt id="link-49" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-49', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sign_passphrase</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">        <tt id="link-50" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-50', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">encrypt</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">        <tt id="link-51" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-51', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_sign_keyfile</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">        <tt id="link-52" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-52', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_sign_certfile</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">        <tt id="link-53" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-53', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_crypt_certfiles</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">        <tt id="link-54" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-54', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Module web2py.gluon.debug=web2py.gluon.debug-module.html"><a title="web2py.gluon.debug" class="py-name" href="#" onclick="return doclink('link-55', 'debug', 'link-55');">debug</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">        <tt id="link-56" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-56', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">lock_keys</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-57', 'error', 'link-57');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line"> </tt>
<a name="Mail.send"></a><div id="Mail.send-def"><a name="L222"></a><tt class="py-lineno"> 222</tt> <a class="py-toggle" href="#" id="Mail.send-toggle" onclick="return toggle('Mail.send');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Mail-class.html#send">send</a><tt class="py-op">(</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">        <tt class="py-param">to</tt><tt class="py-op">,</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">        <tt class="py-param">subject</tt><tt class="py-op">=</tt><tt class="py-string">'None'</tt><tt class="py-op">,</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">        <tt class="py-param">message</tt><tt class="py-op">=</tt><tt class="py-string">'None'</tt><tt class="py-op">,</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">        <tt class="py-param">attachments</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">        <tt class="py-param">cc</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">        <tt class="py-param">bcc</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">        <tt class="py-param">reply_to</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">        <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">,</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Mail.send-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Mail.send-expanded"><a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"><tt class="py-docstring">        Sends an email using data specified in constructor</tt> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line"><tt class="py-docstring">        Arguments::</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line"><tt class="py-docstring">            to: list or tuple of receiver addresses; will also accept single</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line"><tt class="py-docstring">                object</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line"><tt class="py-docstring">            subject: subject of the email</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line"><tt class="py-docstring">            message: email body text; depends on type of passed object:</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line"><tt class="py-docstring">                     if 2-list or 2-tuple is passed: first element will be</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line"><tt class="py-docstring">                     source of plain text while second of html text;</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line"><tt class="py-docstring">                     otherwise: object will be the only source of plain text</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line"><tt class="py-docstring">                     and html source will be set to None;</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line"><tt class="py-docstring">                     If text or html source is:</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line"><tt class="py-docstring">                     None: content part will be ignored,</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line"><tt class="py-docstring">                     string: content part will be set to it,</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line"><tt class="py-docstring">                     file-like object: content part will be fetched from</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line"><tt class="py-docstring">                                       it using it's read() method</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line"><tt class="py-docstring">            attachments: list or tuple of Mail.Attachment objects; will also</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line"><tt class="py-docstring">                         accept single object</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line"><tt class="py-docstring">            cc: list or tuple of carbon copy receiver addresses; will also</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line"><tt class="py-docstring">                accept single object</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line"><tt class="py-docstring">            bcc: list or tuple of blind carbon copy receiver addresses; will</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line"><tt class="py-docstring">                also accept single object</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line"><tt class="py-docstring">            reply_to: address to which reply should be composed</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line"><tt class="py-docstring">            encoding: encoding of all strings passed to this method (including</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line"><tt class="py-docstring">                      message bodies)</tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line"><tt class="py-docstring">        Examples::</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line"><tt class="py-docstring">            #Send plain text message to single address:</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line"><tt class="py-docstring">            mail.send('you@example.com',</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"><tt class="py-docstring">                      'Message subject',</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line"><tt class="py-docstring">                      'Plain text body of the message')</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line"><tt class="py-docstring">            #Send html message to single address:</tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line"><tt class="py-docstring">            mail.send('you@example.com',</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line"><tt class="py-docstring">                      'Message subject',</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line"><tt class="py-docstring">                      '&lt;html&gt;Plain text body of the message&lt;/html&gt;')</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line"><tt class="py-docstring">            #Send text and html message to three addresses (two in cc):</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line"><tt class="py-docstring">            mail.send('you@example.com',</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-docstring">                      'Message subject',</tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"><tt class="py-docstring">                      ('Plain text body', '&lt;html&gt;html body&lt;/html&gt;'),</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line"><tt class="py-docstring">                      cc=['other1@example.com', 'other2@example.com'])</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line"><tt class="py-docstring">            #Send html only message with image attachment available from</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line"><tt class="py-docstring">            the message by 'photo' content id:</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line"><tt class="py-docstring">            mail.send('you@example.com',</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line"><tt class="py-docstring">                      'Message subject',</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"><tt class="py-docstring">                      (None, '&lt;html&gt;&lt;img src="cid:photo" /&gt;&lt;/html&gt;'),</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line"><tt class="py-docstring">                      Mail.Attachment('/path/to/photo.jpg'</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"><tt class="py-docstring">                                      content_id='photo'))</tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line"><tt class="py-docstring">            #Send email with two attachments and no body text</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line"><tt class="py-docstring">            mail.send('you@example.com,</tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line"><tt class="py-docstring">                      'Message subject',</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line"><tt class="py-docstring">                      None,</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line"><tt class="py-docstring">                      [Mail.Attachment('/path/to/fist.file'),</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line"><tt class="py-docstring">                       Mail.Attachment('/path/to/second.file')])</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line"><tt class="py-docstring">        Returns True on success, False on failure.</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"><tt class="py-docstring">        Before return, method updates two object's fields:</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line"><tt class="py-docstring">        self.result: return value of smtplib.SMTP.sendmail() or GAE's</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line"><tt class="py-docstring">                     mail.send_mail() method</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line"><tt class="py-docstring">        self.error: Exception message or None if above was successful</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line"> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">encode_header</tt><tt class="py-op">(</tt><tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-op">[</tt><tt class="py-name">c</tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">key</tt> <tt class="py-keyword">if</tt> <tt class="py-number">32</tt><tt class="py-op">&gt;</tt><tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-number">127</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">Header</tt><tt class="py-op">.</tt><tt class="py-name">Header</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-58', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">key</tt> </tt>
</div><a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line"> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-59', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-60', 'server', 'link-38');">server</a></tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-61" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-61', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">(</tt><tt class="py-string">'Server address not specified'</tt><tt class="py-op">)</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-62', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-63" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-63', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">(</tt><tt class="py-string">'Sender address not specified'</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line">        <tt class="py-name">payload_in</tt> <tt class="py-op">=</tt> <tt class="py-name">MIMEMultipart</tt><tt class="py-op">.</tt><tt class="py-name">MIMEMultipart</tt><tt class="py-op">(</tt><tt class="py-string">'mixed'</tt><tt class="py-op">)</tt> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-64" class="py-name" targets="Method web2py.gluon.http.HTTP.to()=web2py.gluon.http.HTTP-class.html#to"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-64', 'to', 'link-64');">to</a></tt><tt class="py-op">:</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-65', 'to', 'link-64');">to</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt><tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">                <tt id="link-66" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-66', 'to', 'link-64');">to</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-67', 'to', 'link-64');">to</a></tt><tt class="py-op">]</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-68" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-68', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">(</tt><tt class="py-string">'Target receiver address not specified'</tt><tt class="py-op">)</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">cc</tt><tt class="py-op">:</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">cc</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">                <tt class="py-name">cc</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">cc</tt><tt class="py-op">]</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">bcc</tt><tt class="py-op">:</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">bcc</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">                <tt class="py-name">bcc</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">bcc</tt><tt class="py-op">]</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-69" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-69', 'message', 'link-69');">message</a></tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt id="link-70" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-70', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-71" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-71', 'message', 'link-69');">message</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">            <tt class="py-name">text</tt><tt class="py-op">,</tt> <tt id="link-72" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-72', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt id="link-73" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-73', 'message', 'link-69');">message</a></tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-74" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-74', 'message', 'link-69');">message</a></tt><tt class="py-op">.</tt><tt id="link-75" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-75', 'strip', 'link-75');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name" targets="Method web2py.gluon.dal.Expression.startswith()=web2py.gluon.dal.Expression-class.html#startswith,Method web2py.gluon.dal.SQLCustomType.startswith()=web2py.gluon.dal.SQLCustomType-class.html#startswith"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-76', 'startswith', 'link-76');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;html'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-77" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-77', 'message', 'link-69');">message</a></tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-78', 'strip', 'link-75');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-79', 'endswith', 'link-79');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;/html&gt;'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-80', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-81', 'server', 'link-38');">server</a></tt><tt class="py-op">==</tt><tt class="py-string">'gae'</tt> <tt class="py-keyword">and</tt> <tt id="link-82" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-82', 'message', 'link-69');">message</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">None</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">            <tt id="link-83" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-83', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt id="link-84" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-84', 'message', 'link-69');">message</a></tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt id="link-85" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-85', 'message', 'link-69');">message</a></tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">            <tt id="link-86" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-86', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">text</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt id="link-87" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-87', 'html', 'link-70');">html</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">            <tt class="py-name">attachment</tt> <tt class="py-op">=</tt> <tt class="py-name">MIMEMultipart</tt><tt class="py-op">.</tt><tt class="py-name">MIMEMultipart</tt><tt class="py-op">(</tt><tt class="py-string">'alternative'</tt><tt class="py-op">)</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">text</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">                    <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-88', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-89', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">                    <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-90', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-91', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-92', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">                <tt class="py-name">attachment</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">MIMEText</tt><tt class="py-op">.</tt><tt class="py-name">MIMEText</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-name">_charset</tt><tt class="py-op">=</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-93" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-93', 'html', 'link-70');">html</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-94" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-94', 'html', 'link-70');">html</a></tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">                    <tt id="link-95" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-95', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt id="link-96" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-96', 'html', 'link-70');">html</a></tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-97', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-98', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">                    <tt id="link-99" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-99', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-100', 'html', 'link-70');">html</a></tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-101', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-102', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-103', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line">                <tt class="py-name">attachment</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">MIMEText</tt><tt class="py-op">.</tt><tt class="py-name">MIMEText</tt><tt class="py-op">(</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-104', 'html', 'link-70');">html</a></tt><tt class="py-op">,</tt> <tt class="py-string">'html'</tt><tt class="py-op">,</tt><tt class="py-name">_charset</tt><tt class="py-op">=</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">            <tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">attachment</tt><tt class="py-op">)</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">attachments</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">attachments</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">attachment</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attachments</tt><tt class="py-op">:</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">                <tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">attachment</tt><tt class="py-op">)</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">            <tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">attachments</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line"> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line"> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">        <tt class="py-comment">#######################################################</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#                      CIPHER                         #</tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#######################################################</tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">cipher_type</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-105', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cipher_type</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">        <tt class="py-name">sign</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-106', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sign</tt> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-name">sign_passphrase</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-107', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sign_passphrase</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">        <tt class="py-name">encrypt</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-108', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">encrypt</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-comment">#######################################################</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#                       GPGME                         #</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#######################################################</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">cipher_type</tt> <tt class="py-op">==</tt> <tt class="py-string">'gpg'</tt><tt class="py-op">:</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">sign</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">encrypt</tt><tt class="py-op">:</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-109', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">"No sign and no encrypt is set but cipher type to gpg"</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line"> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">            <tt class="py-comment"># need a python-pyme package and gpgme lib</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">from</tt> <tt class="py-name">pyme</tt> <tt class="py-keyword">import</tt> <tt class="py-name">core</tt><tt class="py-op">,</tt> <tt class="py-name">errors</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">            <tt class="py-keyword">from</tt> <tt class="py-name">pyme</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name" targets="Package web2py.gluon.contrib.pymysql.constants=web2py.gluon.contrib.pymysql.constants-module.html"><a title="web2py.gluon.contrib.pymysql.constants" class="py-name" href="#" onclick="return doclink('link-110', 'constants', 'link-110');">constants</a></tt><tt class="py-op">.</tt><tt class="py-name">sig</tt> <tt class="py-keyword">import</tt> <tt class="py-name">mode</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">            <tt class="py-comment">############################################</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#                   sign                   #</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">############################################</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">sign</tt><tt class="py-op">:</tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">                <tt class="py-keyword">import</tt> <tt class="py-name">string</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">                <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">check_version</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">                <tt class="py-name">pin</tt><tt class="py-op">=</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">                <tt class="py-name">plain</tt> <tt class="py-op">=</tt> <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">Data</tt><tt class="py-op">(</tt><tt class="py-name">pin</tt><tt class="py-op">)</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">                <tt class="py-name">sig</tt> <tt class="py-op">=</tt> <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">Data</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">                <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">Context</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">set_armor</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">signers_clear</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">                <tt class="py-comment"># search for signing key for From:</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">for</tt> <tt class="py-name">sigkey</tt> <tt class="py-keyword">in</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">op_keylist_all</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-111', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">sigkey</tt><tt class="py-op">.</tt><tt class="py-name">can_sign</tt><tt class="py-op">:</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">                        <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">signers_add</tt><tt class="py-op">(</tt><tt class="py-name">sigkey</tt><tt class="py-op">)</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">signers_enum</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-112', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">'No key for signing [%s]'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-113', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">set_passphrase_cb</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt id="link-114" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-114', 'x', 'link-114');">x</a></tt><tt class="py-op">,</tt><tt class="py-name">y</tt><tt class="py-op">,</tt><tt class="py-name">z</tt><tt class="py-op">:</tt> <tt class="py-name">sign_passphrase</tt><tt class="py-op">)</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">                    <tt class="py-comment"># make a signature</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">op_sign</tt><tt class="py-op">(</tt><tt class="py-name">plain</tt><tt class="py-op">,</tt><tt class="py-name">sig</tt><tt class="py-op">,</tt><tt class="py-name">mode</tt><tt class="py-op">.</tt><tt class="py-name">DETACH</tt><tt class="py-op">)</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">                    <tt class="py-name">sig</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">                    <tt class="py-comment"># make it part of the email</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">payload</tt><tt class="py-op">=</tt><tt class="py-name">MIMEMultipart</tt><tt class="py-op">.</tt><tt class="py-name">MIMEMultipart</tt><tt class="py-op">(</tt><tt class="py-string">'signed'</tt><tt class="py-op">,</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">                                                        <tt class="py-name">boundary</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">                                                        <tt class="py-name">_subparts</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">                                                        <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">micalg</tt><tt class="py-op">=</tt><tt class="py-string">"pgp-sha1"</tt><tt class="py-op">,</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">                                                               <tt class="py-name">protocol</tt><tt class="py-op">=</tt><tt class="py-string">"application/pgp-signature"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">                    <tt class="py-comment"># insert the origin payload</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">payload</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">)</tt> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">                    <tt class="py-comment"># insert the detached signature</tt> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">p</tt><tt class="py-op">=</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">.</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">(</tt><tt class="py-string">"application"</tt><tt class="py-op">,</tt><tt class="py-string">'pgp-signature'</tt><tt class="py-op">)</tt> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line">                    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">set_payload</tt><tt class="py-op">(</tt><tt class="py-name">sig</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-115', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">                    <tt class="py-name">payload</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">                    <tt class="py-comment"># it's just a trick to handle the no encryption case</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">payload_in</tt><tt class="py-op">=</tt><tt class="py-name">payload</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">errors</tt><tt class="py-op">.</tt><tt class="py-name">GPGMEError</tt><tt class="py-op">,</tt> <tt class="py-name">ex</tt><tt class="py-op">:</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-116', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">"GPG error: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">ex</tt><tt class="py-op">.</tt><tt class="py-name">getstring</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">            <tt class="py-comment">############################################</tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#                  encrypt                 #</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">############################################</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">encrypt</tt><tt class="py-op">:</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">                <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">check_version</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">                <tt class="py-name">plain</tt> <tt class="py-op">=</tt> <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">Data</tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">                <tt class="py-name">cipher</tt> <tt class="py-op">=</tt> <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">Data</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">                <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">core</tt><tt class="py-op">.</tt><tt class="py-name">Context</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">                <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">set_armor</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">                <tt class="py-comment"># collect the public keys for encryption</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">recipients</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line">                <tt class="py-name">rec</tt><tt class="py-op">=</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-117', 'to', 'link-64');">to</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">cc</tt><tt class="py-op">:</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">                    <tt class="py-name">rec</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name" targets="Method web2py.gluon.template.BlockNode.extend()=web2py.gluon.template.BlockNode-class.html#extend,Method web2py.gluon.template.Content.extend()=web2py.gluon.template.Content-class.html#extend,Method web2py.gluon.template.TemplateParser.extend()=web2py.gluon.template.TemplateParser-class.html#extend"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-118', 'extend', 'link-118');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">cc</tt><tt class="py-op">)</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">bcc</tt><tt class="py-op">:</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">                    <tt class="py-name">rec</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-119', 'extend', 'link-118');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">bcc</tt><tt class="py-op">)</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">addr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">rec</tt><tt class="py-op">:</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">                    <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">op_keylist_start</tt><tt class="py-op">(</tt><tt class="py-name">addr</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line">                    <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">op_keylist_next</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">r</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-120', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">'No key for [%s]'</tt> <tt class="py-op">%</tt> <tt class="py-name">addr</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">                    <tt class="py-name">recipients</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-121', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">                    <tt class="py-comment"># make the encryption</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">op_encrypt</tt><tt class="py-op">(</tt><tt class="py-name">recipients</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">plain</tt><tt class="py-op">,</tt> <tt class="py-name">cipher</tt><tt class="py-op">)</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">                    <tt class="py-name">cipher</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line">                    <tt class="py-comment"># make it a part of the email</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">payload</tt><tt class="py-op">=</tt><tt class="py-name">MIMEMultipart</tt><tt class="py-op">.</tt><tt class="py-name">MIMEMultipart</tt><tt class="py-op">(</tt><tt class="py-string">'encrypted'</tt><tt class="py-op">,</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">                                                        <tt class="py-name">boundary</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">                                                        <tt class="py-name">_subparts</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">                                                        <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">protocol</tt><tt class="py-op">=</tt><tt class="py-string">"application/pgp-encrypted"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">                    <tt class="py-name">p</tt><tt class="py-op">=</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">.</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">(</tt><tt class="py-string">"application"</tt><tt class="py-op">,</tt><tt class="py-string">'pgp-encrypted'</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">                    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">set_payload</tt><tt class="py-op">(</tt><tt class="py-string">"Version: 1\r\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">                    <tt class="py-name">payload</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line">                    <tt class="py-name">p</tt><tt class="py-op">=</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">.</tt><tt class="py-name">MIMEBase</tt><tt class="py-op">(</tt><tt class="py-string">"application"</tt><tt class="py-op">,</tt><tt class="py-string">'octet-stream'</tt><tt class="py-op">)</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line">                    <tt class="py-name">p</tt><tt class="py-op">.</tt><tt class="py-name">set_payload</tt><tt class="py-op">(</tt><tt class="py-name">cipher</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-122', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">                    <tt class="py-name">payload</tt><tt class="py-op">.</tt><tt class="py-name">attach</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">errors</tt><tt class="py-op">.</tt><tt class="py-name">GPGMEError</tt><tt class="py-op">,</tt> <tt class="py-name">ex</tt><tt class="py-op">:</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-123', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">"GPG error: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">ex</tt><tt class="py-op">.</tt><tt class="py-name">getstring</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line">        <tt class="py-comment">#######################################################</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#                       X.509                         #</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#######################################################</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">elif</tt> <tt class="py-name">cipher_type</tt> <tt class="py-op">==</tt> <tt class="py-string">'x509'</tt><tt class="py-op">:</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">sign</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">encrypt</tt><tt class="py-op">:</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-124', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">"No sign and no encrypt is set but cipher type to x509"</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">            <tt class="py-name">x509_sign_keyfile</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-125', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_sign_keyfile</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-126', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_sign_certfile</tt><tt class="py-op">:</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">                <tt class="py-name">x509_sign_certfile</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-127', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_sign_certfile</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">                <tt class="py-comment"># if there is no sign certfile we'll assume the</tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># cert is in keyfile</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">x509_sign_certfile</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-128', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_sign_keyfile</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">            <tt class="py-comment"># crypt certfiles could be a string or a list</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">x509_crypt_certfiles</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-129', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">x509_crypt_certfiles</tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line"> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line"> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line">            <tt class="py-comment"># need m2crypto</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">from</tt> <tt class="py-name">M2Crypto</tt> <tt class="py-keyword">import</tt> <tt class="py-name">BIO</tt><tt class="py-op">,</tt> <tt class="py-name">SMIME</tt><tt class="py-op">,</tt> <tt class="py-name">X509</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">            <tt class="py-name">msg_bio</tt> <tt class="py-op">=</tt> <tt class="py-name">BIO</tt><tt class="py-op">.</tt><tt class="py-name">MemoryBuffer</tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line">            <tt id="link-130" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-130', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">SMIME</tt><tt class="py-op">.</tt><tt class="py-name">SMIME</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line"> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">            <tt class="py-comment">#                   SIGN</tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">sign</tt><tt class="py-op">:</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line">                <tt class="py-comment">#key for signing</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line">                    <tt id="link-131" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-131', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">load_key</tt><tt class="py-op">(</tt><tt class="py-name">x509_sign_keyfile</tt><tt class="py-op">,</tt> <tt class="py-name">x509_sign_certfile</tt><tt class="py-op">,</tt> <tt id="link-132" class="py-name" targets="Method web2py.gluon.sqlhtml.AutocompleteWidget.callback()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#callback,Function web2py.gluon.tools.callback()=web2py.gluon.tools-module.html#callback"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-132', 'callback', 'link-132');">callback</a></tt><tt class="py-op">=</tt><tt class="py-keyword">lambda</tt> <tt id="link-133" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-133', 'x', 'link-114');">x</a></tt><tt class="py-op">:</tt> <tt class="py-name">sign_passphrase</tt><tt class="py-op">)</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">encrypt</tt><tt class="py-op">:</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">                        <tt class="py-name">p7</tt> <tt class="py-op">=</tt> <tt id="link-134" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-134', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">sign</tt><tt class="py-op">(</tt><tt class="py-name">msg_bio</tt><tt class="py-op">)</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line">                        <tt class="py-name">p7</tt> <tt class="py-op">=</tt> <tt id="link-135" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-135', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">sign</tt><tt class="py-op">(</tt><tt class="py-name">msg_bio</tt><tt class="py-op">,</tt><tt class="py-name">flags</tt><tt class="py-op">=</tt><tt class="py-name">SMIME</tt><tt class="py-op">.</tt><tt class="py-name">PKCS7_DETACHED</tt><tt class="py-op">)</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">                    <tt class="py-name">msg_bio</tt> <tt class="py-op">=</tt> <tt class="py-name">BIO</tt><tt class="py-op">.</tt><tt class="py-name">MemoryBuffer</tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-comment"># Recreate coz sign() has consumed it.</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt id="link-136" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-136', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">,</tt><tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-137', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">"Something went wrong on signing: &lt;%s&gt;"</tt> <tt class="py-op">%</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line">            <tt class="py-comment">#                   ENCRYPT</tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">encrypt</tt><tt class="py-op">:</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line">                    <tt class="py-name">sk</tt> <tt class="py-op">=</tt> <tt class="py-name">X509</tt><tt class="py-op">.</tt><tt class="py-name">X509_Stack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">x509_crypt_certfiles</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line">                        <tt class="py-name">x509_crypt_certfiles</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">x509_crypt_certfiles</tt><tt class="py-op">]</tt> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line"> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line">                    <tt class="py-comment"># make an encryption cert's stack</tt> </tt>
<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">for</tt> <tt id="link-138" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-138', 'x', 'link-114');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">x509_crypt_certfiles</tt><tt class="py-op">:</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line">                        <tt class="py-name">sk</tt><tt class="py-op">.</tt><tt class="py-name">push</tt><tt class="py-op">(</tt><tt class="py-name">X509</tt><tt class="py-op">.</tt><tt class="py-name">load_cert</tt><tt class="py-op">(</tt><tt id="link-139" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-139', 'x', 'link-114');">x</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">                    <tt id="link-140" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-140', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">set_x509_stack</tt><tt class="py-op">(</tt><tt class="py-name">sk</tt><tt class="py-op">)</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line">                    <tt id="link-141" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-141', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">set_cipher</tt><tt class="py-op">(</tt><tt class="py-name">SMIME</tt><tt class="py-op">.</tt><tt class="py-name">Cipher</tt><tt class="py-op">(</tt><tt class="py-string">'des_ede3_cbc'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">                    <tt class="py-name">tmp_bio</tt> <tt class="py-op">=</tt> <tt class="py-name">BIO</tt><tt class="py-op">.</tt><tt class="py-name">MemoryBuffer</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">sign</tt><tt class="py-op">:</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line">                        <tt id="link-142" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-142', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-143" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-143', 'write', 'link-143');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">tmp_bio</tt><tt class="py-op">,</tt> <tt class="py-name">p7</tt><tt class="py-op">)</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line">                        <tt class="py-name">tmp_bio</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-144', 'write', 'link-143');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line">                    <tt class="py-name">p7</tt> <tt class="py-op">=</tt> <tt id="link-145" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-145', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">encrypt</tt><tt class="py-op">(</tt><tt class="py-name">tmp_bio</tt><tt class="py-op">)</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt id="link-146" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-146', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">,</tt><tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-147', 'error', 'link-57');">error</a></tt><tt class="py-op">=</tt><tt class="py-string">"Something went wrong on encrypting: &lt;%s&gt;"</tt> <tt class="py-op">%</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">            <tt class="py-comment">#                 Final stage in sign and encryption</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">out</tt> <tt class="py-op">=</tt> <tt class="py-name">BIO</tt><tt class="py-op">.</tt><tt class="py-name">MemoryBuffer</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">encrypt</tt><tt class="py-op">:</tt> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">                <tt id="link-148" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-148', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-149', 'write', 'link-143');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">out</tt><tt class="py-op">,</tt> <tt class="py-name">p7</tt><tt class="py-op">)</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">sign</tt><tt class="py-op">:</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line">                    <tt id="link-150" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-150', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-151', 'write', 'link-143');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">out</tt><tt class="py-op">,</tt> <tt class="py-name">p7</tt><tt class="py-op">,</tt> <tt class="py-name">msg_bio</tt><tt class="py-op">,</tt> <tt class="py-name">SMIME</tt><tt class="py-op">.</tt><tt class="py-name">PKCS7_DETACHED</tt><tt class="py-op">)</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line">                    <tt class="py-name">out</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-152', 'write', 'link-143');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line">                    <tt class="py-name">out</tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-153', 'write', 'link-143');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">payload_in</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line">            <tt class="py-name">out</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-154', 'close', 'link-154');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line">            <tt class="py-name">st</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">out</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-155', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line">            <tt class="py-name">payload</tt><tt class="py-op">=</tt><tt class="py-name">message_from_string</tt><tt class="py-op">(</tt><tt class="py-name">st</tt><tt class="py-op">)</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line">            <tt class="py-comment"># no cryptography process as usual</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">payload</tt><tt class="py-op">=</tt><tt class="py-name">payload_in</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line">        <tt class="py-name">payload</tt><tt class="py-op">[</tt><tt class="py-string">'From'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">encode_header</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-156', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">.</tt><tt id="link-157" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-157', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line">        <tt class="py-name">origTo</tt> <tt class="py-op">=</tt> <tt id="link-158" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-158', 'to', 'link-64');">to</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-159" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-159', 'to', 'link-64');">to</a></tt><tt class="py-op">:</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line">            <tt class="py-name">payload</tt><tt class="py-op">[</tt><tt class="py-string">'To'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">encode_header</tt><tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-160', 'join', 'link-160');">join</a></tt><tt class="py-op">(</tt><tt id="link-161" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-161', 'to', 'link-64');">to</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-162', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">reply_to</tt><tt class="py-op">:</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line">            <tt class="py-name">payload</tt><tt class="py-op">[</tt><tt class="py-string">'Reply-To'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">encode_header</tt><tt class="py-op">(</tt><tt class="py-name">reply_to</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-163', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">cc</tt><tt class="py-op">:</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line">            <tt class="py-name">payload</tt><tt class="py-op">[</tt><tt class="py-string">'Cc'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">encode_header</tt><tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-164', 'join', 'link-160');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">cc</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-165', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line">            <tt id="link-166" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-166', 'to', 'link-64');">to</a></tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-167', 'extend', 'link-118');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">cc</tt><tt class="py-op">)</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">bcc</tt><tt class="py-op">:</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line">            <tt id="link-168" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-168', 'to', 'link-64');">to</a></tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="web2py.gluon.template.BlockNode.extend
web2py.gluon.template.Content.extend
web2py.gluon.template.TemplateParser.extend" class="py-name" href="#" onclick="return doclink('link-169', 'extend', 'link-118');">extend</a></tt><tt class="py-op">(</tt><tt class="py-name">bcc</tt><tt class="py-op">)</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line">        <tt class="py-name">payload</tt><tt class="py-op">[</tt><tt class="py-string">'Subject'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">encode_header</tt><tt class="py-op">(</tt><tt class="py-name">subject</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-170', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line">        <tt class="py-name">payload</tt><tt class="py-op">[</tt><tt class="py-string">'Date'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-171" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-171', 'time', 'link-2');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-string">"%a, %d %b %Y %H:%M:%S +0000"</tt><tt class="py-op">,</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">                                        <tt id="link-172" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-172', 'time', 'link-2');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">gmtime</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line">        <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-173', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-174', 'server', 'link-38');">server</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'logging'</tt><tt class="py-op">:</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">                <tt id="link-175" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-175', 'logger', 'link-16');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'email not sent\n%s\nFrom: %s\nTo: %s\n\n%s\n%s\n'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line">                                 <tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">*</tt><tt class="py-number">40</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-176', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">                                  <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt id="link-177" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-177', 'join', 'link-160');">join</a></tt><tt class="py-op">(</tt><tt id="link-178" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-178', 'to', 'link-64');">to</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">text</tt> <tt class="py-keyword">or</tt> <tt id="link-179" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-179', 'html', 'link-70');">html</a></tt><tt class="py-op">,</tt><tt class="py-string">'-'</tt><tt class="py-op">*</tt><tt class="py-number">40</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-180', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-181', 'server', 'link-38');">server</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'gae'</tt><tt class="py-op">:</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">                <tt class="py-name">xcc</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">cc</tt><tt class="py-op">:</tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">                    <tt class="py-name">xcc</tt><tt class="py-op">[</tt><tt class="py-string">'cc'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">cc</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">bcc</tt><tt class="py-op">:</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">                    <tt class="py-name">xcc</tt><tt class="py-op">[</tt><tt class="py-string">'bcc'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">bcc</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">                <tt class="py-keyword">from</tt> <tt class="py-name">google</tt><tt class="py-op">.</tt><tt class="py-name">appengine</tt><tt class="py-op">.</tt><tt class="py-name">api</tt> <tt class="py-keyword">import</tt> <tt class="py-name">mail</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line">                <tt class="py-name">attachments</tt> <tt class="py-op">=</tt> <tt class="py-name">attachments</tt> <tt class="py-keyword">and</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt class="py-name">my_filename</tt><tt class="py-op">,</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt class="py-name">my_payload</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">a</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attachments</tt><tt class="py-op">]</tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">attachments</tt><tt class="py-op">:</tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line">                    <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">mail</tt><tt class="py-op">.</tt><tt class="py-name">send_mail</tt><tt class="py-op">(</tt><tt class="py-name">sender</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-182', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> <tt id="link-183" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-183', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">origTo</tt><tt class="py-op">,</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">                                            <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">subject</tt><tt class="py-op">,</tt> <tt class="py-name">body</tt><tt class="py-op">=</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt id="link-184" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-184', 'html', 'link-70');">html</a></tt><tt class="py-op">=</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-185', 'html', 'link-70');">html</a></tt><tt class="py-op">,</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">                                            <tt class="py-name">attachments</tt><tt class="py-op">=</tt><tt class="py-name">attachments</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">xcc</tt><tt class="py-op">)</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-186', 'html', 'link-70');">html</a></tt><tt class="py-op">:</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">                    <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">mail</tt><tt class="py-op">.</tt><tt class="py-name">send_mail</tt><tt class="py-op">(</tt><tt class="py-name">sender</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-187', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> <tt id="link-188" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-188', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">origTo</tt><tt class="py-op">,</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">                                            <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">subject</tt><tt class="py-op">,</tt> <tt class="py-name">body</tt><tt class="py-op">=</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt id="link-189" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-189', 'html', 'link-70');">html</a></tt><tt class="py-op">=</tt><tt id="link-190" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-190', 'html', 'link-70');">html</a></tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">xcc</tt><tt class="py-op">)</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">                    <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">mail</tt><tt class="py-op">.</tt><tt class="py-name">send_mail</tt><tt class="py-op">(</tt><tt class="py-name">sender</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-191', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> <tt id="link-192" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-192', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">origTo</tt><tt class="py-op">,</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">                                            <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">subject</tt><tt class="py-op">,</tt> <tt class="py-name">body</tt><tt class="py-op">=</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">xcc</tt><tt class="py-op">)</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">                <tt class="py-name">smtp_args</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-193', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-194', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-195', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-196', 'ssl', 'link-46');">ssl</a></tt><tt class="py-op">:</tt>  </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">                    <tt id="link-197" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-197', 'server', 'link-38');">server</a></tt> <tt class="py-op">=</tt> <tt class="py-name">smtplib</tt><tt class="py-op">.</tt><tt class="py-name">SMTP_SSL</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">smtp_args</tt><tt class="py-op">)</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt>  </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">                    <tt id="link-198" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-198', 'server', 'link-38');">server</a></tt> <tt class="py-op">=</tt> <tt class="py-name">smtplib</tt><tt class="py-op">.</tt><tt class="py-name">SMTP</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">smtp_args</tt><tt class="py-op">)</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-199" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-199', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">tls</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-200', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-201" class="py-name"><a title="web2py.gluon.rocket.Connection.ssl" class="py-name" href="#" onclick="return doclink('link-201', 'ssl', 'link-46');">ssl</a></tt><tt class="py-op">:</tt>                 </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">                    <tt id="link-202" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-202', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt class="py-name">ehlo</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">                    <tt id="link-203" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-203', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt class="py-name">starttls</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">                    <tt id="link-204" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-204', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt class="py-name">ehlo</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-205" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-205', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-206" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-206', 'login', 'link-42');">login</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">                    <tt id="link-207" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-207', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt id="link-208" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-208', 'login', 'link-42');">login</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-209', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-210" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-210', 'login', 'link-42');">login</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">                <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-211" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-211', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt class="py-name">sendmail</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-212', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">sender</tt><tt class="py-op">,</tt> <tt id="link-213" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-213', 'to', 'link-64');">to</a></tt><tt class="py-op">,</tt> <tt class="py-name">payload</tt><tt class="py-op">.</tt><tt class="py-name">as_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">                <tt id="link-214" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-214', 'server', 'link-38');">server</a></tt><tt class="py-op">.</tt><tt id="link-215" class="py-name" targets="Method web2py.gluon.widget.web2pyDialog.quit()=web2py.gluon.widget.web2pyDialog-class.html#quit"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-215', 'quit', 'link-215');">quit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-216" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-216', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">            <tt id="link-217" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-217', 'logger', 'link-16');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'Mail.send failure:%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-218', 'error', 'link-57');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-219" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-219', 'error', 'link-57');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div></div><a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line"> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line"> </tt>
<a name="Recaptcha"></a><div id="Recaptcha-def"><a name="L596"></a><tt class="py-lineno"> 596</tt> <a class="py-toggle" href="#" id="Recaptcha-toggle" onclick="return toggle('Recaptcha');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Recaptcha-class.html">Recaptcha</a><tt class="py-op">(</tt><tt class="py-base-class">DIV</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Recaptcha-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Recaptcha-expanded"><a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line"> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">    <tt id="link-220" class="py-name" targets="Variable web2py.gluon.tools.Recaptcha.API_SSL_SERVER=web2py.gluon.tools.Recaptcha-class.html#API_SSL_SERVER"><a title="web2py.gluon.tools.Recaptcha.API_SSL_SERVER" class="py-name" href="#" onclick="return doclink('link-220', 'API_SSL_SERVER', 'link-220');">API_SSL_SERVER</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'https://www.google.com/recaptcha/api'</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">    <tt id="link-221" class="py-name" targets="Variable web2py.gluon.tools.Recaptcha.API_SERVER=web2py.gluon.tools.Recaptcha-class.html#API_SERVER"><a title="web2py.gluon.tools.Recaptcha.API_SERVER" class="py-name" href="#" onclick="return doclink('link-221', 'API_SERVER', 'link-221');">API_SERVER</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'http://www.google.com/recaptcha/api'</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line">    <tt id="link-222" class="py-name" targets="Variable web2py.gluon.tools.Recaptcha.VERIFY_SERVER=web2py.gluon.tools.Recaptcha-class.html#VERIFY_SERVER"><a title="web2py.gluon.tools.Recaptcha.VERIFY_SERVER" class="py-name" href="#" onclick="return doclink('link-222', 'VERIFY_SERVER', 'link-222');">VERIFY_SERVER</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'http://www.google.com/recaptcha/api/verify'</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line"> </tt>
<a name="Recaptcha.__init__"></a><div id="Recaptcha.__init__-def"><a name="L602"></a><tt class="py-lineno"> 602</tt> <a class="py-toggle" href="#" id="Recaptcha.__init__-toggle" onclick="return toggle('Recaptcha.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Recaptcha-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">        <tt class="py-param">request</tt><tt class="py-op">,</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">        <tt class="py-param">public_key</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">        <tt class="py-param">private_key</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">        <tt class="py-param">use_ssl</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">        <tt class="py-param">error</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'invalid'</tt><tt class="py-op">,</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">        <tt class="py-param">label</tt> <tt class="py-op">=</tt> <tt class="py-string">'Verify:'</tt><tt class="py-op">,</tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">        <tt class="py-param">options</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Recaptcha.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Recaptcha.__init__-expanded"><a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-223" class="py-name" targets="Function web2py.gluon.shell.env()=web2py.gluon.shell-module.html#env"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-223', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">public_key</tt> <tt class="py-op">=</tt> <tt class="py-name">public_key</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">private_key</tt> <tt class="py-op">=</tt> <tt class="py-name">private_key</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">use_ssl</tt> <tt class="py-op">=</tt> <tt class="py-name">use_ssl</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-224" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-224', 'error', 'link-57');">error</a></tt> <tt class="py-op">=</tt> <tt id="link-225" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-225', 'error', 'link-57');">error</a></tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt> <tt class="py-op">=</tt> <tt id="link-226" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-226', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt class="py-name">label</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-227" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-227', 'options', 'link-227');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-228" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-228', 'options', 'link-227');">options</a></tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
</div><a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"> </tt>
<a name="Recaptcha._validate"></a><div id="Recaptcha._validate-def"><a name="L626"></a><tt class="py-lineno"> 626</tt> <a class="py-toggle" href="#" id="Recaptcha._validate-toggle" onclick="return toggle('Recaptcha._validate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Recaptcha-class.html#_validate">_validate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Recaptcha._validate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Recaptcha._validate-expanded"><a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line"> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line">        <tt class="py-comment"># for local testing:</tt> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line">        <tt class="py-name">recaptcha_challenge_field</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">recaptcha_challenge_field</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line">        <tt class="py-name">recaptcha_response_field</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">recaptcha_response_field</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line">        <tt class="py-name">private_key</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">private_key</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line">        <tt class="py-name">remoteip</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">recaptcha_response_field</tt> <tt class="py-keyword">and</tt> <tt class="py-name">recaptcha_challenge_field</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line">                 <tt class="py-keyword">and</tt> <tt id="link-229" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-229', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">recaptcha_response_field</tt><tt class="py-op">)</tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line">                 <tt class="py-keyword">and</tt> <tt id="link-230" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-230', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">recaptcha_challenge_field</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt class="py-string">'captcha'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">        <tt id="link-231" class="py-name" targets="Variable web2py.gluon.rewrite.params=web2py.gluon.rewrite-module.html#params"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-231', 'params', 'link-231');">params</a></tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-op">{</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">            <tt class="py-string">'privatekey'</tt><tt class="py-op">:</tt> <tt class="py-name">private_key</tt><tt class="py-op">,</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">            <tt class="py-string">'remoteip'</tt><tt class="py-op">:</tt> <tt class="py-name">remoteip</tt><tt class="py-op">,</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line">            <tt class="py-string">'challenge'</tt><tt class="py-op">:</tt> <tt class="py-name">recaptcha_challenge_field</tt><tt class="py-op">,</tt> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line">            <tt class="py-string">'response'</tt><tt class="py-op">:</tt> <tt class="py-name">recaptcha_response_field</tt><tt class="py-op">,</tt> </tt>
<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line">            <tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt id="link-232" class="py-name" targets="Class web2py.gluon.globals.Request=web2py.gluon.globals.Request-class.html"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-232', 'Request', 'link-232');">Request</a></tt><tt class="py-op">(</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">            <tt id="link-233" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-233', 'url', 'link-233');">url</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-234" class="py-name"><a title="web2py.gluon.tools.Recaptcha.VERIFY_SERVER" class="py-name" href="#" onclick="return doclink('link-234', 'VERIFY_SERVER', 'link-222');">VERIFY_SERVER</a></tt><tt class="py-op">,</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">            <tt class="py-name">data</tt><tt class="py-op">=</tt><tt id="link-235" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-235', 'params', 'link-231');">params</a></tt><tt class="py-op">,</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'Content-type'</tt><tt class="py-op">:</tt> <tt class="py-string">'application/x-www-form-urlencoded'</tt><tt class="py-op">,</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line">                        <tt class="py-string">'User-agent'</tt><tt class="py-op">:</tt> <tt class="py-string">'reCAPTCHA Python'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">        <tt class="py-name">httpresp</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">urlopen</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">        <tt class="py-name">return_values</tt> <tt class="py-op">=</tt> <tt class="py-name">httpresp</tt><tt class="py-op">.</tt><tt id="link-236" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-236', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">        <tt class="py-name">httpresp</tt><tt class="py-op">.</tt><tt id="link-237" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-237', 'close', 'link-154');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">        <tt class="py-name">return_code</tt> <tt class="py-op">=</tt> <tt class="py-name">return_values</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">return_code</tt> <tt class="py-op">==</tt> <tt class="py-string">'true'</tt><tt class="py-op">:</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">recaptcha_challenge_field</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">recaptcha_response_field</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">request_vars</tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt class="py-string">'captcha'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line"> </tt>
<a name="Recaptcha.xml"></a><div id="Recaptcha.xml-def"><a name="L664"></a><tt class="py-lineno"> 664</tt> <a class="py-toggle" href="#" id="Recaptcha.xml-toggle" onclick="return toggle('Recaptcha.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Recaptcha-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Recaptcha.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Recaptcha.xml-expanded"><a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">        <tt class="py-name">public_key</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">public_key</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">        <tt class="py-name">use_ssl</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">use_ssl</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">        <tt class="py-name">error_param</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-238" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-238', 'error', 'link-57');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">            <tt class="py-name">error_param</tt> <tt class="py-op">=</tt> <tt class="py-string">'&amp;error=%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-239" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-239', 'error', 'link-57');">error</a></tt> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">use_ssl</tt><tt class="py-op">:</tt> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">            <tt id="link-240" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-240', 'server', 'link-38');">server</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-241" class="py-name"><a title="web2py.gluon.tools.Recaptcha.API_SSL_SERVER" class="py-name" href="#" onclick="return doclink('link-241', 'API_SSL_SERVER', 'link-220');">API_SSL_SERVER</a></tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">            <tt id="link-242" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-242', 'server', 'link-38');">server</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-243" class="py-name"><a title="web2py.gluon.tools.Recaptcha.API_SERVER" class="py-name" href="#" onclick="return doclink('link-243', 'API_SERVER', 'link-221');">API_SERVER</a></tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">        <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt id="link-244" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.DIV()=web2py.gluon.dal.BaseAdapter-class.html#DIV,Method web2py.gluon.dal.NoSQLAdapter.DIV()=web2py.gluon.dal.NoSQLAdapter-class.html#DIV,Class web2py.gluon.html.DIV=web2py.gluon.html.DIV-class.html"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-244', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">            <tt id="link-245" class="py-name" targets="Class web2py.gluon.html.SCRIPT=web2py.gluon.html.SCRIPT-class.html"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-245', 'SCRIPT', 'link-245');">SCRIPT</a></tt><tt class="py-op">(</tt><tt class="py-string">"var RecaptchaOptions = {%s};"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-246" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-246', 'options', 'link-227');">options</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">            <tt id="link-247" class="py-name"><a title="web2py.gluon.html.SCRIPT" class="py-name" href="#" onclick="return doclink('link-247', 'SCRIPT', 'link-245');">SCRIPT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">"text/javascript"</tt><tt class="py-op">,</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line">                   <tt class="py-name">_src</tt><tt class="py-op">=</tt><tt class="py-string">"%s/challenge?k=%s%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-248" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-248', 'server', 'link-38');">server</a></tt><tt class="py-op">,</tt><tt class="py-name">public_key</tt><tt class="py-op">,</tt><tt class="py-name">error_param</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">            <tt id="link-249" class="py-name" targets="Variable web2py.gluon.TAG=web2py.gluon-module.html#TAG,Variable web2py.gluon.html.TAG=web2py.gluon.html-module.html#TAG,Variable web2py.gluon.tools.TAG=web2py.gluon.tools-module.html#TAG"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-249', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">.</tt><tt class="py-name">noscript</tt><tt class="py-op">(</tt><tt id="link-250" class="py-name" targets="Class web2py.gluon.html.IFRAME=web2py.gluon.html.IFRAME-class.html"><a title="web2py.gluon.html.IFRAME" class="py-name" href="#" onclick="return doclink('link-250', 'IFRAME', 'link-250');">IFRAME</a></tt><tt class="py-op">(</tt><tt class="py-name">_src</tt><tt class="py-op">=</tt><tt class="py-string">"%s/noscript?k=%s%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-251" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-251', 'server', 'link-38');">server</a></tt><tt class="py-op">,</tt><tt class="py-name">public_key</tt><tt class="py-op">,</tt><tt class="py-name">error_param</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">                                <tt class="py-name">_height</tt><tt class="py-op">=</tt><tt class="py-string">"300"</tt><tt class="py-op">,</tt><tt class="py-name">_width</tt><tt class="py-op">=</tt><tt class="py-string">"500"</tt><tt class="py-op">,</tt><tt class="py-name">_frameborder</tt><tt class="py-op">=</tt><tt class="py-string">"0"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-252" class="py-name" targets="Class web2py.gluon.html.BR=web2py.gluon.html.BR-class.html"><a title="web2py.gluon.html.BR" class="py-name" href="#" onclick="return doclink('link-252', 'BR', 'link-252');">BR</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line">                         <tt id="link-253" class="py-name" targets="Class web2py.gluon.html.INPUT=web2py.gluon.html.INPUT-class.html"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-253', 'INPUT', 'link-253');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'hidden'</tt><tt class="py-op">,</tt> <tt id="link-254" class="py-name" targets="Variable psycopg2.tz.FixedOffsetTimezone._name=psycopg2.tz.FixedOffsetTimezone-class.html#_name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-254', '_name', 'link-254');">_name</a></tt><tt class="py-op">=</tt><tt class="py-string">'recaptcha_response_field'</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">                               <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-string">'manual_challenge'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">'recaptcha'</tt><tt class="py-op">)</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-255" class="py-name" targets="Class web2py.gluon.html.XML=web2py.gluon.html.XML-class.html"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-255', 'XML', 'link-255');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">captcha</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-256" class="py-name" targets="Method web2py.gluon.dal.Rows.xml()=web2py.gluon.dal.Rows-class.html#xml,Method web2py.gluon.html.A.xml()=web2py.gluon.html.A-class.html#xml,Method web2py.gluon.html.CODE.xml()=web2py.gluon.html.CODE-class.html#xml,Method web2py.gluon.html.DIV.xml()=web2py.gluon.html.DIV-class.html#xml,Method web2py.gluon.html.FORM.xml()=web2py.gluon.html.FORM-class.html#xml,Method web2py.gluon.html.HTML.xml()=web2py.gluon.html.HTML-class.html#xml,Method web2py.gluon.html.INPUT.xml()=web2py.gluon.html.INPUT-class.html#xml,Method web2py.gluon.html.MARKMIN.xml()=web2py.gluon.html.MARKMIN-class.html#xml,Method web2py.gluon.html.MENU.xml()=web2py.gluon.html.MENU-class.html#xml,Method web2py.gluon.html.P.xml()=web2py.gluon.html.P-class.html#xml,Method web2py.gluon.html.SCRIPT.xml()=web2py.gluon.html.SCRIPT-class.html#xml,Method web2py.gluon.html.STYLE.xml()=web2py.gluon.html.STYLE-class.html#xml,Method web2py.gluon.html.XHTML.xml()=web2py.gluon.html.XHTML-class.html#xml,Method web2py.gluon.html.XML.xml()=web2py.gluon.html.XML-class.html#xml,Method web2py.gluon.html.XmlComponent.xml()=web2py.gluon.html.XmlComponent-class.html#xml,Method web2py.gluon.languages.lazyT.xml()=web2py.gluon.languages.lazyT-class.html#xml,Function web2py.gluon.serializers.xml()=web2py.gluon.serializers-module.html#xml,Method web2py.gluon.tools.Recaptcha.xml()=web2py.gluon.tools.Recaptcha-class.html#xml,Method web2py.gluon.tools.Service.xml()=web2py.gluon.tools.Service-class.html#xml"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-256', 'xml', 'link-256');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line">            <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt id="link-257" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-257', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt id="link-258" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-258', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt><tt class="py-op">[</tt><tt class="py-string">'captcha'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'error'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-259" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-259', 'XML', 'link-255');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">captcha</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-260" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-260', 'xml', 'link-256');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line"> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line"> </tt>
<a name="addrow"></a><div id="addrow-def"><a name="L689"></a><tt class="py-lineno"> 689</tt> <a class="py-toggle" href="#" id="addrow-toggle" onclick="return toggle('addrow');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#addrow">addrow</a><tt class="py-op">(</tt><tt class="py-param">form</tt><tt class="py-op">,</tt><tt class="py-param">a</tt><tt class="py-op">,</tt><tt class="py-param">b</tt><tt class="py-op">,</tt><tt class="py-param">c</tt><tt class="py-op">,</tt><tt class="py-param">style</tt><tt class="py-op">,</tt><tt class="py-param">_id</tt><tt class="py-op">,</tt><tt class="py-param">position</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="addrow-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="addrow-expanded"><a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-261" class="py-name" targets="Method web2py.gluon.sqlhtml.SQLTABLE.style()=web2py.gluon.sqlhtml.SQLTABLE-class.html#style"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-261', 'style', 'link-261');">style</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"divs"</tt><tt class="py-op">:</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line">        <tt class="py-name">form</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-262" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-262', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">position</tt><tt class="py-op">,</tt> <tt id="link-263" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-263', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-264" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-264', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-265" class="py-name" targets="Class web2py.gluon.html.LABEL=web2py.gluon.html.LABEL-class.html"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-265', 'LABEL', 'link-265');">LABEL</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fl'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line">                                     <tt id="link-266" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-266', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-267" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-267', 'b', 'link-19');">b</a></tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">                                     <tt id="link-268" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-268', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fc'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">                                     <tt class="py-name">_id</tt> <tt class="py-op">=</tt> <tt class="py-name">_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt id="link-269" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-269', 'style', 'link-261');">style</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"table2cols"</tt><tt class="py-op">:</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">        <tt class="py-name">form</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-270" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-270', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">position</tt><tt class="py-op">,</tt> <tt id="link-271" class="py-name" targets="Class web2py.gluon.html.TR=web2py.gluon.html.TR-class.html"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-271', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-272" class="py-name"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-272', 'LABEL', 'link-265');">LABEL</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">        <tt class="py-name">form</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-273" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-273', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">position</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt id="link-274" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-274', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-275" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-275', 'b', 'link-19');">b</a></tt><tt class="py-op">,</tt> <tt class="py-name">_colspan</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">_id</tt> <tt class="py-op">=</tt> <tt class="py-name">_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt id="link-276" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE.style" class="py-name" href="#" onclick="return doclink('link-276', 'style', 'link-261');">style</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"ul"</tt><tt class="py-op">:</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line">        <tt class="py-name">form</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-277" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-277', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">position</tt><tt class="py-op">,</tt> <tt id="link-278" class="py-name" targets="Class web2py.gluon.html.LI=web2py.gluon.html.LI-class.html"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-278', 'LI', 'link-278');">LI</a></tt><tt class="py-op">(</tt><tt id="link-279" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-279', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-280" class="py-name"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-280', 'LABEL', 'link-265');">LABEL</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fl'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">                                    <tt id="link-281" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-281', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-282" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-282', 'b', 'link-19');">b</a></tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fw'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line">                                    <tt id="link-283" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-283', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'w2p_fc'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line">                                    <tt class="py-name">_id</tt> <tt class="py-op">=</tt> <tt class="py-name">_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line">        <tt class="py-name">form</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-284', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">position</tt><tt class="py-op">,</tt> <tt id="link-285" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-285', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-286" class="py-name"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-286', 'LABEL', 'link-265');">LABEL</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-287" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-287', 'b', 'link-19');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">,</tt><tt class="py-name">_id</tt> <tt class="py-op">=</tt> <tt class="py-name">_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line"> </tt>
<a name="Auth"></a><div id="Auth-def"><a name="L707"></a><tt class="py-lineno"> 707</tt> <a class="py-toggle" href="#" id="Auth-toggle" onclick="return toggle('Auth');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html">Auth</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Auth-expanded"><a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line"><tt class="py-docstring">    Class for authentication, authorization, role based access control.</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line"><tt class="py-docstring">    Includes:</tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line"><tt class="py-docstring">    - registration and profile</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line"><tt class="py-docstring">    - login and logout</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line"><tt class="py-docstring">    - username and password retrieval</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line"><tt class="py-docstring">    - event logging</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line"><tt class="py-docstring">    - role creation and assignment</tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line"><tt class="py-docstring">    - user defined group/role based permission</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line"><tt class="py-docstring">    Authentication Example::</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line"><tt class="py-docstring">        from contrib.utils import *</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line"><tt class="py-docstring">        mail=Mail()</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line"><tt class="py-docstring">        mail.settings.server='smtp.gmail.com:587'</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line"><tt class="py-docstring">        mail.settings.sender='you@somewhere.com'</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line"><tt class="py-docstring">        mail.settings.login='username:password'</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line"><tt class="py-docstring">        auth=Auth(globals(), db)</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line"><tt class="py-docstring">        auth.settings.mailer=mail</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line"><tt class="py-docstring">        # auth.settings....=...</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line"><tt class="py-docstring">        auth.define_tables()</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line"><tt class="py-docstring">        def authentication():</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line"><tt class="py-docstring">            return dict(form=auth())</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line"><tt class="py-docstring">    exposes:</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/login</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/logout</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/register</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/verify_email</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/retrieve_username</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/retrieve_password</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/reset_password</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/profile</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line"><tt class="py-docstring">    - http://.../{application}/{controller}/authentication/change_password</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line"><tt class="py-docstring">    On registration a group with role=new_user.id is created</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line"><tt class="py-docstring">    and user is given membership of this group.</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line"><tt class="py-docstring">    You can create a group with::</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line"><tt class="py-docstring">        group_id=auth.add_group('Manager', 'can access the manage action')</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line"><tt class="py-docstring">        auth.add_permission(group_id, 'access to manage')</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line"><tt class="py-docstring">    Here \"access to manage\" is just a user defined string.</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line"><tt class="py-docstring">    You can give access to a user::</tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line"><tt class="py-docstring">        auth.add_membership(group_id, user_id)</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line"><tt class="py-docstring">    If user id is omitted, the logged in user is assumed</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line"><tt class="py-docstring">    Then you can decorate any action::</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line"><tt class="py-docstring">        @auth.requires_permission('access to manage')</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line"><tt class="py-docstring">        def manage():</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line"><tt class="py-docstring">            return dict()</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line"><tt class="py-docstring">    You can restrict a permission to a specific table::</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line"><tt class="py-docstring">        auth.add_permission(group_id, 'edit', db.sometable)</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line"><tt class="py-docstring">        @auth.requires_permission('edit', db.sometable)</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line"><tt class="py-docstring">    Or to a specific record::</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line"><tt class="py-docstring">        auth.add_permission(group_id, 'edit', db.sometable, 45)</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line"><tt class="py-docstring">        @auth.requires_permission('edit', db.sometable, 45)</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line"><tt class="py-docstring">    If authorization is not granted calls::</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line"><tt class="py-docstring">        auth.settings.on_failed_authorization</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line"><tt class="py-docstring">    Other options::</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line"><tt class="py-docstring">        auth.settings.mailer=None</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line"><tt class="py-docstring">        auth.settings.expiration=3600 # seconds</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line"><tt class="py-docstring">        ...</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line"><tt class="py-docstring">        ### these are messages that can be customized</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line"><tt class="py-docstring">        ...</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line"> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line"> </tt>
<a name="Auth.url"></a><div id="Auth.url-def"><a name="L793"></a><tt class="py-lineno"> 793</tt> <a class="py-toggle" href="#" id="Auth.url-toggle" onclick="return toggle('Auth.url');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#url">url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.url-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.url-expanded"><a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-288" class="py-name" targets="Function web2py.gluon.html.URL()=web2py.gluon.html-module.html#URL"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-288', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-289" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-289', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
</div><a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line"> </tt>
<a name="Auth.__init__"></a><div id="Auth.__init__-def"><a name="L796"></a><tt class="py-lineno"> 796</tt> <a class="py-toggle" href="#" id="Auth.__init__-toggle" onclick="return toggle('Auth.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">environment</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">db</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">                 <tt class="py-param">controller</tt><tt class="py-op">=</tt><tt class="py-string">'default'</tt><tt class="py-op">,</tt> <tt class="py-param">cas_provider</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.__init__-expanded"><a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line"><tt class="py-docstring">        auth=Auth(globals(), db)</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line"><tt class="py-docstring">        - environment is there for legacy but unused (awful)</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line"><tt class="py-docstring">        - db has to be the database where to create tables for authentication</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">        <tt class="py-comment">## next two lines for backward compatibility</tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">db</tt> <tt class="py-keyword">and</tt> <tt class="py-name">environment</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">,</tt><tt id="link-290" class="py-name" targets="Class web2py.gluon.dal.DAL=web2py.gluon.dal.DAL-class.html"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-290', 'DAL', 'link-290');">DAL</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line">            <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt id="link-291" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-291', 'current', 'link-291');">current</a></tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-292" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-292', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-293" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-293', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">        <tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">auth</tt> <tt class="py-keyword">and</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">last_visit</tt> <tt class="py-keyword">and</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">last_visit</tt> <tt class="py-op">+</tt> \ </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line">                <tt id="link-294" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-294', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">timedelta</tt><tt class="py-op">(</tt><tt class="py-name">days</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-295" class="py-name" targets="Method web2py.gluon.dal.Expression.seconds()=web2py.gluon.dal.Expression-class.html#seconds"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-295', 'seconds', 'link-295');">seconds</a></tt><tt class="py-op">=</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">expiration</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">:</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">            <tt class="py-comment"># this is a trick to speed up sessions</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> <tt class="py-op">-</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">last_visit</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-296" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-296', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-op">(</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">expiration</tt><tt class="py-op">/</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line">                <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">last_visit</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line">        <tt id="link-297" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-297', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-298" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-298', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt id="link-299" class="py-name"><a title="web2py.gluon.storage.Settings" class="py-name" href="#" onclick="return doclink('link-299', 'Settings', 'link-8');">Settings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line"> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line">        <tt class="py-comment"># ## what happens after login?</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line">        <tt class="py-comment"># ## what happens after registration?</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line">        <tt id="link-300" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-300', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line">        <tt id="link-301" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-301', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_domains</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-302" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-302', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_host</tt><tt class="py-op">]</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line">        <tt id="link-303" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-303', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_provider</tt> <tt class="py-op">=</tt> <tt class="py-name">cas_provider</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line">        <tt id="link-304" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-304', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">        <tt id="link-305" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-305', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line">        <tt id="link-306" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-306', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_requires_verification</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">        <tt id="link-307" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-307', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">registration_requires_verification</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">        <tt id="link-308" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-308', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">registration_requires_approval</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">        <tt id="link-309" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-309', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">alternate_requires_registration</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line">        <tt id="link-310" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-310', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_user_groups</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line"> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">        <tt id="link-311" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-311', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">controller</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">        <tt id="link-312" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-312', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-313" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-313', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">)</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line">        <tt id="link-314" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-314', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">logged_url</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-315" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-315', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'profile'</tt><tt class="py-op">)</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">        <tt id="link-316" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-316', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">download_url</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-317" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-317', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'download'</tt><tt class="py-op">)</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">        <tt id="link-318" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-318', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line">        <tt id="link-319" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-319', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">        <tt id="link-320" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-320', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">        <tt id="link-321" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-321', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">        <tt id="link-322" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-322', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">        <tt id="link-323" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-323', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line">        <tt id="link-324" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-324', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">expiration</tt> <tt class="py-op">=</tt> <tt class="py-number">3600</tt>            <tt class="py-comment"># one hour</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line">        <tt id="link-325" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-325', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">long_expiration</tt> <tt class="py-op">=</tt> <tt class="py-number">3600</tt><tt class="py-op">*</tt><tt class="py-number">30</tt><tt class="py-op">*</tt><tt class="py-number">24</tt> <tt class="py-comment"># one month</tt> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">        <tt id="link-326" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-326', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">remember_me_form</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">        <tt id="link-327" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-327', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">        <tt id="link-328" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-328', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login_only</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">        <tt id="link-329" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-329', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-330" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-330', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'not_authorized'</tt><tt class="py-op">)</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line"> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line">        <tt id="link-331" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-331', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authentication</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt id="link-332" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-332', 'x', 'link-114');">x</a></tt><tt class="py-op">:</tt> <tt id="link-333" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-333', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-334" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-334', 'x', 'link-114');">x</a></tt><tt class="py-op">)</tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line"> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">        <tt id="link-335" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-335', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-string">'table3cols'</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">        <tt id="link-336" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-336', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> <tt class="py-op">=</tt> <tt class="py-string">': '</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line"> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">        <tt class="py-comment"># ## table names to be used</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line">        <tt id="link-337" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-337', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> <tt class="py-op">=</tt> <tt class="py-string">'password'</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line">        <tt id="link-338" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-338', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'auth_user'</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">        <tt id="link-339" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-339', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'auth_group'</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">        <tt id="link-340" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-340', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'auth_membership'</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">        <tt id="link-341" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-341', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'auth_permission'</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line">        <tt id="link-342" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-342', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'auth_event'</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line">        <tt id="link-343" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-343', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'auth_cas'</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line"> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line">        <tt class="py-comment"># ## if none, they will be created</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line">        <tt id="link-344" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-344', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line">        <tt id="link-345" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-345', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line">        <tt id="link-346" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-346', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line">        <tt id="link-347" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-347', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line">        <tt id="link-348" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-348', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line">        <tt id="link-349" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-349', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line"> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line">        <tt class="py-comment"># ##</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">        <tt id="link-350" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-350', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line"> </tt>
<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line">        <tt class="py-comment"># ## these should be functions or lambdas</tt> </tt>
<a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line">        <tt id="link-351" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-351', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-352" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-352', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">        <tt id="link-353" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-353', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line">        <tt id="link-354" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-354', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_onaccept</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line">        <tt id="link-355" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-355', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">]</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">        <tt id="link-356" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-356', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">        <tt id="link-357" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-357', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_email_validate</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line">        <tt id="link-358" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-358', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_userfield</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line"> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line">        <tt id="link-359" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-359', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">logout_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-360" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-360', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">        <tt id="link-361" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-361', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">logout_onlogout</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line"> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">        <tt id="link-362" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-362', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-363" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-363', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">        <tt id="link-364" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-364', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line">        <tt id="link-365" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-365', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_onaccept</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">        <tt id="link-366" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-366', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_fields</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line"> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line">        <tt id="link-367" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-367', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">verify_email_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-368" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-368', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">)</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line">        <tt id="link-369" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-369', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">verify_email_onaccept</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line"> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line">        <tt id="link-370" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-370', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-371" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-371', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">        <tt id="link-372" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-372', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">        <tt id="link-373" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-373', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_onaccept</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line">        <tt id="link-374" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-374', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_fields</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line">        <tt id="link-375" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-375', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-376" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-376', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">        <tt id="link-377" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-377', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-378" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-378', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line">        <tt id="link-379" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-379', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">request_reset_password_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-380" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-380', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">)</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line">        <tt id="link-381" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-381', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-382" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-382', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">)</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line"> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line">        <tt id="link-383" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-383', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">change_password_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-384" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-384', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'index'</tt><tt class="py-op">)</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line">        <tt id="link-385" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-385', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">change_password_onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">        <tt id="link-386" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-386', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">change_password_onaccept</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line"> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">        <tt id="link-387" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-387', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">        <tt id="link-388" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-388', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line"> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">        <tt id="link-389" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-389', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line">        <tt id="link-390" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-390', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">lock_keys</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line"> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line"> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">        <tt class="py-comment"># ## these are messages that can be customized</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">messages</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt> <tt class="py-op">=</tt> <tt id="link-391" class="py-name"><a title="web2py.gluon.storage.Messages" class="py-name" href="#" onclick="return doclink('link-391', 'Messages', 'link-9');">Messages</a></tt><tt class="py-op">(</tt><tt id="link-392" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-392', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt id="link-393" class="py-name" targets="Variable web2py.gluon.languages.lazyT.T=web2py.gluon.languages.lazyT-class.html#T"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-393', 'T', 'link-393');">T</a></tt><tt class="py-op">)</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Login'</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">register_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Register'</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_reset_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Request reset password'</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_change_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Change password'</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">profile_save_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Save profile'</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">submit_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Submit'</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_password</tt> <tt class="py-op">=</tt> <tt class="py-string">'Verify Password'</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt> <tt class="py-op">=</tt> <tt class="py-string">'Check to delete:'</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">function_disabled</tt> <tt class="py-op">=</tt> <tt class="py-string">'Function disabled'</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">access_denied</tt> <tt class="py-op">=</tt> <tt class="py-string">'Insufficient privileges'</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_verifying</tt> <tt class="py-op">=</tt> <tt class="py-string">'Registration needs verification'</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_pending</tt> <tt class="py-op">=</tt> <tt class="py-string">'Registration is pending approval'</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_disabled</tt> <tt class="py-op">=</tt> <tt class="py-string">'Login disabled by administrator'</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logged_in</tt> <tt class="py-op">=</tt> <tt class="py-string">'Logged in'</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_sent</tt> <tt class="py-op">=</tt> <tt class="py-string">'Email sent'</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">unable_to_send_email</tt> <tt class="py-op">=</tt> <tt class="py-string">'Unable to send email'</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_verified</tt> <tt class="py-op">=</tt> <tt class="py-string">'Email verified'</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logged_out</tt> <tt class="py-op">=</tt> <tt class="py-string">'Logged out'</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_successful</tt> <tt class="py-op">=</tt> <tt class="py-string">'Registration successful'</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt> <tt class="py-op">=</tt> <tt class="py-string">'Invalid email'</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">unable_send_email</tt> <tt class="py-op">=</tt> <tt class="py-string">'Unable to send email'</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_login</tt> <tt class="py-op">=</tt> <tt class="py-string">'Invalid login'</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_user</tt> <tt class="py-op">=</tt> <tt class="py-string">'Invalid user'</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_password</tt> <tt class="py-op">=</tt> <tt class="py-string">'Invalid password'</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-394" class="py-name" targets="Function web2py.gluon.validators.is_empty()=web2py.gluon.validators-module.html#is_empty"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-394', 'is_empty', 'link-394');">is_empty</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Cannot be empty"</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">mismatched_password</tt> <tt class="py-op">=</tt> <tt class="py-string">"Password fields don't match"</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-395" class="py-name" targets="Method web2py.gluon.tools.Auth.verify_email()=web2py.gluon.tools.Auth-class.html#verify_email"><a title="web2py.gluon.tools.Auth.verify_email" class="py-name" href="#" onclick="return doclink('link-395', 'verify_email', 'link-395');">verify_email</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line">            <tt class="py-string">'Click on the link http://...verify_email/%(key)s to verify your email'</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_email_subject</tt> <tt class="py-op">=</tt> <tt class="py-string">'Email verification'</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">username_sent</tt> <tt class="py-op">=</tt> <tt class="py-string">'Your username was emailed to you'</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">new_password_sent</tt> <tt class="py-op">=</tt> <tt class="py-string">'A new password was emailed to you'</tt> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_changed</tt> <tt class="py-op">=</tt> <tt class="py-string">'Password changed'</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-396" class="py-name" targets="Method web2py.gluon.tools.Auth.retrieve_username()=web2py.gluon.tools.Auth-class.html#retrieve_username"><a title="web2py.gluon.tools.Auth.retrieve_username" class="py-name" href="#" onclick="return doclink('link-396', 'retrieve_username', 'link-396');">retrieve_username</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Your username is: %(username)s'</tt> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_subject</tt> <tt class="py-op">=</tt> <tt class="py-string">'Username retrieve'</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-397" class="py-name" targets="Method web2py.gluon.tools.Auth.retrieve_password()=web2py.gluon.tools.Auth-class.html#retrieve_password"><a title="web2py.gluon.tools.Auth.retrieve_password" class="py-name" href="#" onclick="return doclink('link-397', 'retrieve_password', 'link-397');">retrieve_password</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Your password is: %(password)s'</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_subject</tt> <tt class="py-op">=</tt> <tt class="py-string">'Password retrieve'</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-398" class="py-name" targets="Method web2py.gluon.tools.Auth.reset_password()=web2py.gluon.tools.Auth-class.html#reset_password"><a title="web2py.gluon.tools.Auth.reset_password" class="py-name" href="#" onclick="return doclink('link-398', 'reset_password', 'link-398');">reset_password</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line">            <tt class="py-string">'Click on the link http://...reset_password/%(key)s to reset your password'</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">reset_password_subject</tt> <tt class="py-op">=</tt> <tt class="py-string">'Password reset'</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_reset_password</tt> <tt class="py-op">=</tt> <tt class="py-string">'Invalid reset password'</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">profile_updated</tt> <tt class="py-op">=</tt> <tt class="py-string">'Profile updated'</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt> <tt class="py-op">=</tt> <tt class="py-string">'New password'</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">old_password</tt> <tt class="py-op">=</tt> <tt class="py-string">'Old password'</tt> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">group_description</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">            <tt class="py-string">'Group uniquely assigned to user %(id)s'</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line"> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">register_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Registered'</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Logged-in'</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_failed_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logout_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Logged-out'</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">profile_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Profile updated'</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_email_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Verification email sent'</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Username retrieved'</tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Password retrieved'</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">reset_password_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Password reset'</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">change_password_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s Password changed'</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">add_group_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'Group %(group_id)s created'</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">del_group_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'Group %(group_id)s deleted'</tt> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">add_membership_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">del_membership_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">has_membership_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">add_permission_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">del_permission_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">has_permission_log</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">impersonate_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'User %(id)s is impersonating %(other_id)s'</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line"> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_first_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'First name'</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_last_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'Last name'</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_username</tt> <tt class="py-op">=</tt> <tt class="py-string">'Username'</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_email</tt> <tt class="py-op">=</tt> <tt class="py-string">'E-mail'</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_password</tt> <tt class="py-op">=</tt> <tt class="py-string">'Password'</tt> </tt>
<a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_registration_key</tt> <tt class="py-op">=</tt> <tt class="py-string">'Registration key'</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_reset_password_key</tt> <tt class="py-op">=</tt> <tt class="py-string">'Reset Password key'</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_registration_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'Registration identifier'</tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_role</tt> <tt class="py-op">=</tt> <tt class="py-string">'Role'</tt> </tt>
<a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_description</tt> <tt class="py-op">=</tt> <tt class="py-string">'Description'</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_user_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'User ID'</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_group_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'Group ID'</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'Name'</tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_table_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'Table name'</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_record_id</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record ID'</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_time_stamp</tt> <tt class="py-op">=</tt> <tt class="py-string">'Timestamp'</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_client_ip</tt> <tt class="py-op">=</tt> <tt class="py-string">'Client IP'</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_origin</tt> <tt class="py-op">=</tt> <tt class="py-string">'Origin'</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_remember_me</tt> <tt class="py-op">=</tt> <tt class="py-string">"Remember me (for 30 days)"</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">[</tt><tt class="py-string">'T'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-399" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-399', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt id="link-400" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-400', 'T', 'link-393');">T</a></tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_password_comment</tt> <tt class="py-op">=</tt> <tt class="py-string">'please input your password again'</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">lock_keys</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line"> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">        <tt class="py-comment"># for "remember me" option</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-401" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-401', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">auth</tt>  <tt class="py-keyword">and</tt>  <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">remember</tt><tt class="py-op">:</tt> <tt class="py-comment">#when user wants to be logged in for longer</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">[</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id_name</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">"expires"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">                <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">expiration</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line"> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">lazy_user</tt> <tt class="py-op">(</tt><tt class="py-param">auth</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-402" class="py-name" targets="Variable web2py.gluon.tools.Auth.user_id=web2py.gluon.tools.Auth-class.html#user_id"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-402', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">        <tt class="py-name">reference_user</tt> <tt class="py-op">=</tt> <tt class="py-string">'reference %s'</tt> <tt class="py-op">%</tt> <tt id="link-403" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-403', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">represent</tt><tt class="py-op">(</tt><tt class="py-param">id</tt><tt class="py-op">,</tt><tt class="py-param">record</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">s</tt><tt class="py-op">=</tt><tt id="link-404" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-404', 'settings', 'link-34');">settings</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt id="link-405" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-405', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-string">'%(first_name)s %(last_name)s'</tt> <tt class="py-op">%</tt> <tt class="py-name">user</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">id</tt> </tt>
</div><a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">signature</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-406" class="py-name" targets="Class web2py.gluon.dal.Table=web2py.gluon.dal.Table-class.html"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-406', 'Table', 'link-406');">Table</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt><tt class="py-string">'auth_signature'</tt><tt class="py-op">,</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">                                  <tt id="link-407" class="py-name" targets="Class web2py.gluon.dal.Field=web2py.gluon.dal.Field-class.html"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-407', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'is_active'</tt><tt class="py-op">,</tt><tt class="py-string">'boolean'</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">                                  <tt id="link-408" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-408', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_on'</tt><tt class="py-op">,</tt><tt class="py-string">'datetime'</tt><tt class="py-op">,</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">                                        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">                                        <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line">                                  <tt id="link-409" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-409', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_by'</tt><tt class="py-op">,</tt> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">                                        <tt class="py-name">reference_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">                                        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">lazy_user</tt><tt class="py-op">,</tt><tt id="link-410" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.represent()=web2py.gluon.dal.BaseAdapter-class.html#represent,Method web2py.gluon.dal.CouchDBAdapter.represent()=web2py.gluon.dal.CouchDBAdapter-class.html#represent,Method web2py.gluon.dal.MSSQL2Adapter.represent()=web2py.gluon.dal.MSSQL2Adapter-class.html#represent,Method web2py.gluon.dal.NoSQLAdapter.represent()=web2py.gluon.dal.NoSQLAdapter-class.html#represent,Static Method web2py.gluon.sqlhtml.UploadWidget.represent()=web2py.gluon.sqlhtml.UploadWidget-class.html#represent,Function web2py.gluon.sqlhtml.represent()=web2py.gluon.sqlhtml-module.html#represent"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-410', 'represent', 'link-410');">represent</a></tt><tt class="py-op">=</tt><tt id="link-411" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-411', 'represent', 'link-410');">represent</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">                                        <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">                                        <tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line">                                  <tt id="link-412" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-412', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'modified_on'</tt><tt class="py-op">,</tt><tt class="py-string">'datetime'</tt><tt class="py-op">,</tt> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">                                        <tt id="link-413" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-413', 'update', 'link-413');">update</a></tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">                                        <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">                                  <tt id="link-414" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-414', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'modified_by'</tt><tt class="py-op">,</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">                                        <tt class="py-name">reference_user</tt><tt class="py-op">,</tt><tt id="link-415" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-415', 'represent', 'link-410');">represent</a></tt><tt class="py-op">=</tt><tt id="link-416" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.represent
web2py.gluon.dal.CouchDBAdapter.represent
web2py.gluon.dal.MSSQL2Adapter.represent
web2py.gluon.dal.NoSQLAdapter.represent
web2py.gluon.sqlhtml.UploadWidget.represent
web2py.gluon.sqlhtml.represent" class="py-name" href="#" onclick="return doclink('link-416', 'represent', 'link-410');">represent</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">                                        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">lazy_user</tt><tt class="py-op">,</tt><tt id="link-417" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-417', 'update', 'link-413');">update</a></tt><tt class="py-op">=</tt><tt class="py-name">lazy_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">                                        <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line"> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line"> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line"> </tt>
<a name="Auth._get_user_id"></a><div id="Auth._get_user_id-def"><a name="L1050"></a><tt class="py-lineno">1050</tt> <a class="py-toggle" href="#" id="Auth._get_user_id-toggle" onclick="return toggle('Auth._get_user_id');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#_get_user_id">_get_user_id</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth._get_user_id-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth._get_user_id-expanded"><a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line">       <tt class="py-docstring">"accessor for auth.user_id"</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line">       <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-keyword">or</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">    <tt id="link-418" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-418', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-419" class="py-name" targets="Method web2py.gluon.tools.Auth._get_user_id()=web2py.gluon.tools.Auth-class.html#_get_user_id"><a title="web2py.gluon.tools.Auth._get_user_id" class="py-name" href="#" onclick="return doclink('link-419', '_get_user_id', 'link-419');">_get_user_id</a></tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt><tt class="py-op">=</tt><tt class="py-string">"user.id or None"</tt><tt class="py-op">)</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line"> </tt>
<a name="Auth._HTTP"></a><div id="Auth._HTTP-def"><a name="L1055"></a><tt class="py-lineno">1055</tt> <a class="py-toggle" href="#" id="Auth._HTTP-toggle" onclick="return toggle('Auth._HTTP');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#_HTTP">_HTTP</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth._HTTP-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth._HTTP-expanded"><a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line"><tt class="py-docstring">        only used in lambda: self._HTTP(404)</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line"> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-420" class="py-name" targets="Class web2py.gluon.http.HTTP=web2py.gluon.http.HTTP-class.html"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-420', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-421" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-421', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line"> </tt>
<a name="Auth.__call__"></a><div id="Auth.__call__-def"><a name="L1062"></a><tt class="py-lineno">1062</tt> <a class="py-toggle" href="#" id="Auth.__call__-toggle" onclick="return toggle('Auth.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.__call__-expanded"><a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line"><tt class="py-docstring">        usage:</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line"><tt class="py-docstring">        def authentication(): return dict(form=auth())</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line"> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-422" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-422', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">        <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">            <tt id="link-423" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-423', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-424" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-424', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-425" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-425', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-426" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-426', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'login'</tt><tt class="py-op">,</tt><tt class="py-string">'logout'</tt><tt class="py-op">,</tt><tt class="py-string">'register'</tt><tt class="py-op">,</tt><tt class="py-string">'verify_email'</tt><tt class="py-op">,</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">                       <tt class="py-string">'retrieve_username'</tt><tt class="py-op">,</tt><tt class="py-string">'retrieve_password'</tt><tt class="py-op">,</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">                       <tt class="py-string">'reset_password'</tt><tt class="py-op">,</tt><tt class="py-string">'request_reset_password'</tt><tt class="py-op">,</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">                       <tt class="py-string">'change_password'</tt><tt class="py-op">,</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt><tt class="py-string">'groups'</tt><tt class="py-op">,</tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">                       <tt class="py-string">'impersonate'</tt><tt class="py-op">,</tt><tt class="py-string">'not_authorized'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">'cas'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-427" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-427', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_provider</tt><tt class="py-op">:</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'login'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-428" class="py-name" targets="Method web2py.gluon.tools.Auth.cas_login()=web2py.gluon.tools.Auth-class.html#cas_login"><a title="web2py.gluon.tools.Auth.cas_login" class="py-name" href="#" onclick="return doclink('link-428', 'cas_login', 'link-428');">cas_login</a></tt><tt class="py-op">(</tt><tt id="link-429" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-429', 'version', 'link-429');">version</a></tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'validate'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-430" class="py-name" targets="Method web2py.gluon.tools.Auth.cas_validate()=web2py.gluon.tools.Auth-class.html#cas_validate"><a title="web2py.gluon.tools.Auth.cas_validate" class="py-name" href="#" onclick="return doclink('link-430', 'cas_validate', 'link-430');">cas_validate</a></tt><tt class="py-op">(</tt><tt id="link-431" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-431', 'version', 'link-429');">version</a></tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'logout'</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-432" class="py-name" targets="Method web2py.gluon.tools.Auth.logout()=web2py.gluon.tools.Auth-class.html#logout"><a title="web2py.gluon.tools.Auth.logout" class="py-name" href="#" onclick="return doclink('link-432', 'logout', 'link-432');">logout</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-433" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-433', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line"> </tt>
<a name="Auth.navbar"></a><div id="Auth.navbar-def"><a name="L1088"></a><tt class="py-lineno">1088</tt> <a class="py-toggle" href="#" id="Auth.navbar-toggle" onclick="return toggle('Auth.navbar');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#navbar">navbar</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">prefix</tt><tt class="py-op">=</tt><tt class="py-string">'Welcome'</tt><tt class="py-op">,</tt><tt class="py-param">action</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.navbar-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.navbar-expanded"><a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-434" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-434', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line">        <tt id="link-435" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-435', 'T', 'link-393');">T</a></tt> <tt class="py-op">=</tt> <tt id="link-436" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-436', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt id="link-437" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-437', 'T', 'link-393');">T</a></tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line">            <tt class="py-name">prefix</tt> <tt class="py-op">=</tt> <tt id="link-438" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-438', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">)</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">action</tt><tt class="py-op">:</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line">            <tt class="py-name">action</tt><tt class="py-op">=</tt><tt id="link-439" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-439', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">application</tt><tt class="py-op">,</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt><tt class="py-string">'user'</tt><tt class="py-op">)</tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">prefix</tt><tt class="py-op">:</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line">            <tt class="py-name">prefix</tt> <tt class="py-op">=</tt> <tt class="py-name">prefix</tt><tt class="py-op">.</tt><tt id="link-440" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-440', 'strip', 'link-75');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">' '</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-441" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-441', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line">            <tt id="link-442" class="py-name"><a title="web2py.gluon.tools.Auth.logout" class="py-name" href="#" onclick="return doclink('link-442', 'logout', 'link-432');">logout</a></tt><tt class="py-op">=</tt><tt id="link-443" class="py-name" targets="Class web2py.gluon.html.A=web2py.gluon.html.A-class.html"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-443', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-444" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-444', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'logout'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/logout'</tt><tt class="py-op">)</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line">            <tt id="link-445" class="py-name" targets="Method web2py.gluon.tools.Auth.profile()=web2py.gluon.tools.Auth-class.html#profile"><a title="web2py.gluon.tools.Auth.profile" class="py-name" href="#" onclick="return doclink('link-445', 'profile', 'link-445');">profile</a></tt><tt class="py-op">=</tt><tt id="link-446" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-446', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-447" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-447', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'profile'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/profile'</tt><tt class="py-op">)</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">            <tt class="py-name">password</tt><tt class="py-op">=</tt><tt id="link-448" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-448', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-449" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-449', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'password'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/change_password'</tt><tt class="py-op">)</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">            <tt class="py-name">bar</tt> <tt class="py-op">=</tt> <tt id="link-450" class="py-name" targets="Class web2py.gluon.html.SPAN=web2py.gluon.html.SPAN-class.html"><a title="web2py.gluon.html.SPAN" class="py-name" href="#" onclick="return doclink('link-450', 'SPAN', 'link-450');">SPAN</a></tt><tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">first_name</tt><tt class="py-op">,</tt><tt class="py-string">' [ '</tt><tt class="py-op">,</tt> <tt id="link-451" class="py-name"><a title="web2py.gluon.tools.Auth.logout" class="py-name" href="#" onclick="return doclink('link-451', 'logout', 'link-432');">logout</a></tt><tt class="py-op">,</tt> <tt class="py-string">']'</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'auth_navbar'</tt><tt class="py-op">)</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'profile'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-452" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-452', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-453" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-453', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-string">' | '</tt><tt class="py-op">)</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-454" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-454', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">,</tt> <tt id="link-455" class="py-name"><a title="web2py.gluon.tools.Auth.profile" class="py-name" href="#" onclick="return doclink('link-455', 'profile', 'link-445');">profile</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'change_password'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-456" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-456', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-457" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-457', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-string">' | '</tt><tt class="py-op">)</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-458" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-458', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">            <tt id="link-459" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-459', 'login', 'link-42');">login</a></tt><tt class="py-op">=</tt><tt id="link-460" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-460', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-461" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-461', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'login'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/login'</tt><tt class="py-op">)</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">            <tt id="link-462" class="py-name" targets="Method web2py.gluon.tools.Auth.register()=web2py.gluon.tools.Auth-class.html#register"><a title="web2py.gluon.tools.Auth.register" class="py-name" href="#" onclick="return doclink('link-462', 'register', 'link-462');">register</a></tt><tt class="py-op">=</tt><tt id="link-463" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-463', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-464" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-464', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'register'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/register'</tt><tt class="py-op">)</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line">            <tt id="link-465" class="py-name"><a title="web2py.gluon.tools.Auth.retrieve_username" class="py-name" href="#" onclick="return doclink('link-465', 'retrieve_username', 'link-396');">retrieve_username</a></tt><tt class="py-op">=</tt><tt id="link-466" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-466', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-467" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-467', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'forgot username?'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">                            <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/retrieve_username'</tt><tt class="py-op">)</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">            <tt class="py-name">lost_password</tt><tt class="py-op">=</tt><tt id="link-468" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-468', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-469" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-469', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'lost password?'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">                            <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">action</tt><tt class="py-op">+</tt><tt class="py-string">'/request_reset_password'</tt><tt class="py-op">)</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">            <tt class="py-name">bar</tt> <tt class="py-op">=</tt> <tt id="link-470" class="py-name"><a title="web2py.gluon.html.SPAN" class="py-name" href="#" onclick="return doclink('link-470', 'SPAN', 'link-450');">SPAN</a></tt><tt class="py-op">(</tt><tt class="py-string">'[ '</tt><tt class="py-op">,</tt><tt id="link-471" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-471', 'login', 'link-42');">login</a></tt><tt class="py-op">,</tt><tt class="py-string">' ]'</tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'auth_navbar'</tt><tt class="py-op">)</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line"> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'register'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-472" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-472', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-473" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-473', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-string">' | '</tt><tt class="py-op">)</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-474" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-474', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt> <tt id="link-475" class="py-name"><a title="web2py.gluon.tools.Auth.register" class="py-name" href="#" onclick="return doclink('link-475', 'register', 'link-462');">register</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-476" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-476', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">                    <tt class="py-keyword">not</tt> <tt class="py-string">'retrieve_username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-477" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-477', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-478" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-478', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-string">' | '</tt><tt class="py-op">)</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-479" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-479', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt id="link-480" class="py-name"><a title="web2py.gluon.tools.Auth.retrieve_username" class="py-name" href="#" onclick="return doclink('link-480', 'retrieve_username', 'link-396');">retrieve_username</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'request_reset_password'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-481" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-481', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-482" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-482', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-string">' | '</tt><tt class="py-op">)</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">                <tt class="py-name">bar</tt><tt class="py-op">.</tt><tt id="link-483" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-483', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">lost_password</tt><tt class="py-op">)</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">bar</tt> </tt>
</div><a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line"> </tt>
<a name="Auth.__get_migrate"></a><div id="Auth.__get_migrate-def"><a name="L1129"></a><tt class="py-lineno">1129</tt> <a class="py-toggle" href="#" id="Auth.__get_migrate-toggle" onclick="return toggle('Auth.__get_migrate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#__get_migrate">__get_migrate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tablename</tt><tt class="py-op">,</tt> <tt class="py-param">migrate</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.__get_migrate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.__get_migrate-expanded"><a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line"> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'str'</tt><tt class="py-op">:</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">migrate</tt> <tt class="py-op">+</tt> <tt class="py-name">tablename</tt> <tt class="py-op">+</tt> <tt class="py-string">'.table'</tt><tt class="py-op">)</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">migrate</tt> <tt class="py-op">==</tt> <tt class="py-name">False</tt><tt class="py-op">:</tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line"> </tt>
<a name="Auth.define_tables"></a><div id="Auth.define_tables-def"><a name="L1138"></a><tt class="py-lineno">1138</tt> <a class="py-toggle" href="#" id="Auth.define_tables-toggle" onclick="return toggle('Auth.define_tables');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#define_tables">define_tables</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">username</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">migrate</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-param">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.define_tables-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.define_tables-expanded"><a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line"><tt class="py-docstring">        to be called unless tables are defined manually</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line"><tt class="py-docstring">        usages::</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line"><tt class="py-docstring">            # defines all needed tables and table files</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line"><tt class="py-docstring">            # 'myprefix_auth_user.table', ...</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line"><tt class="py-docstring">            auth.define_tables(migrate='myprefix_')</tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line"><tt class="py-docstring">            # defines all needed tables without migration/table files</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line"><tt class="py-docstring">            auth.define_tables(migrate=False)</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line"> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line">        <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line">        <tt id="link-484" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-484', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-485" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-485', 'settings', 'link-34');">settings</a></tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-486" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-486', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-487" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.tables()=web2py.gluon.dal.BaseAdapter-class.html#tables,Method web2py.gluon.tools.Crud.tables()=web2py.gluon.tools.Crud-class.html#tables"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-487', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line">            <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt id="link-488" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-488', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">username</tt> <tt class="py-keyword">or</tt> <tt id="link-489" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-489', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_provider</tt><tt class="py-op">:</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line">                <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-490" class="py-name" targets="Method web2py.gluon.dal.DAL.define_table()=web2py.gluon.dal.DAL-class.html#define_table"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-490', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">                    <tt id="link-491" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-491', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line">                    <tt id="link-492" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-492', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'first_name'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_first_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line">                    <tt id="link-493" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-493', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'last_name'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_last_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line">                    <tt id="link-494" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-494', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'username'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_username</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line">                    <tt id="link-495" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-495', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'email'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_email</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">                    <tt id="link-496" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-496', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-name">passfield</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line">                          <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_password</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">                    <tt id="link-497" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-497', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'registration_key'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">                          <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_registration_key</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line">                    <tt id="link-498" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-498', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'reset_password_key'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line">                          <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_reset_password_key</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line">                    <tt id="link-499" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-499', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'registration_id'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">                          <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_registration_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line">                    <tt class="py-op">*</tt><tt id="link-500" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-500', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-501" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-501', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-502" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-502', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">                    <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">                        <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-503" class="py-name" targets="Method web2py.gluon.tools.Auth.__get_migrate()=web2py.gluon.tools.Auth-class.html#__get_migrate"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-503', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt><tt id="link-504" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-504', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">                                                   <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">                        <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">,</tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line">                        <tt class="py-name">format</tt><tt class="py-op">=</tt><tt class="py-string">'%(username)s'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">username</tt><tt class="py-op">.</tt><tt id="link-505" class="py-name" targets="Method web2py.gluon.tools.Auth.requires()=web2py.gluon.tools.Auth-class.html#requires"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-505', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-506" class="py-name" targets="Class web2py.gluon.validators.IS_MATCH=web2py.gluon.validators.IS_MATCH-class.html"><a title="web2py.gluon.validators.IS_MATCH" class="py-name" href="#" onclick="return doclink('link-506', 'IS_MATCH', 'link-506');">IS_MATCH</a></tt><tt class="py-op">(</tt><tt class="py-string">'[\w\.\-]+'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">                                           <tt id="link-507" class="py-name" targets="Class web2py.gluon.validators.IS_NOT_IN_DB=web2py.gluon.validators.IS_NOT_IN_DB-class.html"><a title="web2py.gluon.validators.IS_NOT_IN_DB" class="py-name" href="#" onclick="return doclink('link-507', 'IS_NOT_IN_DB', 'link-507');">IS_NOT_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">username</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line">                <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-508" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-508', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">                    <tt id="link-509" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-509', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">                    <tt id="link-510" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-510', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'first_name'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_first_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line">                    <tt id="link-511" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-511', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'last_name'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_last_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line">                    <tt id="link-512" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-512', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'email'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_email</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">                    <tt id="link-513" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-513', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-name">passfield</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line">                          <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_password</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line">                    <tt id="link-514" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-514', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'registration_key'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line">                          <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_registration_key</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line">                    <tt id="link-515" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-515', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'reset_password_key'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line">                          <tt class="py-name">writable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">readable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_reset_password_key</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line">                    <tt class="py-op">*</tt><tt id="link-516" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-516', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-517" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-517', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-518" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-518', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line">                    <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">                        <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-519" class="py-name"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-519', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt><tt id="link-520" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-520', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line">                                                   <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line">                        <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">,</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line">                        <tt class="py-name">format</tt><tt class="py-op">=</tt><tt class="py-string">'%(first_name)s %(last_name)s (%(id)s)'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">first_name</tt><tt class="py-op">.</tt><tt id="link-521" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-521', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line">                <tt id="link-522" class="py-name" targets="Class web2py.gluon.validators.IS_NOT_EMPTY=web2py.gluon.validators.IS_NOT_EMPTY-class.html"><a title="web2py.gluon.validators.IS_NOT_EMPTY" class="py-name" href="#" onclick="return doclink('link-522', 'IS_NOT_EMPTY', 'link-522');">IS_NOT_EMPTY</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-523" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-523', 'is_empty', 'link-394');">is_empty</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">last_name</tt><tt class="py-op">.</tt><tt id="link-524" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-524', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">                <tt id="link-525" class="py-name"><a title="web2py.gluon.validators.IS_NOT_EMPTY" class="py-name" href="#" onclick="return doclink('link-525', 'IS_NOT_EMPTY', 'link-522');">IS_NOT_EMPTY</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-526" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-526', 'is_empty', 'link-394');">is_empty</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-527" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-527', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-528" class="py-name" targets="Class web2py.gluon.validators.CRYPT=web2py.gluon.validators.CRYPT-class.html"><a title="web2py.gluon.validators.CRYPT" class="py-name" href="#" onclick="return doclink('link-528', 'CRYPT', 'link-528');">CRYPT</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">=</tt><tt id="link-529" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-529', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hmac_key</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-530" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-530', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">                <tt class="py-op">[</tt><tt id="link-531" class="py-name" targets="Class web2py.gluon.validators.IS_EMAIL=web2py.gluon.validators.IS_EMAIL-class.html"><a title="web2py.gluon.validators.IS_EMAIL" class="py-name" href="#" onclick="return doclink('link-531', 'IS_EMAIL', 'link-531');">IS_EMAIL</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line">                 <tt id="link-532" class="py-name"><a title="web2py.gluon.validators.IS_NOT_IN_DB" class="py-name" href="#" onclick="return doclink('link-532', 'IS_NOT_IN_DB', 'link-507');">IS_NOT_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt><tt class="py-op">.</tt><tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line">        <tt id="link-533" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-533', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt id="link-534" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-534', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-535" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-535', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-536" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-536', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-537" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-537', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line">                <tt id="link-538" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-538', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line">                <tt id="link-539" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-539', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'role'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_role</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line">                <tt id="link-540" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-540', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'description'</tt><tt class="py-op">,</tt> <tt class="py-string">'text'</tt><tt class="py-op">,</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_description</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line">                <tt class="py-op">*</tt><tt id="link-541" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-541', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-542" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-542', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-543" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-543', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">                <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line">                    <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-544" class="py-name"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-544', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line">                        <tt id="link-545" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-545', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">,</tt> <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">                    <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">,</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line">                    <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">'%(role)s (%(id)s)'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">role</tt><tt class="py-op">.</tt><tt id="link-546" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-546', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-547" class="py-name"><a title="web2py.gluon.validators.IS_NOT_IN_DB" class="py-name" href="#" onclick="return doclink('link-547', 'IS_NOT_IN_DB', 'link-507');">IS_NOT_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.role'</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line">                 <tt class="py-op">%</tt> <tt id="link-548" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-548', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line">        <tt id="link-549" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-549', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt id="link-550" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-550', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-551" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-551', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-552" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-552', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-553" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-553', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line">                <tt id="link-554" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-554', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line">                <tt id="link-555" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-555', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'user_id'</tt><tt class="py-op">,</tt> <tt id="link-556" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-556', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_user_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line">                <tt id="link-557" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-557', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'group_id'</tt><tt class="py-op">,</tt> <tt id="link-558" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-558', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt><tt class="py-op">,</tt> </tt>
<a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_group_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line">                <tt class="py-op">*</tt><tt id="link-559" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-559', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-560" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-560', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-561" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-561', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line">                <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line">                    <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-562" class="py-name"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-562', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line">                        <tt id="link-563" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-563', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership_name</tt><tt class="py-op">,</tt> <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line">                    <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-564" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-564', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">.</tt><tt id="link-565" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-565', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-566" class="py-name" targets="Class web2py.gluon.validators.IS_IN_DB=web2py.gluon.validators.IS_IN_DB-class.html"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-566', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.id'</tt> <tt class="py-op">%</tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line">                    <tt id="link-567" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-567', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line">                    <tt class="py-string">'%(first_name)s %(last_name)s (%(id)s)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">.</tt><tt id="link-568" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-568', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-569" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-569', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.id'</tt> <tt class="py-op">%</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line">                    <tt id="link-570" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-570', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1253"></a><tt class="py-lineno">1253</tt>  <tt class="py-line">                    <tt class="py-string">'%(role)s (%(id)s)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line">        <tt id="link-571" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-571', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt id="link-572" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-572', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-573" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-573', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-574" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-574', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-575" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-575', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line">                <tt id="link-576" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-576', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line">                <tt id="link-577" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-577', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'group_id'</tt><tt class="py-op">,</tt> <tt id="link-578" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-578', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt><tt class="py-op">,</tt> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_group_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line">                <tt id="link-579" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-579', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'default'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line">                <tt id="link-580" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-580', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'table_name'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_table_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line">                <tt id="link-581" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-581', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'record_id'</tt><tt class="py-op">,</tt> <tt class="py-string">'integer'</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_record_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line">                <tt class="py-op">*</tt><tt id="link-582" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-582', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-583" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-583', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-584" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-584', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line">                <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line">                    <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-585" class="py-name"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-585', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1269"></a><tt class="py-lineno">1269</tt>  <tt class="py-line">                        <tt id="link-586" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-586', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission_name</tt><tt class="py-op">,</tt> <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line">                    <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">.</tt><tt id="link-587" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-587', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-588" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-588', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.id'</tt> <tt class="py-op">%</tt> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line">                    <tt id="link-589" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-589', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line">                    <tt class="py-string">'%(role)s (%(id)s)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-590" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-590', 'name', 'link-590');">name</a></tt><tt class="py-op">.</tt><tt id="link-591" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-591', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-592" class="py-name"><a title="web2py.gluon.validators.IS_NOT_EMPTY" class="py-name" href="#" onclick="return doclink('link-592', 'IS_NOT_EMPTY', 'link-522');">IS_NOT_EMPTY</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-593" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-593', 'is_empty', 'link-394');">is_empty</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">table_name</tt><tt class="py-op">.</tt><tt id="link-594" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-594', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-595" class="py-name" targets="Class web2py.gluon.validators.IS_EMPTY_OR=web2py.gluon.validators.IS_EMPTY_OR-class.html"><a title="web2py.gluon.validators.IS_EMPTY_OR" class="py-name" href="#" onclick="return doclink('link-595', 'IS_EMPTY_OR', 'link-595');">IS_EMPTY_OR</a></tt><tt class="py-op">(</tt><tt id="link-596" class="py-name" targets="Class web2py.gluon.validators.IS_IN_SET=web2py.gluon.validators.IS_IN_SET-class.html"><a title="web2py.gluon.validators.IS_IN_SET" class="py-name" href="#" onclick="return doclink('link-596', 'IS_IN_SET', 'link-596');">IS_IN_SET</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-597" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-597', 'tables', 'link-487');">tables</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">.</tt><tt id="link-598" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-598', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-599" class="py-name" targets="Class web2py.gluon.validators.IS_INT_IN_RANGE=web2py.gluon.validators.IS_INT_IN_RANGE-class.html"><a title="web2py.gluon.validators.IS_INT_IN_RANGE" class="py-name" href="#" onclick="return doclink('link-599', 'IS_INT_IN_RANGE', 'link-599');">IS_INT_IN_RANGE</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">10</tt> <tt class="py-op">**</tt> <tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line">        <tt id="link-600" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-600', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt id="link-601" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-601', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-602" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-602', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-603" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-603', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line">            <tt class="py-name">table</tt>  <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-604" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-604', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line">                <tt id="link-605" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-605', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line">                <tt id="link-606" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-606', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'time_stamp'</tt><tt class="py-op">,</tt> <tt class="py-string">'datetime'</tt><tt class="py-op">,</tt> </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line">                        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt id="link-607" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-607', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_time_stamp</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">                <tt id="link-608" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-608', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'client_ip'</tt><tt class="py-op">,</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line">                        <tt class="py-name">default</tt><tt class="py-op">=</tt><tt id="link-609" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-609', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">client</tt><tt class="py-op">,</tt> </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_client_ip</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line">                <tt id="link-610" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-610', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'user_id'</tt><tt class="py-op">,</tt> <tt id="link-611" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-611', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_user_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line">                <tt id="link-612" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-612', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'origin'</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'auth'</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">=</tt><tt class="py-number">512</tt><tt class="py-op">,</tt> </tt>
<a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_origin</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line">                <tt id="link-613" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-613', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'description'</tt><tt class="py-op">,</tt> <tt class="py-string">'text'</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line">                        <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_description</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line">                <tt class="py-op">*</tt><tt id="link-614" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-614', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-615" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-615', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-616" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-616', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line">                <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line">                    <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-617" class="py-name"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-617', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line">                        <tt id="link-618" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-618', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt><tt class="py-op">,</tt> <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line">                    <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-619" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-619', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">.</tt><tt id="link-620" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-620', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-621" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-621', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.id'</tt> <tt class="py-op">%</tt> </tt>
<a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line">                    <tt id="link-622" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-622', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1300"></a><tt class="py-lineno">1300</tt>  <tt class="py-line">                    <tt class="py-string">'%(first_name)s %(last_name)s (%(id)s)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1301"></a><tt class="py-lineno">1301</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt><tt class="py-op">.</tt><tt id="link-623" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-623', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-624" class="py-name"><a title="web2py.gluon.validators.IS_NOT_EMPTY" class="py-name" href="#" onclick="return doclink('link-624', 'IS_NOT_EMPTY', 'link-522');">IS_NOT_EMPTY</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-625" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-625', 'is_empty', 'link-394');">is_empty</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">description</tt><tt class="py-op">.</tt><tt id="link-626" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-626', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-627" class="py-name"><a title="web2py.gluon.validators.IS_NOT_EMPTY" class="py-name" href="#" onclick="return doclink('link-627', 'IS_NOT_EMPTY', 'link-522');">IS_NOT_EMPTY</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-628" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-628', 'is_empty', 'link-394');">is_empty</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line">        <tt id="link-629" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-629', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt id="link-630" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-630', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line">        <tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt id="link-631" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-631', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt> </tt>
<a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-632" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-632', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_domains</tt><tt class="py-op">:</tt> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-633" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-633', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-634" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-634', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line">                <tt class="py-name">table</tt>  <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-635" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-635', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line">                    <tt id="link-636" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-636', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line">                    <tt id="link-637" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-637', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'user_id'</tt><tt class="py-op">,</tt> <tt id="link-638" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-638', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line">                          <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_user_id</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line">                    <tt id="link-639" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-639', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'created_on'</tt><tt class="py-op">,</tt><tt class="py-string">'datetime'</tt><tt class="py-op">,</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">now</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line">                    <tt id="link-640" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-640', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'url'</tt><tt class="py-op">,</tt><tt id="link-641" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-641', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt id="link-642" class="py-name" targets="Class web2py.gluon.validators.IS_URL=web2py.gluon.validators.IS_URL-class.html"><a title="web2py.gluon.validators.IS_URL" class="py-name" href="#" onclick="return doclink('link-642', 'IS_URL', 'link-642');">IS_URL</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line">                    <tt id="link-643" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-643', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'uuid'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line">                    <tt class="py-op">*</tt><tt id="link-644" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-644', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">extra_fields</tt><tt class="py-op">.</tt><tt id="link-645" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-645', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt id="link-646" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-646', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas_name</tt><tt class="py-op">,</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line">                    <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line">                        <tt class="py-name">migrate</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-647" class="py-name"><a title="web2py.gluon.tools.Auth.__get_migrate" class="py-name" href="#" onclick="return doclink('link-647', '__get_migrate', 'link-503');">__get_migrate</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line">                            <tt id="link-648" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-648', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event_name</tt><tt class="py-op">,</tt> <tt class="py-name">migrate</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line">                        <tt class="py-name">fake_migrate</tt><tt class="py-op">=</tt><tt class="py-name">fake_migrate</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-649" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-649', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">.</tt><tt id="link-650" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-650', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt id="link-651" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-651', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.id'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line">                    <tt id="link-652" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-652', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line">                    <tt class="py-string">'%(first_name)s %(last_name)s (%(id)s)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line">            <tt id="link-653" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-653', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">[</tt><tt id="link-654" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-654', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-655" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-655', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_provider</tt><tt class="py-op">:</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line">            <tt id="link-656" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-656', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">actions_disabled</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line">                <tt class="py-op">[</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt><tt class="py-string">'register'</tt><tt class="py-op">,</tt><tt class="py-string">'change_password'</tt><tt class="py-op">,</tt><tt class="py-string">'request_reset_password'</tt><tt class="py-op">]</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line">            <tt class="py-keyword">from</tt> <tt id="link-657" class="py-name"><a title="web2py.gluon" class="py-name" href="#" onclick="return doclink('link-657', 'gluon', 'link-12');">gluon</a></tt><tt class="py-op">.</tt><tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt><tt class="py-op">.</tt><tt class="py-name">cas_auth</tt> <tt class="py-keyword">import</tt> <tt class="py-name">CasAuth</tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line">            <tt class="py-name">maps</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-658" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-658', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">v</tt><tt class="py-op">,</tt><tt class="py-name">n</tt><tt class="py-op">=</tt><tt id="link-659" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-659', 'name', 'link-590');">name</a></tt><tt class="py-op">:</tt><tt class="py-name">v</tt><tt class="py-op">.</tt><tt id="link-660" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-660', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-661" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-661', 'name', 'link-590');">name</a></tt> <tt class="py-keyword">in</tt> \ </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line">                            <tt id="link-662" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-662', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt> <tt class="py-keyword">if</tt> <tt id="link-663" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-663', 'name', 'link-590');">name</a></tt><tt class="py-op">!=</tt><tt class="py-string">'id'</tt> \ </tt>
<a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line">                            <tt class="py-keyword">and</tt> <tt id="link-664" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-664', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt id="link-665" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-665', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">)</tt> </tt>
<a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line">            <tt class="py-name">maps</tt><tt class="py-op">[</tt><tt class="py-string">'registration_id'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line">                <tt class="py-keyword">lambda</tt> <tt class="py-name">v</tt><tt class="py-op">,</tt><tt class="py-name">p</tt><tt class="py-op">=</tt><tt id="link-666" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-666', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_provider</tt><tt class="py-op">:</tt><tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">,</tt><tt class="py-name">v</tt><tt class="py-op">[</tt><tt class="py-string">'user'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line">            <tt id="link-667" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-667', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> <tt class="py-op">=</tt> <tt class="py-name">CasAuth</tt><tt class="py-op">(</tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line">                <tt class="py-name">casversion</tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line">                <tt class="py-name">urlbase</tt> <tt class="py-op">=</tt> <tt id="link-668" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-668', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_provider</tt><tt class="py-op">,</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line">                <tt class="py-name">actions</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">'login'</tt><tt class="py-op">,</tt><tt class="py-string">'validate'</tt><tt class="py-op">,</tt><tt class="py-string">'logout'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line">                <tt class="py-name">maps</tt><tt class="py-op">=</tt><tt class="py-name">maps</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line"> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line"> </tt>
<a name="Auth.log_event"></a><div id="Auth.log_event-def"><a name="L1339"></a><tt class="py-lineno">1339</tt> <a class="py-toggle" href="#" id="Auth.log_event-toggle" onclick="return toggle('Auth.log_event');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#log_event">log_event</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">description</tt><tt class="py-op">,</tt> <tt class="py-param">origin</tt><tt class="py-op">=</tt><tt class="py-string">'auth'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.log_event-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.log_event-expanded"><a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line"><tt class="py-docstring">        usage::</tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line"><tt class="py-docstring">            auth.log_event(description='this happened', origin='auth')</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line"> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-669" class="py-name" targets="Method web2py.gluon.tools.Auth.is_logged_in()=web2py.gluon.tools.Auth-class.html#is_logged_in"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-669', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line">            <tt id="link-670" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-670', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">            <tt id="link-671" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-671', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt>  <tt class="py-comment"># user unknown</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-672" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-672', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_event</tt><tt class="py-op">.</tt><tt id="link-673" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-673', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">description</tt><tt class="py-op">=</tt><tt class="py-name">description</tt><tt class="py-op">,</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">                                         <tt class="py-name">origin</tt><tt class="py-op">=</tt><tt class="py-name">origin</tt><tt class="py-op">,</tt> <tt id="link-674" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-674', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt id="link-675" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-675', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line"> </tt>
<a name="Auth.get_or_create_user"></a><div id="Auth.get_or_create_user-def"><a name="L1353"></a><tt class="py-lineno">1353</tt> <a class="py-toggle" href="#" id="Auth.get_or_create_user-toggle" onclick="return toggle('Auth.get_or_create_user');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#get_or_create_user">get_or_create_user</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">keys</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.get_or_create_user-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.get_or_create_user-expanded"><a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line"><tt class="py-docstring">        Used for alternate login methods:</tt> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line"><tt class="py-docstring">            If the user exists already then password is updated.</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line"><tt class="py-docstring">            If the user doesn't yet exist, then they are created.</tt> </tt>
<a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-676" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-676', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'registration_id'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">                <tt class="py-string">'registration_id'</tt> <tt class="py-keyword">in</tt> <tt id="link-677" class="py-name" targets="Method web2py.gluon.rocket.Headers.keys()=web2py.gluon.rocket.Headers-class.html#keys,Method web2py.gluon.tools.PluginManager.keys()=web2py.gluon.tools.PluginManager-class.html#keys"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-677', 'keys', 'link-677');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'registration_id'</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'username'</tt> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'email'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'email'</tt> </tt>
<a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"user must have username or email"</tt> </tt>
<a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-678" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-678', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">        <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt id="link-679" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-679', 'keys', 'link-677');">keys</a></tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-680" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.select()=web2py.gluon.dal.BaseAdapter-class.html#select,Method web2py.gluon.dal.CouchDBAdapter.select()=web2py.gluon.dal.CouchDBAdapter-class.html#select,Method web2py.gluon.dal.GoogleDatastoreAdapter.select()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select,Method web2py.gluon.dal.MongoDBAdapter.select()=web2py.gluon.dal.MongoDBAdapter-class.html#select,Method web2py.gluon.dal.Set.select()=web2py.gluon.dal.Set-class.html#select,Method web2py.gluon.tools.Crud.select()=web2py.gluon.tools.Crud-class.html#select"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-680', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-681" class="py-name" targets="Method web2py.gluon.dal.Rows.first()=web2py.gluon.dal.Rows-class.html#first"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-681', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line">        <tt id="link-682" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-682', 'keys', 'link-677');">keys</a></tt><tt class="py-op">[</tt><tt class="py-string">'registration_key'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">''</tt> </tt>
<a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">            <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-683" class="py-name" targets="Function web2py.gluon.dal.update_record()=web2py.gluon.dal-module.html#update_record"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-683', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-684" class="py-name" targets="Method web2py.gluon.dal.Table._filter_fields()=web2py.gluon.dal.Table-class.html#_filter_fields"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-684', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt id="link-685" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-685', 'keys', 'link-677');">keys</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'first_name'</tt> <tt class="py-keyword">in</tt> <tt id="link-686" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-686', 'keys', 'link-677');">keys</a></tt> <tt class="py-keyword">and</tt> <tt class="py-string">'first_name'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line">                <tt id="link-687" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-687', 'keys', 'link-677');">keys</a></tt><tt class="py-op">[</tt><tt class="py-string">'first_name'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-688" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-688', 'keys', 'link-677');">keys</a></tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">            <tt id="link-689" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-689', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-690" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-690', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-691" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-691', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt id="link-692" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-692', 'keys', 'link-677');">keys</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt>  <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt id="link-693" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-693', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-694" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-694', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_user_groups</tt><tt class="py-op">:</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">                <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-695" class="py-name" targets="Method web2py.gluon.tools.Auth.add_group()=web2py.gluon.tools.Auth-class.html#add_group"><a title="web2py.gluon.tools.Auth.add_group" class="py-name" href="#" onclick="return doclink('link-695', 'add_group', 'link-695');">add_group</a></tt><tt class="py-op">(</tt><tt class="py-string">"user_%s"</tt> <tt class="py-op">%</tt> <tt id="link-696" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-696', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-697" class="py-name" targets="Method web2py.gluon.tools.Auth.add_membership()=web2py.gluon.tools.Auth-class.html#add_membership"><a title="web2py.gluon.tools.Auth.add_membership" class="py-name" href="#" onclick="return doclink('link-697', 'add_membership', 'link-697');">add_membership</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt id="link-698" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-698', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1382"></a><tt class="py-lineno">1382</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">user</tt> </tt>
</div><a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line"> </tt>
<a name="Auth.basic"></a><div id="Auth.basic-def"><a name="L1384"></a><tt class="py-lineno">1384</tt> <a class="py-toggle" href="#" id="Auth.basic-toggle" onclick="return toggle('Auth.basic');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#basic">basic</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.basic-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.basic-expanded"><a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-699" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-699', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login</tt><tt class="py-op">:</tt> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1387"></a><tt class="py-lineno">1387</tt>  <tt class="py-line">        <tt id="link-700" class="py-name" targets="Method web2py.gluon.tools.Auth.basic()=web2py.gluon.tools.Auth-class.html#basic"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-700', 'basic', 'link-700');">basic</a></tt> <tt class="py-op">=</tt> <tt id="link-701" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-701', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-702" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-702', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_authorization</tt> </tt>
<a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-703" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-703', 'basic', 'link-700');">basic</a></tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt id="link-704" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-704', 'basic', 'link-700');">basic</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-705" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-705', 'lower', 'link-705');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'basic '</tt><tt class="py-op">:</tt> </tt>
<a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">base64</tt><tt class="py-op">.</tt><tt class="py-name">b64decode</tt><tt class="py-op">(</tt><tt id="link-706" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-706', 'basic', 'link-700');">basic</a></tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L1391"></a><tt class="py-lineno">1391</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-707" class="py-name" targets="Method web2py.gluon.tools.Auth.login_bare()=web2py.gluon.tools.Auth-class.html#login_bare"><a title="web2py.gluon.tools.Auth.login_bare" class="py-name" href="#" onclick="return doclink('link-707', 'login_bare', 'link-707');">login_bare</a></tt><tt class="py-op">(</tt><tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line"> </tt>
<a name="Auth.login_bare"></a><div id="Auth.login_bare-def"><a name="L1393"></a><tt class="py-lineno">1393</tt> <a class="py-toggle" href="#" id="Auth.login_bare-toggle" onclick="return toggle('Auth.login_bare');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#login_bare">login_bare</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">username</tt><tt class="py-op">,</tt> <tt class="py-param">password</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.login_bare-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.login_bare-expanded"><a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line"><tt class="py-docstring">        logins user</tt> </tt>
<a name="L1396"></a><tt class="py-lineno">1396</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line"> </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-708" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-708', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-709" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-709', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-710" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-710', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1401"></a><tt class="py-lineno">1401</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-711" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-711', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_userfield</tt><tt class="py-op">:</tt> </tt>
<a name="L1402"></a><tt class="py-lineno">1402</tt>  <tt class="py-line">            <tt class="py-name">userfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-712" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-712', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_userfield</tt> </tt>
<a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line">            <tt class="py-name">userfield</tt> <tt class="py-op">=</tt> <tt class="py-string">'username'</tt> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1406"></a><tt class="py-lineno">1406</tt>  <tt class="py-line">            <tt class="py-name">userfield</tt> <tt class="py-op">=</tt> <tt class="py-string">'email'</tt> </tt>
<a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-713" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-713', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line">        <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">userfield</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">username</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-714" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-714', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-715" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-715', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-716" class="py-name" targets="Method web2py.gluon.dal.Field.validate()=web2py.gluon.dal.Field-class.html#validate,Method web2py.gluon.dal.GAEDecimalProperty.validate()=web2py.gluon.dal.GAEDecimalProperty-class.html#validate,Method web2py.gluon.html.FORM.validate()=web2py.gluon.html.FORM-class.html#validate"><a title="web2py.gluon.dal.Field.validate
web2py.gluon.dal.GAEDecimalProperty.validate
web2py.gluon.html.FORM.validate" class="py-name" href="#" onclick="return doclink('link-716', 'validate', 'link-716');">validate</a></tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt> <tt class="py-keyword">and</tt> <tt class="py-name">user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">password</tt><tt class="py-op">:</tt> </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line">                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt id="link-717" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-717', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-718" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-718', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt id="link-719" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-719', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">=</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">last_visit</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line">                                       <tt class="py-name">expiration</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-720" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-720', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">expiration</tt><tt class="py-op">,</tt> </tt>
<a name="L1415"></a><tt class="py-lineno">1415</tt>  <tt class="py-line">                                       <tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt id="link-721" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-721', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt> </tt>
<a name="L1417"></a><tt class="py-lineno">1417</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">user</tt> </tt>
<a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line"> </tt>
<a name="Auth.cas_login"></a><div id="Auth.cas_login-def"><a name="L1420"></a><tt class="py-lineno">1420</tt> <a class="py-toggle" href="#" id="Auth.cas_login-toggle" onclick="return toggle('Auth.cas_login');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#cas_login">cas_login</a><tt class="py-op">(</tt> </tt>
<a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-722" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-722', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-723" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-723', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1424"></a><tt class="py-lineno">1424</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-724" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-724', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-725" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-725', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line">        <tt class="py-param">version</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.cas_login-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.cas_login-expanded"><a name="L1428"></a><tt class="py-lineno">1428</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-726" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-726', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt id="link-727" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-727', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1429"></a><tt class="py-lineno">1429</tt>  <tt class="py-line">        <tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-728" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-728', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas</tt> </tt>
<a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">        <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">service</tt> <tt class="py-keyword">or</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-729" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-729', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_host</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-730" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-730', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cas_domains</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1432"></a><tt class="py-lineno">1432</tt>  <tt class="py-line">                <tt class="py-keyword">not</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt><tt class="py-op">:</tt> </tt>
<a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-731" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-731', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">'not authorized'</tt><tt class="py-op">)</tt> </tt>
<a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">allow_access</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line">            <tt class="py-name">row</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">(</tt><tt id="link-732" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-732', 'url', 'link-233');">url</a></tt><tt class="py-op">=</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt><tt class="py-op">,</tt><tt id="link-733" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-733', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
<a name="L1436"></a><tt class="py-lineno">1436</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> </tt>
<a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line">                <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-734" class="py-name"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-734', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-name">created_on</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">)</tt> </tt>
<a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">                <tt class="py-name">uuid</tt> <tt class="py-op">=</tt> <tt class="py-name">row</tt><tt class="py-op">.</tt><tt class="py-name">uuid</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1440"></a><tt class="py-lineno">1440</tt>  <tt class="py-line">                <tt class="py-name">uuid</tt> <tt class="py-op">=</tt> <tt id="link-735" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-735', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-736" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-736', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt id="link-737" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-737', 'url', 'link-233');">url</a></tt><tt class="py-op">=</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt><tt class="py-op">,</tt> <tt id="link-738" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-738', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> </tt>
<a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line">                             <tt class="py-name">uuid</tt><tt class="py-op">=</tt><tt class="py-name">uuid</tt><tt class="py-op">,</tt> <tt class="py-name">created_on</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">)</tt> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line">            <tt id="link-739" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-739', 'url', 'link-233');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt> </tt>
<a name="L1444"></a><tt class="py-lineno">1444</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">_cas_service</tt> </tt>
<a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line">            <tt id="link-740" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-740', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-741" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-741', 'url', 'link-233');">url</a></tt><tt class="py-op">+</tt><tt class="py-string">"?ticket="</tt><tt class="py-op">+</tt><tt class="py-name">uuid</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-742" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-742', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line">            <tt class="py-name">allow_access</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">cas_onaccept</tt><tt class="py-op">(</tt><tt class="py-param">form</tt><tt class="py-op">,</tt> <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt class="py-name">onaccept</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1449"></a><tt class="py-lineno">1449</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt><tt class="py-op">!=</tt><tt id="link-743" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-743', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> <tt class="py-name">onaccept</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line">            <tt class="py-name">allow_access</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-744" class="py-name"><a title="web2py.gluon.tools.Auth.login" class="py-name" href="#" onclick="return doclink('link-744', 'login', 'link-42');">login</a></tt><tt class="py-op">(</tt><tt id="link-745" class="py-name" targets="Method web2py.gluon.rocket.FileWrapper.next()=web2py.gluon.rocket.FileWrapper-class.html#next"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-745', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">cas_onaccept</tt><tt class="py-op">,</tt><tt id="link-746" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.log()=web2py.gluon.restricted.RestrictedError-class.html#log,Variable web2py.gluon.rocket.log=web2py.gluon.rocket-module.html#log,Method web2py.gluon.winservice.Service.log()=web2py.gluon.winservice.Service-class.html#log"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-746', 'log', 'link-746');">log</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line"> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line"> </tt>
<a name="Auth.cas_validate"></a><div id="Auth.cas_validate-def"><a name="L1454"></a><tt class="py-lineno">1454</tt> <a class="py-toggle" href="#" id="Auth.cas_validate-toggle" onclick="return toggle('Auth.cas_validate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#cas_validate">cas_validate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">version</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.cas_validate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.cas_validate-expanded"><a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-747" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-747', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line">        <tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-748" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-748', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_cas</tt> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line">        <tt id="link-749" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-749', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-string">'text'</tt> </tt>
<a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line">        <tt class="py-name">ticket</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">(</tt><tt class="py-name">uuid</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">ticket</tt><tt class="py-op">)</tt> </tt>
<a name="L1459"></a><tt class="py-lineno">1459</tt>  <tt class="py-line">        <tt id="link-750" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-750', 'url', 'link-233');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-751" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-751', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">path_info</tt><tt class="py-op">.</tt><tt class="py-name">rsplit</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ticket</tt><tt class="py-op">:</tt> <tt class="py-comment"># and ticket.created_on&gt;request.now-datetime.timedelta(60):</tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-752" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-752', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">(</tt><tt class="py-name">ticket</tt><tt class="py-op">.</tt><tt id="link-753" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-753', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line">            <tt class="py-name">fullname</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">first_name</tt><tt class="py-op">+</tt><tt class="py-string">' '</tt><tt class="py-op">+</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">last_name</tt> </tt>
<a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-754" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-754', 'version', 'link-429');">version</a></tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L1464"></a><tt class="py-lineno">1464</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-755" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-755', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt class="py-string">'yes\n%s:%s:%s'</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">,</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt><tt class="py-name">fullname</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line">            <tt class="py-comment"># assume version 2</tt> </tt>
<a name="L1466"></a><tt class="py-lineno">1466</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-756" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-756', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'username'</tt><tt class="py-op">,</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">)</tt> </tt>
<a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-757" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-757', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt class="py-string">'&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n'</tt><tt class="py-op">+</tt>\ </tt>
<a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line">                           <tt id="link-758" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-758', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">'cas:serviceResponse'</tt><tt class="py-op">]</tt><tt class="py-op">(</tt> </tt>
<a name="L1469"></a><tt class="py-lineno">1469</tt>  <tt class="py-line">                    <tt id="link-759" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-759', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">'cas:authenticationSuccess'</tt><tt class="py-op">]</tt><tt class="py-op">(</tt> </tt>
<a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line">                        <tt id="link-760" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-760', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">'cas:user'</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">username</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">                        <tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-761" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-761', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">'cas:'</tt><tt class="py-op">+</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-762" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-762', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-763" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-763', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line">                              <tt class="py-keyword">for</tt> <tt class="py-name">field</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-764" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-764', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> \ </tt>
<a name="L1473"></a><tt class="py-lineno">1473</tt>  <tt class="py-line">                              <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line">                    <tt class="py-op">**</tt><tt class="py-op">{</tt><tt class="py-string">'_xmlns:cas'</tt><tt class="py-op">:</tt><tt class="py-string">'http://www.yale.edu/tp/cas'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-765" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-765', 'xml', 'link-256');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-766" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-766', 'version', 'link-429');">version</a></tt><tt class="py-op">==</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-767" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-767', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt class="py-string">'no\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line">        <tt class="py-comment"># assume version 2</tt> </tt>
<a name="L1478"></a><tt class="py-lineno">1478</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">raise</tt> <tt id="link-768" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-768', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt><tt class="py-string">'&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n'</tt><tt class="py-op">+</tt>\ </tt>
<a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line">                       <tt id="link-769" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-769', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">'cas:serviceResponse'</tt><tt class="py-op">]</tt><tt class="py-op">(</tt> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">                <tt id="link-770" class="py-name"><a title="web2py.gluon.TAG
web2py.gluon.html.TAG
web2py.gluon.tools.TAG" class="py-name" href="#" onclick="return doclink('link-770', 'TAG', 'link-249');">TAG</a></tt><tt class="py-op">[</tt><tt class="py-string">'cas:authenticationFailure'</tt><tt class="py-op">]</tt><tt class="py-op">(</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line">                    <tt class="py-string">'Ticket %s not recognized'</tt> <tt class="py-op">%</tt> <tt class="py-name">ticket</tt><tt class="py-op">,</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line">                    <tt class="py-name">_code</tt><tt class="py-op">=</tt><tt class="py-string">'INVALID TICKET'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line">                <tt class="py-op">**</tt><tt class="py-op">{</tt><tt class="py-string">'_xmlns:cas'</tt><tt class="py-op">:</tt><tt class="py-string">'http://www.yale.edu/tp/cas'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-771" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-771', 'xml', 'link-256');">xml</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line"> </tt>
<a name="L1485"></a><tt class="py-lineno">1485</tt>  <tt class="py-line"> </tt>
<a name="Auth.login"></a><div id="Auth.login-def"><a name="L1486"></a><tt class="py-lineno">1486</tt> <a class="py-toggle" href="#" id="Auth.login-toggle" onclick="return toggle('Auth.login');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#login">login</a><tt class="py-op">(</tt> </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-772" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-772', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-773" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-773', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1490"></a><tt class="py-lineno">1490</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-774" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-774', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-775" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-775', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.login-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.login-expanded"><a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line"><tt class="py-docstring">        returns a login form</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.login([next=DEFAULT [, onvalidation=DEFAULT</tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line"><tt class="py-docstring">            [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line"> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-776" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-776', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-777" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-777', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_userfield</tt><tt class="py-op">:</tt> </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-778" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-778', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_userfield</tt> </tt>
<a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'username'</tt> </tt>
<a name="L1506"></a><tt class="py-lineno">1506</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'email'</tt> </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-779" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-779', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_email_validate</tt><tt class="py-op">:</tt> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line">            <tt class="py-name">tmpvalidator</tt> <tt class="py-op">=</tt> <tt id="link-780" class="py-name"><a title="web2py.gluon.validators.IS_NOT_EMPTY" class="py-name" href="#" onclick="return doclink('link-780', 'IS_NOT_EMPTY', 'link-522');">IS_NOT_EMPTY</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-781" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-781', 'is_empty', 'link-394');">is_empty</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line">            <tt class="py-name">tmpvalidator</tt> <tt class="py-op">=</tt> <tt id="link-782" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL" class="py-name" href="#" onclick="return doclink('link-782', 'IS_EMAIL', 'link-531');">IS_EMAIL</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt><tt class="py-op">)</tt> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line">        <tt class="py-name">old_requires</tt> <tt class="py-op">=</tt> <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-783" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-783', 'requires', 'link-505');">requires</a></tt> </tt>
<a name="L1513"></a><tt class="py-lineno">1513</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-784" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-784', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tmpvalidator</tt> </tt>
<a name="L1514"></a><tt class="py-lineno">1514</tt>  <tt class="py-line"> </tt>
<a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-785" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-785', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-786" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-786', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-787" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-787', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line"> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-788" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-788', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-789" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-789', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-790" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-790', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line">            <tt id="link-791" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-791', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-792" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-792', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_next</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-793" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-793', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-794" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-794', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_onvalidation</tt> </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-795" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-795', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-796" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-796', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_onaccept</tt> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-797" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-797', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-798" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-798', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line">            <tt id="link-799" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-799', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_log</tt> </tt>
<a name="L1530"></a><tt class="py-lineno">1530</tt>  <tt class="py-line"> </tt>
<a name="L1531"></a><tt class="py-lineno">1531</tt>  <tt class="py-line">        <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># default</tt> </tt>
<a name="L1532"></a><tt class="py-lineno">1532</tt>  <tt class="py-line"> </tt>
<a name="L1533"></a><tt class="py-lineno">1533</tt>  <tt class="py-line">        <tt class="py-comment"># do we use our own login form, or from a central source?</tt> </tt>
<a name="L1534"></a><tt class="py-lineno">1534</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-800" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-800', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L1535"></a><tt class="py-lineno">1535</tt>  <tt class="py-line">            <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-801" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLFORM=web2py.gluon.sqlhtml.SQLFORM-class.html"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-801', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1536"></a><tt class="py-lineno">1536</tt>  <tt class="py-line">                <tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1537"></a><tt class="py-lineno">1537</tt>  <tt class="py-line">                <tt class="py-name">fields</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1538"></a><tt class="py-lineno">1538</tt>  <tt class="py-line">                <tt class="py-name">hidden</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-802" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-802', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1539"></a><tt class="py-lineno">1539</tt>  <tt class="py-line">                <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-803" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-803', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L1540"></a><tt class="py-lineno">1540</tt>  <tt class="py-line">                <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_button</tt><tt class="py-op">,</tt> </tt>
<a name="L1541"></a><tt class="py-lineno">1541</tt>  <tt class="py-line">                <tt class="py-name">delete_label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L1542"></a><tt class="py-lineno">1542</tt>  <tt class="py-line">                <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-804" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-804', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L1543"></a><tt class="py-lineno">1543</tt>  <tt class="py-line">                <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-805" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-805', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L1544"></a><tt class="py-lineno">1544</tt>  <tt class="py-line">                <tt class="py-op">)</tt> </tt>
<a name="L1545"></a><tt class="py-lineno">1545</tt>  <tt class="py-line"> </tt>
<a name="L1546"></a><tt class="py-lineno">1546</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-806" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-806', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">remember_me_form</tt><tt class="py-op">:</tt> </tt>
<a name="L1547"></a><tt class="py-lineno">1547</tt>  <tt class="py-line">                <tt class="py-comment">## adds a new input checkbox "remember me for longer"</tt> </tt>
<a name="L1548"></a><tt class="py-lineno">1548</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt id="link-807" class="py-name" targets="Function web2py.gluon.tools.addrow()=web2py.gluon.tools-module.html#addrow"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-807', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt><tt id="link-808" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-808', 'XML', 'link-255');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">"&amp;nbsp;"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1549"></a><tt class="py-lineno">1549</tt>  <tt class="py-line">                       <tt id="link-809" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-809', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-810" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-810', 'XML', 'link-255');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">"&amp;nbsp;"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1550"></a><tt class="py-lineno">1550</tt>  <tt class="py-line">                           <tt id="link-811" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-811', 'INPUT', 'link-253');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">'checkbox'</tt><tt class="py-op">,</tt> </tt>
<a name="L1551"></a><tt class="py-lineno">1551</tt>  <tt class="py-line">                                 <tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'checkbox'</tt><tt class="py-op">,</tt> </tt>
<a name="L1552"></a><tt class="py-lineno">1552</tt>  <tt class="py-line">                                 <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">"auth_user_remember"</tt><tt class="py-op">,</tt> </tt>
<a name="L1553"></a><tt class="py-lineno">1553</tt>  <tt class="py-line">                                 <tt id="link-812" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-812', '_name', 'link-254');">_name</a></tt><tt class="py-op">=</tt><tt class="py-string">"remember"</tt><tt class="py-op">,</tt> </tt>
<a name="L1554"></a><tt class="py-lineno">1554</tt>  <tt class="py-line">                                 <tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1555"></a><tt class="py-lineno">1555</tt>  <tt class="py-line">                           <tt id="link-813" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-813', 'XML', 'link-255');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">"&amp;nbsp;&amp;nbsp;"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1556"></a><tt class="py-lineno">1556</tt>  <tt class="py-line">                           <tt id="link-814" class="py-name"><a title="web2py.gluon.html.LABEL" class="py-name" href="#" onclick="return doclink('link-814', 'LABEL', 'link-265');">LABEL</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1557"></a><tt class="py-lineno">1557</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">label_remember_me</tt><tt class="py-op">,</tt> </tt>
<a name="L1558"></a><tt class="py-lineno">1558</tt>  <tt class="py-line">                            <tt class="py-name">_for</tt><tt class="py-op">=</tt><tt class="py-string">"auth_user_remember"</tt><tt class="py-op">,</tt> </tt>
<a name="L1559"></a><tt class="py-lineno">1559</tt>  <tt class="py-line">                            <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> </tt>
<a name="L1560"></a><tt class="py-lineno">1560</tt>  <tt class="py-line">                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-815" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-815', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L1561"></a><tt class="py-lineno">1561</tt>  <tt class="py-line">                       <tt class="py-string">'auth_user_remember__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L1562"></a><tt class="py-lineno">1562</tt>  <tt class="py-line"> </tt>
<a name="L1563"></a><tt class="py-lineno">1563</tt>  <tt class="py-line">            <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-816" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-816', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_captcha</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1564"></a><tt class="py-lineno">1564</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-817" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-817', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_captcha</tt><tt class="py-op">!=</tt><tt class="py-name">False</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-818" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-818', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt><tt class="py-op">)</tt> </tt>
<a name="L1565"></a><tt class="py-lineno">1565</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L1566"></a><tt class="py-lineno">1566</tt>  <tt class="py-line">                <tt id="link-819" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-819', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-820" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-820', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt><tt class="py-string">'captcha__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L1567"></a><tt class="py-lineno">1567</tt>  <tt class="py-line">            <tt class="py-name">accepted_form</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1568"></a><tt class="py-lineno">1568</tt>  <tt class="py-line"> </tt>
<a name="L1569"></a><tt class="py-lineno">1569</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-821" class="py-name" targets="Method web2py.gluon.html.FORM.accepts()=web2py.gluon.html.FORM-class.html#accepts,Method web2py.gluon.sqlhtml.SQLFORM.accepts()=web2py.gluon.sqlhtml.SQLFORM-class.html#accepts"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-821', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L1570"></a><tt class="py-lineno">1570</tt>  <tt class="py-line">                            <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">,</tt> <tt class="py-name">dbio</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1571"></a><tt class="py-lineno">1571</tt>  <tt class="py-line">                            <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> </tt>
<a name="L1572"></a><tt class="py-lineno">1572</tt>  <tt class="py-line">                            <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-822" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-822', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1573"></a><tt class="py-lineno">1573</tt>  <tt class="py-line"> </tt>
<a name="L1574"></a><tt class="py-lineno">1574</tt>  <tt class="py-line">                <tt class="py-name">accepted_form</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1575"></a><tt class="py-lineno">1575</tt>  <tt class="py-line">                <tt class="py-comment"># check for username in db</tt> </tt>
<a name="L1576"></a><tt class="py-lineno">1576</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-823" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-823', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-824" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-824', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1577"></a><tt class="py-lineno">1577</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1578"></a><tt class="py-lineno">1578</tt>  <tt class="py-line">                    <tt class="py-comment"># user in db, check if registration pending or disabled</tt> </tt>
<a name="L1579"></a><tt class="py-lineno">1579</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">temp_user</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt> </tt>
<a name="L1580"></a><tt class="py-lineno">1580</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">temp_user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt> <tt class="py-op">==</tt> <tt class="py-string">'pending'</tt><tt class="py-op">:</tt> </tt>
<a name="L1581"></a><tt class="py-lineno">1581</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_pending</tt> </tt>
<a name="L1582"></a><tt class="py-lineno">1582</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
<a name="L1583"></a><tt class="py-lineno">1583</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">temp_user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'disabled'</tt><tt class="py-op">,</tt><tt class="py-string">'blocked'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1584"></a><tt class="py-lineno">1584</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">login_disabled</tt> </tt>
<a name="L1585"></a><tt class="py-lineno">1585</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
<a name="L1586"></a><tt class="py-lineno">1586</tt>  <tt class="py-line">                    <tt class="py-keyword">elif</tt> <tt class="py-name">temp_user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1587"></a><tt class="py-lineno">1587</tt>  <tt class="py-line">                            <tt class="py-name">temp_user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt><tt class="py-op">.</tt><tt id="link-825" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-825', 'strip', 'link-75');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1588"></a><tt class="py-lineno">1588</tt>  <tt class="py-line">                        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1589"></a><tt class="py-lineno">1589</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_verifying</tt> </tt>
<a name="L1590"></a><tt class="py-lineno">1590</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
<a name="L1591"></a><tt class="py-lineno">1591</tt>  <tt class="py-line">                    <tt class="py-comment"># try alternate logins 1st as these have the</tt> </tt>
<a name="L1592"></a><tt class="py-lineno">1592</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># current version of the password</tt> </tt>
<a name="L1593"></a><tt class="py-lineno">1593</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1594"></a><tt class="py-lineno">1594</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">login_method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-826" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-826', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1595"></a><tt class="py-lineno">1595</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">login_method</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1596"></a><tt class="py-lineno">1596</tt>  <tt class="py-line">                                <tt class="py-name">login_method</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1597"></a><tt class="py-lineno">1597</tt>  <tt class="py-line">                                             <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1598"></a><tt class="py-lineno">1598</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-827" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-827', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1599"></a><tt class="py-lineno">1599</tt>  <tt class="py-line">                                <tt class="py-comment"># do not store password in db</tt> </tt>
<a name="L1600"></a><tt class="py-lineno">1600</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1601"></a><tt class="py-lineno">1601</tt>  <tt class="py-line">                            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-828" class="py-name" targets="Method web2py.gluon.tools.Auth.get_or_create_user()=web2py.gluon.tools.Auth-class.html#get_or_create_user"><a title="web2py.gluon.tools.Auth.get_or_create_user" class="py-name" href="#" onclick="return doclink('link-828', 'get_or_create_user', 'link-828');">get_or_create_user</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L1602"></a><tt class="py-lineno">1602</tt>  <tt class="py-line">                            <tt class="py-keyword">break</tt> </tt>
<a name="L1603"></a><tt class="py-lineno">1603</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1604"></a><tt class="py-lineno">1604</tt>  <tt class="py-line">                        <tt class="py-comment"># alternates have failed, maybe because service inaccessible</tt> </tt>
<a name="L1605"></a><tt class="py-lineno">1605</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-829" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-829', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L1606"></a><tt class="py-lineno">1606</tt>  <tt class="py-line">                            <tt class="py-comment"># try logging in locally using cached credentials</tt> </tt>
<a name="L1607"></a><tt class="py-lineno">1607</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-keyword">if</tt> <tt class="py-name">temp_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-830" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-830', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">passfield</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1608"></a><tt class="py-lineno">1608</tt>  <tt class="py-line">                                <tt class="py-comment"># success</tt> </tt>
<a name="L1609"></a><tt class="py-lineno">1609</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">temp_user</tt> </tt>
<a name="L1610"></a><tt class="py-lineno">1610</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1611"></a><tt class="py-lineno">1611</tt>  <tt class="py-line">                    <tt class="py-comment"># user not in db</tt> </tt>
<a name="L1612"></a><tt class="py-lineno">1612</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-831" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-831', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">alternate_requires_registration</tt><tt class="py-op">:</tt> </tt>
<a name="L1613"></a><tt class="py-lineno">1613</tt>  <tt class="py-line">                        <tt class="py-comment"># we're allowed to auto-register users from external systems</tt> </tt>
<a name="L1614"></a><tt class="py-lineno">1614</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">for</tt> <tt class="py-name">login_method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-832" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-832', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1615"></a><tt class="py-lineno">1615</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-name">login_method</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L1616"></a><tt class="py-lineno">1616</tt>  <tt class="py-line">                                    <tt class="py-name">login_method</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1617"></a><tt class="py-lineno">1617</tt>  <tt class="py-line">                                                 <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1618"></a><tt class="py-lineno">1618</tt>  <tt class="py-line">                                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-833" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-833', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1619"></a><tt class="py-lineno">1619</tt>  <tt class="py-line">                                    <tt class="py-comment"># do not store password in db</tt> </tt>
<a name="L1620"></a><tt class="py-lineno">1620</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                    <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1621"></a><tt class="py-lineno">1621</tt>  <tt class="py-line">                                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-834" class="py-name"><a title="web2py.gluon.tools.Auth.get_or_create_user" class="py-name" href="#" onclick="return doclink('link-834', 'get_or_create_user', 'link-828');">get_or_create_user</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L1622"></a><tt class="py-lineno">1622</tt>  <tt class="py-line">                                <tt class="py-keyword">break</tt> </tt>
<a name="L1623"></a><tt class="py-lineno">1623</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1624"></a><tt class="py-lineno">1624</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-835" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-835', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_failed_log</tt><tt class="py-op">:</tt> </tt>
<a name="L1625"></a><tt class="py-lineno">1625</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-836" class="py-name" targets="Method web2py.gluon.tools.Auth.log_event()=web2py.gluon.tools.Auth-class.html#log_event,Method web2py.gluon.tools.Crud.log_event()=web2py.gluon.tools.Crud-class.html#log_event"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-836', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-837" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-837', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_failed_log</tt> <tt class="py-op">%</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L1626"></a><tt class="py-lineno">1626</tt>  <tt class="py-line">                    <tt class="py-comment"># invalid login</tt> </tt>
<a name="L1627"></a><tt class="py-lineno">1627</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_login</tt> </tt>
<a name="L1628"></a><tt class="py-lineno">1628</tt>  <tt class="py-line">                    <tt id="link-838" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-838', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-839" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-839', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1629"></a><tt class="py-lineno">1629</tt>  <tt class="py-line"> </tt>
<a name="L1630"></a><tt class="py-lineno">1630</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1631"></a><tt class="py-lineno">1631</tt>  <tt class="py-line">            <tt class="py-comment"># use a central authentication server</tt> </tt>
<a name="L1632"></a><tt class="py-lineno">1632</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">cas</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-840" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-840', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> </tt>
<a name="L1633"></a><tt class="py-lineno">1633</tt>  <tt class="py-line">            <tt class="py-name">cas_user</tt> <tt class="py-op">=</tt> <tt class="py-name">cas</tt><tt class="py-op">.</tt><tt class="py-name">get_user</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1634"></a><tt class="py-lineno">1634</tt>  <tt class="py-line"> </tt>
<a name="L1635"></a><tt class="py-lineno">1635</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">cas_user</tt><tt class="py-op">:</tt> </tt>
<a name="L1636"></a><tt class="py-lineno">1636</tt>  <tt class="py-line">                <tt class="py-name">cas_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1637"></a><tt class="py-lineno">1637</tt>  <tt class="py-line">                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-841" class="py-name"><a title="web2py.gluon.tools.Auth.get_or_create_user" class="py-name" href="#" onclick="return doclink('link-841', 'get_or_create_user', 'link-828');">get_or_create_user</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-842" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-842', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">cas_user</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1638"></a><tt class="py-lineno">1638</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">cas</tt><tt class="py-op">,</tt><tt class="py-string">'login_form'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1639"></a><tt class="py-lineno">1639</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">cas</tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1640"></a><tt class="py-lineno">1640</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1641"></a><tt class="py-lineno">1641</tt>  <tt class="py-line">                <tt class="py-comment"># we need to pass through login again before going on</tt> </tt>
<a name="L1642"></a><tt class="py-lineno">1642</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt id="link-843" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-843', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-844" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-844', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'user'</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'login'</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-845" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-845', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1643"></a><tt class="py-lineno">1643</tt>  <tt class="py-line">                <tt id="link-846" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-846', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">cas</tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt><tt class="py-op">(</tt><tt id="link-847" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-847', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1644"></a><tt class="py-lineno">1644</tt>  <tt class="py-line"> </tt>
<a name="L1645"></a><tt class="py-lineno">1645</tt>  <tt class="py-line"> </tt>
<a name="L1646"></a><tt class="py-lineno">1646</tt>  <tt class="py-line">        <tt class="py-comment"># process authenticated users</tt> </tt>
<a name="L1647"></a><tt class="py-lineno">1647</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1648"></a><tt class="py-lineno">1648</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt id="link-848" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-848', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-849" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-849', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1649"></a><tt class="py-lineno">1649</tt>  <tt class="py-line"> </tt>
<a name="L1650"></a><tt class="py-lineno">1650</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-850" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-850', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1651"></a><tt class="py-lineno">1651</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-851" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-851', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-852" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-852', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L1652"></a><tt class="py-lineno">1652</tt>  <tt class="py-line"> </tt>
<a name="L1653"></a><tt class="py-lineno">1653</tt>  <tt class="py-line">        <tt class="py-comment"># process authenticated users</tt> </tt>
<a name="L1654"></a><tt class="py-lineno">1654</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># user wants to be logged in for longer</tt> </tt>
<a name="L1655"></a><tt class="py-lineno">1655</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt id="link-853" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-853', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1656"></a><tt class="py-lineno">1656</tt>  <tt class="py-line">                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt><tt class="py-op">,</tt> </tt>
<a name="L1657"></a><tt class="py-lineno">1657</tt>  <tt class="py-line">                <tt class="py-name">last_visit</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L1658"></a><tt class="py-lineno">1658</tt>  <tt class="py-line">                <tt class="py-name">expiration</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-854" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-854', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">long_expiration</tt><tt class="py-op">,</tt> </tt>
<a name="L1659"></a><tt class="py-lineno">1659</tt>  <tt class="py-line">                <tt class="py-name">remember</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-855" class="py-name" targets="Method web2py.gluon.rocket.Headers.has_key()=web2py.gluon.rocket.Headers-class.html#has_key"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-855', 'has_key', 'link-855');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">"remember"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1660"></a><tt class="py-lineno">1660</tt>  <tt class="py-line">                <tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt id="link-856" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-856', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1661"></a><tt class="py-lineno">1661</tt>  <tt class="py-line">                <tt class="py-op">)</tt> </tt>
<a name="L1662"></a><tt class="py-lineno">1662</tt>  <tt class="py-line"> </tt>
<a name="L1663"></a><tt class="py-lineno">1663</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt> </tt>
<a name="L1664"></a><tt class="py-lineno">1664</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logged_in</tt> </tt>
<a name="L1665"></a><tt class="py-lineno">1665</tt>  <tt class="py-line"> </tt>
<a name="L1666"></a><tt class="py-lineno">1666</tt>  <tt class="py-line">        <tt class="py-comment"># how to continue</tt> </tt>
<a name="L1667"></a><tt class="py-lineno">1667</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-857" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-857', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L1668"></a><tt class="py-lineno">1668</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">accepted_form</tt><tt class="py-op">:</tt> </tt>
<a name="L1669"></a><tt class="py-lineno">1669</tt>  <tt class="py-line">                <tt id="link-858" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-858', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L1670"></a><tt class="py-lineno">1670</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-859" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-859', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1671"></a><tt class="py-lineno">1671</tt>  <tt class="py-line">                    <tt class="py-comment"># fix issue with 2.6</tt> </tt>
<a name="L1672"></a><tt class="py-lineno">1672</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt id="link-860" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-860', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-861" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-861', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1673"></a><tt class="py-lineno">1673</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-862" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-862', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-863" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-863', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-864" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-864', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L1674"></a><tt class="py-lineno">1674</tt>  <tt class="py-line">                    <tt id="link-865" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-865', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-866" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-866', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-867" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-867', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1675"></a><tt class="py-lineno">1675</tt>  <tt class="py-line">                <tt id="link-868" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-868', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-869" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-869', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1676"></a><tt class="py-lineno">1676</tt>  <tt class="py-line">            <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-870" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-870', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">old_requires</tt> </tt>
<a name="L1677"></a><tt class="py-lineno">1677</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
<a name="L1678"></a><tt class="py-lineno">1678</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1679"></a><tt class="py-lineno">1679</tt>  <tt class="py-line">            <tt id="link-871" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-871', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1680"></a><tt class="py-lineno">1680</tt>  <tt class="py-line">        <tt id="link-872" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-872', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-873" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-873', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1681"></a><tt class="py-lineno">1681</tt>  <tt class="py-line"> </tt>
<a name="Auth.logout"></a><div id="Auth.logout-def"><a name="L1682"></a><tt class="py-lineno">1682</tt> <a class="py-toggle" href="#" id="Auth.logout-toggle" onclick="return toggle('Auth.logout');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#logout">logout</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-874" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-874', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> <tt class="py-param">onlogout</tt><tt class="py-op">=</tt><tt id="link-875" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-875', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-876" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-876', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.logout-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.logout-expanded"><a name="L1683"></a><tt class="py-lineno">1683</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1684"></a><tt class="py-lineno">1684</tt>  <tt class="py-line"><tt class="py-docstring">        logout and redirects to login</tt> </tt>
<a name="L1685"></a><tt class="py-lineno">1685</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1686"></a><tt class="py-lineno">1686</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.logout ([next=DEFAULT[, onlogout=DEFAULT[,</tt> </tt>
<a name="L1687"></a><tt class="py-lineno">1687</tt>  <tt class="py-line"><tt class="py-docstring">            log=DEFAULT]]])</tt> </tt>
<a name="L1688"></a><tt class="py-lineno">1688</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1689"></a><tt class="py-lineno">1689</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1690"></a><tt class="py-lineno">1690</tt>  <tt class="py-line"> </tt>
<a name="L1691"></a><tt class="py-lineno">1691</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-877" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-877', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-878" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-878', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1692"></a><tt class="py-lineno">1692</tt>  <tt class="py-line">            <tt id="link-879" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-879', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-880" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-880', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">logout_next</tt> </tt>
<a name="L1693"></a><tt class="py-lineno">1693</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onlogout</tt> <tt class="py-op">==</tt> <tt id="link-881" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-881', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1694"></a><tt class="py-lineno">1694</tt>  <tt class="py-line">            <tt class="py-name">onlogout</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-882" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-882', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">logout_onlogout</tt> </tt>
<a name="L1695"></a><tt class="py-lineno">1695</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onlogout</tt><tt class="py-op">:</tt> </tt>
<a name="L1696"></a><tt class="py-lineno">1696</tt>  <tt class="py-line">            <tt class="py-name">onlogout</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L1697"></a><tt class="py-lineno">1697</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-883" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-883', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-884" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-884', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1698"></a><tt class="py-lineno">1698</tt>  <tt class="py-line">            <tt id="link-885" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-885', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logout_log</tt> </tt>
<a name="L1699"></a><tt class="py-lineno">1699</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-886" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-886', 'log', 'link-746');">log</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1700"></a><tt class="py-lineno">1700</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-887" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-887', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-888" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-888', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L1701"></a><tt class="py-lineno">1701</tt>  <tt class="py-line"> </tt>
<a name="L1702"></a><tt class="py-lineno">1702</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-889" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-889', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L1703"></a><tt class="py-lineno">1703</tt>  <tt class="py-line">            <tt class="py-name">cas</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-890" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-890', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_form</tt> </tt>
<a name="L1704"></a><tt class="py-lineno">1704</tt>  <tt class="py-line">            <tt class="py-name">cas_user</tt> <tt class="py-op">=</tt> <tt class="py-name">cas</tt><tt class="py-op">.</tt><tt class="py-name">get_user</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1705"></a><tt class="py-lineno">1705</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">cas_user</tt><tt class="py-op">:</tt> </tt>
<a name="L1706"></a><tt class="py-lineno">1706</tt>  <tt class="py-line">                <tt id="link-891" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-891', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">cas</tt><tt class="py-op">.</tt><tt class="py-name">logout_url</tt><tt class="py-op">(</tt><tt id="link-892" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-892', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1707"></a><tt class="py-lineno">1707</tt>  <tt class="py-line"> </tt>
<a name="L1708"></a><tt class="py-lineno">1708</tt>  <tt class="py-line">        <tt id="link-893" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-893', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1709"></a><tt class="py-lineno">1709</tt>  <tt class="py-line">        <tt id="link-894" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-894', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logged_out</tt> </tt>
<a name="L1710"></a><tt class="py-lineno">1710</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-895" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-895', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1711"></a><tt class="py-lineno">1711</tt>  <tt class="py-line">            <tt id="link-896" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-896', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-897" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-897', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1712"></a><tt class="py-lineno">1712</tt>  <tt class="py-line"> </tt>
<a name="Auth.register"></a><div id="Auth.register-def"><a name="L1713"></a><tt class="py-lineno">1713</tt> <a class="py-toggle" href="#" id="Auth.register-toggle" onclick="return toggle('Auth.register');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#register">register</a><tt class="py-op">(</tt> </tt>
<a name="L1714"></a><tt class="py-lineno">1714</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1715"></a><tt class="py-lineno">1715</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-898" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-898', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1716"></a><tt class="py-lineno">1716</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-899" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-899', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1717"></a><tt class="py-lineno">1717</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-900" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-900', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1718"></a><tt class="py-lineno">1718</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-901" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-901', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1719"></a><tt class="py-lineno">1719</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.register-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.register-expanded"><a name="L1720"></a><tt class="py-lineno">1720</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1721"></a><tt class="py-lineno">1721</tt>  <tt class="py-line"><tt class="py-docstring">        returns a registration form</tt> </tt>
<a name="L1722"></a><tt class="py-lineno">1722</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1723"></a><tt class="py-lineno">1723</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.register([next=DEFAULT [, onvalidation=DEFAULT</tt> </tt>
<a name="L1724"></a><tt class="py-lineno">1724</tt>  <tt class="py-line"><tt class="py-docstring">            [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L1725"></a><tt class="py-lineno">1725</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1726"></a><tt class="py-lineno">1726</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1727"></a><tt class="py-lineno">1727</tt>  <tt class="py-line"> </tt>
<a name="L1728"></a><tt class="py-lineno">1728</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-902" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-902', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1729"></a><tt class="py-lineno">1729</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-903" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-903', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1730"></a><tt class="py-lineno">1730</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-904" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-904', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L1731"></a><tt class="py-lineno">1731</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-905" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-905', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1732"></a><tt class="py-lineno">1732</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-906" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-906', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1733"></a><tt class="py-lineno">1733</tt>  <tt class="py-line">            <tt id="link-907" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-907', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-908" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-908', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">logged_url</tt><tt class="py-op">)</tt> </tt>
<a name="L1734"></a><tt class="py-lineno">1734</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-909" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-909', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-910" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-910', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1735"></a><tt class="py-lineno">1735</tt>  <tt class="py-line">            <tt id="link-911" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-911', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1736"></a><tt class="py-lineno">1736</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1737"></a><tt class="py-lineno">1737</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-912" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-912', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_next</tt> </tt>
<a name="L1738"></a><tt class="py-lineno">1738</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-913" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-913', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1739"></a><tt class="py-lineno">1739</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-914" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-914', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_onvalidation</tt> </tt>
<a name="L1740"></a><tt class="py-lineno">1740</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-915" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-915', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1741"></a><tt class="py-lineno">1741</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-916" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-916', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_onaccept</tt> </tt>
<a name="L1742"></a><tt class="py-lineno">1742</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-917" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-917', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-918" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-918', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1743"></a><tt class="py-lineno">1743</tt>  <tt class="py-line">            <tt id="link-919" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-919', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">register_log</tt> </tt>
<a name="L1744"></a><tt class="py-lineno">1744</tt>  <tt class="py-line"> </tt>
<a name="L1745"></a><tt class="py-lineno">1745</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-920" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-920', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L1746"></a><tt class="py-lineno">1746</tt>  <tt class="py-line">        <tt class="py-name">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-921" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-921', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> </tt>
<a name="L1747"></a><tt class="py-lineno">1747</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-922" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-922', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1748"></a><tt class="py-lineno">1748</tt>  <tt class="py-line">                       <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-923" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-923', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_fields</tt><tt class="py-op">,</tt> </tt>
<a name="L1749"></a><tt class="py-lineno">1749</tt>  <tt class="py-line">                       <tt class="py-name">hidden</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-924" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-924', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1750"></a><tt class="py-lineno">1750</tt>  <tt class="py-line">                       <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-925" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-925', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L1751"></a><tt class="py-lineno">1751</tt>  <tt class="py-line">                       <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">register_button</tt><tt class="py-op">,</tt> </tt>
<a name="L1752"></a><tt class="py-lineno">1752</tt>  <tt class="py-line">                       <tt class="py-name">delete_label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L1753"></a><tt class="py-lineno">1753</tt>  <tt class="py-line">                       <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L1754"></a><tt class="py-lineno">1754</tt>  <tt class="py-line">                       <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-926" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-926', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L1755"></a><tt class="py-lineno">1755</tt>  <tt class="py-line">                       <tt class="py-op">)</tt> </tt>
<a name="L1756"></a><tt class="py-lineno">1756</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">row</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1757"></a><tt class="py-lineno">1757</tt>  <tt class="py-line">            <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-name">row</tt><tt class="py-op">.</tt><tt id="link-927" class="py-name" targets="Method web2py.gluon.html.DIV.element()=web2py.gluon.html.DIV-class.html#element"><a title="web2py.gluon.html.DIV.element" class="py-name" href="#" onclick="return doclink('link-927', 'element', 'link-927');">element</a></tt><tt class="py-op">(</tt><tt class="py-string">'input'</tt><tt class="py-op">,</tt><tt id="link-928" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-928', '_name', 'link-254');">_name</a></tt><tt class="py-op">=</tt><tt class="py-name">passfield</tt><tt class="py-op">)</tt> </tt>
<a name="L1758"></a><tt class="py-lineno">1758</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">item</tt><tt class="py-op">:</tt> </tt>
<a name="L1759"></a><tt class="py-lineno">1759</tt>  <tt class="py-line">                <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-929" class="py-name" targets="Static Method web2py.gluon.sqlhtml.BooleanWidget.widget()=web2py.gluon.sqlhtml.BooleanWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.CheckboxesWidget.widget()=web2py.gluon.sqlhtml.CheckboxesWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.FormWidget.widget()=web2py.gluon.sqlhtml.FormWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.ListWidget.widget()=web2py.gluon.sqlhtml.ListWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.MultipleOptionsWidget.widget()=web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.OptionsWidget.widget()=web2py.gluon.sqlhtml.OptionsWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.PasswordWidget.widget()=web2py.gluon.sqlhtml.PasswordWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.RadioWidget.widget()=web2py.gluon.sqlhtml.RadioWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.StringWidget.widget()=web2py.gluon.sqlhtml.StringWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.TextWidget.widget()=web2py.gluon.sqlhtml.TextWidget-class.html#widget,Static Method web2py.gluon.sqlhtml.UploadWidget.widget()=web2py.gluon.sqlhtml.UploadWidget-class.html#widget,Module web2py.gluon.widget=web2py.gluon.widget-module.html"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-929', 'widget', 'link-929');">widget</a></tt><tt class="py-op">.</tt><tt class="py-name">password_two</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1760"></a><tt class="py-lineno">1760</tt>  <tt class="py-line">                    <tt id="link-930" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-930', 'INPUT', 'link-253');">INPUT</a></tt><tt class="py-op">(</tt><tt id="link-931" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-931', '_name', 'link-254');">_name</a></tt><tt class="py-op">=</tt><tt class="py-string">"password_two"</tt><tt class="py-op">,</tt>  <tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">"password"</tt><tt class="py-op">,</tt> </tt>
<a name="L1761"></a><tt class="py-lineno">1761</tt>  <tt class="py-line">                          <tt id="link-932" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-932', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt id="link-933" class="py-name" targets="Class web2py.gluon.validators.IS_EXPR=web2py.gluon.validators.IS_EXPR-class.html"><a title="web2py.gluon.validators.IS_EXPR" class="py-name" href="#" onclick="return doclink('link-933', 'IS_EXPR', 'link-933');">IS_EXPR</a></tt><tt class="py-op">(</tt><tt class="py-string">'value==%s'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1762"></a><tt class="py-lineno">1762</tt>  <tt class="py-line">                          <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-934" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-934', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">passfield</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1763"></a><tt class="py-lineno">1763</tt>  <tt class="py-line">                          <tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">mismatched_password</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1764"></a><tt class="py-lineno">1764</tt>  <tt class="py-line"> </tt>
<a name="L1765"></a><tt class="py-lineno">1765</tt>  <tt class="py-line">                <tt id="link-935" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-935', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_password</tt> <tt class="py-op">+</tt> <tt class="py-string">':'</tt><tt class="py-op">,</tt> </tt>
<a name="L1766"></a><tt class="py-lineno">1766</tt>  <tt class="py-line">                       <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">custom</tt><tt class="py-op">.</tt><tt id="link-936" class="py-name"><a title="web2py.gluon.sqlhtml.BooleanWidget.widget
web2py.gluon.sqlhtml.CheckboxesWidget.widget
web2py.gluon.sqlhtml.FormWidget.widget
web2py.gluon.sqlhtml.ListWidget.widget
web2py.gluon.sqlhtml.MultipleOptionsWidget.widget
web2py.gluon.sqlhtml.OptionsWidget.widget
web2py.gluon.sqlhtml.PasswordWidget.widget
web2py.gluon.sqlhtml.RadioWidget.widget
web2py.gluon.sqlhtml.StringWidget.widget
web2py.gluon.sqlhtml.TextWidget.widget
web2py.gluon.sqlhtml.UploadWidget.widget
web2py.gluon.widget" class="py-name" href="#" onclick="return doclink('link-936', 'widget', 'link-929');">widget</a></tt><tt class="py-op">.</tt><tt class="py-name">password_two</tt><tt class="py-op">,</tt> </tt>
<a name="L1767"></a><tt class="py-lineno">1767</tt>  <tt class="py-line">                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_password_comment</tt><tt class="py-op">,</tt> </tt>
<a name="L1768"></a><tt class="py-lineno">1768</tt>  <tt class="py-line">                       <tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L1769"></a><tt class="py-lineno">1769</tt>  <tt class="py-line">                       <tt class="py-string">'%s_%s__row'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> <tt class="py-string">'password_two'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1770"></a><tt class="py-lineno">1770</tt>  <tt class="py-line">                       <tt class="py-name">position</tt><tt class="py-op">=</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L1771"></a><tt class="py-lineno">1771</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> </tt>
<a name="L1772"></a><tt class="py-lineno">1772</tt>  <tt class="py-line">        <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-937" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-937', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">register_captcha</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-938" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-938', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt> </tt>
<a name="L1773"></a><tt class="py-lineno">1773</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L1774"></a><tt class="py-lineno">1774</tt>  <tt class="py-line">            <tt id="link-939" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-939', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-940" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-940', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> <tt class="py-string">'captcha__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L1775"></a><tt class="py-lineno">1775</tt>  <tt class="py-line"> </tt>
<a name="L1776"></a><tt class="py-lineno">1776</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt><tt class="py-op">.</tt><tt class="py-name">default</tt> <tt class="py-op">=</tt> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt id="link-941" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-941', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1777"></a><tt class="py-lineno">1777</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-942" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-942', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'register'</tt><tt class="py-op">,</tt> </tt>
<a name="L1778"></a><tt class="py-lineno">1778</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-943" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-943', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1779"></a><tt class="py-lineno">1779</tt>  <tt class="py-line">            <tt class="py-name">description</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">group_description</tt> <tt class="py-op">%</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt> </tt>
<a name="L1780"></a><tt class="py-lineno">1780</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-944" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-944', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_user_groups</tt><tt class="py-op">:</tt> </tt>
<a name="L1781"></a><tt class="py-lineno">1781</tt>  <tt class="py-line">                <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-945" class="py-name"><a title="web2py.gluon.tools.Auth.add_group" class="py-name" href="#" onclick="return doclink('link-945', 'add_group', 'link-695');">add_group</a></tt><tt class="py-op">(</tt><tt class="py-string">"user_%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-name">description</tt><tt class="py-op">)</tt> </tt>
<a name="L1782"></a><tt class="py-lineno">1782</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-946" class="py-name"><a title="web2py.gluon.tools.Auth.add_membership" class="py-name" href="#" onclick="return doclink('link-946', 'add_membership', 'link-697');">add_membership</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
<a name="L1783"></a><tt class="py-lineno">1783</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-947" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-947', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">registration_requires_verification</tt><tt class="py-op">:</tt> </tt>
<a name="L1784"></a><tt class="py-lineno">1784</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-948" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-948', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1785"></a><tt class="py-lineno">1785</tt>  <tt class="py-line">                   <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-949" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-949', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">.</tt><tt id="link-950" class="py-name" targets="Method web2py.gluon.tools.Mail.send()=web2py.gluon.tools.Mail-class.html#send"><a title="web2py.gluon.tools.Mail.send" class="py-name" href="#" onclick="return doclink('link-950', 'send', 'link-950');">send</a></tt><tt class="py-op">(</tt><tt id="link-951" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-951', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L1786"></a><tt class="py-lineno">1786</tt>  <tt class="py-line">                        <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_email_subject</tt><tt class="py-op">,</tt> </tt>
<a name="L1787"></a><tt class="py-lineno">1787</tt>  <tt class="py-line">                        <tt id="link-952" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-952', 'message', 'link-69');">message</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-953" class="py-name"><a title="web2py.gluon.tools.Auth.verify_email" class="py-name" href="#" onclick="return doclink('link-953', 'verify_email', 'link-395');">verify_email</a></tt> </tt>
<a name="L1788"></a><tt class="py-lineno">1788</tt>  <tt class="py-line">                         <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1789"></a><tt class="py-lineno">1789</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-954" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.rollback()=web2py.gluon.dal.BaseAdapter-class.html#rollback,Method web2py.gluon.dal.DAL.rollback()=web2py.gluon.dal.DAL-class.html#rollback,Method web2py.gluon.dal.NoSQLAdapter.rollback()=web2py.gluon.dal.NoSQLAdapter-class.html#rollback"><a title="web2py.gluon.dal.BaseAdapter.rollback
web2py.gluon.dal.DAL.rollback
web2py.gluon.dal.NoSQLAdapter.rollback" class="py-name" href="#" onclick="return doclink('link-954', 'rollback', 'link-954');">rollback</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1790"></a><tt class="py-lineno">1790</tt>  <tt class="py-line">                    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">unable_send_email</tt> </tt>
<a name="L1791"></a><tt class="py-lineno">1791</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
<a name="L1792"></a><tt class="py-lineno">1792</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_sent</tt> </tt>
<a name="L1793"></a><tt class="py-lineno">1793</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-955" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-955', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">registration_requires_approval</tt><tt class="py-op">:</tt> </tt>
<a name="L1794"></a><tt class="py-lineno">1794</tt>  <tt class="py-line">                <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">registration_key</tt><tt class="py-op">=</tt><tt class="py-string">'pending'</tt><tt class="py-op">)</tt> </tt>
<a name="L1795"></a><tt class="py-lineno">1795</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_pending</tt> </tt>
<a name="L1796"></a><tt class="py-lineno">1796</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1797"></a><tt class="py-lineno">1797</tt>  <tt class="py-line">                <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">registration_key</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1798"></a><tt class="py-lineno">1798</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_successful</tt> </tt>
<a name="L1799"></a><tt class="py-lineno">1799</tt>  <tt class="py-line">                <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-956" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-956', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1800"></a><tt class="py-lineno">1800</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1801"></a><tt class="py-lineno">1801</tt>  <tt class="py-line">                    <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'username'</tt> </tt>
<a name="L1802"></a><tt class="py-lineno">1802</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1803"></a><tt class="py-lineno">1803</tt>  <tt class="py-line">                    <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">'email'</tt> </tt>
<a name="L1804"></a><tt class="py-lineno">1804</tt>  <tt class="py-line">                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-name">username</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-957" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-957', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-958" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-958', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1805"></a><tt class="py-lineno">1805</tt>  <tt class="py-line">                <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt id="link-959" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-959', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-960" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-960', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1806"></a><tt class="py-lineno">1806</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt id="link-961" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-961', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">=</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">last_visit</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">,</tt> </tt>
<a name="L1807"></a><tt class="py-lineno">1807</tt>  <tt class="py-line">                                       <tt class="py-name">expiration</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-962" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-962', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">expiration</tt><tt class="py-op">,</tt> </tt>
<a name="L1808"></a><tt class="py-lineno">1808</tt>  <tt class="py-line">                                       <tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt id="link-963" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-963', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1809"></a><tt class="py-lineno">1809</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt> </tt>
<a name="L1810"></a><tt class="py-lineno">1810</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">logged_in</tt> </tt>
<a name="L1811"></a><tt class="py-lineno">1811</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-964" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-964', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1812"></a><tt class="py-lineno">1812</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-965" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-965', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-966" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-966', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L1813"></a><tt class="py-lineno">1813</tt>  <tt class="py-line">            <tt id="link-967" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-967', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L1814"></a><tt class="py-lineno">1814</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-968" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-968', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1815"></a><tt class="py-lineno">1815</tt>  <tt class="py-line">                <tt id="link-969" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-969', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-970" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-970', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1816"></a><tt class="py-lineno">1816</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-971" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-971', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L1817"></a><tt class="py-lineno">1817</tt>  <tt class="py-line">                <tt id="link-972" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-972', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-973" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-973', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1818"></a><tt class="py-lineno">1818</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-974" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-974', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-975" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-975', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-976" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-976', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L1819"></a><tt class="py-lineno">1819</tt>  <tt class="py-line">                <tt id="link-977" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-977', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-978" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-978', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-979" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-979', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1820"></a><tt class="py-lineno">1820</tt>  <tt class="py-line">            <tt id="link-980" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-980', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-981" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-981', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1821"></a><tt class="py-lineno">1821</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L1822"></a><tt class="py-lineno">1822</tt>  <tt class="py-line"> </tt>
<a name="Auth.is_logged_in"></a><div id="Auth.is_logged_in-def"><a name="L1823"></a><tt class="py-lineno">1823</tt> <a class="py-toggle" href="#" id="Auth.is_logged_in-toggle" onclick="return toggle('Auth.is_logged_in');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#is_logged_in">is_logged_in</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.is_logged_in-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.is_logged_in-expanded"><a name="L1824"></a><tt class="py-lineno">1824</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1825"></a><tt class="py-lineno">1825</tt>  <tt class="py-line"><tt class="py-docstring">        checks if the user is logged in and returns True/False.</tt> </tt>
<a name="L1826"></a><tt class="py-lineno">1826</tt>  <tt class="py-line"><tt class="py-docstring">        if so user is in auth.user as well as in session.auth.user</tt> </tt>
<a name="L1827"></a><tt class="py-lineno">1827</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1828"></a><tt class="py-lineno">1828</tt>  <tt class="py-line"> </tt>
<a name="L1829"></a><tt class="py-lineno">1829</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1830"></a><tt class="py-lineno">1830</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1831"></a><tt class="py-lineno">1831</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1832"></a><tt class="py-lineno">1832</tt>  <tt class="py-line"> </tt>
<a name="Auth.verify_email"></a><div id="Auth.verify_email-def"><a name="L1833"></a><tt class="py-lineno">1833</tt> <a class="py-toggle" href="#" id="Auth.verify_email-toggle" onclick="return toggle('Auth.verify_email');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#verify_email">verify_email</a><tt class="py-op">(</tt> </tt>
<a name="L1834"></a><tt class="py-lineno">1834</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1835"></a><tt class="py-lineno">1835</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-982" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-982', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1836"></a><tt class="py-lineno">1836</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-983" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-983', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1837"></a><tt class="py-lineno">1837</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-984" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-984', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1838"></a><tt class="py-lineno">1838</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.verify_email-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.verify_email-expanded"><a name="L1839"></a><tt class="py-lineno">1839</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1840"></a><tt class="py-lineno">1840</tt>  <tt class="py-line"><tt class="py-docstring">        action user to verify the registration email, XXXXXXXXXXXXXXXX</tt> </tt>
<a name="L1841"></a><tt class="py-lineno">1841</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1842"></a><tt class="py-lineno">1842</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.verify_email([next=DEFAULT [, onvalidation=DEFAULT</tt> </tt>
<a name="L1843"></a><tt class="py-lineno">1843</tt>  <tt class="py-line"><tt class="py-docstring">            [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L1844"></a><tt class="py-lineno">1844</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1845"></a><tt class="py-lineno">1845</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1846"></a><tt class="py-lineno">1846</tt>  <tt class="py-line"> </tt>
<a name="L1847"></a><tt class="py-lineno">1847</tt>  <tt class="py-line">        <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt id="link-985" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-985', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L1848"></a><tt class="py-lineno">1848</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-986" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-986', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1849"></a><tt class="py-lineno">1849</tt>  <tt class="py-line">        <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt> <tt class="py-op">==</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-987" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-987', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-988" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-988', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1850"></a><tt class="py-lineno">1850</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1851"></a><tt class="py-lineno">1851</tt>  <tt class="py-line">            <tt id="link-989" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-989', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-990" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-990', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt><tt class="py-op">)</tt> </tt>
<a name="L1852"></a><tt class="py-lineno">1852</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-991" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-991', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">registration_requires_approval</tt><tt class="py-op">:</tt> </tt>
<a name="L1853"></a><tt class="py-lineno">1853</tt>  <tt class="py-line">            <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-992" class="py-name"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-992', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-name">registration_key</tt> <tt class="py-op">=</tt> <tt class="py-string">'pending'</tt><tt class="py-op">)</tt> </tt>
<a name="L1854"></a><tt class="py-lineno">1854</tt>  <tt class="py-line">            <tt id="link-993" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-993', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_pending</tt> </tt>
<a name="L1855"></a><tt class="py-lineno">1855</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1856"></a><tt class="py-lineno">1856</tt>  <tt class="py-line">            <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-994" class="py-name"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-994', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-name">registration_key</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1857"></a><tt class="py-lineno">1857</tt>  <tt class="py-line">            <tt id="link-995" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-995', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_verified</tt> </tt>
<a name="L1858"></a><tt class="py-lineno">1858</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-996" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-996', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-997" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-997', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1859"></a><tt class="py-lineno">1859</tt>  <tt class="py-line">            <tt id="link-998" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-998', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_email_log</tt> </tt>
<a name="L1860"></a><tt class="py-lineno">1860</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-999" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-999', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1000" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1000', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1861"></a><tt class="py-lineno">1861</tt>  <tt class="py-line">            <tt id="link-1001" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1001', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1002" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1002', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">verify_email_next</tt> </tt>
<a name="L1862"></a><tt class="py-lineno">1862</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1003" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1003', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1863"></a><tt class="py-lineno">1863</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1004" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1004', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">verify_email_onaccept</tt> </tt>
<a name="L1864"></a><tt class="py-lineno">1864</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1005" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1005', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1865"></a><tt class="py-lineno">1865</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1006" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1006', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1007" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1007', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L1866"></a><tt class="py-lineno">1866</tt>  <tt class="py-line">        <tt id="link-1008" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1008', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L1867"></a><tt class="py-lineno">1867</tt>  <tt class="py-line">        <tt id="link-1009" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1009', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1010" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1010', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1868"></a><tt class="py-lineno">1868</tt>  <tt class="py-line"> </tt>
<a name="Auth.retrieve_username"></a><div id="Auth.retrieve_username-def"><a name="L1869"></a><tt class="py-lineno">1869</tt> <a class="py-toggle" href="#" id="Auth.retrieve_username-toggle" onclick="return toggle('Auth.retrieve_username');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#retrieve_username">retrieve_username</a><tt class="py-op">(</tt> </tt>
<a name="L1870"></a><tt class="py-lineno">1870</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1871"></a><tt class="py-lineno">1871</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1011" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1011', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1872"></a><tt class="py-lineno">1872</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1012" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1012', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1873"></a><tt class="py-lineno">1873</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1013" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1013', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1874"></a><tt class="py-lineno">1874</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1014" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1014', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1875"></a><tt class="py-lineno">1875</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.retrieve_username-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.retrieve_username-expanded"><a name="L1876"></a><tt class="py-lineno">1876</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1877"></a><tt class="py-lineno">1877</tt>  <tt class="py-line"><tt class="py-docstring">        returns a form to retrieve the user username</tt> </tt>
<a name="L1878"></a><tt class="py-lineno">1878</tt>  <tt class="py-line"><tt class="py-docstring">        (only if there is a username field)</tt> </tt>
<a name="L1879"></a><tt class="py-lineno">1879</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1880"></a><tt class="py-lineno">1880</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.retrieve_username([next=DEFAULT</tt> </tt>
<a name="L1881"></a><tt class="py-lineno">1881</tt>  <tt class="py-line"><tt class="py-docstring">            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L1882"></a><tt class="py-lineno">1882</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1883"></a><tt class="py-lineno">1883</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1884"></a><tt class="py-lineno">1884</tt>  <tt class="py-line"> </tt>
<a name="L1885"></a><tt class="py-lineno">1885</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1015" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1015', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1886"></a><tt class="py-lineno">1886</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'username'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L1887"></a><tt class="py-lineno">1887</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1016" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1016', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L1888"></a><tt class="py-lineno">1888</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1017" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1017', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1889"></a><tt class="py-lineno">1889</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-1018" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1018', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L1890"></a><tt class="py-lineno">1890</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1019" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1019', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1891"></a><tt class="py-lineno">1891</tt>  <tt class="py-line">        <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1020" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1020', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_captcha</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L1892"></a><tt class="py-lineno">1892</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1021" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1021', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_captcha</tt><tt class="py-op">!=</tt><tt class="py-name">False</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1022" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1022', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt><tt class="py-op">)</tt> </tt>
<a name="L1893"></a><tt class="py-lineno">1893</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1023" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1023', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">:</tt> </tt>
<a name="L1894"></a><tt class="py-lineno">1894</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">function_disabled</tt> </tt>
<a name="L1895"></a><tt class="py-lineno">1895</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
<a name="L1896"></a><tt class="py-lineno">1896</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1024" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1024', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1025" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1025', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1897"></a><tt class="py-lineno">1897</tt>  <tt class="py-line">            <tt id="link-1026" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1026', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1898"></a><tt class="py-lineno">1898</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1899"></a><tt class="py-lineno">1899</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1027" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1027', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_next</tt> </tt>
<a name="L1900"></a><tt class="py-lineno">1900</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1028" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1028', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1901"></a><tt class="py-lineno">1901</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1029" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1029', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_onvalidation</tt> </tt>
<a name="L1902"></a><tt class="py-lineno">1902</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1030" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1030', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1903"></a><tt class="py-lineno">1903</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1031" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1031', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_onaccept</tt> </tt>
<a name="L1904"></a><tt class="py-lineno">1904</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1032" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1032', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1033" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1033', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1905"></a><tt class="py-lineno">1905</tt>  <tt class="py-line">            <tt id="link-1034" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1034', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_log</tt> </tt>
<a name="L1906"></a><tt class="py-lineno">1906</tt>  <tt class="py-line">        <tt class="py-name">old_requires</tt> <tt class="py-op">=</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1035" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1035', 'requires', 'link-505');">requires</a></tt> </tt>
<a name="L1907"></a><tt class="py-lineno">1907</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1036" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1036', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-1037" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-1037', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L1908"></a><tt class="py-lineno">1908</tt>  <tt class="py-line">            <tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L1909"></a><tt class="py-lineno">1909</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1038" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1038', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1910"></a><tt class="py-lineno">1910</tt>  <tt class="py-line">                       <tt class="py-name">fields</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">'email'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1911"></a><tt class="py-lineno">1911</tt>  <tt class="py-line">                       <tt class="py-name">hidden</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-1039" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1039', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1912"></a><tt class="py-lineno">1912</tt>  <tt class="py-line">                       <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1040" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1040', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L1913"></a><tt class="py-lineno">1913</tt>  <tt class="py-line">                       <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">submit_button</tt><tt class="py-op">,</tt> </tt>
<a name="L1914"></a><tt class="py-lineno">1914</tt>  <tt class="py-line">                       <tt class="py-name">delete_label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L1915"></a><tt class="py-lineno">1915</tt>  <tt class="py-line">                       <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1041" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1041', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L1916"></a><tt class="py-lineno">1916</tt>  <tt class="py-line">                       <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1042" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1042', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L1917"></a><tt class="py-lineno">1917</tt>  <tt class="py-line">                       <tt class="py-op">)</tt> </tt>
<a name="L1918"></a><tt class="py-lineno">1918</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L1919"></a><tt class="py-lineno">1919</tt>  <tt class="py-line">            <tt id="link-1043" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-1043', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1044" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1044', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> <tt class="py-string">'captcha__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L1920"></a><tt class="py-lineno">1920</tt>  <tt class="py-line"> </tt>
<a name="L1921"></a><tt class="py-lineno">1921</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1045" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1045', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L1922"></a><tt class="py-lineno">1922</tt>  <tt class="py-line">                        <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'retrieve_username'</tt><tt class="py-op">,</tt> <tt class="py-name">dbio</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1923"></a><tt class="py-lineno">1923</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1046" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1046', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1924"></a><tt class="py-lineno">1924</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt> <tt class="py-op">==</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1047" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1047', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1048" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-1048', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1925"></a><tt class="py-lineno">1925</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L1926"></a><tt class="py-lineno">1926</tt>  <tt class="py-line">                <tt id="link-1049" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1049', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1927"></a><tt class="py-lineno">1927</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt> </tt>
<a name="L1928"></a><tt class="py-lineno">1928</tt>  <tt class="py-line">                <tt id="link-1050" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1050', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1051" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1051', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1929"></a><tt class="py-lineno">1929</tt>  <tt class="py-line">            <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">username</tt> </tt>
<a name="L1930"></a><tt class="py-lineno">1930</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1052" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1052', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">.</tt><tt id="link-1053" class="py-name"><a title="web2py.gluon.tools.Mail.send" class="py-name" href="#" onclick="return doclink('link-1053', 'send', 'link-950');">send</a></tt><tt class="py-op">(</tt><tt id="link-1054" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-1054', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L1931"></a><tt class="py-lineno">1931</tt>  <tt class="py-line">                    <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_username_subject</tt><tt class="py-op">,</tt> </tt>
<a name="L1932"></a><tt class="py-lineno">1932</tt>  <tt class="py-line">                    <tt id="link-1055" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1055', 'message', 'link-69');">message</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-1056" class="py-name"><a title="web2py.gluon.tools.Auth.retrieve_username" class="py-name" href="#" onclick="return doclink('link-1056', 'retrieve_username', 'link-396');">retrieve_username</a></tt> </tt>
<a name="L1933"></a><tt class="py-lineno">1933</tt>  <tt class="py-line">                     <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">username</tt><tt class="py-op">=</tt><tt class="py-name">username</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1934"></a><tt class="py-lineno">1934</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_sent</tt> </tt>
<a name="L1935"></a><tt class="py-lineno">1935</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1057" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1057', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1936"></a><tt class="py-lineno">1936</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1058" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1058', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1059" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1059', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L1937"></a><tt class="py-lineno">1937</tt>  <tt class="py-line">            <tt id="link-1060" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1060', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L1938"></a><tt class="py-lineno">1938</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1061" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1061', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1939"></a><tt class="py-lineno">1939</tt>  <tt class="py-line">                <tt id="link-1062" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1062', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1063" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1063', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1940"></a><tt class="py-lineno">1940</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-1064" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1064', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L1941"></a><tt class="py-lineno">1941</tt>  <tt class="py-line">                <tt id="link-1065" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1065', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1066" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1066', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1942"></a><tt class="py-lineno">1942</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-1067" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1067', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-1068" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1068', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-1069" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1069', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L1943"></a><tt class="py-lineno">1943</tt>  <tt class="py-line">                <tt id="link-1070" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1070', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1071" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1071', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-1072" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1072', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1944"></a><tt class="py-lineno">1944</tt>  <tt class="py-line">            <tt id="link-1073" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1073', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1074" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1074', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1945"></a><tt class="py-lineno">1945</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1075" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1075', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">old_requires</tt> </tt>
<a name="L1946"></a><tt class="py-lineno">1946</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L1947"></a><tt class="py-lineno">1947</tt>  <tt class="py-line"> </tt>
<a name="Auth.random_password"></a><div id="Auth.random_password-def"><a name="L1948"></a><tt class="py-lineno">1948</tt> <a class="py-toggle" href="#" id="Auth.random_password-toggle" onclick="return toggle('Auth.random_password');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#random_password">random_password</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.random_password-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.random_password-expanded"><a name="L1949"></a><tt class="py-lineno">1949</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">string</tt> </tt>
<a name="L1950"></a><tt class="py-lineno">1950</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">random</tt> </tt>
<a name="L1951"></a><tt class="py-lineno">1951</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1952"></a><tt class="py-lineno">1952</tt>  <tt class="py-line">        <tt class="py-name">specials</tt><tt class="py-op">=</tt><tt class="py-string">r'!#$*'</tt> </tt>
<a name="L1953"></a><tt class="py-lineno">1953</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1954"></a><tt class="py-lineno">1954</tt>  <tt class="py-line">            <tt class="py-name">password</tt> <tt class="py-op">+=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">lowercase</tt><tt class="py-op">)</tt> </tt>
<a name="L1955"></a><tt class="py-lineno">1955</tt>  <tt class="py-line">            <tt class="py-name">password</tt> <tt class="py-op">+=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">uppercase</tt><tt class="py-op">)</tt> </tt>
<a name="L1956"></a><tt class="py-lineno">1956</tt>  <tt class="py-line">            <tt class="py-name">password</tt> <tt class="py-op">+=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">digits</tt><tt class="py-op">)</tt> </tt>
<a name="L1957"></a><tt class="py-lineno">1957</tt>  <tt class="py-line">            <tt class="py-name">password</tt> <tt class="py-op">+=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">specials</tt><tt class="py-op">)</tt> </tt>
<a name="L1958"></a><tt class="py-lineno">1958</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-1076" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-1076', 'join', 'link-160');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">sample</tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">,</tt><tt id="link-1077" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-1077', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1959"></a><tt class="py-lineno">1959</tt>  <tt class="py-line"> </tt>
<a name="Auth.reset_password_deprecated"></a><div id="Auth.reset_password_deprecated-def"><a name="L1960"></a><tt class="py-lineno">1960</tt> <a class="py-toggle" href="#" id="Auth.reset_password_deprecated-toggle" onclick="return toggle('Auth.reset_password_deprecated');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#reset_password_deprecated">reset_password_deprecated</a><tt class="py-op">(</tt> </tt>
<a name="L1961"></a><tt class="py-lineno">1961</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1962"></a><tt class="py-lineno">1962</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1078" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1078', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1963"></a><tt class="py-lineno">1963</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1079" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1079', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1964"></a><tt class="py-lineno">1964</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1080" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1080', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1965"></a><tt class="py-lineno">1965</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1081" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1081', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L1966"></a><tt class="py-lineno">1966</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.reset_password_deprecated-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.reset_password_deprecated-expanded"><a name="L1967"></a><tt class="py-lineno">1967</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1968"></a><tt class="py-lineno">1968</tt>  <tt class="py-line"><tt class="py-docstring">        returns a form to reset the user password (deprecated)</tt> </tt>
<a name="L1969"></a><tt class="py-lineno">1969</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1970"></a><tt class="py-lineno">1970</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.reset_password_deprecated([next=DEFAULT</tt> </tt>
<a name="L1971"></a><tt class="py-lineno">1971</tt>  <tt class="py-line"><tt class="py-docstring">            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L1972"></a><tt class="py-lineno">1972</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1973"></a><tt class="py-lineno">1973</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1974"></a><tt class="py-lineno">1974</tt>  <tt class="py-line"> </tt>
<a name="L1975"></a><tt class="py-lineno">1975</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1082" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1082', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L1976"></a><tt class="py-lineno">1976</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1083" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1083', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L1977"></a><tt class="py-lineno">1977</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-1084" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1084', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L1978"></a><tt class="py-lineno">1978</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1085" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1085', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L1979"></a><tt class="py-lineno">1979</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1086" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1086', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">:</tt> </tt>
<a name="L1980"></a><tt class="py-lineno">1980</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">function_disabled</tt> </tt>
<a name="L1981"></a><tt class="py-lineno">1981</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
<a name="L1982"></a><tt class="py-lineno">1982</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1087" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1087', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1088" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1088', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1983"></a><tt class="py-lineno">1983</tt>  <tt class="py-line">            <tt id="link-1089" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1089', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1984"></a><tt class="py-lineno">1984</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L1985"></a><tt class="py-lineno">1985</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1090" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1090', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_next</tt> </tt>
<a name="L1986"></a><tt class="py-lineno">1986</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1091" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1091', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1987"></a><tt class="py-lineno">1987</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1092" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1092', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_onvalidation</tt> </tt>
<a name="L1988"></a><tt class="py-lineno">1988</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1093" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1093', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1989"></a><tt class="py-lineno">1989</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1094" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1094', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_onaccept</tt> </tt>
<a name="L1990"></a><tt class="py-lineno">1990</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1095" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1095', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1096" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1096', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1991"></a><tt class="py-lineno">1991</tt>  <tt class="py-line">            <tt id="link-1097" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1097', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_log</tt> </tt>
<a name="L1992"></a><tt class="py-lineno">1992</tt>  <tt class="py-line">        <tt class="py-name">old_requires</tt> <tt class="py-op">=</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1098" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1098', 'requires', 'link-505');">requires</a></tt> </tt>
<a name="L1993"></a><tt class="py-lineno">1993</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1099" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1099', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-1100" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-1100', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L1994"></a><tt class="py-lineno">1994</tt>  <tt class="py-line">            <tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L1995"></a><tt class="py-lineno">1995</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1101" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1101', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L1996"></a><tt class="py-lineno">1996</tt>  <tt class="py-line">                       <tt class="py-name">fields</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">'email'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L1997"></a><tt class="py-lineno">1997</tt>  <tt class="py-line">                       <tt class="py-name">hidden</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-1102" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1102', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1998"></a><tt class="py-lineno">1998</tt>  <tt class="py-line">                       <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1103" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1103', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L1999"></a><tt class="py-lineno">1999</tt>  <tt class="py-line">                       <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">submit_button</tt><tt class="py-op">,</tt> </tt>
<a name="L2000"></a><tt class="py-lineno">2000</tt>  <tt class="py-line">                       <tt class="py-name">delete_label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L2001"></a><tt class="py-lineno">2001</tt>  <tt class="py-line">                       <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1104" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1104', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L2002"></a><tt class="py-lineno">2002</tt>  <tt class="py-line">                       <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1105" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1105', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L2003"></a><tt class="py-lineno">2003</tt>  <tt class="py-line">                       <tt class="py-op">)</tt> </tt>
<a name="L2004"></a><tt class="py-lineno">2004</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1106" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1106', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L2005"></a><tt class="py-lineno">2005</tt>  <tt class="py-line">                        <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'retrieve_password'</tt><tt class="py-op">,</tt> <tt class="py-name">dbio</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L2006"></a><tt class="py-lineno">2006</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1107" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1107', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2007"></a><tt class="py-lineno">2007</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt> <tt class="py-op">==</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1108" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1108', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1109" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-1109', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2008"></a><tt class="py-lineno">2008</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2009"></a><tt class="py-lineno">2009</tt>  <tt class="py-line">                <tt id="link-1110" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1110', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L2010"></a><tt class="py-lineno">2010</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt> </tt>
<a name="L2011"></a><tt class="py-lineno">2011</tt>  <tt class="py-line">                <tt id="link-1111" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1111', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1112" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1112', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2012"></a><tt class="py-lineno">2012</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'pending'</tt><tt class="py-op">,</tt><tt class="py-string">'disabled'</tt><tt class="py-op">,</tt><tt class="py-string">'blocked'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2013"></a><tt class="py-lineno">2013</tt>  <tt class="py-line">                <tt id="link-1113" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1113', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L2014"></a><tt class="py-lineno">2014</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_pending</tt> </tt>
<a name="L2015"></a><tt class="py-lineno">2015</tt>  <tt class="py-line">                <tt id="link-1114" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1114', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1115" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1115', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2016"></a><tt class="py-lineno">2016</tt>  <tt class="py-line">            <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1116" class="py-name" targets="Method web2py.gluon.tools.Auth.random_password()=web2py.gluon.tools.Auth-class.html#random_password"><a title="web2py.gluon.tools.Auth.random_password" class="py-name" href="#" onclick="return doclink('link-1116', 'random_password', 'link-1116');">random_password</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2017"></a><tt class="py-lineno">2017</tt>  <tt class="py-line">            <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1117" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1117', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L2018"></a><tt class="py-lineno">2018</tt>  <tt class="py-line">            <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">passfield</tt><tt class="py-op">:</tt> <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1118" class="py-name"><a title="web2py.gluon.dal.Field.validate
web2py.gluon.dal.GAEDecimalProperty.validate
web2py.gluon.html.FORM.validate" class="py-name" href="#" onclick="return doclink('link-1118', 'validate', 'link-716');">validate</a></tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L2019"></a><tt class="py-lineno">2019</tt>  <tt class="py-line">                 <tt class="py-string">'registration_key'</tt><tt class="py-op">:</tt> <tt class="py-string">''</tt><tt class="py-op">}</tt> </tt>
<a name="L2020"></a><tt class="py-lineno">2020</tt>  <tt class="py-line">            <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-1119" class="py-name"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-1119', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L2021"></a><tt class="py-lineno">2021</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1120" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1120', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L2022"></a><tt class="py-lineno">2022</tt>  <tt class="py-line">               <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1121" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1121', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">.</tt><tt id="link-1122" class="py-name"><a title="web2py.gluon.tools.Mail.send" class="py-name" href="#" onclick="return doclink('link-1122', 'send', 'link-950');">send</a></tt><tt class="py-op">(</tt><tt id="link-1123" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-1123', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L2023"></a><tt class="py-lineno">2023</tt>  <tt class="py-line">                        <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_subject</tt><tt class="py-op">,</tt> </tt>
<a name="L2024"></a><tt class="py-lineno">2024</tt>  <tt class="py-line">                        <tt id="link-1124" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1124', 'message', 'link-69');">message</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-1125" class="py-name"><a title="web2py.gluon.tools.Auth.retrieve_password" class="py-name" href="#" onclick="return doclink('link-1125', 'retrieve_password', 'link-397');">retrieve_password</a></tt> \ </tt>
<a name="L2025"></a><tt class="py-lineno">2025</tt>  <tt class="py-line">                        <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">password</tt><tt class="py-op">=</tt><tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2026"></a><tt class="py-lineno">2026</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_sent</tt> </tt>
<a name="L2027"></a><tt class="py-lineno">2027</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2028"></a><tt class="py-lineno">2028</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">unable_to_send_email</tt> </tt>
<a name="L2029"></a><tt class="py-lineno">2029</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1126" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1126', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2030"></a><tt class="py-lineno">2030</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1127" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1127', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1128" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1128', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L2031"></a><tt class="py-lineno">2031</tt>  <tt class="py-line">            <tt id="link-1129" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1129', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L2032"></a><tt class="py-lineno">2032</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1130" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1130', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2033"></a><tt class="py-lineno">2033</tt>  <tt class="py-line">                <tt id="link-1131" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1131', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1132" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1132', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L2034"></a><tt class="py-lineno">2034</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-1133" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1133', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L2035"></a><tt class="py-lineno">2035</tt>  <tt class="py-line">                <tt id="link-1134" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1134', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1135" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1135', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L2036"></a><tt class="py-lineno">2036</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-1136" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1136', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-1137" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1137', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-1138" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1138', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L2037"></a><tt class="py-lineno">2037</tt>  <tt class="py-line">                <tt id="link-1139" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1139', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1140" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1140', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-1141" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1141', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2038"></a><tt class="py-lineno">2038</tt>  <tt class="py-line">            <tt id="link-1142" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1142', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1143" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1143', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2039"></a><tt class="py-lineno">2039</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1144" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1144', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-name">old_requires</tt> </tt>
<a name="L2040"></a><tt class="py-lineno">2040</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L2041"></a><tt class="py-lineno">2041</tt>  <tt class="py-line"> </tt>
<a name="Auth.reset_password"></a><div id="Auth.reset_password-def"><a name="L2042"></a><tt class="py-lineno">2042</tt> <a class="py-toggle" href="#" id="Auth.reset_password-toggle" onclick="return toggle('Auth.reset_password');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#reset_password">reset_password</a><tt class="py-op">(</tt> </tt>
<a name="L2043"></a><tt class="py-lineno">2043</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2044"></a><tt class="py-lineno">2044</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1145" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1145', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2045"></a><tt class="py-lineno">2045</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1146" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1146', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2046"></a><tt class="py-lineno">2046</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1147" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1147', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2047"></a><tt class="py-lineno">2047</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1148" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1148', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2048"></a><tt class="py-lineno">2048</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.reset_password-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.reset_password-expanded"><a name="L2049"></a><tt class="py-lineno">2049</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2050"></a><tt class="py-lineno">2050</tt>  <tt class="py-line"><tt class="py-docstring">        returns a form to reset the user password</tt> </tt>
<a name="L2051"></a><tt class="py-lineno">2051</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2052"></a><tt class="py-lineno">2052</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.reset_password([next=DEFAULT</tt> </tt>
<a name="L2053"></a><tt class="py-lineno">2053</tt>  <tt class="py-line"><tt class="py-docstring">            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L2054"></a><tt class="py-lineno">2054</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2055"></a><tt class="py-lineno">2055</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2056"></a><tt class="py-lineno">2056</tt>  <tt class="py-line"> </tt>
<a name="L2057"></a><tt class="py-lineno">2057</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1149" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1149', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L2058"></a><tt class="py-lineno">2058</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1150" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1150', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2059"></a><tt class="py-lineno">2059</tt>  <tt class="py-line">        <tt class="py-comment"># response = current.response</tt> </tt>
<a name="L2060"></a><tt class="py-lineno">2060</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1151" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1151', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L2061"></a><tt class="py-lineno">2061</tt>  <tt class="py-line"> </tt>
<a name="L2062"></a><tt class="py-lineno">2062</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1152" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1152', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1153" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1153', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2063"></a><tt class="py-lineno">2063</tt>  <tt class="py-line">            <tt id="link-1154" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1154', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2064"></a><tt class="py-lineno">2064</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2065"></a><tt class="py-lineno">2065</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1155" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1155', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_next</tt> </tt>
<a name="L2066"></a><tt class="py-lineno">2066</tt>  <tt class="py-line"> </tt>
<a name="L2067"></a><tt class="py-lineno">2067</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2068"></a><tt class="py-lineno">2068</tt>  <tt class="py-line">            <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">key</tt> <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L2069"></a><tt class="py-lineno">2069</tt>  <tt class="py-line">            <tt class="py-name">t0</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2070"></a><tt class="py-lineno">2070</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1156" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1156', 'time', 'link-2');">time</a></tt><tt class="py-op">.</tt><tt id="link-1157" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1157', 'time', 'link-2');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">t0</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">60</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">*</tt><tt class="py-number">24</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-1158" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-1158', 'Exception', 'link-28');">Exception</a></tt> </tt>
<a name="L2071"></a><tt class="py-lineno">2071</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">reset_password_key</tt> <tt class="py-op">==</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1159" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1159', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1160" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-1160', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2072"></a><tt class="py-lineno">2072</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-1161" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-1161', 'Exception', 'link-28');">Exception</a></tt> </tt>
<a name="L2073"></a><tt class="py-lineno">2073</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-1162" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-1162', 'Exception', 'link-28');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2074"></a><tt class="py-lineno">2074</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_reset_password</tt> </tt>
<a name="L2075"></a><tt class="py-lineno">2075</tt>  <tt class="py-line">            <tt id="link-1163" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1163', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1164" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1164', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2076"></a><tt class="py-lineno">2076</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1165" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1165', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L2077"></a><tt class="py-lineno">2077</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1166" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1166', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-1167" class="py-name" targets="Static Method web2py.gluon.sqlhtml.SQLFORM.factory()=web2py.gluon.sqlhtml.SQLFORM-class.html#factory,Static Method web2py.gluon.sqlhtml.SQLFORM.factory()=web2py.gluon.sqlhtml.SQLFORM-class.html#factory"><a title="web2py.gluon.sqlhtml.SQLFORM.factory
web2py.gluon.sqlhtml.SQLFORM.factory" class="py-name" href="#" onclick="return doclink('link-1167', 'factory', 'link-1167');">factory</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2078"></a><tt class="py-lineno">2078</tt>  <tt class="py-line">            <tt id="link-1168" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1168', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'new_password'</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L2079"></a><tt class="py-lineno">2079</tt>  <tt class="py-line">                  <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt><tt class="py-op">,</tt> </tt>
<a name="L2080"></a><tt class="py-lineno">2080</tt>  <tt class="py-line">                  <tt id="link-1169" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1169', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1170" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1170', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1171" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1171', 'requires', 'link-505');">requires</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2081"></a><tt class="py-lineno">2081</tt>  <tt class="py-line">            <tt id="link-1172" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1172', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'new_password2'</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L2082"></a><tt class="py-lineno">2082</tt>  <tt class="py-line">                  <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_password</tt><tt class="py-op">,</tt> </tt>
<a name="L2083"></a><tt class="py-lineno">2083</tt>  <tt class="py-line">                  <tt id="link-1173" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1173', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt id="link-1174" class="py-name"><a title="web2py.gluon.validators.IS_EXPR" class="py-name" href="#" onclick="return doclink('link-1174', 'IS_EXPR', 'link-933');">IS_EXPR</a></tt><tt class="py-op">(</tt><tt class="py-string">'value==%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2084"></a><tt class="py-lineno">2084</tt>  <tt class="py-line">                                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">mismatched_password</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2085"></a><tt class="py-lineno">2085</tt>  <tt class="py-line">            <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_reset_button</tt><tt class="py-op">,</tt> </tt>
<a name="L2086"></a><tt class="py-lineno">2086</tt>  <tt class="py-line">            <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1175" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1175', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L2087"></a><tt class="py-lineno">2087</tt>  <tt class="py-line">            <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1176" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1176', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L2088"></a><tt class="py-lineno">2088</tt>  <tt class="py-line">        <tt class="py-op">)</tt> </tt>
<a name="L2089"></a><tt class="py-lineno">2089</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1177" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1177', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">session</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1178" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1178', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2090"></a><tt class="py-lineno">2090</tt>  <tt class="py-line">            <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-1179" class="py-name"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-1179', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-op">{</tt><tt class="py-name">passfield</tt><tt class="py-op">:</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt><tt class="py-op">,</tt> </tt>
<a name="L2091"></a><tt class="py-lineno">2091</tt>  <tt class="py-line">                                  <tt class="py-string">'registration_key'</tt><tt class="py-op">:</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L2092"></a><tt class="py-lineno">2092</tt>  <tt class="py-line">                                  <tt class="py-string">'reset_password_key'</tt><tt class="py-op">:</tt><tt class="py-string">''</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L2093"></a><tt class="py-lineno">2093</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_changed</tt> </tt>
<a name="L2094"></a><tt class="py-lineno">2094</tt>  <tt class="py-line">            <tt id="link-1180" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1180', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1181" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1181', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2095"></a><tt class="py-lineno">2095</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L2096"></a><tt class="py-lineno">2096</tt>  <tt class="py-line"> </tt>
<a name="Auth.request_reset_password"></a><div id="Auth.request_reset_password-def"><a name="L2097"></a><tt class="py-lineno">2097</tt> <a class="py-toggle" href="#" id="Auth.request_reset_password-toggle" onclick="return toggle('Auth.request_reset_password');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#request_reset_password">request_reset_password</a><tt class="py-op">(</tt> </tt>
<a name="L2098"></a><tt class="py-lineno">2098</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2099"></a><tt class="py-lineno">2099</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1182" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1182', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2100"></a><tt class="py-lineno">2100</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1183" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1183', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2101"></a><tt class="py-lineno">2101</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1184" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1184', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2102"></a><tt class="py-lineno">2102</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1185" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1185', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2103"></a><tt class="py-lineno">2103</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.request_reset_password-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.request_reset_password-expanded"><a name="L2104"></a><tt class="py-lineno">2104</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2105"></a><tt class="py-lineno">2105</tt>  <tt class="py-line"><tt class="py-docstring">        returns a form to reset the user password</tt> </tt>
<a name="L2106"></a><tt class="py-lineno">2106</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2107"></a><tt class="py-lineno">2107</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.reset_password([next=DEFAULT</tt> </tt>
<a name="L2108"></a><tt class="py-lineno">2108</tt>  <tt class="py-line"><tt class="py-docstring">            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L2109"></a><tt class="py-lineno">2109</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2110"></a><tt class="py-lineno">2110</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2111"></a><tt class="py-lineno">2111</tt>  <tt class="py-line"> </tt>
<a name="L2112"></a><tt class="py-lineno">2112</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1186" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1186', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L2113"></a><tt class="py-lineno">2113</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1187" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1187', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2114"></a><tt class="py-lineno">2114</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-1188" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1188', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L2115"></a><tt class="py-lineno">2115</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1189" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1189', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L2116"></a><tt class="py-lineno">2116</tt>  <tt class="py-line">        <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1190" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1190', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_captcha</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L2117"></a><tt class="py-lineno">2117</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1191" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1191', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">retrieve_password_captcha</tt><tt class="py-op">!=</tt><tt class="py-name">False</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1192" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1192', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt><tt class="py-op">)</tt> </tt>
<a name="L2118"></a><tt class="py-lineno">2118</tt>  <tt class="py-line"> </tt>
<a name="L2119"></a><tt class="py-lineno">2119</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1193" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1193', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1194" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1194', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2120"></a><tt class="py-lineno">2120</tt>  <tt class="py-line">            <tt id="link-1195" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1195', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2121"></a><tt class="py-lineno">2121</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2122"></a><tt class="py-lineno">2122</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1196" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1196', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">request_reset_password_next</tt> </tt>
<a name="L2123"></a><tt class="py-lineno">2123</tt>  <tt class="py-line"> </tt>
<a name="L2124"></a><tt class="py-lineno">2124</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1197" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1197', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">:</tt> </tt>
<a name="L2125"></a><tt class="py-lineno">2125</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">function_disabled</tt> </tt>
<a name="L2126"></a><tt class="py-lineno">2126</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
<a name="L2127"></a><tt class="py-lineno">2127</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1198" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1198', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2128"></a><tt class="py-lineno">2128</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1199" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1199', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_onvalidation</tt> </tt>
<a name="L2129"></a><tt class="py-lineno">2129</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1200" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1200', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2130"></a><tt class="py-lineno">2130</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1201" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1201', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_onaccept</tt> </tt>
<a name="L2131"></a><tt class="py-lineno">2131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1202" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1202', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1203" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1203', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2132"></a><tt class="py-lineno">2132</tt>  <tt class="py-line">            <tt id="link-1204" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1204', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">reset_password_log</tt> </tt>
<a name="L2133"></a><tt class="py-lineno">2133</tt>  <tt class="py-line">        <tt class="py-comment"># old_requires = table_user.email.requires &lt;&lt;&lt; perhaps should be restored</tt> </tt>
<a name="L2134"></a><tt class="py-lineno">2134</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">.</tt><tt id="link-1205" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1205', 'requires', 'link-505');">requires</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L2135"></a><tt class="py-lineno">2135</tt>  <tt class="py-line">            <tt id="link-1206" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL" class="py-name" href="#" onclick="return doclink('link-1206', 'IS_EMAIL', 'link-531');">IS_EMAIL</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2136"></a><tt class="py-lineno">2136</tt>  <tt class="py-line">            <tt id="link-1207" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-1207', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">,</tt> <tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L2137"></a><tt class="py-lineno">2137</tt>  <tt class="py-line">                     <tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L2138"></a><tt class="py-lineno">2138</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1208" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1208', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L2139"></a><tt class="py-lineno">2139</tt>  <tt class="py-line">                       <tt class="py-name">fields</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">'email'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L2140"></a><tt class="py-lineno">2140</tt>  <tt class="py-line">                       <tt class="py-name">hidden</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-1209" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1209', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2141"></a><tt class="py-lineno">2141</tt>  <tt class="py-line">                       <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1210" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1210', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L2142"></a><tt class="py-lineno">2142</tt>  <tt class="py-line">                       <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_reset_button</tt><tt class="py-op">,</tt> </tt>
<a name="L2143"></a><tt class="py-lineno">2143</tt>  <tt class="py-line">                       <tt class="py-name">delete_label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L2144"></a><tt class="py-lineno">2144</tt>  <tt class="py-line">                       <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1211" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1211', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L2145"></a><tt class="py-lineno">2145</tt>  <tt class="py-line">                       <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1212" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1212', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L2146"></a><tt class="py-lineno">2146</tt>  <tt class="py-line">                       <tt class="py-op">)</tt> </tt>
<a name="L2147"></a><tt class="py-lineno">2147</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L2148"></a><tt class="py-lineno">2148</tt>  <tt class="py-line">            <tt id="link-1213" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-1213', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1214" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1214', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt><tt class="py-string">'captcha__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L2149"></a><tt class="py-lineno">2149</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1215" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1215', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L2150"></a><tt class="py-lineno">2150</tt>  <tt class="py-line">                        <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'reset_password'</tt><tt class="py-op">,</tt> <tt class="py-name">dbio</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L2151"></a><tt class="py-lineno">2151</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> </tt>
<a name="L2152"></a><tt class="py-lineno">2152</tt>  <tt class="py-line">                        <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1216" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1216', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2153"></a><tt class="py-lineno">2153</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">email</tt> <tt class="py-op">==</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1217" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1217', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1218" class="py-name"><a title="web2py.gluon.dal.Rows.first" class="py-name" href="#" onclick="return doclink('link-1218', 'first', 'link-681');">first</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2154"></a><tt class="py-lineno">2154</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2155"></a><tt class="py-lineno">2155</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_email</tt> </tt>
<a name="L2156"></a><tt class="py-lineno">2156</tt>  <tt class="py-line">                <tt id="link-1219" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1219', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1220" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1220', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2157"></a><tt class="py-lineno">2157</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">registration_key</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'pending'</tt><tt class="py-op">,</tt><tt class="py-string">'disabled'</tt><tt class="py-op">,</tt><tt class="py-string">'blocked'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2158"></a><tt class="py-lineno">2158</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">registration_pending</tt> </tt>
<a name="L2159"></a><tt class="py-lineno">2159</tt>  <tt class="py-line">                <tt id="link-1221" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1221', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1222" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1222', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2160"></a><tt class="py-lineno">2160</tt>  <tt class="py-line">            <tt class="py-name">reset_password_key</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-1223" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1223', 'time', 'link-2');">time</a></tt><tt class="py-op">.</tt><tt id="link-1224" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1224', 'time', 'link-2');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">'-'</tt> <tt class="py-op">+</tt> <tt id="link-1225" class="py-name"><a title="web2py.gluon.utils.web2py_uuid" class="py-name" href="#" onclick="return doclink('link-1225', 'web2py_uuid', 'link-11');">web2py_uuid</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2161"></a><tt class="py-lineno">2161</tt>  <tt class="py-line"> </tt>
<a name="L2162"></a><tt class="py-lineno">2162</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1226" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1226', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">mailer</tt><tt class="py-op">.</tt><tt id="link-1227" class="py-name"><a title="web2py.gluon.tools.Mail.send" class="py-name" href="#" onclick="return doclink('link-1227', 'send', 'link-950');">send</a></tt><tt class="py-op">(</tt><tt id="link-1228" class="py-name"><a title="web2py.gluon.http.HTTP.to" class="py-name" href="#" onclick="return doclink('link-1228', 'to', 'link-64');">to</a></tt><tt class="py-op">=</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">email</tt><tt class="py-op">,</tt> </tt>
<a name="L2163"></a><tt class="py-lineno">2163</tt>  <tt class="py-line">                                         <tt class="py-name">subject</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">reset_password_subject</tt><tt class="py-op">,</tt> </tt>
<a name="L2164"></a><tt class="py-lineno">2164</tt>  <tt class="py-line">                                         <tt id="link-1229" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1229', 'message', 'link-69');">message</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-1230" class="py-name"><a title="web2py.gluon.tools.Auth.reset_password" class="py-name" href="#" onclick="return doclink('link-1230', 'reset_password', 'link-398');">reset_password</a></tt> <tt class="py-op">%</tt> \ </tt>
<a name="L2165"></a><tt class="py-lineno">2165</tt>  <tt class="py-line">                                             <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-name">reset_password_key</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2166"></a><tt class="py-lineno">2166</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">email_sent</tt> </tt>
<a name="L2167"></a><tt class="py-lineno">2167</tt>  <tt class="py-line">                <tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-1231" class="py-name"><a title="web2py.gluon.dal.update_record" class="py-name" href="#" onclick="return doclink('link-1231', 'update_record', 'link-683');">update_record</a></tt><tt class="py-op">(</tt><tt class="py-name">reset_password_key</tt><tt class="py-op">=</tt><tt class="py-name">reset_password_key</tt><tt class="py-op">)</tt> </tt>
<a name="L2168"></a><tt class="py-lineno">2168</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2169"></a><tt class="py-lineno">2169</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">unable_to_send_email</tt> </tt>
<a name="L2170"></a><tt class="py-lineno">2170</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1232" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1232', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2171"></a><tt class="py-lineno">2171</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1233" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1233', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1234" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1234', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L2172"></a><tt class="py-lineno">2172</tt>  <tt class="py-line">            <tt id="link-1235" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1235', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L2173"></a><tt class="py-lineno">2173</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1236" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1236', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2174"></a><tt class="py-lineno">2174</tt>  <tt class="py-line">                <tt id="link-1237" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1237', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1238" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1238', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L2175"></a><tt class="py-lineno">2175</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-1239" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1239', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L2176"></a><tt class="py-lineno">2176</tt>  <tt class="py-line">                <tt id="link-1240" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1240', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1241" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1241', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L2177"></a><tt class="py-lineno">2177</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-1242" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1242', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-1243" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1243', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-1244" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1244', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L2178"></a><tt class="py-lineno">2178</tt>  <tt class="py-line">                <tt id="link-1245" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1245', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1246" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1246', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-1247" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1247', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2179"></a><tt class="py-lineno">2179</tt>  <tt class="py-line">            <tt id="link-1248" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1248', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1249" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1249', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2180"></a><tt class="py-lineno">2180</tt>  <tt class="py-line">        <tt class="py-comment"># old_requires = table_user.email.requires</tt> </tt>
<a name="L2181"></a><tt class="py-lineno">2181</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L2182"></a><tt class="py-lineno">2182</tt>  <tt class="py-line"> </tt>
<a name="Auth.retrieve_password"></a><div id="Auth.retrieve_password-def"><a name="L2183"></a><tt class="py-lineno">2183</tt> <a class="py-toggle" href="#" id="Auth.retrieve_password-toggle" onclick="return toggle('Auth.retrieve_password');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#retrieve_password">retrieve_password</a><tt class="py-op">(</tt> </tt>
<a name="L2184"></a><tt class="py-lineno">2184</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2185"></a><tt class="py-lineno">2185</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1250" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1250', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2186"></a><tt class="py-lineno">2186</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1251" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1251', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2187"></a><tt class="py-lineno">2187</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1252" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1252', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2188"></a><tt class="py-lineno">2188</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1253" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1253', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2189"></a><tt class="py-lineno">2189</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.retrieve_password-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.retrieve_password-expanded"><a name="L2190"></a><tt class="py-lineno">2190</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1254" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1254', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">reset_password_requires_verification</tt><tt class="py-op">:</tt> </tt>
<a name="L2191"></a><tt class="py-lineno">2191</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1255" class="py-name" targets="Method web2py.gluon.tools.Auth.request_reset_password()=web2py.gluon.tools.Auth-class.html#request_reset_password"><a title="web2py.gluon.tools.Auth.request_reset_password" class="py-name" href="#" onclick="return doclink('link-1255', 'request_reset_password', 'link-1255');">request_reset_password</a></tt><tt class="py-op">(</tt><tt id="link-1256" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1256', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt id="link-1257" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1257', 'log', 'link-746');">log</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2192"></a><tt class="py-lineno">2192</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2193"></a><tt class="py-lineno">2193</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1258" class="py-name" targets="Method web2py.gluon.tools.Auth.reset_password_deprecated()=web2py.gluon.tools.Auth-class.html#reset_password_deprecated"><a title="web2py.gluon.tools.Auth.reset_password_deprecated" class="py-name" href="#" onclick="return doclink('link-1258', 'reset_password_deprecated', 'link-1258');">reset_password_deprecated</a></tt><tt class="py-op">(</tt><tt id="link-1259" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1259', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt id="link-1260" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1260', 'log', 'link-746');">log</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2194"></a><tt class="py-lineno">2194</tt>  <tt class="py-line"> </tt>
<a name="Auth.change_password"></a><div id="Auth.change_password-def"><a name="L2195"></a><tt class="py-lineno">2195</tt> <a class="py-toggle" href="#" id="Auth.change_password-toggle" onclick="return toggle('Auth.change_password');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#change_password">change_password</a><tt class="py-op">(</tt> </tt>
<a name="L2196"></a><tt class="py-lineno">2196</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2197"></a><tt class="py-lineno">2197</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1261" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1261', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2198"></a><tt class="py-lineno">2198</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1262" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1262', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2199"></a><tt class="py-lineno">2199</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1263" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1263', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2200"></a><tt class="py-lineno">2200</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1264" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1264', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2201"></a><tt class="py-lineno">2201</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.change_password-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.change_password-expanded"><a name="L2202"></a><tt class="py-lineno">2202</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2203"></a><tt class="py-lineno">2203</tt>  <tt class="py-line"><tt class="py-docstring">        returns a form that lets the user change password</tt> </tt>
<a name="L2204"></a><tt class="py-lineno">2204</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2205"></a><tt class="py-lineno">2205</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.change_password([next=DEFAULT[, onvalidation=DEFAULT[,</tt> </tt>
<a name="L2206"></a><tt class="py-lineno">2206</tt>  <tt class="py-line"><tt class="py-docstring">            onaccept=DEFAULT[, log=DEFAULT]]]])</tt> </tt>
<a name="L2207"></a><tt class="py-lineno">2207</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2208"></a><tt class="py-lineno">2208</tt>  <tt class="py-line"> </tt>
<a name="L2209"></a><tt class="py-lineno">2209</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1265" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1265', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2210"></a><tt class="py-lineno">2210</tt>  <tt class="py-line">            <tt id="link-1266" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1266', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1267" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1267', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt><tt class="py-op">)</tt> </tt>
<a name="L2211"></a><tt class="py-lineno">2211</tt>  <tt class="py-line">        <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> </tt>
<a name="L2212"></a><tt class="py-lineno">2212</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1268" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1268', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L2213"></a><tt class="py-lineno">2213</tt>  <tt class="py-line">        <tt class="py-name">usern</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1269" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1269', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt> </tt>
<a name="L2214"></a><tt class="py-lineno">2214</tt>  <tt class="py-line">        <tt id="link-1270" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-1270', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
<a name="L2215"></a><tt class="py-lineno">2215</tt>  <tt class="py-line"> </tt>
<a name="L2216"></a><tt class="py-lineno">2216</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1271" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1271', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2217"></a><tt class="py-lineno">2217</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1272" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1272', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L2218"></a><tt class="py-lineno">2218</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1273" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1273', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1274" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1274', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2219"></a><tt class="py-lineno">2219</tt>  <tt class="py-line">            <tt id="link-1275" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1275', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2220"></a><tt class="py-lineno">2220</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2221"></a><tt class="py-lineno">2221</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1276" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1276', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">change_password_next</tt> </tt>
<a name="L2222"></a><tt class="py-lineno">2222</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1277" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1277', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2223"></a><tt class="py-lineno">2223</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1278" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1278', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">change_password_onvalidation</tt> </tt>
<a name="L2224"></a><tt class="py-lineno">2224</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1279" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1279', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2225"></a><tt class="py-lineno">2225</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1280" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1280', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">change_password_onaccept</tt> </tt>
<a name="L2226"></a><tt class="py-lineno">2226</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1281" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1281', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1282" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1282', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2227"></a><tt class="py-lineno">2227</tt>  <tt class="py-line">            <tt id="link-1283" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1283', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">change_password_log</tt> </tt>
<a name="L2228"></a><tt class="py-lineno">2228</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1284" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1284', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L2229"></a><tt class="py-lineno">2229</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1285" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1285', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-1286" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.factory
web2py.gluon.sqlhtml.SQLFORM.factory" class="py-name" href="#" onclick="return doclink('link-1286', 'factory', 'link-1167');">factory</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2230"></a><tt class="py-lineno">2230</tt>  <tt class="py-line">            <tt id="link-1287" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1287', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'old_password'</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L2231"></a><tt class="py-lineno">2231</tt>  <tt class="py-line">                <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">old_password</tt><tt class="py-op">,</tt> </tt>
<a name="L2232"></a><tt class="py-lineno">2232</tt>  <tt class="py-line">                <tt id="link-1288" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1288', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt id="link-1289" class="py-name" targets="Function web2py.gluon.tools.validators()=web2py.gluon.tools-module.html#validators,Module web2py.gluon.validators=web2py.gluon.validators-module.html"><a title="web2py.gluon.tools.validators
web2py.gluon.validators" class="py-name" href="#" onclick="return doclink('link-1289', 'validators', 'link-1289');">validators</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2233"></a><tt class="py-lineno">2233</tt>  <tt class="py-line">                     <tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1290" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1290', 'requires', 'link-505');">requires</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2234"></a><tt class="py-lineno">2234</tt>  <tt class="py-line">                     <tt id="link-1291" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB" class="py-name" href="#" onclick="return doclink('link-1291', 'IS_IN_DB', 'link-566');">IS_IN_DB</a></tt><tt class="py-op">(</tt><tt id="link-1292" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-1292', 's', 'link-130');">s</a></tt><tt class="py-op">,</tt> <tt class="py-string">'%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">usern</tt><tt class="py-op">,</tt> <tt class="py-name">passfield</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2235"></a><tt class="py-lineno">2235</tt>  <tt class="py-line">                              <tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">invalid_password</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2236"></a><tt class="py-lineno">2236</tt>  <tt class="py-line">            <tt id="link-1293" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1293', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'new_password'</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L2237"></a><tt class="py-lineno">2237</tt>  <tt class="py-line">                <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt><tt class="py-op">,</tt> </tt>
<a name="L2238"></a><tt class="py-lineno">2238</tt>  <tt class="py-line">                <tt id="link-1294" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1294', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1295" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1295', 'requires', 'link-505');">requires</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2239"></a><tt class="py-lineno">2239</tt>  <tt class="py-line">            <tt id="link-1296" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1296', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'new_password2'</tt><tt class="py-op">,</tt> <tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L2240"></a><tt class="py-lineno">2240</tt>  <tt class="py-line">                <tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">verify_password</tt><tt class="py-op">,</tt> </tt>
<a name="L2241"></a><tt class="py-lineno">2241</tt>  <tt class="py-line">                <tt id="link-1297" class="py-name"><a title="web2py.gluon.tools.Auth.requires" class="py-name" href="#" onclick="return doclink('link-1297', 'requires', 'link-505');">requires</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt id="link-1298" class="py-name"><a title="web2py.gluon.validators.IS_EXPR" class="py-name" href="#" onclick="return doclink('link-1298', 'IS_EXPR', 'link-933');">IS_EXPR</a></tt><tt class="py-op">(</tt><tt class="py-string">'value==%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2242"></a><tt class="py-lineno">2242</tt>  <tt class="py-line">                              <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">mismatched_password</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2243"></a><tt class="py-lineno">2243</tt>  <tt class="py-line">            <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_change_button</tt><tt class="py-op">,</tt> </tt>
<a name="L2244"></a><tt class="py-lineno">2244</tt>  <tt class="py-line">            <tt class="py-name">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1299" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1299', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L2245"></a><tt class="py-lineno">2245</tt>  <tt class="py-line">            <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1300" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1300', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L2246"></a><tt class="py-lineno">2246</tt>  <tt class="py-line">        <tt class="py-op">)</tt> </tt>
<a name="L2247"></a><tt class="py-lineno">2247</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1301" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1301', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L2248"></a><tt class="py-lineno">2248</tt>  <tt class="py-line">                        <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'change_password'</tt><tt class="py-op">,</tt> </tt>
<a name="L2249"></a><tt class="py-lineno">2249</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> </tt>
<a name="L2250"></a><tt class="py-lineno">2250</tt>  <tt class="py-line">                        <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1302" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1302', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2251"></a><tt class="py-lineno">2251</tt>  <tt class="py-line">            <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">passfield</tt><tt class="py-op">:</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">new_password</tt><tt class="py-op">}</tt> </tt>
<a name="L2252"></a><tt class="py-lineno">2252</tt>  <tt class="py-line">            <tt id="link-1303" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-1303', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-1304" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1304', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L2253"></a><tt class="py-lineno">2253</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">password_changed</tt> </tt>
<a name="L2254"></a><tt class="py-lineno">2254</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1305" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1305', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2255"></a><tt class="py-lineno">2255</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1306" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1306', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1307" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1307', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L2256"></a><tt class="py-lineno">2256</tt>  <tt class="py-line">            <tt id="link-1308" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1308', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L2257"></a><tt class="py-lineno">2257</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1309" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1309', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2258"></a><tt class="py-lineno">2258</tt>  <tt class="py-line">                <tt id="link-1310" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1310', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1311" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1311', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L2259"></a><tt class="py-lineno">2259</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-1312" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1312', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L2260"></a><tt class="py-lineno">2260</tt>  <tt class="py-line">                <tt id="link-1313" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1313', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1314" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1314', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L2261"></a><tt class="py-lineno">2261</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-1315" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1315', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-1316" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1316', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-1317" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1317', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L2262"></a><tt class="py-lineno">2262</tt>  <tt class="py-line">                <tt id="link-1318" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1318', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1319" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1319', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-1320" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1320', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2263"></a><tt class="py-lineno">2263</tt>  <tt class="py-line">            <tt id="link-1321" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1321', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1322" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1322', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2264"></a><tt class="py-lineno">2264</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L2265"></a><tt class="py-lineno">2265</tt>  <tt class="py-line"> </tt>
<a name="Auth.profile"></a><div id="Auth.profile-def"><a name="L2266"></a><tt class="py-lineno">2266</tt> <a class="py-toggle" href="#" id="Auth.profile-toggle" onclick="return toggle('Auth.profile');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#profile">profile</a><tt class="py-op">(</tt> </tt>
<a name="L2267"></a><tt class="py-lineno">2267</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2268"></a><tt class="py-lineno">2268</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1323" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1323', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2269"></a><tt class="py-lineno">2269</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1324" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1324', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2270"></a><tt class="py-lineno">2270</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1325" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1325', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2271"></a><tt class="py-lineno">2271</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1326" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1326', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2272"></a><tt class="py-lineno">2272</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.profile-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.profile-expanded"><a name="L2273"></a><tt class="py-lineno">2273</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2274"></a><tt class="py-lineno">2274</tt>  <tt class="py-line"><tt class="py-docstring">        returns a form that lets the user change his/her profile</tt> </tt>
<a name="L2275"></a><tt class="py-lineno">2275</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2276"></a><tt class="py-lineno">2276</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Auth.profile([next=DEFAULT [, onvalidation=DEFAULT</tt> </tt>
<a name="L2277"></a><tt class="py-lineno">2277</tt>  <tt class="py-line"><tt class="py-docstring">            [, onaccept=DEFAULT [, log=DEFAULT]]]])</tt> </tt>
<a name="L2278"></a><tt class="py-lineno">2278</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2279"></a><tt class="py-lineno">2279</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2280"></a><tt class="py-lineno">2280</tt>  <tt class="py-line"> </tt>
<a name="L2281"></a><tt class="py-lineno">2281</tt>  <tt class="py-line">        <tt class="py-name">table_user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1327" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1327', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt> </tt>
<a name="L2282"></a><tt class="py-lineno">2282</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1328" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1328', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2283"></a><tt class="py-lineno">2283</tt>  <tt class="py-line">            <tt id="link-1329" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1329', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1330" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1330', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt><tt class="py-op">)</tt> </tt>
<a name="L2284"></a><tt class="py-lineno">2284</tt>  <tt class="py-line">        <tt class="py-name">passfield</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1331" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1331', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">password_field</tt> </tt>
<a name="L2285"></a><tt class="py-lineno">2285</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1332" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1332', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">[</tt><tt class="py-name">passfield</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">writable</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2286"></a><tt class="py-lineno">2286</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1333" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1333', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2287"></a><tt class="py-lineno">2287</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1334" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1334', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L2288"></a><tt class="py-lineno">2288</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1335" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1335', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1336" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1336', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2289"></a><tt class="py-lineno">2289</tt>  <tt class="py-line">            <tt id="link-1337" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1337', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2290"></a><tt class="py-lineno">2290</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L2291"></a><tt class="py-lineno">2291</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1338" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1338', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_next</tt> </tt>
<a name="L2292"></a><tt class="py-lineno">2292</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1339" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1339', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2293"></a><tt class="py-lineno">2293</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1340" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1340', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_onvalidation</tt> </tt>
<a name="L2294"></a><tt class="py-lineno">2294</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1341" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1341', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2295"></a><tt class="py-lineno">2295</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1342" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1342', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_onaccept</tt> </tt>
<a name="L2296"></a><tt class="py-lineno">2296</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1343" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1343', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1344" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1344', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2297"></a><tt class="py-lineno">2297</tt>  <tt class="py-line">            <tt id="link-1345" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1345', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">profile_log</tt> </tt>
<a name="L2298"></a><tt class="py-lineno">2298</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1346" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1346', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2299"></a><tt class="py-lineno">2299</tt>  <tt class="py-line">            <tt class="py-name">table_user</tt><tt class="py-op">,</tt> </tt>
<a name="L2300"></a><tt class="py-lineno">2300</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> </tt>
<a name="L2301"></a><tt class="py-lineno">2301</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1347" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1347', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">profile_fields</tt><tt class="py-op">,</tt> </tt>
<a name="L2302"></a><tt class="py-lineno">2302</tt>  <tt class="py-line">            <tt class="py-name">hidden</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-1348" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1348', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2303"></a><tt class="py-lineno">2303</tt>  <tt class="py-line">            <tt class="py-name">showid</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1349" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1349', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L2304"></a><tt class="py-lineno">2304</tt>  <tt class="py-line">            <tt class="py-name">submit_button</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">profile_save_button</tt><tt class="py-op">,</tt> </tt>
<a name="L2305"></a><tt class="py-lineno">2305</tt>  <tt class="py-line">            <tt class="py-name">delete_label</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L2306"></a><tt class="py-lineno">2306</tt>  <tt class="py-line">            <tt class="py-name">upload</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1350" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1350', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">download_url</tt><tt class="py-op">,</tt> </tt>
<a name="L2307"></a><tt class="py-lineno">2307</tt>  <tt class="py-line">            <tt class="py-name">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1351" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1351', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L2308"></a><tt class="py-lineno">2308</tt>  <tt class="py-line">            <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1352" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1352', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L2309"></a><tt class="py-lineno">2309</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L2310"></a><tt class="py-lineno">2310</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1353" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1353', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">,</tt> </tt>
<a name="L2311"></a><tt class="py-lineno">2311</tt>  <tt class="py-line">                        <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt> </tt>
<a name="L2312"></a><tt class="py-lineno">2312</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1354" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1354', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2313"></a><tt class="py-lineno">2313</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-1355" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1355', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-1356" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-1356', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2314"></a><tt class="py-lineno">2314</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">profile_updated</tt> </tt>
<a name="L2315"></a><tt class="py-lineno">2315</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1357" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1357', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2316"></a><tt class="py-lineno">2316</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1358" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1358', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1359" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1359', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">)</tt> </tt>
<a name="L2317"></a><tt class="py-lineno">2317</tt>  <tt class="py-line">            <tt id="link-1360" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1360', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L2318"></a><tt class="py-lineno">2318</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1361" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1361', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2319"></a><tt class="py-lineno">2319</tt>  <tt class="py-line">                <tt id="link-1362" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1362', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1363" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1363', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L2320"></a><tt class="py-lineno">2320</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-1364" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1364', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L2321"></a><tt class="py-lineno">2321</tt>  <tt class="py-line">                <tt id="link-1365" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1365', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1366" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1366', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L2322"></a><tt class="py-lineno">2322</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt id="link-1367" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1367', 'next', 'link-745');">next</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-1368" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1368', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-1369" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1369', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L2323"></a><tt class="py-lineno">2323</tt>  <tt class="py-line">                <tt id="link-1370" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1370', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1371" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1371', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt id="link-1372" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1372', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2324"></a><tt class="py-lineno">2324</tt>  <tt class="py-line">            <tt id="link-1373" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1373', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1374" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1374', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2325"></a><tt class="py-lineno">2325</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L2326"></a><tt class="py-lineno">2326</tt>  <tt class="py-line"> </tt>
<a name="Auth.is_impersonating"></a><div id="Auth.is_impersonating-def"><a name="L2327"></a><tt class="py-lineno">2327</tt> <a class="py-toggle" href="#" id="Auth.is_impersonating-toggle" onclick="return toggle('Auth.is_impersonating');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#is_impersonating">is_impersonating</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.is_impersonating-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.is_impersonating-expanded"><a name="L2328"></a><tt class="py-lineno">2328</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-1375" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1375', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">impersonator</tt> </tt>
</div><a name="L2329"></a><tt class="py-lineno">2329</tt>  <tt class="py-line"> </tt>
<a name="Auth.impersonate"></a><div id="Auth.impersonate-def"><a name="L2330"></a><tt class="py-lineno">2330</tt> <a class="py-toggle" href="#" id="Auth.impersonate-toggle" onclick="return toggle('Auth.impersonate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#impersonate">impersonate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">user_id</tt><tt class="py-op">=</tt><tt id="link-1376" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1376', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.impersonate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.impersonate-expanded"><a name="L2331"></a><tt class="py-lineno">2331</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2332"></a><tt class="py-lineno">2332</tt>  <tt class="py-line"><tt class="py-docstring">        usage: POST TO http://..../impersonate request.post_vars.user_id=&lt;id&gt;</tt> </tt>
<a name="L2333"></a><tt class="py-lineno">2333</tt>  <tt class="py-line"><tt class="py-docstring">        set request.post_vars.user_id to 0 to restore original user.</tt> </tt>
<a name="L2334"></a><tt class="py-lineno">2334</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2335"></a><tt class="py-lineno">2335</tt>  <tt class="py-line"><tt class="py-docstring">        requires impersonator is logged in and</tt> </tt>
<a name="L2336"></a><tt class="py-lineno">2336</tt>  <tt class="py-line"><tt class="py-docstring">        has_permission('impersonate', 'auth_user', user_id)</tt> </tt>
<a name="L2337"></a><tt class="py-lineno">2337</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2338"></a><tt class="py-lineno">2338</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1377" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1377', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2339"></a><tt class="py-lineno">2339</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1378" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1378', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L2340"></a><tt class="py-lineno">2340</tt>  <tt class="py-line">        <tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> </tt>
<a name="L2341"></a><tt class="py-lineno">2341</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1379" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1379', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2342"></a><tt class="py-lineno">2342</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1380" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1380', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">401</tt><tt class="py-op">,</tt> <tt class="py-string">"Not Authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2343"></a><tt class="py-lineno">2343</tt>  <tt class="py-line">        <tt class="py-name">current_id</tt> <tt class="py-op">=</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2344"></a><tt class="py-lineno">2344</tt>  <tt class="py-line">        <tt class="py-name">requested_id</tt> <tt class="py-op">=</tt> <tt id="link-1381" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1381', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L2345"></a><tt class="py-lineno">2345</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1382" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1382', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">==</tt> <tt id="link-1383" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1383', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2346"></a><tt class="py-lineno">2346</tt>  <tt class="py-line">            <tt id="link-1384" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1384', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt id="link-1385" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1385', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt id="link-1386" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1386', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L2347"></a><tt class="py-lineno">2347</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1387" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1387', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">and</tt> <tt id="link-1388" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1388', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-keyword">and</tt> <tt id="link-1389" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1389', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">'0'</tt><tt class="py-op">:</tt> </tt>
<a name="L2348"></a><tt class="py-lineno">2348</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1390" class="py-name" targets="Method web2py.gluon.tools.Auth.has_permission()=web2py.gluon.tools.Auth-class.html#has_permission,Method web2py.gluon.tools.Crud.has_permission()=web2py.gluon.tools.Crud-class.html#has_permission"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1390', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt class="py-string">'impersonate'</tt><tt class="py-op">,</tt> </tt>
<a name="L2349"></a><tt class="py-lineno">2349</tt>  <tt class="py-line">                                       <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1391" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1391', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user_name</tt><tt class="py-op">,</tt> </tt>
<a name="L2350"></a><tt class="py-lineno">2350</tt>  <tt class="py-line">                                       <tt id="link-1392" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1392', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2351"></a><tt class="py-lineno">2351</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-1393" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1393', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt> <tt class="py-string">"Forbidden"</tt><tt class="py-op">)</tt> </tt>
<a name="L2352"></a><tt class="py-lineno">2352</tt>  <tt class="py-line">            <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1394" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1394', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">(</tt><tt id="link-1395" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1395', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2353"></a><tt class="py-lineno">2353</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2354"></a><tt class="py-lineno">2354</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-1396" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1396', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">401</tt><tt class="py-op">,</tt> <tt class="py-string">"Not Authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2355"></a><tt class="py-lineno">2355</tt>  <tt class="py-line">            <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">impersonator</tt> <tt class="py-op">=</tt> <tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-name">session</tt><tt class="py-op">)</tt> </tt>
<a name="L2356"></a><tt class="py-lineno">2356</tt>  <tt class="py-line">            <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt id="link-1397" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1397', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2357"></a><tt class="py-lineno">2357</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1398" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1398', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_user</tt><tt class="py-op">.</tt><tt id="link-1399" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-1399', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2358"></a><tt class="py-lineno">2358</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> </tt>
<a name="L2359"></a><tt class="py-lineno">2359</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1400" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1400', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_onaccept</tt><tt class="py-op">:</tt> </tt>
<a name="L2360"></a><tt class="py-lineno">2360</tt>  <tt class="py-line">                <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1401" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-1401', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2361"></a><tt class="py-lineno">2361</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1402" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1402', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_onaccept</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">)</tt> </tt>
<a name="L2362"></a><tt class="py-lineno">2362</tt>  <tt class="py-line">            <tt id="link-1403" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1403', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">impersonate_log</tt> </tt>
<a name="L2363"></a><tt class="py-lineno">2363</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1404" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1404', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2364"></a><tt class="py-lineno">2364</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1405" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1405', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1406" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1406', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">current_id</tt><tt class="py-op">,</tt><tt class="py-name">other_id</tt><tt class="py-op">=</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2365"></a><tt class="py-lineno">2365</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-1407" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1407', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-string">'0'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1408" class="py-name" targets="Method web2py.gluon.tools.Auth.is_impersonating()=web2py.gluon.tools.Auth-class.html#is_impersonating"><a title="web2py.gluon.tools.Auth.is_impersonating" class="py-name" href="#" onclick="return doclink('link-1408', 'is_impersonating', 'link-1408');">is_impersonating</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2366"></a><tt class="py-lineno">2366</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-1409" class="py-name" targets="Method web2py.gluon.cache.CacheAbstract.clear()=web2py.gluon.cache.CacheAbstract-class.html#clear,Method web2py.gluon.cache.CacheInRam.clear()=web2py.gluon.cache.CacheInRam-class.html#clear,Method web2py.gluon.cache.CacheOnDisk.clear()=web2py.gluon.cache.CacheOnDisk-class.html#clear"><a title="web2py.gluon.cache.CacheAbstract.clear
web2py.gluon.cache.CacheInRam.clear
web2py.gluon.cache.CacheOnDisk.clear" class="py-name" href="#" onclick="return doclink('link-1409', 'clear', 'link-1409');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2367"></a><tt class="py-lineno">2367</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt id="link-1410" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1410', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">cPickle</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">impersonator</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2368"></a><tt class="py-lineno">2368</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> </tt>
<a name="L2369"></a><tt class="py-lineno">2369</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">requested_id</tt> <tt class="py-op">==</tt> <tt id="link-1411" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1411', 'DEFAULT', 'link-17');">DEFAULT</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">:</tt> </tt>
<a name="L2370"></a><tt class="py-lineno">2370</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-1412" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1412', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">.</tt><tt id="link-1413" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM.factory
web2py.gluon.sqlhtml.SQLFORM.factory" class="py-name" href="#" onclick="return doclink('link-1413', 'factory', 'link-1167');">factory</a></tt><tt class="py-op">(</tt><tt id="link-1414" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1414', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-string">'user_id'</tt><tt class="py-op">,</tt><tt class="py-string">'integer'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2371"></a><tt class="py-lineno">2371</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt> </tt>
</div><a name="L2372"></a><tt class="py-lineno">2372</tt>  <tt class="py-line"> </tt>
<a name="Auth.groups"></a><div id="Auth.groups-def"><a name="L2373"></a><tt class="py-lineno">2373</tt> <a class="py-toggle" href="#" id="Auth.groups-toggle" onclick="return toggle('Auth.groups');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#groups">groups</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.groups-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.groups-expanded"><a name="L2374"></a><tt class="py-lineno">2374</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2375"></a><tt class="py-lineno">2375</tt>  <tt class="py-line"><tt class="py-docstring">        displays the groups and their roles for the logged in user</tt> </tt>
<a name="L2376"></a><tt class="py-lineno">2376</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2377"></a><tt class="py-lineno">2377</tt>  <tt class="py-line"> </tt>
<a name="L2378"></a><tt class="py-lineno">2378</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1415" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1415', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2379"></a><tt class="py-lineno">2379</tt>  <tt class="py-line">            <tt id="link-1416" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1416', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1417" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1417', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt><tt class="py-op">)</tt> </tt>
<a name="L2380"></a><tt class="py-lineno">2380</tt>  <tt class="py-line">        <tt class="py-name">memberships</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1418" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1418', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt><tt class="py-op">.</tt><tt id="link-1419" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1419', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L2381"></a><tt class="py-lineno">2381</tt>  <tt class="py-line">                               <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1420" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1420', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2382"></a><tt class="py-lineno">2382</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-1421" class="py-name" targets="Class web2py.gluon.html.TABLE=web2py.gluon.html.TABLE-class.html"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-1421', 'TABLE', 'link-1421');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2383"></a><tt class="py-lineno">2383</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">membership</tt> <tt class="py-keyword">in</tt> <tt class="py-name">memberships</tt><tt class="py-op">:</tt> </tt>
<a name="L2384"></a><tt class="py-lineno">2384</tt>  <tt class="py-line">            <tt id="link-1422" class="py-name" targets="Method web2py.gluon.tools.Auth.groups()=web2py.gluon.tools.Auth-class.html#groups"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1422', 'groups', 'link-1422');">groups</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1423" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1423', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2385"></a><tt class="py-lineno">2385</tt>  <tt class="py-line">                              <tt class="py-op">==</tt> <tt class="py-name">membership</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1424" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1424', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2386"></a><tt class="py-lineno">2386</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1425" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1425', 'groups', 'link-1422');">groups</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2387"></a><tt class="py-lineno">2387</tt>  <tt class="py-line">                <tt class="py-name">group</tt> <tt class="py-op">=</tt> <tt id="link-1426" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1426', 'groups', 'link-1422');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L2388"></a><tt class="py-lineno">2388</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-1427" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-1427', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt id="link-1428" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-1428', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-1429" class="py-name" targets="Class web2py.gluon.html.H3=web2py.gluon.html.H3-class.html"><a title="web2py.gluon.html.H3" class="py-name" href="#" onclick="return doclink('link-1429', 'H3', 'link-1429');">H3</a></tt><tt class="py-op">(</tt><tt class="py-name">group</tt><tt class="py-op">.</tt><tt class="py-name">role</tt><tt class="py-op">,</tt> <tt class="py-string">'(%s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">group</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2389"></a><tt class="py-lineno">2389</tt>  <tt class="py-line">                <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-1430" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-1430', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt id="link-1431" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-1431', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-1432" class="py-name" targets="Class web2py.gluon.html.P=web2py.gluon.html.P-class.html"><a title="web2py.gluon.html.P" class="py-name" href="#" onclick="return doclink('link-1432', 'P', 'link-1432');">P</a></tt><tt class="py-op">(</tt><tt class="py-name">group</tt><tt class="py-op">.</tt><tt class="py-name">description</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2390"></a><tt class="py-lineno">2390</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">memberships</tt><tt class="py-op">:</tt> </tt>
<a name="L2391"></a><tt class="py-lineno">2391</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L2392"></a><tt class="py-lineno">2392</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">table</tt> </tt>
</div><a name="L2393"></a><tt class="py-lineno">2393</tt>  <tt class="py-line"> </tt>
<a name="Auth.not_authorized"></a><div id="Auth.not_authorized-def"><a name="L2394"></a><tt class="py-lineno">2394</tt> <a class="py-toggle" href="#" id="Auth.not_authorized-toggle" onclick="return toggle('Auth.not_authorized');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#not_authorized">not_authorized</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.not_authorized-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.not_authorized-expanded"><a name="L2395"></a><tt class="py-lineno">2395</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2396"></a><tt class="py-lineno">2396</tt>  <tt class="py-line"><tt class="py-docstring">        you can change the view for this page to make it look as you like</tt> </tt>
<a name="L2397"></a><tt class="py-lineno">2397</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2398"></a><tt class="py-lineno">2398</tt>  <tt class="py-line"> </tt>
<a name="L2399"></a><tt class="py-lineno">2399</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'ACCESS DENIED'</tt> </tt>
</div><a name="L2400"></a><tt class="py-lineno">2400</tt>  <tt class="py-line"> </tt>
<a name="Auth.requires"></a><div id="Auth.requires-def"><a name="L2401"></a><tt class="py-lineno">2401</tt> <a class="py-toggle" href="#" id="Auth.requires-toggle" onclick="return toggle('Auth.requires');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#requires">requires</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">condition</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.requires-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.requires-expanded"><a name="L2402"></a><tt class="py-lineno">2402</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2403"></a><tt class="py-lineno">2403</tt>  <tt class="py-line"><tt class="py-docstring">        decorator that prevents access to action if not logged in</tt> </tt>
<a name="L2404"></a><tt class="py-lineno">2404</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2405"></a><tt class="py-lineno">2405</tt>  <tt class="py-line"> </tt>
<a name="L2406"></a><tt class="py-lineno">2406</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">decorator</tt><tt class="py-op">(</tt><tt class="py-param">action</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2407"></a><tt class="py-lineno">2407</tt>  <tt class="py-line"> </tt>
<a name="L2408"></a><tt class="py-lineno">2408</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2409"></a><tt class="py-lineno">2409</tt>  <tt class="py-line"> </tt>
<a name="L2410"></a><tt class="py-lineno">2410</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1433" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1433', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login_only</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1434" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1434', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2411"></a><tt class="py-lineno">2411</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1435" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1435', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2412"></a><tt class="py-lineno">2412</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1436" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1436', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2413"></a><tt class="py-lineno">2413</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1437" class="py-name" targets="Function web2py.gluon.tools.call_or_redirect()=web2py.gluon.tools-module.html#call_or_redirect"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1437', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1438" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1438', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2414"></a><tt class="py-lineno">2414</tt>  <tt class="py-line"> </tt>
<a name="L2415"></a><tt class="py-lineno">2415</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">condition</tt><tt class="py-op">:</tt> </tt>
<a name="L2416"></a><tt class="py-lineno">2416</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1439" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1439', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2417"></a><tt class="py-lineno">2417</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1440" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1440', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2418"></a><tt class="py-lineno">2418</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1441" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1441', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1442" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1442', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2419"></a><tt class="py-lineno">2419</tt>  <tt class="py-line">                        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1443" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1443', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2420"></a><tt class="py-lineno">2420</tt>  <tt class="py-line">                        <tt id="link-1444" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1444', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1445" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1445', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> </tt>
<a name="L2421"></a><tt class="py-lineno">2421</tt>  <tt class="py-line">                                   <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L2422"></a><tt class="py-lineno">2422</tt>  <tt class="py-line">                        <tt id="link-1446" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1446', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1447" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1447', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> </tt>
<a name="L2423"></a><tt class="py-lineno">2423</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt id="link-1448" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1448', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2424"></a><tt class="py-lineno">2424</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1449" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1449', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authentication</tt><tt class="py-op">,</tt> </tt>
<a name="L2425"></a><tt class="py-lineno">2425</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1450" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1450', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'?_next='</tt><tt class="py-op">+</tt><tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt id="link-1451" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1451', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2426"></a><tt class="py-lineno">2426</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2427"></a><tt class="py-lineno">2427</tt>  <tt class="py-line">                        <tt id="link-1452" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1452', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">access_denied</tt> </tt>
<a name="L2428"></a><tt class="py-lineno">2428</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt id="link-1453" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1453', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1454" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1454', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2429"></a><tt class="py-lineno">2429</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">action</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-1455" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-1455', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2430"></a><tt class="py-lineno">2430</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> </tt>
<a name="L2431"></a><tt class="py-lineno">2431</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L2432"></a><tt class="py-lineno">2432</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-1456" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1456', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">)</tt> </tt>
<a name="L2433"></a><tt class="py-lineno">2433</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L2434"></a><tt class="py-lineno">2434</tt>  <tt class="py-line"> </tt>
<a name="L2435"></a><tt class="py-lineno">2435</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">decorator</tt> </tt>
</div><a name="L2436"></a><tt class="py-lineno">2436</tt>  <tt class="py-line"> </tt>
<a name="Auth.requires_login"></a><div id="Auth.requires_login-def"><a name="L2437"></a><tt class="py-lineno">2437</tt> <a class="py-toggle" href="#" id="Auth.requires_login-toggle" onclick="return toggle('Auth.requires_login');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#requires_login">requires_login</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.requires_login-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.requires_login-expanded"><a name="L2438"></a><tt class="py-lineno">2438</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2439"></a><tt class="py-lineno">2439</tt>  <tt class="py-line"><tt class="py-docstring">        decorator that prevents access to action if not logged in</tt> </tt>
<a name="L2440"></a><tt class="py-lineno">2440</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2441"></a><tt class="py-lineno">2441</tt>  <tt class="py-line"> </tt>
<a name="L2442"></a><tt class="py-lineno">2442</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">decorator</tt><tt class="py-op">(</tt><tt class="py-param">action</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2443"></a><tt class="py-lineno">2443</tt>  <tt class="py-line"> </tt>
<a name="L2444"></a><tt class="py-lineno">2444</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2445"></a><tt class="py-lineno">2445</tt>  <tt class="py-line"> </tt>
<a name="L2446"></a><tt class="py-lineno">2446</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1457" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1457', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login_only</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1458" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1458', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2447"></a><tt class="py-lineno">2447</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1459" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1459', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2448"></a><tt class="py-lineno">2448</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1460" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1460', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2449"></a><tt class="py-lineno">2449</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1461" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1461', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1462" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1462', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2450"></a><tt class="py-lineno">2450</tt>  <tt class="py-line"> </tt>
<a name="L2451"></a><tt class="py-lineno">2451</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1463" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1463', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1464" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1464', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2452"></a><tt class="py-lineno">2452</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1465" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1465', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2453"></a><tt class="py-lineno">2453</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1466" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1466', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2454"></a><tt class="py-lineno">2454</tt>  <tt class="py-line">                    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1467" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1467', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2455"></a><tt class="py-lineno">2455</tt>  <tt class="py-line">                    <tt id="link-1468" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1468', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1469" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1469', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> </tt>
<a name="L2456"></a><tt class="py-lineno">2456</tt>  <tt class="py-line">                               <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L2457"></a><tt class="py-lineno">2457</tt>  <tt class="py-line">                    <tt id="link-1470" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1470', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1471" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1471', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> </tt>
<a name="L2458"></a><tt class="py-lineno">2458</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1472" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1472', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2459"></a><tt class="py-lineno">2459</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1473" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1473', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authentication</tt><tt class="py-op">,</tt> </tt>
<a name="L2460"></a><tt class="py-lineno">2460</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1474" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1474', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'?_next='</tt><tt class="py-op">+</tt><tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt id="link-1475" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1475', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2461"></a><tt class="py-lineno">2461</tt>  <tt class="py-line">                        <tt class="py-op">)</tt> </tt>
<a name="L2462"></a><tt class="py-lineno">2462</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">action</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-1476" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-1476', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2463"></a><tt class="py-lineno">2463</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> </tt>
<a name="L2464"></a><tt class="py-lineno">2464</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L2465"></a><tt class="py-lineno">2465</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-1477" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1477', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">)</tt> </tt>
<a name="L2466"></a><tt class="py-lineno">2466</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L2467"></a><tt class="py-lineno">2467</tt>  <tt class="py-line"> </tt>
<a name="L2468"></a><tt class="py-lineno">2468</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">decorator</tt> </tt>
</div><a name="L2469"></a><tt class="py-lineno">2469</tt>  <tt class="py-line"> </tt>
<a name="Auth.requires_membership"></a><div id="Auth.requires_membership-def"><a name="L2470"></a><tt class="py-lineno">2470</tt> <a class="py-toggle" href="#" id="Auth.requires_membership-toggle" onclick="return toggle('Auth.requires_membership');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#requires_membership">requires_membership</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">role</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">group_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.requires_membership-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.requires_membership-expanded"><a name="L2471"></a><tt class="py-lineno">2471</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2472"></a><tt class="py-lineno">2472</tt>  <tt class="py-line"><tt class="py-docstring">        decorator that prevents access to action if not logged in or</tt> </tt>
<a name="L2473"></a><tt class="py-lineno">2473</tt>  <tt class="py-line"><tt class="py-docstring">        if user logged in is not a member of group_id.</tt> </tt>
<a name="L2474"></a><tt class="py-lineno">2474</tt>  <tt class="py-line"><tt class="py-docstring">        If role is provided instead of group_id then the</tt> </tt>
<a name="L2475"></a><tt class="py-lineno">2475</tt>  <tt class="py-line"><tt class="py-docstring">        group_id is calculated.</tt> </tt>
<a name="L2476"></a><tt class="py-lineno">2476</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2477"></a><tt class="py-lineno">2477</tt>  <tt class="py-line"> </tt>
<a name="L2478"></a><tt class="py-lineno">2478</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">decorator</tt><tt class="py-op">(</tt><tt class="py-param">action</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2479"></a><tt class="py-lineno">2479</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2480"></a><tt class="py-lineno">2480</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1478" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1478', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login_only</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1479" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1479', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2481"></a><tt class="py-lineno">2481</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1480" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1480', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2482"></a><tt class="py-lineno">2482</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1481" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1481', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2483"></a><tt class="py-lineno">2483</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1482" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1482', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1483" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1483', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2484"></a><tt class="py-lineno">2484</tt>  <tt class="py-line"> </tt>
<a name="L2485"></a><tt class="py-lineno">2485</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1484" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1484', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1485" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1485', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2486"></a><tt class="py-lineno">2486</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1486" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1486', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2487"></a><tt class="py-lineno">2487</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1487" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1487', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2488"></a><tt class="py-lineno">2488</tt>  <tt class="py-line">                    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1488" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1488', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2489"></a><tt class="py-lineno">2489</tt>  <tt class="py-line">                    <tt id="link-1489" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1489', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1490" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1490', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> </tt>
<a name="L2490"></a><tt class="py-lineno">2490</tt>  <tt class="py-line">                               <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L2491"></a><tt class="py-lineno">2491</tt>  <tt class="py-line">                    <tt id="link-1491" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1491', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1492" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1492', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> </tt>
<a name="L2492"></a><tt class="py-lineno">2492</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1493" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1493', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2493"></a><tt class="py-lineno">2493</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1494" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1494', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authentication</tt><tt class="py-op">,</tt> </tt>
<a name="L2494"></a><tt class="py-lineno">2494</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1495" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1495', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'?_next='</tt><tt class="py-op">+</tt><tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt id="link-1496" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1496', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2495"></a><tt class="py-lineno">2495</tt>  <tt class="py-line">                        <tt class="py-op">)</tt> </tt>
<a name="L2496"></a><tt class="py-lineno">2496</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1497" class="py-name" targets="Method web2py.gluon.tools.Auth.has_membership()=web2py.gluon.tools.Auth-class.html#has_membership"><a title="web2py.gluon.tools.Auth.has_membership" class="py-name" href="#" onclick="return doclink('link-1497', 'has_membership', 'link-1497');">has_membership</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt class="py-name">role</tt><tt class="py-op">=</tt><tt class="py-name">role</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2497"></a><tt class="py-lineno">2497</tt>  <tt class="py-line">                    <tt id="link-1498" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1498', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">access_denied</tt> </tt>
<a name="L2498"></a><tt class="py-lineno">2498</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1499" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1499', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1500" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1500', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2499"></a><tt class="py-lineno">2499</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">action</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-1501" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-1501', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2500"></a><tt class="py-lineno">2500</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> </tt>
<a name="L2501"></a><tt class="py-lineno">2501</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L2502"></a><tt class="py-lineno">2502</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-1502" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1502', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">)</tt> </tt>
<a name="L2503"></a><tt class="py-lineno">2503</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L2504"></a><tt class="py-lineno">2504</tt>  <tt class="py-line"> </tt>
<a name="L2505"></a><tt class="py-lineno">2505</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">decorator</tt> </tt>
</div><a name="L2506"></a><tt class="py-lineno">2506</tt>  <tt class="py-line"> </tt>
<a name="L2507"></a><tt class="py-lineno">2507</tt>  <tt class="py-line"> </tt>
<a name="Auth.requires_permission"></a><div id="Auth.requires_permission-def"><a name="L2508"></a><tt class="py-lineno">2508</tt> <a class="py-toggle" href="#" id="Auth.requires_permission-toggle" onclick="return toggle('Auth.requires_permission');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#requires_permission">requires_permission</a><tt class="py-op">(</tt> </tt>
<a name="L2509"></a><tt class="py-lineno">2509</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2510"></a><tt class="py-lineno">2510</tt>  <tt class="py-line">        <tt class="py-param">name</tt><tt class="py-op">,</tt> </tt>
<a name="L2511"></a><tt class="py-lineno">2511</tt>  <tt class="py-line">        <tt class="py-param">table_name</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L2512"></a><tt class="py-lineno">2512</tt>  <tt class="py-line">        <tt class="py-param">record_id</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L2513"></a><tt class="py-lineno">2513</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.requires_permission-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.requires_permission-expanded"><a name="L2514"></a><tt class="py-lineno">2514</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2515"></a><tt class="py-lineno">2515</tt>  <tt class="py-line"><tt class="py-docstring">        decorator that prevents access to action if not logged in or</tt> </tt>
<a name="L2516"></a><tt class="py-lineno">2516</tt>  <tt class="py-line"><tt class="py-docstring">        if user logged in is not a member of any group (role) that</tt> </tt>
<a name="L2517"></a><tt class="py-lineno">2517</tt>  <tt class="py-line"><tt class="py-docstring">        has 'name' access to 'table_name', 'record_id'.</tt> </tt>
<a name="L2518"></a><tt class="py-lineno">2518</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2519"></a><tt class="py-lineno">2519</tt>  <tt class="py-line"> </tt>
<a name="L2520"></a><tt class="py-lineno">2520</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">decorator</tt><tt class="py-op">(</tt><tt class="py-param">action</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2521"></a><tt class="py-lineno">2521</tt>  <tt class="py-line"> </tt>
<a name="L2522"></a><tt class="py-lineno">2522</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2523"></a><tt class="py-lineno">2523</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1503" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1503', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login_only</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1504" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1504', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2524"></a><tt class="py-lineno">2524</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1505" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1505', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2525"></a><tt class="py-lineno">2525</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1506" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1506', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2526"></a><tt class="py-lineno">2526</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1507" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1507', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1508" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1508', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2527"></a><tt class="py-lineno">2527</tt>  <tt class="py-line"> </tt>
<a name="L2528"></a><tt class="py-lineno">2528</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1509" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1509', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1510" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1510', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2529"></a><tt class="py-lineno">2529</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1511" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1511', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2530"></a><tt class="py-lineno">2530</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1512" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1512', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2531"></a><tt class="py-lineno">2531</tt>  <tt class="py-line">                    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1513" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1513', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2532"></a><tt class="py-lineno">2532</tt>  <tt class="py-line">                    <tt id="link-1514" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1514', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1515" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1515', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> </tt>
<a name="L2533"></a><tt class="py-lineno">2533</tt>  <tt class="py-line">                               <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L2534"></a><tt class="py-lineno">2534</tt>  <tt class="py-line">                    <tt id="link-1516" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1516', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1517" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1517', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> </tt>
<a name="L2535"></a><tt class="py-lineno">2535</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1518" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1518', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2536"></a><tt class="py-lineno">2536</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1519" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1519', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authentication</tt><tt class="py-op">,</tt> </tt>
<a name="L2537"></a><tt class="py-lineno">2537</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1520" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1520', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'?_next='</tt><tt class="py-op">+</tt><tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt id="link-1521" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1521', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2538"></a><tt class="py-lineno">2538</tt>  <tt class="py-line">                        <tt class="py-op">)</tt> </tt>
<a name="L2539"></a><tt class="py-lineno">2539</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1522" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1522', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt id="link-1523" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1523', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">table_name</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2540"></a><tt class="py-lineno">2540</tt>  <tt class="py-line">                    <tt id="link-1524" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1524', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">access_denied</tt> </tt>
<a name="L2541"></a><tt class="py-lineno">2541</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1525" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1525', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1526" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1526', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2542"></a><tt class="py-lineno">2542</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">action</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-1527" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-1527', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2543"></a><tt class="py-lineno">2543</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> </tt>
<a name="L2544"></a><tt class="py-lineno">2544</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L2545"></a><tt class="py-lineno">2545</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-1528" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1528', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">)</tt> </tt>
<a name="L2546"></a><tt class="py-lineno">2546</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L2547"></a><tt class="py-lineno">2547</tt>  <tt class="py-line"> </tt>
<a name="L2548"></a><tt class="py-lineno">2548</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">decorator</tt> </tt>
</div><a name="L2549"></a><tt class="py-lineno">2549</tt>  <tt class="py-line"> </tt>
<a name="Auth.requires_signature"></a><div id="Auth.requires_signature-def"><a name="L2550"></a><tt class="py-lineno">2550</tt> <a class="py-toggle" href="#" id="Auth.requires_signature-toggle" onclick="return toggle('Auth.requires_signature');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#requires_signature">requires_signature</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.requires_signature-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.requires_signature-expanded"><a name="L2551"></a><tt class="py-lineno">2551</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2552"></a><tt class="py-lineno">2552</tt>  <tt class="py-line"><tt class="py-docstring">        decorator that prevents access to action if not logged in or</tt> </tt>
<a name="L2553"></a><tt class="py-lineno">2553</tt>  <tt class="py-line"><tt class="py-docstring">        if user logged in is not a member of group_id.</tt> </tt>
<a name="L2554"></a><tt class="py-lineno">2554</tt>  <tt class="py-line"><tt class="py-docstring">        If role is provided instead of group_id then the</tt> </tt>
<a name="L2555"></a><tt class="py-lineno">2555</tt>  <tt class="py-line"><tt class="py-docstring">        group_id is calculated.</tt> </tt>
<a name="L2556"></a><tt class="py-lineno">2556</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2557"></a><tt class="py-lineno">2557</tt>  <tt class="py-line"> </tt>
<a name="L2558"></a><tt class="py-lineno">2558</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">decorator</tt><tt class="py-op">(</tt><tt class="py-param">action</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2559"></a><tt class="py-lineno">2559</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2560"></a><tt class="py-lineno">2560</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1529" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1529', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">allow_basic_login_only</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1530" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1530', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2561"></a><tt class="py-lineno">2561</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1531" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1531', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2562"></a><tt class="py-lineno">2562</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1532" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1532', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2563"></a><tt class="py-lineno">2563</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1533" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1533', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1534" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1534', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2564"></a><tt class="py-lineno">2564</tt>  <tt class="py-line"> </tt>
<a name="L2565"></a><tt class="py-lineno">2565</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1535" class="py-name"><a title="web2py.gluon.tools.Auth.basic" class="py-name" href="#" onclick="return doclink('link-1535', 'basic', 'link-700');">basic</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1536" class="py-name"><a title="web2py.gluon.tools.Auth.is_logged_in" class="py-name" href="#" onclick="return doclink('link-1536', 'is_logged_in', 'link-669');">is_logged_in</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2566"></a><tt class="py-lineno">2566</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-1537" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1537', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">is_restful</tt><tt class="py-op">:</tt> </tt>
<a name="L2567"></a><tt class="py-lineno">2567</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-1538" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1538', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">403</tt><tt class="py-op">,</tt><tt class="py-string">"Not authorized"</tt><tt class="py-op">)</tt> </tt>
<a name="L2568"></a><tt class="py-lineno">2568</tt>  <tt class="py-line">                    <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1539" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1539', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L2569"></a><tt class="py-lineno">2569</tt>  <tt class="py-line">                    <tt id="link-1540" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1540', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1541" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1541', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> </tt>
<a name="L2570"></a><tt class="py-lineno">2570</tt>  <tt class="py-line">                               <tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">)</tt> </tt>
<a name="L2571"></a><tt class="py-lineno">2571</tt>  <tt class="py-line">                    <tt id="link-1542" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1542', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1543" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1543', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> </tt>
<a name="L2572"></a><tt class="py-lineno">2572</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1544" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1544', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2573"></a><tt class="py-lineno">2573</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1545" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1545', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authentication</tt><tt class="py-op">,</tt> </tt>
<a name="L2574"></a><tt class="py-lineno">2574</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1546" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1546', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">login_url</tt> <tt class="py-op">+</tt> <tt class="py-string">'?_next='</tt><tt class="py-op">+</tt><tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt id="link-1547" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1547', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2575"></a><tt class="py-lineno">2575</tt>  <tt class="py-line">                        <tt class="py-op">)</tt> </tt>
<a name="L2576"></a><tt class="py-lineno">2576</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1548" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1548', 'URL', 'link-288');">URL</a></tt><tt class="py-op">.</tt><tt class="py-name">verify</tt><tt class="py-op">(</tt><tt id="link-1549" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1549', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">user_signature</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2577"></a><tt class="py-lineno">2577</tt>  <tt class="py-line">                    <tt id="link-1550" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1550', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">access_denied</tt> </tt>
<a name="L2578"></a><tt class="py-lineno">2578</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt id="link-1551" class="py-name"><a title="web2py.gluon.tools.call_or_redirect" class="py-name" href="#" onclick="return doclink('link-1551', 'call_or_redirect', 'link-1437');">call_or_redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1552" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1552', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L2579"></a><tt class="py-lineno">2579</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">action</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-1553" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-1553', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2580"></a><tt class="py-lineno">2580</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__doc__</tt> </tt>
<a name="L2581"></a><tt class="py-lineno">2581</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-op">=</tt> <tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> </tt>
<a name="L2582"></a><tt class="py-lineno">2582</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-1554" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1554', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">action</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">)</tt> </tt>
<a name="L2583"></a><tt class="py-lineno">2583</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L2584"></a><tt class="py-lineno">2584</tt>  <tt class="py-line"> </tt>
<a name="L2585"></a><tt class="py-lineno">2585</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">decorator</tt> </tt>
</div><a name="L2586"></a><tt class="py-lineno">2586</tt>  <tt class="py-line"> </tt>
<a name="Auth.add_group"></a><div id="Auth.add_group-def"><a name="L2587"></a><tt class="py-lineno">2587</tt> <a class="py-toggle" href="#" id="Auth.add_group-toggle" onclick="return toggle('Auth.add_group');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#add_group">add_group</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">role</tt><tt class="py-op">,</tt> <tt class="py-param">description</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.add_group-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.add_group-expanded"><a name="L2588"></a><tt class="py-lineno">2588</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2589"></a><tt class="py-lineno">2589</tt>  <tt class="py-line"><tt class="py-docstring">        creates a group associated to a role</tt> </tt>
<a name="L2590"></a><tt class="py-lineno">2590</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2591"></a><tt class="py-lineno">2591</tt>  <tt class="py-line"> </tt>
<a name="L2592"></a><tt class="py-lineno">2592</tt>  <tt class="py-line">        <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1555" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1555', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt><tt class="py-op">.</tt><tt id="link-1556" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-1556', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">role</tt><tt class="py-op">=</tt><tt class="py-name">role</tt><tt class="py-op">,</tt> </tt>
<a name="L2593"></a><tt class="py-lineno">2593</tt>  <tt class="py-line">                <tt class="py-name">description</tt><tt class="py-op">=</tt><tt class="py-name">description</tt><tt class="py-op">)</tt> </tt>
<a name="L2594"></a><tt class="py-lineno">2594</tt>  <tt class="py-line">        <tt id="link-1557" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1557', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">add_group_log</tt> </tt>
<a name="L2595"></a><tt class="py-lineno">2595</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1558" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1558', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2596"></a><tt class="py-lineno">2596</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1559" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1559', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1560" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1560', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt class="py-name">role</tt><tt class="py-op">=</tt><tt class="py-name">role</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2597"></a><tt class="py-lineno">2597</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">group_id</tt> </tt>
</div><a name="L2598"></a><tt class="py-lineno">2598</tt>  <tt class="py-line"> </tt>
<a name="Auth.del_group"></a><div id="Auth.del_group-def"><a name="L2599"></a><tt class="py-lineno">2599</tt> <a class="py-toggle" href="#" id="Auth.del_group-toggle" onclick="return toggle('Auth.del_group');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#del_group">del_group</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.del_group-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.del_group-expanded"><a name="L2600"></a><tt class="py-lineno">2600</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2601"></a><tt class="py-lineno">2601</tt>  <tt class="py-line"><tt class="py-docstring">        deletes a group</tt> </tt>
<a name="L2602"></a><tt class="py-lineno">2602</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2603"></a><tt class="py-lineno">2603</tt>  <tt class="py-line"> </tt>
<a name="L2604"></a><tt class="py-lineno">2604</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1561" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1561', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">==</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1562" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.delete()=web2py.gluon.dal.BaseAdapter-class.html#delete,Method web2py.gluon.dal.CouchDBAdapter.delete()=web2py.gluon.dal.CouchDBAdapter-class.html#delete,Method web2py.gluon.dal.GoogleDatastoreAdapter.delete()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#delete,Method web2py.gluon.dal.MongoDBAdapter.delete()=web2py.gluon.dal.MongoDBAdapter-class.html#delete,Method web2py.gluon.dal.Set.delete()=web2py.gluon.dal.Set-class.html#delete,Method web2py.gluon.tools.Crud.delete()=web2py.gluon.tools.Crud-class.html#delete"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-1562', 'delete', 'link-1562');">delete</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2605"></a><tt class="py-lineno">2605</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1563" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1563', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> </tt>
<a name="L2606"></a><tt class="py-lineno">2606</tt>  <tt class="py-line">                 <tt class="py-op">==</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1564" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-1564', 'delete', 'link-1562');">delete</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2607"></a><tt class="py-lineno">2607</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1565" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1565', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> </tt>
<a name="L2608"></a><tt class="py-lineno">2608</tt>  <tt class="py-line">                 <tt class="py-op">==</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1566" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-1566', 'delete', 'link-1562');">delete</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2609"></a><tt class="py-lineno">2609</tt>  <tt class="py-line">        <tt id="link-1567" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1567', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">del_group_log</tt> </tt>
<a name="L2610"></a><tt class="py-lineno">2610</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1568" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1568', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2611"></a><tt class="py-lineno">2611</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1569" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1569', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1570" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1570', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2612"></a><tt class="py-lineno">2612</tt>  <tt class="py-line"> </tt>
<a name="Auth.id_group"></a><div id="Auth.id_group-def"><a name="L2613"></a><tt class="py-lineno">2613</tt> <a class="py-toggle" href="#" id="Auth.id_group-toggle" onclick="return toggle('Auth.id_group');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#id_group">id_group</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">role</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.id_group-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.id_group-expanded"><a name="L2614"></a><tt class="py-lineno">2614</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2615"></a><tt class="py-lineno">2615</tt>  <tt class="py-line"><tt class="py-docstring">        returns the group_id of the group specified by the role</tt> </tt>
<a name="L2616"></a><tt class="py-lineno">2616</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2617"></a><tt class="py-lineno">2617</tt>  <tt class="py-line">        <tt id="link-1571" class="py-name" targets="Method web2py.gluon.tools.Crud.rows()=web2py.gluon.tools.Crud-class.html#rows"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1571', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1572" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1572', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_group</tt><tt class="py-op">.</tt><tt class="py-name">role</tt> <tt class="py-op">==</tt> <tt class="py-name">role</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1573" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1573', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2618"></a><tt class="py-lineno">2618</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1574" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1574', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2619"></a><tt class="py-lineno">2619</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L2620"></a><tt class="py-lineno">2620</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-1575" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1575', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
</div><a name="L2621"></a><tt class="py-lineno">2621</tt>  <tt class="py-line"> </tt>
<a name="Auth.user_group"></a><div id="Auth.user_group-def"><a name="L2622"></a><tt class="py-lineno">2622</tt> <a class="py-toggle" href="#" id="Auth.user_group-toggle" onclick="return toggle('Auth.user_group');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#user_group">user_group</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">user_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.user_group-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.user_group-expanded"><a name="L2623"></a><tt class="py-lineno">2623</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2624"></a><tt class="py-lineno">2624</tt>  <tt class="py-line"><tt class="py-docstring">        returns the group_id of the group uniquely associated to this user</tt> </tt>
<a name="L2625"></a><tt class="py-lineno">2625</tt>  <tt class="py-line"><tt class="py-docstring">        i.e. role=user:[user_id]</tt> </tt>
<a name="L2626"></a><tt class="py-lineno">2626</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2627"></a><tt class="py-lineno">2627</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1576" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1576', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2628"></a><tt class="py-lineno">2628</tt>  <tt class="py-line">            <tt id="link-1577" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1577', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2629"></a><tt class="py-lineno">2629</tt>  <tt class="py-line">        <tt class="py-name">role</tt> <tt class="py-op">=</tt> <tt class="py-string">'user_%s'</tt> <tt class="py-op">%</tt> <tt id="link-1578" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1578', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L2630"></a><tt class="py-lineno">2630</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1579" class="py-name" targets="Method web2py.gluon.tools.Auth.id_group()=web2py.gluon.tools.Auth-class.html#id_group"><a title="web2py.gluon.tools.Auth.id_group" class="py-name" href="#" onclick="return doclink('link-1579', 'id_group', 'link-1579');">id_group</a></tt><tt class="py-op">(</tt><tt class="py-name">role</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2631"></a><tt class="py-lineno">2631</tt>  <tt class="py-line"> </tt>
<a name="Auth.has_membership"></a><div id="Auth.has_membership-def"><a name="L2632"></a><tt class="py-lineno">2632</tt> <a class="py-toggle" href="#" id="Auth.has_membership-toggle" onclick="return toggle('Auth.has_membership');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#has_membership">has_membership</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">user_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">role</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.has_membership-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.has_membership-expanded"><a name="L2633"></a><tt class="py-lineno">2633</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2634"></a><tt class="py-lineno">2634</tt>  <tt class="py-line"><tt class="py-docstring">        checks if user is member of group_id or role</tt> </tt>
<a name="L2635"></a><tt class="py-lineno">2635</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2636"></a><tt class="py-lineno">2636</tt>  <tt class="py-line"> </tt>
<a name="L2637"></a><tt class="py-lineno">2637</tt>  <tt class="py-line">        <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">group_id</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1580" class="py-name"><a title="web2py.gluon.tools.Auth.id_group" class="py-name" href="#" onclick="return doclink('link-1580', 'id_group', 'link-1579');">id_group</a></tt><tt class="py-op">(</tt><tt class="py-name">role</tt><tt class="py-op">)</tt> </tt>
<a name="L2638"></a><tt class="py-lineno">2638</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2639"></a><tt class="py-lineno">2639</tt>  <tt class="py-line">            <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> </tt>
<a name="L2640"></a><tt class="py-lineno">2640</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2641"></a><tt class="py-lineno">2641</tt>  <tt class="py-line">            <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1581" class="py-name"><a title="web2py.gluon.tools.Auth.id_group" class="py-name" href="#" onclick="return doclink('link-1581', 'id_group', 'link-1579');">id_group</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> <tt class="py-comment"># interpret group_id as a role</tt> </tt>
<a name="L2642"></a><tt class="py-lineno">2642</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1582" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1582', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2643"></a><tt class="py-lineno">2643</tt>  <tt class="py-line">            <tt id="link-1583" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1583', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2644"></a><tt class="py-lineno">2644</tt>  <tt class="py-line">        <tt class="py-name">membership</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1584" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1584', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> </tt>
<a name="L2645"></a><tt class="py-lineno">2645</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt id="link-1585" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1585', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">==</tt> <tt id="link-1586" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1586', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2646"></a><tt class="py-lineno">2646</tt>  <tt class="py-line">                    <tt class="py-op">&amp;</tt> <tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> <tt class="py-op">==</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1587" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1587', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2647"></a><tt class="py-lineno">2647</tt>  <tt class="py-line">            <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L2648"></a><tt class="py-lineno">2648</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2649"></a><tt class="py-lineno">2649</tt>  <tt class="py-line">            <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2650"></a><tt class="py-lineno">2650</tt>  <tt class="py-line">        <tt id="link-1588" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1588', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">has_membership_log</tt> </tt>
<a name="L2651"></a><tt class="py-lineno">2651</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1589" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1589', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2652"></a><tt class="py-lineno">2652</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1590" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1590', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1591" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1591', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-1592" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1592', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt id="link-1593" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1593', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2653"></a><tt class="py-lineno">2653</tt>  <tt class="py-line">                                      <tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt class="py-name">check</tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2654"></a><tt class="py-lineno">2654</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">r</tt> </tt>
</div><a name="L2655"></a><tt class="py-lineno">2655</tt>  <tt class="py-line"> </tt>
<a name="Auth.add_membership"></a><div id="Auth.add_membership-def"><a name="L2656"></a><tt class="py-lineno">2656</tt> <a class="py-toggle" href="#" id="Auth.add_membership-toggle" onclick="return toggle('Auth.add_membership');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#add_membership">add_membership</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">user_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">role</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.add_membership-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.add_membership-expanded"><a name="L2657"></a><tt class="py-lineno">2657</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2658"></a><tt class="py-lineno">2658</tt>  <tt class="py-line"><tt class="py-docstring">        gives user_id membership of group_id or role</tt> </tt>
<a name="L2659"></a><tt class="py-lineno">2659</tt>  <tt class="py-line"><tt class="py-docstring">        if user_id==None than user_id is that of current logged in user</tt> </tt>
<a name="L2660"></a><tt class="py-lineno">2660</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2661"></a><tt class="py-lineno">2661</tt>  <tt class="py-line"> </tt>
<a name="L2662"></a><tt class="py-lineno">2662</tt>  <tt class="py-line">        <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">group_id</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1594" class="py-name"><a title="web2py.gluon.tools.Auth.id_group" class="py-name" href="#" onclick="return doclink('link-1594', 'id_group', 'link-1579');">id_group</a></tt><tt class="py-op">(</tt><tt class="py-name">role</tt><tt class="py-op">)</tt> </tt>
<a name="L2663"></a><tt class="py-lineno">2663</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2664"></a><tt class="py-lineno">2664</tt>  <tt class="py-line">            <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> </tt>
<a name="L2665"></a><tt class="py-lineno">2665</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2666"></a><tt class="py-lineno">2666</tt>  <tt class="py-line">            <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1595" class="py-name"><a title="web2py.gluon.tools.Auth.id_group" class="py-name" href="#" onclick="return doclink('link-1595', 'id_group', 'link-1579');">id_group</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> <tt class="py-comment"># interpret group_id as a role</tt> </tt>
<a name="L2667"></a><tt class="py-lineno">2667</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1596" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1596', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2668"></a><tt class="py-lineno">2668</tt>  <tt class="py-line">            <tt id="link-1597" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1597', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2669"></a><tt class="py-lineno">2669</tt>  <tt class="py-line">        <tt class="py-name">membership</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1598" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1598', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> </tt>
<a name="L2670"></a><tt class="py-lineno">2670</tt>  <tt class="py-line">        <tt class="py-name">record</tt> <tt class="py-op">=</tt> <tt class="py-name">membership</tt><tt class="py-op">(</tt><tt id="link-1599" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1599', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt id="link-1600" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1600', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">,</tt><tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt> </tt>
<a name="L2671"></a><tt class="py-lineno">2671</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L2672"></a><tt class="py-lineno">2672</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2673"></a><tt class="py-lineno">2673</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2674"></a><tt class="py-lineno">2674</tt>  <tt class="py-line">            <tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">membership</tt><tt class="py-op">.</tt><tt id="link-1601" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-1601', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt id="link-1602" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1602', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt id="link-1603" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1603', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2675"></a><tt class="py-lineno">2675</tt>  <tt class="py-line">        <tt id="link-1604" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1604', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">add_membership_log</tt> </tt>
<a name="L2676"></a><tt class="py-lineno">2676</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1605" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1605', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2677"></a><tt class="py-lineno">2677</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1606" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1606', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1607" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1607', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-1608" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1608', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt id="link-1609" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1609', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2678"></a><tt class="py-lineno">2678</tt>  <tt class="py-line">                                      <tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2679"></a><tt class="py-lineno">2679</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">id</tt> </tt>
</div><a name="L2680"></a><tt class="py-lineno">2680</tt>  <tt class="py-line"> </tt>
<a name="Auth.del_membership"></a><div id="Auth.del_membership-def"><a name="L2681"></a><tt class="py-lineno">2681</tt> <a class="py-toggle" href="#" id="Auth.del_membership-toggle" onclick="return toggle('Auth.del_membership');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#del_membership">del_membership</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group_id</tt><tt class="py-op">,</tt> <tt class="py-param">user_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">role</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.del_membership-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.del_membership-expanded"><a name="L2682"></a><tt class="py-lineno">2682</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2683"></a><tt class="py-lineno">2683</tt>  <tt class="py-line"><tt class="py-docstring">        revokes membership from group_id to user_id</tt> </tt>
<a name="L2684"></a><tt class="py-lineno">2684</tt>  <tt class="py-line"><tt class="py-docstring">        if user_id==None than user_id is that of current logged in user</tt> </tt>
<a name="L2685"></a><tt class="py-lineno">2685</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2686"></a><tt class="py-lineno">2686</tt>  <tt class="py-line"> </tt>
<a name="L2687"></a><tt class="py-lineno">2687</tt>  <tt class="py-line">        <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">group_id</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1610" class="py-name"><a title="web2py.gluon.tools.Auth.id_group" class="py-name" href="#" onclick="return doclink('link-1610', 'id_group', 'link-1579');">id_group</a></tt><tt class="py-op">(</tt><tt class="py-name">role</tt><tt class="py-op">)</tt> </tt>
<a name="L2688"></a><tt class="py-lineno">2688</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1611" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1611', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2689"></a><tt class="py-lineno">2689</tt>  <tt class="py-line">            <tt id="link-1612" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1612', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2690"></a><tt class="py-lineno">2690</tt>  <tt class="py-line">        <tt class="py-name">membership</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1613" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1613', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> </tt>
<a name="L2691"></a><tt class="py-lineno">2691</tt>  <tt class="py-line">        <tt id="link-1614" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1614', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">del_membership_log</tt> </tt>
<a name="L2692"></a><tt class="py-lineno">2692</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1615" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1615', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2693"></a><tt class="py-lineno">2693</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1616" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1616', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1617" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1617', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-1618" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1618', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt id="link-1619" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1619', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2694"></a><tt class="py-lineno">2694</tt>  <tt class="py-line">                                      <tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2695"></a><tt class="py-lineno">2695</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt id="link-1620" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1620', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L2696"></a><tt class="py-lineno">2696</tt>  <tt class="py-line">                       <tt class="py-op">==</tt> <tt id="link-1621" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1621', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> </tt>
<a name="L2697"></a><tt class="py-lineno">2697</tt>  <tt class="py-line">                                   <tt class="py-op">==</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1622" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-1622', 'delete', 'link-1562');">delete</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2698"></a><tt class="py-lineno">2698</tt>  <tt class="py-line"> </tt>
<a name="Auth.has_permission"></a><div id="Auth.has_permission-def"><a name="L2699"></a><tt class="py-lineno">2699</tt> <a class="py-toggle" href="#" id="Auth.has_permission-toggle" onclick="return toggle('Auth.has_permission');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#has_permission">has_permission</a><tt class="py-op">(</tt> </tt>
<a name="L2700"></a><tt class="py-lineno">2700</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2701"></a><tt class="py-lineno">2701</tt>  <tt class="py-line">        <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-string">'any'</tt><tt class="py-op">,</tt> </tt>
<a name="L2702"></a><tt class="py-lineno">2702</tt>  <tt class="py-line">        <tt class="py-param">table_name</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L2703"></a><tt class="py-lineno">2703</tt>  <tt class="py-line">        <tt class="py-param">record_id</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L2704"></a><tt class="py-lineno">2704</tt>  <tt class="py-line">        <tt class="py-param">user_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2705"></a><tt class="py-lineno">2705</tt>  <tt class="py-line">        <tt class="py-param">group_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2706"></a><tt class="py-lineno">2706</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.has_permission-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.has_permission-expanded"><a name="L2707"></a><tt class="py-lineno">2707</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2708"></a><tt class="py-lineno">2708</tt>  <tt class="py-line"><tt class="py-docstring">        checks if user_id or current logged in user is member of a group</tt> </tt>
<a name="L2709"></a><tt class="py-lineno">2709</tt>  <tt class="py-line"><tt class="py-docstring">        that has 'name' permission on 'table_name' and 'record_id'</tt> </tt>
<a name="L2710"></a><tt class="py-lineno">2710</tt>  <tt class="py-line"><tt class="py-docstring">        if group_id is passed, it checks whether the group has the permission</tt> </tt>
<a name="L2711"></a><tt class="py-lineno">2711</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2712"></a><tt class="py-lineno">2712</tt>  <tt class="py-line"> </tt>
<a name="L2713"></a><tt class="py-lineno">2713</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1623" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1623', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">group_id</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">:</tt> </tt>
<a name="L2714"></a><tt class="py-lineno">2714</tt>  <tt class="py-line">            <tt id="link-1624" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1624', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2715"></a><tt class="py-lineno">2715</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1625" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1625', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2716"></a><tt class="py-lineno">2716</tt>  <tt class="py-line">            <tt class="py-name">membership</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1626" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1626', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> </tt>
<a name="L2717"></a><tt class="py-lineno">2717</tt>  <tt class="py-line">            <tt id="link-1627" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1627', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt id="link-1628" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1628', 'user_id', 'link-402');">user_id</a></tt> </tt>
<a name="L2718"></a><tt class="py-lineno">2718</tt>  <tt class="py-line">                           <tt class="py-op">==</tt> <tt id="link-1629" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1629', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1630" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1630', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> </tt>
<a name="L2719"></a><tt class="py-lineno">2719</tt>  <tt class="py-line">            <tt id="link-1631" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1631', 'groups', 'link-1422');">groups</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">row</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> <tt class="py-keyword">for</tt> <tt class="py-name">row</tt> <tt class="py-keyword">in</tt> <tt id="link-1632" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1632', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2720"></a><tt class="py-lineno">2720</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">group_id</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">group_id</tt> <tt class="py-keyword">in</tt> <tt id="link-1633" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1633', 'groups', 'link-1422');">groups</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2721"></a><tt class="py-lineno">2721</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L2722"></a><tt class="py-lineno">2722</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2723"></a><tt class="py-lineno">2723</tt>  <tt class="py-line">            <tt id="link-1634" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1634', 'groups', 'link-1422');">groups</a></tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">group_id</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2724"></a><tt class="py-lineno">2724</tt>  <tt class="py-line">        <tt class="py-name">permission</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1635" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1635', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt> </tt>
<a name="L2725"></a><tt class="py-lineno">2725</tt>  <tt class="py-line">        <tt id="link-1636" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1636', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt id="link-1637" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1637', 'name', 'link-590');">name</a></tt> <tt class="py-op">==</tt> <tt id="link-1638" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1638', 'name', 'link-590');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">table_name</tt> </tt>
<a name="L2726"></a><tt class="py-lineno">2726</tt>  <tt class="py-line">                 <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">table_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> </tt>
<a name="L2727"></a><tt class="py-lineno">2727</tt>  <tt class="py-line">                 <tt class="py-op">==</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1639" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1639', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> </tt>
<a name="L2728"></a><tt class="py-lineno">2728</tt>  <tt class="py-line">        <tt class="py-name">groups_required</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">row</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> <tt class="py-keyword">for</tt> <tt class="py-name">row</tt> <tt class="py-keyword">in</tt> <tt id="link-1640" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1640', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2729"></a><tt class="py-lineno">2729</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt><tt class="py-op">:</tt> </tt>
<a name="L2730"></a><tt class="py-lineno">2730</tt>  <tt class="py-line">            <tt id="link-1641" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1641', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt id="link-1642" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1642', 'name', 'link-590');">name</a></tt> </tt>
<a name="L2731"></a><tt class="py-lineno">2731</tt>  <tt class="py-line">                            <tt class="py-op">==</tt> <tt id="link-1643" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1643', 'name', 'link-590');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">table_name</tt> </tt>
<a name="L2732"></a><tt class="py-lineno">2732</tt>  <tt class="py-line">                     <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">table_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> </tt>
<a name="L2733"></a><tt class="py-lineno">2733</tt>  <tt class="py-line">                     <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1644" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1644', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt> </tt>
<a name="L2734"></a><tt class="py-lineno">2734</tt>  <tt class="py-line">            <tt class="py-name">groups_required</tt> <tt class="py-op">=</tt> <tt class="py-name">groups_required</tt><tt class="py-op">.</tt><tt class="py-name">union</tt><tt class="py-op">(</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">row</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> </tt>
<a name="L2735"></a><tt class="py-lineno">2735</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">row</tt> <tt class="py-keyword">in</tt> <tt id="link-1645" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1645', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2736"></a><tt class="py-lineno">2736</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1646" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-1646', 'groups', 'link-1422');">groups</a></tt><tt class="py-op">.</tt><tt class="py-name">intersection</tt><tt class="py-op">(</tt><tt class="py-name">groups_required</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2737"></a><tt class="py-lineno">2737</tt>  <tt class="py-line">            <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L2738"></a><tt class="py-lineno">2738</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2739"></a><tt class="py-lineno">2739</tt>  <tt class="py-line">            <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2740"></a><tt class="py-lineno">2740</tt>  <tt class="py-line">        <tt id="link-1647" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1647', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">has_permission_log</tt> </tt>
<a name="L2741"></a><tt class="py-lineno">2741</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1648" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1648', 'log', 'link-746');">log</a></tt> <tt class="py-keyword">and</tt> <tt id="link-1649" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1649', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2742"></a><tt class="py-lineno">2742</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1650" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1650', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1651" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1651', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-1652" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1652', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">=</tt><tt id="link-1653" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1653', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">,</tt> <tt id="link-1654" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1654', 'name', 'link-590');">name</a></tt><tt class="py-op">=</tt><tt id="link-1655" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1655', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2743"></a><tt class="py-lineno">2743</tt>  <tt class="py-line">                           <tt class="py-name">table_name</tt><tt class="py-op">=</tt><tt class="py-name">table_name</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">=</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2744"></a><tt class="py-lineno">2744</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">r</tt> </tt>
</div><a name="L2745"></a><tt class="py-lineno">2745</tt>  <tt class="py-line"> </tt>
<a name="Auth.add_permission"></a><div id="Auth.add_permission-def"><a name="L2746"></a><tt class="py-lineno">2746</tt> <a class="py-toggle" href="#" id="Auth.add_permission-toggle" onclick="return toggle('Auth.add_permission');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#add_permission">add_permission</a><tt class="py-op">(</tt> </tt>
<a name="L2747"></a><tt class="py-lineno">2747</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2748"></a><tt class="py-lineno">2748</tt>  <tt class="py-line">        <tt class="py-param">group_id</tt><tt class="py-op">,</tt> </tt>
<a name="L2749"></a><tt class="py-lineno">2749</tt>  <tt class="py-line">        <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-string">'any'</tt><tt class="py-op">,</tt> </tt>
<a name="L2750"></a><tt class="py-lineno">2750</tt>  <tt class="py-line">        <tt class="py-param">table_name</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L2751"></a><tt class="py-lineno">2751</tt>  <tt class="py-line">        <tt class="py-param">record_id</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L2752"></a><tt class="py-lineno">2752</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.add_permission-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.add_permission-expanded"><a name="L2753"></a><tt class="py-lineno">2753</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2754"></a><tt class="py-lineno">2754</tt>  <tt class="py-line"><tt class="py-docstring">        gives group_id 'name' access to 'table_name' and 'record_id'</tt> </tt>
<a name="L2755"></a><tt class="py-lineno">2755</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2756"></a><tt class="py-lineno">2756</tt>  <tt class="py-line"> </tt>
<a name="L2757"></a><tt class="py-lineno">2757</tt>  <tt class="py-line">        <tt class="py-name">permission</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1656" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1656', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt> </tt>
<a name="L2758"></a><tt class="py-lineno">2758</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">group_id</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2759"></a><tt class="py-lineno">2759</tt>  <tt class="py-line">            <tt class="py-name">group_id</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1657" class="py-name" targets="Method web2py.gluon.tools.Auth.user_group()=web2py.gluon.tools.Auth-class.html#user_group"><a title="web2py.gluon.tools.Auth.user_group" class="py-name" href="#" onclick="return doclink('link-1657', 'user_group', 'link-1657');">user_group</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2760"></a><tt class="py-lineno">2760</tt>  <tt class="py-line">        <tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">permission</tt><tt class="py-op">.</tt><tt id="link-1658" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-1658', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt id="link-1659" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1659', 'name', 'link-590');">name</a></tt><tt class="py-op">=</tt><tt id="link-1660" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1660', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2761"></a><tt class="py-lineno">2761</tt>  <tt class="py-line">                               <tt class="py-name">table_name</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">table_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2762"></a><tt class="py-lineno">2762</tt>  <tt class="py-line">                               <tt class="py-name">record_id</tt><tt class="py-op">=</tt><tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2763"></a><tt class="py-lineno">2763</tt>  <tt class="py-line">        <tt id="link-1661" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1661', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">add_permission_log</tt> </tt>
<a name="L2764"></a><tt class="py-lineno">2764</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1662" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1662', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2765"></a><tt class="py-lineno">2765</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1663" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1663', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1664" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1664', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">permission_id</tt><tt class="py-op">=</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> </tt>
<a name="L2766"></a><tt class="py-lineno">2766</tt>  <tt class="py-line">                           <tt id="link-1665" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1665', 'name', 'link-590');">name</a></tt><tt class="py-op">=</tt><tt id="link-1666" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1666', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">table_name</tt><tt class="py-op">=</tt><tt class="py-name">table_name</tt><tt class="py-op">,</tt> </tt>
<a name="L2767"></a><tt class="py-lineno">2767</tt>  <tt class="py-line">                           <tt class="py-name">record_id</tt><tt class="py-op">=</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2768"></a><tt class="py-lineno">2768</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">id</tt> </tt>
</div><a name="L2769"></a><tt class="py-lineno">2769</tt>  <tt class="py-line"> </tt>
<a name="Auth.del_permission"></a><div id="Auth.del_permission-def"><a name="L2770"></a><tt class="py-lineno">2770</tt> <a class="py-toggle" href="#" id="Auth.del_permission-toggle" onclick="return toggle('Auth.del_permission');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#del_permission">del_permission</a><tt class="py-op">(</tt> </tt>
<a name="L2771"></a><tt class="py-lineno">2771</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2772"></a><tt class="py-lineno">2772</tt>  <tt class="py-line">        <tt class="py-param">group_id</tt><tt class="py-op">,</tt> </tt>
<a name="L2773"></a><tt class="py-lineno">2773</tt>  <tt class="py-line">        <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-string">'any'</tt><tt class="py-op">,</tt> </tt>
<a name="L2774"></a><tt class="py-lineno">2774</tt>  <tt class="py-line">        <tt class="py-param">table_name</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L2775"></a><tt class="py-lineno">2775</tt>  <tt class="py-line">        <tt class="py-param">record_id</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L2776"></a><tt class="py-lineno">2776</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.del_permission-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.del_permission-expanded"><a name="L2777"></a><tt class="py-lineno">2777</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2778"></a><tt class="py-lineno">2778</tt>  <tt class="py-line"><tt class="py-docstring">        revokes group_id 'name' access to 'table_name' and 'record_id'</tt> </tt>
<a name="L2779"></a><tt class="py-lineno">2779</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2780"></a><tt class="py-lineno">2780</tt>  <tt class="py-line"> </tt>
<a name="L2781"></a><tt class="py-lineno">2781</tt>  <tt class="py-line">        <tt class="py-name">permission</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1667" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1667', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt> </tt>
<a name="L2782"></a><tt class="py-lineno">2782</tt>  <tt class="py-line">        <tt id="link-1668" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1668', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">del_permission_log</tt> </tt>
<a name="L2783"></a><tt class="py-lineno">2783</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1669" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1669', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2784"></a><tt class="py-lineno">2784</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1670" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1670', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1671" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1671', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">group_id</tt><tt class="py-op">=</tt><tt class="py-name">group_id</tt><tt class="py-op">,</tt> <tt id="link-1672" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1672', 'name', 'link-590');">name</a></tt><tt class="py-op">=</tt><tt id="link-1673" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1673', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2785"></a><tt class="py-lineno">2785</tt>  <tt class="py-line">                           <tt class="py-name">table_name</tt><tt class="py-op">=</tt><tt class="py-name">table_name</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">=</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2786"></a><tt class="py-lineno">2786</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> <tt class="py-op">==</tt> <tt class="py-name">group_id</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt id="link-1674" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1674', 'name', 'link-590');">name</a></tt> </tt>
<a name="L2787"></a><tt class="py-lineno">2787</tt>  <tt class="py-line">                 <tt class="py-op">==</tt> <tt id="link-1675" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1675', 'name', 'link-590');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">table_name</tt> </tt>
<a name="L2788"></a><tt class="py-lineno">2788</tt>  <tt class="py-line">                           <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">table_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> </tt>
<a name="L2789"></a><tt class="py-lineno">2789</tt>  <tt class="py-line">                 <tt class="py-op">==</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1676" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-1676', 'delete', 'link-1562');">delete</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2790"></a><tt class="py-lineno">2790</tt>  <tt class="py-line"> </tt>
<a name="Auth.accessible_query"></a><div id="Auth.accessible_query-def"><a name="L2791"></a><tt class="py-lineno">2791</tt> <a class="py-toggle" href="#" id="Auth.accessible_query-toggle" onclick="return toggle('Auth.accessible_query');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Auth-class.html#accessible_query">accessible_query</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">table</tt><tt class="py-op">,</tt> <tt class="py-param">user_id</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Auth.accessible_query-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Auth.accessible_query-expanded"><a name="L2792"></a><tt class="py-lineno">2792</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2793"></a><tt class="py-lineno">2793</tt>  <tt class="py-line"><tt class="py-docstring">        returns a query with all accessible records for user_id or</tt> </tt>
<a name="L2794"></a><tt class="py-lineno">2794</tt>  <tt class="py-line"><tt class="py-docstring">        the current logged in user</tt> </tt>
<a name="L2795"></a><tt class="py-lineno">2795</tt>  <tt class="py-line"><tt class="py-docstring">        this method does not work on GAE because uses JOIN and IN</tt> </tt>
<a name="L2796"></a><tt class="py-lineno">2796</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2797"></a><tt class="py-lineno">2797</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L2798"></a><tt class="py-lineno">2798</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2799"></a><tt class="py-lineno">2799</tt>  <tt class="py-line"><tt class="py-docstring">           db(auth.accessible_query('read', db.mytable)).select(db.mytable.ALL)</tt> </tt>
<a name="L2800"></a><tt class="py-lineno">2800</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2801"></a><tt class="py-lineno">2801</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2802"></a><tt class="py-lineno">2802</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1677" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1677', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2803"></a><tt class="py-lineno">2803</tt>  <tt class="py-line">            <tt id="link-1678" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1678', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2804"></a><tt class="py-lineno">2804</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1679" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1679', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt id="link-1680" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1680', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-1681" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1681', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2805"></a><tt class="py-lineno">2805</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt> </tt>
<a name="L2806"></a><tt class="py-lineno">2806</tt>  <tt class="py-line">        <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> </tt>
<a name="L2807"></a><tt class="py-lineno">2807</tt>  <tt class="py-line">        <tt class="py-name">membership</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1682" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1682', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_membership</tt> </tt>
<a name="L2808"></a><tt class="py-lineno">2808</tt>  <tt class="py-line">        <tt class="py-name">permission</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1683" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1683', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">table_permission</tt> </tt>
<a name="L2809"></a><tt class="py-lineno">2809</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">.</tt><tt id="link-1684" class="py-name" targets="Method web2py.gluon.dal.Expression.belongs()=web2py.gluon.dal.Expression-class.html#belongs"><a title="web2py.gluon.dal.Expression.belongs" class="py-name" href="#" onclick="return doclink('link-1684', 'belongs', 'link-1684');">belongs</a></tt><tt class="py-op">(</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt id="link-1685" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1685', 'user_id', 'link-402');">user_id</a></tt> <tt class="py-op">==</tt> <tt id="link-1686" class="py-name"><a title="web2py.gluon.tools.Auth.user_id" class="py-name" href="#" onclick="return doclink('link-1686', 'user_id', 'link-402');">user_id</a></tt><tt class="py-op">)</tt>\ </tt>
<a name="L2810"></a><tt class="py-lineno">2810</tt>  <tt class="py-line">                           <tt class="py-op">(</tt><tt class="py-name">membership</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt> <tt class="py-op">==</tt> <tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">group_id</tt><tt class="py-op">)</tt>\ </tt>
<a name="L2811"></a><tt class="py-lineno">2811</tt>  <tt class="py-line">                           <tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt id="link-1687" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1687', 'name', 'link-590');">name</a></tt> <tt class="py-op">==</tt> <tt id="link-1688" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1688', 'name', 'link-590');">name</a></tt><tt class="py-op">)</tt>\ </tt>
<a name="L2812"></a><tt class="py-lineno">2812</tt>  <tt class="py-line">                           <tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">table_name</tt> <tt class="py-op">==</tt> <tt class="py-name">table</tt><tt class="py-op">)</tt>\ </tt>
<a name="L2813"></a><tt class="py-lineno">2813</tt>  <tt class="py-line">                           <tt class="py-op">.</tt><tt id="link-1689" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter._select()=web2py.gluon.dal.BaseAdapter-class.html#_select,Method web2py.gluon.dal.CouchDBAdapter._select()=web2py.gluon.dal.CouchDBAdapter-class.html#_select,Method web2py.gluon.dal.NoSQLAdapter._select()=web2py.gluon.dal.NoSQLAdapter-class.html#_select,Method web2py.gluon.dal.Set._select()=web2py.gluon.dal.Set-class.html#_select"><a title="web2py.gluon.dal.BaseAdapter._select
web2py.gluon.dal.CouchDBAdapter._select
web2py.gluon.dal.NoSQLAdapter._select
web2py.gluon.dal.Set._select" class="py-name" href="#" onclick="return doclink('link-1689', '_select', 'link-1689');">_select</a></tt><tt class="py-op">(</tt><tt class="py-name">permission</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2814"></a><tt class="py-lineno">2814</tt>  <tt class="py-line"> </tt>
<a name="L2815"></a><tt class="py-lineno">2815</tt>  <tt class="py-line"> </tt>
<a name="Crud"></a><div id="Crud-def"><a name="L2816"></a><tt class="py-lineno">2816</tt> <a class="py-toggle" href="#" id="Crud-toggle" onclick="return toggle('Crud');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html">Crud</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Crud-expanded"><a name="L2817"></a><tt class="py-lineno">2817</tt>  <tt class="py-line"> </tt>
<a name="Crud.url"></a><div id="Crud.url-def"><a name="L2818"></a><tt class="py-lineno">2818</tt> <a class="py-toggle" href="#" id="Crud.url-toggle" onclick="return toggle('Crud.url');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#url">url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.url-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.url-expanded"><a name="L2819"></a><tt class="py-lineno">2819</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2820"></a><tt class="py-lineno">2820</tt>  <tt class="py-line"><tt class="py-docstring">        this should point to the controller that exposes</tt> </tt>
<a name="L2821"></a><tt class="py-lineno">2821</tt>  <tt class="py-line"><tt class="py-docstring">        download and crud</tt> </tt>
<a name="L2822"></a><tt class="py-lineno">2822</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2823"></a><tt class="py-lineno">2823</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-1690" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1690', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1691" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1691', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">controller</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">,</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-name">args</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2824"></a><tt class="py-lineno">2824</tt>  <tt class="py-line"> </tt>
<a name="Crud.__init__"></a><div id="Crud.__init__-def"><a name="L2825"></a><tt class="py-lineno">2825</tt> <a class="py-toggle" href="#" id="Crud.__init__-toggle" onclick="return toggle('Crud.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">environment</tt><tt class="py-op">,</tt> <tt class="py-param">db</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">controller</tt><tt class="py-op">=</tt><tt class="py-string">'default'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.__init__-expanded"><a name="L2826"></a><tt class="py-lineno">2826</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt> </tt>
<a name="L2827"></a><tt class="py-lineno">2827</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">db</tt> <tt class="py-keyword">and</tt> <tt class="py-name">environment</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">environment</tt><tt class="py-op">,</tt><tt id="link-1692" class="py-name"><a title="web2py.gluon.dal.DAL" class="py-name" href="#" onclick="return doclink('link-1692', 'DAL', 'link-290');">DAL</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2828"></a><tt class="py-lineno">2828</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">environment</tt> </tt>
<a name="L2829"></a><tt class="py-lineno">2829</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">db</tt><tt class="py-op">:</tt> </tt>
<a name="L2830"></a><tt class="py-lineno">2830</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"must pass db as first or second argument"</tt> </tt>
<a name="L2831"></a><tt class="py-lineno">2831</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt id="link-1693" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1693', 'current', 'link-291');">current</a></tt> </tt>
<a name="L2832"></a><tt class="py-lineno">2832</tt>  <tt class="py-line">        <tt id="link-1694" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1694', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1695" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1695', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt id="link-1696" class="py-name"><a title="web2py.gluon.storage.Settings" class="py-name" href="#" onclick="return doclink('link-1696', 'Settings', 'link-8');">Settings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2833"></a><tt class="py-lineno">2833</tt>  <tt class="py-line">        <tt id="link-1697" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1697', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2834"></a><tt class="py-lineno">2834</tt>  <tt class="py-line">        <tt id="link-1698" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1698', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-1699" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-1699', 'logger', 'link-16');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2835"></a><tt class="py-lineno">2835</tt>  <tt class="py-line"> </tt>
<a name="L2836"></a><tt class="py-lineno">2836</tt>  <tt class="py-line">        <tt id="link-1700" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1700', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_next</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2837"></a><tt class="py-lineno">2837</tt>  <tt class="py-line">        <tt id="link-1701" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1701', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_next</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2838"></a><tt class="py-lineno">2838</tt>  <tt class="py-line">        <tt id="link-1702" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1702', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">controller</tt> <tt class="py-op">=</tt> <tt class="py-name">controller</tt> </tt>
<a name="L2839"></a><tt class="py-lineno">2839</tt>  <tt class="py-line">        <tt id="link-1703" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1703', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">delete_next</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1704" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1704', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2840"></a><tt class="py-lineno">2840</tt>  <tt class="py-line">        <tt id="link-1705" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1705', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">download_url</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1706" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1706', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'download'</tt><tt class="py-op">)</tt> </tt>
<a name="L2841"></a><tt class="py-lineno">2841</tt>  <tt class="py-line">        <tt id="link-1707" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1707', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_onvalidation</tt> <tt class="py-op">=</tt> <tt id="link-1708" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1708', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2842"></a><tt class="py-lineno">2842</tt>  <tt class="py-line">        <tt id="link-1709" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1709', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_onvalidation</tt> <tt class="py-op">=</tt> <tt id="link-1710" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1710', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2843"></a><tt class="py-lineno">2843</tt>  <tt class="py-line">        <tt id="link-1711" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1711', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">delete_onvalidation</tt> <tt class="py-op">=</tt> <tt id="link-1712" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1712', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2844"></a><tt class="py-lineno">2844</tt>  <tt class="py-line">        <tt id="link-1713" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1713', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_onaccept</tt> <tt class="py-op">=</tt> <tt id="link-1714" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1714', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2845"></a><tt class="py-lineno">2845</tt>  <tt class="py-line">        <tt id="link-1715" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1715', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_onaccept</tt> <tt class="py-op">=</tt> <tt id="link-1716" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1716', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2846"></a><tt class="py-lineno">2846</tt>  <tt class="py-line">        <tt id="link-1717" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1717', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_ondelete</tt> <tt class="py-op">=</tt> <tt id="link-1718" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1718', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2847"></a><tt class="py-lineno">2847</tt>  <tt class="py-line">        <tt id="link-1719" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1719', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">delete_onaccept</tt> <tt class="py-op">=</tt> <tt id="link-1720" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1720', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2848"></a><tt class="py-lineno">2848</tt>  <tt class="py-line">        <tt id="link-1721" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1721', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_deletable</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L2849"></a><tt class="py-lineno">2849</tt>  <tt class="py-line">        <tt id="link-1722" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1722', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2850"></a><tt class="py-lineno">2850</tt>  <tt class="py-line">        <tt id="link-1723" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1723', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">keepvalues</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2851"></a><tt class="py-lineno">2851</tt>  <tt class="py-line">        <tt id="link-1724" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1724', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2852"></a><tt class="py-lineno">2852</tt>  <tt class="py-line">        <tt id="link-1725" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1725', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2853"></a><tt class="py-lineno">2853</tt>  <tt class="py-line">        <tt id="link-1726" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1726', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2854"></a><tt class="py-lineno">2854</tt>  <tt class="py-line">        <tt id="link-1727" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1727', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt> <tt class="py-op">=</tt> <tt class="py-string">'table3cols'</tt> </tt>
<a name="L2855"></a><tt class="py-lineno">2855</tt>  <tt class="py-line">        <tt id="link-1728" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1728', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> <tt class="py-op">=</tt> <tt class="py-string">': '</tt> </tt>
<a name="L2856"></a><tt class="py-lineno">2856</tt>  <tt class="py-line">        <tt id="link-1729" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1729', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2857"></a><tt class="py-lineno">2857</tt>  <tt class="py-line">        <tt id="link-1730" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1730', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">detect_record_change</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L2858"></a><tt class="py-lineno">2858</tt>  <tt class="py-line">        <tt id="link-1731" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1731', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hmac_key</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2859"></a><tt class="py-lineno">2859</tt>  <tt class="py-line">        <tt id="link-1732" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1732', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">lock_keys</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L2860"></a><tt class="py-lineno">2860</tt>  <tt class="py-line"> </tt>
<a name="L2861"></a><tt class="py-lineno">2861</tt>  <tt class="py-line">        <tt class="py-name">messages</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt> <tt class="py-op">=</tt> <tt id="link-1733" class="py-name"><a title="web2py.gluon.storage.Messages" class="py-name" href="#" onclick="return doclink('link-1733', 'Messages', 'link-9');">Messages</a></tt><tt class="py-op">(</tt><tt id="link-1734" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1734', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt id="link-1735" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-1735', 'T', 'link-393');">T</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2862"></a><tt class="py-lineno">2862</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">submit_button</tt> <tt class="py-op">=</tt> <tt class="py-string">'Submit'</tt> </tt>
<a name="L2863"></a><tt class="py-lineno">2863</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt> <tt class="py-op">=</tt> <tt class="py-string">'Check to delete:'</tt> </tt>
<a name="L2864"></a><tt class="py-lineno">2864</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_created</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record Created'</tt> </tt>
<a name="L2865"></a><tt class="py-lineno">2865</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_updated</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record Updated'</tt> </tt>
<a name="L2866"></a><tt class="py-lineno">2866</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_deleted</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record Deleted'</tt> </tt>
<a name="L2867"></a><tt class="py-lineno">2867</tt>  <tt class="py-line"> </tt>
<a name="L2868"></a><tt class="py-lineno">2868</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">update_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record %(id)s updated'</tt> </tt>
<a name="L2869"></a><tt class="py-lineno">2869</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">create_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record %(id)s created'</tt> </tt>
<a name="L2870"></a><tt class="py-lineno">2870</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">read_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record %(id)s read'</tt> </tt>
<a name="L2871"></a><tt class="py-lineno">2871</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_log</tt> <tt class="py-op">=</tt> <tt class="py-string">'Record %(id)s deleted'</tt> </tt>
<a name="L2872"></a><tt class="py-lineno">2872</tt>  <tt class="py-line"> </tt>
<a name="L2873"></a><tt class="py-lineno">2873</tt>  <tt class="py-line">        <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">lock_keys</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L2874"></a><tt class="py-lineno">2874</tt>  <tt class="py-line"> </tt>
<a name="Crud.__call__"></a><div id="Crud.__call__-def"><a name="L2875"></a><tt class="py-lineno">2875</tt> <a class="py-toggle" href="#" id="Crud.__call__-toggle" onclick="return toggle('Crud.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.__call__-expanded"><a name="L2876"></a><tt class="py-lineno">2876</tt>  <tt class="py-line">        <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt id="link-1736" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1736', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L2877"></a><tt class="py-lineno">2877</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1737" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-1737', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L2878"></a><tt class="py-lineno">2878</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1738" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1738', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L2879"></a><tt class="py-lineno">2879</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'tables'</tt><tt class="py-op">:</tt> </tt>
<a name="L2880"></a><tt class="py-lineno">2880</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1739" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1739', 'tables', 'link-487');">tables</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2881"></a><tt class="py-lineno">2881</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-1740" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-1740', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1741" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1741', 'tables', 'link-487');">tables</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2882"></a><tt class="py-lineno">2882</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1742" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1742', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L2883"></a><tt class="py-lineno">2883</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L2884"></a><tt class="py-lineno">2884</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'create'</tt><tt class="py-op">:</tt> </tt>
<a name="L2885"></a><tt class="py-lineno">2885</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1743" class="py-name" targets="Method web2py.gluon.tools.Crud.create()=web2py.gluon.tools.Crud-class.html#create"><a title="web2py.gluon.tools.Crud.create" class="py-name" href="#" onclick="return doclink('link-1743', 'create', 'link-1743');">create</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">)</tt> </tt>
<a name="L2886"></a><tt class="py-lineno">2886</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'select'</tt><tt class="py-op">:</tt> </tt>
<a name="L2887"></a><tt class="py-lineno">2887</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1744" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1744', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt><tt class="py-name">linkto</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1745" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1745', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'read'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2888"></a><tt class="py-lineno">2888</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'search'</tt><tt class="py-op">:</tt> </tt>
<a name="L2889"></a><tt class="py-lineno">2889</tt>  <tt class="py-line">            <tt class="py-name">form</tt><tt class="py-op">,</tt> <tt id="link-1746" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1746', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1747" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-1747', 'search', 'link-1747');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt><tt class="py-name">linkto</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1748" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1748', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-string">'read'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2890"></a><tt class="py-lineno">2890</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-1749" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-1749', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt><tt id="link-1750" class="py-name" targets="Class web2py.gluon.sqlhtml.SQLTABLE=web2py.gluon.sqlhtml.SQLTABLE-class.html"><a title="web2py.gluon.sqlhtml.SQLTABLE" class="py-name" href="#" onclick="return doclink('link-1750', 'SQLTABLE', 'link-1750');">SQLTABLE</a></tt><tt class="py-op">(</tt><tt id="link-1751" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1751', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2891"></a><tt class="py-lineno">2891</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'read'</tt><tt class="py-op">:</tt> </tt>
<a name="L2892"></a><tt class="py-lineno">2892</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1752" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-1752', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2893"></a><tt class="py-lineno">2893</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'update'</tt><tt class="py-op">:</tt> </tt>
<a name="L2894"></a><tt class="py-lineno">2894</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1753" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1753', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2895"></a><tt class="py-lineno">2895</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'delete'</tt><tt class="py-op">:</tt> </tt>
<a name="L2896"></a><tt class="py-lineno">2896</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1754" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.delete
web2py.gluon.dal.CouchDBAdapter.delete
web2py.gluon.dal.GoogleDatastoreAdapter.delete
web2py.gluon.dal.MongoDBAdapter.delete
web2py.gluon.dal.Set.delete
web2py.gluon.tools.Crud.delete" class="py-name" href="#" onclick="return doclink('link-1754', 'delete', 'link-1562');">delete</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2897"></a><tt class="py-lineno">2897</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2898"></a><tt class="py-lineno">2898</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1755" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1755', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2899"></a><tt class="py-lineno">2899</tt>  <tt class="py-line"> </tt>
<a name="Crud.log_event"></a><div id="Crud.log_event-def"><a name="L2900"></a><tt class="py-lineno">2900</tt> <a class="py-toggle" href="#" id="Crud.log_event-toggle" onclick="return toggle('Crud.log_event');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#log_event">log_event</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.log_event-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.log_event-expanded"><a name="L2901"></a><tt class="py-lineno">2901</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1756" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1756', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-1757" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-1757', 'logger', 'link-16');">logger</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2902"></a><tt class="py-lineno">2902</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1758" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1758', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-1759" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-1759', 'logger', 'link-16');">logger</a></tt><tt class="py-op">.</tt><tt id="link-1760" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1760', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1761" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1761', 'message', 'link-69');">message</a></tt><tt class="py-op">,</tt> <tt class="py-string">'crud'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2903"></a><tt class="py-lineno">2903</tt>  <tt class="py-line"> </tt>
<a name="Crud.has_permission"></a><div id="Crud.has_permission-def"><a name="L2904"></a><tt class="py-lineno">2904</tt> <a class="py-toggle" href="#" id="Crud.has_permission-toggle" onclick="return toggle('Crud.has_permission');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#has_permission">has_permission</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">table</tt><tt class="py-op">,</tt> <tt class="py-param">record</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.has_permission-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.has_permission-expanded"><a name="L2905"></a><tt class="py-lineno">2905</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1762" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1762', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">:</tt> </tt>
<a name="L2906"></a><tt class="py-lineno">2906</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L2907"></a><tt class="py-lineno">2907</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2908"></a><tt class="py-lineno">2908</tt>  <tt class="py-line">            <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L2909"></a><tt class="py-lineno">2909</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2910"></a><tt class="py-lineno">2910</tt>  <tt class="py-line">            <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt> </tt>
<a name="L2911"></a><tt class="py-lineno">2911</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1763" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1763', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-1764" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1764', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt id="link-1765" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1765', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2912"></a><tt class="py-lineno">2912</tt>  <tt class="py-line"> </tt>
<a name="Crud.tables"></a><div id="Crud.tables-def"><a name="L2913"></a><tt class="py-lineno">2913</tt> <a class="py-toggle" href="#" id="Crud.tables-toggle" onclick="return toggle('Crud.tables');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#tables">tables</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.tables-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.tables-expanded"><a name="L2914"></a><tt class="py-lineno">2914</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-1766" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-1766', 'TABLE', 'link-1421');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-op">[</tt><tt id="link-1767" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-1767', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-1768" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-1768', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt id="link-1769" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1769', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2915"></a><tt class="py-lineno">2915</tt>  <tt class="py-line">                            <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1770" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1770', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'select'</tt><tt class="py-op">,</tt><tt id="link-1771" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1771', 'name', 'link-590');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L2916"></a><tt class="py-lineno">2916</tt>  <tt class="py-line">                           <tt class="py-keyword">for</tt> <tt id="link-1772" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1772', 'name', 'link-590');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1773" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1773', 'tables', 'link-487');">tables</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2917"></a><tt class="py-lineno">2917</tt>  <tt class="py-line"> </tt>
<a name="L2918"></a><tt class="py-lineno">2918</tt>  <tt class="py-line"> </tt>
<a name="L2919"></a><tt class="py-lineno">2919</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="Crud.archive"></a><div id="Crud.archive-def"><a name="L2920"></a><tt class="py-lineno">2920</tt> <a class="py-toggle" href="#" id="Crud.archive-toggle" onclick="return toggle('Crud.archive');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#archive">archive</a><tt class="py-op">(</tt><tt class="py-param">form</tt><tt class="py-op">,</tt><tt class="py-param">archive_table</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">current_record</tt><tt class="py-op">=</tt><tt class="py-string">'current_record'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.archive-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.archive-expanded"><a name="L2921"></a><tt class="py-lineno">2921</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2922"></a><tt class="py-lineno">2922</tt>  <tt class="py-line"><tt class="py-docstring">        If you have a table (db.mytable) that needs full revision history you can just do::</tt> </tt>
<a name="L2923"></a><tt class="py-lineno">2923</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2924"></a><tt class="py-lineno">2924</tt>  <tt class="py-line"><tt class="py-docstring">            form=crud.update(db.mytable,myrecord,onaccept=crud.archive)</tt> </tt>
<a name="L2925"></a><tt class="py-lineno">2925</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2926"></a><tt class="py-lineno">2926</tt>  <tt class="py-line"><tt class="py-docstring">        crud.archive will define a new table "mytable_archive" and store the</tt> </tt>
<a name="L2927"></a><tt class="py-lineno">2927</tt>  <tt class="py-line"><tt class="py-docstring">        previous record in the newly created table including a reference</tt> </tt>
<a name="L2928"></a><tt class="py-lineno">2928</tt>  <tt class="py-line"><tt class="py-docstring">        to the current record.</tt> </tt>
<a name="L2929"></a><tt class="py-lineno">2929</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2930"></a><tt class="py-lineno">2930</tt>  <tt class="py-line"><tt class="py-docstring">        If you want to access such table you need to define it yourself in a model::</tt> </tt>
<a name="L2931"></a><tt class="py-lineno">2931</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2932"></a><tt class="py-lineno">2932</tt>  <tt class="py-line"><tt class="py-docstring">            db.define_table('mytable_archive',</tt> </tt>
<a name="L2933"></a><tt class="py-lineno">2933</tt>  <tt class="py-line"><tt class="py-docstring">                Field('current_record',db.mytable),</tt> </tt>
<a name="L2934"></a><tt class="py-lineno">2934</tt>  <tt class="py-line"><tt class="py-docstring">                db.mytable)</tt> </tt>
<a name="L2935"></a><tt class="py-lineno">2935</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2936"></a><tt class="py-lineno">2936</tt>  <tt class="py-line"><tt class="py-docstring">        Notice such table includes all fields of db.mytable plus one: current_record.</tt> </tt>
<a name="L2937"></a><tt class="py-lineno">2937</tt>  <tt class="py-line"><tt class="py-docstring">        crud.archive does not timestamp the stored record unless your original table</tt> </tt>
<a name="L2938"></a><tt class="py-lineno">2938</tt>  <tt class="py-line"><tt class="py-docstring">        has a fields like::</tt> </tt>
<a name="L2939"></a><tt class="py-lineno">2939</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2940"></a><tt class="py-lineno">2940</tt>  <tt class="py-line"><tt class="py-docstring">            db.define_table(...,</tt> </tt>
<a name="L2941"></a><tt class="py-lineno">2941</tt>  <tt class="py-line"><tt class="py-docstring">                Field('saved_on','datetime',</tt> </tt>
<a name="L2942"></a><tt class="py-lineno">2942</tt>  <tt class="py-line"><tt class="py-docstring">                     default=request.now,update=request.now,writable=False),</tt> </tt>
<a name="L2943"></a><tt class="py-lineno">2943</tt>  <tt class="py-line"><tt class="py-docstring">                Field('saved_by',auth.user,</tt> </tt>
<a name="L2944"></a><tt class="py-lineno">2944</tt>  <tt class="py-line"><tt class="py-docstring">                     default=auth.user_id,update=auth.user_id,writable=False),</tt> </tt>
<a name="L2945"></a><tt class="py-lineno">2945</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2946"></a><tt class="py-lineno">2946</tt>  <tt class="py-line"><tt class="py-docstring">        there is nothing special about these fields since they are filled before</tt> </tt>
<a name="L2947"></a><tt class="py-lineno">2947</tt>  <tt class="py-line"><tt class="py-docstring">        the record is archived.</tt> </tt>
<a name="L2948"></a><tt class="py-lineno">2948</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2949"></a><tt class="py-lineno">2949</tt>  <tt class="py-line"><tt class="py-docstring">        If you want to change the archive table name and the name of the reference field</tt> </tt>
<a name="L2950"></a><tt class="py-lineno">2950</tt>  <tt class="py-line"><tt class="py-docstring">        you can do, for example::</tt> </tt>
<a name="L2951"></a><tt class="py-lineno">2951</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2952"></a><tt class="py-lineno">2952</tt>  <tt class="py-line"><tt class="py-docstring">            db.define_table('myhistory',</tt> </tt>
<a name="L2953"></a><tt class="py-lineno">2953</tt>  <tt class="py-line"><tt class="py-docstring">                Field('parent_record',db.mytable),</tt> </tt>
<a name="L2954"></a><tt class="py-lineno">2954</tt>  <tt class="py-line"><tt class="py-docstring">                db.mytable)</tt> </tt>
<a name="L2955"></a><tt class="py-lineno">2955</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2956"></a><tt class="py-lineno">2956</tt>  <tt class="py-line"><tt class="py-docstring">        and use it as::</tt> </tt>
<a name="L2957"></a><tt class="py-lineno">2957</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2958"></a><tt class="py-lineno">2958</tt>  <tt class="py-line"><tt class="py-docstring">            form=crud.update(db.mytable,myrecord,</tt> </tt>
<a name="L2959"></a><tt class="py-lineno">2959</tt>  <tt class="py-line"><tt class="py-docstring">                             onaccept=lambda form:crud.archive(form,</tt> </tt>
<a name="L2960"></a><tt class="py-lineno">2960</tt>  <tt class="py-line"><tt class="py-docstring">                             archive_table=db.myhistory,</tt> </tt>
<a name="L2961"></a><tt class="py-lineno">2961</tt>  <tt class="py-line"><tt class="py-docstring">                             current_record='parent_record'))</tt> </tt>
<a name="L2962"></a><tt class="py-lineno">2962</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2963"></a><tt class="py-lineno">2963</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2964"></a><tt class="py-lineno">2964</tt>  <tt class="py-line">        <tt class="py-name">old_record</tt> <tt class="py-op">=</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">record</tt> </tt>
<a name="L2965"></a><tt class="py-lineno">2965</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">old_record</tt><tt class="py-op">:</tt> </tt>
<a name="L2966"></a><tt class="py-lineno">2966</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L2967"></a><tt class="py-lineno">2967</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">table</tt> </tt>
<a name="L2968"></a><tt class="py-lineno">2968</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">archive_table</tt><tt class="py-op">:</tt> </tt>
<a name="L2969"></a><tt class="py-lineno">2969</tt>  <tt class="py-line">            <tt class="py-name">archive_table_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s_archive'</tt> <tt class="py-op">%</tt> <tt class="py-name">table</tt> </tt>
<a name="L2970"></a><tt class="py-lineno">2970</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">archive_table_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">:</tt> </tt>
<a name="L2971"></a><tt class="py-lineno">2971</tt>  <tt class="py-line">                <tt class="py-name">archive_table</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">[</tt><tt class="py-name">archive_table_name</tt><tt class="py-op">]</tt> </tt>
<a name="L2972"></a><tt class="py-lineno">2972</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2973"></a><tt class="py-lineno">2973</tt>  <tt class="py-line">                <tt class="py-name">archive_table</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">.</tt><tt id="link-1774" class="py-name"><a title="web2py.gluon.dal.DAL.define_table" class="py-name" href="#" onclick="return doclink('link-1774', 'define_table', 'link-490');">define_table</a></tt><tt class="py-op">(</tt><tt class="py-name">archive_table_name</tt><tt class="py-op">,</tt> </tt>
<a name="L2974"></a><tt class="py-lineno">2974</tt>  <tt class="py-line">                                                       <tt id="link-1775" class="py-name"><a title="web2py.gluon.dal.Field" class="py-name" href="#" onclick="return doclink('link-1775', 'Field', 'link-407');">Field</a></tt><tt class="py-op">(</tt><tt class="py-name">current_record</tt><tt class="py-op">,</tt><tt class="py-name">table</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2975"></a><tt class="py-lineno">2975</tt>  <tt class="py-line">                                                       <tt class="py-name">table</tt><tt class="py-op">)</tt> </tt>
<a name="L2976"></a><tt class="py-lineno">2976</tt>  <tt class="py-line">        <tt class="py-name">new_record</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">current_record</tt><tt class="py-op">:</tt><tt class="py-name">old_record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">}</tt> </tt>
<a name="L2977"></a><tt class="py-lineno">2977</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">archive_table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L2978"></a><tt class="py-lineno">2978</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">,</tt><tt class="py-name">current_record</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">fieldname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">old_record</tt><tt class="py-op">:</tt> </tt>
<a name="L2979"></a><tt class="py-lineno">2979</tt>  <tt class="py-line">                <tt class="py-name">new_record</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">old_record</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L2980"></a><tt class="py-lineno">2980</tt>  <tt class="py-line">        <tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt class="py-name">archive_table</tt><tt class="py-op">.</tt><tt id="link-1776" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-1776', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">new_record</tt><tt class="py-op">)</tt> </tt>
<a name="L2981"></a><tt class="py-lineno">2981</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">id</tt> </tt>
</div><a name="L2982"></a><tt class="py-lineno">2982</tt>  <tt class="py-line"> </tt>
<a name="Crud.update"></a><div id="Crud.update-def"><a name="L2983"></a><tt class="py-lineno">2983</tt> <a class="py-toggle" href="#" id="Crud.update-toggle" onclick="return toggle('Crud.update');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#update">update</a><tt class="py-op">(</tt> </tt>
<a name="L2984"></a><tt class="py-lineno">2984</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2985"></a><tt class="py-lineno">2985</tt>  <tt class="py-line">        <tt class="py-param">table</tt><tt class="py-op">,</tt> </tt>
<a name="L2986"></a><tt class="py-lineno">2986</tt>  <tt class="py-line">        <tt class="py-param">record</tt><tt class="py-op">,</tt> </tt>
<a name="L2987"></a><tt class="py-lineno">2987</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1777" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1777', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2988"></a><tt class="py-lineno">2988</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1778" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1778', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2989"></a><tt class="py-lineno">2989</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1779" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1779', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2990"></a><tt class="py-lineno">2990</tt>  <tt class="py-line">        <tt class="py-param">ondelete</tt><tt class="py-op">=</tt><tt id="link-1780" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1780', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2991"></a><tt class="py-lineno">2991</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1781" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1781', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2992"></a><tt class="py-lineno">2992</tt>  <tt class="py-line">        <tt class="py-param">message</tt><tt class="py-op">=</tt><tt id="link-1782" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1782', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2993"></a><tt class="py-lineno">2993</tt>  <tt class="py-line">        <tt class="py-param">deletable</tt><tt class="py-op">=</tt><tt id="link-1783" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1783', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2994"></a><tt class="py-lineno">2994</tt>  <tt class="py-line">        <tt class="py-param">formname</tt><tt class="py-op">=</tt><tt id="link-1784" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1784', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L2995"></a><tt class="py-lineno">2995</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.update-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.update-expanded"><a name="L2996"></a><tt class="py-lineno">2996</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2997"></a><tt class="py-lineno">2997</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Crud.update(table, record, [next=DEFAULT</tt> </tt>
<a name="L2998"></a><tt class="py-lineno">2998</tt>  <tt class="py-line"><tt class="py-docstring">            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT</tt> </tt>
<a name="L2999"></a><tt class="py-lineno">2999</tt>  <tt class="py-line"><tt class="py-docstring">            [, message=DEFAULT[, deletable=DEFAULT]]]]]])</tt> </tt>
<a name="L3000"></a><tt class="py-lineno">3000</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3001"></a><tt class="py-lineno">3001</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3002"></a><tt class="py-lineno">3002</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1785" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1785', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">table</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1786" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1786', 'tables', 'link-487');">tables</a></tt><tt class="py-op">)</tt> \ </tt>
<a name="L3003"></a><tt class="py-lineno">3003</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3004"></a><tt class="py-lineno">3004</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1787" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1787', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L3005"></a><tt class="py-lineno">3005</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1788" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1788', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3006"></a><tt class="py-lineno">3006</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">table</tt><tt class="py-op">]</tt> </tt>
<a name="L3007"></a><tt class="py-lineno">3007</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3008"></a><tt class="py-lineno">3008</tt>  <tt class="py-line">            <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L3009"></a><tt class="py-lineno">3009</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3010"></a><tt class="py-lineno">3010</tt>  <tt class="py-line">            <tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">record</tt> <tt class="py-keyword">or</tt> <tt class="py-number">0</tt> </tt>
<a name="L3011"></a><tt class="py-lineno">3011</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record_id</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1789" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1789', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt class="py-string">'update'</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3012"></a><tt class="py-lineno">3012</tt>  <tt class="py-line">            <tt id="link-1790" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1790', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1791" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1791', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-1792" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1792', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L3013"></a><tt class="py-lineno">3013</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">record_id</tt> \ </tt>
<a name="L3014"></a><tt class="py-lineno">3014</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1793" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1793', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt class="py-string">'create'</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3015"></a><tt class="py-lineno">3015</tt>  <tt class="py-line">            <tt id="link-1794" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1794', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1795" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1795', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-1796" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1796', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L3016"></a><tt class="py-lineno">3016</tt>  <tt class="py-line"> </tt>
<a name="L3017"></a><tt class="py-lineno">3017</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1797" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1797', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3018"></a><tt class="py-lineno">3018</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-1798" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1798', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3019"></a><tt class="py-lineno">3019</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1799" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1799', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L3020"></a><tt class="py-lineno">3020</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'json'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-1800" class="py-name" targets="Method web2py.gluon.dal.Rows.json()=web2py.gluon.dal.Rows-class.html#json,Method web2py.gluon.globals.Response.json()=web2py.gluon.globals.Response-class.html#json,Function web2py.gluon.serializers.json()=web2py.gluon.serializers-module.html#json,Method web2py.gluon.tools.Service.json()=web2py.gluon.tools.Service-class.html#json"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-1800', 'json', 'link-1800');">json</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3021"></a><tt class="py-lineno">3021</tt>  <tt class="py-line">            <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-1801" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1801', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-1802" class="py-name"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-1802', 'json', 'link-1800');">json</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3022"></a><tt class="py-lineno">3022</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1803" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1803', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1804" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1804', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3023"></a><tt class="py-lineno">3023</tt>  <tt class="py-line">            <tt id="link-1805" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1805', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L3024"></a><tt class="py-lineno">3024</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L3025"></a><tt class="py-lineno">3025</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1806" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1806', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_next</tt> </tt>
<a name="L3026"></a><tt class="py-lineno">3026</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1807" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1807', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3027"></a><tt class="py-lineno">3027</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1808" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1808', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_onvalidation</tt> </tt>
<a name="L3028"></a><tt class="py-lineno">3028</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1809" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1809', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3029"></a><tt class="py-lineno">3029</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1810" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1810', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_onaccept</tt> </tt>
<a name="L3030"></a><tt class="py-lineno">3030</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ondelete</tt> <tt class="py-op">==</tt> <tt id="link-1811" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1811', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3031"></a><tt class="py-lineno">3031</tt>  <tt class="py-line">            <tt class="py-name">ondelete</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1812" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1812', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_ondelete</tt> </tt>
<a name="L3032"></a><tt class="py-lineno">3032</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1813" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1813', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1814" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1814', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3033"></a><tt class="py-lineno">3033</tt>  <tt class="py-line">            <tt id="link-1815" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1815', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">update_log</tt> </tt>
<a name="L3034"></a><tt class="py-lineno">3034</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">deletable</tt> <tt class="py-op">==</tt> <tt id="link-1816" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1816', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3035"></a><tt class="py-lineno">3035</tt>  <tt class="py-line">            <tt class="py-name">deletable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1817" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1817', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_deletable</tt> </tt>
<a name="L3036"></a><tt class="py-lineno">3036</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1818" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1818', 'message', 'link-69');">message</a></tt> <tt class="py-op">==</tt> <tt id="link-1819" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1819', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3037"></a><tt class="py-lineno">3037</tt>  <tt class="py-line">            <tt id="link-1820" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1820', 'message', 'link-69');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_updated</tt> </tt>
<a name="L3038"></a><tt class="py-lineno">3038</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1821" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1821', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt> </tt>
<a name="L3039"></a><tt class="py-lineno">3039</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3040"></a><tt class="py-lineno">3040</tt>  <tt class="py-line">            <tt class="py-name">record</tt><tt class="py-op">,</tt> </tt>
<a name="L3041"></a><tt class="py-lineno">3041</tt>  <tt class="py-line">            <tt class="py-name">hidden</tt><tt class="py-op">=</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">_next</tt><tt class="py-op">=</tt><tt id="link-1822" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1822', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3042"></a><tt class="py-lineno">3042</tt>  <tt class="py-line">            <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1823" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1823', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L3043"></a><tt class="py-lineno">3043</tt>  <tt class="py-line">            <tt class="py-name">submit_button</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">submit_button</tt><tt class="py-op">,</tt> </tt>
<a name="L3044"></a><tt class="py-lineno">3044</tt>  <tt class="py-line">            <tt class="py-name">delete_label</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">delete_label</tt><tt class="py-op">,</tt> </tt>
<a name="L3045"></a><tt class="py-lineno">3045</tt>  <tt class="py-line">            <tt class="py-name">deletable</tt><tt class="py-op">=</tt><tt class="py-name">deletable</tt><tt class="py-op">,</tt> </tt>
<a name="L3046"></a><tt class="py-lineno">3046</tt>  <tt class="py-line">            <tt class="py-name">upload</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1824" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1824', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">download_url</tt><tt class="py-op">,</tt> </tt>
<a name="L3047"></a><tt class="py-lineno">3047</tt>  <tt class="py-line">            <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1825" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1825', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L3048"></a><tt class="py-lineno">3048</tt>  <tt class="py-line">            <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1826" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1826', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L3049"></a><tt class="py-lineno">3049</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L3050"></a><tt class="py-lineno">3050</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">accepted</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L3051"></a><tt class="py-lineno">3051</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">deleted</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L3052"></a><tt class="py-lineno">3052</tt>  <tt class="py-line">        <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1827" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1827', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">update_captcha</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L3053"></a><tt class="py-lineno">3053</tt>  <tt class="py-line">                  <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1828" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1828', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt> </tt>
<a name="L3054"></a><tt class="py-lineno">3054</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L3055"></a><tt class="py-lineno">3055</tt>  <tt class="py-line">            <tt id="link-1829" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-1829', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">,</tt> </tt>
<a name="L3056"></a><tt class="py-lineno">3056</tt>  <tt class="py-line">                         <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1830" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1830', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt><tt class="py-string">'captcha__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L3057"></a><tt class="py-lineno">3057</tt>  <tt class="py-line">        <tt class="py-name">captcha</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1831" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1831', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_captcha</tt> <tt class="py-keyword">or</tt> \ </tt>
<a name="L3058"></a><tt class="py-lineno">3058</tt>  <tt class="py-line">                  <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1832" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1832', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">captcha</tt> </tt>
<a name="L3059"></a><tt class="py-lineno">3059</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">record</tt> <tt class="py-keyword">and</tt> <tt class="py-name">captcha</tt><tt class="py-op">:</tt> </tt>
<a name="L3060"></a><tt class="py-lineno">3060</tt>  <tt class="py-line">            <tt id="link-1833" class="py-name"><a title="web2py.gluon.tools.addrow" class="py-name" href="#" onclick="return doclink('link-1833', 'addrow', 'link-807');">addrow</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">,</tt> <tt class="py-name">captcha</tt><tt class="py-op">.</tt><tt class="py-name">comment</tt><tt class="py-op">,</tt> </tt>
<a name="L3061"></a><tt class="py-lineno">3061</tt>  <tt class="py-line">                         <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1834" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1834', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt><tt class="py-string">'captcha__row'</tt><tt class="py-op">)</tt> </tt>
<a name="L3062"></a><tt class="py-lineno">3062</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'html'</tt><tt class="py-op">,</tt><tt class="py-string">'load'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3063"></a><tt class="py-lineno">3063</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">_session</tt><tt class="py-op">,</tt> <tt class="py-name">_formname</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L3064"></a><tt class="py-lineno">3064</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3065"></a><tt class="py-lineno">3065</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">_session</tt><tt class="py-op">,</tt> <tt class="py-name">_formname</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L3066"></a><tt class="py-lineno">3066</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">session</tt><tt class="py-op">,</tt> <tt class="py-string">'%s/%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">,</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3067"></a><tt class="py-lineno">3067</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">formname</tt><tt class="py-op">!=</tt><tt id="link-1835" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1835', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3068"></a><tt class="py-lineno">3068</tt>  <tt class="py-line">            <tt class="py-name">_formname</tt> <tt class="py-op">=</tt> <tt class="py-name">formname</tt> </tt>
<a name="L3069"></a><tt class="py-lineno">3069</tt>  <tt class="py-line">        <tt class="py-name">keepvalues</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1836" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1836', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">keepvalues</tt> </tt>
<a name="L3070"></a><tt class="py-lineno">3070</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">delete_this_record</tt><tt class="py-op">:</tt> </tt>
<a name="L3071"></a><tt class="py-lineno">3071</tt>  <tt class="py-line">            <tt class="py-name">keepvalues</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L3072"></a><tt class="py-lineno">3072</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt><tt id="link-1837" class="py-name"><a title="web2py.gluon.storage.StorageList" class="py-name" href="#" onclick="return doclink('link-1837', 'StorageList', 'link-7');">StorageList</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3073"></a><tt class="py-lineno">3073</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">.</tt><tt id="link-1838" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1838', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3074"></a><tt class="py-lineno">3074</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt id="link-1839" class="py-name"><a title="web2py.gluon.html.FORM.accepts
web2py.gluon.sqlhtml.SQLFORM.accepts" class="py-name" href="#" onclick="return doclink('link-1839', 'accepts', 'link-821');">accepts</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">_session</tt><tt class="py-op">,</tt> <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-name">_formname</tt><tt class="py-op">,</tt> </tt>
<a name="L3075"></a><tt class="py-lineno">3075</tt>  <tt class="py-line">                        <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> <tt class="py-name">keepvalues</tt><tt class="py-op">=</tt><tt class="py-name">keepvalues</tt><tt class="py-op">,</tt> </tt>
<a name="L3076"></a><tt class="py-lineno">3076</tt>  <tt class="py-line">                        <tt class="py-name">hideerror</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1840" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1840', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">hideerror</tt><tt class="py-op">,</tt> </tt>
<a name="L3077"></a><tt class="py-lineno">3077</tt>  <tt class="py-line">                        <tt class="py-name">detect_record_change</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1841" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1841', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">detect_record_change</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3078"></a><tt class="py-lineno">3078</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">accepted</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L3079"></a><tt class="py-lineno">3079</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1842" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1842', 'message', 'link-69');">message</a></tt> </tt>
<a name="L3080"></a><tt class="py-lineno">3080</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1843" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1843', 'log', 'link-746');">log</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3081"></a><tt class="py-lineno">3081</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1844" class="py-name"><a title="web2py.gluon.tools.Auth.log_event
web2py.gluon.tools.Crud.log_event" class="py-name" href="#" onclick="return doclink('link-1844', 'log_event', 'link-836');">log_event</a></tt><tt class="py-op">(</tt><tt id="link-1845" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1845', 'log', 'link-746');">log</a></tt> <tt class="py-op">%</tt> <tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L3082"></a><tt class="py-lineno">3082</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">delete_this_record</tt><tt class="py-op">:</tt> </tt>
<a name="L3083"></a><tt class="py-lineno">3083</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">deleted</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L3084"></a><tt class="py-lineno">3084</tt>  <tt class="py-line">                <tt id="link-1846" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1846', 'message', 'link-69');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_deleted</tt> </tt>
<a name="L3085"></a><tt class="py-lineno">3085</tt>  <tt class="py-line">                <tt id="link-1847" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1847', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">ondelete</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">,</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">)</tt> </tt>
<a name="L3086"></a><tt class="py-lineno">3086</tt>  <tt class="py-line">            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1848" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1848', 'message', 'link-69');">message</a></tt> </tt>
<a name="L3087"></a><tt class="py-lineno">3087</tt>  <tt class="py-line">            <tt id="link-1849" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1849', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt><tt class="py-name">form</tt><tt class="py-op">,</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">)</tt> </tt>
<a name="L3088"></a><tt class="py-lineno">3088</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'html'</tt><tt class="py-op">,</tt><tt class="py-string">'load'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3089"></a><tt class="py-lineno">3089</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-1850" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1850', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">200</tt><tt class="py-op">,</tt> <tt class="py-string">'RECORD CREATED/UPDATED'</tt><tt class="py-op">)</tt> </tt>
<a name="L3090"></a><tt class="py-lineno">3090</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-1851" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1851', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">### fix issue with 2.6</tt> </tt>
<a name="L3091"></a><tt class="py-lineno">3091</tt>  <tt class="py-line">               <tt id="link-1852" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1852', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1853" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1853', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L3092"></a><tt class="py-lineno">3092</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-1854" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1854', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> <tt class="py-comment"># Only redirect when explicit</tt> </tt>
<a name="L3093"></a><tt class="py-lineno">3093</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-1855" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1855', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'/'</tt> <tt class="py-keyword">and</tt> <tt id="link-1856" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1856', 'next', 'link-745');">next</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L3094"></a><tt class="py-lineno">3094</tt>  <tt class="py-line">                    <tt id="link-1857" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1857', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt id="link-1858" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-1858', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> </tt>
<a name="L3095"></a><tt class="py-lineno">3095</tt>  <tt class="py-line">                               <tt class="py-name">f</tt><tt class="py-op">=</tt><tt id="link-1859" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1859', 'next', 'link-745');">next</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'[id]'</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3096"></a><tt class="py-lineno">3096</tt>  <tt class="py-line">                <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> </tt>
<a name="L3097"></a><tt class="py-lineno">3097</tt>  <tt class="py-line">                <tt id="link-1860" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1860', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1861" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1861', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3098"></a><tt class="py-lineno">3098</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'html'</tt><tt class="py-op">,</tt><tt class="py-string">'load'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3099"></a><tt class="py-lineno">3099</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1862" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1862', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">401</tt><tt class="py-op">)</tt> </tt>
<a name="L3100"></a><tt class="py-lineno">3100</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L3101"></a><tt class="py-lineno">3101</tt>  <tt class="py-line"> </tt>
<a name="Crud.create"></a><div id="Crud.create-def"><a name="L3102"></a><tt class="py-lineno">3102</tt> <a class="py-toggle" href="#" id="Crud.create-toggle" onclick="return toggle('Crud.create');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#create">create</a><tt class="py-op">(</tt> </tt>
<a name="L3103"></a><tt class="py-lineno">3103</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L3104"></a><tt class="py-lineno">3104</tt>  <tt class="py-line">        <tt class="py-param">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3105"></a><tt class="py-lineno">3105</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1863" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1863', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3106"></a><tt class="py-lineno">3106</tt>  <tt class="py-line">        <tt class="py-param">onvalidation</tt><tt class="py-op">=</tt><tt id="link-1864" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1864', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3107"></a><tt class="py-lineno">3107</tt>  <tt class="py-line">        <tt class="py-param">onaccept</tt><tt class="py-op">=</tt><tt id="link-1865" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1865', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3108"></a><tt class="py-lineno">3108</tt>  <tt class="py-line">        <tt class="py-param">log</tt><tt class="py-op">=</tt><tt id="link-1866" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1866', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3109"></a><tt class="py-lineno">3109</tt>  <tt class="py-line">        <tt class="py-param">message</tt><tt class="py-op">=</tt><tt id="link-1867" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1867', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3110"></a><tt class="py-lineno">3110</tt>  <tt class="py-line">        <tt class="py-param">formname</tt><tt class="py-op">=</tt><tt id="link-1868" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1868', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3111"></a><tt class="py-lineno">3111</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.create-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.create-expanded"><a name="L3112"></a><tt class="py-lineno">3112</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3113"></a><tt class="py-lineno">3113</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Crud.create(table, [next=DEFAULT [, onvalidation=DEFAULT</tt> </tt>
<a name="L3114"></a><tt class="py-lineno">3114</tt>  <tt class="py-line"><tt class="py-docstring">            [, onaccept=DEFAULT [, log=DEFAULT[, message=DEFAULT]]]]])</tt> </tt>
<a name="L3115"></a><tt class="py-lineno">3115</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3116"></a><tt class="py-lineno">3116</tt>  <tt class="py-line"> </tt>
<a name="L3117"></a><tt class="py-lineno">3117</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1869" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1869', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1870" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1870', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3118"></a><tt class="py-lineno">3118</tt>  <tt class="py-line">            <tt id="link-1871" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1871', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1872" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1872', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_next</tt> </tt>
<a name="L3119"></a><tt class="py-lineno">3119</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onvalidation</tt> <tt class="py-op">==</tt> <tt id="link-1873" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1873', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3120"></a><tt class="py-lineno">3120</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1874" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1874', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_onvalidation</tt> </tt>
<a name="L3121"></a><tt class="py-lineno">3121</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">onaccept</tt> <tt class="py-op">==</tt> <tt id="link-1875" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1875', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3122"></a><tt class="py-lineno">3122</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1876" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1876', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">create_onaccept</tt> </tt>
<a name="L3123"></a><tt class="py-lineno">3123</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1877" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1877', 'log', 'link-746');">log</a></tt> <tt class="py-op">==</tt> <tt id="link-1878" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1878', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3124"></a><tt class="py-lineno">3124</tt>  <tt class="py-line">            <tt id="link-1879" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1879', 'log', 'link-746');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">create_log</tt> </tt>
<a name="L3125"></a><tt class="py-lineno">3125</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1880" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1880', 'message', 'link-69');">message</a></tt> <tt class="py-op">==</tt> <tt id="link-1881" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1881', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3126"></a><tt class="py-lineno">3126</tt>  <tt class="py-line">            <tt id="link-1882" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1882', 'message', 'link-69');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_created</tt> </tt>
<a name="L3127"></a><tt class="py-lineno">3127</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1883" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-1883', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt> </tt>
<a name="L3128"></a><tt class="py-lineno">3128</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3129"></a><tt class="py-lineno">3129</tt>  <tt class="py-line">            <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3130"></a><tt class="py-lineno">3130</tt>  <tt class="py-line">            <tt id="link-1884" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1884', 'next', 'link-745');">next</a></tt><tt class="py-op">=</tt><tt id="link-1885" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1885', 'next', 'link-745');">next</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3131"></a><tt class="py-lineno">3131</tt>  <tt class="py-line">            <tt class="py-name">onvalidation</tt><tt class="py-op">=</tt><tt class="py-name">onvalidation</tt><tt class="py-op">,</tt> </tt>
<a name="L3132"></a><tt class="py-lineno">3132</tt>  <tt class="py-line">            <tt class="py-name">onaccept</tt><tt class="py-op">=</tt><tt class="py-name">onaccept</tt><tt class="py-op">,</tt> </tt>
<a name="L3133"></a><tt class="py-lineno">3133</tt>  <tt class="py-line">            <tt id="link-1886" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1886', 'log', 'link-746');">log</a></tt><tt class="py-op">=</tt><tt id="link-1887" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-1887', 'log', 'link-746');">log</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3134"></a><tt class="py-lineno">3134</tt>  <tt class="py-line">            <tt id="link-1888" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1888', 'message', 'link-69');">message</a></tt><tt class="py-op">=</tt><tt id="link-1889" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1889', 'message', 'link-69');">message</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3135"></a><tt class="py-lineno">3135</tt>  <tt class="py-line">            <tt class="py-name">deletable</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L3136"></a><tt class="py-lineno">3136</tt>  <tt class="py-line">            <tt class="py-name">formname</tt><tt class="py-op">=</tt><tt class="py-name">formname</tt><tt class="py-op">,</tt> </tt>
<a name="L3137"></a><tt class="py-lineno">3137</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
</div><a name="L3138"></a><tt class="py-lineno">3138</tt>  <tt class="py-line"> </tt>
<a name="Crud.read"></a><div id="Crud.read-def"><a name="L3139"></a><tt class="py-lineno">3139</tt> <a class="py-toggle" href="#" id="Crud.read-toggle" onclick="return toggle('Crud.read');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">table</tt><tt class="py-op">,</tt> <tt class="py-param">record</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.read-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.read-expanded"><a name="L3140"></a><tt class="py-lineno">3140</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1890" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1890', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">table</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1891" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1891', 'tables', 'link-487');">tables</a></tt><tt class="py-op">)</tt> \ </tt>
<a name="L3141"></a><tt class="py-lineno">3141</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3142"></a><tt class="py-lineno">3142</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1892" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1892', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L3143"></a><tt class="py-lineno">3143</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1893" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1893', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3144"></a><tt class="py-lineno">3144</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">table</tt><tt class="py-op">]</tt> </tt>
<a name="L3145"></a><tt class="py-lineno">3145</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1894" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1894', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt class="py-string">'read'</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">record</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3146"></a><tt class="py-lineno">3146</tt>  <tt class="py-line">            <tt id="link-1895" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1895', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1896" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1896', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-1897" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1897', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L3147"></a><tt class="py-lineno">3147</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-1898" class="py-name"><a title="web2py.gluon.sqlhtml.SQLFORM" class="py-name" href="#" onclick="return doclink('link-1898', 'SQLFORM', 'link-801');">SQLFORM</a></tt><tt class="py-op">(</tt> </tt>
<a name="L3148"></a><tt class="py-lineno">3148</tt>  <tt class="py-line">            <tt class="py-name">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3149"></a><tt class="py-lineno">3149</tt>  <tt class="py-line">            <tt class="py-name">record</tt><tt class="py-op">,</tt> </tt>
<a name="L3150"></a><tt class="py-lineno">3150</tt>  <tt class="py-line">            <tt class="py-name">readonly</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
<a name="L3151"></a><tt class="py-lineno">3151</tt>  <tt class="py-line">            <tt class="py-name">comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L3152"></a><tt class="py-lineno">3152</tt>  <tt class="py-line">            <tt class="py-name">upload</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1899" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1899', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">download_url</tt><tt class="py-op">,</tt> </tt>
<a name="L3153"></a><tt class="py-lineno">3153</tt>  <tt class="py-line">            <tt class="py-name">showid</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1900" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1900', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">showid</tt><tt class="py-op">,</tt> </tt>
<a name="L3154"></a><tt class="py-lineno">3154</tt>  <tt class="py-line">            <tt class="py-name">formstyle</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1901" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1901', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">formstyle</tt><tt class="py-op">,</tt> </tt>
<a name="L3155"></a><tt class="py-lineno">3155</tt>  <tt class="py-line">            <tt class="py-name">separator</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1902" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1902', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">label_separator</tt> </tt>
<a name="L3156"></a><tt class="py-lineno">3156</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L3157"></a><tt class="py-lineno">3157</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1903" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1903', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'html'</tt><tt class="py-op">,</tt><tt class="py-string">'load'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3158"></a><tt class="py-lineno">3158</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt id="link-1904" class="py-name"><a title="web2py.gluon.dal.Table._filter_fields" class="py-name" href="#" onclick="return doclink('link-1904', '_filter_fields', 'link-684');">_filter_fields</a></tt><tt class="py-op">(</tt><tt class="py-name">form</tt><tt class="py-op">.</tt><tt class="py-name">record</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L3159"></a><tt class="py-lineno">3159</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt> </tt>
</div><a name="L3160"></a><tt class="py-lineno">3160</tt>  <tt class="py-line"> </tt>
<a name="Crud.delete"></a><div id="Crud.delete-def"><a name="L3161"></a><tt class="py-lineno">3161</tt> <a class="py-toggle" href="#" id="Crud.delete-toggle" onclick="return toggle('Crud.delete');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#delete">delete</a><tt class="py-op">(</tt> </tt>
<a name="L3162"></a><tt class="py-lineno">3162</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L3163"></a><tt class="py-lineno">3163</tt>  <tt class="py-line">        <tt class="py-param">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3164"></a><tt class="py-lineno">3164</tt>  <tt class="py-line">        <tt class="py-param">record_id</tt><tt class="py-op">,</tt> </tt>
<a name="L3165"></a><tt class="py-lineno">3165</tt>  <tt class="py-line">        <tt class="py-param">next</tt><tt class="py-op">=</tt><tt id="link-1905" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1905', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3166"></a><tt class="py-lineno">3166</tt>  <tt class="py-line">        <tt class="py-param">message</tt><tt class="py-op">=</tt><tt id="link-1906" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1906', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L3167"></a><tt class="py-lineno">3167</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.delete-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.delete-expanded"><a name="L3168"></a><tt class="py-lineno">3168</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3169"></a><tt class="py-lineno">3169</tt>  <tt class="py-line"><tt class="py-docstring">        .. method:: Crud.delete(table, record_id, [next=DEFAULT</tt> </tt>
<a name="L3170"></a><tt class="py-lineno">3170</tt>  <tt class="py-line"><tt class="py-docstring">            [, message=DEFAULT]])</tt> </tt>
<a name="L3171"></a><tt class="py-lineno">3171</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3172"></a><tt class="py-lineno">3172</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1907" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1907', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">table</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1908" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1908', 'tables', 'link-487');">tables</a></tt><tt class="py-op">)</tt> \ </tt>
<a name="L3173"></a><tt class="py-lineno">3173</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3174"></a><tt class="py-lineno">3174</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1909" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1909', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L3175"></a><tt class="py-lineno">3175</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1910" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1910', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3176"></a><tt class="py-lineno">3176</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">table</tt><tt class="py-op">]</tt> </tt>
<a name="L3177"></a><tt class="py-lineno">3177</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1911" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1911', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt class="py-string">'delete'</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3178"></a><tt class="py-lineno">3178</tt>  <tt class="py-line">            <tt id="link-1912" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1912', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1913" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1913', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-1914" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1914', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L3179"></a><tt class="py-lineno">3179</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1915" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1915', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3180"></a><tt class="py-lineno">3180</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-1916" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1916', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L3181"></a><tt class="py-lineno">3181</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1917" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1917', 'next', 'link-745');">next</a></tt> <tt class="py-op">==</tt> <tt id="link-1918" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1918', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3182"></a><tt class="py-lineno">3182</tt>  <tt class="py-line">            <tt id="link-1919" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1919', 'next', 'link-745');">next</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L3183"></a><tt class="py-lineno">3183</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt><tt class="py-op">.</tt><tt class="py-name">_next</tt> \ </tt>
<a name="L3184"></a><tt class="py-lineno">3184</tt>  <tt class="py-line">                <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1920" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1920', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">delete_next</tt> </tt>
<a name="L3185"></a><tt class="py-lineno">3185</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1921" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1921', 'message', 'link-69');">message</a></tt> <tt class="py-op">==</tt> <tt id="link-1922" class="py-name"><a title="web2py.gluon.dal.DEFAULT
web2py.gluon.tools.DEFAULT" class="py-name" href="#" onclick="return doclink('link-1922', 'DEFAULT', 'link-17');">DEFAULT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3186"></a><tt class="py-lineno">3186</tt>  <tt class="py-line">            <tt id="link-1923" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1923', 'message', 'link-69');">message</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">messages</tt><tt class="py-op">.</tt><tt class="py-name">record_deleted</tt> </tt>
<a name="L3187"></a><tt class="py-lineno">3187</tt>  <tt class="py-line">        <tt class="py-name">record</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">record_id</tt><tt class="py-op">]</tt> </tt>
<a name="L3188"></a><tt class="py-lineno">3188</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">record</tt><tt class="py-op">:</tt> </tt>
<a name="L3189"></a><tt class="py-lineno">3189</tt>  <tt class="py-line">            <tt id="link-1924" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1924', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1925" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1925', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">delete_onvalidation</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">)</tt> </tt>
<a name="L3190"></a><tt class="py-lineno">3190</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">record_id</tt><tt class="py-op">]</tt> </tt>
<a name="L3191"></a><tt class="py-lineno">3191</tt>  <tt class="py-line">            <tt id="link-1926" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-1926', 'callback', 'link-132');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1927" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1927', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">delete_onaccept</tt><tt class="py-op">,</tt><tt class="py-name">record</tt><tt class="py-op">,</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">_tablename</tt><tt class="py-op">)</tt> </tt>
<a name="L3192"></a><tt class="py-lineno">3192</tt>  <tt class="py-line">            <tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">flash</tt> <tt class="py-op">=</tt> <tt id="link-1928" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-1928', 'message', 'link-69');">message</a></tt> </tt>
<a name="L3193"></a><tt class="py-lineno">3193</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-1929" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1929', 'next', 'link-745');">next</a></tt><tt class="py-op">:</tt> <tt class="py-comment"># Only redirect when explicit</tt> </tt>
<a name="L3194"></a><tt class="py-lineno">3194</tt>  <tt class="py-line">            <tt id="link-1930" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1930', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt id="link-1931" class="py-name"><a title="web2py.gluon.rocket.FileWrapper.next" class="py-name" href="#" onclick="return doclink('link-1931', 'next', 'link-745');">next</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L3195"></a><tt class="py-lineno">3195</tt>  <tt class="py-line"> </tt>
<a name="Crud.rows"></a><div id="Crud.rows-def"><a name="L3196"></a><tt class="py-lineno">3196</tt> <a class="py-toggle" href="#" id="Crud.rows-toggle" onclick="return toggle('Crud.rows');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#rows">rows</a><tt class="py-op">(</tt> </tt>
<a name="L3197"></a><tt class="py-lineno">3197</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L3198"></a><tt class="py-lineno">3198</tt>  <tt class="py-line">        <tt class="py-param">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3199"></a><tt class="py-lineno">3199</tt>  <tt class="py-line">        <tt class="py-param">query</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3200"></a><tt class="py-lineno">3200</tt>  <tt class="py-line">        <tt class="py-param">fields</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3201"></a><tt class="py-lineno">3201</tt>  <tt class="py-line">        <tt class="py-param">orderby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3202"></a><tt class="py-lineno">3202</tt>  <tt class="py-line">        <tt class="py-param">limitby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3203"></a><tt class="py-lineno">3203</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.rows-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.rows-expanded"><a name="L3204"></a><tt class="py-lineno">3204</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1932" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1932', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3205"></a><tt class="py-lineno">3205</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1933" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1933', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">table</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1934" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1934', 'tables', 'link-487');">tables</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3206"></a><tt class="py-lineno">3206</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1935" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1935', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L3207"></a><tt class="py-lineno">3207</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1936" class="py-name"><a title="web2py.gluon.tools.Auth.has_permission
web2py.gluon.tools.Crud.has_permission" class="py-name" href="#" onclick="return doclink('link-1936', 'has_permission', 'link-1390');">has_permission</a></tt><tt class="py-op">(</tt><tt class="py-string">'select'</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3208"></a><tt class="py-lineno">3208</tt>  <tt class="py-line">            <tt id="link-1937" class="py-name"><a title="web2py.gluon.http.redirect" class="py-name" href="#" onclick="return doclink('link-1937', 'redirect', 'link-25');">redirect</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1938" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1938', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt id="link-1939" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-1939', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">on_failed_authorization</tt><tt class="py-op">)</tt> </tt>
<a name="L3209"></a><tt class="py-lineno">3209</tt>  <tt class="py-line">        <tt class="py-comment">#if record_id and not self.has_permission('select', table):</tt> </tt>
<a name="L3210"></a><tt class="py-lineno">3210</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#    redirect(self.settings.auth.settings.on_failed_authorization)</tt> </tt>
<a name="L3211"></a><tt class="py-lineno">3211</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1940" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1940', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3212"></a><tt class="py-lineno">3212</tt>  <tt class="py-line">            <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">table</tt><tt class="py-op">]</tt> </tt>
<a name="L3213"></a><tt class="py-lineno">3213</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">query</tt><tt class="py-op">:</tt> </tt>
<a name="L3214"></a><tt class="py-lineno">3214</tt>  <tt class="py-line">            <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt> </tt>
<a name="L3215"></a><tt class="py-lineno">3215</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L3216"></a><tt class="py-lineno">3216</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">field</tt> <tt class="py-keyword">for</tt> <tt class="py-name">field</tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt> <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">]</tt> </tt>
<a name="L3217"></a><tt class="py-lineno">3217</tt>  <tt class="py-line">        <tt id="link-1941" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1941', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">query</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1942" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-1942', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">fields</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">orderby</tt><tt class="py-op">=</tt><tt class="py-name">orderby</tt><tt class="py-op">,</tt> </tt>
<a name="L3218"></a><tt class="py-lineno">3218</tt>  <tt class="py-line">                                                    <tt class="py-name">limitby</tt><tt class="py-op">=</tt><tt class="py-name">limitby</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3219"></a><tt class="py-lineno">3219</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-1943" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1943', 'rows', 'link-1571');">rows</a></tt> </tt>
</div><a name="L3220"></a><tt class="py-lineno">3220</tt>  <tt class="py-line"> </tt>
<a name="Crud.select"></a><div id="Crud.select-def"><a name="L3221"></a><tt class="py-lineno">3221</tt> <a class="py-toggle" href="#" id="Crud.select-toggle" onclick="return toggle('Crud.select');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#select">select</a><tt class="py-op">(</tt> </tt>
<a name="L3222"></a><tt class="py-lineno">3222</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L3223"></a><tt class="py-lineno">3223</tt>  <tt class="py-line">        <tt class="py-param">table</tt><tt class="py-op">,</tt> </tt>
<a name="L3224"></a><tt class="py-lineno">3224</tt>  <tt class="py-line">        <tt class="py-param">query</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3225"></a><tt class="py-lineno">3225</tt>  <tt class="py-line">        <tt class="py-param">fields</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3226"></a><tt class="py-lineno">3226</tt>  <tt class="py-line">        <tt class="py-param">orderby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3227"></a><tt class="py-lineno">3227</tt>  <tt class="py-line">        <tt class="py-param">limitby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L3228"></a><tt class="py-lineno">3228</tt>  <tt class="py-line">        <tt class="py-param">headers</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L3229"></a><tt class="py-lineno">3229</tt>  <tt class="py-line">        <tt class="py-op">**</tt><tt class="py-param">attr</tt> </tt>
<a name="L3230"></a><tt class="py-lineno">3230</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.select-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.select-expanded"><a name="L3231"></a><tt class="py-lineno">3231</tt>  <tt class="py-line">        <tt id="link-1944" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1944', 'rows', 'link-1571');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1945" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1945', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt><tt class="py-name">query</tt><tt class="py-op">,</tt><tt class="py-name">fields</tt><tt class="py-op">,</tt><tt class="py-name">orderby</tt><tt class="py-op">,</tt><tt class="py-name">limitby</tt><tt class="py-op">)</tt> </tt>
<a name="L3232"></a><tt class="py-lineno">3232</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1946" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1946', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3233"></a><tt class="py-lineno">3233</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> <tt class="py-comment"># Nicer than an empty table.</tt> </tt>
<a name="L3234"></a><tt class="py-lineno">3234</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-string">'upload'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attr</tt><tt class="py-op">:</tt> </tt>
<a name="L3235"></a><tt class="py-lineno">3235</tt>  <tt class="py-line">            <tt class="py-name">attr</tt><tt class="py-op">[</tt><tt class="py-string">'upload'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1947" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-1947', 'url', 'link-233');">url</a></tt><tt class="py-op">(</tt><tt class="py-string">'download'</tt><tt class="py-op">)</tt> </tt>
<a name="L3236"></a><tt class="py-lineno">3236</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1948" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1948', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'html'</tt><tt class="py-op">,</tt><tt class="py-string">'load'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3237"></a><tt class="py-lineno">3237</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-1949" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1949', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">.</tt><tt id="link-1950" class="py-name" targets="Method web2py.gluon.dal.Rows.as_list()=web2py.gluon.dal.Rows-class.html#as_list"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-1950', 'as_list', 'link-1950');">as_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3238"></a><tt class="py-lineno">3238</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
<a name="L3239"></a><tt class="py-lineno">3239</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3240"></a><tt class="py-lineno">3240</tt>  <tt class="py-line">                <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">table</tt><tt class="py-op">]</tt> </tt>
<a name="L3241"></a><tt class="py-lineno">3241</tt>  <tt class="py-line">            <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-1951" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-1951', 'k', 'link-1951');">k</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-1952" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-1952', 'k', 'link-1951');">k</a></tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-1953" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-1953', 'k', 'link-1951');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">table</tt><tt class="py-op">)</tt> </tt>
<a name="L3242"></a><tt class="py-lineno">3242</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-1954" class="py-name"><a title="web2py.gluon.sqlhtml.SQLTABLE" class="py-name" href="#" onclick="return doclink('link-1954', 'SQLTABLE', 'link-1750');">SQLTABLE</a></tt><tt class="py-op">(</tt><tt id="link-1955" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-1955', 'rows', 'link-1571');">rows</a></tt><tt class="py-op">,</tt><tt class="py-name">headers</tt><tt class="py-op">=</tt><tt class="py-name">headers</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3243"></a><tt class="py-lineno">3243</tt>  <tt class="py-line"> </tt>
<a name="Crud.get_format"></a><div id="Crud.get_format-def"><a name="L3244"></a><tt class="py-lineno">3244</tt> <a class="py-toggle" href="#" id="Crud.get_format-toggle" onclick="return toggle('Crud.get_format');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#get_format">get_format</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.get_format-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.get_format-expanded"><a name="L3245"></a><tt class="py-lineno">3245</tt>  <tt class="py-line">        <tt class="py-name">rtable</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_db</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">[</tt><tt class="py-number">10</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
<a name="L3246"></a><tt class="py-lineno">3246</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">rtable</tt><tt class="py-op">.</tt><tt id="link-1956" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1956', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'_format'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L3247"></a><tt class="py-lineno">3247</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">format</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3248"></a><tt class="py-lineno">3248</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">format</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
<a name="L3249"></a><tt class="py-lineno">3249</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1957" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1957', 'name', 'link-590');">name</a></tt> </tt>
</div><a name="L3250"></a><tt class="py-lineno">3250</tt>  <tt class="py-line"> </tt>
<a name="Crud.get_query"></a><div id="Crud.get_query-def"><a name="L3251"></a><tt class="py-lineno">3251</tt> <a class="py-toggle" href="#" id="Crud.get_query-toggle" onclick="return toggle('Crud.get_query');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#get_query">get_query</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">field</tt><tt class="py-op">,</tt> <tt class="py-param">op</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">refsearch</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.get_query-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.get_query-expanded"><a name="L3252"></a><tt class="py-lineno">3252</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3253"></a><tt class="py-lineno">3253</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1958" class="py-name" targets="Method web2py.gluon.tools.Crud.get_format()=web2py.gluon.tools.Crud-class.html#get_format"><a title="web2py.gluon.tools.Crud.get_format" class="py-name" href="#" onclick="return doclink('link-1958', 'get_format', 'link-1958');">get_format</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">)</tt> </tt>
<a name="L3254"></a><tt class="py-lineno">3254</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'equals'</tt><tt class="py-op">:</tt> </tt>
<a name="L3255"></a><tt class="py-lineno">3255</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3256"></a><tt class="py-lineno">3256</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt> <tt class="py-op">==</tt> <tt class="py-name">value</tt> </tt>
<a name="L3257"></a><tt class="py-lineno">3257</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3258"></a><tt class="py-lineno">3258</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1959" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1959', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">value</tt> </tt>
<a name="L3259"></a><tt class="py-lineno">3259</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'not equal'</tt><tt class="py-op">:</tt> </tt>
<a name="L3260"></a><tt class="py-lineno">3260</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3261"></a><tt class="py-lineno">3261</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt> <tt class="py-op">!=</tt> <tt class="py-name">value</tt> </tt>
<a name="L3262"></a><tt class="py-lineno">3262</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3263"></a><tt class="py-lineno">3263</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1960" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1960', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">value</tt> </tt>
<a name="L3264"></a><tt class="py-lineno">3264</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'greater than'</tt><tt class="py-op">:</tt> </tt>
<a name="L3265"></a><tt class="py-lineno">3265</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3266"></a><tt class="py-lineno">3266</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">value</tt> </tt>
<a name="L3267"></a><tt class="py-lineno">3267</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3268"></a><tt class="py-lineno">3268</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1961" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1961', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">value</tt> </tt>
<a name="L3269"></a><tt class="py-lineno">3269</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'less than'</tt><tt class="py-op">:</tt> </tt>
<a name="L3270"></a><tt class="py-lineno">3270</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3271"></a><tt class="py-lineno">3271</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">value</tt> </tt>
<a name="L3272"></a><tt class="py-lineno">3272</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3273"></a><tt class="py-lineno">3273</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1962" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1962', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">value</tt> </tt>
<a name="L3274"></a><tt class="py-lineno">3274</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'starts with'</tt><tt class="py-op">:</tt> </tt>
<a name="L3275"></a><tt class="py-lineno">3275</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3276"></a><tt class="py-lineno">3276</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1963" class="py-name" targets="Method web2py.gluon.dal.Expression.like()=web2py.gluon.dal.Expression-class.html#like"><a title="web2py.gluon.dal.Expression.like" class="py-name" href="#" onclick="return doclink('link-1963', 'like', 'link-1963');">like</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">+</tt><tt class="py-string">'%'</tt><tt class="py-op">)</tt> </tt>
<a name="L3277"></a><tt class="py-lineno">3277</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3278"></a><tt class="py-lineno">3278</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1964" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1964', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1965" class="py-name"><a title="web2py.gluon.dal.Expression.startswith
web2py.gluon.dal.SQLCustomType.startswith" class="py-name" href="#" onclick="return doclink('link-1965', 'startswith', 'link-76');">startswith</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L3279"></a><tt class="py-lineno">3279</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'ends with'</tt><tt class="py-op">:</tt> </tt>
<a name="L3280"></a><tt class="py-lineno">3280</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3281"></a><tt class="py-lineno">3281</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1966" class="py-name"><a title="web2py.gluon.dal.Expression.like" class="py-name" href="#" onclick="return doclink('link-1966', 'like', 'link-1963');">like</a></tt><tt class="py-op">(</tt><tt class="py-string">'%'</tt><tt class="py-op">+</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L3282"></a><tt class="py-lineno">3282</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3283"></a><tt class="py-lineno">3283</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1967" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1967', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1968" class="py-name"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-1968', 'endswith', 'link-79');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L3284"></a><tt class="py-lineno">3284</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op</tt> <tt class="py-op">==</tt> <tt class="py-string">'contains'</tt><tt class="py-op">:</tt> </tt>
<a name="L3285"></a><tt class="py-lineno">3285</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3286"></a><tt class="py-lineno">3286</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1969" class="py-name"><a title="web2py.gluon.dal.Expression.like" class="py-name" href="#" onclick="return doclink('link-1969', 'like', 'link-1963');">like</a></tt><tt class="py-op">(</tt><tt class="py-string">'%'</tt><tt class="py-op">+</tt><tt class="py-name">value</tt><tt class="py-op">+</tt><tt class="py-string">'%'</tt><tt class="py-op">)</tt> </tt>
<a name="L3287"></a><tt class="py-lineno">3287</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3288"></a><tt class="py-lineno">3288</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">row</tt><tt class="py-op">:</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1970" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1970', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">format</tt><tt class="py-op">]</tt> </tt>
<a name="L3289"></a><tt class="py-lineno">3289</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3290"></a><tt class="py-lineno">3290</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L3291"></a><tt class="py-lineno">3291</tt>  <tt class="py-line"> </tt>
<a name="L3292"></a><tt class="py-lineno">3292</tt>  <tt class="py-line"> </tt>
<a name="Crud.search"></a><div id="Crud.search-def"><a name="L3293"></a><tt class="py-lineno">3293</tt> <a class="py-toggle" href="#" id="Crud.search-toggle" onclick="return toggle('Crud.search');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Crud-class.html#search">search</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">tables</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Crud.search-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Crud.search-expanded"><a name="L3294"></a><tt class="py-lineno">3294</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3295"></a><tt class="py-lineno">3295</tt>  <tt class="py-line"><tt class="py-docstring">        Creates a search form and its results for a table</tt> </tt>
<a name="L3296"></a><tt class="py-lineno">3296</tt>  <tt class="py-line"><tt class="py-docstring">        Example usage:</tt> </tt>
<a name="L3297"></a><tt class="py-lineno">3297</tt>  <tt class="py-line"><tt class="py-docstring">        form, results = crud.search(db.test,</tt> </tt>
<a name="L3298"></a><tt class="py-lineno">3298</tt>  <tt class="py-line"><tt class="py-docstring">                               queries = ['equals', 'not equal', 'contains'],</tt> </tt>
<a name="L3299"></a><tt class="py-lineno">3299</tt>  <tt class="py-line"><tt class="py-docstring">                               query_labels={'equals':'Equals',</tt> </tt>
<a name="L3300"></a><tt class="py-lineno">3300</tt>  <tt class="py-line"><tt class="py-docstring">                                             'not equal':'Not equal'},</tt> </tt>
<a name="L3301"></a><tt class="py-lineno">3301</tt>  <tt class="py-line"><tt class="py-docstring">                               fields = ['id','children'],</tt> </tt>
<a name="L3302"></a><tt class="py-lineno">3302</tt>  <tt class="py-line"><tt class="py-docstring">                               field_labels = {'id':'ID','children':'Children'},</tt> </tt>
<a name="L3303"></a><tt class="py-lineno">3303</tt>  <tt class="py-line"><tt class="py-docstring">                               zero='Please choose',</tt> </tt>
<a name="L3304"></a><tt class="py-lineno">3304</tt>  <tt class="py-line"><tt class="py-docstring">                               query = (db.test.id &gt; 0)&amp;(db.test.id != 3) )</tt> </tt>
<a name="L3305"></a><tt class="py-lineno">3305</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3306"></a><tt class="py-lineno">3306</tt>  <tt class="py-line">        <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt id="link-1971" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1971', 'tables', 'link-487');">tables</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L3307"></a><tt class="py-lineno">3307</tt>  <tt class="py-line">        <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">.</tt><tt id="link-1972" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1972', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'fields'</tt><tt class="py-op">,</tt> <tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L3308"></a><tt class="py-lineno">3308</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-1973" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-1973', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3309"></a><tt class="py-lineno">3309</tt>  <tt class="py-line">        <tt class="py-name">db</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> </tt>
<a name="L3310"></a><tt class="py-lineno">3310</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">table</tt><tt class="py-op">,</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1974" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-1974', 'Table', 'link-406');">Table</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">table</tt> <tt class="py-keyword">in</tt> <tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-1975" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.tables
web2py.gluon.tools.Crud.tables" class="py-name" href="#" onclick="return doclink('link-1975', 'tables', 'link-487');">tables</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3311"></a><tt class="py-lineno">3311</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-1976" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-1976', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">)</tt> </tt>
<a name="L3312"></a><tt class="py-lineno">3312</tt>  <tt class="py-line">        <tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3313"></a><tt class="py-lineno">3313</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'orderby'</tt><tt class="py-op">,</tt><tt class="py-string">'groupby'</tt><tt class="py-op">,</tt><tt class="py-string">'left'</tt><tt class="py-op">,</tt><tt class="py-string">'distinct'</tt><tt class="py-op">,</tt><tt class="py-string">'limitby'</tt><tt class="py-op">,</tt><tt class="py-string">'cache'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3314"></a><tt class="py-lineno">3314</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L3315"></a><tt class="py-lineno">3315</tt>  <tt class="py-line">        <tt class="py-name">tbl</tt> <tt class="py-op">=</tt> <tt id="link-1977" class="py-name"><a title="web2py.gluon.html.TABLE" class="py-name" href="#" onclick="return doclink('link-1977', 'TABLE', 'link-1421');">TABLE</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3316"></a><tt class="py-lineno">3316</tt>  <tt class="py-line">        <tt class="py-name">selected</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">;</tt> <tt class="py-name">refsearch</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">;</tt> <tt class="py-name">results</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L3317"></a><tt class="py-lineno">3317</tt>  <tt class="py-line">        <tt class="py-name">ops</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">.</tt><tt id="link-1978" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1978', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'queries'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3318"></a><tt class="py-lineno">3318</tt>  <tt class="py-line">        <tt class="py-name">zero</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">.</tt><tt id="link-1979" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1979', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'zero'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L3319"></a><tt class="py-lineno">3319</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">ops</tt><tt class="py-op">:</tt> </tt>
<a name="L3320"></a><tt class="py-lineno">3320</tt>  <tt class="py-line">            <tt class="py-name">ops</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'equals'</tt><tt class="py-op">,</tt> <tt class="py-string">'not equal'</tt><tt class="py-op">,</tt> <tt class="py-string">'greater than'</tt><tt class="py-op">,</tt> </tt>
<a name="L3321"></a><tt class="py-lineno">3321</tt>  <tt class="py-line">                   <tt class="py-string">'less than'</tt><tt class="py-op">,</tt> <tt class="py-string">'starts with'</tt><tt class="py-op">,</tt> </tt>
<a name="L3322"></a><tt class="py-lineno">3322</tt>  <tt class="py-line">                   <tt class="py-string">'ends with'</tt><tt class="py-op">,</tt> <tt class="py-string">'contains'</tt><tt class="py-op">]</tt> </tt>
<a name="L3323"></a><tt class="py-lineno">3323</tt>  <tt class="py-line">        <tt class="py-name">ops</tt><tt class="py-op">.</tt><tt id="link-1980" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-1980', 'insert', 'link-262');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-name">zero</tt><tt class="py-op">)</tt> </tt>
<a name="L3324"></a><tt class="py-lineno">3324</tt>  <tt class="py-line">        <tt class="py-name">query_labels</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">.</tt><tt id="link-1981" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1981', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'query_labels'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L3325"></a><tt class="py-lineno">3325</tt>  <tt class="py-line">        <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">.</tt><tt id="link-1982" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1982', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'query'</tt><tt class="py-op">,</tt><tt class="py-name">table</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L3326"></a><tt class="py-lineno">3326</tt>  <tt class="py-line">        <tt class="py-name">field_labels</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">.</tt><tt id="link-1983" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1983', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'field_labels'</tt><tt class="py-op">,</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L3327"></a><tt class="py-lineno">3327</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">field</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fields</tt><tt class="py-op">:</tt> </tt>
<a name="L3328"></a><tt class="py-lineno">3328</tt>  <tt class="py-line">            <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">field</tt><tt class="py-op">]</tt> </tt>
<a name="L3329"></a><tt class="py-lineno">3329</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">readable</tt><tt class="py-op">:</tt> <tt class="py-keyword">continue</tt> </tt>
<a name="L3330"></a><tt class="py-lineno">3330</tt>  <tt class="py-line">            <tt class="py-name">fieldname</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-1984" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1984', 'name', 'link-590');">name</a></tt> </tt>
<a name="L3331"></a><tt class="py-lineno">3331</tt>  <tt class="py-line">            <tt class="py-name">chkval</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-1985" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1985', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'chk'</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L3332"></a><tt class="py-lineno">3332</tt>  <tt class="py-line">            <tt class="py-name">txtval</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-1986" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1986', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'txt'</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L3333"></a><tt class="py-lineno">3333</tt>  <tt class="py-line">            <tt class="py-name">opval</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">.</tt><tt id="link-1987" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1987', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'op'</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L3334"></a><tt class="py-lineno">3334</tt>  <tt class="py-line">            <tt class="py-name">row</tt> <tt class="py-op">=</tt> <tt id="link-1988" class="py-name"><a title="web2py.gluon.html.TR" class="py-name" href="#" onclick="return doclink('link-1988', 'TR', 'link-271');">TR</a></tt><tt class="py-op">(</tt><tt id="link-1989" class="py-name" targets="Class web2py.gluon.html.TD=web2py.gluon.html.TD-class.html"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-1989', 'TD', 'link-1989');">TD</a></tt><tt class="py-op">(</tt><tt id="link-1990" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-1990', 'INPUT', 'link-253');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt> <tt class="py-op">=</tt> <tt class="py-string">"checkbox"</tt><tt class="py-op">,</tt> <tt id="link-1991" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-1991', '_name', 'link-254');">_name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"chk"</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> </tt>
<a name="L3335"></a><tt class="py-lineno">3335</tt>  <tt class="py-line">                              <tt class="py-name">_disabled</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'id'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3336"></a><tt class="py-lineno">3336</tt>  <tt class="py-line">                              <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">==</tt> <tt class="py-string">'id'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">chkval</tt> <tt class="py-op">==</tt> <tt class="py-string">'on'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3337"></a><tt class="py-lineno">3337</tt>  <tt class="py-line">                     <tt id="link-1992" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-1992', 'TD', 'link-1989');">TD</a></tt><tt class="py-op">(</tt><tt class="py-name">field_labels</tt><tt class="py-op">.</tt><tt id="link-1993" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1993', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">fieldname</tt><tt class="py-op">,</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3338"></a><tt class="py-lineno">3338</tt>  <tt class="py-line">                     <tt id="link-1994" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-1994', 'TD', 'link-1989');">TD</a></tt><tt class="py-op">(</tt><tt id="link-1995" class="py-name" targets="Class web2py.gluon.html.SELECT=web2py.gluon.html.SELECT-class.html"><a title="web2py.gluon.html.SELECT" class="py-name" href="#" onclick="return doclink('link-1995', 'SELECT', 'link-1995');">SELECT</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-1996" class="py-name" targets="Class web2py.gluon.html.OPTION=web2py.gluon.html.OPTION-class.html"><a title="web2py.gluon.html.OPTION" class="py-name" href="#" onclick="return doclink('link-1996', 'OPTION', 'link-1996');">OPTION</a></tt><tt class="py-op">(</tt><tt class="py-name">query_labels</tt><tt class="py-op">.</tt><tt id="link-1997" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-1997', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">op</tt><tt class="py-op">,</tt><tt class="py-name">op</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3339"></a><tt class="py-lineno">3339</tt>  <tt class="py-line">                                       <tt class="py-name">_value</tt><tt class="py-op">=</tt><tt class="py-name">op</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">op</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ops</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L3340"></a><tt class="py-lineno">3340</tt>  <tt class="py-line">                               <tt id="link-1998" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-1998', '_name', 'link-254');">_name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"op"</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> </tt>
<a name="L3341"></a><tt class="py-lineno">3341</tt>  <tt class="py-line">                               <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">opval</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3342"></a><tt class="py-lineno">3342</tt>  <tt class="py-line">                     <tt id="link-1999" class="py-name"><a title="web2py.gluon.html.TD" class="py-name" href="#" onclick="return doclink('link-1999', 'TD', 'link-1989');">TD</a></tt><tt class="py-op">(</tt><tt id="link-2000" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-2000', 'INPUT', 'link-253');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt> <tt class="py-op">=</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> <tt id="link-2001" class="py-name"><a title="psycopg2.tz.FixedOffsetTimezone._name" class="py-name" href="#" onclick="return doclink('link-2001', '_name', 'link-254');">_name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"txt"</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> </tt>
<a name="L3343"></a><tt class="py-lineno">3343</tt>  <tt class="py-line">                              <tt class="py-name">_value</tt> <tt class="py-op">=</tt> <tt class="py-name">txtval</tt><tt class="py-op">,</tt> <tt class="py-name">_id</tt><tt class="py-op">=</tt><tt class="py-string">'txt'</tt> <tt class="py-op">+</tt> <tt class="py-name">fieldname</tt><tt class="py-op">,</tt> </tt>
<a name="L3344"></a><tt class="py-lineno">3344</tt>  <tt class="py-line">                              <tt class="py-name">_class</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3345"></a><tt class="py-lineno">3345</tt>  <tt class="py-line">            <tt class="py-name">tbl</tt><tt class="py-op">.</tt><tt id="link-2002" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-2002', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">)</tt> </tt>
<a name="L3346"></a><tt class="py-lineno">3346</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">post_vars</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">chkval</tt> <tt class="py-keyword">or</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">==</tt><tt class="py-string">'id'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3347"></a><tt class="py-lineno">3347</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">txtval</tt> <tt class="py-keyword">and</tt> <tt class="py-name">opval</tt> <tt class="py-op">!=</tt> <tt class="py-string">''</tt><tt class="py-op">:</tt> </tt>
<a name="L3348"></a><tt class="py-lineno">3348</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">:</tt><tt class="py-number">10</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'reference '</tt><tt class="py-op">:</tt> </tt>
<a name="L3349"></a><tt class="py-lineno">3349</tt>  <tt class="py-line">                        <tt class="py-name">refsearch</tt><tt class="py-op">.</tt><tt id="link-2003" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-2003', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2004" class="py-name" targets="Method web2py.gluon.tools.Crud.get_query()=web2py.gluon.tools.Crud-class.html#get_query"><a title="web2py.gluon.tools.Crud.get_query" class="py-name" href="#" onclick="return doclink('link-2004', 'get_query', 'link-2004');">get_query</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> </tt>
<a name="L3350"></a><tt class="py-lineno">3350</tt>  <tt class="py-line">                                    <tt class="py-name">opval</tt><tt class="py-op">,</tt> <tt class="py-name">txtval</tt><tt class="py-op">,</tt> <tt class="py-name">refsearch</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3351"></a><tt class="py-lineno">3351</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3352"></a><tt class="py-lineno">3352</tt>  <tt class="py-line">                        <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-2005" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2005', 'error', 'link-57');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt id="link-2006" class="py-name"><a title="web2py.gluon.dal.Field.validate
web2py.gluon.dal.GAEDecimalProperty.validate
web2py.gluon.html.FORM.validate" class="py-name" href="#" onclick="return doclink('link-2006', 'validate', 'link-716');">validate</a></tt><tt class="py-op">(</tt><tt class="py-name">txtval</tt><tt class="py-op">)</tt> </tt>
<a name="L3353"></a><tt class="py-lineno">3353</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-2007" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2007', 'error', 'link-57');">error</a></tt><tt class="py-op">:</tt> </tt>
<a name="L3354"></a><tt class="py-lineno">3354</tt>  <tt class="py-line">                            <tt class="py-comment">### TODO deal with 'starts with', 'ends with', 'contains' on GAE</tt> </tt>
<a name="L3355"></a><tt class="py-lineno">3355</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-name">query</tt> <tt class="py-op">&amp;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2008" class="py-name"><a title="web2py.gluon.tools.Crud.get_query" class="py-name" href="#" onclick="return doclink('link-2008', 'get_query', 'link-2004');">get_query</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt> <tt class="py-name">opval</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L3356"></a><tt class="py-lineno">3356</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3357"></a><tt class="py-lineno">3357</tt>  <tt class="py-line">                            <tt class="py-name">row</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-2009" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-2009', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt id="link-2010" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.DIV
web2py.gluon.dal.NoSQLAdapter.DIV
web2py.gluon.html.DIV" class="py-name" href="#" onclick="return doclink('link-2010', 'DIV', 'link-244');">DIV</a></tt><tt class="py-op">(</tt><tt id="link-2011" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2011', 'error', 'link-57');">error</a></tt><tt class="py-op">,</tt><tt class="py-name">_class</tt><tt class="py-op">=</tt><tt class="py-string">'error'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3358"></a><tt class="py-lineno">3358</tt>  <tt class="py-line">                <tt class="py-name">selected</tt><tt class="py-op">.</tt><tt id="link-2012" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-2012', 'append', 'link-23');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">)</tt> </tt>
<a name="L3359"></a><tt class="py-lineno">3359</tt>  <tt class="py-line">        <tt class="py-name">form</tt> <tt class="py-op">=</tt> <tt id="link-2013" class="py-name" targets="Class web2py.gluon.html.FORM=web2py.gluon.html.FORM-class.html"><a title="web2py.gluon.html.FORM" class="py-name" href="#" onclick="return doclink('link-2013', 'FORM', 'link-2013');">FORM</a></tt><tt class="py-op">(</tt><tt class="py-name">tbl</tt><tt class="py-op">,</tt><tt id="link-2014" class="py-name"><a title="web2py.gluon.html.INPUT" class="py-name" href="#" onclick="return doclink('link-2014', 'INPUT', 'link-253');">INPUT</a></tt><tt class="py-op">(</tt><tt class="py-name">_type</tt><tt class="py-op">=</tt><tt class="py-string">"submit"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3360"></a><tt class="py-lineno">3360</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">selected</tt><tt class="py-op">:</tt> </tt>
<a name="L3361"></a><tt class="py-lineno">3361</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3362"></a><tt class="py-lineno">3362</tt>  <tt class="py-line">                <tt class="py-name">results</tt> <tt class="py-op">=</tt> <tt class="py-name">db</tt><tt class="py-op">(</tt><tt class="py-name">query</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2015" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-2015', 'select', 'link-680');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">selected</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L3363"></a><tt class="py-lineno">3363</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">refsearch</tt><tt class="py-op">:</tt> </tt>
<a name="L3364"></a><tt class="py-lineno">3364</tt>  <tt class="py-line">                    <tt class="py-name">results</tt> <tt class="py-op">=</tt> <tt class="py-name">results</tt><tt class="py-op">.</tt><tt id="link-2016" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-2016', 'find', 'link-2016');">find</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
<a name="L3365"></a><tt class="py-lineno">3365</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> <tt class="py-comment"># hmmm, we should do better here</tt> </tt>
<a name="L3366"></a><tt class="py-lineno">3366</tt>  <tt class="py-line">                <tt class="py-name">results</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L3367"></a><tt class="py-lineno">3367</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">form</tt><tt class="py-op">,</tt> <tt class="py-name">results</tt> </tt>
</div></div><a name="L3368"></a><tt class="py-lineno">3368</tt>  <tt class="py-line"> </tt>
<a name="L3369"></a><tt class="py-lineno">3369</tt>  <tt class="py-line"> </tt>
<a name="L3370"></a><tt class="py-lineno">3370</tt>  <tt class="py-line"><tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">install_opener</tt><tt class="py-op">(</tt><tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">build_opener</tt><tt class="py-op">(</tt><tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">HTTPCookieProcessor</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3371"></a><tt class="py-lineno">3371</tt>  <tt class="py-line"> </tt>
<a name="fetch"></a><div id="fetch-def"><a name="L3372"></a><tt class="py-lineno">3372</tt> <a class="py-toggle" href="#" id="fetch-toggle" onclick="return toggle('fetch');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#fetch">fetch</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">headers</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L3373"></a><tt class="py-lineno">3373</tt>  <tt class="py-line">          <tt class="py-param">cookie</tt><tt class="py-op">=</tt><tt class="py-name">Cookie</tt><tt class="py-op">.</tt><tt class="py-name">SimpleCookie</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3374"></a><tt class="py-lineno">3374</tt>  <tt class="py-line">          <tt class="py-param">user_agent</tt><tt class="py-op">=</tt><tt class="py-string">'Mozilla/5.0'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="fetch-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="fetch-expanded"><a name="L3375"></a><tt class="py-lineno">3375</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">data</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L3376"></a><tt class="py-lineno">3376</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L3377"></a><tt class="py-lineno">3377</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-2017" class="py-name" targets="Method web2py.gluon.globals.Request.user_agent()=web2py.gluon.globals.Request-class.html#user_agent"><a title="web2py.gluon.globals.Request.user_agent" class="py-name" href="#" onclick="return doclink('link-2017', 'user_agent', 'link-2017');">user_agent</a></tt><tt class="py-op">:</tt> <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'User-agent'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-2018" class="py-name"><a title="web2py.gluon.globals.Request.user_agent" class="py-name" href="#" onclick="return doclink('link-2018', 'user_agent', 'link-2017');">user_agent</a></tt> </tt>
<a name="L3378"></a><tt class="py-lineno">3378</tt>  <tt class="py-line">    <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Cookie'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">' '</tt><tt class="py-op">.</tt><tt id="link-2019" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-2019', 'join', 'link-160');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s=%s;'</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">cookie</tt><tt class="py-op">.</tt><tt id="link-2020" class="py-name" targets="Method web2py.gluon.rocket.Headers.values()=web2py.gluon.rocket.Headers-class.html#values"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-2020', 'values', 'link-2020');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3379"></a><tt class="py-lineno">3379</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3380"></a><tt class="py-lineno">3380</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt class="py-name">google</tt><tt class="py-op">.</tt><tt class="py-name">appengine</tt><tt class="py-op">.</tt><tt class="py-name">api</tt> <tt class="py-keyword">import</tt> <tt class="py-name">urlfetch</tt> </tt>
<a name="L3381"></a><tt class="py-lineno">3381</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L3382"></a><tt class="py-lineno">3382</tt>  <tt class="py-line">        <tt class="py-name">req</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt id="link-2021" class="py-name"><a title="web2py.gluon.globals.Request" class="py-name" href="#" onclick="return doclink('link-2021', 'Request', 'link-232');">Request</a></tt><tt class="py-op">(</tt><tt id="link-2022" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-2022', 'url', 'link-233');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
<a name="L3383"></a><tt class="py-lineno">3383</tt>  <tt class="py-line">        <tt id="link-2023" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-2023', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">urlopen</tt><tt class="py-op">(</tt><tt class="py-name">req</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2024" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-2024', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3384"></a><tt class="py-lineno">3384</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3385"></a><tt class="py-lineno">3385</tt>  <tt class="py-line">        <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">==</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">urlfetch</tt><tt class="py-op">.</tt><tt class="py-name">GET</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">urlfetch</tt><tt class="py-op">.</tt><tt class="py-name">POST</tt> </tt>
<a name="L3386"></a><tt class="py-lineno">3386</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt id="link-2025" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-2025', 'url', 'link-233');">url</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L3387"></a><tt class="py-lineno">3387</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">urlfetch</tt><tt class="py-op">.</tt><tt id="link-2026" class="py-name" targets="Function web2py.gluon.tools.fetch()=web2py.gluon.tools-module.html#fetch"><a title="web2py.gluon.tools.fetch" class="py-name" href="#" onclick="return doclink('link-2026', 'fetch', 'link-2026');">fetch</a></tt><tt class="py-op">(</tt><tt id="link-2027" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-2027', 'url', 'link-233');">url</a></tt><tt class="py-op">=</tt><tt id="link-2028" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-2028', 'url', 'link-233');">url</a></tt><tt class="py-op">,</tt> <tt class="py-name">payload</tt><tt class="py-op">=</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> </tt>
<a name="L3388"></a><tt class="py-lineno">3388</tt>  <tt class="py-line">                                      <tt class="py-name">method</tt><tt class="py-op">=</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">=</tt><tt class="py-name">headers</tt><tt class="py-op">,</tt> </tt>
<a name="L3389"></a><tt class="py-lineno">3389</tt>  <tt class="py-line">                                      <tt class="py-name">allow_truncated</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">follow_redirects</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L3390"></a><tt class="py-lineno">3390</tt>  <tt class="py-line">                                      <tt class="py-name">deadline</tt><tt class="py-op">=</tt><tt class="py-number">10</tt><tt class="py-op">)</tt> </tt>
<a name="L3391"></a><tt class="py-lineno">3391</tt>  <tt class="py-line">            <tt class="py-comment"># next request will be a get, so no need to send the data again</tt> </tt>
<a name="L3392"></a><tt class="py-lineno">3392</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L3393"></a><tt class="py-lineno">3393</tt>  <tt class="py-line">            <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">urlfetch</tt><tt class="py-op">.</tt><tt class="py-name">GET</tt> </tt>
<a name="L3394"></a><tt class="py-lineno">3394</tt>  <tt class="py-line">            <tt class="py-comment"># load cookies from the response</tt> </tt>
<a name="L3395"></a><tt class="py-lineno">3395</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">cookie</tt><tt class="py-op">.</tt><tt id="link-2029" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.load()=web2py.gluon.restricted.RestrictedError-class.html#load,Method web2py.gluon.restricted.TicketStorage.load()=web2py.gluon.restricted.TicketStorage-class.html#load,Function web2py.gluon.rewrite.load()=web2py.gluon.rewrite-module.html#load"><a title="web2py.gluon.restricted.RestrictedError.load
web2py.gluon.restricted.TicketStorage.load
web2py.gluon.rewrite.load" class="py-name" href="#" onclick="return doclink('link-2029', 'load', 'link-2029');">load</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-2030" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-2030', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'set-cookie'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3396"></a><tt class="py-lineno">3396</tt>  <tt class="py-line">            <tt id="link-2031" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-2031', 'url', 'link-233');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt id="link-2032" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-2032', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'location'</tt><tt class="py-op">)</tt> </tt>
<a name="L3397"></a><tt class="py-lineno">3397</tt>  <tt class="py-line">        <tt id="link-2033" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-2033', 'html', 'link-70');">html</a></tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">content</tt> </tt>
<a name="L3398"></a><tt class="py-lineno">3398</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-2034" class="py-name"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-2034', 'html', 'link-70');">html</a></tt> </tt>
</div><a name="L3399"></a><tt class="py-lineno">3399</tt>  <tt class="py-line"> </tt>
<a name="L3400"></a><tt class="py-lineno">3400</tt>  <tt class="py-line"><tt id="link-2035" class="py-name" targets="Variable web2py.gluon.tools.regex_geocode=web2py.gluon.tools-module.html#regex_geocode"><a title="web2py.gluon.tools.regex_geocode" class="py-name" href="#" onclick="return doclink('link-2035', 'regex_geocode', 'link-2035');">regex_geocode</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L3401"></a><tt class="py-lineno">3401</tt>  <tt class="py-line">    <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'\&lt;coordinates\&gt;(?P&lt;la&gt;[^,]*),(?P&lt;lo&gt;[^,]*).*?\&lt;/coordinates\&gt;'</tt><tt class="py-op">)</tt> </tt>
<a name="L3402"></a><tt class="py-lineno">3402</tt>  <tt class="py-line"> </tt>
<a name="L3403"></a><tt class="py-lineno">3403</tt>  <tt class="py-line"> </tt>
<a name="geocode"></a><div id="geocode-def"><a name="L3404"></a><tt class="py-lineno">3404</tt> <a class="py-toggle" href="#" id="geocode-toggle" onclick="return toggle('geocode');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#geocode">geocode</a><tt class="py-op">(</tt><tt class="py-param">address</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="geocode-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="geocode-expanded"><a name="L3405"></a><tt class="py-lineno">3405</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3406"></a><tt class="py-lineno">3406</tt>  <tt class="py-line">        <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-name">address</tt><tt class="py-op">)</tt> </tt>
<a name="L3407"></a><tt class="py-lineno">3407</tt>  <tt class="py-line">        <tt class="py-name">txt</tt> <tt class="py-op">=</tt> <tt id="link-2036" class="py-name"><a title="web2py.gluon.tools.fetch" class="py-name" href="#" onclick="return doclink('link-2036', 'fetch', 'link-2026');">fetch</a></tt><tt class="py-op">(</tt><tt class="py-string">'http://maps.google.com/maps/geo?q=%s&amp;output=xml'</tt> </tt>
<a name="L3408"></a><tt class="py-lineno">3408</tt>  <tt class="py-line">                     <tt class="py-op">%</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
<a name="L3409"></a><tt class="py-lineno">3409</tt>  <tt class="py-line">        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt id="link-2037" class="py-name"><a title="web2py.gluon.tools.regex_geocode" class="py-name" href="#" onclick="return doclink('link-2037', 'regex_geocode', 'link-2035');">regex_geocode</a></tt><tt class="py-op">.</tt><tt id="link-2038" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-2038', 'search', 'link-1747');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">txt</tt><tt class="py-op">)</tt> </tt>
<a name="L3410"></a><tt class="py-lineno">3410</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">la</tt><tt class="py-op">,</tt> <tt class="py-name">lo</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'la'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'lo'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3411"></a><tt class="py-lineno">3411</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">la</tt><tt class="py-op">,</tt> <tt class="py-name">lo</tt><tt class="py-op">)</tt> </tt>
<a name="L3412"></a><tt class="py-lineno">3412</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3413"></a><tt class="py-lineno">3413</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-number">0.0</tt><tt class="py-op">,</tt> <tt class="py-number">0.0</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3414"></a><tt class="py-lineno">3414</tt>  <tt class="py-line"> </tt>
<a name="L3415"></a><tt class="py-lineno">3415</tt>  <tt class="py-line"> </tt>
<a name="universal_caller"></a><div id="universal_caller-def"><a name="L3416"></a><tt class="py-lineno">3416</tt> <a class="py-toggle" href="#" id="universal_caller-toggle" onclick="return toggle('universal_caller');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#universal_caller">universal_caller</a><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="universal_caller-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="universal_caller-expanded"><a name="L3417"></a><tt class="py-lineno">3417</tt>  <tt class="py-line">    <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">func_code</tt><tt class="py-op">.</tt><tt class="py-name">co_argcount</tt> </tt>
<a name="L3418"></a><tt class="py-lineno">3418</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">func_code</tt><tt class="py-op">.</tt><tt class="py-name">co_varnames</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">c</tt><tt class="py-op">]</tt> </tt>
<a name="L3419"></a><tt class="py-lineno">3419</tt>  <tt class="py-line"> </tt>
<a name="L3420"></a><tt class="py-lineno">3420</tt>  <tt class="py-line">    <tt class="py-name">defaults</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">func_defaults</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L3421"></a><tt class="py-lineno">3421</tt>  <tt class="py-line">    <tt class="py-name">pos_args</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt id="link-2039" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-2039', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">defaults</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L3422"></a><tt class="py-lineno">3422</tt>  <tt class="py-line">    <tt class="py-name">named_args</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt id="link-2040" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-2040', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">defaults</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L3423"></a><tt class="py-lineno">3423</tt>  <tt class="py-line"> </tt>
<a name="L3424"></a><tt class="py-lineno">3424</tt>  <tt class="py-line">    <tt class="py-name">arg_dict</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3425"></a><tt class="py-lineno">3425</tt>  <tt class="py-line"> </tt>
<a name="L3426"></a><tt class="py-lineno">3426</tt>  <tt class="py-line">    <tt class="py-comment"># Fill the arg_dict with name and value for the submitted, positional values</tt> </tt>
<a name="L3427"></a><tt class="py-lineno">3427</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">for</tt> <tt class="py-name">pos_index</tt><tt class="py-op">,</tt> <tt class="py-name">pos_val</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">c</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3428"></a><tt class="py-lineno">3428</tt>  <tt class="py-line">        <tt class="py-name">arg_dict</tt><tt class="py-op">[</tt><tt class="py-name">n</tt><tt class="py-op">[</tt><tt class="py-name">pos_index</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">pos_val</tt>    <tt class="py-comment"># n[pos_index] is the name of the argument</tt> </tt>
<a name="L3429"></a><tt class="py-lineno">3429</tt>  <tt class="py-line"> </tt>
<a name="L3430"></a><tt class="py-lineno">3430</tt>  <tt class="py-line">    <tt class="py-comment"># There might be pos_args left, that are sent as named_values. Gather them as well.</tt> </tt>
<a name="L3431"></a><tt class="py-lineno">3431</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># If a argument already is populated with values we simply replaces them.</tt> </tt>
<a name="L3432"></a><tt class="py-lineno">3432</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">for</tt> <tt class="py-name">arg_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">pos_args</tt><tt class="py-op">[</tt><tt id="link-2041" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-2041', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">arg_dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L3433"></a><tt class="py-lineno">3433</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-2042" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-2042', 'b', 'link-19');">b</a></tt><tt class="py-op">.</tt><tt id="link-2043" class="py-name"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-2043', 'has_key', 'link-855');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-name">arg_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3434"></a><tt class="py-lineno">3434</tt>  <tt class="py-line">            <tt class="py-name">arg_dict</tt><tt class="py-op">[</tt><tt class="py-name">arg_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-2044" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-2044', 'b', 'link-19');">b</a></tt><tt class="py-op">[</tt><tt class="py-name">arg_name</tt><tt class="py-op">]</tt> </tt>
<a name="L3435"></a><tt class="py-lineno">3435</tt>  <tt class="py-line"> </tt>
<a name="L3436"></a><tt class="py-lineno">3436</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-2045" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-2045', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">arg_dict</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt id="link-2046" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-2046', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">pos_args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3437"></a><tt class="py-lineno">3437</tt>  <tt class="py-line">        <tt class="py-comment"># All the positional arguments is found. The function may now be called.</tt> </tt>
<a name="L3438"></a><tt class="py-lineno">3438</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># However, we need to update the arg_dict with the values from the named arguments as well.</tt> </tt>
<a name="L3439"></a><tt class="py-lineno">3439</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">arg_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">named_args</tt><tt class="py-op">:</tt> </tt>
<a name="L3440"></a><tt class="py-lineno">3440</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-2047" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-2047', 'b', 'link-19');">b</a></tt><tt class="py-op">.</tt><tt id="link-2048" class="py-name"><a title="web2py.gluon.rocket.Headers.has_key" class="py-name" href="#" onclick="return doclink('link-2048', 'has_key', 'link-855');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-name">arg_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3441"></a><tt class="py-lineno">3441</tt>  <tt class="py-line">                <tt class="py-name">arg_dict</tt><tt class="py-op">[</tt><tt class="py-name">arg_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-2049" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-2049', 'b', 'link-19');">b</a></tt><tt class="py-op">[</tt><tt class="py-name">arg_name</tt><tt class="py-op">]</tt> </tt>
<a name="L3442"></a><tt class="py-lineno">3442</tt>  <tt class="py-line"> </tt>
<a name="L3443"></a><tt class="py-lineno">3443</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">arg_dict</tt><tt class="py-op">)</tt> </tt>
<a name="L3444"></a><tt class="py-lineno">3444</tt>  <tt class="py-line"> </tt>
<a name="L3445"></a><tt class="py-lineno">3445</tt>  <tt class="py-line">    <tt class="py-comment"># Raise an error, the function cannot be called.</tt> </tt>
<a name="L3446"></a><tt class="py-lineno">3446</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">raise</tt> <tt id="link-2050" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-2050', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> <tt class="py-string">"Object does not exist"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3447"></a><tt class="py-lineno">3447</tt>  <tt class="py-line"> </tt>
<a name="L3448"></a><tt class="py-lineno">3448</tt>  <tt class="py-line"> </tt>
<a name="Service"></a><div id="Service-def"><a name="L3449"></a><tt class="py-lineno">3449</tt> <a class="py-toggle" href="#" id="Service-toggle" onclick="return toggle('Service');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html">Service</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Service-expanded"><a name="L3450"></a><tt class="py-lineno">3450</tt>  <tt class="py-line"> </tt>
<a name="Service.__init__"></a><div id="Service.__init__-def"><a name="L3451"></a><tt class="py-lineno">3451</tt> <a class="py-toggle" href="#" id="Service.__init__-toggle" onclick="return toggle('Service.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">environment</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.__init__-expanded"><a name="L3452"></a><tt class="py-lineno">3452</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3453"></a><tt class="py-lineno">3453</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">csv_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3454"></a><tt class="py-lineno">3454</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">xml_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3455"></a><tt class="py-lineno">3455</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rss_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3456"></a><tt class="py-lineno">3456</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">json_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3457"></a><tt class="py-lineno">3457</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jsonrpc_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3458"></a><tt class="py-lineno">3458</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">xmlrpc_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3459"></a><tt class="py-lineno">3459</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3460"></a><tt class="py-lineno">3460</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc3_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L3461"></a><tt class="py-lineno">3461</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">soap_procedures</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
</div><a name="L3462"></a><tt class="py-lineno">3462</tt>  <tt class="py-line"> </tt>
<a name="Service.run"></a><div id="Service.run-def"><a name="L3463"></a><tt class="py-lineno">3463</tt> <a class="py-toggle" href="#" id="Service.run-toggle" onclick="return toggle('Service.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.run-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.run-expanded"><a name="L3464"></a><tt class="py-lineno">3464</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3465"></a><tt class="py-lineno">3465</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3466"></a><tt class="py-lineno">3466</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3467"></a><tt class="py-lineno">3467</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3468"></a><tt class="py-lineno">3468</tt>  <tt class="py-line"><tt class="py-docstring">            @service.run</tt> </tt>
<a name="L3469"></a><tt class="py-lineno">3469</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3470"></a><tt class="py-lineno">3470</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3471"></a><tt class="py-lineno">3471</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3472"></a><tt class="py-lineno">3472</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3473"></a><tt class="py-lineno">3473</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3474"></a><tt class="py-lineno">3474</tt>  <tt class="py-line"><tt class="py-docstring">        Then call it with::</tt> </tt>
<a name="L3475"></a><tt class="py-lineno">3475</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3476"></a><tt class="py-lineno">3476</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/run/myfunction?a=3&amp;b=4</tt> </tt>
<a name="L3477"></a><tt class="py-lineno">3477</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3478"></a><tt class="py-lineno">3478</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3479"></a><tt class="py-lineno">3479</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3480"></a><tt class="py-lineno">3480</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3481"></a><tt class="py-lineno">3481</tt>  <tt class="py-line"> </tt>
<a name="Service.csv"></a><div id="Service.csv-def"><a name="L3482"></a><tt class="py-lineno">3482</tt> <a class="py-toggle" href="#" id="Service.csv-toggle" onclick="return toggle('Service.csv');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#csv">csv</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.csv-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.csv-expanded"><a name="L3483"></a><tt class="py-lineno">3483</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3484"></a><tt class="py-lineno">3484</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3485"></a><tt class="py-lineno">3485</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3486"></a><tt class="py-lineno">3486</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3487"></a><tt class="py-lineno">3487</tt>  <tt class="py-line"><tt class="py-docstring">            @service.csv</tt> </tt>
<a name="L3488"></a><tt class="py-lineno">3488</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3489"></a><tt class="py-lineno">3489</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3490"></a><tt class="py-lineno">3490</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3491"></a><tt class="py-lineno">3491</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3492"></a><tt class="py-lineno">3492</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3493"></a><tt class="py-lineno">3493</tt>  <tt class="py-line"><tt class="py-docstring">        Then call it with::</tt> </tt>
<a name="L3494"></a><tt class="py-lineno">3494</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3495"></a><tt class="py-lineno">3495</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/csv/myfunction?a=3&amp;b=4</tt> </tt>
<a name="L3496"></a><tt class="py-lineno">3496</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3497"></a><tt class="py-lineno">3497</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3498"></a><tt class="py-lineno">3498</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3499"></a><tt class="py-lineno">3499</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3500"></a><tt class="py-lineno">3500</tt>  <tt class="py-line"> </tt>
<a name="Service.xml"></a><div id="Service.xml-def"><a name="L3501"></a><tt class="py-lineno">3501</tt> <a class="py-toggle" href="#" id="Service.xml-toggle" onclick="return toggle('Service.xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#xml">xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.xml-expanded"><a name="L3502"></a><tt class="py-lineno">3502</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3503"></a><tt class="py-lineno">3503</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3504"></a><tt class="py-lineno">3504</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3505"></a><tt class="py-lineno">3505</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3506"></a><tt class="py-lineno">3506</tt>  <tt class="py-line"><tt class="py-docstring">            @service.xml</tt> </tt>
<a name="L3507"></a><tt class="py-lineno">3507</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3508"></a><tt class="py-lineno">3508</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3509"></a><tt class="py-lineno">3509</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3510"></a><tt class="py-lineno">3510</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3511"></a><tt class="py-lineno">3511</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3512"></a><tt class="py-lineno">3512</tt>  <tt class="py-line"><tt class="py-docstring">        Then call it with::</tt> </tt>
<a name="L3513"></a><tt class="py-lineno">3513</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3514"></a><tt class="py-lineno">3514</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/xml/myfunction?a=3&amp;b=4</tt> </tt>
<a name="L3515"></a><tt class="py-lineno">3515</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3516"></a><tt class="py-lineno">3516</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3517"></a><tt class="py-lineno">3517</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3518"></a><tt class="py-lineno">3518</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3519"></a><tt class="py-lineno">3519</tt>  <tt class="py-line"> </tt>
<a name="Service.rss"></a><div id="Service.rss-def"><a name="L3520"></a><tt class="py-lineno">3520</tt> <a class="py-toggle" href="#" id="Service.rss-toggle" onclick="return toggle('Service.rss');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#rss">rss</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.rss-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.rss-expanded"><a name="L3521"></a><tt class="py-lineno">3521</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3522"></a><tt class="py-lineno">3522</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3523"></a><tt class="py-lineno">3523</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3524"></a><tt class="py-lineno">3524</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3525"></a><tt class="py-lineno">3525</tt>  <tt class="py-line"><tt class="py-docstring">            @service.rss</tt> </tt>
<a name="L3526"></a><tt class="py-lineno">3526</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction():</tt> </tt>
<a name="L3527"></a><tt class="py-lineno">3527</tt>  <tt class="py-line"><tt class="py-docstring">                return dict(title=..., link=..., description=...,</tt> </tt>
<a name="L3528"></a><tt class="py-lineno">3528</tt>  <tt class="py-line"><tt class="py-docstring">                    created_on=..., entries=[dict(title=..., link=...,</tt> </tt>
<a name="L3529"></a><tt class="py-lineno">3529</tt>  <tt class="py-line"><tt class="py-docstring">                        description=..., created_on=...])</tt> </tt>
<a name="L3530"></a><tt class="py-lineno">3530</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3531"></a><tt class="py-lineno">3531</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3532"></a><tt class="py-lineno">3532</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3533"></a><tt class="py-lineno">3533</tt>  <tt class="py-line"><tt class="py-docstring">        Then call it with::</tt> </tt>
<a name="L3534"></a><tt class="py-lineno">3534</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3535"></a><tt class="py-lineno">3535</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/rss/myfunction</tt> </tt>
<a name="L3536"></a><tt class="py-lineno">3536</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3537"></a><tt class="py-lineno">3537</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3538"></a><tt class="py-lineno">3538</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rss_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3539"></a><tt class="py-lineno">3539</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3540"></a><tt class="py-lineno">3540</tt>  <tt class="py-line"> </tt>
<a name="Service.json"></a><div id="Service.json-def"><a name="L3541"></a><tt class="py-lineno">3541</tt> <a class="py-toggle" href="#" id="Service.json-toggle" onclick="return toggle('Service.json');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#json">json</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.json-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.json-expanded"><a name="L3542"></a><tt class="py-lineno">3542</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3543"></a><tt class="py-lineno">3543</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3544"></a><tt class="py-lineno">3544</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3545"></a><tt class="py-lineno">3545</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3546"></a><tt class="py-lineno">3546</tt>  <tt class="py-line"><tt class="py-docstring">            @service.json</tt> </tt>
<a name="L3547"></a><tt class="py-lineno">3547</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3548"></a><tt class="py-lineno">3548</tt>  <tt class="py-line"><tt class="py-docstring">                return [{a: b}]</tt> </tt>
<a name="L3549"></a><tt class="py-lineno">3549</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3550"></a><tt class="py-lineno">3550</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3551"></a><tt class="py-lineno">3551</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3552"></a><tt class="py-lineno">3552</tt>  <tt class="py-line"><tt class="py-docstring">        Then call it with::</tt> </tt>
<a name="L3553"></a><tt class="py-lineno">3553</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3554"></a><tt class="py-lineno">3554</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/json/myfunction?a=hello&amp;b=world</tt> </tt>
<a name="L3555"></a><tt class="py-lineno">3555</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3556"></a><tt class="py-lineno">3556</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3557"></a><tt class="py-lineno">3557</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">json_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3558"></a><tt class="py-lineno">3558</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3559"></a><tt class="py-lineno">3559</tt>  <tt class="py-line"> </tt>
<a name="Service.jsonrpc"></a><div id="Service.jsonrpc-def"><a name="L3560"></a><tt class="py-lineno">3560</tt> <a class="py-toggle" href="#" id="Service.jsonrpc-toggle" onclick="return toggle('Service.jsonrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#jsonrpc">jsonrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.jsonrpc-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.jsonrpc-expanded"><a name="L3561"></a><tt class="py-lineno">3561</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3562"></a><tt class="py-lineno">3562</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3563"></a><tt class="py-lineno">3563</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3564"></a><tt class="py-lineno">3564</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3565"></a><tt class="py-lineno">3565</tt>  <tt class="py-line"><tt class="py-docstring">            @service.jsonrpc</tt> </tt>
<a name="L3566"></a><tt class="py-lineno">3566</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3567"></a><tt class="py-lineno">3567</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3568"></a><tt class="py-lineno">3568</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3569"></a><tt class="py-lineno">3569</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3570"></a><tt class="py-lineno">3570</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3571"></a><tt class="py-lineno">3571</tt>  <tt class="py-line"><tt class="py-docstring">        Then call it with::</tt> </tt>
<a name="L3572"></a><tt class="py-lineno">3572</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3573"></a><tt class="py-lineno">3573</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/jsonrpc/myfunction?a=hello&amp;b=world</tt> </tt>
<a name="L3574"></a><tt class="py-lineno">3574</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3575"></a><tt class="py-lineno">3575</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3576"></a><tt class="py-lineno">3576</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jsonrpc_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3577"></a><tt class="py-lineno">3577</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3578"></a><tt class="py-lineno">3578</tt>  <tt class="py-line"> </tt>
<a name="Service.xmlrpc"></a><div id="Service.xmlrpc-def"><a name="L3579"></a><tt class="py-lineno">3579</tt> <a class="py-toggle" href="#" id="Service.xmlrpc-toggle" onclick="return toggle('Service.xmlrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#xmlrpc">xmlrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.xmlrpc-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.xmlrpc-expanded"><a name="L3580"></a><tt class="py-lineno">3580</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3581"></a><tt class="py-lineno">3581</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3582"></a><tt class="py-lineno">3582</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3583"></a><tt class="py-lineno">3583</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3584"></a><tt class="py-lineno">3584</tt>  <tt class="py-line"><tt class="py-docstring">            @service.xmlrpc</tt> </tt>
<a name="L3585"></a><tt class="py-lineno">3585</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3586"></a><tt class="py-lineno">3586</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3587"></a><tt class="py-lineno">3587</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3588"></a><tt class="py-lineno">3588</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3589"></a><tt class="py-lineno">3589</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3590"></a><tt class="py-lineno">3590</tt>  <tt class="py-line"><tt class="py-docstring">        The call it with::</tt> </tt>
<a name="L3591"></a><tt class="py-lineno">3591</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3592"></a><tt class="py-lineno">3592</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/xmlrpc/myfunction?a=hello&amp;b=world</tt> </tt>
<a name="L3593"></a><tt class="py-lineno">3593</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3594"></a><tt class="py-lineno">3594</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3595"></a><tt class="py-lineno">3595</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">xmlrpc_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3596"></a><tt class="py-lineno">3596</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3597"></a><tt class="py-lineno">3597</tt>  <tt class="py-line"> </tt>
<a name="Service.amfrpc"></a><div id="Service.amfrpc-def"><a name="L3598"></a><tt class="py-lineno">3598</tt> <a class="py-toggle" href="#" id="Service.amfrpc-toggle" onclick="return toggle('Service.amfrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#amfrpc">amfrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.amfrpc-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.amfrpc-expanded"><a name="L3599"></a><tt class="py-lineno">3599</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3600"></a><tt class="py-lineno">3600</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3601"></a><tt class="py-lineno">3601</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3602"></a><tt class="py-lineno">3602</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3603"></a><tt class="py-lineno">3603</tt>  <tt class="py-line"><tt class="py-docstring">            @service.amfrpc</tt> </tt>
<a name="L3604"></a><tt class="py-lineno">3604</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3605"></a><tt class="py-lineno">3605</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3606"></a><tt class="py-lineno">3606</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3607"></a><tt class="py-lineno">3607</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3608"></a><tt class="py-lineno">3608</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3609"></a><tt class="py-lineno">3609</tt>  <tt class="py-line"><tt class="py-docstring">        The call it with::</tt> </tt>
<a name="L3610"></a><tt class="py-lineno">3610</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3611"></a><tt class="py-lineno">3611</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/amfrpc/myfunction?a=hello&amp;b=world</tt> </tt>
<a name="L3612"></a><tt class="py-lineno">3612</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3613"></a><tt class="py-lineno">3613</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3614"></a><tt class="py-lineno">3614</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3615"></a><tt class="py-lineno">3615</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3616"></a><tt class="py-lineno">3616</tt>  <tt class="py-line"> </tt>
<a name="Service.amfrpc3"></a><div id="Service.amfrpc3-def"><a name="L3617"></a><tt class="py-lineno">3617</tt> <a class="py-toggle" href="#" id="Service.amfrpc3-toggle" onclick="return toggle('Service.amfrpc3');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#amfrpc3">amfrpc3</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">domain</tt><tt class="py-op">=</tt><tt class="py-string">'default'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.amfrpc3-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.amfrpc3-expanded"><a name="L3618"></a><tt class="py-lineno">3618</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3619"></a><tt class="py-lineno">3619</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3620"></a><tt class="py-lineno">3620</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3621"></a><tt class="py-lineno">3621</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3622"></a><tt class="py-lineno">3622</tt>  <tt class="py-line"><tt class="py-docstring">            @service.amfrpc3('domain')</tt> </tt>
<a name="L3623"></a><tt class="py-lineno">3623</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3624"></a><tt class="py-lineno">3624</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3625"></a><tt class="py-lineno">3625</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3626"></a><tt class="py-lineno">3626</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3627"></a><tt class="py-lineno">3627</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3628"></a><tt class="py-lineno">3628</tt>  <tt class="py-line"><tt class="py-docstring">        The call it with::</tt> </tt>
<a name="L3629"></a><tt class="py-lineno">3629</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3630"></a><tt class="py-lineno">3630</tt>  <tt class="py-line"><tt class="py-docstring">            wget http://..../app/default/call/amfrpc3/myfunction?a=hello&amp;b=world</tt> </tt>
<a name="L3631"></a><tt class="py-lineno">3631</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3632"></a><tt class="py-lineno">3632</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3633"></a><tt class="py-lineno">3633</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">domain</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3634"></a><tt class="py-lineno">3634</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"AMF3 requires a domain for function"</tt> </tt>
<a name="L3635"></a><tt class="py-lineno">3635</tt>  <tt class="py-line"> </tt>
<a name="L3636"></a><tt class="py-lineno">3636</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">_amfrpc3</tt><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3637"></a><tt class="py-lineno">3637</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">domain</tt><tt class="py-op">:</tt> </tt>
<a name="L3638"></a><tt class="py-lineno">3638</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc3_procedures</tt><tt class="py-op">[</tt><tt class="py-name">domain</tt><tt class="py-op">+</tt><tt class="py-string">'.'</tt><tt class="py-op">+</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3639"></a><tt class="py-lineno">3639</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3640"></a><tt class="py-lineno">3640</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc3_procedures</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
<a name="L3641"></a><tt class="py-lineno">3641</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3642"></a><tt class="py-lineno">3642</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_amfrpc3</tt> </tt>
</div><a name="L3643"></a><tt class="py-lineno">3643</tt>  <tt class="py-line"> </tt>
<a name="Service.soap"></a><div id="Service.soap-def"><a name="L3644"></a><tt class="py-lineno">3644</tt> <a class="py-toggle" href="#" id="Service.soap-toggle" onclick="return toggle('Service.soap');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#soap">soap</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">returns</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">doc</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.soap-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.soap-expanded"><a name="L3645"></a><tt class="py-lineno">3645</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3646"></a><tt class="py-lineno">3646</tt>  <tt class="py-line"><tt class="py-docstring">        example::</tt> </tt>
<a name="L3647"></a><tt class="py-lineno">3647</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3648"></a><tt class="py-lineno">3648</tt>  <tt class="py-line"><tt class="py-docstring">            service = Service(globals())</tt> </tt>
<a name="L3649"></a><tt class="py-lineno">3649</tt>  <tt class="py-line"><tt class="py-docstring">            @service.soap('MyFunction',returns={'result':int},args={'a':int,'b':int,})</tt> </tt>
<a name="L3650"></a><tt class="py-lineno">3650</tt>  <tt class="py-line"><tt class="py-docstring">            def myfunction(a, b):</tt> </tt>
<a name="L3651"></a><tt class="py-lineno">3651</tt>  <tt class="py-line"><tt class="py-docstring">                return a + b</tt> </tt>
<a name="L3652"></a><tt class="py-lineno">3652</tt>  <tt class="py-line"><tt class="py-docstring">            def call():</tt> </tt>
<a name="L3653"></a><tt class="py-lineno">3653</tt>  <tt class="py-line"><tt class="py-docstring">                return service()</tt> </tt>
<a name="L3654"></a><tt class="py-lineno">3654</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3655"></a><tt class="py-lineno">3655</tt>  <tt class="py-line"><tt class="py-docstring">        The call it with::</tt> </tt>
<a name="L3656"></a><tt class="py-lineno">3656</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3657"></a><tt class="py-lineno">3657</tt>  <tt class="py-line"><tt class="py-docstring">            from gluon.contrib.pysimplesoap.client import SoapClient</tt> </tt>
<a name="L3658"></a><tt class="py-lineno">3658</tt>  <tt class="py-line"><tt class="py-docstring">            client = SoapClient(wsdl="http://..../app/default/call/soap?WSDL")</tt> </tt>
<a name="L3659"></a><tt class="py-lineno">3659</tt>  <tt class="py-line"><tt class="py-docstring">            response = client.MyFunction(a=1,b=2)</tt> </tt>
<a name="L3660"></a><tt class="py-lineno">3660</tt>  <tt class="py-line"><tt class="py-docstring">            return response['result']</tt> </tt>
<a name="L3661"></a><tt class="py-lineno">3661</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3662"></a><tt class="py-lineno">3662</tt>  <tt class="py-line"><tt class="py-docstring">        Exposes online generated documentation and xml example messages at:</tt> </tt>
<a name="L3663"></a><tt class="py-lineno">3663</tt>  <tt class="py-line"><tt class="py-docstring">        - http://..../app/default/call/soap</tt> </tt>
<a name="L3664"></a><tt class="py-lineno">3664</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3665"></a><tt class="py-lineno">3665</tt>  <tt class="py-line"> </tt>
<a name="L3666"></a><tt class="py-lineno">3666</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">_soap</tt><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3667"></a><tt class="py-lineno">3667</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">soap_procedures</tt><tt class="py-op">[</tt><tt id="link-2051" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-2051', 'name', 'link-590');">name</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">returns</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt> </tt>
<a name="L3668"></a><tt class="py-lineno">3668</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">f</tt> </tt>
</div><a name="L3669"></a><tt class="py-lineno">3669</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_soap</tt> </tt>
</div><a name="L3670"></a><tt class="py-lineno">3670</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_run"></a><div id="Service.serve_run-def"><a name="L3671"></a><tt class="py-lineno">3671</tt> <a class="py-toggle" href="#" id="Service.serve_run-toggle" onclick="return toggle('Service.serve_run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_run">serve_run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_run-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_run-expanded"><a name="L3672"></a><tt class="py-lineno">3672</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2052" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2052', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3673"></a><tt class="py-lineno">3673</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L3674"></a><tt class="py-lineno">3674</tt>  <tt class="py-line">            <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L3675"></a><tt class="py-lineno">3675</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">:</tt> </tt>
<a name="L3676"></a><tt class="py-lineno">3676</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-2053" class="py-name" targets="Function web2py.gluon.tools.universal_caller()=web2py.gluon.tools-module.html#universal_caller"><a title="web2py.gluon.tools.universal_caller" class="py-name" href="#" onclick="return doclink('link-2053', 'universal_caller', 'link-2053');">universal_caller</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L3677"></a><tt class="py-lineno">3677</tt>  <tt class="py-line">                                        <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3678"></a><tt class="py-lineno">3678</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2054" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2054', 'error', 'link-57');">error</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3679"></a><tt class="py-lineno">3679</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_csv"></a><div id="Service.serve_csv-def"><a name="L3680"></a><tt class="py-lineno">3680</tt> <a class="py-toggle" href="#" id="Service.serve_csv-toggle" onclick="return toggle('Service.serve_csv');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_csv">serve_csv</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_csv-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_csv-expanded"><a name="L3681"></a><tt class="py-lineno">3681</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2055" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2055', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3682"></a><tt class="py-lineno">3682</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2056" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2056', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3683"></a><tt class="py-lineno">3683</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/x-csv'</tt> </tt>
<a name="L3684"></a><tt class="py-lineno">3684</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L3685"></a><tt class="py-lineno">3685</tt>  <tt class="py-line">            <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L3686"></a><tt class="py-lineno">3686</tt>  <tt class="py-line"> </tt>
<a name="L3687"></a><tt class="py-lineno">3687</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">none_exception</tt><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3688"></a><tt class="py-lineno">3688</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3689"></a><tt class="py-lineno">3689</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-2057" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-2057', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt> </tt>
<a name="L3690"></a><tt class="py-lineno">3690</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-string">'isoformat'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3691"></a><tt class="py-lineno">3691</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">isoformat</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">19</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'T'</tt><tt class="py-op">,</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> </tt>
<a name="L3692"></a><tt class="py-lineno">3692</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L3693"></a><tt class="py-lineno">3693</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;NULL&gt;'</tt> </tt>
<a name="L3694"></a><tt class="py-lineno">3694</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L3695"></a><tt class="py-lineno">3695</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">:</tt> </tt>
<a name="L3696"></a><tt class="py-lineno">3696</tt>  <tt class="py-line">            <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt id="link-2058" class="py-name"><a title="web2py.gluon.tools.universal_caller" class="py-name" href="#" onclick="return doclink('link-2058', 'universal_caller', 'link-2053');">universal_caller</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L3697"></a><tt class="py-lineno">3697</tt>  <tt class="py-line">                                 <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3698"></a><tt class="py-lineno">3698</tt>  <tt class="py-line">            <tt id="link-2059" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2059', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3699"></a><tt class="py-lineno">3699</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-string">'export_to_csv_file'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3700"></a><tt class="py-lineno">3700</tt>  <tt class="py-line">                <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-2060" class="py-name" targets="Method web2py.gluon.dal.DAL.export_to_csv_file()=web2py.gluon.dal.DAL-class.html#export_to_csv_file,Method web2py.gluon.dal.Rows.export_to_csv_file()=web2py.gluon.dal.Rows-class.html#export_to_csv_file"><a title="web2py.gluon.dal.DAL.export_to_csv_file
web2py.gluon.dal.Rows.export_to_csv_file" class="py-name" href="#" onclick="return doclink('link-2060', 'export_to_csv_file', 'link-2060');">export_to_csv_file</a></tt><tt class="py-op">(</tt><tt id="link-2061" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2061', 's', 'link-130');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3701"></a><tt class="py-lineno">3701</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">r</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">,</tt> <tt id="link-2062" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-2062', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3702"></a><tt class="py-lineno">3702</tt>  <tt class="py-line">                <tt class="py-keyword">import</tt> <tt id="link-2063" class="py-name" targets="Function web2py.gluon.serializers.csv()=web2py.gluon.serializers-module.html#csv,Method web2py.gluon.tools.Service.csv()=web2py.gluon.tools.Service-class.html#csv"><a title="web2py.gluon.serializers.csv
web2py.gluon.tools.Service.csv" class="py-name" href="#" onclick="return doclink('link-2063', 'csv', 'link-2063');">csv</a></tt> </tt>
<a name="L3703"></a><tt class="py-lineno">3703</tt>  <tt class="py-line">                <tt class="py-name">writer</tt> <tt class="py-op">=</tt> <tt id="link-2064" class="py-name"><a title="web2py.gluon.serializers.csv
web2py.gluon.tools.Service.csv" class="py-name" href="#" onclick="return doclink('link-2064', 'csv', 'link-2063');">csv</a></tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">(</tt><tt id="link-2065" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2065', 's', 'link-130');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3704"></a><tt class="py-lineno">3704</tt>  <tt class="py-line">                <tt class="py-name">writer</tt><tt class="py-op">.</tt><tt class="py-name">writerow</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-2066" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-2066', 'keys', 'link-677');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3705"></a><tt class="py-lineno">3705</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L3706"></a><tt class="py-lineno">3706</tt>  <tt class="py-line">                    <tt class="py-name">writer</tt><tt class="py-op">.</tt><tt class="py-name">writerow</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">none_exception</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> \ </tt>
<a name="L3707"></a><tt class="py-lineno">3707</tt>  <tt class="py-line">                                     <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt id="link-2067" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-2067', 'values', 'link-2020');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3708"></a><tt class="py-lineno">3708</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3709"></a><tt class="py-lineno">3709</tt>  <tt class="py-line">                <tt class="py-keyword">import</tt> <tt id="link-2068" class="py-name"><a title="web2py.gluon.serializers.csv
web2py.gluon.tools.Service.csv" class="py-name" href="#" onclick="return doclink('link-2068', 'csv', 'link-2063');">csv</a></tt> </tt>
<a name="L3710"></a><tt class="py-lineno">3710</tt>  <tt class="py-line">                <tt class="py-name">writer</tt> <tt class="py-op">=</tt> <tt id="link-2069" class="py-name"><a title="web2py.gluon.serializers.csv
web2py.gluon.tools.Service.csv" class="py-name" href="#" onclick="return doclink('link-2069', 'csv', 'link-2063');">csv</a></tt><tt class="py-op">.</tt><tt class="py-name">writer</tt><tt class="py-op">(</tt><tt id="link-2070" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2070', 's', 'link-130');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3711"></a><tt class="py-lineno">3711</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">r</tt><tt class="py-op">:</tt> </tt>
<a name="L3712"></a><tt class="py-lineno">3712</tt>  <tt class="py-line">                    <tt class="py-name">writer</tt><tt class="py-op">.</tt><tt class="py-name">writerow</tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L3713"></a><tt class="py-lineno">3713</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-2071" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2071', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3714"></a><tt class="py-lineno">3714</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2072" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2072', 'error', 'link-57');">error</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3715"></a><tt class="py-lineno">3715</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_xml"></a><div id="Service.serve_xml-def"><a name="L3716"></a><tt class="py-lineno">3716</tt> <a class="py-toggle" href="#" id="Service.serve_xml-toggle" onclick="return toggle('Service.serve_xml');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_xml">serve_xml</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_xml-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_xml-expanded"><a name="L3717"></a><tt class="py-lineno">3717</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2073" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2073', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3718"></a><tt class="py-lineno">3718</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2074" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2074', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3719"></a><tt class="py-lineno">3719</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/xml'</tt> </tt>
<a name="L3720"></a><tt class="py-lineno">3720</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L3721"></a><tt class="py-lineno">3721</tt>  <tt class="py-line">            <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L3722"></a><tt class="py-lineno">3722</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">:</tt> </tt>
<a name="L3723"></a><tt class="py-lineno">3723</tt>  <tt class="py-line">            <tt id="link-2075" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2075', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-2076" class="py-name"><a title="web2py.gluon.tools.universal_caller" class="py-name" href="#" onclick="return doclink('link-2076', 'universal_caller', 'link-2053');">universal_caller</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">run_procedures</tt><tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L3724"></a><tt class="py-lineno">3724</tt>  <tt class="py-line">                                 <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3725"></a><tt class="py-lineno">3725</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-2077" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2077', 's', 'link-130');">s</a></tt><tt class="py-op">,</tt> <tt class="py-string">'as_list'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3726"></a><tt class="py-lineno">3726</tt>  <tt class="py-line">                <tt id="link-2078" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2078', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-2079" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2079', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-2080" class="py-name"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-2080', 'as_list', 'link-1950');">as_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3727"></a><tt class="py-lineno">3727</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-2081" class="py-name"><a title="web2py.gluon.serializers" class="py-name" href="#" onclick="return doclink('link-2081', 'serializers', 'link-15');">serializers</a></tt><tt class="py-op">.</tt><tt id="link-2082" class="py-name"><a title="web2py.gluon.dal.Rows.xml
web2py.gluon.html.A.xml
web2py.gluon.html.CODE.xml
web2py.gluon.html.DIV.xml
web2py.gluon.html.FORM.xml
web2py.gluon.html.HTML.xml
web2py.gluon.html.INPUT.xml
web2py.gluon.html.MARKMIN.xml
web2py.gluon.html.MENU.xml
web2py.gluon.html.P.xml
web2py.gluon.html.SCRIPT.xml
web2py.gluon.html.STYLE.xml
web2py.gluon.html.XHTML.xml
web2py.gluon.html.XML.xml
web2py.gluon.html.XmlComponent.xml
web2py.gluon.languages.lazyT.xml
web2py.gluon.serializers.xml
web2py.gluon.tools.Recaptcha.xml
web2py.gluon.tools.Service.xml" class="py-name" href="#" onclick="return doclink('link-2082', 'xml', 'link-256');">xml</a></tt><tt class="py-op">(</tt><tt id="link-2083" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2083', 's', 'link-130');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3728"></a><tt class="py-lineno">3728</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2084" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2084', 'error', 'link-57');">error</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3729"></a><tt class="py-lineno">3729</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_rss"></a><div id="Service.serve_rss-def"><a name="L3730"></a><tt class="py-lineno">3730</tt> <a class="py-toggle" href="#" id="Service.serve_rss-toggle" onclick="return toggle('Service.serve_rss');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_rss">serve_rss</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_rss-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_rss-expanded"><a name="L3731"></a><tt class="py-lineno">3731</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2085" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2085', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3732"></a><tt class="py-lineno">3732</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2086" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2086', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3733"></a><tt class="py-lineno">3733</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L3734"></a><tt class="py-lineno">3734</tt>  <tt class="py-line">            <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L3735"></a><tt class="py-lineno">3735</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rss_procedures</tt><tt class="py-op">:</tt> </tt>
<a name="L3736"></a><tt class="py-lineno">3736</tt>  <tt class="py-line">            <tt class="py-name">feed</tt> <tt class="py-op">=</tt> <tt id="link-2087" class="py-name"><a title="web2py.gluon.tools.universal_caller" class="py-name" href="#" onclick="return doclink('link-2087', 'universal_caller', 'link-2053');">universal_caller</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rss_procedures</tt><tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L3737"></a><tt class="py-lineno">3737</tt>  <tt class="py-line">                                    <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3738"></a><tt class="py-lineno">3738</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3739"></a><tt class="py-lineno">3739</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2088" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2088', 'error', 'link-57');">error</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3740"></a><tt class="py-lineno">3740</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'application/rss+xml'</tt> </tt>
<a name="L3741"></a><tt class="py-lineno">3741</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2089" class="py-name"><a title="web2py.gluon.serializers" class="py-name" href="#" onclick="return doclink('link-2089', 'serializers', 'link-15');">serializers</a></tt><tt class="py-op">.</tt><tt id="link-2090" class="py-name" targets="Function web2py.gluon.serializers.rss()=web2py.gluon.serializers-module.html#rss,Method web2py.gluon.tools.Service.rss()=web2py.gluon.tools.Service-class.html#rss"><a title="web2py.gluon.serializers.rss
web2py.gluon.tools.Service.rss" class="py-name" href="#" onclick="return doclink('link-2090', 'rss', 'link-2090');">rss</a></tt><tt class="py-op">(</tt><tt class="py-name">feed</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3742"></a><tt class="py-lineno">3742</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_json"></a><div id="Service.serve_json-def"><a name="L3743"></a><tt class="py-lineno">3743</tt> <a class="py-toggle" href="#" id="Service.serve_json-toggle" onclick="return toggle('Service.serve_json');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_json">serve_json</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_json-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_json-expanded"><a name="L3744"></a><tt class="py-lineno">3744</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2091" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2091', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3745"></a><tt class="py-lineno">3745</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2092" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2092', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3746"></a><tt class="py-lineno">3746</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/x-json'</tt> </tt>
<a name="L3747"></a><tt class="py-lineno">3747</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">args</tt><tt class="py-op">:</tt> </tt>
<a name="L3748"></a><tt class="py-lineno">3748</tt>  <tt class="py-line">            <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L3749"></a><tt class="py-lineno">3749</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">)</tt> </tt>
<a name="L3750"></a><tt class="py-lineno">3750</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">args</tt> <tt class="py-keyword">and</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">json_procedures</tt><tt class="py-op">:</tt> </tt>
<a name="L3751"></a><tt class="py-lineno">3751</tt>  <tt class="py-line">            <tt id="link-2093" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2093', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-2094" class="py-name"><a title="web2py.gluon.tools.universal_caller" class="py-name" href="#" onclick="return doclink('link-2094', 'universal_caller', 'link-2053');">universal_caller</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">json_procedures</tt><tt class="py-op">[</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L3752"></a><tt class="py-lineno">3752</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-2095" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2095', 's', 'link-130');">s</a></tt><tt class="py-op">,</tt> <tt class="py-string">'as_list'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3753"></a><tt class="py-lineno">3753</tt>  <tt class="py-line">                <tt id="link-2096" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2096', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-2097" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2097', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-2098" class="py-name"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-2098', 'as_list', 'link-1950');">as_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3754"></a><tt class="py-lineno">3754</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-2099" class="py-name"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-2099', 'json', 'link-1800');">json</a></tt><tt class="py-op">(</tt><tt id="link-2100" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2100', 's', 'link-130');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3755"></a><tt class="py-lineno">3755</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2101" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2101', 'error', 'link-57');">error</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3756"></a><tt class="py-lineno">3756</tt>  <tt class="py-line"> </tt>
<a name="Service.JsonRpcException"></a><div id="Service.JsonRpcException-def"><a name="L3757"></a><tt class="py-lineno">3757</tt> <a class="py-toggle" href="#" id="Service.JsonRpcException-toggle" onclick="return toggle('Service.JsonRpcException');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.Service.JsonRpcException-class.html">JsonRpcException</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.JsonRpcException-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.JsonRpcException-expanded"><a name="Service.JsonRpcException.__init__"></a><div id="Service.JsonRpcException.__init__-def"><a name="L3758"></a><tt class="py-lineno">3758</tt> <a class="py-toggle" href="#" id="Service.JsonRpcException.__init__-toggle" onclick="return toggle('Service.JsonRpcException.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service.JsonRpcException-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">code</tt><tt class="py-op">,</tt><tt class="py-param">info</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.JsonRpcException.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="Service.JsonRpcException.__init__-expanded"><a name="L3759"></a><tt class="py-lineno">3759</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">code</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">info</tt> <tt class="py-op">=</tt> <tt class="py-name">code</tt><tt class="py-op">,</tt><tt class="py-name">info</tt> </tt>
</div></div><a name="L3760"></a><tt class="py-lineno">3760</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_jsonrpc"></a><div id="Service.serve_jsonrpc-def"><a name="L3761"></a><tt class="py-lineno">3761</tt> <a class="py-toggle" href="#" id="Service.serve_jsonrpc-toggle" onclick="return toggle('Service.serve_jsonrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_jsonrpc">serve_jsonrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_jsonrpc-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_jsonrpc-expanded"><a name="L3762"></a><tt class="py-lineno">3762</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">simplejson</tt> <tt class="py-keyword">as</tt> <tt class="py-name">simplejson</tt> </tt>
<a name="L3763"></a><tt class="py-lineno">3763</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">return_response</tt><tt class="py-op">(</tt><tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">result</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3764"></a><tt class="py-lineno">3764</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-2102" class="py-name"><a title="web2py.gluon.serializers" class="py-name" href="#" onclick="return doclink('link-2102', 'serializers', 'link-15');">serializers</a></tt><tt class="py-op">.</tt><tt id="link-2103" class="py-name"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-2103', 'json', 'link-1800');">json</a></tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">'version'</tt><tt class="py-op">:</tt> <tt class="py-string">'1.1'</tt><tt class="py-op">,</tt> </tt>
<a name="L3765"></a><tt class="py-lineno">3765</tt>  <tt class="py-line">                <tt class="py-string">'id'</tt><tt class="py-op">:</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-string">'result'</tt><tt class="py-op">:</tt> <tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">'error'</tt><tt class="py-op">:</tt> <tt class="py-name">None</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3766"></a><tt class="py-lineno">3766</tt>  <tt class="py-line"> </tt>
<a name="L3767"></a><tt class="py-lineno">3767</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">return_error</tt><tt class="py-op">(</tt><tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">code</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3768"></a><tt class="py-lineno">3768</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-2104" class="py-name"><a title="web2py.gluon.serializers" class="py-name" href="#" onclick="return doclink('link-2104', 'serializers', 'link-15');">serializers</a></tt><tt class="py-op">.</tt><tt id="link-2105" class="py-name"><a title="web2py.gluon.dal.Rows.json
web2py.gluon.globals.Response.json
web2py.gluon.serializers.json
web2py.gluon.tools.Service.json" class="py-name" href="#" onclick="return doclink('link-2105', 'json', 'link-1800');">json</a></tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">'id'</tt><tt class="py-op">:</tt> <tt class="py-name">id</tt><tt class="py-op">,</tt> </tt>
<a name="L3769"></a><tt class="py-lineno">3769</tt>  <tt class="py-line">                                     <tt class="py-string">'version'</tt><tt class="py-op">:</tt> <tt class="py-string">'1.1'</tt><tt class="py-op">,</tt> </tt>
<a name="L3770"></a><tt class="py-lineno">3770</tt>  <tt class="py-line">                                     <tt class="py-string">'error'</tt><tt class="py-op">:</tt> <tt class="py-op">{</tt><tt class="py-string">'name'</tt><tt class="py-op">:</tt> <tt class="py-string">'JSONRPCError'</tt><tt class="py-op">,</tt> </tt>
<a name="L3771"></a><tt class="py-lineno">3771</tt>  <tt class="py-line">                                        <tt class="py-string">'code'</tt><tt class="py-op">:</tt> <tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-string">'message'</tt><tt class="py-op">:</tt> <tt id="link-2106" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-2106', 'message', 'link-69');">message</a></tt><tt class="py-op">}</tt> </tt>
<a name="L3772"></a><tt class="py-lineno">3772</tt>  <tt class="py-line">                                     <tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3773"></a><tt class="py-lineno">3773</tt>  <tt class="py-line"> </tt>
<a name="L3774"></a><tt class="py-lineno">3774</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2107" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2107', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3775"></a><tt class="py-lineno">3775</tt>  <tt class="py-line">        <tt class="py-name">methods</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jsonrpc_procedures</tt> </tt>
<a name="L3776"></a><tt class="py-lineno">3776</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-2108" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-2108', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3777"></a><tt class="py-lineno">3777</tt>  <tt class="py-line">        <tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-name">method</tt><tt class="py-op">,</tt> <tt id="link-2109" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-2109', 'params', 'link-231');">params</a></tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-string">'id'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-string">'method'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-2110" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-2110', 'get', 'link-18');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'params'</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L3778"></a><tt class="py-lineno">3778</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">methods</tt><tt class="py-op">:</tt> </tt>
<a name="L3779"></a><tt class="py-lineno">3779</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">return_error</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-number">100</tt><tt class="py-op">,</tt> <tt class="py-string">'method "%s" does not exist'</tt> <tt class="py-op">%</tt> <tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L3780"></a><tt class="py-lineno">3780</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3781"></a><tt class="py-lineno">3781</tt>  <tt class="py-line">            <tt id="link-2111" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2111', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">methods</tt><tt class="py-op">[</tt><tt class="py-name">method</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-2112" class="py-name"><a title="web2py.gluon.rewrite.params" class="py-name" href="#" onclick="return doclink('link-2112', 'params', 'link-231');">params</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3782"></a><tt class="py-lineno">3782</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-2113" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2113', 's', 'link-130');">s</a></tt><tt class="py-op">,</tt> <tt class="py-string">'as_list'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3783"></a><tt class="py-lineno">3783</tt>  <tt class="py-line">                <tt id="link-2114" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2114', 's', 'link-130');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-2115" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2115', 's', 'link-130');">s</a></tt><tt class="py-op">.</tt><tt id="link-2116" class="py-name"><a title="web2py.gluon.dal.Rows.as_list" class="py-name" href="#" onclick="return doclink('link-2116', 'as_list', 'link-1950');">as_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3784"></a><tt class="py-lineno">3784</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">return_response</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt id="link-2117" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-2117', 's', 'link-130');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3785"></a><tt class="py-lineno">3785</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-2118" class="py-name" targets="Class web2py.gluon.tools.Service=web2py.gluon.tools.Service-class.html,Class web2py.gluon.winservice.Service=web2py.gluon.winservice.Service-class.html"><a title="web2py.gluon.tools.Service
web2py.gluon.winservice.Service" class="py-name" href="#" onclick="return doclink('link-2118', 'Service', 'link-2118');">Service</a></tt><tt class="py-op">.</tt><tt id="link-2119" class="py-name" targets="Class web2py.gluon.tools.Service.JsonRpcException=web2py.gluon.tools.Service.JsonRpcException-class.html"><a title="web2py.gluon.tools.Service.JsonRpcException" class="py-name" href="#" onclick="return doclink('link-2119', 'JsonRpcException', 'link-2119');">JsonRpcException</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L3786"></a><tt class="py-lineno">3786</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">return_error</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">)</tt> </tt>
<a name="L3787"></a><tt class="py-lineno">3787</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">BaseException</tt><tt class="py-op">:</tt> </tt>
<a name="L3788"></a><tt class="py-lineno">3788</tt>  <tt class="py-line">            <tt class="py-name">etype</tt><tt class="py-op">,</tt> <tt class="py-name">eval</tt><tt class="py-op">,</tt> <tt class="py-name">etb</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3789"></a><tt class="py-lineno">3789</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">return_error</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-number">100</tt><tt class="py-op">,</tt> <tt class="py-string">'%s: %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">etype</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">,</tt> <tt class="py-name">eval</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3790"></a><tt class="py-lineno">3790</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3791"></a><tt class="py-lineno">3791</tt>  <tt class="py-line">            <tt class="py-name">etype</tt><tt class="py-op">,</tt> <tt class="py-name">eval</tt><tt class="py-op">,</tt> <tt class="py-name">etb</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3792"></a><tt class="py-lineno">3792</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">return_error</tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-number">100</tt><tt class="py-op">,</tt> <tt class="py-string">'Exception %s: %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">etype</tt><tt class="py-op">,</tt> <tt class="py-name">eval</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3793"></a><tt class="py-lineno">3793</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_xmlrpc"></a><div id="Service.serve_xmlrpc-def"><a name="L3794"></a><tt class="py-lineno">3794</tt> <a class="py-toggle" href="#" id="Service.serve_xmlrpc-toggle" onclick="return toggle('Service.serve_xmlrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_xmlrpc">serve_xmlrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_xmlrpc-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_xmlrpc-expanded"><a name="L3795"></a><tt class="py-lineno">3795</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2120" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2120', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3796"></a><tt class="py-lineno">3796</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2121" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2121', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3797"></a><tt class="py-lineno">3797</tt>  <tt class="py-line">        <tt class="py-name">services</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">xmlrpc_procedures</tt><tt class="py-op">.</tt><tt id="link-2122" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-2122', 'values', 'link-2020');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3798"></a><tt class="py-lineno">3798</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-2123" class="py-name" targets="Method web2py.gluon.globals.Response.xmlrpc()=web2py.gluon.globals.Response-class.html#xmlrpc,Method web2py.gluon.tools.Service.xmlrpc()=web2py.gluon.tools.Service-class.html#xmlrpc,Module web2py.gluon.xmlrpc=web2py.gluon.xmlrpc-module.html"><a title="web2py.gluon.globals.Response.xmlrpc
web2py.gluon.tools.Service.xmlrpc
web2py.gluon.xmlrpc" class="py-name" href="#" onclick="return doclink('link-2123', 'xmlrpc', 'link-2123');">xmlrpc</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">services</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3799"></a><tt class="py-lineno">3799</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_amfrpc"></a><div id="Service.serve_amfrpc-def"><a name="L3800"></a><tt class="py-lineno">3800</tt> <a class="py-toggle" href="#" id="Service.serve_amfrpc-toggle" onclick="return toggle('Service.serve_amfrpc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_amfrpc">serve_amfrpc</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">version</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_amfrpc-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_amfrpc-expanded"><a name="L3801"></a><tt class="py-lineno">3801</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3802"></a><tt class="py-lineno">3802</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">pyamf</tt> </tt>
<a name="L3803"></a><tt class="py-lineno">3803</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt class="py-name">gateway</tt> </tt>
<a name="L3804"></a><tt class="py-lineno">3804</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3805"></a><tt class="py-lineno">3805</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"pyamf not installed or not in Python sys.path"</tt> </tt>
<a name="L3806"></a><tt class="py-lineno">3806</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2124" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2124', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3807"></a><tt class="py-lineno">3807</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2125" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2125', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3808"></a><tt class="py-lineno">3808</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-2126" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-2126', 'version', 'link-429');">version</a></tt> <tt class="py-op">==</tt> <tt class="py-number">3</tt><tt class="py-op">:</tt> </tt>
<a name="L3809"></a><tt class="py-lineno">3809</tt>  <tt class="py-line">            <tt class="py-name">services</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc3_procedures</tt> </tt>
<a name="L3810"></a><tt class="py-lineno">3810</tt>  <tt class="py-line">            <tt class="py-name">base_gateway</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt class="py-name">gateway</tt><tt class="py-op">.</tt><tt class="py-name">BaseGateway</tt><tt class="py-op">(</tt><tt class="py-name">services</tt><tt class="py-op">)</tt> </tt>
<a name="L3811"></a><tt class="py-lineno">3811</tt>  <tt class="py-line">            <tt class="py-name">pyamf_request</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt id="link-2127" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-2127', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">)</tt> </tt>
<a name="L3812"></a><tt class="py-lineno">3812</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3813"></a><tt class="py-lineno">3813</tt>  <tt class="py-line">            <tt class="py-name">services</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">amfrpc_procedures</tt> </tt>
<a name="L3814"></a><tt class="py-lineno">3814</tt>  <tt class="py-line">            <tt class="py-name">base_gateway</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt class="py-name">gateway</tt><tt class="py-op">.</tt><tt class="py-name">BaseGateway</tt><tt class="py-op">(</tt><tt class="py-name">services</tt><tt class="py-op">)</tt> </tt>
<a name="L3815"></a><tt class="py-lineno">3815</tt>  <tt class="py-line">            <tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">get_context</tt><tt class="py-op">(</tt><tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">AMF0</tt><tt class="py-op">)</tt> </tt>
<a name="L3816"></a><tt class="py-lineno">3816</tt>  <tt class="py-line">            <tt class="py-name">pyamf_request</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt id="link-2128" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-2128', 'decode', 'link-88');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
<a name="L3817"></a><tt class="py-lineno">3817</tt>  <tt class="py-line">        <tt class="py-name">pyamf_response</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt class="py-name">Envelope</tt><tt class="py-op">(</tt><tt class="py-name">pyamf_request</tt><tt class="py-op">.</tt><tt class="py-name">amfVersion</tt><tt class="py-op">)</tt> </tt>
<a name="L3818"></a><tt class="py-lineno">3818</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-2129" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-2129', 'name', 'link-590');">name</a></tt><tt class="py-op">,</tt> <tt id="link-2130" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-2130', 'message', 'link-69');">message</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">pyamf_request</tt><tt class="py-op">:</tt> </tt>
<a name="L3819"></a><tt class="py-lineno">3819</tt>  <tt class="py-line">            <tt class="py-name">pyamf_response</tt><tt class="py-op">[</tt><tt id="link-2131" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-2131', 'name', 'link-590');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">base_gateway</tt><tt class="py-op">.</tt><tt class="py-name">getProcessor</tt><tt class="py-op">(</tt><tt id="link-2132" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-2132', 'message', 'link-69');">message</a></tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt id="link-2133" class="py-name"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-2133', 'message', 'link-69');">message</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3820"></a><tt class="py-lineno">3820</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt id="link-2134" class="py-name" targets="Variable web2py.gluon.contenttype.CONTENT_TYPE=web2py.gluon.contenttype-module.html#CONTENT_TYPE"><a title="web2py.gluon.contenttype.CONTENT_TYPE" class="py-name" href="#" onclick="return doclink('link-2134', 'CONTENT_TYPE', 'link-2134');">CONTENT_TYPE</a></tt> </tt>
<a name="L3821"></a><tt class="py-lineno">3821</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-2135" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-2135', 'version', 'link-429');">version</a></tt><tt class="py-op">==</tt><tt class="py-number">3</tt><tt class="py-op">:</tt> </tt>
<a name="L3822"></a><tt class="py-lineno">3822</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt id="link-2136" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-2136', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">pyamf_response</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3823"></a><tt class="py-lineno">3823</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3824"></a><tt class="py-lineno">3824</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">pyamf</tt><tt class="py-op">.</tt><tt class="py-name">remoting</tt><tt class="py-op">.</tt><tt id="link-2137" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-2137', 'encode', 'link-30');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">pyamf_response</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3825"></a><tt class="py-lineno">3825</tt>  <tt class="py-line"> </tt>
<a name="Service.serve_soap"></a><div id="Service.serve_soap-def"><a name="L3826"></a><tt class="py-lineno">3826</tt> <a class="py-toggle" href="#" id="Service.serve_soap-toggle" onclick="return toggle('Service.serve_soap');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#serve_soap">serve_soap</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">version</tt><tt class="py-op">=</tt><tt class="py-string">"1.1"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.serve_soap-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.serve_soap-expanded"><a name="L3827"></a><tt class="py-lineno">3827</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3828"></a><tt class="py-lineno">3828</tt>  <tt class="py-line">            <tt class="py-keyword">from</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">pysimplesoap</tt><tt class="py-op">.</tt><tt id="link-2138" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-2138', 'server', 'link-38');">server</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">SoapDispatcher</tt> </tt>
<a name="L3829"></a><tt class="py-lineno">3829</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3830"></a><tt class="py-lineno">3830</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"pysimplesoap not installed in contrib"</tt> </tt>
<a name="L3831"></a><tt class="py-lineno">3831</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2139" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2139', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3832"></a><tt class="py-lineno">3832</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-2140" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2140', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">response</tt> </tt>
<a name="L3833"></a><tt class="py-lineno">3833</tt>  <tt class="py-line">        <tt class="py-name">procedures</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">soap_procedures</tt> </tt>
<a name="L3834"></a><tt class="py-lineno">3834</tt>  <tt class="py-line"> </tt>
<a name="L3835"></a><tt class="py-lineno">3835</tt>  <tt class="py-line">        <tt class="py-name">location</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s://%s%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L3836"></a><tt class="py-lineno">3836</tt>  <tt class="py-line">                        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-2141" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-2141', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">wsgi_url_scheme</tt><tt class="py-op">,</tt> </tt>
<a name="L3837"></a><tt class="py-lineno">3837</tt>  <tt class="py-line">                        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-2142" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-2142', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">http_host</tt><tt class="py-op">,</tt> </tt>
<a name="L3838"></a><tt class="py-lineno">3838</tt>  <tt class="py-line">                        <tt id="link-2143" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-2143', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-string">"call/soap"</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3839"></a><tt class="py-lineno">3839</tt>  <tt class="py-line">        <tt class="py-name">namespace</tt> <tt class="py-op">=</tt> <tt class="py-string">'namespace'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt> <tt class="py-keyword">and</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">namespace</tt> <tt class="py-keyword">or</tt> <tt class="py-name">location</tt> </tt>
<a name="L3840"></a><tt class="py-lineno">3840</tt>  <tt class="py-line">        <tt class="py-name">documentation</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">description</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L3841"></a><tt class="py-lineno">3841</tt>  <tt class="py-line">        <tt class="py-name">dispatcher</tt> <tt class="py-op">=</tt> <tt class="py-name">SoapDispatcher</tt><tt class="py-op">(</tt> </tt>
<a name="L3842"></a><tt class="py-lineno">3842</tt>  <tt class="py-line">            <tt id="link-2144" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-2144', 'name', 'link-590');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">title</tt><tt class="py-op">,</tt> </tt>
<a name="L3843"></a><tt class="py-lineno">3843</tt>  <tt class="py-line">            <tt class="py-name">location</tt> <tt class="py-op">=</tt> <tt class="py-name">location</tt><tt class="py-op">,</tt> </tt>
<a name="L3844"></a><tt class="py-lineno">3844</tt>  <tt class="py-line">            <tt class="py-name">action</tt> <tt class="py-op">=</tt> <tt class="py-name">location</tt><tt class="py-op">,</tt> <tt class="py-comment"># SOAPAction</tt> </tt>
<a name="L3845"></a><tt class="py-lineno">3845</tt>  <tt class="py-line">            <tt class="py-name">namespace</tt> <tt class="py-op">=</tt> <tt class="py-name">namespace</tt><tt class="py-op">,</tt> </tt>
<a name="L3846"></a><tt class="py-lineno">3846</tt>  <tt class="py-line">            <tt class="py-name">prefix</tt><tt class="py-op">=</tt><tt class="py-string">'pys'</tt><tt class="py-op">,</tt> </tt>
<a name="L3847"></a><tt class="py-lineno">3847</tt>  <tt class="py-line">            <tt class="py-name">documentation</tt> <tt class="py-op">=</tt> <tt class="py-name">documentation</tt><tt class="py-op">,</tt> </tt>
<a name="L3848"></a><tt class="py-lineno">3848</tt>  <tt class="py-line">            <tt class="py-name">ns</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L3849"></a><tt class="py-lineno">3849</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">returns</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">procedures</tt><tt class="py-op">.</tt><tt id="link-2145" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-2145', 'items', 'link-2145');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3850"></a><tt class="py-lineno">3850</tt>  <tt class="py-line">            <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">register_function</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">function</tt><tt class="py-op">,</tt> <tt class="py-name">returns</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt><tt class="py-op">)</tt> </tt>
<a name="L3851"></a><tt class="py-lineno">3851</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt id="link-2146" class="py-name"><a title="web2py.gluon.shell.env" class="py-name" href="#" onclick="return doclink('link-2146', 'env', 'link-223');">env</a></tt><tt class="py-op">.</tt><tt class="py-name">request_method</tt> <tt class="py-op">==</tt> <tt class="py-string">'POST'</tt><tt class="py-op">:</tt> </tt>
<a name="L3852"></a><tt class="py-lineno">3852</tt>  <tt class="py-line">            <tt class="py-comment"># Process normal Soap Operation</tt> </tt>
<a name="L3853"></a><tt class="py-lineno">3853</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/xml'</tt> </tt>
<a name="L3854"></a><tt class="py-lineno">3854</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">dispatch</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-2147" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-2147', 'read', 'link-29');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3855"></a><tt class="py-lineno">3855</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'WSDL'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L3856"></a><tt class="py-lineno">3856</tt>  <tt class="py-line">            <tt class="py-comment"># Return Web Service Description</tt> </tt>
<a name="L3857"></a><tt class="py-lineno">3857</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/xml'</tt> </tt>
<a name="L3858"></a><tt class="py-lineno">3858</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">wsdl</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3859"></a><tt class="py-lineno">3859</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-string">'op'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">:</tt> </tt>
<a name="L3860"></a><tt class="py-lineno">3860</tt>  <tt class="py-line">            <tt class="py-comment"># Return method help webpage</tt> </tt>
<a name="L3861"></a><tt class="py-lineno">3861</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/html'</tt> </tt>
<a name="L3862"></a><tt class="py-lineno">3862</tt>  <tt class="py-line">            <tt class="py-name">method</tt>  <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">vars</tt><tt class="py-op">[</tt><tt class="py-string">'op'</tt><tt class="py-op">]</tt> </tt>
<a name="L3863"></a><tt class="py-lineno">3863</tt>  <tt class="py-line">            <tt class="py-name">sample_req_xml</tt><tt class="py-op">,</tt> <tt class="py-name">sample_res_xml</tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">help</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L3864"></a><tt class="py-lineno">3864</tt>  <tt class="py-line">            <tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-2148" class="py-name" targets="Class web2py.gluon.html.H1=web2py.gluon.html.H1-class.html"><a title="web2py.gluon.html.H1" class="py-name" href="#" onclick="return doclink('link-2148', 'H1', 'link-2148');">H1</a></tt><tt class="py-op">(</tt><tt class="py-string">"Welcome to Web2Py SOAP webservice gateway"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3865"></a><tt class="py-lineno">3865</tt>  <tt class="py-line">                    <tt id="link-2149" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-2149', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt class="py-string">"See all webservice operations"</tt><tt class="py-op">,</tt> </tt>
<a name="L3866"></a><tt class="py-lineno">3866</tt>  <tt class="py-line">                      <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt id="link-2150" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-2150', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-string">"call/soap"</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3867"></a><tt class="py-lineno">3867</tt>  <tt class="py-line">                    <tt id="link-2151" class="py-name" targets="Class web2py.gluon.html.H2=web2py.gluon.html.H2-class.html"><a title="web2py.gluon.html.H2" class="py-name" href="#" onclick="return doclink('link-2151', 'H2', 'link-2151');">H2</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3868"></a><tt class="py-lineno">3868</tt>  <tt class="py-line">                    <tt id="link-2152" class="py-name"><a title="web2py.gluon.html.P" class="py-name" href="#" onclick="return doclink('link-2152', 'P', 'link-1432');">P</a></tt><tt class="py-op">(</tt><tt class="py-name">doc</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3869"></a><tt class="py-lineno">3869</tt>  <tt class="py-line">                    <tt id="link-2153" class="py-name" targets="Class web2py.gluon.html.UL=web2py.gluon.html.UL-class.html"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-2153', 'UL', 'link-2153');">UL</a></tt><tt class="py-op">(</tt><tt id="link-2154" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-2154', 'LI', 'link-278');">LI</a></tt><tt class="py-op">(</tt><tt class="py-string">"Location: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">location</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3870"></a><tt class="py-lineno">3870</tt>  <tt class="py-line">                       <tt id="link-2155" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-2155', 'LI', 'link-278');">LI</a></tt><tt class="py-op">(</tt><tt class="py-string">"Namespace: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">namespace</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3871"></a><tt class="py-lineno">3871</tt>  <tt class="py-line">                       <tt id="link-2156" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-2156', 'LI', 'link-278');">LI</a></tt><tt class="py-op">(</tt><tt class="py-string">"SoapAction: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">action</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3872"></a><tt class="py-lineno">3872</tt>  <tt class="py-line">                    <tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3873"></a><tt class="py-lineno">3873</tt>  <tt class="py-line">                    <tt id="link-2157" class="py-name"><a title="web2py.gluon.html.H3" class="py-name" href="#" onclick="return doclink('link-2157', 'H3', 'link-1429');">H3</a></tt><tt class="py-op">(</tt><tt class="py-string">"Sample SOAP XML Request Message:"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3874"></a><tt class="py-lineno">3874</tt>  <tt class="py-line">                    <tt id="link-2158" class="py-name" targets="Class web2py.gluon.html.CODE=web2py.gluon.html.CODE-class.html"><a title="web2py.gluon.html.CODE" class="py-name" href="#" onclick="return doclink('link-2158', 'CODE', 'link-2158');">CODE</a></tt><tt class="py-op">(</tt><tt class="py-name">sample_req_xml</tt><tt class="py-op">,</tt><tt class="py-name">language</tt><tt class="py-op">=</tt><tt class="py-string">"xml"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3875"></a><tt class="py-lineno">3875</tt>  <tt class="py-line">                    <tt id="link-2159" class="py-name"><a title="web2py.gluon.html.H3" class="py-name" href="#" onclick="return doclink('link-2159', 'H3', 'link-1429');">H3</a></tt><tt class="py-op">(</tt><tt class="py-string">"Sample SOAP XML Response Message:"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3876"></a><tt class="py-lineno">3876</tt>  <tt class="py-line">                    <tt id="link-2160" class="py-name"><a title="web2py.gluon.html.CODE" class="py-name" href="#" onclick="return doclink('link-2160', 'CODE', 'link-2158');">CODE</a></tt><tt class="py-op">(</tt><tt class="py-name">sample_res_xml</tt><tt class="py-op">,</tt><tt class="py-name">language</tt><tt class="py-op">=</tt><tt class="py-string">"xml"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3877"></a><tt class="py-lineno">3877</tt>  <tt class="py-line">                    <tt class="py-op">]</tt> </tt>
<a name="L3878"></a><tt class="py-lineno">3878</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">{</tt><tt class="py-string">'body'</tt><tt class="py-op">:</tt> <tt class="py-name">body</tt><tt class="py-op">}</tt> </tt>
<a name="L3879"></a><tt class="py-lineno">3879</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3880"></a><tt class="py-lineno">3880</tt>  <tt class="py-line">            <tt class="py-comment"># Return general help and method list webpage</tt> </tt>
<a name="L3881"></a><tt class="py-lineno">3881</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/html'</tt> </tt>
<a name="L3882"></a><tt class="py-lineno">3882</tt>  <tt class="py-line">            <tt class="py-name">body</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-2161" class="py-name"><a title="web2py.gluon.html.H1" class="py-name" href="#" onclick="return doclink('link-2161', 'H1', 'link-2148');">H1</a></tt><tt class="py-op">(</tt><tt class="py-string">"Welcome to Web2Py SOAP webservice gateway"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3883"></a><tt class="py-lineno">3883</tt>  <tt class="py-line">                    <tt id="link-2162" class="py-name"><a title="web2py.gluon.html.P" class="py-name" href="#" onclick="return doclink('link-2162', 'P', 'link-1432');">P</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">description</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3884"></a><tt class="py-lineno">3884</tt>  <tt class="py-line">                    <tt id="link-2163" class="py-name"><a title="web2py.gluon.html.P" class="py-name" href="#" onclick="return doclink('link-2163', 'P', 'link-1432');">P</a></tt><tt class="py-op">(</tt><tt class="py-string">"The following operations are available"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3885"></a><tt class="py-lineno">3885</tt>  <tt class="py-line">                    <tt id="link-2164" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-2164', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt class="py-string">"See WSDL for webservice description"</tt><tt class="py-op">,</tt> </tt>
<a name="L3886"></a><tt class="py-lineno">3886</tt>  <tt class="py-line">                      <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt id="link-2165" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-2165', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-string">"call/soap"</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">"WSDL"</tt><tt class="py-op">:</tt><tt class="py-name">None</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3887"></a><tt class="py-lineno">3887</tt>  <tt class="py-line">                    <tt id="link-2166" class="py-name"><a title="web2py.gluon.html.UL" class="py-name" href="#" onclick="return doclink('link-2166', 'UL', 'link-2153');">UL</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-2167" class="py-name"><a title="web2py.gluon.html.LI" class="py-name" href="#" onclick="return doclink('link-2167', 'LI', 'link-278');">LI</a></tt><tt class="py-op">(</tt><tt id="link-2168" class="py-name"><a title="web2py.gluon.html.A" class="py-name" href="#" onclick="return doclink('link-2168', 'A', 'link-443');">A</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3888"></a><tt class="py-lineno">3888</tt>  <tt class="py-line">                             <tt class="py-name">_href</tt><tt class="py-op">=</tt><tt id="link-2169" class="py-name"><a title="web2py.gluon.html.URL" class="py-name" href="#" onclick="return doclink('link-2169', 'URL', 'link-288');">URL</a></tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">=</tt><tt class="py-name">request</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">=</tt><tt class="py-string">"call/soap"</tt><tt class="py-op">,</tt><tt class="py-name">vars</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'op'</tt><tt class="py-op">:</tt> <tt class="py-name">method</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L3889"></a><tt class="py-lineno">3889</tt>  <tt class="py-line">                        <tt class="py-keyword">for</tt> <tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">doc</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">list_methods</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L3890"></a><tt class="py-lineno">3890</tt>  <tt class="py-line">                    <tt class="py-op">]</tt> </tt>
<a name="L3891"></a><tt class="py-lineno">3891</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">{</tt><tt class="py-string">'body'</tt><tt class="py-op">:</tt> <tt class="py-name">body</tt><tt class="py-op">}</tt> </tt>
</div><a name="L3892"></a><tt class="py-lineno">3892</tt>  <tt class="py-line"> </tt>
<a name="Service.__call__"></a><div id="Service.__call__-def"><a name="L3893"></a><tt class="py-lineno">3893</tt> <a class="py-toggle" href="#" id="Service.__call__-toggle" onclick="return toggle('Service.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.__call__-expanded"><a name="L3894"></a><tt class="py-lineno">3894</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L3895"></a><tt class="py-lineno">3895</tt>  <tt class="py-line"><tt class="py-docstring">        register services with:</tt> </tt>
<a name="L3896"></a><tt class="py-lineno">3896</tt>  <tt class="py-line"><tt class="py-docstring">        service = Service(globals())</tt> </tt>
<a name="L3897"></a><tt class="py-lineno">3897</tt>  <tt class="py-line"><tt class="py-docstring">        @service.run</tt> </tt>
<a name="L3898"></a><tt class="py-lineno">3898</tt>  <tt class="py-line"><tt class="py-docstring">        @service.rss</tt> </tt>
<a name="L3899"></a><tt class="py-lineno">3899</tt>  <tt class="py-line"><tt class="py-docstring">        @service.json</tt> </tt>
<a name="L3900"></a><tt class="py-lineno">3900</tt>  <tt class="py-line"><tt class="py-docstring">        @service.jsonrpc</tt> </tt>
<a name="L3901"></a><tt class="py-lineno">3901</tt>  <tt class="py-line"><tt class="py-docstring">        @service.xmlrpc</tt> </tt>
<a name="L3902"></a><tt class="py-lineno">3902</tt>  <tt class="py-line"><tt class="py-docstring">        @service.jsonrpc</tt> </tt>
<a name="L3903"></a><tt class="py-lineno">3903</tt>  <tt class="py-line"><tt class="py-docstring">        @service.amfrpc</tt> </tt>
<a name="L3904"></a><tt class="py-lineno">3904</tt>  <tt class="py-line"><tt class="py-docstring">        @service.amfrpc3('domain')</tt> </tt>
<a name="L3905"></a><tt class="py-lineno">3905</tt>  <tt class="py-line"><tt class="py-docstring">        @service.soap('Method', returns={'Result':int}, args={'a':int,'b':int,})</tt> </tt>
<a name="L3906"></a><tt class="py-lineno">3906</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3907"></a><tt class="py-lineno">3907</tt>  <tt class="py-line"><tt class="py-docstring">        expose services with</tt> </tt>
<a name="L3908"></a><tt class="py-lineno">3908</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3909"></a><tt class="py-lineno">3909</tt>  <tt class="py-line"><tt class="py-docstring">        def call(): return service()</tt> </tt>
<a name="L3910"></a><tt class="py-lineno">3910</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3911"></a><tt class="py-lineno">3911</tt>  <tt class="py-line"><tt class="py-docstring">        call services with</tt> </tt>
<a name="L3912"></a><tt class="py-lineno">3912</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/run?[parameters]</tt> </tt>
<a name="L3913"></a><tt class="py-lineno">3913</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/rss?[parameters]</tt> </tt>
<a name="L3914"></a><tt class="py-lineno">3914</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/json?[parameters]</tt> </tt>
<a name="L3915"></a><tt class="py-lineno">3915</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/jsonrpc</tt> </tt>
<a name="L3916"></a><tt class="py-lineno">3916</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/xmlrpc</tt> </tt>
<a name="L3917"></a><tt class="py-lineno">3917</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/amfrpc</tt> </tt>
<a name="L3918"></a><tt class="py-lineno">3918</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/amfrpc3</tt> </tt>
<a name="L3919"></a><tt class="py-lineno">3919</tt>  <tt class="py-line"><tt class="py-docstring">        http://..../app/default/call/soap</tt> </tt>
<a name="L3920"></a><tt class="py-lineno">3920</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L3921"></a><tt class="py-lineno">3921</tt>  <tt class="py-line"> </tt>
<a name="L3922"></a><tt class="py-lineno">3922</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-2170" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-2170', 'current', 'link-291');">current</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt> </tt>
<a name="L3923"></a><tt class="py-lineno">3923</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-2171" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-2171', 'len', 'link-229');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L3924"></a><tt class="py-lineno">3924</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-2172" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-2172', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> <tt class="py-string">"Not Found"</tt><tt class="py-op">)</tt> </tt>
<a name="L3925"></a><tt class="py-lineno">3925</tt>  <tt class="py-line">        <tt id="link-2173" class="py-name" targets="Variable web2py.gluon.rewrite.MapUrlIn.arg0=web2py.gluon.rewrite.MapUrlIn-class.html#arg0"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2173', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L3926"></a><tt class="py-lineno">3926</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-2174" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2174', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'run'</tt><tt class="py-op">:</tt> </tt>
<a name="L3927"></a><tt class="py-lineno">3927</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2175" class="py-name" targets="Method web2py.gluon.tools.Service.serve_run()=web2py.gluon.tools.Service-class.html#serve_run"><a title="web2py.gluon.tools.Service.serve_run" class="py-name" href="#" onclick="return doclink('link-2175', 'serve_run', 'link-2175');">serve_run</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3928"></a><tt class="py-lineno">3928</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2176" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2176', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'rss'</tt><tt class="py-op">:</tt> </tt>
<a name="L3929"></a><tt class="py-lineno">3929</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2177" class="py-name" targets="Method web2py.gluon.tools.Service.serve_rss()=web2py.gluon.tools.Service-class.html#serve_rss"><a title="web2py.gluon.tools.Service.serve_rss" class="py-name" href="#" onclick="return doclink('link-2177', 'serve_rss', 'link-2177');">serve_rss</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3930"></a><tt class="py-lineno">3930</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2178" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2178', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'csv'</tt><tt class="py-op">:</tt> </tt>
<a name="L3931"></a><tt class="py-lineno">3931</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2179" class="py-name" targets="Method web2py.gluon.tools.Service.serve_csv()=web2py.gluon.tools.Service-class.html#serve_csv"><a title="web2py.gluon.tools.Service.serve_csv" class="py-name" href="#" onclick="return doclink('link-2179', 'serve_csv', 'link-2179');">serve_csv</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3932"></a><tt class="py-lineno">3932</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2180" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2180', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'xml'</tt><tt class="py-op">:</tt> </tt>
<a name="L3933"></a><tt class="py-lineno">3933</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2181" class="py-name" targets="Method web2py.gluon.tools.Service.serve_xml()=web2py.gluon.tools.Service-class.html#serve_xml"><a title="web2py.gluon.tools.Service.serve_xml" class="py-name" href="#" onclick="return doclink('link-2181', 'serve_xml', 'link-2181');">serve_xml</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3934"></a><tt class="py-lineno">3934</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2182" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2182', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'json'</tt><tt class="py-op">:</tt> </tt>
<a name="L3935"></a><tt class="py-lineno">3935</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2183" class="py-name" targets="Method web2py.gluon.tools.Service.serve_json()=web2py.gluon.tools.Service-class.html#serve_json"><a title="web2py.gluon.tools.Service.serve_json" class="py-name" href="#" onclick="return doclink('link-2183', 'serve_json', 'link-2183');">serve_json</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L3936"></a><tt class="py-lineno">3936</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2184" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2184', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'jsonrpc'</tt><tt class="py-op">:</tt> </tt>
<a name="L3937"></a><tt class="py-lineno">3937</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2185" class="py-name" targets="Method web2py.gluon.tools.Service.serve_jsonrpc()=web2py.gluon.tools.Service-class.html#serve_jsonrpc"><a title="web2py.gluon.tools.Service.serve_jsonrpc" class="py-name" href="#" onclick="return doclink('link-2185', 'serve_jsonrpc', 'link-2185');">serve_jsonrpc</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3938"></a><tt class="py-lineno">3938</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2186" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2186', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'xmlrpc'</tt><tt class="py-op">:</tt> </tt>
<a name="L3939"></a><tt class="py-lineno">3939</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2187" class="py-name" targets="Method web2py.gluon.tools.Service.serve_xmlrpc()=web2py.gluon.tools.Service-class.html#serve_xmlrpc"><a title="web2py.gluon.tools.Service.serve_xmlrpc" class="py-name" href="#" onclick="return doclink('link-2187', 'serve_xmlrpc', 'link-2187');">serve_xmlrpc</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3940"></a><tt class="py-lineno">3940</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2188" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2188', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'amfrpc'</tt><tt class="py-op">:</tt> </tt>
<a name="L3941"></a><tt class="py-lineno">3941</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2189" class="py-name" targets="Method web2py.gluon.tools.Service.serve_amfrpc()=web2py.gluon.tools.Service-class.html#serve_amfrpc"><a title="web2py.gluon.tools.Service.serve_amfrpc" class="py-name" href="#" onclick="return doclink('link-2189', 'serve_amfrpc', 'link-2189');">serve_amfrpc</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3942"></a><tt class="py-lineno">3942</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2190" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2190', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'amfrpc3'</tt><tt class="py-op">:</tt> </tt>
<a name="L3943"></a><tt class="py-lineno">3943</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2191" class="py-name"><a title="web2py.gluon.tools.Service.serve_amfrpc" class="py-name" href="#" onclick="return doclink('link-2191', 'serve_amfrpc', 'link-2189');">serve_amfrpc</a></tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
<a name="L3944"></a><tt class="py-lineno">3944</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-2192" class="py-name"><a title="web2py.gluon.rewrite.MapUrlIn.arg0" class="py-name" href="#" onclick="return doclink('link-2192', 'arg0', 'link-2173');">arg0</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'soap'</tt><tt class="py-op">:</tt> </tt>
<a name="L3945"></a><tt class="py-lineno">3945</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2193" class="py-name" targets="Method web2py.gluon.tools.Service.serve_soap()=web2py.gluon.tools.Service-class.html#serve_soap"><a title="web2py.gluon.tools.Service.serve_soap" class="py-name" href="#" onclick="return doclink('link-2193', 'serve_soap', 'link-2193');">serve_soap</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L3946"></a><tt class="py-lineno">3946</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L3947"></a><tt class="py-lineno">3947</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2194" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-2194', 'error', 'link-57');">error</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3948"></a><tt class="py-lineno">3948</tt>  <tt class="py-line"> </tt>
<a name="Service.error"></a><div id="Service.error-def"><a name="L3949"></a><tt class="py-lineno">3949</tt> <a class="py-toggle" href="#" id="Service.error-toggle" onclick="return toggle('Service.error');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.Service-class.html#error">error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Service.error-expanded"><a name="L3950"></a><tt class="py-lineno">3950</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-2195" class="py-name"><a title="web2py.gluon.http.HTTP" class="py-name" href="#" onclick="return doclink('link-2195', 'HTTP', 'link-420');">HTTP</a></tt><tt class="py-op">(</tt><tt class="py-number">404</tt><tt class="py-op">,</tt> <tt class="py-string">"Object does not exist"</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L3951"></a><tt class="py-lineno">3951</tt>  <tt class="py-line"> </tt>
<a name="L3952"></a><tt class="py-lineno">3952</tt>  <tt class="py-line"> </tt>
<a name="completion"></a><div id="completion-def"><a name="L3953"></a><tt class="py-lineno">3953</tt> <a class="py-toggle" href="#" id="completion-toggle" onclick="return toggle('completion');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#completion">completion</a><tt class="py-op">(</tt><tt class="py-param">callback</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="completion-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="completion-expanded"><a name="L3954"></a><tt class="py-lineno">3954</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L3955"></a><tt class="py-lineno">3955</tt>  <tt class="py-line"><tt class="py-docstring">    Executes a task on completion of the called action. For example:</tt> </tt>
<a name="L3956"></a><tt class="py-lineno">3956</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3957"></a><tt class="py-lineno">3957</tt>  <tt class="py-line"><tt class="py-docstring">        from gluon.tools import completion</tt> </tt>
<a name="L3958"></a><tt class="py-lineno">3958</tt>  <tt class="py-line"><tt class="py-docstring">        @completion(lambda d: logging.info(repr(d)))</tt> </tt>
<a name="L3959"></a><tt class="py-lineno">3959</tt>  <tt class="py-line"><tt class="py-docstring">        def index():</tt> </tt>
<a name="L3960"></a><tt class="py-lineno">3960</tt>  <tt class="py-line"><tt class="py-docstring">            return dict(message='hello')</tt> </tt>
<a name="L3961"></a><tt class="py-lineno">3961</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3962"></a><tt class="py-lineno">3962</tt>  <tt class="py-line"><tt class="py-docstring">    It logs the output of the function every time input is called.</tt> </tt>
<a name="L3963"></a><tt class="py-lineno">3963</tt>  <tt class="py-line"><tt class="py-docstring">    The argument of completion is executed in a new thread.</tt> </tt>
<a name="L3964"></a><tt class="py-lineno">3964</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L3965"></a><tt class="py-lineno">3965</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">_completion</tt><tt class="py-op">(</tt><tt class="py-param">f</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3966"></a><tt class="py-lineno">3966</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">__completion</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L3967"></a><tt class="py-lineno">3967</tt>  <tt class="py-line">            <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L3968"></a><tt class="py-lineno">3968</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3969"></a><tt class="py-lineno">3969</tt>  <tt class="py-line">                <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt id="link-2196" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-2196', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
<a name="L3970"></a><tt class="py-lineno">3970</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">d</tt> </tt>
<a name="L3971"></a><tt class="py-lineno">3971</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L3972"></a><tt class="py-lineno">3972</tt>  <tt class="py-line">                <tt id="link-2197" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-2197', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">start_new_thread</tt><tt class="py-op">(</tt><tt id="link-2198" class="py-name"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-2198', 'callback', 'link-132');">callback</a></tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L3973"></a><tt class="py-lineno">3973</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">__completion</tt> </tt>
</div><a name="L3974"></a><tt class="py-lineno">3974</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">_completion</tt> </tt>
</div><a name="L3975"></a><tt class="py-lineno">3975</tt>  <tt class="py-line"> </tt>
<a name="prettydate"></a><div id="prettydate-def"><a name="L3976"></a><tt class="py-lineno">3976</tt> <a class="py-toggle" href="#" id="prettydate-toggle" onclick="return toggle('prettydate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#prettydate">prettydate</a><tt class="py-op">(</tt><tt class="py-param">d</tt><tt class="py-op">,</tt><tt class="py-param">T</tt><tt class="py-op">=</tt><tt class="py-keyword">lambda</tt> <tt id="link-2199" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-2199', 'x', 'link-114');">x</a></tt><tt class="py-op">:</tt><tt id="link-2200" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-2200', 'x', 'link-114');">x</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="prettydate-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="prettydate-expanded"><a name="L3977"></a><tt class="py-lineno">3977</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L3978"></a><tt class="py-lineno">3978</tt>  <tt class="py-line">        <tt class="py-name">dt</tt> <tt class="py-op">=</tt> <tt id="link-2201" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-2201', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-2202" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-2202', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">d</tt> </tt>
<a name="L3979"></a><tt class="py-lineno">3979</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L3980"></a><tt class="py-lineno">3980</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
<a name="L3981"></a><tt class="py-lineno">3981</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">2</tt><tt class="py-op">*</tt><tt class="py-number">365</tt><tt class="py-op">:</tt> </tt>
<a name="L3982"></a><tt class="py-lineno">3982</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2203" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2203', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d years ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">/</tt> <tt class="py-number">365</tt><tt class="py-op">)</tt> </tt>
<a name="L3983"></a><tt class="py-lineno">3983</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">365</tt><tt class="py-op">:</tt> </tt>
<a name="L3984"></a><tt class="py-lineno">3984</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2204" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2204', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 year ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L3985"></a><tt class="py-lineno">3985</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">60</tt><tt class="py-op">:</tt> </tt>
<a name="L3986"></a><tt class="py-lineno">3986</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2205" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2205', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d months ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">/</tt> <tt class="py-number">30</tt><tt class="py-op">)</tt> </tt>
<a name="L3987"></a><tt class="py-lineno">3987</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">21</tt><tt class="py-op">:</tt> </tt>
<a name="L3988"></a><tt class="py-lineno">3988</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2206" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2206', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 month ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L3989"></a><tt class="py-lineno">3989</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">14</tt><tt class="py-op">:</tt> </tt>
<a name="L3990"></a><tt class="py-lineno">3990</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2207" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2207', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d weeks ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">/</tt> <tt class="py-number">7</tt><tt class="py-op">)</tt> </tt>
<a name="L3991"></a><tt class="py-lineno">3991</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">7</tt><tt class="py-op">:</tt> </tt>
<a name="L3992"></a><tt class="py-lineno">3992</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2208" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2208', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 week ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L3993"></a><tt class="py-lineno">3993</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L3994"></a><tt class="py-lineno">3994</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2209" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2209', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d days ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> </tt>
<a name="L3995"></a><tt class="py-lineno">3995</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">days</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L3996"></a><tt class="py-lineno">3996</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2210" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2210', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 day ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L3997"></a><tt class="py-lineno">3997</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2211" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2211', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">2</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">:</tt> </tt>
<a name="L3998"></a><tt class="py-lineno">3998</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2212" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2212', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d hours ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2213" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2213', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">/</tt> <tt class="py-number">3600</tt><tt class="py-op">)</tt> </tt>
<a name="L3999"></a><tt class="py-lineno">3999</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2214" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2214', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">60</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">:</tt> </tt>
<a name="L4000"></a><tt class="py-lineno">4000</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2215" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2215', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 hour ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L4001"></a><tt class="py-lineno">4001</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2216" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2216', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">2</tt><tt class="py-op">*</tt><tt class="py-number">60</tt><tt class="py-op">:</tt> </tt>
<a name="L4002"></a><tt class="py-lineno">4002</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2217" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2217', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d minutes ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2218" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2218', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">/</tt> <tt class="py-number">60</tt><tt class="py-op">)</tt> </tt>
<a name="L4003"></a><tt class="py-lineno">4003</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2219" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2219', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">60</tt><tt class="py-op">:</tt> </tt>
<a name="L4004"></a><tt class="py-lineno">4004</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2220" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2220', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 minute ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L4005"></a><tt class="py-lineno">4005</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2221" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2221', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L4006"></a><tt class="py-lineno">4006</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2222" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2222', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'%d seconds ago'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2223" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2223', 'seconds', 'link-295');">seconds</a></tt> </tt>
<a name="L4007"></a><tt class="py-lineno">4007</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-2224" class="py-name"><a title="web2py.gluon.dal.Expression.seconds" class="py-name" href="#" onclick="return doclink('link-2224', 'seconds', 'link-295');">seconds</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L4008"></a><tt class="py-lineno">4008</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2225" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2225', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'1 second ago'</tt><tt class="py-op">)</tt> </tt>
<a name="L4009"></a><tt class="py-lineno">4009</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L4010"></a><tt class="py-lineno">4010</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-2226" class="py-name"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-2226', 'T', 'link-393');">T</a></tt><tt class="py-op">(</tt><tt class="py-string">'now'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L4011"></a><tt class="py-lineno">4011</tt>  <tt class="py-line"> </tt>
<a name="test_thread_separation"></a><div id="test_thread_separation-def"><a name="L4012"></a><tt class="py-lineno">4012</tt> <a class="py-toggle" href="#" id="test_thread_separation-toggle" onclick="return toggle('test_thread_separation');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools-module.html#test_thread_separation">test_thread_separation</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="test_thread_separation-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="test_thread_separation-expanded"><a name="L4013"></a><tt class="py-lineno">4013</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">f</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L4014"></a><tt class="py-lineno">4014</tt>  <tt class="py-line">        <tt class="py-name">c</tt><tt class="py-op">=</tt><tt id="link-2227" class="py-name" targets="Class web2py.gluon.tools.PluginManager=web2py.gluon.tools.PluginManager-class.html"><a title="web2py.gluon.tools.PluginManager" class="py-name" href="#" onclick="return doclink('link-2227', 'PluginManager', 'link-2227');">PluginManager</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4015"></a><tt class="py-lineno">4015</tt>  <tt class="py-line">        <tt class="py-name">lock1</tt><tt class="py-op">.</tt><tt id="link-2228" class="py-name" targets="Method web2py.gluon.newcron.Token.acquire()=web2py.gluon.newcron.Token-class.html#acquire"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-2228', 'acquire', 'link-2228');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4016"></a><tt class="py-lineno">4016</tt>  <tt class="py-line">        <tt class="py-name">lock2</tt><tt class="py-op">.</tt><tt id="link-2229" class="py-name"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-2229', 'acquire', 'link-2228');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4017"></a><tt class="py-lineno">4017</tt>  <tt class="py-line">        <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2230" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-2230', 'x', 'link-114');">x</a></tt><tt class="py-op">=</tt><tt class="py-number">7</tt> </tt>
<a name="L4018"></a><tt class="py-lineno">4018</tt>  <tt class="py-line">        <tt class="py-name">lock1</tt><tt class="py-op">.</tt><tt id="link-2231" class="py-name" targets="Method web2py.gluon.newcron.Token.release()=web2py.gluon.newcron.Token-class.html#release"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-2231', 'release', 'link-2231');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4019"></a><tt class="py-lineno">4019</tt>  <tt class="py-line">        <tt class="py-name">lock2</tt><tt class="py-op">.</tt><tt id="link-2232" class="py-name"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-2232', 'release', 'link-2231');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L4020"></a><tt class="py-lineno">4020</tt>  <tt class="py-line">    <tt class="py-name">lock1</tt><tt class="py-op">=</tt><tt id="link-2233" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-2233', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">allocate_lock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4021"></a><tt class="py-lineno">4021</tt>  <tt class="py-line">    <tt class="py-name">lock2</tt><tt class="py-op">=</tt><tt id="link-2234" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-2234', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">allocate_lock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4022"></a><tt class="py-lineno">4022</tt>  <tt class="py-line">    <tt class="py-name">lock1</tt><tt class="py-op">.</tt><tt id="link-2235" class="py-name"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-2235', 'acquire', 'link-2228');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4023"></a><tt class="py-lineno">4023</tt>  <tt class="py-line">    <tt id="link-2236" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-2236', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">start_new_thread</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L4024"></a><tt class="py-lineno">4024</tt>  <tt class="py-line">    <tt class="py-name">a</tt><tt class="py-op">=</tt><tt id="link-2237" class="py-name"><a title="web2py.gluon.tools.PluginManager" class="py-name" href="#" onclick="return doclink('link-2237', 'PluginManager', 'link-2227');">PluginManager</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4025"></a><tt class="py-lineno">4025</tt>  <tt class="py-line">    <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2238" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-2238', 'x', 'link-114');">x</a></tt><tt class="py-op">=</tt><tt class="py-number">5</tt> </tt>
<a name="L4026"></a><tt class="py-lineno">4026</tt>  <tt class="py-line">    <tt class="py-name">lock1</tt><tt class="py-op">.</tt><tt id="link-2239" class="py-name"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-2239', 'release', 'link-2231');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4027"></a><tt class="py-lineno">4027</tt>  <tt class="py-line">    <tt class="py-name">lock2</tt><tt class="py-op">.</tt><tt id="link-2240" class="py-name"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-2240', 'acquire', 'link-2228');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4028"></a><tt class="py-lineno">4028</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2241" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-2241', 'x', 'link-114');">x</a></tt> </tt>
</div><a name="L4029"></a><tt class="py-lineno">4029</tt>  <tt class="py-line"> </tt>
<a name="PluginManager"></a><div id="PluginManager-def"><a name="L4030"></a><tt class="py-lineno">4030</tt> <a class="py-toggle" href="#" id="PluginManager-toggle" onclick="return toggle('PluginManager');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.tools.PluginManager-class.html">PluginManager</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PluginManager-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="PluginManager-expanded"><a name="L4031"></a><tt class="py-lineno">4031</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L4032"></a><tt class="py-lineno">4032</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4033"></a><tt class="py-lineno">4033</tt>  <tt class="py-line"><tt class="py-docstring">    Plugin Manager is similar to a storage object but it is a single level singleton</tt> </tt>
<a name="L4034"></a><tt class="py-lineno">4034</tt>  <tt class="py-line"><tt class="py-docstring">    this means that multiple instances within the same thread share the same attributes</tt> </tt>
<a name="L4035"></a><tt class="py-lineno">4035</tt>  <tt class="py-line"><tt class="py-docstring">    Its constructor is also special. The first argument is the name of the plugin you are defining.</tt> </tt>
<a name="L4036"></a><tt class="py-lineno">4036</tt>  <tt class="py-line"><tt class="py-docstring">    The named arguments are parameters needed by the plugin with default values.</tt> </tt>
<a name="L4037"></a><tt class="py-lineno">4037</tt>  <tt class="py-line"><tt class="py-docstring">    If the parameters were previous defined, the old values are used.</tt> </tt>
<a name="L4038"></a><tt class="py-lineno">4038</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4039"></a><tt class="py-lineno">4039</tt>  <tt class="py-line"><tt class="py-docstring">    For example:</tt> </tt>
<a name="L4040"></a><tt class="py-lineno">4040</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4041"></a><tt class="py-lineno">4041</tt>  <tt class="py-line"><tt class="py-docstring">    ### in some general configuration file:</tt> </tt>
<a name="L4042"></a><tt class="py-lineno">4042</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; plugins = PluginManager()</tt> </tt>
<a name="L4043"></a><tt class="py-lineno">4043</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; plugins.me.param1=3</tt> </tt>
<a name="L4044"></a><tt class="py-lineno">4044</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4045"></a><tt class="py-lineno">4045</tt>  <tt class="py-line"><tt class="py-docstring">    ### within the plugin model</tt> </tt>
<a name="L4046"></a><tt class="py-lineno">4046</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; _ = PluginManager('me',param1=5,param2=6,param3=7)</tt> </tt>
<a name="L4047"></a><tt class="py-lineno">4047</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4048"></a><tt class="py-lineno">4048</tt>  <tt class="py-line"><tt class="py-docstring">    ### where the plugin is used</tt> </tt>
<a name="L4049"></a><tt class="py-lineno">4049</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print plugins.me.param1</tt> </tt>
<a name="L4050"></a><tt class="py-lineno">4050</tt>  <tt class="py-line"><tt class="py-docstring">    3</tt> </tt>
<a name="L4051"></a><tt class="py-lineno">4051</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print plugins.me.param2</tt> </tt>
<a name="L4052"></a><tt class="py-lineno">4052</tt>  <tt class="py-line"><tt class="py-docstring">    6</tt> </tt>
<a name="L4053"></a><tt class="py-lineno">4053</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; plugins.me.param3 = 8</tt> </tt>
<a name="L4054"></a><tt class="py-lineno">4054</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print plugins.me.param3</tt> </tt>
<a name="L4055"></a><tt class="py-lineno">4055</tt>  <tt class="py-line"><tt class="py-docstring">    8</tt> </tt>
<a name="L4056"></a><tt class="py-lineno">4056</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4057"></a><tt class="py-lineno">4057</tt>  <tt class="py-line"><tt class="py-docstring">    Here are some tests:</tt> </tt>
<a name="L4058"></a><tt class="py-lineno">4058</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L4059"></a><tt class="py-lineno">4059</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; a=PluginManager()</tt> </tt>
<a name="L4060"></a><tt class="py-lineno">4060</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; a.x=6</tt> </tt>
<a name="L4061"></a><tt class="py-lineno">4061</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; b=PluginManager('check')</tt> </tt>
<a name="L4062"></a><tt class="py-lineno">4062</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print b.x</tt> </tt>
<a name="L4063"></a><tt class="py-lineno">4063</tt>  <tt class="py-line"><tt class="py-docstring">    6</tt> </tt>
<a name="L4064"></a><tt class="py-lineno">4064</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; b=PluginManager() # reset settings</tt> </tt>
<a name="L4065"></a><tt class="py-lineno">4065</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print b.x</tt> </tt>
<a name="L4066"></a><tt class="py-lineno">4066</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;Storage {}&gt;</tt> </tt>
<a name="L4067"></a><tt class="py-lineno">4067</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; b.x=7</tt> </tt>
<a name="L4068"></a><tt class="py-lineno">4068</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print a.x</tt> </tt>
<a name="L4069"></a><tt class="py-lineno">4069</tt>  <tt class="py-line"><tt class="py-docstring">    7</tt> </tt>
<a name="L4070"></a><tt class="py-lineno">4070</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; a.y.z=8</tt> </tt>
<a name="L4071"></a><tt class="py-lineno">4071</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print b.y.z</tt> </tt>
<a name="L4072"></a><tt class="py-lineno">4072</tt>  <tt class="py-line"><tt class="py-docstring">    8</tt> </tt>
<a name="L4073"></a><tt class="py-lineno">4073</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; test_thread_separation()</tt> </tt>
<a name="L4074"></a><tt class="py-lineno">4074</tt>  <tt class="py-line"><tt class="py-docstring">    5</tt> </tt>
<a name="L4075"></a><tt class="py-lineno">4075</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; plugins=PluginManager('me',db='mydb')</tt> </tt>
<a name="L4076"></a><tt class="py-lineno">4076</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print plugins.me.db</tt> </tt>
<a name="L4077"></a><tt class="py-lineno">4077</tt>  <tt class="py-line"><tt class="py-docstring">    mydb</tt> </tt>
<a name="L4078"></a><tt class="py-lineno">4078</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print 'me' in plugins</tt> </tt>
<a name="L4079"></a><tt class="py-lineno">4079</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L4080"></a><tt class="py-lineno">4080</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print plugins.me.installed</tt> </tt>
<a name="L4081"></a><tt class="py-lineno">4081</tt>  <tt class="py-line"><tt class="py-docstring">    True</tt> </tt>
<a name="L4082"></a><tt class="py-lineno">4082</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L4083"></a><tt class="py-lineno">4083</tt>  <tt class="py-line">    <tt id="link-2242" class="py-name" targets="Variable web2py.gluon.tools.PluginManager.instances=web2py.gluon.tools.PluginManager-class.html#instances"><a title="web2py.gluon.tools.PluginManager.instances" class="py-name" href="#" onclick="return doclink('link-2242', 'instances', 'link-2242');">instances</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="PluginManager.__new__"></a><div id="PluginManager.__new__-def"><a name="L4084"></a><tt class="py-lineno">4084</tt> <a class="py-toggle" href="#" id="PluginManager.__new__-toggle" onclick="return toggle('PluginManager.__new__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.PluginManager-class.html#__new__">__new__</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PluginManager.__new__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PluginManager.__new__-expanded"><a name="L4085"></a><tt class="py-lineno">4085</tt>  <tt class="py-line">        <tt class="py-name">id</tt> <tt class="py-op">=</tt> <tt id="link-2243" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-2243', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">get_ident</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4086"></a><tt class="py-lineno">4086</tt>  <tt class="py-line">        <tt id="link-2244" class="py-name" targets="Function web2py.gluon.portalocker.lock()=web2py.gluon.portalocker-module.html#lock"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-2244', 'lock', 'link-2244');">lock</a></tt> <tt class="py-op">=</tt> <tt id="link-2245" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-2245', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">allocate_lock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4087"></a><tt class="py-lineno">4087</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L4088"></a><tt class="py-lineno">4088</tt>  <tt class="py-line">            <tt id="link-2246" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-2246', 'lock', 'link-2244');">lock</a></tt><tt class="py-op">.</tt><tt id="link-2247" class="py-name"><a title="web2py.gluon.newcron.Token.acquire" class="py-name" href="#" onclick="return doclink('link-2247', 'acquire', 'link-2228');">acquire</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4089"></a><tt class="py-lineno">4089</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L4090"></a><tt class="py-lineno">4090</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-2248" class="py-name"><a title="web2py.gluon.tools.PluginManager.instances" class="py-name" href="#" onclick="return doclink('link-2248', 'instances', 'link-2242');">instances</a></tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> </tt>
<a name="L4091"></a><tt class="py-lineno">4091</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L4092"></a><tt class="py-lineno">4092</tt>  <tt class="py-line">                <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">object</tt><tt class="py-op">.</tt><tt id="link-2249" class="py-name" targets="Static Method web2py.gluon.tools.PluginManager.__new__()=web2py.gluon.tools.PluginManager-class.html#__new__"><a title="web2py.gluon.tools.PluginManager.__new__" class="py-name" href="#" onclick="return doclink('link-2249', '__new__', 'link-2249');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt id="link-2250" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-2250', 'b', 'link-19');">b</a></tt><tt class="py-op">)</tt> </tt>
<a name="L4093"></a><tt class="py-lineno">4093</tt>  <tt class="py-line">                <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-2251" class="py-name"><a title="web2py.gluon.tools.PluginManager.instances" class="py-name" href="#" onclick="return doclink('link-2251', 'instances', 'link-2242');">instances</a></tt><tt class="py-op">[</tt><tt class="py-name">id</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">instance</tt> </tt>
<a name="L4094"></a><tt class="py-lineno">4094</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
<a name="L4095"></a><tt class="py-lineno">4095</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L4096"></a><tt class="py-lineno">4096</tt>  <tt class="py-line">            <tt id="link-2252" class="py-name"><a title="web2py.gluon.portalocker.lock" class="py-name" href="#" onclick="return doclink('link-2252', 'lock', 'link-2244');">lock</a></tt><tt class="py-op">.</tt><tt id="link-2253" class="py-name"><a title="web2py.gluon.newcron.Token.release" class="py-name" href="#" onclick="return doclink('link-2253', 'release', 'link-2231');">release</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="PluginManager.__init__"></a><div id="PluginManager.__init__-def"><a name="L4097"></a><tt class="py-lineno">4097</tt> <a class="py-toggle" href="#" id="PluginManager.__init__-toggle" onclick="return toggle('PluginManager.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.PluginManager-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">plugin</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-op">**</tt><tt class="py-param">defaults</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PluginManager.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PluginManager.__init__-expanded"><a name="L4098"></a><tt class="py-lineno">4098</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">plugin</tt><tt class="py-op">:</tt> </tt>
<a name="L4099"></a><tt class="py-lineno">4099</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-2254" class="py-name"><a title="web2py.gluon.cache.CacheAbstract.clear
web2py.gluon.cache.CacheInRam.clear
web2py.gluon.cache.CacheOnDisk.clear" class="py-name" href="#" onclick="return doclink('link-2254', 'clear', 'link-1409');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4100"></a><tt class="py-lineno">4100</tt>  <tt class="py-line">        <tt id="link-2255" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-2255', 'settings', 'link-34');">settings</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2256" class="py-name" targets="Method web2py.gluon.dal.DAL.__getattr__()=web2py.gluon.dal.DAL-class.html#__getattr__,Method web2py.gluon.dal.Reference.__getattr__()=web2py.gluon.dal.Reference-class.html#__getattr__,Method web2py.gluon.dal.Row.__getattr__()=web2py.gluon.dal.Row-class.html#__getattr__,Method web2py.gluon.dal.Table.__getattr__()=web2py.gluon.dal.Table-class.html#__getattr__,Method web2py.gluon.html.XML.__getattr__()=web2py.gluon.html.XML-class.html#__getattr__,Method web2py.gluon.html.__TAG__.__getattr__()=web2py.gluon.html.__TAG__-class.html#__getattr__,Method web2py.gluon.languages.lazyT.__getattr__()=web2py.gluon.languages.lazyT-class.html#__getattr__,Method web2py.gluon.storage.Messages.__getattr__()=web2py.gluon.storage.Messages-class.html#__getattr__,Method web2py.gluon.storage.Storage.__getattr__()=web2py.gluon.storage.Storage-class.html#__getattr__,Method web2py.gluon.storage.StorageList.__getattr__()=web2py.gluon.storage.StorageList-class.html#__getattr__,Method web2py.gluon.tools.PluginManager.__getattr__()=web2py.gluon.tools.PluginManager-class.html#__getattr__"><a title="web2py.gluon.dal.DAL.__getattr__
web2py.gluon.dal.Reference.__getattr__
web2py.gluon.dal.Row.__getattr__
web2py.gluon.dal.Table.__getattr__
web2py.gluon.html.XML.__getattr__
web2py.gluon.html.__TAG__.__getattr__
web2py.gluon.languages.lazyT.__getattr__
web2py.gluon.storage.Messages.__getattr__
web2py.gluon.storage.Storage.__getattr__
web2py.gluon.storage.StorageList.__getattr__
web2py.gluon.tools.PluginManager.__getattr__" class="py-name" href="#" onclick="return doclink('link-2256', '__getattr__', 'link-2256');">__getattr__</a></tt><tt class="py-op">(</tt><tt class="py-name">plugin</tt><tt class="py-op">)</tt> </tt>
<a name="L4101"></a><tt class="py-lineno">4101</tt>  <tt class="py-line">        <tt id="link-2257" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-2257', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt class="py-name">installed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L4102"></a><tt class="py-lineno">4102</tt>  <tt class="py-line">        <tt class="py-op">[</tt><tt id="link-2258" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-2258', 'settings', 'link-34');">settings</a></tt><tt class="py-op">.</tt><tt id="link-2259" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-2259', 'update', 'link-413');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-name">key</tt><tt class="py-op">:</tt><tt class="py-name">value</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">defaults</tt><tt class="py-op">.</tt><tt id="link-2260" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-2260', 'items', 'link-2145');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-2261" class="py-name"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-2261', 'settings', 'link-34');">settings</a></tt><tt class="py-op">]</tt> </tt>
</div><a name="PluginManager.__getattr__"></a><div id="PluginManager.__getattr__-def"><a name="L4103"></a><tt class="py-lineno">4103</tt> <a class="py-toggle" href="#" id="PluginManager.__getattr__-toggle" onclick="return toggle('PluginManager.__getattr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.PluginManager-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PluginManager.__getattr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PluginManager.__getattr__-expanded"><a name="L4104"></a><tt class="py-lineno">4104</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">:</tt> </tt>
<a name="L4105"></a><tt class="py-lineno">4105</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-2262" class="py-name"><a title="web2py.gluon.storage.Storage" class="py-name" href="#" onclick="return doclink('link-2262', 'Storage', 'link-6');">Storage</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4106"></a><tt class="py-lineno">4106</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
</div><a name="PluginManager.keys"></a><div id="PluginManager.keys-def"><a name="L4107"></a><tt class="py-lineno">4107</tt> <a class="py-toggle" href="#" id="PluginManager.keys-toggle" onclick="return toggle('PluginManager.keys');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.PluginManager-class.html#keys">keys</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PluginManager.keys-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PluginManager.keys-expanded"><a name="L4108"></a><tt class="py-lineno">4108</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-2263" class="py-name"><a title="web2py.gluon.rocket.Headers.keys
web2py.gluon.tools.PluginManager.keys" class="py-name" href="#" onclick="return doclink('link-2263', 'keys', 'link-677');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="PluginManager.__contains__"></a><div id="PluginManager.__contains__-def"><a name="L4109"></a><tt class="py-lineno">4109</tt> <a class="py-toggle" href="#" id="PluginManager.__contains__-toggle" onclick="return toggle('PluginManager.__contains__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.tools.PluginManager-class.html#__contains__">__contains__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PluginManager.__contains__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PluginManager.__contains__-expanded"><a name="L4110"></a><tt class="py-lineno">4110</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt> </tt>
</div></div><a name="L4111"></a><tt class="py-lineno">4111</tt>  <tt class="py-line"> </tt>
<a name="L4112"></a><tt class="py-lineno">4112</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L4113"></a><tt class="py-lineno">4113</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L4114"></a><tt class="py-lineno">4114</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L4115"></a><tt class="py-lineno">4115</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:08 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Auth-class.html version [0fe1527bc2].
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Auth</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        Class&nbsp;Auth
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Auth-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Auth</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Auth</strong>
</pre>

<hr />
<pre class="literalblock">

Class for authentication, authorization, role based access control.

Includes:

- registration and profile
- login and logout
- username and password retrieval
- event logging
- role creation and assignment
- user defined group/role based permission

Authentication Example::

    from contrib.utils import *
    mail=Mail()
    mail.settings.server='smtp.gmail.com:587'
    mail.settings.sender='you@somewhere.com'
    mail.settings.login='username:password'
    auth=Auth(globals(), db)
    auth.settings.mailer=mail
    # auth.settings....=...
    auth.define_tables()
    def authentication():
        return dict(form=auth())

exposes:

- http://.../{application}/{controller}/authentication/login
- http://.../{application}/{controller}/authentication/logout
- http://.../{application}/{controller}/authentication/register
- http://.../{application}/{controller}/authentication/verify_email
- http://.../{application}/{controller}/authentication/retrieve_username
- http://.../{application}/{controller}/authentication/retrieve_password
- http://.../{application}/{controller}/authentication/reset_password
- http://.../{application}/{controller}/authentication/profile
- http://.../{application}/{controller}/authentication/change_password

On registration a group with role=new_user.id is created
and user is given membership of this group.

You can create a group with::

    group_id=auth.add_group('Manager', 'can access the manage action')
    auth.add_permission(group_id, 'access to manage')

Here &quot;access to manage&quot; is just a user defined string.
You can give access to a user::

    auth.add_membership(group_id, user_id)

If user id is omitted, the logged in user is assumed

Then you can decorate any action::

    @auth.requires_permission('access to manage')
    def manage():
        return dict()

You can restrict a permission to a specific table::

    auth.add_permission(group_id, 'edit', db.sometable)
    @auth.requires_permission('edit', db.sometable)

Or to a specific record::

    auth.add_permission(group_id, 'edit', db.sometable, 45)
    @auth.requires_permission('edit', db.sometable, 45)

If authorization is not granted calls::

    auth.settings.on_failed_authorization

Other options::

    auth.settings.mailer=None
    auth.settings.expiration=3600 # seconds

    ...

    ### these are messages that can be customized
    ...

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="url"></a><span class="summary-sig-name">url</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">vars</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.url">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">environment</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">db</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">controller</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">cas_provider</span>=<span class="summary-sig-default">1</span>)</span><br />
      auth=Auth(globals(), db)...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_user_id"></a><span class="summary-sig-name">_get_user_id</span>(<span class="summary-sig-arg">self</span>)</span><br />
      accessor for auth.user_id</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth._get_user_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_HTTP"></a><span class="summary-sig-name">_HTTP</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span><br />
      only used in lambda: self._HTTP(404)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth._HTTP">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      usage:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="navbar"></a><span class="summary-sig-name">navbar</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">Welcome</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">action</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.navbar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__get_migrate"></a><span class="summary-sig-name">__get_migrate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tablename</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.__get_migrate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#define_tables" class="summary-sig-name">define_tables</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">username</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">migrate</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fake_migrate</span>=<span class="summary-sig-default">True</span>)</span><br />
      to be called unless tables are defined manually</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.define_tables">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#log_event" class="summary-sig-name">log_event</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">description</span>,
        <span class="summary-sig-arg">origin</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">auth</code><code class="variable-quote">'</code></span>)</span><br />
      usage:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.log_event">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#get_or_create_user" class="summary-sig-name">get_or_create_user</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">keys</span>)</span><br />
      Used for alternate login methods:
    If the user exists already then password is updated.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.get_or_create_user">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="basic"></a><span class="summary-sig-name">basic</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.basic">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="login_bare"></a><span class="summary-sig-name">login_bare</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">username</span>,
        <span class="summary-sig-arg">password</span>)</span><br />
      logins user</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.login_bare">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cas_login"></a><span class="summary-sig-name">cas_login</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">version</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.cas_login">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cas_validate"></a><span class="summary-sig-name">cas_validate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">version</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.cas_validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#login" class="summary-sig-name">login</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a login form

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.login">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#logout" class="summary-sig-name">logout</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onlogout</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      logout and redirects to login

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.logout">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#register" class="summary-sig-name">register</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a registration form

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.register">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#is_logged_in" class="summary-sig-name">is_logged_in</a>(<span class="summary-sig-arg">self</span>)</span><br />
      checks if the user is logged in and returns True/False.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.is_logged_in">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#verify_email" class="summary-sig-name">verify_email</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      action user to verify the registration email, XXXXXXXXXXXXXXXX

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.verify_email">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#retrieve_username" class="summary-sig-name">retrieve_username</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a form to retrieve the user username
(only if there is a username field)

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.retrieve_username">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="random_password"></a><span class="summary-sig-name">random_password</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.random_password">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#reset_password_deprecated" class="summary-sig-name">reset_password_deprecated</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a form to reset the user password (deprecated)

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.reset_password_deprecated">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#reset_password" class="summary-sig-name">reset_password</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a form to reset the user password

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.reset_password">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#request_reset_password" class="summary-sig-name">request_reset_password</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a form to reset the user password

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.request_reset_password">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="retrieve_password"></a><span class="summary-sig-name">retrieve_password</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.retrieve_password">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#change_password" class="summary-sig-name">change_password</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a form that lets the user change password

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.change_password">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#profile" class="summary-sig-name">profile</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      returns a form that lets the user change his/her profile

..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.profile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="is_impersonating"></a><span class="summary-sig-name">is_impersonating</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.is_impersonating">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#impersonate" class="summary-sig-name">impersonate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      usage: POST TO http://..../impersonate 
      request.post_vars.user_id=&lt;id&gt; set request.post_vars.user_id to
      0 to restore original user.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.impersonate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="groups"></a><span class="summary-sig-name">groups</span>(<span class="summary-sig-arg">self</span>)</span><br />
      displays the groups and their roles for the logged in user</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.groups">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="not_authorized"></a><span class="summary-sig-name">not_authorized</span>(<span class="summary-sig-arg">self</span>)</span><br />
      you can change the view for this page to make it look as you 
      like</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.not_authorized">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="requires"></a><span class="summary-sig-name">requires</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">condition</span>)</span><br />
      decorator that prevents access to action if not logged in</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="requires_login"></a><span class="summary-sig-name">requires_login</span>(<span class="summary-sig-arg">self</span>)</span><br />
      decorator that prevents access to action if not logged in</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires_login">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#requires_membership" class="summary-sig-name">requires_membership</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">role</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">group_id</span>=<span class="summary-sig-default">1</span>)</span><br />
      decorator that prevents access to action if not logged in or if 
      user logged in is not a member of group_id.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires_membership">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="requires_permission"></a><span class="summary-sig-name">requires_permission</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">table_name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">record_id</span>=<span class="summary-sig-default">0</span>)</span><br />
      decorator that prevents access to action if not logged in or if 
      user logged in is not a member of any group (role) that has 'name' 
      access to 'table_name', 'record_id'.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires_permission">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#requires_signature" class="summary-sig-name">requires_signature</a>(<span class="summary-sig-arg">self</span>)</span><br />
      decorator that prevents access to action if not logged in or if 
      user logged in is not a member of group_id.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires_signature">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_group"></a><span class="summary-sig-name">add_group</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">role</span>,
        <span class="summary-sig-arg">description</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      creates a group associated to a role</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.add_group">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="del_group"></a><span class="summary-sig-name">del_group</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">group_id</span>)</span><br />
      deletes a group</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.del_group">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="id_group"></a><span class="summary-sig-name">id_group</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">role</span>)</span><br />
      returns the group_id of the group specified by the role</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.id_group">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#user_group" class="summary-sig-name">user_group</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">1</span>)</span><br />
      returns the group_id of the group uniquely associated to this user
      i.e.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.user_group">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="has_membership"></a><span class="summary-sig-name">has_membership</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">group_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">role</span>=<span class="summary-sig-default">1</span>)</span><br />
      checks if user is member of group_id or role</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.has_membership">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_membership"></a><span class="summary-sig-name">add_membership</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">group_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">role</span>=<span class="summary-sig-default">1</span>)</span><br />
      gives user_id membership of group_id or role if user_id==None than
      user_id is that of current logged in user</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.add_membership">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="del_membership"></a><span class="summary-sig-name">del_membership</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">group_id</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">role</span>=<span class="summary-sig-default">1</span>)</span><br />
      revokes membership from group_id to user_id if user_id==None than 
      user_id is that of current logged in user</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.del_membership">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="has_permission"></a><span class="summary-sig-name">has_permission</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">any</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">table_name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">record_id</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">group_id</span>=<span class="summary-sig-default">1</span>)</span><br />
      checks if user_id or current logged in user is member of a group 
      that has 'name' permission on 'table_name' and 'record_id' if 
      group_id is passed, it checks whether the group has the 
      permission</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.has_permission">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_permission"></a><span class="summary-sig-name">add_permission</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">group_id</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">any</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">table_name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">record_id</span>=<span class="summary-sig-default">0</span>)</span><br />
      gives group_id 'name' access to 'table_name' and 'record_id'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.add_permission">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="del_permission"></a><span class="summary-sig-name">del_permission</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">group_id</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">any</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">table_name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">record_id</span>=<span class="summary-sig-default">0</span>)</span><br />
      revokes group_id 'name' access to 'table_name' and 'record_id'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.del_permission">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#accessible_query" class="summary-sig-name">accessible_query</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">1</span>)</span><br />
      returns a query with all accessible records for user_id or the 
      current logged in user this method does not work on GAE because uses 
      JOIN and IN</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.accessible_query">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Auth-class.html#user_id" class="summary-name">user_id</a><br />
      user.id or None
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">environment</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">db</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">controller</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">cas_provider</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

auth=Auth(globals(), db)

- environment is there for legacy but unused (awful)
- db has to be the database where to create tables for authentication

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>usage:</p>
  def authentication(): return dict(form=auth())
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="define_tables"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">define_tables</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">username</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">migrate</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fake_migrate</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.define_tables">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>to be called unless tables are defined manually</p>
  usages:
<pre class="literalblock">
   # defines all needed tables and table files
   # 'myprefix_auth_user.table', ...
   auth.define_tables(migrate='myprefix_')

   # defines all needed tables without migration/table files
   auth.define_tables(migrate=False)
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="log_event"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">log_event</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">description</span>,
        <span class="sig-arg">origin</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">auth</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.log_event">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  usage:
<pre class="literalblock">
   auth.log_event(description='this happened', origin='auth')
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_or_create_user"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_or_create_user</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">keys</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.get_or_create_user">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Used for alternate login methods:
    If the user exists already then password is updated.
    If the user doesn't yet exist, then they are created.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="login"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">login</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.login">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a login form

.. method:: Auth.login([next=DEFAULT [, onvalidation=DEFAULT
    [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="logout"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">logout</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onlogout</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.logout">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

logout and redirects to login

.. method:: Auth.logout ([next=DEFAULT[, onlogout=DEFAULT[,
    log=DEFAULT]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="register"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">register</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.register">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a registration form

.. method:: Auth.register([next=DEFAULT [, onvalidation=DEFAULT
    [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="is_logged_in"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">is_logged_in</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.is_logged_in">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  checks if the user is logged in and returns True/False. if so user is 
  in auth.user as well as in session.auth.user
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="verify_email"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">verify_email</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.verify_email">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

action user to verify the registration email, XXXXXXXXXXXXXXXX

.. method:: Auth.verify_email([next=DEFAULT [, onvalidation=DEFAULT
    [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="retrieve_username"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">retrieve_username</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.retrieve_username">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a form to retrieve the user username
(only if there is a username field)

.. method:: Auth.retrieve_username([next=DEFAULT
    [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="reset_password_deprecated"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">reset_password_deprecated</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.reset_password_deprecated">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a form to reset the user password (deprecated)

.. method:: Auth.reset_password_deprecated([next=DEFAULT
    [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="reset_password"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">reset_password</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.reset_password">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a form to reset the user password

.. method:: Auth.reset_password([next=DEFAULT
    [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="request_reset_password"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">request_reset_password</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.request_reset_password">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a form to reset the user password

.. method:: Auth.reset_password([next=DEFAULT
    [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="change_password"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">change_password</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.change_password">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a form that lets the user change password

.. method:: Auth.change_password([next=DEFAULT[, onvalidation=DEFAULT[,
    onaccept=DEFAULT[, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="profile"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">profile</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.profile">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

returns a form that lets the user change his/her profile

.. method:: Auth.profile([next=DEFAULT [, onvalidation=DEFAULT
    [, onaccept=DEFAULT [, log=DEFAULT]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="impersonate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">impersonate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.impersonate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>usage: POST TO http://..../impersonate 
  request.post_vars.user_id=&lt;id&gt; set request.post_vars.user_id to 0 
  to restore original user.</p>
  requires impersonator is logged in and has_permission('impersonate', 
  'auth_user', user_id)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="requires_membership"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">requires_membership</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">role</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">group_id</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires_membership">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  decorator that prevents access to action if not logged in or if user 
  logged in is not a member of group_id. If role is provided instead of 
  group_id then the group_id is calculated.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="requires_signature"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">requires_signature</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.requires_signature">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  decorator that prevents access to action if not logged in or if user 
  logged in is not a member of group_id. If role is provided instead of 
  group_id then the group_id is calculated.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="user_group"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">user_group</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.user_group">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  returns the group_id of the group uniquely associated to this user 
  i.e. role=user:[user_id]
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="accessible_query"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">accessible_query</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">user_id</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Auth.accessible_query">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>returns a query with all accessible records for user_id or the current
  logged in user this method does not work on GAE because uses JOIN and 
  IN</p>
  example:
<pre class="literalblock">
  db(auth.accessible_query('read', db.mytable)).select(db.mytable.ALL)
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Property Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-PropertyDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="user_id"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">user_id</h3>
  user.id or None
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="web2py.gluon.tools.Auth-class.html#_get_user_id" class="summary-sig-name">web2py.gluon.tools.Auth._get_user_id</a>(<span class="summary-sig-arg">self</span>)</span>
        - accessor for auth.user_id
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
    <dt>Delete Method:</dt>
    <dd class="value"><table><tr><td><pre class="variable">
1
</pre></td></tr></table>

        - PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Crud-class.html version [d056f83bae].





















































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Crud</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        Class&nbsp;Crud
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Crud-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Crud</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Crud</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="url"></a><span class="summary-sig-name">url</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">vars</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
      this should point to the controller that exposes download and 
      crud</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.url">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Crud-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">environment</span>,
        <span class="summary-sig-arg">db</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">controller</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="log_event"></a><span class="summary-sig-name">log_event</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.log_event">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="has_permission"></a><span class="summary-sig-name">has_permission</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">record</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.has_permission">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="tables"></a><span class="summary-sig-name">tables</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.tables">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Crud-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">record</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">ondelete</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">deletable</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">formname</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      ..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Crud-class.html#create" class="summary-sig-name">create</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onvalidation</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">onaccept</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">formname</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      ..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.create">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">record</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Crud-class.html#delete" class="summary-sig-name">delete</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">record_id</span>,
        <span class="summary-sig-arg">next</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span><br />
      ..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rows"></a><span class="summary-sig-name">rows</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">query</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">fields</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">orderby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">limitby</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.rows">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="select"></a><span class="summary-sig-name">select</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">table</span>,
        <span class="summary-sig-arg">query</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">fields</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">orderby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">limitby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">headers</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>,
        <span class="summary-sig-arg">**attr</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.select">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_format"></a><span class="summary-sig-name">get_format</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.get_format">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_query"></a><span class="summary-sig-name">get_query</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">op</span>,
        <span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">refsearch</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.get_query">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Crud-class.html#search" class="summary-sig-name">search</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*tables</span>,
        <span class="summary-sig-arg">**args</span>)</span><br />
      Creates a search form and its results for a table...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.search">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Crud-class.html#archive" class="summary-sig-name">archive</a>(<span class="summary-sig-arg">form</span>,
        <span class="summary-sig-arg">archive_table</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">current_record</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">current_record</code><code class="variable-quote">'</code></span>)</span><br />
      If you have a table (db.mytable) that needs full revision history 
      you can just do:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.archive">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">environment</span>,
        <span class="sig-arg">db</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">controller</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="archive"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">archive</span>(<span class="sig-arg">form</span>,
        <span class="sig-arg">archive_table</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">current_record</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">current_record</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.archive">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  If you have a table (db.mytable) that needs full revision history you 
  can just do:
<pre class="literalblock">
   form=crud.update(db.mytable,myrecord,onaccept=crud.archive)
</pre>
  <p>crud.archive will define a new table &quot;mytable_archive&quot; and 
  store the previous record in the newly created table including a 
  reference to the current record.</p>
  If you want to access such table you need to define it yourself in a 
  model:
<pre class="literalblock">
   db.define_table('mytable_archive',
       Field('current_record',db.mytable),
       db.mytable)
</pre>
  Notice such table includes all fields of db.mytable plus one: 
  current_record. crud.archive does not timestamp the stored record unless 
  your original table has a fields like:
<pre class="literalblock">
   db.define_table(...,
       Field('saved_on','datetime',
            default=request.now,update=request.now,writable=False),
       Field('saved_by',auth.user,
            default=auth.user_id,update=auth.user_id,writable=False),
</pre>
  <p>there is nothing special about these fields since they are filled 
  before the record is archived.</p>
  If you want to change the archive table name and the name of the 
  reference field you can do, for example:
<pre class="literalblock">
   db.define_table('myhistory',
       Field('parent_record',db.mytable),
       db.mytable)
</pre>
  and use it as:
<pre class="literalblock">
   form=crud.update(db.mytable,myrecord,
                    onaccept=lambda form:crud.archive(form,
                    archive_table=db.myhistory,
                    current_record='parent_record'))
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="update"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">record</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">ondelete</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">message</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">deletable</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">formname</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.update">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

.. method:: Crud.update(table, record, [next=DEFAULT
    [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT
    [, message=DEFAULT[, deletable=DEFAULT]]]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="create"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onvalidation</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">onaccept</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">message</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">formname</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.create">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

.. method:: Crud.create(table, [next=DEFAULT [, onvalidation=DEFAULT
    [, onaccept=DEFAULT [, log=DEFAULT[, message=DEFAULT]]]]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="delete"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">delete</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">table</span>,
        <span class="sig-arg">record_id</span>,
        <span class="sig-arg">next</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>,
        <span class="sig-arg">message</span>=<span class="sig-default">&lt;function &lt;lambda&gt; at 0x26ba500&gt;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.delete">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

.. method:: Crud.delete(table, record_id, [next=DEFAULT
    [, message=DEFAULT]])

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="search"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">search</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*tables</span>,
        <span class="sig-arg">**args</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Crud.search">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Creates a search form and its results for a table
Example usage:
form, results = crud.search(db.test,
                       queries = ['equals', 'not equal', 'contains'],
                       query_labels={'equals':'Equals',
                                     'not equal':'Not equal'},
                       fields = ['id','children'],
                       field_labels = {'id':'ID','children':'Children'},
                       zero='Please choose',
                       query = (db.test.id &gt; 0)&amp;(db.test.id != 3) )

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Mail-class.html version [9399bb8613].


















































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Mail</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        Class&nbsp;Mail
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Mail-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Mail</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Mail</strong>
</pre>

<hr />
<p>Class for configuring and sending emails with alternative text / html 
  body, multiple attachments and encryption support</p>
  Works with SMTP and Google App Engine.<br /><br />

<!-- ==================== NESTED CLASSES ==================== -->
<a name="section-NestedClasses"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Nested Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-NestedClasses"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Mail.Attachment-class.html" class="summary-name">Attachment</a><br />
      Email attachment
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Mail-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">server</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">sender</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">login</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">tls</span>=<span class="summary-sig-default">True</span>)</span><br />
      Main Mail object

Arguments::

    server: SMTP server address in address:port notation
    sender: sender email address
    login: sender login name and password in login:password notation
           or None if no authentication is required
    tls: enables/disables encryption (True by default)

In Google App Engine use::

    server='gae'

For sake of backward compatibility all fields are optional and default
to None, however, to be able to send emails at least server and sender
must be specified.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Mail-class.html#send" class="summary-sig-name">send</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">to</span>,
        <span class="summary-sig-arg">subject</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">None</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">None</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">attachments</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">cc</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">bcc</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">reply_to</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></span>)</span><br />
      Sends an email using data specified in constructor

Arguments::

    to: list or tuple of receiver addresses; will also accept single
        object
    subject: subject of the email
    message: email body text; depends on type of passed object:
             if 2-list or 2-tuple is passed: first element will be
             source of plain text while second of html text;
             otherwise: object will be the only source of plain text
             and html source will be set to None;
             If text or html source is:
             None: content part will be ignored,
             string: content part will be set to it,
             file-like object: content part will be fetched from
                               it using it's read() method
    attachments: list or tuple of Mail.Attachment objects; will also
                 accept single object
    cc: list or tuple of carbon copy receiver addresses; will also
        accept single object
    bcc: list or tuple of blind carbon copy receiver addresses; will
        also accept single object
    reply_to: address to which reply should be composed
    encoding: encoding of all strings passed to this method (including
              message bodies)

Examples::

    #Send plain text message to single address:
    mail.send('you@example.com',
              'Message subject',
              'Plain text body of the message')

    #Send html message to single address:
    mail.send('you@example.com',
              'Message subject',
              '&lt;html&gt;Plain text body of the message&lt;/html&gt;')

    #Send text and html message to three addresses (two in cc):
    mail.send('you@example.com',
              'Message subject',
              ('Plain text body', '&lt;html&gt;html body&lt;/html&gt;'),
              cc=['other1@example.com', 'other2@example.com'])

    #Send html only message with image attachment available from
    the message by 'photo' content id:
    mail.send('you@example.com',
              'Message subject',
              (None, '&lt;html&gt;&lt;img src=&quot;cid:photo&quot; /&gt;&lt;/html&gt;'),
              Mail.Attachment('/path/to/photo.jpg'
                              content_id='photo'))

    #Send email with two attachments and no body text
    mail.send('you@example.com,
              'Message subject',
              None,
              [Mail.Attachment('/path/to/fist.file'),
               Mail.Attachment('/path/to/second.file')])

Returns True on success, False on failure.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.send">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">server</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">sender</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">login</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">tls</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Main Mail object

Arguments::

    server: SMTP server address in address:port notation
    sender: sender email address
    login: sender login name and password in login:password notation
           or None if no authentication is required
    tls: enables/disables encryption (True by default)

In Google App Engine use::

    server='gae'

For sake of backward compatibility all fields are optional and default
to None, however, to be able to send emails at least server and sender
must be specified. They are available under following fields:

    mail.settings.server
    mail.settings.sender
    mail.settings.login

When server is 'logging', email is logged but not sent (debug mode)

Optionally you can use PGP encryption or X509:

    mail.settings.cipher_type = None
    mail.settings.sign = True
    mail.settings.sign_passphrase = None
    mail.settings.encrypt = True
    mail.settings.x509_sign_keyfile = None
    mail.settings.x509_sign_certfile = None
    mail.settings.x509_crypt_certfiles = None

    cipher_type       : None
                        gpg - need a python-pyme package and gpgme lib
                        x509 - smime
    sign              : sign the message (True or False)
    sign_passphrase   : passphrase for key signing
    encrypt           : encrypt the message
                     ... x509 only ...
    x509_sign_keyfile : the signers private key filename (PEM format)
    x509_sign_certfile: the signers certificate filename (PEM format)
    x509_crypt_certfiles: the certificates file to encrypt the messages
                          with can be a file name or a list of
                          file names (PEM format)

Examples::

    #Create Mail object with authentication data for remote server:
    mail = Mail('example.com:25', 'me@example.com', 'me:password')

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="send"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">send</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">to</span>,
        <span class="sig-arg">subject</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">None</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">None</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">attachments</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">cc</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">bcc</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">reply_to</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.send">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Sends an email using data specified in constructor

Arguments::

    to: list or tuple of receiver addresses; will also accept single
        object
    subject: subject of the email
    message: email body text; depends on type of passed object:
             if 2-list or 2-tuple is passed: first element will be
             source of plain text while second of html text;
             otherwise: object will be the only source of plain text
             and html source will be set to None;
             If text or html source is:
             None: content part will be ignored,
             string: content part will be set to it,
             file-like object: content part will be fetched from
                               it using it's read() method
    attachments: list or tuple of Mail.Attachment objects; will also
                 accept single object
    cc: list or tuple of carbon copy receiver addresses; will also
        accept single object
    bcc: list or tuple of blind carbon copy receiver addresses; will
        also accept single object
    reply_to: address to which reply should be composed
    encoding: encoding of all strings passed to this method (including
              message bodies)

Examples::

    #Send plain text message to single address:
    mail.send('you@example.com',
              'Message subject',
              'Plain text body of the message')

    #Send html message to single address:
    mail.send('you@example.com',
              'Message subject',
              '&lt;html&gt;Plain text body of the message&lt;/html&gt;')

    #Send text and html message to three addresses (two in cc):
    mail.send('you@example.com',
              'Message subject',
              ('Plain text body', '&lt;html&gt;html body&lt;/html&gt;'),
              cc=['other1@example.com', 'other2@example.com'])

    #Send html only message with image attachment available from
    the message by 'photo' content id:
    mail.send('you@example.com',
              'Message subject',
              (None, '&lt;html&gt;&lt;img src=&quot;cid:photo&quot; /&gt;&lt;/html&gt;'),
              Mail.Attachment('/path/to/photo.jpg'
                              content_id='photo'))

    #Send email with two attachments and no body text
    mail.send('you@example.com,
              'Message subject',
              None,
              [Mail.Attachment('/path/to/fist.file'),
               Mail.Attachment('/path/to/second.file')])

Returns True on success, False on failure.

Before return, method updates two object's fields:
self.result: return value of smtplib.SMTP.sendmail() or GAE's
             mail.send_mail() method
self.error: Exception message or None if above was successful

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Mail.Attachment-class.html version [d687f3b0e3].
























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Mail.Attachment</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        <a href="web2py.gluon.tools.Mail-class.html">Class&nbsp;Mail</a> ::
        Class&nbsp;Attachment
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Mail.Attachment-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Attachment</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.Attachment">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
email.message.Message --+    
                        |    
 email.mime.base.MIMEBase --+
                            |
                           <strong class="uidshort">Mail.Attachment</strong>
</pre>

<hr />
<p>Email attachment</p>
  Arguments:
<pre class="literalblock">
   payload: path to file or file-like object with read() method
   filename: name of the attachment stored in message; if set to
             None, it will be fetched from payload path; file-like
             object payload must have explicit filename specified
   content_id: id of the attachment; automatically contained within
               &lt; and &gt;
   content_type: content type of the attachment; if set to None,
                 it will be fetched from filename using gluon.contenttype
                 module
   encoding: encoding of all strings passed to this function (except
             attachment body)
</pre>
  <p>Content ID is used to identify attachments within the html body; in 
  example, attached image with content ID 'photo' may be used in html 
  message as a source of img tag &lt;img src=&quot;cid:photo&quot; 
  /&gt;.</p>
  Examples:
<pre class="literalblock">
   #Create attachment from text file:
   attachment = Mail.Attachment('/path/to/file.txt')

   Content-Type: text/plain
   MIME-Version: 1.0
   Content-Disposition: attachment; filename=&quot;file.txt&quot;
   Content-Transfer-Encoding: base64

   SOMEBASE64CONTENT=

   #Create attachment from image file with custom filename and cid:
   attachment = Mail.Attachment('/path/to/file.png',
                                    filename='photo.png',
                                    content_id='photo')

   Content-Type: image/png
   MIME-Version: 1.0
   Content-Disposition: attachment; filename=&quot;photo.png&quot;
   Content-Id: &lt;photo&gt;
   Content-Transfer-Encoding: base64

   SOMEOTHERBASE64CONTENT=
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Mail.Attachment-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">payload</span>,
        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">content_id</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">content_type</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></span>)</span><br />
      This constructor adds a Content-Type: and a MIME-Version: 
      header.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.Attachment.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>email.message.Message</code></b>:
      <code>__contains__</code>,
      <code>__delitem__</code>,
      <code>__getitem__</code>,
      <code>__len__</code>,
      <code>__setitem__</code>,
      <code>__str__</code>,
      <code>add_header</code>,
      <code>as_string</code>,
      <code>attach</code>,
      <code>del_param</code>,
      <code>get</code>,
      <code>get_all</code>,
      <code>get_boundary</code>,
      <code>get_charset</code>,
      <code>get_charsets</code>,
      <code>get_content_charset</code>,
      <code>get_content_maintype</code>,
      <code>get_content_subtype</code>,
      <code>get_content_type</code>,
      <code>get_default_type</code>,
      <code>get_filename</code>,
      <code>get_param</code>,
      <code>get_params</code>,
      <code>get_payload</code>,
      <code>get_unixfrom</code>,
      <code>has_key</code>,
      <code>is_multipart</code>,
      <code>items</code>,
      <code>keys</code>,
      <code>replace_header</code>,
      <code>set_boundary</code>,
      <code>set_charset</code>,
      <code>set_default_type</code>,
      <code>set_param</code>,
      <code>set_payload</code>,
      <code>set_type</code>,
      <code>set_unixfrom</code>,
      <code>values</code>,
      <code>walk</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>email.message.Message</code></b> (private):
      <code>_get_params_preserve</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">payload</span>,
        <span class="sig-arg">filename</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">content_id</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">content_type</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Mail.Attachment.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>This constructor adds a Content-Type: and a MIME-Version: header.</p>
  The Content-Type: header is taken from the _maintype and _subtype 
  arguments.  Additional parameters for this header are taken from the 
  keyword arguments.
  <dl class="fields">
    <dt>Overrides:
      email.mime.base.MIMEBase.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.PluginManager-class.html version [89ed9f3413].















































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.PluginManager</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        Class&nbsp;PluginManager
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.PluginManager-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class PluginManager</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">PluginManager</strong>
</pre>

<hr />
<p>Plugin Manager is similar to a storage object but it is a single level
  singleton this means that multiple instances within the same thread share
  the same attributes Its constructor is also special. The first argument 
  is the name of the plugin you are defining. The named arguments are 
  parameters needed by the plugin with default values. If the parameters 
  were previous defined, the old values are used.</p>
  <p>For example:</p>
  <p>### in some general configuration file: &gt;&gt;&gt; plugins = 
  PluginManager() &gt;&gt;&gt; plugins.me.param1=3</p>
  <p>### within the plugin model &gt;&gt;&gt; _ = 
  PluginManager('me',param1=5,param2=6,param3=7)</p>
  <p>### where the plugin is used &gt;&gt;&gt; print plugins.me.param1 3 
  &gt;&gt;&gt; print plugins.me.param2 6 &gt;&gt;&gt; plugins.me.param3 = 8
  &gt;&gt;&gt; print plugins.me.param3 8</p>
  Here are some tests:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>a=PluginManager()
<span class="py-prompt">&gt;&gt;&gt; </span>a.x=6
<span class="py-prompt">&gt;&gt;&gt; </span>b=PluginManager(<span class="py-string">'check'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> b.x
<span class="py-output">6</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>b=PluginManager() <span class="py-comment"># reset settings</span>
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> b.x
<span class="py-output">&lt;Storage {}&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>b.x=7
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> a.x
<span class="py-output">7</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>a.y.z=8
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> b.y.z
<span class="py-output">8</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>test_thread_separation()
<span class="py-output">5</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>plugins=PluginManager(<span class="py-string">'me'</span>,db=<span class="py-string">'mydb'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> plugins.me.db
<span class="py-output">mydb</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> <span class="py-string">'me'</span> <span class="py-keyword">in</span> plugins
<span class="py-output">True</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> plugins.me.installed
<span class="py-output">True</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.PluginManager-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">plugin</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">**defaults</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="keys"></a><span class="summary-sig-name">keys</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.keys">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__contains__"></a><span class="summary-sig-name">__contains__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.__contains__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.PluginManager-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">cls</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span><br />
      Returns:
a new object with type S, a subtype of T</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.__new__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="instances"></a><span class="summary-name">instances</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__new__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">cls</span>,
        <span class="sig-arg">*a</span>,
        <span class="sig-arg">**b</span>)</span>
    <br /><em class="fname">Static Method</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.__new__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd><pre class="literalblock">
a new object with type S, a subtype of T

</pre></dd>
    <dt>Overrides:
      object.__new__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">plugin</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">**defaults</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#PluginManager.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:01 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Recaptcha-class.html version [5b47346c89].




































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Recaptcha</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        Class&nbsp;Recaptcha
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Recaptcha-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Recaptcha</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
             object --+        
                      |        
gluon.html.XmlComponent --+    
                          |    
             gluon.html.DIV --+
                              |
                             <strong class="uidshort">Recaptcha</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Recaptcha-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">public_key</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">private_key</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">use_ssl</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">error</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">label</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">Verify:</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">options</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      :param *components: any components that should be nested in this 
      element :param **attributes: any attributes you want to give to this 
      element</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Recaptcha-class.html#_validate" class="summary-sig-name">_validate</a>(<span class="summary-sig-arg">self</span>)</span><br />
      nothing to validate yet.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha._validate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Recaptcha-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>)</span><br />
      generates the xml for this component.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>gluon.html.DIV</code></b>:
      <code>__delitem__</code>,
      <code>__getitem__</code>,
      <code>__len__</code>,
      <code>__nonzero__</code>,
      <code>__setitem__</code>,
      <code>__str__</code>,
      <code>append</code>,
      <code>element</code>,
      <code>elements</code>,
      <code>flatten</code>,
      <code>insert</code>,
      <code>sibling</code>,
      <code>siblings</code>,
      <code>update</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>gluon.html.DIV</code></b> (private):
      <code>_fixup</code>,
      <code>_postprocessing</code>,
      <code>_setnode</code>,
      <code>_traverse</code>,
      <code>_wrap_components</code>,
      <code>_xml</code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="API_SSL_SERVER"></a><span class="summary-name">API_SSL_SERVER</span> = <code title="'https://www.google.com/recaptcha/api'"><code class="variable-quote">'</code><code class="variable-string">https://www.google.com/recaptcha/api</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="API_SERVER"></a><span class="summary-name">API_SERVER</span> = <code title="'http://www.google.com/recaptcha/api'"><code class="variable-quote">'</code><code class="variable-string">http://www.google.com/recaptcha/api</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VERIFY_SERVER"></a><span class="summary-name">VERIFY_SERVER</span> = <code title="'http://www.google.com/recaptcha/api/verify'"><code class="variable-quote">'</code><code class="variable-string">http://www.google.com/recaptcha/api/verify</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>gluon.html.DIV</code></b>:
      <code>regex_attr</code>,
      <code>regex_class</code>,
      <code>regex_id</code>,
      <code>regex_tag</code>,
      <code>tag</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">request</span>,
        <span class="sig-arg">public_key</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">private_key</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">use_ssl</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">error</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">label</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">Verify:</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">options</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>:param *components: any components that should be nested in this 
  element :param **attributes: any attributes you want to give to this 
  element</p>
  :raises SyntaxError: when a stand alone tag receives components
  <dl class="fields">
    <dt>Overrides:
      gluon.html.DIV.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_validate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_validate</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha._validate">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  nothing to validate yet. May be overridden by subclasses
  <dl class="fields">
    <dt>Overrides:
      gluon.html.DIV._validate
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Recaptcha.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  generates the xml for this component.
  <dl class="fields">
    <dt>Overrides:
      gluon.html.DIV.xml
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Service-class.html version [b8dda85409].
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Service</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        Class&nbsp;Service
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Service-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Service</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Service</strong>
</pre>

<hr />
<!-- ==================== NESTED CLASSES ==================== -->
<a name="section-NestedClasses"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Nested Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-NestedClasses"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.tools.Service.JsonRpcException-class.html" class="summary-name">JsonRpcException</a>
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">environment</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#csv" class="summary-sig-name">csv</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.csv">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#xml" class="summary-sig-name">xml</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#rss" class="summary-sig-name">rss</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.rss">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#json" class="summary-sig-name">json</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#jsonrpc" class="summary-sig-name">jsonrpc</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.jsonrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#xmlrpc" class="summary-sig-name">xmlrpc</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.xmlrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#amfrpc" class="summary-sig-name">amfrpc</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.amfrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#amfrpc3" class="summary-sig-name">amfrpc3</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">domain</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>)</span><br />
      example:</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.amfrpc3">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#soap" class="summary-sig-name">soap</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">returns</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">doc</span>=<span class="summary-sig-default">1</span>)</span><br />
      example::...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.soap">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_run"></a><span class="summary-sig-name">serve_run</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_run">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_csv"></a><span class="summary-sig-name">serve_csv</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_csv">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_xml"></a><span class="summary-sig-name">serve_xml</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_xml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_rss"></a><span class="summary-sig-name">serve_rss</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_rss">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_json"></a><span class="summary-sig-name">serve_json</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_jsonrpc"></a><span class="summary-sig-name">serve_jsonrpc</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_jsonrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_xmlrpc"></a><span class="summary-sig-name">serve_xmlrpc</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_xmlrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_amfrpc"></a><span class="summary-sig-name">serve_amfrpc</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">version</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_amfrpc">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="serve_soap"></a><span class="summary-sig-name">serve_soap</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">version</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">1.1</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.serve_soap">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      register services with: service = Service(globals()) @service.run 
      @service.rss @service.json @service.jsonrpc @service.xmlrpc 
      @service.jsonrpc @service.amfrpc @service.amfrpc3('domain') 
      @service.soap('Method', returns={'Result':int}, 
      args={'a':int,'b':int,})</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="error"></a><span class="summary-sig-name">error</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">environment</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.run">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.run
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  Then call it with:
<pre class="literalblock">
   wget http://..../app/default/call/run/myfunction?a=3&amp;b=4
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="csv"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">csv</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.csv">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.csv
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  Then call it with:
<pre class="literalblock">
   wget http://..../app/default/call/csv/myfunction?a=3&amp;b=4
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="xml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xml</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.xml">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.xml
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  Then call it with:
<pre class="literalblock">
   wget http://..../app/default/call/xml/myfunction?a=3&amp;b=4
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="rss"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rss</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.rss">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.rss
   def myfunction():
       return dict(title=..., link=..., description=...,
           created_on=..., entries=[dict(title=..., link=...,
               description=..., created_on=...])
   def call():
       return service()
</pre>
  Then call it with:
<pre class="literalblock">
   wget http://..../app/default/call/rss/myfunction
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="json"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">json</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.json">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.json
   def myfunction(a, b):
       return [{a: b}]
   def call():
       return service()
</pre>
  Then call it with:
<pre class="literalblock">
   wget http://..../app/default/call/json/myfunction?a=hello&amp;b=world
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="jsonrpc"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">jsonrpc</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.jsonrpc">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.jsonrpc
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  Then call it with:
<pre class="literalblock">
   wget http://..../app/default/call/jsonrpc/myfunction?a=hello&amp;b=world
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="xmlrpc"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">xmlrpc</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.xmlrpc">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.xmlrpc
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  The call it with:
<pre class="literalblock">
   wget http://..../app/default/call/xmlrpc/myfunction?a=hello&amp;b=world
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="amfrpc"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">amfrpc</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.amfrpc">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.amfrpc
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  The call it with:
<pre class="literalblock">
   wget http://..../app/default/call/amfrpc/myfunction?a=hello&amp;b=world
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="amfrpc3"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">amfrpc3</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">domain</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">default</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.amfrpc3">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  example:
<pre class="literalblock">
   service = Service(globals())
   @service.amfrpc3('domain')
   def myfunction(a, b):
       return a + b
   def call():
       return service()
</pre>
  The call it with:
<pre class="literalblock">
   wget http://..../app/default/call/amfrpc3/myfunction?a=hello&amp;b=world
</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="soap"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">soap</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">returns</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">args</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">doc</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.soap">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

example::

    service = Service(globals())
    @service.soap('MyFunction',returns={'result':int},args={'a':int,'b':int,})
    def myfunction(a, b):
        return a + b
    def call():
        return service()

The call it with::

    from gluon.contrib.pysimplesoap.client import SoapClient
    client = SoapClient(wsdl=&quot;http://..../app/default/call/soap?WSDL&quot;)
    response = client.MyFunction(a=1,b=2)
    return response['result']

Exposes online generated documentation and xml example messages at:
- http://..../app/default/call/soap

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>register services with: service = Service(globals()) @service.run 
  @service.rss @service.json @service.jsonrpc @service.xmlrpc 
  @service.jsonrpc @service.amfrpc @service.amfrpc3('domain') 
  @service.soap('Method', returns={'Result':int}, 
  args={'a':int,'b':int,})</p>
  <p>expose services with</p>
  <p>def call(): return service()</p>
  call services with http://..../app/default/call/run?[parameters] 
  http://..../app/default/call/rss?[parameters] 
  http://..../app/default/call/json?[parameters] 
  http://..../app/default/call/jsonrpc http://..../app/default/call/xmlrpc 
  http://..../app/default/call/amfrpc http://..../app/default/call/amfrpc3 
  http://..../app/default/call/soap
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.tools.Service.JsonRpcException-class.html version [9e958ec2fc].








































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.tools.Service.JsonRpcException</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.tools-module.html">Module&nbsp;tools</a> ::
        <a href="web2py.gluon.tools.Service-class.html">Class&nbsp;Service</a> ::
        Class&nbsp;JsonRpcException
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.tools.Service.JsonRpcException-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class JsonRpcException</h1><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.JsonRpcException">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        <a href="exceptions.Exception-class.html">exceptions.Exception</a> --+
                               |
                              <strong class="uidshort">Service.JsonRpcException</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.tools.Service.JsonRpcException-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">info</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.JsonRpcException.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="exceptions.Exception-class.html">exceptions.Exception</a></code></b>:
      <code><a href="exceptions.Exception-class.html#__new__">__new__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__getitem__</code>,
      <code>__getslice__</code>,
      <code>__reduce__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__setstate__</code>,
      <code>__str__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__hash__</code>,
      <code>__reduce_ex__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
      <code>args</code>,
      <code>message</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">code</span>,
        <span class="sig-arg">info</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.tools-pysrc.html#Service.JsonRpcException.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      exceptions.Exception.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.utils-module.html version [d89a1ae043].



















































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.utils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;utils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.utils-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module utils</h1><span class="codelink"><a href="web2py.gluon.utils-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  This file specifically includes utilities for security.<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="md5_hash"></a><span class="summary-sig-name">md5_hash</span>(<span class="summary-sig-arg">text</span>)</span><br />
      Generate a md5 hash with the given text</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.utils-pysrc.html#md5_hash">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="simple_hash"></a><span class="summary-sig-name">simple_hash</span>(<span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">digest_alg</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">md5</code><code class="variable-quote">'</code></span>)</span><br />
      Generates hash with the given text using the specified digest 
      hashing algorithm</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.utils-pysrc.html#simple_hash">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_digest"></a><span class="summary-sig-name">get_digest</span>(<span class="summary-sig-arg">value</span>)</span><br />
      Returns a hashlib digest algorithm from a string</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.utils-pysrc.html#get_digest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="hmac_hash"></a><span class="summary-sig-name">hmac_hash</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">digest_alg</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">md5</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">salt</span>=<span class="summary-sig-default">1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.utils-pysrc.html#hmac_hash">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.utils-module.html#initialize_urandom" class="summary-sig-name">initialize_urandom</a>()</span><br />
      This function and the web2py_uuid follow from the following 
      discussion: 
      http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.utils-pysrc.html#initialize_urandom">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.utils-module.html#web2py_uuid" class="summary-sig-name">web2py_uuid</a>()</span><br />
      This function follows from the following discussion: 
      http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.utils-pysrc.html#web2py_uuid">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.utils-module.html#ctokens" class="summary-name">ctokens</a> = <code title="[176,
 173,
 75,
 184,
 184,
 169,
 176,
 173,
..."><code class="variable-group">[</code>176<code class="variable-op">, </code>173<code class="variable-op">, </code>75<code class="variable-op">, </code>184<code class="variable-op">, </code>184<code class="variable-op">, </code>169<code class="variable-op">, </code>176<code class="variable-op">, </code>173<code class="variable-op">, </code>75<code class="variable-op">, </code>184<code class="variable-op">, </code>184<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="initialize_urandom"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">initialize_urandom</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.utils-pysrc.html#initialize_urandom">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>This function and the web2py_uuid follow from the following 
  discussion: 
  http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09</p>
  <p>At startup web2py compute a unique ID that identifies the machine by 
  adding uuid.getnode() + int(time.time() * 1e3)</p>
  <p>This is a 48-bit number. It converts the number into 16 8-bit tokens. 
  It uses this value to initialize the entropy source ('/dev/urandom') and 
  to seed random.</p>
  If os.random() is not supported, it falls back to using random and 
  issues a warning.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="web2py_uuid"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">web2py_uuid</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.utils-pysrc.html#web2py_uuid">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>This function follows from the following discussion: 
  http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09</p>
  It works like uuid.uuid4 except that tries to use os.urandom() if 
  possible and it XORs the output with the tokens uniquely associated with 
  this machine.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="ctokens"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ctokens</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code>176<code class="variable-op">,</code>
 173<code class="variable-op">,</code>
 75<code class="variable-op">,</code>
 184<code class="variable-op">,</code>
 184<code class="variable-op">,</code>
 169<code class="variable-op">,</code>
 176<code class="variable-op">,</code>
 173<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.utils-pysrc.html version [b1d3d5db34].






































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.utils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;utils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.utils-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.utils-module.html">Module web2py.gluon.utils</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">This file specifically includes utilities for security.</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hashlib</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hmac</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">uuid</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">random</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-0', 'time', 'link-0');">time</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-1', 'logger', 'link-1');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="md5_hash"></a><div id="md5_hash-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="md5_hash-toggle" onclick="return toggle('md5_hash');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.utils-module.html#md5_hash">md5_hash</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="md5_hash-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="md5_hash-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-docstring">""" Generate a md5 hash with the given text """</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">md5</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">hexdigest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="simple_hash"></a><div id="simple_hash-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="simple_hash-toggle" onclick="return toggle('simple_hash');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.utils-module.html#simple_hash">simple_hash</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">,</tt> <tt class="py-param">digest_alg</tt> <tt class="py-op">=</tt> <tt class="py-string">'md5'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="simple_hash-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="simple_hash-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">    Generates hash with the given text using the specified</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">    digest hashing algorithm</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">digest_alg</tt><tt class="py-op">:</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">RuntimeError</tt><tt class="py-op">,</tt> <tt class="py-string">"simple_hash with digest_alg=None"</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">digest_alg</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-name">h</tt> <tt class="py-op">=</tt> <tt class="py-name">digest_alg</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-name">h</tt> <tt class="py-op">=</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">new</tt><tt class="py-op">(</tt><tt class="py-name">digest_alg</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt class="py-name">h</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-2', 'update', 'link-2');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">h</tt><tt class="py-op">.</tt><tt class="py-name">hexdigest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="get_digest"></a><div id="get_digest-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="get_digest-toggle" onclick="return toggle('get_digest');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.utils-module.html#get_digest">get_digest</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_digest-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_digest-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring">    Returns a hashlib digest algorithm from a string</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-3', 'lower', 'link-3');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">"md5"</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">md5</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">"sha1"</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">sha1</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">"sha224"</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">sha224</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">"sha256"</tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">sha256</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">"sha384"</tt><tt class="py-op">:</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">sha384</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">"sha512"</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">sha512</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Invalid digest algorithm"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"> </tt>
<a name="hmac_hash"></a><div id="hmac_hash-def"><a name="L62"></a><tt class="py-lineno"> 62</tt> <a class="py-toggle" href="#" id="hmac_hash-toggle" onclick="return toggle('hmac_hash');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.utils-module.html#hmac_hash">hmac_hash</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">digest_alg</tt><tt class="py-op">=</tt><tt class="py-string">'md5'</tt><tt class="py-op">,</tt> <tt class="py-param">salt</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="hmac_hash-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="hmac_hash-expanded"><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">key</tt><tt class="py-op">:</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-name">digest_alg</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-name">digest_alg</tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name" targets="Function web2py.gluon.utils.get_digest()=web2py.gluon.utils-module.html#get_digest"><a title="web2py.gluon.utils.get_digest" class="py-name" href="#" onclick="return doclink('link-4', 'get_digest', 'link-4');">get_digest</a></tt><tt class="py-op">(</tt><tt class="py-name">digest_alg</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">hmac</tt><tt class="py-op">.</tt><tt class="py-name">new</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">digest_alg</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">salt</tt><tt class="py-op">:</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-5', 'update', 'link-2');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">salt</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">hexdigest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-comment">### compute constant ctokens</tt> </tt>
<a name="initialize_urandom"></a><div id="initialize_urandom-def"><a name="L73"></a><tt class="py-lineno"> 73</tt> <a class="py-toggle" href="#" id="initialize_urandom-toggle" onclick="return toggle('initialize_urandom');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.utils-module.html#initialize_urandom">initialize_urandom</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="initialize_urandom-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="initialize_urandom-expanded"><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">    This function and the web2py_uuid follow from the following discussion:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">    http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">    At startup web2py compute a unique ID that identifies the machine by adding</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">    uuid.getnode() + int(time.time() * 1e3)</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-docstring">    This is a 48-bit number. It converts the number into 16 8-bit tokens.</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-docstring">    It uses this value to initialize the entropy source ('/dev/urandom') and to seed random.</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-docstring">    If os.random() is not supported, it falls back to using random and issues a warning.</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">    <tt class="py-name">node_id</tt> <tt class="py-op">=</tt> <tt class="py-name">uuid</tt><tt class="py-op">.</tt><tt class="py-name">getnode</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-name">microseconds</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-6" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-6', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-7', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">1e6</tt><tt class="py-op">)</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt id="link-8" class="py-name" targets="Variable web2py.gluon.utils.ctokens=web2py.gluon.utils-module.html#ctokens"><a title="web2py.gluon.utils.ctokens" class="py-name" href="#" onclick="return doclink('link-8', 'ctokens', 'link-8');">ctokens</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">node_id</tt> <tt class="py-op">+</tt> <tt class="py-name">microseconds</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;&gt;</tt> <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">%</tt><tt class="py-number">6</tt><tt class="py-op">)</tt><tt class="py-op">*</tt><tt class="py-number">8</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">256</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">16</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">seed</tt><tt class="py-op">(</tt><tt class="py-name">node_id</tt> <tt class="py-op">+</tt> <tt class="py-name">microseconds</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">urandom</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-comment"># try to add process-specific entropy</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">frandom</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-string">'/dev/urandom'</tt><tt class="py-op">,</tt><tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                <tt class="py-name">frandom</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-9', 'write', 'link-9');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-10', 'join', 'link-10');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt id="link-11" class="py-name"><a title="web2py.gluon.utils.ctokens" class="py-name" href="#" onclick="return doclink('link-11', 'ctokens', 'link-8');">ctokens</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                <tt class="py-name">frandom</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-12', 'close', 'link-12');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">            <tt class="py-comment"># works anyway</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">pass</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt id="link-13" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-13', 'logger', 'link-1');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-string">"""Cryptographically secure session management is not possible on your system because</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-string">your system does not provide a cryptographically secure entropy source.</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-string">This is not specific to web2py; consider deploying on a different operating system."""</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-14" class="py-name"><a title="web2py.gluon.utils.ctokens" class="py-name" href="#" onclick="return doclink('link-14', 'ctokens', 'link-8');">ctokens</a></tt> </tt>
</div><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt id="link-15" class="py-name"><a title="web2py.gluon.utils.ctokens" class="py-name" href="#" onclick="return doclink('link-15', 'ctokens', 'link-8');">ctokens</a></tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name" targets="Function web2py.gluon.utils.initialize_urandom()=web2py.gluon.utils-module.html#initialize_urandom"><a title="web2py.gluon.utils.initialize_urandom" class="py-name" href="#" onclick="return doclink('link-16', 'initialize_urandom', 'link-16');">initialize_urandom</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt>
<a name="web2py_uuid"></a><div id="web2py_uuid-def"><a name="L110"></a><tt class="py-lineno">110</tt> <a class="py-toggle" href="#" id="web2py_uuid-toggle" onclick="return toggle('web2py_uuid');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.utils-module.html#web2py_uuid">web2py_uuid</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2py_uuid-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="web2py_uuid-expanded"><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-docstring">    This function follows from the following discussion:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-docstring">    http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-docstring">    It works like uuid.uuid4 except that tries to use os.urandom() if possible</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"><tt class="py-docstring">    and it XORs the output with the tokens uniquely associated with this machine.</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">randrange</tt><tt class="py-op">(</tt><tt class="py-number">256</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">16</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-name">ubytes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">urandom</tt><tt class="py-op">(</tt><tt class="py-number">16</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-comment"># use /dev/urandom if possible</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">bytes</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">^</tt> <tt class="py-name">ubytes</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">16</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">:</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt class="py-comment">## xor bytes with constant ctokens</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-17', 'join', 'link-10');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt> <tt class="py-op">^</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.utils.ctokens" class="py-name" href="#" onclick="return doclink('link-18', 'ctokens', 'link-8');">ctokens</a></tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt><tt class="py-op">,</tt><tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">bytes</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">uuid</tt><tt class="py-op">.</tt><tt class="py-name">UUID</tt><tt class="py-op">(</tt><tt class="py-name">bytes</tt><tt class="py-op">=</tt><tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-19', 'version', 'link-19');">version</a></tt><tt class="py-op">=</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators-module.html version [73d78f5035].











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;validators
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module validators</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.Validator-class.html" class="summary-name">Validator</a><br />
      Root for all validators, mainly for documentation purposes.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_MATCH-class.html" class="summary-name">IS_MATCH</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EQUAL_TO-class.html" class="summary-name">IS_EQUAL_TO</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EXPR-class.html" class="summary-name">IS_EXPR</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_LENGTH-class.html" class="summary-name">IS_LENGTH</a><br />
      Checks if length of field's value fits between given 
        boundaries.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IN_SET-class.html" class="summary-name">IS_IN_SET</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IN_DB-class.html" class="summary-name">IS_IN_DB</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html" class="summary-name">IS_NOT_IN_DB</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html" class="summary-name">IS_INT_IN_RANGE</a><br />
      Determine that the argument is (or can be represented as) an 
        int, and that it falls within the specified range.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html" class="summary-name">IS_FLOAT_IN_RANGE</a><br />
      Determine that the argument is (or can be represented as) a 
        float, and that it falls within the specified inclusive range.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html" class="summary-name">IS_DECIMAL_IN_RANGE</a><br />
      Determine that the argument is (or can be represented as) a 
        Python Decimal, and that it falls within the specified inclusive 
        range.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html" class="summary-name">IS_NOT_EMPTY</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html" class="summary-name">IS_ALPHANUMERIC</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMAIL-class.html" class="summary-name">IS_EMAIL</a><br />
      Checks if field's value is a valid email address.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_GENERIC_URL-class.html" class="summary-name">IS_GENERIC_URL</a><br />
      Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The URL scheme specified (if one is specified) is not valid

Based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html

This function only checks the URL's syntax.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_HTTP_URL-class.html" class="summary-name">IS_HTTP_URL</a><br />
      Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

Based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html

This function only checks the URL's syntax.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_URL-class.html" class="summary-name">IS_URL</a><br />
      Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

(These rules are based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html)

This function only checks the URL's syntax.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_TIME-class.html" class="summary-name">IS_TIME</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATE-class.html" class="summary-name">IS_DATE</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATETIME-class.html" class="summary-name">IS_DATETIME</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html" class="summary-name">IS_DATE_IN_RANGE</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html" class="summary-name">IS_DATETIME_IN_RANGE</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_LIST_OF-class.html" class="summary-name">IS_LIST_OF</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_LOWER-class.html" class="summary-name">IS_LOWER</a><br />
      convert to lower case
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_UPPER-class.html" class="summary-name">IS_UPPER</a><br />
      convert to upper case
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_SLUG-class.html" class="summary-name">IS_SLUG</a><br />
      convert arbitrary text string to a slug
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMPTY_OR-class.html" class="summary-name">IS_EMPTY_OR</a><br />
      dummy class for testing IS_EMPTY_OR
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMPTY_OR-class.html" class="summary-name">IS_NULL_OR</a><br />
      dummy class for testing IS_EMPTY_OR
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.CLEANUP-class.html" class="summary-name">CLEANUP</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.CRYPT-class.html" class="summary-name">CRYPT</a><br />
      example:
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_STRONG-class.html" class="summary-name">IS_STRONG</a><br />
      example:
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IN_SUBSET-class.html" class="summary-name">IS_IN_SUBSET</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IMAGE-class.html" class="summary-name">IS_IMAGE</a><br />
      Checks if file uploaded through file input was saved in one of 
        selected image formats and has dimensions (width and height) within
        given boundaries.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html" class="summary-name">IS_UPLOAD_FILENAME</a><br />
      Checks if name and extension of file uploaded through file input matches
given criteria.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IPV4-class.html" class="summary-name">IS_IPV4</a><br />
      Checks if field's value is an IP version 4 address in decimal form.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="translate"></a><span class="summary-sig-name">translate</span>(<span class="summary-sig-arg">text</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#translate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="options_sorter"></a><span class="summary-sig-name">options_sorter</span>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#options_sorter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="is_empty"></a><span class="summary-sig-name">is_empty</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">empty_regex</span>=<span class="summary-sig-default">1</span>)</span><br />
      test empty field</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#is_empty">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators-module.html#escape_unicode" class="summary-sig-name">escape_unicode</a>(<span class="summary-sig-arg">string</span>)</span><br />
      Converts a unicode string into US-ASCII, using a simple conversion scheme.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#escape_unicode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators-module.html#unicode_to_ascii_authority" class="summary-sig-name">unicode_to_ascii_authority</a>(<span class="summary-sig-arg">authority</span>)</span><br />
      Follows the steps in RFC 3490, Section 4 to convert a unicode authority
string into its ASCII equivalent.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#unicode_to_ascii_authority">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators-module.html#unicode_to_ascii_url" class="summary-sig-name">unicode_to_ascii_url</a>(<span class="summary-sig-arg">url</span>,
        <span class="summary-sig-arg">prepend_scheme</span>)</span><br />
      Converts the inputed unicode url into a US-ASCII equivalent.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#unicode_to_ascii_url">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators-module.html#urlify" class="summary-sig-name">urlify</a>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">maxlen</span>=<span class="summary-sig-default">80</span>,
        <span class="summary-sig-arg">keep_underscores</span>=<span class="summary-sig-default">True</span>)</span><br />
      Convert incoming string to a simplified ASCII subset.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#urlify">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex1"></a><span class="summary-name">regex1</span> = <code title="re.compile(r'[\w_]+\.[\w_]+')">re.compile(r'<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>\.<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="regex2"></a><span class="summary-name">regex2</span> = <code title="re.compile(r'%\((?P&lt;name&gt;[^\)]+)\)s')">re.compile(r'%\(<code class="re-group">(?P&lt;</code><code class="re-ref">name</code><code class="re-group">&gt;</code><code class="re-group">[^</code>\)<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\)s')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators-module.html#official_url_schemes" class="summary-name">official_url_schemes</a> = <code title="['aaa',
 'aaas',
 'acap',
 'cap',
 'cid',
 'crid',
 'data',
 'dav',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">aaa</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">aaas</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">acap</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">cap</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">cid</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators-module.html#unofficial_url_schemes" class="summary-name">unofficial_url_schemes</a> = <code title="['about',
 'adiumxtra',
 'aim',
 'afp',
 'aw',
 'callto',
 'chrome',
 'cvs',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">about</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">adiumxtra</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">aim</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">afp</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators-module.html#all_url_schemes" class="summary-name">all_url_schemes</a> = <code title="[None,
 'aaa',
 'aaas',
 'acap',
 'cap',
 'cid',
 'crid',
 'data',
..."><code class="variable-group">[</code>None<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">aaa</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">aaas</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">acap</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">cap</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">cid</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="http_schemes"></a><span class="summary-name">http_schemes</span> = <code title="[None, 'http', 'https']"><code class="variable-group">[</code>None<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">https</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators-module.html#url_split_regex" class="summary-name">url_split_regex</a> = <code title="re.compile(r'^(([^:/\?#]+):)?(//([^/\?#]*))?([^\?#]*)(\?([^#]*))?(#(.*\
))?')">re.compile(r'^<code class="re-group">(</code><code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>:/\?#<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>:<code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>//<code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>/\?#<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="label_split_regex"></a><span class="summary-name">label_split_regex</span> = <code title="re.compile(r'[\.\u3002\uff0e\uff61]')">re.compile(r'<code class="re-group">[</code>\.\u3002\uff0e\uff61<code class="re-group">]</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators-module.html#official_top_level_domains" class="summary-name">official_top_level_domains</a> = <code title="['ac',
 'ad',
 'ae',
 'aero',
 'af',
 'ag',
 'ai',
 'al',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">ac</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ad</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ae</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">aero</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">af</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators-module.html#regex_time" class="summary-name">regex_time</a> = <code title="re.compile(r'((?P&lt;h&gt;[0-9]+))([^0-9 ]+(?P&lt;m&gt;[0-9 ]+))?([^0-9ap ]+(?P&lt;s&gt;\
[0-9]*))?((?P&lt;d&gt;[ap]m))?')">re.compile(r'<code class="re-group">(</code><code class="re-group">(?P&lt;</code><code class="re-ref">h</code><code class="re-group">&gt;</code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>0<code class="re-op">-</code>9 <code class="re-group">]</code><code class="re-op">+</code><code class="re-group">(?P&lt;</code><code class="re-ref">m</code><code class="re-group">&gt;</code><code class="re-group">[</code>0<code class="re-op">-</code>9 <code class="re-group">]</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="escape_unicode"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">escape_unicode</span>(<span class="sig-arg">string</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#escape_unicode">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Converts a unicode string into US-ASCII, using a simple conversion scheme.
Each unicode character that does not have a US-ASCII equivalent is
converted into a URL escaped form based on its hexadecimal value.
For example, the unicode character '\u4e86' will become the string '%4e%86'

:param string: unicode string, the unicode string to convert into an
    escaped US-ASCII form
:returns: the US-ASCII escaped form of the inputted string
:rtype: string

@author: Jonathan Benn

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="unicode_to_ascii_authority"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unicode_to_ascii_authority</span>(<span class="sig-arg">authority</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#unicode_to_ascii_authority">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Follows the steps in RFC 3490, Section 4 to convert a unicode authority
string into its ASCII equivalent.
For example, u'www.Alliancefran&#231;aise.nu' will be converted into
'www.xn--alliancefranaise-npb.nu'

:param authority: unicode string, the URL authority component to convert,
                  e.g. u'www.Alliancefran&#231;aise.nu'
:returns: the US-ASCII character equivalent to the inputed authority,
         e.g. 'www.xn--alliancefranaise-npb.nu'
:rtype: string
:raises Exception: if the function is not able to convert the inputed
    authority

@author: Jonathan Benn

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="unicode_to_ascii_url"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unicode_to_ascii_url</span>(<span class="sig-arg">url</span>,
        <span class="sig-arg">prepend_scheme</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#unicode_to_ascii_url">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

Converts the inputed unicode url into a US-ASCII equivalent. This function
goes a little beyond RFC 3490, which is limited in scope to the domain name
(authority) only. Here, the functionality is expanded to what was observed
on Wikipedia on 2009-Jan-22:

   Component    Can Use Unicode?
   ---------    ----------------
   scheme       No
   authority    Yes
   path         Yes
   query        Yes
   fragment     No

The authority component gets converted to punycode, but occurrences of
unicode in other components get converted into a pair of URI escapes (we
assume 4-byte unicode). E.g. the unicode character U+4E2D will be
converted into '%4E%2D'. Testing with Firefox v3.0.5 has shown that it can
understand this kind of URI encoding.

:param url: unicode string, the URL to convert from unicode into US-ASCII
:param prepend_scheme: string, a protocol scheme to prepend to the URL if
    we're having trouble parsing it.
    e.g. &quot;http&quot;. Input None to disable this functionality
:returns: a US-ASCII equivalent of the inputed url
:rtype: string

@author: Jonathan Benn

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="urlify"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">urlify</span>(<span class="sig-arg">value</span>,
        <span class="sig-arg">maxlen</span>=<span class="sig-default">80</span>,
        <span class="sig-arg">keep_underscores</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#urlify">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert incoming string to a simplified ASCII subset. if 
  (keep_underscores): underscores are retained in the string else: 
  underscores are translated to hyphens (default)
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="official_url_schemes"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">official_url_schemes</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">aaa</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">aaas</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">acap</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">cap</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">cid</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">crid</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">data</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">dav</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="unofficial_url_schemes"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">unofficial_url_schemes</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">about</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">adiumxtra</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">aim</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">afp</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">aw</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">callto</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">chrome</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">cvs</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="all_url_schemes"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">all_url_schemes</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code>None<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">aaa</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">aaas</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">acap</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">cap</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">cid</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">crid</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">data</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="url_split_regex"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">url_split_regex</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'^<code class="re-group">(</code><code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>:/\?#<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>:<code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>//<code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>/\?#<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>\?#<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group">(</code>\?<code class="re-group">(</code><code class="re-group">[^</code>#<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>#<code class="re-group">(</code>.<code class="re-op">*</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="official_top_level_domains"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">official_top_level_domains</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">ac</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">ad</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">ae</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">aero</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">af</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">ag</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">ai</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">al</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_time"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_time</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-group">(</code><code class="re-group">(?P&lt;</code><code class="re-ref">h</code><code class="re-group">&gt;</code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>0<code class="re-op">-</code>9 <code class="re-group">]</code><code class="re-op">+</code><code class="re-group">(?P&lt;</code><code class="re-ref">m</code><code class="re-group">&gt;</code><code class="re-group">[</code>0<code class="re-op">-</code>9 <code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code><code class="re-group">[</code><code class="re-op">^</code>0<code class="re-op">-</code>9ap <code class="re-group">]</code><code class="re-op">+</code><code class="re-group">(?P&lt;</code><code class="re-ref">s</code><code class="re-group">&gt;</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code><code class="re-group">(?P&lt;</code><code class="re-ref">d</code><code class="re-group">&gt;</code><code class="re-group">[</code>ap<code class="re-group">]</code>m<code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code>')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators-pysrc.html version [55a281d17d].













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;validators
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.validators-module.html">Module web2py.gluon.validators</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">#!/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-docstring">Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE</tt> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.datetime=datetime.datetime-class.html"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-1', 'time', 'link-1');">time</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cgi</tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">decimal</tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">unicodedata</tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">cStringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.utils=web2py.gluon.utils-module.html"><a title="web2py.gluon.utils" class="py-name" href="#" onclick="return doclink('link-2', 'utils', 'link-2');">utils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Function web2py.gluon.utils.simple_hash()=web2py.gluon.utils-module.html#simple_hash"><a title="web2py.gluon.utils.simple_hash" class="py-name" href="#" onclick="return doclink('link-3', 'simple_hash', 'link-3');">simple_hash</a></tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Function web2py.gluon.utils.hmac_hash()=web2py.gluon.utils-module.html#hmac_hash"><a title="web2py.gluon.utils.hmac_hash" class="py-name" href="#" onclick="return doclink('link-4', 'hmac_hash', 'link-4');">hmac_hash</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line">    <tt class="py-string">'CLEANUP'</tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line">    <tt class="py-string">'CRYPT'</tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line">    <tt class="py-string">'IS_ALPHANUMERIC'</tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line">    <tt class="py-string">'IS_DATE_IN_RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line">    <tt class="py-string">'IS_DATE'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line">    <tt class="py-string">'IS_DATETIME_IN_RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line">    <tt class="py-string">'IS_DATETIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line">    <tt class="py-string">'IS_DECIMAL_IN_RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line">    <tt class="py-string">'IS_EMAIL'</tt><tt class="py-op">,</tt> </tt>
<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line">    <tt class="py-string">'IS_EMPTY_OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line">    <tt class="py-string">'IS_EXPR'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line">    <tt class="py-string">'IS_FLOAT_IN_RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">    <tt class="py-string">'IS_IMAGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line">    <tt class="py-string">'IS_IN_DB'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">    <tt class="py-string">'IS_IN_SET'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">    <tt class="py-string">'IS_INT_IN_RANGE'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">    <tt class="py-string">'IS_IPV4'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">    <tt class="py-string">'IS_LENGTH'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">    <tt class="py-string">'IS_LIST_OF'</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">    <tt class="py-string">'IS_LOWER'</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">    <tt class="py-string">'IS_MATCH'</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">    <tt class="py-string">'IS_EQUAL_TO'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">    <tt class="py-string">'IS_NOT_EMPTY'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">    <tt class="py-string">'IS_NOT_IN_DB'</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">    <tt class="py-string">'IS_NULL_OR'</tt><tt class="py-op">,</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">    <tt class="py-string">'IS_SLUG'</tt><tt class="py-op">,</tt> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">    <tt class="py-string">'IS_STRONG'</tt><tt class="py-op">,</tt> </tt>
<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">    <tt class="py-string">'IS_TIME'</tt><tt class="py-op">,</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">    <tt class="py-string">'IS_UPLOAD_FILENAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line">    <tt class="py-string">'IS_UPPER'</tt><tt class="py-op">,</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">    <tt class="py-string">'IS_URL'</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line"> </tt>
<a name="translate"></a><div id="translate-def"><a name="L58"></a><tt class="py-lineno">  58</tt> <a class="py-toggle" href="#" id="translate-toggle" onclick="return toggle('translate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#translate">translate</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="translate-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="translate-expanded"><a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt><tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.globals=web2py.gluon.globals-module.html"><a title="web2py.gluon.globals" class="py-name" href="#" onclick="return doclink('link-5', 'globals', 'link-5');">globals</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Variable web2py.gluon.current=web2py.gluon-module.html#current,Variable web2py.gluon.globals.current=web2py.gluon.globals-module.html#current,Variable web2py.gluon.tools.current=web2py.gluon.tools-module.html#current"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-6', 'current', 'link-6');">current</a></tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-7" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-7', 'current', 'link-6');">current</a></tt><tt class="py-op">,</tt><tt class="py-string">'T'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-8" class="py-name"><a title="web2py.gluon.current
web2py.gluon.globals.current
web2py.gluon.tools.current" class="py-name" href="#" onclick="return doclink('link-8', 'current', 'link-6');">current</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Variable web2py.gluon.languages.lazyT.T=web2py.gluon.languages.lazyT-class.html#T"><a title="web2py.gluon.languages.lazyT.T" class="py-name" href="#" onclick="return doclink('link-9', 'T', 'link-9');">T</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">text</tt> </tt>
</div><a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"> </tt>
<a name="options_sorter"></a><div id="options_sorter-def"><a name="L65"></a><tt class="py-lineno">  65</tt> <a class="py-toggle" href="#" id="options_sorter-toggle" onclick="return toggle('options_sorter');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#options_sorter">options_sorter</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="options_sorter-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="options_sorter-expanded"><a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name" targets="Variable sqlite3.dbapi2.x=sqlite3.dbapi2-module.html#x"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-10', 'x', 'link-10');">x</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.dal.Expression.upper()=web2py.gluon.dal.Expression-class.html#upper"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-11', 'upper', 'link-11');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-12', 'upper', 'link-11');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
</div><a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line"> </tt>
<a name="Validator"></a><div id="Validator-def"><a name="L68"></a><tt class="py-lineno">  68</tt> <a class="py-toggle" href="#" id="Validator-toggle" onclick="return toggle('Validator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.Validator-class.html">Validator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Validator-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Validator-expanded"><a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"><tt class="py-docstring">    Root for all validators, mainly for documentation purposes.</tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-docstring">    Validators are classes used to validate input fields (including forms</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"><tt class="py-docstring">    generated from database tables).</tt> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line"><tt class="py-docstring">    Here is an example of using a validator with a FORM::</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_name='a', requires=IS_INT_IN_RANGE(0, 10))</tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt class="py-docstring">    Here is an example of how to require a validator for a table field::</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"><tt class="py-docstring">        db.define_table('person', SQLField('name'))</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line"><tt class="py-docstring">        db.person.name.requires=IS_NOT_EMPTY()</tt> </tt>
<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"><tt class="py-docstring">    Validators are always assigned using the requires attribute of a field. A</tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt class="py-docstring">    field can have a single validator or multiple validators. Multiple</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line"><tt class="py-docstring">    validators are made part of a list::</tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-docstring">        db.person.name.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'person.id')]</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-docstring">    Validators are called by the function accepts on a FORM or other HTML</tt> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-docstring">    helper object that contains a form. They are always called in the order in</tt> </tt>
<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line"><tt class="py-docstring">    which they are listed.</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"><tt class="py-docstring">    Built-in validators have constructors that take the optional argument error</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-docstring">    message which allows you to change the default error message.</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-docstring">    Here is an example of a validator on a database table::</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-docstring">        db.person.name.requires=IS_NOT_EMPTY(error_message=T('fill this'))</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line"><tt class="py-docstring">    where we have used the translation operator T to allow for</tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"><tt class="py-docstring">    internationalization.</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"><tt class="py-docstring">    Notice that default error messages are not translated.</tt> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line"> </tt>
<a name="Validator.formatter"></a><div id="Validator.formatter-def"><a name="L106"></a><tt class="py-lineno"> 106</tt> <a class="py-toggle" href="#" id="Validator.formatter-toggle" onclick="return toggle('Validator.formatter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Validator.formatter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Validator.formatter-expanded"><a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring">        For some validators returns a formatted version (matching the validator)</tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring">        of value. Otherwise just returns the value.</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
</div></div><a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line"> </tt>
<a name="IS_MATCH"></a><div id="IS_MATCH-def"><a name="L114"></a><tt class="py-lineno"> 114</tt> <a class="py-toggle" href="#" id="IS_MATCH-toggle" onclick="return toggle('IS_MATCH');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_MATCH-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_MATCH-expanded"><a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_MATCH('.+'))</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">    the argument of IS_MATCH is a regular expression::</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_MATCH('.+')('hello')</tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"><tt class="py-docstring">        ('hello', None)</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_MATCH('.+')('')</tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'invalid expression')</tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"> </tt>
<a name="IS_MATCH.__init__"></a><div id="IS_MATCH.__init__-def"><a name="L129"></a><tt class="py-lineno"> 129</tt> <a class="py-toggle" href="#" id="IS_MATCH.__init__-toggle" onclick="return toggle('IS_MATCH.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_MATCH-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">expression</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'invalid expression'</tt><tt class="py-op">,</tt> <tt class="py-param">strict</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_MATCH.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_MATCH.__init__-expanded"><a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-13" class="py-name" targets="Variable web2py.gluon.html.HTML.strict=web2py.gluon.html.HTML-class.html#strict,Variable web2py.gluon.html.XHTML.strict=web2py.gluon.html.XHTML-class.html#strict"><a title="web2py.gluon.html.HTML.strict
web2py.gluon.html.XHTML.strict" class="py-name" href="#" onclick="return doclink('link-13', 'strict', 'link-13');">strict</a></tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">expression</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method web2py.gluon.dal.Expression.endswith()=web2py.gluon.dal.Expression-class.html#endswith"><a title="web2py.gluon.dal.Expression.endswith" class="py-name" href="#" onclick="return doclink('link-14', 'endswith', 'link-14');">endswith</a></tt><tt class="py-op">(</tt><tt class="py-string">'$'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">                <tt class="py-name">expression</tt> <tt class="py-op">=</tt> <tt class="py-string">'(%s)$'</tt> <tt class="py-op">%</tt> <tt class="py-name">expression</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Variable web2py.gluon.validators.IS_EMAIL.regex=web2py.gluon.validators.IS_EMAIL-class.html#regex,Variable web2py.gluon.validators.IS_IPV4.regex=web2py.gluon.validators.IS_IPV4-class.html#regex"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-15', 'regex', 'link-15');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">expression</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line"> </tt>
<a name="IS_MATCH.__call__"></a><div id="IS_MATCH.__call__-def"><a name="L136"></a><tt class="py-lineno"> 136</tt> <a class="py-toggle" href="#" id="IS_MATCH.__call__-toggle" onclick="return toggle('IS_MATCH.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_MATCH-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_MATCH.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_MATCH.__call__-expanded"><a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">        <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-16', 'regex', 'link-15');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Method web2py.gluon.languages.translator.translate()=web2py.gluon.languages.translator-class.html#translate,Function web2py.gluon.validators.translate()=web2py.gluon.validators-module.html#translate"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-17', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line"> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"> </tt>
<a name="IS_EQUAL_TO"></a><div id="IS_EQUAL_TO-def"><a name="L143"></a><tt class="py-lineno"> 143</tt> <a class="py-toggle" href="#" id="IS_EQUAL_TO-toggle" onclick="return toggle('IS_EQUAL_TO');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EQUAL_TO-class.html">IS_EQUAL_TO</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EQUAL_TO-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_EQUAL_TO-expanded"><a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='password')</tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='password2',</tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-docstring">              requires=IS_EQUAL_TO(request.vars.password))</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring">    the argument of IS_EQUAL_TO is a string</tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EQUAL_TO('aaa')('aaa')</tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line"><tt class="py-docstring">        ('aaa', None)</tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EQUAL_TO('aaa')('aab')</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring">        ('aab', 'no match')</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"> </tt>
<a name="IS_EQUAL_TO.__init__"></a><div id="IS_EQUAL_TO.__init__-def"><a name="L160"></a><tt class="py-lineno"> 160</tt> <a class="py-toggle" href="#" id="IS_EQUAL_TO.__init__-toggle" onclick="return toggle('IS_EQUAL_TO.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">expression</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'no match'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EQUAL_TO.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EQUAL_TO.__init__-expanded"><a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">expression</tt> <tt class="py-op">=</tt> <tt class="py-name">expression</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line"> </tt>
<a name="IS_EQUAL_TO.__call__"></a><div id="IS_EQUAL_TO.__call__-def"><a name="L164"></a><tt class="py-lineno"> 164</tt> <a class="py-toggle" href="#" id="IS_EQUAL_TO.__call__-toggle" onclick="return toggle('IS_EQUAL_TO.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EQUAL_TO-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EQUAL_TO.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EQUAL_TO.__call__-expanded"><a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">expression</tt><tt class="py-op">:</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-18', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line"> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line"> </tt>
<a name="IS_EXPR"></a><div id="IS_EXPR-def"><a name="L170"></a><tt class="py-lineno"> 170</tt> <a class="py-toggle" href="#" id="IS_EXPR-toggle" onclick="return toggle('IS_EXPR');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EXPR-class.html">IS_EXPR</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EXPR-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_EXPR-expanded"><a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_EXPR('5 &lt; int(value) &lt; 10'))</tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line"><tt class="py-docstring">    the argument of IS_EXPR must be python condition::</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EXPR('int(value) &lt; 2')('1')</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line"><tt class="py-docstring">        ('1', None)</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EXPR('int(value) &lt; 2')('2')</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line"><tt class="py-docstring">        ('2', 'invalid expression')</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line"> </tt>
<a name="IS_EXPR.__init__"></a><div id="IS_EXPR.__init__-def"><a name="L186"></a><tt class="py-lineno"> 186</tt> <a class="py-toggle" href="#" id="IS_EXPR.__init__-toggle" onclick="return toggle('IS_EXPR.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EXPR-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">expression</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'invalid expression'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EXPR.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EXPR.__init__-expanded"><a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">expression</tt> <tt class="py-op">=</tt> <tt class="py-name">expression</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"> </tt>
<a name="IS_EXPR.__call__"></a><div id="IS_EXPR.__call__-def"><a name="L190"></a><tt class="py-lineno"> 190</tt> <a class="py-toggle" href="#" id="IS_EXPR.__call__-toggle" onclick="return toggle('IS_EXPR.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EXPR-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EXPR.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EXPR.__call__-expanded"><a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line">        <tt class="py-name">environment</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'value'</tt><tt class="py-op">:</tt> <tt class="py-name">value</tt><tt class="py-op">}</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">        <tt class="py-keyword">exec</tt> <tt class="py-string">'__ret__='</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">expression</tt> <tt class="py-keyword">in</tt> <tt class="py-name">environment</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">environment</tt><tt class="py-op">[</tt><tt class="py-string">'__ret__'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-19', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line"> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line"> </tt>
<a name="IS_LENGTH"></a><div id="IS_LENGTH-def"><a name="L198"></a><tt class="py-lineno"> 198</tt> <a class="py-toggle" href="#" id="IS_LENGTH-toggle" onclick="return toggle('IS_LENGTH');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LENGTH-class.html">IS_LENGTH</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LENGTH-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_LENGTH-expanded"><a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line"><tt class="py-docstring">    Checks if length of field's value fits between given boundaries. Works</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line"><tt class="py-docstring">    for both text and file inputs.</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line"><tt class="py-docstring">    Arguments:</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"><tt class="py-docstring">    maxsize: maximum allowed length / size</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line"><tt class="py-docstring">    minsize: minimum allowed length / size</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line"><tt class="py-docstring">    Examples::</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if text string is shorter than 33 characters:</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_LENGTH(32))</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if password string is longer than 5 characters:</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='password', _name='name', requires=IS_LENGTH(minsize=6))</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if uploaded file has size between 1KB and 1MB:</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name', requires=IS_LENGTH(1048576, 1024))</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_LENGTH()('')</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line"><tt class="py-docstring">        ('', None)</tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_LENGTH()('1234567890')</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line"><tt class="py-docstring">        ('1234567890', None)</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_LENGTH(maxsize=5, minsize=0)('1234567890')  # too long</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line"><tt class="py-docstring">        ('1234567890', 'enter from 0 to 5 characters')</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_LENGTH(maxsize=50, minsize=20)('1234567890')  # too short</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line"><tt class="py-docstring">        ('1234567890', 'enter from 20 to 50 characters')</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line"> </tt>
<a name="IS_LENGTH.__init__"></a><div id="IS_LENGTH.__init__-def"><a name="L229"></a><tt class="py-lineno"> 229</tt> <a class="py-toggle" href="#" id="IS_LENGTH.__init__-toggle" onclick="return toggle('IS_LENGTH.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LENGTH-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">maxsize</tt><tt class="py-op">=</tt><tt class="py-number">255</tt><tt class="py-op">,</tt> <tt class="py-param">minsize</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter from %(min)g to %(max)g characters'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LENGTH.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_LENGTH.__init__-expanded"><a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt> <tt class="py-op">=</tt> <tt class="py-name">maxsize</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt> <tt class="py-op">=</tt> <tt class="py-name">minsize</tt> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"> </tt>
<a name="IS_LENGTH.__call__"></a><div id="IS_LENGTH.__call__-def"><a name="L235"></a><tt class="py-lineno"> 235</tt> <a class="py-toggle" href="#" id="IS_LENGTH.__call__-toggle" onclick="return toggle('IS_LENGTH.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LENGTH-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LENGTH.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_LENGTH.__call__-expanded"><a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">cgi</tt><tt class="py-op">.</tt><tt class="py-name">FieldStorage</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">:</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line">                <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">SEEK_END</tt><tt class="py-op">)</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">                <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">                <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">SEEK_SET</tt><tt class="py-op">)</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">                <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">val</tt><tt class="py-op">:</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">                    <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-20', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">                    <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">length</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt><tt class="py-op">:</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt> <tt class="py-op">&lt;=</tt> <tt id="link-21" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-21', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt><tt class="py-op">:</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt> <tt class="py-op">&lt;=</tt> <tt id="link-22" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-22', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt><tt class="py-op">:</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">                <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Method web2py.gluon.languages.lazyT.decode()=web2py.gluon.languages.lazyT-class.html#decode"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-23', 'decode', 'link-23');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-24', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> \ </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Variable datetime.date.min=datetime.date-class.html#min,Variable datetime.datetime.min=datetime.datetime-class.html#min,Variable datetime.time.min=datetime.time-class.html#min,Method web2py.gluon.dal.Expression.min()=web2py.gluon.dal.Expression-class.html#min"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-25', 'min', 'link-25');">min</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name" targets="Variable datetime.date.max=datetime.date-class.html#max,Variable datetime.datetime.max=datetime.datetime-class.html#max,Variable datetime.time.max=datetime.time-class.html#max,Method web2py.gluon.dal.Expression.max()=web2py.gluon.dal.Expression-class.html#max"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-26', 'max', 'link-26');">max</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line"> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SET"></a><div id="IS_IN_SET-def"><a name="L262"></a><tt class="py-lineno"> 262</tt> <a class="py-toggle" href="#" id="IS_IN_SET-toggle" onclick="return toggle('IS_IN_SET');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SET-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_IN_SET-expanded"><a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line"><tt class="py-docstring">              requires=IS_IN_SET(['max', 'john'],zero=''))</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line"><tt class="py-docstring">    the argument of IS_IN_SET must be a list or set</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET(['max', 'john'])('max')</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line"><tt class="py-docstring">        ('max', None)</tt> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET(['max', 'john'])('massimo')</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line"><tt class="py-docstring">        ('massimo', 'value not allowed')</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET(['max', 'john'], multiple=True)(('max', 'john'))</tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"><tt class="py-docstring">        (('max', 'john'), None)</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET(['max', 'john'], multiple=True)(('bill', 'john'))</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line"><tt class="py-docstring">        (('bill', 'john'), 'value not allowed')</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET(('id1','id2'), ['first label','second label'])('id1') # Traditional way</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line"><tt class="py-docstring">        ('id1', None)</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET({'id1':'first label', 'id2':'second label'})('id1')</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line"><tt class="py-docstring">        ('id1', None)</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import itertools</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET(itertools.chain(['1','3','5'],['2','4','6']))('1')</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"><tt class="py-docstring">        ('1', None)</tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_IN_SET([('id1','first label'), ('id2','second label')])('id1') # Redundant way</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line"><tt class="py-docstring">        ('id1', None)</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SET.__init__"></a><div id="IS_IN_SET.__init__-def"><a name="L290"></a><tt class="py-lineno"> 290</tt> <a class="py-toggle" href="#" id="IS_IN_SET.__init__-toggle" onclick="return toggle('IS_IN_SET.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SET-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">        <tt class="py-param">theset</tt><tt class="py-op">,</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line">        <tt class="py-param">labels</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'value not allowed'</tt><tt class="py-op">,</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line">        <tt class="py-param">multiple</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line">        <tt class="py-param">zero</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">        <tt class="py-param">sort</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SET.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_SET.__init__-expanded"><a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt> <tt class="py-op">=</tt> <tt class="py-name">multiple</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">theset</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">theset</tt><tt class="py-op">]</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt> <tt class="py-op">=</tt> <tt class="py-name">theset</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method web2py.gluon.rocket.Headers.values()=web2py.gluon.rocket.Headers-class.html#values"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-27', 'values', 'link-27');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">theset</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">theset</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line">            <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">theset</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-28', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">theset</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt><tt class="py-op">,</tt><tt class="py-name">label</tt> <tt class="py-keyword">in</tt> <tt class="py-name">theset</tt><tt class="py-op">]</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt><tt class="py-op">,</tt><tt class="py-name">label</tt> <tt class="py-keyword">in</tt> <tt class="py-name">theset</tt><tt class="py-op">]</tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">theset</tt><tt class="py-op">]</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt> <tt class="py-op">=</tt> <tt class="py-name">labels</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">zero</tt> <tt class="py-op">=</tt> <tt class="py-name">zero</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method web2py.gluon.dal.Rows.sort()=web2py.gluon.dal.Rows-class.html#sort"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-29', 'sort', 'link-29');">sort</a></tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-30', 'sort', 'link-29');">sort</a></tt> </tt>
</div><a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SET.options"></a><div id="IS_IN_SET.options-def"><a name="L314"></a><tt class="py-lineno"> 314</tt> <a class="py-toggle" href="#" id="IS_IN_SET.options-toggle" onclick="return toggle('IS_IN_SET.options');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SET-class.html#options">options</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">zero</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SET.options-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_SET.options-expanded"><a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt><tt class="py-op">:</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">            <tt id="link-31" class="py-name" targets="Method web2py.gluon.rocket.Headers.items()=web2py.gluon.rocket.Headers-class.html#items"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-31', 'items', 'link-31');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-32" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-32', 'k', 'link-32');">k</a></tt><tt class="py-op">,</tt> <tt id="link-33" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-33', 'k', 'link-32');">k</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-34', 'k', 'link-32');">k</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">            <tt id="link-35" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-35', 'items', 'link-31');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-36', 'k', 'link-32');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-37', 'k', 'link-32');">k</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-38', 'sort', 'link-29');">sort</a></tt><tt class="py-op">:</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">            <tt id="link-39" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-39', 'items', 'link-31');">items</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-40', 'sort', 'link-29');">sort</a></tt><tt class="py-op">(</tt><tt id="link-41" class="py-name" targets="Function web2py.gluon.validators.options_sorter()=web2py.gluon.validators-module.html#options_sorter"><a title="web2py.gluon.validators.options_sorter" class="py-name" href="#" onclick="return doclink('link-41', 'options_sorter', 'link-41');">options_sorter</a></tt><tt class="py-op">)</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">zero</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">zero</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">            <tt id="link-42" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-42', 'items', 'link-31');">items</a></tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-43', 'insert', 'link-43');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">zero</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-44" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-44', 'items', 'link-31');">items</a></tt> </tt>
</div><a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SET.__call__"></a><div id="IS_IN_SET.__call__-def"><a name="L325"></a><tt class="py-lineno"> 325</tt> <a class="py-toggle" href="#" id="IS_IN_SET.__call__-toggle" onclick="return toggle('IS_IN_SET.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SET-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SET.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_SET.__call__-expanded"><a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">            <tt class="py-comment">### if below was values = re.compile("[\w\-:]+").findall(str(value))</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt><tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">                <tt id="link-45" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-45', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">                <tt id="link-46" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-46', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">                <tt id="link-47" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-47', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">            <tt id="link-48" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-48', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">        <tt class="py-name">failures</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-49" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-49', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-50" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-50', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-51" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-51', 'values', 'link-27');">values</a></tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-52" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-52', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">]</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">failures</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">:</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-53" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-53', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">                    <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">&lt;=</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-54', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-55', 'values', 'link-27');">values</a></tt><tt class="py-op">)</tt><tt class="py-op">&lt;</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-56', 'values', 'link-27');">values</a></tt><tt class="py-op">,</tt> <tt id="link-57" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-57', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-58', 'values', 'link-27');">values</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line"> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line"> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line"><tt id="link-59" class="py-name" targets="Variable web2py.gluon.validators.regex1=web2py.gluon.validators-module.html#regex1"><a title="web2py.gluon.validators.regex1" class="py-name" href="#" onclick="return doclink('link-59', 'regex1', 'link-59');">regex1</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'[\w_]+\.[\w_]+'</tt><tt class="py-op">)</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line"><tt id="link-60" class="py-name" targets="Variable web2py.gluon.validators.regex2=web2py.gluon.validators-module.html#regex2"><a title="web2py.gluon.validators.regex2" class="py-name" href="#" onclick="return doclink('link-60', 'regex2', 'link-60');">regex2</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'%\((?P&lt;name&gt;[^\)]+)\)s'</tt><tt class="py-op">)</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line"> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_DB"></a><div id="IS_IN_DB-def"><a name="L353"></a><tt class="py-lineno"> 353</tt> <a class="py-toggle" href="#" id="IS_IN_DB-toggle" onclick="return toggle('IS_IN_DB');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_DB-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_IN_DB-expanded"><a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line"><tt class="py-docstring">              requires=IS_IN_DB(db, db.mytable.myfield, zero=''))</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line"><tt class="py-docstring">    used for reference fields, rendered as a dropbox</tt> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_DB.__init__"></a><div id="IS_IN_DB.__init__-def"><a name="L363"></a><tt class="py-lineno"> 363</tt> <a class="py-toggle" href="#" id="IS_IN_DB.__init__-toggle" onclick="return toggle('IS_IN_DB.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_DB-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-param">dbset</tt><tt class="py-op">,</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">        <tt class="py-param">field</tt><tt class="py-op">,</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">        <tt class="py-param">label</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'value not in database'</tt><tt class="py-op">,</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">        <tt class="py-param">orderby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">        <tt class="py-param">groupby</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">        <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">        <tt class="py-param">multiple</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">        <tt class="py-param">zero</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">        <tt class="py-param">sort</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">        <tt class="py-param">_and</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_DB.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_DB.__init__-expanded"><a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-61" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-61', 'dal', 'link-61');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-62" class="py-name" targets="Class web2py.gluon.dal.Table=web2py.gluon.dal.Table-class.html"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-62', 'Table', 'link-62');">Table</a></tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt id="link-63" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-63', 'Table', 'link-62');">Table</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_id</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line"> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">dbset</tt><tt class="py-op">,</tt> <tt class="py-string">'define_table'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt> <tt class="py-op">=</tt> <tt class="py-name">dbset</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt> <tt class="py-op">=</tt> <tt class="py-name">dbset</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">ktable</tt><tt class="py-op">,</tt> <tt class="py-name">kfield</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">label</tt><tt class="py-op">:</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">            <tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt class="py-string">'%%(%s)s'</tt> <tt class="py-op">%</tt> <tt class="py-name">kfield</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.validators.regex1" class="py-name" href="#" onclick="return doclink('link-64', 'regex1', 'link-59');">regex1</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">                <tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt class="py-string">'%%(%s)s'</tt> <tt class="py-op">%</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">            <tt class="py-name">ks</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="web2py.gluon.validators.regex2" class="py-name" href="#" onclick="return doclink('link-65', 'regex2', 'link-60');">regex2</a></tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">)</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">kfield</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ks</tt><tt class="py-op">:</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">                <tt class="py-name">ks</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-name">kfield</tt><tt class="py-op">]</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">ks</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">            <tt class="py-name">ks</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">kfield</tt><tt class="py-op">]</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-string">'all'</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-name">fields</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">label</tt> <tt class="py-op">=</tt> <tt class="py-name">label</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ktable</tt> <tt class="py-op">=</tt> <tt class="py-name">ktable</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">kfield</tt> <tt class="py-op">=</tt> <tt class="py-name">kfield</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ks</tt> <tt class="py-op">=</tt> <tt class="py-name">ks</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">orderby</tt> <tt class="py-op">=</tt> <tt class="py-name">orderby</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groupby</tt> <tt class="py-op">=</tt> <tt class="py-name">groupby</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Module web2py.gluon.cache=web2py.gluon.cache-module.html"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-66', 'cache', 'link-66');">cache</a></tt> <tt class="py-op">=</tt> <tt id="link-67" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-67', 'cache', 'link-66');">cache</a></tt> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt> <tt class="py-op">=</tt> <tt class="py-name">multiple</tt> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">zero</tt> <tt class="py-op">=</tt> <tt class="py-name">zero</tt> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-68', 'sort', 'link-29');">sort</a></tt> <tt class="py-op">=</tt> <tt id="link-69" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-69', 'sort', 'link-29');">sort</a></tt> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt> <tt class="py-op">=</tt> <tt class="py-name">_and</tt> </tt>
</div><a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_DB.set_self_id"></a><div id="IS_IN_DB.set_self_id-def"><a name="L413"></a><tt class="py-lineno"> 413</tt> <a class="py-toggle" href="#" id="IS_IN_DB.set_self_id-toggle" onclick="return toggle('IS_IN_DB.set_self_id');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_DB-class.html#set_self_id">set_self_id</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_DB.set_self_id-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_DB.set_self_id-expanded"><a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt><tt class="py-op">:</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">id</tt> </tt>
</div><a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_DB.build_set"></a><div id="IS_IN_DB.build_set-def"><a name="L417"></a><tt class="py-lineno"> 417</tt> <a class="py-toggle" href="#" id="IS_IN_DB.build_set-toggle" onclick="return toggle('IS_IN_DB.build_set');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_DB-class.html#build_set">build_set</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_DB.build_set-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_DB.build_set-expanded"><a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt> <tt class="py-op">==</tt> <tt class="py-string">'all'</tt><tt class="py-op">:</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">f</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ktable</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">            <tt class="py-name">fields</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ktable</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-70" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-70', 'k', 'link-32');">k</a></tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt id="link-71" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-71', 'k', 'link-32');">k</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fields</tt><tt class="py-op">]</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt class="py-name">_dbname</tt> <tt class="py-op">!=</tt> <tt class="py-string">'gae'</tt><tt class="py-op">:</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">            <tt class="py-name">orderby</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">orderby</tt> <tt class="py-keyword">or</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-72" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-72', 'b', 'link-72');">b</a></tt><tt class="py-op">:</tt><tt class="py-name">a</tt><tt class="py-op">|</tt><tt id="link-73" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-73', 'b', 'link-72');">b</a></tt><tt class="py-op">,</tt><tt class="py-name">fields</tt><tt class="py-op">)</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">            <tt class="py-name">groupby</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groupby</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">            <tt class="py-name">dd</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">orderby</tt><tt class="py-op">=</tt><tt class="py-name">orderby</tt><tt class="py-op">,</tt> <tt class="py-name">groupby</tt><tt class="py-op">=</tt><tt class="py-name">groupby</tt><tt class="py-op">,</tt> <tt id="link-74" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-74', 'cache', 'link-66');">cache</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-75', 'cache', 'link-66');">cache</a></tt><tt class="py-op">)</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">            <tt class="py-name">records</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.select()=web2py.gluon.dal.BaseAdapter-class.html#select,Method web2py.gluon.dal.CouchDBAdapter.select()=web2py.gluon.dal.CouchDBAdapter-class.html#select,Method web2py.gluon.dal.GoogleDatastoreAdapter.select()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#select,Method web2py.gluon.dal.MongoDBAdapter.select()=web2py.gluon.dal.MongoDBAdapter-class.html#select,Method web2py.gluon.dal.Set.select()=web2py.gluon.dal.Set-class.html#select,Method web2py.gluon.tools.Crud.select()=web2py.gluon.tools.Crud-class.html#select"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-76', 'select', 'link-76');">select</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">fields</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">dd</tt><tt class="py-op">)</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line">            <tt class="py-name">orderby</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">orderby</tt> <tt class="py-keyword">or</tt> <tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-77" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-77', 'b', 'link-72');">b</a></tt><tt class="py-op">:</tt><tt class="py-name">a</tt><tt class="py-op">|</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-78', 'b', 'link-72');">b</a></tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">f</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fields</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-79', 'name', 'link-79');">name</a></tt><tt class="py-op">==</tt><tt class="py-string">'id'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">            <tt class="py-name">dd</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">orderby</tt><tt class="py-op">=</tt><tt class="py-name">orderby</tt><tt class="py-op">,</tt> <tt id="link-80" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-80', 'cache', 'link-66');">cache</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="web2py.gluon.cache" class="py-name" href="#" onclick="return doclink('link-81', 'cache', 'link-66');">cache</a></tt><tt class="py-op">)</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">            <tt class="py-name">records</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-82', 'select', 'link-76');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ktable</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">ALL</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">dd</tt><tt class="py-op">)</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">kfield</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">records</tt><tt class="py-op">]</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">label</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">records</tt><tt class="py-op">]</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">label</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">records</tt><tt class="py-op">]</tt> </tt>
</div><a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_DB.options"></a><div id="IS_IN_DB.options-def"><a name="L437"></a><tt class="py-lineno"> 437</tt> <a class="py-toggle" href="#" id="IS_IN_DB.options-toggle" onclick="return toggle('IS_IN_DB.options');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_DB-class.html#options">options</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">zero</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_DB.options-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_DB.options-expanded"><a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.build_set()=web2py.gluon.validators.IS_IN_DB-class.html#build_set"><a title="web2py.gluon.validators.IS_IN_DB.build_set" class="py-name" href="#" onclick="return doclink('link-83', 'build_set', 'link-83');">build_set</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">        <tt id="link-84" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-84', 'items', 'link-31');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt id="link-85" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-85', 'k', 'link-32');">k</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">labels</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt id="link-86" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-86', 'k', 'link-32');">k</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-87', 'sort', 'link-29');">sort</a></tt><tt class="py-op">:</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">            <tt id="link-88" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-88', 'items', 'link-31');">items</a></tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="web2py.gluon.dal.Rows.sort" class="py-name" href="#" onclick="return doclink('link-89', 'sort', 'link-29');">sort</a></tt><tt class="py-op">(</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.validators.options_sorter" class="py-name" href="#" onclick="return doclink('link-90', 'options_sorter', 'link-41');">options_sorter</a></tt><tt class="py-op">)</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">zero</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">zero</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">            <tt id="link-91" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-91', 'items', 'link-31');">items</a></tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-92', 'insert', 'link-43');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">zero</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-93" class="py-name"><a title="web2py.gluon.rocket.Headers.items" class="py-name" href="#" onclick="return doclink('link-93', 'items', 'link-31');">items</a></tt> </tt>
</div><a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_DB.__call__"></a><div id="IS_IN_DB.__call__-def"><a name="L446"></a><tt class="py-lineno"> 446</tt> <a class="py-toggle" href="#" id="IS_IN_DB.__call__-toggle" onclick="return toggle('IS_IN_DB.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_DB-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_DB.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_DB.__call__-expanded"><a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">                <tt id="link-94" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-94', 'values', 'link-27');">values</a></tt><tt class="py-op">=</tt><tt class="py-name">value</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">                <tt id="link-95" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-95', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">]</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line">                <tt id="link-96" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-96', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">,</tt><tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">                    <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">&lt;=</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-97', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-98', 'values', 'link-27');">values</a></tt><tt class="py-op">)</tt><tt class="py-op">&lt;</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-99', 'values', 'link-27');">values</a></tt><tt class="py-op">,</tt> <tt id="link-100" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-100', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">[</tt><tt id="link-101" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-101', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-102" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-102', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-103" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-103', 'values', 'link-27');">values</a></tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-104" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-104', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-105" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-105', 'values', 'link-27');">values</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">:</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">theset</tt><tt class="py-op">:</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt><tt class="py-op">:</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">ktable</tt><tt class="py-op">,</tt> <tt class="py-name">kfield</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">            <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">ktable</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">kfield</tt><tt class="py-op">]</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">(</tt><tt class="py-name">field</tt> <tt class="py-op">==</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.count()=web2py.gluon.dal.BaseAdapter-class.html#count,Method web2py.gluon.dal.CouchDBAdapter.count()=web2py.gluon.dal.CouchDBAdapter-class.html#count,Method web2py.gluon.dal.Field.count()=web2py.gluon.dal.Field-class.html#count,Method web2py.gluon.dal.GoogleDatastoreAdapter.count()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#count,Method web2py.gluon.dal.MongoDBAdapter.count()=web2py.gluon.dal.MongoDBAdapter-class.html#count,Method web2py.gluon.dal.Set.count()=web2py.gluon.dal.Set-class.html#count"><a title="web2py.gluon.dal.BaseAdapter.count
web2py.gluon.dal.CouchDBAdapter.count
web2py.gluon.dal.Field.count
web2py.gluon.dal.GoogleDatastoreAdapter.count
web2py.gluon.dal.MongoDBAdapter.count
web2py.gluon.dal.Set.count" class="py-name" href="#" onclick="return doclink('link-106', 'count', 'link-106');">count</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt><tt class="py-op">:</tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_and</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-107" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-107', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line"> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_IN_DB"></a><div id="IS_NOT_IN_DB-def"><a name="L476"></a><tt class="py-lineno"> 476</tt> <a class="py-toggle" href="#" id="IS_NOT_IN_DB-toggle" onclick="return toggle('IS_NOT_IN_DB');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">IS_NOT_IN_DB</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_IN_DB-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_NOT_IN_DB-expanded"><a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_NOT_IN_DB(db, db.table))</tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line"><tt class="py-docstring">    makes the field unique</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_IN_DB.__init__"></a><div id="IS_NOT_IN_DB.__init__-def"><a name="L485"></a><tt class="py-lineno"> 485</tt> <a class="py-toggle" href="#" id="IS_NOT_IN_DB.__init__-toggle" onclick="return toggle('IS_NOT_IN_DB.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">        <tt class="py-param">dbset</tt><tt class="py-op">,</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line">        <tt class="py-param">field</tt><tt class="py-op">,</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'value already in database or empty'</tt><tt class="py-op">,</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">        <tt class="py-param">allowed_override</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_IN_DB.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_NOT_IN_DB.__init__-expanded"><a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line"> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line">        <tt class="py-keyword">from</tt> <tt id="link-108" class="py-name"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-108', 'dal', 'link-61');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-109" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-109', 'Table', 'link-62');">Table</a></tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">field</tt><tt class="py-op">,</tt><tt id="link-110" class="py-name"><a title="web2py.gluon.dal.Table" class="py-name" href="#" onclick="return doclink('link-110', 'Table', 'link-62');">Table</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt><tt class="py-op">.</tt><tt class="py-name">_id</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line"> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">dbset</tt><tt class="py-op">,</tt> <tt class="py-string">'define_table'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt> <tt class="py-op">=</tt> <tt class="py-name">dbset</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt> <tt class="py-op">=</tt> <tt class="py-name">dbset</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">field</tt> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_override</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed_override</tt> </tt>
</div><a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_IN_DB.set_self_id"></a><div id="IS_NOT_IN_DB.set_self_id-def"><a name="L505"></a><tt class="py-lineno"> 505</tt> <a class="py-toggle" href="#" id="IS_NOT_IN_DB.set_self_id-toggle" onclick="return toggle('IS_NOT_IN_DB.set_self_id');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#set_self_id">set_self_id</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_IN_DB.set_self_id-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_NOT_IN_DB.set_self_id-expanded"><a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt> <tt class="py-op">=</tt> <tt class="py-name">id</tt> </tt>
</div><a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_IN_DB.__call__"></a><div id="IS_NOT_IN_DB.__call__-def"><a name="L508"></a><tt class="py-lineno"> 508</tt> <a class="py-toggle" href="#" id="IS_NOT_IN_DB.__call__-toggle" onclick="return toggle('IS_NOT_IN_DB.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_IN_DB.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_NOT_IN_DB.__call__-expanded"><a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line">        <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-111', 'strip', 'link-111');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-112', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_override</tt><tt class="py-op">:</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">tablename</tt><tt class="py-op">,</tt> <tt class="py-name">fieldname</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">field</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line">        <tt class="py-name">field</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">[</tt><tt class="py-name">tablename</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">fieldname</tt><tt class="py-op">]</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">        <tt id="link-113" class="py-name" targets="Method web2py.gluon.tools.Crud.rows()=web2py.gluon.tools.Crud-class.html#rows"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-113', 'rows', 'link-113');">rows</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dbset</tt><tt class="py-op">(</tt><tt class="py-name">field</tt> <tt class="py-op">==</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.select
web2py.gluon.dal.CouchDBAdapter.select
web2py.gluon.dal.GoogleDatastoreAdapter.select
web2py.gluon.dal.MongoDBAdapter.select
web2py.gluon.dal.Set.select
web2py.gluon.tools.Crud.select" class="py-name" href="#" onclick="return doclink('link-114', 'select', 'link-76');">select</a></tt><tt class="py-op">(</tt><tt class="py-name">limitby</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-115" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-115', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-116', 'rows', 'link-113');">rows</a></tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">:</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt id="link-117" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-117', 'rows', 'link-113');">rows</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-118" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-118', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.tools.Crud.rows" class="py-name" href="#" onclick="return doclink('link-119', 'rows', 'link-113');">rows</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">record_id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-120" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-120', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"> </tt>
<a name="IS_INT_IN_RANGE"></a><div id="IS_INT_IN_RANGE-def"><a name="L527"></a><tt class="py-lineno"> 527</tt> <a class="py-toggle" href="#" id="IS_INT_IN_RANGE-toggle" onclick="return toggle('IS_INT_IN_RANGE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html">IS_INT_IN_RANGE</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_INT_IN_RANGE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_INT_IN_RANGE-expanded"><a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line"><tt class="py-docstring">    Determine that the argument is (or can be represented as) an int,</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"><tt class="py-docstring">    and that it falls within the specified range. The range is interpreted</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line"><tt class="py-docstring">    in the Pythonic way, so the test is: min &lt;= value &lt; max.</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"><tt class="py-docstring">    The minimum and maximum limits can be None, meaning no lower or upper limit,</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line"><tt class="py-docstring">    respectively.</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_INT_IN_RANGE(0, 10))</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)('4')</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"><tt class="py-docstring">        (4, None)</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(4)</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line"><tt class="py-docstring">        (4, None)</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(1)</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line"><tt class="py-docstring">        (1, None)</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(5)</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line"><tt class="py-docstring">        (5, 'enter an integer between 1 and 4')</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(5)</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line"><tt class="py-docstring">        (5, 'enter an integer between 1 and 4')</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(3.5)</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line"><tt class="py-docstring">        (3, 'enter an integer between 1 and 4')</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(None,5)('4')</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line"><tt class="py-docstring">        (4, None)</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(None,5)('6')</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line"><tt class="py-docstring">        (6, 'enter an integer less than or equal to 4')</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,None)('4')</tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line"><tt class="py-docstring">        (4, None)</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE(1,None)('0')</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line"><tt class="py-docstring">        (0, 'enter an integer greater than or equal to 1')</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE()(6)</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line"><tt class="py-docstring">        (6, None)</tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_INT_IN_RANGE()('abc')</tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc', 'enter an integer')</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line"> </tt>
<a name="IS_INT_IN_RANGE.__init__"></a><div id="IS_INT_IN_RANGE.__init__-def"><a name="L566"></a><tt class="py-lineno"> 566</tt> <a class="py-toggle" href="#" id="IS_INT_IN_RANGE.__init__-toggle" onclick="return toggle('IS_INT_IN_RANGE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">        <tt class="py-param">minimum</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line">        <tt class="py-param">maximum</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_INT_IN_RANGE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_INT_IN_RANGE.__init__-expanded"><a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'enter an integer'</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">                    <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter an integer less than or equal to %(max)g'</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt id="link-121" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-121', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-122" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-122', 'max', 'link-26');">max</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter an integer greater than or equal to %(min)g'</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt id="link-123" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-123', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-124" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-124', 'min', 'link-25');">min</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter an integer between %(min)g and %(max)g'</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt id="link-125" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-125', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> \ </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line">                <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-126', 'min', 'link-25');">min</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">,</tt> <tt id="link-127" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-127', 'max', 'link-26');">max</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line"> </tt>
<a name="IS_INT_IN_RANGE.__call__"></a><div id="IS_INT_IN_RANGE.__call__-def"><a name="L594"></a><tt class="py-lineno"> 594</tt> <a class="py-toggle" href="#" id="IS_INT_IN_RANGE.__call__-toggle" onclick="return toggle('IS_INT_IN_RANGE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_INT_IN_RANGE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_INT_IN_RANGE.__call__-expanded"><a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">            <tt class="py-name">fvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt class="py-name">fvalue</tt><tt class="py-op">:</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">value</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">:</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">value</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line"> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line"> </tt>
<a name="IS_FLOAT_IN_RANGE"></a><div id="IS_FLOAT_IN_RANGE-def"><a name="L613"></a><tt class="py-lineno"> 613</tt> <a class="py-toggle" href="#" id="IS_FLOAT_IN_RANGE-toggle" onclick="return toggle('IS_FLOAT_IN_RANGE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">IS_FLOAT_IN_RANGE</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_FLOAT_IN_RANGE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_FLOAT_IN_RANGE-expanded"><a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line"><tt class="py-docstring">    Determine that the argument is (or can be represented as) a float,</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line"><tt class="py-docstring">    and that it falls within the specified inclusive range.</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line"><tt class="py-docstring">    The comparison is made with native arithmetic.</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line"><tt class="py-docstring">    The minimum and maximum limits can be None, meaning no lower or upper limit,</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line"><tt class="py-docstring">    respectively.</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_FLOAT_IN_RANGE(0, 10))</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)('4')</tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line"><tt class="py-docstring">        (4.0, None)</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(4)</tt> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"><tt class="py-docstring">        (4.0, None)</tt> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(1)</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line"><tt class="py-docstring">        (1.0, None)</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(5.25)</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line"><tt class="py-docstring">        (5.25, 'enter a number between 1 and 5')</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(6.0)</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line"><tt class="py-docstring">        (6.0, 'enter a number between 1 and 5')</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(3.5)</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"><tt class="py-docstring">        (3.5, None)</tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,None)(3.5)</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line"><tt class="py-docstring">        (3.5, None)</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(None,5)(3.5)</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line"><tt class="py-docstring">        (3.5, None)</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,None)(0.5)</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line"><tt class="py-docstring">        (0.5, 'enter a number greater than or equal to 1')</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE(None,5)(6.5)</tt> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line"><tt class="py-docstring">        (6.5, 'enter a number less than or equal to 5')</tt> </tt>
<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE()(6.5)</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line"><tt class="py-docstring">        (6.5, None)</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_FLOAT_IN_RANGE()('abc')</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc', 'enter a number')</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line"> </tt>
<a name="IS_FLOAT_IN_RANGE.__init__"></a><div id="IS_FLOAT_IN_RANGE.__init__-def"><a name="L652"></a><tt class="py-lineno"> 652</tt> <a class="py-toggle" href="#" id="IS_FLOAT_IN_RANGE.__init__-toggle" onclick="return toggle('IS_FLOAT_IN_RANGE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">        <tt class="py-param">minimum</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">        <tt class="py-param">maximum</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">        <tt class="py-param">dot</tt><tt class="py-op">=</tt><tt class="py-string">'.'</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_FLOAT_IN_RANGE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_FLOAT_IN_RANGE.__init__-expanded"><a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt> <tt class="py-op">=</tt> <tt class="py-name">dot</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">                    <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number'</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">                    <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number less than or equal to %(max)g'</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number greater than or equal to %(min)g'</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number between %(min)g and %(max)g'</tt> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt id="link-128" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-128', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> \ </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">            <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-129" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-129', 'min', 'link-25');">min</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">,</tt> <tt id="link-130" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-130', 'max', 'link-26');">max</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
</div><a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line"> </tt>
<a name="IS_FLOAT_IN_RANGE.__call__"></a><div id="IS_FLOAT_IN_RANGE.__call__-def"><a name="L681"></a><tt class="py-lineno"> 681</tt> <a class="py-toggle" href="#" id="IS_FLOAT_IN_RANGE.__call__-toggle" onclick="return toggle('IS_FLOAT_IN_RANGE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_FLOAT_IN_RANGE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_FLOAT_IN_RANGE.__call__-expanded"><a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt><tt class="py-op">==</tt><tt class="py-string">'.'</tt><tt class="py-op">:</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line">                <tt class="py-name">fvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line">                <tt class="py-name">fvalue</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt><tt class="py-op">,</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">fvalue</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">fvalue</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">fvalue</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">:</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">fvalue</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">fvalue</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">fvalue</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">TypeError</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
</div><a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line"> </tt>
<a name="IS_FLOAT_IN_RANGE.formatter"></a><div id="IS_FLOAT_IN_RANGE.formatter-def"><a name="L699"></a><tt class="py-lineno"> 699</tt> <a class="py-toggle" href="#" id="IS_FLOAT_IN_RANGE.formatter-toggle" onclick="return toggle('IS_FLOAT_IN_RANGE.formatter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter">formatter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_FLOAT_IN_RANGE.formatter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_FLOAT_IN_RANGE.formatter-expanded"><a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt><tt class="py-op">==</tt><tt class="py-string">'.'</tt><tt class="py-op">:</tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line"> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"> </tt>
<a name="IS_DECIMAL_IN_RANGE"></a><div id="IS_DECIMAL_IN_RANGE-def"><a name="L706"></a><tt class="py-lineno"> 706</tt> <a class="py-toggle" href="#" id="IS_DECIMAL_IN_RANGE-toggle" onclick="return toggle('IS_DECIMAL_IN_RANGE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">IS_DECIMAL_IN_RANGE</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DECIMAL_IN_RANGE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_DECIMAL_IN_RANGE-expanded"><a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line"><tt class="py-docstring">    Determine that the argument is (or can be represented as) a Python Decimal,</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line"><tt class="py-docstring">    and that it falls within the specified inclusive range.</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line"><tt class="py-docstring">    The comparison is made with Python Decimal arithmetic.</tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line"><tt class="py-docstring">    The minimum and maximum limits can be None, meaning no lower or upper limit,</tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line"><tt class="py-docstring">    respectively.</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_DECIMAL_IN_RANGE(0, 10))</tt> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)('4')</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('4'), None)</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(4)</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('4'), None)</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(1)</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('1'), None)</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(5.25)</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line"><tt class="py-docstring">        (5.25, 'enter a number between 1 and 5')</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(5.25,6)(5.25)</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('5.25'), None)</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(5.25,6)('5.25')</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('5.25'), None)</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(6.0)</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line"><tt class="py-docstring">        (6.0, 'enter a number between 1 and 5')</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(3.5)</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('3.5'), None)</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,5.5)(3.5)</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('3.5'), None)</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,5.5)(6.5)</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line"><tt class="py-docstring">        (6.5, 'enter a number between 1.5 and 5.5')</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,None)(6.5)</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('6.5'), None)</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,None)(0.5)</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line"><tt class="py-docstring">        (0.5, 'enter a number greater than or equal to 1.5')</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(None,5.5)(4.5)</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('4.5'), None)</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(None,5.5)(6.5)</tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line"><tt class="py-docstring">        (6.5, 'enter a number less than or equal to 5.5')</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE()(6.5)</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('6.5'), None)</tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(0,99)(123.123)</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line"><tt class="py-docstring">        (123.123, 'enter a number between 0 and 99')</tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(0,99)('123.123')</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line"><tt class="py-docstring">        ('123.123', 'enter a number between 0 and 99')</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(0,99)('12.34')</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line"><tt class="py-docstring">        (Decimal('12.34'), None)</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_DECIMAL_IN_RANGE()('abc')</tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc', 'enter a decimal number')</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line"> </tt>
<a name="IS_DECIMAL_IN_RANGE.__init__"></a><div id="IS_DECIMAL_IN_RANGE.__init__-def"><a name="L759"></a><tt class="py-lineno"> 759</tt> <a class="py-toggle" href="#" id="IS_DECIMAL_IN_RANGE.__init__-toggle" onclick="return toggle('IS_DECIMAL_IN_RANGE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">        <tt class="py-param">minimum</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line">        <tt class="py-param">maximum</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">        <tt class="py-param">dot</tt><tt class="py-op">=</tt><tt class="py-string">'.'</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DECIMAL_IN_RANGE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DECIMAL_IN_RANGE.__init__-expanded"><a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt> <tt class="py-op">=</tt> <tt class="py-name">dot</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">                    <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a decimal number'</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">Decimal</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line">                    <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number less than or equal to %(max)g'</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">Decimal</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number greater than or equal to %(min)g'</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">Decimal</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">minimum</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">Decimal</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">'enter a number between %(min)g and %(max)g'</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-131', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> \ </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">            <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-132" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-132', 'min', 'link-25');">min</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">,</tt> <tt id="link-133" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-133', 'max', 'link-26');">max</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
</div><a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line"> </tt>
<a name="IS_DECIMAL_IN_RANGE.__call__"></a><div id="IS_DECIMAL_IN_RANGE.__call__-def"><a name="L788"></a><tt class="py-lineno"> 788</tt> <a class="py-toggle" href="#" id="IS_DECIMAL_IN_RANGE.__call__-toggle" onclick="return toggle('IS_DECIMAL_IN_RANGE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DECIMAL_IN_RANGE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DECIMAL_IN_RANGE.__call__-expanded"><a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">Decimal</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line">                <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">                <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">Decimal</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt><tt class="py-op">,</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">v</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">v</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt><tt class="py-op">:</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">v</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">decimal</tt><tt class="py-op">.</tt><tt class="py-name">InvalidOperation</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
</div><a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line"> </tt>
<a name="IS_DECIMAL_IN_RANGE.formatter"></a><div id="IS_DECIMAL_IN_RANGE.formatter-def"><a name="L806"></a><tt class="py-lineno"> 806</tt> <a class="py-toggle" href="#" id="IS_DECIMAL_IN_RANGE.formatter-toggle" onclick="return toggle('IS_DECIMAL_IN_RANGE.formatter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter">formatter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DECIMAL_IN_RANGE.formatter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DECIMAL_IN_RANGE.formatter-expanded"><a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dot</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line"> </tt>
<a name="is_empty"></a><div id="is_empty-def"><a name="L809"></a><tt class="py-lineno"> 809</tt> <a class="py-toggle" href="#" id="is_empty-toggle" onclick="return toggle('is_empty');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#is_empty">is_empty</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">empty_regex</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="is_empty-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="is_empty-expanded"><a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">    <tt class="py-docstring">"test empty field"</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-134', 'strip', 'link-111');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">empty_regex</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">empty_regex</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt> <tt class="py-keyword">or</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
</div><a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_EMPTY"></a><div id="IS_NOT_EMPTY-def"><a name="L819"></a><tt class="py-lineno"> 819</tt> <a class="py-toggle" href="#" id="IS_NOT_EMPTY-toggle" onclick="return toggle('IS_NOT_EMPTY');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_EMPTY-class.html">IS_NOT_EMPTY</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_EMPTY-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_NOT_EMPTY-expanded"><a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_NOT_EMPTY())</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()(1)</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line"><tt class="py-docstring">        (1, None)</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()(0)</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line"><tt class="py-docstring">        (0, None)</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()('x')</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line"><tt class="py-docstring">        ('x', None)</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()(' x ')</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line"><tt class="py-docstring">        ('x', None)</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()(None)</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line"><tt class="py-docstring">        (None, 'enter a value')</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()('')</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'enter a value')</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()('  ')</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'enter a value')</tt> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()(' \\n\\t')</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'enter a value')</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY()([])</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line"><tt class="py-docstring">        ([], 'enter a value')</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY(empty_regex='def')('def')</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'enter a value')</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY(empty_regex='de[fg]')('deg')</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'enter a value')</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_NOT_EMPTY(empty_regex='def')('abc')</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc', None)</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_EMPTY.__init__"></a><div id="IS_NOT_EMPTY.__init__-def"><a name="L851"></a><tt class="py-lineno"> 851</tt> <a class="py-toggle" href="#" id="IS_NOT_EMPTY.__init__-toggle" onclick="return toggle('IS_NOT_EMPTY.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter a value'</tt><tt class="py-op">,</tt> <tt class="py-param">empty_regex</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_EMPTY.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_NOT_EMPTY.__init__-expanded"><a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">empty_regex</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">empty_regex</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">empty_regex</tt><tt class="py-op">)</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">empty_regex</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line"> </tt>
<a name="IS_NOT_EMPTY.__call__"></a><div id="IS_NOT_EMPTY.__call__-def"><a name="L858"></a><tt class="py-lineno"> 858</tt> <a class="py-toggle" href="#" id="IS_NOT_EMPTY.__call__-toggle" onclick="return toggle('IS_NOT_EMPTY.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_NOT_EMPTY-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_NOT_EMPTY.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_NOT_EMPTY.__call__-expanded"><a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">        <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">empty</tt> <tt class="py-op">=</tt> <tt id="link-135" class="py-name" targets="Function web2py.gluon.validators.is_empty()=web2py.gluon.validators-module.html#is_empty"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-135', 'is_empty', 'link-135');">is_empty</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">empty_regex</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">empty_regex</tt><tt class="py-op">)</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">empty</tt><tt class="py-op">:</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-136" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-136', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line"> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line"> </tt>
<a name="IS_ALPHANUMERIC"></a><div id="IS_ALPHANUMERIC-def"><a name="L865"></a><tt class="py-lineno"> 865</tt> <a class="py-toggle" href="#" id="IS_ALPHANUMERIC-toggle" onclick="return toggle('IS_ALPHANUMERIC');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html">IS_ALPHANUMERIC</a><tt class="py-op">(</tt><tt class="py-base-class">IS_MATCH</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_ALPHANUMERIC-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_ALPHANUMERIC-expanded"><a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_ALPHANUMERIC())</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_ALPHANUMERIC()('1')</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line"><tt class="py-docstring">        ('1', None)</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_ALPHANUMERIC()('')</tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line"><tt class="py-docstring">        ('', None)</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_ALPHANUMERIC()('A_a')</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line"><tt class="py-docstring">        ('A_a', None)</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_ALPHANUMERIC()('!')</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line"><tt class="py-docstring">        ('!', 'enter only letters, numbers, and underscore')</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line"> </tt>
<a name="IS_ALPHANUMERIC.__init__"></a><div id="IS_ALPHANUMERIC.__init__-def"><a name="L881"></a><tt class="py-lineno"> 881</tt> <a class="py-toggle" href="#" id="IS_ALPHANUMERIC.__init__-toggle" onclick="return toggle('IS_ALPHANUMERIC.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter only letters, numbers, and underscore'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_ALPHANUMERIC.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_ALPHANUMERIC.__init__-expanded"><a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line">        <tt id="link-137" class="py-name" targets="Class web2py.gluon.validators.IS_MATCH=web2py.gluon.validators.IS_MATCH-class.html"><a title="web2py.gluon.validators.IS_MATCH" class="py-name" href="#" onclick="return doclink('link-137', 'IS_MATCH', 'link-137');">IS_MATCH</a></tt><tt class="py-op">.</tt><tt id="link-138" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-138', '__init__', 'link-138');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'^[\w]*$'</tt><tt class="py-op">,</tt> <tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line"> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line"> </tt>
<a name="IS_EMAIL"></a><div id="IS_EMAIL-def"><a name="L885"></a><tt class="py-lineno"> 885</tt> <a class="py-toggle" href="#" id="IS_EMAIL-toggle" onclick="return toggle('IS_EMAIL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMAIL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_EMAIL-expanded"><a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line"><tt class="py-docstring">    Checks if field's value is a valid email address. Can be set to disallow</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line"><tt class="py-docstring">    or force addresses from certain domain(s).</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line"><tt class="py-docstring">    Email regex adapted from</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line"><tt class="py-docstring">    http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx,</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line"><tt class="py-docstring">    generally following the RFCs, except that we disallow quoted strings</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line"><tt class="py-docstring">    and permit underscores and leading numerics in subdomain labels</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line"><tt class="py-docstring">    Arguments:</tt> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line"><tt class="py-docstring">    - banned: regex text for disallowed address domains</tt> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line"><tt class="py-docstring">    - forced: regex text for required address domains</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line"><tt class="py-docstring">    Both arguments can also be custom objects with a match(value) method.</tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line"><tt class="py-docstring">    Examples::</tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid email address:</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_EMAIL())</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid email address that can't be from a .com domain:</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_EMAIL(banned='^.*\.com(|\..*)$'))</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid email address that must be from a .edu domain:</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_EMAIL(forced='^.*\.edu(|\..*)$'))</tt> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('a@b.com')</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line"><tt class="py-docstring">        ('a@b.com', None)</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@def.com')</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@def.com', None)</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@3def.com')</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@3def.com', None)</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@def.us')</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@def.us', None)</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@d_-f.us')</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@d_-f.us', None)</tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('@def.com')           # missing name</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line"><tt class="py-docstring">        ('@def.com', 'enter a valid email address')</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('"abc@def".com')      # quoted name</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line"><tt class="py-docstring">        ('"abc@def".com', 'enter a valid email address')</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc+def.com')        # no @</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc+def.com', 'enter a valid email address')</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@def.x')          # one-char TLD</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@def.x', 'enter a valid email address')</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@def.12')         # numeric TLD</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@def.12', 'enter a valid email address')</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@def..com')       # double-dot in domain</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@def..com', 'enter a valid email address')</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@.def.com')       # dot starts domain</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@.def.com', 'enter a valid email address')</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@def.c_m')        # underscore in TLD</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@def.c_m', 'enter a valid email address')</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('NotAnEmail')         # missing @</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line"><tt class="py-docstring">        ('NotAnEmail', 'enter a valid email address')</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('abc@NotAnEmail')     # missing TLD</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc@NotAnEmail', 'enter a valid email address')</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('customer/department@example.com')</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line"><tt class="py-docstring">        ('customer/department@example.com', None)</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('$A12345@example.com')</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line"><tt class="py-docstring">        ('$A12345@example.com', None)</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('!def!xyz%abc@example.com')</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line"><tt class="py-docstring">        ('!def!xyz%abc@example.com', None)</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('_Yosemite.Sam@example.com')</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line"><tt class="py-docstring">        ('_Yosemite.Sam@example.com', None)</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('~@example.com')</tt> </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line"><tt class="py-docstring">        ('~@example.com', None)</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('.wooly@example.com')       # dot starts name</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line"><tt class="py-docstring">        ('.wooly@example.com', 'enter a valid email address')</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('wo..oly@example.com')      # adjacent dots in name</tt> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"><tt class="py-docstring">        ('wo..oly@example.com', 'enter a valid email address')</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('pootietang.@example.com')  # dot ends name</tt> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line"><tt class="py-docstring">        ('pootietang.@example.com', 'enter a valid email address')</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('.@example.com')            # name is bare dot</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line"><tt class="py-docstring">        ('.@example.com', 'enter a valid email address')</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('Ima.Fool@example.com')</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line"><tt class="py-docstring">        ('Ima.Fool@example.com', None)</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('Ima Fool@example.com')     # space in name</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line"><tt class="py-docstring">        ('Ima Fool@example.com', 'enter a valid email address')</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_EMAIL()('localguy@localhost')       # localhost as domain</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line"><tt class="py-docstring">        ('localguy@localhost', None)</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line"> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line">    <tt id="link-139" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-139', 'regex', 'link-15');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line"><tt class="py-string">        ^(?!\.)                            # name may not begin with a dot</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line"><tt class="py-string">        (</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line"><tt class="py-string">          [-a-z0-9!\#$%&amp;'*+/=?^_`{|}~]     # all legal characters except dot</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line"><tt class="py-string">          |</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line"><tt class="py-string">          (?&lt;!\.)\.                        # single dots only</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line"><tt class="py-string">        )+</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line"><tt class="py-string">        (?&lt;!\.)                            # name may not end with a dot</tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line"><tt class="py-string">        @</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line"><tt class="py-string">        (</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line"><tt class="py-string">          localhost</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line"><tt class="py-string">          |</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line"><tt class="py-string">          (</tt> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line"><tt class="py-string">            [a-z0-9]                         # [sub]domain begins with alphanumeric</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line"><tt class="py-string">            (</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line"><tt class="py-string">              [-\w]*                         # alphanumeric, underscore, dot, hyphen</tt> </tt>
<a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line"><tt class="py-string">              [a-z0-9]                       # ending alphanumeric</tt> </tt>
<a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line"><tt class="py-string">            )?</tt> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line"><tt class="py-string">          \.                               # ending dot</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line"><tt class="py-string">          )+</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line"><tt class="py-string">          [a-z]{2,}                        # TLD alpha-only</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line"><tt class="py-string">       )$</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line"><tt class="py-string">    '''</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">VERBOSE</tt><tt class="py-op">|</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">IGNORECASE</tt><tt class="py-op">)</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line"> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line">    <tt id="link-140" class="py-name" targets="Variable web2py.gluon.validators.IS_EMAIL.regex_proposed_but_failed=web2py.gluon.validators.IS_EMAIL-class.html#regex_proposed_but_failed"><a title="web2py.gluon.validators.IS_EMAIL.regex_proposed_but_failed" class="py-name" href="#" onclick="return doclink('link-140', 'regex_proposed_but_failed', 'link-140');">regex_proposed_but_failed</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^([\w\!\#$\%\&amp;\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&amp;\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$'</tt><tt class="py-op">,</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">VERBOSE</tt><tt class="py-op">|</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">IGNORECASE</tt><tt class="py-op">)</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line"> </tt>
<a name="IS_EMAIL.__init__"></a><div id="IS_EMAIL.__init__-def"><a name="L999"></a><tt class="py-lineno"> 999</tt> <a class="py-toggle" href="#" id="IS_EMAIL.__init__-toggle" onclick="return toggle('IS_EMAIL.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMAIL-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">                 <tt class="py-param">banned</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">                 <tt class="py-param">forced</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter a valid email address'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMAIL.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMAIL.__init__-expanded"><a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">banned</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">            <tt class="py-name">banned</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">banned</tt><tt class="py-op">)</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">forced</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line">            <tt class="py-name">forced</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">forced</tt><tt class="py-op">)</tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">banned</tt> <tt class="py-op">=</tt> <tt class="py-name">banned</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">forced</tt> <tt class="py-op">=</tt> <tt class="py-name">forced</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line"> </tt>
<a name="IS_EMAIL.__call__"></a><div id="IS_EMAIL.__call__-def"><a name="L1011"></a><tt class="py-lineno">1011</tt> <a class="py-toggle" href="#" id="IS_EMAIL.__call__-toggle" onclick="return toggle('IS_EMAIL.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMAIL-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMAIL.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMAIL.__call__-expanded"><a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">        <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-141', 'regex', 'link-15');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">            <tt class="py-name">domain</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'@'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">banned</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">banned</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">domain</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">                    <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">forced</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">forced</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">domain</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-142" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-142', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line"> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line"> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line"><tt class="py-comment"># URL scheme source:</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># &lt;http://en.wikipedia.org/wiki/URI_scheme&gt; obtained on 2008-Nov-10</tt> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line"><tt id="link-143" class="py-name" targets="Variable web2py.gluon.validators.official_url_schemes=web2py.gluon.validators-module.html#official_url_schemes"><a title="web2py.gluon.validators.official_url_schemes" class="py-name" href="#" onclick="return doclink('link-143', 'official_url_schemes', 'link-143');">official_url_schemes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">    <tt class="py-string">'aaa'</tt><tt class="py-op">,</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">    <tt class="py-string">'aaas'</tt><tt class="py-op">,</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">    <tt class="py-string">'acap'</tt><tt class="py-op">,</tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">    <tt class="py-string">'cap'</tt><tt class="py-op">,</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">    <tt class="py-string">'cid'</tt><tt class="py-op">,</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">    <tt class="py-string">'crid'</tt><tt class="py-op">,</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">    <tt class="py-string">'data'</tt><tt class="py-op">,</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">    <tt class="py-string">'dav'</tt><tt class="py-op">,</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">    <tt class="py-string">'dict'</tt><tt class="py-op">,</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">    <tt class="py-string">'dns'</tt><tt class="py-op">,</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line">    <tt class="py-string">'fax'</tt><tt class="py-op">,</tt> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">    <tt class="py-string">'file'</tt><tt class="py-op">,</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">    <tt class="py-string">'ftp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">    <tt class="py-string">'go'</tt><tt class="py-op">,</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">    <tt class="py-string">'gopher'</tt><tt class="py-op">,</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line">    <tt class="py-string">'h323'</tt><tt class="py-op">,</tt> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">    <tt class="py-string">'http'</tt><tt class="py-op">,</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">    <tt class="py-string">'https'</tt><tt class="py-op">,</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">    <tt class="py-string">'icap'</tt><tt class="py-op">,</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">    <tt class="py-string">'im'</tt><tt class="py-op">,</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">    <tt class="py-string">'imap'</tt><tt class="py-op">,</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">    <tt class="py-string">'info'</tt><tt class="py-op">,</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">    <tt class="py-string">'ipp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">    <tt class="py-string">'iris'</tt><tt class="py-op">,</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line">    <tt class="py-string">'iris.beep'</tt><tt class="py-op">,</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line">    <tt class="py-string">'iris.xpc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line">    <tt class="py-string">'iris.xpcs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line">    <tt class="py-string">'iris.lws'</tt><tt class="py-op">,</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">    <tt class="py-string">'ldap'</tt><tt class="py-op">,</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line">    <tt class="py-string">'mailto'</tt><tt class="py-op">,</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">    <tt class="py-string">'mid'</tt><tt class="py-op">,</tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">    <tt class="py-string">'modem'</tt><tt class="py-op">,</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line">    <tt class="py-string">'msrp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line">    <tt class="py-string">'msrps'</tt><tt class="py-op">,</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">    <tt class="py-string">'mtqp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line">    <tt class="py-string">'mupdate'</tt><tt class="py-op">,</tt> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">    <tt class="py-string">'news'</tt><tt class="py-op">,</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line">    <tt class="py-string">'nfs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">    <tt class="py-string">'nntp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line">    <tt class="py-string">'opaquelocktoken'</tt><tt class="py-op">,</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line">    <tt class="py-string">'pop'</tt><tt class="py-op">,</tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">    <tt class="py-string">'pres'</tt><tt class="py-op">,</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">    <tt class="py-string">'prospero'</tt><tt class="py-op">,</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">    <tt class="py-string">'rtsp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">    <tt class="py-string">'service'</tt><tt class="py-op">,</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">    <tt class="py-string">'shttp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line">    <tt class="py-string">'sip'</tt><tt class="py-op">,</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">    <tt class="py-string">'sips'</tt><tt class="py-op">,</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">    <tt class="py-string">'snmp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">    <tt class="py-string">'soap.beep'</tt><tt class="py-op">,</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">    <tt class="py-string">'soap.beeps'</tt><tt class="py-op">,</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">    <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">    <tt class="py-string">'tel'</tt><tt class="py-op">,</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">    <tt class="py-string">'telnet'</tt><tt class="py-op">,</tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line">    <tt class="py-string">'tftp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line">    <tt class="py-string">'thismessage'</tt><tt class="py-op">,</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line">    <tt class="py-string">'tip'</tt><tt class="py-op">,</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">    <tt class="py-string">'tv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line">    <tt class="py-string">'urn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line">    <tt class="py-string">'vemmi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">    <tt class="py-string">'wais'</tt><tt class="py-op">,</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">    <tt class="py-string">'xmlrpc.beep'</tt><tt class="py-op">,</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line">    <tt class="py-string">'xmlrpc.beep'</tt><tt class="py-op">,</tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line">    <tt class="py-string">'xmpp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">    <tt class="py-string">'z39.50r'</tt><tt class="py-op">,</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line">    <tt class="py-string">'z39.50s'</tt><tt class="py-op">,</tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line"><tt id="link-144" class="py-name" targets="Variable web2py.gluon.validators.unofficial_url_schemes=web2py.gluon.validators-module.html#unofficial_url_schemes"><a title="web2py.gluon.validators.unofficial_url_schemes" class="py-name" href="#" onclick="return doclink('link-144', 'unofficial_url_schemes', 'link-144');">unofficial_url_schemes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line">    <tt class="py-string">'about'</tt><tt class="py-op">,</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line">    <tt class="py-string">'adiumxtra'</tt><tt class="py-op">,</tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line">    <tt class="py-string">'aim'</tt><tt class="py-op">,</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line">    <tt class="py-string">'afp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">    <tt class="py-string">'aw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line">    <tt class="py-string">'callto'</tt><tt class="py-op">,</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line">    <tt class="py-string">'chrome'</tt><tt class="py-op">,</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">    <tt class="py-string">'cvs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">    <tt class="py-string">'ed2k'</tt><tt class="py-op">,</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">    <tt class="py-string">'feed'</tt><tt class="py-op">,</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">    <tt class="py-string">'fish'</tt><tt class="py-op">,</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line">    <tt class="py-string">'gg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">    <tt class="py-string">'gizmoproject'</tt><tt class="py-op">,</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">    <tt class="py-string">'iax2'</tt><tt class="py-op">,</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">    <tt class="py-string">'irc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">    <tt class="py-string">'ircs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">    <tt class="py-string">'itms'</tt><tt class="py-op">,</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">    <tt class="py-string">'jar'</tt><tt class="py-op">,</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line">    <tt class="py-string">'javascript'</tt><tt class="py-op">,</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">    <tt class="py-string">'keyparc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">    <tt class="py-string">'lastfm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">    <tt class="py-string">'ldaps'</tt><tt class="py-op">,</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">    <tt class="py-string">'magnet'</tt><tt class="py-op">,</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">    <tt class="py-string">'mms'</tt><tt class="py-op">,</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">    <tt class="py-string">'msnim'</tt><tt class="py-op">,</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">    <tt class="py-string">'mvn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">    <tt class="py-string">'notes'</tt><tt class="py-op">,</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">    <tt class="py-string">'nsfw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">    <tt class="py-string">'psyc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">    <tt class="py-string">'paparazzi:http'</tt><tt class="py-op">,</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">    <tt class="py-string">'rmi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">    <tt class="py-string">'rsync'</tt><tt class="py-op">,</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">    <tt class="py-string">'secondlife'</tt><tt class="py-op">,</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">    <tt class="py-string">'sgn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">    <tt class="py-string">'skype'</tt><tt class="py-op">,</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line">    <tt class="py-string">'ssh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">    <tt class="py-string">'sftp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">    <tt class="py-string">'smb'</tt><tt class="py-op">,</tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">    <tt class="py-string">'sms'</tt><tt class="py-op">,</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">    <tt class="py-string">'soldat'</tt><tt class="py-op">,</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">    <tt class="py-string">'steam'</tt><tt class="py-op">,</tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">    <tt class="py-string">'svn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">    <tt class="py-string">'teamspeak'</tt><tt class="py-op">,</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">    <tt class="py-string">'unreal'</tt><tt class="py-op">,</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">    <tt class="py-string">'ut2004'</tt><tt class="py-op">,</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">    <tt class="py-string">'ventrilo'</tt><tt class="py-op">,</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">    <tt class="py-string">'view-source'</tt><tt class="py-op">,</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">    <tt class="py-string">'webcal'</tt><tt class="py-op">,</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line">    <tt class="py-string">'wyciwyg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line">    <tt class="py-string">'xfire'</tt><tt class="py-op">,</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">    <tt class="py-string">'xri'</tt><tt class="py-op">,</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line">    <tt class="py-string">'ymsgr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line"><tt id="link-145" class="py-name" targets="Variable web2py.gluon.validators.all_url_schemes=web2py.gluon.validators-module.html#all_url_schemes"><a title="web2py.gluon.validators.all_url_schemes" class="py-name" href="#" onclick="return doclink('link-145', 'all_url_schemes', 'link-145');">all_url_schemes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">None</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt id="link-146" class="py-name"><a title="web2py.gluon.validators.official_url_schemes" class="py-name" href="#" onclick="return doclink('link-146', 'official_url_schemes', 'link-143');">official_url_schemes</a></tt> <tt class="py-op">+</tt> <tt id="link-147" class="py-name"><a title="web2py.gluon.validators.unofficial_url_schemes" class="py-name" href="#" onclick="return doclink('link-147', 'unofficial_url_schemes', 'link-144');">unofficial_url_schemes</a></tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line"><tt id="link-148" class="py-name" targets="Variable web2py.gluon.validators.http_schemes=web2py.gluon.validators-module.html#http_schemes"><a title="web2py.gluon.validators.http_schemes" class="py-name" href="#" onclick="return doclink('link-148', 'http_schemes', 'link-148');">http_schemes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">'http'</tt><tt class="py-op">,</tt> <tt class="py-string">'https'</tt><tt class="py-op">]</tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line"> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line"> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line"><tt class="py-comment"># This regex comes from RFC 2396, Appendix B. It's used to split a URL into</tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># its component parts</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Here are the regex groups that it extracts:</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    scheme = group(2)</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    authority = group(4)</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    path = group(5)</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    query = group(7)</tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    fragment = group(9)</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line"><tt id="link-149" class="py-name" targets="Variable web2py.gluon.validators.url_split_regex=web2py.gluon.validators-module.html#url_split_regex"><a title="web2py.gluon.validators.url_split_regex" class="py-name" href="#" onclick="return doclink('link-149', 'url_split_regex', 'link-149');">url_split_regex</a></tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line">    <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?'</tt><tt class="py-op">)</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line"> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line"><tt class="py-comment"># Defined in RFC 3490, Section 3.1, Requirement #1</tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Use this regex to split the authority component of a unicode URL into</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># its component labels</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt id="link-150" class="py-name" targets="Variable web2py.gluon.validators.label_split_regex=web2py.gluon.validators-module.html#label_split_regex"><a title="web2py.gluon.validators.label_split_regex" class="py-name" href="#" onclick="return doclink('link-150', 'label_split_regex', 'link-150');">label_split_regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">u'[\u002e\u3002\uff0e\uff61]'</tt><tt class="py-op">)</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line"> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line"> </tt>
<a name="escape_unicode"></a><div id="escape_unicode-def"><a name="L1168"></a><tt class="py-lineno">1168</tt> <a class="py-toggle" href="#" id="escape_unicode-toggle" onclick="return toggle('escape_unicode');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#escape_unicode">escape_unicode</a><tt class="py-op">(</tt><tt class="py-param">string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="escape_unicode-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="escape_unicode-expanded"><a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line"><tt class="py-docstring">    Converts a unicode string into US-ASCII, using a simple conversion scheme.</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line"><tt class="py-docstring">    Each unicode character that does not have a US-ASCII equivalent is</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line"><tt class="py-docstring">    converted into a URL escaped form based on its hexadecimal value.</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line"><tt class="py-docstring">    For example, the unicode character '\u4e86' will become the string '%4e%86'</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line"><tt class="py-docstring">    :param string: unicode string, the unicode string to convert into an</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line"><tt class="py-docstring">        escaped US-ASCII form</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line"><tt class="py-docstring">    :returns: the US-ASCII escaped form of the inputted string</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line"><tt class="py-docstring">    :rtype: string</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line"><tt class="py-docstring">    @author: Jonathan Benn</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">    <tt class="py-name">returnValue</tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line"> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">character</tt> <tt class="py-keyword">in</tt> <tt class="py-name">string</tt><tt class="py-op">:</tt> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line">        <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">character</tt><tt class="py-op">)</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">code</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0x7F</tt><tt class="py-op">:</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">            <tt class="py-name">hexCode</tt> <tt class="py-op">=</tt> <tt class="py-name">hex</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line">            <tt class="py-name">returnValue</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-151', 'write', 'link-151');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'%'</tt> <tt class="py-op">+</tt> <tt class="py-name">hexCode</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-string">'%'</tt> <tt class="py-op">+</tt> <tt class="py-name">hexCode</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-number">6</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">            <tt class="py-name">returnValue</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-152', 'write', 'link-151');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">character</tt><tt class="py-op">)</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line"> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">returnValue</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line"> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line"> </tt>
<a name="unicode_to_ascii_authority"></a><div id="unicode_to_ascii_authority-def"><a name="L1195"></a><tt class="py-lineno">1195</tt> <a class="py-toggle" href="#" id="unicode_to_ascii_authority-toggle" onclick="return toggle('unicode_to_ascii_authority');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#unicode_to_ascii_authority">unicode_to_ascii_authority</a><tt class="py-op">(</tt><tt class="py-param">authority</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="unicode_to_ascii_authority-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="unicode_to_ascii_authority-expanded"><a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line"><tt class="py-docstring">    Follows the steps in RFC 3490, Section 4 to convert a unicode authority</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line"><tt class="py-docstring">    string into its ASCII equivalent.</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line"><tt class="py-docstring">    For example, u'www.Alliancefran\xe7aise.nu' will be converted into</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line"><tt class="py-docstring">    'www.xn--alliancefranaise-npb.nu'</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line"><tt class="py-docstring">    :param authority: unicode string, the URL authority component to convert,</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line"><tt class="py-docstring">                      e.g. u'www.Alliancefran\xe7aise.nu'</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line"><tt class="py-docstring">    :returns: the US-ASCII character equivalent to the inputed authority,</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line"><tt class="py-docstring">             e.g. 'www.xn--alliancefranaise-npb.nu'</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line"><tt class="py-docstring">    :rtype: string</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line"><tt class="py-docstring">    :raises Exception: if the function is not able to convert the inputed</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line"><tt class="py-docstring">        authority</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line"><tt class="py-docstring">    @author: Jonathan Benn</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">    <tt class="py-comment">#RFC 3490, Section 4, Step 1</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#The encodings.idna Python module assumes that AllowUnassigned == True</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line">    <tt class="py-comment">#RFC 3490, Section 4, Step 2</tt> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">labels</tt> <tt class="py-op">=</tt> <tt id="link-153" class="py-name"><a title="web2py.gluon.validators.label_split_regex" class="py-name" href="#" onclick="return doclink('link-153', 'label_split_regex', 'link-150');">label_split_regex</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">authority</tt><tt class="py-op">)</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line"> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">    <tt class="py-comment">#RFC 3490, Section 4, Step 3</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#The encodings.idna Python module assumes that UseSTD3ASCIIRules == False</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">    <tt class="py-comment">#RFC 3490, Section 4, Step 4</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#We use the ToASCII operation because we are about to put the authority</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#into an IDN-unaware slot</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">asciiLabels</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">encodings</tt><tt class="py-op">.</tt><tt class="py-name">idna</tt> </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">label</tt> <tt class="py-keyword">in</tt> <tt class="py-name">labels</tt><tt class="py-op">:</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">label</tt><tt class="py-op">:</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line">                <tt class="py-name">asciiLabels</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name" targets="Method web2py.gluon.html.DIV.append()=web2py.gluon.html.DIV-class.html#append,Method web2py.gluon.template.BlockNode.append()=web2py.gluon.template.BlockNode-class.html#append,Method web2py.gluon.template.Content.append()=web2py.gluon.template.Content-class.html#append"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-154', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">encodings</tt><tt class="py-op">.</tt><tt class="py-name">idna</tt><tt class="py-op">.</tt><tt class="py-name">ToASCII</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">                 <tt class="py-comment">#encodings.idna.ToASCII does not accept an empty string, but</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line"><tt class="py-comment"></tt>                 <tt class="py-comment">#it is necessary for us to allow for empty labels so that we</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line"><tt class="py-comment"></tt>                 <tt class="py-comment">#don't modify the URL</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">asciiLabels</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-155', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">        <tt class="py-name">asciiLabels</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">label</tt> <tt class="py-keyword">in</tt> <tt class="py-name">labels</tt><tt class="py-op">]</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line">    <tt class="py-comment">#RFC 3490, Section 4, Step 5</tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">reduce</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt id="link-156" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-156', 'x', 'link-10');">x</a></tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">:</tt> <tt id="link-157" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-157', 'x', 'link-10');">x</a></tt> <tt class="py-op">+</tt> <tt class="py-name">unichr</tt><tt class="py-op">(</tt><tt class="py-number">0x002E</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">y</tt><tt class="py-op">,</tt> <tt class="py-name">asciiLabels</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line"> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line"> </tt>
<a name="unicode_to_ascii_url"></a><div id="unicode_to_ascii_url-def"><a name="L1241"></a><tt class="py-lineno">1241</tt> <a class="py-toggle" href="#" id="unicode_to_ascii_url-toggle" onclick="return toggle('unicode_to_ascii_url');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#unicode_to_ascii_url">unicode_to_ascii_url</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">prepend_scheme</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="unicode_to_ascii_url-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="unicode_to_ascii_url-expanded"><a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line"><tt class="py-docstring">    Converts the inputed unicode url into a US-ASCII equivalent. This function</tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line"><tt class="py-docstring">    goes a little beyond RFC 3490, which is limited in scope to the domain name</tt> </tt>
<a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line"><tt class="py-docstring">    (authority) only. Here, the functionality is expanded to what was observed</tt> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line"><tt class="py-docstring">    on Wikipedia on 2009-Jan-22:</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line"><tt class="py-docstring">       Component    Can Use Unicode?</tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line"><tt class="py-docstring">       ---------    ----------------</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line"><tt class="py-docstring">       scheme       No</tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line"><tt class="py-docstring">       authority    Yes</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line"><tt class="py-docstring">       path         Yes</tt> </tt>
<a name="L1253"></a><tt class="py-lineno">1253</tt>  <tt class="py-line"><tt class="py-docstring">       query        Yes</tt> </tt>
<a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line"><tt class="py-docstring">       fragment     No</tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line"><tt class="py-docstring">    The authority component gets converted to punycode, but occurrences of</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line"><tt class="py-docstring">    unicode in other components get converted into a pair of URI escapes (we</tt> </tt>
<a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line"><tt class="py-docstring">    assume 4-byte unicode). E.g. the unicode character U+4E2D will be</tt> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line"><tt class="py-docstring">    converted into '%4E%2D'. Testing with Firefox v3.0.5 has shown that it can</tt> </tt>
<a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line"><tt class="py-docstring">    understand this kind of URI encoding.</tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line"><tt class="py-docstring">    :param url: unicode string, the URL to convert from unicode into US-ASCII</tt> </tt>
<a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line"><tt class="py-docstring">    :param prepend_scheme: string, a protocol scheme to prepend to the URL if</tt> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line"><tt class="py-docstring">        we're having trouble parsing it.</tt> </tt>
<a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line"><tt class="py-docstring">        e.g. "http". Input None to disable this functionality</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line"><tt class="py-docstring">    :returns: a US-ASCII equivalent of the inputed url</tt> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line"><tt class="py-docstring">    :rtype: string</tt> </tt>
<a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1269"></a><tt class="py-lineno">1269</tt>  <tt class="py-line"><tt class="py-docstring">    @author: Jonathan Benn</tt> </tt>
<a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line">    <tt class="py-comment">#convert the authority component of the URL into an ASCII punycode string,</tt> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#but encode the rest using the regular URI character encoding</tt> </tt>
<a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line">    <tt id="link-158" class="py-name" targets="Method web2py.gluon.tools.Auth.groups()=web2py.gluon.tools.Auth-class.html#groups"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-158', 'groups', 'link-158');">groups</a></tt> <tt class="py-op">=</tt> <tt id="link-159" class="py-name"><a title="web2py.gluon.validators.url_split_regex" class="py-name" href="#" onclick="return doclink('link-159', 'url_split_regex', 'link-149');">url_split_regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt id="link-160" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-160', 'url', 'link-160');">url</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-161', 'groups', 'link-158');">groups</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line">    <tt class="py-comment">#If no authority was found</tt> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-162" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-162', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line">        <tt class="py-comment">#Try appending a scheme to see if that fixes the problem</tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">scheme_to_prepend</tt> <tt class="py-op">=</tt> <tt class="py-name">prepend_scheme</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'http'</tt> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line">        <tt id="link-163" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-163', 'groups', 'link-158');">groups</a></tt> <tt class="py-op">=</tt> <tt id="link-164" class="py-name"><a title="web2py.gluon.validators.url_split_regex" class="py-name" href="#" onclick="return doclink('link-164', 'url_split_regex', 'link-149');">url_split_regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line">            <tt class="py-name">unicode</tt><tt class="py-op">(</tt><tt class="py-name">scheme_to_prepend</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">u'://'</tt> <tt class="py-op">+</tt> <tt id="link-165" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-165', 'url', 'link-160');">url</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-166', 'groups', 'link-158');">groups</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line">    <tt class="py-comment">#if we still can't find the authority</tt> </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-167" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-167', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-168" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-168', 'Exception', 'link-168');">Exception</a></tt><tt class="py-op">(</tt><tt class="py-string">'No authority component found, '</tt><tt class="py-op">+</tt> \ </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">            <tt class="py-string">'could not decode unicode to US-ASCII'</tt><tt class="py-op">)</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line"> </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line">    <tt class="py-comment">#We're here if we found an authority, let's rebuild the URL</tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt id="link-169" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-169', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line">    <tt class="py-name">authority</tt> <tt class="py-op">=</tt> <tt id="link-170" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-170', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
<a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt id="link-171" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-171', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line">    <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt id="link-172" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-172', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line">    <tt class="py-name">fragment</tt> <tt class="py-op">=</tt> <tt id="link-173" class="py-name"><a title="web2py.gluon.tools.Auth.groups" class="py-name" href="#" onclick="return doclink('link-173', 'groups', 'link-158');">groups</a></tt><tt class="py-op">[</tt><tt class="py-number">7</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line"> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">prepend_scheme</tt><tt class="py-op">:</tt> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line">        <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">scheme</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'://'</tt> </tt>
<a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line">        <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">scheme</tt> <tt class="py-op">+</tt> <tt id="link-174" class="py-name" targets="Function web2py.gluon.validators.unicode_to_ascii_authority()=web2py.gluon.validators-module.html#unicode_to_ascii_authority"><a title="web2py.gluon.validators.unicode_to_ascii_authority" class="py-name" href="#" onclick="return doclink('link-174', 'unicode_to_ascii_authority', 'link-174');">unicode_to_ascii_authority</a></tt><tt class="py-op">(</tt><tt class="py-name">authority</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt>\ </tt>
<a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line">        <tt id="link-175" class="py-name" targets="Function web2py.gluon.contrib.pymysql.converters.escape_unicode()=web2py.gluon.contrib.pymysql.converters-module.html#escape_unicode,Function web2py.gluon.validators.escape_unicode()=web2py.gluon.validators-module.html#escape_unicode"><a title="web2py.gluon.contrib.pymysql.converters.escape_unicode
web2py.gluon.validators.escape_unicode" class="py-name" href="#" onclick="return doclink('link-175', 'escape_unicode', 'link-175');">escape_unicode</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-176" class="py-name"><a title="web2py.gluon.contrib.pymysql.converters.escape_unicode
web2py.gluon.validators.escape_unicode" class="py-name" href="#" onclick="return doclink('link-176', 'escape_unicode', 'link-175');">escape_unicode</a></tt><tt class="py-op">(</tt><tt class="py-name">query</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">fragment</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line"> </tt>
<a name="L1300"></a><tt class="py-lineno">1300</tt>  <tt class="py-line"> </tt>
<a name="IS_GENERIC_URL"></a><div id="IS_GENERIC_URL-def"><a name="L1301"></a><tt class="py-lineno">1301</tt> <a class="py-toggle" href="#" id="IS_GENERIC_URL-toggle" onclick="return toggle('IS_GENERIC_URL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_GENERIC_URL-class.html">IS_GENERIC_URL</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_GENERIC_URL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_GENERIC_URL-expanded"><a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line"><tt class="py-docstring">    Rejects a URL string if any of the following is true:</tt> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line"><tt class="py-docstring">       * The string is empty or None</tt> </tt>
<a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line"><tt class="py-docstring">       * The string uses characters that are not allowed in a URL</tt> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line"><tt class="py-docstring">       * The URL scheme specified (if one is specified) is not valid</tt> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line"><tt class="py-docstring">    Based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html</tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line"><tt class="py-docstring">    This function only checks the URL's syntax. It does not check that the URL</tt> </tt>
<a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line"><tt class="py-docstring">    points to a real document, for example, or that it otherwise makes sense</tt> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line"><tt class="py-docstring">    semantically. This function does automatically prepend 'http://' in front</tt> </tt>
<a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line"><tt class="py-docstring">    of a URL if and only if that's necessary to successfully parse the URL.</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line"><tt class="py-docstring">    Please note that a scheme will be prepended only for rare cases</tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line"><tt class="py-docstring">    (e.g. 'google.ca:80')</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line"><tt class="py-docstring">    The list of allowed schemes is customizable with the allowed_schemes</tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line"><tt class="py-docstring">    parameter. If you exclude None from the list, then abbreviated URLs</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line"><tt class="py-docstring">    (lacking a scheme such as 'http') will be rejected.</tt> </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line"><tt class="py-docstring">    The default prepended scheme is customizable with the prepend_scheme</tt> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line"><tt class="py-docstring">    parameter. If you set prepend_scheme to None then prepending will be</tt> </tt>
<a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line"><tt class="py-docstring">    disabled. URLs that require prepending to parse will still be accepted,</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line"><tt class="py-docstring">    but the return value will not be modified.</tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line"><tt class="py-docstring">    @author: Jonathan Benn</tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_GENERIC_URL()('http://user@abc.com')</tt> </tt>
<a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line"><tt class="py-docstring">    ('http://user@abc.com', None)</tt> </tt>
<a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line"> </tt>
<a name="IS_GENERIC_URL.__init__"></a><div id="IS_GENERIC_URL.__init__-def"><a name="L1333"></a><tt class="py-lineno">1333</tt> <a class="py-toggle" href="#" id="IS_GENERIC_URL.__init__-toggle" onclick="return toggle('IS_GENERIC_URL.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter a valid URL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line">        <tt class="py-param">allowed_schemes</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line">        <tt class="py-param">prepend_scheme</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_GENERIC_URL.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_GENERIC_URL.__init__-expanded"><a name="L1339"></a><tt class="py-lineno">1339</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line"><tt class="py-docstring">        :param error_message: a string, the error message to give the end user</tt> </tt>
<a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line"><tt class="py-docstring">            if the URL does not validate</tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line"><tt class="py-docstring">        :param allowed_schemes: a list containing strings or None. Each element</tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line"><tt class="py-docstring">            is a scheme the inputed URL is allowed to use</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line"><tt class="py-docstring">        :param prepend_scheme: a string, this scheme is prepended if it's</tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line"><tt class="py-docstring">            necessary to make the URL valid</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line"> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">allowed_schemes</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt id="link-177" class="py-name"><a title="web2py.gluon.validators.all_url_schemes" class="py-name" href="#" onclick="return doclink('link-177', 'all_url_schemes', 'link-145');">all_url_schemes</a></tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed_schemes</tt> </tt>
<a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">prepend_scheme</tt> </tt>
<a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> \ </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line">                <tt class="py-string">"prepend_scheme='%s' is not in allowed_schemes=%s"</tt> \ </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line">                <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line"> </tt>
<a name="IS_GENERIC_URL.__call__"></a><div id="IS_GENERIC_URL.__call__-def"><a name="L1359"></a><tt class="py-lineno">1359</tt> <a class="py-toggle" href="#" id="IS_GENERIC_URL.__call__-toggle" onclick="return toggle('IS_GENERIC_URL.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_GENERIC_URL-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_GENERIC_URL.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_GENERIC_URL.__call__-expanded"><a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: a string, the URL to validate</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line"><tt class="py-docstring">        :returns: a tuple, where tuple[0] is the inputed value (possible</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line"><tt class="py-docstring">            prepended with prepend_scheme), and tuple[1] is either</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line"><tt class="py-docstring">            None (success!) or the string error_message</tt> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line">            <tt class="py-comment"># if the URL does not misuse the '%' character</tt> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line">                <tt class="py-string">r"%[^0-9A-Fa-f]{2}|%[^0-9A-Fa-f][0-9A-Fa-f]|%[0-9A-Fa-f][^0-9A-Fa-f]|%$|%[0-9A-Fa-f]$|%[^0-9A-Fa-f]$"</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">                              <tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-178" class="py-name" targets="Method web2py.gluon.tools.Crud.search()=web2py.gluon.tools.Crud-class.html#search"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-178', 'search', 'link-178');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line">                <tt class="py-comment"># if the URL is only composed of valid characters</tt> </tt>
<a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">                    <tt class="py-string">r"[A-Za-z0-9;/?:@&amp;=+$,\-_\.!~*'\(\)%#]+$"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line">                    <tt class="py-comment"># Then split up the URL into its components and check on</tt> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># the scheme</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt id="link-179" class="py-name"><a title="web2py.gluon.validators.url_split_regex" class="py-name" href="#" onclick="return doclink('link-179', 'url_split_regex', 'link-149');">url_split_regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">                    <tt class="py-comment"># Clean up the scheme before we check it</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-name">scheme</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">                        <tt class="py-name">scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">unquote</tt><tt class="py-op">(</tt><tt class="py-name">scheme</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name" targets="Method web2py.gluon.dal.Expression.lower()=web2py.gluon.dal.Expression-class.html#lower"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-180', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">                    <tt class="py-comment"># If the scheme really exists</tt> </tt>
<a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-name">scheme</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1382"></a><tt class="py-lineno">1382</tt>  <tt class="py-line">                        <tt class="py-comment"># Then the URL is valid</tt> </tt>
<a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1384"></a><tt class="py-lineno">1384</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line">                        <tt class="py-comment"># else, for the possible case of abbreviated URLs with</tt> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># ports, check to see if adding a valid scheme fixes</tt> </tt>
<a name="L1387"></a><tt class="py-lineno">1387</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># the problem (but only do this if it doesn't have</tt> </tt>
<a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># one already!)</tt> </tt>
<a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'://'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-181', 'search', 'link-178');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">None</tt>\ </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line">                             <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1391"></a><tt class="py-lineno">1391</tt>  <tt class="py-line">                            <tt class="py-name">schemeToUse</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'http'</tt> </tt>
<a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line">                            <tt class="py-name">prependTest</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name" targets="Method web2py.gluon.cache.Cache.__call__()=web2py.gluon.cache.Cache-class.html#__call__,Method web2py.gluon.cache.CacheAbstract.__call__()=web2py.gluon.cache.CacheAbstract-class.html#__call__,Method web2py.gluon.cache.CacheInRam.__call__()=web2py.gluon.cache.CacheInRam-class.html#__call__,Method web2py.gluon.cache.CacheOnDisk.__call__()=web2py.gluon.cache.CacheOnDisk-class.html#__call__,Method web2py.gluon.compileapp.LoadFactory.__call__()=web2py.gluon.compileapp.LoadFactory-class.html#__call__,Method web2py.gluon.custom_import._BaseImporter.__call__()=web2py.gluon.custom_import._BaseImporter-class.html#__call__,Method web2py.gluon.custom_import._DateTrackerImporter.__call__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__call__,Method web2py.gluon.custom_import._Web2pyImporter.__call__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__call__,Method web2py.gluon.dal.DAL.__call__()=web2py.gluon.dal.DAL-class.html#__call__,Method web2py.gluon.dal.Row.__call__()=web2py.gluon.dal.Row-class.html#__call__,Method web2py.gluon.dal.SQLCallableList.__call__()=web2py.gluon.dal.SQLCallableList-class.html#__call__,Method web2py.gluon.dal.Set.__call__()=web2py.gluon.dal.Set-class.html#__call__,Method web2py.gluon.dal.Table.__call__()=web2py.gluon.dal.Table-class.html#__call__,Method web2py.gluon.html.__TAG__.__call__()=web2py.gluon.html.__TAG__-class.html#__call__,Method web2py.gluon.languages.translator.__call__()=web2py.gluon.languages.translator-class.html#__call__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__call__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__call__,Method web2py.gluon.storage.List.__call__()=web2py.gluon.storage.List-class.html#__call__,Method web2py.gluon.tools.Auth.__call__()=web2py.gluon.tools.Auth-class.html#__call__,Method web2py.gluon.tools.Crud.__call__()=web2py.gluon.tools.Crud-class.html#__call__,Method web2py.gluon.tools.Service.__call__()=web2py.gluon.tools.Service-class.html#__call__,Method web2py.gluon.validators.CLEANUP.__call__()=web2py.gluon.validators.CLEANUP-class.html#__call__,Method web2py.gluon.validators.CRYPT.__call__()=web2py.gluon.validators.CRYPT-class.html#__call__,Method web2py.gluon.validators.IS_DATE.__call__()=web2py.gluon.validators.IS_DATE-class.html#__call__,Method web2py.gluon.validators.IS_DATETIME.__call__()=web2py.gluon.validators.IS_DATETIME-class.html#__call__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__call__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_EMAIL.__call__()=web2py.gluon.validators.IS_EMAIL-class.html#__call__,Method web2py.gluon.validators.IS_EMPTY_OR.__call__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__call__,Method web2py.gluon.validators.IS_EQUAL_TO.__call__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__call__,Method web2py.gluon.validators.IS_EXPR.__call__()=web2py.gluon.validators.IS_EXPR-class.html#__call__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_GENERIC_URL.__call__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__call__,Method web2py.gluon.validators.IS_HTTP_URL.__call__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__call__,Method web2py.gluon.validators.IS_IMAGE.__call__()=web2py.gluon.validators.IS_IMAGE-class.html#__call__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__call__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__call__,Method web2py.gluon.validators.IS_IN_DB.__call__()=web2py.gluon.validators.IS_IN_DB-class.html#__call__,Method web2py.gluon.validators.IS_IN_SET.__call__()=web2py.gluon.validators.IS_IN_SET-class.html#__call__,Method web2py.gluon.validators.IS_IN_SUBSET.__call__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__call__,Method web2py.gluon.validators.IS_IPV4.__call__()=web2py.gluon.validators.IS_IPV4-class.html#__call__,Method web2py.gluon.validators.IS_LENGTH.__call__()=web2py.gluon.validators.IS_LENGTH-class.html#__call__,Method web2py.gluon.validators.IS_LIST_OF.__call__()=web2py.gluon.validators.IS_LIST_OF-class.html#__call__,Method web2py.gluon.validators.IS_LOWER.__call__()=web2py.gluon.validators.IS_LOWER-class.html#__call__,Method web2py.gluon.validators.IS_MATCH.__call__()=web2py.gluon.validators.IS_MATCH-class.html#__call__,Method web2py.gluon.validators.IS_NOT_EMPTY.__call__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__call__,Method web2py.gluon.validators.IS_NOT_IN_DB.__call__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__call__,Method web2py.gluon.validators.IS_SLUG.__call__()=web2py.gluon.validators.IS_SLUG-class.html#__call__,Method web2py.gluon.validators.IS_STRONG.__call__()=web2py.gluon.validators.IS_STRONG-class.html#__call__,Method web2py.gluon.validators.IS_TIME.__call__()=web2py.gluon.validators.IS_TIME-class.html#__call__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__call__,Method web2py.gluon.validators.IS_UPPER.__call__()=web2py.gluon.validators.IS_UPPER-class.html#__call__,Method web2py.gluon.validators.IS_URL.__call__()=web2py.gluon.validators.IS_URL-class.html#__call__"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-182', '__call__', 'link-182');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">schemeToUse</tt> </tt>
<a name="L1393"></a><tt class="py-lineno">1393</tt>  <tt class="py-line">                                     <tt class="py-op">+</tt> <tt class="py-string">'://'</tt> <tt class="py-op">+</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line">                            <tt class="py-comment"># if the prepend test succeeded</tt> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-keyword">if</tt> <tt class="py-name">prependTest</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1396"></a><tt class="py-lineno">1396</tt>  <tt class="py-line">                                <tt class="py-comment"># if prepending in the output is enabled</tt> </tt>
<a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">:</tt> </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">                                    <tt class="py-keyword">return</tt> <tt class="py-name">prependTest</tt> </tt>
<a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line">                                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line">                                    <tt class="py-comment"># else return the original,</tt> </tt>
<a name="L1401"></a><tt class="py-lineno">1401</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                    <tt class="py-comment">#  non-prepended value</tt> </tt>
<a name="L1402"></a><tt class="py-lineno">1402</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line">        <tt class="py-comment"># else the URL is not valid</tt> </tt>
<a name="L1406"></a><tt class="py-lineno">1406</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-183" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-183', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line"> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line"><tt class="py-comment"># Sources (obtained 2008-Nov-11):</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    http://en.wikipedia.org/wiki/Top-level_domain</tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#    http://www.iana.org/domains/root/db/</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line"><tt id="link-184" class="py-name" targets="Variable web2py.gluon.validators.official_top_level_domains=web2py.gluon.validators-module.html#official_top_level_domains"><a title="web2py.gluon.validators.official_top_level_domains" class="py-name" href="#" onclick="return doclink('link-184', 'official_top_level_domains', 'link-184');">official_top_level_domains</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line">    <tt class="py-string">'ac'</tt><tt class="py-op">,</tt> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line">    <tt class="py-string">'ad'</tt><tt class="py-op">,</tt> </tt>
<a name="L1415"></a><tt class="py-lineno">1415</tt>  <tt class="py-line">    <tt class="py-string">'ae'</tt><tt class="py-op">,</tt> </tt>
<a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line">    <tt class="py-string">'aero'</tt><tt class="py-op">,</tt> </tt>
<a name="L1417"></a><tt class="py-lineno">1417</tt>  <tt class="py-line">    <tt class="py-string">'af'</tt><tt class="py-op">,</tt> </tt>
<a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line">    <tt class="py-string">'ag'</tt><tt class="py-op">,</tt> </tt>
<a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line">    <tt class="py-string">'ai'</tt><tt class="py-op">,</tt> </tt>
<a name="L1420"></a><tt class="py-lineno">1420</tt>  <tt class="py-line">    <tt class="py-string">'al'</tt><tt class="py-op">,</tt> </tt>
<a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line">    <tt class="py-string">'am'</tt><tt class="py-op">,</tt> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">    <tt class="py-string">'an'</tt><tt class="py-op">,</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line">    <tt class="py-string">'ao'</tt><tt class="py-op">,</tt> </tt>
<a name="L1424"></a><tt class="py-lineno">1424</tt>  <tt class="py-line">    <tt class="py-string">'aq'</tt><tt class="py-op">,</tt> </tt>
<a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">    <tt class="py-string">'ar'</tt><tt class="py-op">,</tt> </tt>
<a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line">    <tt class="py-string">'arpa'</tt><tt class="py-op">,</tt> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line">    <tt class="py-string">'as'</tt><tt class="py-op">,</tt> </tt>
<a name="L1428"></a><tt class="py-lineno">1428</tt>  <tt class="py-line">    <tt class="py-string">'asia'</tt><tt class="py-op">,</tt> </tt>
<a name="L1429"></a><tt class="py-lineno">1429</tt>  <tt class="py-line">    <tt class="py-string">'at'</tt><tt class="py-op">,</tt> </tt>
<a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">    <tt class="py-string">'au'</tt><tt class="py-op">,</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line">    <tt class="py-string">'aw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1432"></a><tt class="py-lineno">1432</tt>  <tt class="py-line">    <tt class="py-string">'ax'</tt><tt class="py-op">,</tt> </tt>
<a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line">    <tt class="py-string">'az'</tt><tt class="py-op">,</tt> </tt>
<a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line">    <tt class="py-string">'ba'</tt><tt class="py-op">,</tt> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line">    <tt class="py-string">'bb'</tt><tt class="py-op">,</tt> </tt>
<a name="L1436"></a><tt class="py-lineno">1436</tt>  <tt class="py-line">    <tt class="py-string">'bd'</tt><tt class="py-op">,</tt> </tt>
<a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line">    <tt class="py-string">'be'</tt><tt class="py-op">,</tt> </tt>
<a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">    <tt class="py-string">'bf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line">    <tt class="py-string">'bg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1440"></a><tt class="py-lineno">1440</tt>  <tt class="py-line">    <tt class="py-string">'bh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">    <tt class="py-string">'bi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line">    <tt class="py-string">'biz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line">    <tt class="py-string">'bj'</tt><tt class="py-op">,</tt> </tt>
<a name="L1444"></a><tt class="py-lineno">1444</tt>  <tt class="py-line">    <tt class="py-string">'bl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line">    <tt class="py-string">'bm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line">    <tt class="py-string">'bn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line">    <tt class="py-string">'bo'</tt><tt class="py-op">,</tt> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line">    <tt class="py-string">'br'</tt><tt class="py-op">,</tt> </tt>
<a name="L1449"></a><tt class="py-lineno">1449</tt>  <tt class="py-line">    <tt class="py-string">'bs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line">    <tt class="py-string">'bt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line">    <tt class="py-string">'bv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line">    <tt class="py-string">'bw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line">    <tt class="py-string">'by'</tt><tt class="py-op">,</tt> </tt>
<a name="L1454"></a><tt class="py-lineno">1454</tt>  <tt class="py-line">    <tt class="py-string">'bz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">    <tt class="py-string">'ca'</tt><tt class="py-op">,</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line">    <tt class="py-string">'cat'</tt><tt class="py-op">,</tt> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line">    <tt class="py-string">'cc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line">    <tt class="py-string">'cd'</tt><tt class="py-op">,</tt> </tt>
<a name="L1459"></a><tt class="py-lineno">1459</tt>  <tt class="py-line">    <tt class="py-string">'cf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line">    <tt class="py-string">'cg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line">    <tt class="py-string">'ch'</tt><tt class="py-op">,</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line">    <tt class="py-string">'ci'</tt><tt class="py-op">,</tt> </tt>
<a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line">    <tt class="py-string">'ck'</tt><tt class="py-op">,</tt> </tt>
<a name="L1464"></a><tt class="py-lineno">1464</tt>  <tt class="py-line">    <tt class="py-string">'cl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line">    <tt class="py-string">'cm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1466"></a><tt class="py-lineno">1466</tt>  <tt class="py-line">    <tt class="py-string">'cn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">    <tt class="py-string">'co'</tt><tt class="py-op">,</tt> </tt>
<a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line">    <tt class="py-string">'com'</tt><tt class="py-op">,</tt> </tt>
<a name="L1469"></a><tt class="py-lineno">1469</tt>  <tt class="py-line">    <tt class="py-string">'coop'</tt><tt class="py-op">,</tt> </tt>
<a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line">    <tt class="py-string">'cr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">    <tt class="py-string">'cu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line">    <tt class="py-string">'cv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1473"></a><tt class="py-lineno">1473</tt>  <tt class="py-line">    <tt class="py-string">'cx'</tt><tt class="py-op">,</tt> </tt>
<a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line">    <tt class="py-string">'cy'</tt><tt class="py-op">,</tt> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">    <tt class="py-string">'cz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line">    <tt class="py-string">'de'</tt><tt class="py-op">,</tt> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line">    <tt class="py-string">'dj'</tt><tt class="py-op">,</tt> </tt>
<a name="L1478"></a><tt class="py-lineno">1478</tt>  <tt class="py-line">    <tt class="py-string">'dk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line">    <tt class="py-string">'dm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">    <tt class="py-string">'do'</tt><tt class="py-op">,</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line">    <tt class="py-string">'dz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line">    <tt class="py-string">'ec'</tt><tt class="py-op">,</tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line">    <tt class="py-string">'edu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line">    <tt class="py-string">'ee'</tt><tt class="py-op">,</tt> </tt>
<a name="L1485"></a><tt class="py-lineno">1485</tt>  <tt class="py-line">    <tt class="py-string">'eg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1486"></a><tt class="py-lineno">1486</tt>  <tt class="py-line">    <tt class="py-string">'eh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line">    <tt class="py-string">'er'</tt><tt class="py-op">,</tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line">    <tt class="py-string">'es'</tt><tt class="py-op">,</tt> </tt>
<a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line">    <tt class="py-string">'et'</tt><tt class="py-op">,</tt> </tt>
<a name="L1490"></a><tt class="py-lineno">1490</tt>  <tt class="py-line">    <tt class="py-string">'eu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line">    <tt class="py-string">'example'</tt><tt class="py-op">,</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line">    <tt class="py-string">'fi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line">    <tt class="py-string">'fj'</tt><tt class="py-op">,</tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line">    <tt class="py-string">'fk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line">    <tt class="py-string">'fm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line">    <tt class="py-string">'fo'</tt><tt class="py-op">,</tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line">    <tt class="py-string">'fr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line">    <tt class="py-string">'ga'</tt><tt class="py-op">,</tt> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line">    <tt class="py-string">'gb'</tt><tt class="py-op">,</tt> </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line">    <tt class="py-string">'gd'</tt><tt class="py-op">,</tt> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line">    <tt class="py-string">'ge'</tt><tt class="py-op">,</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line">    <tt class="py-string">'gf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line">    <tt class="py-string">'gg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line">    <tt class="py-string">'gh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line">    <tt class="py-string">'gi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1506"></a><tt class="py-lineno">1506</tt>  <tt class="py-line">    <tt class="py-string">'gl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line">    <tt class="py-string">'gm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line">    <tt class="py-string">'gn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line">    <tt class="py-string">'gov'</tt><tt class="py-op">,</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line">    <tt class="py-string">'gp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line">    <tt class="py-string">'gq'</tt><tt class="py-op">,</tt> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line">    <tt class="py-string">'gr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1513"></a><tt class="py-lineno">1513</tt>  <tt class="py-line">    <tt class="py-string">'gs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1514"></a><tt class="py-lineno">1514</tt>  <tt class="py-line">    <tt class="py-string">'gt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line">    <tt class="py-string">'gu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line">    <tt class="py-string">'gw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line">    <tt class="py-string">'gy'</tt><tt class="py-op">,</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line">    <tt class="py-string">'hk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line">    <tt class="py-string">'hm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line">    <tt class="py-string">'hn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line">    <tt class="py-string">'hr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line">    <tt class="py-string">'ht'</tt><tt class="py-op">,</tt> </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line">    <tt class="py-string">'hu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line">    <tt class="py-string">'id'</tt><tt class="py-op">,</tt> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line">    <tt class="py-string">'ie'</tt><tt class="py-op">,</tt> </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">    <tt class="py-string">'il'</tt><tt class="py-op">,</tt> </tt>
<a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line">    <tt class="py-string">'im'</tt><tt class="py-op">,</tt> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line">    <tt class="py-string">'in'</tt><tt class="py-op">,</tt> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line">    <tt class="py-string">'info'</tt><tt class="py-op">,</tt> </tt>
<a name="L1530"></a><tt class="py-lineno">1530</tt>  <tt class="py-line">    <tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L1531"></a><tt class="py-lineno">1531</tt>  <tt class="py-line">    <tt class="py-string">'invalid'</tt><tt class="py-op">,</tt> </tt>
<a name="L1532"></a><tt class="py-lineno">1532</tt>  <tt class="py-line">    <tt class="py-string">'io'</tt><tt class="py-op">,</tt> </tt>
<a name="L1533"></a><tt class="py-lineno">1533</tt>  <tt class="py-line">    <tt class="py-string">'iq'</tt><tt class="py-op">,</tt> </tt>
<a name="L1534"></a><tt class="py-lineno">1534</tt>  <tt class="py-line">    <tt class="py-string">'ir'</tt><tt class="py-op">,</tt> </tt>
<a name="L1535"></a><tt class="py-lineno">1535</tt>  <tt class="py-line">    <tt class="py-string">'is'</tt><tt class="py-op">,</tt> </tt>
<a name="L1536"></a><tt class="py-lineno">1536</tt>  <tt class="py-line">    <tt class="py-string">'it'</tt><tt class="py-op">,</tt> </tt>
<a name="L1537"></a><tt class="py-lineno">1537</tt>  <tt class="py-line">    <tt class="py-string">'je'</tt><tt class="py-op">,</tt> </tt>
<a name="L1538"></a><tt class="py-lineno">1538</tt>  <tt class="py-line">    <tt class="py-string">'jm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1539"></a><tt class="py-lineno">1539</tt>  <tt class="py-line">    <tt class="py-string">'jo'</tt><tt class="py-op">,</tt> </tt>
<a name="L1540"></a><tt class="py-lineno">1540</tt>  <tt class="py-line">    <tt class="py-string">'jobs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1541"></a><tt class="py-lineno">1541</tt>  <tt class="py-line">    <tt class="py-string">'jp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1542"></a><tt class="py-lineno">1542</tt>  <tt class="py-line">    <tt class="py-string">'ke'</tt><tt class="py-op">,</tt> </tt>
<a name="L1543"></a><tt class="py-lineno">1543</tt>  <tt class="py-line">    <tt class="py-string">'kg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1544"></a><tt class="py-lineno">1544</tt>  <tt class="py-line">    <tt class="py-string">'kh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1545"></a><tt class="py-lineno">1545</tt>  <tt class="py-line">    <tt class="py-string">'ki'</tt><tt class="py-op">,</tt> </tt>
<a name="L1546"></a><tt class="py-lineno">1546</tt>  <tt class="py-line">    <tt class="py-string">'km'</tt><tt class="py-op">,</tt> </tt>
<a name="L1547"></a><tt class="py-lineno">1547</tt>  <tt class="py-line">    <tt class="py-string">'kn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1548"></a><tt class="py-lineno">1548</tt>  <tt class="py-line">    <tt class="py-string">'kp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1549"></a><tt class="py-lineno">1549</tt>  <tt class="py-line">    <tt class="py-string">'kr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1550"></a><tt class="py-lineno">1550</tt>  <tt class="py-line">    <tt class="py-string">'kw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1551"></a><tt class="py-lineno">1551</tt>  <tt class="py-line">    <tt class="py-string">'ky'</tt><tt class="py-op">,</tt> </tt>
<a name="L1552"></a><tt class="py-lineno">1552</tt>  <tt class="py-line">    <tt class="py-string">'kz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1553"></a><tt class="py-lineno">1553</tt>  <tt class="py-line">    <tt class="py-string">'la'</tt><tt class="py-op">,</tt> </tt>
<a name="L1554"></a><tt class="py-lineno">1554</tt>  <tt class="py-line">    <tt class="py-string">'lb'</tt><tt class="py-op">,</tt> </tt>
<a name="L1555"></a><tt class="py-lineno">1555</tt>  <tt class="py-line">    <tt class="py-string">'lc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1556"></a><tt class="py-lineno">1556</tt>  <tt class="py-line">    <tt class="py-string">'li'</tt><tt class="py-op">,</tt> </tt>
<a name="L1557"></a><tt class="py-lineno">1557</tt>  <tt class="py-line">    <tt class="py-string">'lk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1558"></a><tt class="py-lineno">1558</tt>  <tt class="py-line">    <tt class="py-string">'localhost'</tt><tt class="py-op">,</tt> </tt>
<a name="L1559"></a><tt class="py-lineno">1559</tt>  <tt class="py-line">    <tt class="py-string">'lr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1560"></a><tt class="py-lineno">1560</tt>  <tt class="py-line">    <tt class="py-string">'ls'</tt><tt class="py-op">,</tt> </tt>
<a name="L1561"></a><tt class="py-lineno">1561</tt>  <tt class="py-line">    <tt class="py-string">'lt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1562"></a><tt class="py-lineno">1562</tt>  <tt class="py-line">    <tt class="py-string">'lu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1563"></a><tt class="py-lineno">1563</tt>  <tt class="py-line">    <tt class="py-string">'lv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1564"></a><tt class="py-lineno">1564</tt>  <tt class="py-line">    <tt class="py-string">'ly'</tt><tt class="py-op">,</tt> </tt>
<a name="L1565"></a><tt class="py-lineno">1565</tt>  <tt class="py-line">    <tt class="py-string">'ma'</tt><tt class="py-op">,</tt> </tt>
<a name="L1566"></a><tt class="py-lineno">1566</tt>  <tt class="py-line">    <tt class="py-string">'mc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1567"></a><tt class="py-lineno">1567</tt>  <tt class="py-line">    <tt class="py-string">'md'</tt><tt class="py-op">,</tt> </tt>
<a name="L1568"></a><tt class="py-lineno">1568</tt>  <tt class="py-line">    <tt class="py-string">'me'</tt><tt class="py-op">,</tt> </tt>
<a name="L1569"></a><tt class="py-lineno">1569</tt>  <tt class="py-line">    <tt class="py-string">'mf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1570"></a><tt class="py-lineno">1570</tt>  <tt class="py-line">    <tt class="py-string">'mg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1571"></a><tt class="py-lineno">1571</tt>  <tt class="py-line">    <tt class="py-string">'mh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1572"></a><tt class="py-lineno">1572</tt>  <tt class="py-line">    <tt class="py-string">'mil'</tt><tt class="py-op">,</tt> </tt>
<a name="L1573"></a><tt class="py-lineno">1573</tt>  <tt class="py-line">    <tt class="py-string">'mk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1574"></a><tt class="py-lineno">1574</tt>  <tt class="py-line">    <tt class="py-string">'ml'</tt><tt class="py-op">,</tt> </tt>
<a name="L1575"></a><tt class="py-lineno">1575</tt>  <tt class="py-line">    <tt class="py-string">'mm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1576"></a><tt class="py-lineno">1576</tt>  <tt class="py-line">    <tt class="py-string">'mn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1577"></a><tt class="py-lineno">1577</tt>  <tt class="py-line">    <tt class="py-string">'mo'</tt><tt class="py-op">,</tt> </tt>
<a name="L1578"></a><tt class="py-lineno">1578</tt>  <tt class="py-line">    <tt class="py-string">'mobi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1579"></a><tt class="py-lineno">1579</tt>  <tt class="py-line">    <tt class="py-string">'mp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1580"></a><tt class="py-lineno">1580</tt>  <tt class="py-line">    <tt class="py-string">'mq'</tt><tt class="py-op">,</tt> </tt>
<a name="L1581"></a><tt class="py-lineno">1581</tt>  <tt class="py-line">    <tt class="py-string">'mr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1582"></a><tt class="py-lineno">1582</tt>  <tt class="py-line">    <tt class="py-string">'ms'</tt><tt class="py-op">,</tt> </tt>
<a name="L1583"></a><tt class="py-lineno">1583</tt>  <tt class="py-line">    <tt class="py-string">'mt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1584"></a><tt class="py-lineno">1584</tt>  <tt class="py-line">    <tt class="py-string">'mu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1585"></a><tt class="py-lineno">1585</tt>  <tt class="py-line">    <tt class="py-string">'museum'</tt><tt class="py-op">,</tt> </tt>
<a name="L1586"></a><tt class="py-lineno">1586</tt>  <tt class="py-line">    <tt class="py-string">'mv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1587"></a><tt class="py-lineno">1587</tt>  <tt class="py-line">    <tt class="py-string">'mw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1588"></a><tt class="py-lineno">1588</tt>  <tt class="py-line">    <tt class="py-string">'mx'</tt><tt class="py-op">,</tt> </tt>
<a name="L1589"></a><tt class="py-lineno">1589</tt>  <tt class="py-line">    <tt class="py-string">'my'</tt><tt class="py-op">,</tt> </tt>
<a name="L1590"></a><tt class="py-lineno">1590</tt>  <tt class="py-line">    <tt class="py-string">'mz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1591"></a><tt class="py-lineno">1591</tt>  <tt class="py-line">    <tt class="py-string">'na'</tt><tt class="py-op">,</tt> </tt>
<a name="L1592"></a><tt class="py-lineno">1592</tt>  <tt class="py-line">    <tt class="py-string">'name'</tt><tt class="py-op">,</tt> </tt>
<a name="L1593"></a><tt class="py-lineno">1593</tt>  <tt class="py-line">    <tt class="py-string">'nc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1594"></a><tt class="py-lineno">1594</tt>  <tt class="py-line">    <tt class="py-string">'ne'</tt><tt class="py-op">,</tt> </tt>
<a name="L1595"></a><tt class="py-lineno">1595</tt>  <tt class="py-line">    <tt class="py-string">'net'</tt><tt class="py-op">,</tt> </tt>
<a name="L1596"></a><tt class="py-lineno">1596</tt>  <tt class="py-line">    <tt class="py-string">'nf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1597"></a><tt class="py-lineno">1597</tt>  <tt class="py-line">    <tt class="py-string">'ng'</tt><tt class="py-op">,</tt> </tt>
<a name="L1598"></a><tt class="py-lineno">1598</tt>  <tt class="py-line">    <tt class="py-string">'ni'</tt><tt class="py-op">,</tt> </tt>
<a name="L1599"></a><tt class="py-lineno">1599</tt>  <tt class="py-line">    <tt class="py-string">'nl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1600"></a><tt class="py-lineno">1600</tt>  <tt class="py-line">    <tt class="py-string">'no'</tt><tt class="py-op">,</tt> </tt>
<a name="L1601"></a><tt class="py-lineno">1601</tt>  <tt class="py-line">    <tt class="py-string">'np'</tt><tt class="py-op">,</tt> </tt>
<a name="L1602"></a><tt class="py-lineno">1602</tt>  <tt class="py-line">    <tt class="py-string">'nr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1603"></a><tt class="py-lineno">1603</tt>  <tt class="py-line">    <tt class="py-string">'nu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1604"></a><tt class="py-lineno">1604</tt>  <tt class="py-line">    <tt class="py-string">'nz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1605"></a><tt class="py-lineno">1605</tt>  <tt class="py-line">    <tt class="py-string">'om'</tt><tt class="py-op">,</tt> </tt>
<a name="L1606"></a><tt class="py-lineno">1606</tt>  <tt class="py-line">    <tt class="py-string">'org'</tt><tt class="py-op">,</tt> </tt>
<a name="L1607"></a><tt class="py-lineno">1607</tt>  <tt class="py-line">    <tt class="py-string">'pa'</tt><tt class="py-op">,</tt> </tt>
<a name="L1608"></a><tt class="py-lineno">1608</tt>  <tt class="py-line">    <tt class="py-string">'pe'</tt><tt class="py-op">,</tt> </tt>
<a name="L1609"></a><tt class="py-lineno">1609</tt>  <tt class="py-line">    <tt class="py-string">'pf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1610"></a><tt class="py-lineno">1610</tt>  <tt class="py-line">    <tt class="py-string">'pg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1611"></a><tt class="py-lineno">1611</tt>  <tt class="py-line">    <tt class="py-string">'ph'</tt><tt class="py-op">,</tt> </tt>
<a name="L1612"></a><tt class="py-lineno">1612</tt>  <tt class="py-line">    <tt class="py-string">'pk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1613"></a><tt class="py-lineno">1613</tt>  <tt class="py-line">    <tt class="py-string">'pl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1614"></a><tt class="py-lineno">1614</tt>  <tt class="py-line">    <tt class="py-string">'pm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1615"></a><tt class="py-lineno">1615</tt>  <tt class="py-line">    <tt class="py-string">'pn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1616"></a><tt class="py-lineno">1616</tt>  <tt class="py-line">    <tt class="py-string">'pr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1617"></a><tt class="py-lineno">1617</tt>  <tt class="py-line">    <tt class="py-string">'pro'</tt><tt class="py-op">,</tt> </tt>
<a name="L1618"></a><tt class="py-lineno">1618</tt>  <tt class="py-line">    <tt class="py-string">'ps'</tt><tt class="py-op">,</tt> </tt>
<a name="L1619"></a><tt class="py-lineno">1619</tt>  <tt class="py-line">    <tt class="py-string">'pt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1620"></a><tt class="py-lineno">1620</tt>  <tt class="py-line">    <tt class="py-string">'pw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1621"></a><tt class="py-lineno">1621</tt>  <tt class="py-line">    <tt class="py-string">'py'</tt><tt class="py-op">,</tt> </tt>
<a name="L1622"></a><tt class="py-lineno">1622</tt>  <tt class="py-line">    <tt class="py-string">'qa'</tt><tt class="py-op">,</tt> </tt>
<a name="L1623"></a><tt class="py-lineno">1623</tt>  <tt class="py-line">    <tt class="py-string">'re'</tt><tt class="py-op">,</tt> </tt>
<a name="L1624"></a><tt class="py-lineno">1624</tt>  <tt class="py-line">    <tt class="py-string">'ro'</tt><tt class="py-op">,</tt> </tt>
<a name="L1625"></a><tt class="py-lineno">1625</tt>  <tt class="py-line">    <tt class="py-string">'rs'</tt><tt class="py-op">,</tt> </tt>
<a name="L1626"></a><tt class="py-lineno">1626</tt>  <tt class="py-line">    <tt class="py-string">'ru'</tt><tt class="py-op">,</tt> </tt>
<a name="L1627"></a><tt class="py-lineno">1627</tt>  <tt class="py-line">    <tt class="py-string">'rw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1628"></a><tt class="py-lineno">1628</tt>  <tt class="py-line">    <tt class="py-string">'sa'</tt><tt class="py-op">,</tt> </tt>
<a name="L1629"></a><tt class="py-lineno">1629</tt>  <tt class="py-line">    <tt class="py-string">'sb'</tt><tt class="py-op">,</tt> </tt>
<a name="L1630"></a><tt class="py-lineno">1630</tt>  <tt class="py-line">    <tt class="py-string">'sc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1631"></a><tt class="py-lineno">1631</tt>  <tt class="py-line">    <tt class="py-string">'sd'</tt><tt class="py-op">,</tt> </tt>
<a name="L1632"></a><tt class="py-lineno">1632</tt>  <tt class="py-line">    <tt class="py-string">'se'</tt><tt class="py-op">,</tt> </tt>
<a name="L1633"></a><tt class="py-lineno">1633</tt>  <tt class="py-line">    <tt class="py-string">'sg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1634"></a><tt class="py-lineno">1634</tt>  <tt class="py-line">    <tt class="py-string">'sh'</tt><tt class="py-op">,</tt> </tt>
<a name="L1635"></a><tt class="py-lineno">1635</tt>  <tt class="py-line">    <tt class="py-string">'si'</tt><tt class="py-op">,</tt> </tt>
<a name="L1636"></a><tt class="py-lineno">1636</tt>  <tt class="py-line">    <tt class="py-string">'sj'</tt><tt class="py-op">,</tt> </tt>
<a name="L1637"></a><tt class="py-lineno">1637</tt>  <tt class="py-line">    <tt class="py-string">'sk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1638"></a><tt class="py-lineno">1638</tt>  <tt class="py-line">    <tt class="py-string">'sl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1639"></a><tt class="py-lineno">1639</tt>  <tt class="py-line">    <tt class="py-string">'sm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1640"></a><tt class="py-lineno">1640</tt>  <tt class="py-line">    <tt class="py-string">'sn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1641"></a><tt class="py-lineno">1641</tt>  <tt class="py-line">    <tt class="py-string">'so'</tt><tt class="py-op">,</tt> </tt>
<a name="L1642"></a><tt class="py-lineno">1642</tt>  <tt class="py-line">    <tt class="py-string">'sr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1643"></a><tt class="py-lineno">1643</tt>  <tt class="py-line">    <tt class="py-string">'st'</tt><tt class="py-op">,</tt> </tt>
<a name="L1644"></a><tt class="py-lineno">1644</tt>  <tt class="py-line">    <tt class="py-string">'su'</tt><tt class="py-op">,</tt> </tt>
<a name="L1645"></a><tt class="py-lineno">1645</tt>  <tt class="py-line">    <tt class="py-string">'sv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1646"></a><tt class="py-lineno">1646</tt>  <tt class="py-line">    <tt class="py-string">'sy'</tt><tt class="py-op">,</tt> </tt>
<a name="L1647"></a><tt class="py-lineno">1647</tt>  <tt class="py-line">    <tt class="py-string">'sz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1648"></a><tt class="py-lineno">1648</tt>  <tt class="py-line">    <tt class="py-string">'tc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1649"></a><tt class="py-lineno">1649</tt>  <tt class="py-line">    <tt class="py-string">'td'</tt><tt class="py-op">,</tt> </tt>
<a name="L1650"></a><tt class="py-lineno">1650</tt>  <tt class="py-line">    <tt class="py-string">'tel'</tt><tt class="py-op">,</tt> </tt>
<a name="L1651"></a><tt class="py-lineno">1651</tt>  <tt class="py-line">    <tt class="py-string">'test'</tt><tt class="py-op">,</tt> </tt>
<a name="L1652"></a><tt class="py-lineno">1652</tt>  <tt class="py-line">    <tt class="py-string">'tf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1653"></a><tt class="py-lineno">1653</tt>  <tt class="py-line">    <tt class="py-string">'tg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1654"></a><tt class="py-lineno">1654</tt>  <tt class="py-line">    <tt class="py-string">'th'</tt><tt class="py-op">,</tt> </tt>
<a name="L1655"></a><tt class="py-lineno">1655</tt>  <tt class="py-line">    <tt class="py-string">'tj'</tt><tt class="py-op">,</tt> </tt>
<a name="L1656"></a><tt class="py-lineno">1656</tt>  <tt class="py-line">    <tt class="py-string">'tk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1657"></a><tt class="py-lineno">1657</tt>  <tt class="py-line">    <tt class="py-string">'tl'</tt><tt class="py-op">,</tt> </tt>
<a name="L1658"></a><tt class="py-lineno">1658</tt>  <tt class="py-line">    <tt class="py-string">'tm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1659"></a><tt class="py-lineno">1659</tt>  <tt class="py-line">    <tt class="py-string">'tn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1660"></a><tt class="py-lineno">1660</tt>  <tt class="py-line">    <tt class="py-string">'to'</tt><tt class="py-op">,</tt> </tt>
<a name="L1661"></a><tt class="py-lineno">1661</tt>  <tt class="py-line">    <tt class="py-string">'tp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1662"></a><tt class="py-lineno">1662</tt>  <tt class="py-line">    <tt class="py-string">'tr'</tt><tt class="py-op">,</tt> </tt>
<a name="L1663"></a><tt class="py-lineno">1663</tt>  <tt class="py-line">    <tt class="py-string">'travel'</tt><tt class="py-op">,</tt> </tt>
<a name="L1664"></a><tt class="py-lineno">1664</tt>  <tt class="py-line">    <tt class="py-string">'tt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1665"></a><tt class="py-lineno">1665</tt>  <tt class="py-line">    <tt class="py-string">'tv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1666"></a><tt class="py-lineno">1666</tt>  <tt class="py-line">    <tt class="py-string">'tw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1667"></a><tt class="py-lineno">1667</tt>  <tt class="py-line">    <tt class="py-string">'tz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1668"></a><tt class="py-lineno">1668</tt>  <tt class="py-line">    <tt class="py-string">'ua'</tt><tt class="py-op">,</tt> </tt>
<a name="L1669"></a><tt class="py-lineno">1669</tt>  <tt class="py-line">    <tt class="py-string">'ug'</tt><tt class="py-op">,</tt> </tt>
<a name="L1670"></a><tt class="py-lineno">1670</tt>  <tt class="py-line">    <tt class="py-string">'uk'</tt><tt class="py-op">,</tt> </tt>
<a name="L1671"></a><tt class="py-lineno">1671</tt>  <tt class="py-line">    <tt class="py-string">'um'</tt><tt class="py-op">,</tt> </tt>
<a name="L1672"></a><tt class="py-lineno">1672</tt>  <tt class="py-line">    <tt class="py-string">'us'</tt><tt class="py-op">,</tt> </tt>
<a name="L1673"></a><tt class="py-lineno">1673</tt>  <tt class="py-line">    <tt class="py-string">'uy'</tt><tt class="py-op">,</tt> </tt>
<a name="L1674"></a><tt class="py-lineno">1674</tt>  <tt class="py-line">    <tt class="py-string">'uz'</tt><tt class="py-op">,</tt> </tt>
<a name="L1675"></a><tt class="py-lineno">1675</tt>  <tt class="py-line">    <tt class="py-string">'va'</tt><tt class="py-op">,</tt> </tt>
<a name="L1676"></a><tt class="py-lineno">1676</tt>  <tt class="py-line">    <tt class="py-string">'vc'</tt><tt class="py-op">,</tt> </tt>
<a name="L1677"></a><tt class="py-lineno">1677</tt>  <tt class="py-line">    <tt class="py-string">'ve'</tt><tt class="py-op">,</tt> </tt>
<a name="L1678"></a><tt class="py-lineno">1678</tt>  <tt class="py-line">    <tt class="py-string">'vg'</tt><tt class="py-op">,</tt> </tt>
<a name="L1679"></a><tt class="py-lineno">1679</tt>  <tt class="py-line">    <tt class="py-string">'vi'</tt><tt class="py-op">,</tt> </tt>
<a name="L1680"></a><tt class="py-lineno">1680</tt>  <tt class="py-line">    <tt class="py-string">'vn'</tt><tt class="py-op">,</tt> </tt>
<a name="L1681"></a><tt class="py-lineno">1681</tt>  <tt class="py-line">    <tt class="py-string">'vu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1682"></a><tt class="py-lineno">1682</tt>  <tt class="py-line">    <tt class="py-string">'wf'</tt><tt class="py-op">,</tt> </tt>
<a name="L1683"></a><tt class="py-lineno">1683</tt>  <tt class="py-line">    <tt class="py-string">'ws'</tt><tt class="py-op">,</tt> </tt>
<a name="L1684"></a><tt class="py-lineno">1684</tt>  <tt class="py-line">    <tt class="py-string">'xn--0zwm56d'</tt><tt class="py-op">,</tt> </tt>
<a name="L1685"></a><tt class="py-lineno">1685</tt>  <tt class="py-line">    <tt class="py-string">'xn--11b5bs3a9aj6g'</tt><tt class="py-op">,</tt> </tt>
<a name="L1686"></a><tt class="py-lineno">1686</tt>  <tt class="py-line">    <tt class="py-string">'xn--80akhbyknj4f'</tt><tt class="py-op">,</tt> </tt>
<a name="L1687"></a><tt class="py-lineno">1687</tt>  <tt class="py-line">    <tt class="py-string">'xn--9t4b11yi5a'</tt><tt class="py-op">,</tt> </tt>
<a name="L1688"></a><tt class="py-lineno">1688</tt>  <tt class="py-line">    <tt class="py-string">'xn--deba0ad'</tt><tt class="py-op">,</tt> </tt>
<a name="L1689"></a><tt class="py-lineno">1689</tt>  <tt class="py-line">    <tt class="py-string">'xn--g6w251d'</tt><tt class="py-op">,</tt> </tt>
<a name="L1690"></a><tt class="py-lineno">1690</tt>  <tt class="py-line">    <tt class="py-string">'xn--hgbk6aj7f53bba'</tt><tt class="py-op">,</tt> </tt>
<a name="L1691"></a><tt class="py-lineno">1691</tt>  <tt class="py-line">    <tt class="py-string">'xn--hlcj6aya9esc7a'</tt><tt class="py-op">,</tt> </tt>
<a name="L1692"></a><tt class="py-lineno">1692</tt>  <tt class="py-line">    <tt class="py-string">'xn--jxalpdlp'</tt><tt class="py-op">,</tt> </tt>
<a name="L1693"></a><tt class="py-lineno">1693</tt>  <tt class="py-line">    <tt class="py-string">'xn--kgbechtv'</tt><tt class="py-op">,</tt> </tt>
<a name="L1694"></a><tt class="py-lineno">1694</tt>  <tt class="py-line">    <tt class="py-string">'xn--zckzah'</tt><tt class="py-op">,</tt> </tt>
<a name="L1695"></a><tt class="py-lineno">1695</tt>  <tt class="py-line">    <tt class="py-string">'ye'</tt><tt class="py-op">,</tt> </tt>
<a name="L1696"></a><tt class="py-lineno">1696</tt>  <tt class="py-line">    <tt class="py-string">'yt'</tt><tt class="py-op">,</tt> </tt>
<a name="L1697"></a><tt class="py-lineno">1697</tt>  <tt class="py-line">    <tt class="py-string">'yu'</tt><tt class="py-op">,</tt> </tt>
<a name="L1698"></a><tt class="py-lineno">1698</tt>  <tt class="py-line">    <tt class="py-string">'za'</tt><tt class="py-op">,</tt> </tt>
<a name="L1699"></a><tt class="py-lineno">1699</tt>  <tt class="py-line">    <tt class="py-string">'zm'</tt><tt class="py-op">,</tt> </tt>
<a name="L1700"></a><tt class="py-lineno">1700</tt>  <tt class="py-line">    <tt class="py-string">'zw'</tt><tt class="py-op">,</tt> </tt>
<a name="L1701"></a><tt class="py-lineno">1701</tt>  <tt class="py-line">    <tt class="py-op">]</tt> </tt>
<a name="L1702"></a><tt class="py-lineno">1702</tt>  <tt class="py-line"> </tt>
<a name="L1703"></a><tt class="py-lineno">1703</tt>  <tt class="py-line"> </tt>
<a name="IS_HTTP_URL"></a><div id="IS_HTTP_URL-def"><a name="L1704"></a><tt class="py-lineno">1704</tt> <a class="py-toggle" href="#" id="IS_HTTP_URL-toggle" onclick="return toggle('IS_HTTP_URL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_HTTP_URL-class.html">IS_HTTP_URL</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_HTTP_URL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_HTTP_URL-expanded"><a name="L1705"></a><tt class="py-lineno">1705</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1706"></a><tt class="py-lineno">1706</tt>  <tt class="py-line"><tt class="py-docstring">    Rejects a URL string if any of the following is true:</tt> </tt>
<a name="L1707"></a><tt class="py-lineno">1707</tt>  <tt class="py-line"><tt class="py-docstring">       * The string is empty or None</tt> </tt>
<a name="L1708"></a><tt class="py-lineno">1708</tt>  <tt class="py-line"><tt class="py-docstring">       * The string uses characters that are not allowed in a URL</tt> </tt>
<a name="L1709"></a><tt class="py-lineno">1709</tt>  <tt class="py-line"><tt class="py-docstring">       * The string breaks any of the HTTP syntactic rules</tt> </tt>
<a name="L1710"></a><tt class="py-lineno">1710</tt>  <tt class="py-line"><tt class="py-docstring">       * The URL scheme specified (if one is specified) is not 'http' or 'https'</tt> </tt>
<a name="L1711"></a><tt class="py-lineno">1711</tt>  <tt class="py-line"><tt class="py-docstring">       * The top-level domain (if a host name is specified) does not exist</tt> </tt>
<a name="L1712"></a><tt class="py-lineno">1712</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1713"></a><tt class="py-lineno">1713</tt>  <tt class="py-line"><tt class="py-docstring">    Based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html</tt> </tt>
<a name="L1714"></a><tt class="py-lineno">1714</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1715"></a><tt class="py-lineno">1715</tt>  <tt class="py-line"><tt class="py-docstring">    This function only checks the URL's syntax. It does not check that the URL</tt> </tt>
<a name="L1716"></a><tt class="py-lineno">1716</tt>  <tt class="py-line"><tt class="py-docstring">    points to a real document, for example, or that it otherwise makes sense</tt> </tt>
<a name="L1717"></a><tt class="py-lineno">1717</tt>  <tt class="py-line"><tt class="py-docstring">    semantically. This function does automatically prepend 'http://' in front</tt> </tt>
<a name="L1718"></a><tt class="py-lineno">1718</tt>  <tt class="py-line"><tt class="py-docstring">    of a URL in the case of an abbreviated URL (e.g. 'google.ca').</tt> </tt>
<a name="L1719"></a><tt class="py-lineno">1719</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1720"></a><tt class="py-lineno">1720</tt>  <tt class="py-line"><tt class="py-docstring">    The list of allowed schemes is customizable with the allowed_schemes</tt> </tt>
<a name="L1721"></a><tt class="py-lineno">1721</tt>  <tt class="py-line"><tt class="py-docstring">    parameter. If you exclude None from the list, then abbreviated URLs</tt> </tt>
<a name="L1722"></a><tt class="py-lineno">1722</tt>  <tt class="py-line"><tt class="py-docstring">    (lacking a scheme such as 'http') will be rejected.</tt> </tt>
<a name="L1723"></a><tt class="py-lineno">1723</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1724"></a><tt class="py-lineno">1724</tt>  <tt class="py-line"><tt class="py-docstring">    The default prepended scheme is customizable with the prepend_scheme</tt> </tt>
<a name="L1725"></a><tt class="py-lineno">1725</tt>  <tt class="py-line"><tt class="py-docstring">    parameter. If you set prepend_scheme to None then prepending will be</tt> </tt>
<a name="L1726"></a><tt class="py-lineno">1726</tt>  <tt class="py-line"><tt class="py-docstring">    disabled. URLs that require prepending to parse will still be accepted,</tt> </tt>
<a name="L1727"></a><tt class="py-lineno">1727</tt>  <tt class="py-line"><tt class="py-docstring">    but the return value will not be modified.</tt> </tt>
<a name="L1728"></a><tt class="py-lineno">1728</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1729"></a><tt class="py-lineno">1729</tt>  <tt class="py-line"><tt class="py-docstring">    @author: Jonathan Benn</tt> </tt>
<a name="L1730"></a><tt class="py-lineno">1730</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1731"></a><tt class="py-lineno">1731</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('http://1.2.3.4')</tt> </tt>
<a name="L1732"></a><tt class="py-lineno">1732</tt>  <tt class="py-line"><tt class="py-docstring">    ('http://1.2.3.4', None)</tt> </tt>
<a name="L1733"></a><tt class="py-lineno">1733</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('http://abc.com')</tt> </tt>
<a name="L1734"></a><tt class="py-lineno">1734</tt>  <tt class="py-line"><tt class="py-docstring">    ('http://abc.com', None)</tt> </tt>
<a name="L1735"></a><tt class="py-lineno">1735</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('https://abc.com')</tt> </tt>
<a name="L1736"></a><tt class="py-lineno">1736</tt>  <tt class="py-line"><tt class="py-docstring">    ('https://abc.com', None)</tt> </tt>
<a name="L1737"></a><tt class="py-lineno">1737</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('httpx://abc.com')</tt> </tt>
<a name="L1738"></a><tt class="py-lineno">1738</tt>  <tt class="py-line"><tt class="py-docstring">    ('httpx://abc.com', 'enter a valid URL')</tt> </tt>
<a name="L1739"></a><tt class="py-lineno">1739</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('http://abc.com:80')</tt> </tt>
<a name="L1740"></a><tt class="py-lineno">1740</tt>  <tt class="py-line"><tt class="py-docstring">    ('http://abc.com:80', None)</tt> </tt>
<a name="L1741"></a><tt class="py-lineno">1741</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('http://user@abc.com')</tt> </tt>
<a name="L1742"></a><tt class="py-lineno">1742</tt>  <tt class="py-line"><tt class="py-docstring">    ('http://user@abc.com', None)</tt> </tt>
<a name="L1743"></a><tt class="py-lineno">1743</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_HTTP_URL()('http://user@1.2.3.4')</tt> </tt>
<a name="L1744"></a><tt class="py-lineno">1744</tt>  <tt class="py-line"><tt class="py-docstring">    ('http://user@1.2.3.4', None)</tt> </tt>
<a name="L1745"></a><tt class="py-lineno">1745</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1746"></a><tt class="py-lineno">1746</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1747"></a><tt class="py-lineno">1747</tt>  <tt class="py-line"> </tt>
<a name="IS_HTTP_URL.__init__"></a><div id="IS_HTTP_URL.__init__-def"><a name="L1748"></a><tt class="py-lineno">1748</tt> <a class="py-toggle" href="#" id="IS_HTTP_URL.__init__-toggle" onclick="return toggle('IS_HTTP_URL.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_HTTP_URL-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L1749"></a><tt class="py-lineno">1749</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1750"></a><tt class="py-lineno">1750</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter a valid URL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1751"></a><tt class="py-lineno">1751</tt>  <tt class="py-line">        <tt class="py-param">allowed_schemes</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1752"></a><tt class="py-lineno">1752</tt>  <tt class="py-line">        <tt class="py-param">prepend_scheme</tt><tt class="py-op">=</tt><tt class="py-string">'http'</tt><tt class="py-op">,</tt> </tt>
<a name="L1753"></a><tt class="py-lineno">1753</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_HTTP_URL.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_HTTP_URL.__init__-expanded"><a name="L1754"></a><tt class="py-lineno">1754</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1755"></a><tt class="py-lineno">1755</tt>  <tt class="py-line"><tt class="py-docstring">        :param error_message: a string, the error message to give the end user</tt> </tt>
<a name="L1756"></a><tt class="py-lineno">1756</tt>  <tt class="py-line"><tt class="py-docstring">            if the URL does not validate</tt> </tt>
<a name="L1757"></a><tt class="py-lineno">1757</tt>  <tt class="py-line"><tt class="py-docstring">        :param allowed_schemes: a list containing strings or None. Each element</tt> </tt>
<a name="L1758"></a><tt class="py-lineno">1758</tt>  <tt class="py-line"><tt class="py-docstring">            is a scheme the inputed URL is allowed to use</tt> </tt>
<a name="L1759"></a><tt class="py-lineno">1759</tt>  <tt class="py-line"><tt class="py-docstring">        :param prepend_scheme: a string, this scheme is prepended if it's</tt> </tt>
<a name="L1760"></a><tt class="py-lineno">1760</tt>  <tt class="py-line"><tt class="py-docstring">            necessary to make the URL valid</tt> </tt>
<a name="L1761"></a><tt class="py-lineno">1761</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1762"></a><tt class="py-lineno">1762</tt>  <tt class="py-line"> </tt>
<a name="L1763"></a><tt class="py-lineno">1763</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L1764"></a><tt class="py-lineno">1764</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">allowed_schemes</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1765"></a><tt class="py-lineno">1765</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt id="link-185" class="py-name"><a title="web2py.gluon.validators.http_schemes" class="py-name" href="#" onclick="return doclink('link-185', 'http_schemes', 'link-148');">http_schemes</a></tt> </tt>
<a name="L1766"></a><tt class="py-lineno">1766</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1767"></a><tt class="py-lineno">1767</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed_schemes</tt> </tt>
<a name="L1768"></a><tt class="py-lineno">1768</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">prepend_scheme</tt> </tt>
<a name="L1769"></a><tt class="py-lineno">1769</tt>  <tt class="py-line"> </tt>
<a name="L1770"></a><tt class="py-lineno">1770</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1771"></a><tt class="py-lineno">1771</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-186" class="py-name"><a title="web2py.gluon.validators.http_schemes" class="py-name" href="#" onclick="return doclink('link-186', 'http_schemes', 'link-148');">http_schemes</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1772"></a><tt class="py-lineno">1772</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> \ </tt>
<a name="L1773"></a><tt class="py-lineno">1773</tt>  <tt class="py-line">                    <tt class="py-string">"allowed_scheme value '%s' is not in %s"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1774"></a><tt class="py-lineno">1774</tt>  <tt class="py-line">                    <tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt id="link-187" class="py-name"><a title="web2py.gluon.validators.http_schemes" class="py-name" href="#" onclick="return doclink('link-187', 'http_schemes', 'link-148');">http_schemes</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1775"></a><tt class="py-lineno">1775</tt>  <tt class="py-line"> </tt>
<a name="L1776"></a><tt class="py-lineno">1776</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1777"></a><tt class="py-lineno">1777</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> \ </tt>
<a name="L1778"></a><tt class="py-lineno">1778</tt>  <tt class="py-line">                <tt class="py-string">"prepend_scheme='%s' is not in allowed_schemes=%s"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1779"></a><tt class="py-lineno">1779</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1780"></a><tt class="py-lineno">1780</tt>  <tt class="py-line"> </tt>
<a name="IS_HTTP_URL.__call__"></a><div id="IS_HTTP_URL.__call__-def"><a name="L1781"></a><tt class="py-lineno">1781</tt> <a class="py-toggle" href="#" id="IS_HTTP_URL.__call__-toggle" onclick="return toggle('IS_HTTP_URL.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_HTTP_URL-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_HTTP_URL.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_HTTP_URL.__call__-expanded"><a name="L1782"></a><tt class="py-lineno">1782</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1783"></a><tt class="py-lineno">1783</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: a string, the URL to validate</tt> </tt>
<a name="L1784"></a><tt class="py-lineno">1784</tt>  <tt class="py-line"><tt class="py-docstring">        :returns: a tuple, where tuple[0] is the inputed value</tt> </tt>
<a name="L1785"></a><tt class="py-lineno">1785</tt>  <tt class="py-line"><tt class="py-docstring">            (possible prepended with prepend_scheme), and tuple[1] is either</tt> </tt>
<a name="L1786"></a><tt class="py-lineno">1786</tt>  <tt class="py-line"><tt class="py-docstring">            None (success!) or the string error_message</tt> </tt>
<a name="L1787"></a><tt class="py-lineno">1787</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1788"></a><tt class="py-lineno">1788</tt>  <tt class="py-line"> </tt>
<a name="L1789"></a><tt class="py-lineno">1789</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1790"></a><tt class="py-lineno">1790</tt>  <tt class="py-line">            <tt class="py-comment"># if the URL passes generic validation</tt> </tt>
<a name="L1791"></a><tt class="py-lineno">1791</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt id="link-188" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-188', 'x', 'link-10');">x</a></tt> <tt class="py-op">=</tt> <tt id="link-189" class="py-name" targets="Class web2py.gluon.validators.IS_GENERIC_URL=web2py.gluon.validators.IS_GENERIC_URL-class.html"><a title="web2py.gluon.validators.IS_GENERIC_URL" class="py-name" href="#" onclick="return doclink('link-189', 'IS_GENERIC_URL', 'link-189');">IS_GENERIC_URL</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">,</tt> </tt>
<a name="L1792"></a><tt class="py-lineno">1792</tt>  <tt class="py-line">                               <tt class="py-name">allowed_schemes</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">,</tt> </tt>
<a name="L1793"></a><tt class="py-lineno">1793</tt>  <tt class="py-line">                               <tt class="py-name">prepend_scheme</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">)</tt> </tt>
<a name="L1794"></a><tt class="py-lineno">1794</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-190" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-190', 'x', 'link-10');">x</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1795"></a><tt class="py-lineno">1795</tt>  <tt class="py-line">                <tt class="py-name">componentsMatch</tt> <tt class="py-op">=</tt> <tt id="link-191" class="py-name"><a title="web2py.gluon.validators.url_split_regex" class="py-name" href="#" onclick="return doclink('link-191', 'url_split_regex', 'link-149');">url_split_regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1796"></a><tt class="py-lineno">1796</tt>  <tt class="py-line">                <tt class="py-name">authority</tt> <tt class="py-op">=</tt> <tt class="py-name">componentsMatch</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
<a name="L1797"></a><tt class="py-lineno">1797</tt>  <tt class="py-line">                <tt class="py-comment"># if there is an authority component</tt> </tt>
<a name="L1798"></a><tt class="py-lineno">1798</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">if</tt> <tt class="py-name">authority</tt><tt class="py-op">:</tt> </tt>
<a name="L1799"></a><tt class="py-lineno">1799</tt>  <tt class="py-line">                    <tt class="py-comment"># if authority is a valid IP address</tt> </tt>
<a name="L1800"></a><tt class="py-lineno">1800</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L1801"></a><tt class="py-lineno">1801</tt>  <tt class="py-line">                        <tt class="py-string">"([\w.!~*'|;:&amp;=+$,-]+@)?\d+\.\d+\.\d+\.\d+(:\d*)*$"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">authority</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1802"></a><tt class="py-lineno">1802</tt>  <tt class="py-line">                        <tt class="py-comment"># Then this HTTP URL is valid</tt> </tt>
<a name="L1803"></a><tt class="py-lineno">1803</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1804"></a><tt class="py-lineno">1804</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1805"></a><tt class="py-lineno">1805</tt>  <tt class="py-line">                        <tt class="py-comment"># else if authority is a valid domain name</tt> </tt>
<a name="L1806"></a><tt class="py-lineno">1806</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-name">domainMatch</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1807"></a><tt class="py-lineno">1807</tt>  <tt class="py-line">                            <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L1808"></a><tt class="py-lineno">1808</tt>  <tt class="py-line">                                <tt class="py-string">"([\w.!~*'|;:&amp;=+$,-]+@)?(([A-Za-z0-9]+[A-Za-z0-9\-]*[A-Za-z0-9]+\.)*([A-Za-z0-9]+\.)*)*([A-Za-z]+[A-Za-z0-9\-]*[A-Za-z0-9]+)\.?(:\d*)*$"</tt> </tt>
<a name="L1809"></a><tt class="py-lineno">1809</tt>  <tt class="py-line">                                <tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">authority</tt><tt class="py-op">)</tt> </tt>
<a name="L1810"></a><tt class="py-lineno">1810</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">domainMatch</tt><tt class="py-op">:</tt> </tt>
<a name="L1811"></a><tt class="py-lineno">1811</tt>  <tt class="py-line">                            <tt class="py-comment"># if the top-level domain really exists</tt> </tt>
<a name="L1812"></a><tt class="py-lineno">1812</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-keyword">if</tt> <tt class="py-name">domainMatch</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-192', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>\ </tt>
<a name="L1813"></a><tt class="py-lineno">1813</tt>  <tt class="py-line">                                 <tt class="py-keyword">in</tt> <tt id="link-193" class="py-name"><a title="web2py.gluon.validators.official_top_level_domains" class="py-name" href="#" onclick="return doclink('link-193', 'official_top_level_domains', 'link-184');">official_top_level_domains</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1814"></a><tt class="py-lineno">1814</tt>  <tt class="py-line">                                <tt class="py-comment"># Then this HTTP URL is valid</tt> </tt>
<a name="L1815"></a><tt class="py-lineno">1815</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1816"></a><tt class="py-lineno">1816</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1817"></a><tt class="py-lineno">1817</tt>  <tt class="py-line">                    <tt class="py-comment"># else this is a relative/abbreviated URL, which will parse</tt> </tt>
<a name="L1818"></a><tt class="py-lineno">1818</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># into the URL's path component</tt> </tt>
<a name="L1819"></a><tt class="py-lineno">1819</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">componentsMatch</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
<a name="L1820"></a><tt class="py-lineno">1820</tt>  <tt class="py-line">                    <tt class="py-comment"># relative case: if this is a valid path (if it starts with</tt> </tt>
<a name="L1821"></a><tt class="py-lineno">1821</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-comment"># a slash)</tt> </tt>
<a name="L1822"></a><tt class="py-lineno">1822</tt>  <tt class="py-line"><tt class="py-comment"></tt>                    <tt class="py-keyword">if</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1823"></a><tt class="py-lineno">1823</tt>  <tt class="py-line">                        <tt class="py-comment"># Then this HTTP URL is valid</tt> </tt>
<a name="L1824"></a><tt class="py-lineno">1824</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1825"></a><tt class="py-lineno">1825</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1826"></a><tt class="py-lineno">1826</tt>  <tt class="py-line">                        <tt class="py-comment"># abbreviated case: if we haven't already, prepend a</tt> </tt>
<a name="L1827"></a><tt class="py-lineno">1827</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-comment"># scheme and see if it fixes the problem</tt> </tt>
<a name="L1828"></a><tt class="py-lineno">1828</tt>  <tt class="py-line"><tt class="py-comment"></tt>                        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">'://'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="web2py.gluon.tools.Crud.search" class="py-name" href="#" onclick="return doclink('link-194', 'search', 'link-178');">search</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1829"></a><tt class="py-lineno">1829</tt>  <tt class="py-line">                            <tt class="py-name">schemeToUse</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'http'</tt> </tt>
<a name="L1830"></a><tt class="py-lineno">1830</tt>  <tt class="py-line">                            <tt class="py-name">prependTest</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-195', '__call__', 'link-182');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">schemeToUse</tt> </tt>
<a name="L1831"></a><tt class="py-lineno">1831</tt>  <tt class="py-line">                                     <tt class="py-op">+</tt> <tt class="py-string">'://'</tt> <tt class="py-op">+</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1832"></a><tt class="py-lineno">1832</tt>  <tt class="py-line">                            <tt class="py-comment"># if the prepend test succeeded</tt> </tt>
<a name="L1833"></a><tt class="py-lineno">1833</tt>  <tt class="py-line"><tt class="py-comment"></tt>                            <tt class="py-keyword">if</tt> <tt class="py-name">prependTest</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1834"></a><tt class="py-lineno">1834</tt>  <tt class="py-line">                                <tt class="py-comment"># if prepending in the output is enabled</tt> </tt>
<a name="L1835"></a><tt class="py-lineno">1835</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">:</tt> </tt>
<a name="L1836"></a><tt class="py-lineno">1836</tt>  <tt class="py-line">                                    <tt class="py-keyword">return</tt> <tt class="py-name">prependTest</tt> </tt>
<a name="L1837"></a><tt class="py-lineno">1837</tt>  <tt class="py-line">                                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1838"></a><tt class="py-lineno">1838</tt>  <tt class="py-line">                                    <tt class="py-comment"># else return the original, non-prepended</tt> </tt>
<a name="L1839"></a><tt class="py-lineno">1839</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                    <tt class="py-comment"># value</tt> </tt>
<a name="L1840"></a><tt class="py-lineno">1840</tt>  <tt class="py-line"><tt class="py-comment"></tt>                                    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1841"></a><tt class="py-lineno">1841</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L1842"></a><tt class="py-lineno">1842</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L1843"></a><tt class="py-lineno">1843</tt>  <tt class="py-line">        <tt class="py-comment"># else the HTTP URL is not valid</tt> </tt>
<a name="L1844"></a><tt class="py-lineno">1844</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-196" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-196', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1845"></a><tt class="py-lineno">1845</tt>  <tt class="py-line"> </tt>
<a name="L1846"></a><tt class="py-lineno">1846</tt>  <tt class="py-line"> </tt>
<a name="IS_URL"></a><div id="IS_URL-def"><a name="L1847"></a><tt class="py-lineno">1847</tt> <a class="py-toggle" href="#" id="IS_URL-toggle" onclick="return toggle('IS_URL');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_URL-class.html">IS_URL</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_URL-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_URL-expanded"><a name="L1848"></a><tt class="py-lineno">1848</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1849"></a><tt class="py-lineno">1849</tt>  <tt class="py-line"><tt class="py-docstring">    Rejects a URL string if any of the following is true:</tt> </tt>
<a name="L1850"></a><tt class="py-lineno">1850</tt>  <tt class="py-line"><tt class="py-docstring">       * The string is empty or None</tt> </tt>
<a name="L1851"></a><tt class="py-lineno">1851</tt>  <tt class="py-line"><tt class="py-docstring">       * The string uses characters that are not allowed in a URL</tt> </tt>
<a name="L1852"></a><tt class="py-lineno">1852</tt>  <tt class="py-line"><tt class="py-docstring">       * The string breaks any of the HTTP syntactic rules</tt> </tt>
<a name="L1853"></a><tt class="py-lineno">1853</tt>  <tt class="py-line"><tt class="py-docstring">       * The URL scheme specified (if one is specified) is not 'http' or 'https'</tt> </tt>
<a name="L1854"></a><tt class="py-lineno">1854</tt>  <tt class="py-line"><tt class="py-docstring">       * The top-level domain (if a host name is specified) does not exist</tt> </tt>
<a name="L1855"></a><tt class="py-lineno">1855</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1856"></a><tt class="py-lineno">1856</tt>  <tt class="py-line"><tt class="py-docstring">    (These rules are based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html)</tt> </tt>
<a name="L1857"></a><tt class="py-lineno">1857</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1858"></a><tt class="py-lineno">1858</tt>  <tt class="py-line"><tt class="py-docstring">    This function only checks the URL's syntax. It does not check that the URL</tt> </tt>
<a name="L1859"></a><tt class="py-lineno">1859</tt>  <tt class="py-line"><tt class="py-docstring">    points to a real document, for example, or that it otherwise makes sense</tt> </tt>
<a name="L1860"></a><tt class="py-lineno">1860</tt>  <tt class="py-line"><tt class="py-docstring">    semantically. This function does automatically prepend 'http://' in front</tt> </tt>
<a name="L1861"></a><tt class="py-lineno">1861</tt>  <tt class="py-line"><tt class="py-docstring">    of a URL in the case of an abbreviated URL (e.g. 'google.ca').</tt> </tt>
<a name="L1862"></a><tt class="py-lineno">1862</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1863"></a><tt class="py-lineno">1863</tt>  <tt class="py-line"><tt class="py-docstring">    If the parameter mode='generic' is used, then this function's behavior</tt> </tt>
<a name="L1864"></a><tt class="py-lineno">1864</tt>  <tt class="py-line"><tt class="py-docstring">    changes. It then rejects a URL string if any of the following is true:</tt> </tt>
<a name="L1865"></a><tt class="py-lineno">1865</tt>  <tt class="py-line"><tt class="py-docstring">       * The string is empty or None</tt> </tt>
<a name="L1866"></a><tt class="py-lineno">1866</tt>  <tt class="py-line"><tt class="py-docstring">       * The string uses characters that are not allowed in a URL</tt> </tt>
<a name="L1867"></a><tt class="py-lineno">1867</tt>  <tt class="py-line"><tt class="py-docstring">       * The URL scheme specified (if one is specified) is not valid</tt> </tt>
<a name="L1868"></a><tt class="py-lineno">1868</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1869"></a><tt class="py-lineno">1869</tt>  <tt class="py-line"><tt class="py-docstring">    (These rules are based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html)</tt> </tt>
<a name="L1870"></a><tt class="py-lineno">1870</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1871"></a><tt class="py-lineno">1871</tt>  <tt class="py-line"><tt class="py-docstring">    The list of allowed schemes is customizable with the allowed_schemes</tt> </tt>
<a name="L1872"></a><tt class="py-lineno">1872</tt>  <tt class="py-line"><tt class="py-docstring">    parameter. If you exclude None from the list, then abbreviated URLs</tt> </tt>
<a name="L1873"></a><tt class="py-lineno">1873</tt>  <tt class="py-line"><tt class="py-docstring">    (lacking a scheme such as 'http') will be rejected.</tt> </tt>
<a name="L1874"></a><tt class="py-lineno">1874</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1875"></a><tt class="py-lineno">1875</tt>  <tt class="py-line"><tt class="py-docstring">    The default prepended scheme is customizable with the prepend_scheme</tt> </tt>
<a name="L1876"></a><tt class="py-lineno">1876</tt>  <tt class="py-line"><tt class="py-docstring">    parameter. If you set prepend_scheme to None then prepending will be</tt> </tt>
<a name="L1877"></a><tt class="py-lineno">1877</tt>  <tt class="py-line"><tt class="py-docstring">    disabled. URLs that require prepending to parse will still be accepted,</tt> </tt>
<a name="L1878"></a><tt class="py-lineno">1878</tt>  <tt class="py-line"><tt class="py-docstring">    but the return value will not be modified.</tt> </tt>
<a name="L1879"></a><tt class="py-lineno">1879</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1880"></a><tt class="py-lineno">1880</tt>  <tt class="py-line"><tt class="py-docstring">    IS_URL is compatible with the Internationalized Domain Name (IDN) standard</tt> </tt>
<a name="L1881"></a><tt class="py-lineno">1881</tt>  <tt class="py-line"><tt class="py-docstring">    specified in RFC 3490 (http://tools.ietf.org/html/rfc3490). As a result,</tt> </tt>
<a name="L1882"></a><tt class="py-lineno">1882</tt>  <tt class="py-line"><tt class="py-docstring">    URLs can be regular strings or unicode strings.</tt> </tt>
<a name="L1883"></a><tt class="py-lineno">1883</tt>  <tt class="py-line"><tt class="py-docstring">    If the URL's domain component (e.g. google.ca) contains non-US-ASCII</tt> </tt>
<a name="L1884"></a><tt class="py-lineno">1884</tt>  <tt class="py-line"><tt class="py-docstring">    letters, then the domain will be converted into Punycode (defined in</tt> </tt>
<a name="L1885"></a><tt class="py-lineno">1885</tt>  <tt class="py-line"><tt class="py-docstring">    RFC 3492, http://tools.ietf.org/html/rfc3492). IS_URL goes a bit beyond</tt> </tt>
<a name="L1886"></a><tt class="py-lineno">1886</tt>  <tt class="py-line"><tt class="py-docstring">    the standards, and allows non-US-ASCII characters to be present in the path</tt> </tt>
<a name="L1887"></a><tt class="py-lineno">1887</tt>  <tt class="py-line"><tt class="py-docstring">    and query components of the URL as well. These non-US-ASCII characters will</tt> </tt>
<a name="L1888"></a><tt class="py-lineno">1888</tt>  <tt class="py-line"><tt class="py-docstring">    be escaped using the standard '%20' type syntax. e.g. the unicode</tt> </tt>
<a name="L1889"></a><tt class="py-lineno">1889</tt>  <tt class="py-line"><tt class="py-docstring">    character with hex code 0x4e86 will become '%4e%86'</tt> </tt>
<a name="L1890"></a><tt class="py-lineno">1890</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1891"></a><tt class="py-lineno">1891</tt>  <tt class="py-line"><tt class="py-docstring">    Code Examples::</tt> </tt>
<a name="L1892"></a><tt class="py-lineno">1892</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1893"></a><tt class="py-lineno">1893</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_URL())</tt> </tt>
<a name="L1894"></a><tt class="py-lineno">1894</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_URL()('abc.com')</tt> </tt>
<a name="L1895"></a><tt class="py-lineno">1895</tt>  <tt class="py-line"><tt class="py-docstring">        ('http://abc.com', None)</tt> </tt>
<a name="L1896"></a><tt class="py-lineno">1896</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1897"></a><tt class="py-lineno">1897</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_URL(mode='generic'))</tt> </tt>
<a name="L1898"></a><tt class="py-lineno">1898</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_URL(mode='generic')('abc.com')</tt> </tt>
<a name="L1899"></a><tt class="py-lineno">1899</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc.com', None)</tt> </tt>
<a name="L1900"></a><tt class="py-lineno">1900</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1901"></a><tt class="py-lineno">1901</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L1902"></a><tt class="py-lineno">1902</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_URL(allowed_schemes=['https'], prepend_scheme='https'))</tt> </tt>
<a name="L1903"></a><tt class="py-lineno">1903</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_URL(allowed_schemes=['https'], prepend_scheme='https')('https://abc.com')</tt> </tt>
<a name="L1904"></a><tt class="py-lineno">1904</tt>  <tt class="py-line"><tt class="py-docstring">        ('https://abc.com', None)</tt> </tt>
<a name="L1905"></a><tt class="py-lineno">1905</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1906"></a><tt class="py-lineno">1906</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L1907"></a><tt class="py-lineno">1907</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_URL(prepend_scheme='https'))</tt> </tt>
<a name="L1908"></a><tt class="py-lineno">1908</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_URL(prepend_scheme='https')('abc.com')</tt> </tt>
<a name="L1909"></a><tt class="py-lineno">1909</tt>  <tt class="py-line"><tt class="py-docstring">        ('https://abc.com', None)</tt> </tt>
<a name="L1910"></a><tt class="py-lineno">1910</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1911"></a><tt class="py-lineno">1911</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L1912"></a><tt class="py-lineno">1912</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_URL(mode='generic', allowed_schemes=['ftps', 'https'],</tt> </tt>
<a name="L1913"></a><tt class="py-lineno">1913</tt>  <tt class="py-line"><tt class="py-docstring">                prepend_scheme='https'))</tt> </tt>
<a name="L1914"></a><tt class="py-lineno">1914</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_URL(mode='generic', allowed_schemes=['ftps', 'https'], prepend_scheme='https')('https://abc.com')</tt> </tt>
<a name="L1915"></a><tt class="py-lineno">1915</tt>  <tt class="py-line"><tt class="py-docstring">        ('https://abc.com', None)</tt> </tt>
<a name="L1916"></a><tt class="py-lineno">1916</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_URL(mode='generic', allowed_schemes=['ftps', 'https', None], prepend_scheme='https')('abc.com')</tt> </tt>
<a name="L1917"></a><tt class="py-lineno">1917</tt>  <tt class="py-line"><tt class="py-docstring">        ('abc.com', None)</tt> </tt>
<a name="L1918"></a><tt class="py-lineno">1918</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1919"></a><tt class="py-lineno">1919</tt>  <tt class="py-line"><tt class="py-docstring">    @author: Jonathan Benn</tt> </tt>
<a name="L1920"></a><tt class="py-lineno">1920</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1921"></a><tt class="py-lineno">1921</tt>  <tt class="py-line"> </tt>
<a name="IS_URL.__init__"></a><div id="IS_URL.__init__-def"><a name="L1922"></a><tt class="py-lineno">1922</tt> <a class="py-toggle" href="#" id="IS_URL.__init__-toggle" onclick="return toggle('IS_URL.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_URL-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L1923"></a><tt class="py-lineno">1923</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L1924"></a><tt class="py-lineno">1924</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter a valid URL'</tt><tt class="py-op">,</tt> </tt>
<a name="L1925"></a><tt class="py-lineno">1925</tt>  <tt class="py-line">        <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-string">'http'</tt><tt class="py-op">,</tt> </tt>
<a name="L1926"></a><tt class="py-lineno">1926</tt>  <tt class="py-line">        <tt class="py-param">allowed_schemes</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1927"></a><tt class="py-lineno">1927</tt>  <tt class="py-line">        <tt class="py-param">prepend_scheme</tt><tt class="py-op">=</tt><tt class="py-string">'http'</tt><tt class="py-op">,</tt> </tt>
<a name="L1928"></a><tt class="py-lineno">1928</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_URL.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_URL.__init__-expanded"><a name="L1929"></a><tt class="py-lineno">1929</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1930"></a><tt class="py-lineno">1930</tt>  <tt class="py-line"><tt class="py-docstring">        :param error_message: a string, the error message to give the end user</tt> </tt>
<a name="L1931"></a><tt class="py-lineno">1931</tt>  <tt class="py-line"><tt class="py-docstring">            if the URL does not validate</tt> </tt>
<a name="L1932"></a><tt class="py-lineno">1932</tt>  <tt class="py-line"><tt class="py-docstring">        :param allowed_schemes: a list containing strings or None. Each element</tt> </tt>
<a name="L1933"></a><tt class="py-lineno">1933</tt>  <tt class="py-line"><tt class="py-docstring">            is a scheme the inputed URL is allowed to use</tt> </tt>
<a name="L1934"></a><tt class="py-lineno">1934</tt>  <tt class="py-line"><tt class="py-docstring">        :param prepend_scheme: a string, this scheme is prepended if it's</tt> </tt>
<a name="L1935"></a><tt class="py-lineno">1935</tt>  <tt class="py-line"><tt class="py-docstring">            necessary to make the URL valid</tt> </tt>
<a name="L1936"></a><tt class="py-lineno">1936</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1937"></a><tt class="py-lineno">1937</tt>  <tt class="py-line"> </tt>
<a name="L1938"></a><tt class="py-lineno">1938</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L1939"></a><tt class="py-lineno">1939</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">mode</tt><tt class="py-op">.</tt><tt id="link-197" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-197', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1940"></a><tt class="py-lineno">1940</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'generic'</tt><tt class="py-op">,</tt> <tt class="py-string">'http'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1941"></a><tt class="py-lineno">1941</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"invalid mode '%s' in IS_URL"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt>
<a name="L1942"></a><tt class="py-lineno">1942</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed_schemes</tt> </tt>
<a name="L1943"></a><tt class="py-lineno">1943</tt>  <tt class="py-line"> </tt>
<a name="L1944"></a><tt class="py-lineno">1944</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1945"></a><tt class="py-lineno">1945</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">prepend_scheme</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">:</tt> </tt>
<a name="L1946"></a><tt class="py-lineno">1946</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> \ </tt>
<a name="L1947"></a><tt class="py-lineno">1947</tt>  <tt class="py-line">                    <tt class="py-string">"prepend_scheme='%s' is not in allowed_schemes=%s"</tt> \ </tt>
<a name="L1948"></a><tt class="py-lineno">1948</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">)</tt> </tt>
<a name="L1949"></a><tt class="py-lineno">1949</tt>  <tt class="py-line"> </tt>
<a name="L1950"></a><tt class="py-lineno">1950</tt>  <tt class="py-line">        <tt class="py-comment"># if allowed_schemes is None, then we will defer testing</tt> </tt>
<a name="L1951"></a><tt class="py-lineno">1951</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># prepend_scheme's validity to a sub-method</tt> </tt>
<a name="L1952"></a><tt class="py-lineno">1952</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L1953"></a><tt class="py-lineno">1953</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt> <tt class="py-op">=</tt> <tt class="py-name">prepend_scheme</tt> </tt>
</div><a name="L1954"></a><tt class="py-lineno">1954</tt>  <tt class="py-line"> </tt>
<a name="IS_URL.__call__"></a><div id="IS_URL.__call__-def"><a name="L1955"></a><tt class="py-lineno">1955</tt> <a class="py-toggle" href="#" id="IS_URL.__call__-toggle" onclick="return toggle('IS_URL.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_URL-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_URL.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_URL.__call__-expanded"><a name="L1956"></a><tt class="py-lineno">1956</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1957"></a><tt class="py-lineno">1957</tt>  <tt class="py-line"><tt class="py-docstring">        :param value: a unicode or regular string, the URL to validate</tt> </tt>
<a name="L1958"></a><tt class="py-lineno">1958</tt>  <tt class="py-line"><tt class="py-docstring">        :returns: a (string, string) tuple, where tuple[0] is the modified</tt> </tt>
<a name="L1959"></a><tt class="py-lineno">1959</tt>  <tt class="py-line"><tt class="py-docstring">            input value and tuple[1] is either None (success!) or the</tt> </tt>
<a name="L1960"></a><tt class="py-lineno">1960</tt>  <tt class="py-line"><tt class="py-docstring">            string error_message. The input value will never be modified in the</tt> </tt>
<a name="L1961"></a><tt class="py-lineno">1961</tt>  <tt class="py-line"><tt class="py-docstring">            case of an error. However, if there is success then the input URL</tt> </tt>
<a name="L1962"></a><tt class="py-lineno">1962</tt>  <tt class="py-line"><tt class="py-docstring">            may be modified to (1) prepend a scheme, and/or (2) convert a</tt> </tt>
<a name="L1963"></a><tt class="py-lineno">1963</tt>  <tt class="py-line"><tt class="py-docstring">            non-compliant unicode URL into a compliant US-ASCII version.</tt> </tt>
<a name="L1964"></a><tt class="py-lineno">1964</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1965"></a><tt class="py-lineno">1965</tt>  <tt class="py-line"> </tt>
<a name="L1966"></a><tt class="py-lineno">1966</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'generic'</tt><tt class="py-op">:</tt> </tt>
<a name="L1967"></a><tt class="py-lineno">1967</tt>  <tt class="py-line">            <tt class="py-name">subMethod</tt> <tt class="py-op">=</tt> <tt id="link-198" class="py-name"><a title="web2py.gluon.validators.IS_GENERIC_URL" class="py-name" href="#" onclick="return doclink('link-198', 'IS_GENERIC_URL', 'link-189');">IS_GENERIC_URL</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">,</tt> </tt>
<a name="L1968"></a><tt class="py-lineno">1968</tt>  <tt class="py-line">                                       <tt class="py-name">allowed_schemes</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">,</tt> </tt>
<a name="L1969"></a><tt class="py-lineno">1969</tt>  <tt class="py-line">                                       <tt class="py-name">prepend_scheme</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">)</tt> </tt>
<a name="L1970"></a><tt class="py-lineno">1970</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">'http'</tt><tt class="py-op">:</tt> </tt>
<a name="L1971"></a><tt class="py-lineno">1971</tt>  <tt class="py-line">            <tt class="py-name">subMethod</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name" targets="Class web2py.gluon.validators.IS_HTTP_URL=web2py.gluon.validators.IS_HTTP_URL-class.html"><a title="web2py.gluon.validators.IS_HTTP_URL" class="py-name" href="#" onclick="return doclink('link-199', 'IS_HTTP_URL', 'link-199');">IS_HTTP_URL</a></tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">,</tt> </tt>
<a name="L1972"></a><tt class="py-lineno">1972</tt>  <tt class="py-line">                                    <tt class="py-name">allowed_schemes</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt><tt class="py-op">,</tt> </tt>
<a name="L1973"></a><tt class="py-lineno">1973</tt>  <tt class="py-line">                                    <tt class="py-name">prepend_scheme</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">)</tt> </tt>
<a name="L1974"></a><tt class="py-lineno">1974</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1975"></a><tt class="py-lineno">1975</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">,</tt> <tt class="py-string">"invalid mode '%s' in IS_URL"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt>
<a name="L1976"></a><tt class="py-lineno">1976</tt>  <tt class="py-line"> </tt>
<a name="L1977"></a><tt class="py-lineno">1977</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">unicode</tt><tt class="py-op">:</tt> </tt>
<a name="L1978"></a><tt class="py-lineno">1978</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">subMethod</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L1979"></a><tt class="py-lineno">1979</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1980"></a><tt class="py-lineno">1980</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1981"></a><tt class="py-lineno">1981</tt>  <tt class="py-line">                <tt class="py-name">asciiValue</tt> <tt class="py-op">=</tt> <tt id="link-200" class="py-name" targets="Function web2py.gluon.validators.unicode_to_ascii_url()=web2py.gluon.validators-module.html#unicode_to_ascii_url"><a title="web2py.gluon.validators.unicode_to_ascii_url" class="py-name" href="#" onclick="return doclink('link-200', 'unicode_to_ascii_url', 'link-200');">unicode_to_ascii_url</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prepend_scheme</tt><tt class="py-op">)</tt> </tt>
<a name="L1982"></a><tt class="py-lineno">1982</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-201" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-201', 'Exception', 'link-168');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1983"></a><tt class="py-lineno">1983</tt>  <tt class="py-line">                <tt class="py-comment">#If we are not able to convert the unicode url into a</tt> </tt>
<a name="L1984"></a><tt class="py-lineno">1984</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-comment"># US-ASCII URL, then the URL is not valid</tt> </tt>
<a name="L1985"></a><tt class="py-lineno">1985</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-202" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-202', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1986"></a><tt class="py-lineno">1986</tt>  <tt class="py-line"> </tt>
<a name="L1987"></a><tt class="py-lineno">1987</tt>  <tt class="py-line">            <tt class="py-name">methodResult</tt> <tt class="py-op">=</tt> <tt class="py-name">subMethod</tt><tt class="py-op">(</tt><tt class="py-name">asciiValue</tt><tt class="py-op">)</tt> </tt>
<a name="L1988"></a><tt class="py-lineno">1988</tt>  <tt class="py-line">            <tt class="py-comment">#if the validation of the US-ASCII version of the value failed</tt> </tt>
<a name="L1989"></a><tt class="py-lineno">1989</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">methodResult</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1990"></a><tt class="py-lineno">1990</tt>  <tt class="py-line">                <tt class="py-comment"># then return the original input value, not the US-ASCII version</tt> </tt>
<a name="L1991"></a><tt class="py-lineno">1991</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">methodResult</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1992"></a><tt class="py-lineno">1992</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1993"></a><tt class="py-lineno">1993</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">methodResult</tt> </tt>
</div></div><a name="L1994"></a><tt class="py-lineno">1994</tt>  <tt class="py-line"> </tt>
<a name="L1995"></a><tt class="py-lineno">1995</tt>  <tt class="py-line"> </tt>
<a name="L1996"></a><tt class="py-lineno">1996</tt>  <tt class="py-line"><tt id="link-203" class="py-name" targets="Variable web2py.gluon.validators.regex_time=web2py.gluon.validators-module.html#regex_time"><a title="web2py.gluon.validators.regex_time" class="py-name" href="#" onclick="return doclink('link-203', 'regex_time', 'link-203');">regex_time</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L1997"></a><tt class="py-lineno">1997</tt>  <tt class="py-line">    <tt class="py-string">'((?P&lt;h&gt;[0-9]+))([^0-9 ]+(?P&lt;m&gt;[0-9 ]+))?([^0-9ap ]+(?P&lt;s&gt;[0-9]*))?((?P&lt;d&gt;[ap]m))?'</tt><tt class="py-op">)</tt> </tt>
<a name="L1998"></a><tt class="py-lineno">1998</tt>  <tt class="py-line"> </tt>
<a name="L1999"></a><tt class="py-lineno">1999</tt>  <tt class="py-line"> </tt>
<a name="IS_TIME"></a><div id="IS_TIME-def"><a name="L2000"></a><tt class="py-lineno">2000</tt> <a class="py-toggle" href="#" id="IS_TIME-toggle" onclick="return toggle('IS_TIME');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_TIME-class.html">IS_TIME</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_TIME-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_TIME-expanded"><a name="L2001"></a><tt class="py-lineno">2001</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2002"></a><tt class="py-lineno">2002</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2003"></a><tt class="py-lineno">2003</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2004"></a><tt class="py-lineno">2004</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_TIME())</tt> </tt>
<a name="L2005"></a><tt class="py-lineno">2005</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2006"></a><tt class="py-lineno">2006</tt>  <tt class="py-line"><tt class="py-docstring">    understands the following formats</tt> </tt>
<a name="L2007"></a><tt class="py-lineno">2007</tt>  <tt class="py-line"><tt class="py-docstring">    hh:mm:ss [am/pm]</tt> </tt>
<a name="L2008"></a><tt class="py-lineno">2008</tt>  <tt class="py-line"><tt class="py-docstring">    hh:mm [am/pm]</tt> </tt>
<a name="L2009"></a><tt class="py-lineno">2009</tt>  <tt class="py-line"><tt class="py-docstring">    hh [am/pm]</tt> </tt>
<a name="L2010"></a><tt class="py-lineno">2010</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2011"></a><tt class="py-lineno">2011</tt>  <tt class="py-line"><tt class="py-docstring">    [am/pm] is optional, ':' can be replaced by any other non-space non-digit</tt> </tt>
<a name="L2012"></a><tt class="py-lineno">2012</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2013"></a><tt class="py-lineno">2013</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('21:30')</tt> </tt>
<a name="L2014"></a><tt class="py-lineno">2014</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(21, 30), None)</tt> </tt>
<a name="L2015"></a><tt class="py-lineno">2015</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('21-30')</tt> </tt>
<a name="L2016"></a><tt class="py-lineno">2016</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(21, 30), None)</tt> </tt>
<a name="L2017"></a><tt class="py-lineno">2017</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('21.30')</tt> </tt>
<a name="L2018"></a><tt class="py-lineno">2018</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(21, 30), None)</tt> </tt>
<a name="L2019"></a><tt class="py-lineno">2019</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('21:30:59')</tt> </tt>
<a name="L2020"></a><tt class="py-lineno">2020</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(21, 30, 59), None)</tt> </tt>
<a name="L2021"></a><tt class="py-lineno">2021</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('5:30')</tt> </tt>
<a name="L2022"></a><tt class="py-lineno">2022</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(5, 30), None)</tt> </tt>
<a name="L2023"></a><tt class="py-lineno">2023</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('5:30 am')</tt> </tt>
<a name="L2024"></a><tt class="py-lineno">2024</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(5, 30), None)</tt> </tt>
<a name="L2025"></a><tt class="py-lineno">2025</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('5:30 pm')</tt> </tt>
<a name="L2026"></a><tt class="py-lineno">2026</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.time(17, 30), None)</tt> </tt>
<a name="L2027"></a><tt class="py-lineno">2027</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('5:30 whatever')</tt> </tt>
<a name="L2028"></a><tt class="py-lineno">2028</tt>  <tt class="py-line"><tt class="py-docstring">        ('5:30 whatever', 'enter time as hh:mm:ss (seconds, am, pm optional)')</tt> </tt>
<a name="L2029"></a><tt class="py-lineno">2029</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('5:30 20')</tt> </tt>
<a name="L2030"></a><tt class="py-lineno">2030</tt>  <tt class="py-line"><tt class="py-docstring">        ('5:30 20', 'enter time as hh:mm:ss (seconds, am, pm optional)')</tt> </tt>
<a name="L2031"></a><tt class="py-lineno">2031</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('24:30')</tt> </tt>
<a name="L2032"></a><tt class="py-lineno">2032</tt>  <tt class="py-line"><tt class="py-docstring">        ('24:30', 'enter time as hh:mm:ss (seconds, am, pm optional)')</tt> </tt>
<a name="L2033"></a><tt class="py-lineno">2033</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('21:60')</tt> </tt>
<a name="L2034"></a><tt class="py-lineno">2034</tt>  <tt class="py-line"><tt class="py-docstring">        ('21:60', 'enter time as hh:mm:ss (seconds, am, pm optional)')</tt> </tt>
<a name="L2035"></a><tt class="py-lineno">2035</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('21:30::')</tt> </tt>
<a name="L2036"></a><tt class="py-lineno">2036</tt>  <tt class="py-line"><tt class="py-docstring">        ('21:30::', 'enter time as hh:mm:ss (seconds, am, pm optional)')</tt> </tt>
<a name="L2037"></a><tt class="py-lineno">2037</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; IS_TIME()('')</tt> </tt>
<a name="L2038"></a><tt class="py-lineno">2038</tt>  <tt class="py-line"><tt class="py-docstring">        ('', 'enter time as hh:mm:ss (seconds, am, pm optional)')</tt> </tt>
<a name="L2039"></a><tt class="py-lineno">2039</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2040"></a><tt class="py-lineno">2040</tt>  <tt class="py-line"> </tt>
<a name="IS_TIME.__init__"></a><div id="IS_TIME.__init__-def"><a name="L2041"></a><tt class="py-lineno">2041</tt> <a class="py-toggle" href="#" id="IS_TIME.__init__-toggle" onclick="return toggle('IS_TIME.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_TIME-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter time as hh:mm:ss (seconds, am, pm optional)'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_TIME.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_TIME.__init__-expanded"><a name="L2042"></a><tt class="py-lineno">2042</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L2043"></a><tt class="py-lineno">2043</tt>  <tt class="py-line"> </tt>
<a name="IS_TIME.__call__"></a><div id="IS_TIME.__call__-def"><a name="L2044"></a><tt class="py-lineno">2044</tt> <a class="py-toggle" href="#" id="IS_TIME.__call__-toggle" onclick="return toggle('IS_TIME.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_TIME-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_TIME.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_TIME.__call__-expanded"><a name="L2045"></a><tt class="py-lineno">2045</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2046"></a><tt class="py-lineno">2046</tt>  <tt class="py-line">            <tt class="py-name">ivalue</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L2047"></a><tt class="py-lineno">2047</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt id="link-204" class="py-name"><a title="web2py.gluon.validators.regex_time" class="py-name" href="#" onclick="return doclink('link-204', 'regex_time', 'link-203');">regex_time</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-205" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-205', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2048"></a><tt class="py-lineno">2048</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">h</tt><tt class="py-op">,</tt> <tt id="link-206" class="py-name" targets="Variable web2py.gluon.languages.lazyT.m=web2py.gluon.languages.lazyT-class.html#m"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-206', 'm', 'link-206');">m</a></tt><tt class="py-op">,</tt> <tt id="link-207" class="py-name" targets="Variable web2py.gluon.languages.lazyT.s=web2py.gluon.languages.lazyT-class.html#s"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-207', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'h'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L2049"></a><tt class="py-lineno">2049</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'m'</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2050"></a><tt class="py-lineno">2050</tt>  <tt class="py-line">                <tt id="link-208" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-208', 'm', 'link-206');">m</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'m'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2051"></a><tt class="py-lineno">2051</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'s'</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2052"></a><tt class="py-lineno">2052</tt>  <tt class="py-line">                <tt id="link-209" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-209', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'s'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2053"></a><tt class="py-lineno">2053</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'pm'</tt> <tt class="py-keyword">and</tt> <tt class="py-number">0</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">h</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">12</tt><tt class="py-op">:</tt> </tt>
<a name="L2054"></a><tt class="py-lineno">2054</tt>  <tt class="py-line">                <tt class="py-name">h</tt> <tt class="py-op">=</tt> <tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-number">12</tt> </tt>
<a name="L2055"></a><tt class="py-lineno">2055</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">24</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-210" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-210', 'm', 'link-206');">m</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">60</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-211" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-211', 's', 'link-207');">s</a></tt> </tt>
<a name="L2056"></a><tt class="py-lineno">2056</tt>  <tt class="py-line">                     <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">60</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2057"></a><tt class="py-lineno">2057</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt>\ </tt>
<a name="L2058"></a><tt class="py-lineno">2058</tt>  <tt class="py-line">                    <tt class="py-op">(</tt><tt class="py-string">'Hours or minutes or seconds are outside of allowed range'</tt><tt class="py-op">)</tt> </tt>
<a name="L2059"></a><tt class="py-lineno">2059</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt id="link-212" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-212', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-213" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-213', 'time', 'link-1');">time</a></tt><tt class="py-op">(</tt><tt class="py-name">h</tt><tt class="py-op">,</tt> <tt id="link-214" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-214', 'm', 'link-206');">m</a></tt><tt class="py-op">,</tt> <tt id="link-215" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-215', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2060"></a><tt class="py-lineno">2060</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2061"></a><tt class="py-lineno">2061</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L2062"></a><tt class="py-lineno">2062</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L2063"></a><tt class="py-lineno">2063</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L2064"></a><tt class="py-lineno">2064</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L2065"></a><tt class="py-lineno">2065</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">ivalue</tt><tt class="py-op">,</tt> <tt id="link-216" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-216', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2066"></a><tt class="py-lineno">2066</tt>  <tt class="py-line"> </tt>
<a name="L2067"></a><tt class="py-lineno">2067</tt>  <tt class="py-line"> </tt>
<a name="IS_DATE"></a><div id="IS_DATE-def"><a name="L2068"></a><tt class="py-lineno">2068</tt> <a class="py-toggle" href="#" id="IS_DATE-toggle" onclick="return toggle('IS_DATE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_DATE-expanded"><a name="L2069"></a><tt class="py-lineno">2069</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2070"></a><tt class="py-lineno">2070</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2071"></a><tt class="py-lineno">2071</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2072"></a><tt class="py-lineno">2072</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_DATE())</tt> </tt>
<a name="L2073"></a><tt class="py-lineno">2073</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2074"></a><tt class="py-lineno">2074</tt>  <tt class="py-line"><tt class="py-docstring">    date has to be in the ISO8960 format YYYY-MM-DD</tt> </tt>
<a name="L2075"></a><tt class="py-lineno">2075</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2076"></a><tt class="py-lineno">2076</tt>  <tt class="py-line"> </tt>
<a name="IS_DATE.__init__"></a><div id="IS_DATE.__init__-def"><a name="L2077"></a><tt class="py-lineno">2077</tt> <a class="py-toggle" href="#" id="IS_DATE.__init__-toggle" onclick="return toggle('IS_DATE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">format</tt><tt class="py-op">=</tt><tt class="py-string">'%Y-%m-%d'</tt><tt class="py-op">,</tt> </tt>
<a name="L2078"></a><tt class="py-lineno">2078</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter date as %(format)s'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATE.__init__-expanded"><a name="L2079"></a><tt class="py-lineno">2079</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L2080"></a><tt class="py-lineno">2080</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2081"></a><tt class="py-lineno">2081</tt>  <tt class="py-line"> </tt>
<a name="IS_DATE.__call__"></a><div id="IS_DATE.__call__-def"><a name="L2082"></a><tt class="py-lineno">2082</tt> <a class="py-toggle" href="#" id="IS_DATE.__call__-toggle" onclick="return toggle('IS_DATE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATE.__call__-expanded"><a name="L2083"></a><tt class="py-lineno">2083</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt id="link-217" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-217', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-218" class="py-name" targets="Class datetime.date=datetime.date-class.html"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-218', 'date', 'link-218');">date</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2084"></a><tt class="py-lineno">2084</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2085"></a><tt class="py-lineno">2085</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2086"></a><tt class="py-lineno">2086</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">,</tt> <tt id="link-219" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-219', 'm', 'link-206');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">hh</tt><tt class="py-op">,</tt> <tt class="py-name">mm</tt><tt class="py-op">,</tt> <tt class="py-name">ss</tt><tt class="py-op">,</tt> <tt class="py-name">t0</tt><tt class="py-op">,</tt> <tt class="py-name">t1</tt><tt class="py-op">,</tt> <tt class="py-name">t2</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L2087"></a><tt class="py-lineno">2087</tt>  <tt class="py-line">                <tt id="link-220" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-220', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">strptime</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2088"></a><tt class="py-lineno">2088</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt id="link-221" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-221', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-222" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-222', 'date', 'link-218');">date</a></tt><tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">,</tt> <tt id="link-223" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-223', 'm', 'link-206');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
<a name="L2089"></a><tt class="py-lineno">2089</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2090"></a><tt class="py-lineno">2090</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2091"></a><tt class="py-lineno">2091</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-224" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-224', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt id="link-225" class="py-name" targets="Class web2py.gluon.validators.IS_DATETIME=web2py.gluon.validators.IS_DATETIME-class.html"><a title="web2py.gluon.validators.IS_DATETIME" class="py-name" href="#" onclick="return doclink('link-225', 'IS_DATETIME', 'link-225');">IS_DATETIME</a></tt><tt class="py-op">.</tt><tt id="link-226" class="py-name" targets="Static Method web2py.gluon.validators.IS_DATETIME.nice()=web2py.gluon.validators.IS_DATETIME-class.html#nice"><a title="web2py.gluon.validators.IS_DATETIME.nice" class="py-name" href="#" onclick="return doclink('link-226', 'nice', 'link-226');">nice</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2092"></a><tt class="py-lineno">2092</tt>  <tt class="py-line"> </tt>
<a name="IS_DATE.formatter"></a><div id="IS_DATE.formatter-def"><a name="L2093"></a><tt class="py-lineno">2093</tt> <a class="py-toggle" href="#" id="IS_DATE.formatter-toggle" onclick="return toggle('IS_DATE.formatter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE-class.html#formatter">formatter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE.formatter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATE.formatter-expanded"><a name="L2094"></a><tt class="py-lineno">2094</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt> </tt>
<a name="L2095"></a><tt class="py-lineno">2095</tt>  <tt class="py-line">        <tt id="link-227" class="py-name" targets="Method web2py.gluon.dal.Expression.year()=web2py.gluon.dal.Expression-class.html#year"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-227', 'year', 'link-227');">year</a></tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-228', 'year', 'link-227');">year</a></tt> </tt>
<a name="L2096"></a><tt class="py-lineno">2096</tt>  <tt class="py-line">        <tt class="py-name">y</tt> <tt class="py-op">=</tt> <tt class="py-string">'%.4i'</tt> <tt class="py-op">%</tt> <tt id="link-229" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-229', 'year', 'link-227');">year</a></tt> </tt>
<a name="L2097"></a><tt class="py-lineno">2097</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">format</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'%y'</tt><tt class="py-op">,</tt><tt class="py-name">y</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2098"></a><tt class="py-lineno">2098</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">format</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'%Y'</tt><tt class="py-op">,</tt><tt class="py-name">y</tt><tt class="py-op">)</tt> </tt>
<a name="L2099"></a><tt class="py-lineno">2099</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-230" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-230', 'year', 'link-227');">year</a></tt><tt class="py-op">&lt;</tt><tt class="py-number">1900</tt><tt class="py-op">:</tt> </tt>
<a name="L2100"></a><tt class="py-lineno">2100</tt>  <tt class="py-line">            <tt id="link-231" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-231', 'year', 'link-227');">year</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2000</tt> </tt>
<a name="L2101"></a><tt class="py-lineno">2101</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-232" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-232', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-233" class="py-name"><a title="datetime.date" class="py-name" href="#" onclick="return doclink('link-233', 'date', 'link-218');">date</a></tt><tt class="py-op">(</tt><tt id="link-234" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-234', 'year', 'link-227');">year</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-235" class="py-name" targets="Method web2py.gluon.dal.Expression.month()=web2py.gluon.dal.Expression-class.html#month"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-235', 'month', 'link-235');">month</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-236" class="py-name" targets="Method web2py.gluon.dal.Expression.day()=web2py.gluon.dal.Expression-class.html#day"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-236', 'day', 'link-236');">day</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2102"></a><tt class="py-lineno">2102</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2103"></a><tt class="py-lineno">2103</tt>  <tt class="py-line"> </tt>
<a name="L2104"></a><tt class="py-lineno">2104</tt>  <tt class="py-line"> </tt>
<a name="IS_DATETIME"></a><div id="IS_DATETIME-def"><a name="L2105"></a><tt class="py-lineno">2105</tt> <a class="py-toggle" href="#" id="IS_DATETIME-toggle" onclick="return toggle('IS_DATETIME');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_DATETIME-expanded"><a name="L2106"></a><tt class="py-lineno">2106</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2107"></a><tt class="py-lineno">2107</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2108"></a><tt class="py-lineno">2108</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2109"></a><tt class="py-lineno">2109</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_DATETIME())</tt> </tt>
<a name="L2110"></a><tt class="py-lineno">2110</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2111"></a><tt class="py-lineno">2111</tt>  <tt class="py-line"><tt class="py-docstring">    datetime has to be in the ISO8960 format YYYY-MM-DD hh:mm:ss</tt> </tt>
<a name="L2112"></a><tt class="py-lineno">2112</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2113"></a><tt class="py-lineno">2113</tt>  <tt class="py-line"> </tt>
<a name="L2114"></a><tt class="py-lineno">2114</tt>  <tt class="py-line">    <tt id="link-237" class="py-name" targets="Variable web2py.gluon.validators.IS_DATETIME.isodatetime=web2py.gluon.validators.IS_DATETIME-class.html#isodatetime"><a title="web2py.gluon.validators.IS_DATETIME.isodatetime" class="py-name" href="#" onclick="return doclink('link-237', 'isodatetime', 'link-237');">isodatetime</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%Y-%m-%d %H:%M:%S'</tt> </tt>
<a name="L2115"></a><tt class="py-lineno">2115</tt>  <tt class="py-line"> </tt>
<a name="L2116"></a><tt class="py-lineno">2116</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="IS_DATETIME.nice"></a><div id="IS_DATETIME.nice-def"><a name="L2117"></a><tt class="py-lineno">2117</tt> <a class="py-toggle" href="#" id="IS_DATETIME.nice-toggle" onclick="return toggle('IS_DATETIME.nice');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME-class.html#nice">nice</a><tt class="py-op">(</tt><tt class="py-param">format</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME.nice-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATETIME.nice-expanded"><a name="L2118"></a><tt class="py-lineno">2118</tt>  <tt class="py-line">        <tt class="py-name">code</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">'%Y'</tt><tt class="py-op">,</tt><tt class="py-string">'1963'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2119"></a><tt class="py-lineno">2119</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%y'</tt><tt class="py-op">,</tt><tt class="py-string">'63'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2120"></a><tt class="py-lineno">2120</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%d'</tt><tt class="py-op">,</tt><tt class="py-string">'28'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2121"></a><tt class="py-lineno">2121</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%m'</tt><tt class="py-op">,</tt><tt class="py-string">'08'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2122"></a><tt class="py-lineno">2122</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%b'</tt><tt class="py-op">,</tt><tt class="py-string">'Aug'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2123"></a><tt class="py-lineno">2123</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%b'</tt><tt class="py-op">,</tt><tt class="py-string">'August'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2124"></a><tt class="py-lineno">2124</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%H'</tt><tt class="py-op">,</tt><tt class="py-string">'14'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2125"></a><tt class="py-lineno">2125</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%I'</tt><tt class="py-op">,</tt><tt class="py-string">'02'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2126"></a><tt class="py-lineno">2126</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%p'</tt><tt class="py-op">,</tt><tt class="py-string">'PM'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2127"></a><tt class="py-lineno">2127</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%M'</tt><tt class="py-op">,</tt><tt class="py-string">'30'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2128"></a><tt class="py-lineno">2128</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-string">'%S'</tt><tt class="py-op">,</tt><tt class="py-string">'59'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2129"></a><tt class="py-lineno">2129</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-238" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-238', 'b', 'link-72');">b</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">code</tt><tt class="py-op">:</tt> </tt>
<a name="L2130"></a><tt class="py-lineno">2130</tt>  <tt class="py-line">            <tt class="py-name">format</tt><tt class="py-op">=</tt><tt class="py-name">format</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt><tt id="link-239" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-239', 'b', 'link-72');">b</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2131"></a><tt class="py-lineno">2131</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">=</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2132"></a><tt class="py-lineno">2132</tt>  <tt class="py-line"> </tt>
<a name="IS_DATETIME.__init__"></a><div id="IS_DATETIME.__init__-def"><a name="L2133"></a><tt class="py-lineno">2133</tt> <a class="py-toggle" href="#" id="IS_DATETIME.__init__-toggle" onclick="return toggle('IS_DATETIME.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">format</tt><tt class="py-op">=</tt><tt class="py-string">'%Y-%m-%d %H:%M:%S'</tt><tt class="py-op">,</tt> </tt>
<a name="L2134"></a><tt class="py-lineno">2134</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter date and time as %(format)s'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATETIME.__init__-expanded"><a name="L2135"></a><tt class="py-lineno">2135</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L2136"></a><tt class="py-lineno">2136</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2137"></a><tt class="py-lineno">2137</tt>  <tt class="py-line"> </tt>
<a name="IS_DATETIME.__call__"></a><div id="IS_DATETIME.__call__-def"><a name="L2138"></a><tt class="py-lineno">2138</tt> <a class="py-toggle" href="#" id="IS_DATETIME.__call__-toggle" onclick="return toggle('IS_DATETIME.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATETIME.__call__-expanded"><a name="L2139"></a><tt class="py-lineno">2139</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt id="link-240" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-240', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-241" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-241', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2140"></a><tt class="py-lineno">2140</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2141"></a><tt class="py-lineno">2141</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2142"></a><tt class="py-lineno">2142</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">,</tt> <tt id="link-242" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-242', 'm', 'link-206');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">hh</tt><tt class="py-op">,</tt> <tt class="py-name">mm</tt><tt class="py-op">,</tt> <tt class="py-name">ss</tt><tt class="py-op">,</tt> <tt class="py-name">t0</tt><tt class="py-op">,</tt> <tt class="py-name">t1</tt><tt class="py-op">,</tt> <tt class="py-name">t2</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L2143"></a><tt class="py-lineno">2143</tt>  <tt class="py-line">                <tt id="link-243" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-243', 'time', 'link-1');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">strptime</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2144"></a><tt class="py-lineno">2144</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt id="link-244" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-244', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-245" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-245', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">,</tt> <tt id="link-246" class="py-name"><a title="web2py.gluon.languages.lazyT.m" class="py-name" href="#" onclick="return doclink('link-246', 'm', 'link-206');">m</a></tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">hh</tt><tt class="py-op">,</tt> <tt class="py-name">mm</tt><tt class="py-op">,</tt> <tt class="py-name">ss</tt><tt class="py-op">)</tt> </tt>
<a name="L2145"></a><tt class="py-lineno">2145</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2146"></a><tt class="py-lineno">2146</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2147"></a><tt class="py-lineno">2147</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-247" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-247', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt id="link-248" class="py-name"><a title="web2py.gluon.validators.IS_DATETIME" class="py-name" href="#" onclick="return doclink('link-248', 'IS_DATETIME', 'link-225');">IS_DATETIME</a></tt><tt class="py-op">.</tt><tt id="link-249" class="py-name"><a title="web2py.gluon.validators.IS_DATETIME.nice" class="py-name" href="#" onclick="return doclink('link-249', 'nice', 'link-226');">nice</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2148"></a><tt class="py-lineno">2148</tt>  <tt class="py-line"> </tt>
<a name="IS_DATETIME.formatter"></a><div id="IS_DATETIME.formatter-def"><a name="L2149"></a><tt class="py-lineno">2149</tt> <a class="py-toggle" href="#" id="IS_DATETIME.formatter-toggle" onclick="return toggle('IS_DATETIME.formatter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME-class.html#formatter">formatter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME.formatter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATETIME.formatter-expanded"><a name="L2150"></a><tt class="py-lineno">2150</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt> </tt>
<a name="L2151"></a><tt class="py-lineno">2151</tt>  <tt class="py-line">        <tt id="link-250" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-250', 'year', 'link-227');">year</a></tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-251" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-251', 'year', 'link-227');">year</a></tt> </tt>
<a name="L2152"></a><tt class="py-lineno">2152</tt>  <tt class="py-line">        <tt class="py-name">y</tt> <tt class="py-op">=</tt> <tt class="py-string">'%.4i'</tt> <tt class="py-op">%</tt> <tt id="link-252" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-252', 'year', 'link-227');">year</a></tt> </tt>
<a name="L2153"></a><tt class="py-lineno">2153</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">format</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'%y'</tt><tt class="py-op">,</tt><tt class="py-name">y</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2154"></a><tt class="py-lineno">2154</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">format</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'%Y'</tt><tt class="py-op">,</tt><tt class="py-name">y</tt><tt class="py-op">)</tt> </tt>
<a name="L2155"></a><tt class="py-lineno">2155</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-253" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-253', 'year', 'link-227');">year</a></tt><tt class="py-op">&lt;</tt><tt class="py-number">1900</tt><tt class="py-op">:</tt> </tt>
<a name="L2156"></a><tt class="py-lineno">2156</tt>  <tt class="py-line">            <tt id="link-254" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-254', 'year', 'link-227');">year</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2000</tt> </tt>
<a name="L2157"></a><tt class="py-lineno">2157</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-255" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-255', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">.</tt><tt id="link-256" class="py-name"><a title="datetime.datetime" class="py-name" href="#" onclick="return doclink('link-256', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt id="link-257" class="py-name"><a title="web2py.gluon.dal.Expression.year" class="py-name" href="#" onclick="return doclink('link-257', 'year', 'link-227');">year</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-258" class="py-name"><a title="web2py.gluon.dal.Expression.month" class="py-name" href="#" onclick="return doclink('link-258', 'month', 'link-235');">month</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-259" class="py-name"><a title="web2py.gluon.dal.Expression.day" class="py-name" href="#" onclick="return doclink('link-259', 'day', 'link-236');">day</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-260" class="py-name" targets="Method web2py.gluon.dal.Expression.hour()=web2py.gluon.dal.Expression-class.html#hour"><a title="web2py.gluon.dal.Expression.hour" class="py-name" href="#" onclick="return doclink('link-260', 'hour', 'link-260');">hour</a></tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">second</tt><tt class="py-op">)</tt> </tt>
<a name="L2158"></a><tt class="py-lineno">2158</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">strftime</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2159"></a><tt class="py-lineno">2159</tt>  <tt class="py-line"> </tt>
<a name="IS_DATE_IN_RANGE"></a><div id="IS_DATE_IN_RANGE-def"><a name="L2160"></a><tt class="py-lineno">2160</tt> <a class="py-toggle" href="#" id="IS_DATE_IN_RANGE-toggle" onclick="return toggle('IS_DATE_IN_RANGE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html">IS_DATE_IN_RANGE</a><tt class="py-op">(</tt><tt class="py-base-class">IS_DATE</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE_IN_RANGE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_DATE_IN_RANGE-expanded"><a name="L2161"></a><tt class="py-lineno">2161</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2162"></a><tt class="py-lineno">2162</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2163"></a><tt class="py-lineno">2163</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2164"></a><tt class="py-lineno">2164</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v = IS_DATE_IN_RANGE(minimum=datetime.date(2008,1,1), \</tt> </tt>
<a name="L2165"></a><tt class="py-lineno">2165</tt>  <tt class="py-line"><tt class="py-docstring">                                 maximum=datetime.date(2009,12,31), \</tt> </tt>
<a name="L2166"></a><tt class="py-lineno">2166</tt>  <tt class="py-line"><tt class="py-docstring">                                 format="%m/%d/%Y",error_message="oops")</tt> </tt>
<a name="L2167"></a><tt class="py-lineno">2167</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2168"></a><tt class="py-lineno">2168</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v('03/03/2008')</tt> </tt>
<a name="L2169"></a><tt class="py-lineno">2169</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.date(2008, 3, 3), None)</tt> </tt>
<a name="L2170"></a><tt class="py-lineno">2170</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2171"></a><tt class="py-lineno">2171</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v('03/03/2010')</tt> </tt>
<a name="L2172"></a><tt class="py-lineno">2172</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.date(2010, 3, 3), 'oops')</tt> </tt>
<a name="L2173"></a><tt class="py-lineno">2173</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2174"></a><tt class="py-lineno">2174</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v(datetime.date(2008,3,3))</tt> </tt>
<a name="L2175"></a><tt class="py-lineno">2175</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.date(2008, 3, 3), None)</tt> </tt>
<a name="L2176"></a><tt class="py-lineno">2176</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2177"></a><tt class="py-lineno">2177</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v(datetime.date(2010,3,3))</tt> </tt>
<a name="L2178"></a><tt class="py-lineno">2178</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.date(2010, 3, 3), 'oops')</tt> </tt>
<a name="L2179"></a><tt class="py-lineno">2179</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2180"></a><tt class="py-lineno">2180</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="IS_DATE_IN_RANGE.__init__"></a><div id="IS_DATE_IN_RANGE.__init__-def"><a name="L2181"></a><tt class="py-lineno">2181</tt> <a class="py-toggle" href="#" id="IS_DATE_IN_RANGE.__init__-toggle" onclick="return toggle('IS_DATE_IN_RANGE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2182"></a><tt class="py-lineno">2182</tt>  <tt class="py-line">                 <tt class="py-param">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2183"></a><tt class="py-lineno">2183</tt>  <tt class="py-line">                 <tt class="py-param">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2184"></a><tt class="py-lineno">2184</tt>  <tt class="py-line">                 <tt class="py-param">format</tt><tt class="py-op">=</tt><tt class="py-string">'%Y-%m-%d'</tt><tt class="py-op">,</tt> </tt>
<a name="L2185"></a><tt class="py-lineno">2185</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE_IN_RANGE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATE_IN_RANGE.__init__-expanded"><a name="L2186"></a><tt class="py-lineno">2186</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">minimum</tt> </tt>
<a name="L2187"></a><tt class="py-lineno">2187</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">maximum</tt> </tt>
<a name="L2188"></a><tt class="py-lineno">2188</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2189"></a><tt class="py-lineno">2189</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2190"></a><tt class="py-lineno">2190</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">"enter date on or before %(max)s"</tt> </tt>
<a name="L2191"></a><tt class="py-lineno">2191</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2192"></a><tt class="py-lineno">2192</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">"enter date on or after %(min)s"</tt> </tt>
<a name="L2193"></a><tt class="py-lineno">2193</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2194"></a><tt class="py-lineno">2194</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">"enter date in range %(min)s %(max)s"</tt> </tt>
<a name="L2195"></a><tt class="py-lineno">2195</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-261" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-261', 'min', 'link-25');">min</a></tt><tt class="py-op">=</tt><tt class="py-name">minimum</tt><tt class="py-op">,</tt> <tt id="link-262" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-262', 'max', 'link-26');">max</a></tt><tt class="py-op">=</tt><tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
<a name="L2196"></a><tt class="py-lineno">2196</tt>  <tt class="py-line">        <tt id="link-263" class="py-name" targets="Class web2py.gluon.validators.IS_DATE=web2py.gluon.validators.IS_DATE-class.html"><a title="web2py.gluon.validators.IS_DATE" class="py-name" href="#" onclick="return doclink('link-263', 'IS_DATE', 'link-263');">IS_DATE</a></tt><tt class="py-op">.</tt><tt id="link-264" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-264', '__init__', 'link-138');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2197"></a><tt class="py-lineno">2197</tt>  <tt class="py-line">                         <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L2198"></a><tt class="py-lineno">2198</tt>  <tt class="py-line">                         <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2199"></a><tt class="py-lineno">2199</tt>  <tt class="py-line"> </tt>
<a name="IS_DATE_IN_RANGE.__call__"></a><div id="IS_DATE_IN_RANGE.__call__-def"><a name="L2200"></a><tt class="py-lineno">2200</tt> <a class="py-toggle" href="#" id="IS_DATE_IN_RANGE.__call__-toggle" onclick="return toggle('IS_DATE_IN_RANGE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATE_IN_RANGE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATE_IN_RANGE.__call__-expanded"><a name="L2201"></a><tt class="py-lineno">2201</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-265" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-265', 'msg', 'link-265');">msg</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-266" class="py-name"><a title="web2py.gluon.validators.IS_DATE" class="py-name" href="#" onclick="return doclink('link-266', 'IS_DATE', 'link-263');">IS_DATE</a></tt><tt class="py-op">.</tt><tt id="link-267" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-267', '__call__', 'link-182');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2202"></a><tt class="py-lineno">2202</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-268" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-268', 'msg', 'link-265');">msg</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2203"></a><tt class="py-lineno">2203</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-269" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-269', 'msg', 'link-265');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2204"></a><tt class="py-lineno">2204</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L2205"></a><tt class="py-lineno">2205</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-270" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-270', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2206"></a><tt class="py-lineno">2206</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L2207"></a><tt class="py-lineno">2207</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-271" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-271', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2208"></a><tt class="py-lineno">2208</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2209"></a><tt class="py-lineno">2209</tt>  <tt class="py-line"> </tt>
<a name="L2210"></a><tt class="py-lineno">2210</tt>  <tt class="py-line"> </tt>
<a name="IS_DATETIME_IN_RANGE"></a><div id="IS_DATETIME_IN_RANGE-def"><a name="L2211"></a><tt class="py-lineno">2211</tt> <a class="py-toggle" href="#" id="IS_DATETIME_IN_RANGE-toggle" onclick="return toggle('IS_DATETIME_IN_RANGE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html">IS_DATETIME_IN_RANGE</a><tt class="py-op">(</tt><tt class="py-base-class">IS_DATETIME</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME_IN_RANGE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_DATETIME_IN_RANGE-expanded"><a name="L2212"></a><tt class="py-lineno">2212</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2213"></a><tt class="py-lineno">2213</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2214"></a><tt class="py-lineno">2214</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2215"></a><tt class="py-lineno">2215</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v = IS_DATETIME_IN_RANGE(\</tt> </tt>
<a name="L2216"></a><tt class="py-lineno">2216</tt>  <tt class="py-line"><tt class="py-docstring">                minimum=datetime.datetime(2008,1,1,12,20), \</tt> </tt>
<a name="L2217"></a><tt class="py-lineno">2217</tt>  <tt class="py-line"><tt class="py-docstring">                maximum=datetime.datetime(2009,12,31,12,20), \</tt> </tt>
<a name="L2218"></a><tt class="py-lineno">2218</tt>  <tt class="py-line"><tt class="py-docstring">                format="%m/%d/%Y %H:%M",error_message="oops")</tt> </tt>
<a name="L2219"></a><tt class="py-lineno">2219</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v('03/03/2008 12:40')</tt> </tt>
<a name="L2220"></a><tt class="py-lineno">2220</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.datetime(2008, 3, 3, 12, 40), None)</tt> </tt>
<a name="L2221"></a><tt class="py-lineno">2221</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2222"></a><tt class="py-lineno">2222</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v('03/03/2010 10:34')</tt> </tt>
<a name="L2223"></a><tt class="py-lineno">2223</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.datetime(2010, 3, 3, 10, 34), 'oops')</tt> </tt>
<a name="L2224"></a><tt class="py-lineno">2224</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2225"></a><tt class="py-lineno">2225</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v(datetime.datetime(2008,3,3,0,0))</tt> </tt>
<a name="L2226"></a><tt class="py-lineno">2226</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.datetime(2008, 3, 3, 0, 0), None)</tt> </tt>
<a name="L2227"></a><tt class="py-lineno">2227</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2228"></a><tt class="py-lineno">2228</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; v(datetime.datetime(2010,3,3,0,0))</tt> </tt>
<a name="L2229"></a><tt class="py-lineno">2229</tt>  <tt class="py-line"><tt class="py-docstring">        (datetime.datetime(2010, 3, 3, 0, 0), 'oops')</tt> </tt>
<a name="L2230"></a><tt class="py-lineno">2230</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="IS_DATETIME_IN_RANGE.__init__"></a><div id="IS_DATETIME_IN_RANGE.__init__-def"><a name="L2231"></a><tt class="py-lineno">2231</tt> <a class="py-toggle" href="#" id="IS_DATETIME_IN_RANGE.__init__-toggle" onclick="return toggle('IS_DATETIME_IN_RANGE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2232"></a><tt class="py-lineno">2232</tt>  <tt class="py-line">                 <tt class="py-param">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2233"></a><tt class="py-lineno">2233</tt>  <tt class="py-line">                 <tt class="py-param">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2234"></a><tt class="py-lineno">2234</tt>  <tt class="py-line">                 <tt class="py-param">format</tt> <tt class="py-op">=</tt> <tt class="py-string">'%Y-%m-%d %H:%M:%S'</tt><tt class="py-op">,</tt> </tt>
<a name="L2235"></a><tt class="py-lineno">2235</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME_IN_RANGE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATETIME_IN_RANGE.__init__-expanded"><a name="L2236"></a><tt class="py-lineno">2236</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">=</tt> <tt class="py-name">minimum</tt> </tt>
<a name="L2237"></a><tt class="py-lineno">2237</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-op">=</tt> <tt class="py-name">maximum</tt> </tt>
<a name="L2238"></a><tt class="py-lineno">2238</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">error_message</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2239"></a><tt class="py-lineno">2239</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">minimum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2240"></a><tt class="py-lineno">2240</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">"enter date and time on or before %(max)s"</tt> </tt>
<a name="L2241"></a><tt class="py-lineno">2241</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">maximum</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2242"></a><tt class="py-lineno">2242</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">"enter date and time on or after %(min)s"</tt> </tt>
<a name="L2243"></a><tt class="py-lineno">2243</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2244"></a><tt class="py-lineno">2244</tt>  <tt class="py-line">                <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-string">"enter date and time in range %(min)s %(max)s"</tt> </tt>
<a name="L2245"></a><tt class="py-lineno">2245</tt>  <tt class="py-line">        <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt id="link-272" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-272', 'min', 'link-25');">min</a></tt> <tt class="py-op">=</tt> <tt class="py-name">minimum</tt><tt class="py-op">,</tt> <tt id="link-273" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-273', 'max', 'link-26');">max</a></tt> <tt class="py-op">=</tt> <tt class="py-name">maximum</tt><tt class="py-op">)</tt> </tt>
<a name="L2246"></a><tt class="py-lineno">2246</tt>  <tt class="py-line">        <tt id="link-274" class="py-name"><a title="web2py.gluon.validators.IS_DATETIME" class="py-name" href="#" onclick="return doclink('link-274', 'IS_DATETIME', 'link-225');">IS_DATETIME</a></tt><tt class="py-op">.</tt><tt id="link-275" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-275', '__init__', 'link-138');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2247"></a><tt class="py-lineno">2247</tt>  <tt class="py-line">                         <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L2248"></a><tt class="py-lineno">2248</tt>  <tt class="py-line">                         <tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> <tt class="py-op">%</tt> <tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2249"></a><tt class="py-lineno">2249</tt>  <tt class="py-line"> </tt>
<a name="IS_DATETIME_IN_RANGE.__call__"></a><div id="IS_DATETIME_IN_RANGE.__call__-def"><a name="L2250"></a><tt class="py-lineno">2250</tt> <a class="py-toggle" href="#" id="IS_DATETIME_IN_RANGE.__call__-toggle" onclick="return toggle('IS_DATETIME_IN_RANGE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_DATETIME_IN_RANGE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_DATETIME_IN_RANGE.__call__-expanded"><a name="L2251"></a><tt class="py-lineno">2251</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-276" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-276', 'msg', 'link-265');">msg</a></tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-277" class="py-name"><a title="web2py.gluon.validators.IS_DATETIME" class="py-name" href="#" onclick="return doclink('link-277', 'IS_DATETIME', 'link-225');">IS_DATETIME</a></tt><tt class="py-op">.</tt><tt id="link-278" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-278', '__call__', 'link-182');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2252"></a><tt class="py-lineno">2252</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-279" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-279', 'msg', 'link-265');">msg</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2253"></a><tt class="py-lineno">2253</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-280" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-280', 'msg', 'link-265');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2254"></a><tt class="py-lineno">2254</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minimum</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L2255"></a><tt class="py-lineno">2255</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-281" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-281', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2256"></a><tt class="py-lineno">2256</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maximum</tt><tt class="py-op">:</tt> </tt>
<a name="L2257"></a><tt class="py-lineno">2257</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-282" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-282', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2258"></a><tt class="py-lineno">2258</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2259"></a><tt class="py-lineno">2259</tt>  <tt class="py-line"> </tt>
<a name="L2260"></a><tt class="py-lineno">2260</tt>  <tt class="py-line"> </tt>
<a name="IS_LIST_OF"></a><div id="IS_LIST_OF-def"><a name="L2261"></a><tt class="py-lineno">2261</tt> <a class="py-toggle" href="#" id="IS_LIST_OF-toggle" onclick="return toggle('IS_LIST_OF');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LIST_OF-class.html">IS_LIST_OF</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LIST_OF-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_LIST_OF-expanded"><a name="L2262"></a><tt class="py-lineno">2262</tt>  <tt class="py-line"> </tt>
<a name="IS_LIST_OF.__init__"></a><div id="IS_LIST_OF.__init__-def"><a name="L2263"></a><tt class="py-lineno">2263</tt> <a class="py-toggle" href="#" id="IS_LIST_OF.__init__-toggle" onclick="return toggle('IS_LIST_OF.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LIST_OF-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LIST_OF.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_LIST_OF.__init__-expanded"><a name="L2264"></a><tt class="py-lineno">2264</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt> <tt class="py-op">=</tt> <tt class="py-name">other</tt> </tt>
</div><a name="L2265"></a><tt class="py-lineno">2265</tt>  <tt class="py-line"> </tt>
<a name="IS_LIST_OF.__call__"></a><div id="IS_LIST_OF.__call__-def"><a name="L2266"></a><tt class="py-lineno">2266</tt> <a class="py-toggle" href="#" id="IS_LIST_OF.__call__-toggle" onclick="return toggle('IS_LIST_OF.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LIST_OF-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LIST_OF.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_LIST_OF.__call__-expanded"><a name="L2267"></a><tt class="py-lineno">2267</tt>  <tt class="py-line">        <tt class="py-name">ivalue</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L2268"></a><tt class="py-lineno">2268</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2269"></a><tt class="py-lineno">2269</tt>  <tt class="py-line">            <tt class="py-name">ivalue</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">ivalue</tt><tt class="py-op">]</tt> </tt>
<a name="L2270"></a><tt class="py-lineno">2270</tt>  <tt class="py-line">        <tt class="py-name">new_value</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L2271"></a><tt class="py-lineno">2271</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ivalue</tt><tt class="py-op">:</tt> </tt>
<a name="L2272"></a><tt class="py-lineno">2272</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L2273"></a><tt class="py-lineno">2273</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L2274"></a><tt class="py-lineno">2274</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L2275"></a><tt class="py-lineno">2275</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2276"></a><tt class="py-lineno">2276</tt>  <tt class="py-line">                <tt class="py-name">new_value</tt><tt class="py-op">.</tt><tt id="link-283" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-283', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
<a name="L2277"></a><tt class="py-lineno">2277</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">new_value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2278"></a><tt class="py-lineno">2278</tt>  <tt class="py-line"> </tt>
<a name="L2279"></a><tt class="py-lineno">2279</tt>  <tt class="py-line"> </tt>
<a name="IS_LOWER"></a><div id="IS_LOWER-def"><a name="L2280"></a><tt class="py-lineno">2280</tt> <a class="py-toggle" href="#" id="IS_LOWER-toggle" onclick="return toggle('IS_LOWER');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LOWER-class.html">IS_LOWER</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LOWER-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_LOWER-expanded"><a name="L2281"></a><tt class="py-lineno">2281</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2282"></a><tt class="py-lineno">2282</tt>  <tt class="py-line"><tt class="py-docstring">    convert to lower case</tt> </tt>
<a name="L2283"></a><tt class="py-lineno">2283</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2284"></a><tt class="py-lineno">2284</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_LOWER()('ABC')</tt> </tt>
<a name="L2285"></a><tt class="py-lineno">2285</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', None)</tt> </tt>
<a name="L2286"></a><tt class="py-lineno">2286</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_LOWER()('&#209;')</tt> </tt>
<a name="L2287"></a><tt class="py-lineno">2287</tt>  <tt class="py-line"><tt class="py-docstring">    ('\\xc3\\xb1', None)</tt> </tt>
<a name="L2288"></a><tt class="py-lineno">2288</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2289"></a><tt class="py-lineno">2289</tt>  <tt class="py-line"> </tt>
<a name="IS_LOWER.__call__"></a><div id="IS_LOWER.__call__-def"><a name="L2290"></a><tt class="py-lineno">2290</tt> <a class="py-toggle" href="#" id="IS_LOWER.__call__-toggle" onclick="return toggle('IS_LOWER.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_LOWER-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_LOWER.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_LOWER.__call__-expanded"><a name="L2291"></a><tt class="py-lineno">2291</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-284', 'decode', 'link-23');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-285" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-285', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-286" class="py-name" targets="Method web2py.gluon.languages.lazyT.encode()=web2py.gluon.languages.lazyT-class.html#encode"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-286', 'encode', 'link-286');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2292"></a><tt class="py-lineno">2292</tt>  <tt class="py-line"> </tt>
<a name="L2293"></a><tt class="py-lineno">2293</tt>  <tt class="py-line"> </tt>
<a name="IS_UPPER"></a><div id="IS_UPPER-def"><a name="L2294"></a><tt class="py-lineno">2294</tt> <a class="py-toggle" href="#" id="IS_UPPER-toggle" onclick="return toggle('IS_UPPER');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_UPPER-class.html">IS_UPPER</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_UPPER-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_UPPER-expanded"><a name="L2295"></a><tt class="py-lineno">2295</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2296"></a><tt class="py-lineno">2296</tt>  <tt class="py-line"><tt class="py-docstring">    convert to upper case</tt> </tt>
<a name="L2297"></a><tt class="py-lineno">2297</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2298"></a><tt class="py-lineno">2298</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_UPPER()('abc')</tt> </tt>
<a name="L2299"></a><tt class="py-lineno">2299</tt>  <tt class="py-line"><tt class="py-docstring">    ('ABC', None)</tt> </tt>
<a name="L2300"></a><tt class="py-lineno">2300</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_UPPER()('&#241;')</tt> </tt>
<a name="L2301"></a><tt class="py-lineno">2301</tt>  <tt class="py-line"><tt class="py-docstring">    ('\\xc3\\x91', None)</tt> </tt>
<a name="L2302"></a><tt class="py-lineno">2302</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2303"></a><tt class="py-lineno">2303</tt>  <tt class="py-line"> </tt>
<a name="IS_UPPER.__call__"></a><div id="IS_UPPER.__call__-def"><a name="L2304"></a><tt class="py-lineno">2304</tt> <a class="py-toggle" href="#" id="IS_UPPER.__call__-toggle" onclick="return toggle('IS_UPPER.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_UPPER-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_UPPER.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_UPPER.__call__-expanded"><a name="L2305"></a><tt class="py-lineno">2305</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-287" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-287', 'decode', 'link-23');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-288" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-288', 'upper', 'link-11');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-289" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-289', 'encode', 'link-286');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf8'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2306"></a><tt class="py-lineno">2306</tt>  <tt class="py-line"> </tt>
<a name="L2307"></a><tt class="py-lineno">2307</tt>  <tt class="py-line"> </tt>
<a name="urlify"></a><div id="urlify-def"><a name="L2308"></a><tt class="py-lineno">2308</tt> <a class="py-toggle" href="#" id="urlify-toggle" onclick="return toggle('urlify');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators-module.html#urlify">urlify</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">maxlen</tt><tt class="py-op">=</tt><tt class="py-number">80</tt><tt class="py-op">,</tt> <tt class="py-param">keep_underscores</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="urlify-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="urlify-expanded"><a name="L2309"></a><tt class="py-lineno">2309</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2310"></a><tt class="py-lineno">2310</tt>  <tt class="py-line"><tt class="py-docstring">    Convert incoming string to a simplified ASCII subset.</tt> </tt>
<a name="L2311"></a><tt class="py-lineno">2311</tt>  <tt class="py-line"><tt class="py-docstring">    if (keep_underscores): underscores are retained in the string</tt> </tt>
<a name="L2312"></a><tt class="py-lineno">2312</tt>  <tt class="py-line"><tt class="py-docstring">    else: underscores are translated to hyphens (default)</tt> </tt>
<a name="L2313"></a><tt class="py-lineno">2313</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2314"></a><tt class="py-lineno">2314</tt>  <tt class="py-line">    <tt id="link-290" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-290', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt id="link-291" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-291', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>                     <tt class="py-comment"># to lowercase</tt> </tt>
<a name="L2315"></a><tt class="py-lineno">2315</tt>  <tt class="py-line">    <tt id="link-292" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-292', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-293" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-293', 's', 'link-207');">s</a></tt><tt class="py-op">.</tt><tt id="link-294" class="py-name"><a title="web2py.gluon.languages.lazyT.decode" class="py-name" href="#" onclick="return doclink('link-294', 'decode', 'link-23');">decode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt>                 <tt class="py-comment"># to utf-8</tt> </tt>
<a name="L2316"></a><tt class="py-lineno">2316</tt>  <tt class="py-line">    <tt id="link-295" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-295', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">unicodedata</tt><tt class="py-op">.</tt><tt class="py-name">normalize</tt><tt class="py-op">(</tt><tt class="py-string">'NFKD'</tt><tt class="py-op">,</tt> <tt id="link-296" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-296', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>  <tt class="py-comment"># normalize eg &#232; =&gt; e, &#241; =&gt; n</tt> </tt>
<a name="L2317"></a><tt class="py-lineno">2317</tt>  <tt class="py-line">    <tt id="link-297" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-297', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-298" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-298', 's', 'link-207');">s</a></tt><tt class="py-op">.</tt><tt id="link-299" class="py-name"><a title="web2py.gluon.languages.lazyT.encode" class="py-name" href="#" onclick="return doclink('link-299', 'encode', 'link-286');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'ASCII'</tt><tt class="py-op">,</tt> <tt class="py-string">'ignore'</tt><tt class="py-op">)</tt>       <tt class="py-comment"># encode as ASCII</tt> </tt>
<a name="L2318"></a><tt class="py-lineno">2318</tt>  <tt class="py-line">    <tt id="link-300" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-300', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'&amp;\w+;'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-301" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-301', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>            <tt class="py-comment"># strip html entities</tt> </tt>
<a name="L2319"></a><tt class="py-lineno">2319</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">keep_underscores</tt><tt class="py-op">:</tt> </tt>
<a name="L2320"></a><tt class="py-lineno">2320</tt>  <tt class="py-line">        <tt id="link-302" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-302', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'\s+'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt id="link-303" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-303', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>         <tt class="py-comment"># whitespace to hyphens</tt> </tt>
<a name="L2321"></a><tt class="py-lineno">2321</tt>  <tt class="py-line">        <tt id="link-304" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-304', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'[^\w\-]'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-305" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-305', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>      <tt class="py-comment"># strip all but alphanumeric/underscore/hyphen</tt> </tt>
<a name="L2322"></a><tt class="py-lineno">2322</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2323"></a><tt class="py-lineno">2323</tt>  <tt class="py-line">        <tt id="link-306" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-306', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'[\s_]+'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt id="link-307" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-307', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>      <tt class="py-comment"># whitespace &amp; underscores to hyphens</tt> </tt>
<a name="L2324"></a><tt class="py-lineno">2324</tt>  <tt class="py-line">        <tt id="link-308" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-308', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'[^a-z0-9\-]'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-309" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-309', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>  <tt class="py-comment"># strip all but alphanumeric/hyphen</tt> </tt>
<a name="L2325"></a><tt class="py-lineno">2325</tt>  <tt class="py-line">    <tt id="link-310" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-310', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">'[-_][-_]+'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt id="link-311" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-311', 's', 'link-207');">s</a></tt><tt class="py-op">)</tt>       <tt class="py-comment"># collapse strings of hyphens</tt> </tt>
<a name="L2326"></a><tt class="py-lineno">2326</tt>  <tt class="py-line">    <tt id="link-312" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-312', 's', 'link-207');">s</a></tt> <tt class="py-op">=</tt> <tt id="link-313" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-313', 's', 'link-207');">s</a></tt><tt class="py-op">.</tt><tt id="link-314" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-314', 'strip', 'link-111');">strip</a></tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">)</tt>                      <tt class="py-comment"># remove leading and trailing hyphens</tt> </tt>
<a name="L2327"></a><tt class="py-lineno">2327</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-315" class="py-name"><a title="web2py.gluon.languages.lazyT.s" class="py-name" href="#" onclick="return doclink('link-315', 's', 'link-207');">s</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">maxlen</tt><tt class="py-op">]</tt>                     <tt class="py-comment"># enforce maximum length</tt> </tt>
</div><a name="L2328"></a><tt class="py-lineno">2328</tt>  <tt class="py-line"> </tt>
<a name="L2329"></a><tt class="py-lineno">2329</tt>  <tt class="py-line"> </tt>
<a name="IS_SLUG"></a><div id="IS_SLUG-def"><a name="L2330"></a><tt class="py-lineno">2330</tt> <a class="py-toggle" href="#" id="IS_SLUG-toggle" onclick="return toggle('IS_SLUG');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_SLUG-class.html">IS_SLUG</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_SLUG-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_SLUG-expanded"><a name="L2331"></a><tt class="py-lineno">2331</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2332"></a><tt class="py-lineno">2332</tt>  <tt class="py-line"><tt class="py-docstring">    convert arbitrary text string to a slug</tt> </tt>
<a name="L2333"></a><tt class="py-lineno">2333</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2334"></a><tt class="py-lineno">2334</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc123')</tt> </tt>
<a name="L2335"></a><tt class="py-lineno">2335</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc123', None)</tt> </tt>
<a name="L2336"></a><tt class="py-lineno">2336</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('ABC123')</tt> </tt>
<a name="L2337"></a><tt class="py-lineno">2337</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc123', None)</tt> </tt>
<a name="L2338"></a><tt class="py-lineno">2338</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc-123')</tt> </tt>
<a name="L2339"></a><tt class="py-lineno">2339</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc-123', None)</tt> </tt>
<a name="L2340"></a><tt class="py-lineno">2340</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc--123')</tt> </tt>
<a name="L2341"></a><tt class="py-lineno">2341</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc-123', None)</tt> </tt>
<a name="L2342"></a><tt class="py-lineno">2342</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc 123')</tt> </tt>
<a name="L2343"></a><tt class="py-lineno">2343</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc-123', None)</tt> </tt>
<a name="L2344"></a><tt class="py-lineno">2344</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc\t_123')</tt> </tt>
<a name="L2345"></a><tt class="py-lineno">2345</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc-123', None)</tt> </tt>
<a name="L2346"></a><tt class="py-lineno">2346</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('-abc-')</tt> </tt>
<a name="L2347"></a><tt class="py-lineno">2347</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', None)</tt> </tt>
<a name="L2348"></a><tt class="py-lineno">2348</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('--a--b--_ -c--')</tt> </tt>
<a name="L2349"></a><tt class="py-lineno">2349</tt>  <tt class="py-line"><tt class="py-docstring">    ('a-b-c', None)</tt> </tt>
<a name="L2350"></a><tt class="py-lineno">2350</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc&amp;amp;123')</tt> </tt>
<a name="L2351"></a><tt class="py-lineno">2351</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc123', None)</tt> </tt>
<a name="L2352"></a><tt class="py-lineno">2352</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc&amp;amp;123&amp;amp;def')</tt> </tt>
<a name="L2353"></a><tt class="py-lineno">2353</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc123def', None)</tt> </tt>
<a name="L2354"></a><tt class="py-lineno">2354</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('&#241;')</tt> </tt>
<a name="L2355"></a><tt class="py-lineno">2355</tt>  <tt class="py-line"><tt class="py-docstring">    ('n', None)</tt> </tt>
<a name="L2356"></a><tt class="py-lineno">2356</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(maxlen=4)('abc123')</tt> </tt>
<a name="L2357"></a><tt class="py-lineno">2357</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc1', None)</tt> </tt>
<a name="L2358"></a><tt class="py-lineno">2358</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG()('abc_123')</tt> </tt>
<a name="L2359"></a><tt class="py-lineno">2359</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc-123', None)</tt> </tt>
<a name="L2360"></a><tt class="py-lineno">2360</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(keep_underscores=False)('abc_123')</tt> </tt>
<a name="L2361"></a><tt class="py-lineno">2361</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc-123', None)</tt> </tt>
<a name="L2362"></a><tt class="py-lineno">2362</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(keep_underscores=True)('abc_123')</tt> </tt>
<a name="L2363"></a><tt class="py-lineno">2363</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc_123', None)</tt> </tt>
<a name="L2364"></a><tt class="py-lineno">2364</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(check=False)('abc')</tt> </tt>
<a name="L2365"></a><tt class="py-lineno">2365</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', None)</tt> </tt>
<a name="L2366"></a><tt class="py-lineno">2366</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(check=True)('abc')</tt> </tt>
<a name="L2367"></a><tt class="py-lineno">2367</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', None)</tt> </tt>
<a name="L2368"></a><tt class="py-lineno">2368</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(check=False)('a bc')</tt> </tt>
<a name="L2369"></a><tt class="py-lineno">2369</tt>  <tt class="py-line"><tt class="py-docstring">    ('a-bc', None)</tt> </tt>
<a name="L2370"></a><tt class="py-lineno">2370</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_SLUG(check=True)('a bc')</tt> </tt>
<a name="L2371"></a><tt class="py-lineno">2371</tt>  <tt class="py-line"><tt class="py-docstring">    ('a bc', 'must be slug')</tt> </tt>
<a name="L2372"></a><tt class="py-lineno">2372</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2373"></a><tt class="py-lineno">2373</tt>  <tt class="py-line"> </tt>
<a name="L2374"></a><tt class="py-lineno">2374</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="IS_SLUG.urlify"></a><div id="IS_SLUG.urlify-def"><a name="L2375"></a><tt class="py-lineno">2375</tt> <a class="py-toggle" href="#" id="IS_SLUG.urlify-toggle" onclick="return toggle('IS_SLUG.urlify');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_SLUG-class.html#urlify">urlify</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">maxlen</tt><tt class="py-op">=</tt><tt class="py-number">80</tt><tt class="py-op">,</tt> <tt class="py-param">keep_underscores</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_SLUG.urlify-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_SLUG.urlify-expanded"><a name="L2376"></a><tt class="py-lineno">2376</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-316" class="py-name" targets="Static Method web2py.gluon.validators.IS_SLUG.urlify()=web2py.gluon.validators.IS_SLUG-class.html#urlify,Function web2py.gluon.validators.urlify()=web2py.gluon.validators-module.html#urlify"><a title="web2py.gluon.validators.IS_SLUG.urlify
web2py.gluon.validators.urlify" class="py-name" href="#" onclick="return doclink('link-316', 'urlify', 'link-316');">urlify</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">maxlen</tt><tt class="py-op">,</tt> <tt class="py-name">keep_underscores</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2377"></a><tt class="py-lineno">2377</tt>  <tt class="py-line"> </tt>
<a name="IS_SLUG.__init__"></a><div id="IS_SLUG.__init__-def"><a name="L2378"></a><tt class="py-lineno">2378</tt> <a class="py-toggle" href="#" id="IS_SLUG.__init__-toggle" onclick="return toggle('IS_SLUG.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_SLUG-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">maxlen</tt><tt class="py-op">=</tt><tt class="py-number">80</tt><tt class="py-op">,</tt> <tt class="py-param">check</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'must be slug'</tt><tt class="py-op">,</tt> <tt class="py-param">keep_underscores</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_SLUG.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_SLUG.__init__-expanded"><a name="L2379"></a><tt class="py-lineno">2379</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxlen</tt> <tt class="py-op">=</tt> <tt class="py-name">maxlen</tt> </tt>
<a name="L2380"></a><tt class="py-lineno">2380</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">check</tt> <tt class="py-op">=</tt> <tt class="py-name">check</tt> </tt>
<a name="L2381"></a><tt class="py-lineno">2381</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
<a name="L2382"></a><tt class="py-lineno">2382</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keep_underscores</tt> <tt class="py-op">=</tt> <tt class="py-name">keep_underscores</tt> </tt>
</div><a name="L2383"></a><tt class="py-lineno">2383</tt>  <tt class="py-line"> </tt>
<a name="IS_SLUG.__call__"></a><div id="IS_SLUG.__call__-def"><a name="L2384"></a><tt class="py-lineno">2384</tt> <a class="py-toggle" href="#" id="IS_SLUG.__call__-toggle" onclick="return toggle('IS_SLUG.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_SLUG-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_SLUG.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_SLUG.__call__-expanded"><a name="L2385"></a><tt class="py-lineno">2385</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">check</tt> <tt class="py-keyword">and</tt> <tt class="py-name">value</tt> <tt class="py-op">!=</tt> <tt id="link-317" class="py-name"><a title="web2py.gluon.validators.IS_SLUG.urlify
web2py.gluon.validators.urlify" class="py-name" href="#" onclick="return doclink('link-317', 'urlify', 'link-316');">urlify</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxlen</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keep_underscores</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2386"></a><tt class="py-lineno">2386</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-318" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-318', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2387"></a><tt class="py-lineno">2387</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-319" class="py-name"><a title="web2py.gluon.validators.IS_SLUG.urlify
web2py.gluon.validators.urlify" class="py-name" href="#" onclick="return doclink('link-319', 'urlify', 'link-316');">urlify</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxlen</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">keep_underscores</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2388"></a><tt class="py-lineno">2388</tt>  <tt class="py-line"> </tt>
<a name="IS_EMPTY_OR"></a><div id="IS_EMPTY_OR-def"><a name="L2389"></a><tt class="py-lineno">2389</tt> <a class="py-toggle" href="#" id="IS_EMPTY_OR-toggle" onclick="return toggle('IS_EMPTY_OR');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMPTY_OR-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_EMPTY_OR-expanded"><a name="L2390"></a><tt class="py-lineno">2390</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2391"></a><tt class="py-lineno">2391</tt>  <tt class="py-line"><tt class="py-docstring">    dummy class for testing IS_EMPTY_OR</tt> </tt>
<a name="L2392"></a><tt class="py-lineno">2392</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2393"></a><tt class="py-lineno">2393</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_EMPTY_OR(IS_EMAIL())('abc@def.com')</tt> </tt>
<a name="L2394"></a><tt class="py-lineno">2394</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc@def.com', None)</tt> </tt>
<a name="L2395"></a><tt class="py-lineno">2395</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_EMPTY_OR(IS_EMAIL())('   ')</tt> </tt>
<a name="L2396"></a><tt class="py-lineno">2396</tt>  <tt class="py-line"><tt class="py-docstring">    (None, None)</tt> </tt>
<a name="L2397"></a><tt class="py-lineno">2397</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_EMPTY_OR(IS_EMAIL(), null='abc')('   ')</tt> </tt>
<a name="L2398"></a><tt class="py-lineno">2398</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', None)</tt> </tt>
<a name="L2399"></a><tt class="py-lineno">2399</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_EMPTY_OR(IS_EMAIL(), null='abc', empty_regex='def')('def')</tt> </tt>
<a name="L2400"></a><tt class="py-lineno">2400</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', None)</tt> </tt>
<a name="L2401"></a><tt class="py-lineno">2401</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_EMPTY_OR(IS_EMAIL())('abc')</tt> </tt>
<a name="L2402"></a><tt class="py-lineno">2402</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', 'enter a valid email address')</tt> </tt>
<a name="L2403"></a><tt class="py-lineno">2403</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_EMPTY_OR(IS_EMAIL())(' abc ')</tt> </tt>
<a name="L2404"></a><tt class="py-lineno">2404</tt>  <tt class="py-line"><tt class="py-docstring">    ('abc', 'enter a valid email address')</tt> </tt>
<a name="L2405"></a><tt class="py-lineno">2405</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2406"></a><tt class="py-lineno">2406</tt>  <tt class="py-line"> </tt>
<a name="IS_EMPTY_OR.__init__"></a><div id="IS_EMPTY_OR.__init__-def"><a name="L2407"></a><tt class="py-lineno">2407</tt> <a class="py-toggle" href="#" id="IS_EMPTY_OR.__init__-toggle" onclick="return toggle('IS_EMPTY_OR.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">,</tt> <tt class="py-param">null</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">empty_regex</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMPTY_OR.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMPTY_OR.__init__-expanded"><a name="L2408"></a><tt class="py-lineno">2408</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">null</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-name">null</tt><tt class="py-op">)</tt> </tt>
<a name="L2409"></a><tt class="py-lineno">2409</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">empty_regex</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L2410"></a><tt class="py-lineno">2410</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">empty_regex</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">empty_regex</tt><tt class="py-op">)</tt> </tt>
<a name="L2411"></a><tt class="py-lineno">2411</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2412"></a><tt class="py-lineno">2412</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">empty_regex</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L2413"></a><tt class="py-lineno">2413</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-string">'multiple'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2414"></a><tt class="py-lineno">2414</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt> <tt class="py-op">=</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt> </tt>
<a name="L2415"></a><tt class="py-lineno">2415</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-string">'options'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2416"></a><tt class="py-lineno">2416</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-320" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-320', 'options', 'link-320');">options</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-321" class="py-name" targets="Method web2py.gluon.validators.IS_EMPTY_OR._options()=web2py.gluon.validators.IS_EMPTY_OR-class.html#_options"><a title="web2py.gluon.validators.IS_EMPTY_OR._options" class="py-name" href="#" onclick="return doclink('link-321', '_options', 'link-321');">_options</a></tt> </tt>
</div><a name="L2417"></a><tt class="py-lineno">2417</tt>  <tt class="py-line"> </tt>
<a name="IS_EMPTY_OR._options"></a><div id="IS_EMPTY_OR._options-def"><a name="L2418"></a><tt class="py-lineno">2418</tt> <a class="py-toggle" href="#" id="IS_EMPTY_OR._options-toggle" onclick="return toggle('IS_EMPTY_OR._options');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMPTY_OR-class.html#_options">_options</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMPTY_OR._options-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMPTY_OR._options-expanded"><a name="L2419"></a><tt class="py-lineno">2419</tt>  <tt class="py-line">        <tt id="link-322" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-322', 'options', 'link-320');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">.</tt><tt id="link-323" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-323', 'options', 'link-320');">options</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2420"></a><tt class="py-lineno">2420</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt id="link-324" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-324', 'options', 'link-320');">options</a></tt> <tt class="py-keyword">or</tt> <tt id="link-325" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-325', 'options', 'link-320');">options</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">!=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">multiple</tt><tt class="py-op">:</tt> </tt>
<a name="L2421"></a><tt class="py-lineno">2421</tt>  <tt class="py-line">            <tt id="link-326" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-326', 'options', 'link-320');">options</a></tt><tt class="py-op">.</tt><tt id="link-327" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-327', 'insert', 'link-43');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2422"></a><tt class="py-lineno">2422</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-328" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-328', 'options', 'link-320');">options</a></tt> </tt>
</div><a name="L2423"></a><tt class="py-lineno">2423</tt>  <tt class="py-line"> </tt>
<a name="IS_EMPTY_OR.set_self_id"></a><div id="IS_EMPTY_OR.set_self_id-def"><a name="L2424"></a><tt class="py-lineno">2424</tt> <a class="py-toggle" href="#" id="IS_EMPTY_OR.set_self_id-toggle" onclick="return toggle('IS_EMPTY_OR.set_self_id');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMPTY_OR-class.html#set_self_id">set_self_id</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMPTY_OR.set_self_id-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMPTY_OR.set_self_id-expanded"><a name="L2425"></a><tt class="py-lineno">2425</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2426"></a><tt class="py-lineno">2426</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">:</tt> </tt>
<a name="L2427"></a><tt class="py-lineno">2427</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-string">'set_self_id'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2428"></a><tt class="py-lineno">2428</tt>  <tt class="py-line">                    <tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-329" class="py-name" targets="Method web2py.gluon.validators.IS_EMPTY_OR.set_self_id()=web2py.gluon.validators.IS_EMPTY_OR-class.html#set_self_id,Method web2py.gluon.validators.IS_IN_DB.set_self_id()=web2py.gluon.validators.IS_IN_DB-class.html#set_self_id,Method web2py.gluon.validators.IS_NOT_IN_DB.set_self_id()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#set_self_id"><a title="web2py.gluon.validators.IS_EMPTY_OR.set_self_id
web2py.gluon.validators.IS_IN_DB.set_self_id
web2py.gluon.validators.IS_NOT_IN_DB.set_self_id" class="py-name" href="#" onclick="return doclink('link-329', 'set_self_id', 'link-329');">set_self_id</a></tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
<a name="L2429"></a><tt class="py-lineno">2429</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2430"></a><tt class="py-lineno">2430</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-string">'set_self_id'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2431"></a><tt class="py-lineno">2431</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">.</tt><tt id="link-330" class="py-name"><a title="web2py.gluon.validators.IS_EMPTY_OR.set_self_id
web2py.gluon.validators.IS_IN_DB.set_self_id
web2py.gluon.validators.IS_NOT_IN_DB.set_self_id" class="py-name" href="#" onclick="return doclink('link-330', 'set_self_id', 'link-329');">set_self_id</a></tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2432"></a><tt class="py-lineno">2432</tt>  <tt class="py-line"> </tt>
<a name="IS_EMPTY_OR.__call__"></a><div id="IS_EMPTY_OR.__call__-def"><a name="L2433"></a><tt class="py-lineno">2433</tt> <a class="py-toggle" href="#" id="IS_EMPTY_OR.__call__-toggle" onclick="return toggle('IS_EMPTY_OR.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMPTY_OR-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMPTY_OR.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMPTY_OR.__call__-expanded"><a name="L2434"></a><tt class="py-lineno">2434</tt>  <tt class="py-line">        <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">empty</tt> <tt class="py-op">=</tt> <tt id="link-331" class="py-name"><a title="web2py.gluon.validators.is_empty" class="py-name" href="#" onclick="return doclink('link-331', 'is_empty', 'link-135');">is_empty</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">empty_regex</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">empty_regex</tt><tt class="py-op">)</tt> </tt>
<a name="L2435"></a><tt class="py-lineno">2435</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">empty</tt><tt class="py-op">:</tt> </tt>
<a name="L2436"></a><tt class="py-lineno">2436</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">null</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2437"></a><tt class="py-lineno">2437</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2438"></a><tt class="py-lineno">2438</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">:</tt> </tt>
<a name="L2439"></a><tt class="py-lineno">2439</tt>  <tt class="py-line">                <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-332" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-332', 'error', 'link-332');">error</a></tt> <tt class="py-op">=</tt> <tt class="py-name">item</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2440"></a><tt class="py-lineno">2440</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-333" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-333', 'error', 'link-332');">error</a></tt><tt class="py-op">:</tt> <tt class="py-keyword">break</tt> </tt>
<a name="L2441"></a><tt class="py-lineno">2441</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-334" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-334', 'error', 'link-332');">error</a></tt> </tt>
<a name="L2442"></a><tt class="py-lineno">2442</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2443"></a><tt class="py-lineno">2443</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2444"></a><tt class="py-lineno">2444</tt>  <tt class="py-line"> </tt>
<a name="IS_EMPTY_OR.formatter"></a><div id="IS_EMPTY_OR.formatter-def"><a name="L2445"></a><tt class="py-lineno">2445</tt> <a class="py-toggle" href="#" id="IS_EMPTY_OR.formatter-toggle" onclick="return toggle('IS_EMPTY_OR.formatter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter">formatter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_EMPTY_OR.formatter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_EMPTY_OR.formatter-expanded"><a name="L2446"></a><tt class="py-lineno">2446</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt class="py-string">'formatter'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2447"></a><tt class="py-lineno">2447</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">other</tt><tt class="py-op">.</tt><tt id="link-335" class="py-name" targets="Method web2py.gluon.dal.Field.formatter()=web2py.gluon.dal.Field-class.html#formatter,Method web2py.gluon.validators.IS_DATE.formatter()=web2py.gluon.validators.IS_DATE-class.html#formatter,Method web2py.gluon.validators.IS_DATETIME.formatter()=web2py.gluon.validators.IS_DATETIME-class.html#formatter,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter,Method web2py.gluon.validators.IS_EMPTY_OR.formatter()=web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter,Method web2py.gluon.validators.Validator.formatter()=web2py.gluon.validators.Validator-class.html#formatter"><a title="web2py.gluon.dal.Field.formatter
web2py.gluon.validators.IS_DATE.formatter
web2py.gluon.validators.IS_DATETIME.formatter
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.formatter
web2py.gluon.validators.IS_EMPTY_OR.formatter
web2py.gluon.validators.IS_FLOAT_IN_RANGE.formatter
web2py.gluon.validators.Validator.formatter" class="py-name" href="#" onclick="return doclink('link-335', 'formatter', 'link-335');">formatter</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2448"></a><tt class="py-lineno">2448</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
</div></div><a name="L2449"></a><tt class="py-lineno">2449</tt>  <tt class="py-line"> </tt>
<a name="L2450"></a><tt class="py-lineno">2450</tt>  <tt class="py-line"><tt class="py-name">IS_NULL_OR</tt> <tt class="py-op">=</tt> <tt id="link-336" class="py-name" targets="Class web2py.gluon.validators.IS_EMPTY_OR=web2py.gluon.validators.IS_EMPTY_OR-class.html"><a title="web2py.gluon.validators.IS_EMPTY_OR" class="py-name" href="#" onclick="return doclink('link-336', 'IS_EMPTY_OR', 'link-336');">IS_EMPTY_OR</a></tt>    <tt class="py-comment"># for backward compatibility</tt> </tt>
<a name="L2451"></a><tt class="py-lineno">2451</tt>  <tt class="py-line"> </tt>
<a name="L2452"></a><tt class="py-lineno">2452</tt>  <tt class="py-line"> </tt>
<a name="CLEANUP"></a><div id="CLEANUP-def"><a name="L2453"></a><tt class="py-lineno">2453</tt> <a class="py-toggle" href="#" id="CLEANUP-toggle" onclick="return toggle('CLEANUP');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.CLEANUP-class.html">CLEANUP</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CLEANUP-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CLEANUP-expanded"><a name="L2454"></a><tt class="py-lineno">2454</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2455"></a><tt class="py-lineno">2455</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2456"></a><tt class="py-lineno">2456</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2457"></a><tt class="py-lineno">2457</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=CLEANUP())</tt> </tt>
<a name="L2458"></a><tt class="py-lineno">2458</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2459"></a><tt class="py-lineno">2459</tt>  <tt class="py-line"><tt class="py-docstring">    removes special characters on validation</tt> </tt>
<a name="L2460"></a><tt class="py-lineno">2460</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2461"></a><tt class="py-lineno">2461</tt>  <tt class="py-line"> </tt>
<a name="CLEANUP.__init__"></a><div id="CLEANUP.__init__-def"><a name="L2462"></a><tt class="py-lineno">2462</tt> <a class="py-toggle" href="#" id="CLEANUP.__init__-toggle" onclick="return toggle('CLEANUP.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.CLEANUP-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">regex</tt><tt class="py-op">=</tt><tt class="py-string">'[^\x09\x0a\x0d\x20-\x7e]'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CLEANUP.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CLEANUP.__init__-expanded"><a name="L2463"></a><tt class="py-lineno">2463</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-337" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-337', 'regex', 'link-15');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt id="link-338" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-338', 'regex', 'link-15');">regex</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2464"></a><tt class="py-lineno">2464</tt>  <tt class="py-line"> </tt>
<a name="CLEANUP.__call__"></a><div id="CLEANUP.__call__-def"><a name="L2465"></a><tt class="py-lineno">2465</tt> <a class="py-toggle" href="#" id="CLEANUP.__call__-toggle" onclick="return toggle('CLEANUP.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.CLEANUP-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CLEANUP.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CLEANUP.__call__-expanded"><a name="L2466"></a><tt class="py-lineno">2466</tt>  <tt class="py-line">        <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-339" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-339', 'regex', 'link-15');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-340" class="py-name"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-340', 'strip', 'link-111');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2467"></a><tt class="py-lineno">2467</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2468"></a><tt class="py-lineno">2468</tt>  <tt class="py-line"> </tt>
<a name="L2469"></a><tt class="py-lineno">2469</tt>  <tt class="py-line"> </tt>
<a name="CRYPT"></a><div id="CRYPT-def"><a name="L2470"></a><tt class="py-lineno">2470</tt> <a class="py-toggle" href="#" id="CRYPT-toggle" onclick="return toggle('CRYPT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.CRYPT-class.html">CRYPT</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CRYPT-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CRYPT-expanded"><a name="L2471"></a><tt class="py-lineno">2471</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2472"></a><tt class="py-lineno">2472</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2473"></a><tt class="py-lineno">2473</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2474"></a><tt class="py-lineno">2474</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=CRYPT())</tt> </tt>
<a name="L2475"></a><tt class="py-lineno">2475</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2476"></a><tt class="py-lineno">2476</tt>  <tt class="py-line"><tt class="py-docstring">    encodes the value on validation with a digest.</tt> </tt>
<a name="L2477"></a><tt class="py-lineno">2477</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2478"></a><tt class="py-lineno">2478</tt>  <tt class="py-line"><tt class="py-docstring">    If no arguments are provided CRYPT uses the MD5 algorithm.</tt> </tt>
<a name="L2479"></a><tt class="py-lineno">2479</tt>  <tt class="py-line"><tt class="py-docstring">    If the key argument is provided the HMAC+MD5 algorithm is used.</tt> </tt>
<a name="L2480"></a><tt class="py-lineno">2480</tt>  <tt class="py-line"><tt class="py-docstring">    If the digest_alg is specified this is used to replace the</tt> </tt>
<a name="L2481"></a><tt class="py-lineno">2481</tt>  <tt class="py-line"><tt class="py-docstring">    MD5 with, for example, SHA512. The digest_alg can be</tt> </tt>
<a name="L2482"></a><tt class="py-lineno">2482</tt>  <tt class="py-line"><tt class="py-docstring">    the name of a hashlib algorithm as a string or the algorithm itself.</tt> </tt>
<a name="L2483"></a><tt class="py-lineno">2483</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2484"></a><tt class="py-lineno">2484</tt>  <tt class="py-line"> </tt>
<a name="CRYPT.__init__"></a><div id="CRYPT.__init__-def"><a name="L2485"></a><tt class="py-lineno">2485</tt> <a class="py-toggle" href="#" id="CRYPT.__init__-toggle" onclick="return toggle('CRYPT.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.CRYPT-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">digest_alg</tt><tt class="py-op">=</tt><tt class="py-string">'md5'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CRYPT.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CRYPT.__init__-expanded"><a name="L2486"></a><tt class="py-lineno">2486</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">key</tt> </tt>
<a name="L2487"></a><tt class="py-lineno">2487</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">digest_alg</tt> <tt class="py-op">=</tt> <tt class="py-name">digest_alg</tt> </tt>
</div><a name="L2488"></a><tt class="py-lineno">2488</tt>  <tt class="py-line"> </tt>
<a name="CRYPT.__call__"></a><div id="CRYPT.__call__-def"><a name="L2489"></a><tt class="py-lineno">2489</tt> <a class="py-toggle" href="#" id="CRYPT.__call__-toggle" onclick="return toggle('CRYPT.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.CRYPT-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CRYPT.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CRYPT.__call__-expanded"><a name="L2490"></a><tt class="py-lineno">2490</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">key</tt><tt class="py-op">:</tt> </tt>
<a name="L2491"></a><tt class="py-lineno">2491</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-341" class="py-name"><a title="web2py.gluon.utils.hmac_hash" class="py-name" href="#" onclick="return doclink('link-341', 'hmac_hash', 'link-4');">hmac_hash</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">digest_alg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2492"></a><tt class="py-lineno">2492</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2493"></a><tt class="py-lineno">2493</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-342" class="py-name"><a title="web2py.gluon.utils.simple_hash" class="py-name" href="#" onclick="return doclink('link-342', 'simple_hash', 'link-3');">simple_hash</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">digest_alg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2494"></a><tt class="py-lineno">2494</tt>  <tt class="py-line"> </tt>
<a name="L2495"></a><tt class="py-lineno">2495</tt>  <tt class="py-line"> </tt>
<a name="IS_STRONG"></a><div id="IS_STRONG-def"><a name="L2496"></a><tt class="py-lineno">2496</tt> <a class="py-toggle" href="#" id="IS_STRONG-toggle" onclick="return toggle('IS_STRONG');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_STRONG-class.html">IS_STRONG</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_STRONG-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_STRONG-expanded"><a name="L2497"></a><tt class="py-lineno">2497</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2498"></a><tt class="py-lineno">2498</tt>  <tt class="py-line"><tt class="py-docstring">    example::</tt> </tt>
<a name="L2499"></a><tt class="py-lineno">2499</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2500"></a><tt class="py-lineno">2500</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='password', _name='passwd',</tt> </tt>
<a name="L2501"></a><tt class="py-lineno">2501</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_STRONG(min=10, special=2, upper=2))</tt> </tt>
<a name="L2502"></a><tt class="py-lineno">2502</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2503"></a><tt class="py-lineno">2503</tt>  <tt class="py-line"><tt class="py-docstring">    enforces complexity requirements on a field</tt> </tt>
<a name="L2504"></a><tt class="py-lineno">2504</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2505"></a><tt class="py-lineno">2505</tt>  <tt class="py-line"> </tt>
<a name="IS_STRONG.__init__"></a><div id="IS_STRONG.__init__-def"><a name="L2506"></a><tt class="py-lineno">2506</tt> <a class="py-toggle" href="#" id="IS_STRONG.__init__-toggle" onclick="return toggle('IS_STRONG.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_STRONG-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">min</tt><tt class="py-op">=</tt><tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-param">max</tt><tt class="py-op">=</tt><tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-param">upper</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">lower</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">number</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> </tt>
<a name="L2507"></a><tt class="py-lineno">2507</tt>  <tt class="py-line">                 <tt class="py-param">special</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">specials</tt><tt class="py-op">=</tt><tt class="py-string">r'~!@#$%^&amp;*()_+-=?&lt;&gt;,.:;{}[]|'</tt><tt class="py-op">,</tt> </tt>
<a name="L2508"></a><tt class="py-lineno">2508</tt>  <tt class="py-line">                 <tt class="py-param">invalid</tt><tt class="py-op">=</tt><tt class="py-string">' "'</tt><tt class="py-op">,</tt> <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_STRONG.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_STRONG.__init__-expanded"><a name="L2509"></a><tt class="py-lineno">2509</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-343" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-343', 'min', 'link-25');">min</a></tt> <tt class="py-op">=</tt> <tt id="link-344" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-344', 'min', 'link-25');">min</a></tt> </tt>
<a name="L2510"></a><tt class="py-lineno">2510</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-345" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-345', 'max', 'link-26');">max</a></tt> <tt class="py-op">=</tt> <tt id="link-346" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-346', 'max', 'link-26');">max</a></tt> </tt>
<a name="L2511"></a><tt class="py-lineno">2511</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-347" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-347', 'upper', 'link-11');">upper</a></tt> <tt class="py-op">=</tt> <tt id="link-348" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-348', 'upper', 'link-11');">upper</a></tt> </tt>
<a name="L2512"></a><tt class="py-lineno">2512</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-349" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-349', 'lower', 'link-180');">lower</a></tt> <tt class="py-op">=</tt> <tt id="link-350" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-350', 'lower', 'link-180');">lower</a></tt> </tt>
<a name="L2513"></a><tt class="py-lineno">2513</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">number</tt> <tt class="py-op">=</tt> <tt class="py-name">number</tt> </tt>
<a name="L2514"></a><tt class="py-lineno">2514</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">special</tt> <tt class="py-op">=</tt> <tt class="py-name">special</tt> </tt>
<a name="L2515"></a><tt class="py-lineno">2515</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">specials</tt> <tt class="py-op">=</tt> <tt class="py-name">specials</tt> </tt>
<a name="L2516"></a><tt class="py-lineno">2516</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">invalid</tt> <tt class="py-op">=</tt> <tt class="py-name">invalid</tt> </tt>
<a name="L2517"></a><tt class="py-lineno">2517</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L2518"></a><tt class="py-lineno">2518</tt>  <tt class="py-line"> </tt>
<a name="IS_STRONG.__call__"></a><div id="IS_STRONG.__call__-def"><a name="L2519"></a><tt class="py-lineno">2519</tt> <a class="py-toggle" href="#" id="IS_STRONG.__call__-toggle" onclick="return toggle('IS_STRONG.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_STRONG-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_STRONG.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_STRONG.__call__-expanded"><a name="L2520"></a><tt class="py-lineno">2520</tt>  <tt class="py-line">        <tt class="py-name">failures</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L2521"></a><tt class="py-lineno">2521</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-351" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-351', 'min', 'link-25');">min</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">int</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-352" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-352', 'min', 'link-25');">min</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2522"></a><tt class="py-lineno">2522</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-353" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-353', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-354" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-354', 'min', 'link-25');">min</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2523"></a><tt class="py-lineno">2523</tt>  <tt class="py-line">                <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-355" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-355', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"Minimum length is %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-356" class="py-name"><a title="datetime.date.min
datetime.datetime.min
datetime.time.min
web2py.gluon.dal.Expression.min" class="py-name" href="#" onclick="return doclink('link-356', 'min', 'link-25');">min</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2524"></a><tt class="py-lineno">2524</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-357" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-357', 'max', 'link-26');">max</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">int</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-358" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-358', 'max', 'link-26');">max</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2525"></a><tt class="py-lineno">2525</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-359" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-359', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-360" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-360', 'max', 'link-26');">max</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2526"></a><tt class="py-lineno">2526</tt>  <tt class="py-line">                <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-361" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-361', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"Maximum length is %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-362" class="py-name"><a title="datetime.date.max
datetime.datetime.max
datetime.time.max
web2py.gluon.dal.Expression.max" class="py-name" href="#" onclick="return doclink('link-362', 'max', 'link-26');">max</a></tt><tt class="py-op">)</tt> </tt>
<a name="L2527"></a><tt class="py-lineno">2527</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">special</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">int</tt><tt class="py-op">:</tt> </tt>
<a name="L2528"></a><tt class="py-lineno">2528</tt>  <tt class="py-line">            <tt class="py-name">all_special</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">ch</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt> <tt class="py-keyword">for</tt> <tt class="py-name">ch</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">specials</tt><tt class="py-op">]</tt> </tt>
<a name="L2529"></a><tt class="py-lineno">2529</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">special</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2530"></a><tt class="py-lineno">2530</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">all_special</tt><tt class="py-op">.</tt><tt id="link-363" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.count
web2py.gluon.dal.CouchDBAdapter.count
web2py.gluon.dal.Field.count
web2py.gluon.dal.GoogleDatastoreAdapter.count
web2py.gluon.dal.MongoDBAdapter.count
web2py.gluon.dal.Set.count" class="py-name" href="#" onclick="return doclink('link-363', 'count', 'link-106');">count</a></tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">special</tt><tt class="py-op">:</tt> </tt>
<a name="L2531"></a><tt class="py-lineno">2531</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-364" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-364', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"Must include at least %s of the following : %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">special</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">specials</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2532"></a><tt class="py-lineno">2532</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">invalid</tt><tt class="py-op">:</tt> </tt>
<a name="L2533"></a><tt class="py-lineno">2533</tt>  <tt class="py-line">            <tt class="py-name">all_invalid</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">ch</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt> <tt class="py-keyword">for</tt> <tt class="py-name">ch</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">invalid</tt><tt class="py-op">]</tt> </tt>
<a name="L2534"></a><tt class="py-lineno">2534</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">all_invalid</tt><tt class="py-op">.</tt><tt id="link-365" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.count
web2py.gluon.dal.CouchDBAdapter.count
web2py.gluon.dal.Field.count
web2py.gluon.dal.GoogleDatastoreAdapter.count
web2py.gluon.dal.MongoDBAdapter.count
web2py.gluon.dal.Set.count" class="py-name" href="#" onclick="return doclink('link-365', 'count', 'link-106');">count</a></tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2535"></a><tt class="py-lineno">2535</tt>  <tt class="py-line">                <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-366" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-366', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"May not contain any of the following: %s"</tt> \ </tt>
<a name="L2536"></a><tt class="py-lineno">2536</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">invalid</tt><tt class="py-op">)</tt> </tt>
<a name="L2537"></a><tt class="py-lineno">2537</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-367" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-367', 'upper', 'link-11');">upper</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">int</tt><tt class="py-op">:</tt> </tt>
<a name="L2538"></a><tt class="py-lineno">2538</tt>  <tt class="py-line">            <tt class="py-name">all_upper</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-string">"[A-Z]"</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2539"></a><tt class="py-lineno">2539</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-368" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-368', 'upper', 'link-11');">upper</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2540"></a><tt class="py-lineno">2540</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-369" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-369', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">all_upper</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-370" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-370', 'upper', 'link-11');">upper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2541"></a><tt class="py-lineno">2541</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-371" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-371', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"Must include at least %s upper case"</tt> \ </tt>
<a name="L2542"></a><tt class="py-lineno">2542</tt>  <tt class="py-line">                        <tt class="py-op">%</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-372" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-372', 'upper', 'link-11');">upper</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2543"></a><tt class="py-lineno">2543</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2544"></a><tt class="py-lineno">2544</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-373" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-373', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">all_upper</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2545"></a><tt class="py-lineno">2545</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-374" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-374', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"May not include any upper case letters"</tt><tt class="py-op">)</tt> </tt>
<a name="L2546"></a><tt class="py-lineno">2546</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-375" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-375', 'lower', 'link-180');">lower</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">int</tt><tt class="py-op">:</tt> </tt>
<a name="L2547"></a><tt class="py-lineno">2547</tt>  <tt class="py-line">            <tt class="py-name">all_lower</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-string">"[a-z]"</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2548"></a><tt class="py-lineno">2548</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-376" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-376', 'lower', 'link-180');">lower</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2549"></a><tt class="py-lineno">2549</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-377" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-377', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">all_lower</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-378" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-378', 'lower', 'link-180');">lower</a></tt><tt class="py-op">:</tt> </tt>
<a name="L2550"></a><tt class="py-lineno">2550</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-379" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-379', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"Must include at least %s lower case"</tt> \ </tt>
<a name="L2551"></a><tt class="py-lineno">2551</tt>  <tt class="py-line">                        <tt class="py-op">%</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-380" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-380', 'lower', 'link-180');">lower</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2552"></a><tt class="py-lineno">2552</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2553"></a><tt class="py-lineno">2553</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-381" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-381', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">all_lower</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2554"></a><tt class="py-lineno">2554</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-382" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-382', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"May not include any lower case letters"</tt><tt class="py-op">)</tt> </tt>
<a name="L2555"></a><tt class="py-lineno">2555</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">number</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">int</tt><tt class="py-op">:</tt> </tt>
<a name="L2556"></a><tt class="py-lineno">2556</tt>  <tt class="py-line">            <tt class="py-name">all_number</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-string">"[0-9]"</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2557"></a><tt class="py-lineno">2557</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">number</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2558"></a><tt class="py-lineno">2558</tt>  <tt class="py-line">                <tt id="link-383" class="py-name" targets="Variable web2py.gluon.validators.IS_IPV4.numbers=web2py.gluon.validators.IS_IPV4-class.html#numbers"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-383', 'numbers', 'link-383');">numbers</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"number"</tt> </tt>
<a name="L2559"></a><tt class="py-lineno">2559</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">number</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L2560"></a><tt class="py-lineno">2560</tt>  <tt class="py-line">                    <tt id="link-384" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-384', 'numbers', 'link-383');">numbers</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"numbers"</tt> </tt>
<a name="L2561"></a><tt class="py-lineno">2561</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-385" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-385', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">all_number</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">number</tt><tt class="py-op">:</tt> </tt>
<a name="L2562"></a><tt class="py-lineno">2562</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-386" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-386', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"Must include at least %s %s"</tt> \ </tt>
<a name="L2563"></a><tt class="py-lineno">2563</tt>  <tt class="py-line">                        <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">number</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-387" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-387', 'numbers', 'link-383');">numbers</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2564"></a><tt class="py-lineno">2564</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2565"></a><tt class="py-lineno">2565</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-388" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-388', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">all_number</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2566"></a><tt class="py-lineno">2566</tt>  <tt class="py-line">                    <tt class="py-name">failures</tt><tt class="py-op">.</tt><tt id="link-389" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-389', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"May not include any numbers"</tt><tt class="py-op">)</tt> </tt>
<a name="L2567"></a><tt class="py-lineno">2567</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-390" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-390', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">failures</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2568"></a><tt class="py-lineno">2568</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2569"></a><tt class="py-lineno">2569</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-391" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-391', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2570"></a><tt class="py-lineno">2570</tt>  <tt class="py-line">            <tt class="py-keyword">from</tt> <tt id="link-392" class="py-name" targets="Module web2py.gluon.html=web2py.gluon.html-module.html"><a title="web2py.gluon.html" class="py-name" href="#" onclick="return doclink('link-392', 'html', 'link-392');">html</a></tt> <tt class="py-keyword">import</tt> <tt id="link-393" class="py-name" targets="Class web2py.gluon.html.XML=web2py.gluon.html.XML-class.html"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-393', 'XML', 'link-393');">XML</a></tt> </tt>
<a name="L2571"></a><tt class="py-lineno">2571</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-394" class="py-name"><a title="web2py.gluon.html.XML" class="py-name" href="#" onclick="return doclink('link-394', 'XML', 'link-393');">XML</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;br /&gt;'</tt><tt class="py-op">.</tt><tt id="link-395" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-395', 'join', 'link-395');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">failures</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2572"></a><tt class="py-lineno">2572</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2573"></a><tt class="py-lineno">2573</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-396" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-396', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2574"></a><tt class="py-lineno">2574</tt>  <tt class="py-line"> </tt>
<a name="L2575"></a><tt class="py-lineno">2575</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SUBSET"></a><div id="IS_IN_SUBSET-def"><a name="L2576"></a><tt class="py-lineno">2576</tt> <a class="py-toggle" href="#" id="IS_IN_SUBSET-toggle" onclick="return toggle('IS_IN_SUBSET');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SUBSET-class.html">IS_IN_SUBSET</a><tt class="py-op">(</tt><tt class="py-base-class">IS_IN_SET</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SUBSET-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_IN_SUBSET-expanded"><a name="L2577"></a><tt class="py-lineno">2577</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SUBSET.__init__"></a><div id="IS_IN_SUBSET.__init__-def"><a name="L2578"></a><tt class="py-lineno">2578</tt> <a class="py-toggle" href="#" id="IS_IN_SUBSET.__init__-toggle" onclick="return toggle('IS_IN_SUBSET.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">b</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SUBSET.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_SUBSET.__init__-expanded"><a name="L2579"></a><tt class="py-lineno">2579</tt>  <tt class="py-line">        <tt id="link-397" class="py-name" targets="Class web2py.gluon.validators.IS_IN_SET=web2py.gluon.validators.IS_IN_SET-class.html"><a title="web2py.gluon.validators.IS_IN_SET" class="py-name" href="#" onclick="return doclink('link-397', 'IS_IN_SET', 'link-397');">IS_IN_SET</a></tt><tt class="py-op">.</tt><tt id="link-398" class="py-name"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-398', '__init__', 'link-138');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt id="link-399" class="py-name"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-399', 'b', 'link-72');">b</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L2580"></a><tt class="py-lineno">2580</tt>  <tt class="py-line"> </tt>
<a name="IS_IN_SUBSET.__call__"></a><div id="IS_IN_SUBSET.__call__-def"><a name="L2581"></a><tt class="py-lineno">2581</tt> <a class="py-toggle" href="#" id="IS_IN_SUBSET.__call__-toggle" onclick="return toggle('IS_IN_SUBSET.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IN_SUBSET-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IN_SUBSET.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IN_SUBSET.__call__-expanded"><a name="L2582"></a><tt class="py-lineno">2582</tt>  <tt class="py-line">        <tt id="link-400" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-400', 'values', 'link-27');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">"\w+"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">findall</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2583"></a><tt class="py-lineno">2583</tt>  <tt class="py-line">        <tt class="py-name">failures</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-401" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-401', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">for</tt> <tt id="link-402" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-402', 'x', 'link-10');">x</a></tt> <tt class="py-keyword">in</tt> <tt id="link-403" class="py-name"><a title="web2py.gluon.rocket.Headers.values" class="py-name" href="#" onclick="return doclink('link-403', 'values', 'link-27');">values</a></tt> <tt class="py-keyword">if</tt> <tt id="link-404" class="py-name"><a title="web2py.gluon.validators.IS_IN_SET" class="py-name" href="#" onclick="return doclink('link-404', 'IS_IN_SET', 'link-397');">IS_IN_SET</a></tt><tt class="py-op">.</tt><tt id="link-405" class="py-name"><a title="web2py.gluon.cache.Cache.__call__
web2py.gluon.cache.CacheAbstract.__call__
web2py.gluon.cache.CacheInRam.__call__
web2py.gluon.cache.CacheOnDisk.__call__
web2py.gluon.compileapp.LoadFactory.__call__
web2py.gluon.custom_import._BaseImporter.__call__
web2py.gluon.custom_import._DateTrackerImporter.__call__
web2py.gluon.custom_import._Web2pyImporter.__call__
web2py.gluon.dal.DAL.__call__
web2py.gluon.dal.Row.__call__
web2py.gluon.dal.SQLCallableList.__call__
web2py.gluon.dal.Set.__call__
web2py.gluon.dal.Table.__call__
web2py.gluon.html.__TAG__.__call__
web2py.gluon.languages.translator.__call__
web2py.gluon.sqlhtml.AutocompleteWidget.__call__
web2py.gluon.storage.List.__call__
web2py.gluon.tools.Auth.__call__
web2py.gluon.tools.Crud.__call__
web2py.gluon.tools.Service.__call__
web2py.gluon.validators.CLEANUP.__call__
web2py.gluon.validators.CRYPT.__call__
web2py.gluon.validators.IS_DATE.__call__
web2py.gluon.validators.IS_DATETIME.__call__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__call__
web2py.gluon.validators.IS_DATE_IN_RANGE.__call__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__call__
web2py.gluon.validators.IS_EMAIL.__call__
web2py.gluon.validators.IS_EMPTY_OR.__call__
web2py.gluon.validators.IS_EQUAL_TO.__call__
web2py.gluon.validators.IS_EXPR.__call__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__call__
web2py.gluon.validators.IS_GENERIC_URL.__call__
web2py.gluon.validators.IS_HTTP_URL.__call__
web2py.gluon.validators.IS_IMAGE.__call__
web2py.gluon.validators.IS_INT_IN_RANGE.__call__
web2py.gluon.validators.IS_IN_DB.__call__
web2py.gluon.validators.IS_IN_SET.__call__
web2py.gluon.validators.IS_IN_SUBSET.__call__
web2py.gluon.validators.IS_IPV4.__call__
web2py.gluon.validators.IS_LENGTH.__call__
web2py.gluon.validators.IS_LIST_OF.__call__
web2py.gluon.validators.IS_LOWER.__call__
web2py.gluon.validators.IS_MATCH.__call__
web2py.gluon.validators.IS_NOT_EMPTY.__call__
web2py.gluon.validators.IS_NOT_IN_DB.__call__
web2py.gluon.validators.IS_SLUG.__call__
web2py.gluon.validators.IS_STRONG.__call__
web2py.gluon.validators.IS_TIME.__call__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__call__
web2py.gluon.validators.IS_UPPER.__call__
web2py.gluon.validators.IS_URL.__call__" class="py-name" href="#" onclick="return doclink('link-405', '__call__', 'link-182');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-406" class="py-name"><a title="sqlite3.dbapi2.x" class="py-name" href="#" onclick="return doclink('link-406', 'x', 'link-10');">x</a></tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
<a name="L2584"></a><tt class="py-lineno">2584</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">failures</tt><tt class="py-op">:</tt> </tt>
<a name="L2585"></a><tt class="py-lineno">2585</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-407" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-407', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2586"></a><tt class="py-lineno">2586</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2587"></a><tt class="py-lineno">2587</tt>  <tt class="py-line"> </tt>
<a name="L2588"></a><tt class="py-lineno">2588</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE"></a><div id="IS_IMAGE-def"><a name="L2589"></a><tt class="py-lineno">2589</tt> <a class="py-toggle" href="#" id="IS_IMAGE-toggle" onclick="return toggle('IS_IMAGE');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_IMAGE-expanded"><a name="L2590"></a><tt class="py-lineno">2590</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2591"></a><tt class="py-lineno">2591</tt>  <tt class="py-line"><tt class="py-docstring">    Checks if file uploaded through file input was saved in one of selected</tt> </tt>
<a name="L2592"></a><tt class="py-lineno">2592</tt>  <tt class="py-line"><tt class="py-docstring">    image formats and has dimensions (width and height) within given boundaries.</tt> </tt>
<a name="L2593"></a><tt class="py-lineno">2593</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2594"></a><tt class="py-lineno">2594</tt>  <tt class="py-line"><tt class="py-docstring">    Does *not* check for maximum file size (use IS_LENGTH for that). Returns</tt> </tt>
<a name="L2595"></a><tt class="py-lineno">2595</tt>  <tt class="py-line"><tt class="py-docstring">    validation failure if no data was uploaded.</tt> </tt>
<a name="L2596"></a><tt class="py-lineno">2596</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2597"></a><tt class="py-lineno">2597</tt>  <tt class="py-line"><tt class="py-docstring">    Supported file formats: BMP, GIF, JPEG, PNG.</tt> </tt>
<a name="L2598"></a><tt class="py-lineno">2598</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2599"></a><tt class="py-lineno">2599</tt>  <tt class="py-line"><tt class="py-docstring">    Code parts taken from</tt> </tt>
<a name="L2600"></a><tt class="py-lineno">2600</tt>  <tt class="py-line"><tt class="py-docstring">    http://mail.python.org/pipermail/python-list/2007-June/617126.html</tt> </tt>
<a name="L2601"></a><tt class="py-lineno">2601</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2602"></a><tt class="py-lineno">2602</tt>  <tt class="py-line"><tt class="py-docstring">    Arguments:</tt> </tt>
<a name="L2603"></a><tt class="py-lineno">2603</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2604"></a><tt class="py-lineno">2604</tt>  <tt class="py-line"><tt class="py-docstring">    extensions: iterable containing allowed *lowercase* image file extensions</tt> </tt>
<a name="L2605"></a><tt class="py-lineno">2605</tt>  <tt class="py-line"><tt class="py-docstring">    ('jpg' extension of uploaded file counts as 'jpeg')</tt> </tt>
<a name="L2606"></a><tt class="py-lineno">2606</tt>  <tt class="py-line"><tt class="py-docstring">    maxsize: iterable containing maximum width and height of the image</tt> </tt>
<a name="L2607"></a><tt class="py-lineno">2607</tt>  <tt class="py-line"><tt class="py-docstring">    minsize: iterable containing minimum width and height of the image</tt> </tt>
<a name="L2608"></a><tt class="py-lineno">2608</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2609"></a><tt class="py-lineno">2609</tt>  <tt class="py-line"><tt class="py-docstring">    Use (-1, -1) as minsize to pass image size check.</tt> </tt>
<a name="L2610"></a><tt class="py-lineno">2610</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2611"></a><tt class="py-lineno">2611</tt>  <tt class="py-line"><tt class="py-docstring">    Examples::</tt> </tt>
<a name="L2612"></a><tt class="py-lineno">2612</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2613"></a><tt class="py-lineno">2613</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if uploaded file is in any of supported image formats:</tt> </tt>
<a name="L2614"></a><tt class="py-lineno">2614</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name', requires=IS_IMAGE())</tt> </tt>
<a name="L2615"></a><tt class="py-lineno">2615</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2616"></a><tt class="py-lineno">2616</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if uploaded file is either JPEG or PNG:</tt> </tt>
<a name="L2617"></a><tt class="py-lineno">2617</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name',</tt> </tt>
<a name="L2618"></a><tt class="py-lineno">2618</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_IMAGE(extensions=('jpeg', 'png')))</tt> </tt>
<a name="L2619"></a><tt class="py-lineno">2619</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2620"></a><tt class="py-lineno">2620</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if uploaded file is PNG with maximum size of 200x200 pixels:</tt> </tt>
<a name="L2621"></a><tt class="py-lineno">2621</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name',</tt> </tt>
<a name="L2622"></a><tt class="py-lineno">2622</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_IMAGE(extensions=('png'), maxsize=(200, 200)))</tt> </tt>
<a name="L2623"></a><tt class="py-lineno">2623</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2624"></a><tt class="py-lineno">2624</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE.__init__"></a><div id="IS_IMAGE.__init__-def"><a name="L2625"></a><tt class="py-lineno">2625</tt> <a class="py-toggle" href="#" id="IS_IMAGE.__init__-toggle" onclick="return toggle('IS_IMAGE.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2626"></a><tt class="py-lineno">2626</tt>  <tt class="py-line">                 <tt class="py-param">extensions</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'bmp'</tt><tt class="py-op">,</tt> <tt class="py-string">'gif'</tt><tt class="py-op">,</tt> <tt class="py-string">'jpeg'</tt><tt class="py-op">,</tt> <tt class="py-string">'png'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2627"></a><tt class="py-lineno">2627</tt>  <tt class="py-line">                 <tt class="py-param">maxsize</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-number">10000</tt><tt class="py-op">,</tt> <tt class="py-number">10000</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2628"></a><tt class="py-lineno">2628</tt>  <tt class="py-line">                 <tt class="py-param">minsize</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L2629"></a><tt class="py-lineno">2629</tt>  <tt class="py-line">                 <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'invalid image'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IMAGE.__init__-expanded"><a name="L2630"></a><tt class="py-lineno">2630</tt>  <tt class="py-line"> </tt>
<a name="L2631"></a><tt class="py-lineno">2631</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extensions</tt> <tt class="py-op">=</tt> <tt class="py-name">extensions</tt> </tt>
<a name="L2632"></a><tt class="py-lineno">2632</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt> <tt class="py-op">=</tt> <tt class="py-name">maxsize</tt> </tt>
<a name="L2633"></a><tt class="py-lineno">2633</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt> <tt class="py-op">=</tt> <tt class="py-name">minsize</tt> </tt>
<a name="L2634"></a><tt class="py-lineno">2634</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L2635"></a><tt class="py-lineno">2635</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE.__call__"></a><div id="IS_IMAGE.__call__-def"><a name="L2636"></a><tt class="py-lineno">2636</tt> <a class="py-toggle" href="#" id="IS_IMAGE.__call__-toggle" onclick="return toggle('IS_IMAGE.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IMAGE.__call__-expanded"><a name="L2637"></a><tt class="py-lineno">2637</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2638"></a><tt class="py-lineno">2638</tt>  <tt class="py-line">            <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">.</tt><tt class="py-name">rfind</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L2639"></a><tt class="py-lineno">2639</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">extension</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0</tt> </tt>
<a name="L2640"></a><tt class="py-lineno">2640</tt>  <tt class="py-line">            <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">[</tt><tt class="py-name">extension</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-408" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-408', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2641"></a><tt class="py-lineno">2641</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'jpg'</tt><tt class="py-op">:</tt> </tt>
<a name="L2642"></a><tt class="py-lineno">2642</tt>  <tt class="py-line">                <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-string">'jpeg'</tt> </tt>
<a name="L2643"></a><tt class="py-lineno">2643</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">extension</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extensions</tt> </tt>
<a name="L2644"></a><tt class="py-lineno">2644</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'bmp'</tt><tt class="py-op">:</tt> </tt>
<a name="L2645"></a><tt class="py-lineno">2645</tt>  <tt class="py-line">                <tt class="py-name">width</tt><tt class="py-op">,</tt> <tt class="py-name">height</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-409" class="py-name" targets="Method web2py.gluon.validators.IS_IMAGE.__bmp()=web2py.gluon.validators.IS_IMAGE-class.html#__bmp"><a title="web2py.gluon.validators.IS_IMAGE.__bmp" class="py-name" href="#" onclick="return doclink('link-409', '__bmp', 'link-409');">__bmp</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L2646"></a><tt class="py-lineno">2646</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'gif'</tt><tt class="py-op">:</tt> </tt>
<a name="L2647"></a><tt class="py-lineno">2647</tt>  <tt class="py-line">                <tt class="py-name">width</tt><tt class="py-op">,</tt> <tt class="py-name">height</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-410" class="py-name" targets="Method web2py.gluon.validators.IS_IMAGE.__gif()=web2py.gluon.validators.IS_IMAGE-class.html#__gif"><a title="web2py.gluon.validators.IS_IMAGE.__gif" class="py-name" href="#" onclick="return doclink('link-410', '__gif', 'link-410');">__gif</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L2648"></a><tt class="py-lineno">2648</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'jpeg'</tt><tt class="py-op">:</tt> </tt>
<a name="L2649"></a><tt class="py-lineno">2649</tt>  <tt class="py-line">                <tt class="py-name">width</tt><tt class="py-op">,</tt> <tt class="py-name">height</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-411" class="py-name" targets="Method web2py.gluon.validators.IS_IMAGE.__jpeg()=web2py.gluon.validators.IS_IMAGE-class.html#__jpeg"><a title="web2py.gluon.validators.IS_IMAGE.__jpeg" class="py-name" href="#" onclick="return doclink('link-411', '__jpeg', 'link-411');">__jpeg</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L2650"></a><tt class="py-lineno">2650</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">extension</tt> <tt class="py-op">==</tt> <tt class="py-string">'png'</tt><tt class="py-op">:</tt> </tt>
<a name="L2651"></a><tt class="py-lineno">2651</tt>  <tt class="py-line">                <tt class="py-name">width</tt><tt class="py-op">,</tt> <tt class="py-name">height</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-412" class="py-name" targets="Method web2py.gluon.validators.IS_IMAGE.__png()=web2py.gluon.validators.IS_IMAGE-class.html#__png"><a title="web2py.gluon.validators.IS_IMAGE.__png" class="py-name" href="#" onclick="return doclink('link-412', '__png', 'link-412');">__png</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">)</tt> </tt>
<a name="L2652"></a><tt class="py-lineno">2652</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2653"></a><tt class="py-lineno">2653</tt>  <tt class="py-line">                <tt class="py-name">width</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="L2654"></a><tt class="py-lineno">2654</tt>  <tt class="py-line">                <tt class="py-name">height</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="L2655"></a><tt class="py-lineno">2655</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">width</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> \ </tt>
<a name="L2656"></a><tt class="py-lineno">2656</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minsize</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">height</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxsize</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L2657"></a><tt class="py-lineno">2657</tt>  <tt class="py-line">            <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">file</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L2658"></a><tt class="py-lineno">2658</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2659"></a><tt class="py-lineno">2659</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2660"></a><tt class="py-lineno">2660</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-413" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-413', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2661"></a><tt class="py-lineno">2661</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE.__bmp"></a><div id="IS_IMAGE.__bmp-def"><a name="L2662"></a><tt class="py-lineno">2662</tt> <a class="py-toggle" href="#" id="IS_IMAGE.__bmp-toggle" onclick="return toggle('IS_IMAGE.__bmp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html#__bmp">__bmp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE.__bmp-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IMAGE.__bmp-expanded"><a name="L2663"></a><tt class="py-lineno">2663</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-414" class="py-name" targets="Method web2py.gluon.globals.Response.stream()=web2py.gluon.globals.Response-class.html#stream"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-414', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-415" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-415', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'BM'</tt><tt class="py-op">:</tt> </tt>
<a name="L2664"></a><tt class="py-lineno">2664</tt>  <tt class="py-line">            <tt id="link-416" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-416', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-417" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-417', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">16</tt><tt class="py-op">)</tt> </tt>
<a name="L2665"></a><tt class="py-lineno">2665</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"&lt;LL"</tt><tt class="py-op">,</tt> <tt id="link-418" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-418', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-419" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-419', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2666"></a><tt class="py-lineno">2666</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2667"></a><tt class="py-lineno">2667</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE.__gif"></a><div id="IS_IMAGE.__gif-def"><a name="L2668"></a><tt class="py-lineno">2668</tt> <a class="py-toggle" href="#" id="IS_IMAGE.__gif-toggle" onclick="return toggle('IS_IMAGE.__gif');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html#__gif">__gif</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE.__gif-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IMAGE.__gif-expanded"><a name="L2669"></a><tt class="py-lineno">2669</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-420" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-420', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-421" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-421', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">6</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'GIF87a'</tt><tt class="py-op">,</tt> <tt class="py-string">'GIF89a'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2670"></a><tt class="py-lineno">2670</tt>  <tt class="py-line">            <tt id="link-422" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-422', 'stream', 'link-414');">stream</a></tt> <tt class="py-op">=</tt> <tt id="link-423" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-423', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-424" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-424', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
<a name="L2671"></a><tt class="py-lineno">2671</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-425" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-425', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt id="link-426" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-426', 'stream', 'link-414');">stream</a></tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">5</tt><tt class="py-op">:</tt> </tt>
<a name="L2672"></a><tt class="py-lineno">2672</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"&lt;HHB"</tt><tt class="py-op">,</tt> <tt id="link-427" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-427', 'stream', 'link-414');">stream</a></tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L2673"></a><tt class="py-lineno">2673</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2674"></a><tt class="py-lineno">2674</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE.__jpeg"></a><div id="IS_IMAGE.__jpeg-def"><a name="L2675"></a><tt class="py-lineno">2675</tt> <a class="py-toggle" href="#" id="IS_IMAGE.__jpeg-toggle" onclick="return toggle('IS_IMAGE.__jpeg');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html#__jpeg">__jpeg</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE.__jpeg-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IMAGE.__jpeg-expanded"><a name="L2676"></a><tt class="py-lineno">2676</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-428" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-428', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-429" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-429', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'\xFF\xD8'</tt><tt class="py-op">:</tt> </tt>
<a name="L2677"></a><tt class="py-lineno">2677</tt>  <tt class="py-line">            <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L2678"></a><tt class="py-lineno">2678</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">marker</tt><tt class="py-op">,</tt> <tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"!BBH"</tt><tt class="py-op">,</tt> <tt id="link-430" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-430', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-431" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-431', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2679"></a><tt class="py-lineno">2679</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt> <tt class="py-op">!=</tt> <tt class="py-number">0xFF</tt><tt class="py-op">:</tt> </tt>
<a name="L2680"></a><tt class="py-lineno">2680</tt>  <tt class="py-line">                    <tt class="py-keyword">break</tt> </tt>
<a name="L2681"></a><tt class="py-lineno">2681</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">code</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0xC0</tt> <tt class="py-keyword">and</tt> <tt class="py-name">code</tt> <tt class="py-op">&lt;=</tt> <tt class="py-number">0xC3</tt><tt class="py-op">:</tt> </tt>
<a name="L2682"></a><tt class="py-lineno">2682</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">reversed</tt><tt class="py-op">(</tt> </tt>
<a name="L2683"></a><tt class="py-lineno">2683</tt>  <tt class="py-line">                        <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"!xHH"</tt><tt class="py-op">,</tt> <tt id="link-432" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-432', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-433" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-433', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2684"></a><tt class="py-lineno">2684</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2685"></a><tt class="py-lineno">2685</tt>  <tt class="py-line">                    <tt id="link-434" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-434', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-435" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-435', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">length</tt> <tt class="py-op">-</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L2686"></a><tt class="py-lineno">2686</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2687"></a><tt class="py-lineno">2687</tt>  <tt class="py-line"> </tt>
<a name="IS_IMAGE.__png"></a><div id="IS_IMAGE.__png-def"><a name="L2688"></a><tt class="py-lineno">2688</tt> <a class="py-toggle" href="#" id="IS_IMAGE.__png-toggle" onclick="return toggle('IS_IMAGE.__png');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IMAGE-class.html#__png">__png</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IMAGE.__png-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IMAGE.__png-expanded"><a name="L2689"></a><tt class="py-lineno">2689</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-436" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-436', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-437" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-437', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'\211PNG\r\n\032\n'</tt><tt class="py-op">:</tt> </tt>
<a name="L2690"></a><tt class="py-lineno">2690</tt>  <tt class="py-line">            <tt id="link-438" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-438', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-439" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-439', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
<a name="L2691"></a><tt class="py-lineno">2691</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-440" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-440', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-441" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-441', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"IHDR"</tt><tt class="py-op">:</tt> </tt>
<a name="L2692"></a><tt class="py-lineno">2692</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"!LL"</tt><tt class="py-op">,</tt> <tt id="link-442" class="py-name"><a title="web2py.gluon.globals.Response.stream" class="py-name" href="#" onclick="return doclink('link-442', 'stream', 'link-414');">stream</a></tt><tt class="py-op">.</tt><tt id="link-443" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-443', 'read', 'link-415');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2693"></a><tt class="py-lineno">2693</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2694"></a><tt class="py-lineno">2694</tt>  <tt class="py-line"> </tt>
<a name="L2695"></a><tt class="py-lineno">2695</tt>  <tt class="py-line"> </tt>
<a name="IS_UPLOAD_FILENAME"></a><div id="IS_UPLOAD_FILENAME-def"><a name="L2696"></a><tt class="py-lineno">2696</tt> <a class="py-toggle" href="#" id="IS_UPLOAD_FILENAME-toggle" onclick="return toggle('IS_UPLOAD_FILENAME');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html">IS_UPLOAD_FILENAME</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_UPLOAD_FILENAME-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_UPLOAD_FILENAME-expanded"><a name="L2697"></a><tt class="py-lineno">2697</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2698"></a><tt class="py-lineno">2698</tt>  <tt class="py-line"><tt class="py-docstring">    Checks if name and extension of file uploaded through file input matches</tt> </tt>
<a name="L2699"></a><tt class="py-lineno">2699</tt>  <tt class="py-line"><tt class="py-docstring">    given criteria.</tt> </tt>
<a name="L2700"></a><tt class="py-lineno">2700</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2701"></a><tt class="py-lineno">2701</tt>  <tt class="py-line"><tt class="py-docstring">    Does *not* ensure the file type in any way. Returns validation failure</tt> </tt>
<a name="L2702"></a><tt class="py-lineno">2702</tt>  <tt class="py-line"><tt class="py-docstring">    if no data was uploaded.</tt> </tt>
<a name="L2703"></a><tt class="py-lineno">2703</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2704"></a><tt class="py-lineno">2704</tt>  <tt class="py-line"><tt class="py-docstring">    Arguments::</tt> </tt>
<a name="L2705"></a><tt class="py-lineno">2705</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2706"></a><tt class="py-lineno">2706</tt>  <tt class="py-line"><tt class="py-docstring">    filename: filename (before dot) regex</tt> </tt>
<a name="L2707"></a><tt class="py-lineno">2707</tt>  <tt class="py-line"><tt class="py-docstring">    extension: extension (after dot) regex</tt> </tt>
<a name="L2708"></a><tt class="py-lineno">2708</tt>  <tt class="py-line"><tt class="py-docstring">    lastdot: which dot should be used as a filename / extension separator:</tt> </tt>
<a name="L2709"></a><tt class="py-lineno">2709</tt>  <tt class="py-line"><tt class="py-docstring">             True means last dot, eg. file.png -&gt; file / png</tt> </tt>
<a name="L2710"></a><tt class="py-lineno">2710</tt>  <tt class="py-line"><tt class="py-docstring">             False means first dot, eg. file.tar.gz -&gt; file / tar.gz</tt> </tt>
<a name="L2711"></a><tt class="py-lineno">2711</tt>  <tt class="py-line"><tt class="py-docstring">    case: 0 - keep the case, 1 - transform the string into lowercase (default),</tt> </tt>
<a name="L2712"></a><tt class="py-lineno">2712</tt>  <tt class="py-line"><tt class="py-docstring">          2 - transform the string into uppercase</tt> </tt>
<a name="L2713"></a><tt class="py-lineno">2713</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2714"></a><tt class="py-lineno">2714</tt>  <tt class="py-line"><tt class="py-docstring">    If there is no dot present, extension checks will be done against empty</tt> </tt>
<a name="L2715"></a><tt class="py-lineno">2715</tt>  <tt class="py-line"><tt class="py-docstring">    string and filename checks against whole value.</tt> </tt>
<a name="L2716"></a><tt class="py-lineno">2716</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2717"></a><tt class="py-lineno">2717</tt>  <tt class="py-line"><tt class="py-docstring">    Examples::</tt> </tt>
<a name="L2718"></a><tt class="py-lineno">2718</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2719"></a><tt class="py-lineno">2719</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if file has a pdf extension (case insensitive):</tt> </tt>
<a name="L2720"></a><tt class="py-lineno">2720</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name',</tt> </tt>
<a name="L2721"></a><tt class="py-lineno">2721</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_UPLOAD_FILENAME(extension='pdf'))</tt> </tt>
<a name="L2722"></a><tt class="py-lineno">2722</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2723"></a><tt class="py-lineno">2723</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if file has a tar.gz extension and name starting with backup:</tt> </tt>
<a name="L2724"></a><tt class="py-lineno">2724</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name',</tt> </tt>
<a name="L2725"></a><tt class="py-lineno">2725</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_UPLOAD_FILENAME(filename='backup.*',</tt> </tt>
<a name="L2726"></a><tt class="py-lineno">2726</tt>  <tt class="py-line"><tt class="py-docstring">                extension='tar.gz', lastdot=False))</tt> </tt>
<a name="L2727"></a><tt class="py-lineno">2727</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2728"></a><tt class="py-lineno">2728</tt>  <tt class="py-line"><tt class="py-docstring">        #Check if file has no extension and name matching README</tt> </tt>
<a name="L2729"></a><tt class="py-lineno">2729</tt>  <tt class="py-line"><tt class="py-docstring">        #(case sensitive):</tt> </tt>
<a name="L2730"></a><tt class="py-lineno">2730</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='file', _name='name',</tt> </tt>
<a name="L2731"></a><tt class="py-lineno">2731</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_UPLOAD_FILENAME(filename='^README$',</tt> </tt>
<a name="L2732"></a><tt class="py-lineno">2732</tt>  <tt class="py-line"><tt class="py-docstring">                extension='^$', case=0))</tt> </tt>
<a name="L2733"></a><tt class="py-lineno">2733</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2734"></a><tt class="py-lineno">2734</tt>  <tt class="py-line"> </tt>
<a name="IS_UPLOAD_FILENAME.__init__"></a><div id="IS_UPLOAD_FILENAME.__init__-def"><a name="L2735"></a><tt class="py-lineno">2735</tt> <a class="py-toggle" href="#" id="IS_UPLOAD_FILENAME.__init__-toggle" onclick="return toggle('IS_UPLOAD_FILENAME.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">extension</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">lastdot</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-param">case</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> </tt>
<a name="L2736"></a><tt class="py-lineno">2736</tt>  <tt class="py-line">            <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter valid filename'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_UPLOAD_FILENAME.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_UPLOAD_FILENAME.__init__-expanded"><a name="L2737"></a><tt class="py-lineno">2737</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2738"></a><tt class="py-lineno">2738</tt>  <tt class="py-line">            <tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L2739"></a><tt class="py-lineno">2739</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">extension</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2740"></a><tt class="py-lineno">2740</tt>  <tt class="py-line">            <tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">extension</tt><tt class="py-op">)</tt> </tt>
<a name="L2741"></a><tt class="py-lineno">2741</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">filename</tt> </tt>
<a name="L2742"></a><tt class="py-lineno">2742</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-op">=</tt> <tt class="py-name">extension</tt> </tt>
<a name="L2743"></a><tt class="py-lineno">2743</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lastdot</tt> <tt class="py-op">=</tt> <tt class="py-name">lastdot</tt> </tt>
<a name="L2744"></a><tt class="py-lineno">2744</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt class="py-name">case</tt> </tt>
<a name="L2745"></a><tt class="py-lineno">2745</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L2746"></a><tt class="py-lineno">2746</tt>  <tt class="py-line"> </tt>
<a name="IS_UPLOAD_FILENAME.__call__"></a><div id="IS_UPLOAD_FILENAME.__call__-def"><a name="L2747"></a><tt class="py-lineno">2747</tt> <a class="py-toggle" href="#" id="IS_UPLOAD_FILENAME.__call__-toggle" onclick="return toggle('IS_UPLOAD_FILENAME.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_UPLOAD_FILENAME.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_UPLOAD_FILENAME.__call__-expanded"><a name="L2748"></a><tt class="py-lineno">2748</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L2749"></a><tt class="py-lineno">2749</tt>  <tt class="py-line">            <tt class="py-name">string</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> </tt>
<a name="L2750"></a><tt class="py-lineno">2750</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L2751"></a><tt class="py-lineno">2751</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-444" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-444', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2752"></a><tt class="py-lineno">2752</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">case</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L2753"></a><tt class="py-lineno">2753</tt>  <tt class="py-line">            <tt class="py-name">string</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt id="link-445" class="py-name"><a title="web2py.gluon.dal.Expression.lower" class="py-name" href="#" onclick="return doclink('link-445', 'lower', 'link-180');">lower</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2754"></a><tt class="py-lineno">2754</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">case</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L2755"></a><tt class="py-lineno">2755</tt>  <tt class="py-line">            <tt class="py-name">string</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt id="link-446" class="py-name"><a title="web2py.gluon.dal.Expression.upper" class="py-name" href="#" onclick="return doclink('link-446', 'upper', 'link-11');">upper</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2756"></a><tt class="py-lineno">2756</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">lastdot</tt><tt class="py-op">:</tt> </tt>
<a name="L2757"></a><tt class="py-lineno">2757</tt>  <tt class="py-line">            <tt class="py-name">dot</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">rfind</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L2758"></a><tt class="py-lineno">2758</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2759"></a><tt class="py-lineno">2759</tt>  <tt class="py-line">            <tt class="py-name">dot</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt id="link-447" class="py-name" targets="Method web2py.gluon.dal.Rows.find()=web2py.gluon.dal.Rows-class.html#find"><a title="web2py.gluon.dal.Rows.find" class="py-name" href="#" onclick="return doclink('link-447', 'find', 'link-447');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L2760"></a><tt class="py-lineno">2760</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">dot</tt> <tt class="py-op">==</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L2761"></a><tt class="py-lineno">2761</tt>  <tt class="py-line">            <tt class="py-name">dot</tt> <tt class="py-op">=</tt> <tt id="link-448" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-448', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">)</tt> </tt>
<a name="L2762"></a><tt class="py-lineno">2762</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">dot</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2763"></a><tt class="py-lineno">2763</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-449" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-449', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2764"></a><tt class="py-lineno">2764</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">extension</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">[</tt><tt class="py-name">dot</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2765"></a><tt class="py-lineno">2765</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-450" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-450', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2766"></a><tt class="py-lineno">2766</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2767"></a><tt class="py-lineno">2767</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2768"></a><tt class="py-lineno">2768</tt>  <tt class="py-line"> </tt>
<a name="L2769"></a><tt class="py-lineno">2769</tt>  <tt class="py-line"> </tt>
<a name="IS_IPV4"></a><div id="IS_IPV4-def"><a name="L2770"></a><tt class="py-lineno">2770</tt> <a class="py-toggle" href="#" id="IS_IPV4-toggle" onclick="return toggle('IS_IPV4');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a><tt class="py-op">(</tt><tt class="py-base-class">Validator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IPV4-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="IS_IPV4-expanded"><a name="L2771"></a><tt class="py-lineno">2771</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L2772"></a><tt class="py-lineno">2772</tt>  <tt class="py-line"><tt class="py-docstring">    Checks if field's value is an IP version 4 address in decimal form. Can</tt> </tt>
<a name="L2773"></a><tt class="py-lineno">2773</tt>  <tt class="py-line"><tt class="py-docstring">    be set to force addresses from certain range.</tt> </tt>
<a name="L2774"></a><tt class="py-lineno">2774</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2775"></a><tt class="py-lineno">2775</tt>  <tt class="py-line"><tt class="py-docstring">    IPv4 regex taken from: http://regexlib.com/REDetails.aspx?regexp_id=1411</tt> </tt>
<a name="L2776"></a><tt class="py-lineno">2776</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2777"></a><tt class="py-lineno">2777</tt>  <tt class="py-line"><tt class="py-docstring">    Arguments:</tt> </tt>
<a name="L2778"></a><tt class="py-lineno">2778</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2779"></a><tt class="py-lineno">2779</tt>  <tt class="py-line"><tt class="py-docstring">    minip: lowest allowed address; accepts:</tt> </tt>
<a name="L2780"></a><tt class="py-lineno">2780</tt>  <tt class="py-line"><tt class="py-docstring">           str, eg. 192.168.0.1</tt> </tt>
<a name="L2781"></a><tt class="py-lineno">2781</tt>  <tt class="py-line"><tt class="py-docstring">           list or tuple of octets, eg. [192, 168, 0, 1]</tt> </tt>
<a name="L2782"></a><tt class="py-lineno">2782</tt>  <tt class="py-line"><tt class="py-docstring">    maxip: highest allowed address; same as above</tt> </tt>
<a name="L2783"></a><tt class="py-lineno">2783</tt>  <tt class="py-line"><tt class="py-docstring">    invert: True to allow addresses only from outside of given range; note</tt> </tt>
<a name="L2784"></a><tt class="py-lineno">2784</tt>  <tt class="py-line"><tt class="py-docstring">            that range boundaries are not matched this way</tt> </tt>
<a name="L2785"></a><tt class="py-lineno">2785</tt>  <tt class="py-line"><tt class="py-docstring">    is_localhost: localhost address treatment:</tt> </tt>
<a name="L2786"></a><tt class="py-lineno">2786</tt>  <tt class="py-line"><tt class="py-docstring">                  None (default): indifferent</tt> </tt>
<a name="L2787"></a><tt class="py-lineno">2787</tt>  <tt class="py-line"><tt class="py-docstring">                  True (enforce): query address must match localhost address</tt> </tt>
<a name="L2788"></a><tt class="py-lineno">2788</tt>  <tt class="py-line"><tt class="py-docstring">                                  (127.0.0.1)</tt> </tt>
<a name="L2789"></a><tt class="py-lineno">2789</tt>  <tt class="py-line"><tt class="py-docstring">                  False (forbid): query address must not match localhost</tt> </tt>
<a name="L2790"></a><tt class="py-lineno">2790</tt>  <tt class="py-line"><tt class="py-docstring">                                  address</tt> </tt>
<a name="L2791"></a><tt class="py-lineno">2791</tt>  <tt class="py-line"><tt class="py-docstring">    is_private: same as above, except that query address is checked against</tt> </tt>
<a name="L2792"></a><tt class="py-lineno">2792</tt>  <tt class="py-line"><tt class="py-docstring">                two address ranges: 172.16.0.0 - 172.31.255.255 and</tt> </tt>
<a name="L2793"></a><tt class="py-lineno">2793</tt>  <tt class="py-line"><tt class="py-docstring">                192.168.0.0 - 192.168.255.255</tt> </tt>
<a name="L2794"></a><tt class="py-lineno">2794</tt>  <tt class="py-line"><tt class="py-docstring">    is_automatic: same as above, except that query address is checked against</tt> </tt>
<a name="L2795"></a><tt class="py-lineno">2795</tt>  <tt class="py-line"><tt class="py-docstring">                  one address range: 169.254.0.0 - 169.254.255.255</tt> </tt>
<a name="L2796"></a><tt class="py-lineno">2796</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2797"></a><tt class="py-lineno">2797</tt>  <tt class="py-line"><tt class="py-docstring">    Minip and maxip may also be lists or tuples of addresses in all above</tt> </tt>
<a name="L2798"></a><tt class="py-lineno">2798</tt>  <tt class="py-line"><tt class="py-docstring">    forms (str, int, list / tuple), allowing setup of multiple address ranges:</tt> </tt>
<a name="L2799"></a><tt class="py-lineno">2799</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2800"></a><tt class="py-lineno">2800</tt>  <tt class="py-line"><tt class="py-docstring">        minip = (minip1, minip2, ... minipN)</tt> </tt>
<a name="L2801"></a><tt class="py-lineno">2801</tt>  <tt class="py-line"><tt class="py-docstring">                   |       |           |</tt> </tt>
<a name="L2802"></a><tt class="py-lineno">2802</tt>  <tt class="py-line"><tt class="py-docstring">                   |       |           |</tt> </tt>
<a name="L2803"></a><tt class="py-lineno">2803</tt>  <tt class="py-line"><tt class="py-docstring">        maxip = (maxip1, maxip2, ... maxipN)</tt> </tt>
<a name="L2804"></a><tt class="py-lineno">2804</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2805"></a><tt class="py-lineno">2805</tt>  <tt class="py-line"><tt class="py-docstring">    Longer iterable will be truncated to match length of shorter one.</tt> </tt>
<a name="L2806"></a><tt class="py-lineno">2806</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2807"></a><tt class="py-lineno">2807</tt>  <tt class="py-line"><tt class="py-docstring">    Examples::</tt> </tt>
<a name="L2808"></a><tt class="py-lineno">2808</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2809"></a><tt class="py-lineno">2809</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid IPv4 address:</tt> </tt>
<a name="L2810"></a><tt class="py-lineno">2810</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_IPV4())</tt> </tt>
<a name="L2811"></a><tt class="py-lineno">2811</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2812"></a><tt class="py-lineno">2812</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid IPv4 address belonging to specific range:</tt> </tt>
<a name="L2813"></a><tt class="py-lineno">2813</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L2814"></a><tt class="py-lineno">2814</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_IPV4(minip='100.200.0.0', maxip='100.200.255.255'))</tt> </tt>
<a name="L2815"></a><tt class="py-lineno">2815</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2816"></a><tt class="py-lineno">2816</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid IPv4 address belonging to either 100.110.0.0 -</tt> </tt>
<a name="L2817"></a><tt class="py-lineno">2817</tt>  <tt class="py-line"><tt class="py-docstring">        #100.110.255.255 or 200.50.0.0 - 200.50.0.255 address range:</tt> </tt>
<a name="L2818"></a><tt class="py-lineno">2818</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name',</tt> </tt>
<a name="L2819"></a><tt class="py-lineno">2819</tt>  <tt class="py-line"><tt class="py-docstring">            requires=IS_IPV4(minip=('100.110.0.0', '200.50.0.0'),</tt> </tt>
<a name="L2820"></a><tt class="py-lineno">2820</tt>  <tt class="py-line"><tt class="py-docstring">                             maxip=('100.110.255.255', '200.50.0.255')))</tt> </tt>
<a name="L2821"></a><tt class="py-lineno">2821</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2822"></a><tt class="py-lineno">2822</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid IPv4 address belonging to private address space:</tt> </tt>
<a name="L2823"></a><tt class="py-lineno">2823</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_IPV4(is_private=True))</tt> </tt>
<a name="L2824"></a><tt class="py-lineno">2824</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2825"></a><tt class="py-lineno">2825</tt>  <tt class="py-line"><tt class="py-docstring">        #Check for valid IPv4 address that is not a localhost address:</tt> </tt>
<a name="L2826"></a><tt class="py-lineno">2826</tt>  <tt class="py-line"><tt class="py-docstring">        INPUT(_type='text', _name='name', requires=IS_IPV4(is_localhost=False))</tt> </tt>
<a name="L2827"></a><tt class="py-lineno">2827</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L2828"></a><tt class="py-lineno">2828</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('1.2.3.4')</tt> </tt>
<a name="L2829"></a><tt class="py-lineno">2829</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4', None)</tt> </tt>
<a name="L2830"></a><tt class="py-lineno">2830</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('255.255.255.255')</tt> </tt>
<a name="L2831"></a><tt class="py-lineno">2831</tt>  <tt class="py-line"><tt class="py-docstring">    ('255.255.255.255', None)</tt> </tt>
<a name="L2832"></a><tt class="py-lineno">2832</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('1.2.3.4 ')</tt> </tt>
<a name="L2833"></a><tt class="py-lineno">2833</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4 ', 'enter valid IPv4 address')</tt> </tt>
<a name="L2834"></a><tt class="py-lineno">2834</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('1.2.3.4.5')</tt> </tt>
<a name="L2835"></a><tt class="py-lineno">2835</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4.5', 'enter valid IPv4 address')</tt> </tt>
<a name="L2836"></a><tt class="py-lineno">2836</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('123.123')</tt> </tt>
<a name="L2837"></a><tt class="py-lineno">2837</tt>  <tt class="py-line"><tt class="py-docstring">    ('123.123', 'enter valid IPv4 address')</tt> </tt>
<a name="L2838"></a><tt class="py-lineno">2838</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('1111.2.3.4')</tt> </tt>
<a name="L2839"></a><tt class="py-lineno">2839</tt>  <tt class="py-line"><tt class="py-docstring">    ('1111.2.3.4', 'enter valid IPv4 address')</tt> </tt>
<a name="L2840"></a><tt class="py-lineno">2840</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('0111.2.3.4')</tt> </tt>
<a name="L2841"></a><tt class="py-lineno">2841</tt>  <tt class="py-line"><tt class="py-docstring">    ('0111.2.3.4', 'enter valid IPv4 address')</tt> </tt>
<a name="L2842"></a><tt class="py-lineno">2842</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('256.2.3.4')</tt> </tt>
<a name="L2843"></a><tt class="py-lineno">2843</tt>  <tt class="py-line"><tt class="py-docstring">    ('256.2.3.4', 'enter valid IPv4 address')</tt> </tt>
<a name="L2844"></a><tt class="py-lineno">2844</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4()('300.2.3.4')</tt> </tt>
<a name="L2845"></a><tt class="py-lineno">2845</tt>  <tt class="py-line"><tt class="py-docstring">    ('300.2.3.4', 'enter valid IPv4 address')</tt> </tt>
<a name="L2846"></a><tt class="py-lineno">2846</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(minip='1.2.3.4', maxip='1.2.3.4')('1.2.3.4')</tt> </tt>
<a name="L2847"></a><tt class="py-lineno">2847</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4', None)</tt> </tt>
<a name="L2848"></a><tt class="py-lineno">2848</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(minip='1.2.3.5', maxip='1.2.3.9', error_message='bad ip')('1.2.3.4')</tt> </tt>
<a name="L2849"></a><tt class="py-lineno">2849</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4', 'bad ip')</tt> </tt>
<a name="L2850"></a><tt class="py-lineno">2850</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(maxip='1.2.3.4', invert=True)('127.0.0.1')</tt> </tt>
<a name="L2851"></a><tt class="py-lineno">2851</tt>  <tt class="py-line"><tt class="py-docstring">    ('127.0.0.1', None)</tt> </tt>
<a name="L2852"></a><tt class="py-lineno">2852</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(maxip='1.2.3.4', invert=True)('1.2.3.4')</tt> </tt>
<a name="L2853"></a><tt class="py-lineno">2853</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4', 'enter valid IPv4 address')</tt> </tt>
<a name="L2854"></a><tt class="py-lineno">2854</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(is_localhost=True)('127.0.0.1')</tt> </tt>
<a name="L2855"></a><tt class="py-lineno">2855</tt>  <tt class="py-line"><tt class="py-docstring">    ('127.0.0.1', None)</tt> </tt>
<a name="L2856"></a><tt class="py-lineno">2856</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(is_localhost=True)('1.2.3.4')</tt> </tt>
<a name="L2857"></a><tt class="py-lineno">2857</tt>  <tt class="py-line"><tt class="py-docstring">    ('1.2.3.4', 'enter valid IPv4 address')</tt> </tt>
<a name="L2858"></a><tt class="py-lineno">2858</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(is_localhost=False)('127.0.0.1')</tt> </tt>
<a name="L2859"></a><tt class="py-lineno">2859</tt>  <tt class="py-line"><tt class="py-docstring">    ('127.0.0.1', 'enter valid IPv4 address')</tt> </tt>
<a name="L2860"></a><tt class="py-lineno">2860</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; IS_IPV4(maxip='100.0.0.0', is_localhost=True)('127.0.0.1')</tt> </tt>
<a name="L2861"></a><tt class="py-lineno">2861</tt>  <tt class="py-line"><tt class="py-docstring">    ('127.0.0.1', 'enter valid IPv4 address')</tt> </tt>
<a name="L2862"></a><tt class="py-lineno">2862</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L2863"></a><tt class="py-lineno">2863</tt>  <tt class="py-line"> </tt>
<a name="L2864"></a><tt class="py-lineno">2864</tt>  <tt class="py-line">    <tt id="link-451" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-451', 'regex', 'link-15');">regex</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt> </tt>
<a name="L2865"></a><tt class="py-lineno">2865</tt>  <tt class="py-line">        <tt class="py-string">'^(([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])$'</tt><tt class="py-op">)</tt> </tt>
<a name="L2866"></a><tt class="py-lineno">2866</tt>  <tt class="py-line">    <tt id="link-452" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-452', 'numbers', 'link-383');">numbers</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">16777216</tt><tt class="py-op">,</tt> <tt class="py-number">65536</tt><tt class="py-op">,</tt> <tt class="py-number">256</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L2867"></a><tt class="py-lineno">2867</tt>  <tt class="py-line">    <tt id="link-453" class="py-name" targets="Variable web2py.gluon.validators.IS_IPV4.localhost=web2py.gluon.validators.IS_IPV4-class.html#localhost"><a title="web2py.gluon.validators.IS_IPV4.localhost" class="py-name" href="#" onclick="return doclink('link-453', 'localhost', 'link-453');">localhost</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2130706433</tt> </tt>
<a name="L2868"></a><tt class="py-lineno">2868</tt>  <tt class="py-line">    <tt id="link-454" class="py-name" targets="Variable web2py.gluon.validators.IS_IPV4.private=web2py.gluon.validators.IS_IPV4-class.html#private"><a title="web2py.gluon.validators.IS_IPV4.private" class="py-name" href="#" onclick="return doclink('link-454', 'private', 'link-454');">private</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">2886729728L</tt><tt class="py-op">,</tt> <tt class="py-number">2886795263L</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">3232235520L</tt><tt class="py-op">,</tt> <tt class="py-number">3232301055L</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2869"></a><tt class="py-lineno">2869</tt>  <tt class="py-line">    <tt id="link-455" class="py-name" targets="Variable web2py.gluon.validators.IS_IPV4.automatic=web2py.gluon.validators.IS_IPV4-class.html#automatic"><a title="web2py.gluon.validators.IS_IPV4.automatic" class="py-name" href="#" onclick="return doclink('link-455', 'automatic', 'link-455');">automatic</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">2851995648L</tt><tt class="py-op">,</tt> <tt class="py-number">2852061183L</tt><tt class="py-op">)</tt> </tt>
<a name="L2870"></a><tt class="py-lineno">2870</tt>  <tt class="py-line"> </tt>
<a name="IS_IPV4.__init__"></a><div id="IS_IPV4.__init__-def"><a name="L2871"></a><tt class="py-lineno">2871</tt> <a class="py-toggle" href="#" id="IS_IPV4.__init__-toggle" onclick="return toggle('IS_IPV4.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IPV4-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L2872"></a><tt class="py-lineno">2872</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L2873"></a><tt class="py-lineno">2873</tt>  <tt class="py-line">        <tt class="py-param">minip</tt><tt class="py-op">=</tt><tt class="py-string">'0.0.0.0'</tt><tt class="py-op">,</tt> </tt>
<a name="L2874"></a><tt class="py-lineno">2874</tt>  <tt class="py-line">        <tt class="py-param">maxip</tt><tt class="py-op">=</tt><tt class="py-string">'255.255.255.255'</tt><tt class="py-op">,</tt> </tt>
<a name="L2875"></a><tt class="py-lineno">2875</tt>  <tt class="py-line">        <tt class="py-param">invert</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L2876"></a><tt class="py-lineno">2876</tt>  <tt class="py-line">        <tt class="py-param">is_localhost</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2877"></a><tt class="py-lineno">2877</tt>  <tt class="py-line">        <tt class="py-param">is_private</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2878"></a><tt class="py-lineno">2878</tt>  <tt class="py-line">        <tt class="py-param">is_automatic</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L2879"></a><tt class="py-lineno">2879</tt>  <tt class="py-line">        <tt class="py-param">error_message</tt><tt class="py-op">=</tt><tt class="py-string">'enter valid IPv4 address'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IPV4.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IPV4.__init__-expanded"><a name="L2880"></a><tt class="py-lineno">2880</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">n</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">minip</tt><tt class="py-op">,</tt> <tt class="py-name">maxip</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2881"></a><tt class="py-lineno">2881</tt>  <tt class="py-line">            <tt class="py-name">temp</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L2882"></a><tt class="py-lineno">2882</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2883"></a><tt class="py-lineno">2883</tt>  <tt class="py-line">                <tt class="py-name">temp</tt><tt class="py-op">.</tt><tt id="link-456" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-456', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2884"></a><tt class="py-lineno">2884</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2885"></a><tt class="py-lineno">2885</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-457" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-457', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt id="link-458" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-458', 'len', 'link-20');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">item</tt><tt class="py-op">:</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">4</tt><tt class="py-op">:</tt> </tt>
<a name="L2886"></a><tt class="py-lineno">2886</tt>  <tt class="py-line">                    <tt class="py-name">temp</tt><tt class="py-op">.</tt><tt id="link-459" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-459', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L2887"></a><tt class="py-lineno">2887</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2888"></a><tt class="py-lineno">2888</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">:</tt> </tt>
<a name="L2889"></a><tt class="py-lineno">2889</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2890"></a><tt class="py-lineno">2890</tt>  <tt class="py-line">                            <tt class="py-name">temp</tt><tt class="py-op">.</tt><tt id="link-460" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-460', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2891"></a><tt class="py-lineno">2891</tt>  <tt class="py-line">                        <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2892"></a><tt class="py-lineno">2892</tt>  <tt class="py-line">                            <tt class="py-name">temp</tt><tt class="py-op">.</tt><tt id="link-461" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-461', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L2893"></a><tt class="py-lineno">2893</tt>  <tt class="py-line">            <tt id="link-462" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-462', 'numbers', 'link-383');">numbers</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L2894"></a><tt class="py-lineno">2894</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">temp</tt><tt class="py-op">:</tt> </tt>
<a name="L2895"></a><tt class="py-lineno">2895</tt>  <tt class="py-line">                <tt class="py-name">number</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L2896"></a><tt class="py-lineno">2896</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">j</tt> <tt class="py-keyword">in</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-463" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-463', 'numbers', 'link-383');">numbers</a></tt><tt class="py-op">,</tt> <tt class="py-name">item</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2897"></a><tt class="py-lineno">2897</tt>  <tt class="py-line">                    <tt class="py-name">number</tt> <tt class="py-op">+=</tt> <tt class="py-name">i</tt> <tt class="py-op">*</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">)</tt> </tt>
<a name="L2898"></a><tt class="py-lineno">2898</tt>  <tt class="py-line">                <tt id="link-464" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-464', 'numbers', 'link-383');">numbers</a></tt><tt class="py-op">.</tt><tt id="link-465" class="py-name"><a title="web2py.gluon.html.DIV.append
web2py.gluon.template.BlockNode.append
web2py.gluon.template.Content.append" class="py-name" href="#" onclick="return doclink('link-465', 'append', 'link-154');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">number</tt><tt class="py-op">)</tt> </tt>
<a name="L2899"></a><tt class="py-lineno">2899</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">n</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L2900"></a><tt class="py-lineno">2900</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minip</tt> <tt class="py-op">=</tt> <tt id="link-466" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-466', 'numbers', 'link-383');">numbers</a></tt> </tt>
<a name="L2901"></a><tt class="py-lineno">2901</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2902"></a><tt class="py-lineno">2902</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxip</tt> <tt class="py-op">=</tt> <tt id="link-467" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-467', 'numbers', 'link-383');">numbers</a></tt> </tt>
<a name="L2903"></a><tt class="py-lineno">2903</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">invert</tt> <tt class="py-op">=</tt> <tt class="py-name">invert</tt> </tt>
<a name="L2904"></a><tt class="py-lineno">2904</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_localhost</tt> <tt class="py-op">=</tt> <tt class="py-name">is_localhost</tt> </tt>
<a name="L2905"></a><tt class="py-lineno">2905</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_private</tt> <tt class="py-op">=</tt> <tt class="py-name">is_private</tt> </tt>
<a name="L2906"></a><tt class="py-lineno">2906</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_automatic</tt> <tt class="py-op">=</tt> <tt class="py-name">is_automatic</tt> </tt>
<a name="L2907"></a><tt class="py-lineno">2907</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt> <tt class="py-op">=</tt> <tt class="py-name">error_message</tt> </tt>
</div><a name="L2908"></a><tt class="py-lineno">2908</tt>  <tt class="py-line"> </tt>
<a name="IS_IPV4.__call__"></a><div id="IS_IPV4.__call__-def"><a name="L2909"></a><tt class="py-lineno">2909</tt> <a class="py-toggle" href="#" id="IS_IPV4.__call__-toggle" onclick="return toggle('IS_IPV4.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.validators.IS_IPV4-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IS_IPV4.__call__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="IS_IPV4.__call__-expanded"><a name="L2910"></a><tt class="py-lineno">2910</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-468" class="py-name"><a title="web2py.gluon.validators.IS_EMAIL.regex
web2py.gluon.validators.IS_IPV4.regex" class="py-name" href="#" onclick="return doclink('link-468', 'regex', 'link-15');">regex</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2911"></a><tt class="py-lineno">2911</tt>  <tt class="py-line">            <tt class="py-name">number</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L2912"></a><tt class="py-lineno">2912</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">j</tt> <tt class="py-keyword">in</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-469" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.numbers" class="py-name" href="#" onclick="return doclink('link-469', 'numbers', 'link-383');">numbers</a></tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2913"></a><tt class="py-lineno">2913</tt>  <tt class="py-line">                <tt class="py-name">number</tt> <tt class="py-op">+=</tt> <tt class="py-name">i</tt> <tt class="py-op">*</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">)</tt> </tt>
<a name="L2914"></a><tt class="py-lineno">2914</tt>  <tt class="py-line">            <tt class="py-name">ok</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2915"></a><tt class="py-lineno">2915</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">bottom</tt><tt class="py-op">,</tt> <tt class="py-name">top</tt> <tt class="py-keyword">in</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minip</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">maxip</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2916"></a><tt class="py-lineno">2916</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">invert</tt> <tt class="py-op">!=</tt> <tt class="py-op">(</tt><tt class="py-name">bottom</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">number</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">top</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2917"></a><tt class="py-lineno">2917</tt>  <tt class="py-line">                    <tt class="py-name">ok</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L2918"></a><tt class="py-lineno">2918</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_localhost</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_localhost</tt> <tt class="py-op">==</tt> \ </tt>
<a name="L2919"></a><tt class="py-lineno">2919</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">number</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-470" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.localhost" class="py-name" href="#" onclick="return doclink('link-470', 'localhost', 'link-453');">localhost</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2920"></a><tt class="py-lineno">2920</tt>  <tt class="py-line">                    <tt class="py-name">ok</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2921"></a><tt class="py-lineno">2921</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_private</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_private</tt> <tt class="py-op">==</tt> \ </tt>
<a name="L2922"></a><tt class="py-lineno">2922</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt id="link-471" class="py-name" targets="Method web2py.gluon.dal.Expression.sum()=web2py.gluon.dal.Expression-class.html#sum"><a title="web2py.gluon.dal.Expression.sum" class="py-name" href="#" onclick="return doclink('link-471', 'sum', 'link-471');">sum</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">number</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">number</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">number</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">number</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-472" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.private" class="py-name" href="#" onclick="return doclink('link-472', 'private', 'link-454');">private</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2923"></a><tt class="py-lineno">2923</tt>  <tt class="py-line">                    <tt class="py-name">ok</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2924"></a><tt class="py-lineno">2924</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_automatic</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_automatic</tt> <tt class="py-op">==</tt> \ </tt>
<a name="L2925"></a><tt class="py-lineno">2925</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-473" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.automatic" class="py-name" href="#" onclick="return doclink('link-473', 'automatic', 'link-455');">automatic</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">number</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-474" class="py-name"><a title="web2py.gluon.validators.IS_IPV4.automatic" class="py-name" href="#" onclick="return doclink('link-474', 'automatic', 'link-455');">automatic</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2926"></a><tt class="py-lineno">2926</tt>  <tt class="py-line">                    <tt class="py-name">ok</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L2927"></a><tt class="py-lineno">2927</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">ok</tt><tt class="py-op">:</tt> </tt>
<a name="L2928"></a><tt class="py-lineno">2928</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L2929"></a><tt class="py-lineno">2929</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-475" class="py-name"><a title="web2py.gluon.languages.translator.translate
web2py.gluon.validators.translate" class="py-name" href="#" onclick="return doclink('link-475', 'translate', 'link-17');">translate</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_message</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2930"></a><tt class="py-lineno">2930</tt>  <tt class="py-line"> </tt>
<a name="L2931"></a><tt class="py-lineno">2931</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L2932"></a><tt class="py-lineno">2932</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L2933"></a><tt class="py-lineno">2933</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2934"></a><tt class="py-lineno">2934</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.CLEANUP-class.html version [d416dac2c4].


















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.CLEANUP</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;CLEANUP
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.CLEANUP-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CLEANUP</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CLEANUP">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">CLEANUP</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=CLEANUP())
</pre>
  removes special characters on validation<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.CLEANUP-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">regex</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">[^\t\n\r -~]</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CLEANUP.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CLEANUP.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">regex</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">[^\t\n\r -~]</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CLEANUP.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.CRYPT-class.html version [c1b29fea74].




















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.CRYPT</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;CRYPT
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.CRYPT-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CRYPT</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CRYPT">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">CRYPT</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=CRYPT())
</pre>
  <p>encodes the value on validation with a digest.</p>
  If no arguments are provided CRYPT uses the MD5 algorithm. If the key 
  argument is provided the HMAC+MD5 algorithm is used. If the digest_alg is
  specified this is used to replace the MD5 with, for example, SHA512. The 
  digest_alg can be the name of a hashlib algorithm as a string or the 
  algorithm itself.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.CRYPT-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">digest_alg</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">md5</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CRYPT.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CRYPT.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">digest_alg</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">md5</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#CRYPT.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_ALPHANUMERIC-class.html version [2258723eba].










































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_ALPHANUMERIC</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_ALPHANUMERIC
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_ALPHANUMERIC</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_ALPHANUMERIC">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+    
             |    
      <a href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a> --+
                 |
                <strong class="uidshort">IS_ALPHANUMERIC</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_ALPHANUMERIC())

   &gt;&gt;&gt; IS_ALPHANUMERIC()('1')
   ('1', None)
   &gt;&gt;&gt; IS_ALPHANUMERIC()('')
   ('', None)
   &gt;&gt;&gt; IS_ALPHANUMERIC()('A_a')
   ('A_a', None)
   &gt;&gt;&gt; IS_ALPHANUMERIC()('!')
   ('!', 'enter only letters, numbers, and underscore')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter only letters, numbers, and underscore</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_ALPHANUMERIC.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a></code></b>:
      <code><a href="web2py.gluon.validators.IS_MATCH-class.html#__call__">__call__</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter only letters, numbers, and underscore</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_ALPHANUMERIC.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_MATCH-class.html#__init__">IS_MATCH.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_DATE-class.html version [bc026fbc4d].


































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_DATE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_DATE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_DATE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_DATE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_DATE</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html">IS_DATE_IN_RANGE</a>
</dd></dl>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_DATE())
</pre>
  date has to be in the ISO8960 format YYYY-MM-DD<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter date as %(format)s</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATE-class.html#formatter" class="summary-sig-name">formatter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      For some validators returns a formatted version (matching the 
      validator) of value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter date as %(format)s</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="formatter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">formatter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE.formatter">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  For some validators returns a formatted version (matching the 
  validator) of value. Otherwise just returns the value.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.Validator-class.html#formatter">Validator.formatter</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_DATETIME-class.html version [731336b4d9].





























































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_DATETIME</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_DATETIME
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_DATETIME-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_DATETIME</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_DATETIME</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html">IS_DATETIME_IN_RANGE</a>
</dd></dl>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_DATETIME())
</pre>
  datetime has to be in the ISO8960 format YYYY-MM-DD hh:mm:ss<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATETIME-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d %H:%M:%S</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter date and time as %(format)s</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATETIME-class.html#formatter" class="summary-sig-name">formatter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      For some validators returns a formatted version (matching the 
      validator) of value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="nice"></a><span class="summary-sig-name">nice</span>(<span class="summary-sig-arg">format</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME.nice">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="isodatetime"></a><span class="summary-name">isodatetime</span> = <code title="'%Y-%m-%d %H:%M:%S'"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d %H:%M:%S</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d %H:%M:%S</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter date and time as %(format)s</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="formatter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">formatter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME.formatter">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  For some validators returns a formatted version (matching the 
  validator) of value. Otherwise just returns the value.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.Validator-class.html#formatter">Validator.formatter</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html version [f4950f15af].













































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_DATETIME_IN_RANGE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_DATETIME_IN_RANGE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_DATETIME_IN_RANGE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME_IN_RANGE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+    
             |    
   <a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a> --+
                 |
                <strong class="uidshort">IS_DATETIME_IN_RANGE</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   &gt;&gt;&gt; v = IS_DATETIME_IN_RANGE(                minimum=datetime.datetime(2008,1,1,12,20),                 maximum=datetime.datetime(2009,12,31,12,20),                 format=&quot;%m/%d/%Y %H:%M&quot;,error_message=&quot;oops&quot;)
   &gt;&gt;&gt; v('03/03/2008 12:40')
   (datetime.datetime(2008, 3, 3, 12, 40), None)

   &gt;&gt;&gt; v('03/03/2010 10:34')
   (datetime.datetime(2010, 3, 3, 10, 34), 'oops')

   &gt;&gt;&gt; v(datetime.datetime(2008,3,3,0,0))
   (datetime.datetime(2008, 3, 3, 0, 0), None)

   &gt;&gt;&gt; v(datetime.datetime(2010,3,3,0,0))
   (datetime.datetime(2010, 3, 3, 0, 0), 'oops')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d %H:%M:%S</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME_IN_RANGE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME_IN_RANGE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a></code></b>:
      <code><a href="web2py.gluon.validators.IS_DATETIME-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a></code></b>:
      <code><a href="web2py.gluon.validators.IS_DATETIME-class.html#nice">nice</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a></code></b>:
      <code><a href="web2py.gluon.validators.IS_DATETIME-class.html#isodatetime">isodatetime</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d %H:%M:%S</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME_IN_RANGE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_DATETIME-class.html#__init__">IS_DATETIME.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATETIME_IN_RANGE.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_DATETIME-class.html#__call__">IS_DATETIME.__call__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_DATE_IN_RANGE-class.html version [463f057d3a].




























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_DATE_IN_RANGE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_DATE_IN_RANGE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_DATE_IN_RANGE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE_IN_RANGE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+    
             |    
       <a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a> --+
                 |
                <strong class="uidshort">IS_DATE_IN_RANGE</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   &gt;&gt;&gt; v = IS_DATE_IN_RANGE(minimum=datetime.date(2008,1,1),                                  maximum=datetime.date(2009,12,31),                                  format=&quot;%m/%d/%Y&quot;,error_message=&quot;oops&quot;)

   &gt;&gt;&gt; v('03/03/2008')
   (datetime.date(2008, 3, 3), None)

   &gt;&gt;&gt; v('03/03/2010')
   (datetime.date(2010, 3, 3), 'oops')

   &gt;&gt;&gt; v(datetime.date(2008,3,3))
   (datetime.date(2008, 3, 3), None)

   &gt;&gt;&gt; v(datetime.date(2010,3,3))
   (datetime.date(2010, 3, 3), 'oops')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE_IN_RANGE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE_IN_RANGE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a></code></b>:
      <code><a href="web2py.gluon.validators.IS_DATE-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">format</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">%Y-%m-%d</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE_IN_RANGE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_DATE-class.html#__init__">IS_DATE.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DATE_IN_RANGE.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_DATE-class.html#__call__">IS_DATE.__call__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html version [df2914c3a1].












































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_DECIMAL_IN_RANGE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_DECIMAL_IN_RANGE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_DECIMAL_IN_RANGE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DECIMAL_IN_RANGE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_DECIMAL_IN_RANGE</strong>
</pre>

<hr />
<p>Determine that the argument is (or can be represented as) a Python 
  Decimal, and that it falls within the specified inclusive range. The 
  comparison is made with Python Decimal arithmetic.</p>
  <p>The minimum and maximum limits can be None, meaning no lower or upper 
  limit, respectively.</p>
  example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_DECIMAL_IN_RANGE(0, 10))

   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)('4')
   (Decimal('4'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(4)
   (Decimal('4'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(1)
   (Decimal('1'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(5.25)
   (5.25, 'enter a number between 1 and 5')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(5.25,6)(5.25)
   (Decimal('5.25'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(5.25,6)('5.25')
   (Decimal('5.25'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(6.0)
   (6.0, 'enter a number between 1 and 5')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1,5)(3.5)
   (Decimal('3.5'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,5.5)(3.5)
   (Decimal('3.5'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,5.5)(6.5)
   (6.5, 'enter a number between 1.5 and 5.5')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,None)(6.5)
   (Decimal('6.5'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(1.5,None)(0.5)
   (0.5, 'enter a number greater than or equal to 1.5')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(None,5.5)(4.5)
   (Decimal('4.5'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(None,5.5)(6.5)
   (6.5, 'enter a number less than or equal to 5.5')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE()(6.5)
   (Decimal('6.5'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(0,99)(123.123)
   (123.123, 'enter a number between 0 and 99')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(0,99)('123.123')
   ('123.123', 'enter a number between 0 and 99')
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE(0,99)('12.34')
   (Decimal('12.34'), None)
   &gt;&gt;&gt; IS_DECIMAL_IN_RANGE()('abc')
   ('abc', 'enter a decimal number')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">dot</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DECIMAL_IN_RANGE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DECIMAL_IN_RANGE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#formatter" class="summary-sig-name">formatter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      For some validators returns a formatted version (matching the 
      validator) of value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DECIMAL_IN_RANGE.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">dot</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DECIMAL_IN_RANGE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="formatter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">formatter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_DECIMAL_IN_RANGE.formatter">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  For some validators returns a formatted version (matching the 
  validator) of value. Otherwise just returns the value.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.Validator-class.html#formatter">Validator.formatter</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_EMAIL-class.html version [bba401f554].





































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_EMAIL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_EMAIL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_EMAIL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_EMAIL</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMAIL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_EMAIL</strong>
</pre>

<hr />
<pre class="literalblock">

Checks if field's value is a valid email address. Can be set to disallow
or force addresses from certain domain(s).

Email regex adapted from
http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx,
generally following the RFCs, except that we disallow quoted strings
and permit underscores and leading numerics in subdomain labels

Arguments:

- banned: regex text for disallowed address domains
- forced: regex text for required address domains

Both arguments can also be custom objects with a match(value) method.

Examples::

    #Check for valid email address:
    INPUT(_type='text', _name='name',
        requires=IS_EMAIL())

    #Check for valid email address that can't be from a .com domain:
    INPUT(_type='text', _name='name',
        requires=IS_EMAIL(banned='^.*\.com(|\..*)$'))

    #Check for valid email address that must be from a .edu domain:
    INPUT(_type='text', _name='name',
        requires=IS_EMAIL(forced='^.*\.edu(|\..*)$'))

    &gt;&gt;&gt; IS_EMAIL()('a@b.com')
    ('a@b.com', None)
    &gt;&gt;&gt; IS_EMAIL()('abc@def.com')
    ('abc@def.com', None)
    &gt;&gt;&gt; IS_EMAIL()('abc@3def.com')
    ('abc@3def.com', None)
    &gt;&gt;&gt; IS_EMAIL()('abc@def.us')
    ('abc@def.us', None)
    &gt;&gt;&gt; IS_EMAIL()('abc@d_-f.us')
    ('abc@d_-f.us', None)
    &gt;&gt;&gt; IS_EMAIL()('@def.com')           # missing name
    ('@def.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('&quot;abc@def&quot;.com')      # quoted name
    ('&quot;abc@def&quot;.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc+def.com')        # no @
    ('abc+def.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc@def.x')          # one-char TLD
    ('abc@def.x', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc@def.12')         # numeric TLD
    ('abc@def.12', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc@def..com')       # double-dot in domain
    ('abc@def..com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc@.def.com')       # dot starts domain
    ('abc@.def.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc@def.c_m')        # underscore in TLD
    ('abc@def.c_m', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('NotAnEmail')         # missing @
    ('NotAnEmail', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('abc@NotAnEmail')     # missing TLD
    ('abc@NotAnEmail', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('customer/department@example.com')
    ('customer/department@example.com', None)
    &gt;&gt;&gt; IS_EMAIL()('$A12345@example.com')
    ('$A12345@example.com', None)
    &gt;&gt;&gt; IS_EMAIL()('!def!xyz%abc@example.com')
    ('!def!xyz%abc@example.com', None)
    &gt;&gt;&gt; IS_EMAIL()('_Yosemite.Sam@example.com')
    ('_Yosemite.Sam@example.com', None)
    &gt;&gt;&gt; IS_EMAIL()('~@example.com')
    ('~@example.com', None)
    &gt;&gt;&gt; IS_EMAIL()('.wooly@example.com')       # dot starts name
    ('.wooly@example.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('wo..oly@example.com')      # adjacent dots in name
    ('wo..oly@example.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('pootietang.@example.com')  # dot ends name
    ('pootietang.@example.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('.@example.com')            # name is bare dot
    ('.@example.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('Ima.Fool@example.com')
    ('Ima.Fool@example.com', None)
    &gt;&gt;&gt; IS_EMAIL()('Ima Fool@example.com')     # space in name
    ('Ima Fool@example.com', 'enter a valid email address')
    &gt;&gt;&gt; IS_EMAIL()('localguy@localhost')       # localhost as domain
    ('localguy@localhost', None)

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_EMAIL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">banned</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">forced</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid email address</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMAIL.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMAIL.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMAIL-class.html#regex" class="summary-name">regex</a> = <code title="re.compile(r'(?ix)^(?!\.)([-a-z0-9!#\$%&amp;\'\*\+/=\?\^_`\{\|\}~]|(?&lt;!\.)\
\.)+(?&lt;!\.)@(localhost|([a-z0-9]([-\w]*[a-z0-9])?\.)+[a-z]{2,})$')">re.compile(r'<code class="re-flags">(?ix)</code>^<code class="re-group">(?!</code>\.<code class="re-group">)</code><code class="re-group">(</code><code class="re-group">[</code>-a<code class="re-op">-</code>z0<code class="re-op">-</code>9!#\$%&amp;\'\*\+/=\?\^_`<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_EMAIL-class.html#regex_proposed_but_failed" class="summary-name">regex_proposed_but_failed</a> = <code title="re.compile(r'(?ix)^([\w!#\$%&amp;\'\*\+-/=\?\^`\{\|\}~]+\.)*[\w!#\$%&amp;\'\*\\
+-/=\?\^`\{\|\}~]+@((((([a-z0-9]{1}[a-z0-9-]{,62}[a-z0-9]{1})|[a-z])\.\
)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(:\d{1,5})?)$')">re.compile(r'<code class="re-flags">(?ix)</code>^<code class="re-group">(</code><code class="re-group">[</code>\w!#\$%&amp;\'\*\<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">banned</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">forced</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid email address</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMAIL.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="regex"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?ix)</code>^<code class="re-group">(?!</code>\.<code class="re-group">)</code><code class="re-group">(</code><code class="re-group">[</code>-a<code class="re-op">-</code>z0<code class="re-op">-</code>9!#\$%&amp;\'\*\+/=\?\^_`\{\|\}~<code class="re-group">]</code><code class="re-op">|</code><code class="re-group">(?&lt;!</code>\.<code class="re-group">)</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
\.<code class="re-group">)</code><code class="re-op">+</code><code class="re-group">(?&lt;!</code>\.<code class="re-group">)</code>@<code class="re-group">(</code>localhost<code class="re-op">|</code><code class="re-group">(</code><code class="re-group">[</code>a<code class="re-op">-</code>z0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-group">(</code><code class="re-group">[</code>-\w<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">[</code>a<code class="re-op">-</code>z0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-group">)</code><code class="re-op">?</code>\.<code class="re-group">)</code><code class="re-op">+</code><code class="re-group">[</code>a<code class="re-op">-</code>z<code class="re-group">]</code><code class="re-op">{2,}</code><code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="regex_proposed_but_failed"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex_proposed_but_failed</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?ix)</code>^<code class="re-group">(</code><code class="re-group">[</code>\w!#\$%&amp;\'\*\+-/=\?\^`\{\|\}~<code class="re-group">]</code><code class="re-op">+</code>\.<code class="re-group">)</code><code class="re-op">*</code><code class="re-group">[</code>\w!#\$%&amp;\'\*\<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
+-/=\?\^`\{\|\}~<code class="re-group">]</code><code class="re-op">+</code>@<code class="re-group">(</code><code class="re-group">(</code><code class="re-group">(</code><code class="re-group">(</code><code class="re-group">(</code><code class="re-group">[</code>a<code class="re-op">-</code>z0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{1}</code><code class="re-group">[</code>a<code class="re-op">-</code>z0<code class="re-op">-</code>9-<code class="re-group">]</code><code class="re-op">{,62}</code><code class="re-group">[</code>a<code class="re-op">-</code>z0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{1}</code><code class="re-group">)</code><code class="re-op">|</code><code class="re-group">[</code>a<code class="re-op">-</code>z<code class="re-group">]</code><code class="re-group">)</code>\.<code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-op">+</code><code class="re-group">[</code>a<code class="re-op">-</code>z<code class="re-group">]</code><code class="re-op">{2,6}</code><code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(</code>\d<code class="re-op">{1,3}</code>\.<code class="re-group">)</code><code class="re-op">{3}</code>\d<code class="re-op">{1,3}</code><code class="re-group">(</code>:\d<code class="re-op">{1,5}</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_EMPTY_OR-class.html version [29849818be].









































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_EMPTY_OR</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_EMPTY_OR
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_EMPTY_OR-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_EMPTY_OR</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_EMPTY_OR</strong>
</pre>

<hr />
dummy class for testing IS_EMPTY_OR
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_EMPTY_OR(IS_EMAIL())(<span class="py-string">'abc@def.com'</span>)
<span class="py-output">('abc@def.com', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_EMPTY_OR(IS_EMAIL())(<span class="py-string">'   '</span>)
<span class="py-output">(None, None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_EMPTY_OR(IS_EMAIL(), null=<span class="py-string">'abc'</span>)(<span class="py-string">'   '</span>)
<span class="py-output">('abc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_EMPTY_OR(IS_EMAIL(), null=<span class="py-string">'abc'</span>, empty_regex=<span class="py-string">'def'</span>)(<span class="py-string">'def'</span>)
<span class="py-output">('abc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_EMPTY_OR(IS_EMAIL())(<span class="py-string">'abc'</span>)
<span class="py-output">('abc', 'enter a valid email address')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_EMPTY_OR(IS_EMAIL())(<span class="py-string">' abc '</span>)
<span class="py-output">('abc', 'enter a valid email address')</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>,
        <span class="summary-sig-arg">null</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">empty_regex</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_options"></a><span class="summary-sig-name">_options</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR._options">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_self_id"></a><span class="summary-sig-name">set_self_id</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">id</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR.set_self_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_EMPTY_OR-class.html#formatter" class="summary-sig-name">formatter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      For some validators returns a formatted version (matching the 
      validator) of value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>,
        <span class="sig-arg">null</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">empty_regex</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="formatter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">formatter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EMPTY_OR.formatter">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  For some validators returns a formatted version (matching the 
  validator) of value. Otherwise just returns the value.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.Validator-class.html#formatter">Validator.formatter</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_EQUAL_TO-class.html version [c2b68c5868].




























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_EQUAL_TO</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_EQUAL_TO
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_EQUAL_TO-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_EQUAL_TO</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EQUAL_TO">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_EQUAL_TO</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='password')
   INPUT(_type='text', _name='password2',
         requires=IS_EQUAL_TO(request.vars.password))
</pre>
  the argument of IS_EQUAL_TO is a string
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_EQUAL_TO(<span class="py-string">'aaa'</span>)(<span class="py-string">'aaa'</span>)
<span class="py-output">('aaa', None)</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_EQUAL_TO(<span class="py-string">'aaa'</span>)(<span class="py-string">'aab'</span>)
<span class="py-output">('aab', 'no match')</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">expression</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">no match</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EQUAL_TO.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EQUAL_TO.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">expression</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">no match</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EQUAL_TO.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_EXPR-class.html version [fa286666d7].




























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_EXPR</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_EXPR
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_EXPR-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_EXPR</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EXPR">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_EXPR</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name',
       requires=IS_EXPR('5 &lt; int(value) &lt; 10'))
</pre>
  the argument of IS_EXPR must be python condition:
<pre class="literalblock">
   &gt;&gt;&gt; IS_EXPR('int(value) &lt; 2')('1')
   ('1', None)

   &gt;&gt;&gt; IS_EXPR('int(value) &lt; 2')('2')
   ('2', 'invalid expression')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_EXPR-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">expression</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid expression</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EXPR.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EXPR.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">expression</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid expression</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_EXPR.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html version [5667043e98].






























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_FLOAT_IN_RANGE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_FLOAT_IN_RANGE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_FLOAT_IN_RANGE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_FLOAT_IN_RANGE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_FLOAT_IN_RANGE</strong>
</pre>

<hr />
<p>Determine that the argument is (or can be represented as) a float, and
  that it falls within the specified inclusive range. The comparison is 
  made with native arithmetic.</p>
  <p>The minimum and maximum limits can be None, meaning no lower or upper 
  limit, respectively.</p>
  example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_FLOAT_IN_RANGE(0, 10))

   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)('4')
   (4.0, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(4)
   (4.0, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(1)
   (1.0, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(5.25)
   (5.25, 'enter a number between 1 and 5')
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(6.0)
   (6.0, 'enter a number between 1 and 5')
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,5)(3.5)
   (3.5, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,None)(3.5)
   (3.5, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(None,5)(3.5)
   (3.5, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(1,None)(0.5)
   (0.5, 'enter a number greater than or equal to 1')
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE(None,5)(6.5)
   (6.5, 'enter a number less than or equal to 5')
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE()(6.5)
   (6.5, None)
   &gt;&gt;&gt; IS_FLOAT_IN_RANGE()('abc')
   ('abc', 'enter a number')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">dot</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_FLOAT_IN_RANGE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_FLOAT_IN_RANGE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#formatter" class="summary-sig-name">formatter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      For some validators returns a formatted version (matching the 
      validator) of value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_FLOAT_IN_RANGE.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">dot</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_FLOAT_IN_RANGE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="formatter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">formatter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_FLOAT_IN_RANGE.formatter">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  For some validators returns a formatted version (matching the 
  validator) of value. Otherwise just returns the value.
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.Validator-class.html#formatter">Validator.formatter</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_GENERIC_URL-class.html version [82072b9c87].





















































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_GENERIC_URL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_GENERIC_URL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_GENERIC_URL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_GENERIC_URL</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_GENERIC_URL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_GENERIC_URL</strong>
</pre>

<hr />
<pre class="literalblock">

Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The URL scheme specified (if one is specified) is not valid

Based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html

This function only checks the URL's syntax. It does not check that the URL
points to a real document, for example, or that it otherwise makes sense
semantically. This function does automatically prepend 'http://' in front
of a URL if and only if that's necessary to successfully parse the URL.
Please note that a scheme will be prepended only for rare cases
(e.g. 'google.ca:80')

The list of allowed schemes is customizable with the allowed_schemes
parameter. If you exclude None from the list, then abbreviated URLs
(lacking a scheme such as 'http') will be rejected.

The default prepended scheme is customizable with the prepend_scheme
parameter. If you set prepend_scheme to None then prepending will be
disabled. URLs that require prepending to parse will still be accepted,
but the return value will not be modified.

@author: Jonathan Benn

&gt;&gt;&gt; IS_GENERIC_URL()('http://user@abc.com')
('http://user@abc.com', None)

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid URL</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">allowed_schemes</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">prepend_scheme</span>=<span class="summary-sig-default">1</span>)</span><br />
      :param error_message: a string, the error message to give the end user
    if the URL does not validate
:param allowed_schemes: a list containing strings or None.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_GENERIC_URL.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_GENERIC_URL-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      :param value: a string, the URL to validate...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_GENERIC_URL.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid URL</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">allowed_schemes</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">prepend_scheme</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_GENERIC_URL.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param error_message: a string, the error message to give the end user
    if the URL does not validate
:param allowed_schemes: a list containing strings or None. Each element
    is a scheme the inputed URL is allowed to use
:param prepend_scheme: a string, this scheme is prepended if it's
    necessary to make the URL valid

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_GENERIC_URL.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param value: a string, the URL to validate
:returns: a tuple, where tuple[0] is the inputed value (possible
    prepended with prepend_scheme), and tuple[1] is either
    None (success!) or the string error_message

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_HTTP_URL-class.html version [1faacb2d20].

































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_HTTP_URL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_HTTP_URL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_HTTP_URL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_HTTP_URL</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_HTTP_URL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_HTTP_URL</strong>
</pre>

<hr />
<pre class="literalblock">

Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

Based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html

This function only checks the URL's syntax. It does not check that the URL
points to a real document, for example, or that it otherwise makes sense
semantically. This function does automatically prepend 'http://' in front
of a URL in the case of an abbreviated URL (e.g. 'google.ca').

The list of allowed schemes is customizable with the allowed_schemes
parameter. If you exclude None from the list, then abbreviated URLs
(lacking a scheme such as 'http') will be rejected.

The default prepended scheme is customizable with the prepend_scheme
parameter. If you set prepend_scheme to None then prepending will be
disabled. URLs that require prepending to parse will still be accepted,
but the return value will not be modified.

@author: Jonathan Benn

&gt;&gt;&gt; IS_HTTP_URL()('http://1.2.3.4')
('http://1.2.3.4', None)
&gt;&gt;&gt; IS_HTTP_URL()('http://abc.com')
('http://abc.com', None)
&gt;&gt;&gt; IS_HTTP_URL()('https://abc.com')
('https://abc.com', None)
&gt;&gt;&gt; IS_HTTP_URL()('httpx://abc.com')
('httpx://abc.com', 'enter a valid URL')
&gt;&gt;&gt; IS_HTTP_URL()('http://abc.com:80')
('http://abc.com:80', None)
&gt;&gt;&gt; IS_HTTP_URL()('http://user@abc.com')
('http://user@abc.com', None)
&gt;&gt;&gt; IS_HTTP_URL()('http://user@1.2.3.4')
('http://user@1.2.3.4', None)

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_HTTP_URL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid URL</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">allowed_schemes</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">prepend_scheme</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code></span>)</span><br />
      :param error_message: a string, the error message to give the end user
    if the URL does not validate
:param allowed_schemes: a list containing strings or None.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_HTTP_URL.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_HTTP_URL-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      :param value: a string, the URL to validate...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_HTTP_URL.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid URL</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">allowed_schemes</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">prepend_scheme</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_HTTP_URL.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param error_message: a string, the error message to give the end user
    if the URL does not validate
:param allowed_schemes: a list containing strings or None. Each element
    is a scheme the inputed URL is allowed to use
:param prepend_scheme: a string, this scheme is prepended if it's
    necessary to make the URL valid

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_HTTP_URL.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param value: a string, the URL to validate
:returns: a tuple, where tuple[0] is the inputed value
    (possible prepended with prepend_scheme), and tuple[1] is either
    None (success!) or the string error_message

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_IMAGE-class.html version [81c19d5d14].


















































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_IMAGE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_IMAGE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_IMAGE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_IMAGE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_IMAGE</strong>
</pre>

<hr />
<p>Checks if file uploaded through file input was saved in one of 
  selected image formats and has dimensions (width and height) within given
  boundaries.</p>
  <p>Does *not* check for maximum file size (use IS_LENGTH for that). 
  Returns validation failure if no data was uploaded.</p>
  <p>Supported file formats: BMP, GIF, JPEG, PNG.</p>
  <p>Code parts taken from 
  http://mail.python.org/pipermail/python-list/2007-June/617126.html</p>
  <p>Arguments:</p>
  <p>extensions: iterable containing allowed *lowercase* image file 
  extensions ('jpg' extension of uploaded file counts as 'jpeg') maxsize: 
  iterable containing maximum width and height of the image minsize: 
  iterable containing minimum width and height of the image</p>
  <p>Use (-1, -1) as minsize to pass image size check.</p>
  Examples:
<pre class="literalblock">
   #Check if uploaded file is in any of supported image formats:
   INPUT(_type='file', _name='name', requires=IS_IMAGE())

   #Check if uploaded file is either JPEG or PNG:
   INPUT(_type='file', _name='name',
       requires=IS_IMAGE(extensions=('jpeg', 'png')))

   #Check if uploaded file is PNG with maximum size of 200x200 pixels:
   INPUT(_type='file', _name='name',
       requires=IS_IMAGE(extensions=('png'), maxsize=(200, 200)))
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_IMAGE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">extensions</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">bmp</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">gif</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">jpeg</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">png</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">maxsize</span>=<span class="summary-sig-default"><code class="variable-group">(</code>10000<code class="variable-op">, </code>10000<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">minsize</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid image</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__bmp"></a><span class="summary-sig-name">__bmp</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stream</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__bmp">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__gif"></a><span class="summary-sig-name">__gif</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stream</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__gif">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__jpeg"></a><span class="summary-sig-name">__jpeg</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stream</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__jpeg">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__png"></a><span class="summary-sig-name">__png</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">stream</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__png">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">extensions</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">bmp</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">gif</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">jpeg</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">png</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>,
        <span class="sig-arg">maxsize</span>=<span class="sig-default"><code class="variable-group">(</code>10000<code class="variable-op">, </code>10000<code class="variable-group">)</code></span>,
        <span class="sig-arg">minsize</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid image</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IMAGE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_INT_IN_RANGE-class.html version [67bc87516f].



















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_INT_IN_RANGE</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_INT_IN_RANGE
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_INT_IN_RANGE</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_INT_IN_RANGE">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_INT_IN_RANGE</strong>
</pre>

<hr />
<p>Determine that the argument is (or can be represented as) an int, and 
  that it falls within the specified range. The range is interpreted in the
  Pythonic way, so the test is: min &lt;= value &lt; max.</p>
  <p>The minimum and maximum limits can be None, meaning no lower or upper 
  limit, respectively.</p>
  example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_INT_IN_RANGE(0, 10))

   &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)('4')
   (4, None)
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(4)
   (4, None)
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(1)
   (1, None)
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(5)
   (5, 'enter an integer between 1 and 4')
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(5)
   (5, 'enter an integer between 1 and 4')
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,5)(3.5)
   (3, 'enter an integer between 1 and 4')
   &gt;&gt;&gt; IS_INT_IN_RANGE(None,5)('4')
   (4, None)
   &gt;&gt;&gt; IS_INT_IN_RANGE(None,5)('6')
   (6, 'enter an integer less than or equal to 4')
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,None)('4')
   (4, None)
   &gt;&gt;&gt; IS_INT_IN_RANGE(1,None)('0')
   (0, 'enter an integer greater than or equal to 1')
   &gt;&gt;&gt; IS_INT_IN_RANGE()(6)
   (6, None)
   &gt;&gt;&gt; IS_INT_IN_RANGE()('abc')
   ('abc', 'enter an integer')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">minimum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">maximum</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_INT_IN_RANGE.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_INT_IN_RANGE.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">minimum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">maximum</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_INT_IN_RANGE.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_IN_DB-class.html version [f9ee0fb36d].

























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_IN_DB</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_IN_DB
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_IN_DB-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_IN_DB</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_IN_DB</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name',
         requires=IS_IN_DB(db, db.mytable.myfield, zero=''))
</pre>
  used for reference fields, rendered as a dropbox<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_IN_DB-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dbset</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">label</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">value not in database</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">orderby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">groupby</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">cache</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">multiple</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">zero</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">sort</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">_and</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_self_id"></a><span class="summary-sig-name">set_self_id</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">id</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB.set_self_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="build_set"></a><span class="summary-sig-name">build_set</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB.build_set">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="options"></a><span class="summary-sig-name">options</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">zero</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB.options">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dbset</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">label</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">value not in database</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">orderby</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">groupby</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">cache</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">multiple</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">zero</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">sort</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">_and</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_DB.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_IN_SET-class.html version [9aff693eab].





































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_IN_SET</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_IN_SET
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_IN_SET-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_IN_SET</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SET">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_IN_SET</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.validators.IS_IN_SUBSET-class.html">IS_IN_SUBSET</a>
</dd></dl>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name',
         requires=IS_IN_SET(['max', 'john'],zero=''))
</pre>
  the argument of IS_IN_SET must be a list or set
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET([<span class="py-string">'max'</span>, <span class="py-string">'john'</span>])(<span class="py-string">'max'</span>)
<span class="py-output">('max', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET([<span class="py-string">'max'</span>, <span class="py-string">'john'</span>])(<span class="py-string">'massimo'</span>)
<span class="py-output">('massimo', 'value not allowed')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET([<span class="py-string">'max'</span>, <span class="py-string">'john'</span>], multiple=True)((<span class="py-string">'max'</span>, <span class="py-string">'john'</span>))
<span class="py-output">(('max', 'john'), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET([<span class="py-string">'max'</span>, <span class="py-string">'john'</span>], multiple=True)((<span class="py-string">'bill'</span>, <span class="py-string">'john'</span>))
<span class="py-output">(('bill', 'john'), 'value not allowed')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET((<span class="py-string">'id1'</span>,<span class="py-string">'id2'</span>), [<span class="py-string">'first label'</span>,<span class="py-string">'second label'</span>])(<span class="py-string">'id1'</span>) <span class="py-comment"># Traditional way</span>
<span class="py-output">('id1', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET({<span class="py-string">'id1'</span>:<span class="py-string">'first label'</span>, <span class="py-string">'id2'</span>:<span class="py-string">'second label'</span>})(<span class="py-string">'id1'</span>)
<span class="py-output">('id1', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> itertools
<span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET(itertools.chain([<span class="py-string">'1'</span>,<span class="py-string">'3'</span>,<span class="py-string">'5'</span>],[<span class="py-string">'2'</span>,<span class="py-string">'4'</span>,<span class="py-string">'6'</span>]))(<span class="py-string">'1'</span>)
<span class="py-output">('1', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_IN_SET([(<span class="py-string">'id1'</span>,<span class="py-string">'first label'</span>), (<span class="py-string">'id2'</span>,<span class="py-string">'second label'</span>)])(<span class="py-string">'id1'</span>) <span class="py-comment"># Redundant way</span>
<span class="py-output">('id1', None)</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_IN_SET-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">theset</span>,
        <span class="summary-sig-arg">labels</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">value not allowed</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">multiple</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">zero</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">sort</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SET.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="options"></a><span class="summary-sig-name">options</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">zero</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SET.options">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SET.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">theset</span>,
        <span class="sig-arg">labels</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">value not allowed</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">multiple</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">zero</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">sort</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SET.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_IN_SUBSET-class.html version [389d421840].










































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_IN_SUBSET</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_IN_SUBSET
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_IN_SUBSET-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_IN_SUBSET</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SUBSET">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+        
         |        
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+    
             |    
     <a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a> --+
                 |
                <strong class="uidshort">IS_IN_SUBSET</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*a</span>,
        <span class="summary-sig-arg">**b</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SUBSET.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_IN_SUBSET-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SUBSET.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a></code></b>:
      <code><a href="web2py.gluon.validators.IS_IN_SET-class.html#options">options</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*a</span>,
        <span class="sig-arg">**b</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SUBSET.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_IN_SET-class.html#__init__">IS_IN_SET.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IN_SUBSET.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.validators.IS_IN_SET-class.html#__call__">IS_IN_SET.__call__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_IPV4-class.html version [cbb515ef29].



















































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_IPV4</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_IPV4
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_IPV4-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_IPV4</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IPV4">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_IPV4</strong>
</pre>

<hr />
<pre class="literalblock">

Checks if field's value is an IP version 4 address in decimal form. Can
be set to force addresses from certain range.

IPv4 regex taken from: http://regexlib.com/REDetails.aspx?regexp_id=1411

Arguments:

minip: lowest allowed address; accepts:
       str, eg. 192.168.0.1
       list or tuple of octets, eg. [192, 168, 0, 1]
maxip: highest allowed address; same as above
invert: True to allow addresses only from outside of given range; note
        that range boundaries are not matched this way
is_localhost: localhost address treatment:
              None (default): indifferent
              True (enforce): query address must match localhost address
                              (127.0.0.1)
              False (forbid): query address must not match localhost
                              address
is_private: same as above, except that query address is checked against
            two address ranges: 172.16.0.0 - 172.31.255.255 and
            192.168.0.0 - 192.168.255.255
is_automatic: same as above, except that query address is checked against
              one address range: 169.254.0.0 - 169.254.255.255

Minip and maxip may also be lists or tuples of addresses in all above
forms (str, int, list / tuple), allowing setup of multiple address ranges:

    minip = (minip1, minip2, ... minipN)
               |       |           |
               |       |           |
    maxip = (maxip1, maxip2, ... maxipN)

Longer iterable will be truncated to match length of shorter one.

Examples::

    #Check for valid IPv4 address:
    INPUT(_type='text', _name='name', requires=IS_IPV4())

    #Check for valid IPv4 address belonging to specific range:
    INPUT(_type='text', _name='name',
        requires=IS_IPV4(minip='100.200.0.0', maxip='100.200.255.255'))

    #Check for valid IPv4 address belonging to either 100.110.0.0 -
    #100.110.255.255 or 200.50.0.0 - 200.50.0.255 address range:
    INPUT(_type='text', _name='name',
        requires=IS_IPV4(minip=('100.110.0.0', '200.50.0.0'),
                         maxip=('100.110.255.255', '200.50.0.255')))

    #Check for valid IPv4 address belonging to private address space:
    INPUT(_type='text', _name='name', requires=IS_IPV4(is_private=True))

    #Check for valid IPv4 address that is not a localhost address:
    INPUT(_type='text', _name='name', requires=IS_IPV4(is_localhost=False))

&gt;&gt;&gt; IS_IPV4()('1.2.3.4')
('1.2.3.4', None)
&gt;&gt;&gt; IS_IPV4()('255.255.255.255')
('255.255.255.255', None)
&gt;&gt;&gt; IS_IPV4()('1.2.3.4 ')
('1.2.3.4 ', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4()('1.2.3.4.5')
('1.2.3.4.5', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4()('123.123')
('123.123', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4()('1111.2.3.4')
('1111.2.3.4', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4()('0111.2.3.4')
('0111.2.3.4', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4()('256.2.3.4')
('256.2.3.4', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4()('300.2.3.4')
('300.2.3.4', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4(minip='1.2.3.4', maxip='1.2.3.4')('1.2.3.4')
('1.2.3.4', None)
&gt;&gt;&gt; IS_IPV4(minip='1.2.3.5', maxip='1.2.3.9', error_message='bad ip')('1.2.3.4')
('1.2.3.4', 'bad ip')
&gt;&gt;&gt; IS_IPV4(maxip='1.2.3.4', invert=True)('127.0.0.1')
('127.0.0.1', None)
&gt;&gt;&gt; IS_IPV4(maxip='1.2.3.4', invert=True)('1.2.3.4')
('1.2.3.4', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4(is_localhost=True)('127.0.0.1')
('127.0.0.1', None)
&gt;&gt;&gt; IS_IPV4(is_localhost=True)('1.2.3.4')
('1.2.3.4', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4(is_localhost=False)('127.0.0.1')
('127.0.0.1', 'enter valid IPv4 address')
&gt;&gt;&gt; IS_IPV4(maxip='100.0.0.0', is_localhost=True)('127.0.0.1')
('127.0.0.1', 'enter valid IPv4 address')

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_IPV4-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">minip</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">0.0.0.0</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">maxip</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">255.255.255.255</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">invert</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">is_localhost</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">is_private</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">is_automatic</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter valid IPv4 address</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IPV4.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IPV4.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.validators.IS_IPV4-class.html#regex" class="summary-name">regex</a> = <code title="re.compile(r'^(([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d\d|\
2[0-4]\d|25[0-5])$')">re.compile(r'^<code class="re-group">(</code><code class="re-group">(</code><code class="re-group">[</code>1<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">?</code>\d<code class="re-op">|</code>1\d\d<code class="re-op">|</code>2<code class="re-group">[</code>0<code class="re-op">-</code>4<code class="re-group">]</code>\d<code class="re-op">|</code>25<code class="re-group">[</code>0<code class="re-op">-</code>5<code class="re-group">]</code><code class="re-group">)</code>\.<code class="re-group">)</code><code class="re-op">{3}</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="numbers"></a><span class="summary-name">numbers</span> = <code title="(16777216, 65536, 256, 1)"><code class="variable-group">(</code>16777216<code class="variable-op">, </code>65536<code class="variable-op">, </code>256<code class="variable-op">, </code>1<code class="variable-group">)</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="localhost"></a><span class="summary-name">localhost</span> = <code title="2130706433">2130706433</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="private"></a><span class="summary-name">private</span> = <code title="((2886729728, 2886795263), (3232235520, 3232301055))"><code class="variable-group">(</code><code class="variable-group">(</code>2886729728<code class="variable-op">, </code>2886795263<code class="variable-group">)</code><code class="variable-op">, </code><code class="variable-group">(</code>3232235520<code class="variable-op">, </code>3232301055<code class="variable-group">)</code><code class="variable-group">)</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="automatic"></a><span class="summary-name">automatic</span> = <code title="(2851995648, 2852061183)"><code class="variable-group">(</code>2851995648<code class="variable-op">, </code>2852061183<code class="variable-group">)</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">minip</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">0.0.0.0</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">maxip</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">255.255.255.255</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">invert</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">is_localhost</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">is_private</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">is_automatic</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter valid IPv4 address</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_IPV4.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="regex"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">regex</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'^<code class="re-group">(</code><code class="re-group">(</code><code class="re-group">[</code>1<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">?</code>\d<code class="re-op">|</code>1\d\d<code class="re-op">|</code>2<code class="re-group">[</code>0<code class="re-op">-</code>4<code class="re-group">]</code>\d<code class="re-op">|</code>25<code class="re-group">[</code>0<code class="re-op">-</code>5<code class="re-group">]</code><code class="re-group">)</code>\.<code class="re-group">)</code><code class="re-op">{3}</code><code class="re-group">(</code><code class="re-group">[</code>1<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">?</code>\d<code class="re-op">|</code>1\d\d<code class="re-op">|</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
2<code class="re-group">[</code>0<code class="re-op">-</code>4<code class="re-group">]</code>\d<code class="re-op">|</code>25<code class="re-group">[</code>0<code class="re-op">-</code>5<code class="re-group">]</code><code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_LENGTH-class.html version [c75fdddd52].










































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_LENGTH</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_LENGTH
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_LENGTH-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_LENGTH</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LENGTH">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_LENGTH</strong>
</pre>

<hr />
<p>Checks if length of field's value fits between given boundaries. Works
  for both text and file inputs.</p>
  <p>Arguments:</p>
  <p>maxsize: maximum allowed length / size minsize: minimum allowed length
  / size</p>
  Examples:
<pre class="literalblock">
   #Check if text string is shorter than 33 characters:
   INPUT(_type='text', _name='name', requires=IS_LENGTH(32))

   #Check if password string is longer than 5 characters:
   INPUT(_type='password', _name='name', requires=IS_LENGTH(minsize=6))

   #Check if uploaded file has size between 1KB and 1MB:
   INPUT(_type='file', _name='name', requires=IS_LENGTH(1048576, 1024))

   &gt;&gt;&gt; IS_LENGTH()('')
   ('', None)
   &gt;&gt;&gt; IS_LENGTH()('1234567890')
   ('1234567890', None)
   &gt;&gt;&gt; IS_LENGTH(maxsize=5, minsize=0)('1234567890')  # too long
   ('1234567890', 'enter from 0 to 5 characters')
   &gt;&gt;&gt; IS_LENGTH(maxsize=50, minsize=20)('1234567890')  # too short
   ('1234567890', 'enter from 20 to 50 characters')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_LENGTH-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">maxsize</span>=<span class="summary-sig-default">255</span>,
        <span class="summary-sig-arg">minsize</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter from %(min)g to %(max)g characters</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LENGTH.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LENGTH.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">maxsize</span>=<span class="sig-default">255</span>,
        <span class="sig-arg">minsize</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter from %(min)g to %(max)g characters</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LENGTH.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_LIST_OF-class.html version [26a870e373].












































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_LIST_OF</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_LIST_OF
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_LIST_OF-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_LIST_OF</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LIST_OF">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_LIST_OF</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_LIST_OF-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LIST_OF.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LIST_OF.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LIST_OF.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_LOWER-class.html version [b9a3c963ad].




















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_LOWER</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_LOWER
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_LOWER-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_LOWER</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LOWER">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_LOWER</strong>
</pre>

<hr />
convert to lower case
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_LOWER()(<span class="py-string">'ABC'</span>)
<span class="py-output">('abc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_LOWER()(<span class="py-string">'&#209;'</span>)
<span class="py-output">('\xc3\xb1', None)</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_LOWER.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_MATCH-class.html version [f2f2d3dee0].


































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_MATCH</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_MATCH
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_MATCH-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_MATCH</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_MATCH">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_MATCH</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.validators.IS_ALPHANUMERIC-class.html">IS_ALPHANUMERIC</a>
</dd></dl>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_MATCH('.+'))
</pre>
  the argument of IS_MATCH is a regular expression:
<pre class="literalblock">
   &gt;&gt;&gt; IS_MATCH('.+')('hello')
   ('hello', None)

   &gt;&gt;&gt; IS_MATCH('.+')('')
   ('', 'invalid expression')
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_MATCH-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">expression</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid expression</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">strict</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_MATCH.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_MATCH.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">expression</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">invalid expression</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">strict</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_MATCH.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_NOT_EMPTY-class.html version [bbf8d9338b].












































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_NOT_EMPTY</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_NOT_EMPTY
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_NOT_EMPTY</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_EMPTY">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_NOT_EMPTY</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_NOT_EMPTY())

   &gt;&gt;&gt; IS_NOT_EMPTY()(1)
   (1, None)
   &gt;&gt;&gt; IS_NOT_EMPTY()(0)
   (0, None)
   &gt;&gt;&gt; IS_NOT_EMPTY()('x')
   ('x', None)
   &gt;&gt;&gt; IS_NOT_EMPTY()(' x ')
   ('x', None)
   &gt;&gt;&gt; IS_NOT_EMPTY()(None)
   (None, 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY()('')
   ('', 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY()('  ')
   ('', 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY()(' \n\t')
   ('', 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY()([])
   ([], 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY(empty_regex='def')('def')
   ('', 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY(empty_regex='de[fg]')('deg')
   ('', 'enter a value')
   &gt;&gt;&gt; IS_NOT_EMPTY(empty_regex='def')('abc')
   ('abc', None)
</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a value</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">empty_regex</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_EMPTY.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_EMPTY.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a value</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">empty_regex</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_EMPTY.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_NOT_IN_DB-class.html version [fbecc9eaf1].









































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_NOT_IN_DB</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_NOT_IN_DB
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_NOT_IN_DB</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_IN_DB">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_NOT_IN_DB</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_NOT_IN_DB(db, db.table))
</pre>
  makes the field unique<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dbset</span>,
        <span class="summary-sig-arg">field</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">value already in database or empty</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">allowed_override</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_IN_DB.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_self_id"></a><span class="summary-sig-name">set_self_id</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">id</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_IN_DB.set_self_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_IN_DB.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dbset</span>,
        <span class="sig-arg">field</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">value already in database or empty</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">allowed_override</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_NOT_IN_DB.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_SLUG-class.html version [cea5b54853].































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_SLUG</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_SLUG
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_SLUG-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_SLUG</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_SLUG">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_SLUG</strong>
</pre>

<hr />
convert arbitrary text string to a slug
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc123'</span>)
<span class="py-output">('abc123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'ABC123'</span>)
<span class="py-output">('abc123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc-123'</span>)
<span class="py-output">('abc-123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc--123'</span>)
<span class="py-output">('abc-123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc 123'</span>)
<span class="py-output">('abc-123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc  _123'</span>)
<span class="py-output">('abc-123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'-abc-'</span>)
<span class="py-output">('abc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'--a--b--_ -c--'</span>)
<span class="py-output">('a-b-c', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc&amp;amp;123'</span>)
<span class="py-output">('abc123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc&amp;amp;123&amp;amp;def'</span>)
<span class="py-output">('abc123def', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'&#241;'</span>)
<span class="py-output">('n', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(maxlen=4)(<span class="py-string">'abc123'</span>)
<span class="py-output">('abc1', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG()(<span class="py-string">'abc_123'</span>)
<span class="py-output">('abc-123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(keep_underscores=False)(<span class="py-string">'abc_123'</span>)
<span class="py-output">('abc-123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(keep_underscores=True)(<span class="py-string">'abc_123'</span>)
<span class="py-output">('abc_123', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(check=False)(<span class="py-string">'abc'</span>)
<span class="py-output">('abc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(check=True)(<span class="py-string">'abc'</span>)
<span class="py-output">('abc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(check=False)(<span class="py-string">'a bc'</span>)
<span class="py-output">('a-bc', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_SLUG(check=True)(<span class="py-string">'a bc'</span>)
<span class="py-output">('a bc', 'must be slug')</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_SLUG-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">maxlen</span>=<span class="summary-sig-default">80</span>,
        <span class="summary-sig-arg">check</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">must be slug</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">keep_underscores</span>=<span class="summary-sig-default">True</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_SLUG.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_SLUG.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="urlify"></a><span class="summary-sig-name">urlify</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">maxlen</span>=<span class="summary-sig-default">80</span>,
        <span class="summary-sig-arg">keep_underscores</span>=<span class="summary-sig-default">True</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_SLUG.urlify">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">maxlen</span>=<span class="sig-default">80</span>,
        <span class="sig-arg">check</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">must be slug</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">keep_underscores</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_SLUG.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_STRONG-class.html version [13727bb29d].






























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_STRONG</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_STRONG
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_STRONG-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_STRONG</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_STRONG">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">IS_STRONG</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='password', _name='passwd',
       requires=IS_STRONG(min=10, special=2, upper=2))
</pre>
  enforces complexity requirements on a field<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_STRONG-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">min</span>=<span class="summary-sig-default">8</span>,
        <span class="summary-sig-arg">max</span>=<span class="summary-sig-default">20</span>,
        <span class="summary-sig-arg">upper</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">lower</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">number</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">special</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">specials</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">~!@#$%^&amp;*()_+-=?&lt;&gt;,.:;{}[]|</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">invalid</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"> &quot;</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default">1</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_STRONG.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_STRONG.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">min</span>=<span class="sig-default">8</span>,
        <span class="sig-arg">max</span>=<span class="sig-default">20</span>,
        <span class="sig-arg">upper</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">lower</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">number</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">special</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">specials</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">~!@#$%^&amp;*()_+-=?&lt;&gt;,.:;{}[]|</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">invalid</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"> &quot;</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_STRONG.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_TIME-class.html version [804c06f151].
















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_TIME</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_TIME
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_TIME-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_TIME</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_TIME">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_TIME</strong>
</pre>

<hr />
example:
<pre class="literalblock">
   INPUT(_type='text', _name='name', requires=IS_TIME())
</pre>
  <p>understands the following formats hh:mm:ss [am/pm] hh:mm [am/pm] hh 
  [am/pm]</p>
  [am/pm] is optional, ':' can be replaced by any other non-space 
  non-digit
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'21:30'</span>)
<span class="py-output">(datetime.time(21, 30), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'21-30'</span>)
<span class="py-output">(datetime.time(21, 30), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'21.30'</span>)
<span class="py-output">(datetime.time(21, 30), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'21:30:59'</span>)
<span class="py-output">(datetime.time(21, 30, 59), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'5:30'</span>)
<span class="py-output">(datetime.time(5, 30), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'5:30 am'</span>)
<span class="py-output">(datetime.time(5, 30), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'5:30 pm'</span>)
<span class="py-output">(datetime.time(17, 30), None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'5:30 whatever'</span>)
<span class="py-output">('5:30 whatever', 'enter time as hh:mm:ss (seconds, am, pm optional)')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'5:30 20'</span>)
<span class="py-output">('5:30 20', 'enter time as hh:mm:ss (seconds, am, pm optional)')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'24:30'</span>)
<span class="py-output">('24:30', 'enter time as hh:mm:ss (seconds, am, pm optional)')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'21:60'</span>)
<span class="py-output">('21:60', 'enter time as hh:mm:ss (seconds, am, pm optional)')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">'21:30::'</span>)
<span class="py-output">('21:30::', 'enter time as hh:mm:ss (seconds, am, pm optional)')</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_TIME()(<span class="py-string">''</span>)
<span class="py-output">('', 'enter time as hh:mm:ss (seconds, am, pm optional)')</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_TIME-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter time as hh:mm:ss (seconds, am, pm optional)</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_TIME.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_TIME.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter time as hh:mm:ss (seconds, am, pm optional)</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_TIME.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html version [8fe772013c].




























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_UPLOAD_FILENAME</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_UPLOAD_FILENAME
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_UPLOAD_FILENAME</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_UPLOAD_FILENAME">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_UPLOAD_FILENAME</strong>
</pre>

<hr />
<pre class="literalblock">

Checks if name and extension of file uploaded through file input matches
given criteria.

Does *not* ensure the file type in any way. Returns validation failure
if no data was uploaded.

Arguments::

filename: filename (before dot) regex
extension: extension (after dot) regex
lastdot: which dot should be used as a filename / extension separator:
         True means last dot, eg. file.png -&gt; file / png
         False means first dot, eg. file.tar.gz -&gt; file / tar.gz
case: 0 - keep the case, 1 - transform the string into lowercase (default),
      2 - transform the string into uppercase

If there is no dot present, extension checks will be done against empty
string and filename checks against whole value.

Examples::

    #Check if file has a pdf extension (case insensitive):
    INPUT(_type='file', _name='name',
        requires=IS_UPLOAD_FILENAME(extension='pdf'))

    #Check if file has a tar.gz extension and name starting with backup:
    INPUT(_type='file', _name='name',
        requires=IS_UPLOAD_FILENAME(filename='backup.*',
            extension='tar.gz', lastdot=False))

    #Check if file has no extension and name matching README
    #(case sensitive):
    INPUT(_type='file', _name='name',
        requires=IS_UPLOAD_FILENAME(filename='^README$',
            extension='^$', case=0))

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">extension</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">lastdot</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">case</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter valid filename</code><code class="variable-quote">'</code></span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_UPLOAD_FILENAME.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_UPLOAD_FILENAME.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">extension</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">lastdot</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">case</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter valid filename</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_UPLOAD_FILENAME.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_UPPER-class.html version [a47aa53cb4].




















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_UPPER</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_UPPER
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_UPPER-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_UPPER</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_UPPER">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_UPPER</strong>
</pre>

<hr />
convert to upper case
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>IS_UPPER()(<span class="py-string">'abc'</span>)
<span class="py-output">('ABC', None)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>IS_UPPER()(<span class="py-string">'&#241;'</span>)
<span class="py-output">('\xc3\x91', None)</span></pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_UPPER.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.IS_URL-class.html version [36554a2958].









































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.IS_URL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;IS_URL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.IS_URL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IS_URL</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_URL">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+    
         |    
 <a href="web2py.gluon.validators.Validator-class.html">Validator</a> --+
             |
            <strong class="uidshort">IS_URL</strong>
</pre>

<hr />
<pre class="literalblock">

Rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The string breaks any of the HTTP syntactic rules
   * The URL scheme specified (if one is specified) is not 'http' or 'https'
   * The top-level domain (if a host name is specified) does not exist

(These rules are based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html)

This function only checks the URL's syntax. It does not check that the URL
points to a real document, for example, or that it otherwise makes sense
semantically. This function does automatically prepend 'http://' in front
of a URL in the case of an abbreviated URL (e.g. 'google.ca').

If the parameter mode='generic' is used, then this function's behavior
changes. It then rejects a URL string if any of the following is true:
   * The string is empty or None
   * The string uses characters that are not allowed in a URL
   * The URL scheme specified (if one is specified) is not valid

(These rules are based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html)

The list of allowed schemes is customizable with the allowed_schemes
parameter. If you exclude None from the list, then abbreviated URLs
(lacking a scheme such as 'http') will be rejected.

The default prepended scheme is customizable with the prepend_scheme
parameter. If you set prepend_scheme to None then prepending will be
disabled. URLs that require prepending to parse will still be accepted,
but the return value will not be modified.

IS_URL is compatible with the Internationalized Domain Name (IDN) standard
specified in RFC 3490 (http://tools.ietf.org/html/rfc3490). As a result,
URLs can be regular strings or unicode strings.
If the URL's domain component (e.g. google.ca) contains non-US-ASCII
letters, then the domain will be converted into Punycode (defined in
RFC 3492, http://tools.ietf.org/html/rfc3492). IS_URL goes a bit beyond
the standards, and allows non-US-ASCII characters to be present in the path
and query components of the URL as well. These non-US-ASCII characters will
be escaped using the standard '%20' type syntax. e.g. the unicode
character with hex code 0x4e86 will become '%4e%86'

Code Examples::

    INPUT(_type='text', _name='name', requires=IS_URL())
    &gt;&gt;&gt; IS_URL()('abc.com')
    ('http://abc.com', None)

    INPUT(_type='text', _name='name', requires=IS_URL(mode='generic'))
    &gt;&gt;&gt; IS_URL(mode='generic')('abc.com')
    ('abc.com', None)

    INPUT(_type='text', _name='name',
        requires=IS_URL(allowed_schemes=['https'], prepend_scheme='https'))
    &gt;&gt;&gt; IS_URL(allowed_schemes=['https'], prepend_scheme='https')('https://abc.com')
    ('https://abc.com', None)

    INPUT(_type='text', _name='name',
        requires=IS_URL(prepend_scheme='https'))
    &gt;&gt;&gt; IS_URL(prepend_scheme='https')('abc.com')
    ('https://abc.com', None)

    INPUT(_type='text', _name='name',
        requires=IS_URL(mode='generic', allowed_schemes=['ftps', 'https'],
            prepend_scheme='https'))
    &gt;&gt;&gt; IS_URL(mode='generic', allowed_schemes=['ftps', 'https'], prepend_scheme='https')('https://abc.com')
    ('https://abc.com', None)
    &gt;&gt;&gt; IS_URL(mode='generic', allowed_schemes=['ftps', 'https', None], prepend_scheme='https')('abc.com')
    ('abc.com', None)

@author: Jonathan Benn

</pre><br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_URL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error_message</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid URL</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">allowed_schemes</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">prepend_scheme</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code></span>)</span><br />
      :param error_message: a string, the error message to give the end user
    if the URL does not validate
:param allowed_schemes: a list containing strings or None.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_URL.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.IS_URL-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      :param value: a unicode or regular string, the URL to validate
:returns: a (string, string) tuple, where tuple[0] is the modified
    input value and tuple[1] is either None (success!) or the
    string error_message.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_URL.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.validators.Validator-class.html">Validator</a></code></b>:
      <code><a href="web2py.gluon.validators.Validator-class.html#formatter">formatter</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">error_message</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">enter a valid URL</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">allowed_schemes</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">prepend_scheme</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">http</code><code class="variable-quote">'</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_URL.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param error_message: a string, the error message to give the end user
    if the URL does not validate
:param allowed_schemes: a list containing strings or None. Each element
    is a scheme the inputed URL is allowed to use
:param prepend_scheme: a string, this scheme is prepended if it's
    necessary to make the URL valid

</pre>
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__call__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
    <br /><em class="fname">(Call operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#IS_URL.__call__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

:param value: a unicode or regular string, the URL to validate
:returns: a (string, string) tuple, where tuple[0] is the modified
    input value and tuple[1] is either None (success!) or the
    string error_message. The input value will never be modified in the
    case of an error. However, if there is success then the input URL
    may be modified to (1) prepend a scheme, and/or (2) convert a
    non-compliant unicode URL into a compliant US-ASCII version.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.validators.Validator-class.html version [288c8a8613].

















































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.validators.Validator</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.validators-module.html">Module&nbsp;validators</a> ::
        Class&nbsp;Validator
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.validators.Validator-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Validator</h1><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#Validator">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Validator</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
    <a href="web2py.gluon.validators.CLEANUP-class.html">CLEANUP</a>,
    <a href="web2py.gluon.validators.IS_MATCH-class.html">IS_MATCH</a>,
    <a href="web2py.gluon.validators.IS_DATE-class.html">IS_DATE</a>,
    <a href="web2py.gluon.validators.IS_DATETIME-class.html">IS_DATETIME</a>,
    <a href="web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html">IS_DECIMAL_IN_RANGE</a>,
    <a href="web2py.gluon.validators.IS_EMAIL-class.html">IS_EMAIL</a>,
    <a href="web2py.gluon.validators.IS_EMPTY_OR-class.html">IS_EMPTY_OR</a>,
    <a href="web2py.gluon.validators.IS_EQUAL_TO-class.html">IS_EQUAL_TO</a>,
    <a href="web2py.gluon.validators.IS_EXPR-class.html">IS_EXPR</a>,
    <a href="web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html">IS_FLOAT_IN_RANGE</a>,
    <a href="web2py.gluon.validators.IS_IMAGE-class.html">IS_IMAGE</a>,
    <a href="web2py.gluon.validators.IS_INT_IN_RANGE-class.html">IS_INT_IN_RANGE</a>,
    <a href="web2py.gluon.validators.IS_IN_DB-class.html">IS_IN_DB</a>,
    <a href="web2py.gluon.validators.IS_IN_SET-class.html">IS_IN_SET</a>,
    <a href="web2py.gluon.validators.IS_IPV4-class.html">IS_IPV4</a>,
    <a href="web2py.gluon.validators.IS_LENGTH-class.html">IS_LENGTH</a>,
    <a href="web2py.gluon.validators.IS_LIST_OF-class.html">IS_LIST_OF</a>,
    <a href="web2py.gluon.validators.IS_LOWER-class.html">IS_LOWER</a>,
    <a href="web2py.gluon.validators.IS_NOT_EMPTY-class.html">IS_NOT_EMPTY</a>,
    <a href="web2py.gluon.validators.IS_NOT_IN_DB-class.html">IS_NOT_IN_DB</a>,
    <a href="web2py.gluon.validators.IS_SLUG-class.html">IS_SLUG</a>,
    <a href="web2py.gluon.validators.IS_TIME-class.html">IS_TIME</a>,
    <a href="web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html">IS_UPLOAD_FILENAME</a>,
    <a href="web2py.gluon.validators.IS_UPPER-class.html">IS_UPPER</a>,
    <a href="web2py.gluon.validators.IS_URL-class.html">IS_URL</a>,
    <a href="web2py.gluon.validators.IS_GENERIC_URL-class.html">IS_GENERIC_URL</a>,
    <a href="web2py.gluon.validators.IS_HTTP_URL-class.html">IS_HTTP_URL</a>
</dd></dl>

<hr />
<p>Root for all validators, mainly for documentation purposes.</p>
  <p>Validators are classes used to validate input fields (including forms 
  generated from database tables).</p>
  Here is an example of using a validator with a FORM:
<pre class="literalblock">
   INPUT(_name='a', requires=IS_INT_IN_RANGE(0, 10))
</pre>
  Here is an example of how to require a validator for a table 
  field:
<pre class="literalblock">
   db.define_table('person', SQLField('name'))
   db.person.name.requires=IS_NOT_EMPTY()
</pre>
  Validators are always assigned using the requires attribute of a 
  field. A field can have a single validator or multiple validators. 
  Multiple validators are made part of a list:
<pre class="literalblock">
   db.person.name.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'person.id')]
</pre>
  <p>Validators are called by the function accepts on a FORM or other HTML 
  helper object that contains a form. They are always called in the order 
  in which they are listed.</p>
  Built-in validators have constructors that take the optional argument 
  error message which allows you to change the default error message. Here 
  is an example of a validator on a database table:
<pre class="literalblock">
   db.person.name.requires=IS_NOT_EMPTY(error_message=T('fill this'))
</pre>
  <p>where we have used the translation operator T to allow for 
  internationalization.</p>
  Notice that default error messages are not translated.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.validators.Validator-class.html#formatter" class="summary-sig-name">formatter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      For some validators returns a formatted version (matching the 
      validator) of value.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.validators-pysrc.html#Validator.formatter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="formatter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">formatter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.validators-pysrc.html#Validator.formatter">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  For some validators returns a formatted version (matching the 
  validator) of value. Otherwise just returns the value.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.widget-module.html version [55a9443924].

































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.widget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;widget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.widget-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module widget</h1><span class="codelink"><a href="web2py.gluon.widget-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  The widget is called from web2py.<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="exceptions.Exception-class.html" class="summary-name">BaseException</a><br />
      Common base class for all non-exit exceptions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.widget.IO-class.html" class="summary-name">IO</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.widget.web2pyDialog-class.html" class="summary-name">web2pyDialog</a><br />
      Main window dialog
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="try_start_browser"></a><span class="summary-sig-name">try_start_browser</span>(<span class="summary-sig-arg">url</span>)</span><br />
      Try to start the default browser</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#try_start_browser">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start_browser"></a><span class="summary-sig-name">start_browser</span>(<span class="summary-sig-arg">ip</span>,
        <span class="summary-sig-arg">port</span>)</span><br />
      Starts the default browser</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#start_browser">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="presentation"></a><span class="summary-sig-name">presentation</span>(<span class="summary-sig-arg">root</span>)</span><br />
      Draw the splash screen</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#presentation">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="console"></a><span class="summary-sig-name">console</span>()</span><br />
      Defines the behavior of the console web2py execution</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#console">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">cron</span>=<span class="summary-sig-default">True</span>)</span><br />
      Start server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ProgramName"></a><span class="summary-name">ProgramName</span> = <code title="'web2py Web Framework'"><code class="variable-quote">'</code><code class="variable-string">web2py Web Framework</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.widget-module.html#ProgramAuthor" class="summary-name">ProgramAuthor</a> = <code title="'Created by Massimo Di Pierro, Copyright 2007-2011'"><code class="variable-quote">'</code><code class="variable-string">Created by Massimo Di Pierro, Copyright 2007-</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ProgramVersion"></a><span class="summary-name">ProgramVersion</span> = <code title="'Version 1.98.2 (2011-08-03 18:44:38)'"><code class="variable-quote">'</code><code class="variable-string">Version 1.98.2 (2011-08-03 18:44:38)</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.widget-module.html#ProgramInfo" class="summary-name">ProgramInfo</a> = <code title="'''web2py Web Framework
                 Created by Massimo Di Pierro, Copyright 2007-2011
                 Version 1.98.2 (2011-08-03 18:44:38)'''"><code class="variable-quote">'</code><code class="variable-string">web2py Web Framework\n                 Created </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="msg"></a><span class="summary-name">msg</span> = <code title="msg % sys.version">msg % sys.version</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(&quot;web2py&quot;)">logging.getLogger(&quot;web2py&quot;)</code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="ProgramAuthor"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ProgramAuthor</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">Created by Massimo Di Pierro, Copyright 2007-2011</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ProgramInfo"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ProgramInfo</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">web2py Web Framework</code>
<code class="variable-string">                 Created by Massimo Di Pierro, Copyright 2007-2011</code>
<code class="variable-string">                 Version 1.98.2 (2011-08-03 18:44:38)</code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.widget-pysrc.html version [12134bd7a0].









































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.widget</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;widget
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.widget-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.widget-module.html">Module web2py.gluon.widget</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">The widget is called from web2py.</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">cStringIO</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-0', 'time', 'link-0');">time</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable web2py.gluon.dal.thread=web2py.gluon.dal-module.html#thread,Variable web2py.gluon.rewrite.thread=web2py.gluon.rewrite-module.html#thread"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-1', 'thread', 'link-1');">thread</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Variable web2py.gluon.rocket.Connection.socket=web2py.gluon.rocket.Connection-class.html#socket"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-2', 'socket', 'link-2');">socket</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">signal</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">math</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Module web2py.gluon.newcron=web2py.gluon.newcron-module.html"><a title="web2py.gluon.newcron" class="py-name" href="#" onclick="return doclink('link-3', 'newcron', 'link-3');">newcron</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Module web2py.gluon.main=web2py.gluon.main-module.html"><a title="web2py.gluon.main" class="py-name" href="#" onclick="return doclink('link-4', 'main', 'link-4');">main</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-5', 'fileutils', 'link-5');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Function web2py.gluon.fileutils.w2p_pack()=web2py.gluon.fileutils-module.html#w2p_pack"><a title="web2py.gluon.fileutils.w2p_pack" class="py-name" href="#" onclick="return doclink('link-6', 'w2p_pack', 'link-6');">w2p_pack</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Function web2py.gluon.fileutils.read_file()=web2py.gluon.fileutils-module.html#read_file"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-7', 'read_file', 'link-7');">read_file</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Function web2py.gluon.fileutils.write_file()=web2py.gluon.fileutils-module.html#write_file"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-8', 'write_file', 'link-8');">write_file</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name" targets="Module web2py.gluon.shell=web2py.gluon.shell-module.html"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-9', 'shell', 'link-9');">shell</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name" targets="Method web2py.gluon.newcron.cronlauncher.run()=web2py.gluon.newcron.cronlauncher-class.html#run,Method web2py.gluon.newcron.extcron.run()=web2py.gluon.newcron.extcron-class.html#run,Method web2py.gluon.newcron.hardcron.run()=web2py.gluon.newcron.hardcron-class.html#run,Method web2py.gluon.newcron.softcron.run()=web2py.gluon.newcron.softcron-class.html#run,Method web2py.gluon.rocket.Listener.run()=web2py.gluon.rocket.Listener-class.html#run,Method web2py.gluon.rocket.Monitor.run()=web2py.gluon.rocket.Monitor-class.html#run,Method web2py.gluon.rocket.Worker.run()=web2py.gluon.rocket.Worker-class.html#run,Function web2py.gluon.shell.run()=web2py.gluon.shell-module.html#run,Method web2py.gluon.tools.Service.run()=web2py.gluon.tools.Service-class.html#run"><a title="web2py.gluon.newcron.cronlauncher.run
web2py.gluon.newcron.extcron.run
web2py.gluon.newcron.hardcron.run
web2py.gluon.newcron.softcron.run
web2py.gluon.rocket.Listener.run
web2py.gluon.rocket.Monitor.run
web2py.gluon.rocket.Worker.run
web2py.gluon.shell.run
web2py.gluon.tools.Service.run" class="py-name" href="#" onclick="return doclink('link-10', 'run', 'link-10');">run</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Function web2py.gluon.compileapp.test()=web2py.gluon.compileapp-module.html#test,Function web2py.gluon.html.test()=web2py.gluon.html-module.html#test,Function web2py.gluon.shell.test()=web2py.gluon.shell-module.html#test"><a title="web2py.gluon.compileapp.test
web2py.gluon.html.test
web2py.gluon.shell.test" class="py-name" href="#" onclick="return doclink('link-11', 'test', 'link-11');">test</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-12" class="py-name" targets="Module web2py.gluon.settings=web2py.gluon.settings-module.html,Variable web2py.gluon.settings.settings=web2py.gluon.settings-module.html#settings"><a title="web2py.gluon.settings
web2py.gluon.settings.settings" class="py-name" href="#" onclick="return doclink('link-12', 'settings', 'link-12');">settings</a></tt> <tt class="py-keyword">import</tt> <tt id="link-13" class="py-name" targets="Variable web2py.gluon.settings.global_settings=web2py.gluon.settings-module.html#global_settings"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-13', 'global_settings', 'link-13');">global_settings</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">,</tt> <tt class="py-name">tkMessageBox</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">taskbar_widget</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-14" class="py-name" targets="Module web2py.gluon.winservice=web2py.gluon.winservice-module.html"><a title="web2py.gluon.winservice" class="py-name" href="#" onclick="return doclink('link-14', 'winservice', 'link-14');">winservice</a></tt> <tt class="py-keyword">import</tt> <tt id="link-15" class="py-name" targets="Function web2py.gluon.winservice.web2py_windows_service_handler()=web2py.gluon.winservice-module.html#web2py_windows_service_handler"><a title="web2py.gluon.winservice.web2py_windows_service_handler" class="py-name" href="#" onclick="return doclink('link-15', 'web2py_windows_service_handler', 'link-15');">web2py_windows_service_handler</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-name">BaseException</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-name">BaseException</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name" targets="Class exceptions.Exception=exceptions.Exception-class.html"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-16', 'Exception', 'link-16');">Exception</a></tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt id="link-17" class="py-name" targets="Variable web2py.gluon.widget.ProgramName=web2py.gluon.widget-module.html#ProgramName"><a title="web2py.gluon.widget.ProgramName" class="py-name" href="#" onclick="return doclink('link-17', 'ProgramName', 'link-17');">ProgramName</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py Web Framework'</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable web2py.gluon.widget.ProgramAuthor=web2py.gluon.widget-module.html#ProgramAuthor"><a title="web2py.gluon.widget.ProgramAuthor" class="py-name" href="#" onclick="return doclink('link-18', 'ProgramAuthor', 'link-18');">ProgramAuthor</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Created by Massimo Di Pierro, Copyright 2007-2011'</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt id="link-19" class="py-name" targets="Variable web2py.gluon.widget.ProgramVersion=web2py.gluon.widget-module.html#ProgramVersion"><a title="web2py.gluon.widget.ProgramVersion" class="py-name" href="#" onclick="return doclink('link-19', 'ProgramVersion', 'link-19');">ProgramVersion</a></tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="web2py.gluon.fileutils.read_file" class="py-name" href="#" onclick="return doclink('link-20', 'read_file', 'link-7');">read_file</a></tt><tt class="py-op">(</tt><tt class="py-string">'VERSION'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method web2py.gluon.sanitizer.XssCleaner.strip()=web2py.gluon.sanitizer.XssCleaner-class.html#strip"><a title="web2py.gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-21', 'strip', 'link-21');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt id="link-22" class="py-name" targets="Variable web2py.gluon.widget.ProgramInfo=web2py.gluon.widget-module.html#ProgramInfo"><a title="web2py.gluon.widget.ProgramInfo" class="py-name" href="#" onclick="return doclink('link-22', 'ProgramInfo', 'link-22');">ProgramInfo</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'''%s</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-string">                 %s</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-string">                 %s'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.widget.ProgramName" class="py-name" href="#" onclick="return doclink('link-23', 'ProgramName', 'link-17');">ProgramName</a></tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name"><a title="web2py.gluon.widget.ProgramAuthor" class="py-name" href="#" onclick="return doclink('link-24', 'ProgramAuthor', 'link-18');">ProgramAuthor</a></tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name"><a title="web2py.gluon.widget.ProgramVersion" class="py-name" href="#" onclick="return doclink('link-25', 'ProgramVersion', 'link-19');">ProgramVersion</a></tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Variable sqlite3.dbapi2.version=sqlite3.dbapi2-module.html#version"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-26', 'version', 'link-26');">version</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'2.4'</tt><tt class="py-op">,</tt> <tt class="py-string">'2.5'</tt><tt class="py-op">,</tt> <tt class="py-string">'2.6'</tt><tt class="py-op">,</tt> <tt class="py-string">'2.7'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">    <tt id="link-27" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-27', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Warning: web2py requires Python 2.4, 2.5 (recommended), 2.6 or 2.7 but you are running:\n%s'</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt id="link-28" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-28', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-29', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">%</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="sqlite3.dbapi2.version" class="py-name" href="#" onclick="return doclink('link-30', 'version', 'link-26');">version</a></tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">    <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.write()=web2py.gluon.dal.DatabaseStoredFile-class.html#write,Method web2py.gluon.debug.Pipe.write()=web2py.gluon.debug.Pipe-class.html#write,Method web2py.gluon.globals.Response.write()=web2py.gluon.globals.Response-class.html#write,Method web2py.gluon.rocket.WSGIWorker.write()=web2py.gluon.rocket.WSGIWorker-class.html#write,Method web2py.gluon.widget.IO.write()=web2py.gluon.widget.IO-class.html#write"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-31', 'write', 'link-31');">write</a></tt><tt class="py-op">(</tt><tt id="link-32" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-32', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt id="link-33" class="py-name" targets="Variable web2py.gluon.cache.logger=web2py.gluon.cache-module.html#logger,Variable web2py.gluon.compileapp.logger=web2py.gluon.compileapp-module.html#logger,Variable web2py.gluon.dal.logger=web2py.gluon.dal-module.html#logger,Variable web2py.gluon.debug.logger=web2py.gluon.debug-module.html#logger,Variable web2py.gluon.main.logger=web2py.gluon.main-module.html#logger,Variable web2py.gluon.newcron.logger=web2py.gluon.newcron-module.html#logger,Variable web2py.gluon.portalocker.logger=web2py.gluon.portalocker-module.html#logger,Variable web2py.gluon.restricted.logger=web2py.gluon.restricted-module.html#logger,Variable web2py.gluon.rewrite.logger=web2py.gluon.rewrite-module.html#logger,Variable web2py.gluon.shell.logger=web2py.gluon.shell-module.html#logger,Variable web2py.gluon.tools.logger=web2py.gluon.tools-module.html#logger,Variable web2py.gluon.utils.logger=web2py.gluon.utils-module.html#logger,Variable web2py.gluon.widget.logger=web2py.gluon.widget-module.html#logger"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-33', 'logger', 'link-33');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"web2py"</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"> </tt>
<a name="IO"></a><div id="IO-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="IO-toggle" onclick="return toggle('IO');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.widget.IO-class.html">IO</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IO-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IO-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt class="py-docstring">"""   """</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"> </tt>
<a name="IO.__init__"></a><div id="IO.__init__-def"><a name="L61"></a><tt class="py-lineno"> 61</tt> <a class="py-toggle" href="#" id="IO.__init__-toggle" onclick="return toggle('IO.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.IO-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IO.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IO.__init__-expanded"><a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-docstring">"""   """</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="IO.write"></a><div id="IO.write-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="IO.write-toggle" onclick="return toggle('IO.write');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.IO-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="IO.write-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IO.write-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-docstring">"""   """</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">__stdout__</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-34', 'write', 'link-31');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'callback'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Method web2py.gluon.sqlhtml.AutocompleteWidget.callback()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#callback,Function web2py.gluon.tools.callback()=web2py.gluon.tools-module.html#callback"><a title="web2py.gluon.sqlhtml.AutocompleteWidget.callback
web2py.gluon.tools.callback" class="py-name" href="#" onclick="return doclink('link-35', 'callback', 'link-35');">callback</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-36', 'write', 'link-31');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="try_start_browser"></a><div id="try_start_browser-def"><a name="L76"></a><tt class="py-lineno"> 76</tt> <a class="py-toggle" href="#" id="try_start_browser-toggle" onclick="return toggle('try_start_browser');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget-module.html#try_start_browser">try_start_browser</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="try_start_browser-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="try_start_browser-expanded"><a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-docstring">""" Try to start the default browser """</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">webbrowser</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-name">webbrowser</tt><tt class="py-op">.</tt><tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-37" class="py-name" targets="Method web2py.gluon.tools.Auth.url()=web2py.gluon.tools.Auth-class.html#url,Method web2py.gluon.tools.Crud.url()=web2py.gluon.tools.Crud-class.html#url"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-37', 'url', 'link-37');">url</a></tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'warning: unable to detect your browser'</tt> </tt>
</div><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"> </tt>
<a name="start_browser"></a><div id="start_browser-def"><a name="L86"></a><tt class="py-lineno"> 86</tt> <a class="py-toggle" href="#" id="start_browser-toggle" onclick="return toggle('start_browser');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget-module.html#start_browser">start_browser</a><tt class="py-op">(</tt><tt class="py-param">ip</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="start_browser-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="start_browser-expanded"><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-docstring">""" Starts the default browser """</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'please visit:'</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'\thttp://%s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'starting browser...'</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">    <tt id="link-38" class="py-name" targets="Function web2py.gluon.widget.try_start_browser()=web2py.gluon.widget-module.html#try_start_browser"><a title="web2py.gluon.widget.try_start_browser" class="py-name" href="#" onclick="return doclink('link-38', 'try_start_browser', 'link-38');">try_start_browser</a></tt><tt class="py-op">(</tt><tt class="py-string">'http://%s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"> </tt>
<a name="presentation"></a><div id="presentation-def"><a name="L94"></a><tt class="py-lineno"> 94</tt> <a class="py-toggle" href="#" id="presentation-toggle" onclick="return toggle('presentation');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget-module.html#presentation">presentation</a><tt class="py-op">(</tt><tt class="py-param">root</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="presentation-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="presentation-expanded"><a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">    <tt class="py-docstring">""" Draw the splash screen """</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt id="link-39" class="py-name" targets="Variable web2py.gluon.import_all.root=web2py.gluon.import_all-module.html#root"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-39', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">withdraw</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt class="py-name">dx</tt> <tt class="py-op">=</tt> <tt id="link-40" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-40', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">winfo_screenwidth</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">    <tt class="py-name">dy</tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-41', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">winfo_screenheight</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt class="py-name">dialog</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Toplevel</tt><tt class="py-op">(</tt><tt id="link-42" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-42', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">bg</tt><tt class="py-op">=</tt><tt class="py-string">'white'</tt><tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt class="py-name">dialog</tt><tt class="py-op">.</tt><tt class="py-name">geometry</tt><tt class="py-op">(</tt><tt class="py-string">'%ix%i+%i+%i'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-number">500</tt><tt class="py-op">,</tt> <tt class="py-number">300</tt><tt class="py-op">,</tt> <tt class="py-name">dx</tt> <tt class="py-op">/</tt> <tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-number">200</tt><tt class="py-op">,</tt> <tt class="py-name">dy</tt> <tt class="py-op">/</tt> <tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-number">150</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-name">dialog</tt><tt class="py-op">.</tt><tt class="py-name">overrideredirect</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt class="py-name">dialog</tt><tt class="py-op">.</tt><tt class="py-name">focus_force</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">    <tt class="py-name">canvas</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Canvas</tt><tt class="py-op">(</tt><tt class="py-name">dialog</tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                            <tt class="py-name">background</tt><tt class="py-op">=</tt><tt class="py-string">'white'</tt><tt class="py-op">,</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                            <tt class="py-name">width</tt><tt class="py-op">=</tt><tt class="py-number">500</tt><tt class="py-op">,</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                            <tt class="py-name">height</tt><tt class="py-op">=</tt><tt class="py-number">300</tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt id="link-43" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-43', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.update()=web2py.gluon.dal.BaseAdapter-class.html#update,Method web2py.gluon.dal.CouchDBAdapter.update()=web2py.gluon.dal.CouchDBAdapter-class.html#update,Method web2py.gluon.dal.GoogleDatastoreAdapter.update()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#update,Method web2py.gluon.dal.MongoDBAdapter.update()=web2py.gluon.dal.MongoDBAdapter-class.html#update,Method web2py.gluon.dal.Set.update()=web2py.gluon.dal.Set-class.html#update,Method web2py.gluon.html.DIV.update()=web2py.gluon.html.DIV-class.html#update,Method web2py.gluon.tools.Crud.update()=web2py.gluon.tools.Crud-class.html#update,Method web2py.gluon.widget.web2pyDialog.update()=web2py.gluon.widget.web2pyDialog-class.html#update"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-44', 'update', 'link-44');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt class="py-name">img</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">PhotoImage</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">=</tt><tt class="py-string">'splashlogo.gif'</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">    <tt class="py-name">pnl</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">canvas</tt><tt class="py-op">,</tt> <tt class="py-name">image</tt><tt class="py-op">=</tt><tt class="py-name">img</tt><tt class="py-op">,</tt> <tt class="py-name">background</tt><tt class="py-op">=</tt><tt class="py-string">'white'</tt><tt class="py-op">,</tt> <tt class="py-name">bd</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt class="py-name">pnl</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">side</tt><tt class="py-op">=</tt><tt class="py-string">'top'</tt><tt class="py-op">,</tt> <tt class="py-name">fill</tt><tt class="py-op">=</tt><tt class="py-string">'both'</tt><tt class="py-op">,</tt> <tt id="link-45" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.expand()=web2py.gluon.dal.BaseAdapter-class.html#expand,Method web2py.gluon.dal.CouchDBAdapter.expand()=web2py.gluon.dal.CouchDBAdapter-class.html#expand,Method web2py.gluon.dal.GoogleDatastoreAdapter.expand()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#expand"><a title="web2py.gluon.dal.BaseAdapter.expand
web2py.gluon.dal.CouchDBAdapter.expand
web2py.gluon.dal.GoogleDatastoreAdapter.expand" class="py-name" href="#" onclick="return doclink('link-45', 'expand', 'link-45');">expand</a></tt><tt class="py-op">=</tt><tt class="py-string">'yes'</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-comment"># Prevent garbage collection of img</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">pnl</tt><tt class="py-op">.</tt><tt class="py-name">image</tt><tt class="py-op">=</tt><tt class="py-name">img</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">add_label</tt><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">=</tt><tt class="py-string">'Change Me'</tt><tt class="py-op">,</tt> <tt class="py-param">font_size</tt><tt class="py-op">=</tt><tt class="py-number">12</tt><tt class="py-op">,</tt> <tt class="py-param">foreground</tt><tt class="py-op">=</tt><tt class="py-string">'#195866'</tt><tt class="py-op">,</tt> <tt class="py-param">height</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">            <tt class="py-name">master</tt><tt class="py-op">=</tt><tt class="py-name">canvas</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">            <tt class="py-name">width</tt><tt class="py-op">=</tt><tt class="py-number">250</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">            <tt class="py-name">height</tt><tt class="py-op">=</tt><tt class="py-name">height</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-name">font</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'Helvetica'</tt><tt class="py-op">,</tt> <tt class="py-name">font_size</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">            <tt class="py-name">anchor</tt><tt class="py-op">=</tt><tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Class web2py.gluon.html.CENTER=web2py.gluon.html.CENTER-class.html"><a title="web2py.gluon.html.CENTER" class="py-name" href="#" onclick="return doclink('link-46', 'CENTER', 'link-46');">CENTER</a></tt><tt class="py-op">,</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">            <tt class="py-name">foreground</tt><tt class="py-op">=</tt><tt class="py-name">foreground</tt><tt class="py-op">,</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-name">background</tt><tt class="py-op">=</tt><tt class="py-string">'white'</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
</div><a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">    <tt class="py-name">add_label</tt><tt class="py-op">(</tt><tt class="py-string">'Welcome to...'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">side</tt><tt class="py-op">=</tt><tt class="py-string">'top'</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">    <tt class="py-name">add_label</tt><tt class="py-op">(</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.widget.ProgramName" class="py-name" href="#" onclick="return doclink('link-47', 'ProgramName', 'link-17');">ProgramName</a></tt><tt class="py-op">,</tt> <tt class="py-number">18</tt><tt class="py-op">,</tt> <tt class="py-string">'#FF5C1F'</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">    <tt class="py-name">add_label</tt><tt class="py-op">(</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.widget.ProgramAuthor" class="py-name" href="#" onclick="return doclink('link-48', 'ProgramAuthor', 'link-18');">ProgramAuthor</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">    <tt class="py-name">add_label</tt><tt class="py-op">(</tt><tt id="link-49" class="py-name"><a title="web2py.gluon.widget.ProgramVersion" class="py-name" href="#" onclick="return doclink('link-49', 'ProgramVersion', 'link-19');">ProgramVersion</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">    <tt id="link-50" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-50', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.update
web2py.gluon.dal.CouchDBAdapter.update
web2py.gluon.dal.GoogleDatastoreAdapter.update
web2py.gluon.dal.MongoDBAdapter.update
web2py.gluon.dal.Set.update
web2py.gluon.html.DIV.update
web2py.gluon.tools.Crud.update
web2py.gluon.widget.web2pyDialog.update" class="py-name" href="#" onclick="return doclink('link-51', 'update', 'link-44');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">    <tt id="link-52" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-52', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">    <tt class="py-name">dialog</tt><tt class="py-op">.</tt><tt class="py-name">destroy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> </tt>
</div><a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog"></a><div id="web2pyDialog-def"><a name="L144"></a><tt class="py-lineno">144</tt> <a class="py-toggle" href="#" id="web2pyDialog-toggle" onclick="return toggle('web2pyDialog');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html">web2pyDialog</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="web2pyDialog-expanded"><a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">    <tt class="py-docstring">""" Main window dialog """</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.__init__"></a><div id="web2pyDialog.__init__-def"><a name="L147"></a><tt class="py-lineno">147</tt> <a class="py-toggle" href="#" id="web2pyDialog.__init__-toggle" onclick="return toggle('web2pyDialog.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">root</tt><tt class="py-op">,</tt> <tt class="py-param">options</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.__init__-expanded"><a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-docstring">""" web2pyDialog constructor  """</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">        <tt id="link-53" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-53', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">title</tt><tt class="py-op">(</tt><tt class="py-string">'web2py server'</tt><tt class="py-op">)</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-54', 'root', 'link-39');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Toplevel</tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-55', 'root', 'link-39');">root</a></tt><tt class="py-op">)</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-56', 'options', 'link-56');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-57', 'options', 'link-56');">options</a></tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Menu</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-58', 'root', 'link-39');">root</a></tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">        <tt class="py-name">servermenu</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Menu</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">,</tt> <tt class="py-name">tearoff</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-name">httplog</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-59', 'join', 'link-59');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-60', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-string">'httpserver.log'</tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-comment"># Building the Menu</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt id="link-61" class="py-name"><a title="web2py.gluon.widget.try_start_browser" class="py-name" href="#" onclick="return doclink('link-61', 'try_start_browser', 'link-38');">try_start_browser</a></tt><tt class="py-op">(</tt><tt class="py-name">httplog</tt><tt class="py-op">)</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">        <tt class="py-name">servermenu</tt><tt class="py-op">.</tt><tt class="py-name">add_command</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'View httpserver.log'</tt><tt class="py-op">,</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">                               <tt class="py-name">command</tt><tt class="py-op">=</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">        <tt class="py-name">servermenu</tt><tt class="py-op">.</tt><tt class="py-name">add_command</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'Quit (pid:%i)'</tt> <tt class="py-op">%</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getpid</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">                               <tt class="py-name">command</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name" targets="Method web2py.gluon.widget.web2pyDialog.quit()=web2py.gluon.widget.web2pyDialog-class.html#quit"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-62', 'quit', 'link-62');">quit</a></tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">.</tt><tt class="py-name">add_cascade</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'Server'</tt><tt class="py-op">,</tt> <tt class="py-name">menu</tt><tt class="py-op">=</tt><tt class="py-name">servermenu</tt><tt class="py-op">)</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pagesmenu</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Menu</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">,</tt> <tt class="py-name">tearoff</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">.</tt><tt class="py-name">add_cascade</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'Pages'</tt><tt class="py-op">,</tt> <tt class="py-name">menu</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pagesmenu</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-name">helpmenu</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Menu</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">,</tt> <tt class="py-name">tearoff</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt class="py-comment"># Home Page</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt id="link-63" class="py-name"><a title="web2py.gluon.widget.try_start_browser" class="py-name" href="#" onclick="return doclink('link-63', 'try_start_browser', 'link-38');">try_start_browser</a></tt><tt class="py-op">(</tt><tt class="py-string">'http://www.web2py.com'</tt><tt class="py-op">)</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">        <tt class="py-name">helpmenu</tt><tt class="py-op">.</tt><tt class="py-name">add_command</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'Home Page'</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                             <tt class="py-name">command</tt><tt class="py-op">=</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-comment"># About</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt class="py-name">tkMessageBox</tt><tt class="py-op">.</tt><tt class="py-name">showinfo</tt><tt class="py-op">(</tt><tt class="py-string">'About web2py'</tt><tt class="py-op">,</tt> <tt id="link-64" class="py-name"><a title="web2py.gluon.widget.ProgramInfo" class="py-name" href="#" onclick="return doclink('link-64', 'ProgramInfo', 'link-22');">ProgramInfo</a></tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-name">helpmenu</tt><tt class="py-op">.</tt><tt class="py-name">add_command</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'About'</tt><tt class="py-op">,</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">                             <tt class="py-name">command</tt><tt class="py-op">=</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">.</tt><tt class="py-name">add_cascade</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt class="py-string">'Info'</tt><tt class="py-op">,</tt> <tt class="py-name">menu</tt><tt class="py-op">=</tt><tt class="py-name">helpmenu</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line"> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-65', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">(</tt><tt class="py-name">menu</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menu</tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-66" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-66', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-67', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">protocol</tt><tt class="py-op">(</tt><tt class="py-string">'WM_DELETE_WINDOW'</tt><tt class="py-op">,</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">                               <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-68', 'quit', 'link-62');">quit</a></tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-69', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">protocol</tt><tt class="py-op">(</tt><tt class="py-string">'WM_DELETE_WINDOW'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-70', 'quit', 'link-62');">quit</a></tt><tt class="py-op">)</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line"> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">        <tt class="py-name">sticky</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">NW</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line"> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-comment"># IP</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-71', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">                      <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Server IP:'</tt><tt class="py-op">,</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">                      <tt class="py-name">justify</tt><tt class="py-op">=</tt><tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">LEFT</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">                                                 <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">                                                 <tt class="py-name">sticky</tt><tt class="py-op">=</tt><tt class="py-name">sticky</tt><tt class="py-op">)</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ip</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Entry</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-72" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-72', 'root', 'link-39');">root</a></tt><tt class="py-op">)</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.insert()=web2py.gluon.dal.BaseAdapter-class.html#insert,Method web2py.gluon.dal.CouchDBAdapter.insert()=web2py.gluon.dal.CouchDBAdapter-class.html#insert,Method web2py.gluon.dal.GoogleDatastoreAdapter.insert()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#insert,Method web2py.gluon.dal.MongoDBAdapter.insert()=web2py.gluon.dal.MongoDBAdapter-class.html#insert,Method web2py.gluon.dal.Table.insert()=web2py.gluon.dal.Table-class.html#insert,Method web2py.gluon.html.DIV.insert()=web2py.gluon.html.DIV-class.html#insert,Method web2py.gluon.template.Content.insert()=web2py.gluon.template.Content-class.html#insert"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-73', 'insert', 'link-73');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">END</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-74', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">)</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">sticky</tt><tt class="py-op">=</tt><tt class="py-name">sticky</tt><tt class="py-op">)</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">        <tt class="py-comment"># Port</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-75', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">                      <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Server Port:'</tt><tt class="py-op">,</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">                      <tt class="py-name">justify</tt><tt class="py-op">=</tt><tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">LEFT</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">                                                 <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">                                                 <tt class="py-name">sticky</tt><tt class="py-op">=</tt><tt class="py-name">sticky</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line"> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port_number</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Entry</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-76', 'root', 'link-39');">root</a></tt><tt class="py-op">)</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port_number</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-77', 'insert', 'link-73');">insert</a></tt><tt class="py-op">(</tt><tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">END</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-78', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port_number</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">sticky</tt><tt class="py-op">=</tt><tt class="py-name">sticky</tt><tt class="py-op">)</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">        <tt class="py-comment"># Password</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-79', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                      <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Choose Password:'</tt><tt class="py-op">,</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                      <tt class="py-name">justify</tt><tt class="py-op">=</tt><tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">LEFT</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                                                 <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">                                                 <tt class="py-name">sticky</tt><tt class="py-op">=</tt><tt class="py-name">sticky</tt><tt class="py-op">)</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Entry</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-80', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">show</tt><tt class="py-op">=</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt class="py-name">bind</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;Return&gt;'</tt><tt class="py-op">,</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name" targets="Method web2py.gluon.main.HttpServer.start()=web2py.gluon.main.HttpServer-class.html#start,Method web2py.gluon.rocket.Rocket.start()=web2py.gluon.rocket.Rocket-class.html#start,Method web2py.gluon.rocket.ThreadPool.start()=web2py.gluon.rocket.ThreadPool-class.html#start,Function web2py.gluon.widget.start()=web2py.gluon.widget-module.html#start,Method web2py.gluon.widget.web2pyDialog.start()=web2py.gluon.widget.web2pyDialog-class.html#start,Method web2py.gluon.winservice.Service.start()=web2py.gluon.winservice.Service-class.html#start,Method web2py.gluon.winservice.Web2pyService.start()=web2py.gluon.winservice.Web2pyService-class.html#start"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-81', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt class="py-name">focus_force</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">sticky</tt><tt class="py-op">=</tt><tt class="py-name">sticky</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line"> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-comment"># Prepare the canvas</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Canvas</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-82', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">                                     <tt class="py-name">width</tt><tt class="py-op">=</tt><tt class="py-number">300</tt><tt class="py-op">,</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">                                     <tt class="py-name">height</tt><tt class="py-op">=</tt><tt class="py-number">100</tt><tt class="py-op">,</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">                                     <tt class="py-name">bg</tt><tt class="py-op">=</tt><tt class="py-string">'black'</tt><tt class="py-op">)</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">columnspan</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">after</tt><tt class="py-op">(</tt><tt class="py-number">1000</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name" targets="Method web2py.gluon.widget.web2pyDialog.update_canvas()=web2py.gluon.widget.web2pyDialog-class.html#update_canvas"><a title="web2py.gluon.widget.web2pyDialog.update_canvas" class="py-name" href="#" onclick="return doclink('link-83', 'update_canvas', 'link-83');">update_canvas</a></tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">        <tt class="py-comment"># Prepare the frame</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">frame</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Frame</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-84', 'root', 'link-39');">root</a></tt><tt class="py-op">)</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">        <tt class="py-name">frame</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">columnspan</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">        <tt class="py-comment"># Start button</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_start</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Button</tt><tt class="py-op">(</tt><tt class="py-name">frame</tt><tt class="py-op">,</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">                                           <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'start server'</tt><tt class="py-op">,</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">                                           <tt class="py-name">command</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-85', 'start', 'link-81');">start</a></tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line"> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_start</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line"> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-comment"># Stop button</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_stop</tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Button</tt><tt class="py-op">(</tt><tt class="py-name">frame</tt><tt class="py-op">,</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">                                          <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'stop server'</tt><tt class="py-op">,</tt> </tt>
<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">                                          <tt class="py-name">command</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name" targets="Method web2py.gluon.main.HttpServer.stop()=web2py.gluon.main.HttpServer-class.html#stop,Method web2py.gluon.rocket.Monitor.stop()=web2py.gluon.rocket.Monitor-class.html#stop,Method web2py.gluon.rocket.Rocket.stop()=web2py.gluon.rocket.Rocket-class.html#stop,Method web2py.gluon.rocket.ThreadPool.stop()=web2py.gluon.rocket.ThreadPool-class.html#stop,Method web2py.gluon.widget.web2pyDialog.stop()=web2py.gluon.widget.web2pyDialog-class.html#stop,Method web2py.gluon.winservice.Service.stop()=web2py.gluon.winservice.Service-class.html#stop,Method web2py.gluon.winservice.Web2pyService.stop()=web2py.gluon.winservice.Web2pyService-class.html#stop"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-86', 'stop', 'link-86');">stop</a></tt><tt class="py-op">)</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line"> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_stop</tt><tt class="py-op">.</tt><tt class="py-name">grid</tt><tt class="py-op">(</tt><tt class="py-name">row</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">column</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_stop</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'disabled'</tt><tt class="py-op">)</tt> </tt>
<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line"> </tt>
<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-87" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-87', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt><tt class="py-op">:</tt> </tt>
<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt> <tt class="py-op">=</tt> <tt class="py-name">contrib</tt><tt class="py-op">.</tt><tt class="py-name">taskbar_widget</tt><tt class="py-op">.</tt><tt class="py-name">TaskBarIcon</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name" targets="Method web2py.gluon.widget.web2pyDialog.checkTaskBar()=web2py.gluon.widget.web2pyDialog-class.html#checkTaskBar"><a title="web2py.gluon.widget.web2pyDialog.checkTaskBar" class="py-name" href="#" onclick="return doclink('link-88', 'checkTaskBar', 'link-88');">checkTaskBar</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-89" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-89', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt> <tt class="py-op">!=</tt> <tt class="py-string">'&lt;ask&gt;'</tt><tt class="py-op">:</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-90', 'insert', 'link-73');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-91" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-91', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-92', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-93', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">withdraw</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.checkTaskBar"></a><div id="web2pyDialog.checkTaskBar-def"><a name="L265"></a><tt class="py-lineno">265</tt> <a class="py-toggle" href="#" id="web2pyDialog.checkTaskBar-toggle" onclick="return toggle('web2pyDialog.checkTaskBar');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#checkTaskBar">checkTaskBar</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.checkTaskBar-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.checkTaskBar-expanded"><a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">        <tt class="py-docstring">""" Check taskbar status """</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line"> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">:</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">EnumStatus</tt><tt class="py-op">.</tt><tt class="py-name">QUIT</tt><tt class="py-op">:</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-94', 'quit', 'link-62');">quit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">EnumStatus</tt><tt class="py-op">.</tt><tt class="py-name">TOGGLE</tt><tt class="py-op">:</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-95', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">state</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'withdrawn'</tt><tt class="py-op">:</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-96', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">deiconify</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-97', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">withdraw</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">EnumStatus</tt><tt class="py-op">.</tt><tt class="py-name">STOP</tt><tt class="py-op">:</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-98', 'stop', 'link-86');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">EnumStatus</tt><tt class="py-op">.</tt><tt class="py-name">START</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-99', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">EnumStatus</tt><tt class="py-op">.</tt><tt class="py-name">RESTART</tt><tt class="py-op">:</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-100', 'stop', 'link-86');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-101', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-102', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">after</tt><tt class="py-op">(</tt><tt class="py-number">1000</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.checkTaskBar" class="py-name" href="#" onclick="return doclink('link-103', 'checkTaskBar', 'link-88');">checkTaskBar</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.update"></a><div id="web2pyDialog.update-def"><a name="L287"></a><tt class="py-lineno">287</tt> <a class="py-toggle" href="#" id="web2pyDialog.update-toggle" onclick="return toggle('web2pyDialog.update');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#update">update</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.update-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.update-expanded"><a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line">        <tt class="py-docstring">""" Update app text """</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line"> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="web2py.gluon.dal.BaseAdapter.insert
web2py.gluon.dal.CouchDBAdapter.insert
web2py.gluon.dal.GoogleDatastoreAdapter.insert
web2py.gluon.dal.MongoDBAdapter.insert
web2py.gluon.dal.Table.insert
web2py.gluon.html.DIV.insert
web2py.gluon.template.Content.insert" class="py-name" href="#" onclick="return doclink('link-104', 'insert', 'link-73');">insert</a></tt><tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'disabled'</tt><tt class="py-op">)</tt> </tt>
<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt>  <tt class="py-comment"># ## this should only happen in case app is destroyed</tt> </tt>
</div><a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.connect_pages"></a><div id="web2pyDialog.connect_pages-def"><a name="L297"></a><tt class="py-lineno">297</tt> <a class="py-toggle" href="#" id="web2pyDialog.connect_pages-toggle" onclick="return toggle('web2pyDialog.connect_pages');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#connect_pages">connect_pages</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.connect_pages-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.connect_pages-expanded"><a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">        <tt class="py-docstring">""" Connect pages """</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line"> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">arq</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name" targets="Function web2py.gluon.fileutils.listdir()=web2py.gluon.fileutils-module.html#listdir"><a title="web2py.gluon.fileutils.listdir" class="py-name" href="#" onclick="return doclink('link-105', 'listdir', 'link-105');">listdir</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name" targets="Static Method web2py.gluon.dal.DatabaseStoredFile.exists()=web2py.gluon.dal.DatabaseStoredFile-class.html#exists"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-106', 'exists', 'link-106');">exists</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications/%s/__init__.py'</tt> <tt class="py-op">%</tt> <tt class="py-name">arq</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">                <tt id="link-107" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-107', 'url', 'link-37');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-108', 'url', 'link-37');">url</a></tt> <tt class="py-op">+</tt> <tt class="py-string">'/'</tt> <tt class="py-op">+</tt> <tt class="py-name">arq</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">                <tt id="link-109" class="py-name" targets="Function web2py.gluon.widget.start_browser()=web2py.gluon.widget-module.html#start_browser"><a title="web2py.gluon.widget.start_browser" class="py-name" href="#" onclick="return doclink('link-109', 'start_browser', 'link-109');">start_browser</a></tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt id="link-110" class="py-name" targets="Function web2py.gluon.rocket.u()=web2py.gluon.rocket-module.html#u"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-110', 'u', 'link-110');">u</a></tt> <tt class="py-op">=</tt> <tt id="link-111" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-111', 'url', 'link-37');">url</a></tt><tt class="py-op">:</tt> <tt id="link-112" class="py-name"><a title="web2py.gluon.widget.try_start_browser" class="py-name" href="#" onclick="return doclink('link-112', 'try_start_browser', 'link-38');">try_start_browser</a></tt><tt class="py-op">(</tt><tt id="link-113" class="py-name"><a title="web2py.gluon.rocket.u" class="py-name" href="#" onclick="return doclink('link-113', 'u', 'link-110');">u</a></tt><tt class="py-op">)</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pagesmenu</tt><tt class="py-op">.</tt><tt class="py-name">add_command</tt><tt class="py-op">(</tt><tt class="py-name">label</tt><tt class="py-op">=</tt><tt id="link-114" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-114', 'url', 'link-37');">url</a></tt><tt class="py-op">,</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">                                           <tt class="py-name">command</tt><tt class="py-op">=</tt><tt id="link-115" class="py-name"><a title="web2py.gluon.widget.start_browser" class="py-name" href="#" onclick="return doclink('link-115', 'start_browser', 'link-109');">start_browser</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.quit"></a><div id="web2pyDialog.quit-def"><a name="L307"></a><tt class="py-lineno">307</tt> <a class="py-toggle" href="#" id="web2pyDialog.quit-toggle" onclick="return toggle('web2pyDialog.quit');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#quit">quit</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">justHide</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.quit-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.quit-expanded"><a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">        <tt class="py-docstring">""" Finish the program execution """</tt> </tt>
<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">justHide</tt><tt class="py-op">:</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-116', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">withdraw</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name" targets="Variable web2py.gluon.winservice.Web2pyService.server=web2py.gluon.winservice.Web2pyService-class.html#server"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-117', 'server', 'link-117');">server</a></tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-118', 'stop', 'link-86');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line"> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">Destroy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-119', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">destroy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.error"></a><div id="web2pyDialog.error-def"><a name="L326"></a><tt class="py-lineno">326</tt> <a class="py-toggle" href="#" id="web2pyDialog.error-toggle" onclick="return toggle('web2pyDialog.error');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#error">error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.error-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.error-expanded"><a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">        <tt class="py-docstring">""" Show error message """</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line"> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">        <tt class="py-name">tkMessageBox</tt><tt class="py-op">.</tt><tt class="py-name">showerror</tt><tt class="py-op">(</tt><tt class="py-string">'web2py start server'</tt><tt class="py-op">,</tt> <tt id="link-120" class="py-name" targets="Variable web2py.gluon.http.HTTP.message=web2py.gluon.http.HTTP-class.html#message"><a title="web2py.gluon.http.HTTP.message" class="py-name" href="#" onclick="return doclink('link-120', 'message', 'link-120');">message</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.start"></a><div id="web2pyDialog.start-def"><a name="L331"></a><tt class="py-lineno">331</tt> <a class="py-toggle" href="#" id="web2pyDialog.start-toggle" onclick="return toggle('web2pyDialog.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.start-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.start-expanded"><a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">        <tt class="py-docstring">""" Start web2py server """</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line"> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name" targets="Method web2py.gluon.rocket.Headers.get()=web2py.gluon.rocket.Headers-class.html#get"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-121', 'get', 'link-121');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line"> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">password</tt><tt class="py-op">:</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name" targets="Method web2py.gluon.tools.Service.error()=web2py.gluon.tools.Service-class.html#error,Method web2py.gluon.widget.web2pyDialog.error()=web2py.gluon.widget.web2pyDialog-class.html#error"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-122', 'error', 'link-122');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'no password, no web admin interface'</tt><tt class="py-op">)</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line"> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">        <tt class="py-name">ip</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-123', 'get', 'link-121');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">        <tt class="py-name">regexp</tt> <tt class="py-op">=</tt> <tt class="py-string">'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ip</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">regexp</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-124', 'error', 'link-122');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'invalid host ip address'</tt><tt class="py-op">)</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">            <tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port_number</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="web2py.gluon.rocket.Headers.get" class="py-name" href="#" onclick="return doclink('link-125', 'get', 'link-121');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-126', 'error', 'link-122');">error</a></tt><tt class="py-op">(</tt><tt class="py-string">'invalid port number'</tt><tt class="py-op">)</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line"> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="web2py.gluon.tools.Auth.url
web2py.gluon.tools.Crud.url" class="py-name" href="#" onclick="return doclink('link-127', 'url', 'link-37');">url</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'http://%s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name" targets="Method web2py.gluon.widget.web2pyDialog.connect_pages()=web2py.gluon.widget.web2pyDialog-class.html#connect_pages"><a title="web2py.gluon.widget.web2pyDialog.connect_pages" class="py-name" href="#" onclick="return doclink('link-128', 'connect_pages', 'link-128');">connect_pages</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_start</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'disabled'</tt><tt class="py-op">)</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line"> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">            <tt id="link-129" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-129', 'options', 'link-56');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-130', 'options', 'link-56');">options</a></tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">            <tt class="py-name">req_queue_size</tt> <tt class="py-op">=</tt> <tt id="link-131" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-131', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">request_queue_size</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-132', 'server', 'link-117');">server</a></tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="web2py.gluon.main" class="py-name" href="#" onclick="return doclink('link-133', 'main', 'link-4');">main</a></tt><tt class="py-op">.</tt><tt id="link-134" class="py-name" targets="Class web2py.gluon.main.HttpServer=web2py.gluon.main.HttpServer-class.html"><a title="web2py.gluon.main.HttpServer" class="py-name" href="#" onclick="return doclink('link-134', 'HttpServer', 'link-134');">HttpServer</a></tt><tt class="py-op">(</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">                <tt class="py-name">ip</tt><tt class="py-op">,</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">                <tt class="py-name">port</tt><tt class="py-op">,</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">                <tt class="py-name">password</tt><tt class="py-op">,</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">                <tt class="py-name">pid_filename</tt><tt class="py-op">=</tt><tt id="link-135" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-135', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">pid_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">                <tt class="py-name">log_filename</tt><tt class="py-op">=</tt><tt id="link-136" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-136', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">log_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">                <tt class="py-name">profiler_filename</tt><tt class="py-op">=</tt><tt id="link-137" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-137', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">profiler_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line">                <tt class="py-name">ssl_certificate</tt><tt class="py-op">=</tt><tt id="link-138" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-138', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ssl_certificate</tt><tt class="py-op">,</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">                <tt class="py-name">ssl_private_key</tt><tt class="py-op">=</tt><tt id="link-139" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-139', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ssl_private_key</tt><tt class="py-op">,</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">                <tt class="py-name">min_threads</tt><tt class="py-op">=</tt><tt id="link-140" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-140', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line">                <tt class="py-name">max_threads</tt><tt class="py-op">=</tt><tt id="link-141" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-141', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">maxthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line">                <tt class="py-name">server_name</tt><tt class="py-op">=</tt><tt id="link-142" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-142', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">server_name</tt><tt class="py-op">,</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">                <tt class="py-name">request_queue_size</tt><tt class="py-op">=</tt><tt class="py-name">req_queue_size</tt><tt class="py-op">,</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">                <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt id="link-143" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-143', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">                <tt class="py-name">shutdown_timeout</tt><tt class="py-op">=</tt><tt id="link-144" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-144', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">shutdown_timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">                <tt class="py-name">path</tt><tt class="py-op">=</tt><tt id="link-145" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-145', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">                <tt class="py-name">interfaces</tt><tt class="py-op">=</tt><tt id="link-146" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-146', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">)</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line"> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">            <tt id="link-147" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-147', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">start_new_thread</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-148', 'server', 'link-117');">server</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-149', 'start', 'link-81');">start</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-150" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-150', 'Exception', 'link-16');">Exception</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_start</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="web2py.gluon.tools.Service.error
web2py.gluon.widget.web2pyDialog.error" class="py-name" href="#" onclick="return doclink('link-151', 'error', 'link-122');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line"> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_stop</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line"> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-152" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-152', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">            <tt id="link-153" class="py-name"><a title="web2py.gluon.dal.thread
web2py.gluon.rewrite.thread" class="py-name" href="#" onclick="return doclink('link-153', 'thread', 'link-1');">thread</a></tt><tt class="py-op">.</tt><tt class="py-name">start_new_thread</tt><tt class="py-op">(</tt><tt id="link-154" class="py-name"><a title="web2py.gluon.widget.start_browser" class="py-name" href="#" onclick="return doclink('link-154', 'start_browser', 'link-109');">start_browser</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line"> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'readonly'</tt><tt class="py-op">)</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'readonly'</tt><tt class="py-op">)</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port_number</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'readonly'</tt><tt class="py-op">)</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line"> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">:</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">SetServerRunning</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.stop"></a><div id="web2pyDialog.stop-def"><a name="L392"></a><tt class="py-lineno">392</tt> <a class="py-toggle" href="#" id="web2pyDialog.stop-toggle" onclick="return toggle('web2pyDialog.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.stop-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.stop-expanded"><a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">        <tt class="py-docstring">""" Stop web2py server """</tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line"> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_start</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">button_stop</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'disabled'</tt><tt class="py-op">)</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">port_number</tt><tt class="py-op">.</tt><tt class="py-name">configure</tt><tt class="py-op">(</tt><tt class="py-name">state</tt><tt class="py-op">=</tt><tt class="py-string">'normal'</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-155', 'server', 'link-117');">server</a></tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-156', 'stop', 'link-86');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line"> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">:</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tb</tt><tt class="py-op">.</tt><tt class="py-name">SetServerStopped</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line"> </tt>
<a name="web2pyDialog.update_canvas"></a><div id="web2pyDialog.update_canvas-def"><a name="L405"></a><tt class="py-lineno">405</tt> <a class="py-toggle" href="#" id="web2pyDialog.update_canvas-toggle" onclick="return toggle('web2pyDialog.update_canvas');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget.web2pyDialog-class.html#update_canvas">update_canvas</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2pyDialog.update_canvas-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="web2pyDialog.update_canvas-expanded"><a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">        <tt class="py-docstring">""" Update canvas """</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line"> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">            <tt class="py-name">t1</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">getsize</tt><tt class="py-op">(</tt><tt class="py-string">'httpserver.log'</tt><tt class="py-op">)</tt> </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">after</tt><tt class="py-op">(</tt><tt class="py-number">1000</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-157" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.update_canvas" class="py-name" href="#" onclick="return doclink('link-157', 'update_canvas', 'link-83');">update_canvas</a></tt><tt class="py-op">)</tt> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">            <tt class="py-name">fp</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-string">'httpserver.log'</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">            <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t0</tt><tt class="py-op">)</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">            <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-158', 'read', 'link-158');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">t1</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t0</tt><tt class="py-op">)</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">            <tt class="py-name">fp</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.close()=web2py.gluon.dal.BaseAdapter-class.html#close,Method web2py.gluon.dal.DatabaseStoredFile.close()=web2py.gluon.dal.DatabaseStoredFile-class.html#close,Method web2py.gluon.dal.NoSQLAdapter.close()=web2py.gluon.dal.NoSQLAdapter-class.html#close,Method web2py.gluon.rocket.Connection.close()=web2py.gluon.rocket.Connection-class.html#close"><a title="web2py.gluon.dal.BaseAdapter.close
web2py.gluon.dal.DatabaseStoredFile.close
web2py.gluon.dal.NoSQLAdapter.close
web2py.gluon.rocket.Connection.close" class="py-name" href="#" onclick="return doclink('link-159', 'close', 'link-159');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">[</tt><tt class="py-number">10</tt> <tt class="py-op">+</tt> <tt class="py-number">90.0</tt> <tt class="py-op">/</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">sqrt</tt><tt class="py-op">(</tt><tt class="py-number">1</tt> <tt class="py-op">+</tt> <tt class="py-name">data</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name" targets="Method web2py.gluon.dal.BaseAdapter.count()=web2py.gluon.dal.BaseAdapter-class.html#count,Method web2py.gluon.dal.CouchDBAdapter.count()=web2py.gluon.dal.CouchDBAdapter-class.html#count,Method web2py.gluon.dal.Field.count()=web2py.gluon.dal.Field-class.html#count,Method web2py.gluon.dal.GoogleDatastoreAdapter.count()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#count,Method web2py.gluon.dal.MongoDBAdapter.count()=web2py.gluon.dal.MongoDBAdapter-class.html#count,Method web2py.gluon.dal.Set.count()=web2py.gluon.dal.Set-class.html#count"><a title="web2py.gluon.dal.BaseAdapter.count
web2py.gluon.dal.CouchDBAdapter.count
web2py.gluon.dal.Field.count
web2py.gluon.dal.GoogleDatastoreAdapter.count
web2py.gluon.dal.MongoDBAdapter.count
web2py.gluon.dal.Set.count" class="py-name" href="#" onclick="return doclink('link-160', 'count', 'link-160');">count</a></tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line"> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt id="link-161" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-161', 'len', 'link-161');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">                <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">coords</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">q0</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">coords</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">q0</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">                                   <tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">                                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">                                    <tt class="py-name">c</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line">                                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt><tt class="py-op">[</tt><tt class="py-name">i</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t0</tt> <tt class="py-op">=</tt> <tt class="py-name">t1</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">BaseException</tt><tt class="py-op">:</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t0</tt> <tt class="py-op">=</tt> <tt id="link-162" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-162', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-163', 'time', 'link-0');">time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">t0</tt> <tt class="py-op">=</tt> <tt class="py-name">t1</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-number">100</tt><tt class="py-op">]</tt> <tt class="py-op">*</tt> <tt class="py-number">300</tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">q0</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">create_line</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-number">100</tt><tt class="py-op">,</tt> <tt class="py-name">i</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">100</tt><tt class="py-op">,</tt> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">                       <tt class="py-name">fill</tt><tt class="py-op">=</tt><tt class="py-string">'green'</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt id="link-164" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-164', 'len', 'link-161');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">p0</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line"> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">canvas</tt><tt class="py-op">.</tt><tt class="py-name">after</tt><tt class="py-op">(</tt><tt class="py-number">1000</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.update_canvas" class="py-name" href="#" onclick="return doclink('link-165', 'update_canvas', 'link-83');">update_canvas</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line"> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line"> </tt>
<a name="console"></a><div id="console-def"><a name="L440"></a><tt class="py-lineno">440</tt> <a class="py-toggle" href="#" id="console-toggle" onclick="return toggle('console');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget-module.html#console">console</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="console-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="console-expanded"><a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">    <tt class="py-docstring">""" Defines the behavior of the console web2py execution """</tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">optparse</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">textwrap</tt> </tt>
<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"> </tt>
<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line">    <tt class="py-name">usage</tt> <tt class="py-op">=</tt> <tt class="py-string">"python web2py.py"</tt> </tt>
<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line"> </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line">    <tt class="py-name">description</tt> <tt class="py-op">=</tt> <tt class="py-string">"""\</tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line"><tt class="py-string">    web2py Web Framework startup script.</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line"><tt class="py-string">    ATTENTION: unless a password is specified (-a 'passwd') web2py will</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line"><tt class="py-string">    attempt to run a GUI. In this case command line options are ignored."""</tt> </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line"> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">    <tt class="py-name">description</tt> <tt class="py-op">=</tt> <tt class="py-name">textwrap</tt><tt class="py-op">.</tt><tt class="py-name">dedent</tt><tt class="py-op">(</tt><tt class="py-name">description</tt><tt class="py-op">)</tt> </tt>
<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt class="py-name">optparse</tt><tt class="py-op">.</tt><tt class="py-name">OptionParser</tt><tt class="py-op">(</tt><tt class="py-name">usage</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">optparse</tt><tt class="py-op">.</tt><tt class="py-name">Option</tt><tt class="py-op">,</tt> <tt id="link-166" class="py-name"><a title="web2py.gluon.widget.ProgramVersion" class="py-name" href="#" onclick="return doclink('link-166', 'ProgramVersion', 'link-19');">ProgramVersion</a></tt><tt class="py-op">)</tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line"> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">description</tt> <tt class="py-op">=</tt> <tt class="py-name">description</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-i'</tt><tt class="py-op">,</tt> </tt>
<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line">                      <tt class="py-string">'--ip'</tt><tt class="py-op">,</tt> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'127.0.0.1'</tt><tt class="py-op">,</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'ip'</tt><tt class="py-op">,</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'ip address of the server (127.0.0.1)'</tt><tt class="py-op">)</tt> </tt>
<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"> </tt>
<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-p'</tt><tt class="py-op">,</tt> </tt>
<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">                      <tt class="py-string">'--port'</tt><tt class="py-op">,</tt> </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'8000'</tt><tt class="py-op">,</tt> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'port'</tt><tt class="py-op">,</tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'port of server (8000)'</tt><tt class="py-op">)</tt> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line"> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line">    <tt id="link-167" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-167', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'password to be used for administration'</tt> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line">    <tt id="link-168" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-168', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' (use -a "&lt;recycle&gt;" to reuse the last password))'</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-a'</tt><tt class="py-op">,</tt> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">                      <tt class="py-string">'--password'</tt><tt class="py-op">,</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'&lt;ask&gt;'</tt><tt class="py-op">,</tt> </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'password'</tt><tt class="py-op">,</tt> </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-169" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-169', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line"> </tt>
<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-c'</tt><tt class="py-op">,</tt> </tt>
<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">                      <tt class="py-string">'--ssl_certificate'</tt><tt class="py-op">,</tt> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'ssl_certificate'</tt><tt class="py-op">,</tt> </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'file that contains ssl certificate'</tt><tt class="py-op">)</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line"> </tt>
<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-k'</tt><tt class="py-op">,</tt> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line">                      <tt class="py-string">'--ssl_private_key'</tt><tt class="py-op">,</tt> </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'ssl_private_key'</tt><tt class="py-op">,</tt> </tt>
<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'file that contains ssl private key'</tt><tt class="py-op">)</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line"> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-d'</tt><tt class="py-op">,</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">                      <tt class="py-string">'--pid_filename'</tt><tt class="py-op">,</tt> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'httpserver.pid'</tt><tt class="py-op">,</tt> </tt>
<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'pid_filename'</tt><tt class="py-op">,</tt> </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'file to store the pid of the server'</tt><tt class="py-op">)</tt> </tt>
<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line"> </tt>
<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-l'</tt><tt class="py-op">,</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line">                      <tt class="py-string">'--log_filename'</tt><tt class="py-op">,</tt> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'httpserver.log'</tt><tt class="py-op">,</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'log_filename'</tt><tt class="py-op">,</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'file to log connections'</tt><tt class="py-op">)</tt> </tt>
<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line"> </tt>
<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-n'</tt><tt class="py-op">,</tt> </tt>
<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line">                      <tt class="py-string">'--numthreads'</tt><tt class="py-op">,</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'numthreads'</tt><tt class="py-op">,</tt> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'number of threads (deprecated)'</tt><tt class="py-op">)</tt> </tt>
<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line"> </tt>
<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'--minthreads'</tt><tt class="py-op">,</tt> </tt>
<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'minthreads'</tt><tt class="py-op">,</tt> </tt>
<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'minimum number of server threads'</tt><tt class="py-op">)</tt> </tt>
<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line"> </tt>
<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'--maxthreads'</tt><tt class="py-op">,</tt> </tt>
<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'maxthreads'</tt><tt class="py-op">,</tt> </tt>
<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'maximum number of server threads'</tt><tt class="py-op">)</tt> </tt>
<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line"> </tt>
<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-s'</tt><tt class="py-op">,</tt> </tt>
<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">                      <tt class="py-string">'--server_name'</tt><tt class="py-op">,</tt> </tt>
<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt id="link-170" class="py-name"><a title="web2py.gluon.rocket.Connection.socket" class="py-name" href="#" onclick="return doclink('link-170', 'socket', 'link-2');">socket</a></tt><tt class="py-op">.</tt><tt class="py-name">gethostname</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'server_name'</tt><tt class="py-op">,</tt> </tt>
<a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'server name for the web server'</tt><tt class="py-op">)</tt> </tt>
<a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line"> </tt>
<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line">    <tt id="link-171" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-171', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'max number of queued requests when server unavailable'</tt> </tt>
<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-q'</tt><tt class="py-op">,</tt> </tt>
<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line">                      <tt class="py-string">'--request_queue_size'</tt><tt class="py-op">,</tt> </tt>
<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'5'</tt><tt class="py-op">,</tt> </tt>
<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'request_queue_size'</tt><tt class="py-op">,</tt> </tt>
<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-172" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-172', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line"> </tt>
<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-o'</tt><tt class="py-op">,</tt> </tt>
<a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line">                      <tt class="py-string">'--timeout'</tt><tt class="py-op">,</tt> </tt>
<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'10'</tt><tt class="py-op">,</tt> </tt>
<a name="L539"></a><tt class="py-lineno">539</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'timeout'</tt><tt class="py-op">,</tt> </tt>
<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'timeout for individual request (10 seconds)'</tt><tt class="py-op">)</tt> </tt>
<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line"> </tt>
<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-z'</tt><tt class="py-op">,</tt> </tt>
<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line">                      <tt class="py-string">'--shutdown_timeout'</tt><tt class="py-op">,</tt> </tt>
<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">'5'</tt><tt class="py-op">,</tt> </tt>
<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'shutdown_timeout'</tt><tt class="py-op">,</tt> </tt>
<a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'timeout on shutdown of server (5 seconds)'</tt><tt class="py-op">)</tt> </tt>
<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-f'</tt><tt class="py-op">,</tt> </tt>
<a name="L550"></a><tt class="py-lineno">550</tt>  <tt class="py-line">                      <tt class="py-string">'--folder'</tt><tt class="py-op">,</tt> </tt>
<a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getcwd</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L552"></a><tt class="py-lineno">552</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'folder'</tt><tt class="py-op">,</tt> </tt>
<a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'folder from which to run web2py'</tt><tt class="py-op">)</tt> </tt>
<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line"> </tt>
<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-v'</tt><tt class="py-op">,</tt> </tt>
<a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line">                      <tt class="py-string">'--verbose'</tt><tt class="py-op">,</tt> </tt>
<a name="L557"></a><tt class="py-lineno">557</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'verbose'</tt><tt class="py-op">,</tt> </tt>
<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'increase --test verbosity'</tt><tt class="py-op">)</tt> </tt>
<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line"> </tt>
<a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-Q'</tt><tt class="py-op">,</tt> </tt>
<a name="L563"></a><tt class="py-lineno">563</tt>  <tt class="py-line">                      <tt class="py-string">'--quiet'</tt><tt class="py-op">,</tt> </tt>
<a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'quiet'</tt><tt class="py-op">,</tt> </tt>
<a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'disable all output'</tt><tt class="py-op">)</tt> </tt>
<a name="L568"></a><tt class="py-lineno">568</tt>  <tt class="py-line"> </tt>
<a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line">    <tt id="link-173" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-173', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'set debug output level (0-100, 0 means all, 100 means none;'</tt> </tt>
<a name="L570"></a><tt class="py-lineno">570</tt>  <tt class="py-line">    <tt id="link-174" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-174', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' default is 30)'</tt> </tt>
<a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-D'</tt><tt class="py-op">,</tt> </tt>
<a name="L572"></a><tt class="py-lineno">572</tt>  <tt class="py-line">                      <tt class="py-string">'--debug'</tt><tt class="py-op">,</tt> </tt>
<a name="L573"></a><tt class="py-lineno">573</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'debuglevel'</tt><tt class="py-op">,</tt> </tt>
<a name="L574"></a><tt class="py-lineno">574</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-number">30</tt><tt class="py-op">,</tt> </tt>
<a name="L575"></a><tt class="py-lineno">575</tt>  <tt class="py-line">                      <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L576"></a><tt class="py-lineno">576</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-175" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-175', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L577"></a><tt class="py-lineno">577</tt>  <tt class="py-line"> </tt>
<a name="L578"></a><tt class="py-lineno">578</tt>  <tt class="py-line">    <tt id="link-176" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-176', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'run web2py in interactive shell or IPython (if installed) with'</tt> </tt>
<a name="L579"></a><tt class="py-lineno">579</tt>  <tt class="py-line">    <tt id="link-177" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-177', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' specified appname (if app does not exist it will be created).'</tt> </tt>
<a name="L580"></a><tt class="py-lineno">580</tt>  <tt class="py-line">    <tt id="link-178" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-178', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' APPNAME like a/c/f (c,f optional)'</tt> </tt>
<a name="L581"></a><tt class="py-lineno">581</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-S'</tt><tt class="py-op">,</tt> </tt>
<a name="L582"></a><tt class="py-lineno">582</tt>  <tt class="py-line">                      <tt class="py-string">'--shell'</tt><tt class="py-op">,</tt> </tt>
<a name="L583"></a><tt class="py-lineno">583</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'shell'</tt><tt class="py-op">,</tt> </tt>
<a name="L584"></a><tt class="py-lineno">584</tt>  <tt class="py-line">                      <tt class="py-name">metavar</tt><tt class="py-op">=</tt><tt class="py-string">'APPNAME'</tt><tt class="py-op">,</tt> </tt>
<a name="L585"></a><tt class="py-lineno">585</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-179" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-179', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L586"></a><tt class="py-lineno">586</tt>  <tt class="py-line"> </tt>
<a name="L587"></a><tt class="py-lineno">587</tt>  <tt class="py-line">    <tt id="link-180" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-180', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'run web2py in interactive shell or bpython (if installed) with'</tt> </tt>
<a name="L588"></a><tt class="py-lineno">588</tt>  <tt class="py-line">    <tt id="link-181" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-181', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' specified appname (if app does not exist it will be created).'</tt> </tt>
<a name="L589"></a><tt class="py-lineno">589</tt>  <tt class="py-line">    <tt id="link-182" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-182', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">'\n Use combined with --shell'</tt> </tt>
<a name="L590"></a><tt class="py-lineno">590</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-B'</tt><tt class="py-op">,</tt> </tt>
<a name="L591"></a><tt class="py-lineno">591</tt>  <tt class="py-line">                      <tt class="py-string">'--bpython'</tt><tt class="py-op">,</tt> </tt>
<a name="L592"></a><tt class="py-lineno">592</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L593"></a><tt class="py-lineno">593</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L594"></a><tt class="py-lineno">594</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'bpython'</tt><tt class="py-op">,</tt> </tt>
<a name="L595"></a><tt class="py-lineno">595</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-183" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-183', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L596"></a><tt class="py-lineno">596</tt>  <tt class="py-line"> </tt>
<a name="L597"></a><tt class="py-lineno">597</tt>  <tt class="py-line">    <tt id="link-184" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-184', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'only use plain python shell; should be used with --shell option'</tt> </tt>
<a name="L598"></a><tt class="py-lineno">598</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-P'</tt><tt class="py-op">,</tt> </tt>
<a name="L599"></a><tt class="py-lineno">599</tt>  <tt class="py-line">                      <tt class="py-string">'--plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L600"></a><tt class="py-lineno">600</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L601"></a><tt class="py-lineno">601</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L602"></a><tt class="py-lineno">602</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'plain'</tt><tt class="py-op">,</tt> </tt>
<a name="L603"></a><tt class="py-lineno">603</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-185" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-185', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L604"></a><tt class="py-lineno">604</tt>  <tt class="py-line"> </tt>
<a name="L605"></a><tt class="py-lineno">605</tt>  <tt class="py-line">    <tt id="link-186" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-186', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'auto import model files; default is False; should be used'</tt> </tt>
<a name="L606"></a><tt class="py-lineno">606</tt>  <tt class="py-line">    <tt id="link-187" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-187', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' with --shell option'</tt> </tt>
<a name="L607"></a><tt class="py-lineno">607</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-M'</tt><tt class="py-op">,</tt> </tt>
<a name="L608"></a><tt class="py-lineno">608</tt>  <tt class="py-line">                      <tt class="py-string">'--import_models'</tt><tt class="py-op">,</tt> </tt>
<a name="L609"></a><tt class="py-lineno">609</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L610"></a><tt class="py-lineno">610</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L611"></a><tt class="py-lineno">611</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'import_models'</tt><tt class="py-op">,</tt> </tt>
<a name="L612"></a><tt class="py-lineno">612</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-188" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-188', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L613"></a><tt class="py-lineno">613</tt>  <tt class="py-line"> </tt>
<a name="L614"></a><tt class="py-lineno">614</tt>  <tt class="py-line">    <tt id="link-189" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-189', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'run PYTHON_FILE in web2py environment;'</tt> </tt>
<a name="L615"></a><tt class="py-lineno">615</tt>  <tt class="py-line">    <tt id="link-190" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-190', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">+=</tt> <tt class="py-string">' should be used with --shell option'</tt> </tt>
<a name="L616"></a><tt class="py-lineno">616</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-R'</tt><tt class="py-op">,</tt> </tt>
<a name="L617"></a><tt class="py-lineno">617</tt>  <tt class="py-line">                      <tt class="py-string">'--run'</tt><tt class="py-op">,</tt> </tt>
<a name="L618"></a><tt class="py-lineno">618</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'run'</tt><tt class="py-op">,</tt> </tt>
<a name="L619"></a><tt class="py-lineno">619</tt>  <tt class="py-line">                      <tt class="py-name">metavar</tt><tt class="py-op">=</tt><tt class="py-string">'PYTHON_FILE'</tt><tt class="py-op">,</tt> </tt>
<a name="L620"></a><tt class="py-lineno">620</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L621"></a><tt class="py-lineno">621</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-191" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-191', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L622"></a><tt class="py-lineno">622</tt>  <tt class="py-line"> </tt>
<a name="L623"></a><tt class="py-lineno">623</tt>  <tt class="py-line">    <tt id="link-192" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-192', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'run doctests in web2py environment; '</tt> <tt class="py-op">+</tt>\ </tt>
<a name="L624"></a><tt class="py-lineno">624</tt>  <tt class="py-line">        <tt class="py-string">'TEST_PATH like a/c/f (c,f optional)'</tt> </tt>
<a name="L625"></a><tt class="py-lineno">625</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-T'</tt><tt class="py-op">,</tt> </tt>
<a name="L626"></a><tt class="py-lineno">626</tt>  <tt class="py-line">                      <tt class="py-string">'--test'</tt><tt class="py-op">,</tt> </tt>
<a name="L627"></a><tt class="py-lineno">627</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'test'</tt><tt class="py-op">,</tt> </tt>
<a name="L628"></a><tt class="py-lineno">628</tt>  <tt class="py-line">                      <tt class="py-name">metavar</tt><tt class="py-op">=</tt><tt class="py-string">'TEST_PATH'</tt><tt class="py-op">,</tt> </tt>
<a name="L629"></a><tt class="py-lineno">629</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L630"></a><tt class="py-lineno">630</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-193" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-193', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L631"></a><tt class="py-lineno">631</tt>  <tt class="py-line"> </tt>
<a name="L632"></a><tt class="py-lineno">632</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-W'</tt><tt class="py-op">,</tt> </tt>
<a name="L633"></a><tt class="py-lineno">633</tt>  <tt class="py-line">                      <tt class="py-string">'--winservice'</tt><tt class="py-op">,</tt> </tt>
<a name="L634"></a><tt class="py-lineno">634</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'winservice'</tt><tt class="py-op">,</tt> </tt>
<a name="L635"></a><tt class="py-lineno">635</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L636"></a><tt class="py-lineno">636</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'-W install|start|stop as Windows service'</tt><tt class="py-op">)</tt> </tt>
<a name="L637"></a><tt class="py-lineno">637</tt>  <tt class="py-line"> </tt>
<a name="L638"></a><tt class="py-lineno">638</tt>  <tt class="py-line">    <tt id="link-194" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-194', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'trigger a cron run manually; usually invoked from a system crontab'</tt> </tt>
<a name="L639"></a><tt class="py-lineno">639</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-C'</tt><tt class="py-op">,</tt> </tt>
<a name="L640"></a><tt class="py-lineno">640</tt>  <tt class="py-line">                      <tt class="py-string">'--cron'</tt><tt class="py-op">,</tt> </tt>
<a name="L641"></a><tt class="py-lineno">641</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L642"></a><tt class="py-lineno">642</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'extcron'</tt><tt class="py-op">,</tt> </tt>
<a name="L643"></a><tt class="py-lineno">643</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L644"></a><tt class="py-lineno">644</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-195" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-195', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L645"></a><tt class="py-lineno">645</tt>  <tt class="py-line"> </tt>
<a name="L646"></a><tt class="py-lineno">646</tt>  <tt class="py-line">    <tt id="link-196" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-196', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'triggers the use of softcron'</tt> </tt>
<a name="L647"></a><tt class="py-lineno">647</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'--softcron'</tt><tt class="py-op">,</tt> </tt>
<a name="L648"></a><tt class="py-lineno">648</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L649"></a><tt class="py-lineno">649</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'softcron'</tt><tt class="py-op">,</tt> </tt>
<a name="L650"></a><tt class="py-lineno">650</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L651"></a><tt class="py-lineno">651</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-197" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-197', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L652"></a><tt class="py-lineno">652</tt>  <tt class="py-line"> </tt>
<a name="L653"></a><tt class="py-lineno">653</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-N'</tt><tt class="py-op">,</tt> </tt>
<a name="L654"></a><tt class="py-lineno">654</tt>  <tt class="py-line">                      <tt class="py-string">'--no-cron'</tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno">655</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L656"></a><tt class="py-lineno">656</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'nocron'</tt><tt class="py-op">,</tt> </tt>
<a name="L657"></a><tt class="py-lineno">657</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L658"></a><tt class="py-lineno">658</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'do not start cron automatically'</tt><tt class="py-op">)</tt> </tt>
<a name="L659"></a><tt class="py-lineno">659</tt>  <tt class="py-line"> </tt>
<a name="L660"></a><tt class="py-lineno">660</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-J'</tt><tt class="py-op">,</tt> </tt>
<a name="L661"></a><tt class="py-lineno">661</tt>  <tt class="py-line">                      <tt class="py-string">'--cronjob'</tt><tt class="py-op">,</tt> </tt>
<a name="L662"></a><tt class="py-lineno">662</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L663"></a><tt class="py-lineno">663</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'cronjob'</tt><tt class="py-op">,</tt> </tt>
<a name="L664"></a><tt class="py-lineno">664</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L665"></a><tt class="py-lineno">665</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'identify cron-initiated command'</tt><tt class="py-op">)</tt> </tt>
<a name="L666"></a><tt class="py-lineno">666</tt>  <tt class="py-line"> </tt>
<a name="L667"></a><tt class="py-lineno">667</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-L'</tt><tt class="py-op">,</tt> </tt>
<a name="L668"></a><tt class="py-lineno">668</tt>  <tt class="py-line">                      <tt class="py-string">'--config'</tt><tt class="py-op">,</tt> </tt>
<a name="L669"></a><tt class="py-lineno">669</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'config'</tt><tt class="py-op">,</tt> </tt>
<a name="L670"></a><tt class="py-lineno">670</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L671"></a><tt class="py-lineno">671</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'config file'</tt><tt class="py-op">)</tt> </tt>
<a name="L672"></a><tt class="py-lineno">672</tt>  <tt class="py-line"> </tt>
<a name="L673"></a><tt class="py-lineno">673</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-F'</tt><tt class="py-op">,</tt> </tt>
<a name="L674"></a><tt class="py-lineno">674</tt>  <tt class="py-line">                      <tt class="py-string">'--profiler'</tt><tt class="py-op">,</tt> </tt>
<a name="L675"></a><tt class="py-lineno">675</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'profiler_filename'</tt><tt class="py-op">,</tt> </tt>
<a name="L676"></a><tt class="py-lineno">676</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L677"></a><tt class="py-lineno">677</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'profiler filename'</tt><tt class="py-op">)</tt> </tt>
<a name="L678"></a><tt class="py-lineno">678</tt>  <tt class="py-line"> </tt>
<a name="L679"></a><tt class="py-lineno">679</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-t'</tt><tt class="py-op">,</tt> </tt>
<a name="L680"></a><tt class="py-lineno">680</tt>  <tt class="py-line">                      <tt class="py-string">'--taskbar'</tt><tt class="py-op">,</tt> </tt>
<a name="L681"></a><tt class="py-lineno">681</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L682"></a><tt class="py-lineno">682</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'taskbar'</tt><tt class="py-op">,</tt> </tt>
<a name="L683"></a><tt class="py-lineno">683</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L684"></a><tt class="py-lineno">684</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'use web2py gui and run in taskbar (system tray)'</tt><tt class="py-op">)</tt> </tt>
<a name="L685"></a><tt class="py-lineno">685</tt>  <tt class="py-line"> </tt>
<a name="L686"></a><tt class="py-lineno">686</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L687"></a><tt class="py-lineno">687</tt>  <tt class="py-line">                      <tt class="py-string">'--nogui'</tt><tt class="py-op">,</tt> </tt>
<a name="L688"></a><tt class="py-lineno">688</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L689"></a><tt class="py-lineno">689</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L690"></a><tt class="py-lineno">690</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'nogui'</tt><tt class="py-op">,</tt> </tt>
<a name="L691"></a><tt class="py-lineno">691</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'text-only, no GUI'</tt><tt class="py-op">)</tt> </tt>
<a name="L692"></a><tt class="py-lineno">692</tt>  <tt class="py-line"> </tt>
<a name="L693"></a><tt class="py-lineno">693</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'-A'</tt><tt class="py-op">,</tt> </tt>
<a name="L694"></a><tt class="py-lineno">694</tt>  <tt class="py-line">                      <tt class="py-string">'--args'</tt><tt class="py-op">,</tt> </tt>
<a name="L695"></a><tt class="py-lineno">695</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store'</tt><tt class="py-op">,</tt> </tt>
<a name="L696"></a><tt class="py-lineno">696</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'args'</tt><tt class="py-op">,</tt> </tt>
<a name="L697"></a><tt class="py-lineno">697</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L698"></a><tt class="py-lineno">698</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'should be followed by a list of arguments to be passed to script, to be used with -S, -A must be the last option'</tt><tt class="py-op">)</tt> </tt>
<a name="L699"></a><tt class="py-lineno">699</tt>  <tt class="py-line"> </tt>
<a name="L700"></a><tt class="py-lineno">700</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'--no-banner'</tt><tt class="py-op">,</tt> </tt>
<a name="L701"></a><tt class="py-lineno">701</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L702"></a><tt class="py-lineno">702</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L703"></a><tt class="py-lineno">703</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'nobanner'</tt><tt class="py-op">,</tt> </tt>
<a name="L704"></a><tt class="py-lineno">704</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'Do not print header banner'</tt><tt class="py-op">)</tt> </tt>
<a name="L705"></a><tt class="py-lineno">705</tt>  <tt class="py-line"> </tt>
<a name="L706"></a><tt class="py-lineno">706</tt>  <tt class="py-line">    <tt id="link-198" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-198', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'listen on multiple addresses: "ip:port:cert:key;ip2:port2:cert2:key2;..." (:cert:key optional; no spaces)'</tt> </tt>
<a name="L707"></a><tt class="py-lineno">707</tt>  <tt class="py-line">    <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">add_option</tt><tt class="py-op">(</tt><tt class="py-string">'--interfaces'</tt><tt class="py-op">,</tt> </tt>
<a name="L708"></a><tt class="py-lineno">708</tt>  <tt class="py-line">                      <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store'</tt><tt class="py-op">,</tt> </tt>
<a name="L709"></a><tt class="py-lineno">709</tt>  <tt class="py-line">                      <tt class="py-name">dest</tt><tt class="py-op">=</tt><tt class="py-string">'interfaces'</tt><tt class="py-op">,</tt> </tt>
<a name="L710"></a><tt class="py-lineno">710</tt>  <tt class="py-line">                      <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L711"></a><tt class="py-lineno">711</tt>  <tt class="py-line">                      <tt class="py-name">help</tt><tt class="py-op">=</tt><tt id="link-199" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-199', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L712"></a><tt class="py-lineno">712</tt>  <tt class="py-line"> </tt>
<a name="L713"></a><tt class="py-lineno">713</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-string">'-A'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">:</tt> <tt id="link-200" class="py-name" targets="Variable psycopg2.k=psycopg2-module.html#k"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-200', 'k', 'link-200');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">.</tt><tt class="py-name">index</tt><tt class="py-op">(</tt><tt class="py-string">'-A'</tt><tt class="py-op">)</tt> </tt>
<a name="L714"></a><tt class="py-lineno">714</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-string">'--args'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">:</tt> <tt id="link-201" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-201', 'k', 'link-200');">k</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">.</tt><tt class="py-name">index</tt><tt class="py-op">(</tt><tt class="py-string">'--args'</tt><tt class="py-op">)</tt> </tt>
<a name="L715"></a><tt class="py-lineno">715</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt id="link-202" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-202', 'k', 'link-200');">k</a></tt><tt class="py-op">=</tt><tt id="link-203" class="py-name"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-203', 'len', 'link-161');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">)</tt> </tt>
<a name="L716"></a><tt class="py-lineno">716</tt>  <tt class="py-line">    <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">,</tt> <tt class="py-name">other_args</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-204" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-204', 'k', 'link-200');">k</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt id="link-205" class="py-name"><a title="psycopg2.k" class="py-name" href="#" onclick="return doclink('link-205', 'k', 'link-200');">k</a></tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L717"></a><tt class="py-lineno">717</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt id="link-206" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-206', 'options', 'link-56');">options</a></tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">parse_args</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L718"></a><tt class="py-lineno">718</tt>  <tt class="py-line">    <tt id="link-207" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-207', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-208" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-208', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="web2py.gluon.newcron.cronlauncher.run
web2py.gluon.newcron.extcron.run
web2py.gluon.newcron.hardcron.run
web2py.gluon.newcron.softcron.run
web2py.gluon.rocket.Listener.run
web2py.gluon.rocket.Monitor.run
web2py.gluon.rocket.Worker.run
web2py.gluon.shell.run
web2py.gluon.tools.Service.run" class="py-name" href="#" onclick="return doclink('link-209', 'run', 'link-10');">run</a></tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">other_args</tt> </tt>
<a name="L719"></a><tt class="py-lineno">719</tt>  <tt class="py-line">    <tt id="link-210" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-210', 'global_settings', 'link-13');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cmd_options</tt> <tt class="py-op">=</tt> <tt id="link-211" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-211', 'options', 'link-56');">options</a></tt> </tt>
<a name="L720"></a><tt class="py-lineno">720</tt>  <tt class="py-line">    <tt id="link-212" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-212', 'global_settings', 'link-13');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cmd_args</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> </tt>
<a name="L721"></a><tt class="py-lineno">721</tt>  <tt class="py-line"> </tt>
<a name="L722"></a><tt class="py-lineno">722</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-213" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-213', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">quiet</tt><tt class="py-op">:</tt> </tt>
<a name="L723"></a><tt class="py-lineno">723</tt>  <tt class="py-line">        <tt class="py-name">capture</tt> <tt class="py-op">=</tt> <tt class="py-name">cStringIO</tt><tt class="py-op">.</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L724"></a><tt class="py-lineno">724</tt>  <tt class="py-line">        <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt> <tt class="py-op">=</tt> <tt class="py-name">capture</tt> </tt>
<a name="L725"></a><tt class="py-lineno">725</tt>  <tt class="py-line">        <tt id="link-214" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-214', 'logger', 'link-33');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">CRITICAL</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L726"></a><tt class="py-lineno">726</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L727"></a><tt class="py-lineno">727</tt>  <tt class="py-line">        <tt id="link-215" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-215', 'logger', 'link-33');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt id="link-216" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-216', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">debuglevel</tt><tt class="py-op">)</tt> </tt>
<a name="L728"></a><tt class="py-lineno">728</tt>  <tt class="py-line"> </tt>
<a name="L729"></a><tt class="py-lineno">729</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-217" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-217', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'.py'</tt><tt class="py-op">:</tt> </tt>
<a name="L730"></a><tt class="py-lineno">730</tt>  <tt class="py-line">        <tt id="link-218" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-218', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt> <tt class="py-op">=</tt> <tt id="link-219" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-219', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
<a name="L731"></a><tt class="py-lineno">731</tt>  <tt class="py-line"> </tt>
<a name="L732"></a><tt class="py-lineno">732</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-220" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-220', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">cronjob</tt><tt class="py-op">:</tt> </tt>
<a name="L733"></a><tt class="py-lineno">733</tt>  <tt class="py-line">        <tt id="link-221" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-221', 'global_settings', 'link-13');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">cronjob</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt>  <tt class="py-comment"># tell the world</tt> </tt>
<a name="L734"></a><tt class="py-lineno">734</tt>  <tt class="py-line">        <tt id="link-222" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-222', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nocron</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt>   <tt class="py-comment"># don't start cron jobs</tt> </tt>
<a name="L735"></a><tt class="py-lineno">735</tt>  <tt class="py-line">        <tt id="link-223" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-223', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">plain</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt>    <tt class="py-comment"># cronjobs use a plain shell</tt> </tt>
<a name="L736"></a><tt class="py-lineno">736</tt>  <tt class="py-line"> </tt>
<a name="L737"></a><tt class="py-lineno">737</tt>  <tt class="py-line">    <tt id="link-224" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-224', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-225" class="py-name" targets="Function web2py.gluon.fileutils.abspath()=web2py.gluon.fileutils-module.html#abspath"><a title="web2py.gluon.fileutils.abspath" class="py-name" href="#" onclick="return doclink('link-225', 'abspath', 'link-225');">abspath</a></tt><tt class="py-op">(</tt><tt id="link-226" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-226', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L738"></a><tt class="py-lineno">738</tt>  <tt class="py-line"> </tt>
<a name="L739"></a><tt class="py-lineno">739</tt>  <tt class="py-line">    <tt class="py-comment">#  accept --interfaces in the form "ip:port:cert:key;ip2:port2;ip3:port3:cert3:key3"</tt> </tt>
<a name="L740"></a><tt class="py-lineno">740</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#  (no spaces; optional cert:key indicate SSL)</tt> </tt>
<a name="L741"></a><tt class="py-lineno">741</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment">#</tt> </tt>
<a name="L742"></a><tt class="py-lineno">742</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-227" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-227', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L743"></a><tt class="py-lineno">743</tt>  <tt class="py-line">        <tt id="link-228" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-228', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">interface</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">interface</tt> <tt class="py-keyword">in</tt> <tt id="link-229" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-229', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">';'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L744"></a><tt class="py-lineno">744</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">interface</tt> <tt class="py-keyword">in</tt> <tt id="link-230" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-230', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">:</tt> </tt>
<a name="L745"></a><tt class="py-lineno">745</tt>  <tt class="py-line">            <tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt>    <tt class="py-comment"># numeric port</tt> </tt>
<a name="L746"></a><tt class="py-lineno">746</tt>  <tt class="py-line">        <tt id="link-231" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-231', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">interface</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">interface</tt> <tt class="py-keyword">in</tt> <tt id="link-232" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-232', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">]</tt> </tt>
<a name="L747"></a><tt class="py-lineno">747</tt>  <tt class="py-line"> </tt>
<a name="L748"></a><tt class="py-lineno">748</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-233" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-233', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">numthreads</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt id="link-234" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-234', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L749"></a><tt class="py-lineno">749</tt>  <tt class="py-line">        <tt id="link-235" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-235', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt> <tt class="py-op">=</tt> <tt id="link-236" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-236', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">numthreads</tt>  <tt class="py-comment"># legacy</tt> </tt>
<a name="L750"></a><tt class="py-lineno">750</tt>  <tt class="py-line"> </tt>
<a name="L751"></a><tt class="py-lineno">751</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-237" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-237', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">cronjob</tt><tt class="py-op">:</tt> </tt>
<a name="L752"></a><tt class="py-lineno">752</tt>  <tt class="py-line">        <tt class="py-comment"># If we have the applications package or if we should upgrade</tt> </tt>
<a name="L753"></a><tt class="py-lineno">753</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-238" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-238', 'exists', 'link-106');">exists</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications/__init__.py'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L754"></a><tt class="py-lineno">754</tt>  <tt class="py-line">            <tt id="link-239" class="py-name"><a title="web2py.gluon.fileutils.write_file" class="py-name" href="#" onclick="return doclink('link-239', 'write_file', 'link-8');">write_file</a></tt><tt class="py-op">(</tt><tt class="py-string">'applications/__init__.py'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L755"></a><tt class="py-lineno">755</tt>  <tt class="py-line"> </tt>
<a name="L756"></a><tt class="py-lineno">756</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-240" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-240', 'exists', 'link-106');">exists</a></tt><tt class="py-op">(</tt><tt class="py-string">'welcome.w2p'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-241" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.exists" class="py-name" href="#" onclick="return doclink('link-241', 'exists', 'link-106');">exists</a></tt><tt class="py-op">(</tt><tt class="py-string">'NEWINSTALL'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L757"></a><tt class="py-lineno">757</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L758"></a><tt class="py-lineno">758</tt>  <tt class="py-line">                <tt id="link-242" class="py-name"><a title="web2py.gluon.fileutils.w2p_pack" class="py-name" href="#" onclick="return doclink('link-242', 'w2p_pack', 'link-6');">w2p_pack</a></tt><tt class="py-op">(</tt><tt class="py-string">'welcome.w2p'</tt><tt class="py-op">,</tt><tt class="py-string">'applications/welcome'</tt><tt class="py-op">)</tt> </tt>
<a name="L759"></a><tt class="py-lineno">759</tt>  <tt class="py-line">                <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-string">'NEWINSTALL'</tt><tt class="py-op">)</tt> </tt>
<a name="L760"></a><tt class="py-lineno">760</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L761"></a><tt class="py-lineno">761</tt>  <tt class="py-line">                <tt id="link-243" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-243', 'msg', 'link-27');">msg</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"New installation: unable to create welcome.w2p file"</tt> </tt>
<a name="L762"></a><tt class="py-lineno">762</tt>  <tt class="py-line">                <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-244" class="py-name"><a title="web2py.gluon.dal.DatabaseStoredFile.write
web2py.gluon.debug.Pipe.write
web2py.gluon.globals.Response.write
web2py.gluon.rocket.WSGIWorker.write
web2py.gluon.widget.IO.write" class="py-name" href="#" onclick="return doclink('link-244', 'write', 'link-31');">write</a></tt><tt class="py-op">(</tt><tt id="link-245" class="py-name"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-245', 'msg', 'link-27');">msg</a></tt><tt class="py-op">)</tt> </tt>
<a name="L763"></a><tt class="py-lineno">763</tt>  <tt class="py-line"> </tt>
<a name="L764"></a><tt class="py-lineno">764</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-246" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-246', 'options', 'link-56');">options</a></tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
</div><a name="L765"></a><tt class="py-lineno">765</tt>  <tt class="py-line"> </tt>
<a name="L766"></a><tt class="py-lineno">766</tt>  <tt class="py-line"> </tt>
<a name="start"></a><div id="start-def"><a name="L767"></a><tt class="py-lineno">767</tt> <a class="py-toggle" href="#" id="start-toggle" onclick="return toggle('start');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.widget-module.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">cron</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="start-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="start-expanded"><a name="L768"></a><tt class="py-lineno">768</tt>  <tt class="py-line">    <tt class="py-docstring">""" Start server  """</tt> </tt>
<a name="L769"></a><tt class="py-lineno">769</tt>  <tt class="py-line"> </tt>
<a name="L770"></a><tt class="py-lineno">770</tt>  <tt class="py-line">    <tt class="py-comment"># ## get command line arguments</tt> </tt>
<a name="L771"></a><tt class="py-lineno">771</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L772"></a><tt class="py-lineno">772</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt id="link-247" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-247', 'options', 'link-56');">options</a></tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt id="link-248" class="py-name" targets="Function web2py.gluon.widget.console()=web2py.gluon.widget-module.html#console"><a title="web2py.gluon.widget.console" class="py-name" href="#" onclick="return doclink('link-248', 'console', 'link-248');">console</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L773"></a><tt class="py-lineno">773</tt>  <tt class="py-line"> </tt>
<a name="L774"></a><tt class="py-lineno">774</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-249" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-249', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nobanner</tt><tt class="py-op">:</tt> </tt>
<a name="L775"></a><tt class="py-lineno">775</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt id="link-250" class="py-name"><a title="web2py.gluon.widget.ProgramName" class="py-name" href="#" onclick="return doclink('link-250', 'ProgramName', 'link-17');">ProgramName</a></tt> </tt>
<a name="L776"></a><tt class="py-lineno">776</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt id="link-251" class="py-name"><a title="web2py.gluon.widget.ProgramAuthor" class="py-name" href="#" onclick="return doclink('link-251', 'ProgramAuthor', 'link-18');">ProgramAuthor</a></tt> </tt>
<a name="L777"></a><tt class="py-lineno">777</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt id="link-252" class="py-name"><a title="web2py.gluon.widget.ProgramVersion" class="py-name" href="#" onclick="return doclink('link-252', 'ProgramVersion', 'link-19');">ProgramVersion</a></tt> </tt>
<a name="L778"></a><tt class="py-lineno">778</tt>  <tt class="py-line"> </tt>
<a name="L779"></a><tt class="py-lineno">779</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt id="link-253" class="py-name" targets="Module web2py.gluon.dal=web2py.gluon.dal-module.html"><a title="web2py.gluon.dal" class="py-name" href="#" onclick="return doclink('link-253', 'dal', 'link-253');">dal</a></tt> <tt class="py-keyword">import</tt> <tt id="link-254" class="py-name" targets="Variable web2py.gluon.dal.drivers=web2py.gluon.dal-module.html#drivers,Variable web2py.gluon.sql.drivers=web2py.gluon.sql-module.html#drivers"><a title="web2py.gluon.dal.drivers
web2py.gluon.sql.drivers" class="py-name" href="#" onclick="return doclink('link-254', 'drivers', 'link-254');">drivers</a></tt> </tt>
<a name="L780"></a><tt class="py-lineno">780</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-255" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-255', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nobanner</tt><tt class="py-op">:</tt> </tt>
<a name="L781"></a><tt class="py-lineno">781</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'Database drivers available: %s'</tt> <tt class="py-op">%</tt> <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt id="link-256" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-256', 'join', 'link-59');">join</a></tt><tt class="py-op">(</tt><tt id="link-257" class="py-name"><a title="web2py.gluon.dal.drivers
web2py.gluon.sql.drivers" class="py-name" href="#" onclick="return doclink('link-257', 'drivers', 'link-254');">drivers</a></tt><tt class="py-op">)</tt> </tt>
<a name="L782"></a><tt class="py-lineno">782</tt>  <tt class="py-line"> </tt>
<a name="L783"></a><tt class="py-lineno">783</tt>  <tt class="py-line"> </tt>
<a name="L784"></a><tt class="py-lineno">784</tt>  <tt class="py-line">    <tt class="py-comment"># ## if -L load options from options.config file</tt> </tt>
<a name="L785"></a><tt class="py-lineno">785</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-258" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-258', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">:</tt> </tt>
<a name="L786"></a><tt class="py-lineno">786</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L787"></a><tt class="py-lineno">787</tt>  <tt class="py-line">            <tt class="py-name">options2</tt> <tt class="py-op">=</tt> <tt class="py-name">__import__</tt><tt class="py-op">(</tt><tt id="link-259" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-259', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L788"></a><tt class="py-lineno">788</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-260" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-260', 'Exception', 'link-16');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L789"></a><tt class="py-lineno">789</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L790"></a><tt class="py-lineno">790</tt>  <tt class="py-line">                <tt class="py-comment"># Jython doesn't like the extra stuff</tt> </tt>
<a name="L791"></a><tt class="py-lineno">791</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">options2</tt> <tt class="py-op">=</tt> <tt class="py-name">__import__</tt><tt class="py-op">(</tt><tt id="link-261" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-261', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">)</tt> </tt>
<a name="L792"></a><tt class="py-lineno">792</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-262" class="py-name"><a title="exceptions.Exception" class="py-name" href="#" onclick="return doclink('link-262', 'Exception', 'link-16');">Exception</a></tt><tt class="py-op">:</tt> </tt>
<a name="L793"></a><tt class="py-lineno">793</tt>  <tt class="py-line">                <tt class="py-keyword">print</tt> <tt class="py-string">'Cannot import config file [%s]'</tt> <tt class="py-op">%</tt> <tt id="link-263" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-263', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt> </tt>
<a name="L794"></a><tt class="py-lineno">794</tt>  <tt class="py-line">                <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L795"></a><tt class="py-lineno">795</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dir</tt><tt class="py-op">(</tt><tt class="py-name">options2</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L796"></a><tt class="py-lineno">796</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-264" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-264', 'options', 'link-56');">options</a></tt><tt class="py-op">,</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L797"></a><tt class="py-lineno">797</tt>  <tt class="py-line">                <tt class="py-name">setattr</tt><tt class="py-op">(</tt><tt id="link-265" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-265', 'options', 'link-56');">options</a></tt><tt class="py-op">,</tt><tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">options2</tt><tt class="py-op">,</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L798"></a><tt class="py-lineno">798</tt>  <tt class="py-line"> </tt>
<a name="L799"></a><tt class="py-lineno">799</tt>  <tt class="py-line">    <tt class="py-comment"># ## if -T run doctests (no cron)</tt> </tt>
<a name="L800"></a><tt class="py-lineno">800</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-266" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-266', 'options', 'link-56');">options</a></tt><tt class="py-op">,</tt><tt class="py-string">'test'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt id="link-267" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-267', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-268" class="py-name"><a title="web2py.gluon.compileapp.test
web2py.gluon.html.test
web2py.gluon.shell.test" class="py-name" href="#" onclick="return doclink('link-268', 'test', 'link-11');">test</a></tt><tt class="py-op">:</tt> </tt>
<a name="L801"></a><tt class="py-lineno">801</tt>  <tt class="py-line">        <tt id="link-269" class="py-name"><a title="web2py.gluon.compileapp.test
web2py.gluon.html.test
web2py.gluon.shell.test" class="py-name" href="#" onclick="return doclink('link-269', 'test', 'link-11');">test</a></tt><tt class="py-op">(</tt><tt id="link-270" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-270', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-271" class="py-name"><a title="web2py.gluon.compileapp.test
web2py.gluon.html.test
web2py.gluon.shell.test" class="py-name" href="#" onclick="return doclink('link-271', 'test', 'link-11');">test</a></tt><tt class="py-op">,</tt> <tt class="py-name">verbose</tt><tt class="py-op">=</tt><tt id="link-272" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-272', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">verbose</tt><tt class="py-op">)</tt> </tt>
<a name="L802"></a><tt class="py-lineno">802</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L803"></a><tt class="py-lineno">803</tt>  <tt class="py-line"> </tt>
<a name="L804"></a><tt class="py-lineno">804</tt>  <tt class="py-line">    <tt class="py-comment"># ## if -S start interactive shell (also no cron)</tt> </tt>
<a name="L805"></a><tt class="py-lineno">805</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-273" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-273', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-274" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-274', 'shell', 'link-9');">shell</a></tt><tt class="py-op">:</tt> </tt>
<a name="L806"></a><tt class="py-lineno">806</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-275" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-275', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L807"></a><tt class="py-lineno">807</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-276" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-276', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">args</tt> </tt>
<a name="L808"></a><tt class="py-lineno">808</tt>  <tt class="py-line">        <tt id="link-277" class="py-name"><a title="web2py.gluon.newcron.cronlauncher.run
web2py.gluon.newcron.extcron.run
web2py.gluon.newcron.hardcron.run
web2py.gluon.newcron.softcron.run
web2py.gluon.rocket.Listener.run
web2py.gluon.rocket.Monitor.run
web2py.gluon.rocket.Worker.run
web2py.gluon.shell.run
web2py.gluon.tools.Service.run" class="py-name" href="#" onclick="return doclink('link-277', 'run', 'link-10');">run</a></tt><tt class="py-op">(</tt><tt id="link-278" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-278', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-279" class="py-name"><a title="web2py.gluon.shell" class="py-name" href="#" onclick="return doclink('link-279', 'shell', 'link-9');">shell</a></tt><tt class="py-op">,</tt> <tt class="py-name">plain</tt><tt class="py-op">=</tt><tt id="link-280" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-280', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">plain</tt><tt class="py-op">,</tt> <tt class="py-name">bpython</tt><tt class="py-op">=</tt><tt id="link-281" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-281', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">bpython</tt><tt class="py-op">,</tt> </tt>
<a name="L809"></a><tt class="py-lineno">809</tt>  <tt class="py-line">            <tt class="py-name">import_models</tt><tt class="py-op">=</tt><tt id="link-282" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-282', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">import_models</tt><tt class="py-op">,</tt> <tt class="py-name">startfile</tt><tt class="py-op">=</tt><tt id="link-283" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-283', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="web2py.gluon.newcron.cronlauncher.run
web2py.gluon.newcron.extcron.run
web2py.gluon.newcron.hardcron.run
web2py.gluon.newcron.softcron.run
web2py.gluon.rocket.Listener.run
web2py.gluon.rocket.Monitor.run
web2py.gluon.rocket.Worker.run
web2py.gluon.shell.run
web2py.gluon.tools.Service.run" class="py-name" href="#" onclick="return doclink('link-284', 'run', 'link-10');">run</a></tt><tt class="py-op">)</tt> </tt>
<a name="L810"></a><tt class="py-lineno">810</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L811"></a><tt class="py-lineno">811</tt>  <tt class="py-line"> </tt>
<a name="L812"></a><tt class="py-lineno">812</tt>  <tt class="py-line">    <tt class="py-comment"># ## if -C start cron run (extcron) and exit</tt> </tt>
<a name="L813"></a><tt class="py-lineno">813</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ## if -N or not cron disable cron in this *process*</tt> </tt>
<a name="L814"></a><tt class="py-lineno">814</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ## if --softcron use softcron</tt> </tt>
<a name="L815"></a><tt class="py-lineno">815</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ## use hardcron in all other cases</tt> </tt>
<a name="L816"></a><tt class="py-lineno">816</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-285" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-285', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-286" class="py-name" targets="Class web2py.gluon.newcron.extcron=web2py.gluon.newcron.extcron-class.html"><a title="web2py.gluon.newcron.extcron" class="py-name" href="#" onclick="return doclink('link-286', 'extcron', 'link-286');">extcron</a></tt><tt class="py-op">:</tt> </tt>
<a name="L817"></a><tt class="py-lineno">817</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'Starting extcron...'</tt> </tt>
<a name="L818"></a><tt class="py-lineno">818</tt>  <tt class="py-line">        <tt id="link-287" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-287', 'global_settings', 'link-13');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_crontype</tt> <tt class="py-op">=</tt> <tt class="py-string">'external'</tt> </tt>
<a name="L819"></a><tt class="py-lineno">819</tt>  <tt class="py-line">        <tt id="link-288" class="py-name"><a title="web2py.gluon.newcron.extcron" class="py-name" href="#" onclick="return doclink('link-288', 'extcron', 'link-286');">extcron</a></tt> <tt class="py-op">=</tt> <tt id="link-289" class="py-name"><a title="web2py.gluon.newcron" class="py-name" href="#" onclick="return doclink('link-289', 'newcron', 'link-3');">newcron</a></tt><tt class="py-op">.</tt><tt id="link-290" class="py-name"><a title="web2py.gluon.newcron.extcron" class="py-name" href="#" onclick="return doclink('link-290', 'extcron', 'link-286');">extcron</a></tt><tt class="py-op">(</tt><tt id="link-291" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-291', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt>
<a name="L820"></a><tt class="py-lineno">820</tt>  <tt class="py-line">        <tt id="link-292" class="py-name"><a title="web2py.gluon.newcron.extcron" class="py-name" href="#" onclick="return doclink('link-292', 'extcron', 'link-286');">extcron</a></tt><tt class="py-op">.</tt><tt id="link-293" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-293', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L821"></a><tt class="py-lineno">821</tt>  <tt class="py-line">        <tt id="link-294" class="py-name"><a title="web2py.gluon.newcron.extcron" class="py-name" href="#" onclick="return doclink('link-294', 'extcron', 'link-286');">extcron</a></tt><tt class="py-op">.</tt><tt id="link-295" class="py-name"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-295', 'join', 'link-59');">join</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L822"></a><tt class="py-lineno">822</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L823"></a><tt class="py-lineno">823</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">cron</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-296" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-296', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nocron</tt> <tt class="py-keyword">and</tt> <tt id="link-297" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-297', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-298" class="py-name" targets="Class web2py.gluon.newcron.softcron=web2py.gluon.newcron.softcron-class.html"><a title="web2py.gluon.newcron.softcron" class="py-name" href="#" onclick="return doclink('link-298', 'softcron', 'link-298');">softcron</a></tt><tt class="py-op">:</tt> </tt>
<a name="L824"></a><tt class="py-lineno">824</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'Using softcron (but this is not very efficient)'</tt> </tt>
<a name="L825"></a><tt class="py-lineno">825</tt>  <tt class="py-line">        <tt id="link-299" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-299', 'global_settings', 'link-13');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_crontype</tt> <tt class="py-op">=</tt> <tt class="py-string">'soft'</tt> </tt>
<a name="L826"></a><tt class="py-lineno">826</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">cron</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-300" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-300', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nocron</tt><tt class="py-op">:</tt> </tt>
<a name="L827"></a><tt class="py-lineno">827</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'Starting hardcron...'</tt> </tt>
<a name="L828"></a><tt class="py-lineno">828</tt>  <tt class="py-line">        <tt id="link-301" class="py-name"><a title="web2py.gluon.settings.global_settings" class="py-name" href="#" onclick="return doclink('link-301', 'global_settings', 'link-13');">global_settings</a></tt><tt class="py-op">.</tt><tt class="py-name">web2py_crontype</tt> <tt class="py-op">=</tt> <tt class="py-string">'hard'</tt> </tt>
<a name="L829"></a><tt class="py-lineno">829</tt>  <tt class="py-line">        <tt id="link-302" class="py-name"><a title="web2py.gluon.newcron" class="py-name" href="#" onclick="return doclink('link-302', 'newcron', 'link-3');">newcron</a></tt><tt class="py-op">.</tt><tt id="link-303" class="py-name" targets="Class web2py.gluon.newcron.hardcron=web2py.gluon.newcron.hardcron-class.html"><a title="web2py.gluon.newcron.hardcron" class="py-name" href="#" onclick="return doclink('link-303', 'hardcron', 'link-303');">hardcron</a></tt><tt class="py-op">(</tt><tt id="link-304" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-304', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-305" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-305', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L830"></a><tt class="py-lineno">830</tt>  <tt class="py-line"> </tt>
<a name="L831"></a><tt class="py-lineno">831</tt>  <tt class="py-line">    <tt class="py-comment"># ## if -W install/start/stop web2py as service</tt> </tt>
<a name="L832"></a><tt class="py-lineno">832</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt id="link-306" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-306', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-307" class="py-name"><a title="web2py.gluon.winservice" class="py-name" href="#" onclick="return doclink('link-307', 'winservice', 'link-14');">winservice</a></tt><tt class="py-op">:</tt> </tt>
<a name="L833"></a><tt class="py-lineno">833</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-308" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-308', 'name', 'link-308');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'nt'</tt><tt class="py-op">:</tt> </tt>
<a name="L834"></a><tt class="py-lineno">834</tt>  <tt class="py-line">            <tt id="link-309" class="py-name"><a title="web2py.gluon.winservice.web2py_windows_service_handler" class="py-name" href="#" onclick="return doclink('link-309', 'web2py_windows_service_handler', 'link-15');">web2py_windows_service_handler</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-310" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-310', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt id="link-311" class="py-name"><a title="web2py.gluon.winservice" class="py-name" href="#" onclick="return doclink('link-311', 'winservice', 'link-14');">winservice</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L835"></a><tt class="py-lineno">835</tt>  <tt class="py-line">                    <tt id="link-312" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-312', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">)</tt> </tt>
<a name="L836"></a><tt class="py-lineno">836</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L837"></a><tt class="py-lineno">837</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-string">'Error: Windows services not supported on this platform'</tt> </tt>
<a name="L838"></a><tt class="py-lineno">838</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L839"></a><tt class="py-lineno">839</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> </tt>
<a name="L840"></a><tt class="py-lineno">840</tt>  <tt class="py-line"> </tt>
<a name="L841"></a><tt class="py-lineno">841</tt>  <tt class="py-line">    <tt class="py-comment"># ## if no password provided and havetk start Tk interface</tt> </tt>
<a name="L842"></a><tt class="py-lineno">842</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># ## or start interface if we want to put in taskbar (system tray)</tt> </tt>
<a name="L843"></a><tt class="py-lineno">843</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L844"></a><tt class="py-lineno">844</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L845"></a><tt class="py-lineno">845</tt>  <tt class="py-line">        <tt id="link-313" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-313', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt> </tt>
<a name="L846"></a><tt class="py-lineno">846</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L847"></a><tt class="py-lineno">847</tt>  <tt class="py-line">        <tt id="link-314" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-314', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L848"></a><tt class="py-lineno">848</tt>  <tt class="py-line"> </tt>
<a name="L849"></a><tt class="py-lineno">849</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-315" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-315', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-316" class="py-name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-316', 'name', 'link-308');">name</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">'nt'</tt><tt class="py-op">:</tt> </tt>
<a name="L850"></a><tt class="py-lineno">850</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'Error: taskbar not supported on this platform'</tt> </tt>
<a name="L851"></a><tt class="py-lineno">851</tt>  <tt class="py-line">        <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L852"></a><tt class="py-lineno">852</tt>  <tt class="py-line"> </tt>
<a name="L853"></a><tt class="py-lineno">853</tt>  <tt class="py-line">    <tt id="link-317" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-317', 'root', 'link-39');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L854"></a><tt class="py-lineno">854</tt>  <tt class="py-line"> </tt>
<a name="L855"></a><tt class="py-lineno">855</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-318" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-318', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nogui</tt><tt class="py-op">:</tt> </tt>
<a name="L856"></a><tt class="py-lineno">856</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L857"></a><tt class="py-lineno">857</tt>  <tt class="py-line">            <tt class="py-keyword">import</tt> <tt class="py-name">Tkinter</tt> </tt>
<a name="L858"></a><tt class="py-lineno">858</tt>  <tt class="py-line">            <tt class="py-name">havetk</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L859"></a><tt class="py-lineno">859</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
<a name="L860"></a><tt class="py-lineno">860</tt>  <tt class="py-line">            <tt id="link-319" class="py-name"><a title="web2py.gluon.cache.logger
web2py.gluon.compileapp.logger
web2py.gluon.dal.logger
web2py.gluon.debug.logger
web2py.gluon.main.logger
web2py.gluon.newcron.logger
web2py.gluon.portalocker.logger
web2py.gluon.restricted.logger
web2py.gluon.rewrite.logger
web2py.gluon.shell.logger
web2py.gluon.tools.logger
web2py.gluon.utils.logger
web2py.gluon.widget.logger" class="py-name" href="#" onclick="return doclink('link-319', 'logger', 'link-33');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'GUI not available because Tk library is not installed'</tt><tt class="py-op">)</tt> </tt>
<a name="L861"></a><tt class="py-lineno">861</tt>  <tt class="py-line">            <tt class="py-name">havetk</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L862"></a><tt class="py-lineno">862</tt>  <tt class="py-line"> </tt>
<a name="L863"></a><tt class="py-lineno">863</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-320" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-320', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;ask&gt;'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">havetk</tt> <tt class="py-keyword">or</tt> <tt id="link-321" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-321', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">taskbar</tt> <tt class="py-keyword">and</tt> <tt class="py-name">havetk</tt><tt class="py-op">:</tt> </tt>
<a name="L864"></a><tt class="py-lineno">864</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L865"></a><tt class="py-lineno">865</tt>  <tt class="py-line">                <tt id="link-322" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-322', 'root', 'link-39');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">Tkinter</tt><tt class="py-op">.</tt><tt class="py-name">Tk</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L866"></a><tt class="py-lineno">866</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L867"></a><tt class="py-lineno">867</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L868"></a><tt class="py-lineno">868</tt>  <tt class="py-line"> </tt>
<a name="L869"></a><tt class="py-lineno">869</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-323" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-323', 'root', 'link-39');">root</a></tt><tt class="py-op">:</tt> </tt>
<a name="L870"></a><tt class="py-lineno">870</tt>  <tt class="py-line">        <tt id="link-324" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-324', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">focus_force</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L871"></a><tt class="py-lineno">871</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-325" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-325', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">quiet</tt><tt class="py-op">:</tt> </tt>
<a name="L872"></a><tt class="py-lineno">872</tt>  <tt class="py-line">            <tt id="link-326" class="py-name" targets="Function web2py.gluon.widget.presentation()=web2py.gluon.widget-module.html#presentation"><a title="web2py.gluon.widget.presentation" class="py-name" href="#" onclick="return doclink('link-326', 'presentation', 'link-326');">presentation</a></tt><tt class="py-op">(</tt><tt id="link-327" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-327', 'root', 'link-39');">root</a></tt><tt class="py-op">)</tt> </tt>
<a name="L873"></a><tt class="py-lineno">873</tt>  <tt class="py-line">        <tt class="py-name">master</tt> <tt class="py-op">=</tt> <tt id="link-328" class="py-name" targets="Class web2py.gluon.widget.web2pyDialog=web2py.gluon.widget.web2pyDialog-class.html"><a title="web2py.gluon.widget.web2pyDialog" class="py-name" href="#" onclick="return doclink('link-328', 'web2pyDialog', 'link-328');">web2pyDialog</a></tt><tt class="py-op">(</tt><tt id="link-329" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-329', 'root', 'link-39');">root</a></tt><tt class="py-op">,</tt> <tt id="link-330" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-330', 'options', 'link-56');">options</a></tt><tt class="py-op">)</tt> </tt>
<a name="L874"></a><tt class="py-lineno">874</tt>  <tt class="py-line">        <tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">signal</tt><tt class="py-op">(</tt><tt class="py-name">signal</tt><tt class="py-op">.</tt><tt class="py-name">SIGTERM</tt><tt class="py-op">,</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-331" class="py-name" targets="Function web2py.gluon.rocket.b()=web2py.gluon.rocket-module.html#b"><a title="web2py.gluon.rocket.b" class="py-name" href="#" onclick="return doclink('link-331', 'b', 'link-331');">b</a></tt><tt class="py-op">:</tt> <tt class="py-name">master</tt><tt class="py-op">.</tt><tt id="link-332" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-332', 'quit', 'link-62');">quit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L875"></a><tt class="py-lineno">875</tt>  <tt class="py-line"> </tt>
<a name="L876"></a><tt class="py-lineno">876</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L877"></a><tt class="py-lineno">877</tt>  <tt class="py-line">            <tt id="link-333" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-333', 'root', 'link-39');">root</a></tt><tt class="py-op">.</tt><tt class="py-name">mainloop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L878"></a><tt class="py-lineno">878</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L879"></a><tt class="py-lineno">879</tt>  <tt class="py-line">            <tt class="py-name">master</tt><tt class="py-op">.</tt><tt id="link-334" class="py-name"><a title="web2py.gluon.widget.web2pyDialog.quit" class="py-name" href="#" onclick="return doclink('link-334', 'quit', 'link-62');">quit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L880"></a><tt class="py-lineno">880</tt>  <tt class="py-line"> </tt>
<a name="L881"></a><tt class="py-lineno">881</tt>  <tt class="py-line">        <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L882"></a><tt class="py-lineno">882</tt>  <tt class="py-line"> </tt>
<a name="L883"></a><tt class="py-lineno">883</tt>  <tt class="py-line">    <tt class="py-comment"># ## if no tk and no password, ask for a password</tt> </tt>
<a name="L884"></a><tt class="py-lineno">884</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L885"></a><tt class="py-lineno">885</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-335" class="py-name"><a title="web2py.gluon.import_all.root" class="py-name" href="#" onclick="return doclink('link-335', 'root', 'link-39');">root</a></tt> <tt class="py-keyword">and</tt> <tt id="link-336" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-336', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;ask&gt;'</tt><tt class="py-op">:</tt> </tt>
<a name="L886"></a><tt class="py-lineno">886</tt>  <tt class="py-line">        <tt id="link-337" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-337', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-name">raw_input</tt><tt class="py-op">(</tt><tt class="py-string">'choose a password:'</tt><tt class="py-op">)</tt> </tt>
<a name="L887"></a><tt class="py-lineno">887</tt>  <tt class="py-line"> </tt>
<a name="L888"></a><tt class="py-lineno">888</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-338" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-338', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-339" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-339', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nobanner</tt><tt class="py-op">:</tt> </tt>
<a name="L889"></a><tt class="py-lineno">889</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'no password, no admin interface'</tt> </tt>
<a name="L890"></a><tt class="py-lineno">890</tt>  <tt class="py-line"> </tt>
<a name="L891"></a><tt class="py-lineno">891</tt>  <tt class="py-line">    <tt class="py-comment"># ## start server</tt> </tt>
<a name="L892"></a><tt class="py-lineno">892</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L893"></a><tt class="py-lineno">893</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-340" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-340', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-341" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-341', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L894"></a><tt class="py-lineno">894</tt>  <tt class="py-line"> </tt>
<a name="L895"></a><tt class="py-lineno">895</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-342" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-342', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">nobanner</tt><tt class="py-op">:</tt> </tt>
<a name="L896"></a><tt class="py-lineno">896</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'please visit:'</tt> </tt>
<a name="L897"></a><tt class="py-lineno">897</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'\thttp://%s:%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">)</tt> </tt>
<a name="L898"></a><tt class="py-lineno">898</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'use "kill -SIGTERM %i" to shutdown the web2py server'</tt> <tt class="py-op">%</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getpid</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L899"></a><tt class="py-lineno">899</tt>  <tt class="py-line"> </tt>
<a name="L900"></a><tt class="py-lineno">900</tt>  <tt class="py-line">    <tt id="link-343" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-343', 'server', 'link-117');">server</a></tt> <tt class="py-op">=</tt> <tt id="link-344" class="py-name"><a title="web2py.gluon.main" class="py-name" href="#" onclick="return doclink('link-344', 'main', 'link-4');">main</a></tt><tt class="py-op">.</tt><tt id="link-345" class="py-name"><a title="web2py.gluon.main.HttpServer" class="py-name" href="#" onclick="return doclink('link-345', 'HttpServer', 'link-134');">HttpServer</a></tt><tt class="py-op">(</tt><tt class="py-name">ip</tt><tt class="py-op">=</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> </tt>
<a name="L901"></a><tt class="py-lineno">901</tt>  <tt class="py-line">                             <tt class="py-name">port</tt><tt class="py-op">=</tt><tt class="py-name">port</tt><tt class="py-op">,</tt> </tt>
<a name="L902"></a><tt class="py-lineno">902</tt>  <tt class="py-line">                             <tt class="py-name">password</tt><tt class="py-op">=</tt><tt id="link-346" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-346', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">,</tt> </tt>
<a name="L903"></a><tt class="py-lineno">903</tt>  <tt class="py-line">                             <tt class="py-name">pid_filename</tt><tt class="py-op">=</tt><tt id="link-347" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-347', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">pid_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L904"></a><tt class="py-lineno">904</tt>  <tt class="py-line">                             <tt class="py-name">log_filename</tt><tt class="py-op">=</tt><tt id="link-348" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-348', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">log_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L905"></a><tt class="py-lineno">905</tt>  <tt class="py-line">                             <tt class="py-name">profiler_filename</tt><tt class="py-op">=</tt><tt id="link-349" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-349', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">profiler_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L906"></a><tt class="py-lineno">906</tt>  <tt class="py-line">                             <tt class="py-name">ssl_certificate</tt><tt class="py-op">=</tt><tt id="link-350" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-350', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ssl_certificate</tt><tt class="py-op">,</tt> </tt>
<a name="L907"></a><tt class="py-lineno">907</tt>  <tt class="py-line">                             <tt class="py-name">ssl_private_key</tt><tt class="py-op">=</tt><tt id="link-351" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-351', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ssl_private_key</tt><tt class="py-op">,</tt> </tt>
<a name="L908"></a><tt class="py-lineno">908</tt>  <tt class="py-line">                             <tt class="py-name">min_threads</tt><tt class="py-op">=</tt><tt id="link-352" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-352', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L909"></a><tt class="py-lineno">909</tt>  <tt class="py-line">                             <tt class="py-name">max_threads</tt><tt class="py-op">=</tt><tt id="link-353" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-353', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">maxthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L910"></a><tt class="py-lineno">910</tt>  <tt class="py-line">                             <tt class="py-name">server_name</tt><tt class="py-op">=</tt><tt id="link-354" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-354', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">server_name</tt><tt class="py-op">,</tt> </tt>
<a name="L911"></a><tt class="py-lineno">911</tt>  <tt class="py-line">                             <tt class="py-name">request_queue_size</tt><tt class="py-op">=</tt><tt id="link-355" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-355', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">request_queue_size</tt><tt class="py-op">,</tt> </tt>
<a name="L912"></a><tt class="py-lineno">912</tt>  <tt class="py-line">                             <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt id="link-356" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-356', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L913"></a><tt class="py-lineno">913</tt>  <tt class="py-line">                             <tt class="py-name">shutdown_timeout</tt><tt class="py-op">=</tt><tt id="link-357" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-357', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">shutdown_timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L914"></a><tt class="py-lineno">914</tt>  <tt class="py-line">                             <tt class="py-name">path</tt><tt class="py-op">=</tt><tt id="link-358" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-358', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt><tt class="py-op">,</tt> </tt>
<a name="L915"></a><tt class="py-lineno">915</tt>  <tt class="py-line">                             <tt class="py-name">interfaces</tt><tt class="py-op">=</tt><tt id="link-359" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-359', 'options', 'link-56');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">interfaces</tt><tt class="py-op">)</tt> </tt>
<a name="L916"></a><tt class="py-lineno">916</tt>  <tt class="py-line"> </tt>
<a name="L917"></a><tt class="py-lineno">917</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L918"></a><tt class="py-lineno">918</tt>  <tt class="py-line">        <tt id="link-360" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-360', 'server', 'link-117');">server</a></tt><tt class="py-op">.</tt><tt id="link-361" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-361', 'start', 'link-81');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L919"></a><tt class="py-lineno">919</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">KeyboardInterrupt</tt><tt class="py-op">:</tt> </tt>
<a name="L920"></a><tt class="py-lineno">920</tt>  <tt class="py-line">        <tt id="link-362" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-362', 'server', 'link-117');">server</a></tt><tt class="py-op">.</tt><tt id="link-363" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-363', 'stop', 'link-86');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L921"></a><tt class="py-lineno">921</tt>  <tt class="py-line">    <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt id="link-364" class="py-name" targets="Variable web2py.gluon.rocket.Connection.shutdown=web2py.gluon.rocket.Connection-class.html#shutdown"><a title="web2py.gluon.rocket.Connection.shutdown" class="py-name" href="#" onclick="return doclink('link-364', 'shutdown', 'link-364');">shutdown</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L922"></a><tt class="py-lineno">922</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:05 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.widget.IO-class.html version [e1bc460720].




































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.widget.IO</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.widget-module.html">Module&nbsp;widget</a> ::
        Class&nbsp;IO
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.widget.IO-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IO</h1><span class="codelink"><a href="web2py.gluon.widget-pysrc.html#IO">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">IO</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.widget.IO-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for 
      signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#IO.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#IO.write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.widget-pysrc.html#IO.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.widget.web2pyDialog-class.html version [e156c1b12b].


































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.widget.web2pyDialog</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.widget-module.html">Module&nbsp;widget</a> ::
        Class&nbsp;web2pyDialog
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.widget.web2pyDialog-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class web2pyDialog</h1><span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">web2pyDialog</strong>
</pre>

<hr />
Main window dialog<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.widget.web2pyDialog-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">root</span>,
        <span class="summary-sig-arg">options</span>)</span><br />
      web2pyDialog constructor</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="checkTaskBar"></a><span class="summary-sig-name">checkTaskBar</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Check taskbar status</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.checkTaskBar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update"></a><span class="summary-sig-name">update</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Update app text</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="connect_pages"></a><span class="summary-sig-name">connect_pages</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Connect pages</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.connect_pages">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="quit"></a><span class="summary-sig-name">quit</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">justHide</span>=<span class="summary-sig-default">True</span>)</span><br />
      Finish the program execution</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.quit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="error"></a><span class="summary-sig-name">error</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>)</span><br />
      Show error message</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Start web2py server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop"></a><span class="summary-sig-name">stop</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Stop web2py server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="update_canvas"></a><span class="summary-sig-name">update_canvas</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Update canvas</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.update_canvas">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">root</span>,
        <span class="sig-arg">options</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.widget-pysrc.html#web2pyDialog.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  web2pyDialog constructor
  <dl class="fields">
    <dt>Overrides:
      object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.winservice-module.html version [ad44be3833].































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.winservice</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;winservice
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.winservice-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module winservice</h1><span class="codelink"><a href="web2py.gluon.winservice-pysrc.html">source&nbsp;code</a></span><br /><br />
<p>This file is part of the web2py Web Framework Developed by Massimo Di 
  Pierro &lt;mdipierro@cs.depaul.edu&gt; and Limodou 
  &lt;limodou@gmail.com&gt;. License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)</p>
  This makes uses of the pywin32 package 
  (http://sourceforge.net/projects/pywin32/). You do not need to install 
  this package to use web2py.<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.winservice.Service-class.html" class="summary-name">Service</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.winservice.Web2pyService-class.html" class="summary-name">Web2pyService</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="web2py_windows_service_handler"></a><span class="summary-sig-name">web2py_windows_service_handler</span>(<span class="summary-sig-arg">argv</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">opt_file</span>=<span class="summary-sig-default">'options'</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#web2py_windows_service_handler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.winservice-pysrc.html version [cc36810a51].

























































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.winservice</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;winservice
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.winservice-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.winservice-module.html">Module web2py.gluon.winservice</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">Developed by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt; and</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Limodou &lt;limodou@gmail.com&gt;.</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">This makes uses of the pywin32 package</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">(http://sourceforge.net/projects/pywin32/).</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">You do not need to install this package to use web2py.</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Class datetime.time=datetime.time-class.html"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-0', 'time', 'link-0');">time</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">win32serviceutil</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">win32service</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">win32event</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Variable web2py.gluon.import_all.name=web2py.gluon.import_all-module.html#name"><a title="web2py.gluon.import_all.name" class="py-name" href="#" onclick="return doclink('link-1', 'name', 'link-1');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'nt'</tt><tt class="py-op">:</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">"Warning, winservice is unable to install the Mark Hammond Win32 extensions"</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">servicemanager</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">_winreg</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module web2py.gluon.fileutils=web2py.gluon.fileutils-module.html"><a title="web2py.gluon.fileutils" class="py-name" href="#" onclick="return doclink('link-2', 'fileutils', 'link-2');">fileutils</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Function web2py.gluon.fileutils.up()=web2py.gluon.fileutils-module.html#up"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-3', 'up', 'link-3');">up</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'web2py_windows_service_handler'</tt><tt class="py-op">]</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="Service"></a><div id="Service-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="Service-toggle" onclick="return toggle('Service');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html">Service</a><tt class="py-op">(</tt><tt class="py-base-class">win32serviceutil</tt><tt class="py-op">.</tt><tt class="py-base-class">ServiceFramework</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Service-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt id="link-4" class="py-name" targets="Variable web2py.gluon.winservice.Service._svc_name_=web2py.gluon.winservice.Service-class.html#_svc_name_,Variable web2py.gluon.winservice.Web2pyService._svc_name_=web2py.gluon.winservice.Web2pyService-class.html#_svc_name_"><a title="web2py.gluon.winservice.Service._svc_name_
web2py.gluon.winservice.Web2pyService._svc_name_" class="py-name" href="#" onclick="return doclink('link-4', '_svc_name_', 'link-4');">_svc_name_</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'_unNamed'</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt id="link-5" class="py-name" targets="Variable web2py.gluon.winservice.Service._svc_display_name_=web2py.gluon.winservice.Service-class.html#_svc_display_name_,Variable web2py.gluon.winservice.Web2pyService._svc_display_name_=web2py.gluon.winservice.Web2pyService-class.html#_svc_display_name_"><a title="web2py.gluon.winservice.Service._svc_display_name_
web2py.gluon.winservice.Web2pyService._svc_display_name_" class="py-name" href="#" onclick="return doclink('link-5', '_svc_display_name_', 'link-5');">_svc_display_name_</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'_Service Template'</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
<a name="Service.__init__"></a><div id="Service.__init__-def"><a name="L38"></a><tt class="py-lineno"> 38</tt> <a class="py-toggle" href="#" id="Service.__init__-toggle" onclick="return toggle('Service.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Service.__init__-expanded"><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">        <tt class="py-name">win32serviceutil</tt><tt class="py-op">.</tt><tt class="py-name">ServiceFramework</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method web2py.gluon.cache.Cache.__init__()=web2py.gluon.cache.Cache-class.html#__init__,Method web2py.gluon.cache.CacheAbstract.__init__()=web2py.gluon.cache.CacheAbstract-class.html#__init__,Method web2py.gluon.cache.CacheInRam.__init__()=web2py.gluon.cache.CacheInRam-class.html#__init__,Method web2py.gluon.cache.CacheOnDisk.__init__()=web2py.gluon.cache.CacheOnDisk-class.html#__init__,Method web2py.gluon.compileapp.LoadFactory.__init__()=web2py.gluon.compileapp.LoadFactory-class.html#__init__,Method web2py.gluon.custom_import._DateTrackerImporter.__init__()=web2py.gluon.custom_import._DateTrackerImporter-class.html#__init__,Method web2py.gluon.custom_import._Web2pyImporter.__init__()=web2py.gluon.custom_import._Web2pyImporter-class.html#__init__,Method web2py.gluon.dal.BaseAdapter.__init__()=web2py.gluon.dal.BaseAdapter-class.html#__init__,Method web2py.gluon.dal.CouchDBAdapter.__init__()=web2py.gluon.dal.CouchDBAdapter-class.html#__init__,Method web2py.gluon.dal.CubridAdapter.__init__()=web2py.gluon.dal.CubridAdapter-class.html#__init__,Method web2py.gluon.dal.DAL.__init__()=web2py.gluon.dal.DAL-class.html#__init__,Method web2py.gluon.dal.DB2Adapter.__init__()=web2py.gluon.dal.DB2Adapter-class.html#__init__,Method web2py.gluon.dal.DatabaseStoredFile.__init__()=web2py.gluon.dal.DatabaseStoredFile-class.html#__init__,Method web2py.gluon.dal.Expression.__init__()=web2py.gluon.dal.Expression-class.html#__init__,Method web2py.gluon.dal.Field.__init__()=web2py.gluon.dal.Field-class.html#__init__,Method web2py.gluon.dal.FireBirdAdapter.__init__()=web2py.gluon.dal.FireBirdAdapter-class.html#__init__,Method web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__()=web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html#__init__,Method web2py.gluon.dal.GAEDecimalProperty.__init__()=web2py.gluon.dal.GAEDecimalProperty-class.html#__init__,Method web2py.gluon.dal.GAEF.__init__()=web2py.gluon.dal.GAEF-class.html#__init__,Method web2py.gluon.dal.GoogleDatastoreAdapter.__init__()=web2py.gluon.dal.GoogleDatastoreAdapter-class.html#__init__,Method web2py.gluon.dal.GoogleSQLAdapter.__init__()=web2py.gluon.dal.GoogleSQLAdapter-class.html#__init__,Method web2py.gluon.dal.InformixAdapter.__init__()=web2py.gluon.dal.InformixAdapter-class.html#__init__,Method web2py.gluon.dal.IngresAdapter.__init__()=web2py.gluon.dal.IngresAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__()=web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.JDBCSQLiteAdapter.__init__()=web2py.gluon.dal.JDBCSQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.MSSQLAdapter.__init__()=web2py.gluon.dal.MSSQLAdapter-class.html#__init__,Method web2py.gluon.dal.MongoDBAdapter.__init__()=web2py.gluon.dal.MongoDBAdapter-class.html#__init__,Method web2py.gluon.dal.MySQLAdapter.__init__()=web2py.gluon.dal.MySQLAdapter-class.html#__init__,Method web2py.gluon.dal.OracleAdapter.__init__()=web2py.gluon.dal.OracleAdapter-class.html#__init__,Method web2py.gluon.dal.PostgreSQLAdapter.__init__()=web2py.gluon.dal.PostgreSQLAdapter-class.html#__init__,Method web2py.gluon.dal.Query.__init__()=web2py.gluon.dal.Query-class.html#__init__,Method web2py.gluon.dal.Rows.__init__()=web2py.gluon.dal.Rows-class.html#__init__,Method web2py.gluon.dal.SAPDBAdapter.__init__()=web2py.gluon.dal.SAPDBAdapter-class.html#__init__,Method web2py.gluon.dal.SQLALL.__init__()=web2py.gluon.dal.SQLALL-class.html#__init__,Method web2py.gluon.dal.SQLCustomType.__init__()=web2py.gluon.dal.SQLCustomType-class.html#__init__,Method web2py.gluon.dal.SQLiteAdapter.__init__()=web2py.gluon.dal.SQLiteAdapter-class.html#__init__,Method web2py.gluon.dal.Set.__init__()=web2py.gluon.dal.Set-class.html#__init__,Method web2py.gluon.dal.Table.__init__()=web2py.gluon.dal.Table-class.html#__init__,Method web2py.gluon.dal.TeradataAdapter.__init__()=web2py.gluon.dal.TeradataAdapter-class.html#__init__,Method web2py.gluon.debug.Pipe.__init__()=web2py.gluon.debug.Pipe-class.html#__init__,Method web2py.gluon.globals.Request.__init__()=web2py.gluon.globals.Request-class.html#__init__,Method web2py.gluon.globals.Response.__init__()=web2py.gluon.globals.Response-class.html#__init__,Method web2py.gluon.highlight.Highlighter.__init__()=web2py.gluon.highlight.Highlighter-class.html#__init__,Method web2py.gluon.html.BEAUTIFY.__init__()=web2py.gluon.html.BEAUTIFY-class.html#__init__,Method web2py.gluon.html.DIV.__init__()=web2py.gluon.html.DIV-class.html#__init__,Method web2py.gluon.html.FORM.__init__()=web2py.gluon.html.FORM-class.html#__init__,Method web2py.gluon.html.MARKMIN.__init__()=web2py.gluon.html.MARKMIN-class.html#__init__,Method web2py.gluon.html.MENU.__init__()=web2py.gluon.html.MENU-class.html#__init__,Method web2py.gluon.html.XML.__init__()=web2py.gluon.html.XML-class.html#__init__,Method web2py.gluon.html.web2pyHTMLParser.__init__()=web2py.gluon.html.web2pyHTMLParser-class.html#__init__,Method web2py.gluon.http.HTTP.__init__()=web2py.gluon.http.HTTP-class.html#__init__,Method web2py.gluon.languages.lazyT.__init__()=web2py.gluon.languages.lazyT-class.html#__init__,Method web2py.gluon.languages.translator.__init__()=web2py.gluon.languages.translator-class.html#__init__,Method web2py.gluon.main.HttpServer.__init__()=web2py.gluon.main.HttpServer-class.html#__init__,Method web2py.gluon.newcron.Token.__init__()=web2py.gluon.newcron.Token-class.html#__init__,Method web2py.gluon.newcron.cronlauncher.__init__()=web2py.gluon.newcron.cronlauncher-class.html#__init__,Method web2py.gluon.newcron.extcron.__init__()=web2py.gluon.newcron.extcron-class.html#__init__,Method web2py.gluon.newcron.hardcron.__init__()=web2py.gluon.newcron.hardcron-class.html#__init__,Method web2py.gluon.newcron.softcron.__init__()=web2py.gluon.newcron.softcron-class.html#__init__,Method web2py.gluon.restricted.RestrictedError.__init__()=web2py.gluon.restricted.RestrictedError-class.html#__init__,Method web2py.gluon.restricted.TicketStorage.__init__()=web2py.gluon.restricted.TicketStorage-class.html#__init__,Method web2py.gluon.rewrite.MapUrlIn.__init__()=web2py.gluon.rewrite.MapUrlIn-class.html#__init__,Method web2py.gluon.rewrite.MapUrlOut.__init__()=web2py.gluon.rewrite.MapUrlOut-class.html#__init__,Method web2py.gluon.rocket.ChunkedReader.__init__()=web2py.gluon.rocket.ChunkedReader-class.html#__init__,Method web2py.gluon.rocket.Connection.__init__()=web2py.gluon.rocket.Connection-class.html#__init__,Method web2py.gluon.rocket.FileWrapper.__init__()=web2py.gluon.rocket.FileWrapper-class.html#__init__,Method web2py.gluon.rocket.Headers.__init__()=web2py.gluon.rocket.Headers-class.html#__init__,Method web2py.gluon.rocket.Listener.__init__()=web2py.gluon.rocket.Listener-class.html#__init__,Method web2py.gluon.rocket.Monitor.__init__()=web2py.gluon.rocket.Monitor-class.html#__init__,Method web2py.gluon.rocket.Rocket.__init__()=web2py.gluon.rocket.Rocket-class.html#__init__,Method web2py.gluon.rocket.ThreadPool.__init__()=web2py.gluon.rocket.ThreadPool-class.html#__init__,Method web2py.gluon.rocket.WSGIWorker.__init__()=web2py.gluon.rocket.WSGIWorker-class.html#__init__,Method web2py.gluon.rocket.Worker.__init__()=web2py.gluon.rocket.Worker-class.html#__init__,Method web2py.gluon.sanitizer.XssCleaner.__init__()=web2py.gluon.sanitizer.XssCleaner-class.html#__init__,Method web2py.gluon.sqlhtml.AutocompleteWidget.__init__()=web2py.gluon.sqlhtml.AutocompleteWidget-class.html#__init__,Method web2py.gluon.sqlhtml.SQLFORM.__init__()=web2py.gluon.sqlhtml.SQLFORM-class.html#__init__,Method web2py.gluon.sqlhtml.SQLTABLE.__init__()=web2py.gluon.sqlhtml.SQLTABLE-class.html#__init__,Method web2py.gluon.storage.Messages.__init__()=web2py.gluon.storage.Messages-class.html#__init__,Method web2py.gluon.template.BlockNode.__init__()=web2py.gluon.template.BlockNode-class.html#__init__,Method web2py.gluon.template.Content.__init__()=web2py.gluon.template.Content-class.html#__init__,Method web2py.gluon.template.Node.__init__()=web2py.gluon.template.Node-class.html#__init__,Method web2py.gluon.template.SuperNode.__init__()=web2py.gluon.template.SuperNode-class.html#__init__,Method web2py.gluon.template.TemplateParser.__init__()=web2py.gluon.template.TemplateParser-class.html#__init__,Method web2py.gluon.tools.Auth.__init__()=web2py.gluon.tools.Auth-class.html#__init__,Method web2py.gluon.tools.Crud.__init__()=web2py.gluon.tools.Crud-class.html#__init__,Method web2py.gluon.tools.Mail.Attachment.__init__()=web2py.gluon.tools.Mail.Attachment-class.html#__init__,Method web2py.gluon.tools.Mail.__init__()=web2py.gluon.tools.Mail-class.html#__init__,Method web2py.gluon.tools.PluginManager.__init__()=web2py.gluon.tools.PluginManager-class.html#__init__,Method web2py.gluon.tools.Recaptcha.__init__()=web2py.gluon.tools.Recaptcha-class.html#__init__,Method web2py.gluon.tools.Service.JsonRpcException.__init__()=web2py.gluon.tools.Service.JsonRpcException-class.html#__init__,Method web2py.gluon.tools.Service.__init__()=web2py.gluon.tools.Service-class.html#__init__,Method web2py.gluon.validators.CLEANUP.__init__()=web2py.gluon.validators.CLEANUP-class.html#__init__,Method web2py.gluon.validators.CRYPT.__init__()=web2py.gluon.validators.CRYPT-class.html#__init__,Method web2py.gluon.validators.IS_ALPHANUMERIC.__init__()=web2py.gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method web2py.gluon.validators.IS_DATE.__init__()=web2py.gluon.validators.IS_DATE-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME.__init__()=web2py.gluon.validators.IS_DATETIME-class.html#__init__,Method web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DATE_IN_RANGE.__init__()=web2py.gluon.validators.IS_DATE_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__()=web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_EMAIL.__init__()=web2py.gluon.validators.IS_EMAIL-class.html#__init__,Method web2py.gluon.validators.IS_EMPTY_OR.__init__()=web2py.gluon.validators.IS_EMPTY_OR-class.html#__init__,Method web2py.gluon.validators.IS_EQUAL_TO.__init__()=web2py.gluon.validators.IS_EQUAL_TO-class.html#__init__,Method web2py.gluon.validators.IS_EXPR.__init__()=web2py.gluon.validators.IS_EXPR-class.html#__init__,Method web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__()=web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_GENERIC_URL.__init__()=web2py.gluon.validators.IS_GENERIC_URL-class.html#__init__,Method web2py.gluon.validators.IS_HTTP_URL.__init__()=web2py.gluon.validators.IS_HTTP_URL-class.html#__init__,Method web2py.gluon.validators.IS_IMAGE.__init__()=web2py.gluon.validators.IS_IMAGE-class.html#__init__,Method web2py.gluon.validators.IS_INT_IN_RANGE.__init__()=web2py.gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method web2py.gluon.validators.IS_IN_DB.__init__()=web2py.gluon.validators.IS_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_IN_SET.__init__()=web2py.gluon.validators.IS_IN_SET-class.html#__init__,Method web2py.gluon.validators.IS_IN_SUBSET.__init__()=web2py.gluon.validators.IS_IN_SUBSET-class.html#__init__,Method web2py.gluon.validators.IS_IPV4.__init__()=web2py.gluon.validators.IS_IPV4-class.html#__init__,Method web2py.gluon.validators.IS_LENGTH.__init__()=web2py.gluon.validators.IS_LENGTH-class.html#__init__,Method web2py.gluon.validators.IS_LIST_OF.__init__()=web2py.gluon.validators.IS_LIST_OF-class.html#__init__,Method web2py.gluon.validators.IS_MATCH.__init__()=web2py.gluon.validators.IS_MATCH-class.html#__init__,Method web2py.gluon.validators.IS_NOT_EMPTY.__init__()=web2py.gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method web2py.gluon.validators.IS_NOT_IN_DB.__init__()=web2py.gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method web2py.gluon.validators.IS_SLUG.__init__()=web2py.gluon.validators.IS_SLUG-class.html#__init__,Method web2py.gluon.validators.IS_STRONG.__init__()=web2py.gluon.validators.IS_STRONG-class.html#__init__,Method web2py.gluon.validators.IS_TIME.__init__()=web2py.gluon.validators.IS_TIME-class.html#__init__,Method web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__()=web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html#__init__,Method web2py.gluon.validators.IS_URL.__init__()=web2py.gluon.validators.IS_URL-class.html#__init__,Method web2py.gluon.widget.IO.__init__()=web2py.gluon.widget.IO-class.html#__init__,Method web2py.gluon.widget.web2pyDialog.__init__()=web2py.gluon.widget.web2pyDialog-class.html#__init__,Method web2py.gluon.winservice.Service.__init__()=web2py.gluon.winservice.Service-class.html#__init__"><a title="web2py.gluon.cache.Cache.__init__
web2py.gluon.cache.CacheAbstract.__init__
web2py.gluon.cache.CacheInRam.__init__
web2py.gluon.cache.CacheOnDisk.__init__
web2py.gluon.compileapp.LoadFactory.__init__
web2py.gluon.custom_import._DateTrackerImporter.__init__
web2py.gluon.custom_import._Web2pyImporter.__init__
web2py.gluon.dal.BaseAdapter.__init__
web2py.gluon.dal.CouchDBAdapter.__init__
web2py.gluon.dal.CubridAdapter.__init__
web2py.gluon.dal.DAL.__init__
web2py.gluon.dal.DB2Adapter.__init__
web2py.gluon.dal.DatabaseStoredFile.__init__
web2py.gluon.dal.Expression.__init__
web2py.gluon.dal.Field.__init__
web2py.gluon.dal.FireBirdAdapter.__init__
web2py.gluon.dal.FireBirdEmbeddedAdapter.__init__
web2py.gluon.dal.GAEDecimalProperty.__init__
web2py.gluon.dal.GAEF.__init__
web2py.gluon.dal.GoogleDatastoreAdapter.__init__
web2py.gluon.dal.GoogleSQLAdapter.__init__
web2py.gluon.dal.InformixAdapter.__init__
web2py.gluon.dal.IngresAdapter.__init__
web2py.gluon.dal.JDBCPostgreSQLAdapter.__init__
web2py.gluon.dal.JDBCSQLiteAdapter.__init__
web2py.gluon.dal.MSSQLAdapter.__init__
web2py.gluon.dal.MongoDBAdapter.__init__
web2py.gluon.dal.MySQLAdapter.__init__
web2py.gluon.dal.OracleAdapter.__init__
web2py.gluon.dal.PostgreSQLAdapter.__init__
web2py.gluon.dal.Query.__init__
web2py.gluon.dal.Rows.__init__
web2py.gluon.dal.SAPDBAdapter.__init__
web2py.gluon.dal.SQLALL.__init__
web2py.gluon.dal.SQLCustomType.__init__
web2py.gluon.dal.SQLiteAdapter.__init__
web2py.gluon.dal.Set.__init__
web2py.gluon.dal.Table.__init__
web2py.gluon.dal.TeradataAdapter.__init__
web2py.gluon.debug.Pipe.__init__
web2py.gluon.globals.Request.__init__
web2py.gluon.globals.Response.__init__
web2py.gluon.highlight.Highlighter.__init__
web2py.gluon.html.BEAUTIFY.__init__
web2py.gluon.html.DIV.__init__
web2py.gluon.html.FORM.__init__
web2py.gluon.html.MARKMIN.__init__
web2py.gluon.html.MENU.__init__
web2py.gluon.html.XML.__init__
web2py.gluon.html.web2pyHTMLParser.__init__
web2py.gluon.http.HTTP.__init__
web2py.gluon.languages.lazyT.__init__
web2py.gluon.languages.translator.__init__
web2py.gluon.main.HttpServer.__init__
web2py.gluon.newcron.Token.__init__
web2py.gluon.newcron.cronlauncher.__init__
web2py.gluon.newcron.extcron.__init__
web2py.gluon.newcron.hardcron.__init__
web2py.gluon.newcron.softcron.__init__
web2py.gluon.restricted.RestrictedError.__init__
web2py.gluon.restricted.TicketStorage.__init__
web2py.gluon.rewrite.MapUrlIn.__init__
web2py.gluon.rewrite.MapUrlOut.__init__
web2py.gluon.rocket.ChunkedReader.__init__
web2py.gluon.rocket.Connection.__init__
web2py.gluon.rocket.FileWrapper.__init__
web2py.gluon.rocket.Headers.__init__
web2py.gluon.rocket.Listener.__init__
web2py.gluon.rocket.Monitor.__init__
web2py.gluon.rocket.Rocket.__init__
web2py.gluon.rocket.ThreadPool.__init__
web2py.gluon.rocket.WSGIWorker.__init__
web2py.gluon.rocket.Worker.__init__
web2py.gluon.sanitizer.XssCleaner.__init__
web2py.gluon.sqlhtml.AutocompleteWidget.__init__
web2py.gluon.sqlhtml.SQLFORM.__init__
web2py.gluon.sqlhtml.SQLTABLE.__init__
web2py.gluon.storage.Messages.__init__
web2py.gluon.template.BlockNode.__init__
web2py.gluon.template.Content.__init__
web2py.gluon.template.Node.__init__
web2py.gluon.template.SuperNode.__init__
web2py.gluon.template.TemplateParser.__init__
web2py.gluon.tools.Auth.__init__
web2py.gluon.tools.Crud.__init__
web2py.gluon.tools.Mail.Attachment.__init__
web2py.gluon.tools.Mail.__init__
web2py.gluon.tools.PluginManager.__init__
web2py.gluon.tools.Recaptcha.__init__
web2py.gluon.tools.Service.JsonRpcException.__init__
web2py.gluon.tools.Service.__init__
web2py.gluon.validators.CLEANUP.__init__
web2py.gluon.validators.CRYPT.__init__
web2py.gluon.validators.IS_ALPHANUMERIC.__init__
web2py.gluon.validators.IS_DATE.__init__
web2py.gluon.validators.IS_DATETIME.__init__
web2py.gluon.validators.IS_DATETIME_IN_RANGE.__init__
web2py.gluon.validators.IS_DATE_IN_RANGE.__init__
web2py.gluon.validators.IS_DECIMAL_IN_RANGE.__init__
web2py.gluon.validators.IS_EMAIL.__init__
web2py.gluon.validators.IS_EMPTY_OR.__init__
web2py.gluon.validators.IS_EQUAL_TO.__init__
web2py.gluon.validators.IS_EXPR.__init__
web2py.gluon.validators.IS_FLOAT_IN_RANGE.__init__
web2py.gluon.validators.IS_GENERIC_URL.__init__
web2py.gluon.validators.IS_HTTP_URL.__init__
web2py.gluon.validators.IS_IMAGE.__init__
web2py.gluon.validators.IS_INT_IN_RANGE.__init__
web2py.gluon.validators.IS_IN_DB.__init__
web2py.gluon.validators.IS_IN_SET.__init__
web2py.gluon.validators.IS_IN_SUBSET.__init__
web2py.gluon.validators.IS_IPV4.__init__
web2py.gluon.validators.IS_LENGTH.__init__
web2py.gluon.validators.IS_LIST_OF.__init__
web2py.gluon.validators.IS_MATCH.__init__
web2py.gluon.validators.IS_NOT_EMPTY.__init__
web2py.gluon.validators.IS_NOT_IN_DB.__init__
web2py.gluon.validators.IS_SLUG.__init__
web2py.gluon.validators.IS_STRONG.__init__
web2py.gluon.validators.IS_TIME.__init__
web2py.gluon.validators.IS_UPLOAD_FILENAME.__init__
web2py.gluon.validators.IS_URL.__init__
web2py.gluon.widget.IO.__init__
web2py.gluon.widget.web2pyDialog.__init__
web2py.gluon.winservice.Service.__init__" class="py-name" href="#" onclick="return doclink('link-6', '__init__', 'link-6');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_event</tt> <tt class="py-op">=</tt> <tt class="py-name">win32event</tt><tt class="py-op">.</tt><tt class="py-name">CreateEvent</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"> </tt>
<a name="Service.log"></a><div id="Service.log-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="Service.log-toggle" onclick="return toggle('Service.log');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html#log">log</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.log-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Service.log-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-name">servicemanager</tt><tt class="py-op">.</tt><tt class="py-name">LogInfoMsg</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-7" class="py-name" targets="Variable web2py.gluon.widget.msg=web2py.gluon.widget-module.html#msg"><a title="web2py.gluon.widget.msg" class="py-name" href="#" onclick="return doclink('link-7', 'msg', 'link-7');">msg</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"> </tt>
<a name="Service.SvcDoRun"></a><div id="Service.SvcDoRun-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="Service.SvcDoRun-toggle" onclick="return toggle('Service.SvcDoRun');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html#SvcDoRun">SvcDoRun</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.SvcDoRun-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Service.SvcDoRun-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ReportServiceStatus</tt><tt class="py-op">(</tt><tt class="py-name">win32service</tt><tt class="py-op">.</tt><tt class="py-name">SERVICE_START_PENDING</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ReportServiceStatus</tt><tt class="py-op">(</tt><tt class="py-name">win32service</tt><tt class="py-op">.</tt><tt class="py-name">SERVICE_RUNNING</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method web2py.gluon.main.HttpServer.start()=web2py.gluon.main.HttpServer-class.html#start,Method web2py.gluon.rocket.Rocket.start()=web2py.gluon.rocket.Rocket-class.html#start,Method web2py.gluon.rocket.ThreadPool.start()=web2py.gluon.rocket.ThreadPool-class.html#start,Function web2py.gluon.widget.start()=web2py.gluon.widget-module.html#start,Method web2py.gluon.widget.web2pyDialog.start()=web2py.gluon.widget.web2pyDialog-class.html#start,Method web2py.gluon.winservice.Service.start()=web2py.gluon.winservice.Service-class.html#start,Method web2py.gluon.winservice.Web2pyService.start()=web2py.gluon.winservice.Web2pyService-class.html#start"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-8', 'start', 'link-8');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">            <tt class="py-name">win32event</tt><tt class="py-op">.</tt><tt class="py-name">WaitForSingleObject</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_event</tt><tt class="py-op">,</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">                    <tt class="py-name">win32event</tt><tt class="py-op">.</tt><tt class="py-name">INFINITE</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method web2py.gluon.restricted.RestrictedError.log()=web2py.gluon.restricted.RestrictedError-class.html#log,Variable web2py.gluon.rocket.log=web2py.gluon.rocket-module.html#log,Method web2py.gluon.winservice.Service.log()=web2py.gluon.winservice.Service-class.html#log"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-9', 'log', 'link-9');">log</a></tt><tt class="py-op">(</tt><tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method web2py.gluon.winservice.Service.SvcStop()=web2py.gluon.winservice.Service-class.html#SvcStop"><a title="web2py.gluon.winservice.Service.SvcStop" class="py-name" href="#" onclick="return doclink('link-10', 'SvcStop', 'link-10');">SvcStop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ReportServiceStatus</tt><tt class="py-op">(</tt><tt class="py-name">win32service</tt><tt class="py-op">.</tt><tt class="py-name">SERVICE_STOPPED</tt><tt class="py-op">)</tt> </tt>
</div><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="Service.SvcStop"></a><div id="Service.SvcStop-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="Service.SvcStop-toggle" onclick="return toggle('Service.SvcStop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html#SvcStop">SvcStop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.SvcStop-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Service.SvcStop-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ReportServiceStatus</tt><tt class="py-op">(</tt><tt class="py-name">win32service</tt><tt class="py-op">.</tt><tt class="py-name">SERVICE_STOP_PENDING</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method web2py.gluon.main.HttpServer.stop()=web2py.gluon.main.HttpServer-class.html#stop,Method web2py.gluon.rocket.Monitor.stop()=web2py.gluon.rocket.Monitor-class.html#stop,Method web2py.gluon.rocket.Rocket.stop()=web2py.gluon.rocket.Rocket-class.html#stop,Method web2py.gluon.rocket.ThreadPool.stop()=web2py.gluon.rocket.ThreadPool-class.html#stop,Method web2py.gluon.widget.web2pyDialog.stop()=web2py.gluon.widget.web2pyDialog-class.html#stop,Method web2py.gluon.winservice.Service.stop()=web2py.gluon.winservice.Service-class.html#stop,Method web2py.gluon.winservice.Web2pyService.stop()=web2py.gluon.winservice.Web2pyService-class.html#stop"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-11', 'stop', 'link-11');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-12', 'log', 'link-9');">log</a></tt><tt class="py-op">(</tt><tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-name">win32event</tt><tt class="py-op">.</tt><tt class="py-name">SetEvent</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stop_event</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ReportServiceStatus</tt><tt class="py-op">(</tt><tt class="py-name">win32service</tt><tt class="py-op">.</tt><tt class="py-name">SERVICE_STOPPED</tt><tt class="py-op">)</tt> </tt>
</div><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt class="py-comment"># to be overridden</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="Service.start"></a><div id="Service.start-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="Service.start-toggle" onclick="return toggle('Service.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.start-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Service.start-expanded"><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">    <tt class="py-comment"># to be overridden</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="Service.stop"></a><div id="Service.stop-def"><a name="L73"></a><tt class="py-lineno"> 73</tt> <a class="py-toggle" href="#" id="Service.stop-toggle" onclick="return toggle('Service.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Service-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Service.stop-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Service.stop-expanded"><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"> </tt>
<a name="Web2pyService"></a><div id="Web2pyService-def"><a name="L77"></a><tt class="py-lineno"> 77</tt> <a class="py-toggle" href="#" id="Web2pyService-toggle" onclick="return toggle('Web2pyService');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="web2py.gluon.winservice.Web2pyService-class.html">Web2pyService</a><tt class="py-op">(</tt><tt class="py-base-class">Service</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Web2pyService-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Web2pyService-expanded"><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">    <tt id="link-13" class="py-name"><a title="web2py.gluon.winservice.Service._svc_name_
web2py.gluon.winservice.Web2pyService._svc_name_" class="py-name" href="#" onclick="return doclink('link-13', '_svc_name_', 'link-4');">_svc_name_</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py'</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">    <tt id="link-14" class="py-name"><a title="web2py.gluon.winservice.Service._svc_display_name_
web2py.gluon.winservice.Web2pyService._svc_display_name_" class="py-name" href="#" onclick="return doclink('link-14', '_svc_display_name_', 'link-5');">_svc_display_name_</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'web2py Service'</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt id="link-15" class="py-name" targets="Variable web2py.gluon.winservice.Web2pyService._exe_args_=web2py.gluon.winservice.Web2pyService-class.html#_exe_args_"><a title="web2py.gluon.winservice.Web2pyService._exe_args_" class="py-name" href="#" onclick="return doclink('link-15', '_exe_args_', 'link-15');">_exe_args_</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'options'</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt id="link-16" class="py-name" targets="Variable web2py.gluon.winservice.Web2pyService.server=web2py.gluon.winservice.Web2pyService-class.html#server"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-16', 'server', 'link-16');">server</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"> </tt>
<a name="Web2pyService.chdir"></a><div id="Web2pyService.chdir-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="Web2pyService.chdir-toggle" onclick="return toggle('Web2pyService.chdir');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Web2pyService-class.html#chdir">chdir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Web2pyService.chdir-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Web2pyService.chdir-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">            <tt class="py-name">h</tt> <tt class="py-op">=</tt> <tt class="py-name">_winreg</tt><tt class="py-op">.</tt><tt class="py-name">OpenKey</tt><tt class="py-op">(</tt><tt class="py-name">_winreg</tt><tt class="py-op">.</tt><tt class="py-name">HKEY_LOCAL_MACHINE</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">                                <tt class="py-string">r'SYSTEM\CurrentControlSet\Services\%s'</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                                 <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="web2py.gluon.winservice.Service._svc_name_
web2py.gluon.winservice.Web2pyService._svc_name_" class="py-name" href="#" onclick="return doclink('link-17', '_svc_name_', 'link-4');">_svc_name_</a></tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">_winreg</tt><tt class="py-op">.</tt><tt class="py-name">QueryValue</tt><tt class="py-op">(</tt><tt class="py-name">h</tt><tt class="py-op">,</tt> <tt class="py-string">'PythonClass'</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                <tt class="py-name">_winreg</tt><tt class="py-op">.</tt><tt class="py-name">CloseKey</tt><tt class="py-op">(</tt><tt class="py-name">h</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-name">dir</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method web2py.gluon.winservice.Web2pyService.chdir()=web2py.gluon.winservice.Web2pyService-class.html#chdir"><a title="web2py.gluon.winservice.Web2pyService.chdir" class="py-name" href="#" onclick="return doclink('link-18', 'chdir', 'link-18');">chdir</a></tt><tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-19', 'log', 'link-9');">log</a></tt><tt class="py-op">(</tt><tt class="py-string">"Can't change to web2py working path; server is stopped"</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
<a name="Web2pyService.start"></a><div id="Web2pyService.start-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="Web2pyService.start-toggle" onclick="return toggle('Web2pyService.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Web2pyService-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Web2pyService.start-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Web2pyService.start-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-20', 'log', 'link-9');">log</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py server starting'</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.chdir" class="py-name" href="#" onclick="return doclink('link-21', 'chdir', 'link-18');">chdir</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-22" class="py-name" targets="Method web2py.gluon.dal.Expression.len()=web2py.gluon.dal.Expression-class.html#len"><a title="web2py.gluon.dal.Expression.len" class="py-name" href="#" onclick="return doclink('link-22', 'len', 'link-22');">len</a></tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">            <tt class="py-name">opt_mod</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">            <tt class="py-name">opt_mod</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="web2py.gluon.winservice.Web2pyService._exe_args_" class="py-name" href="#" onclick="return doclink('link-23', '_exe_args_', 'link-15');">_exe_args_</a></tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt id="link-24" class="py-name" targets="Method web2py.gluon.validators.IS_IN_DB.options()=web2py.gluon.validators.IS_IN_DB-class.html#options,Method web2py.gluon.validators.IS_IN_SET.options()=web2py.gluon.validators.IS_IN_SET-class.html#options"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-24', 'options', 'link-24');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">__import__</tt><tt class="py-op">(</tt><tt class="py-name">opt_mod</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> <tt class="py-comment"># legacy support for old options files, which have only (deprecated) numthreads</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-25" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-25', 'options', 'link-24');">options</a></tt><tt class="py-op">,</tt> <tt class="py-string">'numthreads'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-26', 'options', 'link-24');">options</a></tt><tt class="py-op">,</tt> <tt class="py-string">'minthreads'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                <tt id="link-27" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-27', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-28', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">numthreads</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-29" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-29', 'options', 'link-24');">options</a></tt><tt class="py-op">,</tt> <tt class="py-string">'minthreads'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt id="link-30" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-30', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-31', 'options', 'link-24');">options</a></tt><tt class="py-op">,</tt> <tt class="py-string">'maxthreads'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt id="link-32" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-32', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">maxthreads</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt id="link-33" class="py-name" targets="Module web2py.gluon.main=web2py.gluon.main-module.html"><a title="web2py.gluon.main" class="py-name" href="#" onclick="return doclink('link-33', 'main', 'link-33');">main</a></tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-34', 'server', 'link-16');">server</a></tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name"><a title="web2py.gluon.main" class="py-name" href="#" onclick="return doclink('link-35', 'main', 'link-33');">main</a></tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Class web2py.gluon.main.HttpServer=web2py.gluon.main.HttpServer-class.html"><a title="web2py.gluon.main.HttpServer" class="py-name" href="#" onclick="return doclink('link-36', 'HttpServer', 'link-36');">HttpServer</a></tt><tt class="py-op">(</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">            <tt class="py-name">ip</tt><tt class="py-op">=</tt><tt id="link-37" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-37', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ip</tt><tt class="py-op">,</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">            <tt class="py-name">port</tt><tt class="py-op">=</tt><tt id="link-38" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-38', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">port</tt><tt class="py-op">,</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">            <tt class="py-name">password</tt><tt class="py-op">=</tt><tt id="link-39" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-39', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">password</tt><tt class="py-op">,</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt class="py-name">pid_filename</tt><tt class="py-op">=</tt><tt id="link-40" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-40', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">pid_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">            <tt class="py-name">log_filename</tt><tt class="py-op">=</tt><tt id="link-41" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-41', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">log_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">            <tt class="py-name">profiler_filename</tt><tt class="py-op">=</tt><tt id="link-42" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-42', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">profiler_filename</tt><tt class="py-op">,</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">            <tt class="py-name">ssl_certificate</tt><tt class="py-op">=</tt><tt id="link-43" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-43', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ssl_certificate</tt><tt class="py-op">,</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">            <tt class="py-name">ssl_private_key</tt><tt class="py-op">=</tt><tt id="link-44" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-44', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">ssl_private_key</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">            <tt class="py-name">min_threads</tt><tt class="py-op">=</tt><tt id="link-45" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-45', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">minthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">            <tt class="py-name">max_threads</tt><tt class="py-op">=</tt><tt id="link-46" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-46', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">maxthreads</tt><tt class="py-op">,</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-name">server_name</tt><tt class="py-op">=</tt><tt id="link-47" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-47', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">server_name</tt><tt class="py-op">,</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-name">request_queue_size</tt><tt class="py-op">=</tt><tt id="link-48" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-48', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">request_queue_size</tt><tt class="py-op">,</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">            <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt id="link-49" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-49', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">            <tt class="py-name">shutdown_timeout</tt><tt class="py-op">=</tt><tt id="link-50" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-50', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">shutdown_timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-name">path</tt><tt class="py-op">=</tt><tt id="link-51" class="py-name"><a title="web2py.gluon.validators.IS_IN_DB.options
web2py.gluon.validators.IS_IN_SET.options" class="py-name" href="#" onclick="return doclink('link-51', 'options', 'link-24');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">folder</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">            <tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-52', 'server', 'link-16');">server</a></tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="web2py.gluon.main.HttpServer.start
web2py.gluon.rocket.Rocket.start
web2py.gluon.rocket.ThreadPool.start
web2py.gluon.widget.start
web2py.gluon.widget.web2pyDialog.start
web2py.gluon.winservice.Service.start
web2py.gluon.winservice.Web2pyService.start" class="py-name" href="#" onclick="return doclink('link-53', 'start', 'link-8');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">            <tt class="py-comment"># self.server.stop()</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-54', 'server', 'link-16');">server</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> </tt>
</div><a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"> </tt>
<a name="Web2pyService.stop"></a><div id="Web2pyService.stop-def"><a name="L141"></a><tt class="py-lineno">141</tt> <a class="py-toggle" href="#" id="Web2pyService.stop-toggle" onclick="return toggle('Web2pyService.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice.Web2pyService-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Web2pyService.stop-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Web2pyService.stop-expanded"><a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="web2py.gluon.restricted.RestrictedError.log
web2py.gluon.rocket.log
web2py.gluon.winservice.Service.log" class="py-name" href="#" onclick="return doclink('link-55', 'log', 'link-9');">log</a></tt><tt class="py-op">(</tt><tt class="py-string">'web2py server stopping'</tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.chdir" class="py-name" href="#" onclick="return doclink('link-56', 'chdir', 'link-18');">chdir</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-57', 'server', 'link-16');">server</a></tt><tt class="py-op">:</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="web2py.gluon.winservice.Web2pyService.server" class="py-name" href="#" onclick="return doclink('link-58', 'server', 'link-16');">server</a></tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="web2py.gluon.main.HttpServer.stop
web2py.gluon.rocket.Monitor.stop
web2py.gluon.rocket.Rocket.stop
web2py.gluon.rocket.ThreadPool.stop
web2py.gluon.widget.web2pyDialog.stop
web2py.gluon.winservice.Service.stop
web2py.gluon.winservice.Web2pyService.stop" class="py-name" href="#" onclick="return doclink('link-59', 'stop', 'link-11');">stop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt id="link-60" class="py-name"><a title="datetime.time" class="py-name" href="#" onclick="return doclink('link-60', 'time', 'link-0');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"> </tt>
<a name="web2py_windows_service_handler"></a><div id="web2py_windows_service_handler-def"><a name="L150"></a><tt class="py-lineno">150</tt> <a class="py-toggle" href="#" id="web2py_windows_service_handler-toggle" onclick="return toggle('web2py_windows_service_handler');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.winservice-module.html#web2py_windows_service_handler">web2py_windows_service_handler</a><tt class="py-op">(</tt><tt class="py-param">argv</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">opt_file</tt><tt class="py-op">=</tt><tt class="py-string">'options'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="web2py_windows_service_handler-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="web2py_windows_service_handler-expanded"><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">    <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">__file__</tt><tt class="py-op">)</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">    <tt class="py-name">classstring</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">normpath</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Function web2py.gluon.html.join()=web2py.gluon.html-module.html#join"><a title="web2py.gluon.html.join" class="py-name" href="#" onclick="return doclink('link-61', 'join', 'link-61');">join</a></tt><tt class="py-op">(</tt><tt id="link-62" class="py-name"><a title="web2py.gluon.fileutils.up" class="py-name" href="#" onclick="return doclink('link-62', 'up', 'link-3');">up</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">                                   <tt class="py-string">'gluon.winservice.Web2pyService'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">opt_file</tt><tt class="py-op">:</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt id="link-63" class="py-name" targets="Class web2py.gluon.winservice.Web2pyService=web2py.gluon.winservice.Web2pyService-class.html"><a title="web2py.gluon.winservice.Web2pyService" class="py-name" href="#" onclick="return doclink('link-63', 'Web2pyService', 'link-63');">Web2pyService</a></tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="web2py.gluon.winservice.Web2pyService._exe_args_" class="py-name" href="#" onclick="return doclink('link-64', '_exe_args_', 'link-15');">_exe_args_</a></tt> <tt class="py-op">=</tt> <tt class="py-name">opt_file</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">        <tt class="py-name">win32serviceutil</tt><tt class="py-op">.</tt><tt class="py-name">HandleCommandLine</tt><tt class="py-op">(</tt><tt id="link-65" class="py-name"><a title="web2py.gluon.winservice.Web2pyService" class="py-name" href="#" onclick="return doclink('link-65', 'Web2pyService', 'link-63');">Web2pyService</a></tt><tt class="py-op">,</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">                <tt class="py-name">serviceClassString</tt><tt class="py-op">=</tt><tt class="py-name">classstring</tt><tt class="py-op">,</tt> <tt class="py-name">argv</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-string">'install'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">    <tt class="py-name">win32serviceutil</tt><tt class="py-op">.</tt><tt class="py-name">HandleCommandLine</tt><tt class="py-op">(</tt><tt id="link-66" class="py-name"><a title="web2py.gluon.winservice.Web2pyService" class="py-name" href="#" onclick="return doclink('link-66', 'Web2pyService', 'link-63');">Web2pyService</a></tt><tt class="py-op">,</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">            <tt class="py-name">serviceClassString</tt><tt class="py-op">=</tt><tt class="py-name">classstring</tt><tt class="py-op">,</tt> <tt class="py-name">argv</tt><tt class="py-op">=</tt><tt class="py-name">argv</tt><tt class="py-op">)</tt> </tt>
</div><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line"> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">    <tt id="link-67" class="py-name" targets="Function web2py.gluon.winservice.web2py_windows_service_handler()=web2py.gluon.winservice-module.html#web2py_windows_service_handler"><a title="web2py.gluon.winservice.web2py_windows_service_handler" class="py-name" href="#" onclick="return doclink('link-67', 'web2py_windows_service_handler', 'link-67');">web2py_windows_service_handler</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:04 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.winservice.Service-class.html version [9f5d94f195].
















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.winservice.Service</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.winservice-module.html">Module&nbsp;winservice</a> ::
        Class&nbsp;Service
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.winservice.Service-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Service</h1><span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
win32serviceutil.ServiceFramework --+
                                    |
                                   <strong class="uidshort">Service</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*args</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="log"></a><span class="summary-sig-name">log</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">msg</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service.log">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="SvcDoRun"></a><span class="summary-sig-name">SvcDoRun</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service.SvcDoRun">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="SvcStop"></a><span class="summary-sig-name">SvcStop</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service.SvcStop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service.start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="stop"></a><span class="summary-sig-name">stop</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Service.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_svc_name_"></a><span class="summary-name">_svc_name_</span> = <code title="'_unNamed'">'_unNamed'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_svc_display_name_"></a><span class="summary-name">_svc_display_name_</span> = <code title="'_Service Template'">'_Service Template'</code>
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.winservice.Web2pyService-class.html version [c8466002fb].
























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.winservice.Web2pyService</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        <a href="web2py.gluon.winservice-module.html">Module&nbsp;winservice</a> ::
        Class&nbsp;Web2pyService
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.winservice.Web2pyService-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Web2pyService</h1><span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Web2pyService">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
win32serviceutil.ServiceFramework --+    
                                    |    
                              <a href="web2py.gluon.winservice.Service-class.html">Service</a> --+
                                        |
                                       <strong class="uidshort">Web2pyService</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="chdir"></a><span class="summary-sig-name">chdir</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Web2pyService.chdir">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.winservice.Web2pyService-class.html#start" class="summary-sig-name">start</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Web2pyService.start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.winservice.Web2pyService-class.html#stop" class="summary-sig-name">stop</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Web2pyService.stop">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="web2py.gluon.winservice.Service-class.html">Service</a></code></b>:
      <code><a href="web2py.gluon.winservice.Service-class.html#SvcDoRun">SvcDoRun</a></code>,
      <code><a href="web2py.gluon.winservice.Service-class.html#SvcStop">SvcStop</a></code>,
      <code><a href="web2py.gluon.winservice.Service-class.html#__init__">__init__</a></code>,
      <code><a href="web2py.gluon.winservice.Service-class.html#log">log</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_svc_name_"></a><span class="summary-name">_svc_name_</span> = <code title="'web2py'">'web2py'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_svc_display_name_"></a><span class="summary-name">_svc_display_name_</span> = <code title="'web2py Service'">'web2py Service'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_exe_args_"></a><span class="summary-name">_exe_args_</span> = <code title="'options'">'options'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="server"></a><span class="summary-name">server</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="start"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">start</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Web2pyService.start">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.winservice.Service-class.html#start">Service.start</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="stop"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">stop</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.winservice-pysrc.html#Web2pyService.stop">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      <a href="web2py.gluon.winservice.Service-class.html#stop">Service.stop</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:02 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.xmlrpc-module.html version [2d16f1c210].




























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.xmlrpc</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;xmlrpc
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.xmlrpc-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module xmlrpc</h1><span class="codelink"><a href="web2py.gluon.xmlrpc-pysrc.html">source&nbsp;code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo 
  Di Pierro &lt;mdipierro@cs.depaul.edu&gt; License: LGPLv3 
  (http://www.gnu.org/licenses/lgpl.html)<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="handler"></a><span class="summary-sig-name">handler</span>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">response</span>,
        <span class="summary-sig-arg">methods</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.xmlrpc-pysrc.html#handler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/epydoc/web2py.gluon.xmlrpc-pysrc.html version [93a1d9e415].




















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.xmlrpc</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;xmlrpc
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.xmlrpc-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="web2py.gluon.xmlrpc-module.html">Module web2py.gluon.xmlrpc</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">This file is part of the web2py Web Framework</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">Copyrighted by Massimo Di Pierro &lt;mdipierro@cs.depaul.edu&gt;</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">SimpleXMLRPCServer</tt> <tt class="py-keyword">import</tt> <tt class="py-name">SimpleXMLRPCDispatcher</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"> </tt>
<a name="handler"></a><div id="handler-def"><a name="L13"></a><tt class="py-lineno">13</tt> <a class="py-toggle" href="#" id="handler-toggle" onclick="return toggle('handler');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="web2py.gluon.xmlrpc-module.html#handler">handler</a><tt class="py-op">(</tt><tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">response</tt><tt class="py-op">,</tt> <tt class="py-param">methods</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="handler-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="handler-expanded"><a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">session_id</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt>  <tt class="py-comment"># no sessions for xmlrpc</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">    <tt class="py-name">dispatcher</tt> <tt class="py-op">=</tt> <tt class="py-name">SimpleXMLRPCDispatcher</tt><tt class="py-op">(</tt><tt class="py-name">allow_none</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">encoding</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">methods</tt><tt class="py-op">:</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line">        <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">register_function</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line">    <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">register_introspection_functions</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">    <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Content-Type'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'text/xml'</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">    <tt class="py-name">dispatch</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">dispatcher</tt><tt class="py-op">,</tt> <tt class="py-string">'_dispatch'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">dispatcher</tt><tt class="py-op">.</tt><tt class="py-name">_marshaled_dispatch</tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method web2py.gluon.dal.DatabaseStoredFile.read()=web2py.gluon.dal.DatabaseStoredFile-class.html#read,Method web2py.gluon.debug.Pipe.read()=web2py.gluon.debug.Pipe-class.html#read,Method web2py.gluon.languages.lazyT.read()=web2py.gluon.languages.lazyT-class.html#read,Method web2py.gluon.rocket.ChunkedReader.read()=web2py.gluon.rocket.ChunkedReader-class.html#read,Method web2py.gluon.tools.Crud.read()=web2py.gluon.tools.Crud-class.html#read"><a title="web2py.gluon.dal.DatabaseStoredFile.read
web2py.gluon.debug.Pipe.read
web2py.gluon.languages.lazyT.read
web2py.gluon.rocket.ChunkedReader.read
web2py.gluon.tools.Crud.read" class="py-name" href="#" onclick="return doclink('link-0', 'read', 'link-0');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">dispatch</tt><tt class="py-op">)</tt> </tt>
</div><a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:47:03 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>

Added applications/examples/static/favicon.ico version [8849e0925e].

cannot compute difference between binary files

Added applications/examples/static/img/Menu-2.png version [582b8c90b9].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers1.png version [1cc869aeae].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers2.png version [0baee84b0d].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers3.png version [219edabd06].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers4.png version [a4569b8a88].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers5.png version [ed683e2c0e].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers6.png version [fe1b73261d].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers7.png version [6916525230].

cannot compute difference between binary files

Added applications/examples/static/img/Stickers8.png version [a4569b8a88].

cannot compute difference between binary files

Added applications/examples/static/img/back-02.png version [9701d17c04].

cannot compute difference between binary files

Added applications/examples/static/img/back-03.png version [6503c7eff4].

cannot compute difference between binary files

Added applications/examples/static/img/back-04.png version [5a0138a6a3].

cannot compute difference between binary files

Added applications/examples/static/img/back-05.png version [add7d156f9].

cannot compute difference between binary files

Added applications/examples/static/img/back-R-02.png version [a171e00107].

cannot compute difference between binary files

Added applications/examples/static/img/demo.png version [3b18867ab1].

cannot compute difference between binary files

Added applications/examples/static/img/favicon.ico version [8849e0925e].

cannot compute difference between binary files

Added applications/examples/static/img/favicon.png version [7b090af72f].

cannot compute difference between binary files

Added applications/examples/static/img/gluon.png version [a0e4c56a96].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283521892_my-account.png version [7e09b563ce].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522082_phone.png version [737f51280e].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522094_email.png version [fbf1aad3fc].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522104_sign-up.png version [4bb9e9abaf].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522131_contact.png version [eb8e575e41].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522158_login.png version [a852b7e943].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522183_twitter.png version [e387dafe9a].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522183_video.png version [9cea6af59e].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522207_library.png version [fb8d2842de].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522229_cv.png version [287176c0b4].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283522239_order-2.png version [a483819e8c].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283523038_multi-agents.png version [f0dab5831e].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283523136_chat.png version [46b5eb9831].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283523297_email.png version [741e4535eb].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283523332_calculator.png version [6f1b9c3e25].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283523626_search.png version [57e7773dc0].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283524371_calculator.png version [6f1b9c3e25].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283524386_mobile.png version [c123654af5].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283524452_cloud-filled.png version [c703e5329e].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1283524467_home.png version [c39317e9f3].

cannot compute difference between binary files

Added applications/examples/static/img/icons/1285713038_video32.png version [cc0174e792].

cannot compute difference between binary files

Added applications/examples/static/img/icons/CHAT_32x32-32.png version [f67fac2bbc].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FILE_32x32-32.png version [30c8fa7d0d].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - DOWNLOAD_32x32-32.png version [02f9dd179c].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - FONTS_32x32-32.png version [8015d19bb7].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - GAMES_32x32-32.png version [a8fa142c61].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - INTERNET_32x32-32.png version [21cb12f786].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - MUSIC_32x32-32.png version [0dc5fed446].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - PICTURES_32x32-32.png version [30443f2575].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER - PRINTER_32x32-32.png version [d57186a10e].

cannot compute difference between binary files

Added applications/examples/static/img/icons/FOLDER_32x32-32.png version [3afaa5d3f9].

cannot compute difference between binary files

Added applications/examples/static/img/icons/HELP_32x32-32.png version [61ea918c20].

cannot compute difference between binary files

Added applications/examples/static/img/icons/NETWORK - FOLDER OPEN_32x32-32.png version [b902a6e47e].

cannot compute difference between binary files

Added applications/examples/static/img/icons/TV_32x32-32.png version [b20a1ebbd9].

cannot compute difference between binary files

Added applications/examples/static/img/icons/TWEET DECK_32x32-32.png version [7fb948b811].

cannot compute difference between binary files

Added applications/examples/static/img/icons/_README_ecqlipse.2.png.txt version [09350ce7a0].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
=== ecqlipse 2 (.PNG) by chrfb ===

The packet contains 116 system and 165 application PNG's in white respectively black colour.
Icon size: 128x128 plus a separate folder including 48x48, 32x32 and 16x16 pixel.

Please refer to the Creative Commons (CC) on my site if you want to use or modify the icons.

http://chrfb.deviantart.com

Munich, 2010/03



Added applications/examples/static/img/icons/appliances.png version [063b19a7d4].

cannot compute difference between binary files

Added applications/examples/static/img/icons/demo.png version [252d60a3a8].

cannot compute difference between binary files

Added applications/examples/static/img/icons/examples.png version [8754de2d2c].

cannot compute difference between binary files

Added applications/examples/static/img/icons/livechat.png version [5ce0fc3220].

cannot compute difference between binary files

Added applications/examples/static/img/icons/plugins.png version [b1c3a150ad].

cannot compute difference between binary files

Added applications/examples/static/img/icons/slices.png version [9ebf1550d8].

cannot compute difference between binary files

Added applications/examples/static/img/icons/tutorials.png version [c2433dd331].

cannot compute difference between binary files

Added applications/examples/static/img/icons/twitter.png version [f5cbfb42b8].

cannot compute difference between binary files

Added applications/examples/static/img/icons/usergroups.png version [b7139dde61].

cannot compute difference between binary files

Added applications/examples/static/img/icons/uservoice.png version [0d71619532].

cannot compute difference between binary files

Added applications/examples/static/img/icons/videos.png version [639320ebef].

cannot compute difference between binary files

Added applications/examples/static/img/logo3Tones.png version [64bc8f5bd2].

cannot compute difference between binary files

Added applications/examples/static/img/logo_bw.png version [302b12b7b3].

cannot compute difference between binary files

Added applications/examples/static/img/logo_db.png version [5d5033eca0].

cannot compute difference between binary files

Added applications/examples/static/img/logo_lb.png version [1ce85f083c].

cannot compute difference between binary files

Added applications/examples/static/img/netdow1.png version [475141bba7].

cannot compute difference between binary files

Added applications/examples/static/img/netdow2.png version [c39b6d2525].

cannot compute difference between binary files

Added applications/examples/static/img/netdow3.png version [c703e5329e].

cannot compute difference between binary files

Added applications/examples/static/img/online_book_cover.jpg version [bf3c689113].

cannot compute difference between binary files

Added applications/examples/static/img/tipDownloads.png version [2ad4b350e0].

cannot compute difference between binary files

Added applications/examples/static/img/tipDownloads2.png version [b4becb3823].

cannot compute difference between binary files

Added applications/examples/static/img/web2py_logo.png version [2479398bdc].

cannot compute difference between binary files

Added applications/examples/static/js/calendar.js version [dabf984f8c].

cannot compute difference between binary files

Added applications/examples/static/js/jquery.js version [7622c9ac23].

cannot compute difference between binary files

Added applications/examples/static/js/web2py_ajax.js version [7f2851f561].


































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function popup(url) {
  newwindow=window.open(url,'name','height=400,width=600');
  if (window.focus) newwindow.focus();
  return false;
}
function collapse(id) { jQuery('#'+id).slideToggle(); }
function fade(id,value) { if(value>0) jQuery('#'+id).hide().fadeIn('slow'); else jQuery('#'+id).show().fadeOut('slow'); }
function ajax(u,s,t) {
    query = '';
    if (typeof s == "string") {
        d = jQuery(s).serialize();
        if(d){ query = d; }
    } else {
        pcs = [];
        for(i=0; i<s.length; i++) {
            q = jQuery("[name="+s[i]+"]").serialize();
            if(q){pcs.push(q);}
        }
        if (pcs.length>0){query = pcs.join("&");}
    }
    jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); 
}

String.prototype.reverse = function () { return this.split('').reverse().join('');};
function web2py_ajax_init() {
  jQuery('.hidden').hide();
  jQuery('.error').hide().slideDown('slow');
  jQuery('.flash').click(function() { jQuery(this).fadeOut('slow'); return false; });
  // jQuery('input[type=submit]').click(function(){var t=jQuery(this);t.hide();t.after('<input class="submit_disabled" disabled="disabled" type="submit" name="'+t.attr("name")+'_dummy" value="'+t.val()+'">')});
  jQuery('input.integer').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
  jQuery('input.double,input.decimal').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();});
  var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') ? w2p_ajax_confirm_message : "Are you sure you want to delete this object?";
  jQuery("input[type='checkbox'].delete").live('click', function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; });
  var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
  try {jQuery("input.date").live('focus',function() {Calendar.setup({
     inputField:this, ifFormat:date_format, showsTime:false
  }); }); } catch(e) {};
  var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
  try { jQuery("input.datetime").live('focus', function() {Calendar.setup({
     inputField:this, ifFormat:datetime_format, showsTime: true,timeFormat: "24"
  }); }); } catch(e) {};

  jQuery("input.time").live('focus', function() { var el = jQuery(this); 
          if (!el.hasClass('hasTimeEntry')) try { el.timeEntry(); } catch(e) {}; 
  });
};

jQuery(function() {   
   var flash = jQuery('.flash');
   flash.hide();
   if(flash.html()) flash.slideDown();
   web2py_ajax_init();
});
function web2py_trap_form(action,target) {
   jQuery('#'+target+' form').each(function(i){
      var form=jQuery(this);
      if(!form.hasClass('no_trap'))
        form.submit(function(obj){
         jQuery('.flash').hide().html('');
         web2py_ajax_page('post',action,form.serialize(),target);
         return false;
      });
   });
}
function web2py_ajax_page(method,action,data,target) {
  jQuery.ajax({'type':method,'url':action,'data':data,
    'beforeSend':function(xhr) {
      xhr.setRequestHeader('web2py-component-location',document.location);
      xhr.setRequestHeader('web2py-component-element',target);},
    'complete':function(xhr,text){
      var html=xhr.responseText;
      var content=xhr.getResponseHeader('web2py-component-content'); 
      var command=xhr.getResponseHeader('web2py-component-command');
      var flash=xhr.getResponseHeader('web2py-component-flash');
      var t = jQuery('#'+target);
      if(content=='prepend') t.prepend(html); 
      else if(content=='append') t.append(html);
      else if(content!='hide') t.html(html);  
      web2py_trap_form(action,target);
      web2py_ajax_init();      
      if(command) eval(command);
      if(flash) jQuery('.flash').html(flash).slideDown();
      }
    });
}
function web2py_component(action,target) {
  jQuery(function(){ web2py_ajax_page('get',action,null,target); });
}
function web2py_comet(url,onmessage,onopen,onclose) {
  if ("WebSocket" in window) {
    var ws = new WebSocket(url);
    ws.onopen = onopen?onopen:(function(){});
    ws.onmessage = onmessage;
    ws.onclose = onclose?onclose:(function(){});
    return true; // supported
  } else return false; // not supported
}

Added applications/examples/static/kpax.png version [df86cf8c7e].

cannot compute difference between binary files

Added applications/examples/static/markmin.html version [770a4eca1c].










































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<html><body><h1>Markmin markup language</h1><h2>About</h2><p>This is a new markup language that we call markmin designed to produce high quality scientific papers and books and also put them online. We provide serializers for html, latex and pdf. It is implemented in the <code class="">markmin2html</code> function in the <code class="">markmin2html.py</code>.</p><p>Example of usage:</p><pre><code class="">&gt;&gt;&gt; m = "Hello **world** [[link http://web2py.com]]"
&gt;&gt;&gt; from markmin2html import markmin2html
&gt;&gt;&gt; print markmin2html(m)
&gt;&gt;&gt; from markmin2latex import markmin2latex
&gt;&gt;&gt; print markmin2latex(m)
&gt;&gt;&gt; from markmin2pdf import markmin2pdf # requires pdflatex
&gt;&gt;&gt; print markmin2pdf(m)</code></pre><h2>Why?</h2><p>We wanted a markup language with the following requirements:</p><ul><li>less than 100 lines of functional code</li><li>easy to read</li><li>secure</li><li>support table, ul, ol, code</li><li>support html5 video and audio elements (html serialization only)</li><li>can align images and resize them</li><li>can specify class for tables and code elements</li><li>can add anchors</li><li>does not use _ for markup (since it creates odd behavior)</li><li>automatically links urls</li><li>fast</li><li>easy to extend</li><li>supports latex and pdf including references</li><li>allows to describe the markup in the markup (this document is generated from markmin syntax)</li></ul><p>(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)</p><p>The <a href="http://www.lulu.com/product/paperback/web2py-%283rd-edition%29/12822827">web2py book</a> published by lulu, for example, was entirely generated with markmin2pdf from the online <a href="http://www.web2py.com/book">web2py wiki</a></p><h2>Download</h2><ul><li>http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2html.py</li><li>http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2latex.py</li><li>http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2pdf.py</li></ul><p>markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.</p><h2>Examples</h2><h3>Bold, italic, code and links</h3><table class=""><tr><td><b>SOURCE</b>                </td><td><b>OUTPUT</b></td></tr><tr><td><code class=""># title</code>               </td><td><b>title</b></td></tr><tr><td><code class="">## section</code>            </td><td><b>section</b></td></tr><tr><td><code class="">### subsection</code>        </td><td><b>subsection</b></td></tr><tr><td><code class="">**bold**</code>              </td><td><b>bold</b></td></tr><tr><td><code class="">''italic''</code>            </td><td><i>italic</i></td></tr><tr><td><code class="">``verbatim``</code>      </td><td><code class="">verbatim</code></td></tr><tr><td><code class="">http://google.com</code>     </td><td>http://google.com</td></tr><tr><td><code class="">[[click me #myanchor]]</code></td><td><a href="#myanchor">click me</a></td></tr></table>
<h3>More on links</h3><p>The format is always <code class="">[[title link]]</code>. Notice you can nest bold, italic and code inside the link title.</p><h3>Anchors <span id="myanchor"><span></h3><p>You can place an anchor anywhere in the text using the syntax <code class="">[[name]]</code> where <i>name</i> is the name of the anchor.
You can then link the anchor with <a href="#myanchor">link</a>, i.e. <code class="">[[link #myanchor]]</code>.</p><h3>Images</h3><p><img src="http://www.web2py.com/examples/static/web2py_logo.png" alt="some image" align="right" width="200px" />
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code</p><p><code class="">[[some image http://www.web2py.com/examples/static/web2py_logo.png right 200px]]</code>.</p><h3>Unordered Lists</h3><pre><code class="">- Dog
- Cat
- Mouse</code></pre><p>is rendered as</p><ul><li>Dog</li><li>Cat</li><li>Mouse</li></ul><p>Two new lines between items break the list in two lists.</p><h3>Ordered Lists</h3><pre><code class="">+ Dog
+ Cat
+ Mouse</code></pre><p>is rendered as</p><ol><li>Dog</li><li>Cat</li><li>Mouse</li></ol><h3>Tables</h3><p>Something like this
<pre><code class="">---------
**A** | **B** | **C**
0 | 0 | X
0 | X | 0
X | 0 | 0
-----:abc</code></pre>
is a table and is rendered as
<table class="abc"><tr><td><b>A</b></td><td><b>B</b></td><td><b>C</b></td></tr><tr><td>0</td><td>0</td><td>X</td></tr><tr><td>0</td><td>X</td><td>0</td></tr><tr><td>X</td><td>0</td><td>0</td></tr></table>Four or more dashes delimit the table and | separates the columns.
The <code class="">:abc</code> at the end sets the class for the table and it is optional.</p><h3>Blockquote</h3><p>A table with a single cell is rendered as a blockquote:</p><blockquote class="">Hello world</blockquote>
<h3>Code, <code class="">&lt;code&gt;</code>, escaping and extra stuff</h3><pre><code class="python">def test():
    return "this is Python code"</code></pre><p>Optionally a ` inside a <code class="">``...``</code> block can be inserted escaped with !`!.
The <code class="">:python</code> after the markup is also optional. If present, by default, it is used to set the class of the &lt;code&gt; block.
The behavior can be overridden by passing an argument <code class="">extra</code> to the <code class="">render</code> function. For example:</p><pre><code class="python">&gt;&gt;&gt; markmin2html("``aaa``:custom",
       extra=dict(custom=lambda text: 'x'+text+'x'))</code></pre><p>generates</p><code class="python">'xaaax'</code><p>(the <code class="">``...``:custom</code> block is rendered by the <code class="">custom=lambda</code> function passed to <code class="">render</code>).</p><h3>Html5 support</h3><p>Markmin also supports the &lt;video&gt; and &lt;audio&gt; html5 tags using the notation:
<pre><code class="">[[title link video]]
[[title link audio]]</code></pre></p><h3>Latex and other extensions</h3><p>Formulas can be embedded into HTML with <code class="">$</code><code class="">$</code>formula<code class="">$</code><code class="">$</code>.
You can use Google charts to render the formula:</p><pre><code class="">&gt;&gt;&gt; LATEX = '&lt;img src="http://chart.apis.google.com/chart?cht=tx&amp;chl=%s" align="center"/&gt;'
&gt;&gt;&gt; markmin2html(text,{'latex':lambda code: LATEX % code.replace('"','"')})</code></pre><h3>Code with syntax highlighting</h3><p>This requires a syntax highlighting tool, such as the web2py CODE helper.</p><pre><code class="">&gt;&gt;&gt; extra={'code_cpp':lambda text: CODE(text,language='cpp').xml(),
           'code_java':lambda text: CODE(text,language='java').xml(),
           'code_python':lambda text: CODE(text,language='python').xml(),
           'code_html':lambda text: CODE(text,language='html').xml()}
&gt;&gt;&gt; markmin2html(text,extra=extra)</code></pre><p>Code can now be marked up as in this example:</p><pre><code class="">``
&lt;html&gt;&lt;body&gt;example&lt;/body&gt;&lt;/html&gt;
``:code_html</code></pre><h3>Citations and References</h3><p>Citations are treated as internal links in html and proper citations in latex if there is a final section called "References". Items like</p><pre><code class="">- [[key]] value</code></pre><p>in the References will be translated into Latex</p><pre><code class="">\bibitem{key} value</code></pre><p>Here is an example of usage:</p><pre><code class="">As shown in Ref.``mdipierro``:cite

## References
- [[mdipierro]] web2py Manual, 3rd Edition, lulu.com</code></pre><h3>Caveats</h3><p><code class="">&lt;ul/&gt;</code>, <code class="">&lt;ol/&gt;</code>, <code class="">&lt;code/&gt;</code>, <code class="">&lt;table/&gt;</code>, <code class="">&lt;blockquote/&gt;</code>, <code class="">&lt;h1/&gt;</code>, ..., <code class="">&lt;h6/&gt;</code> do not have <code class="">&lt;p&gt;...&lt;/p&gt;</code> around them.</p></body></html>

Added applications/examples/static/powered_by/web2py_sticker_3d8799.png version [3410a7393c].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_3d9960.png version [60ea143977].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_463d99.png version [d480bd13ee].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_73993d.png version [f8846c2722].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_993d3d.png version [9b86140ee1].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_993d98.png version [0272dcf2f5].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_996f3d.png version [873403388a].

cannot compute difference between binary files

Added applications/examples/static/powered_by/web2py_sticker_99963d.png version [ccc377131a].

cannot compute difference between binary files

Added applications/examples/static/robots.txt version [00914a3dbd].





1
2
3
4
+
+
+
+
User-agent: *
Disallow: /examples/global/
Disallow: /welcome
Disallow: /admin

Added applications/examples/static/title.png version [4ed899302f].

cannot compute difference between binary files

Added applications/examples/static/web2py_contributor_agreement.pdf version [ff68111ffe].

cannot compute difference between binary files

Added applications/examples/static/web2py_logo.png version [2479398bdc].

cannot compute difference between binary files

Added applications/examples/static/web2py_logo_light.png version [9bb63c121c].

cannot compute difference between binary files

Added applications/examples/views/ajax_examples/fade.html version [e7aa5189d8].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<form>
<input type="button" onclick="fade('test',-0.2);" value="fade down"/>
<input type="button" onclick="fade('test',+0.2);" value="fade up"/>
</form>

<div id="test">{{='Hello World '*100}}</div>

Added applications/examples/views/ajax_examples/index.html version [2fd6a0649e].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<p>Type something and press the button.
   The last 10 entries will appear sorted in a table below.</p>

<form>
<INPUT type="text" id="q" name = "q" value="web2py"/>
<INPUT type="button" value="submit" 
       onclick="ajax('{{=URL('data')}}',['q'],'target');"/>
</form>
<br/>
<div id="target"></div>

Added applications/examples/views/appadmin.html version [3b13f939eb].







































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script><!--
jQuery(document).ready(function(){
  jQuery("table.sortable tbody tr").mouseover( function() {
     jQuery(this).addClass("highlight"); }).mouseout( function() { 
     jQuery(this).removeClass("highlight"); });
  jQuery('table.sortable tbody tr:odd').addClass('odd');
  jQuery('table.sortable tbody tr:even').addClass('even');
});
//--></script>

{{if request.function=='index':}}
  <h1>{{=T("Available databases and tables")}}</h1>
  {{if not databases:}}{{=T("No databases in this application")}}{{pass}}
  {{for db in sorted(databases):}}
    {{for table in databases[db].tables:}}
      {{qry='%s.%s.id>0'%(db,table)}}
      {{tbl=databases[db][table]}}
      {{if hasattr(tbl,'_primarykey'):}}
        {{if tbl._primarykey:}}
            {{firstkey=tbl[tbl._primarykey[0]]}}
            {{if firstkey.type in ['string','text']:}}
              {{qry='%s.%s.%s!=""'%(db,table,firstkey.name)}}
            {{else:}}
              {{qry='%s.%s.%s>0'%(db,table,firstkey.name)}}
            {{pass}}
        {{else:}}
             {{qry=''}}
             {{pass}}
      {{pass}}
      <h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</h2>
      [ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
    <br /><br />
    {{pass}}
  {{pass}}

{{elif request.function=='select':}}
  <h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
  </h1>
   {{if table:}}
  [ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
    <h2>{{=T("Rows in table")}}</h2><br/>
   {{else:}}
    <h2>{{=T("Rows selected")}}</h2><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/>
      {{=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/>
    <h3>{{=nrows}} {{=T("selected")}}</h3>
    {{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
    {{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}    
    {{if rows:}}
       <div style="overflow: auto;" width="80%">
       {{linkto=URL('update',args=request.args[0])}}
       {{upload=URL('download',args=request.args[0])}}    
       {{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
       </div>
    {{pass}}
    <br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
    [ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
  {{if table:}}
    {{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
  {{pass}}


{{elif request.function=='insert':}}  
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=table._primarykey[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
    {{else:}}  
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
    {{pass}}
  </h1>
  <h2>{{=T("New Record")}}</h2><br/>
  {{=form}}



{{elif request.function=='update':}}
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=request.vars.keys()[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}      
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
      {{=T("record")}} {{=A('%s=%s'%request.vars.items()[0],_href=URL('update',args=request.args[:2],vars=request.vars))}}
    {{else:}}
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
      {{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
    {{pass}}
  </h1>
  <h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}



{{elif request.function=='state':}}
  <h1>{{=T("Internal State")}}</h1>
  <h2>{{=T("Current request")}}</h2>
  {{=BEAUTIFY(request)}}
  <br/><h2>{{=T("Current response")}}</h2>
  {{=BEAUTIFY(response)}}
  <br/><h2>{{=T("Current session")}}</h2>
  {{=BEAUTIFY(session)}}


{{elif request.function == 'ccache':}}
<h2>Cache</h2>
<div class="wrapper">
<div class="list">
    <div class="list-header">
        Statistics
    </div>
    <div class="content">
        <h3>Overview</h3>
        <p>
            Hit Ratio: 
            <strong>{{=total['ratio']}}%</strong> 
            (<strong>{{=total['hits']}}</strong> hits 
            and <strong>{{=total['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=total['objects']}}</strong> items, 
            <strong>{{=total['bytes']}}</strong> bytes 
            {{if total['bytes'] > 524287:}}
                (<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
            {{pass}}
        </p>
        <p>
            Cache contains items up to 
            <strong>{{="%02d" % total['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % total['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>RAM</h3>
        <p>
            Hit Ratio: 
            <strong>{{=ram['ratio']}}%</strong> 
            (<strong>{{=ram['hits']}}</strong> hits 
            and <strong>{{=ram['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=ram['objects']}}</strong> items, 
            <strong>{{=ram['bytes']}}</strong> bytes 
            {{if ram['bytes'] > 524287:}}
                (<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            RAM contains items up to 
            <strong>{{="%02d" % ram['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>DISK</h3>
        <p>
            Hit Ratio: 
            <strong>{{=disk['ratio']}}%</strong> 
            (<strong>{{=disk['hits']}}</strong> hits 
            and <strong>{{=disk['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=disk['objects']}}</strong> items, 
            <strong>{{=disk['bytes']}}</strong> bytes 
            {{if disk['bytes'] > 524287:}}
                (<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            DISK contains items up to 
            <strong>{{="%02d" % disk['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
        </p>
    </div>
    
    <div class="list-header">
    Manage Cache
    </div>
    <div class="content">
    <p>
        {{=form}}
    </p>
    </div>
</div>
<div class="clear"></div>
</div>
{{pass}}

Added applications/examples/views/database_examples/buy.html version [9c79d70cf8].








1
2
3
4
5
6
7
+
+
+
+
+
+
+
{{extend 'layout_examples/layout_civilized.html'}}
  <h1>Purchase form</h1>
  {{=form}}
  [ {{=A('reset purchased',_href=URL('reset_purchased'))}} |
    {{=A('delete purchased',_href=URL('delete_purchased'))}} ]<br/> 
  <h2>Current purchases (SQL JOIN!)</h2>
<p>{{=records}}</p>

Added applications/examples/views/database_examples/register_dog.html version [ea088337e6].







1
2
3
4
5
6
+
+
+
+
+
+
{{extend 'layout_examples/layout_civilized.html'}}

<h1>Dog registration form</h1>
{{=form}}
<h2>Current dogs</h2>
{{=records}}

Added applications/examples/views/database_examples/register_product.html version [a2de7211fd].







1
2
3
4
5
6
+
+
+
+
+
+
{{extend 'layout_examples/layout_civilized.html'}}

<h1>Product registration form</h1>
{{=form}}
<h2>Current products</h2>
{{=records}}

Added applications/examples/views/database_examples/register_user.html version [6c99ba526d].







1
2
3
4
5
6
+
+
+
+
+
+
{{extend 'layout_examples/layout_civilized.html'}}

<h1>User registration form</h1>
{{=form}}
<h2>Current users</h2>
{{=records}}

Added applications/examples/views/default/changelog.html version [51c880bb1f].






1
2
3
4
5
+
+
+
+
+
{{extend 'layout.html'}}

<div class="contentleft">
  {{=changelog}}
</div>

Added applications/examples/views/default/documentation.html version [8968f7f1ba].



















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<div class="contentleft">
    <div >
        {{=get_content('main')}}
    </div>
    <blockquote>
         {{=get_content('official')}}
    </blockquote>
    <blockquote>
         {{=get_content('community')}}
    </blockquote>
  <blockquote>
         {{=get_content('more')}}
    </blockquote>
</div>

    

Added applications/examples/views/default/download.html version [fcd696b3fd].





































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{response.files.append(URL('static','css/artwork.css'))}}
{{extend 'layout.html'}}
{{import os}}
{{version = request.env.web2py_version.split('(')}}
<div class="onecolcontent">
  <h2>web2py<sup style="font-size:0.5em;">TM</sup> Download</h2>
  <blockquote>
    <center>
      <table style="width:50%;">
	<tr>
	  <th style="white-space:nowrap;padding-left:10px;">Current (for everybody)<br/>{{=version[0]}}<br />({{=version[1]}}</th>
	  <th style="padding-left:30px;">Nightly Built (for testers)</th>
	  <th style="padding-left:30px;">Trunk (for developers)</th>
	</tr>
	<tr>
	  <td style="text-align:center">
	    <ul class="downloadb">
	      <li><span></span><a href="http://www.web2py.com/examples/static/web2py_win.zip">For Windows</a></li>
	      <li><span></span><a href="http://www.web2py.com/examples/static/web2py_osx.zip">For Mac</a></li>
	      <li><span></span><a href="http://www.web2py.com/examples/static/web2py_src.zip">Source Code</a></li>
	      <li><a href="{{=URL('changelog')}}">Change Log</a></li>
	    </ul>
	  </td>
	  <td style="text-align:center">
	    <ul class="downloadb">
	      <li><span></span><a href="http://www.web2py.com/examples/static/nightly/web2py_win.zip">For Windows</a></li>
	      <li><span></span><a href="http://www.web2py.com/examples/static/nightly/web2py_osx.zip">For Mac</a></li>
	      <li><span></span><a href="http://www.web2py.com/examples/static/nightly/web2py_src.zip">Source Code</a></li>
	      <li><a href="http://www.web2py.com/examples/static/nightly/tests.log">Unittest Log</a></li>
	    </ul>
	  </td>
	  <td style="text-align:center">
	    <ul class="downloadb">
	      <li><span></span><a href="http://code.google.com/p/web2py/">Mercurial Repository</a></li>
	      <li><span></span><a href="https://launchpad.net/web2py">Bazaar Repository</a></li>
	      <li><span></span><a href="http://web2py.com/examples/static/web2py.plugin.wiki.w2p">plugin_wiki (add-on)</a></li>
	      <li><a href="http://vimeo.com/13485916">What is plugin_wiki?</a></li>  
	    </ul>
	  </td>
	</tr>
      </table>
    </center>
    <p style="text-align:left;">
      The source code version works on all supported platforms, including Linux, but it requires Python 2.4, 2.5, 2.6, or 2.7. 
      It runs on Windows and most Unix systems, including <b>Linux</b> and <b>BSD</b>.
    </p>    
  </blockquote>

  <h3>Instructions</h3>
  <p>After download, unzip it and click on web2py.exe (windows) or web2py.app (osx).
    To run from source type:</p>
  {{=CODE("python2.5 web2py.py",language=None,counter='>',_class='boxCode')}}
  <p>or for more info type:</p>
  {{=CODE("python2.5 web2py.py -h",language=None,counter='>',_class='boxCode')}}
  
  
  <h3>Caveats</h3>
  <p>After installation, every time you run it, web2py asks you to choose a password. This password is your administrative password. If the password is left blank, the administrative interface is disabled. The administrative interface /admin/default/index is only accessible via localhost and always requires a password.<br/>Any url /a/b/c maps into a call to application a, controller b.py and function c in that controller.<br/>You are strongly advised to also use Apache with mod_proxy or mod_wsgi to access applications in the framework. This allows better security and concurrency.</p>
  
  <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>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 href="{{=URL('license')}}">read more</a>]
  
  <h3>Applications</h3>
  <p>You can find many free and ready to use web2py applications with source code <a href="http://www.web2py.com/appliances">here</a>.
    <div style="width:96.5%">
      <br />
      <div class="logosDow WH1">
	<span>web2py artwork</span>  
	<a href="{{=URL('static', 'img/logo_lb.png')}}" class="box-A logoDow1" ><span></span></a>
	<a href="{{=URL('static', 'img/logo_db.png')}}" class="box-A logoDow2" ><span></span></a>
	<a href="{{=URL('static', 'img/logo_bw.png')}}" class="box-A logoDow3" ><span></span></a>
      </div>
      <div class="logosDow WH2">
	<span>Stickers</span>  
	<a  href="{{=URL('static', 'img/Stickers1.png')}}" class="stikImage stikimage1"><span></span></a>
	<a  href="{{=URL('static', 'img/Stickers2.png')}}" class="stikImage stikimage2"><span></span></a>  
	<a  href="{{=URL('static', 'img/Stickers3.png')}}" class="stikImage stikimage3"><span></span></a> 
	<a  href="{{=URL('static', 'img/Stickers4.png')}}" class="stikImage stikimage4"><span></span></a> 
	<a  href="{{=URL('static', 'img/Stickers5.png')}}" class="stikImage stikimage5"><span></span></a> 
	<a  href="{{=URL('static', 'img/Stickers6.png')}}" class="stikImage stikimage6"><span></span></a> 
	<a  href="{{=URL('static', 'img/Stickers7.png')}}" class="stikImage stikimage7"><span></span></a> 
      </div>
      <a href="{{=URL('static', 'artwork.tar.gz')}}" >Download WEB2PY artwork pack in editable .png format</a>
    </div>  
    
    <br />
   
    Logo, Stickers and Layout developed by <a target="_blank" href="http://twitter.com/josev2010">José V. Sousa</a> and <a target="_blank" href="http://twitter.com/rochacbruno">Bruno Rocha</a> (at <a target="_blank" href="http://www.blouweb.com">Blouweb</a>) All rights reserved by  <a target="_blank" href="http://mycti.cti.depaul.edu/people/facultyInfo_mycti.asp?id=343">Massimo Di Pierro</a> &copy; 2010
    <br />
    Favicon and HTML5 compatibility  by <a target="_blank" href="">Martin Mulone</a>
    <br />
    Icon set made by <a href="http://chrfb.deviantart.com">Christian Burprich</a> licensed under a <a rel="license" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 License</a>
    <br />
</div>
{{block sidebar}}{{end}}
{{block leftbadges}}{{end}}

Added applications/examples/views/default/examples.html version [ed383c3b10].














































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}} 
{{import os}}

<div class="onecolcontent">
  <h2>web2py<sup style="font-size:0.5em;">TM</sup> Examples</h2>
  <div id="navigation">
    <a href="#simple_examples">simple</a> |
    <a href="#session_examples">session</a> |
    <a href="#template_examples">template</a> |
    <a href="#layout_examples">layout</a> |
    <a href="#form_examples">form</a> |
    <a href="#database_examples">database</a> |
    <a href="#cache_examples">cache</a> |
    <a href="#ajax_examples">ajax</a> |
    <a href="#testing_examples">testing</a> |
    <a href="#streaming_examples">streaming</a> |
    <a href="#xmlrpc_examples">xmlrpc</a> |
    <a href="http://www.web2py.com/book/default/chapter/06">dal</a> |
    <a href="http://www.web2py.com/book/default/chapter/07">crud</a> |
    <a href="http://www.web2py.com/book/default/chapter/08">auth</a>
  </div>
  <div id="scrollhere">
    
    <h2 id="simple_examples">Simple Examples</h2>
    
    <p><i>Here are some working and complete examples that explain the basic syntax of the framework.<br/>
    You can click on the web2py keywords (in the highlighted code!) to get documentation.</i></p>

    <h3>Example {{c=1}}{{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def hello1():
        return "Hello World"
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}

    <p>If the controller function returns a string, that is the body of the rendered page.<br/>Try it here: <a href="/{{=request.application}}/simple_examples/hello1">hello1</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def hello2():
        return T("Hello World")
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}

    <p>The function T() marks strings that need to be translated. Translation dictionaries can be created at /admin/default/design<br/>Try it here: <a href="/{{=request.application}}/simple_examples/hello2">hello2</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def hello3():
        return dict(message=T("Hello World"))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}

    <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(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>If you return a dictionary, the variables defined in the dictionery are visible to the view (template).
    <br/>Try it here: <a 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>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def hello4():
        response.view='simple_examples/hello3.html'
        return dict(message=T("Hello World"))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can change the view, but the default is /[controller]/[function].html. If the default is not found web2py tries to render the page using the generic.html view.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/hello4">hello4</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def hello5():
        return HTML(BODY(H1(T('Hello World'),_style="color: red;"))).xml() # .xml to serialize
    """.strip(),language='web2py',link=URL(r=request,c='global',f='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.
    Each tag, DIV for example, takes three types of arguments:</p>
    <ul>
    <li>unnamed arguments, they correspond to nested tags</li>
    <li>named arguments and name starts with '_'. These are mapped blindly into tag attributes and the '_' is removed. attributes without value like "READONLY" can be created with the argument "_readonly=ON".</li>
    <li>named arguments and name does not start with '_'. They have a special meaning. See "value=" for INPUT, TEXTAREA, SELECT tags later.
    </ul>
    <p>Try it here: <a href="/{{=request.application}}/simple_examples/hello5">hello5</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def hello6():
        response.flash=T("Hello World in a flash!")
        return dict(message=T("Hello World"))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}

    <p>response.flash allows you to flash a message to the user when the page is returned. Use session.flash instead of response.flash to display a message after redirection. With default layout, you can click on the flash to make it disappear.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/hello6">hello6</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def status():
        return dict(request=request,session=session,response=response)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Here we are showing the request, session and response objects using the generic.html template.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/status">status</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def redirectme():
        redirect(URL('hello3'))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can do redirect.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/redirectme">redirectme</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def raisehttp():
        raise HTTP(400,"internal error")
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can raise HTTP exceptions to return an error page.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/raisehttp">raisehttp</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def raiseexception():
        1/0
        return 'oops'
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>If an exception occurs (other than HTTP) a ticket is generated and the event is logged for the administrator. These tickets and logs can be accessed, reviewed and deleted at any later time.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/raiseexception">raiseexception</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def servejs():
        import gluon.contenttype
        response.headers['Content-Type']=gluon.contenttype.contenttype('.js')
        return 'alert("This is a Javascript document, it is not supposed to run!");'
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can serve other than HTML pages by changing the contenttype via the response.headers. The gluon.contenttype module can help you figure the type of the file to be served. NOTICE: this is not necessary for static files unless you want to require authorization.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/servejs">servejs</a></p>

    <h3 id="example_json">Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def makejson():
        return response.json(['foo', {'bar': ('baz', None, 1.0, 2)}])
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>If you are into Ajax, web2py includes gluon.contrib.<a href="http://cheeseshop.python.org/pypi/simplejson">simplejson</a>, developed by Bob Ippolito. This module provides a fast and easy way to serve asynchronous content to your Ajax page. gluon.simplesjson.dumps(...) can serialize most Python types into <a href="http://www.json.org">JSON</a>. gluon.contrib.simplejson.loads(...) performs the reverse operation.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/makejson">makejson</a></p>

    <p>New in web2py 1.63: Any normal action returning a dict is automatically serialized in JSON if '.json' is appended to the URL.</p>

    <h3 id="example_rtf">Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def makertf():
        import gluon.contrib.pyrtf as q
        doc=q.Document()
        section=q.Section()
        doc.Sections.append(section)
        section.append('Section Title')
        section.append('web2py is great. '*100)
        response.headers['Content-Type']='text/rtf'
        return q.dumps(doc)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>web2py also includes gluon.contrib.<a href="http://pyrtf.sourceforge.net/">pyrtf</a>, developed by Simon Cusack and revised by Grant Edwards. This module allows you to generate Rich Text Format documents including colored formatted text and pictures.<br/>Try it here: <a href="/{{=request.application}}/simple_examples/makertf">makertf</a></p>

    <h3 id="example_rss">Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def rss_aggregator():
        import datetime
        import gluon.contrib.rss2 as rss2
        import gluon.contrib.feedparser as feedparser
        d = feedparser.parse("http://rss.slashdot.org/Slashdot/slashdot/to")

        rss = rss2.RSS2(title=d.channel.title,
           link = d.channel.link,
           description = d.channel.description,
           lastBuildDate = datetime.datetime.now(),
           items = [
              rss2.RSSItem(
                title = entry.title,
                link = entry.link,
                description = entry.description,
                # guid = rss2.Guid('unkown'),
                pubDate = datetime.datetime.now()) for entry in d.entries]
           )
        response.headers['Content-Type']='application/rss+xml'
        return rss2.dumps(rss)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>web2py includes gluon.contrib.<a href="http://www.dalkescientific.com/Python/PyRSS2Gen.html">rss2</a>, developed by Dalke Scientific Software, which generates RSS2 feeds, and
    gluon.contrib.<a href="http://www.feedparser.org/">feedparser</a>, developed by Mark Pilgrim, which collects RSS and ATOM feeds. The above controller collects a slashdot feed and makes new one.
    <br/>Try it here: <a href="/{{=request.application}}/simple_examples/rss_aggregator">rss_aggregator</a></p>


    <h3 id="example_wiki">Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
    {{=CODE("""
    def ajaxwiki():
        form=FORM(TEXTAREA(_id='text',_name='text'),
                 INPUT(_type='button',_value='markmin',
                       _onclick="ajax('ajaxwiki_onclick',['text'],'html')"))
        return dict(form=form,html=DIV(_id='html'))

    def ajaxwiki_onclick():
        return MARKMIN(request.vars.text).xml()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The markmin wiki markup is described <a href="{{=URL(r=request,c='static',f='markmin.html')}}">here</a>.
    web2py also includes gluon.contrib.<a href="http://code.google.com/p/python-markdown2/">markdown</a>.WIKI helper (markdown2) which converts WIKI markup to HTML following <a href="http://en.wikipedia.org/wiki/Markdown">this syntax</a>. In this example we added a fancy ajax effect.<br/>Try it here: <a href="/{{=request.application}}/simple_examples/ajaxwiki">ajaxwiki</a></p>

    <h2 id="session_examples">Session Examples</h2>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: session_examples.py </b>
    {{=CODE("""
    def counter():
        if not session.counter: session.counter=0
        session.counter+=1
        return dict(counter=session.counter)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='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(r=request,c='global',f='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.
    <br/>Try it here: <a href="/{{=request.application}}/session_examples/counter">counter</a></p>

    <h2 id="template_examples">Template Examples</h2>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py</b>
    {{=CODE("""
    def variables(): return dict(a=10, b=20)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/variables.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/variables.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>A view (also known as template) is just an HTML file with &#123;&#123;...&#125;&#125; tags. You can put ANY python code into the tags, no need to indent but you must use pass to close blocks. The view is transformed into a python code and then executed. &#123;&#123;=a&#125;&#125; prints a.xml() or escape(str(a)).
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/variables">variables</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def test_for(): return dict()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/test_for.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/test_for.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can do for and while loops.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/test_for">test_for</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def test_if(): return dict()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/test_if.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/test_if.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can do if, elif, else.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/test_if">test_if</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def test_try(): return dict()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/test_try.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/test_try.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can do try, except, finally.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/test_try">test_try</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def test_def(): return dict()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/test_def.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/test_def.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can write functions in HTML too.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/test_def">test_def</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def escape(): return dict(message='<h1>text is escaped</h1>')
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/escape.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/escape.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The argument of  &#123;&#123;=...&#125;&#125; is always escaped unless it is an object with a .xml() method such as link, A(...), a FORM(...), a XML(...) block, etc.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/escape">escape</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def xml():
        return dict(message=XML('<h1>text is not escaped</h1>'))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/xml.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/xml.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>If you do not want to escape the argument of  &#123;&#123;=...&#125;&#125; mark it as XML.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/xml">xml</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
    {{=CODE("""
    def beautify(): return dict(message=BEAUTIFY(request))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: template_examples/beautify.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/template_examples/beautify.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can use BEAUTIFY to turn lists and dictionaries into organized HTML.
    <br/>Try it here: <a href="/{{=request.application}}/template_examples/beautify">beautify</a></p>

    <h2 id="layout_examples">Layout Examples</h2>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: layout_examples.py </b>
    {{=CODE("""
    def civilized():
        response.menu=[['civilized',True,URL('civilized')],
                       ['slick',False,URL('slick')],
                       ['basic',False,URL('basic')]]
        response.flash='you clicked on civilized'
        return dict(message="you clicked on civilized")
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: layout_examples/civilized.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/layout_examples/civilized.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can specify the layout file at the top of your view. civilized Layout file is a view that somewhere in the body contains &#123;&#123;include&#125;&#125;.
    <br/>Try it here: <a href="/{{=request.application}}/layout_examples/civilized">civilized</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: layout_examples.py </b>
    {{=CODE("""
    def slick():
        response.menu=[['civilized',False,URL('civilized')],
                       ['slick',True,URL('slick')],
                       ['basic',False,URL('basic')]]
        response.flash='you clicked on slick'
        return dict(message="you clicked on slick")
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: layout_examples/slick.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/layout_examples/slick.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Same here, but using a different template.<br/>Try it here: <a href="/{{=request.application}}/layout_examples/slick">slick</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: layout_examples.py </b>
    {{=CODE("""
    def basic():
        response.menu=[['civilized',False,URL('civilized')],
                       ['slick',False,URL('slick')],
                       ['basic',True,URL('basic')]]
        response.flash='you clicked on basic'
        return dict(message="you clicked on basic")
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: layout_examples/basic.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/layout_examples/basic.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>'layout.html' is the default template, every application has a copy of it.
    <br/>Try it here: <a href="/{{=request.application}}/layout_examples/basic">basic</a></p>

    <h2 id="form_examples">Form Examples</h2>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: form_examples.py</b>
    {{=CODE("""
    def form():
        form=FORM(TABLE(TR("Your name:",INPUT(_type="text",_name="name",requires=IS_NOT_EMPTY())),
                        TR("Your email:",INPUT(_type="text",_name="email",requires=IS_EMAIL())),
                        TR("Admin",INPUT(_type="checkbox",_name="admin")),
                        TR("Sure?",SELECT('yes','no',_name="sure",requires=IS_IN_SET(['yes','no']))),
                        TR("Profile",TEXTAREA(_name="profile",value="write something here")),
                        TR("",INPUT(_type="submit",_value="SUBMIT"))))
        if form.accepts(request,session):
            response.flash="form accepted"
        elif form.errors:
            response.flash="form is invalid"
        else:
            response.flash="please fill the form"
        return dict(form=form,vars=form.vars)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>You can use HTML helpers like FORM, INPUT, TEXTAREA, OPTION, SELECT to build forms. The "value=" attribute sets the initial value of the field (works for TEXTAREA and OPTION/SELECT too) and the requires attribute sets the validators.
    FORM.accepts(..) tries to validate the form and, on success, stores vars into form.vars. On failure the error messages are stored into form.errors and shown in the form.
    <br/>Try it here: <a href="/{{=request.application}}/form_examples/form">form</a></p>

    <h2 id="database_examples">Database Examples</h2>

    <p>You can find more examples of the web2py Database Abstraction Layer <a href="http://www.web2py.com/book/default/chapter/06">here</a></p>

    <p>Let's create a simple model with users, dogs, products and purchases (the database of an animal store). Users can have many dogs (ONE TO MANY), can buy many products and every product can have many buyers (MANY TO MANY).</p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>in model: db.py</b>
    {{=CODE("""
    db=DAL('sqlite://storage.db')

    db.define_table('users',
                    Field('name'),
                    Field('email'))

    # ONE (users) TO MANY (dogs)
    db.define_table('dogs',
                    Field('owner_id',db.users),
                    Field('name'),                
                    Field('type'),
                    Field('vaccinated','boolean',default=False),
                    Field('picture','upload',default=''))

    db.define_table('products',
                    Field('name'),
                    Field('description','text'))

    # MANY (users) TO MANY (products)
    db.define_table('purchases',
                    Field('buyer_id',db.users),
                    Field('product_id',db.products),
                    Field('quantity','integer'))

    purchased=((db.users.id==db.purchases.buyer_id)&(db.products.id==db.purchases.product_id))

    db.users.name.requires=IS_NOT_EMPTY()
    db.users.email.requires=[IS_EMAIL(), IS_NOT_IN_DB(db,'users.email')]
    db.dogs.owner_id.requires=IS_IN_DB(db,'users.id','users.name')
    db.dogs.name.requires=IS_NOT_EMPTY()
    db.dogs.type.requires=IS_IN_SET(['small','medium','large'])
    db.purchases.buyer_id.requires=IS_IN_DB(db,'users.id','users.name')
    db.purchases.product_id.requires=IS_IN_DB(db,'products.id','products.name')
    db.purchases.quantity.requires=IS_INT_IN_RANGE(0,10)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>
    Tables are created if they do not exist (try... except).
    Here "purchased" is an SQLQuery object, "db(purchased)" would be a SQLSet objects. A SQLSet object can be selected, updated, deleted. SQLSets 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>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py </b>
    {{=CODE("""
    response.menu=[['Register User',False,URL('register_user')],
                   ['Register Dog',False,URL('register_dog')],
                   ['Register Product',False,URL('register_product')],
                   ['Buy product',False,URL('buy')]]

    def register_user():
        ### create an insert form from the table
        form=SQLFORM(db.users)
        ### if form is correct, perform the insert
        if form.accepts(request,session):
            response.flash='new record inserted'
        ### and get a list of all users
        records=SQLTABLE(db().select(db.users.ALL))
        return dict(form=form,records=records)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: database_examples/register_user.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/database_examples/register_user.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>This is a simple user registration form. SQLFORM takes a table and returns the corresponding entry form with validators, etc. SQLFORM.accepts is similar to FORM.accepts but, if form is validated, the corresponding insert is also performed. SQLFORM can also do update and edit if a record is passed as its second argument.
    SQLTABLE instead turns a set of records (result of a select) into an HTML table with links as specified by its optional parameters.
    The response.menu on top is just a variable used by the layout to make the navigation menu for all functions in this controller.<br/>
    Try it here: <a href="/{{=request.application}}/database_examples/register_user">register_user</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py </b>
    {{=CODE("""
    def register_dog():
        form=SQLFORM(db.dogs)
        if form.accepts(request,session):
            response.flash='new record inserted'
        download=URL('download') # to see the picture
        records=SQLTABLE(db().select(db.dogs.ALL),upload=download)
        return dict(form=form,records=records)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: database_examples/register_dog.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/database_examples/register_dog.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Here is a dog registration form. Notice that the "image" (type "upload") field is rendered into a &lt;INPUT type="file"&gt; html tag. SQLFORM.accepts(...) handles the upload of the file into the uploads/ folder.
    <br/>Try it here: <a href="/{{=request.application}}/database_examples/register_dog">register_dog</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py </b>
    {{=CODE("""
    def register_product():
        form=SQLFORM(db.products)
        if form.accepts(request,session):
            response.flash='new record inserted'
        records=SQLTABLE(db().select(db.products.ALL))
        return dict(form=form,records=records)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: database_examples/register_product.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/database_examples/register_product.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Nothing new here.
    <br/>Try it here: <a href="/{{=request.application}}/database_examples/register_product">register_product</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py </b>
    {{=CODE("""
    def buy():
        form=FORM(TABLE(TR("Buyer id:",INPUT(_type="text",_name="buyer_id",requires=IS_NOT_EMPTY())),
               TR("Product id:",INPUT(_type="text",_name="product_id",requires=IS_NOT_EMPTY())),
               TR("Quantity:",INPUT(_type="text",_name="quantity",requires=IS_INT_IN_RANGE(1,100))),
               TR("",INPUT(_type="submit",_value="Order"))))
        if form.accepts(request,session):
            ### check if user is in the database
            if len(db(db.users.id==form.vars.buyer_id).select())==0:
                form.errors.buyer_id="buyer not in database"
            ### check if product is in the database
            if len(db(db.products.id==form.vars.product_id).select())==0:
                form.errors.product_id="product not in database"
            ### if no errors
            if len(form.errors)==0:
                ### get a list of same purchases by same user
                purchases=db((db.purchases.buyer_id==form.vars.buyer_id)&
                             (db.purchases.product_id==form.vars.product_id)).select()
                ### if list contains a record, update that record
                if len(purchases)>0:
                    purchases[0].update_record(quantity=purchases[0].quantity+form.vars.quantity)
                ### or insert a new record in table
                else:
                    db.purchases.insert(buyer_id=form.vars.buyer_id,
                                        product_id=form.vars.product_id,
                                        quantity=form.vars.quantity)
                response.flash="product purchased!"
        if len(form.errors): response.flash="invalid valus in form!"
        ### now get a list of all purchases
        records=db(purchased).select(db.users.name,db.purchases.quantity,db.products.name)
        return dict(form=form,records=SQLTABLE(records),vars=form.vars,vars2=request.vars)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}<b>and view: database_examples/buy.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/database_examples/buy.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Here is a rather sophisticated buy form. It checks that the buyer and the product are in the database and updates the corresponding record or inserts a new purchase. It also does a JOIN to list all purchases.
    <br/>Try it here: <a href="/{{=request.application}}/database_examples/buy">buy</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py</b>
    {{=CODE("""
    def delete_purchased():
        db(db.purchases.id>0).delete()
        redirect(URL('buy'))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}Try it here: <a href="/{{=request.application}}/database_examples/delete_purchased">delete_purchased</a> 

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py</b>
    {{=CODE("""
    def reset_purchased():
        db(db.purchases.id>0).update(quantity=0)
        redirect(URL('buy'))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>This is an update on an SQLSet. (db.purchase.id>0 identifies the set containing only table db.purchases.)
    <br/>Try it here: <a href="/{{=request.application}}/database_examples/reset_purchased">reset_purchased</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py</b>
    {{=CODE("""
    def download():
        return response.download(request,db)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>This controller allows users to download the uploaded pictures of the dogs.
    Remember the upload=URL(...'download'...) statement in the register_dog function. Notice that in the URL path /application/controller/function/a/b/etc a, b, etc are passed to the controller as request.args[0], request.args[1], etc. Since the URL is validated request.args[] always contain valid filenames and no '~' or '..' etc. This is useful to allow visitors to link uploaded files.</p>

    <h2 id="cache_examples">Cache Examples</h2>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
    {{=CODE("""
    def cache_in_ram():
        import time
        t=cache.ram('time',lambda:time.ctime(),time_expire=5)
        return dict(time=t,link=A('click to reload',_href=URL(r=request)))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The output of <tt>lambda:time.ctime()</tt> is cached in ram for 5 seconds. The string 'time' is used as cache key. 
    <br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_in_ram">cache_in_ram</a></p>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
    {{=CODE("""
    def cache_on_disk():
        import time
        t=cache.disk('time',lambda:time.ctime(),time_expire=5)
        return dict(time=t,link=A('click to reload',_href=URL(r=request)))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The output of <tt>lambda:time.ctime()</tt> is cached on disk (using the shelve module) for 5 seconds.
    <br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_on_disk">cache_on_disk</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
    {{=CODE("""
    def cache_in_ram_and_disk():
        import time
        t=cache.ram('time',lambda:cache.disk('time',
                           lambda:time.ctime(),time_expire=5),time_expire=5)
        return dict(time=t,link=A('click to reload',_href=URL(r=request)))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The output of <tt>lambda:time.ctime()</tt> is cached on disk (using the shelve module) and then in ram for 5 seconds. web2py looks in ram first and if not there it looks on disk. If it is not on disk it calls the function. This is useful in a multiprocess type of environment. The two times do not have to be the same.
    <br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_in_ram_and_disk">cache_in_ram_and_disk</a></p>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
    {{=CODE("""
    @cache(request.env.path_info,time_expire=5,cache_model=cache.ram)
    def cache_controller_in_ram():
        import time
        t=time.ctime()
        return dict(time=t,link=A('click to reload',_href=URL(r=request)))""".strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Here the entire controller (dictionary) is cached in ram for 5 seconds. The result of a select cannot be cached unless it is first serialized into a table <tt>lambda:SQLTABLE(db().select(db.users.ALL)).xml()</tt>. You can read below for an even better way to do it.
    <br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_controller_in_ram">cache_controller_in_ram</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
    {{=CODE("""
    @cache(request.env.path_info,time_expire=5,cache_model=cache.disk)
    def cache_controller_on_disk():
        import time
        t=time.ctime()
        return dict(time=t,link=A('click to reload',_href=URL(r=request)))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Here the entire controller (dictionary) is cached on disk for 5 seconds. This will not work if the dictionary contains unpickleable objects.
    <br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_controller_on_disk">cache_controller_on_disk</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
    {{=CODE("""
    @cache(request.env.path_info,time_expire=5,cache_model=cache.ram)
    def cache_controller_and_view():
        import time
        t=time.ctime()
        d=dict(time=t,link=A('click to reload',_href=URL(r=request)))
        return response.render(d)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='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!
    <br/>Try it here: <a 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>
    {{=CODE("""
    def cache_db_select():
        import time
        db.users.insert(name='somebody',email='gluon@mdp.cti.depaul.edu')
        records=db().select(db.users.ALL,cache=(cache.ram,5))
        if len(records)>20: db(db.users.id>0).delete()
        return dict(records=records)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The results of a select are complex unpickleable objects that cannot be cached using the previous method, but the select command takes an argument <tt>cache=(cache_model,time_expire)</tt> and will cache the result of the query accordingly. Notice that the key is not necessary since key is generated based on the database name and the select string.
    <br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_db_select">cache_db_select</a></p>

    <h2 id="ajax_examples">Ajax Examples</h2>


    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: ajax_examples.py</b>
    {{=CODE("""
    def index():
        return dict()

    def data():
        if not session.m or len(session.m)==10: session.m=[]
        if request.vars.q: session.m.append(request.vars.q)
        session.m.sort()
        return TABLE(*[TR(v) for v in session.m]).xml()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <b>In view: ajax_examples/index.html</b>
    {{=CODE(open(os.path.join(request.folder,'views/ajax_examples/index.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>The javascript function "ajax" is provided in "web2py_ajax.html" and included by "layout.html". It takes three arguments, a url, a list of ids and a target id. When called, it sends to the url (via a get) the values of the ids and display the response in the value (of innerHTML) of the target id.
    <br/>Try it here: <a href="/{{=request.application}}/ajax_examples/index">index</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: ajax_examples.py </b>
    {{=CODE("""
    def flash():
        response.flash='this text should appear!'
        return dict()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Try it here: <a href="/{{=request.application}}/ajax_examples/flash">flash</a></p>

    <h3>Example {{=c}}{{c+=1}}</h3><b>In controller: ajax_examples.py </b>
    {{=CODE("""
    def fade():
        return dict()
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <b>In view: ajax_examples/fade.html </b><br/>
    {{=CODE(open(os.path.join(request.folder,'views/ajax_examples/fade.html'),'r').read(),language='html',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p>Try it here: <a href="/{{=request.application}}/ajax_examples/fade">fade</a></p>

    <h3>Excel-like spreadsheet via Ajax</h3>
    Web2py includes a widget that acts like an Excel-like spreadsheet and can be used to build forms
    [<a href="{{=URL(r=request,c='spreadsheet',f='index')}}">read more</a>].

    <h2 id="testing_examples">Testing Examples</h2>


    <h3>Example {{=c}}{{c+=1}}</h3>
    <p>Using the Python doctest notation it is possible to write tests for all controller functions. Tests are then run via the administrative interface which generates a report. Here is an example of a test in the code:
    {{=CODE("""
    def index():
        '''
        This is a docstring. The following 3 lines are a doctest:
        >>> request.vars.name='Max'
        >>> index()
        {'name': 'Max'}
        '''
        return dict(name=request.vars.name)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}
    <p></p>

    <h2 id="streaming_examples">Streaming Examples</h2>


    <h3 id="example_stream">Example {{=c}}{{c+=1}}</h3>
    <p>It is very easy in web2py to stream large files. Here is an example of a controller that does so:</p>
    {{=CODE("""
    def streamer():
        import os
        path=os.path.join(request.folder,'private','largefile.mpeg4')
        return response.stream(open(path,'rb'),chunk_size=4096)
    """.strip(),language='web2py',link=URL(r=request,c='global',f='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>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>
    {{=CODE("""
    from gluon.tools import Service
    service = Service(globals())

    @service.xmlrpc
    def add(a,b): return a+b

    @service.xmlrpc
    def sub(a,b): return a-b

    def call(): return service()

    def tester():
        import xmlrpclib
        server=xmlrpclib.ServerProxy('http://hostname:port/app/controller/call/xmlrpc')
        return str(server.add(3,4)+server.sub(3,4))
    """.strip(),language='web2py',link=URL(r=request,c='global',f='vars'),_class='boxCode')}}

</div>
</div>
{{block sidebar}}{{end}}

Added applications/examples/views/default/index.html version [500a555007].

































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<div class="contentleft">
  <div>
    {{=get_content('maincontent')}}
  </div>
  <blockquote>
    {{=get_content('whyweb2py')}}
  </blockquote>
  <blockquote>
    <h3>{{=T('Recent development')}}</h3>
    {{=code_feed_reader(project='web2py',mode='nodiv')}}  
  </blockquote> 
  <blockquote>
    <h3>{{=T('Latest posts from user forum')}}</h3>
    {{=group_feed_reader(group='web2py',mode='nodiv')}}
  </blockquote> 
</div>

{{block sidebar}}
    {{super}}

<div class="contentright">
  <div class="boxSimple" style="width:160px;height:60px;border:none;text-align:center;margin-top:35px;">
    <object width="234" height="60"><param name="movie" value="http://widget.chipin.com/widget/id/3fd524816850020c"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><param name="color_scheme" value="gray"></param><embed src="http://widget.chipin.com/widget/id/3fd524816850020c" flashVars="color_scheme=gray" type="application/x-shockwave-flash" allowScriptAccess="always" wmode="transparent" width="234" height="60"></embed></object>
  </div> 
  <div class="boxSimple" 
       style="cursor:pointer;background-image:url(http://www3.clustrmaps.com/counter/index2.php?url=http://mdp.cti.depaul.edu);margin-top:35px;"
       onclick="window.open('http://www3.clustrmaps.com/counter/maps.php?url=http://mdp.cti.depaul.edu');">            
  </div>
</div>    
{{end}}

Added applications/examples/views/default/license.html version [77628486a9].








1
2
3
4
5
6
7
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<div class="onecolcontent">
  <h2>web2py License Agreement</h2>
  {{=license}}
</div>

Added applications/examples/views/default/support.html version [b6989e8a95].









































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<div class="contentleft">
  <h2>Support for web2py<sup style="font-size:0.5em;">TM</sup></h2>
  
  <p>You can get a lot of free support by joining our <a target="_blank" href="http://groups.google.com/group/web2py">mailing list</a>. We also have a <a target="_blank" href="http://www.web2py.com/AlterEgo">FAQ</a> page.</p>

  <h3>Affiliated Companies</h3>      

  <p>For long term professional support, code review and contract work you can contact our core developers:</p>

  <blockquote>
    <ul>
      <li><a href="http://experts4solutions.com">experts4solutions</a> (worldwide)</li>
    </ul>
  </blockquote>

  <p>For professional support you can also contact one of the companies below:</p>
  
  <blockquote>
    <ul>
      <li><a target="_blank" href="http://www.metacryption.com">MetaCryption, LLC</a> (USA)</li>
      <li><a target="_blank" href="http://www.blouweb.com">Blouweb Consultoria Digital</a> (Brasil)</li>
      <li><a target="_blank" href="http://www.tecnodoc.com.ar">Tecnodoc</a> (Argentina)</li>
      <li><a target="_blank" href="http://quadraforte.com">QuadraForte LLC</a> (USA)</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://emotionull.com">Emotionull</a> (Greece and Cyprus)</li>
      <li><a target="_blank" href="http://zarealye.com/ca/Collect_Advantage">Zarealye, Ltd.</a> (Russia)</li>
      <li><a target="_blank" href="http://www.vsa-services.com/">VSA Services</a> (Singapore)</li>
      <li><a target="_blank" href="http://www.albendas.com">Albendas</a> (Spain)</li>
      <li><a target="_blank" href="https://loadinfo-net.appspot.com">LoadInfo</a> (Bulgaria)</li>
      <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>
    </ul>
    
  </blockquote>
</div>

{{block leftbadges}}{{end}}

Added applications/examples/views/default/usergroups.html version [d8a8ea5563].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<div class="contentleft">
  <div>
    {{=get_content('grouplist')}}
  </div>    
</div>

    

Added applications/examples/views/default/videos.html version [091e89e96a].

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<br /><br />
<div class="contentleft" style="z-index:0;text-align:center;">
  <h2>{{=T('web2py videos')}}</h2>  
  <div id="vimeo" >
    <object style="z-index:0" type="application/x-shockwave-flash" width="500" height="400" data="http://vimeo.com/hubnut/?user_id=user1959410&amp;color=00adef&amp;background=000000&amp;fullscreen=1&amp;slideshow=0&amp;stream=channel&amp;id=139244&amp;server=vimeo.com">
      <param name="quality" value="best" />
      <param name="allowfullscreen" value="true" />
      <param name="allowscriptaccess" value="always" />
      <param name="scale" value="showAll" />
      <param name="movie" value="http://vimeo.com/hubnut/?user_id=user1959410&amp;color=00adef&amp;background=000000&amp;fullscreen=1&amp;slideshow=0&amp;stream=channel&amp;id=139244&amp;server=vimeo.com" />
    </object>   
  </div>
</div> 


Added applications/examples/views/default/what.html version [5c10370384].



























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}} {{import os}}
<div class="contentleft">
    <h2>What is web2py<sup style="font-size:0.5em;">TM</sup></h2>
    <blockquote>
    <p>The best way to understand web2py is to try it.
    You can try it online <a href="http://www.web2py.com/demo_admin">here</a>.<br /> 
    This online version is identical to the actual web2py although some functions are disabled for security reasons.</p>
    </blockquote>
    <p>web2py was inspired by Ruby on Rails and, as Rails, it focuses on rapid development and follows a Model View Controller design. web2py differs from Rails because it is based on Python (thus it is faster and more scalable), because it provides a comprehensive web-based administrative interface (thus there is no need to ever type shell commands unless you wish), includes libraries to handle more protocols (for example XML-RPC and RSS feeds), and can run on the Google App Engine.</p>

    <p>web2py was also inspired by Django and, as Django, it has the ability to generate forms from database tables and it includes an extensive set of validators. web2py differs from Django because it is more compact, easier to learn and does not have any project-level configuration files.</p>

    <p>web2py is less verbose than Java-based frameworks and its syntax is much cleaner than PHP-based frameworks. This makes applications simpler to develop, and easier to read
    and maintain.</p>
    <blockquote>
        <p><a href="http://www.web2py.com/examples/static/web2py_vs_others.pdf">Here</a> is a features comparison of web2py vs other popular web frameworks</a>
    </blockquote>
    <p>web2py comes in source code version (for any Operating System that runs Python) and in binary versions for OSX and Windows. web2py does not need to be installed. You unzip it, click on it, and choose a one-time administrator password. It then opens the browser for you and directs you to the administrative interface. Everything it needs to make this happen (the Python interpreter, the web-server, the relational database, etc.) is already packaged with web2py. If you need more power you customize your applications to use your preferred web-server (for example Apache) and your preferred database engine (for example PostgreSQL or Oracle).</p>

    <p>Via the admin interface you can upload a packed application, create a new application, design an application, maintain an existing application, bytecode-compile an application, pack and download an application. Everything can be done via the web-based admin interface, including editing the files that comprise your applications, clearing temp files, browsing past tickets/errors, run tests, interact with the database. If you so choose, it is also possible to interact with web2py via the Operating System shell or the Python shell.</p>

    <p>Any web2py application is comprised of Models (files that contain a description of the data representation), Views (files that contain a description of the data presentation), Controllers (files that contain a description of the business logic and workflow), Cron Jobs (tasks that need to be executed regularly in background), Modules (collections of reusable classes and functions), and Static Files (images, scripts, stylesheets, etc.).
    </p>

    <p>Controllers consist of functions that are associated to a URL and are called when the associated URL is visited. Models are executed before the function is called, independently on the visited URL (for each app). Views are called when the function returns data other than a string, and renders the data in the proper format (for example html).</p>

    <p>
    <h4>A web2py application can be as simple as a single file (controllers/default.py) containing:</h4></p>
    
    {{=CODE('def index(): return "Hello World"',counter=None,_class='boxCode')}}
    
    <p>When <b>http://localhost:8000/app/default/index</b> is visited the function is called and it displays the message "Hello World".</p>
    
    <p><h4>Here is a more complex complete application that lets the visitor upload images into a database:</h4></p>
    
    {{=CODE("""# in Model
db=DAL('sqlite://storage.db')
db.define_table('image', 
                Field('name'),
                Field('file','upload'))""",counter=None,_class='boxCode')}}
    {{=CODE("""# in Controller
def index():
    form = SQLFORM(db.image)
    if form.accepts(request.vars, session):
        response.flash = 'image uploaded'
    return dict(form = form)""",counter=None,_class='boxCode')}}
    
    {{=CODE(
    """# in View
[[extend 'layout.html']]
<h1>Image upload form</h1>
[[= form]]""".replace('[','{').replace(']','}'),counter=None,_class='boxCode')}}
   
    <p>Uploaded images are safely renamed to avoid directory traversal vulnerabilities, stored on the filesystem (or database) and a corresponding entry is inserted in the database, linking the file. A built-in mechanism prevents involuntary double form submission. All DB IO is transaction safe by default. Any exception in the code causes the transaction to rollback.</p>
    <blockquote>
    <p>Examples of more complex sample applications can be found <a href="{{=URL(r=request,c='default',f='examples')}}">here</a></p>
     </blockquote>
</div>

Added applications/examples/views/default/who.html version [7161e119e7].




















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<div class="contentleft">
  <h2>
    The web2py&trade; Team
  </h2>
  <h3>
    Lead Developer
  </h3>
  <ul>
    <li>
      <a target="_blank" href="http://mycti.cti.depaul.edu/people/facultyinfo_mycti.asp?id=343">Massimo Di Pierro</a>
      (Associate Professor in Computer Science at DePaul University in Chicago)
    </li>
  </ul>
  <h3>
    Contributor Agreement
  </h3>
  <p>
    By contributing to web2py you implicitly agree to the
    <a target="_blank" href="{{=URL(r=request,c='static',f='web2py_contributor_agreement.pdf')}}">web2py contributor agreement</a>.
     Please also send us a signed copy by fax or, scanned, by email.
  <p/>
  <blockquote>
    <h3>
      Main Contributors
    </h3>
    <ul>
      
     <li>Alexey Nezhdanov (GAE and database performance)
</li><li>Alvaro Justen (dynamical translations)
</li><li>Anthony Bastardi (new poweredby site, LoadFactory)
</li><li>Arun K. Rajeevan (plugin_wiki)
</li><li>Attila Csipa (cron job)
</li><li>Bill Ferrett (modular DAL design)
</li><li>Boris Manojlovic (ajax edit) 
</li><li>Branko Vukelic (new admin app)
</li><li>Brian Meredyk (SQLite and executesql)
</li><li>Bruno Rocha (book, new examples app, better forms)
</li><li>Carsten Haese (Informix)
</li><li>Chris Clark (Ingres, Jython support)
</li><li>Chris Steel
</li><li>Christian Foster Howes (GAE support)
</li><li>Christopher Smiga (Informix)
</li><li>CJ Lazell (tester)
</li><li>Craig Younkins (Security)
</li><li>Daniel Lin (Taiwanese internationalization)
</li><li>David Wagner (security and cryptography expert) 
</li><li>Denes Lengyel (validators, DB2 support, DAL, custom forms, legacy table support)
</li><li>Douglas Soares de Andrade (2.4 and 2.6 compliance, docstrings)
</li><li>Eric Vicenti (email with ssl)
</li><li>Falko Krause (mysql support)
</li><li>Fran Boon (authorization and authentication)
</li><li>Francisco Gama (bug fixing)
</li><li>Fred Yanowski (XHTML compliance)
</li><li><a href="https://github.com/contatogilsonsbf">Gilson Filho</a>
</li><li>Graham Dumpleton (WSGI)
</li><li>Gyuris Szabolcs (PGP Mail)
</li><li>Hamdy Abdel-Badeea (crud)
</li><li>Hans Donner (GAE support, Google login, widgets, Sphinx documentation)
</li><li>Hans Murx (Database support)
</li><li>Hans C. v. Stockhausen (OpenID, Google Wave)
</li><li>Ian Reinhart Geiser (html helpers)
</li><li>Jonathan Benn (is_url validator and tests)
</li><li>Jonathan Lundell (multiple contributions)
</li><li>Josh Goldfoot (xaml/html sanitizer)
</li><li>Jose Jachuf (Firebird support)
</li><li>Josh Jaques (web2py_ajax)
</li><li>José Vicente de Sousa (Layout for examples app/ main website)
</li><li>Keith Yang (openid)
</li><li>Kyle Smith (javascript)
</li><li><a href="http://blog.donews.com/limodou/">Limodou</a> (winservice)
</li><li><a href="https://github.com/lucasdavila">Lucas D'Ávila</a>
</li><li><a href="http://www.mlsystems.ch">Marcel Leuthi</a> (Oracle support)
</li><li>Marcel Hellkamp (Bottle developer, multiple web server support)
</li><li>Marcello Della Longa (italian translation)
</li><li>Mariano Reingart (pysoaplib)
</li><li>Mark Larsen (taskbar widget)
</li><li>Mark Moore (databases and daemon scripts)
</li><li>Markus Gritsch (bug fixing)
</li><li>Martin Hufsky (expressions in DAL)
</li><li>Martin Mulone (new welcome app)
</li><li>Mateusz Banach (stickers, IS_EMAIL, IS_IMAGE, contenttype)
</li><li>Michael Willis (shell)
</li><li>Michele Comitini (faceboook)
</li><li>Nathan Freeze (admin design, IS_STRONG, DAL features, <a href="http://web2pyslices.com">web2pyslices.com</a>)
</li><li>Niall Sweeny (MSSQL support)
</li><li>Niccolo Polo (epydoc)
</li><li>Nicolas Bruxer (memcache support)
</li><li>Ondrej Such (MSSQL support)
</li><li>Ovidio Marinho Falcao Neto
</li><li>Pai (internationalization)
</li><li>Patrick Breitenbach
</li><li><a href="mailto:phyo.arkarlwin@star-nix.net">Phyo Arkar Lwin</a> (web hosting and Jython tester)
</li><li>Pierre Thibault (<a href="http://code.google.com/p/neo-web2py2eclipse/">Eclipse integration</a> and custom import)
</li><li><a href="http://robinbhattacharyya.com/">Robin Bhattacharyya</a> (Google App Engine support)
</li><li>Ross Peoples (MSSQL, multiple contributions)
</li><li>Ruijun Luo (a.k.a. Iceberg) (setup_exe.py)
</li><li>Ryan Seto (template.py)
</li><li>Scott Roberts (testing, book)
</li><li>Sergey Podlesnyi (Oracle and migrations tester)
</li><li>Sharriff Aina (tester and PyAMF integration)
</li><li>Sriram Durbha (book)
</li><li>Sterling Hankins (tester, book)
</li><li>Stuart Rackham (MSSQL support)
</li><li>Telman Yusupov (Oracle support)
</li><li>Thadeus Burgess (validators)
</li><li>Tim Michelsen (Sphinx documentation)
</li><li>Timothy Farrell (python 2.6 compliance, windows support)
</li><li>Yair Eshel (internationalizaiton)
</li><li>Yarko Tymciurak (design, Sphinx documentation)
</li><li>Younghyun Jo (internationalization)
</li><li>Vidul Nikolaev Petrov (captcha)
</li><li>Zahariash (memory management)
</li>

      </ul>
    </blockquote>
    <blockquote>
      <h3>
        Third party software included in web2py
      </h3>
      <ul>

<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://www.cdolivet.com/index.php?page=editArea">EditArea</a> developed by Christophe Dolivet</li>
<li><a href="http://nicedit.com">nicEdit</a> developed by <a href="http://bkirchoff.com">Brian Kirchoff</a></li>
<li><a href="http://cheeseshop.python.org/pypi/simplejson">simplejson</a> developed by Bob Ippolito</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://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>

      </ul>
    </blockquote>
</div>






  

Added applications/examples/views/generic.html version [8c1f46b26e].





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{"""

You should not modify this file. 
It is used as default when a view is not provided for your controllers

"""}}

{{=BEAUTIFY(response._vars)}}

<button onclick="document.location='{{=URL("admin","default","design",args=request.application)}}'">admin</button>
<button onclick="jQuery('#request').slideToggle()">request</button>
<div class="hidden" id="request"><h2>request</h2>{{=BEAUTIFY(request)}}</div>
<button onclick="jQuery('#session').slideToggle()">session</button>
<div class="hidden" id="session"><h2>session</h2>{{=BEAUTIFY(session)}}</div>
<button onclick="jQuery('#response').slideToggle()">response</button>
<div class="hidden" id="response"><h2>response</h2>{{=BEAUTIFY(response)}}</div>
<script>jQuery('.hidden').hide();</script>

{{block sidebar}}{{end}}

Added applications/examples/views/generic.json version [25f5fba8a2].
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
###
# response._vars contains the dictionary returned by the controller action
###
try:
	from gluon.serializers import json
	response.write(json(response._vars), escape=False)
	response.headers['Content-Type'] = 'application/json'
except (TypeError, ValueError):
	raise HTTP(405, 'JSON serialization error')
except ImportError:
	raise HTTP(405, 'JSON not available')
except:
	raise HTTP(405, 'JSON error')
}}

Added applications/examples/views/generic.load version [d38b6c52f3].


1
+
{{response.headers['web2py-response-flash']=response.flash}}{{if len(response._vars)==1:}}{{=response._vars.values()[0]}}{{else:}}{{=BEAUTIFY(response._vars)}}{{pass}}

Added applications/examples/views/generic.rss version [f16be9a903].





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
###
# response._vars contains the dictionary returned by the controller action
# for this to work the action must return something like
#
#   dict(title=...,link=...,description=...,created_on='...',items=...)
#
# items is a list of dictionaries each with title, link, description, pub_date.
###
try:
   from gluon.serializers import rss   
   response.write(rss(response._vars), escape=False)
   response.headers['Content-Type'] = 'application/rss+xml'
except (TypeError, ValueError):
	raise HTTP(405, 'RSS serialization error')
except ImportError:
	raise HTTP(405, 'RSS not available')
except:
	raise HTTP(405, 'RSS error')
}}

Added applications/examples/views/generic.xml version [8aecf60dfa].
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
###
# response._vars contains the dictionary returned by thecontroller action
###
try:
   from gluon.serializers import xml
   response.write(xml(response._vars), escape=False)
   response.headers['Content-Type'] = 'text/xml'
except (TypeError, ValueError):
	raise HTTP(405, 'XML serialization error')
except ImportError:
	raise HTTP(405, 'XML not available')
except:
	raise HTTP(405, 'XML error')
}}

Added applications/examples/views/global/vars.html version [8910c2a98c].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{import cgi}}

<div class="contentleft">
    <h1>{{=T('Docs for')}} {{=title}}</h1>

    <div align="right">
    [ <a href="http://docs.python.org/tut/">Python Tutorial</a> ]
    [ <a href="http://docs.python.org/lib/">Python Libraries</a> ]
    [ <a href="/{{=request.application}}/static/epydoc/index.html">web2py epydoc</a> ]
    </div>

    <h2>{{=T('Description')}}</h2>

    <br/>
    {{if t:}}
    {{=t}}{{if d:}} extends {{=d}}{{pass}}
    {{pass}}
    <br/>
    {{pass}}

    {{if doc:}}<br/><br/>{{=CODE(str(doc),language=None,counter=None,_class='boxCode')}}{{pass}}
    <br/><br/>
    <div class="boxInfo">
    <h2>{{=T('Attributes')}}</h2>

    {{keys=attributes.keys(); keys.sort()}}
    <table>
    <tr><td colspan=2><hr/></td></tr>
    {{for a in keys:}}
    {{doc1,t1,c1,d1=attributes[a]}}
    <tr>
    <td><b>{{#=a}}</b>{{=A(a,_href=URL(r=request,args=a.split('.')))}}</td>
    <td>
    {{if t1:}}
    {{=t1}}{{if d1:}} extends {{=d1}}{{pass}}
    {{if c1:}} belongs to class {{=c1}}{{pass}}
    <br/>
    {{pass}}
    {{if doc1:}}{{=XML(cgi.escape(str(doc1)).replace(chr(13),'<br/>'))}}{{pass}}
    </td>
    </tr>
    <tr><td colspan=2><hr/></td></tr>
    {{pass}}
    </table>
    </div>
</div>

Added applications/examples/views/images_examples/index.html version [4ef87f3eab].






1
2
3
4
5
+
+
+
+
+
{{extend 'layout.html'}}
<h1>Upload page</h1>
{{=form}}

{{block sidebar end}}

Added applications/examples/views/layout.html version [530cee6691].











































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="{{=T.accepted_language or 'en'}}">
  <head>
    <title>{{=response.title or request.application}}</title>
    <link rel="shortcut icon"
	  href="{{=URL(request.application,'static','favicon.ico')}}" 
	  type="image/vnd.microsoft.icon" />
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      {{
      #---- (CSS) -----)
      import random
      response.files.append(URL('static','css/menu.css'))
      response.files.append(URL('static','css/home.css'))
      
      #------ include web2py specific js code (jquery, calendar, form stuff) ------
      }}
      {{include 'web2py_ajax.html'}}      
      {{=toggle_menuclass()}}
  <!-- script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20457543-1']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = t\
rue;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '\
.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);
  })();
  </script //-->
  </head>
  <body>
    <div class="flashdiv">
      <blockquote class="flash boxInfo">{{=response.flash or ''}}</blockquote>
    </div>
    <div class="general">
      <!-- HEADER -->
      <div class="headerExt">
	<div class="headerInt">
	  <a href="{{=URL('default','index')}}" class="logo"><em style="display:none;">web2py web framework</em></a>
	  <div class="headermenu">
            <a href="{{=URL('default','index')}}"
	       class="home"><em style="display:none;">{{=T('Home')}}</em></a> 
            <a href="{{=URL('default','what')}}"  
	       class="about what"><em style="display:none;">{{=T('About')}}</em></a> 
            <a href="{{=URL('default','download')}}"  
	       class="download"><em style="display:none;">{{=T('Download')}}</em></a>
            <a href="{{=URL('default','who')}}"
	       class="staff who"><em style="display:none;">{{=T('Staff')}}</em></a> 
            <a href="{{=URL('default','support')}}"
	       class="support"><em style="display:none;">{{=T('Support')}}</em></a> 
            <a href="{{=URL('default','documentation')}}"
	       class="documentation"><em style="display:none;">{{=T('Documentation')}}</em></a> 
	  </div>
	</div>
      </div>
      
      <!-- MAIN CONTENT -->
      <div class="content">	  
	
	{{include}}
	
	{{block sidebar}}
	<div class="contentright">   
          <div class="boxBtDownload">
	    <a href="{{=URL('default','download')}}"  class="btDownload btDownloadPosicao1">
	      <div class="boxBtDownloadICO"></div>
      	      <span id="textBtDownload1">
		  {{=T('Download')}}    
	      </span>
	      <span id="textBtDownload2">
		{{=T('Latest Stable ')}}{{=request.env.web2py_version[:15]}}
	      </span>
	    </a>
	  </div>     
	  
          <!-- div class="boxSearch1">
	       <div class="boxSearch2"></div>
          </div ****uncomment to show search input***-->
	  
          <div onclick="window.open('http://www.web2py.com/book')" class="boxInfoBanner" style="margin-top:35px;"></div> 
          
          <div class="leftlink leftlinkIcoA" style="margin-top:35px;">
            <a href="{{=URL('default','usergroups')}}" class="btleftlink"> {{=T('User groups')}}</a>
          </div>   
	  <div class="leftlink leftlinkIcoF">
            <a href="http://web2py.uservoice.com/" target="_blank" class="btleftlink">{{=T('User Voice')}}</a>
          </div>
          <div class="leftlink leftlinkIcoB">
            <a href="http://twitter.com/web2py" target="_blank" class="btleftlink">Twitter</a>
          </div> 
          <div class="leftlink leftlinkIcoK">
            <a href="http://webchat.freenode.net/?channels=web2py" target="_blank" class="btleftlink">{{=T('Live Chat (IRC)')}}</a>
          </div>
          <div class="leftlink leftlinkIcoC">
            <a href="http://www.web2py.com/AlterEgo" target="_blank" class="btleftlink">{{=T('F.A.Q.')}}</a>
          </div>
          <div class="leftlink leftlinkIcoE">
            <a href="{{=URL('default','examples')}}" class="btleftlink">{{=T('Quick Examples')}}</a>
          </div>
          <div class="leftlink leftlinkIcoD">
            <a href="{{=URL('default','videos')}}" class="btleftlink">{{=T('Videos')}}</a>
          </div>
          
          <div class="leftlink leftlinkIcoG">
            <a href="http://www.web2pyslices.com/main/default/index" target="_blank" class="btleftlink">web2py Slices</a>
          </div>
          <div class="leftlink leftlinkIcoH">
            <a href="http://www.web2py.com/demo_admin" target="_blank" class="btleftlink">{{=T('Interactive demo')}}</a>
          </div>
          <div class="leftlink leftlinkIcoI">
            <a href="http://www.web2py.com/appliances" target="_blank" class="btleftlink">{{=T('Free appliances')}}</a>
          </div>
          <div class="leftlink leftlinkIcoJ">
            <a href="http://www.web2py.com/plugins" target="_blank" class="btleftlink">{{=T('Plugins')}}</a>
          </div>
	 
	</div>
	
	{{end}}
      </div>
      
      <!-- RODAPE -->   
      <div class="footerExt">
	<div class="footerInt">
    	  <!-- div class="Boxfooter1" id="font1">contact</div -->
    	  <!-- div class="Boxfooter2" id="font1">mobile</div -->
    	  <div class="Boxfooter3" id="font1">&copy; 2010 by Massimo Di Pierro</div>
    	  <!-- a href="" class="Boxfooter4"></a> <a href="" class="Boxfooter5"></a -->
    	  <div class="Boxfooter6"></div>    	  
  	</div>
      </div>
    </div>    
  </body>
</html>
  

Added applications/examples/views/layout_examples/basic.html version [503baf211e].




1
2
3
+
+
+
{{extend 'layout.html'}}  
<h2>{{=message}}</h2> 
{{for i in range(1000):}}bla {{pass}}

Added applications/examples/views/layout_examples/civilized.html version [25695445ff].




1
2
3
+
+
+
{{extend 'layout_examples/layout_civilized.html'}}
   <h2>{{=message}}</h2>
<p>{{for i in range(1000):}}bla {{pass}}&nbsp;</p>

Added applications/examples/views/layout_examples/layout_civilized.html version [27fc938344].



































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
	Design by Free CSS Templates
	http://www.freecsstemplates.org
	Released for free under a Creative Commons Attribution 2.5 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{{=request.application}}</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<style>
<!--
/* Basic */

*
{
	margin: 0em;
	padding: 0em;
}

h1,h2
{
}

a
{
	color: #995500;
}

body
{
	font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
	font-size: 11pt;
	background: #fff;
	color: #665555;
}

/* Outer */

#outer
{
	margin: 0em auto 1em auto;
	width: 100%;
	background-color: #fff;
}

/* Header */

#header
{
	padding: 1.5em 2em 1.5em 4em;
	background: #2E2017 url('images/a1.jpg') top left repeat-x;
}

#header h1
{
	font-size: 2.0em;
}

#header h1, #header h2
{
	display: block;
	width: 778px;
	margin: 0em auto;
}

#header h1 a
{
	color: #fff;
	text-decoration: none;
}

#header h2
{
	color: #bbaa77;
	font-size: 0.8em;
}

/* Menu */

#menu
{
	padding: 1em 2em 1em 0em;
	background: #F1DFC9 url("{{=URL('static', 'civilized/a2.gif')}}") top left repeat-x;
	font-size: 0.9em;
}

#menu ul
{
	display: block;
	width: 778px;
	margin: 0em auto;
	list-style: none;
	padding-left: 2.5em;
}

#menu li
{
	display: inline;
}

#menu li a
{
	color: #38271C;
	font-weight: bold;
	text-decoration: none;
	padding: 0.25em 0.75em 0.25em 0.75em;
}

#menu li a:hover
{
	background: #342117 url("{{=URL('static', 'civilized/a4.gif')}}") top left repeat-x;
	color: #fff;
}

/* Content */

#content
{
	width: 778px;
	margin: 0em auto;
}

#content p
{
	margin-bottom: 1.5em;
	text-align: justify;
}

#content h2,h3,h4,h5,h6
{
	color: #443333;
	margin-bottom: 1em;
}

#content ul
{
	margin-bottom: 1.5em;
	padding-left: 1em;
}

#content blockquote
{
	padding-left: 1em;
	margin-bottom: 1.5em;
	border-left: solid 7px #EFEECC;
}

#content blockquote p
{
	margin-bottom: 0em;
}

#content table
{
	margin-bottom: 1.5em;
}

#content table th
{
	text-align: left;
	font-weight: bold;
	padding: 0.5em;
	color: #443333;
}

#content table td
{
	padding: 0.5em;
}

#content table tr.rowA
{
	background-color: #F6EECC;
	color: inherit;
}

#content table tr.rowB
{
	background-color: #FFFEEF;
	color: inherit;
}

/* Primary Content */

#primaryContentContainer
{
	float: left;
	margin-left: -17em;
	width: 100%;
}

#primaryContent
{
	margin: 0em 0em 0em 16.5em;
	padding: 1.5em;
}

#primaryContent h2, #primaryContent h3
{
	border-bottom: solid 1px #efeecc;
	padding-bottom: 0.25em;
	margin-bottom: 1.25em;
}

#primaryContent h2
{
	font-size: 1.7em;
}

#primaryContent h3
{
	font-size: 1.1em;
}

/* Secondary Content */

#secondaryContent
{
	float: right;
	width: 14em;
	padding: 1.5em 2em 1.5em 2em;
	font-size: 0.9em;
}

#secondaryContent h3
{
	background: #2E2017 url("{{=URL('static', 'civilized/a4.gif')}}") top left repeat-x;
	color: #fff;
	padding: 0.5em;
	padding: 0.5em 0.5em 0.5em 1.0em;
	position: relative;
	left: -0.8em;
	margin-right: -1.6em;
	font-size: 1.0em;
}

/* Footer */

#footer
{
	padding: 1.5em 2em 1.5em 2em;
	text-align: center;
	width: 778px;
	margin: 0em auto;
	border-top: solid 1px #efeecc;
	font-size: 0.9em;
}

.clear
{
	clear: both;
}
-->
</style>
</head>
<body>
<div id="outer">
	<div id="header">
		<h1><a href="#">{{=request.application}}</a></h1>
		<h2>{{=request.controller}}/{{=request.function}}</h2>
	</div>
    {{if response.menu:}}
	<div id="menu">
		<ul>
        {{for name,active,link in response.menu:}}
           <li><a href={{=link}}>{{=name}}</a></li>
        {{pass}}
		</ul>
	</div>
    {{pass}}
	<div id="content">
		<div id="primaryContentContainer">
			<div id="primaryContent">
            {{if response.flash:}}<h2>FLASH: {{=response.flash}}</h2>{{pass}}
			{{include}}
			</div>
		</div>
		<div id="secondaryContent">
		</div>
		<div class="clear"></div>
	</div>
	<div id="footer">
		<p>Copyright © 2006 Sitename.com. Designed by <a href="http://www.freecsstemplates.org">Free CSS Templates</a></p>
	</div>
</div>
</body>
</html>

Added applications/examples/views/layout_examples/layout_sleek.html version [42c67a5f4b].





























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--

Smooth and Sleek by christopher robinson
http://www.edg3.co.uk/
hope you enjoy it and find it usefull :)

-->
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/11">
<title>{{=request.application}}</title>
<style>
<!--
/*
	Author	:	Christopher Robinson
	Email		:	christopher@edg3.co.uk
	Website	:	http://www.edg3.co.uk/
*/
* {
	border:0;
	margin:0;
	padding:0;
}

/* body */
body {
	background:#fff;
	color:#666;
	font:0.75em/100% 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
	line-height:1.4em;
}

/* general */
a {
	color:#9C0;
	text-decoration:none;
}
a:hover {
	color:#555;
	text-decoration:none;
}

/* header */
#header {
	background:#323232 url('/{{=request.application}}/static/sleek/background_header.jpg') center repeat-y;
	width:100%;
}
#header:after {
	clear:both;
	content:'.';
	display:block;
	height:0;
	visibility:hidden;
}
#header_inside {
	border-left:1px solid #bbb;
	border-right:1px solid #bbb;
	margin:0 auto;
	width:800px;
}
#header_inside h1 {
	color:#fff;
	float:left;
	font:3.2em 'Trebuchet MS', Verdana, sans-serif;
	height:100px;
	line-height:100px;
	margin:0 0 0 20px;
	width:180px;
}
#header_inside h1 span {
	color:#9c0;
}
#header_inside ul {
	float:right;
	height:100px;
	list-style:none;
	width:600px;
}
#header_inside ul li {
	border-right:1px solid #555;
	float:right;
	height:100px;
	list-style:none;
	width:75px;
}
#header_inside ul li a {
	color:#fff;
	display:block;
	height:50px;
	line-height:50px;
	padding:50px 0 0;
	text-align:center;
	width:75px;
}
#header_inside ul li a:hover {
	background:#fff;
	color:#111;
}
#header_inside ul li a.active {
	background:#fff;
	color:#111;
}

/* content */
#content {
	background:#fff url('/{{=request.application}}/static/sleek/background_content.jpg') center repeat-y;
	clear:both;
	width:100%;
}
#content_inside {
	border-left:1px solid #bbb;
	border-right:1px solid #bbb;
	margin:0 auto;
	width:800px;
}
#content_inside_sidebar {
	border-left:1px solid #bbb;
	clear:both;
	float:right;
	height:auto;
	line-height:175%;
	margin:5px 0;
	padding:0 10px;
	width:200px;
}
#content_inside_sidebar h2 {
	background:#fff;
	color:#000;
	font-size:110%;
	font-weight:400;
	padding:5px 0;
	text-align:right;
}
#content_inside_sidebar ul {
	letter-spacing:-1px;
	list-style:none;
	margin:0 0 10px;
}
#content_inside_sidebar ul li {
	list-style:none;
}
#content_inside_sidebar ul li a {
	border-bottom:1px solid #e9e9e9;
	display:block;
	padding:3px;
	text-align:right;
	width:194px;
}
#content_inside_sidebar ul li a:hover {
	background:#ddd;
	color:#000;
}
#content_inside_main {
	background:#fff;
	float:left;
	letter-spacing:-1px;
	line-height:175%;
	margin:0 auto;
	padding:10px;
	width:559px;
}
#content_inside_main h1 {
	border-bottom:1px solid #ccc;
	font-size:125%;
	padding:0 0 2px;
}
#content_inside_main h2 {
	color:#ccc;
	font-size:115%;
	text-align:right;
}
#content_inside_main h2.flash {
	color:red;
	font-size:115%;
	text-align:right;
}
#content_inside_main p {
	padding:0 0 10px;
}

/* footer */
#footer {
	background:#323232 url('/{{=request.application}}/static/sleek/background_footer.jpg') center repeat-y;
	clear:both;
	height:100px;
	width:100%;
}
#footer_inside {
	border-left:1px solid #bbb;
	border-right:1px solid #bbb;
	height:100px;
	margin:0 auto;
	width:800px;
}
#footer_inside p {
	color:#fff;
	line-height:100px;
	text-align:center;
}
-->
</style>

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en-gb" />
<meta http-equiv="imagetoolbar" content="false" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="author" content="Christopher Robinson" />
<meta name="copyright" content="Copyright (c) Christopher Robinson 2005 - 2007" />
<meta name="description" content=""/>
<meta name="keywords" content="" />
<meta name="last-modified" content="Thursday, 01 February 2007 12:00:00 GMT" />
<meta name="mssmarttagspreventparsing" content="true" />
<meta name="robots" content="index, follow, noarchive" />
<meta name="revisit-after" content="7 days" />
</head>

<body>

<div id="header">
<div id="header_inside">
<h1><span>{{=request.application}}</span> {{=request.controller}} {{request.function}}</h1>
<ul>
{{if response.menu:}}
{{for item,active,link in response.menu:}}
{{if not active:}}<li>{{=A(item,_href=link)}}</li>{{else:}}
<li>{{=A(item,_href=link,_class='active')}}</li>{{pass}}
{{pass}}
{{pass}}
</ul>
</div>
</div>

<div id="content">
<div id="content_inside">
<div id="content_inside_sidebar">
</div>

<div id="content_inside_main">
{{if response.flash:}}<h2 class="flash">FLASH: {{=response.flash}}</h2>{{pass}}
{{include}}
</div>
<div id="footer">
<div id="footer_inside">
</div>
</div>
</div>
</body>

</html>

Added applications/examples/views/layout_examples/slick.html version [0e1addb63a].




1
2
3
+
+
+
{{extend 'layout_examples/layout_sleek.html'}}  
<h2>{{=message}}</h2> 
{{for i in range(1000):}}bla {{pass}}

Added applications/examples/views/session_examples/counter.html version [209e13c459].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<h1>session counter</h1>

<h2>{{for i in range(counter):}}{{=i}}... {{pass}}</h2>

<a href="{{=URL(r=request)}}">{{=T('click me to count')}}</a>

{{block sidebar}} {{end}}

Added applications/examples/views/simple_examples/hello3.html version [f5821e98a8].



1
2
+
+
{{extend 'layout.html'}}
<h1>{{=message}}</h1>

Added applications/examples/views/spreadsheet/index.html version [8d31ea574b].








1
2
3
4
5
6
7
+
+
+
+
+
+
+
{{extend 'layout.html'}}

<h1>Excel-like spreadsheet widget</h1>

Try insert "=r0c1+1" in cell r0c0 and "2" in r0c1. Formulas start with "=" as in Excel. You can use a subset of python commands and math function, and reference cells by r[row]c[col]. All computations are performed serverside via Ajax (input is validated for security). Cell values and formulas can be set and locked serverside. The shape of the spreadsheet can be modifed serverside and does not need to be tabular (think of it as a graph of css-friendly widgets you can place where you want). Cells can be given arbistrary names. This example is distributed with web2py so look at the source code of the example to learn more.

{{=sheet}}

Added applications/examples/views/template_examples/beautify.html version [7fe049ca86].






1
2
3
4
5
+
+
+
+
+
{{extend 'layout.html'}}
<h1>BEAUTIFY</h1>

<h2>Message is</h2>
{{=message}}

Added applications/examples/views/template_examples/escape.html version [2424b92746].






1
2
3
4
5
+
+
+
+
+
{{extend 'layout.html'}}
<h1>Strings are automatically escaped</h1>

<h2>Message is</h2>
{{=message}}

Added applications/examples/views/template_examples/test_def.html version [279b8cba35].








1
2
3
4
5
6
7
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{def itemlink(name):}}<li>{{=A(name,_href=name)}}</li>{{return}}
<ul>
{{itemlink('http://www.google.com')}}
{{itemlink('http://www.yahoo.com')}}
{{itemlink('http://www.nyt.com')}}
</ul>

Added applications/examples/views/template_examples/test_for.html version [c3bacad07e].







1
2
3
4
5
6
+
+
+
+
+
+
{{extend 'layout.html'}}
<h1>For loop</h1>

{{for number in ['one','two','three']:}}
  <h2>{{=number.capitalize()}}</h2>
{{pass}}

Added applications/examples/views/template_examples/test_if.html version [b03b1579a9].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<h1>If statement</h1>

{{
a=10
}}

{{if a%2==0:}}
<h2>{{=a}} is even</h2>
{{else:}}
<h2>{{=a}} is odd</h2>
{{pass}}

Added applications/examples/views/template_examples/test_try.html version [a5abc71db7].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<h1>Try... except</h1>

{{try:}}
   <h2>a={{=1/0}}</h2>
{{except:}}
   infinity</h2>
{{pass}}

Added applications/examples/views/template_examples/variables.html version [f24dbec526].





1
2
3
4
+
+
+
+
{{extend 'layout.html'}}
<h1>Your variables</h1>
<h2>a={{=a}}</h2>
<h2>a={{=b}}</h2>

Added applications/examples/views/template_examples/xml.html version [e0927413bf].






1
2
3
4
5
+
+
+
+
+
{{extend 'layout.html'}}
<h1>XML</h1>

<h2>Message is</h2>
{{=message}}

Added applications/examples/views/web2py_ajax.html version [679a48264c].




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
response.files.insert(0,URL('static','js/jquery.js'))
response.files.insert(1,URL('static','css/calendar.css'))
response.files.insert(2,URL('static','js/calendar.js'))
for _item in response.meta or []:}}
     <meta name="{{=_item}}" content="{{=response.meta[_item]}}" />{{
pass
for _k,_file in enumerate(response.files or []):
  if _file in response.files[:_k]:
     continue
  _file0=_file.lower().split('?')[0]
  if _file0.endswith('.css'):}}
     <link href="{{=_file}}" rel="stylesheet" type="text/css" />{{
  elif _file0.endswith('.js'):}}
     <script src="{{=_file}}" type="text/javascript"></script>{{
  pass
pass
}}

    <script type="text/javascript"><!--
	// These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
    var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
    var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
    var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
    //--></script>

    <script src="{{=URL('static','js/web2py_ajax.js')}}" type="text/javascript"></script>

Added applications/mobileblur/ABOUT version [f4515d4b07].



1
2
+
+
Write something about this app.
Developed with web2py.

Added applications/mobileblur/LICENSE version [23c98cb4b6].





1
2
3
4
+
+
+
+
The web2py welcome app is licensed under public domain 
(except for the css and js files that it includes, which have their own third party licenses).

You can modify this license when you add your own code.

Added applications/mobileblur/__init__.py version [da39a3ee5e].

Added applications/mobileblur/controllers/appadmin.py version [1eb6fe022d].

























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################

import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils

# ## critical --- make a copy of the environment

global_env = copy.copy(globals())
global_env['datetime'] = datetime

http_host = request.env.http_host.split(':')[0]
remote_addr = request.env.remote_addr
try:
    hosts = (http_host, socket.gethostname(),
             socket.gethostbyname(http_host),
             '::1','127.0.0.1','::ffff:127.0.0.1')
except:
    hosts = (http_host, )

if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
     in ['https', 'HTTPS']:
    session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
    raise HTTP(200, T('appadmin is disabled because insecure channel'))

if (request.application=='admin' and not session.authorized) or \
        (request.application!='admin' and not gluon.fileutils.check_credentials(request)):
    redirect(URL('admin', 'default', 'index'))

ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
                 args=[request.application])], [T('db'), False,
                 URL('index')], [T('state'), False,
                 URL('state')], [T('cache'), False,
                 URL('ccache')]]

# ##########################################################
# ## auxiliary functions
# ###########################################################


def get_databases(request):
    dbs = {}
    for (key, value) in global_env.items():
        cond = False
        try:
            cond = isinstance(value, GQLDB)
        except:
            cond = isinstance(value, SQLDB)
        if cond:
            dbs[key] = value
    return dbs


databases = get_databases(None)


def eval_in_global_env(text):
    exec ('_ret=%s' % text, {}, global_env)
    return global_env['_ret']


def get_database(request):
    if request.args and request.args[0] in databases:
        return eval_in_global_env(request.args[0])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_table(request):
    db = get_database(request)
    if len(request.args) > 1 and request.args[1] in db.tables:
        return (db, request.args[1])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_query(request):
    try:
        return eval_in_global_env(request.vars.query)
    except Exception:
        return None


def query_by_table_type(tablename,db,request=request):
    keyed = hasattr(db[tablename],'_primarykey')
    if keyed:
        firstkey = db[tablename][db[tablename]._primarykey[0]]
        cond = '>0'
        if firstkey.type in ['string', 'text']:
            cond = '!=""'
        qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
    else:
        qry = '%s.%s.id>0' % tuple(request.args[:2])
    return qry



# ##########################################################
# ## list all databases and tables
# ###########################################################


def index():
    return dict(databases=databases)


# ##########################################################
# ## insert a new record
# ###########################################################


def insert():
    (db, table) = get_table(request)
    form = SQLFORM(db[table], ignore_rw=ignore_rw)
    if form.accepts(request.vars, session):
        response.flash = T('new record inserted')
    return dict(form=form,table=db[table])


# ##########################################################
# ## list all records in table and insert new record
# ###########################################################


def download():
    import os
    db = get_database(request)
    return response.download(request,db)

def csv():
    import gluon.contenttype
    response.headers['Content-Type'] = \
        gluon.contenttype.contenttype('.csv')
    db = get_database(request)
    query = get_query(request)
    if not query:
        return None
    response.headers['Content-disposition'] = 'attachment; filename=%s_%s.csv'\
         % tuple(request.vars.query.split('.')[:2])
    return str(db(query).select())


def import_csv(table, file):
    table.import_from_csv_file(file)

def select():
    import re
    db = get_database(request)
    dbname = request.args[0]
    regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
    if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
        regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
    if request.vars.query:
        match = regex.match(request.vars.query)
        if match:
            request.vars.query = '%s.%s.%s==%s' % (request.args[0],
                    match.group('table'), match.group('field'),
                    match.group('value'))
    else:
        request.vars.query = session.last_query
    query = get_query(request)
    if request.vars.start:
        start = int(request.vars.start)
    else:
        start = 0
    nrows = 0
    stop = start + 100
    table = None
    rows = []
    orderby = request.vars.orderby
    if orderby:
        orderby = dbname + '.' + orderby
        if orderby == session.last_orderby:
            if orderby[0] == '~':
                orderby = orderby[1:]
            else:
                orderby = '~' + orderby
    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 '',
                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',
                _class='delete', _type='checkbox', value=False), ''),
                TR('', '', INPUT(_type='submit', _value='submit'))),
                _action=URL(r=request,args=request.args))
    if request.vars.csvfile != None:
        try:
            import_csv(db[request.vars.table],
                       request.vars.csvfile.file)
            response.flash = T('data uploaded')
        except Exception, e:
            response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
    if form.accepts(request.vars, formname=None):
#         regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
        regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')

        match = regex.match(form.vars.query.strip())
        if match:
            table = match.group('table')
        try:
            nrows = db(query).count()
            if form.vars.update_check and form.vars.update_fields:
                db(query).update(**eval_in_global_env('dict(%s)'
                                  % form.vars.update_fields))
                response.flash = T('%s rows updated', nrows)
            elif form.vars.delete_check:
                db(query).delete()
                response.flash = T('%s rows deleted', nrows)
            nrows = db(query).count()
            if orderby:
                rows = db(query).select(limitby=(start, stop),
                        orderby=eval_in_global_env(orderby))
            else:
                rows = db(query).select(limitby=(start, stop))
        except Exception, e:
            (rows, nrows) = ([], 0)
            response.flash = DIV(T('Invalid Query'),PRE(str(e)))
    return dict(
        form=form,
        table=table,
        start=start,
        stop=stop,
        nrows=nrows,
        rows=rows,
        query=request.vars.query,
        )


# ##########################################################
# ## edit delete one record
# ###########################################################


def update():
    (db, table) = get_table(request)
    keyed = hasattr(db[table],'_primarykey')
    record = None
    if keyed:
        key = [f for f in request.vars if f in db[table]._primarykey]
        if key:
            record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
    else:
        record = db(db[table].id == request.args(2)).select().first()

    if not record:
        qry = query_by_table_type(table, db)
        session.flash = T('record does not exist')
        redirect(URL('select', args=request.args[:1],
                     vars=dict(query=qry)))

    if keyed:
        for k in db[table]._primarykey:
            db[table][k].writable=False

    form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
                   ignore_rw=ignore_rw and not keyed,
                   linkto=URL('select',
                   args=request.args[:1]), upload=URL(r=request,
                   f='download', args=request.args[:1]))

    if form.accepts(request.vars, session):
        session.flash = T('done!')
        qry = query_by_table_type(table, db)
        redirect(URL('select', args=request.args[:1],
                 vars=dict(query=qry)))
    return dict(form=form,table=db[table])


# ##########################################################
# ## get global variables
# ###########################################################


def state():
    return dict()

def ccache():
    form = FORM(
        P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
        P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
        P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
    )

    if form.accepts(request.vars, session):
        clear_ram = False
        clear_disk = False
        session.flash = ""
        if request.vars.yes:
            clear_ram = clear_disk = True
        if request.vars.ram:
            clear_ram = True
        if request.vars.disk:
            clear_disk = True

        if clear_ram:
            cache.ram.clear()
            session.flash += "Ram Cleared "
        if clear_disk:
            cache.disk.clear()
            session.flash += "Disk Cleared"

        redirect(URL(r=request))

    try:
        from guppy import hpy; hp=hpy()
    except ImportError:
        hp = False

    import shelve, os, copy, time, math
    from gluon import portalocker

    ram = {
        'bytes': 0,
        'objects': 0,
        'hits': 0,
        'misses': 0,
        'ratio': 0,
        'oldest': time.time()
    }
    disk = copy.copy(ram)
    total = copy.copy(ram)

    for key, value in cache.ram.storage.items():
        if isinstance(value, dict):
            ram['hits'] = value['hit_total'] - value['misses']
            ram['misses'] = value['misses']
            try:
                ram['ratio'] = ram['hits'] * 100 / value['hit_total']
            except (KeyError, ZeroDivisionError):
                ram['ratio'] = 0
        else:
            if hp:
                ram['bytes'] += hp.iso(value[1]).size
                ram['objects'] += hp.iso(value[1]).count

                if value[0] < ram['oldest']:
                    ram['oldest'] = value[0]

    locker = open(os.path.join(request.folder,
                                        'cache/cache.lock'), 'a')
    portalocker.lock(locker, portalocker.LOCK_EX)
    disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
    try:
        for key, value in disk_storage.items():
            if isinstance(value, dict):
                disk['hits'] = value['hit_total'] - value['misses']
                disk['misses'] = value['misses']
                try:
                    disk['ratio'] = disk['hits'] * 100 / value['hit_total']
                except (KeyError, ZeroDivisionError):
                    disk['ratio'] = 0
            else:
                if hp:
                    disk['bytes'] += hp.iso(value[1]).size
                    disk['objects'] += hp.iso(value[1]).count
                    if value[0] < disk['oldest']:
                        disk['oldest'] = value[0]
    finally:
        portalocker.unlock(locker)
        locker.close()
        disk_storage.close()

    total['bytes'] = ram['bytes'] + disk['bytes']
    total['objects'] = ram['objects'] + disk['objects']
    total['hits'] = ram['hits'] + disk['hits']
    total['misses'] = ram['misses'] + disk['misses']
    try:
        total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
    except (KeyError, ZeroDivisionError):
        total['ratio'] = 0

    if disk['oldest'] < ram['oldest']:
        total['oldest'] = disk['oldest']
    else:
        total['oldest'] = ram['oldest']

    def GetInHMS(seconds):
        hours = math.floor(seconds / 3600)
        seconds -= hours * 3600
        minutes = math.floor(seconds / 60)
        seconds -= minutes * 60
        seconds = math.floor(seconds)

        return (hours, minutes, seconds)

    ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
    disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
    total['oldest'] = GetInHMS(time.time() - total['oldest'])

    return dict(form=form, total=total,
                ram=ram, disk=disk)

Added applications/mobileblur/controllers/default.py version [2721664ca4].




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

from pprint import pprint

newsblur = local_import("newsblur")

username = ""
password = ""
threshold = 0
thresholds = ["nt", "ps", "ng"]  # indices -1, 0, 1 for negative, neutral, ane positive inhelligence filters

def index():
    newsblur.login(username, password)
    raw_feeds = newsblur.feeds(flat=True)["feeds"]
    feeds = {}
    for feed in raw_feeds.itervalues():
        for i in range(threshold, 2):
            if feed[thresholds[i]] > 0:
                feeds[feed["feed_title"]] = feed
                break

    pprint(feeds)
    return dict(feeds=feeds, threshold=threshold)
    
def login():
    pass

Added applications/mobileblur/controllers/default.py~ version [554e7bd08a].































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

from pprint import pprint
import simplejson
import urllib

base = "http://newsblur.com/"
username = "spiffytech"
password = "JYRKJM9UuQg9"
threshold = 0

def index():
    login()
    data = urllib.urlencode({"flat": "true"})
    u = urllib.urlopen(base + "reader/feeds?" % data)
    print u.read()
    raw_feeds = simplejson.loads(u.read())
    pprint(raw_feeds)
    feeds = {}
    for feed in raw_feeds:
        if not (feed["ng"] == 0 and feed["nt"] == 0 and feed["ps"] == 0):
            feeds[feed["feed_title"]] = feed

    return feeds
    
def login():
    data = urllib.urlencode({"login_username": username, "login_password": password})
    u = urllib.urlopen(base + "api/login", data)
    print u.read()

Added applications/mobileblur/controllers/feeds.py version [ae6b12dd5f].
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

from pprint import pprint

newsblur = local_import("newsblur")

username = ""
password = ""
threshold = 0
thresholds = ["nt", "ps", "ng"]  # indices -1, 0, 1 for negative, neutral, ane positive inhelligence filters

def view():
    newsblur.login(username, password)
    return 

Added applications/mobileblur/cron/crontab version [2523d8a048].


1
+
#crontab

Added applications/mobileblur/languages/es-es.py version [02c08ffea8].




































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s filas eliminadas',
'%s rows updated': '%s filas actualizadas',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENCION: Inicio de sesión requiere una conexión segura (HTTPS) o localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENCION: NO EJECUTE VARIAS PRUEBAS SIMULTANEAMENTE, NO SON THREAD SAFE.',
'ATTENTION: you cannot edit the running application!': 'ATENCION: no puede modificar la aplicación que se ejecuta!',
'About': 'Acerca de',
'About application': 'Acerca de la aplicación',
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
'Administrator Password:': 'Contraseña del Administrador:',
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
'Authentication': 'Autenticación',
'Available databases and tables': 'Bases de datos y tablas disponibles',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'Change Password': 'Cambie Contraseña',
'Check to delete': 'Marque para eliminar',
'Client IP': 'IP del Cliente',
'Controller': 'Controlador',
'Controllers': 'Controladores',
'Copyright': 'Derechos de autor',
'Create new application': 'Cree una nueva aplicación',
'Current request': 'Solicitud en curso',
'Current response': 'Respuesta en curso',
'Current session': 'Sesión en curso',
'DB Model': 'Modelo "db"',
'DESIGN': 'DISEÑO',
'Database': 'Base de datos',
'Date and Time': 'Fecha y Hora',
'Delete': 'Elimine',
'Delete:': 'Elimine:',
'Deploy on Google App Engine': 'Instale en Google App Engine',
'Description': 'Descripción',
'Design for': 'Diseño para',
'E-mail': 'Correo electrónico',
'EDIT': 'EDITAR',
'Edit': 'Editar',
'Edit Profile': 'Editar Perfil',
'Edit This App': 'Edite esta App',
'Edit application': 'Editar aplicación',
'Edit current record': 'Edite el registro actual',
'Editing file': 'Editando archivo',
'Editing file "%s"': 'Editando archivo "%s"',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
'First name': 'Nombre',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Group ID': 'ID de Grupo',
'Hello World': 'Hola Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Indice',
'Installed applications': 'Aplicaciones instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Acción inválida',
'Invalid email': 'Correo inválido',
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
'Languages': 'Lenguajes',
'Last name': 'Apellido',
'Last saved on:': 'Guardado en:',
'Layout': 'Diseño de página',
'License for': 'Licencia para',
'Login': 'Inicio de sesión',
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
'Logout': 'Fin de sesión',
'Lost Password': 'Contraseña perdida',
'Main Menu': 'Menú principal',
'Menu Model': 'Modelo "menu"',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NO',
'Name': 'Nombre',
'New Record': 'Registro nuevo',
'No databases in this application': 'No hay bases de datos en esta aplicación',
'Origin': 'Origen',
'Original/Translation': 'Original/Traducción',
'Password': 'Contraseña',
'Peeking at file': 'Visualizando archivo',
'Powered by': 'Este sitio usa',
'Query:': 'Consulta:',
'Record ID': 'ID de Registro',
'Register': 'Registrese',
'Registration key': 'Contraseña de Registro',
'Reset Password key': 'Reset Password key',
'Resolve Conflict file': 'archivo Resolución de Conflicto',
'Role': 'Rol',
'Rows in table': 'Filas en la tabla',
'Rows selected': 'Filas seleccionadas',
'Saved file hash:': 'Hash del archivo guardado:',
'Static files': 'Archivos estáticos',
'Stylesheet': 'Hoja de estilo',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
'Table name': 'Nombre de la tabla',
'Testing application': 'Probando aplicación',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
'The output of the file is a dictionary that was rendered by the view': 'La salida del archivo es un diccionario escenificado por la vista',
'There are no controllers': 'No hay controladores',
'There are no models': 'No hay modelos',
'There are no modules': 'No hay módulos',
'There are no static files': 'No hay archivos estáticos',
'There are no translators, only default language is supported': 'No hay traductores, sólo el lenguaje por defecto es soportado',
'There are no views': 'No hay vistas',
'This is a copy of the scaffolding application': 'Esta es una copia de la aplicación de andamiaje',
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
'Ticket': 'Tiquete',
'Timestamp': 'Timestamp',
'Unable to check for upgrades': 'No es posible verificar la existencia de actualizaciones',
'Unable to download': 'No es posible la descarga',
'Unable to download app': 'No es posible descarga la aplicación',
'Update:': 'Actualice:',
'Upload existing application': 'Suba esta aplicación',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
'User ID': 'ID de Usuario',
'View': 'Vista',
'Views': 'Vistas',
'Welcome': 'Welcome',
'Welcome %s': 'Bienvenido %s',
'Welcome to web2py': 'Bienvenido a web2py',
'Which called the function': 'La cual llamó la función',
'YES': 'SI',
'You are successfully running web2py': 'Usted está ejecutando web2py exitosamente',
'You can modify this application and adapt it to your needs': 'Usted puede modificar esta aplicación y adaptarla a sus necesidades',
'You visited the url': 'Usted visitó la url',
'about': 'acerca de',
'additional code for your application': 'código adicional para su aplicación',
'admin disabled because no admin password': ' por falta de contraseña',
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
'and rename it (required):': 'y renombrela (requerido):',
'and rename it:': ' y renombrelo:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application compiled': 'aplicación compilada',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'cannot create file': 'no es posible crear archivo',
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
'change password': 'cambie contraseña',
'check all': 'marcar todos',
'clean': 'limpiar',
'Online examples': 'Ejemplos en línea',
'Administrative interface': 'Interfaz administrativa',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'compile': 'compilar',
'compiled application removed': 'aplicación compilada removida',
'controllers': 'controladores',
'create file with filename:': 'cree archivo con nombre:',
'create new application:': 'nombre de la nueva aplicación:',
'crontab': 'crontab',
'currently saved or': 'actualmente guardado o',
'customize me!': 'Adaptame!',
'data uploaded': 'datos subidos',
'database': 'base de datos',
'database %s select': 'selección en base de datos %s',
'database administration': 'administración base de datos',
'db': 'db',
'defines tables': 'define tablas',
'delete': 'eliminar',
'delete all checked': 'eliminar marcados',
'design': 'modificar',
'Documentation': 'Documentación',
'done!': 'listo!',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit profile': 'editar perfil',
'errors': 'errores',
'export as csv file': 'exportar como archivo CSV',
'exposes': 'expone',
'extends': 'extiende',
'failed to reload module': 'recarga del módulo ha fallado',
'file "%(filename)s" created': 'archivo "%(filename)s" creado',
'file "%(filename)s" deleted': 'archivo "%(filename)s" eliminado',
'file "%(filename)s" uploaded': 'archivo "%(filename)s" subido',
'file "%(filename)s" was not deleted': 'archivo "%(filename)s" no fué eliminado',
'file "%s" of %s restored': 'archivo "%s" de %s restaurado',
'file changed on disk': 'archivo modificado en el disco',
'file does not exist': 'archivo no existe',
'file saved on %(time)s': 'archivo guardado %(time)s',
'file saved on %s': 'archivo guardado %s',
'help': 'ayuda',
'htmledit': 'htmledit',
'includes': 'incluye',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'internal error': 'error interno',
'invalid password': 'contraseña inválida',
'invalid request': 'solicitud inválida',
'invalid ticket': 'tiquete inválido',
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
'languages': 'lenguajes',
'languages updated': 'lenguajes actualizados',
'loading...': 'cargando...',
'located in the file': 'localizada en el archivo',
'login': 'inicio de sesión',
'logout': 'fin de sesión',
'lost password?': '¿olvido la contraseña?',
'merge': 'combinar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nueva aplicación "%s" creada',
'new record inserted': 'nuevo registro insertado',
'next 100 rows': '100 filas siguientes',
'or import from csv file': 'o importar desde archivo CSV',
'or provide application url:': 'o provea URL de la aplicación:',
'pack all': 'empaquetar todo',
'pack compiled': 'empaquete compiladas',
'previous 100 rows': '100 filas anteriores',
'record': 'registro',
'record does not exist': 'el registro no existe',
'record id': 'id de registro',
'register': 'registrese',
'remove compiled': 'eliminar compiladas',
'restore': 'restaurar',
'revert': 'revertir',
'save': 'guardar',
'selected': 'seleccionado(s)',
'session expired': 'sesión expirada',
'shell': 'shell',
'site': 'sitio',
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'state': 'estado',
'static': 'estáticos',
'table': 'tabla',
'test': 'probar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
'the presentations layer, views are also known as templates': 'la capa de presentación, las vistas también son llamadas plantillas',
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
'to  previous version.': 'a la versión previa.',
'translation strings for the application': 'cadenas de caracteres de traducción para la aplicación',
'try': 'intente',
'try something like': 'intente algo como',
'unable to create application "%s"': 'no es posible crear la aplicación "%s"',
'unable to delete file "%(filename)s"': 'no es posible eliminar el archivo "%(filename)s"',
'unable to parse csv file': 'no es posible analizar el archivo CSV',
'unable to uninstall "%s"': 'no es posible instalar "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'actualizar',
'update all languages': 'actualizar todos los lenguajes',
'upload application:': 'subir aplicación:',
'upload file:': 'suba archivo:',
'versioning': 'versiones',
'view': 'vista',
'views': 'vistas',
'web2py Recent Tweets': 'Tweets Recientes de web2py',
'web2py is up to date': 'web2py está actualizado',
}

Added applications/mobileblur/languages/fr-ca.py version [a1c8c80bd7].








































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rangées supprimées',
'%s rows updated': '%s rangées mises à jour',
'About': 'À propos',
'Access Control': "Contrôle d'accès",
'Administrative interface': "Interface d'administration",
'Ajax Recipes': 'Recettes Ajax',
'Are you sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Authentication': 'Authentification',
'Available databases and tables': 'Bases de données et tables disponibles',
'Buy this book': 'Acheter ce livre',
'Cannot be empty': 'Ne peut pas être vide',
'Check to delete': 'Cliquez pour supprimer',
'Check to delete:': 'Cliquez pour supprimer:',
'Client IP': 'IP client',
'Community': 'Communauté',
'Controller': 'Contrôleur',
'Copyright': "Droit d'auteur",
'Current request': 'Demande actuelle',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'DB Model': 'Modèle DB',
'Database': 'Base de données',
'Delete:': 'Supprimer:',
'Demo': 'Démo',
'Deployment Recipes': 'Recettes de déploiement ',
'Description': 'Descriptif',
'Documentation': 'Documentation',
'Download': 'Téléchargement',
'E-mail': 'Courriel',
'Edit': 'Éditer',
'Edit This App': 'Modifier cette application',
'Edit current record': "Modifier l'enregistrement courant",
'Errors': 'Erreurs',
'FAQ': 'faq',
'First name': 'Prénom',
'Forms and Validators': 'Formulaires et Validateurs',
'Free Applications': 'Applications gratuites',
'Function disabled': 'Fonction désactivée',
'Group %(group_id)s created': '%(group_id)s groupe créé',
'Group ID': 'Groupe ID',
'Group uniquely assigned to user %(id)s': "Groupe unique attribué à l'utilisateur %(id)s",
'Groups': 'Groupes',
'Hello World': 'Bonjour le monde',
'Home': 'Accueil',
'Import/Export': 'Importer/Exporter',
'Index': 'Index',
'Internal State': 'État interne',
'Introduction': 'Présentation',
'Invalid Query': 'Requête Invalide',
'Invalid email': 'Courriel invalide',
'Last name': 'Nom',
'Layout': 'Mise en page',
'Layouts': 'layouts',
'Live chat': 'Clavardage en direct',
'Logged in': 'Connecté',
'Login': 'Connectez-vous',
'Lost Password': 'Mot de passe perdu',
'Main Menu': 'Menu principal',
'Menu Model': 'Menu modèle',
'Name': 'Nom',
'New Record': 'Nouvel enregistrement',
'No databases in this application': "Cette application n'a pas de bases de données",
'Online examples': 'Exemples en ligne',
'Origin': 'Origine',
'Other Recipes': 'Autres recettes',
'Overview': 'Présentation',
'Password': 'Mot de passe',
"Password fields don't match": 'Les mots de passe ne correspondent pas',
'Plugins': 'Plugiciels',
'Powered by': 'Alimenté par',
'Preface': 'Préface',
'Python': 'Python',
'Query:': 'Requête:',
'Quick Examples': 'Examples Rapides',
'Readme': 'Lisez-moi',
'Recipes': 'Recettes',
'Record %(id)s created': 'Record %(id)s created',
'Record %(id)s updated': 'Record %(id)s updated',
'Record Created': 'Record Created',
'Record ID': "ID d'enregistrement",
'Record Updated': 'Record Updated',
'Register': "S'inscrire",
'Registration key': "Clé d'enregistrement",
'Registration successful': 'Inscription réussie',
'Remember me (for 30 days)': 'Se souvenir de moi (pendant 30 jours)',
'Request reset password': 'Demande de réinitialiser le mot clé',
'Reset Password key': 'Réinitialiser le mot clé',
'Resources': 'Ressources',
'Role': 'Rôle',
'Rows in table': 'Lignes du tableau',
'Rows selected': 'Lignes sélectionnées',
'Semantic': 'Sémantique',
'Services': 'Services',
'Stylesheet': 'Feuille de style',
'Submit': 'Soumettre',
'Support': 'Soutien',
'Sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Table name': 'Nom du tableau',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "query" est une condition comme "db.table1.champ1==\'valeur\'". Quelque chose comme "db.table1.champ1==db.table2.champ2" résulte en un JOIN SQL.',
'The Core': 'Le noyau',
'The Views': 'Les Vues',
'The output of the file is a dictionary that was rendered by the view': 'La sortie de ce fichier est un dictionnaire qui été restitué par la vue',
'This App': 'Cette Appli',
'This is a copy of the scaffolding application': "Ceci est une copie de l'application échafaudage",
'Timestamp': 'Horodatage',
'Twitter': 'Twitter',
'Update:': 'Mise à jour:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Employez (...)&(...) pour AND, (...)|(...) pour OR, and ~(...)  pour NOT pour construire des requêtes plus complexes.',
'User %(id)s Logged-in': 'Utilisateur %(id)s connecté',
'User %(id)s Registered': 'Utilisateur %(id)s enregistré',
'User ID': 'ID utilisateur',
'User Voice': 'User Voice',
'Verify Password': 'Vérifiez le mot de passe',
'Videos': 'Vidéos',
'View': 'Présentation',
'Web2py': 'Web2py',
'Welcome': 'Bienvenu',
'Welcome %s': 'Bienvenue %s',
'Welcome to web2py': 'Bienvenue à web2py',
'Which called the function': 'Qui a appelé la fonction',
'You are successfully running web2py': 'Vous roulez avec succès web2py',
'You can modify this application and adapt it to your needs': "Vous pouvez modifier cette application et l'adapter à vos besoins",
'You visited the url': "Vous avez visité l'URL",
'about': 'à propos',
'appadmin is disabled because insecure channel': "appadmin est désactivée parce que le canal n'est pas sécurisé",
'cache': 'cache',
'change password': 'changer le mot de passe',
'customize me!': 'personnalisez-moi!',
'data uploaded': 'données téléchargées',
'database': 'base de données',
'database %s select': 'base de données %s select',
'db': 'db',
'design': 'design',
'done!': 'fait!',
'edit profile': 'modifier le profil',
'enter an integer between %(min)g and %(max)g': 'entrer un entier compris entre %(min)g et %(max)g',
'export as csv file': 'exporter sous forme de fichier csv',
'insert new': 'insérer un nouveau',
'insert new %s': 'insérer un nouveau %s',
'invalid request': 'requête invalide',
'located in the file': 'se trouvant dans le fichier',
'login': 'connectez-vous',
'logout': 'déconnectez-vous',
'lost password': 'mot de passe perdu',
'lost password?': 'mot de passe perdu?',
'new record inserted': 'nouvel enregistrement inséré',
'next 100 rows': '100 prochaines lignes',
'or import from csv file': "ou importer d'un fichier CSV",
'password': 'mot de passe',
'please input your password again': "S'il vous plaît entrer votre mot de passe",
'previous 100 rows': '100 lignes précédentes',
'profile': 'profile',
'record': 'enregistrement',
'record does not exist': "l'archive n'existe pas",
'record id': "id d'enregistrement",
'register': "s'inscrire",
'selected': 'sélectionné',
'state': 'état',
'table': 'tableau',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
'value already in database or empty': 'valeur déjà dans la base ou vide',
}

Added applications/mobileblur/languages/fr-fr.py version [12b6d60c6d].




























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rangées supprimées',
'%s rows updated': '%s rangées mises à jour',
'About': 'À propos',
'Access Control': 'Contrôle d\'accès',
'Ajax Recipes': 'Recettes Ajax',
'Are you sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Authentication': 'Authentification',
'Available databases and tables': 'Bases de données et tables disponibles',
'Buy this book': 'Acheter ce livre',
'Cannot be empty': 'Ne peut pas être vide',
'Check to delete': 'Cliquez pour supprimer',
'Check to delete:': 'Cliquez pour supprimer:',
'Client IP': 'IP client',
'Community': 'Communauté',
'Controller': 'Contrôleur',
'Copyright': 'Copyright',
'Current request': 'Demande actuelle',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'DB Model': 'Modèle DB',
'Database': 'Base de données',
'Delete:': 'Supprimer:',
'Demo': 'Démo',
'Deployment Recipes': 'Recettes de déploiement',
'Description': 'Description',
'Documentation': 'Documentation',
'Download': 'Téléchargement',
'E-mail': 'E-mail',
'Edit': 'Éditer',
'Edit This App': 'Modifier cette application',
'Edit current record': "Modifier l'enregistrement courant",
'Errors': 'Erreurs',
'FAQ': 'FAQ',
'First name': 'Prénom',
'Forms and Validators': 'Formulaires et Validateurs',
'Free Applications': 'Applications gratuites',
'Function disabled': 'Fonction désactivée',
'Group ID': 'Groupe ID',
'Groups': 'Groups',
'Hello World': 'Bonjour le monde',
'Home': 'Accueil',
'Import/Export': 'Importer/Exporter',
'Index': 'Index',
'Internal State': 'État interne',
'Introduction': 'Introduction',
'Invalid Query': 'Requête Invalide',
'Invalid email': 'E-mail invalide',
'Last name': 'Nom',
'Layout': 'Mise en page',
'Layouts': 'Layouts',
'Live chat': 'Chat live',
'Login': 'Connectez-vous',
'Lost Password': 'Mot de passe perdu',
'Main Menu': 'Menu principal',
'Menu Model': 'Menu modèle',
'Name': 'Nom',
'New Record': 'Nouvel enregistrement',
'No databases in this application': "Cette application n'a pas de bases de données",
'Origin': 'Origine',
'Other Recipes': 'Autres recettes',
'Overview': 'Présentation',
'Password': 'Mot de passe',
"Password fields don't match": 'Les mots de passe ne correspondent pas',
'Plugins': 'Plugiciels',
'Powered by': 'Alimenté par',
'Preface': 'Préface',
'Python': 'Python',
'Query:': 'Requête:',
'Quick Examples': 'Examples Rapides',
'Recipes': 'Recettes',
'Record ID': 'ID d\'enregistrement',
'Register': "S'inscrire",
'Registration key': "Clé d'enregistrement",
'Remember me (for 30 days)': 'Se souvenir de moi (pendant 30 jours)',
'Request reset password': 'Demande de réinitialiser le mot clé',
'Reset Password key': 'Réinitialiser le mot clé',
'Resources': 'Ressources',
'Role': 'Rôle',
'Rows in table': 'Lignes du tableau',
'Rows selected': 'Lignes sélectionnées',
'Semantic': 'Sémantique',
'Services': 'Services',
'Stylesheet': 'Feuille de style',
'Submit': 'Soumettre',
'Support': 'Support',
'Sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Table name': 'Nom du tableau',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "query" est une condition comme "db.table1.champ1==\'valeur\'". Quelque chose comme "db.table1.champ1==db.table2.champ2" résulte en un JOIN SQL.',
'The Core': 'Le noyau',
'The Views': 'Les Vues',
'The output of the file is a dictionary that was rendered by the view': 'La sortie de ce fichier est un dictionnaire qui été restitué par la vue',
'This App': 'Cette Appli',
'This is a copy of the scaffolding application': 'Ceci est une copie de l\'application échafaudage',
'Timestamp': 'Horodatage',
'Twitter': 'Twitter',
'Update:': 'Mise à jour:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Employez (...)&(...) pour AND, (...)|(...) pour OR, and ~(...)  pour NOT pour construire des requêtes plus complexes.',
'User %(id)s Logged-in': 'Utilisateur %(id)s connecté',
'User %(id)s Registered': 'Utilisateur %(id)s enregistré',
'User ID': 'ID utilisateur',
'User Voice': 'User Voice',
'Verify Password': 'Vérifiez le mot de passe',
'Videos': 'Vidéos',
'View': 'Présentation',
'Web2py': 'Web2py',
'Welcome': 'Bienvenu',
'Welcome %s': 'Bienvenue %s',
'Welcome to web2py': 'Bienvenue à web2py',
'Which called the function': 'Qui a appelé la fonction',
'You are successfully running web2py': 'Vous roulez avec succès web2py',
'You can modify this application and adapt it to your needs': 'Vous pouvez modifier cette application et l\'adapter à vos besoins',
'You visited the url': 'Vous avez visité l\'URL',
'appadmin is disabled because insecure channel': "appadmin est désactivée parce que le canal n'est pas sécurisé",
'cache': 'cache',
'change password': 'changer le mot de passe',
'Online examples': 'Exemples en ligne',
'Administrative interface': "Interface d'administration",
'customize me!': 'personnalisez-moi!',
'data uploaded': 'données téléchargées',
'database': 'base de données',
'database %s select': 'base de données %s select',
'db': 'db',
'design': 'design',
'Documentation': 'Documentation',
'done!': 'fait!',
'edit profile': 'modifier le profil',
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
'export as csv file': 'exporter sous forme de fichier csv',
'insert new': 'insérer un nouveau',
'insert new %s': 'insérer un nouveau %s',
'invalid request': 'requête invalide',
'located in the file': 'se trouvant dans le fichier',
'login': 'connectez-vous',
'logout': 'déconnectez-vous',
'lost password': 'mot de passe perdu',
'lost password?': 'mot de passe perdu?',
'new record inserted': 'nouvel enregistrement inséré',
'next 100 rows': '100 prochaines lignes',
'or import from csv file': "ou importer d'un fichier CSV",
'previous 100 rows': '100 lignes précédentes',
'record': 'enregistrement',
'record does not exist': "l'archive n'existe pas",
'record id': "id d'enregistrement",
'register': "s'inscrire",
'selected': 'sélectionné',
'state': 'état',
'table': 'tableau',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
'Readme': "Lisez-moi",
}

Added applications/mobileblur/languages/hi-hi.py version [568b21ea86].



















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\x8f\xe0\xa4\x81',
'%s rows updated': '%s \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81  \xe0\xa4\x85\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xa4\xe0\xa4\xa8',
'Available databases and tables': '\xe0\xa4\x89\xe0\xa4\xaa\xe0\xa4\xb2\xe0\xa4\xac\xe0\xa5\x8d\xe0\xa4\xa7  \xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\x94\xe0\xa4\xb0 \xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe',
'Cannot be empty': '\xe0\xa4\x96\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x80 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\xb8\xe0\xa4\x95\xe0\xa4\xa4\xe0\xa4\xbe',
'Change Password': '\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xac\xe0\xa4\xa6\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'Check to delete': '\xe0\xa4\xb9\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x87\xe0\xa4\x82',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7',
'Current response': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe',
'Current session': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb8\xe0\xa5\x87\xe0\xa4\xb6\xe0\xa4\xa8',
'DB Model': 'DB Model',
'Database': 'Database',
'Delete:': '\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xbe:',
'Edit': 'Edit',
'Edit Profile': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'Edit This App': 'Edit This App',
'Edit current record': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82 ',
'Hello World': 'Hello World',
'Hello from MyApp': 'Hello from MyApp',
'Import/Export': '\xe0\xa4\x86\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4 / \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'Index': 'Index',
'Internal State': '\xe0\xa4\x86\xe0\xa4\x82\xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95  \xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa5\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\xbf',
'Invalid Query': '\xe0\xa4\x85\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xaf  \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xa8',
'Layout': 'Layout',
'Login': '\xe0\xa4\xb2\xe0\xa5\x89\xe0\xa4\x97 \xe0\xa4\x87\xe0\xa4\xa8',
'Logout': '\xe0\xa4\xb2\xe0\xa5\x89\xe0\xa4\x97 \xe0\xa4\x86\xe0\xa4\x89\xe0\xa4\x9f',
'Lost Password': '\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\x96\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe',
'Main Menu': 'Main Menu',
'Menu Model': 'Menu Model',
'New Record': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1',
'No databases in this application': '\xe0\xa4\x87\xe0\xa4\xb8  \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x97 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\x88 \xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82',
'Powered by': 'Powered by',
'Query:': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xa8:',
'Register': '\xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x9c\xe0\xa5\x80\xe0\xa4\x95\xe0\xa5\x83\xe0\xa4\xa4 (\xe0\xa4\xb0\xe0\xa4\x9c\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xb0) \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa4\xbe ',
'Rows in table': '\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 ',
'Rows selected': '\xe0\xa4\x9a\xe0\xa4\xaf\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xa4 (\xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa5\x87) \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 ',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': '\xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\x9a\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\x86\xe0\xa4\xaa \xe0\xa4\x87\xe0\xa4\xb8 \xe0\xa4\xb5\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa5\x81 \xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xb9\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\x9a\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xa4\xe0\xa5\x87 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': '\xe0\xa4\x85\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xa4\xe0\xa4\xa8 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa4\xbe:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'View': 'View',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': '\xe0\xa4\xb5\xe0\xa5\x87\xe0\xa4\xac\xe0\xa5\xa8\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\x87 (web2py)  \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x86\xe0\xa4\xaa\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\x97\xe0\xa4\xa4 \xe0\xa4\xb9\xe0\xa5\x88',
'appadmin is disabled because insecure channel': '\xe0\xa4\x85\xe0\xa4\xaa \xe0\xa4\x86\xe0\xa4\xa1\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\xa8 (appadmin) \xe0\xa4\x85\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa4\xae \xe0\xa4\xb9\xe0\xa5\x88 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x82\xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\x85\xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x9a\xe0\xa5\x88\xe0\xa4\xa8\xe0\xa4\xb2',
'cache': 'cache',
'change password': 'change password',
'Online examples': '\xe0\xa4\x91\xe0\xa4\xa8\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xa8 \xe0\xa4\x89\xe0\xa4\xa6\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xb0\xe0\xa4\xa3 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xaf\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'Administrative interface': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x87\xe0\xa4\x82\xe0\xa4\x9f\xe0\xa4\xb0\xe0\xa4\xab\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xaf\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'customize me!': '\xe0\xa4\xae\xe0\xa5\x81\xe0\xa4\x9d\xe0\xa5\x87 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\x95\xe0\xa5\x82\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\xa4 (\xe0\xa4\x95\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\x9c\xe0\xa4\xbc) \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82!',
'data uploaded': '\xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\x9f\xe0\xa4\xbe \xe0\xa4\x85\xe0\xa4\xaa\xe0\xa4\xb2\xe0\xa5\x8b\xe0\xa4\xa1 \xe0\xa4\xb8\xe0\xa4\xae\xe0\xa5\x8d\xe0\xa4\xaa\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa8 ',
'database': '\xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8',
'database %s select': '\xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8  %s \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x80 \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x88',
'db': 'db',
'design': '\xe0\xa4\xb0\xe0\xa4\x9a\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'done!': '\xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe!',
'edit profile': 'edit profile',
'export as csv file': 'csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa5\x82\xe0\xa4\xaa \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'insert new': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'insert new %s': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe   %s  \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'invalid request': '\xe0\xa4\x85\xe0\xa4\xb5\xe0\xa5\x88\xe0\xa4\xa7 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7',
'login': 'login',
'logout': 'logout',
'new record inserted': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbe',
'next 100 rows': '\xe0\xa4\x85\xe0\xa4\x97\xe0\xa4\xb2\xe0\xa5\x87 100 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81',
'or import from csv file': '\xe0\xa4\xaf\xe0\xa4\xbe  csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\x86\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'previous 100 rows': '\xe0\xa4\xaa\xe0\xa4\xbf\xe0\xa4\x9b\xe0\xa4\xb2\xe0\xa5\x87 100 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81',
'record': 'record',
'record does not exist': '\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xae\xe0\xa5\x8c\xe0\xa4\x9c\xe0\xa5\x82\xe0\xa4\xa6 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88',
'record id': '\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xaa\xe0\xa4\xb9\xe0\xa4\x9a\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbe (\xe0\xa4\x86\xe0\xa4\x88\xe0\xa4\xa1\xe0\xa5\x80)',
'register': 'register',
'selected': '\xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x86',
'state': '\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa5\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\xbf',
'table': '\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe',
'unable to parse csv file': 'csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb8 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x85\xe0\xa4\xb8\xe0\xa4\xae\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa5',
}

Added applications/mobileblur/languages/hu-hu.py version [cbea9c4c52].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
'%s rows deleted': '%s sorok t\xc3\xb6rl\xc5\x91dtek',
'%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek',
'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k',
'Cannot be empty': 'Nem lehet \xc3\xbcres',
'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s',
'Current response': 'Jelenlegi v\xc3\xa1lasz',
'Current session': 'Jelenlegi folyamat',
'DB Model': 'DB Model',
'Database': 'Adatb\xc3\xa1zis',
'Delete:': 'T\xc3\xb6r\xc3\xb6l:',
'Description': 'Description',
'E-mail': 'E-mail',
'Edit': 'Szerkeszt',
'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt',
'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se',
'First name': 'First name',
'Group ID': 'Group ID',
'Hello World': 'Hello Vil\xc3\xa1g',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Internal State',
'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Szerkezet',
'Main Menu': 'F\xc5\x91men\xc3\xbc',
'Menu Model': 'Men\xc3\xbc model',
'Name': 'Name',
'New Record': '\xc3\x9aj bejegyz\xc3\xa9s',
'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban',
'Origin': 'Origin',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:',
'Record ID': 'Record ID',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Role': 'Role',
'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban',
'Rows selected': 'Kiv\xc3\xa1lasztott sorok',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?',
'Table name': 'Table name',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Timestamp': 'Timestamp',
'Update:': 'Friss\xc3\xadt:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'User ID': 'User ID',
'View': 'N\xc3\xa9zet',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva',
'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r',
'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa',
'Online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide',
'Administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide',
'customize me!': 'v\xc3\xa1ltoztass meg!',
'data uploaded': 'adat felt\xc3\xb6ltve',
'database': 'adatb\xc3\xa1zis',
'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s',
'db': 'db',
'design': 'design',
'done!': 'k\xc3\xa9sz!',
'edit profile': 'profil szerkeszt\xc3\xa9se',
'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba',
'insert new': '\xc3\xbaj beilleszt\xc3\xa9se',
'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s',
'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s',
'login': 'bel\xc3\xa9p',
'logout': 'kil\xc3\xa9p',
'lost password': 'elveszett jelsz\xc3\xb3',
'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve',
'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor',
'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l',
'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor',
'record': 'bejegyz\xc3\xa9s',
'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik',
'record id': 'bejegyz\xc3\xa9s id',
'register': 'regisztr\xc3\xa1ci\xc3\xb3',
'selected': 'kiv\xc3\xa1lasztott',
'state': '\xc3\xa1llapot',
'table': 't\xc3\xa1bla',
'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni',
}

Added applications/mobileblur/languages/hu.py version [cbea9c4c52].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
'%s rows deleted': '%s sorok t\xc3\xb6rl\xc5\x91dtek',
'%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek',
'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k',
'Cannot be empty': 'Nem lehet \xc3\xbcres',
'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s',
'Current response': 'Jelenlegi v\xc3\xa1lasz',
'Current session': 'Jelenlegi folyamat',
'DB Model': 'DB Model',
'Database': 'Adatb\xc3\xa1zis',
'Delete:': 'T\xc3\xb6r\xc3\xb6l:',
'Description': 'Description',
'E-mail': 'E-mail',
'Edit': 'Szerkeszt',
'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt',
'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se',
'First name': 'First name',
'Group ID': 'Group ID',
'Hello World': 'Hello Vil\xc3\xa1g',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Internal State',
'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Szerkezet',
'Main Menu': 'F\xc5\x91men\xc3\xbc',
'Menu Model': 'Men\xc3\xbc model',
'Name': 'Name',
'New Record': '\xc3\x9aj bejegyz\xc3\xa9s',
'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban',
'Origin': 'Origin',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:',
'Record ID': 'Record ID',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Role': 'Role',
'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban',
'Rows selected': 'Kiv\xc3\xa1lasztott sorok',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?',
'Table name': 'Table name',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Timestamp': 'Timestamp',
'Update:': 'Friss\xc3\xadt:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'User ID': 'User ID',
'View': 'N\xc3\xa9zet',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva',
'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r',
'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa',
'Online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide',
'Administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide',
'customize me!': 'v\xc3\xa1ltoztass meg!',
'data uploaded': 'adat felt\xc3\xb6ltve',
'database': 'adatb\xc3\xa1zis',
'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s',
'db': 'db',
'design': 'design',
'done!': 'k\xc3\xa9sz!',
'edit profile': 'profil szerkeszt\xc3\xa9se',
'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba',
'insert new': '\xc3\xbaj beilleszt\xc3\xa9se',
'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s',
'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s',
'login': 'bel\xc3\xa9p',
'logout': 'kil\xc3\xa9p',
'lost password': 'elveszett jelsz\xc3\xb3',
'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve',
'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor',
'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l',
'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor',
'record': 'bejegyz\xc3\xa9s',
'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik',
'record id': 'bejegyz\xc3\xa9s id',
'register': 'regisztr\xc3\xa1ci\xc3\xb3',
'selected': 'kiv\xc3\xa1lasztott',
'state': '\xc3\xa1llapot',
'table': 't\xc3\xa1bla',
'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni',
}

Added applications/mobileblur/languages/it-it.py version [968a746998].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Check to delete': 'Seleziona per cancellare',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Delete:': 'Cancella:',
'Description': 'Descrizione',
'E-mail': 'E-mail',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit current record': 'Modifica record corrente',
'First name': 'Nome',
'Group ID': 'ID Gruppo',
'Hello World': 'Salve Mondo',
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid email': 'Email non valida',
'Last name': 'Cognome',
'Layout': 'Layout',
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Name': 'Nome',
'New Record': 'Nuovo elemento (record)',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Origin': 'Origine',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Record ID': 'Record ID',
'Registration key': 'Chiave di Registazione',
'Reset Password key': 'Resetta chiave Password ',
'Role': 'Ruolo',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'Table name': 'Nome tabella',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio  "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'The output of the file is a dictionary that was rendered by the view': 'L\'output del file è un "dictionary" che è stato visualizzato dalla vista',
'This is a copy of the scaffolding application': "Questa è una copia dell'applicazione di base (scaffold)",
'Timestamp': 'Ora (timestamp)',
'Update:': 'Aggiorna:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'User ID': 'ID Utente',
'View': 'Vista',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'Which called the function': 'che ha chiamato la funzione',
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
'You visited the url': "Hai visitato l'URL",
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
'cache': 'cache',
'change password': 'Cambia password',
'Online examples': 'Vedere gli esempi',
'Administrative interface': "Interfaccia amministrativa",
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'Documentation': 'Documentazione',
'done!': 'fatto!',
'edit profile': 'modifica profilo',
'export as csv file': 'esporta come file CSV',
'hello world': 'salve mondo',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'invalid request': 'richiesta non valida',
'located in the file': 'presente nel file',
'login': 'accesso',
'logout': 'uscita',
'lost password?': 'dimenticato la password?',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'not authorized': 'non autorizzato',
'or import from csv file': 'oppure importa da file CSV',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'register': 'registrazione',
'selected': 'selezionato',
'state': 'stato',
'table': 'tabella',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
}

Added applications/mobileblur/languages/it.py version [968a746998].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Check to delete': 'Seleziona per cancellare',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Delete:': 'Cancella:',
'Description': 'Descrizione',
'E-mail': 'E-mail',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit current record': 'Modifica record corrente',
'First name': 'Nome',
'Group ID': 'ID Gruppo',
'Hello World': 'Salve Mondo',
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid email': 'Email non valida',
'Last name': 'Cognome',
'Layout': 'Layout',
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Name': 'Nome',
'New Record': 'Nuovo elemento (record)',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Origin': 'Origine',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Record ID': 'Record ID',
'Registration key': 'Chiave di Registazione',
'Reset Password key': 'Resetta chiave Password ',
'Role': 'Ruolo',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'Table name': 'Nome tabella',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio  "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'The output of the file is a dictionary that was rendered by the view': 'L\'output del file è un "dictionary" che è stato visualizzato dalla vista',
'This is a copy of the scaffolding application': "Questa è una copia dell'applicazione di base (scaffold)",
'Timestamp': 'Ora (timestamp)',
'Update:': 'Aggiorna:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'User ID': 'ID Utente',
'View': 'Vista',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'Which called the function': 'che ha chiamato la funzione',
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
'You visited the url': "Hai visitato l'URL",
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
'cache': 'cache',
'change password': 'Cambia password',
'Online examples': 'Vedere gli esempi',
'Administrative interface': "Interfaccia amministrativa",
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'Documentation': 'Documentazione',
'done!': 'fatto!',
'edit profile': 'modifica profilo',
'export as csv file': 'esporta come file CSV',
'hello world': 'salve mondo',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'invalid request': 'richiesta non valida',
'located in the file': 'presente nel file',
'login': 'accesso',
'logout': 'uscita',
'lost password?': 'dimenticato la password?',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'not authorized': 'non autorizzato',
'or import from csv file': 'oppure importa da file CSV',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'register': 'registrazione',
'selected': 'selezionato',
'state': 'stato',
'table': 'tabella',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
}

Added applications/mobileblur/languages/pl-pl.py version [92556d9416].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuni\xc4\x99tych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Change Password',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'DB Model': 'DB Model',
'Database': 'Database',
'Delete:': 'Usu\xc5\x84:',
'Edit': 'Edit',
'Edit Profile': 'Edit Profile',
'Edit This App': 'Edit This App',
'Edit current record': 'Edytuj aktualny rekord',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Index': 'Index',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Layout': 'Layout',
'Login': 'Zaloguj',
'Logout': 'Logout',
'Lost Password': 'Przypomnij has\xc5\x82o',
'Main Menu': 'Main Menu',
'Menu Model': 'Menu Model',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Powered by': 'Powered by',
'Query:': 'Zapytanie:',
'Register': 'Zarejestruj',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'warto\xc5\x9b\xc4\x87\'". Takie co\xc5\x9b jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'Update:': 'Uaktualnij:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'U\xc5\xbcyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...)  jako NOT do tworzenia bardziej skomplikowanych zapyta\xc5\x84.',
'View': 'View',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Witaj w web2py',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'cache': 'cache',
'change password': 'change password',
'Online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'Administrative interface': 'Kliknij aby przej\xc5\x9b\xc4\x87 do panelu administracyjnego',
'customize me!': 'dostosuj mnie!',
'data uploaded': 'dane wys\xc5\x82ane',
'database': 'baza danych',
'database %s select': 'wyb\xc3\xb3r z bazy danych %s',
'db': 'baza danych',
'design': 'projektuj',
'done!': 'zrobione!',
'edit profile': 'edit profile',
'export as csv file': 'eksportuj jako plik csv',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'invalid request': 'B\xc5\x82\xc4\x99dne \xc5\xbc\xc4\x85danie',
'login': 'login',
'logout': 'logout',
'new record inserted': 'nowy rekord zosta\xc5\x82 wstawiony',
'next 100 rows': 'nast\xc4\x99pne 100 wierszy',
'or import from csv file': 'lub zaimportuj z pliku csv',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'record',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'register': 'register',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}

Added applications/mobileblur/languages/pl.py version [1cc9928895].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuni\xc4\x99tych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'Authentication': 'Uwierzytelnienie',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Zmie\xc5\x84 has\xc5\x82o',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Check to delete:': 'Zaznacz aby usun\xc4\x85\xc4\x87:',
'Client IP': 'IP klienta',
'Controller': 'Kontroler',
'Copyright': 'Copyright',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'DB Model': 'Model bazy danych',
'Database': 'Baza danych',
'Delete:': 'Usu\xc5\x84:',
'Description': 'Opis',
'E-mail': 'Adres e-mail',
'Edit': 'Edycja',
'Edit Profile': 'Edytuj profil',
'Edit This App': 'Edytuj t\xc4\x99 aplikacj\xc4\x99',
'Edit current record': 'Edytuj obecny rekord',
'First name': 'Imi\xc4\x99',
'Function disabled': 'Funkcja wy\xc5\x82\xc4\x85czona',
'Group ID': 'ID grupy',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Index': 'Indeks',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Invalid email': 'B\xc5\x82\xc4\x99dny adres email',
'Last name': 'Nazwisko',
'Layout': 'Uk\xc5\x82ad',
'Login': 'Zaloguj',
'Logout': 'Wyloguj',
'Lost Password': 'Przypomnij has\xc5\x82o',
'Main Menu': 'Menu g\xc5\x82\xc3\xb3wne',
'Menu Model': 'Model menu',
'Name': 'Nazwa',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Origin': '\xc5\xb9r\xc3\xb3d\xc5\x82o',
'Password': 'Has\xc5\x82o',
"Password fields don't match": 'Pola has\xc5\x82a nie s\xc4\x85 zgodne ze sob\xc4\x85',
'Powered by': 'Zasilane przez',
'Query:': 'Zapytanie:',
'Record ID': 'ID rekordu',
'Register': 'Zarejestruj',
'Registration key': 'Klucz rejestracji',
'Role': 'Rola',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Stylesheet': 'Arkusz styl\xc3\xb3w',
'Submit': 'Wy\xc5\x9blij',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'Table name': 'Nazwa tabeli',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'warto\xc5\x9b\xc4\x87\'". Takie co\xc5\x9b jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'Timestamp': 'Znacznik czasu',
'Update:': 'Uaktualnij:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'U\xc5\xbcyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...)  jako NOT do tworzenia bardziej skomplikowanych zapyta\xc5\x84.',
'User %(id)s Registered': 'U\xc5\xbcytkownik %(id)s zosta\xc5\x82 zarejestrowany',
'User ID': 'ID u\xc5\xbcytkownika',
'Verify Password': 'Potwierd\xc5\xba has\xc5\x82o',
'View': 'Widok',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Witaj w web2py',
'appadmin is disabled because insecure channel': 'administracja aplikacji wy\xc5\x82\xc4\x85czona z powodu braku bezpiecznego po\xc5\x82\xc4\x85czenia',
'cache': 'cache',
'change password': 'change password',
'Online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'Administrative interface': 'Kliknij aby przej\xc5\x9b\xc4\x87 do panelu administracyjnego',
'customize me!': 'dostosuj mnie!',
'data uploaded': 'dane wys\xc5\x82ane',
'database': 'baza danych',
'database %s select': 'wyb\xc3\xb3r z bazy danych %s',
'db': 'baza danych',
'design': 'projektuj',
'done!': 'zrobione!',
'edit profile': 'edit profile',
'export as csv file': 'eksportuj jako plik csv',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'invalid request': 'B\xc5\x82\xc4\x99dne \xc5\xbc\xc4\x85danie',
'login': 'login',
'logout': 'logout',
'new record inserted': 'nowy rekord zosta\xc5\x82 wstawiony',
'next 100 rows': 'nast\xc4\x99pne 100 wierszy',
'or import from csv file': 'lub zaimportuj z pliku csv',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'rekord',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'register': 'register',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}

Added applications/mobileblur/languages/pt-br.py version [359b67f161].















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de um JOIN',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'%s rows deleted': '%s linhas apagadas',
'%s rows updated': '%s linhas atualizadas',
'About': 'About',
'Access Control': 'Access Control',
'Ajax Recipes': 'Ajax Recipes',
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
'Buy this book': 'Buy this book',
'Cannot be empty': 'Não pode ser vazio',
'Check to delete': 'Marque para apagar',
'Client IP': 'Client IP',
'Community': 'Community',
'Controller': 'Controlador',
'Copyright': 'Copyright',
'Current request': 'Requisição atual',
'Current response': 'Resposta atual',
'Current session': 'Sessão atual',
'DB Model': 'Modelo BD',
'Database': 'Banco de dados',
'Delete:': 'Apagar:',
'Demo': 'Demo',
'Deployment Recipes': 'Deployment Recipes',
'Description': 'Description',
'Documentation': 'Documentation',
'Download': 'Download',
'E-mail': 'E-mail',
'Edit': 'Editar',
'Edit This App': 'Edit This App',
'Edit current record': 'Editar o registro atual',
'Errors': 'Errors',
'FAQ': 'FAQ',
'First name': 'First name',
'Forms and Validators': 'Forms and Validators',
'Free Applications': 'Free Applications',
'Group ID': 'Group ID',
'Groups': 'Groups',
'Hello World': 'Olá Mundo',
'Home': 'Home',
'Import/Export': 'Importar/Exportar',
'Index': 'Início',
'Internal State': 'Estado Interno',
'Introduction': 'Introduction',
'Invalid Query': 'Consulta Inválida',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Layout',
'Layouts': 'Layouts',
'Live chat': 'Live chat',
'Login': 'Autentique-se',
'Lost Password': 'Esqueceu sua senha?',
'Main Menu': 'Menu Principal',
'Menu Model': 'Modelo de Menu',
'Name': 'Name',
'New Record': 'Novo Registro',
'No databases in this application': 'Sem bancos de dados nesta aplicação',
'Origin': 'Origin',
'Other Recipes': 'Other Recipes',
'Overview': 'Overview',
'Password': 'Password',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Preface': 'Preface',
'Python': 'Python',
'Query:': 'Consulta:',
'Quick Examples': 'Quick Examples',
'Recipes': 'Recipes',
'Record ID': 'Record ID',
'Register': 'Registre-se',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Resources': 'Resources',
'Role': 'Role',
'Rows in table': 'Linhas na tabela',
'Rows selected': 'Linhas selecionadas',
'Semantic': 'Semantic',
'Services': 'Services',
'Stylesheet': 'Stylesheet',
'Support': 'Support',
'Sure you want to delete this object?': 'Está certo(a) que deseja apagar esse objeto ?',
'Table name': 'Table name',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'Uma "consulta" é uma condição como "db.tabela1.campo1==\'valor\'". Expressões como "db.tabela1.campo1==db.tabela2.campo2" resultam em um JOIN SQL.',
'The Core': 'The Core',
'The Views': 'The Views',
'The output of the file is a dictionary that was rendered by the view': 'The output of the file is a dictionary that was rendered by the view',
'This App': 'This App',
'This is a copy of the scaffolding application': 'This is a copy of the scaffolding application',
'Timestamp': 'Timestamp',
'Twitter': 'Twitter',
'Update:': 'Atualizar:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, e ~(...)  para NOT para construir consultas mais complexas.',
'User ID': 'User ID',
'User Voice': 'User Voice',
'Videos': 'Videos',
'View': 'Visualização',
'Web2py': 'Web2py',
'Welcome': 'Welcome',
'Welcome %s': 'Vem vindo %s',
'Welcome to web2py': 'Bem vindo ao web2py',
'Which called the function': 'Which called the function',
'You are successfully running web2py': 'You are successfully running web2py',
'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',
'You visited the url': 'You visited the url',
'appadmin is disabled because insecure channel': 'Administração desativada devido ao canal inseguro',
'cache': 'cache',
'change password': 'modificar senha',
'Online examples': 'Alguns exemplos',
'Administrative interface': 'Interface administrativa',
'customize me!': 'Personalize-me!',
'data uploaded': 'dados enviados',
'database': 'banco de dados',
'database %s select': 'Selecionar banco de dados %s',
'db': 'bd',
'design': 'design',
'Documentation': 'Documentation',
'done!': 'concluído!',
'edit profile': 'editar perfil',
'export as csv file': 'exportar como um arquivo csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'requisição inválida',
'located in the file': 'located in the file',
'login': 'Entrar',
'logout': 'Sair',
'lost password?': 'lost password?',
'new record inserted': 'novo registro inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importar de um arquivo csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registro',
'record does not exist': 'registro não existe',
'record id': 'id do registro',
'register': 'Registre-se',
'selected': 'selecionado',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível analisar arquivo csv',
}

Added applications/mobileblur/languages/pt-pt.py version [6f522fc1e4].





















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas eliminadas',
'%s rows updated': '%s linhas actualizadas',
'About': 'About',
'Author Reference Auth User': 'Author Reference Auth User',
'Author Reference Auth User.username': 'Author Reference Auth User.username',
'Available databases and tables': 'bases de dados e tabelas disponíveis',
'Cannot be empty': 'não pode ser vazio',
'Category Create': 'Category Create',
'Category Select': 'Category Select',
'Check to delete': 'seleccione para eliminar',
'Comment Create': 'Comment Create',
'Comment Select': 'Comment Select',
'Content': 'Content',
'Controller': 'Controlador',
'Copyright': 'Direitos de cópia',
'Created By': 'Created By',
'Created On': 'Created On',
'Current request': 'pedido currente',
'Current response': 'resposta currente',
'Current session': 'sessão currente',
'DB Model': 'Modelo de BD',
'Database': 'Base de dados',
'Delete:': 'Eliminar:',
'Edit': 'Editar',
'Edit This App': 'Edite esta aplicação',
'Edit current record': 'Edição de registo currente',
'Email': 'Email',
'First Name': 'First Name',
'For %s #%s': 'For %s #%s',
'Hello World': 'Olá Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Índice',
'Internal State': 'Estado interno',
'Invalid Query': 'Consulta Inválida',
'Last Name': 'Last Name',
'Layout': 'Esboço',
'Main Menu': 'Menu Principal',
'Menu Model': 'Menu do Modelo',
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
'New Record': 'Novo Registo',
'No Data': 'No Data',
'No databases in this application': 'Não há bases de dados nesta aplicação',
'Password': 'Password',
'Post Create': 'Post Create',
'Post Select': 'Post Select',
'Powered by': 'Suportado por',
'Query:': 'Interrogação:',
'Replyto Reference Post': 'Replyto Reference Post',
'Rows in table': 'Linhas numa tabela',
'Rows selected': 'Linhas seleccionadas',
'Stylesheet': 'Folha de estilo',
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "query" é uma condição do tipo "db.table1.field1==\'value\'". Algo como "db.table1.field1==db.table2.field2" resultaria num SQL JOIN.',
'Title': 'Title',
'Update:': 'Actualização:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Utilize (...)&(...) para AND, (...)|(...) para OR, e ~(...)  para NOT para construir interrogações mais complexas.',
'Username': 'Username',
'View': 'Vista',
'Welcome %s': 'Bem-vindo(a) %s',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
'When': 'When',
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
'cache': 'cache',
'change password': 'alterar palavra-chave',
'Online examples': 'Exemplos online',
'Administrative interface': 'Painel administrativo',
'create new category': 'create new category',
'create new comment': 'create new comment',
'create new post': 'create new post',
'customize me!': 'Personaliza-me!',
'data uploaded': 'informação enviada',
'database': 'base de dados',
'database %s select': 'selecção de base de dados %s',
'db': 'bd',
'design': 'design',
'done!': 'concluído!',
'edit category': 'edit category',
'edit comment': 'edit comment',
'edit post': 'edit post',
'edit profile': 'Editar perfil',
'export as csv file': 'exportar como ficheiro csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'Pedido Inválido',
'login': 'login',
'logout': 'logout',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importe a partir de ficheiro csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registo',
'record does not exist': 'registo inexistente',
'record id': 'id de registo',
'register': 'register',
'search category': 'search category',
'search comment': 'search comment',
'search post': 'search post',
'select category': 'select category',
'select comment': 'select comment',
'select post': 'select post',
'selected': 'seleccionado(s)',
'show category': 'show category',
'show comment': 'show comment',
'show post': 'show post',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível carregar ficheiro csv',
}

Added applications/mobileblur/languages/pt.py version [6f522fc1e4].





















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas eliminadas',
'%s rows updated': '%s linhas actualizadas',
'About': 'About',
'Author Reference Auth User': 'Author Reference Auth User',
'Author Reference Auth User.username': 'Author Reference Auth User.username',
'Available databases and tables': 'bases de dados e tabelas disponíveis',
'Cannot be empty': 'não pode ser vazio',
'Category Create': 'Category Create',
'Category Select': 'Category Select',
'Check to delete': 'seleccione para eliminar',
'Comment Create': 'Comment Create',
'Comment Select': 'Comment Select',
'Content': 'Content',
'Controller': 'Controlador',
'Copyright': 'Direitos de cópia',
'Created By': 'Created By',
'Created On': 'Created On',
'Current request': 'pedido currente',
'Current response': 'resposta currente',
'Current session': 'sessão currente',
'DB Model': 'Modelo de BD',
'Database': 'Base de dados',
'Delete:': 'Eliminar:',
'Edit': 'Editar',
'Edit This App': 'Edite esta aplicação',
'Edit current record': 'Edição de registo currente',
'Email': 'Email',
'First Name': 'First Name',
'For %s #%s': 'For %s #%s',
'Hello World': 'Olá Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Índice',
'Internal State': 'Estado interno',
'Invalid Query': 'Consulta Inválida',
'Last Name': 'Last Name',
'Layout': 'Esboço',
'Main Menu': 'Menu Principal',
'Menu Model': 'Menu do Modelo',
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
'New Record': 'Novo Registo',
'No Data': 'No Data',
'No databases in this application': 'Não há bases de dados nesta aplicação',
'Password': 'Password',
'Post Create': 'Post Create',
'Post Select': 'Post Select',
'Powered by': 'Suportado por',
'Query:': 'Interrogação:',
'Replyto Reference Post': 'Replyto Reference Post',
'Rows in table': 'Linhas numa tabela',
'Rows selected': 'Linhas seleccionadas',
'Stylesheet': 'Folha de estilo',
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "query" é uma condição do tipo "db.table1.field1==\'value\'". Algo como "db.table1.field1==db.table2.field2" resultaria num SQL JOIN.',
'Title': 'Title',
'Update:': 'Actualização:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Utilize (...)&(...) para AND, (...)|(...) para OR, e ~(...)  para NOT para construir interrogações mais complexas.',
'Username': 'Username',
'View': 'Vista',
'Welcome %s': 'Bem-vindo(a) %s',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
'When': 'When',
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
'cache': 'cache',
'change password': 'alterar palavra-chave',
'Online examples': 'Exemplos online',
'Administrative interface': 'Painel administrativo',
'create new category': 'create new category',
'create new comment': 'create new comment',
'create new post': 'create new post',
'customize me!': 'Personaliza-me!',
'data uploaded': 'informação enviada',
'database': 'base de dados',
'database %s select': 'selecção de base de dados %s',
'db': 'bd',
'design': 'design',
'done!': 'concluído!',
'edit category': 'edit category',
'edit comment': 'edit comment',
'edit post': 'edit post',
'edit profile': 'Editar perfil',
'export as csv file': 'exportar como ficheiro csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'Pedido Inválido',
'login': 'login',
'logout': 'logout',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importe a partir de ficheiro csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registo',
'record does not exist': 'registo inexistente',
'record id': 'id de registo',
'register': 'register',
'search category': 'search category',
'search comment': 'search comment',
'search post': 'search post',
'select category': 'select category',
'select comment': 'select comment',
'select post': 'select post',
'selected': 'seleccionado(s)',
'show category': 'show category',
'show comment': 'show comment',
'show post': 'show post',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível carregar ficheiro csv',
}

Added applications/mobileblur/languages/ru-ru.py version [628e206f31].

































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Изменить" - необязательное выражение вида "field1=\'новое значение\'". Результаты операции JOIN нельзя изменить или удалить.',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s строк удалено',
'%s rows updated': '%s строк изменено',
'Available databases and tables': 'Базы данных и таблицы',
'Cannot be empty': 'Пустое значение недопустимо',
'Change Password': 'Смените пароль',
'Check to delete': 'Удалить',
'Check to delete:': 'Удалить:',
'Client IP': 'Client IP',
'Current request': 'Текущий запрос',
'Current response': 'Текущий ответ',
'Current session': 'Текущая сессия',
'Delete:': 'Удалить:',
'Description': 'Описание',
'E-mail': 'E-mail',
'Edit Profile': 'Редактировать профиль',
'Edit current record': 'Редактировать текущую запись',
'First name': 'Имя',
'Group ID': 'Group ID',
'Hello World': 'Заработало!',
'Import/Export': 'Импорт/экспорт',
'Internal State': 'Внутренне состояние',
'Invalid Query': 'Неверный запрос',
'Invalid email': 'Неверный email',
'Invalid login': 'Неверный логин',
'Invalid password': 'Неверный пароль',
'Last name': 'Фамилия',
'Logged in': 'Вход выполнен',
'Logged out': 'Выход выполнен',
'Login': 'Вход',
'Logout': 'Выход',
'Lost Password': 'Забыли пароль?',
'Name': 'Name',
'New Record': 'Новая запись',
'New password': 'Новый пароль',
'No databases in this application': 'В приложении нет баз данных',
'Old password': 'Старый пароль',
'Origin': 'Происхождение',
'Password': 'Пароль',
"Password fields don't match": 'Пароли не совпадают',
'Query:': 'Запрос:',
'Record ID': 'ID записи',
'Register': 'Зарегистрироваться',
'Registration key': 'Ключ регистрации',
'Remember me (for 30 days)': 'Запомнить меня (на 30 дней)',
'Reset Password key': 'Сбросить ключ пароля',
'Role': 'Роль',
'Rows in table': 'Строк в таблице',
'Rows selected': 'Выделено строк',
'Submit': 'Отправить',
'Sure you want to delete this object?': 'Подтвердите удаление объекта',
'Table name': 'Имя таблицы',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Запрос" - это условие вида "db.table1.field1==\'значение\'". Выражение вида "db.table1.field1==db.table2.field2" формирует SQL JOIN.',
'Timestamp': 'Отметка времени',
'Update:': 'Изменить:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Для построение сложных запросов используйте операторы "И": (...)&(...), "ИЛИ": (...)|(...), "НЕ": ~(...).',
'User %(id)s Logged-in': 'Пользователь %(id)s вошёл',
'User %(id)s Logged-out': 'Пользователь %(id)s вышел',
'User %(id)s Password changed': 'Пользователь %(id)s сменил пароль',
'User %(id)s Profile updated': 'Пользователь %(id)s обновил профиль',
'User %(id)s Registered': 'Пользователь %(id)s зарегистрировался',
'User ID': 'ID пользователя',
'Verify Password': 'Повторите пароль',
'Welcome to web2py': 'Добро пожаловать в web2py',
'Online examples': 'примеры он-лайн',
'Administrative interface': 'административный интерфейс',
'customize me!': 'настройте внешний вид!',
'data uploaded': 'данные загружены',
'database': 'база данных',
'database %s select': 'выбор базы данных %s',
'db': 'БД',
'design': 'дизайн',
'done!': 'готово!',
'export as csv file': 'экспорт в  csv-файл',
'insert new': 'добавить',
'insert new %s': 'добавить %s',
'invalid request': 'неверный запрос',
'login': 'вход',
'logout': 'выход',
'new record inserted': 'новая запись добавлена',
'next 100 rows': 'следующие 100 строк',
'or import from csv file': 'или импорт из csv-файла',
'password': 'пароль',
'previous 100 rows': 'предыдущие 100 строк',
'profile': 'профиль',
'record does not exist': 'запись не найдена',
'record id': 'id записи',
'selected': 'выбрано',
'state': 'состояние',
'table': 'таблица',
'unable to parse csv file': 'нечитаемый csv-файл',
}

Added applications/mobileblur/languages/sk-sk.py version [928c03512a].
















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je voliteľný výraz ako "field1=\'newvalue\'". Nemôžete upravovať alebo zmazať výsledky JOINu',
'%Y-%m-%d': '%d.%m.%Y',
'%Y-%m-%d %H:%M:%S': '%d.%m.%Y %H:%M:%S',
'%s rows deleted': '%s zmazaných záznamov',
'%s rows updated': '%s upravených záznamov',
'Available databases and tables': 'Dostupné databázy a tabuľky',
'Cannot be empty': 'Nemôže byť prázdne',
'Check to delete': 'Označiť na zmazanie',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Aktuálna požiadavka',
'Current response': 'Aktuálna odpoveď',
'Current session': 'Aktuálne sedenie',
'DB Model': 'DB Model',
'Database': 'Databáza',
'Delete:': 'Zmazať:',
'Description': 'Popis',
'Edit': 'Upraviť',
'Edit Profile': 'Upraviť profil',
'Edit current record': 'Upraviť aktuálny záznam',
'First name': 'Krstné meno',
'Group ID': 'ID skupiny',
'Hello World': 'Ahoj svet',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Vnútorný stav',
'Invalid email': 'Neplatný email',
'Invalid Query': 'Neplatná otázka',
'Invalid password': 'Nesprávne heslo',
'Last name': 'Priezvisko',
'Layout': 'Layout',
'Logged in': 'Prihlásený',
'Logged out': 'Odhlásený',
'Lost Password': 'Stratené heslo?',
'Menu Model': 'Menu Model',
'Name': 'Meno',
'New Record': 'Nový záznam',
'New password': 'Nové heslo',
'No databases in this application': 'V tejto aplikácii nie sú databázy',
'Old password': 'Staré heslo',
'Origin': 'Pôvod',
'Password': 'Heslo',
'Powered by': 'Powered by',
'Query:': 'Otázka:',
'Record ID': 'ID záznamu',
'Register': 'Zaregistrovať sa',
'Registration key': 'Registračný kľúč',
'Remember me (for 30 days)': 'Zapamätaj si ma (na 30 dní)',
'Reset Password key': 'Nastaviť registračný kľúč',
'Role': 'Rola',
'Rows in table': 'riadkov v tabuľke',
'Rows selected': 'označených riadkov',
'Submit': 'Odoslať',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Ste si istí, že chcete zmazať tento objekt?',
'Table name': 'Názov tabuľky',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"query" je podmienka ako "db.table1.field1==\'value\'". Niečo ako "db.table1.field1==db.table2.field2" má za výsledok SQL JOIN.',
'The output of the file is a dictionary that was rendered by the view': 'Výstup zo súboru je slovník, ktorý bol zobrazený vo view',
'This is a copy of the scaffolding application': 'Toto je kópia skeletu aplikácie',
'Timestamp': 'Časová pečiatka',
'Update:': 'Upraviť:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Použite (...)&(...) pre AND, (...)|(...) pre OR a ~(...) pre NOT na poskladanie komplexnejších otázok.',
'User %(id)s Logged-in': 'Používateľ %(id)s prihlásený',
'User %(id)s Logged-out': 'Používateľ %(id)s odhlásený',
'User %(id)s Password changed': 'Používateľ %(id)s zmenil heslo',
'User %(id)s Profile updated': 'Používateľ %(id)s upravil profil',
'User %(id)s Registered': 'Používateľ %(id)s sa zaregistroval',
'User ID': 'ID používateľa',
'Verify Password': 'Zopakujte heslo',
'View': 'Zobraziť',
'Welcome to web2py': 'Vitajte vo web2py',
'Which called the function': 'Ktorý zavolal funkciu',
'You are successfully running web2py': 'Úspešne ste spustili web2py',
'You can modify this application and adapt it to your needs': 'Môžete upraviť túto aplikáciu a prispôsobiť ju svojim potrebám',
'You visited the url': 'Navštívili ste URL',
'appadmin is disabled because insecure channel': 'appadmin je zakázaný bez zabezpečeného spojenia',
'cache': 'cache',
'Online examples': 'pre online príklady kliknite sem',
'Administrative interface': 'pre administrátorské rozhranie kliknite sem',
'customize me!': 'prispôsob ma!',
'data uploaded': 'údaje naplnené',
'database': 'databáza',
'database %s select': 'databáza %s výber',
'db': 'db',
'design': 'návrh',
'Documentation': 'Dokumentácia',
'done!': 'hotovo!',
'export as csv file': 'exportovať do csv súboru',
'insert new': 'vložiť nový záznam ',
'insert new %s': 'vložiť nový  záznam %s',
'invalid request': 'Neplatná požiadavka',
'located in the file': 'nachádzajúci sa v súbore ',
'login': 'prihlásiť',
'logout': 'odhlásiť',
'lost password?': 'stratené heslo?',
'new record inserted': 'nový záznam bol vložený',
'next 100 rows': 'ďalších 100 riadkov',
'or import from csv file': 'alebo naimportovať z csv súboru',
'password': 'heslo',
'previous 100 rows': 'predchádzajúcich 100 riadkov',
'record': 'záznam',
'record does not exist': 'záznam neexistuje',
'record id': 'id záznamu',
'register': 'registrovať',
'selected': 'označených',
'state': 'stav',
'table': 'tabuľka',
'unable to parse csv file': 'nedá sa načítať csv súbor',
}

Added applications/mobileblur/languages/zh-tw.py version [b37aeebf91].






































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '已刪除 %s 筆',
'%s rows updated': '已更新 %s 筆',
'(something like "it-it")': '(格式類似 "zh-tw")',
'A new version of web2py is available': '新版的 web2py 已發行',
'A new version of web2py is available: %s': '新版的 web2py 已發行: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '注意: 登入管理帳號需要安全連線(HTTPS)或是在本機連線(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '注意: 因為在測試模式不保證多執行緒安全性,也就是說不可以同時執行多個測試案例',
'ATTENTION: you cannot edit the running application!': '注意:不可編輯正在執行的應用程式!',
'About': '關於',
'About application': '關於本應用程式',
'Admin is disabled because insecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Admin is disabled because unsecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Administrator Password:': '管理員密碼:',
'Are you sure you want to delete file "%s"?': '確定要刪除檔案"%s"?',
'Are you sure you want to uninstall application "%s"': '確定要移除應用程式 "%s"',
'Are you sure you want to uninstall application "%s"?': '確定要移除應用程式 "%s"',
'Authentication': '驗證',
'Available databases and tables': '可提供的資料庫和資料表',
'Cannot be empty': '不可空白',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': '無法編譯:應用程式中含有錯誤,請除錯後再試一次.',
'Change Password': '變更密碼',
'Check to delete': '打勾代表刪除',
'Check to delete:': '點選以示刪除:',
'Client IP': '客戶端網址(IP)',
'Controller': '控件',
'Controllers': '控件',
'Copyright': '版權所有',
'Create new application': '創建應用程式',
'Current request': '目前網路資料要求(request)',
'Current response': '目前網路資料回應(response)',
'Current session': '目前網路連線資訊(session)',
'DB Model': '資料庫模組',
'DESIGN': '設計',
'Database': '資料庫',
'Date and Time': '日期和時間',
'Delete': '刪除',
'Delete:': '刪除:',
'Deploy on Google App Engine': '配置到 Google App Engine',
'Description': '描述',
'Design for': '設計為了',
'E-mail': '電子郵件',
'EDIT': '編輯',
'Edit': '編輯',
'Edit Profile': '編輯設定檔',
'Edit This App': '編輯本應用程式',
'Edit application': '編輯應用程式',
'Edit current record': '編輯當前紀錄',
'Editing file': '編輯檔案',
'Editing file "%s"': '編輯檔案"%s"',
'Error logs for "%(app)s"': '"%(app)s"的錯誤紀錄',
'First name': '名',
'Functions with no doctests will result in [passed] tests.': '沒有 doctests 的函式會顯示 [passed].',
'Group ID': '群組編號',
'Hello World': '嗨! 世界',
'Import/Export': '匯入/匯出',
'Index': '索引',
'Installed applications': '已安裝應用程式',
'Internal State': '內部狀態',
'Invalid Query': '不合法的查詢',
'Invalid action': '不合法的動作(action)',
'Invalid email': '不合法的電子郵件',
'Language files (static strings) updated': '語言檔已更新',
'Languages': '各國語言',
'Last name': '姓',
'Last saved on:': '最後儲存時間:',
'Layout': '網頁配置',
'License for': '軟體版權為',
'Login': '登入',
'Login to the Administrative Interface': '登入到管理員介面',
'Logout': '登出',
'Lost Password': '密碼遺忘',
'Main Menu': '主選單',
'Menu Model': '選單模組(menu)',
'Models': '資料模組',
'Modules': '程式模組',
'NO': '否',
'Name': '名字',
'New Record': '新紀錄',
'No databases in this application': '這應用程式不含資料庫',
'Origin': '原文',
'Original/Translation': '原文/翻譯',
'Password': '密碼',
"Password fields don't match": '密碼欄不匹配',
'Peeking at file': '選擇檔案',
'Powered by': '基於以下技術構建:',
'Query:': '查詢:',
'Record ID': '紀錄編號',
'Register': '註冊',
'Registration key': '註冊金鑰',
'Remember me (for 30 days)': '記住我(30 天)',
'Reset Password key': '重設密碼',
'Resolve Conflict file': '解決衝突檔案',
'Role': '角色',
'Rows in table': '在資料表裏的資料',
'Rows selected': '筆資料被選擇',
'Saved file hash:': '檔案雜湊值已紀錄:',
'Static files': '靜態檔案',
'Stylesheet': '網頁風格檔',
'Submit': '傳送',
'Sure you want to delete this object?': '確定要刪除此物件?',
'Table name': '資料表名稱',
'Testing application': '測試中的應用程式',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"查詢"是一個像 "db.表1.欄位1==\'值\'" 的條件式. 以"db.表1.欄位1==db.表2.欄位2"方式則相當於執行 JOIN SQL.',
'There are no controllers': '沒有控件(controllers)',
'There are no models': '沒有資料庫模組(models)',
'There are no modules': '沒有程式模組(modules)',
'There are no static files': '沒有靜態檔案',
'There are no translators, only default language is supported': '沒有翻譯檔,只支援原始語言',
'There are no views': '沒有視圖',
'This is the %(filename)s template': '這是%(filename)s檔案的樣板(template)',
'Ticket': '問題單',
'Timestamp': '時間標記',
'Unable to check for upgrades': '無法做升級檢查',
'Unable to download': '無法下載',
'Unable to download app': '無法下載應用程式',
'Update:': '更新:',
'Upload existing application': '更新存在的應用程式',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': '使用下列方式來組合更複雜的條件式, (...)&(...) 代表同時存在的條件, (...)|(...) 代表擇一的條件, ~(...)則代表反向條件.',
'User %(id)s Logged-in': '使用者 %(id)s 已登入',
'User %(id)s Registered': '使用者 %(id)s 已註冊',
'User ID': '使用者編號',
'Verify Password': '驗證密碼',
'View': '視圖',
'Views': '視圖',
'Welcome %s': '歡迎 %s',
'Welcome to web2py': '歡迎使用 web2py',
'YES': '是',
'about': '關於',
'appadmin is disabled because insecure channel': '因為來自非安全通道,管理介面關閉',
'cache': '快取記憶體',
'change password': '變更密碼',
'Online examples': '點此處進入線上範例',
'Administrative interface': '點此處進入管理介面',
'customize me!': '請調整我!',
'data uploaded': '資料已上傳',
'database': '資料庫',
'database %s select': '已選擇 %s 資料庫',
'db': 'db',
'design': '設計',
'done!': '完成!',
'edit profile': '編輯設定檔',
'export as csv file': '以逗號分隔檔(csv)格式匯出',
'insert new': '插入新資料',
'insert new %s': '插入新資料 %s',
'invalid request': '不合法的網路要求(request)',
'login': '登入',
'logout': '登出',
'new record inserted': '已插入新紀錄',
'next 100 rows': '往後 100 筆',
'or import from csv file': '或是從逗號分隔檔(CSV)匯入',
'previous 100 rows': '往前 100 筆',
'record': '紀錄',
'record does not exist': '紀錄不存在',
'record id': '紀錄編號',
'register': '註冊',
'selected': '已選擇',
'state': '狀態',
'table': '資料表',
'unable to parse csv file': '無法解析逗號分隔檔(csv)',
}

Added applications/mobileblur/models/db.py version [f6575d3cb8].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################

if request.env.web2py_runtime_gae:            # if running on Google App Engine
    db = DAL('google:datastore')              # connect to Google BigTable
                                              # optional DAL('gae://namespace')
    session.connect(request, response, db = db) # and store sessions and tickets there
    ### or use the following lines to store sessions in Memcache
    # from gluon.contrib.memdb import MEMDB
    # from google.appengine.api.memcache import Client
    # session.connect(request, response, db = MEMDB(Client()))
else:                                         # else use a normal relational database
    db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or other DB

# 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 []

#########################################################################
## Here is sample code if you need for
## - email capabilities
## - authentication (registration, login, logout, ... )
## - authorization (role based authorization)
## - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)
## - crud actions
## (more options discussed in gluon/tools.py)
#########################################################################

from gluon.tools import Mail, Auth, Crud, Service, PluginManager, prettydate
mail = Mail()                                  # mailer
auth = Auth(db)                                # authentication/authorization
crud = Crud(db)                                # for CRUD helpers using auth
service = Service()                            # for json, xml, jsonrpc, xmlrpc, amfrpc
plugins = PluginManager()                      # for configuring plugins

mail.settings.server = 'logging' or 'smtp.gmail.com:587'  # your SMTP server
mail.settings.sender = 'you@gmail.com'         # your email
mail.settings.login = 'username:password'      # your credentials or None

auth.settings.hmac_key = '<your secret key>'   # before define_tables()
auth.define_tables()                           # creates all needed tables
auth.settings.mailer = mail                    # for user email verification
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
auth.settings.reset_password_requires_verification = True
auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'

#########################################################################
## If you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
## register with janrain.com, uncomment and customize following
# from gluon.contrib.login_methods.rpx_account import RPXAccount
# auth.settings.actions_disabled = \
#    ['register','change_password','request_reset_password']
# auth.settings.login_form = RPXAccount(request, api_key='...',domain='...',
#    url = "http://localhost:8000/%s/default/user/login" % request.application)
## other login methods are in gluon/contrib/login_methods
#########################################################################

crud.settings.auth = None        # =auth to enforce authorization on crud

#########################################################################
## Define your tables below (or better in another model file) for example
##
## >>> db.define_table('mytable',Field('myfield','string'))
##
## Fields can be 'string','text','password','integer','double','boolean'
##       'date','time','datetime','blob','upload', 'reference TABLENAME'
## There is an implicit 'id integer autoincrement' field
## Consult manual for more options, validators, etc.
##
## More API examples for controllers:
##
## >>> db.mytable.insert(myfield='value')
## >>> rows=db(db.mytable.myfield=='value').select(db.mytable.ALL)
## >>> for row in rows: print row.id, row.myfield
#########################################################################

Added applications/mobileblur/models/menu.py version [2fb70868d5].































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- 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.title = request.application
response.subtitle = T('customize me!')

#http://dev.w3.org/html5/markup/meta.name.html
response.meta.author = 'you'
response.meta.description = 'Free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python'
response.meta.keywords = 'web2py, python, framework'
response.meta.generator = 'Web2py Enterprise Framework'
response.meta.copyright = 'Copyright 2007-2010'


##########################################
## this is the main application menu
## add/remove items as required
##########################################

response.menu = [
    (T('Home'), False, URL('default','index'), [])
    ]

##########################################
## this is here to provide shortcuts
## during development. remove in production
##
## mind that plugins may also affect menu
##########################################

#########################################
## Make your own menus
##########################################

response.menu+=[
    (T('This App'), False, URL('admin', 'default', 'design/%s' % request.application),
     [
            (T('Controller'), False,
             URL('admin', 'default', 'edit/%s/controllers/%s.py' \
                     % (request.application,request.controller=='appadmin' and
                        'default' or request.controller))),
            (T('View'), False,
             URL('admin', 'default', 'edit/%s/views/%s' \
                     % (request.application,response.view))),
            (T('Layout'), False,
             URL('admin', 'default', 'edit/%s/views/layout.html' \
                     % request.application)),
            (T('Stylesheet'), False,
             URL('admin', 'default', 'edit/%s/static/base.css' \
                     % request.application)),
            (T('DB Model'), False,
             URL('admin', 'default', 'edit/%s/models/db.py' \
                     % request.application)),
            (T('Menu Model'), False,
             URL('admin', 'default', 'edit/%s/models/menu.py' \
                     % request.application)),
            (T('Database'), False,
             URL(request.application, 'appadmin', 'index')),

            (T('Errors'), False,
             URL('admin', 'default', 'errors/%s' \
                     % request.application)),

            (T('About'), False,
             URL('admin', 'default', 'about/%s' \
                     % request.application)),

            ]
   )]


##########################################
## this is here to provide shortcuts to some resources
## during development. remove in production
##
## mind that plugins may also affect menu
##########################################


response.menu+=[(T('Resources'), False, None,
     [
    (T('Documentation'), False, 'http://www.web2py.com/book',
        [
        (T('Preface'), False, 'http://www.web2py.com/book/default/chapter/00'),
        (T('Introduction'), False, 'http://www.web2py.com/book/default/chapter/01'),
        (T('Python'), False, 'http://www.web2py.com/book/default/chapter/02'),
        (T('Overview'), False, 'http://www.web2py.com/book/default/chapter/03'),
        (T('The Core'), False, 'http://www.web2py.com/book/default/chapter/04'),
        (T('The Views'), False, 'http://www.web2py.com/book/default/chapter/05'),
        (T('Database'), False, 'http://www.web2py.com/book/default/chapter/06'),
        (T('Forms and Validators'), False, 'http://www.web2py.com/book/default/chapter/07'),
        (T('Access Control'), False, 'http://www.web2py.com/book/default/chapter/08'),
        (T('Services'), False, 'http://www.web2py.com/book/default/chapter/09'),
        (T('Ajax Recipes'), False, 'http://www.web2py.com/book/default/chapter/10'),
        (T('Deployment Recipes'), False, 'http://www.web2py.com/book/default/chapter/11'),
        (T('Other Recipes'), False, 'http://www.web2py.com/book/default/chapter/12'),
        (T('Buy this book'), False, 'http://stores.lulu.com/web2py'),
        ]),

    (T('Community'), False, None,
        [
        (T('Groups'), False, 'http://www.web2py.com/examples/default/usergroups'),
        (T('Twitter'), False, 'http://twitter.com/web2py'),
        (T('Live chat'), False, 'http://mibbit.com/?channel=%23web2py&server=irc.mibbit.net'),
        (T('User Voice'), False, 'http://web2py.uservoice.com/'),
        ]),

    (T('Web2py'), False, 'http://www.web2py.com',
        [
        (T('Download'), False, 'http://www.web2py.com/examples/default/download'),
        (T('Support'), False, 'http://www.web2py.com/examples/default/support'),
        (T('Quick Examples'), False, 'http://web2py.com/examples/default/examples'),
        (T('FAQ'), False, 'http://web2py.com/AlterEgo'),
        (T('Free Applications'), False, 'http://web2py.com/appliances'),
        (T('Plugins'), False, 'http://web2py.com/plugins'),
        (T('Recipes'), False, 'http://web2pyslices.com/'),
        (T('Demo'), False, 'http://web2py.com/demo_admin'),
        (T('Semantic'), False, 'http://web2py.com/semantic'),
        (T('Layouts'), False, 'http://web2py.com/layouts'),
        (T('Videos'), False, 'http://www.web2py.com/examples/default/videos/'),
        ]),
    ]
   )]

Added applications/mobileblur/modules/__init__.py version [da39a3ee5e].

Added applications/mobileblur/modules/newsblur.py version [9e60ae12cf].



























































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python

"""newsblur.py - An API wrapper library for newsblur.com"""

import cookielib
import simplejson
import urllib
import urllib2

__author__ = 'Dananjaya Ramanayake <dananjaya86@gmail.com>, spiffytech <spiffytechgmail.com>'
__version__ = "0.1"


# Set up cookie handling so we can auth with the Newsblur API
cj = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
urllib2.install_opener(opener)

nb_url = "http://newsblur.com/"


def login(username,password):
    '''
    
    Login as an existing user.
    If a user has no password set, you cannot just send any old password. 
    Required parameters, username and password, must be of string type.
    
    '''
    url = nb_url + 'api/login'
    params = urllib.urlencode({'username':username,'password':password})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def logout():
    '''
    
    Logout the currently logged in user.
    
    '''
    url = nb_url + 'api/logout'
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def signup(username,password,email):
    '''
    
    Create a new user.
    All three required parameters must be of type string.
    
    '''
    url = nb_url + 'api/signup'
    params = urllib.urlencode({'signup_username':username,'signup_password':password,'signup_email':email})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def search_feed(address,offset=1):
    '''
    
    Retrieve information about a feed from its website or RSS address.
    Parameter address must be of type string while parameter offset must be an integer.
    Will return a feed.
    
    '''
    url = nb_url + 'rss_feeds/search_feed?%s'
    params = urllib.urlencode({'address':address,'offset':offset})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def feeds(include_favicons=True,flat=False):
    '''
    
    Retrieve a list of feeds to which a user is actively subscribed.
        Includes the 3 unread counts (positive, neutral, negative), as well as optional favicons.

        '''
    
    url = nb_url + 'reader/feeds'
    params = urllib.urlencode({'include_favicons':include_favicons,'flat':flat})
#    print url + " " + url % params
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)


def favicons(feeds=[1,2,3]):
    '''
    
    Retrieve a list of favicons for a list of feeds. 
    Used when combined with /reader/feeds and include_favicons=false, so the feeds request contains far less data. 
    Useful for mobile devices, but requires a second request. 
    
    '''
    url = nb_url + 'reader/favicons?%s'
    params = urllib.urlencode({'feeds':feeds})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)
    
def id(id_no):
    '''
    
    Retrieve the original page from a single feed.
    
    '''
    url = nb_url + 'reader/page/%d' % id_no
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def refresh_feeds():
    '''
    
    Up-to-the-second unread counts for each active feed.
        Poll for these counts no more than once a minute.
        
        '''

    url = nb_url + 'reader/refresh_feeds'
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def feeds_trainer(feed_id):
    '''
    
     Retrieves all popular and known intelligence classifiers.
        Also includes user's own classifiers.
        
        '''

    url = nb_url + 'reader/feeds_trainer?%s'
    params = urllib.urlencode({'feed_id':feed_id})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def statistics(id_no):
    '''
    
    If you only want a user's classifiers, use /classifiers/:id.
        Omit the feed_id to get all classifiers for all subscriptions.
        
        '''

    url = nb_url + 'rss_feeds/statistics/%d' % id_no
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def feed_autocomplete(term):
    '''
    
    Get a list of feeds that contain a search phrase.
        Searches by feed address, feed url, and feed title, in that order.
        Will only show sites with 2+ subscribers.
        
        '''
    url = nb_url + 'rss_feeds/feed_autocomplete?%'
    params = urllib.urlencode({'term':term})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def feed(id=1):
    '''
    
    Retrieve stories from a single feed.
    
    '''
    url = nb_url + 'reader/feed/%d' % id
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def starred_stories(page=1):
    '''
    
    Retrieve a user's starred stories.
    
    '''
    url = nb_url + 'reader/starred_stories?%s'
    params = urllib.urlencode({'page':page})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def river_stories(feeds,page=1,read_stories_count=0):
    '''
    
    Retrieve stories from a collection of feeds. This is known as the River of News.
        Stories are ordered in reverse chronological order.
        
        '''

    url = nb_url + 'reader/river_stories?%s'
    params = urllib.urlencode({'feeds':feeds,'page':page,'read_stories_count':read_stories_count})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def mark_story_as_read(story_id,feed_id):
    '''
    
     Mark stories as read.
        Multiple story ids can be sent at once.
        Each story must be from the same feed.
        
        '''

    url = nb_url + 'reader/mark_story_as_read'
    params = urllib.urlencode({'story_id':story_id,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def mark_story_as_starred(story_id,feed_id):
    '''
    
    Mark a story as starred (saved).
    
    '''
    url = nb_url + 'reader/mark_story_as_starred'
    params = urllib.urlencode({'story_id':story_id,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def mark_all_as_read(days=0):
    '''
    
    Mark all stories in a feed or list of feeds as read.
    
    '''
    url = nb_url + 'reader/mark_all_as_read'
    params = urllib.urlencode({'days':days})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def add_url(url,folder='[Top Level]'):
    '''
    
    Add a feed by its URL. 
    Can be either the RSS feed or the website itself.
    
    '''
    url = nb_url + 'reader/add_url'
    params = urllib.urlencode({'url':url,'folder':folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def add_folder(folder,parent_folder='[Top Level]'):
    '''
    
    Add a new folder.
    
    '''
    
    url = nb_url + 'reader/add_folder'
    params = urllib.urlencode({'folder':folder,'parent_folder':parent_folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def rename_feed(feed_title,feed_id):
    '''
    
    Rename a feed title. Only the current user will see the new title.
    
    '''
    url = nb_url + 'reader/rename_feed'
    params = urllib.urlencode({'feed_title':feed_title,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def delete_feed(feed_id,in_folder):
    '''
    
    Unsubscribe from a feed. Removes it from the folder.
        Set the in_folder parameter to remove a feed from the correct folder, in case the user is subscribed to the feed in multiple folders.

        '''    
    url = nb_url + 'reader/delete_feed'
    params = urllib.urlencode({'feed_id':feed_id,'in_folder':in_folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def rename_folder(folder_to_rename,new_folder_name,in_folder):
    '''
    
    Rename a folder.
    
    '''
    url = nb_url + 'reader/rename_folder'
    params = urllib.urlencode({'folder_to_rename':folder_to_rename,'new_folder_name':new_folder_name,'in_folder':in_folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def delete_folder(folder_to_delete,in_folder,feed_id):
    '''
    
    Delete a folder and unsubscribe from all feeds inside.
    
    '''
    url = nb_url + 'reader/delete_folder'
    params = urllib.urlencode({'folder_to_delete':folder_to_delete,'in_folder':in_folder,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def mark_feed_as_read(feed_id):
    '''
    
    Mark a list of feeds as read.
    
    '''
    url = nb_url + 'reader/mark_feed_as_read'
    params = urllib.urlencode({'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def save_feed_order(folders):
    '''
    
    Reorder feeds and move them around between folders.
        The entire folder structure needs to be serialized.
        
        '''

    url = nb_url + 'reader/save_feed_order'
    params = urllib.urlencode({'folders':folders})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def classifier(id_no):
    '''
    
        Get the intelligence classifiers for a user's site.
        Only includes the user's own classifiers. 
        Use /reader/feeds_trainer for popular classifiers.
        
        '''

    url = nb_url + 'classifier/%d' % id_no
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)


def classifier_save(like_type,dislike_type,remove_like_type,remove_dislike_type):
    '''
    
    Save intelligence classifiers (tags, titles, authors, and the feed) for a feed.
    
        '''
    url = nb_url + 'classifier/save'
    params = urllib.urlencode({'like_[TYPE]':like_type,
                   'dislike_[TYPE]':dislike_type,
                    'remove_like_[TYPE]':remove_like_type,
                   'remove_dislike_[TYPE]':remove_dislike_type})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def opml_export():
    '''
    
    Download a backup of feeds and folders as an OPML file.
        Contains folders and feeds in XML; useful for importing in another RSS reader.
        
        '''
    url = nb_url + 'import/opml_export'
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)



def opml_upload(opml_file):
    '''
    
    Upload an OPML file.
    
    '''
    url = nb_url + 'import/opml_upload'
    f = open(opml_file)
    params = urllib.urlencode({'file':f})
    f.close()
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

Added applications/mobileblur/modules/python-newsblur/LICENSE version [6693b33ed3].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
The MIT License

Copyright (c) 2010-2011 Dananjaya Ramanayake dananjaya86@gmail.com.

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.

Added applications/mobileblur/modules/python-newsblur/MANIFEST version [e749dce9d4].






1
2
3
4
5
+
+
+
+
+
LICENSE
README.rst
documentation.rst
newsblur.py
setup.py

Added applications/mobileblur/modules/python-newsblur/README.rst version [d7a702d41c].
























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
===============
python-newsblur
===============

A Python wrapper library for accessing API of newsblur.com.

Copyright Dananjaya Ramanayake <dananjaya86@gmail.com>, released under the MIT license.

Source: https://github.com/dananjayavr/python-newsblur

For more information please check the newsblur.com API documentation at, http://www.newsblur.com/api


Installation
============
To install run

 ``python setup.py install``

Usage:
======

Please read the documentation.rst file.

Added applications/mobileblur/modules/python-newsblur/documentation.rst version [a28b00cf33].















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Login:

  ``import newsblur``

  ``newsblur.login('samuelclay','new$blur')``

Output:

  ``{"code": 1, "result": "ok"}``



Logout:

  ``newsblur.logout()``

Output:

  ``{"code": 1, "result": "ok"}``



Signup:
  
  ``newsblur.signup('samuelclay','new$blur','samuel@ofbrooklyn.com')``

Output (Successful):

  ``{"code": 1, "result": "ok"}``

Output (Unsuccessful):

  ``{"code": -1, "result": "ok"}``



Search Feed:

  ``newsblur.search_feed('techcrunch.com')``

Output:

  ``{"feed_address": "http://www.techcrunch.com/author/mg/", "updated": "5077 hours", "subs": 1, "feed_link": "[]", "favicon_fetching": true, "feed_title": "TechCrunch \xc2\xbb MG Siegler", "exception_type": "feed", "exception_code": 404, "result": "ok", "has_exception": true, "id": 237525, "favicon_color": null}``



Feeds:

  ``newsblur.feeds()``

Output:

  ``{"flat_folders": {"Blogs": [{"ps": 0, "feed_link": "http://kottke.org/", "feed_title": "kottke.org", "ng": 0, "nt": 0, "id": 39}, {"ps": 0, "feed_link": "http://blog.newsblur.com/", "feed_title": "The NewsBlur Blog", "ng": 0, "nt": 0, "id": 558041}, {"ps": 0, "feed_link": "http://www.waxy.org/links/", "feed_title": "Waxy.org Links", "ng": 0, "nt": 0, "id": 3581}, {"ps": 0, "feed_link": "http://xkcd.com/", "feed_title": "xkcd.com", "ng": 0, "nt": 1, "id": 169}], "Cooking": [{"ps": 0, "feed_link": "http://americandrink.net/", "feed_title": "American Drink", "ng": 0, "nt": 0, "id": 64313}, {"ps": 0, "feed_link": "http://saltandfat.com/", "feed_title": "Salt & Fat", "ng": 0, "nt": 0, "id": 48}, {"ps": 1, "feed_link": "http://savorysweetlife.com", "feed_title": "Savory Sweet Life", "ng": 0, "nt": 0, "id": 45}, {"ps": 0, "feed_link": "http://smittenkitchen.com", "feed_title": "smitten kitchen", "ng": 0, "nt": 0, "id": 47}], "Blogs - Photoblogs": [{"ps": 0, "feed_link": "http://iconicphotos.wordpress.com", "feed_title": "Iconic Photos", "ng": 0, "nt": 0, "id": 50}, {"ps": 0, "feed_link": "http://blog.pictorymag.com/", "feed_title": "Pictory Blog", "ng": 0, "nt": 0, "id": 551953}, {"ps": 0, "feed_link": "http://theimpossiblecool.tumblr.com/", "feed_title": "the impossible cool.", "ng": 0, "nt": 1, "id": 34}], "New York": [{"ps": 2, "feed_link": "http://gothamist.com/", "feed_title": "Gothamist", "ng": 4, "nt": 17, "id": 23}, {"ps": 0, "feed_link": "http://www.scoutingny.com", "feed_title": "Scouting NY", "ng": 0, "nt": 0, "id": 27}], "Tech": [{"ps": 0, "feed_link": "http://www.codinghorror.com/blog/", "feed_title": "Coding Horror", "ng": 0, "nt": 0, "id": 2}, {"ps": 2, "feed_link": "http://news.ycombinator.com/", "feed_title": "Hacker News", "ng": 0, "nt": 133, "id": 6}, {"ps": 0, "feed_link": "http://www.macrumors.com", "feed_title": "MacRumors: Mac News and Rumors - Front Page", "ng": 0, "nt": 1, "id": 11}, {"ps": 2, "feed_link": "http://techcrunch.com", "feed_title": "TechCrunch", "ng": 0, "nt": 7, "id": 12}], "Absolute Reads": [{"ps": 0, "feed_link": "http://daringfireball.net/", "feed_title": "Daring Fireball", "ng": 0, "nt": 0, "id": 3}, {"ps": 1, "feed_link": "http://www.avc.com/a_vc/", "feed_title": "Fred Wilson: A VC", "ng": 0, "nt": 0, "id": 159}, {"ps": 0, "feed_link": "http://blog.louisgray.com/", "feed_title": "louisgray.com", "ng": 0, "nt": 0, "id": 172}, {"ps": 0, "feed_link": "http://www.marco.org/", "feed_title": "Marco.org", "ng": 0, "nt": 0, "id": 76}, {"ps": 0, "feed_link": "http://www.randsinrepose.com/", "feed_title": "Rands In Repose", "ng": 0, "nt": 0, "id": 38}]}, "user": "conesus", "result": "ok"}``



Favicons:

  ``newsblur.favicons()``
  
Output:

  Will return a list of favicons



Retrieve a Page from the Feed:

  ``newsblur.id(32)``
  
Output:
 
  Will return the HTML data of the story.



  

Added applications/mobileblur/modules/python-newsblur/newsblur.py version [9e60ae12cf].



























































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python

"""newsblur.py - An API wrapper library for newsblur.com"""

import cookielib
import simplejson
import urllib
import urllib2

__author__ = 'Dananjaya Ramanayake <dananjaya86@gmail.com>, spiffytech <spiffytechgmail.com>'
__version__ = "0.1"


# Set up cookie handling so we can auth with the Newsblur API
cj = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
urllib2.install_opener(opener)

nb_url = "http://newsblur.com/"


def login(username,password):
    '''
    
    Login as an existing user.
    If a user has no password set, you cannot just send any old password. 
    Required parameters, username and password, must be of string type.
    
    '''
    url = nb_url + 'api/login'
    params = urllib.urlencode({'username':username,'password':password})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def logout():
    '''
    
    Logout the currently logged in user.
    
    '''
    url = nb_url + 'api/logout'
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def signup(username,password,email):
    '''
    
    Create a new user.
    All three required parameters must be of type string.
    
    '''
    url = nb_url + 'api/signup'
    params = urllib.urlencode({'signup_username':username,'signup_password':password,'signup_email':email})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def search_feed(address,offset=1):
    '''
    
    Retrieve information about a feed from its website or RSS address.
    Parameter address must be of type string while parameter offset must be an integer.
    Will return a feed.
    
    '''
    url = nb_url + 'rss_feeds/search_feed?%s'
    params = urllib.urlencode({'address':address,'offset':offset})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def feeds(include_favicons=True,flat=False):
    '''
    
    Retrieve a list of feeds to which a user is actively subscribed.
        Includes the 3 unread counts (positive, neutral, negative), as well as optional favicons.

        '''
    
    url = nb_url + 'reader/feeds'
    params = urllib.urlencode({'include_favicons':include_favicons,'flat':flat})
#    print url + " " + url % params
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)


def favicons(feeds=[1,2,3]):
    '''
    
    Retrieve a list of favicons for a list of feeds. 
    Used when combined with /reader/feeds and include_favicons=false, so the feeds request contains far less data. 
    Useful for mobile devices, but requires a second request. 
    
    '''
    url = nb_url + 'reader/favicons?%s'
    params = urllib.urlencode({'feeds':feeds})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)
    
def id(id_no):
    '''
    
    Retrieve the original page from a single feed.
    
    '''
    url = nb_url + 'reader/page/%d' % id_no
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def refresh_feeds():
    '''
    
    Up-to-the-second unread counts for each active feed.
        Poll for these counts no more than once a minute.
        
        '''

    url = nb_url + 'reader/refresh_feeds'
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def feeds_trainer(feed_id):
    '''
    
     Retrieves all popular and known intelligence classifiers.
        Also includes user's own classifiers.
        
        '''

    url = nb_url + 'reader/feeds_trainer?%s'
    params = urllib.urlencode({'feed_id':feed_id})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def statistics(id_no):
    '''
    
    If you only want a user's classifiers, use /classifiers/:id.
        Omit the feed_id to get all classifiers for all subscriptions.
        
        '''

    url = nb_url + 'rss_feeds/statistics/%d' % id_no
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def feed_autocomplete(term):
    '''
    
    Get a list of feeds that contain a search phrase.
        Searches by feed address, feed url, and feed title, in that order.
        Will only show sites with 2+ subscribers.
        
        '''
    url = nb_url + 'rss_feeds/feed_autocomplete?%'
    params = urllib.urlencode({'term':term})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def feed(id=1):
    '''
    
    Retrieve stories from a single feed.
    
    '''
    url = nb_url + 'reader/feed/%d' % id
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)

def starred_stories(page=1):
    '''
    
    Retrieve a user's starred stories.
    
    '''
    url = nb_url + 'reader/starred_stories?%s'
    params = urllib.urlencode({'page':page})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def river_stories(feeds,page=1,read_stories_count=0):
    '''
    
    Retrieve stories from a collection of feeds. This is known as the River of News.
        Stories are ordered in reverse chronological order.
        
        '''

    url = nb_url + 'reader/river_stories?%s'
    params = urllib.urlencode({'feeds':feeds,'page':page,'read_stories_count':read_stories_count})
    results = urllib2.urlopen(url % params).read()
    return simplejson.loads(results)

def mark_story_as_read(story_id,feed_id):
    '''
    
     Mark stories as read.
        Multiple story ids can be sent at once.
        Each story must be from the same feed.
        
        '''

    url = nb_url + 'reader/mark_story_as_read'
    params = urllib.urlencode({'story_id':story_id,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def mark_story_as_starred(story_id,feed_id):
    '''
    
    Mark a story as starred (saved).
    
    '''
    url = nb_url + 'reader/mark_story_as_starred'
    params = urllib.urlencode({'story_id':story_id,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def mark_all_as_read(days=0):
    '''
    
    Mark all stories in a feed or list of feeds as read.
    
    '''
    url = nb_url + 'reader/mark_all_as_read'
    params = urllib.urlencode({'days':days})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def add_url(url,folder='[Top Level]'):
    '''
    
    Add a feed by its URL. 
    Can be either the RSS feed or the website itself.
    
    '''
    url = nb_url + 'reader/add_url'
    params = urllib.urlencode({'url':url,'folder':folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def add_folder(folder,parent_folder='[Top Level]'):
    '''
    
    Add a new folder.
    
    '''
    
    url = nb_url + 'reader/add_folder'
    params = urllib.urlencode({'folder':folder,'parent_folder':parent_folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def rename_feed(feed_title,feed_id):
    '''
    
    Rename a feed title. Only the current user will see the new title.
    
    '''
    url = nb_url + 'reader/rename_feed'
    params = urllib.urlencode({'feed_title':feed_title,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def delete_feed(feed_id,in_folder):
    '''
    
    Unsubscribe from a feed. Removes it from the folder.
        Set the in_folder parameter to remove a feed from the correct folder, in case the user is subscribed to the feed in multiple folders.

        '''    
    url = nb_url + 'reader/delete_feed'
    params = urllib.urlencode({'feed_id':feed_id,'in_folder':in_folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def rename_folder(folder_to_rename,new_folder_name,in_folder):
    '''
    
    Rename a folder.
    
    '''
    url = nb_url + 'reader/rename_folder'
    params = urllib.urlencode({'folder_to_rename':folder_to_rename,'new_folder_name':new_folder_name,'in_folder':in_folder})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

def delete_folder(folder_to_delete,in_folder,feed_id):
    '''
    
    Delete a folder and unsubscribe from all feeds inside.
    
    '''
    url = nb_url + 'reader/delete_folder'
    params = urllib.urlencode({'folder_to_delete':folder_to_delete,'in_folder':in_folder,'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def mark_feed_as_read(feed_id):
    '''
    
    Mark a list of feeds as read.
    
    '''
    url = nb_url + 'reader/mark_feed_as_read'
    params = urllib.urlencode({'feed_id':feed_id})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def save_feed_order(folders):
    '''
    
    Reorder feeds and move them around between folders.
        The entire folder structure needs to be serialized.
        
        '''

    url = nb_url + 'reader/save_feed_order'
    params = urllib.urlencode({'folders':folders})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def classifier(id_no):
    '''
    
        Get the intelligence classifiers for a user's site.
        Only includes the user's own classifiers. 
        Use /reader/feeds_trainer for popular classifiers.
        
        '''

    url = nb_url + 'classifier/%d' % id_no
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)


def classifier_save(like_type,dislike_type,remove_like_type,remove_dislike_type):
    '''
    
    Save intelligence classifiers (tags, titles, authors, and the feed) for a feed.
    
        '''
    url = nb_url + 'classifier/save'
    params = urllib.urlencode({'like_[TYPE]':like_type,
                   'dislike_[TYPE]':dislike_type,
                    'remove_like_[TYPE]':remove_like_type,
                   'remove_dislike_[TYPE]':remove_dislike_type})
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)


def opml_export():
    '''
    
    Download a backup of feeds and folders as an OPML file.
        Contains folders and feeds in XML; useful for importing in another RSS reader.
        
        '''
    url = nb_url + 'import/opml_export'
    results = urllib2.urlopen(url).read()
    return simplejson.loads(results)



def opml_upload(opml_file):
    '''
    
    Upload an OPML file.
    
    '''
    url = nb_url + 'import/opml_upload'
    f = open(opml_file)
    params = urllib.urlencode({'file':f})
    f.close()
    results = urllib2.urlopen(url,params).read()
    return simplejson.loads(results)

Added applications/mobileblur/modules/python-newsblur/setup.py version [1be520bcf0].
























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from setuptools import setup
from newsblur import __version__

long_description = open('README.rst').read()

setup(name='newsblur',
      version=__version__,
      py_modules=['newsblur'],
      description='API Wrapper library for newsblur.com',
      author='Dananjaya Ramanayake',
      author_email='dananjaya86@gmail.com',
      license='MIT',
      url='',
      long_description=long_description,
      platforms=['any'],
      classifiers=['Development Status :: 1 - Beta',
	           'Intended Audience :: Developers',
		   'License :: OSI Approved :: MIT License',
                   'Operating System :: OS Independent',
		   'Programming Language :: Python',
		   'Topic :: Internet :: WWW/HTTP :: News/RSS',
		  ],
      )

Added applications/mobileblur/static/css/base.css version [0353986da0].













































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@charset "UTF-8";

/* This file is contains the following sections:

Update: Revision: 20101102 by Martin Mulone

- The new revision contains:
- Html5, good practice and normalization support.
- Diferent hacks.
- The normalization and some tags come from
  diferent sites so i keep the credits and comments.
  but the base of support html5 come from:
  http://html5boilerplate.com/

- ez.css (http://www.ez-css.org/layouts)
- reset common tags
- choose default fonts
- choose link style
- add bottom line to table rows
- labels bold and occasionally centered
- make all input fields the same size
- add proper separation between h1-h6 and text
- always indent the first line and add space below paragraphs
- bullets and numbers style and indent
- form and table padding
- code blocks
- left and right padding to quoted text
- page layout alignment, width and padding (change this for spaces)
- column widths (change this to use left_sidebar and right_sidebar)
- backrgound images and colors (change this for colors)
- web2py specific (.flash, .error)

Notice:
- even if you use a different layout/css you may need classes .flash and .error
- this is all color neutral except for #349C01 (header, links, lines)
- there are two backrgound images: images/background.png and images/header.png

License: This file is released under BSD and MIT

*/

/*     
  credit is left where credit is due.
  additionally, much inspiration was taken from these projects:
    yui.yahooapis.com/2.8.1/build/base/base.css
    camendesign.com/design/
    praegnanz.de/weblog/htmlcssjs-kickstart
*/

/* 
  html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
  v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
  html5doctor.com/html-5-reset-stylesheet/
*/

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
  margin:0;
  padding:0;
  border:0;
  outline:0;
  font-size:100%;
  vertical-align:baseline;
  background:transparent;
}                  

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { 
    display:block;
}

nav ul { list-style:none; }

blockquote, q { quotes:none; }

blockquote:before, blockquote:after,
q:before, q:after { content:''; content:none; }

a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
a:hover { text-decoration: underline }

ins { background-color:#ff9; color:#000; text-decoration:none; }

mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }

del { text-decoration: line-through; }

abbr[title], dfn[title] { border-bottom:1px dotted #000; cursor:help; }

/* tables still need cellspacing="0" in the markup */
table { border-collapse:collapse; border-spacing:0; }

hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }

input, select { vertical-align:middle; }
/* END RESET CSS */


/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
          Please refer to developer.yahoo.com/yui/fonts/ for font sizing percentages

There are three custom edits:
 * remove arial, helvetica from explicit font stack
 * make the line-height relative and unit-less
 * remove the pre, code styles
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */

/*table { font-size:inherit; font:100%; }*/

select, input, textarea, button { font:99% sans-serif; }


/* normalize monospace sizing 
 * en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
 */
pre, code, kbd, samp { font-family: monospace, sans-serif; }

/* 
 * minimal base styles 
 */

/* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */ 
body, select, input, textarea { color:#444; }

/* Headers (h1,h2,etc) have no default font-size or margin,
   you'll want to define those yourself. */ 
 
/* www.aestheticallyloyal.com/public/optimize-legibility/ */ 
h1,h2,h3,h4,h5,h6 { font-weight: bold; }

/* always force a scrollbar in non-IE */ 
html { overflow-y: scroll; }
 
/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
a:hover, a:active { outline: none; }

a, a:active, a:visited { color:#607890; }
a:hover { color:#036; }

ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }

/* Remove margins for navigation lists */
nav ul, nav li { margin: 0; } 

small { font-size:85%; }
strong, th { font-weight: bold; }

td, td img { vertical-align:top; } 

sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }

pre { 
  padding: 15px; 
  
  /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
  white-space: pre; /* CSS2 */
  white-space: pre-wrap; /* CSS 2.1 */
  white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
  word-wrap: break-word; /* IE */
}

textarea { overflow: auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */

.ie6 legend, .ie7 legend { margin-left: -7px; } /* thnx ivannikolic! */

/* align checkboxes, radios, text inputs with their label
   by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css  */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }

/* hand cursor on clickable input elements */
label, input[type=button], input[type=submit], button { cursor: pointer; }

/* webkit browsers add a 2px margin outside the chrome of form elements */  
button, input, select, textarea { margin: 0; }

/* colors for form validity */
input:valid, textarea:valid   {  }
input:invalid, textarea:invalid { 
      border-radius: 1px;
    -moz-box-shadow: 0px 0px 5px red; 
 -webkit-box-shadow: 0px 0px 5px red; 
         box-shadow: 0px 0px 5px red;
}
.no-boxshadow input:invalid, 
.no-boxshadow textarea:invalid { background-color: #f0dddd; }


/* These selection declarations have to be separate.
   No text-shadow: twitter.com/miketaylr/status/12228805301 
   Also: hot pink. */
::-moz-selection{ background: #555; color:#fff; text-shadow: none; }
::selection { background:#555; color:#fff; text-shadow: none; } 

/*  j.mp/webkit-tap-highlight-color */
a:link { -webkit-tap-highlight-color: #555; } 


/* make buttons play nice in IE:    
   www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
button {  width: auto; overflow: visible; }
 
/* bicubic resizing for non-native sized IMG: 
   code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
.ie7 img { -ms-interpolation-mode: bicubic; }

/* 
 * Non-semantic helper classes 
 */

/* for image replacement */
.ir { display:block; text-indent:-999em; overflow:hidden; background-repeat: no-repeat; }

/* Hide for both screenreaders and browsers
   css-discuss.incutio.com/wiki/Screenreader_Visibility */
.hidden { display:none; } 

/* Hide only visually, but have it available for screenreaders 
   www.webaim.org/techniques/css/invisiblecontent/ 
   Solution from: j.mp/visuallyhidden - Thanks Jonathan Neal! */
.visuallyhidden { position:absolute !important;    
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px); }

/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }

/* >> The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */
.clearfix:before, .clearfix:after {
  content: "\0020"; display: block; height: 0; visibility: hidden;    
} 

.clearfix:after { clear: both; }
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
.clearfix { zoom: 1; }


/*********** layout info (ez.css) ***********/
/* 2009 -2010 (c) | ez-css.org
 * ez-plug-min.css :: version 1.1 :: 01182010
 */
.ez-wr:after,.ez-box:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ez-wr,.ez-box,.ez-last{display:inline-block;min-height:0}/* \*/ * html .ez-wr,* html .ez-box,* html .ez-last{height:1%}.ez-wr,.ez-box,.ez-last{display:block}/* */.ez-oh{overflow:hidden}* html .ez-oh{overflow:visible}.ez-oa{overflow:auto}.ez-dt{display:table}.ez-it{display:inline-table}.ez-tc{display:table-cell}.ez-ib{display:inline-block}.ez-fl{float:left}* html .ez-fl{margin-right:-3px}.ez-fr{float:right}* html .ez-fr{margin-left:-3px}.ez-25{width:25%}.ez-33{width:33.33%}.ez-50{width:50%}.ez-66{width:66.66%}.ez-75{width:75%}.ez-negmr{margin-right:-1px}* html .ez-negmr{margin-right:-4px}.ez-negmx{margin-right:-1px}.ez-negml{margin-left:-1px}* html .ez-negml{margin-left:-4px}


/*********** add bottom line to table rows ***********/
th, td { padding: 0.1em 0.5em 0.1em 0.5em;}

/*********** labels bold and occasionally centered ***********/
label {
    white-space: nowrap;
}
label, b, th {
    font-weight: bold;
}
thead th {
    text-align: center;
    border-bottom: 1px solid #444;
}
/*********** forms and table padding ***********/
form, table {
   padding: 5px 10px 5px 10px;
}

/*********** code blocks ***********/
code {
   padding: 3px 5px;
   font-family: Andale Mono, monospace;
   font-size: 0.9em;
}

/*********** left and right padding to quoted text ***********/
blockquote {
   background: #cccccc;
   border-left: 30px transparent;
   border-right: 30px transparent;
   /*padding: 5px;*/
}

input[type=text], input[type=password], textarea, select {
    margin: 2px 15px 2px 5px;
    width: 280px;      
    background: #fff;
    color: #555;
    border: 1px solid #dedede; 
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;       
    font-size: 12px;
}

input[type=text], input[type=password] {
    height: 16px;  
}

select[multiple=multiple] {
    height: 90px;  
}

input[type=submit], input[type=button], button {
    margin: 0px;
    /*width: 85px;*/
    height: 22px;    
    background: #eaeaea;
    color: #555;
    border: 1px solid #dedede;
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;    
}

fieldset { border: 1px solid #dedede; padding: 6px; }
legend { font-weight: bold; }

input:focus, textarea:focus { background: #fafafa; }

p {text-indent:30px;}

p, blockquote {    
    margin-bottom: 10px;
}

h1,h2,h3,h4,h5,h6 { line-height: 170%; }
h1 {font-size: 2.0em;}
h2 {font-size: 1.8em;}
h3 {font-size: 1.4em;}
h4 {font-size: 1.2em;}
h5 {font-size: 1.0em;}
h6 {font-size: 0.8em;}

/*********** page layout alignment, width and padding ***********/
/*body {background-color: #000;}*/
#container, #header, #page, #content, #statusbar,
#footer, #wrapper { display:block; line-height: 170%; }
#wrapper {width: 900px;}
#container {
    margin: 0 auto;
    padding: 0;
}
#wrapper {margin: 0 auto;} 
#wrapper {background-color: #fff; padding: 5px;} 
#statusbar { margin: 5px 0px 20px 0px;}
#footer {    
    margin-top: 30px;    
    padding: 5px;    
}
#statusbar, #footer {    
    background: #eaeaea; 
    border-top: 1px #aaa solid;    
}
#logo {
    width: 68px;
    height: 62px;
    background: url(../images/logo.png);
}
#appname {
    color: #cccccc;
}

#right_sidebar { width: 160px; float:right; display: none; }
#left_sidebar { width: 160px; float:left; display: none; }
#content { float: left; /*width: 740px;*//*width: 63%;*/ /*width: 640px; float:left;*/ } /* uncomment this if you are going to use sidebars */
 
.auth_navbar {
   top: 0px;
   float: right;
   padding: 3px 10px 3px 10px; 
}

/*********** web2py specific ***********/
div.flash {
    font-weight: bold;
    display: none;
    position: fixed;    
    padding: 10px;
    top: 40px;
    right: 10px;
    min-width: 280px;
    opacity: 0.85;
    margin: 0px 0px 10px 10px;    
    color: #fff;    
    vertical-align: middle;
    cursor: pointer;
    background: #000;
    border: 2px solid #fff;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    z-index: 2;
}
div.error {
    background-color: red;
    color: white;
    padding: 3px;
}

/***************************
 * CSS 3 Buttons
 * http://github.com/michenriksen/css3buttons
 * created by Michael Henriksen
 * License: Unlicense 
 * 
 * *******************/

a.button { display: inline-block; padding: 3px 5px 3px 5px; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 12px; color: #3C3C3D; text-shadow: 1px 1px 0 #FFFFFF; background: #ECECEC url('../images/css3buttons_backgrounds.png') 0 0 no-repeat; white-space: nowrap; overflow: visible; cursor: pointer; text-decoration: none; border: 1px solid #CACACA; -webkit-border-radius: 2px; -moz-border-radius: 2px; -webkit-background-clip: padding-box; border-radius: 2px; outline: none; position: relative; zoom: 1; *display: inline; }
a.button.primary { font-weight: bold }
a.button:hover { color: #FFFFFF; border-color: #388AD4; text-decoration: none; text-shadow: -1px -1px 0 rgba(0,0,0,0.3); background-position: 0 -40px; background-color: #2D7DC5; }
a.button:active,
a.button.active { background-position: 0 -81px; border-color: #347BBA; background-color: #0F5EA2; color: #FFFFFF; text-shadow: none; }
a.button:active { top: 1px }
a.button.negative:hover { color: #FFFFFF; background-position: 0 -121px; background-color: #D84743; border-color: #911D1B; }
a.button.negative:active,
a.button.negative.active { background-position: 0 -161px; background-color: #A5211E; border-color: #911D1B; }
a.button.pill { -webkit-border-radius: 19px; -moz-border-radius: 19px; border-radius: 19px; padding: 2px 10px 2px 10px; }
a.button.left { -webkit-border-bottom-right-radius: 0px; -webkit-border-top-right-radius: 0px; -moz-border-radius-bottomright: 0px; -moz-border-radius-topright: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; margin-right: 0px; }
a.button.middle { margin-right: 0px; margin-left: 0px; -webkit-border-radius: 0px; -moz-border-radius: 0px; border-radius: 0px; border-right: none; border-left: none; }
a.button.right { -webkit-border-bottom-left-radius: 0px; -webkit-border-top-left-radius: 0px; -moz-border-radius-bottomleft: 0px; -moz-border-radius-topleft: 0px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; margin-left: 0px; }
a.button.left:active,
a.button.middle:active,
a.button.right:active { top: 0px }
a.button.big { font-size: 16px; padding-left: 17px; padding-right: 17px; }
a.button span.icon { display: inline-block; width: 14px; height: 12px; margin: auto 7px auto auto; position: relative; top: 2px; background-image: url('../images/css3buttons_icons.png'); background-repeat: no-repeat; }
a.big.button span.icon { top: 0px }
a.button span.icon.book { background-position: 0 0 }
a.button:hover span.icon.book { background-position: 0 -15px }
a.button span.icon.calendar { background-position: 0 -30px }
a.button:hover span.icon.calendar { background-position: 0 -45px }
a.button span.icon.chat { background-position: 0 -60px }
a.button:hover span.icon.chat { background-position: 0 -75px }
a.button span.icon.check { background-position: 0 -90px }
a.button:hover span.icon.check { background-position: 0 -103px }
a.button span.icon.clock { background-position: 0 -116px }
a.button:hover span.icon.clock { background-position: 0 -131px }
a.button span.icon.cog { background-position: 0 -146px }
a.button:hover span.icon.cog { background-position: 0 -161px }
a.button span.icon.comment { background-position: 0 -176px }
a.button:hover span.icon.comment { background-position: 0 -190px }
a.button span.icon.cross { background-position: 0 -204px }
a.button:hover span.icon.cross { background-position: 0 -219px }
a.button span.icon.downarrow { background-position: 0 -234px }
a.button:hover span.icon.downarrow { background-position: 0 -249px }
a.button span.icon.fork { background-position: 0 -264px }
a.button:hover span.icon.fork { background-position: 0 -279px }
a.button span.icon.heart { background-position: 0 -294px }
a.button:hover span.icon.heart { background-position: 0 -308px }
a.button span.icon.home { background-position: 0 -322px }
a.button:hover span.icon.home { background-position: 0 -337px }
a.button span.icon.key { background-position: 0 -352px }
a.button:hover span.icon.key { background-position: 0 -367px }
a.button span.icon.leftarrow { background-position: 0 -382px }
a.button:hover span.icon.leftarrow { background-position: 0 -397px }
a.button span.icon.lock { background-position: 0 -412px }
a.button:hover span.icon.lock { background-position: 0 -427px }
a.button span.icon.loop { background-position: 0 -442px }
a.button:hover span.icon.loop { background-position: 0 -457px }
a.button span.icon.magnifier { background-position: 0 -472px }
a.button:hover span.icon.magnifier { background-position: 0 -487px }
a.button span.icon.mail { background-position: 0 -502px }
a.button:hover span.icon.mail { background-position: 0 -514px }
a.button span.icon.move { background-position: 0 -526px }
a.button:hover span.icon.move { background-position: 0 -541px }
a.button span.icon.pen { background-position: 0 -556px }
a.button:hover span.icon.pen { background-position: 0 -571px }
a.button span.icon.pin { background-position: 0 -586px }
a.button:hover span.icon.pin { background-position: 0 -601px }
a.button span.icon.plus { background-position: 0 -616px }
a.button:hover span.icon.plus { background-position: 0 -631px }
a.button span.icon.reload { background-position: 0 -646px }
a.button:hover span.icon.reload { background-position: 0 -660px }
a.button span.icon.rightarrow { background-position: 0 -674px }
a.button:hover span.icon.rightarrow { background-position: 0 -689px }
a.button span.icon.rss { background-position: 0 -704px }
a.button:hover span.icon.rss { background-position: 0 -719px }
a.button span.icon.tag { background-position: 0 -734px }
a.button:hover span.icon.tag { background-position: 0 -749px }
a.button span.icon.trash { background-position: 0 -764px }
a.button:hover span.icon.trash { background-position: 0 -779px }
a.button span.icon.unlock { background-position: 0 -794px }
a.button:hover span.icon.unlock { background-position: 0 -809px }
a.button span.icon.uparrow { background-position: 0 -824px }
a.button:hover span.icon.uparrow { background-position: 0 -839px }
a.button span.icon.user { background-position: 0 -854px }
a.button:hover span.icon.user { background-position: 0 -869px }






/*****************************************************
 *  HERE YOU CAN START TO WRITE YOUR OWN DIVS
 */







/*
 * Media queries for responsive design
 */

@media all and (orientation:portrait) { 
  /* Style adjustments for portrait mode goes here */
  
}

@media all and (orientation:landscape) { 
  /* Style adjustments for landscape mode goes here */
  
}

/* Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)  
   Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
@media screen and (max-device-width: 480px) {
  
  
  /* Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you
     j.mp/textsizeadjust 
  html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
}


/* 
 * print styles
 * inlined to avoid required HTTP connection www.phpied.com/delay-loading-your-print-css/ 
 */
@media print {
  * { background: transparent !important; color: #444 !important; text-shadow: none !important; }
  a, a:visited { color: #444 !important; text-decoration: underline; }
  a:after { content: " (" attr(href) ")"; } 
  abbr:after { content: " (" attr(title) ")"; }
  .ir a:after { content: ""; }  /* Don't show links for images */
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */ 
  tr, img { page-break-inside: avoid; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3{ page-break-after: avoid; }
}

Added applications/mobileblur/static/css/calendar.css version [263a0ae7af].


1
+
.calendar{z-index:99;position:relative;display:none;border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar table{border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar .button{text-align:center;padding:1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar .nav{background:transparent}.calendar thead .title{font-weight:bold;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar thead .name{border-bottom:1px solid #000;padding:2px;text-align:center;background:#f4f0e8;}.calendar thead .weekend{color:#f00;}.calendar thead .hilite{border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;padding:0;background-color:#e4e0d8;}.calendar thead .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;background-color:#c4c0b8;}.calendar tbody .day{width:2em;text-align:right;padding:2px 4px 2px 2px;}.calendar tbody .day.othermonth{font-size:80%;color:#aaa;}.calendar tbody .day.othermonth.oweekend{color:#faa;}.calendar table .wn{padding:2px 3px 2px 2px;border-right:1px solid #000;background:#f4f0e8;}.calendar tbody .rowhilite td{background:#e4e0d8;}.calendar tbody .rowhilite td.wn{background:#d4d0c8;}.calendar tbody td.hilite{padding:1px 3px 1px 1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar tbody td.active{padding:2px 2px 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar tbody td.selected{font-weight:bold;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;padding:2px 2px 0 2px;background:#e4e0d8;}.calendar tbody td.weekend{color:#f00;}.calendar tbody td.today{font-weight:bold;color:#00f;}.calendar tbody .disabled{color:#999;}.calendar tbody .emptycell{visibility:hidden;}.calendar tbody .emptyrow{display:none;}.calendar tfoot .ttip{background:#f4f0e8;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar tfoot .hilite{border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;padding:1px;background:#e4e0d8;}.calendar tfoot .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo{position:absolute;display:none;width:4em;top:0;left:0;cursor:default;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;background:#e4e0d8;font-size:90%;padding:1px;z-index:100;}.calendar .combo .label,.calendar .combo .label-IEfix{text-align:center;padding:1px;}.calendar .combo .label-IEfix{width:4em;}.calendar .combo .active{background:#c4c0b8;padding:0;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo .hilite{background:#048;color:#fea;}.calendar td.time{border-top:1px solid #000;padding:1px 0;text-align:center;background-color:#f4f0e8;}.calendar td.time .hour,.calendar td.time .minute,.calendar td.time .ampm{padding:0 3px 0 4px;border:1px solid #889;font-weight:bold;background-color:#fff;}.calendar td.time .ampm{text-align:center;}.calendar td.time .colon{padding:0 2px 0 3px;font-weight:bold;}.calendar td.time span.hilite{border-color:#000;background-color:#766;color:#fff;}.calendar td.time span.active{border-color:#f00;background-color:#000;color:#0f0;}#CP_hourcont{z-index:99;padding:0;position:absolute;border:1px dashed #666;background-color:#eee;display:none;}#CP_minutecont{z-index:99;background-color:#ddd;padding:1px;position:absolute;width:45px;display:none;}.floatleft{float:left;}.CP_hour{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;}.CP_minute{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;}.CP_over{background-color:#fff;z-index:99}

Added applications/mobileblur/static/css/handheld.css version [721460498f].








1
2
3
4
5
6
7
+
+
+
+
+
+
+

* {
  float: none;       /* Screens are not big enough to account for floats */
  font-size: 80%;    /* Slightly reducing font size to reduce need to scroll */ 
  background: #fff;  /*  As much contrast as possible */
  color: #000;
}

Added applications/mobileblur/static/css/superfish-navbar.css version [f80d0fda82].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*** adding the class sf-navbar in addition to sf-menu creates an all-horizontal nav-bar menu ***/
.sf-navbar {
	background:		#BDD2FF;
	height:			2.5em;
	padding-bottom:	2.5em;
	position:		relative;
}
.sf-navbar li {
	background:		#AABDE6;
	position:		static;
}
.sf-navbar a {
	border-top:		none;
}
.sf-navbar li ul {
	width:			44em; /*IE6 soils itself without this*/
}
.sf-navbar li li {
	background:		#BDD2FF;
	position:		relative;
}
.sf-navbar li li ul {
	width:			13em;
}
.sf-navbar li li li {
	width:			100%;
}
.sf-navbar ul li {
	width:			auto;
	float:			left;
}
.sf-navbar a, .sf-navbar a:visited {
	border:			none;
}
.sf-navbar li.current {
	background:		#BDD2FF;
}
.sf-navbar li:hover,
.sf-navbar li.sfHover,
.sf-navbar li li.current,
.sf-navbar a:focus, .sf-navbar a:hover, .sf-navbar a:active {
	background:		#BDD2FF;
}
.sf-navbar ul li:hover,
.sf-navbar ul li.sfHover,
ul.sf-navbar ul li:hover li,
ul.sf-navbar ul li.sfHover li,
.sf-navbar ul a:focus, .sf-navbar ul a:hover, .sf-navbar ul a:active {
	background:		#D1DFFF;
}
ul.sf-navbar li li li:hover,
ul.sf-navbar li li li.sfHover,
.sf-navbar li li.current li.current,
.sf-navbar ul li li a:focus, .sf-navbar ul li li a:hover, .sf-navbar ul li li a:active {
	background:		#E6EEFF;
}
ul.sf-navbar .current ul,
ul.sf-navbar ul li:hover ul,
ul.sf-navbar ul li.sfHover ul {
	left:			0;
	top:			2.5em; /* match top ul list item height */
}
ul.sf-navbar .current ul ul {
	top: 			-999em;
}

.sf-navbar li li.current > a {
	font-weight:	bold;
}

/*** point all arrows down ***/
/* point right for anchors in subs */
.sf-navbar ul .sf-sub-indicator { background-position: -10px -100px; }
.sf-navbar ul a > .sf-sub-indicator { background-position: 0 -100px; }
/* apply hovers to modern browsers */
.sf-navbar ul a:focus > .sf-sub-indicator,
.sf-navbar ul a:hover > .sf-sub-indicator,
.sf-navbar ul a:active > .sf-sub-indicator,
.sf-navbar ul li:hover > a > .sf-sub-indicator,
.sf-navbar ul li.sfHover > a > .sf-sub-indicator {
	background-position: -10px -100px; /* arrow hovers for modern browsers*/
}

/*** remove shadow on first submenu ***/
.sf-navbar > li > ul {
	background: transparent;
	padding: 0;
	-moz-border-radius-bottomleft: 0;
	-moz-border-radius-topright: 0;
	-webkit-border-top-right-radius: 0;
	-webkit-border-bottom-left-radius: 0;
}

Added applications/mobileblur/static/css/superfish-vertical.css version [cc09787089].
























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*** adding sf-vertical in addition to sf-menu creates a vertical menu ***/
.sf-vertical, .sf-vertical li {
	width:	10em;
}
/* this lacks ul at the start of the selector, so the styles from the main CSS file override it where needed */
.sf-vertical li:hover ul,
.sf-vertical li.sfHover ul {
	left:	10em; /* match ul width */
	top:	0;
}

/*** alter arrow directions ***/
.sf-vertical .sf-sub-indicator { background-position: -10px 0; } /* IE6 gets solid image only */
.sf-vertical a > .sf-sub-indicator { background-position: 0 0; } /* use translucent arrow for modern browsers*/

/* hover arrow direction for modern browsers*/
.sf-vertical a:focus > .sf-sub-indicator,
.sf-vertical a:hover > .sf-sub-indicator,
.sf-vertical a:active > .sf-sub-indicator,
.sf-vertical li:hover > a > .sf-sub-indicator,
.sf-vertical li.sfHover > a > .sf-sub-indicator {
	background-position: -10px 0; /* arrow hovers for modern browsers*/
}

Added applications/mobileblur/static/css/superfish.css version [e354e3670d].












































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*** ESSENTIAL STYLES ***/
.sf-menu, .sf-menu * {
	margin:			0;
	padding:		0;
	list-style:		none;
}
.sf-menu {
	line-height:	1.0;
}
.sf-menu ul {
	position:		absolute;
	top:			-999em;
	width:			10em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
	width:			100%;
}
.sf-menu li:hover {
	visibility:		inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
	float:			left;
	position:		relative;
}
.sf-menu a {
	display:		block;
	position:		relative;
}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
	left:			0;
	top:			2.5em; /* match top ul list item height */
	z-index:		99;
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
	left:			10em; /* match ul width */
	top:			0;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
	left:			10em; /* match ul width */
	top:			0;
}

/*** DEMO SKIN ***/
.sf-menu {
	float:			left;
	/*margin-bottom:	1em;*/
}
.sf-menu a {
	border-left:	1px solid #fff;
	/*border-top:		1px solid #CFDEFF;*/
	padding: 		.75em 1em;
	text-decoration:none;
}
.sf-menu a, .sf-menu a:visited  { /* visited pseudo selector so IE6 applies text colour*/
	color: #275b90;/*#13a;*/
}
.sf-menu li {
	background: #dadada;/*#BDD2FF;*/
}
.sf-menu li li {
	background:		#AABDE6;
}
.sf-menu li li a {
	/*color: #13a;*/
}
.sf-menu li li li {
	background:		#9AAEDB;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
	background:		#CFDEFF;
	outline:		0;
}

/*** arrows **/
.sf-menu a.sf-with-ul {
	padding-right: 	2.25em;
	min-width:		1px; /* trigger IE7 hasLayout so spans position accurately */
}
.sf-sub-indicator {
	position:		absolute;
	display:		block;
	right:			.75em;
	top:			1.05em; /* IE6 only */
	width:			10px;
	height:			10px;
	text-indent: 	-999em;
	overflow:		hidden;
	background:		url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a > .sf-sub-indicator {  /* give all except IE6 the correct values */
	top:			.8em;
	background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}
/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
	background-position: -10px -100px; /* arrow hovers for modern browsers*/
}

/* point right for anchors in subs */
.sf-menu ul .sf-sub-indicator { background-position:  -10px 0; }
.sf-menu ul a > .sf-sub-indicator { background-position:  0 0; }
/* apply hovers to modern browsers */
.sf-menu ul a:focus > .sf-sub-indicator,
.sf-menu ul a:hover > .sf-sub-indicator,
.sf-menu ul a:active > .sf-sub-indicator,
.sf-menu ul li:hover > a > .sf-sub-indicator,
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
	background-position: -10px 0; /* arrow hovers for modern browsers*/
}

/*** shadows for all but IE6 ***/
.sf-shadow ul {
	background:	url('../images/shadow.png') no-repeat bottom right;
	padding: 0 8px 9px 0;
	-moz-border-radius-bottomleft: 17px;
	-moz-border-radius-topright: 17px;
	-webkit-border-top-right-radius: 17px;
	-webkit-border-bottom-left-radius: 17px;
}
.sf-shadow ul.sf-shadow-off {
	background: transparent;
}

Added applications/mobileblur/static/favicon.ico version [8849e0925e].

cannot compute difference between binary files

Added applications/mobileblur/static/images/arrows-ffffff.png version [848c456cab].

cannot compute difference between binary files

Added applications/mobileblur/static/images/css3buttons_backgrounds.png version [373872c147].

cannot compute difference between binary files

Added applications/mobileblur/static/images/css3buttons_icons.png version [3d43fcf538].

cannot compute difference between binary files

Added applications/mobileblur/static/images/error.png version [a460cc5cea].

cannot compute difference between binary files

Added applications/mobileblur/static/images/ok.png version [64ef5ff48b].

cannot compute difference between binary files

Added applications/mobileblur/static/images/poweredby.png version [0baee84b0d].

cannot compute difference between binary files

Added applications/mobileblur/static/images/shadow.png version [7ea95cf0e2].

cannot compute difference between binary files

Added applications/mobileblur/static/images/warn.png version [5b675a6959].

cannot compute difference between binary files

Added applications/mobileblur/static/images/warning.png version [9c06299898].

cannot compute difference between binary files

Added applications/mobileblur/static/js/calendar.js version [ee22da85cc].

cannot compute difference between binary files

Added applications/mobileblur/static/js/dd_belatedpng.js version [11ff3e17f1].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.8a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
**/
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();

Added applications/mobileblur/static/js/jquery.js version [7622c9ac23].

cannot compute difference between binary files

Added applications/mobileblur/static/js/modernizr-1.7.min.js version [96922cbe86].



1
2
+
+
// Modernizr v1.7  www.modernizr.com
window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)

Added applications/mobileblur/static/js/superfish.js version [b7b4fdd4a0].


























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);	
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
			
		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;
			
			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);
			
		}).each(function() {
			var menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : true,
		disableHI	: false,		// true disables hoverIntent detection
		onInit		: function(){}, // callback functions
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);

Added applications/mobileblur/static/js/web2py_ajax.js version [7f2851f561].


































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function popup(url) {
  newwindow=window.open(url,'name','height=400,width=600');
  if (window.focus) newwindow.focus();
  return false;
}
function collapse(id) { jQuery('#'+id).slideToggle(); }
function fade(id,value) { if(value>0) jQuery('#'+id).hide().fadeIn('slow'); else jQuery('#'+id).show().fadeOut('slow'); }
function ajax(u,s,t) {
    query = '';
    if (typeof s == "string") {
        d = jQuery(s).serialize();
        if(d){ query = d; }
    } else {
        pcs = [];
        for(i=0; i<s.length; i++) {
            q = jQuery("[name="+s[i]+"]").serialize();
            if(q){pcs.push(q);}
        }
        if (pcs.length>0){query = pcs.join("&");}
    }
    jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); 
}

String.prototype.reverse = function () { return this.split('').reverse().join('');};
function web2py_ajax_init() {
  jQuery('.hidden').hide();
  jQuery('.error').hide().slideDown('slow');
  jQuery('.flash').click(function() { jQuery(this).fadeOut('slow'); return false; });
  // jQuery('input[type=submit]').click(function(){var t=jQuery(this);t.hide();t.after('<input class="submit_disabled" disabled="disabled" type="submit" name="'+t.attr("name")+'_dummy" value="'+t.val()+'">')});
  jQuery('input.integer').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
  jQuery('input.double,input.decimal').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();});
  var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') ? w2p_ajax_confirm_message : "Are you sure you want to delete this object?";
  jQuery("input[type='checkbox'].delete").live('click', function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; });
  var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
  try {jQuery("input.date").live('focus',function() {Calendar.setup({
     inputField:this, ifFormat:date_format, showsTime:false
  }); }); } catch(e) {};
  var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
  try { jQuery("input.datetime").live('focus', function() {Calendar.setup({
     inputField:this, ifFormat:datetime_format, showsTime: true,timeFormat: "24"
  }); }); } catch(e) {};

  jQuery("input.time").live('focus', function() { var el = jQuery(this); 
          if (!el.hasClass('hasTimeEntry')) try { el.timeEntry(); } catch(e) {}; 
  });
};

jQuery(function() {   
   var flash = jQuery('.flash');
   flash.hide();
   if(flash.html()) flash.slideDown();
   web2py_ajax_init();
});
function web2py_trap_form(action,target) {
   jQuery('#'+target+' form').each(function(i){
      var form=jQuery(this);
      if(!form.hasClass('no_trap'))
        form.submit(function(obj){
         jQuery('.flash').hide().html('');
         web2py_ajax_page('post',action,form.serialize(),target);
         return false;
      });
   });
}
function web2py_ajax_page(method,action,data,target) {
  jQuery.ajax({'type':method,'url':action,'data':data,
    'beforeSend':function(xhr) {
      xhr.setRequestHeader('web2py-component-location',document.location);
      xhr.setRequestHeader('web2py-component-element',target);},
    'complete':function(xhr,text){
      var html=xhr.responseText;
      var content=xhr.getResponseHeader('web2py-component-content'); 
      var command=xhr.getResponseHeader('web2py-component-command');
      var flash=xhr.getResponseHeader('web2py-component-flash');
      var t = jQuery('#'+target);
      if(content=='prepend') t.prepend(html); 
      else if(content=='append') t.append(html);
      else if(content!='hide') t.html(html);  
      web2py_trap_form(action,target);
      web2py_ajax_init();      
      if(command) eval(command);
      if(flash) jQuery('.flash').html(flash).slideDown();
      }
    });
}
function web2py_component(action,target) {
  jQuery(function(){ web2py_ajax_page('get',action,null,target); });
}
function web2py_comet(url,onmessage,onopen,onclose) {
  if ("WebSocket" in window) {
    var ws = new WebSocket(url);
    ws.onopen = onopen?onopen:(function(){});
    ws.onmessage = onmessage;
    ws.onclose = onclose?onclose:(function(){});
    return true; // supported
  } else return false; // not supported
}

Added applications/mobileblur/static/robots.txt version [32c4950688].



1
2
+
+
User-agent: *
Disallow: /welcome/default/user

Added applications/mobileblur/views/__init__.py version [da39a3ee5e].

Added applications/mobileblur/views/appadmin.html version [3b13f939eb].







































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script><!--
jQuery(document).ready(function(){
  jQuery("table.sortable tbody tr").mouseover( function() {
     jQuery(this).addClass("highlight"); }).mouseout( function() { 
     jQuery(this).removeClass("highlight"); });
  jQuery('table.sortable tbody tr:odd').addClass('odd');
  jQuery('table.sortable tbody tr:even').addClass('even');
});
//--></script>

{{if request.function=='index':}}
  <h1>{{=T("Available databases and tables")}}</h1>
  {{if not databases:}}{{=T("No databases in this application")}}{{pass}}
  {{for db in sorted(databases):}}
    {{for table in databases[db].tables:}}
      {{qry='%s.%s.id>0'%(db,table)}}
      {{tbl=databases[db][table]}}
      {{if hasattr(tbl,'_primarykey'):}}
        {{if tbl._primarykey:}}
            {{firstkey=tbl[tbl._primarykey[0]]}}
            {{if firstkey.type in ['string','text']:}}
              {{qry='%s.%s.%s!=""'%(db,table,firstkey.name)}}
            {{else:}}
              {{qry='%s.%s.%s>0'%(db,table,firstkey.name)}}
            {{pass}}
        {{else:}}
             {{qry=''}}
             {{pass}}
      {{pass}}
      <h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</h2>
      [ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
    <br /><br />
    {{pass}}
  {{pass}}

{{elif request.function=='select':}}
  <h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
  </h1>
   {{if table:}}
  [ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
    <h2>{{=T("Rows in table")}}</h2><br/>
   {{else:}}
    <h2>{{=T("Rows selected")}}</h2><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/>
      {{=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/>
    <h3>{{=nrows}} {{=T("selected")}}</h3>
    {{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
    {{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}    
    {{if rows:}}
       <div style="overflow: auto;" width="80%">
       {{linkto=URL('update',args=request.args[0])}}
       {{upload=URL('download',args=request.args[0])}}    
       {{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
       </div>
    {{pass}}
    <br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
    [ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
  {{if table:}}
    {{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
  {{pass}}


{{elif request.function=='insert':}}  
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=table._primarykey[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
    {{else:}}  
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
    {{pass}}
  </h1>
  <h2>{{=T("New Record")}}</h2><br/>
  {{=form}}



{{elif request.function=='update':}}
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=request.vars.keys()[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}      
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
      {{=T("record")}} {{=A('%s=%s'%request.vars.items()[0],_href=URL('update',args=request.args[:2],vars=request.vars))}}
    {{else:}}
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
      {{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
    {{pass}}
  </h1>
  <h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}



{{elif request.function=='state':}}
  <h1>{{=T("Internal State")}}</h1>
  <h2>{{=T("Current request")}}</h2>
  {{=BEAUTIFY(request)}}
  <br/><h2>{{=T("Current response")}}</h2>
  {{=BEAUTIFY(response)}}
  <br/><h2>{{=T("Current session")}}</h2>
  {{=BEAUTIFY(session)}}


{{elif request.function == 'ccache':}}
<h2>Cache</h2>
<div class="wrapper">
<div class="list">
    <div class="list-header">
        Statistics
    </div>
    <div class="content">
        <h3>Overview</h3>
        <p>
            Hit Ratio: 
            <strong>{{=total['ratio']}}%</strong> 
            (<strong>{{=total['hits']}}</strong> hits 
            and <strong>{{=total['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=total['objects']}}</strong> items, 
            <strong>{{=total['bytes']}}</strong> bytes 
            {{if total['bytes'] > 524287:}}
                (<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
            {{pass}}
        </p>
        <p>
            Cache contains items up to 
            <strong>{{="%02d" % total['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % total['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>RAM</h3>
        <p>
            Hit Ratio: 
            <strong>{{=ram['ratio']}}%</strong> 
            (<strong>{{=ram['hits']}}</strong> hits 
            and <strong>{{=ram['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=ram['objects']}}</strong> items, 
            <strong>{{=ram['bytes']}}</strong> bytes 
            {{if ram['bytes'] > 524287:}}
                (<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            RAM contains items up to 
            <strong>{{="%02d" % ram['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>DISK</h3>
        <p>
            Hit Ratio: 
            <strong>{{=disk['ratio']}}%</strong> 
            (<strong>{{=disk['hits']}}</strong> hits 
            and <strong>{{=disk['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=disk['objects']}}</strong> items, 
            <strong>{{=disk['bytes']}}</strong> bytes 
            {{if disk['bytes'] > 524287:}}
                (<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            DISK contains items up to 
            <strong>{{="%02d" % disk['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
        </p>
    </div>
    
    <div class="list-header">
    Manage Cache
    </div>
    <div class="content">
    <p>
        {{=form}}
    </p>
    </div>
</div>
<div class="clear"></div>
</div>
{{pass}}

Added applications/mobileblur/views/default/index.html version [1ac89d52bc].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
{{left_sidebar_enabled=right_sidebar_enabled=False}}
{{extend 'layout.html'}}

{{ for feed in feeds.itervalues(): }}
    {{ if threshold == -1 and feed["ng"] > 0: }} <span class='ng'>[ {{= feed["ng"] }} ]</span> {{ pass }}
    {{ if threshold <= 0 and feed["nt"] > 0: }} <span class='nt'>[ {{= feed["nt"] }} ]</span> {{ pass }}
    {{if feed["ps"] > 0: }}<span class='ps'>[ {{= feed["ps"] }} ]</span> {{ pass }}
    <a href="{{= URL(c="feeds", f="view", args=[feed["id"]]) }}">{{= feed["feed_title"] }}</a><br />
{{ pass }}

{{block left_sidebar}}New Left Sidebar Content{{end}}
{{block right_sidebar}}New Right Sidebar Content{{end}}

Added applications/mobileblur/views/default/user.html version [7cba4a5dbc].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
{{=form}}
{{if request.args(0)=='login':}}
{{if not 'register' in auth.settings.actions_disabled:}}
<br/><a href="{{=URL(r=request,args='register')}}">register</a>
{{pass}}
{{if not 'request_reset_password' in auth.settings.actions_disabled:}}
<br/><a href="{{=URL(r=request,args='request_reset_password')}}">lost password</a>
{{pass}}
{{pass}}
</div>

<script language="javascript">
<!--
 jQuery("#web2py_user_form input:visible:enabled:first").focus();
//-->
</script> 

Added applications/mobileblur/views/generic.html version [5ecbd3689c].

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{"""

You should not modify this file. 
It is used as default when a view is not provided for your controllers

"""}}
<h2>{{=' '.join(x.capitalize() for x in request.function.split('_'))}}</h2>
{{if len(response._vars)==1:}}
{{=response._vars.values()[0]}}
{{elif len(response._vars)>1:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{if request.is_local:}}
{{=response.toolbar()}}
{{pass}}

Added applications/mobileblur/views/generic.json version [2eb11890a0].


1
+
{{from gluon.serializers import json}}{{=XML(json(response._vars))}}

Added applications/mobileblur/views/generic.load version [fa6df36d52].































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{'''
# License: Public Domain
# Author: Iceberg at 21cn dot com

With this generic.load file, you can use same function to serve two purposes.

= regular action
- ajax callback (when called with .load)

Example modified from http://www.web2py.com/AlterEgo/default/show/252:

def index():
    return dict(
		part1='hello world',
        	part2=LOAD(url=URL(r=request,f='auxiliary.load'),ajax=True))

def auxiliary():
    form=SQLFORM.factory(Field('name'))
    if form.accepts(request.vars):
        response.flash = 'ok' 
        return dict(message="Hello %s" % form.vars.name)
    return dict(form=form)

Notice:

- no need to set response.headers['web2py-response-flash']
- no need to return a string
even if the function is called via ajax.

'''}}{{if len(response._vars)==1:}}{{=response._vars.values()[0]}}{{else:}}{{=BEAUTIFY(response._vars)}}{{pass}}

Added applications/mobileblur/views/generic.pdf version [c404f699b1].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
{{
import os
from gluon.contrib.generics import pdf_from_html
filename = '%s/%s.html' % (request.controller,request.function)
if os.path.exists(os.path.join(request.folder,'views',filename)):
   html=response.render(filename)
else:
   html=BODY(BEAUTIFY(response._vars)).xml()
pass
=pdf_from_html(html)
}}

Added applications/mobileblur/views/generic.rss version [ed113b27d9].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
{{
###
# response._vars contains the dictionary returned by the controller action
# for this to work the action must return something like
#
#   dict(title=...,link=...,description=...,created_on='...',items=...)
#
# items is a list of dictionaries each with title, link, description, pub_date.
###
from gluon.serializers import rss}}{{=XML(rss(response._vars))}}

Added applications/mobileblur/views/generic.xml version [92f603b5bb].


1
+
{{from gluon.serializers import xml}}{{=XML(xml(response._vars))}}

Added applications/mobileblur/views/layout.html version [78b7d8a5ef].
































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<!DOCTYPE html>
<html lang="{{=T.accepted_language or 'en'}}" class="no-js"><!-- no-js need it for modernzr -->
  <head>
    
    <meta charset="utf-8" />	  	
    <!-- www.phpied.com/conditional-comments-block-downloads/ -->
    <!--[if IE]><![endif]-->    
    <!-- Always force latest IE rendering engine 
	 (even in intranet) & Chrome Frame 
	 Remove this if you use the .htaccess -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    
    <title>{{=response.title or request.application}}</title>
    
    <!-- http://dev.w3.org/html5/markup/meta.name.html -->
    <meta name="application-name" content="{{=request.application}}" />	
    
    <!-- Speaking of Google, don't forget to set your site up: 
	 http://google.com/webmasters -->
    <meta name="google-site-verification" content="" />
    
    <!--  Mobile Viewport Fix
	  j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag 
	  device-width: Occupy full width of the screen in its current orientation
	  initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
	  maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
      -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    
    <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
    <link rel="shortcut icon" href="{{=URL('static','favicon.ico')}}" type="image/x-icon">
    <link rel="apple-touch-icon" href="{{=URL('static','favicon.png')}}">

    <!-- For the less-enabled mobile browsers like Opera Mini -->
    <link rel="stylesheet" media="handheld" href="{{=URL('static','css/handheld.css')}}">
    
    <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
    <script src="{{=URL('static','js/modernizr-1.7.min.js')}}"></script>
    
    {{#------  require CSS and JS files for this page (read info in base.css) ------}}
    {{response.files.append(URL('static','css/base.css'))}}
    {{response.files.append(URL('static','css/superfish.css'))}}
    {{response.files.append(URL('static','js/superfish.js'))}}
    {{#------ include web2py specific js code (jquery, calendar, form stuff) ------}}
    {{include 'web2py_ajax.html'}}

    {{
    #using sidebars need to know what sidebar you want to use
    #prior of using it, because of static width size of content, you can use
    #left_sidebar, right_sidebar, both or none (False left and right)    
    left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
    right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
    if left_sidebar_enabled and right_sidebar_enabled: width_content='63%'
    elif left_sidebar_enabled != right_sidebar_enabled: width_content='740px'
    else: width_content='100%'
    if left_sidebar_enabled: left_sidebar_style = 'style="display: block;"'
    else: left_sidebar_style = 'style="display: none;"'
    if right_sidebar_enabled: right_sidebar_style = 'style="display: block;"'
    else: right_sidebar_style = 'style="display: none;"'
    style_content = 'style="width: %s"' % width_content
    }}
  </head>
  
  <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->	
  <!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
  <!--[if IE 7 ]>    <body class="ie7"> <![endif]-->
  <!--[if IE 8 ]>    <body class="ie8"> <![endif]-->
  <!--[if IE 9 ]>    <body class="ie9"> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->
    
    <div class="flash">{{=response.flash or ''}}</div> <!-- notification div -->
    
    <div id="container">	      		      	
      
      <div id="wrapper">		
	
	<div id="header"> <!-- header and login nav -->
	  {{block header}} <!-- this is default header -->
	  {{try:}}{{=auth.navbar(action=URL('default','user'))}}{{except:pass}}		          
	  <h1><span id="appname">{{=request.application.capitalize()}}</span>App</h1>
	  <div style="clear: both;"></div><!-- Clear the divs -->
	  {{end}}				  					  
	</div><!-- header  -->
	
	<div id="statusbar"><!-- statusbar is menu zone -->
	  {{block statusbar}} <!-- this is default statusbar -->
	  {{#------ superfish menu ------}}
	  {{=MENU(response.menu,_class='sf-menu')}}
	  <script type="text/javascript">
	    jQuery(document).ready(function(){
	    jQuery('ul.sf-menu').superfish();});
	  </script>
	  <div style="clear: both;"></div><!-- Clear the divs -->	
	  {{end}}				
	</div><!-- statusbar -->
	
	<div id="page"> <!-- Here my central body -->	  

	  {{if left_sidebar_enabled:}}
          <div id="left_sidebar" {{=XML(left_sidebar_style)}} >
            <div style="padding: 4px;">
	      {{block left_sidebar}}Content Left Sidebar{{end}}		  
            </div>
          </div><!-- left_sidebar -->
	  {{pass}}

	  <!-- content -->
	  <div id="content" {{=XML(style_content)}} >
	    {{include}}	
	  </div>
	  <!-- content -->

	  {{if right_sidebar_enabled:}}
          <div id="right_sidebar" {{=XML(right_sidebar_style)}} >
            <div style="padding: 4px;">
              {{block right_sidebar}}Content Right Sidebar{{end}}
            </div>
	  </div><!-- right_sidebar -->
          {{pass}}


	  <div style="clear: both;"></div><!-- Clear the divs -->
	  
	</div><!-- page -->							
	
	<div id="footer">
	  {{block footer}} <!-- this is default footer -->
	  <a href="http://www.web2py.com/" style="float: left; padding-right: 6px;">
	    <img src="{{=URL('static','images/poweredby.png')}}"/>
	  </a>
	  {{=T('Copyright')}} &#169; 2010				
	  <div style="clear: both;"></div><!-- Clear the divs -->
	  {{end}}

	</div><!-- footer -->			
      </div><!-- wrapper -->
    </div><!-- container -->		
    
    <!--[if lt IE 7 ]>
	<script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
	<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
	<![endif]-->
    
    <!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet 
	 change the UA-XXXXX-X to be your site's ID -->
    <!--   
	   <script>
	     var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
	     (function(d, t) {
	     var g = d.createElement(t),
	     s = d.getElementsByTagName(t)[0];
	     g.async = true;
	     g.src = '//www.google-analytics.com/ga.js';
	     s.parentNode.insertBefore(g, s);
	     })(document, 'script');
	   </script>
	   -->    
  </body>
</html>

Added applications/mobileblur/views/web2py_ajax.html version [4a6f603253].


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
response.files.insert(0,URL('static','js/jquery.js'))
response.files.insert(1,URL('static','css/calendar.css'))
response.files.insert(2,URL('static','js/calendar.js'))
for _item in response.meta or []:}}
     <meta name="{{=_item}}" content="{{=response.meta[_item]}}" />{{
pass
for _k,_file in enumerate(response.files or []):
  if _file in response.files[:_k]:
     continue
  _file0=_file.lower().split('?')[0]
  if _file0.endswith('.css'):}}
     <link href="{{=_file}}" rel="stylesheet" type="text/css" />{{
  elif _file0.endswith('.js'):}}
     <script src="{{=_file}}" type="text/javascript"></script>{{
  pass
pass
}}
    <script type="text/javascript"><!--
    // These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
    var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
    var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
    var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
    //--></script>
    <script src="{{=URL('static','js/web2py_ajax.js')}}" type="text/javascript"></script>

Added applications/welcome/ABOUT version [f4515d4b07].



1
2
+
+
Write something about this app.
Developed with web2py.

Added applications/welcome/LICENSE version [23c98cb4b6].





1
2
3
4
+
+
+
+
The web2py welcome app is licensed under public domain 
(except for the css and js files that it includes, which have their own third party licenses).

You can modify this license when you add your own code.

Added applications/welcome/__init__.py version [da39a3ee5e].

Added applications/welcome/controllers/appadmin.py version [1eb6fe022d].

























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################

import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils

# ## critical --- make a copy of the environment

global_env = copy.copy(globals())
global_env['datetime'] = datetime

http_host = request.env.http_host.split(':')[0]
remote_addr = request.env.remote_addr
try:
    hosts = (http_host, socket.gethostname(),
             socket.gethostbyname(http_host),
             '::1','127.0.0.1','::ffff:127.0.0.1')
except:
    hosts = (http_host, )

if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
     in ['https', 'HTTPS']:
    session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
    raise HTTP(200, T('appadmin is disabled because insecure channel'))

if (request.application=='admin' and not session.authorized) or \
        (request.application!='admin' and not gluon.fileutils.check_credentials(request)):
    redirect(URL('admin', 'default', 'index'))

ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
                 args=[request.application])], [T('db'), False,
                 URL('index')], [T('state'), False,
                 URL('state')], [T('cache'), False,
                 URL('ccache')]]

# ##########################################################
# ## auxiliary functions
# ###########################################################


def get_databases(request):
    dbs = {}
    for (key, value) in global_env.items():
        cond = False
        try:
            cond = isinstance(value, GQLDB)
        except:
            cond = isinstance(value, SQLDB)
        if cond:
            dbs[key] = value
    return dbs


databases = get_databases(None)


def eval_in_global_env(text):
    exec ('_ret=%s' % text, {}, global_env)
    return global_env['_ret']


def get_database(request):
    if request.args and request.args[0] in databases:
        return eval_in_global_env(request.args[0])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_table(request):
    db = get_database(request)
    if len(request.args) > 1 and request.args[1] in db.tables:
        return (db, request.args[1])
    else:
        session.flash = T('invalid request')
        redirect(URL('index'))


def get_query(request):
    try:
        return eval_in_global_env(request.vars.query)
    except Exception:
        return None


def query_by_table_type(tablename,db,request=request):
    keyed = hasattr(db[tablename],'_primarykey')
    if keyed:
        firstkey = db[tablename][db[tablename]._primarykey[0]]
        cond = '>0'
        if firstkey.type in ['string', 'text']:
            cond = '!=""'
        qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
    else:
        qry = '%s.%s.id>0' % tuple(request.args[:2])
    return qry



# ##########################################################
# ## list all databases and tables
# ###########################################################


def index():
    return dict(databases=databases)


# ##########################################################
# ## insert a new record
# ###########################################################


def insert():
    (db, table) = get_table(request)
    form = SQLFORM(db[table], ignore_rw=ignore_rw)
    if form.accepts(request.vars, session):
        response.flash = T('new record inserted')
    return dict(form=form,table=db[table])


# ##########################################################
# ## list all records in table and insert new record
# ###########################################################


def download():
    import os
    db = get_database(request)
    return response.download(request,db)

def csv():
    import gluon.contenttype
    response.headers['Content-Type'] = \
        gluon.contenttype.contenttype('.csv')
    db = get_database(request)
    query = get_query(request)
    if not query:
        return None
    response.headers['Content-disposition'] = 'attachment; filename=%s_%s.csv'\
         % tuple(request.vars.query.split('.')[:2])
    return str(db(query).select())


def import_csv(table, file):
    table.import_from_csv_file(file)

def select():
    import re
    db = get_database(request)
    dbname = request.args[0]
    regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
    if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
        regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
    if request.vars.query:
        match = regex.match(request.vars.query)
        if match:
            request.vars.query = '%s.%s.%s==%s' % (request.args[0],
                    match.group('table'), match.group('field'),
                    match.group('value'))
    else:
        request.vars.query = session.last_query
    query = get_query(request)
    if request.vars.start:
        start = int(request.vars.start)
    else:
        start = 0
    nrows = 0
    stop = start + 100
    table = None
    rows = []
    orderby = request.vars.orderby
    if orderby:
        orderby = dbname + '.' + orderby
        if orderby == session.last_orderby:
            if orderby[0] == '~':
                orderby = orderby[1:]
            else:
                orderby = '~' + orderby
    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 '',
                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',
                _class='delete', _type='checkbox', value=False), ''),
                TR('', '', INPUT(_type='submit', _value='submit'))),
                _action=URL(r=request,args=request.args))
    if request.vars.csvfile != None:
        try:
            import_csv(db[request.vars.table],
                       request.vars.csvfile.file)
            response.flash = T('data uploaded')
        except Exception, e:
            response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
    if form.accepts(request.vars, formname=None):
#         regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
        regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')

        match = regex.match(form.vars.query.strip())
        if match:
            table = match.group('table')
        try:
            nrows = db(query).count()
            if form.vars.update_check and form.vars.update_fields:
                db(query).update(**eval_in_global_env('dict(%s)'
                                  % form.vars.update_fields))
                response.flash = T('%s rows updated', nrows)
            elif form.vars.delete_check:
                db(query).delete()
                response.flash = T('%s rows deleted', nrows)
            nrows = db(query).count()
            if orderby:
                rows = db(query).select(limitby=(start, stop),
                        orderby=eval_in_global_env(orderby))
            else:
                rows = db(query).select(limitby=(start, stop))
        except Exception, e:
            (rows, nrows) = ([], 0)
            response.flash = DIV(T('Invalid Query'),PRE(str(e)))
    return dict(
        form=form,
        table=table,
        start=start,
        stop=stop,
        nrows=nrows,
        rows=rows,
        query=request.vars.query,
        )


# ##########################################################
# ## edit delete one record
# ###########################################################


def update():
    (db, table) = get_table(request)
    keyed = hasattr(db[table],'_primarykey')
    record = None
    if keyed:
        key = [f for f in request.vars if f in db[table]._primarykey]
        if key:
            record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
    else:
        record = db(db[table].id == request.args(2)).select().first()

    if not record:
        qry = query_by_table_type(table, db)
        session.flash = T('record does not exist')
        redirect(URL('select', args=request.args[:1],
                     vars=dict(query=qry)))

    if keyed:
        for k in db[table]._primarykey:
            db[table][k].writable=False

    form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
                   ignore_rw=ignore_rw and not keyed,
                   linkto=URL('select',
                   args=request.args[:1]), upload=URL(r=request,
                   f='download', args=request.args[:1]))

    if form.accepts(request.vars, session):
        session.flash = T('done!')
        qry = query_by_table_type(table, db)
        redirect(URL('select', args=request.args[:1],
                 vars=dict(query=qry)))
    return dict(form=form,table=db[table])


# ##########################################################
# ## get global variables
# ###########################################################


def state():
    return dict()

def ccache():
    form = FORM(
        P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
        P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
        P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
    )

    if form.accepts(request.vars, session):
        clear_ram = False
        clear_disk = False
        session.flash = ""
        if request.vars.yes:
            clear_ram = clear_disk = True
        if request.vars.ram:
            clear_ram = True
        if request.vars.disk:
            clear_disk = True

        if clear_ram:
            cache.ram.clear()
            session.flash += "Ram Cleared "
        if clear_disk:
            cache.disk.clear()
            session.flash += "Disk Cleared"

        redirect(URL(r=request))

    try:
        from guppy import hpy; hp=hpy()
    except ImportError:
        hp = False

    import shelve, os, copy, time, math
    from gluon import portalocker

    ram = {
        'bytes': 0,
        'objects': 0,
        'hits': 0,
        'misses': 0,
        'ratio': 0,
        'oldest': time.time()
    }
    disk = copy.copy(ram)
    total = copy.copy(ram)

    for key, value in cache.ram.storage.items():
        if isinstance(value, dict):
            ram['hits'] = value['hit_total'] - value['misses']
            ram['misses'] = value['misses']
            try:
                ram['ratio'] = ram['hits'] * 100 / value['hit_total']
            except (KeyError, ZeroDivisionError):
                ram['ratio'] = 0
        else:
            if hp:
                ram['bytes'] += hp.iso(value[1]).size
                ram['objects'] += hp.iso(value[1]).count

                if value[0] < ram['oldest']:
                    ram['oldest'] = value[0]

    locker = open(os.path.join(request.folder,
                                        'cache/cache.lock'), 'a')
    portalocker.lock(locker, portalocker.LOCK_EX)
    disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
    try:
        for key, value in disk_storage.items():
            if isinstance(value, dict):
                disk['hits'] = value['hit_total'] - value['misses']
                disk['misses'] = value['misses']
                try:
                    disk['ratio'] = disk['hits'] * 100 / value['hit_total']
                except (KeyError, ZeroDivisionError):
                    disk['ratio'] = 0
            else:
                if hp:
                    disk['bytes'] += hp.iso(value[1]).size
                    disk['objects'] += hp.iso(value[1]).count
                    if value[0] < disk['oldest']:
                        disk['oldest'] = value[0]
    finally:
        portalocker.unlock(locker)
        locker.close()
        disk_storage.close()

    total['bytes'] = ram['bytes'] + disk['bytes']
    total['objects'] = ram['objects'] + disk['objects']
    total['hits'] = ram['hits'] + disk['hits']
    total['misses'] = ram['misses'] + disk['misses']
    try:
        total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
    except (KeyError, ZeroDivisionError):
        total['ratio'] = 0

    if disk['oldest'] < ram['oldest']:
        total['oldest'] = disk['oldest']
    else:
        total['oldest'] = ram['oldest']

    def GetInHMS(seconds):
        hours = math.floor(seconds / 3600)
        seconds -= hours * 3600
        minutes = math.floor(seconds / 60)
        seconds -= minutes * 60
        seconds = math.floor(seconds)

        return (hours, minutes, seconds)

    ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
    disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
    total['oldest'] = GetInHMS(time.time() - total['oldest'])

    return dict(form=form, total=total,
                ram=ram, disk=disk)

Added applications/welcome/controllers/default.py version [2692ae6403].






































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

#########################################################################
## This is a samples 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)
## - call exposes all registered services (none by default)
#########################################################################

def index():
    """
    example action using the internationalization operator T and flash
    rendered by views/default/index.html or views/generic.html
    """
    return dict(message=T('Hello World'))

def user():
    """
    exposes:
    http://..../[app]/default/user/login
    http://..../[app]/default/user/logout
    http://..../[app]/default/user/register
    http://..../[app]/default/user/profile
    http://..../[app]/default/user/retrieve_password
    http://..../[app]/default/user/change_password
    use @auth.requires_login()
        @auth.requires_membership('group name')
        @auth.requires_permission('read','table name',record_id)
    to decorate functions that need access control
    """
    return dict(form=auth())


def download():
    """
    allows downloading of uploaded files
    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()


@auth.requires_signature()
def data():
    """
    http://..../[app]/default/data/tables
    http://..../[app]/default/data/create/[table]
    http://..../[app]/default/data/read/[table]/[id]
    http://..../[app]/default/data/update/[table]/[id]
    http://..../[app]/default/data/delete/[table]/[id[
    http://..../[app]/default/data/select/[table]
    http://..../[app]/default/data/search/[table]
    but URLs bust be signed, i.e. linked with
      A('table',_href=URL('data/tables',user_signature=True))
    or with the signed load operator
      LOAD('default','data.load',args='tables',ajax=True,user_signature=True)
    """
    return dict(form=crud())

Added applications/welcome/cron/crontab version [2523d8a048].


1
+
#crontab

Added applications/welcome/languages/es-es.py version [02c08ffea8].




































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s filas eliminadas',
'%s rows updated': '%s filas actualizadas',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENCION: Inicio de sesión requiere una conexión segura (HTTPS) o localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENCION: NO EJECUTE VARIAS PRUEBAS SIMULTANEAMENTE, NO SON THREAD SAFE.',
'ATTENTION: you cannot edit the running application!': 'ATENCION: no puede modificar la aplicación que se ejecuta!',
'About': 'Acerca de',
'About application': 'Acerca de la aplicación',
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
'Administrator Password:': 'Contraseña del Administrador:',
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
'Authentication': 'Autenticación',
'Available databases and tables': 'Bases de datos y tablas disponibles',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'Change Password': 'Cambie Contraseña',
'Check to delete': 'Marque para eliminar',
'Client IP': 'IP del Cliente',
'Controller': 'Controlador',
'Controllers': 'Controladores',
'Copyright': 'Derechos de autor',
'Create new application': 'Cree una nueva aplicación',
'Current request': 'Solicitud en curso',
'Current response': 'Respuesta en curso',
'Current session': 'Sesión en curso',
'DB Model': 'Modelo "db"',
'DESIGN': 'DISEÑO',
'Database': 'Base de datos',
'Date and Time': 'Fecha y Hora',
'Delete': 'Elimine',
'Delete:': 'Elimine:',
'Deploy on Google App Engine': 'Instale en Google App Engine',
'Description': 'Descripción',
'Design for': 'Diseño para',
'E-mail': 'Correo electrónico',
'EDIT': 'EDITAR',
'Edit': 'Editar',
'Edit Profile': 'Editar Perfil',
'Edit This App': 'Edite esta App',
'Edit application': 'Editar aplicación',
'Edit current record': 'Edite el registro actual',
'Editing file': 'Editando archivo',
'Editing file "%s"': 'Editando archivo "%s"',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
'First name': 'Nombre',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Group ID': 'ID de Grupo',
'Hello World': 'Hola Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Indice',
'Installed applications': 'Aplicaciones instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Acción inválida',
'Invalid email': 'Correo inválido',
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
'Languages': 'Lenguajes',
'Last name': 'Apellido',
'Last saved on:': 'Guardado en:',
'Layout': 'Diseño de página',
'License for': 'Licencia para',
'Login': 'Inicio de sesión',
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
'Logout': 'Fin de sesión',
'Lost Password': 'Contraseña perdida',
'Main Menu': 'Menú principal',
'Menu Model': 'Modelo "menu"',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NO',
'Name': 'Nombre',
'New Record': 'Registro nuevo',
'No databases in this application': 'No hay bases de datos en esta aplicación',
'Origin': 'Origen',
'Original/Translation': 'Original/Traducción',
'Password': 'Contraseña',
'Peeking at file': 'Visualizando archivo',
'Powered by': 'Este sitio usa',
'Query:': 'Consulta:',
'Record ID': 'ID de Registro',
'Register': 'Registrese',
'Registration key': 'Contraseña de Registro',
'Reset Password key': 'Reset Password key',
'Resolve Conflict file': 'archivo Resolución de Conflicto',
'Role': 'Rol',
'Rows in table': 'Filas en la tabla',
'Rows selected': 'Filas seleccionadas',
'Saved file hash:': 'Hash del archivo guardado:',
'Static files': 'Archivos estáticos',
'Stylesheet': 'Hoja de estilo',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
'Table name': 'Nombre de la tabla',
'Testing application': 'Probando aplicación',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
'The output of the file is a dictionary that was rendered by the view': 'La salida del archivo es un diccionario escenificado por la vista',
'There are no controllers': 'No hay controladores',
'There are no models': 'No hay modelos',
'There are no modules': 'No hay módulos',
'There are no static files': 'No hay archivos estáticos',
'There are no translators, only default language is supported': 'No hay traductores, sólo el lenguaje por defecto es soportado',
'There are no views': 'No hay vistas',
'This is a copy of the scaffolding application': 'Esta es una copia de la aplicación de andamiaje',
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
'Ticket': 'Tiquete',
'Timestamp': 'Timestamp',
'Unable to check for upgrades': 'No es posible verificar la existencia de actualizaciones',
'Unable to download': 'No es posible la descarga',
'Unable to download app': 'No es posible descarga la aplicación',
'Update:': 'Actualice:',
'Upload existing application': 'Suba esta aplicación',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
'User ID': 'ID de Usuario',
'View': 'Vista',
'Views': 'Vistas',
'Welcome': 'Welcome',
'Welcome %s': 'Bienvenido %s',
'Welcome to web2py': 'Bienvenido a web2py',
'Which called the function': 'La cual llamó la función',
'YES': 'SI',
'You are successfully running web2py': 'Usted está ejecutando web2py exitosamente',
'You can modify this application and adapt it to your needs': 'Usted puede modificar esta aplicación y adaptarla a sus necesidades',
'You visited the url': 'Usted visitó la url',
'about': 'acerca de',
'additional code for your application': 'código adicional para su aplicación',
'admin disabled because no admin password': ' por falta de contraseña',
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
'and rename it (required):': 'y renombrela (requerido):',
'and rename it:': ' y renombrelo:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application compiled': 'aplicación compilada',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'cannot create file': 'no es posible crear archivo',
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
'change password': 'cambie contraseña',
'check all': 'marcar todos',
'clean': 'limpiar',
'Online examples': 'Ejemplos en línea',
'Administrative interface': 'Interfaz administrativa',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'compile': 'compilar',
'compiled application removed': 'aplicación compilada removida',
'controllers': 'controladores',
'create file with filename:': 'cree archivo con nombre:',
'create new application:': 'nombre de la nueva aplicación:',
'crontab': 'crontab',
'currently saved or': 'actualmente guardado o',
'customize me!': 'Adaptame!',
'data uploaded': 'datos subidos',
'database': 'base de datos',
'database %s select': 'selección en base de datos %s',
'database administration': 'administración base de datos',
'db': 'db',
'defines tables': 'define tablas',
'delete': 'eliminar',
'delete all checked': 'eliminar marcados',
'design': 'modificar',
'Documentation': 'Documentación',
'done!': 'listo!',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit profile': 'editar perfil',
'errors': 'errores',
'export as csv file': 'exportar como archivo CSV',
'exposes': 'expone',
'extends': 'extiende',
'failed to reload module': 'recarga del módulo ha fallado',
'file "%(filename)s" created': 'archivo "%(filename)s" creado',
'file "%(filename)s" deleted': 'archivo "%(filename)s" eliminado',
'file "%(filename)s" uploaded': 'archivo "%(filename)s" subido',
'file "%(filename)s" was not deleted': 'archivo "%(filename)s" no fué eliminado',
'file "%s" of %s restored': 'archivo "%s" de %s restaurado',
'file changed on disk': 'archivo modificado en el disco',
'file does not exist': 'archivo no existe',
'file saved on %(time)s': 'archivo guardado %(time)s',
'file saved on %s': 'archivo guardado %s',
'help': 'ayuda',
'htmledit': 'htmledit',
'includes': 'incluye',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'internal error': 'error interno',
'invalid password': 'contraseña inválida',
'invalid request': 'solicitud inválida',
'invalid ticket': 'tiquete inválido',
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
'languages': 'lenguajes',
'languages updated': 'lenguajes actualizados',
'loading...': 'cargando...',
'located in the file': 'localizada en el archivo',
'login': 'inicio de sesión',
'logout': 'fin de sesión',
'lost password?': '¿olvido la contraseña?',
'merge': 'combinar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nueva aplicación "%s" creada',
'new record inserted': 'nuevo registro insertado',
'next 100 rows': '100 filas siguientes',
'or import from csv file': 'o importar desde archivo CSV',
'or provide application url:': 'o provea URL de la aplicación:',
'pack all': 'empaquetar todo',
'pack compiled': 'empaquete compiladas',
'previous 100 rows': '100 filas anteriores',
'record': 'registro',
'record does not exist': 'el registro no existe',
'record id': 'id de registro',
'register': 'registrese',
'remove compiled': 'eliminar compiladas',
'restore': 'restaurar',
'revert': 'revertir',
'save': 'guardar',
'selected': 'seleccionado(s)',
'session expired': 'sesión expirada',
'shell': 'shell',
'site': 'sitio',
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'state': 'estado',
'static': 'estáticos',
'table': 'tabla',
'test': 'probar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
'the presentations layer, views are also known as templates': 'la capa de presentación, las vistas también son llamadas plantillas',
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
'to  previous version.': 'a la versión previa.',
'translation strings for the application': 'cadenas de caracteres de traducción para la aplicación',
'try': 'intente',
'try something like': 'intente algo como',
'unable to create application "%s"': 'no es posible crear la aplicación "%s"',
'unable to delete file "%(filename)s"': 'no es posible eliminar el archivo "%(filename)s"',
'unable to parse csv file': 'no es posible analizar el archivo CSV',
'unable to uninstall "%s"': 'no es posible instalar "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'actualizar',
'update all languages': 'actualizar todos los lenguajes',
'upload application:': 'subir aplicación:',
'upload file:': 'suba archivo:',
'versioning': 'versiones',
'view': 'vista',
'views': 'vistas',
'web2py Recent Tweets': 'Tweets Recientes de web2py',
'web2py is up to date': 'web2py está actualizado',
}

Added applications/welcome/languages/fr-ca.py version [a1c8c80bd7].








































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rangées supprimées',
'%s rows updated': '%s rangées mises à jour',
'About': 'À propos',
'Access Control': "Contrôle d'accès",
'Administrative interface': "Interface d'administration",
'Ajax Recipes': 'Recettes Ajax',
'Are you sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Authentication': 'Authentification',
'Available databases and tables': 'Bases de données et tables disponibles',
'Buy this book': 'Acheter ce livre',
'Cannot be empty': 'Ne peut pas être vide',
'Check to delete': 'Cliquez pour supprimer',
'Check to delete:': 'Cliquez pour supprimer:',
'Client IP': 'IP client',
'Community': 'Communauté',
'Controller': 'Contrôleur',
'Copyright': "Droit d'auteur",
'Current request': 'Demande actuelle',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'DB Model': 'Modèle DB',
'Database': 'Base de données',
'Delete:': 'Supprimer:',
'Demo': 'Démo',
'Deployment Recipes': 'Recettes de déploiement ',
'Description': 'Descriptif',
'Documentation': 'Documentation',
'Download': 'Téléchargement',
'E-mail': 'Courriel',
'Edit': 'Éditer',
'Edit This App': 'Modifier cette application',
'Edit current record': "Modifier l'enregistrement courant",
'Errors': 'Erreurs',
'FAQ': 'faq',
'First name': 'Prénom',
'Forms and Validators': 'Formulaires et Validateurs',
'Free Applications': 'Applications gratuites',
'Function disabled': 'Fonction désactivée',
'Group %(group_id)s created': '%(group_id)s groupe créé',
'Group ID': 'Groupe ID',
'Group uniquely assigned to user %(id)s': "Groupe unique attribué à l'utilisateur %(id)s",
'Groups': 'Groupes',
'Hello World': 'Bonjour le monde',
'Home': 'Accueil',
'Import/Export': 'Importer/Exporter',
'Index': 'Index',
'Internal State': 'État interne',
'Introduction': 'Présentation',
'Invalid Query': 'Requête Invalide',
'Invalid email': 'Courriel invalide',
'Last name': 'Nom',
'Layout': 'Mise en page',
'Layouts': 'layouts',
'Live chat': 'Clavardage en direct',
'Logged in': 'Connecté',
'Login': 'Connectez-vous',
'Lost Password': 'Mot de passe perdu',
'Main Menu': 'Menu principal',
'Menu Model': 'Menu modèle',
'Name': 'Nom',
'New Record': 'Nouvel enregistrement',
'No databases in this application': "Cette application n'a pas de bases de données",
'Online examples': 'Exemples en ligne',
'Origin': 'Origine',
'Other Recipes': 'Autres recettes',
'Overview': 'Présentation',
'Password': 'Mot de passe',
"Password fields don't match": 'Les mots de passe ne correspondent pas',
'Plugins': 'Plugiciels',
'Powered by': 'Alimenté par',
'Preface': 'Préface',
'Python': 'Python',
'Query:': 'Requête:',
'Quick Examples': 'Examples Rapides',
'Readme': 'Lisez-moi',
'Recipes': 'Recettes',
'Record %(id)s created': 'Record %(id)s created',
'Record %(id)s updated': 'Record %(id)s updated',
'Record Created': 'Record Created',
'Record ID': "ID d'enregistrement",
'Record Updated': 'Record Updated',
'Register': "S'inscrire",
'Registration key': "Clé d'enregistrement",
'Registration successful': 'Inscription réussie',
'Remember me (for 30 days)': 'Se souvenir de moi (pendant 30 jours)',
'Request reset password': 'Demande de réinitialiser le mot clé',
'Reset Password key': 'Réinitialiser le mot clé',
'Resources': 'Ressources',
'Role': 'Rôle',
'Rows in table': 'Lignes du tableau',
'Rows selected': 'Lignes sélectionnées',
'Semantic': 'Sémantique',
'Services': 'Services',
'Stylesheet': 'Feuille de style',
'Submit': 'Soumettre',
'Support': 'Soutien',
'Sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Table name': 'Nom du tableau',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "query" est une condition comme "db.table1.champ1==\'valeur\'". Quelque chose comme "db.table1.champ1==db.table2.champ2" résulte en un JOIN SQL.',
'The Core': 'Le noyau',
'The Views': 'Les Vues',
'The output of the file is a dictionary that was rendered by the view': 'La sortie de ce fichier est un dictionnaire qui été restitué par la vue',
'This App': 'Cette Appli',
'This is a copy of the scaffolding application': "Ceci est une copie de l'application échafaudage",
'Timestamp': 'Horodatage',
'Twitter': 'Twitter',
'Update:': 'Mise à jour:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Employez (...)&(...) pour AND, (...)|(...) pour OR, and ~(...)  pour NOT pour construire des requêtes plus complexes.',
'User %(id)s Logged-in': 'Utilisateur %(id)s connecté',
'User %(id)s Registered': 'Utilisateur %(id)s enregistré',
'User ID': 'ID utilisateur',
'User Voice': 'User Voice',
'Verify Password': 'Vérifiez le mot de passe',
'Videos': 'Vidéos',
'View': 'Présentation',
'Web2py': 'Web2py',
'Welcome': 'Bienvenu',
'Welcome %s': 'Bienvenue %s',
'Welcome to web2py': 'Bienvenue à web2py',
'Which called the function': 'Qui a appelé la fonction',
'You are successfully running web2py': 'Vous roulez avec succès web2py',
'You can modify this application and adapt it to your needs': "Vous pouvez modifier cette application et l'adapter à vos besoins",
'You visited the url': "Vous avez visité l'URL",
'about': 'à propos',
'appadmin is disabled because insecure channel': "appadmin est désactivée parce que le canal n'est pas sécurisé",
'cache': 'cache',
'change password': 'changer le mot de passe',
'customize me!': 'personnalisez-moi!',
'data uploaded': 'données téléchargées',
'database': 'base de données',
'database %s select': 'base de données %s select',
'db': 'db',
'design': 'design',
'done!': 'fait!',
'edit profile': 'modifier le profil',
'enter an integer between %(min)g and %(max)g': 'entrer un entier compris entre %(min)g et %(max)g',
'export as csv file': 'exporter sous forme de fichier csv',
'insert new': 'insérer un nouveau',
'insert new %s': 'insérer un nouveau %s',
'invalid request': 'requête invalide',
'located in the file': 'se trouvant dans le fichier',
'login': 'connectez-vous',
'logout': 'déconnectez-vous',
'lost password': 'mot de passe perdu',
'lost password?': 'mot de passe perdu?',
'new record inserted': 'nouvel enregistrement inséré',
'next 100 rows': '100 prochaines lignes',
'or import from csv file': "ou importer d'un fichier CSV",
'password': 'mot de passe',
'please input your password again': "S'il vous plaît entrer votre mot de passe",
'previous 100 rows': '100 lignes précédentes',
'profile': 'profile',
'record': 'enregistrement',
'record does not exist': "l'archive n'existe pas",
'record id': "id d'enregistrement",
'register': "s'inscrire",
'selected': 'sélectionné',
'state': 'état',
'table': 'tableau',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
'value already in database or empty': 'valeur déjà dans la base ou vide',
}

Added applications/welcome/languages/fr-fr.py version [12b6d60c6d].




























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rangées supprimées',
'%s rows updated': '%s rangées mises à jour',
'About': 'À propos',
'Access Control': 'Contrôle d\'accès',
'Ajax Recipes': 'Recettes Ajax',
'Are you sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Authentication': 'Authentification',
'Available databases and tables': 'Bases de données et tables disponibles',
'Buy this book': 'Acheter ce livre',
'Cannot be empty': 'Ne peut pas être vide',
'Check to delete': 'Cliquez pour supprimer',
'Check to delete:': 'Cliquez pour supprimer:',
'Client IP': 'IP client',
'Community': 'Communauté',
'Controller': 'Contrôleur',
'Copyright': 'Copyright',
'Current request': 'Demande actuelle',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'DB Model': 'Modèle DB',
'Database': 'Base de données',
'Delete:': 'Supprimer:',
'Demo': 'Démo',
'Deployment Recipes': 'Recettes de déploiement',
'Description': 'Description',
'Documentation': 'Documentation',
'Download': 'Téléchargement',
'E-mail': 'E-mail',
'Edit': 'Éditer',
'Edit This App': 'Modifier cette application',
'Edit current record': "Modifier l'enregistrement courant",
'Errors': 'Erreurs',
'FAQ': 'FAQ',
'First name': 'Prénom',
'Forms and Validators': 'Formulaires et Validateurs',
'Free Applications': 'Applications gratuites',
'Function disabled': 'Fonction désactivée',
'Group ID': 'Groupe ID',
'Groups': 'Groups',
'Hello World': 'Bonjour le monde',
'Home': 'Accueil',
'Import/Export': 'Importer/Exporter',
'Index': 'Index',
'Internal State': 'État interne',
'Introduction': 'Introduction',
'Invalid Query': 'Requête Invalide',
'Invalid email': 'E-mail invalide',
'Last name': 'Nom',
'Layout': 'Mise en page',
'Layouts': 'Layouts',
'Live chat': 'Chat live',
'Login': 'Connectez-vous',
'Lost Password': 'Mot de passe perdu',
'Main Menu': 'Menu principal',
'Menu Model': 'Menu modèle',
'Name': 'Nom',
'New Record': 'Nouvel enregistrement',
'No databases in this application': "Cette application n'a pas de bases de données",
'Origin': 'Origine',
'Other Recipes': 'Autres recettes',
'Overview': 'Présentation',
'Password': 'Mot de passe',
"Password fields don't match": 'Les mots de passe ne correspondent pas',
'Plugins': 'Plugiciels',
'Powered by': 'Alimenté par',
'Preface': 'Préface',
'Python': 'Python',
'Query:': 'Requête:',
'Quick Examples': 'Examples Rapides',
'Recipes': 'Recettes',
'Record ID': 'ID d\'enregistrement',
'Register': "S'inscrire",
'Registration key': "Clé d'enregistrement",
'Remember me (for 30 days)': 'Se souvenir de moi (pendant 30 jours)',
'Request reset password': 'Demande de réinitialiser le mot clé',
'Reset Password key': 'Réinitialiser le mot clé',
'Resources': 'Ressources',
'Role': 'Rôle',
'Rows in table': 'Lignes du tableau',
'Rows selected': 'Lignes sélectionnées',
'Semantic': 'Sémantique',
'Services': 'Services',
'Stylesheet': 'Feuille de style',
'Submit': 'Soumettre',
'Support': 'Support',
'Sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Table name': 'Nom du tableau',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "query" est une condition comme "db.table1.champ1==\'valeur\'". Quelque chose comme "db.table1.champ1==db.table2.champ2" résulte en un JOIN SQL.',
'The Core': 'Le noyau',
'The Views': 'Les Vues',
'The output of the file is a dictionary that was rendered by the view': 'La sortie de ce fichier est un dictionnaire qui été restitué par la vue',
'This App': 'Cette Appli',
'This is a copy of the scaffolding application': 'Ceci est une copie de l\'application échafaudage',
'Timestamp': 'Horodatage',
'Twitter': 'Twitter',
'Update:': 'Mise à jour:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Employez (...)&(...) pour AND, (...)|(...) pour OR, and ~(...)  pour NOT pour construire des requêtes plus complexes.',
'User %(id)s Logged-in': 'Utilisateur %(id)s connecté',
'User %(id)s Registered': 'Utilisateur %(id)s enregistré',
'User ID': 'ID utilisateur',
'User Voice': 'User Voice',
'Verify Password': 'Vérifiez le mot de passe',
'Videos': 'Vidéos',
'View': 'Présentation',
'Web2py': 'Web2py',
'Welcome': 'Bienvenu',
'Welcome %s': 'Bienvenue %s',
'Welcome to web2py': 'Bienvenue à web2py',
'Which called the function': 'Qui a appelé la fonction',
'You are successfully running web2py': 'Vous roulez avec succès web2py',
'You can modify this application and adapt it to your needs': 'Vous pouvez modifier cette application et l\'adapter à vos besoins',
'You visited the url': 'Vous avez visité l\'URL',
'appadmin is disabled because insecure channel': "appadmin est désactivée parce que le canal n'est pas sécurisé",
'cache': 'cache',
'change password': 'changer le mot de passe',
'Online examples': 'Exemples en ligne',
'Administrative interface': "Interface d'administration",
'customize me!': 'personnalisez-moi!',
'data uploaded': 'données téléchargées',
'database': 'base de données',
'database %s select': 'base de données %s select',
'db': 'db',
'design': 'design',
'Documentation': 'Documentation',
'done!': 'fait!',
'edit profile': 'modifier le profil',
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
'export as csv file': 'exporter sous forme de fichier csv',
'insert new': 'insérer un nouveau',
'insert new %s': 'insérer un nouveau %s',
'invalid request': 'requête invalide',
'located in the file': 'se trouvant dans le fichier',
'login': 'connectez-vous',
'logout': 'déconnectez-vous',
'lost password': 'mot de passe perdu',
'lost password?': 'mot de passe perdu?',
'new record inserted': 'nouvel enregistrement inséré',
'next 100 rows': '100 prochaines lignes',
'or import from csv file': "ou importer d'un fichier CSV",
'previous 100 rows': '100 lignes précédentes',
'record': 'enregistrement',
'record does not exist': "l'archive n'existe pas",
'record id': "id d'enregistrement",
'register': "s'inscrire",
'selected': 'sélectionné',
'state': 'état',
'table': 'tableau',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
'Readme': "Lisez-moi",
}

Added applications/welcome/languages/hi-hi.py version [568b21ea86].



















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\x8f\xe0\xa4\x81',
'%s rows updated': '%s \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81  \xe0\xa4\x85\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xa4\xe0\xa4\xa8',
'Available databases and tables': '\xe0\xa4\x89\xe0\xa4\xaa\xe0\xa4\xb2\xe0\xa4\xac\xe0\xa5\x8d\xe0\xa4\xa7  \xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\x94\xe0\xa4\xb0 \xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe',
'Cannot be empty': '\xe0\xa4\x96\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x80 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\xb8\xe0\xa4\x95\xe0\xa4\xa4\xe0\xa4\xbe',
'Change Password': '\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xac\xe0\xa4\xa6\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'Check to delete': '\xe0\xa4\xb9\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x87\xe0\xa4\x82',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7',
'Current response': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe',
'Current session': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb8\xe0\xa5\x87\xe0\xa4\xb6\xe0\xa4\xa8',
'DB Model': 'DB Model',
'Database': 'Database',
'Delete:': '\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xbe:',
'Edit': 'Edit',
'Edit Profile': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'Edit This App': 'Edit This App',
'Edit current record': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82 ',
'Hello World': 'Hello World',
'Hello from MyApp': 'Hello from MyApp',
'Import/Export': '\xe0\xa4\x86\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4 / \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'Index': 'Index',
'Internal State': '\xe0\xa4\x86\xe0\xa4\x82\xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95  \xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa5\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\xbf',
'Invalid Query': '\xe0\xa4\x85\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xaf  \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xa8',
'Layout': 'Layout',
'Login': '\xe0\xa4\xb2\xe0\xa5\x89\xe0\xa4\x97 \xe0\xa4\x87\xe0\xa4\xa8',
'Logout': '\xe0\xa4\xb2\xe0\xa5\x89\xe0\xa4\x97 \xe0\xa4\x86\xe0\xa4\x89\xe0\xa4\x9f',
'Lost Password': '\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\x96\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe',
'Main Menu': 'Main Menu',
'Menu Model': 'Menu Model',
'New Record': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1',
'No databases in this application': '\xe0\xa4\x87\xe0\xa4\xb8  \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x97 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\x88 \xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82',
'Powered by': 'Powered by',
'Query:': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xa8:',
'Register': '\xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x9c\xe0\xa5\x80\xe0\xa4\x95\xe0\xa5\x83\xe0\xa4\xa4 (\xe0\xa4\xb0\xe0\xa4\x9c\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xb0) \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa4\xbe ',
'Rows in table': '\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 ',
'Rows selected': '\xe0\xa4\x9a\xe0\xa4\xaf\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xa4 (\xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa5\x87) \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 ',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': '\xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\x9a\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\x86\xe0\xa4\xaa \xe0\xa4\x87\xe0\xa4\xb8 \xe0\xa4\xb5\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa5\x81 \xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xb9\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\x9a\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xa4\xe0\xa5\x87 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': '\xe0\xa4\x85\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xa4\xe0\xa4\xa8 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa4\xbe:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'View': 'View',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': '\xe0\xa4\xb5\xe0\xa5\x87\xe0\xa4\xac\xe0\xa5\xa8\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\x87 (web2py)  \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x86\xe0\xa4\xaa\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\x97\xe0\xa4\xa4 \xe0\xa4\xb9\xe0\xa5\x88',
'appadmin is disabled because insecure channel': '\xe0\xa4\x85\xe0\xa4\xaa \xe0\xa4\x86\xe0\xa4\xa1\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\xa8 (appadmin) \xe0\xa4\x85\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa4\xae \xe0\xa4\xb9\xe0\xa5\x88 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x82\xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\x85\xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x9a\xe0\xa5\x88\xe0\xa4\xa8\xe0\xa4\xb2',
'cache': 'cache',
'change password': 'change password',
'Online examples': '\xe0\xa4\x91\xe0\xa4\xa8\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xa8 \xe0\xa4\x89\xe0\xa4\xa6\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xb0\xe0\xa4\xa3 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xaf\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'Administrative interface': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x87\xe0\xa4\x82\xe0\xa4\x9f\xe0\xa4\xb0\xe0\xa4\xab\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xaf\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'customize me!': '\xe0\xa4\xae\xe0\xa5\x81\xe0\xa4\x9d\xe0\xa5\x87 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\x95\xe0\xa5\x82\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\xa4 (\xe0\xa4\x95\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\x9c\xe0\xa4\xbc) \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82!',
'data uploaded': '\xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\x9f\xe0\xa4\xbe \xe0\xa4\x85\xe0\xa4\xaa\xe0\xa4\xb2\xe0\xa5\x8b\xe0\xa4\xa1 \xe0\xa4\xb8\xe0\xa4\xae\xe0\xa5\x8d\xe0\xa4\xaa\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa8 ',
'database': '\xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8',
'database %s select': '\xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8  %s \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x80 \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x88',
'db': 'db',
'design': '\xe0\xa4\xb0\xe0\xa4\x9a\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'done!': '\xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe!',
'edit profile': 'edit profile',
'export as csv file': 'csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa5\x82\xe0\xa4\xaa \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'insert new': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'insert new %s': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe   %s  \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'invalid request': '\xe0\xa4\x85\xe0\xa4\xb5\xe0\xa5\x88\xe0\xa4\xa7 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7',
'login': 'login',
'logout': 'logout',
'new record inserted': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbe',
'next 100 rows': '\xe0\xa4\x85\xe0\xa4\x97\xe0\xa4\xb2\xe0\xa5\x87 100 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81',
'or import from csv file': '\xe0\xa4\xaf\xe0\xa4\xbe  csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\x86\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'previous 100 rows': '\xe0\xa4\xaa\xe0\xa4\xbf\xe0\xa4\x9b\xe0\xa4\xb2\xe0\xa5\x87 100 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81',
'record': 'record',
'record does not exist': '\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xae\xe0\xa5\x8c\xe0\xa4\x9c\xe0\xa5\x82\xe0\xa4\xa6 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88',
'record id': '\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xaa\xe0\xa4\xb9\xe0\xa4\x9a\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbe (\xe0\xa4\x86\xe0\xa4\x88\xe0\xa4\xa1\xe0\xa5\x80)',
'register': 'register',
'selected': '\xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x86',
'state': '\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa5\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\xbf',
'table': '\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe',
'unable to parse csv file': 'csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb8 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x85\xe0\xa4\xb8\xe0\xa4\xae\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa5',
}

Added applications/welcome/languages/hu-hu.py version [cbea9c4c52].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
'%s rows deleted': '%s sorok t\xc3\xb6rl\xc5\x91dtek',
'%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek',
'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k',
'Cannot be empty': 'Nem lehet \xc3\xbcres',
'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s',
'Current response': 'Jelenlegi v\xc3\xa1lasz',
'Current session': 'Jelenlegi folyamat',
'DB Model': 'DB Model',
'Database': 'Adatb\xc3\xa1zis',
'Delete:': 'T\xc3\xb6r\xc3\xb6l:',
'Description': 'Description',
'E-mail': 'E-mail',
'Edit': 'Szerkeszt',
'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt',
'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se',
'First name': 'First name',
'Group ID': 'Group ID',
'Hello World': 'Hello Vil\xc3\xa1g',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Internal State',
'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Szerkezet',
'Main Menu': 'F\xc5\x91men\xc3\xbc',
'Menu Model': 'Men\xc3\xbc model',
'Name': 'Name',
'New Record': '\xc3\x9aj bejegyz\xc3\xa9s',
'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban',
'Origin': 'Origin',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:',
'Record ID': 'Record ID',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Role': 'Role',
'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban',
'Rows selected': 'Kiv\xc3\xa1lasztott sorok',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?',
'Table name': 'Table name',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Timestamp': 'Timestamp',
'Update:': 'Friss\xc3\xadt:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'User ID': 'User ID',
'View': 'N\xc3\xa9zet',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva',
'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r',
'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa',
'Online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide',
'Administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide',
'customize me!': 'v\xc3\xa1ltoztass meg!',
'data uploaded': 'adat felt\xc3\xb6ltve',
'database': 'adatb\xc3\xa1zis',
'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s',
'db': 'db',
'design': 'design',
'done!': 'k\xc3\xa9sz!',
'edit profile': 'profil szerkeszt\xc3\xa9se',
'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba',
'insert new': '\xc3\xbaj beilleszt\xc3\xa9se',
'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s',
'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s',
'login': 'bel\xc3\xa9p',
'logout': 'kil\xc3\xa9p',
'lost password': 'elveszett jelsz\xc3\xb3',
'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve',
'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor',
'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l',
'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor',
'record': 'bejegyz\xc3\xa9s',
'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik',
'record id': 'bejegyz\xc3\xa9s id',
'register': 'regisztr\xc3\xa1ci\xc3\xb3',
'selected': 'kiv\xc3\xa1lasztott',
'state': '\xc3\xa1llapot',
'table': 't\xc3\xa1bla',
'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni',
}

Added applications/welcome/languages/hu.py version [cbea9c4c52].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
'%s rows deleted': '%s sorok t\xc3\xb6rl\xc5\x91dtek',
'%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek',
'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k',
'Cannot be empty': 'Nem lehet \xc3\xbcres',
'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s',
'Current response': 'Jelenlegi v\xc3\xa1lasz',
'Current session': 'Jelenlegi folyamat',
'DB Model': 'DB Model',
'Database': 'Adatb\xc3\xa1zis',
'Delete:': 'T\xc3\xb6r\xc3\xb6l:',
'Description': 'Description',
'E-mail': 'E-mail',
'Edit': 'Szerkeszt',
'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt',
'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se',
'First name': 'First name',
'Group ID': 'Group ID',
'Hello World': 'Hello Vil\xc3\xa1g',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Internal State',
'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Szerkezet',
'Main Menu': 'F\xc5\x91men\xc3\xbc',
'Menu Model': 'Men\xc3\xbc model',
'Name': 'Name',
'New Record': '\xc3\x9aj bejegyz\xc3\xa9s',
'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban',
'Origin': 'Origin',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:',
'Record ID': 'Record ID',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Role': 'Role',
'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban',
'Rows selected': 'Kiv\xc3\xa1lasztott sorok',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?',
'Table name': 'Table name',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Timestamp': 'Timestamp',
'Update:': 'Friss\xc3\xadt:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.',
'User ID': 'User ID',
'View': 'N\xc3\xa9zet',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva',
'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r',
'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa',
'Online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide',
'Administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide',
'customize me!': 'v\xc3\xa1ltoztass meg!',
'data uploaded': 'adat felt\xc3\xb6ltve',
'database': 'adatb\xc3\xa1zis',
'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s',
'db': 'db',
'design': 'design',
'done!': 'k\xc3\xa9sz!',
'edit profile': 'profil szerkeszt\xc3\xa9se',
'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba',
'insert new': '\xc3\xbaj beilleszt\xc3\xa9se',
'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s',
'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s',
'login': 'bel\xc3\xa9p',
'logout': 'kil\xc3\xa9p',
'lost password': 'elveszett jelsz\xc3\xb3',
'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve',
'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor',
'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l',
'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor',
'record': 'bejegyz\xc3\xa9s',
'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik',
'record id': 'bejegyz\xc3\xa9s id',
'register': 'regisztr\xc3\xa1ci\xc3\xb3',
'selected': 'kiv\xc3\xa1lasztott',
'state': '\xc3\xa1llapot',
'table': 't\xc3\xa1bla',
'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni',
}

Added applications/welcome/languages/it-it.py version [968a746998].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Check to delete': 'Seleziona per cancellare',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Delete:': 'Cancella:',
'Description': 'Descrizione',
'E-mail': 'E-mail',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit current record': 'Modifica record corrente',
'First name': 'Nome',
'Group ID': 'ID Gruppo',
'Hello World': 'Salve Mondo',
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid email': 'Email non valida',
'Last name': 'Cognome',
'Layout': 'Layout',
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Name': 'Nome',
'New Record': 'Nuovo elemento (record)',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Origin': 'Origine',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Record ID': 'Record ID',
'Registration key': 'Chiave di Registazione',
'Reset Password key': 'Resetta chiave Password ',
'Role': 'Ruolo',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'Table name': 'Nome tabella',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio  "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'The output of the file is a dictionary that was rendered by the view': 'L\'output del file è un "dictionary" che è stato visualizzato dalla vista',
'This is a copy of the scaffolding application': "Questa è una copia dell'applicazione di base (scaffold)",
'Timestamp': 'Ora (timestamp)',
'Update:': 'Aggiorna:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'User ID': 'ID Utente',
'View': 'Vista',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'Which called the function': 'che ha chiamato la funzione',
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
'You visited the url': "Hai visitato l'URL",
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
'cache': 'cache',
'change password': 'Cambia password',
'Online examples': 'Vedere gli esempi',
'Administrative interface': "Interfaccia amministrativa",
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'Documentation': 'Documentazione',
'done!': 'fatto!',
'edit profile': 'modifica profilo',
'export as csv file': 'esporta come file CSV',
'hello world': 'salve mondo',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'invalid request': 'richiesta non valida',
'located in the file': 'presente nel file',
'login': 'accesso',
'logout': 'uscita',
'lost password?': 'dimenticato la password?',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'not authorized': 'non autorizzato',
'or import from csv file': 'oppure importa da file CSV',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'register': 'registrazione',
'selected': 'selezionato',
'state': 'stato',
'table': 'tabella',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
}

Added applications/welcome/languages/it.py version [968a746998].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Check to delete': 'Seleziona per cancellare',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Delete:': 'Cancella:',
'Description': 'Descrizione',
'E-mail': 'E-mail',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit current record': 'Modifica record corrente',
'First name': 'Nome',
'Group ID': 'ID Gruppo',
'Hello World': 'Salve Mondo',
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid email': 'Email non valida',
'Last name': 'Cognome',
'Layout': 'Layout',
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Name': 'Nome',
'New Record': 'Nuovo elemento (record)',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Origin': 'Origine',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Record ID': 'Record ID',
'Registration key': 'Chiave di Registazione',
'Reset Password key': 'Resetta chiave Password ',
'Role': 'Ruolo',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'Table name': 'Nome tabella',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio  "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'The output of the file is a dictionary that was rendered by the view': 'L\'output del file è un "dictionary" che è stato visualizzato dalla vista',
'This is a copy of the scaffolding application': "Questa è una copia dell'applicazione di base (scaffold)",
'Timestamp': 'Ora (timestamp)',
'Update:': 'Aggiorna:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'User ID': 'ID Utente',
'View': 'Vista',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'Which called the function': 'che ha chiamato la funzione',
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
'You visited the url': "Hai visitato l'URL",
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
'cache': 'cache',
'change password': 'Cambia password',
'Online examples': 'Vedere gli esempi',
'Administrative interface': "Interfaccia amministrativa",
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'Documentation': 'Documentazione',
'done!': 'fatto!',
'edit profile': 'modifica profilo',
'export as csv file': 'esporta come file CSV',
'hello world': 'salve mondo',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'invalid request': 'richiesta non valida',
'located in the file': 'presente nel file',
'login': 'accesso',
'logout': 'uscita',
'lost password?': 'dimenticato la password?',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'not authorized': 'non autorizzato',
'or import from csv file': 'oppure importa da file CSV',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'register': 'registrazione',
'selected': 'selezionato',
'state': 'stato',
'table': 'tabella',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
}

Added applications/welcome/languages/pl-pl.py version [92556d9416].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuni\xc4\x99tych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Change Password',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'DB Model': 'DB Model',
'Database': 'Database',
'Delete:': 'Usu\xc5\x84:',
'Edit': 'Edit',
'Edit Profile': 'Edit Profile',
'Edit This App': 'Edit This App',
'Edit current record': 'Edytuj aktualny rekord',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Index': 'Index',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Layout': 'Layout',
'Login': 'Zaloguj',
'Logout': 'Logout',
'Lost Password': 'Przypomnij has\xc5\x82o',
'Main Menu': 'Main Menu',
'Menu Model': 'Menu Model',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Powered by': 'Powered by',
'Query:': 'Zapytanie:',
'Register': 'Zarejestruj',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'warto\xc5\x9b\xc4\x87\'". Takie co\xc5\x9b jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'Update:': 'Uaktualnij:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'U\xc5\xbcyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...)  jako NOT do tworzenia bardziej skomplikowanych zapyta\xc5\x84.',
'View': 'View',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Witaj w web2py',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'cache': 'cache',
'change password': 'change password',
'Online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'Administrative interface': 'Kliknij aby przej\xc5\x9b\xc4\x87 do panelu administracyjnego',
'customize me!': 'dostosuj mnie!',
'data uploaded': 'dane wys\xc5\x82ane',
'database': 'baza danych',
'database %s select': 'wyb\xc3\xb3r z bazy danych %s',
'db': 'baza danych',
'design': 'projektuj',
'done!': 'zrobione!',
'edit profile': 'edit profile',
'export as csv file': 'eksportuj jako plik csv',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'invalid request': 'B\xc5\x82\xc4\x99dne \xc5\xbc\xc4\x85danie',
'login': 'login',
'logout': 'logout',
'new record inserted': 'nowy rekord zosta\xc5\x82 wstawiony',
'next 100 rows': 'nast\xc4\x99pne 100 wierszy',
'or import from csv file': 'lub zaimportuj z pliku csv',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'record',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'register': 'register',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}

Added applications/welcome/languages/pl.py version [1cc9928895].









































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuni\xc4\x99tych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'Authentication': 'Uwierzytelnienie',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Zmie\xc5\x84 has\xc5\x82o',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Check to delete:': 'Zaznacz aby usun\xc4\x85\xc4\x87:',
'Client IP': 'IP klienta',
'Controller': 'Kontroler',
'Copyright': 'Copyright',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'DB Model': 'Model bazy danych',
'Database': 'Baza danych',
'Delete:': 'Usu\xc5\x84:',
'Description': 'Opis',
'E-mail': 'Adres e-mail',
'Edit': 'Edycja',
'Edit Profile': 'Edytuj profil',
'Edit This App': 'Edytuj t\xc4\x99 aplikacj\xc4\x99',
'Edit current record': 'Edytuj obecny rekord',
'First name': 'Imi\xc4\x99',
'Function disabled': 'Funkcja wy\xc5\x82\xc4\x85czona',
'Group ID': 'ID grupy',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Index': 'Indeks',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Invalid email': 'B\xc5\x82\xc4\x99dny adres email',
'Last name': 'Nazwisko',
'Layout': 'Uk\xc5\x82ad',
'Login': 'Zaloguj',
'Logout': 'Wyloguj',
'Lost Password': 'Przypomnij has\xc5\x82o',
'Main Menu': 'Menu g\xc5\x82\xc3\xb3wne',
'Menu Model': 'Model menu',
'Name': 'Nazwa',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Origin': '\xc5\xb9r\xc3\xb3d\xc5\x82o',
'Password': 'Has\xc5\x82o',
"Password fields don't match": 'Pola has\xc5\x82a nie s\xc4\x85 zgodne ze sob\xc4\x85',
'Powered by': 'Zasilane przez',
'Query:': 'Zapytanie:',
'Record ID': 'ID rekordu',
'Register': 'Zarejestruj',
'Registration key': 'Klucz rejestracji',
'Role': 'Rola',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Stylesheet': 'Arkusz styl\xc3\xb3w',
'Submit': 'Wy\xc5\x9blij',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'Table name': 'Nazwa tabeli',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'warto\xc5\x9b\xc4\x87\'". Takie co\xc5\x9b jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'Timestamp': 'Znacznik czasu',
'Update:': 'Uaktualnij:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'U\xc5\xbcyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...)  jako NOT do tworzenia bardziej skomplikowanych zapyta\xc5\x84.',
'User %(id)s Registered': 'U\xc5\xbcytkownik %(id)s zosta\xc5\x82 zarejestrowany',
'User ID': 'ID u\xc5\xbcytkownika',
'Verify Password': 'Potwierd\xc5\xba has\xc5\x82o',
'View': 'Widok',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Witaj w web2py',
'appadmin is disabled because insecure channel': 'administracja aplikacji wy\xc5\x82\xc4\x85czona z powodu braku bezpiecznego po\xc5\x82\xc4\x85czenia',
'cache': 'cache',
'change password': 'change password',
'Online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'Administrative interface': 'Kliknij aby przej\xc5\x9b\xc4\x87 do panelu administracyjnego',
'customize me!': 'dostosuj mnie!',
'data uploaded': 'dane wys\xc5\x82ane',
'database': 'baza danych',
'database %s select': 'wyb\xc3\xb3r z bazy danych %s',
'db': 'baza danych',
'design': 'projektuj',
'done!': 'zrobione!',
'edit profile': 'edit profile',
'export as csv file': 'eksportuj jako plik csv',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'invalid request': 'B\xc5\x82\xc4\x99dne \xc5\xbc\xc4\x85danie',
'login': 'login',
'logout': 'logout',
'new record inserted': 'nowy rekord zosta\xc5\x82 wstawiony',
'next 100 rows': 'nast\xc4\x99pne 100 wierszy',
'or import from csv file': 'lub zaimportuj z pliku csv',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'rekord',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'register': 'register',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}

Added applications/welcome/languages/pt-br.py version [359b67f161].















































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de um JOIN',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'%s rows deleted': '%s linhas apagadas',
'%s rows updated': '%s linhas atualizadas',
'About': 'About',
'Access Control': 'Access Control',
'Ajax Recipes': 'Ajax Recipes',
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
'Buy this book': 'Buy this book',
'Cannot be empty': 'Não pode ser vazio',
'Check to delete': 'Marque para apagar',
'Client IP': 'Client IP',
'Community': 'Community',
'Controller': 'Controlador',
'Copyright': 'Copyright',
'Current request': 'Requisição atual',
'Current response': 'Resposta atual',
'Current session': 'Sessão atual',
'DB Model': 'Modelo BD',
'Database': 'Banco de dados',
'Delete:': 'Apagar:',
'Demo': 'Demo',
'Deployment Recipes': 'Deployment Recipes',
'Description': 'Description',
'Documentation': 'Documentation',
'Download': 'Download',
'E-mail': 'E-mail',
'Edit': 'Editar',
'Edit This App': 'Edit This App',
'Edit current record': 'Editar o registro atual',
'Errors': 'Errors',
'FAQ': 'FAQ',
'First name': 'First name',
'Forms and Validators': 'Forms and Validators',
'Free Applications': 'Free Applications',
'Group ID': 'Group ID',
'Groups': 'Groups',
'Hello World': 'Olá Mundo',
'Home': 'Home',
'Import/Export': 'Importar/Exportar',
'Index': 'Início',
'Internal State': 'Estado Interno',
'Introduction': 'Introduction',
'Invalid Query': 'Consulta Inválida',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Layout',
'Layouts': 'Layouts',
'Live chat': 'Live chat',
'Login': 'Autentique-se',
'Lost Password': 'Esqueceu sua senha?',
'Main Menu': 'Menu Principal',
'Menu Model': 'Modelo de Menu',
'Name': 'Name',
'New Record': 'Novo Registro',
'No databases in this application': 'Sem bancos de dados nesta aplicação',
'Origin': 'Origin',
'Other Recipes': 'Other Recipes',
'Overview': 'Overview',
'Password': 'Password',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Preface': 'Preface',
'Python': 'Python',
'Query:': 'Consulta:',
'Quick Examples': 'Quick Examples',
'Recipes': 'Recipes',
'Record ID': 'Record ID',
'Register': 'Registre-se',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Resources': 'Resources',
'Role': 'Role',
'Rows in table': 'Linhas na tabela',
'Rows selected': 'Linhas selecionadas',
'Semantic': 'Semantic',
'Services': 'Services',
'Stylesheet': 'Stylesheet',
'Support': 'Support',
'Sure you want to delete this object?': 'Está certo(a) que deseja apagar esse objeto ?',
'Table name': 'Table name',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'Uma "consulta" é uma condição como "db.tabela1.campo1==\'valor\'". Expressões como "db.tabela1.campo1==db.tabela2.campo2" resultam em um JOIN SQL.',
'The Core': 'The Core',
'The Views': 'The Views',
'The output of the file is a dictionary that was rendered by the view': 'The output of the file is a dictionary that was rendered by the view',
'This App': 'This App',
'This is a copy of the scaffolding application': 'This is a copy of the scaffolding application',
'Timestamp': 'Timestamp',
'Twitter': 'Twitter',
'Update:': 'Atualizar:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, e ~(...)  para NOT para construir consultas mais complexas.',
'User ID': 'User ID',
'User Voice': 'User Voice',
'Videos': 'Videos',
'View': 'Visualização',
'Web2py': 'Web2py',
'Welcome': 'Welcome',
'Welcome %s': 'Vem vindo %s',
'Welcome to web2py': 'Bem vindo ao web2py',
'Which called the function': 'Which called the function',
'You are successfully running web2py': 'You are successfully running web2py',
'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',
'You visited the url': 'You visited the url',
'appadmin is disabled because insecure channel': 'Administração desativada devido ao canal inseguro',
'cache': 'cache',
'change password': 'modificar senha',
'Online examples': 'Alguns exemplos',
'Administrative interface': 'Interface administrativa',
'customize me!': 'Personalize-me!',
'data uploaded': 'dados enviados',
'database': 'banco de dados',
'database %s select': 'Selecionar banco de dados %s',
'db': 'bd',
'design': 'design',
'Documentation': 'Documentation',
'done!': 'concluído!',
'edit profile': 'editar perfil',
'export as csv file': 'exportar como um arquivo csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'requisição inválida',
'located in the file': 'located in the file',
'login': 'Entrar',
'logout': 'Sair',
'lost password?': 'lost password?',
'new record inserted': 'novo registro inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importar de um arquivo csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registro',
'record does not exist': 'registro não existe',
'record id': 'id do registro',
'register': 'Registre-se',
'selected': 'selecionado',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível analisar arquivo csv',
}

Added applications/welcome/languages/pt-pt.py version [6f522fc1e4].





















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas eliminadas',
'%s rows updated': '%s linhas actualizadas',
'About': 'About',
'Author Reference Auth User': 'Author Reference Auth User',
'Author Reference Auth User.username': 'Author Reference Auth User.username',
'Available databases and tables': 'bases de dados e tabelas disponíveis',
'Cannot be empty': 'não pode ser vazio',
'Category Create': 'Category Create',
'Category Select': 'Category Select',
'Check to delete': 'seleccione para eliminar',
'Comment Create': 'Comment Create',
'Comment Select': 'Comment Select',
'Content': 'Content',
'Controller': 'Controlador',
'Copyright': 'Direitos de cópia',
'Created By': 'Created By',
'Created On': 'Created On',
'Current request': 'pedido currente',
'Current response': 'resposta currente',
'Current session': 'sessão currente',
'DB Model': 'Modelo de BD',
'Database': 'Base de dados',
'Delete:': 'Eliminar:',
'Edit': 'Editar',
'Edit This App': 'Edite esta aplicação',
'Edit current record': 'Edição de registo currente',
'Email': 'Email',
'First Name': 'First Name',
'For %s #%s': 'For %s #%s',
'Hello World': 'Olá Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Índice',
'Internal State': 'Estado interno',
'Invalid Query': 'Consulta Inválida',
'Last Name': 'Last Name',
'Layout': 'Esboço',
'Main Menu': 'Menu Principal',
'Menu Model': 'Menu do Modelo',
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
'New Record': 'Novo Registo',
'No Data': 'No Data',
'No databases in this application': 'Não há bases de dados nesta aplicação',
'Password': 'Password',
'Post Create': 'Post Create',
'Post Select': 'Post Select',
'Powered by': 'Suportado por',
'Query:': 'Interrogação:',
'Replyto Reference Post': 'Replyto Reference Post',
'Rows in table': 'Linhas numa tabela',
'Rows selected': 'Linhas seleccionadas',
'Stylesheet': 'Folha de estilo',
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "query" é uma condição do tipo "db.table1.field1==\'value\'". Algo como "db.table1.field1==db.table2.field2" resultaria num SQL JOIN.',
'Title': 'Title',
'Update:': 'Actualização:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Utilize (...)&(...) para AND, (...)|(...) para OR, e ~(...)  para NOT para construir interrogações mais complexas.',
'Username': 'Username',
'View': 'Vista',
'Welcome %s': 'Bem-vindo(a) %s',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
'When': 'When',
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
'cache': 'cache',
'change password': 'alterar palavra-chave',
'Online examples': 'Exemplos online',
'Administrative interface': 'Painel administrativo',
'create new category': 'create new category',
'create new comment': 'create new comment',
'create new post': 'create new post',
'customize me!': 'Personaliza-me!',
'data uploaded': 'informação enviada',
'database': 'base de dados',
'database %s select': 'selecção de base de dados %s',
'db': 'bd',
'design': 'design',
'done!': 'concluído!',
'edit category': 'edit category',
'edit comment': 'edit comment',
'edit post': 'edit post',
'edit profile': 'Editar perfil',
'export as csv file': 'exportar como ficheiro csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'Pedido Inválido',
'login': 'login',
'logout': 'logout',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importe a partir de ficheiro csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registo',
'record does not exist': 'registo inexistente',
'record id': 'id de registo',
'register': 'register',
'search category': 'search category',
'search comment': 'search comment',
'search post': 'search post',
'select category': 'select category',
'select comment': 'select comment',
'select post': 'select post',
'selected': 'seleccionado(s)',
'show category': 'show category',
'show comment': 'show comment',
'show post': 'show post',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível carregar ficheiro csv',
}

Added applications/welcome/languages/pt.py version [6f522fc1e4].





















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas eliminadas',
'%s rows updated': '%s linhas actualizadas',
'About': 'About',
'Author Reference Auth User': 'Author Reference Auth User',
'Author Reference Auth User.username': 'Author Reference Auth User.username',
'Available databases and tables': 'bases de dados e tabelas disponíveis',
'Cannot be empty': 'não pode ser vazio',
'Category Create': 'Category Create',
'Category Select': 'Category Select',
'Check to delete': 'seleccione para eliminar',
'Comment Create': 'Comment Create',
'Comment Select': 'Comment Select',
'Content': 'Content',
'Controller': 'Controlador',
'Copyright': 'Direitos de cópia',
'Created By': 'Created By',
'Created On': 'Created On',
'Current request': 'pedido currente',
'Current response': 'resposta currente',
'Current session': 'sessão currente',
'DB Model': 'Modelo de BD',
'Database': 'Base de dados',
'Delete:': 'Eliminar:',
'Edit': 'Editar',
'Edit This App': 'Edite esta aplicação',
'Edit current record': 'Edição de registo currente',
'Email': 'Email',
'First Name': 'First Name',
'For %s #%s': 'For %s #%s',
'Hello World': 'Olá Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Índice',
'Internal State': 'Estado interno',
'Invalid Query': 'Consulta Inválida',
'Last Name': 'Last Name',
'Layout': 'Esboço',
'Main Menu': 'Menu Principal',
'Menu Model': 'Menu do Modelo',
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
'New Record': 'Novo Registo',
'No Data': 'No Data',
'No databases in this application': 'Não há bases de dados nesta aplicação',
'Password': 'Password',
'Post Create': 'Post Create',
'Post Select': 'Post Select',
'Powered by': 'Suportado por',
'Query:': 'Interrogação:',
'Replyto Reference Post': 'Replyto Reference Post',
'Rows in table': 'Linhas numa tabela',
'Rows selected': 'Linhas seleccionadas',
'Stylesheet': 'Folha de estilo',
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "query" é uma condição do tipo "db.table1.field1==\'value\'". Algo como "db.table1.field1==db.table2.field2" resultaria num SQL JOIN.',
'Title': 'Title',
'Update:': 'Actualização:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Utilize (...)&(...) para AND, (...)|(...) para OR, e ~(...)  para NOT para construir interrogações mais complexas.',
'Username': 'Username',
'View': 'Vista',
'Welcome %s': 'Bem-vindo(a) %s',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
'When': 'When',
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
'cache': 'cache',
'change password': 'alterar palavra-chave',
'Online examples': 'Exemplos online',
'Administrative interface': 'Painel administrativo',
'create new category': 'create new category',
'create new comment': 'create new comment',
'create new post': 'create new post',
'customize me!': 'Personaliza-me!',
'data uploaded': 'informação enviada',
'database': 'base de dados',
'database %s select': 'selecção de base de dados %s',
'db': 'bd',
'design': 'design',
'done!': 'concluído!',
'edit category': 'edit category',
'edit comment': 'edit comment',
'edit post': 'edit post',
'edit profile': 'Editar perfil',
'export as csv file': 'exportar como ficheiro csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'Pedido Inválido',
'login': 'login',
'logout': 'logout',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importe a partir de ficheiro csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registo',
'record does not exist': 'registo inexistente',
'record id': 'id de registo',
'register': 'register',
'search category': 'search category',
'search comment': 'search comment',
'search post': 'search post',
'select category': 'select category',
'select comment': 'select comment',
'select post': 'select post',
'selected': 'seleccionado(s)',
'show category': 'show category',
'show comment': 'show comment',
'show post': 'show post',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível carregar ficheiro csv',
}

Added applications/welcome/languages/ru-ru.py version [628e206f31].

































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Изменить" - необязательное выражение вида "field1=\'новое значение\'". Результаты операции JOIN нельзя изменить или удалить.',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s строк удалено',
'%s rows updated': '%s строк изменено',
'Available databases and tables': 'Базы данных и таблицы',
'Cannot be empty': 'Пустое значение недопустимо',
'Change Password': 'Смените пароль',
'Check to delete': 'Удалить',
'Check to delete:': 'Удалить:',
'Client IP': 'Client IP',
'Current request': 'Текущий запрос',
'Current response': 'Текущий ответ',
'Current session': 'Текущая сессия',
'Delete:': 'Удалить:',
'Description': 'Описание',
'E-mail': 'E-mail',
'Edit Profile': 'Редактировать профиль',
'Edit current record': 'Редактировать текущую запись',
'First name': 'Имя',
'Group ID': 'Group ID',
'Hello World': 'Заработало!',
'Import/Export': 'Импорт/экспорт',
'Internal State': 'Внутренне состояние',
'Invalid Query': 'Неверный запрос',
'Invalid email': 'Неверный email',
'Invalid login': 'Неверный логин',
'Invalid password': 'Неверный пароль',
'Last name': 'Фамилия',
'Logged in': 'Вход выполнен',
'Logged out': 'Выход выполнен',
'Login': 'Вход',
'Logout': 'Выход',
'Lost Password': 'Забыли пароль?',
'Name': 'Name',
'New Record': 'Новая запись',
'New password': 'Новый пароль',
'No databases in this application': 'В приложении нет баз данных',
'Old password': 'Старый пароль',
'Origin': 'Происхождение',
'Password': 'Пароль',
"Password fields don't match": 'Пароли не совпадают',
'Query:': 'Запрос:',
'Record ID': 'ID записи',
'Register': 'Зарегистрироваться',
'Registration key': 'Ключ регистрации',
'Remember me (for 30 days)': 'Запомнить меня (на 30 дней)',
'Reset Password key': 'Сбросить ключ пароля',
'Role': 'Роль',
'Rows in table': 'Строк в таблице',
'Rows selected': 'Выделено строк',
'Submit': 'Отправить',
'Sure you want to delete this object?': 'Подтвердите удаление объекта',
'Table name': 'Имя таблицы',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Запрос" - это условие вида "db.table1.field1==\'значение\'". Выражение вида "db.table1.field1==db.table2.field2" формирует SQL JOIN.',
'Timestamp': 'Отметка времени',
'Update:': 'Изменить:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Для построение сложных запросов используйте операторы "И": (...)&(...), "ИЛИ": (...)|(...), "НЕ": ~(...).',
'User %(id)s Logged-in': 'Пользователь %(id)s вошёл',
'User %(id)s Logged-out': 'Пользователь %(id)s вышел',
'User %(id)s Password changed': 'Пользователь %(id)s сменил пароль',
'User %(id)s Profile updated': 'Пользователь %(id)s обновил профиль',
'User %(id)s Registered': 'Пользователь %(id)s зарегистрировался',
'User ID': 'ID пользователя',
'Verify Password': 'Повторите пароль',
'Welcome to web2py': 'Добро пожаловать в web2py',
'Online examples': 'примеры он-лайн',
'Administrative interface': 'административный интерфейс',
'customize me!': 'настройте внешний вид!',
'data uploaded': 'данные загружены',
'database': 'база данных',
'database %s select': 'выбор базы данных %s',
'db': 'БД',
'design': 'дизайн',
'done!': 'готово!',
'export as csv file': 'экспорт в  csv-файл',
'insert new': 'добавить',
'insert new %s': 'добавить %s',
'invalid request': 'неверный запрос',
'login': 'вход',
'logout': 'выход',
'new record inserted': 'новая запись добавлена',
'next 100 rows': 'следующие 100 строк',
'or import from csv file': 'или импорт из csv-файла',
'password': 'пароль',
'previous 100 rows': 'предыдущие 100 строк',
'profile': 'профиль',
'record does not exist': 'запись не найдена',
'record id': 'id записи',
'selected': 'выбрано',
'state': 'состояние',
'table': 'таблица',
'unable to parse csv file': 'нечитаемый csv-файл',
}

Added applications/welcome/languages/sk-sk.py version [928c03512a].
















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je voliteľný výraz ako "field1=\'newvalue\'". Nemôžete upravovať alebo zmazať výsledky JOINu',
'%Y-%m-%d': '%d.%m.%Y',
'%Y-%m-%d %H:%M:%S': '%d.%m.%Y %H:%M:%S',
'%s rows deleted': '%s zmazaných záznamov',
'%s rows updated': '%s upravených záznamov',
'Available databases and tables': 'Dostupné databázy a tabuľky',
'Cannot be empty': 'Nemôže byť prázdne',
'Check to delete': 'Označiť na zmazanie',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Aktuálna požiadavka',
'Current response': 'Aktuálna odpoveď',
'Current session': 'Aktuálne sedenie',
'DB Model': 'DB Model',
'Database': 'Databáza',
'Delete:': 'Zmazať:',
'Description': 'Popis',
'Edit': 'Upraviť',
'Edit Profile': 'Upraviť profil',
'Edit current record': 'Upraviť aktuálny záznam',
'First name': 'Krstné meno',
'Group ID': 'ID skupiny',
'Hello World': 'Ahoj svet',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Vnútorný stav',
'Invalid email': 'Neplatný email',
'Invalid Query': 'Neplatná otázka',
'Invalid password': 'Nesprávne heslo',
'Last name': 'Priezvisko',
'Layout': 'Layout',
'Logged in': 'Prihlásený',
'Logged out': 'Odhlásený',
'Lost Password': 'Stratené heslo?',
'Menu Model': 'Menu Model',
'Name': 'Meno',
'New Record': 'Nový záznam',
'New password': 'Nové heslo',
'No databases in this application': 'V tejto aplikácii nie sú databázy',
'Old password': 'Staré heslo',
'Origin': 'Pôvod',
'Password': 'Heslo',
'Powered by': 'Powered by',
'Query:': 'Otázka:',
'Record ID': 'ID záznamu',
'Register': 'Zaregistrovať sa',
'Registration key': 'Registračný kľúč',
'Remember me (for 30 days)': 'Zapamätaj si ma (na 30 dní)',
'Reset Password key': 'Nastaviť registračný kľúč',
'Role': 'Rola',
'Rows in table': 'riadkov v tabuľke',
'Rows selected': 'označených riadkov',
'Submit': 'Odoslať',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Ste si istí, že chcete zmazať tento objekt?',
'Table name': 'Názov tabuľky',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"query" je podmienka ako "db.table1.field1==\'value\'". Niečo ako "db.table1.field1==db.table2.field2" má za výsledok SQL JOIN.',
'The output of the file is a dictionary that was rendered by the view': 'Výstup zo súboru je slovník, ktorý bol zobrazený vo view',
'This is a copy of the scaffolding application': 'Toto je kópia skeletu aplikácie',
'Timestamp': 'Časová pečiatka',
'Update:': 'Upraviť:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': 'Použite (...)&(...) pre AND, (...)|(...) pre OR a ~(...) pre NOT na poskladanie komplexnejších otázok.',
'User %(id)s Logged-in': 'Používateľ %(id)s prihlásený',
'User %(id)s Logged-out': 'Používateľ %(id)s odhlásený',
'User %(id)s Password changed': 'Používateľ %(id)s zmenil heslo',
'User %(id)s Profile updated': 'Používateľ %(id)s upravil profil',
'User %(id)s Registered': 'Používateľ %(id)s sa zaregistroval',
'User ID': 'ID používateľa',
'Verify Password': 'Zopakujte heslo',
'View': 'Zobraziť',
'Welcome to web2py': 'Vitajte vo web2py',
'Which called the function': 'Ktorý zavolal funkciu',
'You are successfully running web2py': 'Úspešne ste spustili web2py',
'You can modify this application and adapt it to your needs': 'Môžete upraviť túto aplikáciu a prispôsobiť ju svojim potrebám',
'You visited the url': 'Navštívili ste URL',
'appadmin is disabled because insecure channel': 'appadmin je zakázaný bez zabezpečeného spojenia',
'cache': 'cache',
'Online examples': 'pre online príklady kliknite sem',
'Administrative interface': 'pre administrátorské rozhranie kliknite sem',
'customize me!': 'prispôsob ma!',
'data uploaded': 'údaje naplnené',
'database': 'databáza',
'database %s select': 'databáza %s výber',
'db': 'db',
'design': 'návrh',
'Documentation': 'Dokumentácia',
'done!': 'hotovo!',
'export as csv file': 'exportovať do csv súboru',
'insert new': 'vložiť nový záznam ',
'insert new %s': 'vložiť nový  záznam %s',
'invalid request': 'Neplatná požiadavka',
'located in the file': 'nachádzajúci sa v súbore ',
'login': 'prihlásiť',
'logout': 'odhlásiť',
'lost password?': 'stratené heslo?',
'new record inserted': 'nový záznam bol vložený',
'next 100 rows': 'ďalších 100 riadkov',
'or import from csv file': 'alebo naimportovať z csv súboru',
'password': 'heslo',
'previous 100 rows': 'predchádzajúcich 100 riadkov',
'record': 'záznam',
'record does not exist': 'záznam neexistuje',
'record id': 'id záznamu',
'register': 'registrovať',
'selected': 'označených',
'state': 'stav',
'table': 'tabuľka',
'unable to parse csv file': 'nedá sa načítať csv súbor',
}

Added applications/welcome/languages/zh-tw.py version [b37aeebf91].






































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '已刪除 %s 筆',
'%s rows updated': '已更新 %s 筆',
'(something like "it-it")': '(格式類似 "zh-tw")',
'A new version of web2py is available': '新版的 web2py 已發行',
'A new version of web2py is available: %s': '新版的 web2py 已發行: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '注意: 登入管理帳號需要安全連線(HTTPS)或是在本機連線(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '注意: 因為在測試模式不保證多執行緒安全性,也就是說不可以同時執行多個測試案例',
'ATTENTION: you cannot edit the running application!': '注意:不可編輯正在執行的應用程式!',
'About': '關於',
'About application': '關於本應用程式',
'Admin is disabled because insecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Admin is disabled because unsecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Administrator Password:': '管理員密碼:',
'Are you sure you want to delete file "%s"?': '確定要刪除檔案"%s"?',
'Are you sure you want to uninstall application "%s"': '確定要移除應用程式 "%s"',
'Are you sure you want to uninstall application "%s"?': '確定要移除應用程式 "%s"',
'Authentication': '驗證',
'Available databases and tables': '可提供的資料庫和資料表',
'Cannot be empty': '不可空白',
'Cannot compile: there are errors in your app.        Debug it, correct errors and try again.': '無法編譯:應用程式中含有錯誤,請除錯後再試一次.',
'Change Password': '變更密碼',
'Check to delete': '打勾代表刪除',
'Check to delete:': '點選以示刪除:',
'Client IP': '客戶端網址(IP)',
'Controller': '控件',
'Controllers': '控件',
'Copyright': '版權所有',
'Create new application': '創建應用程式',
'Current request': '目前網路資料要求(request)',
'Current response': '目前網路資料回應(response)',
'Current session': '目前網路連線資訊(session)',
'DB Model': '資料庫模組',
'DESIGN': '設計',
'Database': '資料庫',
'Date and Time': '日期和時間',
'Delete': '刪除',
'Delete:': '刪除:',
'Deploy on Google App Engine': '配置到 Google App Engine',
'Description': '描述',
'Design for': '設計為了',
'E-mail': '電子郵件',
'EDIT': '編輯',
'Edit': '編輯',
'Edit Profile': '編輯設定檔',
'Edit This App': '編輯本應用程式',
'Edit application': '編輯應用程式',
'Edit current record': '編輯當前紀錄',
'Editing file': '編輯檔案',
'Editing file "%s"': '編輯檔案"%s"',
'Error logs for "%(app)s"': '"%(app)s"的錯誤紀錄',
'First name': '名',
'Functions with no doctests will result in [passed] tests.': '沒有 doctests 的函式會顯示 [passed].',
'Group ID': '群組編號',
'Hello World': '嗨! 世界',
'Import/Export': '匯入/匯出',
'Index': '索引',
'Installed applications': '已安裝應用程式',
'Internal State': '內部狀態',
'Invalid Query': '不合法的查詢',
'Invalid action': '不合法的動作(action)',
'Invalid email': '不合法的電子郵件',
'Language files (static strings) updated': '語言檔已更新',
'Languages': '各國語言',
'Last name': '姓',
'Last saved on:': '最後儲存時間:',
'Layout': '網頁配置',
'License for': '軟體版權為',
'Login': '登入',
'Login to the Administrative Interface': '登入到管理員介面',
'Logout': '登出',
'Lost Password': '密碼遺忘',
'Main Menu': '主選單',
'Menu Model': '選單模組(menu)',
'Models': '資料模組',
'Modules': '程式模組',
'NO': '否',
'Name': '名字',
'New Record': '新紀錄',
'No databases in this application': '這應用程式不含資料庫',
'Origin': '原文',
'Original/Translation': '原文/翻譯',
'Password': '密碼',
"Password fields don't match": '密碼欄不匹配',
'Peeking at file': '選擇檔案',
'Powered by': '基於以下技術構建:',
'Query:': '查詢:',
'Record ID': '紀錄編號',
'Register': '註冊',
'Registration key': '註冊金鑰',
'Remember me (for 30 days)': '記住我(30 天)',
'Reset Password key': '重設密碼',
'Resolve Conflict file': '解決衝突檔案',
'Role': '角色',
'Rows in table': '在資料表裏的資料',
'Rows selected': '筆資料被選擇',
'Saved file hash:': '檔案雜湊值已紀錄:',
'Static files': '靜態檔案',
'Stylesheet': '網頁風格檔',
'Submit': '傳送',
'Sure you want to delete this object?': '確定要刪除此物件?',
'Table name': '資料表名稱',
'Testing application': '測試中的應用程式',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"查詢"是一個像 "db.表1.欄位1==\'值\'" 的條件式. 以"db.表1.欄位1==db.表2.欄位2"方式則相當於執行 JOIN SQL.',
'There are no controllers': '沒有控件(controllers)',
'There are no models': '沒有資料庫模組(models)',
'There are no modules': '沒有程式模組(modules)',
'There are no static files': '沒有靜態檔案',
'There are no translators, only default language is supported': '沒有翻譯檔,只支援原始語言',
'There are no views': '沒有視圖',
'This is the %(filename)s template': '這是%(filename)s檔案的樣板(template)',
'Ticket': '問題單',
'Timestamp': '時間標記',
'Unable to check for upgrades': '無法做升級檢查',
'Unable to download': '無法下載',
'Unable to download app': '無法下載應用程式',
'Update:': '更新:',
'Upload existing application': '更新存在的應用程式',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...)  for NOT to build more complex queries.': '使用下列方式來組合更複雜的條件式, (...)&(...) 代表同時存在的條件, (...)|(...) 代表擇一的條件, ~(...)則代表反向條件.',
'User %(id)s Logged-in': '使用者 %(id)s 已登入',
'User %(id)s Registered': '使用者 %(id)s 已註冊',
'User ID': '使用者編號',
'Verify Password': '驗證密碼',
'View': '視圖',
'Views': '視圖',
'Welcome %s': '歡迎 %s',
'Welcome to web2py': '歡迎使用 web2py',
'YES': '是',
'about': '關於',
'appadmin is disabled because insecure channel': '因為來自非安全通道,管理介面關閉',
'cache': '快取記憶體',
'change password': '變更密碼',
'Online examples': '點此處進入線上範例',
'Administrative interface': '點此處進入管理介面',
'customize me!': '請調整我!',
'data uploaded': '資料已上傳',
'database': '資料庫',
'database %s select': '已選擇 %s 資料庫',
'db': 'db',
'design': '設計',
'done!': '完成!',
'edit profile': '編輯設定檔',
'export as csv file': '以逗號分隔檔(csv)格式匯出',
'insert new': '插入新資料',
'insert new %s': '插入新資料 %s',
'invalid request': '不合法的網路要求(request)',
'login': '登入',
'logout': '登出',
'new record inserted': '已插入新紀錄',
'next 100 rows': '往後 100 筆',
'or import from csv file': '或是從逗號分隔檔(CSV)匯入',
'previous 100 rows': '往前 100 筆',
'record': '紀錄',
'record does not exist': '紀錄不存在',
'record id': '紀錄編號',
'register': '註冊',
'selected': '已選擇',
'state': '狀態',
'table': '資料表',
'unable to parse csv file': '無法解析逗號分隔檔(csv)',
}

Added applications/welcome/models/db.py version [f6575d3cb8].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################

if request.env.web2py_runtime_gae:            # if running on Google App Engine
    db = DAL('google:datastore')              # connect to Google BigTable
                                              # optional DAL('gae://namespace')
    session.connect(request, response, db = db) # and store sessions and tickets there
    ### or use the following lines to store sessions in Memcache
    # from gluon.contrib.memdb import MEMDB
    # from google.appengine.api.memcache import Client
    # session.connect(request, response, db = MEMDB(Client()))
else:                                         # else use a normal relational database
    db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or other DB

# 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 []

#########################################################################
## Here is sample code if you need for
## - email capabilities
## - authentication (registration, login, logout, ... )
## - authorization (role based authorization)
## - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)
## - crud actions
## (more options discussed in gluon/tools.py)
#########################################################################

from gluon.tools import Mail, Auth, Crud, Service, PluginManager, prettydate
mail = Mail()                                  # mailer
auth = Auth(db)                                # authentication/authorization
crud = Crud(db)                                # for CRUD helpers using auth
service = Service()                            # for json, xml, jsonrpc, xmlrpc, amfrpc
plugins = PluginManager()                      # for configuring plugins

mail.settings.server = 'logging' or 'smtp.gmail.com:587'  # your SMTP server
mail.settings.sender = 'you@gmail.com'         # your email
mail.settings.login = 'username:password'      # your credentials or None

auth.settings.hmac_key = '<your secret key>'   # before define_tables()
auth.define_tables()                           # creates all needed tables
auth.settings.mailer = mail                    # for user email verification
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
auth.settings.reset_password_requires_verification = True
auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'

#########################################################################
## If you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
## register with janrain.com, uncomment and customize following
# from gluon.contrib.login_methods.rpx_account import RPXAccount
# auth.settings.actions_disabled = \
#    ['register','change_password','request_reset_password']
# auth.settings.login_form = RPXAccount(request, api_key='...',domain='...',
#    url = "http://localhost:8000/%s/default/user/login" % request.application)
## other login methods are in gluon/contrib/login_methods
#########################################################################

crud.settings.auth = None        # =auth to enforce authorization on crud

#########################################################################
## Define your tables below (or better in another model file) for example
##
## >>> db.define_table('mytable',Field('myfield','string'))
##
## Fields can be 'string','text','password','integer','double','boolean'
##       'date','time','datetime','blob','upload', 'reference TABLENAME'
## There is an implicit 'id integer autoincrement' field
## Consult manual for more options, validators, etc.
##
## More API examples for controllers:
##
## >>> db.mytable.insert(myfield='value')
## >>> rows=db(db.mytable.myfield=='value').select(db.mytable.ALL)
## >>> for row in rows: print row.id, row.myfield
#########################################################################

Added applications/welcome/models/menu.py version [2fb70868d5].































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- 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.title = request.application
response.subtitle = T('customize me!')

#http://dev.w3.org/html5/markup/meta.name.html
response.meta.author = 'you'
response.meta.description = 'Free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python'
response.meta.keywords = 'web2py, python, framework'
response.meta.generator = 'Web2py Enterprise Framework'
response.meta.copyright = 'Copyright 2007-2010'


##########################################
## this is the main application menu
## add/remove items as required
##########################################

response.menu = [
    (T('Home'), False, URL('default','index'), [])
    ]

##########################################
## this is here to provide shortcuts
## during development. remove in production
##
## mind that plugins may also affect menu
##########################################

#########################################
## Make your own menus
##########################################

response.menu+=[
    (T('This App'), False, URL('admin', 'default', 'design/%s' % request.application),
     [
            (T('Controller'), False,
             URL('admin', 'default', 'edit/%s/controllers/%s.py' \
                     % (request.application,request.controller=='appadmin' and
                        'default' or request.controller))),
            (T('View'), False,
             URL('admin', 'default', 'edit/%s/views/%s' \
                     % (request.application,response.view))),
            (T('Layout'), False,
             URL('admin', 'default', 'edit/%s/views/layout.html' \
                     % request.application)),
            (T('Stylesheet'), False,
             URL('admin', 'default', 'edit/%s/static/base.css' \
                     % request.application)),
            (T('DB Model'), False,
             URL('admin', 'default', 'edit/%s/models/db.py' \
                     % request.application)),
            (T('Menu Model'), False,
             URL('admin', 'default', 'edit/%s/models/menu.py' \
                     % request.application)),
            (T('Database'), False,
             URL(request.application, 'appadmin', 'index')),

            (T('Errors'), False,
             URL('admin', 'default', 'errors/%s' \
                     % request.application)),

            (T('About'), False,
             URL('admin', 'default', 'about/%s' \
                     % request.application)),

            ]
   )]


##########################################
## this is here to provide shortcuts to some resources
## during development. remove in production
##
## mind that plugins may also affect menu
##########################################


response.menu+=[(T('Resources'), False, None,
     [
    (T('Documentation'), False, 'http://www.web2py.com/book',
        [
        (T('Preface'), False, 'http://www.web2py.com/book/default/chapter/00'),
        (T('Introduction'), False, 'http://www.web2py.com/book/default/chapter/01'),
        (T('Python'), False, 'http://www.web2py.com/book/default/chapter/02'),
        (T('Overview'), False, 'http://www.web2py.com/book/default/chapter/03'),
        (T('The Core'), False, 'http://www.web2py.com/book/default/chapter/04'),
        (T('The Views'), False, 'http://www.web2py.com/book/default/chapter/05'),
        (T('Database'), False, 'http://www.web2py.com/book/default/chapter/06'),
        (T('Forms and Validators'), False, 'http://www.web2py.com/book/default/chapter/07'),
        (T('Access Control'), False, 'http://www.web2py.com/book/default/chapter/08'),
        (T('Services'), False, 'http://www.web2py.com/book/default/chapter/09'),
        (T('Ajax Recipes'), False, 'http://www.web2py.com/book/default/chapter/10'),
        (T('Deployment Recipes'), False, 'http://www.web2py.com/book/default/chapter/11'),
        (T('Other Recipes'), False, 'http://www.web2py.com/book/default/chapter/12'),
        (T('Buy this book'), False, 'http://stores.lulu.com/web2py'),
        ]),

    (T('Community'), False, None,
        [
        (T('Groups'), False, 'http://www.web2py.com/examples/default/usergroups'),
        (T('Twitter'), False, 'http://twitter.com/web2py'),
        (T('Live chat'), False, 'http://mibbit.com/?channel=%23web2py&server=irc.mibbit.net'),
        (T('User Voice'), False, 'http://web2py.uservoice.com/'),
        ]),

    (T('Web2py'), False, 'http://www.web2py.com',
        [
        (T('Download'), False, 'http://www.web2py.com/examples/default/download'),
        (T('Support'), False, 'http://www.web2py.com/examples/default/support'),
        (T('Quick Examples'), False, 'http://web2py.com/examples/default/examples'),
        (T('FAQ'), False, 'http://web2py.com/AlterEgo'),
        (T('Free Applications'), False, 'http://web2py.com/appliances'),
        (T('Plugins'), False, 'http://web2py.com/plugins'),
        (T('Recipes'), False, 'http://web2pyslices.com/'),
        (T('Demo'), False, 'http://web2py.com/demo_admin'),
        (T('Semantic'), False, 'http://web2py.com/semantic'),
        (T('Layouts'), False, 'http://web2py.com/layouts'),
        (T('Videos'), False, 'http://www.web2py.com/examples/default/videos/'),
        ]),
    ]
   )]

Added applications/welcome/modules/__init__.py version [da39a3ee5e].

Added applications/welcome/static/css/base.css version [0353986da0].













































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@charset "UTF-8";

/* This file is contains the following sections:

Update: Revision: 20101102 by Martin Mulone

- The new revision contains:
- Html5, good practice and normalization support.
- Diferent hacks.
- The normalization and some tags come from
  diferent sites so i keep the credits and comments.
  but the base of support html5 come from:
  http://html5boilerplate.com/

- ez.css (http://www.ez-css.org/layouts)
- reset common tags
- choose default fonts
- choose link style
- add bottom line to table rows
- labels bold and occasionally centered
- make all input fields the same size
- add proper separation between h1-h6 and text
- always indent the first line and add space below paragraphs
- bullets and numbers style and indent
- form and table padding
- code blocks
- left and right padding to quoted text
- page layout alignment, width and padding (change this for spaces)
- column widths (change this to use left_sidebar and right_sidebar)
- backrgound images and colors (change this for colors)
- web2py specific (.flash, .error)

Notice:
- even if you use a different layout/css you may need classes .flash and .error
- this is all color neutral except for #349C01 (header, links, lines)
- there are two backrgound images: images/background.png and images/header.png

License: This file is released under BSD and MIT

*/

/*     
  credit is left where credit is due.
  additionally, much inspiration was taken from these projects:
    yui.yahooapis.com/2.8.1/build/base/base.css
    camendesign.com/design/
    praegnanz.de/weblog/htmlcssjs-kickstart
*/

/* 
  html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
  v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
  html5doctor.com/html-5-reset-stylesheet/
*/

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
  margin:0;
  padding:0;
  border:0;
  outline:0;
  font-size:100%;
  vertical-align:baseline;
  background:transparent;
}                  

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { 
    display:block;
}

nav ul { list-style:none; }

blockquote, q { quotes:none; }

blockquote:before, blockquote:after,
q:before, q:after { content:''; content:none; }

a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
a:hover { text-decoration: underline }

ins { background-color:#ff9; color:#000; text-decoration:none; }

mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }

del { text-decoration: line-through; }

abbr[title], dfn[title] { border-bottom:1px dotted #000; cursor:help; }

/* tables still need cellspacing="0" in the markup */
table { border-collapse:collapse; border-spacing:0; }

hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }

input, select { vertical-align:middle; }
/* END RESET CSS */


/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
          Please refer to developer.yahoo.com/yui/fonts/ for font sizing percentages

There are three custom edits:
 * remove arial, helvetica from explicit font stack
 * make the line-height relative and unit-less
 * remove the pre, code styles
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */

/*table { font-size:inherit; font:100%; }*/

select, input, textarea, button { font:99% sans-serif; }


/* normalize monospace sizing 
 * en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
 */
pre, code, kbd, samp { font-family: monospace, sans-serif; }

/* 
 * minimal base styles 
 */

/* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */ 
body, select, input, textarea { color:#444; }

/* Headers (h1,h2,etc) have no default font-size or margin,
   you'll want to define those yourself. */ 
 
/* www.aestheticallyloyal.com/public/optimize-legibility/ */ 
h1,h2,h3,h4,h5,h6 { font-weight: bold; }

/* always force a scrollbar in non-IE */ 
html { overflow-y: scroll; }
 
/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
a:hover, a:active { outline: none; }

a, a:active, a:visited { color:#607890; }
a:hover { color:#036; }

ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }

/* Remove margins for navigation lists */
nav ul, nav li { margin: 0; } 

small { font-size:85%; }
strong, th { font-weight: bold; }

td, td img { vertical-align:top; } 

sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }

pre { 
  padding: 15px; 
  
  /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
  white-space: pre; /* CSS2 */
  white-space: pre-wrap; /* CSS 2.1 */
  white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
  word-wrap: break-word; /* IE */
}

textarea { overflow: auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */

.ie6 legend, .ie7 legend { margin-left: -7px; } /* thnx ivannikolic! */

/* align checkboxes, radios, text inputs with their label
   by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css  */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }

/* hand cursor on clickable input elements */
label, input[type=button], input[type=submit], button { cursor: pointer; }

/* webkit browsers add a 2px margin outside the chrome of form elements */  
button, input, select, textarea { margin: 0; }

/* colors for form validity */
input:valid, textarea:valid   {  }
input:invalid, textarea:invalid { 
      border-radius: 1px;
    -moz-box-shadow: 0px 0px 5px red; 
 -webkit-box-shadow: 0px 0px 5px red; 
         box-shadow: 0px 0px 5px red;
}
.no-boxshadow input:invalid, 
.no-boxshadow textarea:invalid { background-color: #f0dddd; }


/* These selection declarations have to be separate.
   No text-shadow: twitter.com/miketaylr/status/12228805301 
   Also: hot pink. */
::-moz-selection{ background: #555; color:#fff; text-shadow: none; }
::selection { background:#555; color:#fff; text-shadow: none; } 

/*  j.mp/webkit-tap-highlight-color */
a:link { -webkit-tap-highlight-color: #555; } 


/* make buttons play nice in IE:    
   www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
button {  width: auto; overflow: visible; }
 
/* bicubic resizing for non-native sized IMG: 
   code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
.ie7 img { -ms-interpolation-mode: bicubic; }

/* 
 * Non-semantic helper classes 
 */

/* for image replacement */
.ir { display:block; text-indent:-999em; overflow:hidden; background-repeat: no-repeat; }

/* Hide for both screenreaders and browsers
   css-discuss.incutio.com/wiki/Screenreader_Visibility */
.hidden { display:none; } 

/* Hide only visually, but have it available for screenreaders 
   www.webaim.org/techniques/css/invisiblecontent/ 
   Solution from: j.mp/visuallyhidden - Thanks Jonathan Neal! */
.visuallyhidden { position:absolute !important;    
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px); }

/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }

/* >> The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */
.clearfix:before, .clearfix:after {
  content: "\0020"; display: block; height: 0; visibility: hidden;    
} 

.clearfix:after { clear: both; }
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
.clearfix { zoom: 1; }


/*********** layout info (ez.css) ***********/
/* 2009 -2010 (c) | ez-css.org
 * ez-plug-min.css :: version 1.1 :: 01182010
 */
.ez-wr:after,.ez-box:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ez-wr,.ez-box,.ez-last{display:inline-block;min-height:0}/* \*/ * html .ez-wr,* html .ez-box,* html .ez-last{height:1%}.ez-wr,.ez-box,.ez-last{display:block}/* */.ez-oh{overflow:hidden}* html .ez-oh{overflow:visible}.ez-oa{overflow:auto}.ez-dt{display:table}.ez-it{display:inline-table}.ez-tc{display:table-cell}.ez-ib{display:inline-block}.ez-fl{float:left}* html .ez-fl{margin-right:-3px}.ez-fr{float:right}* html .ez-fr{margin-left:-3px}.ez-25{width:25%}.ez-33{width:33.33%}.ez-50{width:50%}.ez-66{width:66.66%}.ez-75{width:75%}.ez-negmr{margin-right:-1px}* html .ez-negmr{margin-right:-4px}.ez-negmx{margin-right:-1px}.ez-negml{margin-left:-1px}* html .ez-negml{margin-left:-4px}


/*********** add bottom line to table rows ***********/
th, td { padding: 0.1em 0.5em 0.1em 0.5em;}

/*********** labels bold and occasionally centered ***********/
label {
    white-space: nowrap;
}
label, b, th {
    font-weight: bold;
}
thead th {
    text-align: center;
    border-bottom: 1px solid #444;
}
/*********** forms and table padding ***********/
form, table {
   padding: 5px 10px 5px 10px;
}

/*********** code blocks ***********/
code {
   padding: 3px 5px;
   font-family: Andale Mono, monospace;
   font-size: 0.9em;
}

/*********** left and right padding to quoted text ***********/
blockquote {
   background: #cccccc;
   border-left: 30px transparent;
   border-right: 30px transparent;
   /*padding: 5px;*/
}

input[type=text], input[type=password], textarea, select {
    margin: 2px 15px 2px 5px;
    width: 280px;      
    background: #fff;
    color: #555;
    border: 1px solid #dedede; 
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;       
    font-size: 12px;
}

input[type=text], input[type=password] {
    height: 16px;  
}

select[multiple=multiple] {
    height: 90px;  
}

input[type=submit], input[type=button], button {
    margin: 0px;
    /*width: 85px;*/
    height: 22px;    
    background: #eaeaea;
    color: #555;
    border: 1px solid #dedede;
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;    
}

fieldset { border: 1px solid #dedede; padding: 6px; }
legend { font-weight: bold; }

input:focus, textarea:focus { background: #fafafa; }

p {text-indent:30px;}

p, blockquote {    
    margin-bottom: 10px;
}

h1,h2,h3,h4,h5,h6 { line-height: 170%; }
h1 {font-size: 2.0em;}
h2 {font-size: 1.8em;}
h3 {font-size: 1.4em;}
h4 {font-size: 1.2em;}
h5 {font-size: 1.0em;}
h6 {font-size: 0.8em;}

/*********** page layout alignment, width and padding ***********/
/*body {background-color: #000;}*/
#container, #header, #page, #content, #statusbar,
#footer, #wrapper { display:block; line-height: 170%; }
#wrapper {width: 900px;}
#container {
    margin: 0 auto;
    padding: 0;
}
#wrapper {margin: 0 auto;} 
#wrapper {background-color: #fff; padding: 5px;} 
#statusbar { margin: 5px 0px 20px 0px;}
#footer {    
    margin-top: 30px;    
    padding: 5px;    
}
#statusbar, #footer {    
    background: #eaeaea; 
    border-top: 1px #aaa solid;    
}
#logo {
    width: 68px;
    height: 62px;
    background: url(../images/logo.png);
}
#appname {
    color: #cccccc;
}

#right_sidebar { width: 160px; float:right; display: none; }
#left_sidebar { width: 160px; float:left; display: none; }
#content { float: left; /*width: 740px;*//*width: 63%;*/ /*width: 640px; float:left;*/ } /* uncomment this if you are going to use sidebars */
 
.auth_navbar {
   top: 0px;
   float: right;
   padding: 3px 10px 3px 10px; 
}

/*********** web2py specific ***********/
div.flash {
    font-weight: bold;
    display: none;
    position: fixed;    
    padding: 10px;
    top: 40px;
    right: 10px;
    min-width: 280px;
    opacity: 0.85;
    margin: 0px 0px 10px 10px;    
    color: #fff;    
    vertical-align: middle;
    cursor: pointer;
    background: #000;
    border: 2px solid #fff;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    z-index: 2;
}
div.error {
    background-color: red;
    color: white;
    padding: 3px;
}

/***************************
 * CSS 3 Buttons
 * http://github.com/michenriksen/css3buttons
 * created by Michael Henriksen
 * License: Unlicense 
 * 
 * *******************/

a.button { display: inline-block; padding: 3px 5px 3px 5px; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 12px; color: #3C3C3D; text-shadow: 1px 1px 0 #FFFFFF; background: #ECECEC url('../images/css3buttons_backgrounds.png') 0 0 no-repeat; white-space: nowrap; overflow: visible; cursor: pointer; text-decoration: none; border: 1px solid #CACACA; -webkit-border-radius: 2px; -moz-border-radius: 2px; -webkit-background-clip: padding-box; border-radius: 2px; outline: none; position: relative; zoom: 1; *display: inline; }
a.button.primary { font-weight: bold }
a.button:hover { color: #FFFFFF; border-color: #388AD4; text-decoration: none; text-shadow: -1px -1px 0 rgba(0,0,0,0.3); background-position: 0 -40px; background-color: #2D7DC5; }
a.button:active,
a.button.active { background-position: 0 -81px; border-color: #347BBA; background-color: #0F5EA2; color: #FFFFFF; text-shadow: none; }
a.button:active { top: 1px }
a.button.negative:hover { color: #FFFFFF; background-position: 0 -121px; background-color: #D84743; border-color: #911D1B; }
a.button.negative:active,
a.button.negative.active { background-position: 0 -161px; background-color: #A5211E; border-color: #911D1B; }
a.button.pill { -webkit-border-radius: 19px; -moz-border-radius: 19px; border-radius: 19px; padding: 2px 10px 2px 10px; }
a.button.left { -webkit-border-bottom-right-radius: 0px; -webkit-border-top-right-radius: 0px; -moz-border-radius-bottomright: 0px; -moz-border-radius-topright: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; margin-right: 0px; }
a.button.middle { margin-right: 0px; margin-left: 0px; -webkit-border-radius: 0px; -moz-border-radius: 0px; border-radius: 0px; border-right: none; border-left: none; }
a.button.right { -webkit-border-bottom-left-radius: 0px; -webkit-border-top-left-radius: 0px; -moz-border-radius-bottomleft: 0px; -moz-border-radius-topleft: 0px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; margin-left: 0px; }
a.button.left:active,
a.button.middle:active,
a.button.right:active { top: 0px }
a.button.big { font-size: 16px; padding-left: 17px; padding-right: 17px; }
a.button span.icon { display: inline-block; width: 14px; height: 12px; margin: auto 7px auto auto; position: relative; top: 2px; background-image: url('../images/css3buttons_icons.png'); background-repeat: no-repeat; }
a.big.button span.icon { top: 0px }
a.button span.icon.book { background-position: 0 0 }
a.button:hover span.icon.book { background-position: 0 -15px }
a.button span.icon.calendar { background-position: 0 -30px }
a.button:hover span.icon.calendar { background-position: 0 -45px }
a.button span.icon.chat { background-position: 0 -60px }
a.button:hover span.icon.chat { background-position: 0 -75px }
a.button span.icon.check { background-position: 0 -90px }
a.button:hover span.icon.check { background-position: 0 -103px }
a.button span.icon.clock { background-position: 0 -116px }
a.button:hover span.icon.clock { background-position: 0 -131px }
a.button span.icon.cog { background-position: 0 -146px }
a.button:hover span.icon.cog { background-position: 0 -161px }
a.button span.icon.comment { background-position: 0 -176px }
a.button:hover span.icon.comment { background-position: 0 -190px }
a.button span.icon.cross { background-position: 0 -204px }
a.button:hover span.icon.cross { background-position: 0 -219px }
a.button span.icon.downarrow { background-position: 0 -234px }
a.button:hover span.icon.downarrow { background-position: 0 -249px }
a.button span.icon.fork { background-position: 0 -264px }
a.button:hover span.icon.fork { background-position: 0 -279px }
a.button span.icon.heart { background-position: 0 -294px }
a.button:hover span.icon.heart { background-position: 0 -308px }
a.button span.icon.home { background-position: 0 -322px }
a.button:hover span.icon.home { background-position: 0 -337px }
a.button span.icon.key { background-position: 0 -352px }
a.button:hover span.icon.key { background-position: 0 -367px }
a.button span.icon.leftarrow { background-position: 0 -382px }
a.button:hover span.icon.leftarrow { background-position: 0 -397px }
a.button span.icon.lock { background-position: 0 -412px }
a.button:hover span.icon.lock { background-position: 0 -427px }
a.button span.icon.loop { background-position: 0 -442px }
a.button:hover span.icon.loop { background-position: 0 -457px }
a.button span.icon.magnifier { background-position: 0 -472px }
a.button:hover span.icon.magnifier { background-position: 0 -487px }
a.button span.icon.mail { background-position: 0 -502px }
a.button:hover span.icon.mail { background-position: 0 -514px }
a.button span.icon.move { background-position: 0 -526px }
a.button:hover span.icon.move { background-position: 0 -541px }
a.button span.icon.pen { background-position: 0 -556px }
a.button:hover span.icon.pen { background-position: 0 -571px }
a.button span.icon.pin { background-position: 0 -586px }
a.button:hover span.icon.pin { background-position: 0 -601px }
a.button span.icon.plus { background-position: 0 -616px }
a.button:hover span.icon.plus { background-position: 0 -631px }
a.button span.icon.reload { background-position: 0 -646px }
a.button:hover span.icon.reload { background-position: 0 -660px }
a.button span.icon.rightarrow { background-position: 0 -674px }
a.button:hover span.icon.rightarrow { background-position: 0 -689px }
a.button span.icon.rss { background-position: 0 -704px }
a.button:hover span.icon.rss { background-position: 0 -719px }
a.button span.icon.tag { background-position: 0 -734px }
a.button:hover span.icon.tag { background-position: 0 -749px }
a.button span.icon.trash { background-position: 0 -764px }
a.button:hover span.icon.trash { background-position: 0 -779px }
a.button span.icon.unlock { background-position: 0 -794px }
a.button:hover span.icon.unlock { background-position: 0 -809px }
a.button span.icon.uparrow { background-position: 0 -824px }
a.button:hover span.icon.uparrow { background-position: 0 -839px }
a.button span.icon.user { background-position: 0 -854px }
a.button:hover span.icon.user { background-position: 0 -869px }






/*****************************************************
 *  HERE YOU CAN START TO WRITE YOUR OWN DIVS
 */







/*
 * Media queries for responsive design
 */

@media all and (orientation:portrait) { 
  /* Style adjustments for portrait mode goes here */
  
}

@media all and (orientation:landscape) { 
  /* Style adjustments for landscape mode goes here */
  
}

/* Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)  
   Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
@media screen and (max-device-width: 480px) {
  
  
  /* Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you
     j.mp/textsizeadjust 
  html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
}


/* 
 * print styles
 * inlined to avoid required HTTP connection www.phpied.com/delay-loading-your-print-css/ 
 */
@media print {
  * { background: transparent !important; color: #444 !important; text-shadow: none !important; }
  a, a:visited { color: #444 !important; text-decoration: underline; }
  a:after { content: " (" attr(href) ")"; } 
  abbr:after { content: " (" attr(title) ")"; }
  .ir a:after { content: ""; }  /* Don't show links for images */
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */ 
  tr, img { page-break-inside: avoid; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3{ page-break-after: avoid; }
}

Added applications/welcome/static/css/calendar.css version [263a0ae7af].


1
+
.calendar{z-index:99;position:relative;display:none;border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar table{border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;font-size:11px;color:#000;cursor:default;background:#d4d0c8;font-family:tahoma,verdana,sans-serif;}.calendar .button{text-align:center;padding:1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar .nav{background:transparent}.calendar thead .title{font-weight:bold;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar thead .name{border-bottom:1px solid #000;padding:2px;text-align:center;background:#f4f0e8;}.calendar thead .weekend{color:#f00;}.calendar thead .hilite{border-top:2px solid #fff;border-right:2px solid #000;border-bottom:2px solid #000;border-left:2px solid #fff;padding:0;background-color:#e4e0d8;}.calendar thead .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;background-color:#c4c0b8;}.calendar tbody .day{width:2em;text-align:right;padding:2px 4px 2px 2px;}.calendar tbody .day.othermonth{font-size:80%;color:#aaa;}.calendar tbody .day.othermonth.oweekend{color:#faa;}.calendar table .wn{padding:2px 3px 2px 2px;border-right:1px solid #000;background:#f4f0e8;}.calendar tbody .rowhilite td{background:#e4e0d8;}.calendar tbody .rowhilite td.wn{background:#d4d0c8;}.calendar tbody td.hilite{padding:1px 3px 1px 1px;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;}.calendar tbody td.active{padding:2px 2px 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar tbody td.selected{font-weight:bold;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;padding:2px 2px 0 2px;background:#e4e0d8;}.calendar tbody td.weekend{color:#f00;}.calendar tbody td.today{font-weight:bold;color:#00f;}.calendar tbody .disabled{color:#999;}.calendar tbody .emptycell{visibility:hidden;}.calendar tbody .emptyrow{display:none;}.calendar tfoot .ttip{background:#f4f0e8;padding:1px;border:1px solid #000;background:#848078;color:#fff;text-align:center;}.calendar tfoot .hilite{border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;padding:1px;background:#e4e0d8;}.calendar tfoot .active{padding:2px 0 0 2px;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo{position:absolute;display:none;width:4em;top:0;left:0;cursor:default;border-top:1px solid #fff;border-right:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #fff;background:#e4e0d8;font-size:90%;padding:1px;z-index:100;}.calendar .combo .label,.calendar .combo .label-IEfix{text-align:center;padding:1px;}.calendar .combo .label-IEfix{width:4em;}.calendar .combo .active{background:#c4c0b8;padding:0;border-top:1px solid #000;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #000;}.calendar .combo .hilite{background:#048;color:#fea;}.calendar td.time{border-top:1px solid #000;padding:1px 0;text-align:center;background-color:#f4f0e8;}.calendar td.time .hour,.calendar td.time .minute,.calendar td.time .ampm{padding:0 3px 0 4px;border:1px solid #889;font-weight:bold;background-color:#fff;}.calendar td.time .ampm{text-align:center;}.calendar td.time .colon{padding:0 2px 0 3px;font-weight:bold;}.calendar td.time span.hilite{border-color:#000;background-color:#766;color:#fff;}.calendar td.time span.active{border-color:#f00;background-color:#000;color:#0f0;}#CP_hourcont{z-index:99;padding:0;position:absolute;border:1px dashed #666;background-color:#eee;display:none;}#CP_minutecont{z-index:99;background-color:#ddd;padding:1px;position:absolute;width:45px;display:none;}.floatleft{float:left;}.CP_hour{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;}.CP_minute{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;}.CP_over{background-color:#fff;z-index:99}

Added applications/welcome/static/css/handheld.css version [721460498f].








1
2
3
4
5
6
7
+
+
+
+
+
+
+

* {
  float: none;       /* Screens are not big enough to account for floats */
  font-size: 80%;    /* Slightly reducing font size to reduce need to scroll */ 
  background: #fff;  /*  As much contrast as possible */
  color: #000;
}

Added applications/welcome/static/css/superfish-navbar.css version [f80d0fda82].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*** adding the class sf-navbar in addition to sf-menu creates an all-horizontal nav-bar menu ***/
.sf-navbar {
	background:		#BDD2FF;
	height:			2.5em;
	padding-bottom:	2.5em;
	position:		relative;
}
.sf-navbar li {
	background:		#AABDE6;
	position:		static;
}
.sf-navbar a {
	border-top:		none;
}
.sf-navbar li ul {
	width:			44em; /*IE6 soils itself without this*/
}
.sf-navbar li li {
	background:		#BDD2FF;
	position:		relative;
}
.sf-navbar li li ul {
	width:			13em;
}
.sf-navbar li li li {
	width:			100%;
}
.sf-navbar ul li {
	width:			auto;
	float:			left;
}
.sf-navbar a, .sf-navbar a:visited {
	border:			none;
}
.sf-navbar li.current {
	background:		#BDD2FF;
}
.sf-navbar li:hover,
.sf-navbar li.sfHover,
.sf-navbar li li.current,
.sf-navbar a:focus, .sf-navbar a:hover, .sf-navbar a:active {
	background:		#BDD2FF;
}
.sf-navbar ul li:hover,
.sf-navbar ul li.sfHover,
ul.sf-navbar ul li:hover li,
ul.sf-navbar ul li.sfHover li,
.sf-navbar ul a:focus, .sf-navbar ul a:hover, .sf-navbar ul a:active {
	background:		#D1DFFF;
}
ul.sf-navbar li li li:hover,
ul.sf-navbar li li li.sfHover,
.sf-navbar li li.current li.current,
.sf-navbar ul li li a:focus, .sf-navbar ul li li a:hover, .sf-navbar ul li li a:active {
	background:		#E6EEFF;
}
ul.sf-navbar .current ul,
ul.sf-navbar ul li:hover ul,
ul.sf-navbar ul li.sfHover ul {
	left:			0;
	top:			2.5em; /* match top ul list item height */
}
ul.sf-navbar .current ul ul {
	top: 			-999em;
}

.sf-navbar li li.current > a {
	font-weight:	bold;
}

/*** point all arrows down ***/
/* point right for anchors in subs */
.sf-navbar ul .sf-sub-indicator { background-position: -10px -100px; }
.sf-navbar ul a > .sf-sub-indicator { background-position: 0 -100px; }
/* apply hovers to modern browsers */
.sf-navbar ul a:focus > .sf-sub-indicator,
.sf-navbar ul a:hover > .sf-sub-indicator,
.sf-navbar ul a:active > .sf-sub-indicator,
.sf-navbar ul li:hover > a > .sf-sub-indicator,
.sf-navbar ul li.sfHover > a > .sf-sub-indicator {
	background-position: -10px -100px; /* arrow hovers for modern browsers*/
}

/*** remove shadow on first submenu ***/
.sf-navbar > li > ul {
	background: transparent;
	padding: 0;
	-moz-border-radius-bottomleft: 0;
	-moz-border-radius-topright: 0;
	-webkit-border-top-right-radius: 0;
	-webkit-border-bottom-left-radius: 0;
}

Added applications/welcome/static/css/superfish-vertical.css version [cc09787089].
























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*** adding sf-vertical in addition to sf-menu creates a vertical menu ***/
.sf-vertical, .sf-vertical li {
	width:	10em;
}
/* this lacks ul at the start of the selector, so the styles from the main CSS file override it where needed */
.sf-vertical li:hover ul,
.sf-vertical li.sfHover ul {
	left:	10em; /* match ul width */
	top:	0;
}

/*** alter arrow directions ***/
.sf-vertical .sf-sub-indicator { background-position: -10px 0; } /* IE6 gets solid image only */
.sf-vertical a > .sf-sub-indicator { background-position: 0 0; } /* use translucent arrow for modern browsers*/

/* hover arrow direction for modern browsers*/
.sf-vertical a:focus > .sf-sub-indicator,
.sf-vertical a:hover > .sf-sub-indicator,
.sf-vertical a:active > .sf-sub-indicator,
.sf-vertical li:hover > a > .sf-sub-indicator,
.sf-vertical li.sfHover > a > .sf-sub-indicator {
	background-position: -10px 0; /* arrow hovers for modern browsers*/
}

Added applications/welcome/static/css/superfish.css version [e354e3670d].












































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*** ESSENTIAL STYLES ***/
.sf-menu, .sf-menu * {
	margin:			0;
	padding:		0;
	list-style:		none;
}
.sf-menu {
	line-height:	1.0;
}
.sf-menu ul {
	position:		absolute;
	top:			-999em;
	width:			10em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
	width:			100%;
}
.sf-menu li:hover {
	visibility:		inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
	float:			left;
	position:		relative;
}
.sf-menu a {
	display:		block;
	position:		relative;
}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
	left:			0;
	top:			2.5em; /* match top ul list item height */
	z-index:		99;
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
	left:			10em; /* match ul width */
	top:			0;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
	left:			10em; /* match ul width */
	top:			0;
}

/*** DEMO SKIN ***/
.sf-menu {
	float:			left;
	/*margin-bottom:	1em;*/
}
.sf-menu a {
	border-left:	1px solid #fff;
	/*border-top:		1px solid #CFDEFF;*/
	padding: 		.75em 1em;
	text-decoration:none;
}
.sf-menu a, .sf-menu a:visited  { /* visited pseudo selector so IE6 applies text colour*/
	color: #275b90;/*#13a;*/
}
.sf-menu li {
	background: #dadada;/*#BDD2FF;*/
}
.sf-menu li li {
	background:		#AABDE6;
}
.sf-menu li li a {
	/*color: #13a;*/
}
.sf-menu li li li {
	background:		#9AAEDB;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
	background:		#CFDEFF;
	outline:		0;
}

/*** arrows **/
.sf-menu a.sf-with-ul {
	padding-right: 	2.25em;
	min-width:		1px; /* trigger IE7 hasLayout so spans position accurately */
}
.sf-sub-indicator {
	position:		absolute;
	display:		block;
	right:			.75em;
	top:			1.05em; /* IE6 only */
	width:			10px;
	height:			10px;
	text-indent: 	-999em;
	overflow:		hidden;
	background:		url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a > .sf-sub-indicator {  /* give all except IE6 the correct values */
	top:			.8em;
	background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}
/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
	background-position: -10px -100px; /* arrow hovers for modern browsers*/
}

/* point right for anchors in subs */
.sf-menu ul .sf-sub-indicator { background-position:  -10px 0; }
.sf-menu ul a > .sf-sub-indicator { background-position:  0 0; }
/* apply hovers to modern browsers */
.sf-menu ul a:focus > .sf-sub-indicator,
.sf-menu ul a:hover > .sf-sub-indicator,
.sf-menu ul a:active > .sf-sub-indicator,
.sf-menu ul li:hover > a > .sf-sub-indicator,
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
	background-position: -10px 0; /* arrow hovers for modern browsers*/
}

/*** shadows for all but IE6 ***/
.sf-shadow ul {
	background:	url('../images/shadow.png') no-repeat bottom right;
	padding: 0 8px 9px 0;
	-moz-border-radius-bottomleft: 17px;
	-moz-border-radius-topright: 17px;
	-webkit-border-top-right-radius: 17px;
	-webkit-border-bottom-left-radius: 17px;
}
.sf-shadow ul.sf-shadow-off {
	background: transparent;
}

Added applications/welcome/static/favicon.ico version [8849e0925e].

cannot compute difference between binary files

Added applications/welcome/static/images/arrows-ffffff.png version [848c456cab].

cannot compute difference between binary files

Added applications/welcome/static/images/css3buttons_backgrounds.png version [373872c147].

cannot compute difference between binary files

Added applications/welcome/static/images/css3buttons_icons.png version [3d43fcf538].

cannot compute difference between binary files

Added applications/welcome/static/images/error.png version [a460cc5cea].

cannot compute difference between binary files

Added applications/welcome/static/images/ok.png version [64ef5ff48b].

cannot compute difference between binary files

Added applications/welcome/static/images/poweredby.png version [0baee84b0d].

cannot compute difference between binary files

Added applications/welcome/static/images/shadow.png version [7ea95cf0e2].

cannot compute difference between binary files

Added applications/welcome/static/images/warn.png version [5b675a6959].

cannot compute difference between binary files

Added applications/welcome/static/images/warning.png version [9c06299898].

cannot compute difference between binary files

Added applications/welcome/static/js/calendar.js version [ee22da85cc].

cannot compute difference between binary files

Added applications/welcome/static/js/dd_belatedpng.js version [11ff3e17f1].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.8a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
**/
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();

Added applications/welcome/static/js/jquery.js version [7622c9ac23].

cannot compute difference between binary files

Added applications/welcome/static/js/modernizr-1.7.min.js version [96922cbe86].



1
2
+
+
// Modernizr v1.7  www.modernizr.com
window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)

Added applications/welcome/static/js/superfish.js version [b7b4fdd4a0].


























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);	
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
			
		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;
			
			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);
			
		}).each(function() {
			var menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : true,
		disableHI	: false,		// true disables hoverIntent detection
		onInit		: function(){}, // callback functions
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);

Added applications/welcome/static/js/web2py_ajax.js version [7f2851f561].


































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function popup(url) {
  newwindow=window.open(url,'name','height=400,width=600');
  if (window.focus) newwindow.focus();
  return false;
}
function collapse(id) { jQuery('#'+id).slideToggle(); }
function fade(id,value) { if(value>0) jQuery('#'+id).hide().fadeIn('slow'); else jQuery('#'+id).show().fadeOut('slow'); }
function ajax(u,s,t) {
    query = '';
    if (typeof s == "string") {
        d = jQuery(s).serialize();
        if(d){ query = d; }
    } else {
        pcs = [];
        for(i=0; i<s.length; i++) {
            q = jQuery("[name="+s[i]+"]").serialize();
            if(q){pcs.push(q);}
        }
        if (pcs.length>0){query = pcs.join("&");}
    }
    jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); 
}

String.prototype.reverse = function () { return this.split('').reverse().join('');};
function web2py_ajax_init() {
  jQuery('.hidden').hide();
  jQuery('.error').hide().slideDown('slow');
  jQuery('.flash').click(function() { jQuery(this).fadeOut('slow'); return false; });
  // jQuery('input[type=submit]').click(function(){var t=jQuery(this);t.hide();t.after('<input class="submit_disabled" disabled="disabled" type="submit" name="'+t.attr("name")+'_dummy" value="'+t.val()+'">')});
  jQuery('input.integer').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
  jQuery('input.double,input.decimal').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();});
  var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') ? w2p_ajax_confirm_message : "Are you sure you want to delete this object?";
  jQuery("input[type='checkbox'].delete").live('click', function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; });
  var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
  try {jQuery("input.date").live('focus',function() {Calendar.setup({
     inputField:this, ifFormat:date_format, showsTime:false
  }); }); } catch(e) {};
  var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
  try { jQuery("input.datetime").live('focus', function() {Calendar.setup({
     inputField:this, ifFormat:datetime_format, showsTime: true,timeFormat: "24"
  }); }); } catch(e) {};

  jQuery("input.time").live('focus', function() { var el = jQuery(this); 
          if (!el.hasClass('hasTimeEntry')) try { el.timeEntry(); } catch(e) {}; 
  });
};

jQuery(function() {   
   var flash = jQuery('.flash');
   flash.hide();
   if(flash.html()) flash.slideDown();
   web2py_ajax_init();
});
function web2py_trap_form(action,target) {
   jQuery('#'+target+' form').each(function(i){
      var form=jQuery(this);
      if(!form.hasClass('no_trap'))
        form.submit(function(obj){
         jQuery('.flash').hide().html('');
         web2py_ajax_page('post',action,form.serialize(),target);
         return false;
      });
   });
}
function web2py_ajax_page(method,action,data,target) {
  jQuery.ajax({'type':method,'url':action,'data':data,
    'beforeSend':function(xhr) {
      xhr.setRequestHeader('web2py-component-location',document.location);
      xhr.setRequestHeader('web2py-component-element',target);},
    'complete':function(xhr,text){
      var html=xhr.responseText;
      var content=xhr.getResponseHeader('web2py-component-content'); 
      var command=xhr.getResponseHeader('web2py-component-command');
      var flash=xhr.getResponseHeader('web2py-component-flash');
      var t = jQuery('#'+target);
      if(content=='prepend') t.prepend(html); 
      else if(content=='append') t.append(html);
      else if(content!='hide') t.html(html);  
      web2py_trap_form(action,target);
      web2py_ajax_init();      
      if(command) eval(command);
      if(flash) jQuery('.flash').html(flash).slideDown();
      }
    });
}
function web2py_component(action,target) {
  jQuery(function(){ web2py_ajax_page('get',action,null,target); });
}
function web2py_comet(url,onmessage,onopen,onclose) {
  if ("WebSocket" in window) {
    var ws = new WebSocket(url);
    ws.onopen = onopen?onopen:(function(){});
    ws.onmessage = onmessage;
    ws.onclose = onclose?onclose:(function(){});
    return true; // supported
  } else return false; // not supported
}

Added applications/welcome/static/robots.txt version [32c4950688].



1
2
+
+
User-agent: *
Disallow: /welcome/default/user

Added applications/welcome/views/__init__.py version [da39a3ee5e].

Added applications/welcome/views/appadmin.html version [3b13f939eb].







































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<script><!--
jQuery(document).ready(function(){
  jQuery("table.sortable tbody tr").mouseover( function() {
     jQuery(this).addClass("highlight"); }).mouseout( function() { 
     jQuery(this).removeClass("highlight"); });
  jQuery('table.sortable tbody tr:odd').addClass('odd');
  jQuery('table.sortable tbody tr:even').addClass('even');
});
//--></script>

{{if request.function=='index':}}
  <h1>{{=T("Available databases and tables")}}</h1>
  {{if not databases:}}{{=T("No databases in this application")}}{{pass}}
  {{for db in sorted(databases):}}
    {{for table in databases[db].tables:}}
      {{qry='%s.%s.id>0'%(db,table)}}
      {{tbl=databases[db][table]}}
      {{if hasattr(tbl,'_primarykey'):}}
        {{if tbl._primarykey:}}
            {{firstkey=tbl[tbl._primarykey[0]]}}
            {{if firstkey.type in ['string','text']:}}
              {{qry='%s.%s.%s!=""'%(db,table,firstkey.name)}}
            {{else:}}
              {{qry='%s.%s.%s>0'%(db,table,firstkey.name)}}
            {{pass}}
        {{else:}}
             {{qry=''}}
             {{pass}}
      {{pass}}
      <h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</h2>
      [ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
    <br /><br />
    {{pass}}
  {{pass}}

{{elif request.function=='select':}}
  <h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
  </h1>
   {{if table:}}
  [ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
    <h2>{{=T("Rows in table")}}</h2><br/>
   {{else:}}
    <h2>{{=T("Rows selected")}}</h2><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/>
      {{=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/>
    <h3>{{=nrows}} {{=T("selected")}}</h3>
    {{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
    {{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}    
    {{if rows:}}
       <div style="overflow: auto;" width="80%">
       {{linkto=URL('update',args=request.args[0])}}
       {{upload=URL('download',args=request.args[0])}}    
       {{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
       </div>
    {{pass}}
    <br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
    [ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
  {{if table:}}
    {{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
  {{pass}}


{{elif request.function=='insert':}}  
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=table._primarykey[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
    {{else:}}  
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
    {{pass}}
  </h1>
  <h2>{{=T("New Record")}}</h2><br/>
  {{=form}}



{{elif request.function=='update':}}
  <h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
    {{if hasattr(table,'_primarykey'):}}
      {{fieldname=request.vars.keys()[0]}}
      {{dbname=request.args[0]}}
      {{tablename=request.args[1]}}
      {{cond = table[fieldname].type in ['string','text'] and '!=""' or '>0'}}      
      {{=T("table")}} {{=A(tablename,_href=URL('select',args=dbname,vars=dict(query='%s.%s.%s%s'%(dbname,tablename,fieldname,cond))))}}
      {{=T("record")}} {{=A('%s=%s'%request.vars.items()[0],_href=URL('update',args=request.args[:2],vars=request.vars))}}
    {{else:}}
      {{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
      {{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
    {{pass}}
  </h1>
  <h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}



{{elif request.function=='state':}}
  <h1>{{=T("Internal State")}}</h1>
  <h2>{{=T("Current request")}}</h2>
  {{=BEAUTIFY(request)}}
  <br/><h2>{{=T("Current response")}}</h2>
  {{=BEAUTIFY(response)}}
  <br/><h2>{{=T("Current session")}}</h2>
  {{=BEAUTIFY(session)}}


{{elif request.function == 'ccache':}}
<h2>Cache</h2>
<div class="wrapper">
<div class="list">
    <div class="list-header">
        Statistics
    </div>
    <div class="content">
        <h3>Overview</h3>
        <p>
            Hit Ratio: 
            <strong>{{=total['ratio']}}%</strong> 
            (<strong>{{=total['hits']}}</strong> hits 
            and <strong>{{=total['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=total['objects']}}</strong> items, 
            <strong>{{=total['bytes']}}</strong> bytes 
            {{if total['bytes'] > 524287:}}
                (<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
            {{pass}}
        </p>
        <p>
            Cache contains items up to 
            <strong>{{="%02d" % total['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % total['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>RAM</h3>
        <p>
            Hit Ratio: 
            <strong>{{=ram['ratio']}}%</strong> 
            (<strong>{{=ram['hits']}}</strong> hits 
            and <strong>{{=ram['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=ram['objects']}}</strong> items, 
            <strong>{{=ram['bytes']}}</strong> bytes 
            {{if ram['bytes'] > 524287:}}
                (<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            RAM contains items up to 
            <strong>{{="%02d" % ram['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
        </p>
        <h3>DISK</h3>
        <p>
            Hit Ratio: 
            <strong>{{=disk['ratio']}}%</strong> 
            (<strong>{{=disk['hits']}}</strong> hits 
            and <strong>{{=disk['misses']}}</strong> misses)
        </p>
        <p>
            Size of cache: 
            <strong>{{=disk['objects']}}</strong> items, 
            <strong>{{=disk['bytes']}}</strong> bytes 
            {{if disk['bytes'] > 524287:}}
                (<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
            {{pass}}
        </p>
        <p>
            DISK contains items up to 
            <strong>{{="%02d" % disk['oldest'][0]}}</strong> hours 
            <strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes 
            <strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
        </p>
    </div>
    
    <div class="list-header">
    Manage Cache
    </div>
    <div class="content">
    <p>
        {{=form}}
    </p>
    </div>
</div>
<div class="clear"></div>
</div>
{{pass}}

Added applications/welcome/views/default/index.html version [58e990f1c8].


































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{left_sidebar_enabled=right_sidebar_enabled=False}}
{{extend 'layout.html'}}

{{if 'message' in globals():}}

<h1>{{=message}}</h1>

<hr />
<h2>{{=T("Readme")}}</h2>
<ul>
  <li>{{=T('You are successfully running web2py')}}</li>
  <li>{{=T('This is a copy of the scaffolding application')}}</li>
  <li>{{=T('You can modify this application and adapt it to your needs')}}</li>
  <li>{{=A(B(T("Administrative interface")), _href=URL('admin','default','index'))}}</li>
  <li>{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
  <li><a href="http://web2py.com">web2py.com</a></li>
  <li><a href="http://web2py.com/book">{{=T('Documentation')}}</a></li>
</ul>

<ol>
  <li>{{=T('You visited the url')}} {{=A(request.env.path_info,_href=request.env.path_info)}}</li>
  <li>{{=T('Which called the function')}} {{=A(request.function+'()',_href='#')}} {{=T('located in the file')}}
    {{=A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,_href=URL('admin','default','peek',args=(request.application,'controllers',request.controller+'.py')))}}</li>
  <li>{{=T('The output of the file is a dictionary that was rendered by the view')}}
    {{=A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))}}</li>
</ol>

{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}

{{block left_sidebar}}New Left Sidebar Content{{end}}
{{block right_sidebar}}New Right Sidebar Content{{end}}

Added applications/welcome/views/default/user.html version [7cba4a5dbc].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
{{=form}}
{{if request.args(0)=='login':}}
{{if not 'register' in auth.settings.actions_disabled:}}
<br/><a href="{{=URL(r=request,args='register')}}">register</a>
{{pass}}
{{if not 'request_reset_password' in auth.settings.actions_disabled:}}
<br/><a href="{{=URL(r=request,args='request_reset_password')}}">lost password</a>
{{pass}}
{{pass}}
</div>

<script language="javascript">
<!--
 jQuery("#web2py_user_form input:visible:enabled:first").focus();
//-->
</script> 

Added applications/welcome/views/generic.html version [5ecbd3689c].

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{extend 'layout.html'}}
{{"""

You should not modify this file. 
It is used as default when a view is not provided for your controllers

"""}}
<h2>{{=' '.join(x.capitalize() for x in request.function.split('_'))}}</h2>
{{if len(response._vars)==1:}}
{{=response._vars.values()[0]}}
{{elif len(response._vars)>1:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{if request.is_local:}}
{{=response.toolbar()}}
{{pass}}

Added applications/welcome/views/generic.json version [2eb11890a0].


1
+
{{from gluon.serializers import json}}{{=XML(json(response._vars))}}

Added applications/welcome/views/generic.load version [fa6df36d52].































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{'''
# License: Public Domain
# Author: Iceberg at 21cn dot com

With this generic.load file, you can use same function to serve two purposes.

= regular action
- ajax callback (when called with .load)

Example modified from http://www.web2py.com/AlterEgo/default/show/252:

def index():
    return dict(
		part1='hello world',
        	part2=LOAD(url=URL(r=request,f='auxiliary.load'),ajax=True))

def auxiliary():
    form=SQLFORM.factory(Field('name'))
    if form.accepts(request.vars):
        response.flash = 'ok' 
        return dict(message="Hello %s" % form.vars.name)
    return dict(form=form)

Notice:

- no need to set response.headers['web2py-response-flash']
- no need to return a string
even if the function is called via ajax.

'''}}{{if len(response._vars)==1:}}{{=response._vars.values()[0]}}{{else:}}{{=BEAUTIFY(response._vars)}}{{pass}}

Added applications/welcome/views/generic.pdf version [c404f699b1].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
{{
import os
from gluon.contrib.generics import pdf_from_html
filename = '%s/%s.html' % (request.controller,request.function)
if os.path.exists(os.path.join(request.folder,'views',filename)):
   html=response.render(filename)
else:
   html=BODY(BEAUTIFY(response._vars)).xml()
pass
=pdf_from_html(html)
}}

Added applications/welcome/views/generic.rss version [ed113b27d9].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
{{
###
# response._vars contains the dictionary returned by the controller action
# for this to work the action must return something like
#
#   dict(title=...,link=...,description=...,created_on='...',items=...)
#
# items is a list of dictionaries each with title, link, description, pub_date.
###
from gluon.serializers import rss}}{{=XML(rss(response._vars))}}

Added applications/welcome/views/generic.xml version [92f603b5bb].


1
+
{{from gluon.serializers import xml}}{{=XML(xml(response._vars))}}

Added applications/welcome/views/layout.html version [78b7d8a5ef].
































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<!DOCTYPE html>
<html lang="{{=T.accepted_language or 'en'}}" class="no-js"><!-- no-js need it for modernzr -->
  <head>
    
    <meta charset="utf-8" />	  	
    <!-- www.phpied.com/conditional-comments-block-downloads/ -->
    <!--[if IE]><![endif]-->    
    <!-- Always force latest IE rendering engine 
	 (even in intranet) & Chrome Frame 
	 Remove this if you use the .htaccess -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    
    <title>{{=response.title or request.application}}</title>
    
    <!-- http://dev.w3.org/html5/markup/meta.name.html -->
    <meta name="application-name" content="{{=request.application}}" />	
    
    <!-- Speaking of Google, don't forget to set your site up: 
	 http://google.com/webmasters -->
    <meta name="google-site-verification" content="" />
    
    <!--  Mobile Viewport Fix
	  j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag 
	  device-width: Occupy full width of the screen in its current orientation
	  initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
	  maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
      -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    
    <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
    <link rel="shortcut icon" href="{{=URL('static','favicon.ico')}}" type="image/x-icon">
    <link rel="apple-touch-icon" href="{{=URL('static','favicon.png')}}">

    <!-- For the less-enabled mobile browsers like Opera Mini -->
    <link rel="stylesheet" media="handheld" href="{{=URL('static','css/handheld.css')}}">
    
    <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
    <script src="{{=URL('static','js/modernizr-1.7.min.js')}}"></script>
    
    {{#------  require CSS and JS files for this page (read info in base.css) ------}}
    {{response.files.append(URL('static','css/base.css'))}}
    {{response.files.append(URL('static','css/superfish.css'))}}
    {{response.files.append(URL('static','js/superfish.js'))}}
    {{#------ include web2py specific js code (jquery, calendar, form stuff) ------}}
    {{include 'web2py_ajax.html'}}

    {{
    #using sidebars need to know what sidebar you want to use
    #prior of using it, because of static width size of content, you can use
    #left_sidebar, right_sidebar, both or none (False left and right)    
    left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
    right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
    if left_sidebar_enabled and right_sidebar_enabled: width_content='63%'
    elif left_sidebar_enabled != right_sidebar_enabled: width_content='740px'
    else: width_content='100%'
    if left_sidebar_enabled: left_sidebar_style = 'style="display: block;"'
    else: left_sidebar_style = 'style="display: none;"'
    if right_sidebar_enabled: right_sidebar_style = 'style="display: block;"'
    else: right_sidebar_style = 'style="display: none;"'
    style_content = 'style="width: %s"' % width_content
    }}
  </head>
  
  <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->	
  <!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
  <!--[if IE 7 ]>    <body class="ie7"> <![endif]-->
  <!--[if IE 8 ]>    <body class="ie8"> <![endif]-->
  <!--[if IE 9 ]>    <body class="ie9"> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->
    
    <div class="flash">{{=response.flash or ''}}</div> <!-- notification div -->
    
    <div id="container">	      		      	
      
      <div id="wrapper">		
	
	<div id="header"> <!-- header and login nav -->
	  {{block header}} <!-- this is default header -->
	  {{try:}}{{=auth.navbar(action=URL('default','user'))}}{{except:pass}}		          
	  <h1><span id="appname">{{=request.application.capitalize()}}</span>App</h1>
	  <div style="clear: both;"></div><!-- Clear the divs -->
	  {{end}}				  					  
	</div><!-- header  -->
	
	<div id="statusbar"><!-- statusbar is menu zone -->
	  {{block statusbar}} <!-- this is default statusbar -->
	  {{#------ superfish menu ------}}
	  {{=MENU(response.menu,_class='sf-menu')}}
	  <script type="text/javascript">
	    jQuery(document).ready(function(){
	    jQuery('ul.sf-menu').superfish();});
	  </script>
	  <div style="clear: both;"></div><!-- Clear the divs -->	
	  {{end}}				
	</div><!-- statusbar -->
	
	<div id="page"> <!-- Here my central body -->	  

	  {{if left_sidebar_enabled:}}
          <div id="left_sidebar" {{=XML(left_sidebar_style)}} >
            <div style="padding: 4px;">
	      {{block left_sidebar}}Content Left Sidebar{{end}}		  
            </div>
          </div><!-- left_sidebar -->
	  {{pass}}

	  <!-- content -->
	  <div id="content" {{=XML(style_content)}} >
	    {{include}}	
	  </div>
	  <!-- content -->

	  {{if right_sidebar_enabled:}}
          <div id="right_sidebar" {{=XML(right_sidebar_style)}} >
            <div style="padding: 4px;">
              {{block right_sidebar}}Content Right Sidebar{{end}}
            </div>
	  </div><!-- right_sidebar -->
          {{pass}}


	  <div style="clear: both;"></div><!-- Clear the divs -->
	  
	</div><!-- page -->							
	
	<div id="footer">
	  {{block footer}} <!-- this is default footer -->
	  <a href="http://www.web2py.com/" style="float: left; padding-right: 6px;">
	    <img src="{{=URL('static','images/poweredby.png')}}"/>
	  </a>
	  {{=T('Copyright')}} &#169; 2010				
	  <div style="clear: both;"></div><!-- Clear the divs -->
	  {{end}}

	</div><!-- footer -->			
      </div><!-- wrapper -->
    </div><!-- container -->		
    
    <!--[if lt IE 7 ]>
	<script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
	<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
	<![endif]-->
    
    <!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet 
	 change the UA-XXXXX-X to be your site's ID -->
    <!--   
	   <script>
	     var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
	     (function(d, t) {
	     var g = d.createElement(t),
	     s = d.getElementsByTagName(t)[0];
	     g.async = true;
	     g.src = '//www.google-analytics.com/ga.js';
	     s.parentNode.insertBefore(g, s);
	     })(document, 'script');
	   </script>
	   -->    
  </body>
</html>

Added applications/welcome/views/web2py_ajax.html version [4a6f603253].


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{
response.files.insert(0,URL('static','js/jquery.js'))
response.files.insert(1,URL('static','css/calendar.css'))
response.files.insert(2,URL('static','js/calendar.js'))
for _item in response.meta or []:}}
     <meta name="{{=_item}}" content="{{=response.meta[_item]}}" />{{
pass
for _k,_file in enumerate(response.files or []):
  if _file in response.files[:_k]:
     continue
  _file0=_file.lower().split('?')[0]
  if _file0.endswith('.css'):}}
     <link href="{{=_file}}" rel="stylesheet" type="text/css" />{{
  elif _file0.endswith('.js'):}}
     <script src="{{=_file}}" type="text/javascript"></script>{{
  pass
pass
}}
    <script type="text/javascript"><!--
    // These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
    var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
    var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
    var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
    //--></script>
    <script src="{{=URL('static','js/web2py_ajax.js')}}" type="text/javascript"></script>

Added cgihandler.py version [2f1a36bb3b].





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import os
import sys
import wsgiref.handlers

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]

import gluon.main

wsgiref.handlers.CGIHandler().run(gluon.main.wsgibase)

Added epydoc.conf version [9290b4f394].























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[epydoc] # Epydoc section marker (required by ConfigParser)

# The list of objects to document.  Objects can be named using
# dotted names, module filenames, or package directory names.
# Aliases for this option include "objects" and "values".
modules: gluon/*.py

# The type of output that should be generated.  Should be one
# of: html, text, latex, dvi, ps, pdf.
#output: latex
output: html

# The path to the output directory.  May be relative or absolute.
target: applications/examples/static/epydoc
#target: docs

# An integer indicating how verbose epydoc should be.  The default
# value is 0; negative values will suppress warnings and errors;
# positive values will give more verbose output.
verbosity: 0

# A boolean value indicating that Epydoc should show a traceback
# in case of unexpected error. By default don't show tracebacks
debug: 0

# If True, don't try to use colors or cursor control when doing
# textual output. The default False assumes a rich text prompt
simple-term: 0

### Generation options

# The default markup language for docstrings, for modules that do
# not define __docformat__.  Defaults to epytext.
docformat: epytext

# Whether or not parsing should be used to examine objects.
parse: yes

# Whether or not introspection should be used to examine objects.
introspect: yes

# Don't examine in any way the modules whose dotted name match this
# regular expression pattern.
#exclude:

# Don't perform introspection on the modules whose dotted name match this
# regular expression pattern.
#exclude-introspect:

# Don't perform parsing on the modules whose dotted name match this
# regular expression pattern.
#exclude-parse:

# The format for showing inheritance objects.
# It should be one of: 'grouped', 'listed', 'included'.
inheritance: listed

# Whether or not to include private variables.  (Even if included,
# private variables will be hidden by default.)
private: yes

# Whether or not to list each module's imports.
#imports: no

# Whether or not to include syntax highlighted source code in
# the output (HTML only).
sourcecode: yes

# Whether or not to include a page with Epydoc log, containing
# effective option at the time of generation and the reported logs.
include-log: no

### Output options

# The documented project's name.
name: web2py Web Framework

# The CSS stylesheet for HTML output.  Can be the name of a built-in
# stylesheet, or the name of a file.
css: epydoc.css

# The documented project's URL.
url: http://www.web2py.com

# HTML code for the project link in the navigation bar.  If left
# unspecified, the project link will be generated based on the
# project's name and URL.
# link: <a href="http://www.web2py.com">web2py</a>

# The "top" page for the documentation.  Can be a URL, the name
# of a module or class, or one of the special names "trees.html",
# "indices.html", or "help.html"
#top: os.path

# An alternative help file.  The named file should contain the
# body of an HTML file; navigation bars will be added to it.
#help: my_helpfile.html

# Whether or not to include a frames-based table of contents.
frames: yes

# Whether each class should be listed in its own section when
# generating LaTeX or PDF output.
separate-classes: no


### API linking options

# Define a new API document.  A new interpreted text role
# will be created
#external-api: epydoc

# Use the records in this file to resolve objects in the API named NAME.
#external-api-file: epydoc:api-objects.txt

# Use this URL prefix to configure the string returned for external API.
#external-api-root: epydoc:http://epydoc.sourceforge.net/api


### Graph options

# The list of graph types that should be automatically included
# in the output.  Graphs are generated using the Graphviz "dot"
# executable.  Graph types include: "classtree", "callgraph",
# "umlclasstree".  Use "all" to include all graph types
# graph: umlclasstree
# graph: 

# The path to the Graphviz "dot" executable, used to generate
# graphs.
#dotpath: C:/home/graphviz/bin/dot.exe
#dotpath: /Applications/Graphviz.app/Contents/MacOS/dot

# The name of one or more pstat files (generated by the profile
# or hotshot module).  These are used to generate call graphs.
#pstat: profile.out

# Specify the font used to generate Graphviz graphs.
# (e.g., helvetica or times).
# graph-font: Bitstream Vera Sans
graph-font: Helvetica

# Specify the font size used to generate Graphviz graphs.
graph-font-size: 10

### Return value options

# The condition upon which Epydoc should exit with a non-zero
# exit status. Possible values are error, warning, docstring_warning
#fail-on: error

Added epydoc.css version [586d28cf53].



























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


/* Epydoc CSS Stylesheet
 *
 * This stylesheet can be used to customize the appearance of epydoc's
 * HTML output.
 *
 */

/* Default Colors & Styles
 *   - Set the default foreground & background color with 'body'; and 
 *     link colors with 'a:link' and 'a:visited'.
 *   - Use bold for decision list terms.
 *   - The heading styles defined here are used for headings *within*
 *     docstring descriptions.  All headings used by epydoc itself use
 *     either class='epydoc' or class='toc' (CSS styles for both
 *     defined below).
body                        { background: #ffffff; color: #000000; }
a:link                      { color: #0000ff; }
a:visited                   { color: #204080; }
dt                          { font-weight: bold; }
h1                          { font-size: +140%; font-style: italic;
                              font-weight: bold; }
h2                          { font-size: +125%; font-style: italic;
                              font-weight: bold; }
h3                          { font-size: +110%; font-style: italic;
                              font-weight: normal; }
code                        { font-size: 100%; }
 */
 
body                     {  background-color: #fff; color: #585858; font-size: 10pt; font-family: georgia, serif; }
a                          {color: #FF5C1F; }
a:hover               { text-decoration: underline; }
a:visited               { color: #FF5C1F;}
dt                          { font-weight: bold; }
h1                          { font-size: +140%; font-style: italic;
                              font-weight: bold; }
h2                          { color: #185360; font-size: +125%; font-style: italic;
                              font-weight: bold; }
h3                          { color: #185360; font-size: +110%; font-style: italic;
                              font-weight: normal; }
code                        { font-size: 100%; }

/* Page Header & Footer
 *   - The standard page header consists of a navigation bar (with
 *     pointers to standard pages such as 'home' and 'trees'); a
 *     breadcrumbs list, which can be used to navigate to containing
 *     classes or modules; options links, to show/hide private
 *     variables and to show/hide frames; and a page title (using
 *     <h1>).  The page title may be followed by a link to the
 *     corresponding source code (using 'span.codelink').
 *   - The footer consists of a navigation bar, a timestamp, and a
 *     pointer to epydoc's homepage.

h1.epydoc                   { margin: 0; font-size: +140%; font-weight: bold; }
h2.epydoc                   { font-size: +130%; font-weight: bold; }
h3.epydoc                   { font-size: +115%; font-weight: bold; }
td h3.epydoc                { font-size: +115%; font-weight: bold;
                              margin-bottom: 0; }
table.navbar                { background: #a0c0ff; color: #000000;
                              border: 2px groove #c0d0d0; }
table.navbar table          { color: #000000; }
th.navbar-select            { background: #70b0ff;
                              color: #000000; } 
table.navbar a              { text-decoration: none; }  
table.navbar a:link         { color: #0000ff; }
table.navbar a:visited      { color: #204080; }
span.breadcrumbs            { font-size: 85%; font-weight: bold; }
span.options                { font-size: 70%; }
span.codelink               { font-size: 85%; }
td.footer                   { font-size: 85%; }
*/

h1.epydoc                   { margin: 0; font-size: +140%; font-weight: bold; }
h2.epydoc                   { font-size: +130%; font-weight: bold; }
h3.epydoc                   { font-size: +115%; font-weight: bold; }
td h3.epydoc                { font-size: +115%; font-weight: bold;
                              margin-bottom: 0; }
table.navbar                { background:  url('title.png') repeat-x; 
                                    #background: #a0c0ff; 
                                    color: #FF5C1F;
                                    #border: 2px groove #c0d0d0; }

table.navbar table          { color: #FF5C1F; }
th.navbar-select            { background: #fff;
                                        color: #195866; } 

table.navbar a              { text-decoration: none; 
                                        color: #FF5C1F;}  
table.navbar a:link         { color: #FF5C1F; }
table.navbar a:visited      { color: #FF5C1F; }

span.breadcrumbs            { font-size: 85%; font-weight: bold; }
span.options                { font-size: 70%; }
span.codelink               { font-size: 85%; }
td.footer                   { font-size: 85%; }


/* Table Headers
 *   - Each summary table and details section begins with a 'header'
 *     row.  This row contains a section title (marked by
 *     'span.table-header') as well as a show/hide private link
 *     (marked by 'span.options', defined above).
 *   - Summary tables that contain user-defined groups mark those
 *     groups using 'group header' rows.

td.table-header             { background: #70b0ff; color: #000000;
                              border: 1px solid #608090; }
td.table-header table       { color: #000000; }
td.table-header table a:link      { color: #0000ff; }
td.table-header table a:visited   { color: #204080; }
span.table-header           { font-size: 120%; font-weight: bold; }
th.group-header             { background: #c0e0f8; color: #000000;
                              text-align: left; font-style: italic; 
                              font-size: 115%; 
                              border: 1px solid #608090; }
*/
td.table-header             { background: #258396; color: #000000;
                              border: 1px solid #608090; }

td.table-header table       { color: #fff; }
td.table-header table a:link      { color: #FF5C1F; }
td.table-header table a:visited   { color: #FF5C1F; }
span.table-header           { font-size: 120%; font-weight: bold; }
th.group-header             { background: #185360; color: #fff;
                              text-align: left; font-style: italic; 
                              font-size: 115%; 
                              border: 1px solid #608090; }

/* Summary Tables (functions, variables, etc)
 *   - Each object is described by a single row of the table with
 *     two cells.  The left cell gives the object's type, and is
 *     marked with 'code.summary-type'.  The right cell gives the
 *     object's name and a summary description.
 *   - CSS styles for the table's header and group headers are
 *     defined above, under 'Table Headers'
 */
table.summary               { border-collapse: collapse;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #608090;
                              margin-bottom: 0.5em; }
td.summary                  { border: 1px solid #608090; }
code.summary-type           { font-size: 85%; }
table.summary a:link        { color: #FF5C1F; }
table.summary a:visited     { color: #FF5C1F; }


/* Details Tables (functions, variables, etc)
 *   - Each object is described in its own div.
 *   - A single-row summary table w/ table-header is used as
 *     a header for each details section (CSS style for table-header
 *     is defined above, under 'Table Headers').
 */
table.details               { border-collapse: collapse;
                              background: #e8f0f8; color: #585858;
                              border: 1px solid #608090;
                              margin: .2em 0 0 0; }
table.details table         { color: #fff; }
table.details a:link        { color: #FF5C1F; }
table.details a:visited     { color: #FF5C1F; }

/* Fields */
dl.fields                   { margin-left: 2em; margin-top: 1em;
                              margin-bottom: 1em; }
dl.fields dd ul             { margin-left: 0em; padding-left: 0em; }
div.fields                  { margin-left: 2em; }
div.fields p                { margin-bottom: 0.5em; }

/* Index tables (identifier index, term index, etc)
 *   - link-index is used for indices containing lists of links
 *     (namely, the identifier index & term index).
 *   - index-where is used in link indices for the text indicating
 *     the container/source for each link.
 *   - metadata-index is used for indices containing metadata
 *     extracted from fields (namely, the bug index & todo index).
 */
table.link-index            { border-collapse: collapse;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #608090; }
td.link-index               { border-width: 0px; }
table.link-index a:link     { color: #FF5C1F; }
table.link-index a:visited  { color: #FF5C1F; }
span.index-where            { font-size: 70%; }
table.metadata-index        { border-collapse: collapse;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #608090; 
                              margin: .2em 0 0 0; }
td.metadata-index           { border-width: 1px; border-style: solid; }
table.metadata-index a:link { color: #FF5C1F; }
table.metadata-index a:visited  { color: #FF5C1F; }

/* Function signatures
 *   - sig* is used for the signature in the details section.
 *   - .summary-sig* is used for the signature in the summary 
 *     table, and when listing property accessor functions.
.sig-name                   { color: #006080; }
.sig-arg                    { color: #008060; }
.sig-default                { color: #602000; }
.summary-sig                { font-family: monospace; }
.summary-sig-name           { color: #006080; font-weight: bold; }
table.summary a.summary-sig-name:link
                            { color: #006080; font-weight: bold; }
table.summary a.summary-sig-name:visited
                            { color: #006080; font-weight: bold; }
.summary-sig-arg            { color: #006040; }
.summary-sig-default        { color: #501800; }
 * */
.sig-name                   { color: #FF5C1F; }
.sig-arg                    { color: #008060; }
.sig-default                { color: #602000; }
.summary-sig                { font-family: monospace; }
.summary-sig-name           { color: #FF5C1F; font-weight: bold; }
table.summary a.summary-sig-name:link
                            { color: #FF5C1F; font-weight: bold; }
table.summary a.summary-sig-name:visited
                            { color: #FF5C1F; font-weight: bold; }
.summary-sig-arg            { color: #006040; }
.summary-sig-default        { color: #FF5C1F; }


/* To render variables, classes etc. like functions */
table.summary .summary-name { color: #FF5C1F; font-weight: bold;
                              font-family: monospace; }
table.summary
     a.summary-name:link    { color: #FF5C1F; font-weight: bold;
                              font-family: monospace; }
table.summary
    a.summary-name:visited  { color: #FF5C1F; font-weight: bold;
                              font-family: monospace; }

/* Variable values
 *   - In the 'variable details' sections, each variable's value is
 *     listed in a 'pre.variable' box.  The width of this box is
 *     restricted to 80 chars; if the value's repr is longer than
 *     this it will be wrapped, using a backslash marked with
 *     class 'variable-linewrap'.  If the value's repr is longer
 *     than 3 lines, the rest will be elided; and an ellipsis
 *     marker ('...' marked with 'variable-ellipsis') will be used.
 *   - If the value is a string, its quote marks will be marked
 *     with 'variable-quote'.
 *   - If the variable is a regexp, it is syntax-highlighted using
 *     the re* CSS classes.
 */
pre.variable                { padding: .5em; margin: 0;
                              background: #dce4ec; color: #000000;
                              border: 1px solid #708890; }
.variable-linewrap          { color: #604000; font-weight: bold; }
.variable-ellipsis          { color: #604000; font-weight: bold; }
.variable-quote             { color: #604000; font-weight: bold; }
.variable-group             { color: #008000; font-weight: bold; }
.variable-op                { color: #604000; font-weight: bold; }
.variable-string            { color: #006030; }
.variable-unknown           { color: #a00000; font-weight: bold; }
.re                         { color: #000000; }
.re-char                    { color: #006030; }
.re-op                      { color: #600000; }
.re-group                   { color: #003060; }
.re-ref                     { color: #404040; }

/* Base tree
 *   - Used by class pages to display the base class hierarchy.
 */
pre.base-tree               { font-size: 80%; margin: 0; }

/* Frames-based table of contents headers
 *   - Consists of two frames: one for selecting modules; and
 *     the other listing the contents of the selected module.
 *   - h1.toc is used for each frame's heading
 *   - h2.toc is used for subheadings within each frame.
 */
h1.toc                      { text-align: center; font-size: 105%;
                              margin: 0; font-weight: bold;
                              padding: 0; }
h2.toc                      { font-size: 100%; font-weight: bold; 
                              margin: 0.5em 0 0 -0.3em; }

/* Syntax Highlighting for Source Code
 *   - doctest examples are displayed in a 'pre.py-doctest' block.
 *     If the example is in a details table entry, then it will use
 *     the colors specified by the 'table pre.py-doctest' line.
 *   - Source code listings are displayed in a 'pre.py-src' block.
 *     Each line is marked with 'span.py-line' (used to draw a line
 *     down the left margin, separating the code from the line
 *     numbers).  Line numbers are displayed with 'span.py-lineno'.
 *     The expand/collapse block toggle button is displayed with
 *     'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
 *     modify the font size of the text.)
 *   - If a source code page is opened with an anchor, then the
 *     corresponding code block will be highlighted.  The code
 *     block's header is highlighted with 'py-highlight-hdr'; and
 *     the code block's body is highlighted with 'py-highlight'.
 *   - The remaining py-* classes are used to perform syntax
 *     highlighting (py-string for string literals, py-name for names,
 *     etc.)

pre.py-doctest              { padding: .5em; margin: 1em;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #708890; }
table pre.py-doctest        { background: #dce4ec;
                              color: #000000; }
pre.py-src                  { border: 2px solid #000000; 
                              background: #f0f0f0; color: #000000; }
.py-line                    { border-left: 2px solid #000000; 
                              margin-left: .2em; padding-left: .4em; }
.py-lineno                  { font-style: italic; font-size: 90%;
                              padding-left: .5em; }
a.py-toggle                 { text-decoration: none; }
div.py-highlight-hdr        { border-top: 2px solid #000000;
                              border-bottom: 2px solid #000000;
                              background: #d8e8e8; }
div.py-highlight            { border-bottom: 2px solid #000000;
                              background: #d0e0e0; }
.py-prompt                  { color: #005050; font-weight: bold;}
.py-more                    { color: #005050; font-weight: bold;}
.py-string                  { color: #006030; }
.py-comment                 { color: #003060; }
.py-keyword                 { color: #600000; }
.py-output                  { color: #404040; }
.py-name                    { color: #000050; }
.py-name:link               { color: #000050 !important; }
.py-name:visited            { color: #000050 !important; }
.py-number                  { color: #005000; }
.py-defname                 { color: #000060; font-weight: bold; }
.py-def-name                { color: #000060; font-weight: bold; }
.py-base-class              { color: #000060; }
.py-param                   { color: #000060; }
.py-docstring               { color: #006030; }
.py-decorator               { color: #804020; }
 */
/* Use this if you don't want links to names underlined: */
/*a.py-name                   { text-decoration: none; }*/

pre.py-doctest              { padding: .5em; margin: 1em;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #708890; }
table pre.py-doctest        { background: #dce4ec;
                              color: #000000; }
pre.py-src                  { border: 2px solid #000000; 
                              background: #f0f0f0; color: #000000; }
.py-line                    { border-left: 2px solid #000000; 
                              margin-left: .2em; padding-left: .4em; }
.py-lineno                  { font-style: italic; font-size: 90%;
                              padding-left: .5em; }
a.py-toggle                 { text-decoration: none; }
div.py-highlight-hdr        { border-top: 2px solid #000000;
                              border-bottom: 2px solid #000000;
                              background: #d8e8e8; }
div.py-highlight            { border-bottom: 2px solid #000000;
                              background: #d0e0e0; }
.py-prompt                  { color: #005050; font-weight: bold;}
.py-more                    { color: #005050; font-weight: bold;}
.py-string                  { color: green; }
.py-comment                 { color: green; }
.py-keyword                 { color: blue; }
.py-output                  { color: #404040; }
.py-name                    { color: #585858;}
.py-name:link               { color: #FF5C1F !important; }
.py-name:visited            { color: #FF5C1F !important; }
.py-number                  { color: #005000; }
.py-defname                 { color: #FF5C1F; font-weight: bold; }
.py-def-name                { color: #FF5C1F; font-weight: bold; }
.py-base-class              { color: #FF5C1F; }
.py-param                   { color: #000060; }
.py-docstring               { color: green; }
.py-decorator               { color: #804020; }

/* Graphs & Diagrams
 *   - These CSS styles are used for graphs & diagrams generated using
 *     Graphviz dot.  'img.graph-without-title' is used for bare
 *     diagrams (to remove the border created by making the image
 *     clickable).
 */
img.graph-without-title     { border: none; }
img.graph-with-title        { border: 1px solid #000000; }
span.graph-title            { font-weight: bold; }
span.graph-caption          { }

/* General-purpose classes
 *   - 'p.indent-wrapped-lines' defines a paragraph whose first line
 *     is not indented, but whose subsequent lines are.
 *   - The 'nomargin-top' class is used to remove the top margin (e.g.
 *     from lists).  The 'nomargin' class is used to remove both the
 *     top and bottom margin (but not the left or right margin --
 *     for lists, that would cause the bullets to disappear.)
 */
p.indent-wrapped-lines      { padding: 0 0 0 7em; text-indent: -7em; 
                              margin: 0; }
.nomargin-top               { margin-top: 0; }
.nomargin                   { margin-top: 0; margin-bottom: 0; }

/* HTML Log */
div.log-block               { padding: 0; margin: .5em 0 .5em 0;
                              background: #e8f0f8; color: #000000;
                              border: 1px solid #000000; }
div.log-error               { padding: .1em .3em .1em .3em; margin: 4px;
                              background: #ffb0b0; color: #000000;
                              border: 1px solid #000000; }
div.log-warning             { padding: .1em .3em .1em .3em; margin: 4px;
                              background: #ffffb0; color: #000000;
                              border: 1px solid #000000; }
div.log-info               { padding: .1em .3em .1em .3em; margin: 4px;
                              background: #b0ffb0; color: #000000;
                              border: 1px solid #000000; }
h2.log-hdr                  { background: #70b0ff; color: #000000;
                              margin: 0; padding: 0em 0.5em 0em 0.5em;
                              border-bottom: 1px solid #000000; font-size: 110%; }
p.log                       { font-weight: bold; margin: .5em 0 .5em 0; }
tr.opt-changed              { color: #000000; font-weight: bold; }
tr.opt-default              { color: #606060; }
pre.log                     { margin: 0; padding: 0; padding-left: 1em; }

Added fcgihandler.py version [381db6b66f].






















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

This is a handler for lighttpd+fastcgi
This file has to be in the PYTHONPATH
Put something like this in the lighttpd.conf file:

server.port = 8000
server.bind = '127.0.0.1'
server.event-handler = 'freebsd-kqueue'
server.modules = ('mod_rewrite', 'mod_fastcgi')
server.error-handler-404 = '/test.fcgi'
server.document-root = '/somewhere/web2py'
server.errorlog      = '/tmp/error.log'
fastcgi.server = ('.fcgi' =>
                    ('localhost' =>
                        ('min-procs' => 1,
                         'socket'    => '/tmp/fcgi.sock'
                        )
                    )
                 )
"""

LOGGING = False
SOFTCRON = False

import sys
import os

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]

import gluon.main
import gluon.contrib.gateways.fcgi as fcgi

if LOGGING:
    application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
                                        logfilename='httpserver.log',
                                        profilerfilename=None)
else:
    application = gluon.main.wsgibase

if SOFTCRON:
    from gluon.settings import global_settings
    global_settings.web2py_crontype = 'soft'

fcgi.WSGIServer(application, bindAddress='/tmp/fcgi.sock').run()

Added gaehandler.py version [2e5f959427].




















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

##############################################################################
# Configuration parameters for Google App Engine
##############################################################################
KEEP_CACHED = False    # request a dummy url every 10secs to force caching app
LOG_STATS = False      # web2py level log statistics
APPSTATS = True         # GAE level usage statistics and profiling
DEBUG = False          # debug mode
AUTO_RETRY = True      # force gae to retry commit on failure
#
# Read more about APPSTATS here
#   http://googleappengine.blogspot.com/2010/03/easy-performance-profiling-with.html
# can be accessed from:
#   http://localhost:8080/_ah/stats
##############################################################################
# All tricks in this file developed by Robin Bhattacharyya
##############################################################################


import time
import os
import sys
import logging
import cPickle
import pickle
import wsgiref.handlers
import datetime

path = os.path.dirname(os.path.abspath(__file__))
sys.path = [path]+[p for p in sys.path if not p==path]

sys.modules['cPickle'] = sys.modules['pickle']


from gluon.settings import global_settings
from google.appengine.api.labs import taskqueue
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app


global_settings.web2py_runtime_gae = True
global_settings.db_sessions = True
if os.environ.get('SERVER_SOFTWARE', '').startswith('Devel'):
    (global_settings.web2py_runtime, DEBUG) = \
        ('gae:development', True)
else:
    (global_settings.web2py_runtime, DEBUG) = \
        ('gae:production', False)


import gluon.main


def log_stats(fun):
    """Function that will act as a decorator to make logging"""
    def newfun(env, res):
        """Log the execution time of the passed function"""
        timer = lambda t: (t.time(), t.clock())
        (t0, c0) = timer(time)
        executed_function = fun(env, res)
        (t1, c1) = timer(time)
        log_info = """**** Request: %.2fms/%.2fms (real time/cpu time)"""
        log_info = log_info % ((t1 - t0) * 1000, (c1 - c0) * 1000)
        logging.info(log_info)
        return executed_function
    return newfun


logging.basicConfig(level=logging.INFO)


def wsgiapp(env, res):
    """Return the wsgiapp"""
    if env['PATH_INFO'] == '/_ah/queue/default':
        if KEEP_CACHED:
            delta = datetime.timedelta(seconds=10)
            taskqueue.add(eta=datetime.datetime.now() + delta)
        res('200 OK',[('Content-Type','text/plain')])
        return ['']
    env['PATH_INFO'] = env['PATH_INFO'].encode('utf8')

    #this deals with a problem where GAE development server seems to forget
    # the path between requests
    if global_settings.web2py_runtime == 'gae:development':
        gluon.admin.create_missing_folders()

    return gluon.main.wsgibase(env, res)


if LOG_STATS or DEBUG:
    wsgiapp = log_stats(wsgiapp)


if AUTO_RETRY:
    from gluon.contrib.gae_retry import autoretry_datastore_timeouts
    autoretry_datastore_timeouts()


def main():
    """Run the wsgi app"""
    if APPSTATS:
        run_wsgi_app(wsgiapp)
    else:
        wsgiref.handlers.CGIHandler().run(wsgiapp)

if __name__ == '__main__':
    main()

Added gluon/__init__.py version [261ab37d87].






















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)


Web2Py framework modules
========================
"""

__all__ = ['A', 'B', 'BEAUTIFY', 'BODY', 'BR', 'CAT', 'CENTER', 'CLEANUP', 'CODE', 'CRYPT', 'DAL', 'DIV', 'EM', 'EMBED', 'FIELDSET', 'FORM', 'Field', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEAD', 'HR', 'HTML', 'HTTP', 'I', 'IFRAME', 'IMG', 'INPUT', 'IS_ALPHANUMERIC', 'IS_DATE', 'IS_DATETIME', 'IS_DATETIME_IN_RANGE', 'IS_DATE_IN_RANGE', 'IS_DECIMAL_IN_RANGE', 'IS_EMAIL', 'IS_EMPTY_OR', 'IS_EQUAL_TO', 'IS_EXPR', 'IS_FLOAT_IN_RANGE', 'IS_IMAGE', 'IS_INT_IN_RANGE', 'IS_IN_DB', 'IS_IN_SET', 'IS_IPV4', 'IS_LENGTH', 'IS_LIST_OF', 'IS_LOWER', 'IS_MATCH', 'IS_NOT_EMPTY', 'IS_NOT_IN_DB', 'IS_NULL_OR', 'IS_SLUG', 'IS_STRONG', 'IS_TIME', 'IS_UPLOAD_FILENAME', 'IS_UPPER', 'IS_URL', 'LABEL', 'LEGEND', 'LI', 'LINK', 'MARKMIN', 'MENU', 'META', 'OBJECT', 'OL', 'ON', 'OPTGROUP', 'OPTION', 'P', 'PRE', 'SCRIPT', 'SELECT', 'SPAN', 'SQLFORM', 'SQLTABLE', 'STYLE', 'TABLE', 'TAG', 'TBODY', 'TD', 'TEXTAREA', 'TFOOT', 'TH', 'THEAD', 'TITLE', 'TR', 'TT', 'UL', 'URL', 'XHTML', 'XML','redirect','current','embed64']

from globals import current
from html import *
from validators import *
from http import redirect, HTTP
from dal import DAL, Field
from sqlhtml import SQLFORM, SQLTABLE

Added gluon/admin.py version [76dc3c9e63].






































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Utility functions for the Admin application
===========================================
"""
import os
import sys
import traceback
import zipfile
import urllib
from shutil import rmtree
from utils import web2py_uuid
from fileutils import w2p_pack, w2p_unpack, w2p_pack_plugin, w2p_unpack_plugin
from fileutils import up, fix_newlines, abspath, recursive_unlink
from fileutils import read_file, write_file
from restricted import RestrictedError
from settings import global_settings

def apath(path='', r=None):
    """
    Builds a path inside an application folder

    Parameters
    ----------
    path:
        path within the application folder
    r:
        the global request object

    """

    opath = up(r.folder)
    while path[:3] == '../':
        (opath, path) = (up(opath), path[3:])
    return os.path.join(opath, path).replace('\\', '/')


def app_pack(app, request):
    """
    Builds a w2p package for the application

    Parameters
    ----------
    app:
        application name
    request:
        the global request object

    Returns
    -------
    filename:
        filename of the w2p file or None on error
    """
    try:
        app_cleanup(app, request)
        filename = apath('../deposit/%s.w2p' % app, request)
        w2p_pack(filename, apath(app, request))
        return filename
    except Exception:
        return False


def app_pack_compiled(app, request):
    """
    Builds a w2p bytecode-compiled package for the application

    Parameters
    ----------
    app:
        application name
    request:
        the global request object

    Returns
    -------
    filename:
        filename of the w2p file or None on error
    """

    try:
        filename = apath('../deposit/%s.w2p' % app, request)
        w2p_pack(filename, apath(app, request), compiled=True)
        return filename
    except Exception:
        return None

def app_cleanup(app, request):
    """
    Removes session, cache and error files

    Parameters
    ----------
    app:
        application name
    request:
        the global request object
    """
    r = True

    # Remove error files
    path = apath('%s/errors/' % app, request)
    if os.path.exists(path):
        for f in os.listdir(path):
            try:
                if f[:1]!='.': os.unlink(os.path.join(path,f))
            except IOError:
                r = False

    # Remove session files
    path = apath('%s/sessions/' % app, request)
    if os.path.exists(path):
        for f in os.listdir(path):
            try:
                if f[:1]!='.': recursive_unlink(os.path.join(path,f))
            except IOError:
                r = False

    # Remove cache files
    path = apath('%s/sessions/' % app, request)
    if os.path.exists(path):
        for f in os.listdir(path):
            try:
                if f[:1]!='.': os.unlink(os.path.join(path,f))
            except IOError:
                r = False
    return r


def app_compile(app, request):
    """
    Compiles the application

    Parameters
    ----------
    app:
        application name
    request:
        the global request object
    """
    from compileapp import compile_application, remove_compiled_application
    folder = apath(app, request)
    try:
        compile_application(folder)
        return None
    except (Exception, RestrictedError):
        tb = traceback.format_exc(sys.exc_info)
        remove_compiled_application(folder)
        return tb

def app_create(app, request,force=False,key=None):
    """
    Create a copy of welcome.w2p (scaffolding) app

    Parameters
    ----------
    app:
        application name
    request:
        the global request object

    """
    try:
        path = apath(app, request)
        os.mkdir(path)
    except:
        if not force:
            return False
    try:
        w2p_unpack('welcome.w2p', path)
        for subfolder in ['models','views','controllers', 'databases',
                          'modules','cron','errors','sessions',
                          'languages','static','private','uploads']:
            subpath =  os.path.join(path,subfolder)
            if not os.path.exists(subpath):
                os.mkdir(subpath)
        db = os.path.join(path, 'models', 'db.py')
        if os.path.exists(db):
            data = read_file(db)
            data = data.replace('<your secret key>',
                                'sha512:'+(key or web2py_uuid()))
            write_file(db, data)
        return True
    except:
        rmtree(path)
        return False


def app_install(app, fobj, request, filename, overwrite=None):
    """
    Installs an application:

    - Identifies file type by filename
    - Writes `fobj` contents to the `../deposit/` folder
    - Calls `w2p_unpack()` to do the job.

    Parameters
    ----------
    app:
        new application name
    fobj:
        file object containing the application to be installed
    request:
        the global request object
    filename:
        original filename of the `fobj`, required to determine extension

    Returns
    -------
    upname:
        name of the file where app is temporarily stored or `None` on failure
    """
    did_mkdir = False
    if filename[-4:] == '.w2p':
        extension = 'w2p'
    elif filename[-7:] == '.tar.gz':
        extension = 'tar.gz'
    else:
        extension = 'tar'
    upname = apath('../deposit/%s.%s' % (app, extension), request)

    try:
        write_file(upname, fobj.read(), 'wb')
        path = apath(app, request)
        if not overwrite:
            os.mkdir(path)
            did_mkdir = True
        w2p_unpack(upname, path)
        if extension != 'tar':
            os.unlink(upname)
        fix_newlines(path)
        return upname
    except Exception:
        if did_mkdir:
            rmtree(path)
        return False


def app_uninstall(app, request):
    """
    Uninstalls the application.

    Parameters
    ----------
    app:
        application name
    request:
        the global request object

    Returns
    -------
    `True` on success, `False` on failure
    """
    try:
        # Hey App, this is your end...
        path = apath(app, request)
        rmtree(path)
        return True
    except Exception:
        return False

def plugin_pack(app, plugin_name, request):
    """
    Builds a w2p package for the application

    Parameters
    ----------
    app:
        application name
    plugin_name:
        the name of the plugin without plugin_ prefix
    request:
        the current request app

    Returns
    -------
    filename:
        filename of the w2p file or None on error
    """
    try:
        filename = apath('../deposit/web2py.plugin.%s.w2p' % plugin_name, request)
        w2p_pack_plugin(filename, apath(app, request), plugin_name)
        return filename
    except Exception:
        return False

def plugin_install(app, fobj, request, filename):
    """
    Installs an application:

    - Identifies file type by filename
    - Writes `fobj` contents to the `../deposit/` folder
    - Calls `w2p_unpack()` to do the job.

    Parameters
    ----------
    app:
        new application name
    fobj:
        file object containing the application to be installed
    request:
        the global request object
    filename:
        original filename of the `fobj`, required to determine extension

    Returns
    -------
    upname:
        name of the file where app is temporarily stored or `None` on failure
    """

    upname = apath('../deposit/%s' % filename, request)

    try:
        write_file(upname, fobj.read(), 'wb')
        path = apath(app, request)
        w2p_unpack_plugin(upname, path)
        fix_newlines(path)
        return upname
    except Exception:
        os.unlink(upname)
        return False

def check_new_version(myversion, version_URL):
    """
    Compares current web2py's version with the latest stable web2py version.

    Parameters
    ----------
    myversion:
        the current version as stored in file `web2py/VERSION`
    version_URL:
        the URL that contains the version of the latest stable release

    Returns
    -------
    state:
        `True` if upgrade available, `False` if current version if up-to-date,
        -1 on error
    version:
        the most up-to-version available
    """
    try:
        from urllib import urlopen
        version = urlopen(version_URL).read()
    except Exception:
        return -1, myversion

    if version > myversion:
        return True, version
    else:
        return False, version

def unzip(filename, dir, subfolder=''):
    """
    Unzips filename into dir (.zip only, no .gz etc)
    if subfolder!='' it unzip only files in subfolder
    """
    filename = abspath(filename)
    if not zipfile.is_zipfile(filename):
        raise RuntimeError, 'Not a valid zipfile'
    zf = zipfile.ZipFile(filename)
    if not subfolder.endswith('/'):
        subfolder = subfolder + '/'
    n = len(subfolder)
    for name in sorted(zf.namelist()):
        if not name.startswith(subfolder):
            continue
        #print name[n:]
        if name.endswith('/'):
            folder = os.path.join(dir,name[n:])
            if not os.path.exists(folder):
                os.mkdir(folder)
        else:
            write_file(os.path.join(dir, name[n:]), zf.read(name), 'wb')


def upgrade(request, url='http://web2py.com'):
    """
    Upgrades web2py (src, osx, win) is a new version is posted.
    It detects whether src, osx or win is running and downloads the right one

    Parameters
    ----------
    request:
        the current request object, required to determine version and path
    url:
        the incomplete url where to locate the latest web2py
        actual url is url+'/examples/static/web2py_(src|osx|win).zip'

    Returns
    -------
        True on success, False on failure (network problem or old version)
    """
    web2py_version = request.env.web2py_version
    gluon_parent = request.env.gluon_parent
    if not gluon_parent.endswith('/'):
        gluon_parent = gluon_parent + '/'
    (check, version) = check_new_version(web2py_version,
                                         url+'/examples/default/version')
    if not check:
        return (False, 'Already latest version')
    if os.path.exists(os.path.join(gluon_parent, 'web2py.exe')):
        version_type = 'win'
        destination = gluon_parent
        subfolder = 'web2py/'
    elif gluon_parent.endswith('/Contents/Resources/'):
        version_type = 'osx'
        destination = gluon_parent[:-len('/Contents/Resources/')]
        subfolder = 'web2py/web2py.app/'
    else:
        version_type = 'src'
        destination = gluon_parent
        subfolder = 'web2py/'

    full_url = url + '/examples/static/web2py_%s.zip' % version_type
    filename = abspath('web2py_%s_downloaded.zip' % version_type)
    file = None
    try:
        write_file(filename, urllib.urlopen(full_url).read(), 'wb')
    except Exception,e:
        return False, e
    try:
        unzip(filename, destination, subfolder)
        return True, None
    except Exception,e:
        return False, e

def add_path_first(path):
    sys.path = [path]+[p for p in sys.path if (not p==path and not p==(path+'/'))]

def create_missing_folders():
    if not global_settings.web2py_runtime_gae:
        for path in ('applications', 'deposit', 'site-packages', 'logs'):
            path = abspath(path, gluon=True)
            if not os.path.exists(path):
                os.mkdir(path)
    paths = (global_settings.gluon_parent, abspath('site-packages', gluon=True),  abspath('gluon', gluon=True), '')
    [add_path_first(path) for path in paths]

def create_missing_app_folders(request):
    if not global_settings.web2py_runtime_gae:
        if request.folder not in global_settings.app_folders:
            for subfolder in ('models', 'views', 'controllers', 'databases',
                              'modules', 'cron', 'errors', 'sessions',
                              'languages', 'static', 'private', 'uploads'):
                path =  os.path.join(request.folder, subfolder)
                if not os.path.exists(path):
                    os.mkdir(path)
            global_settings.app_folders.add(request.folder)

Added gluon/cfs.py version [a70d589858].




















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Functions required to execute app components
============================================

FOR INTERNAL USE ONLY
"""

import os
import stat
import thread
from fileutils import read_file

cfs = {}  # for speed-up
cfs_lock = thread.allocate_lock()  # and thread safety


def getcfs(key, filename, filter=None):
    """
    Caches the *filtered* file `filename` with `key` until the file is
    modified.

    :param key: the cache key
    :param filename: the file to cache
    :param filter: is the function used for filtering. Normally `filename` is a
        .py file and `filter` is a function that bytecode compiles the file.
        In this way the bytecode compiled file is cached. (Default = None)

    This is used on Google App Engine since pyc files cannot be saved.
    """
    t = os.stat(filename)[stat.ST_MTIME]
    cfs_lock.acquire()
    item = cfs.get(key, None)
    cfs_lock.release()
    if item and item[0] == t:
        return item[1]
    if not filter:
        data = read_file(filename)
    else:
        data = filter()
    cfs_lock.acquire()
    cfs[key] = (t, data)
    cfs_lock.release()
    return data

Added gluon/compileapp.py version [77197379d7].




























































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Functions required to execute app components
============================================

FOR INTERNAL USE ONLY
"""

import re
import sys
import fnmatch
import os
import copy
import random
import __builtin__
from storage import Storage, List
from template import parse_template
from restricted import restricted, compile2
from fileutils import mktree, listdir, read_file, write_file
from myregex import regex_expose
from languages import translator
from dal import BaseAdapter, SQLDB, SQLField, DAL, Field
from sqlhtml import SQLFORM, SQLTABLE
from cache import Cache
from globals import current
import settings
from cfs import getcfs
import html
import validators
from http import HTTP, redirect
import marshal
import shutil
import imp
import logging
logger = logging.getLogger("web2py")
import rewrite

try:
    import py_compile
except:
    logger.warning('unable to import py_compile')

is_gae = settings.global_settings.web2py_runtime_gae
is_jython = settings.global_settings.is_jython = 'java' in sys.platform.lower() or hasattr(sys, 'JYTHON_JAR') or str(sys.copyright).find('Jython') > 0

TEST_CODE = \
    r"""
def _TEST():
    import doctest, sys, cStringIO, types, cgi, gluon.fileutils
    if not gluon.fileutils.check_credentials(request):
        raise HTTP(401, web2py_error='invalid credentials')
    stdout = sys.stdout
    html = '<h2>Testing controller "%s.py" ... done.</h2><br/>\n' \
        % request.controller
    for key in sorted([key for key in globals() if not key in __symbols__+['_TEST']]):
        eval_key = eval(key)
        if type(eval_key) == types.FunctionType:
            number_doctests = sum([len(ds.examples) for ds in doctest.DocTestFinder().find(eval_key)])
            if number_doctests>0:
                sys.stdout = cStringIO.StringIO()
                name = '%s/controllers/%s.py in %s.__doc__' \
                    % (request.folder, request.controller, key)
                doctest.run_docstring_examples(eval_key,
                    globals(), False, name=name)
                report = sys.stdout.getvalue().strip()
                if report:
                    pf = 'failed'
                else:
                    pf = 'passed'
                html += '<h3 class="%s">Function %s [%s]</h3>\n' \
                    % (pf, key, pf)
                if report:
                    html += CODE(report, language='web2py', \
                        link='/examples/global/vars/').xml()
                html += '<br/>\n'
            else:
                html += \
                    '<h3 class="nodoctests">Function %s [no doctests]</h3><br/>\n' \
                    % (key)
    response._vars = html
    sys.stdout = stdout
_TEST()
"""

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__
    def __getitem__(self, key):
        try:
            return getattr(__builtin__, key)
        except AttributeError:
            raise KeyError, key            
    def __setitem__(self, key, value):
        setattr(self, key, value)

class LoadFactory(object):
    """
    Attention: this helper is new and experimental
    """
    def __init__(self,environment):
        self.environment = environment
    def __call__(self, c=None, f='index', args=[], vars={},
                 extension=None, target=None,ajax=False,ajax_trap=False,
                 url=None,user_signature=False, content='loading...',**attr):
        import globals
        target = target or 'c'+str(random.random())[2:]
        attr['_id']=target
        request = self.environment['request']
        if not isinstance(vars,Storage):
            vars = Storage(vars)
        if '.' in f:
            f, extension = f.split('.',1)
        if url or ajax:
            url = url or html.URL(request.application, c, f, r=request,
                                  args=args, vars=vars, extension=extension,
                                  user_signature=user_signature)
            script = html.SCRIPT('web2py_component("%s","%s")' % (url, target),
                                 _type="text/javascript")
            return html.TAG[''](script, html.DIV(content,**attr))
        else:
            if not isinstance(args,(list,tuple)):
                args = [args]
            c = c or request.controller

            other_request = Storage()
            for key, value in request.items():
                other_request[key] = value
            other_request['env'] = Storage()
            for key, value in request.env.items():
                other_request.env['key'] = value 
            other_request.controller = c
            other_request.function = f
            other_request.extension = extension or request.extension
            other_request.args = List(args)
            other_request.vars = vars
            other_request.get_vars = vars
            other_request.post_vars = Storage()
            other_response = globals.Response()
            other_request.env.path_info = '/' + \
                '/'.join([request.application,c,f] + \
                             map(str, other_request.args))
            other_request.env.query_string = \
                vars and html.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_response.view = '%s/%s.%s' % (c,f, other_request.extension)
            other_environment = copy.copy(self.environment)
            other_response._view_environment = other_environment
            other_response.generic_patterns = \
                copy.copy(current.response.generic_patterns)
            other_environment['request'] = other_request
            other_environment['response'] = other_response

            ## some magic here because current are thread-locals

            original_request, current.request = current.request, other_request
            original_response, current.response = current.response, other_response
            page = run_controller_in(c, f, other_environment)
            if isinstance(page, dict):
                other_response._vars = page
                for key in page:
                    other_response._view_environment[key] = page[key]
                run_view_in(other_response._view_environment)
                page = other_response.body.getvalue()
            current.request, current.response = original_request, original_response
            js = None
            if ajax_trap:
                link = html.URL(request.application, c, f, r=request,
                                args=args, vars=vars, extension=extension,
                                user_signature=user_signature)
                js = "web2py_trap_form('%s','%s');" % (link, target)
            script = js and html.SCRIPT(js,_type="text/javascript") or ''
            return html.TAG[''](html.DIV(html.XML(page),**attr),script)


def local_import_aux(name, force=False, app='welcome'):
    """
    In apps, instead of importing a local module
    (in applications/app/modules) with::

       import a.b.c as d

    you should do::

       d = local_import('a.b.c')

    or (to force a reload):

       d = local_import('a.b.c', reload=True)

    This prevents conflict between applications and un-necessary execs.
    It can be used to import any module, including regular Python modules.
    """
    items = name.replace('/','.')
    name = "applications.%s.modules.%s" % (app, items)
    module = __import__(name)
    for item in name.split(".")[1:]:
        module = getattr(module, item)
    if force:
        reload(module)
    return module


"""
OLD IMPLEMENTATION:
    items = name.replace('/','.').split('.')
    filename, modulepath = items[-1], os.path.join(apath,'modules',*items[:-1])
    imp.acquire_lock()
    try:
        file=None
        (file,path,desc) = imp.find_module(filename,[modulepath]+sys.path)
        if not path in sys.modules or reload:
            if is_gae:
                module={}
                execfile(path,{},module)
                module=Storage(module)
            else:
                module = imp.load_module(path,file,path,desc)
            sys.modules[path] = module
        else:
            module = sys.modules[path]
    except Exception, e:
        module = None
    if file:
        file.close()
    imp.release_lock()
    if not module:
        raise ImportError, "cannot find module %s in %s" % (filename, modulepath)
    return module
"""

def build_environment(request, response, session, store_current=True):
    """
    Build the environment dictionary into which web2py files are executed.
    """

    environment = {}
    for key in html.__all__:
        environment[key] = getattr(html, key)
    for key in validators.__all__:
        environment[key] = getattr(validators, key)
    if not request.env:
        request.env = Storage()

    t = environment['T'] = translator(request)
    c = environment['cache'] = Cache(request)
    if store_current:
        current.request = request
        current.response = response
        current.session = session
        current.T = t
        current.cache = c

    global __builtins__
    if is_jython: # jython hack
        __builtins__ = mybuiltin()
    else:
        __builtins__['__import__'] = __builtin__.__import__
    environment['__builtins__'] = __builtins__
    environment['HTTP'] = HTTP
    environment['redirect'] = redirect
    environment['request'] = request
    environment['response'] = response
    environment['session'] = session
    environment['DAL'] = DAL
    environment['Field'] = Field
    environment['SQLDB'] = SQLDB        # for backward compatibility
    environment['SQLField'] = SQLField  # for backward compatibility
    environment['SQLFORM'] = SQLFORM
    environment['SQLTABLE'] = SQLTABLE
    environment['LOAD'] = LoadFactory(environment)
    environment['local_import'] = \
        lambda name, reload=False, app=request.application:\
        local_import_aux(name,reload,app)
    BaseAdapter.set_folder(os.path.join(request.folder, 'databases'))
    response._view_environment = copy.copy(environment)
    return environment


def save_pyc(filename):
    """
    Bytecode compiles the file `filename`
    """
    py_compile.compile(filename)


def read_pyc(filename):
    """
    Read the code inside a bytecode compiled file if the MAGIC number is
    compatible

    :returns: a code object
    """
    data = read_file(filename, 'rb')
    if not is_gae and data[:4] != imp.get_magic():
        raise SystemError, 'compiled code is incompatible'
    return marshal.loads(data[8:])


def compile_views(folder):
    """
    Compiles all the views in the application specified by `folder`
    """

    path = os.path.join(folder, 'views')
    for file in listdir(path, '^[\w/]+\.\w+$'):
        data = parse_template(file, path)
        filename = ('views/%s.py' % file).replace('/', '_').replace('\\', '_')
        filename = os.path.join(folder, 'compiled', filename)
        write_file(filename, data)
        save_pyc(filename)
        os.unlink(filename)


def compile_models(folder):
    """
    Compiles all the models in the application specified by `folder`
    """

    path = os.path.join(folder, 'models')
    for file in listdir(path, '.+\.py$'):
        data = read_file(os.path.join(path, file))
        filename = os.path.join(folder, 'compiled','models',file)
        mktree(filename)
        write_file(filename, data)
        save_pyc(filename)
        os.unlink(filename)


def compile_controllers(folder):
    """
    Compiles all the controllers in the application specified by `folder`
    """

    path = os.path.join(folder, 'controllers')
    for file in listdir(path, '.+\.py$'):
        ### why is this here? save_pyc(os.path.join(path, file))
        data = read_file(os.path.join(path,file))
        exposed = regex_expose.findall(data)
        for function in exposed:
            command = data + "\nresponse._vars=response._caller(%s)\n" % \
                function
            filename = os.path.join(folder, 'compiled', ('controllers/'
                                     + file[:-3]).replace('/', '_')
                                     + '_' + function + '.py')
            write_file(filename, command)
            save_pyc(filename)
            os.unlink(filename)


def run_models_in(environment):
    """
    Runs all models (in the app specified by the current folder)
    It tries pre-compiled models first before compiling them.
    """

    folder = environment['request'].folder
    c = environment['request'].controller
    f = environment['request'].function
    cpath = os.path.join(folder, 'compiled')
    if os.path.exists(cpath):
        for model in listdir(cpath, '^models_\w+\.pyc$', 0):
            restricted(read_pyc(model), environment, layer=model)
        path = os.path.join(cpath, 'models')
        models = listdir(path, '^\w+\.pyc$',0,sort=False)
        compiled=True
    else:
        path = os.path.join(folder, 'models')
        models = listdir(path, '^\w+\.py$',0,sort=False)
        compiled=False
    paths = (path, os.path.join(path,c), os.path.join(path,c,f))
    for model in models:
        if not os.path.split(model)[0] in paths and c!='appadmin':
            continue
        elif compiled:
            code = read_pyc(model)
        elif is_gae:
            code = getcfs(model, model,
                          lambda: compile2(read_file(model), model))
        else:
            code = getcfs(model, model, None)
        restricted(code, environment, layer=model)


def run_controller_in(controller, function, environment):
    """
    Runs the controller.function() (for the app specified by
    the current folder).
    It tries pre-compiled controller_function.pyc first before compiling it.
    """

    # if compiled should run compiled!

    folder = environment['request'].folder
    path = os.path.join(folder, 'compiled')
    badc = 'invalid controller (%s/%s)' % (controller, function)
    badf = 'invalid function (%s/%s)' % (controller, function)
    if os.path.exists(path):
        filename = os.path.join(path, 'controllers_%s_%s.pyc'
                                 % (controller, function))
        if not os.path.exists(filename):
            raise HTTP(404,
                       rewrite.thread.routes.error_message % badf,
                       web2py_error=badf)
        restricted(read_pyc(filename), environment, layer=filename)
    elif function == '_TEST':
        # TESTING: adjust the path to include site packages
        from settings import global_settings
        from admin import abspath, add_path_first
        paths = (global_settings.gluon_parent, abspath('site-packages', gluon=True),  abspath('gluon', gluon=True), '')
        [add_path_first(path) for path in paths]
        # TESTING END

        filename = os.path.join(folder, 'controllers/%s.py'
                                 % controller)
        if not os.path.exists(filename):
            raise HTTP(404,
                       rewrite.thread.routes.error_message % badc,
                       web2py_error=badc)
        environment['__symbols__'] = environment.keys()
        code = read_file(filename)
        code += TEST_CODE
        restricted(code, environment, layer=filename)
    else:
        filename = os.path.join(folder, 'controllers/%s.py'
                                 % controller)
        if not os.path.exists(filename):
            raise HTTP(404,
                       rewrite.thread.routes.error_message % badc,
                       web2py_error=badc)
        code = read_file(filename)
        exposed = regex_expose.findall(code)
        if not function in exposed:
            raise HTTP(404,
                       rewrite.thread.routes.error_message % badf,
                       web2py_error=badf)
        code = "%s\nresponse._vars=response._caller(%s)\n" % (code, function)
        if is_gae:
            layer = filename + ':' + function
            code = getcfs(layer, filename,  lambda: compile2(code,layer))
        restricted(code, environment, filename)
    response = environment['response']
    vars=response._vars
    if response.postprocessing:
        for p in response.postprocessing:
            vars = p(vars)
    if isinstance(vars,unicode):
        vars = vars.encode('utf8')
    if hasattr(vars,'xml'):
        vars = vars.xml()
    return vars

def run_view_in(environment):
    """
    Executes the view for the requested action.
    The view is the one specified in `response.view` or determined by the url
    or `view/generic.extension`
    It tries the pre-compiled views_controller_function.pyc before compiling it.
    """

    request = environment['request']
    response = environment['response']
    folder = request.folder
    path = os.path.join(folder, 'compiled')
    badv = 'invalid view (%s)' % response.view
    patterns = response.generic_patterns or []
    regex = re.compile('|'.join(fnmatch.translate(r) for r in patterns))
    short_action =  '%(controller)s/%(function)s.%(extension)s' % request
    allow_generic = patterns and regex.search(short_action)
    if not isinstance(response.view, str):
        ccode = parse_template(response.view, os.path.join(folder, 'views'),
                               context=environment)
        restricted(ccode, environment, 'file stream')
    elif os.path.exists(path):
        x = response.view.replace('/', '_')
        files = ['views_%s.pyc' % x]
        if allow_generic:
            files.append('views_generic.%s.pyc' % request.extension)
        # for backward compatibility
        if request.extension == 'html':
            files.append('views_%s.pyc' % x[:-5])
            if allow_generic:
                files.append('views_generic.pyc')
        # end backward compatibility code
        for f in files:
            filename = os.path.join(path,f)
            if os.path.exists(filename):
                code = read_pyc(filename)
                restricted(code, environment, layer=filename)
                return
        raise HTTP(404,
                   rewrite.thread.routes.error_message % badv,
                   web2py_error=badv)
    else:
        filename = os.path.join(folder, 'views', response.view)
        if not os.path.exists(filename) and allow_generic:
            response.view = 'generic.' + request.extension
            filename = os.path.join(folder, 'views', response.view)
        if not os.path.exists(filename):
            raise HTTP(404,
                       rewrite.thread.routes.error_message % badv,
                       web2py_error=badv)
        layer = filename
        if is_gae:
            ccode = getcfs(layer, filename,
                           lambda: compile2(parse_template(response.view,
                                            os.path.join(folder, 'views'),
                                            context=environment),layer))
        else:
            ccode = parse_template(response.view,
                                   os.path.join(folder, 'views'),
                                   context=environment)
        restricted(ccode, environment, layer)

def remove_compiled_application(folder):
    """
    Deletes the folder `compiled` containing the compiled application.
    """
    try:
        shutil.rmtree(os.path.join(folder, 'compiled'))
        path = os.path.join(folder, 'controllers')
        for file in listdir(path,'.*\.pyc$',drop=False):
            os.unlink(file)
    except OSError:
        pass


def compile_application(folder):
    """
    Compiles all models, views, controller for the application in `folder`.
    """
    remove_compiled_application(folder)
    os.mkdir(os.path.join(folder, 'compiled'))
    compile_models(folder)
    compile_controllers(folder)
    compile_views(folder)


def test():
    """
    Example::

        >>> import traceback, types
        >>> environment={'x':1}
        >>> open('a.py', 'w').write('print 1/x')
        >>> save_pyc('a.py')
        >>> os.unlink('a.py')
        >>> if type(read_pyc('a.pyc'))==types.CodeType: print 'code'
        code
        >>> exec read_pyc('a.pyc') in environment
        1
    """

    return


if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/contenttype.py version [b7880bfab9].















































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

CONTENT_TYPE dictionary created against freedesktop.org' shared mime info
database version 0.70.
"""

__all__ = ['contenttype']

CONTENT_TYPE = {
    '.load': 'text/html',
    '.123': 'application/vnd.lotus-1-2-3',
    '.3ds': 'image/x-3ds',
    '.3g2': 'video/3gpp',
    '.3ga': 'video/3gpp',
    '.3gp': 'video/3gpp',
    '.3gpp': 'video/3gpp',
    '.602': 'application/x-t602',
    '.669': 'audio/x-mod',
    '.7z': 'application/x-7z-compressed',
    '.a': 'application/x-archive',
    '.aac': 'audio/mp4',
    '.abw': 'application/x-abiword',
    '.abw.crashed': 'application/x-abiword',
    '.abw.gz': 'application/x-abiword',
    '.ac3': 'audio/ac3',
    '.ace': 'application/x-ace',
    '.adb': 'text/x-adasrc',
    '.ads': 'text/x-adasrc',
    '.afm': 'application/x-font-afm',
    '.ag': 'image/x-applix-graphics',
    '.ai': 'application/illustrator',
    '.aif': 'audio/x-aiff',
    '.aifc': 'audio/x-aiff',
    '.aiff': 'audio/x-aiff',
    '.al': 'application/x-perl',
    '.alz': 'application/x-alz',
    '.amr': 'audio/amr',
    '.ani': 'application/x-navi-animation',
    '.anim[1-9j]': 'video/x-anim',
    '.anx': 'application/annodex',
    '.ape': 'audio/x-ape',
    '.arj': 'application/x-arj',
    '.arw': 'image/x-sony-arw',
    '.as': 'application/x-applix-spreadsheet',
    '.asc': 'text/plain',
    '.asf': 'video/x-ms-asf',
    '.asp': 'application/x-asp',
    '.ass': 'text/x-ssa',
    '.asx': 'audio/x-ms-asx',
    '.atom': 'application/atom+xml',
    '.au': 'audio/basic',
    '.avi': 'video/x-msvideo',
    '.aw': 'application/x-applix-word',
    '.awb': 'audio/amr-wb',
    '.awk': 'application/x-awk',
    '.axa': 'audio/annodex',
    '.axv': 'video/annodex',
    '.bak': 'application/x-trash',
    '.bcpio': 'application/x-bcpio',
    '.bdf': 'application/x-font-bdf',
    '.bib': 'text/x-bibtex',
    '.bin': 'application/octet-stream',
    '.blend': 'application/x-blender',
    '.blender': 'application/x-blender',
    '.bmp': 'image/bmp',
    '.bz': 'application/x-bzip',
    '.bz2': 'application/x-bzip',
    '.c': 'text/x-csrc',
    '.c++': 'text/x-c++src',
    '.cab': 'application/vnd.ms-cab-compressed',
    '.cb7': 'application/x-cb7',
    '.cbr': 'application/x-cbr',
    '.cbt': 'application/x-cbt',
    '.cbz': 'application/x-cbz',
    '.cc': 'text/x-c++src',
    '.cdf': 'application/x-netcdf',
    '.cdr': 'application/vnd.corel-draw',
    '.cer': 'application/x-x509-ca-cert',
    '.cert': 'application/x-x509-ca-cert',
    '.cgm': 'image/cgm',
    '.chm': 'application/x-chm',
    '.chrt': 'application/x-kchart',
    '.class': 'application/x-java',
    '.cls': 'text/x-tex',
    '.cmake': 'text/x-cmake',
    '.cpio': 'application/x-cpio',
    '.cpio.gz': 'application/x-cpio-compressed',
    '.cpp': 'text/x-c++src',
    '.cr2': 'image/x-canon-cr2',
    '.crt': 'application/x-x509-ca-cert',
    '.crw': 'image/x-canon-crw',
    '.cs': 'text/x-csharp',
    '.csh': 'application/x-csh',
    '.css': 'text/css',
    '.cssl': 'text/css',
    '.csv': 'text/csv',
    '.cue': 'application/x-cue',
    '.cur': 'image/x-win-bitmap',
    '.cxx': 'text/x-c++src',
    '.d': 'text/x-dsrc',
    '.dar': 'application/x-dar',
    '.dbf': 'application/x-dbf',
    '.dc': 'application/x-dc-rom',
    '.dcl': 'text/x-dcl',
    '.dcm': 'application/dicom',
    '.dcr': 'image/x-kodak-dcr',
    '.dds': 'image/x-dds',
    '.deb': 'application/x-deb',
    '.der': 'application/x-x509-ca-cert',
    '.desktop': 'application/x-desktop',
    '.dia': 'application/x-dia-diagram',
    '.diff': 'text/x-patch',
    '.divx': 'video/x-msvideo',
    '.djv': 'image/vnd.djvu',
    '.djvu': 'image/vnd.djvu',
    '.dng': 'image/x-adobe-dng',
    '.doc': 'application/msword',
    '.docbook': 'application/docbook+xml',
    '.docm': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    '.dot': 'text/vnd.graphviz',
    '.dsl': 'text/x-dsl',
    '.dtd': 'application/xml-dtd',
    '.dtx': 'text/x-tex',
    '.dv': 'video/dv',
    '.dvi': 'application/x-dvi',
    '.dvi.bz2': 'application/x-bzdvi',
    '.dvi.gz': 'application/x-gzdvi',
    '.dwg': 'image/vnd.dwg',
    '.dxf': 'image/vnd.dxf',
    '.e': 'text/x-eiffel',
    '.egon': 'application/x-egon',
    '.eif': 'text/x-eiffel',
    '.el': 'text/x-emacs-lisp',
    '.emf': 'image/x-emf',
    '.emp': 'application/vnd.emusic-emusic_package',
    '.ent': 'application/xml-external-parsed-entity',
    '.eps': 'image/x-eps',
    '.eps.bz2': 'image/x-bzeps',
    '.eps.gz': 'image/x-gzeps',
    '.epsf': 'image/x-eps',
    '.epsf.bz2': 'image/x-bzeps',
    '.epsf.gz': 'image/x-gzeps',
    '.epsi': 'image/x-eps',
    '.epsi.bz2': 'image/x-bzeps',
    '.epsi.gz': 'image/x-gzeps',
    '.epub': 'application/epub+zip',
    '.erl': 'text/x-erlang',
    '.es': 'application/ecmascript',
    '.etheme': 'application/x-e-theme',
    '.etx': 'text/x-setext',
    '.exe': 'application/x-ms-dos-executable',
    '.exr': 'image/x-exr',
    '.ez': 'application/andrew-inset',
    '.f': 'text/x-fortran',
    '.f90': 'text/x-fortran',
    '.f95': 'text/x-fortran',
    '.fb2': 'application/x-fictionbook+xml',
    '.fig': 'image/x-xfig',
    '.fits': 'image/fits',
    '.fl': 'application/x-fluid',
    '.flac': 'audio/x-flac',
    '.flc': 'video/x-flic',
    '.fli': 'video/x-flic',
    '.flv': 'video/x-flv',
    '.flw': 'application/x-kivio',
    '.fo': 'text/x-xslfo',
    '.for': 'text/x-fortran',
    '.g3': 'image/fax-g3',
    '.gb': 'application/x-gameboy-rom',
    '.gba': 'application/x-gba-rom',
    '.gcrd': 'text/directory',
    '.ged': 'application/x-gedcom',
    '.gedcom': 'application/x-gedcom',
    '.gen': 'application/x-genesis-rom',
    '.gf': 'application/x-tex-gf',
    '.gg': 'application/x-sms-rom',
    '.gif': 'image/gif',
    '.glade': 'application/x-glade',
    '.gmo': 'application/x-gettext-translation',
    '.gnc': 'application/x-gnucash',
    '.gnd': 'application/gnunet-directory',
    '.gnucash': 'application/x-gnucash',
    '.gnumeric': 'application/x-gnumeric',
    '.gnuplot': 'application/x-gnuplot',
    '.gp': 'application/x-gnuplot',
    '.gpg': 'application/pgp-encrypted',
    '.gplt': 'application/x-gnuplot',
    '.gra': 'application/x-graphite',
    '.gsf': 'application/x-font-type1',
    '.gsm': 'audio/x-gsm',
    '.gtar': 'application/x-tar',
    '.gv': 'text/vnd.graphviz',
    '.gvp': 'text/x-google-video-pointer',
    '.gz': 'application/x-gzip',
    '.h': 'text/x-chdr',
    '.h++': 'text/x-c++hdr',
    '.hdf': 'application/x-hdf',
    '.hh': 'text/x-c++hdr',
    '.hp': 'text/x-c++hdr',
    '.hpgl': 'application/vnd.hp-hpgl',
    '.hpp': 'text/x-c++hdr',
    '.hs': 'text/x-haskell',
    '.htm': 'text/html',
    '.html': 'text/html',
    '.hwp': 'application/x-hwp',
    '.hwt': 'application/x-hwt',
    '.hxx': 'text/x-c++hdr',
    '.ica': 'application/x-ica',
    '.icb': 'image/x-tga',
    '.icns': 'image/x-icns',
    '.ico': 'image/vnd.microsoft.icon',
    '.ics': 'text/calendar',
    '.idl': 'text/x-idl',
    '.ief': 'image/ief',
    '.iff': 'image/x-iff',
    '.ilbm': 'image/x-ilbm',
    '.ime': 'text/x-imelody',
    '.imy': 'text/x-imelody',
    '.ins': 'text/x-tex',
    '.iptables': 'text/x-iptables',
    '.iso': 'application/x-cd-image',
    '.iso9660': 'application/x-cd-image',
    '.it': 'audio/x-it',
    '.j2k': 'image/jp2',
    '.jad': 'text/vnd.sun.j2me.app-descriptor',
    '.jar': 'application/x-java-archive',
    '.java': 'text/x-java',
    '.jng': 'image/x-jng',
    '.jnlp': 'application/x-java-jnlp-file',
    '.jp2': 'image/jp2',
    '.jpc': 'image/jp2',
    '.jpe': 'image/jpeg',
    '.jpeg': 'image/jpeg',
    '.jpf': 'image/jp2',
    '.jpg': 'image/jpeg',
    '.jpr': 'application/x-jbuilder-project',
    '.jpx': 'image/jp2',
    '.js': 'application/javascript',
    '.json': 'application/json',
    '.k25': 'image/x-kodak-k25',
    '.kar': 'audio/midi',
    '.karbon': 'application/x-karbon',
    '.kdc': 'image/x-kodak-kdc',
    '.kdelnk': 'application/x-desktop',
    '.kexi': 'application/x-kexiproject-sqlite3',
    '.kexic': 'application/x-kexi-connectiondata',
    '.kexis': 'application/x-kexiproject-shortcut',
    '.kfo': 'application/x-kformula',
    '.kil': 'application/x-killustrator',
    '.kino': 'application/smil',
    '.kml': 'application/vnd.google-earth.kml+xml',
    '.kmz': 'application/vnd.google-earth.kmz',
    '.kon': 'application/x-kontour',
    '.kpm': 'application/x-kpovmodeler',
    '.kpr': 'application/x-kpresenter',
    '.kpt': 'application/x-kpresenter',
    '.kra': 'application/x-krita',
    '.ksp': 'application/x-kspread',
    '.kud': 'application/x-kugar',
    '.kwd': 'application/x-kword',
    '.kwt': 'application/x-kword',
    '.la': 'application/x-shared-library-la',
    '.latex': 'text/x-tex',
    '.ldif': 'text/x-ldif',
    '.lha': 'application/x-lha',
    '.lhs': 'text/x-literate-haskell',
    '.lhz': 'application/x-lhz',
    '.log': 'text/x-log',
    '.ltx': 'text/x-tex',
    '.lua': 'text/x-lua',
    '.lwo': 'image/x-lwo',
    '.lwob': 'image/x-lwo',
    '.lws': 'image/x-lws',
    '.ly': 'text/x-lilypond',
    '.lyx': 'application/x-lyx',
    '.lz': 'application/x-lzip',
    '.lzh': 'application/x-lha',
    '.lzma': 'application/x-lzma',
    '.lzo': 'application/x-lzop',
    '.m': 'text/x-matlab',
    '.m15': 'audio/x-mod',
    '.m2t': 'video/mpeg',
    '.m3u': 'audio/x-mpegurl',
    '.m3u8': 'audio/x-mpegurl',
    '.m4': 'application/x-m4',
    '.m4a': 'audio/mp4',
    '.m4b': 'audio/x-m4b',
    '.m4v': 'video/mp4',
    '.mab': 'application/x-markaby',
    '.man': 'application/x-troff-man',
    '.mbox': 'application/mbox',
    '.md': 'application/x-genesis-rom',
    '.mdb': 'application/vnd.ms-access',
    '.mdi': 'image/vnd.ms-modi',
    '.me': 'text/x-troff-me',
    '.med': 'audio/x-mod',
    '.metalink': 'application/metalink+xml',
    '.mgp': 'application/x-magicpoint',
    '.mid': 'audio/midi',
    '.midi': 'audio/midi',
    '.mif': 'application/x-mif',
    '.minipsf': 'audio/x-minipsf',
    '.mka': 'audio/x-matroska',
    '.mkv': 'video/x-matroska',
    '.ml': 'text/x-ocaml',
    '.mli': 'text/x-ocaml',
    '.mm': 'text/x-troff-mm',
    '.mmf': 'application/x-smaf',
    '.mml': 'text/mathml',
    '.mng': 'video/x-mng',
    '.mo': 'application/x-gettext-translation',
    '.mo3': 'audio/x-mo3',
    '.moc': 'text/x-moc',
    '.mod': 'audio/x-mod',
    '.mof': 'text/x-mof',
    '.moov': 'video/quicktime',
    '.mov': 'video/quicktime',
    '.movie': 'video/x-sgi-movie',
    '.mp+': 'audio/x-musepack',
    '.mp2': 'video/mpeg',
    '.mp3': 'audio/mpeg',
    '.mp4': 'video/mp4',
    '.mpc': 'audio/x-musepack',
    '.mpe': 'video/mpeg',
    '.mpeg': 'video/mpeg',
    '.mpg': 'video/mpeg',
    '.mpga': 'audio/mpeg',
    '.mpp': 'audio/x-musepack',
    '.mrl': 'text/x-mrml',
    '.mrml': 'text/x-mrml',
    '.mrw': 'image/x-minolta-mrw',
    '.ms': 'text/x-troff-ms',
    '.msi': 'application/x-msi',
    '.msod': 'image/x-msod',
    '.msx': 'application/x-msx-rom',
    '.mtm': 'audio/x-mod',
    '.mup': 'text/x-mup',
    '.mxf': 'application/mxf',
    '.n64': 'application/x-n64-rom',
    '.nb': 'application/mathematica',
    '.nc': 'application/x-netcdf',
    '.nds': 'application/x-nintendo-ds-rom',
    '.nef': 'image/x-nikon-nef',
    '.nes': 'application/x-nes-rom',
    '.nfo': 'text/x-nfo',
    '.not': 'text/x-mup',
    '.nsc': 'application/x-netshow-channel',
    '.nsv': 'video/x-nsv',
    '.o': 'application/x-object',
    '.obj': 'application/x-tgif',
    '.ocl': 'text/x-ocl',
    '.oda': 'application/oda',
    '.odb': 'application/vnd.oasis.opendocument.database',
    '.odc': 'application/vnd.oasis.opendocument.chart',
    '.odf': 'application/vnd.oasis.opendocument.formula',
    '.odg': 'application/vnd.oasis.opendocument.graphics',
    '.odi': 'application/vnd.oasis.opendocument.image',
    '.odm': 'application/vnd.oasis.opendocument.text-master',
    '.odp': 'application/vnd.oasis.opendocument.presentation',
    '.ods': 'application/vnd.oasis.opendocument.spreadsheet',
    '.odt': 'application/vnd.oasis.opendocument.text',
    '.oga': 'audio/ogg',
    '.ogg': 'video/x-theora+ogg',
    '.ogm': 'video/x-ogm+ogg',
    '.ogv': 'video/ogg',
    '.ogx': 'application/ogg',
    '.old': 'application/x-trash',
    '.oleo': 'application/x-oleo',
    '.opml': 'text/x-opml+xml',
    '.ora': 'image/openraster',
    '.orf': 'image/x-olympus-orf',
    '.otc': 'application/vnd.oasis.opendocument.chart-template',
    '.otf': 'application/x-font-otf',
    '.otg': 'application/vnd.oasis.opendocument.graphics-template',
    '.oth': 'application/vnd.oasis.opendocument.text-web',
    '.otp': 'application/vnd.oasis.opendocument.presentation-template',
    '.ots': 'application/vnd.oasis.opendocument.spreadsheet-template',
    '.ott': 'application/vnd.oasis.opendocument.text-template',
    '.owl': 'application/rdf+xml',
    '.oxt': 'application/vnd.openofficeorg.extension',
    '.p': 'text/x-pascal',
    '.p10': 'application/pkcs10',
    '.p12': 'application/x-pkcs12',
    '.p7b': 'application/x-pkcs7-certificates',
    '.p7s': 'application/pkcs7-signature',
    '.pack': 'application/x-java-pack200',
    '.pak': 'application/x-pak',
    '.par2': 'application/x-par2',
    '.pas': 'text/x-pascal',
    '.patch': 'text/x-patch',
    '.pbm': 'image/x-portable-bitmap',
    '.pcd': 'image/x-photo-cd',
    '.pcf': 'application/x-cisco-vpn-settings',
    '.pcf.gz': 'application/x-font-pcf',
    '.pcf.z': 'application/x-font-pcf',
    '.pcl': 'application/vnd.hp-pcl',
    '.pcx': 'image/x-pcx',
    '.pdb': 'chemical/x-pdb',
    '.pdc': 'application/x-aportisdoc',
    '.pdf': 'application/pdf',
    '.pdf.bz2': 'application/x-bzpdf',
    '.pdf.gz': 'application/x-gzpdf',
    '.pef': 'image/x-pentax-pef',
    '.pem': 'application/x-x509-ca-cert',
    '.perl': 'application/x-perl',
    '.pfa': 'application/x-font-type1',
    '.pfb': 'application/x-font-type1',
    '.pfx': 'application/x-pkcs12',
    '.pgm': 'image/x-portable-graymap',
    '.pgn': 'application/x-chess-pgn',
    '.pgp': 'application/pgp-encrypted',
    '.php': 'application/x-php',
    '.php3': 'application/x-php',
    '.php4': 'application/x-php',
    '.pict': 'image/x-pict',
    '.pict1': 'image/x-pict',
    '.pict2': 'image/x-pict',
    '.pickle': 'application/python-pickle',
    '.pk': 'application/x-tex-pk',
    '.pkipath': 'application/pkix-pkipath',
    '.pkr': 'application/pgp-keys',
    '.pl': 'application/x-perl',
    '.pla': 'audio/x-iriver-pla',
    '.pln': 'application/x-planperfect',
    '.pls': 'audio/x-scpls',
    '.pm': 'application/x-perl',
    '.png': 'image/png',
    '.pnm': 'image/x-portable-anymap',
    '.pntg': 'image/x-macpaint',
    '.po': 'text/x-gettext-translation',
    '.por': 'application/x-spss-por',
    '.pot': 'text/x-gettext-translation-template',
    '.ppm': 'image/x-portable-pixmap',
    '.pps': 'application/vnd.ms-powerpoint',
    '.ppt': 'application/vnd.ms-powerpoint',
    '.pptm': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
    '.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
    '.ppz': 'application/vnd.ms-powerpoint',
    '.prc': 'application/x-palm-database',
    '.ps': 'application/postscript',
    '.ps.bz2': 'application/x-bzpostscript',
    '.ps.gz': 'application/x-gzpostscript',
    '.psd': 'image/vnd.adobe.photoshop',
    '.psf': 'audio/x-psf',
    '.psf.gz': 'application/x-gz-font-linux-psf',
    '.psflib': 'audio/x-psflib',
    '.psid': 'audio/prs.sid',
    '.psw': 'application/x-pocket-word',
    '.pw': 'application/x-pw',
    '.py': 'text/x-python',
    '.pyc': 'application/x-python-bytecode',
    '.pyo': 'application/x-python-bytecode',
    '.qif': 'image/x-quicktime',
    '.qt': 'video/quicktime',
    '.qtif': 'image/x-quicktime',
    '.qtl': 'application/x-quicktime-media-link',
    '.qtvr': 'video/quicktime',
    '.ra': 'audio/vnd.rn-realaudio',
    '.raf': 'image/x-fuji-raf',
    '.ram': 'application/ram',
    '.rar': 'application/x-rar',
    '.ras': 'image/x-cmu-raster',
    '.raw': 'image/x-panasonic-raw',
    '.rax': 'audio/vnd.rn-realaudio',
    '.rb': 'application/x-ruby',
    '.rdf': 'application/rdf+xml',
    '.rdfs': 'application/rdf+xml',
    '.reg': 'text/x-ms-regedit',
    '.rej': 'application/x-reject',
    '.rgb': 'image/x-rgb',
    '.rle': 'image/rle',
    '.rm': 'application/vnd.rn-realmedia',
    '.rmj': 'application/vnd.rn-realmedia',
    '.rmm': 'application/vnd.rn-realmedia',
    '.rms': 'application/vnd.rn-realmedia',
    '.rmvb': 'application/vnd.rn-realmedia',
    '.rmx': 'application/vnd.rn-realmedia',
    '.roff': 'text/troff',
    '.rp': 'image/vnd.rn-realpix',
    '.rpm': 'application/x-rpm',
    '.rss': 'application/rss+xml',
    '.rt': 'text/vnd.rn-realtext',
    '.rtf': 'application/rtf',
    '.rtx': 'text/richtext',
    '.rv': 'video/vnd.rn-realvideo',
    '.rvx': 'video/vnd.rn-realvideo',
    '.s3m': 'audio/x-s3m',
    '.sam': 'application/x-amipro',
    '.sami': 'application/x-sami',
    '.sav': 'application/x-spss-sav',
    '.scm': 'text/x-scheme',
    '.sda': 'application/vnd.stardivision.draw',
    '.sdc': 'application/vnd.stardivision.calc',
    '.sdd': 'application/vnd.stardivision.impress',
    '.sdp': 'application/sdp',
    '.sds': 'application/vnd.stardivision.chart',
    '.sdw': 'application/vnd.stardivision.writer',
    '.sgf': 'application/x-go-sgf',
    '.sgi': 'image/x-sgi',
    '.sgl': 'application/vnd.stardivision.writer',
    '.sgm': 'text/sgml',
    '.sgml': 'text/sgml',
    '.sh': 'application/x-shellscript',
    '.shar': 'application/x-shar',
    '.shn': 'application/x-shorten',
    '.siag': 'application/x-siag',
    '.sid': 'audio/prs.sid',
    '.sik': 'application/x-trash',
    '.sis': 'application/vnd.symbian.install',
    '.sisx': 'x-epoc/x-sisx-app',
    '.sit': 'application/x-stuffit',
    '.siv': 'application/sieve',
    '.sk': 'image/x-skencil',
    '.sk1': 'image/x-skencil',
    '.skr': 'application/pgp-keys',
    '.slk': 'text/spreadsheet',
    '.smaf': 'application/x-smaf',
    '.smc': 'application/x-snes-rom',
    '.smd': 'application/vnd.stardivision.mail',
    '.smf': 'application/vnd.stardivision.math',
    '.smi': 'application/x-sami',
    '.smil': 'application/smil',
    '.sml': 'application/smil',
    '.sms': 'application/x-sms-rom',
    '.snd': 'audio/basic',
    '.so': 'application/x-sharedlib',
    '.spc': 'application/x-pkcs7-certificates',
    '.spd': 'application/x-font-speedo',
    '.spec': 'text/x-rpm-spec',
    '.spl': 'application/x-shockwave-flash',
    '.spx': 'audio/x-speex',
    '.sql': 'text/x-sql',
    '.sr2': 'image/x-sony-sr2',
    '.src': 'application/x-wais-source',
    '.srf': 'image/x-sony-srf',
    '.srt': 'application/x-subrip',
    '.ssa': 'text/x-ssa',
    '.stc': 'application/vnd.sun.xml.calc.template',
    '.std': 'application/vnd.sun.xml.draw.template',
    '.sti': 'application/vnd.sun.xml.impress.template',
    '.stm': 'audio/x-stm',
    '.stw': 'application/vnd.sun.xml.writer.template',
    '.sty': 'text/x-tex',
    '.sub': 'text/x-subviewer',
    '.sun': 'image/x-sun-raster',
    '.sv4cpio': 'application/x-sv4cpio',
    '.sv4crc': 'application/x-sv4crc',
    '.svg': 'image/svg+xml',
    '.svgz': 'image/svg+xml-compressed',
    '.swf': 'application/x-shockwave-flash',
    '.sxc': 'application/vnd.sun.xml.calc',
    '.sxd': 'application/vnd.sun.xml.draw',
    '.sxg': 'application/vnd.sun.xml.writer.global',
    '.sxi': 'application/vnd.sun.xml.impress',
    '.sxm': 'application/vnd.sun.xml.math',
    '.sxw': 'application/vnd.sun.xml.writer',
    '.sylk': 'text/spreadsheet',
    '.t': 'text/troff',
    '.t2t': 'text/x-txt2tags',
    '.tar': 'application/x-tar',
    '.tar.bz': 'application/x-bzip-compressed-tar',
    '.tar.bz2': 'application/x-bzip-compressed-tar',
    '.tar.gz': 'application/x-compressed-tar',
    '.tar.lzma': 'application/x-lzma-compressed-tar',
    '.tar.lzo': 'application/x-tzo',
    '.tar.xz': 'application/x-xz-compressed-tar',
    '.tar.z': 'application/x-tarz',
    '.tbz': 'application/x-bzip-compressed-tar',
    '.tbz2': 'application/x-bzip-compressed-tar',
    '.tcl': 'text/x-tcl',
    '.tex': 'text/x-tex',
    '.texi': 'text/x-texinfo',
    '.texinfo': 'text/x-texinfo',
    '.tga': 'image/x-tga',
    '.tgz': 'application/x-compressed-tar',
    '.theme': 'application/x-theme',
    '.themepack': 'application/x-windows-themepack',
    '.tif': 'image/tiff',
    '.tiff': 'image/tiff',
    '.tk': 'text/x-tcl',
    '.tlz': 'application/x-lzma-compressed-tar',
    '.tnef': 'application/vnd.ms-tnef',
    '.tnf': 'application/vnd.ms-tnef',
    '.toc': 'application/x-cdrdao-toc',
    '.torrent': 'application/x-bittorrent',
    '.tpic': 'image/x-tga',
    '.tr': 'text/troff',
    '.ts': 'application/x-linguist',
    '.tsv': 'text/tab-separated-values',
    '.tta': 'audio/x-tta',
    '.ttc': 'application/x-font-ttf',
    '.ttf': 'application/x-font-ttf',
    '.ttx': 'application/x-font-ttx',
    '.txt': 'text/plain',
    '.txz': 'application/x-xz-compressed-tar',
    '.tzo': 'application/x-tzo',
    '.ufraw': 'application/x-ufraw',
    '.ui': 'application/x-designer',
    '.uil': 'text/x-uil',
    '.ult': 'audio/x-mod',
    '.uni': 'audio/x-mod',
    '.uri': 'text/x-uri',
    '.url': 'text/x-uri',
    '.ustar': 'application/x-ustar',
    '.vala': 'text/x-vala',
    '.vapi': 'text/x-vala',
    '.vcf': 'text/directory',
    '.vcs': 'text/calendar',
    '.vct': 'text/directory',
    '.vda': 'image/x-tga',
    '.vhd': 'text/x-vhdl',
    '.vhdl': 'text/x-vhdl',
    '.viv': 'video/vivo',
    '.vivo': 'video/vivo',
    '.vlc': 'audio/x-mpegurl',
    '.vob': 'video/mpeg',
    '.voc': 'audio/x-voc',
    '.vor': 'application/vnd.stardivision.writer',
    '.vst': 'image/x-tga',
    '.wav': 'audio/x-wav',
    '.wax': 'audio/x-ms-asx',
    '.wb1': 'application/x-quattropro',
    '.wb2': 'application/x-quattropro',
    '.wb3': 'application/x-quattropro',
    '.wbmp': 'image/vnd.wap.wbmp',
    '.wcm': 'application/vnd.ms-works',
    '.wdb': 'application/vnd.ms-works',
    '.wk1': 'application/vnd.lotus-1-2-3',
    '.wk3': 'application/vnd.lotus-1-2-3',
    '.wk4': 'application/vnd.lotus-1-2-3',
    '.wks': 'application/vnd.ms-works',
    '.wma': 'audio/x-ms-wma',
    '.wmf': 'image/x-wmf',
    '.wml': 'text/vnd.wap.wml',
    '.wmls': 'text/vnd.wap.wmlscript',
    '.wmv': 'video/x-ms-wmv',
    '.wmx': 'audio/x-ms-asx',
    '.wp': 'application/vnd.wordperfect',
    '.wp4': 'application/vnd.wordperfect',
    '.wp5': 'application/vnd.wordperfect',
    '.wp6': 'application/vnd.wordperfect',
    '.wpd': 'application/vnd.wordperfect',
    '.wpg': 'application/x-wpg',
    '.wpl': 'application/vnd.ms-wpl',
    '.wpp': 'application/vnd.wordperfect',
    '.wps': 'application/vnd.ms-works',
    '.wri': 'application/x-mswrite',
    '.wrl': 'model/vrml',
    '.wv': 'audio/x-wavpack',
    '.wvc': 'audio/x-wavpack-correction',
    '.wvp': 'audio/x-wavpack',
    '.wvx': 'audio/x-ms-asx',
    '.x3f': 'image/x-sigma-x3f',
    '.xac': 'application/x-gnucash',
    '.xbel': 'application/x-xbel',
    '.xbl': 'application/xml',
    '.xbm': 'image/x-xbitmap',
    '.xcf': 'image/x-xcf',
    '.xcf.bz2': 'image/x-compressed-xcf',
    '.xcf.gz': 'image/x-compressed-xcf',
    '.xhtml': 'application/xhtml+xml',
    '.xi': 'audio/x-xi',
    '.xla': 'application/vnd.ms-excel',
    '.xlc': 'application/vnd.ms-excel',
    '.xld': 'application/vnd.ms-excel',
    '.xlf': 'application/x-xliff',
    '.xliff': 'application/x-xliff',
    '.xll': 'application/vnd.ms-excel',
    '.xlm': 'application/vnd.ms-excel',
    '.xls': 'application/vnd.ms-excel',
    '.xlsm': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
    '.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
    '.xlt': 'application/vnd.ms-excel',
    '.xlw': 'application/vnd.ms-excel',
    '.xm': 'audio/x-xm',
    '.xmf': 'audio/x-xmf',
    '.xmi': 'text/x-xmi',
    '.xml': 'application/xml',
    '.xpm': 'image/x-xpixmap',
    '.xps': 'application/vnd.ms-xpsdocument',
    '.xsl': 'application/xml',
    '.xslfo': 'text/x-xslfo',
    '.xslt': 'application/xml',
    '.xspf': 'application/xspf+xml',
    '.xul': 'application/vnd.mozilla.xul+xml',
    '.xwd': 'image/x-xwindowdump',
    '.xyz': 'chemical/x-pdb',
    '.xz': 'application/x-xz',
    '.w2p': 'application/w2p',
    '.z': 'application/x-compress',
    '.zabw': 'application/x-abiword',
    '.zip': 'application/zip',
    '.zoo': 'application/x-zoo',
    }


def contenttype(filename, default='text/plain'):
    """
    Returns the Content-Type string matching extension of the given filename.
    """

    i = filename.rfind('.')
    if i>=0:
        default = CONTENT_TYPE.get(filename[i:].lower(),default)
        j = filename.rfind('.', 0, i)
        if j>=0:
            default = CONTENT_TYPE.get(filename[j:].lower(),default)
    if default.startswith('text/'):
        default += '; charset=utf-8'
    return default

Added gluon/contrib/AuthorizeNet.py version [e1e5a92158].





































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
AIM class to credit card payment with authorize.net

Fork of authnet code written by John Conde
http://www.johnconde.net/blog/integrate-the-authorizenet-aim-api-with-python-3-2/
Unkown license, assuming public domain

Modifed by Massimo Di Pierro

- ported from Python 3.x run on Python 2.4+
- fixed a couple of bugs
- merged with test so single file
- namedtuple from http://code.activestate.com/recipes/500261/

"""

__all__ = ['AIM']

from operator import itemgetter
import urllib

_known_tuple_types = {}

class NamedTupleBase(tuple):
    """Base class for named tuples with the __new__ operator set, named tuples
       yielded by the namedtuple() function will subclass this and add
       properties."""
    def __new__(cls, *args, **kws):
        """Create a new instance of this fielded tuple"""
        # May need to unpack named field values here
        if kws:
            values = list(args) + [None]*(len(cls._fields) - len(args))
            fields = dict((val, idx) for idx, val in enumerate(cls._fields))
            for kw, val in kws.iteritems():
                assert kw in kws, "%r not in field list" % kw
                values[fields[kw]] = val
            args = tuple(values)
        return tuple.__new__(cls, args)

def namedtuple(typename, fieldnames):
    """
    >>> import namedtuples
    >>> tpl = namedtuples.namedtuple(['a', 'b', 'c'])
    >>> tpl(1, 2, 3)
    (1, 2, 3)
    >>> tpl(1, 2, 3).b
    2
    >>> tpl(c=1, a=2, b=3)
    (2, 3, 1)
    >>> tpl(c=1, a=2, b=3).b
    3
    >>> tpl(c='pads with nones')
    (None, None, 'pads with nones')
    >>> tpl(b='pads with nones')
    (None, 'pads with nones', None)
    >>>
    """
    # Split up a string, some people do this
    if isinstance(fieldnames, basestring):
        fieldnames = fieldnames.replace(',', ' ').split()
    # Convert anything iterable that enumerates fields to a tuple now
    fieldname_tuple = tuple(str(field) for field in fieldnames)
    # See if we've cached this
    if fieldname_tuple in _known_tuple_types:
        return _known_tuple_types[fieldname_tuple]
    # Make the type
    new_tuple_type = type(typename, (NamedTupleBase,), {})
    # Set the hidden field
    new_tuple_type._fields = fieldname_tuple
    # Add the getters
    for i, field in enumerate(fieldname_tuple):
        setattr(new_tuple_type, field, property(itemgetter(i)))
    # Cache
    _known_tuple_types[fieldname_tuple] = new_tuple_type
    # Done
    return new_tuple_type

class AIM:

    class AIMError(Exception):
        def __init__(self, value):
            self.parameter = value
        def __str__(self):
            return str(self.parameter)

    def __init__(self, login, transkey, testmode=False):
        if str(login).strip() == '' or login == None:
            raise AIM.AIMError('No login name provided')
        if str(transkey).strip() == '' or transkey == None:
            raise AIM.AIMError('No transaction key provided')
        if testmode != True and testmode != False:
            raise AIM.AIMError('Invalid value for testmode. Must be True or False. "{0}" given.'.format(testmode))

        self.testmode = testmode
        self.proxy = None;
        self.delimiter = '|'
        self.results = []
        self.error = True
        self.success = False
        self.declined = False

        self.parameters = {}
        self.setParameter('x_delim_data', 'true')
        self.setParameter('x_delim_char', self.delimiter)
        self.setParameter('x_relay_response', 'FALSE')
        self.setParameter('x_url', 'FALSE')
        self.setParameter('x_version', '3.1')
        self.setParameter('x_method', 'CC')
        self.setParameter('x_type', 'AUTH_CAPTURE')
        self.setParameter('x_login', login)
        self.setParameter('x_tran_key', transkey)

    def process(self):
        encoded_args = urllib.urlencode(self.parameters)
        if self.testmode == True:
            url = 'https://test.authorize.net/gateway/transact.dll'
        else:
            url = 'https://secure.authorize.net/gateway/transact.dll'

        if self.proxy == None:
            self.results += str(urllib.urlopen(url, encoded_args).read()).split(self.delimiter)
        else:
            opener = urllib.FancyURLopener(self.proxy)
            opened = opener.open(url, encoded_args)
            try:
                self.results += str(opened.read()).split(self.delimiter)
            finally:
                opened.close()
        Results = namedtuple('Results', 'ResultResponse ResponseSubcode ResponseCode ResponseText AuthCode \
                                          AVSResponse TransactionID InvoiceNumber Description Amount PaymentMethod \
                                          TransactionType CustomerID CHFirstName CHLastName Company BillingAddress \
                                          BillingCity BillingState BillingZip BillingCountry Phone Fax Email ShippingFirstName \
                                          ShippingLastName ShippingCompany ShippingAddress ShippingCity ShippingState \
                                          ShippingZip ShippingCountry TaxAmount DutyAmount FreightAmount TaxExemptFlag \
                                          PONumber MD5Hash CVVResponse CAVVResponse')
        self.response = Results(*tuple(r for r in self.results)[0:40])

        if self.getResultResponseFull() == 'Approved':
            self.error = False
            self.success = True
            self.declined = False
        elif self.getResultResponseFull() == 'Declined':
            self.error = False
            self.success = False
            self.declined = True
        else:
            raise AIM.AIMError(self.response.ResponseText)

    def setTransaction(self, creditcard, expiration, total, cvv=None, tax=None, invoice=None):
        if str(creditcard).strip() == '' or creditcard == None:
            raise AIM.AIMError('No credit card number passed to setTransaction(): {0}'.format(creditcard))
        if str(expiration).strip() == '' or expiration == None:
            raise AIM.AIMError('No expiration number to setTransaction(): {0}'.format(expiration))
        if str(total).strip() == '' or total == None:
            raise AIM.AIMError('No total amount passed to setTransaction(): {0}'.format(total))

        self.setParameter('x_card_num', creditcard)
        self.setParameter('x_exp_date', expiration)
        self.setParameter('x_amount', total)
        if cvv != None:
            self.setParameter('x_card_code', cvv)
        if tax != None:
            self.setParameter('x_tax', tax)
        if invoice != None:
            self.setParameter('x_invoice_num', invoice)

    def setTransactionType(self, transtype=None):
        types = ['AUTH_CAPTURE', 'AUTH_ONLY', 'PRIOR_AUTH_CAPTURE', 'CREDIT', 'CAPTURE_ONLY', 'VOID']
        if transtype.upper() not in types:
            raise AIM.AIMError('Incorrect Transaction Type passed to setTransactionType(): {0}'.format(transtype))
        self.setParameter('x_type', transtype.upper())

    def setProxy(self, proxy=None):
        if str(proxy).strip() == '' or proxy == None:
            raise AIM.AIMError('No proxy passed to setProxy()')
        self.proxy = {'http': str(proxy).strip()}

    def setParameter(self, key=None, value=None):
        if key != None and value != None and str(key).strip() != '' and str(value).strip() != '':
            self.parameters[key] = str(value).strip()
        else:
            raise AIM.AIMError('Incorrect parameters passed to setParameter(): {0}:{1}'.format(key, value))

    def isApproved(self):
        return self.success

    def isDeclined(self):
        return self.declined

    def isError(self):
        return self.error

    def getResultResponseFull(self):
        responses = ['', 'Approved', 'Declined', 'Error']
        return responses[int(self.results[0])]

def process(creditcard,expiration,total,cvv=None,tax=None,invoice=None,
            login='cnpdev4289', transkey='SR2P8g4jdEn7vFLQ',testmode=True):
    payment = AIM(login,transkey,testmode)
    expiration = expiration.replace('/','')
    payment.setTransaction(creditcard, expiration, total, cvv, tax, invoice)
    try:
        payment.process()
        return payment.isApproved()
    except AIM.AIMError:
        return False

def test():
    import socket
    import sys
    from time import time

    creditcard = '4427802641004797'
    expiration = '122012'
    total = '1.00'
    cvv = '123'
    tax = '0.00'
    invoice = str(time())[4:10] # get a random invoice number

    try:
        payment = AIM('cnpdev4289', 'SR2P8g4jdEn7vFLQ', True)
        payment.setTransaction(creditcard, expiration, total, cvv, tax, invoice)
        payment.setParameter('x_duplicate_window', 180) # three minutes duplicate windows
        payment.setParameter('x_cust_id', '1324')       # customer ID
        payment.setParameter('x_first_name', 'John')
        payment.setParameter('x_last_name', 'Conde')
        payment.setParameter('x_company', 'Test Company')
        payment.setParameter('x_address', '1234 Main Street')
        payment.setParameter('x_city', 'Townsville')
        payment.setParameter('x_state', 'NJ')
        payment.setParameter('x_zip', '12345')
        payment.setParameter('x_country', 'US')
        payment.setParameter('x_phone', '800-555-1234')
        payment.setParameter('x_description', 'Test Transaction')
        payment.setParameter('x_customer_ip', socket.gethostbyname(socket.gethostname()))
        payment.setParameter('x_email', 'john@example.com')
        payment.setParameter('x_email_customer', False)
        payment.process()
        if payment.isApproved():
            print 'Response Code: ', payment.response.ResponseCode
            print 'Response Text: ', payment.response.ResponseText
            print 'Response: ', payment.getResultResponseFull()
            print 'Transaction ID: ', payment.response.TransactionID
            print 'CVV Result: ', payment.response.CVVResponse
            print 'Approval Code: ', payment.response.AuthCode
            print 'AVS Result: ', payment.response.AVSResponse
        elif payment.isDeclined():
            print 'Your credit card was declined by your bank'
        elif payment.isError():
            raise AIM.AIMError('An uncaught error occurred')
    except AIM.AIMError, e:
        print "Exception thrown:", e
        print 'An error occured'
    print 'approved',payment.isApproved()
    print 'declined',payment.isDeclined()
    print 'error',payment.isError()

if __name__=='__main__':
    test()

Added gluon/contrib/__init__.py version [71853c6197].



1
2
+
+


Added gluon/contrib/comet_messaging.py version [9ef31a1bd5].
































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Attention: Requires Chrome or Safari. For IE of Firefox you need https://github.com/gimite/web-socket-js

1) install tornado

   easy_install tornado

2) start this app:

   python gluon/contrib/comet_messaging.py -k mykey -p 8888

3) from any web2py app you can post messages with

   from gluon.contrib.comet_messaging import comet_send
   comet_send('http://127.0.0.1:8888','Hello World','mykey','mygroup')

4) from any template you can receive them with

   <script>
   $(document).ready(function(){
      if(!web2py_comet('ws://127.0.0.1:8888/realtime/mygroup',function(e){alert(e.data)}))
         alert("html5 websocket not supported by your browser, try Google Chrome");
   });
   </script>

When the server posts a message, all clients connected to the page will popup an alert message
Or if you want to send json messages and store evaluated json in a var called data:

   <script>
   $(document).ready(function(){
      var data;
      web2py_comet('ws://127.0.0.1:8888/realtime/mygroup',function(e){data=eval('('+e.data+')')});
   });
   </script>

- All communications between web2py and comet_messaging will be digitally signed with hmac.
- All validation is handled on the web2py side and there is no need to modify comet_messaging.py
- Multiple web2py instances can talk with one or more comet_messaging servers.
- "ws://127.0.0.1:8888/realtime/" must be contain the IP of the comet_messaging server.
- Via group='mygroup' name you can support multiple groups of clients (think of many chat-rooms)

Here is a complete sample web2py action:

    def index():
        form=LOAD('default','ajax_form',ajax=True)
        script=SCRIPT('''
            jQuery(document).ready(function(){
              var callback=function(e){alert(e.data)};
              if(!web2py_comet('ws://127.0.0.1:8888/realtime/mygroup',callback))
                alert("html5 websocket not supported by your browser, try Google Chrome");
            });
        ''')
        return dict(form=form, script=script)

    def ajax_form():
        form=SQLFORM.factory(Field('message'))
        if form.accepts(request,session):
            from gluon.contrib.comet_messaging import comet_send
            comet_send('http://127.0.0.1:8888',form.vars.message,'mykey','mygroup')
        return form

Acknowledgements:
Tornado code inspired by http://thomas.pelletier.im/2010/08/websocket-tornado-redis/

"""

import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
import hmac
import sys
import optparse
import urllib
import time

listeners = {}
names = {}
tokens = {}

def comet_send(url,message,hmac_key=None,group='default'):
    sig = hmac_key and hmac.new(hmac_key,message).hexdigest() or ''
    params = urllib.urlencode({'message': message, 'signature': sig, 'group':group})
    f = urllib.urlopen(url, params)
    data= f.read()
    f.close()
    return data

class PostHandler(tornado.web.RequestHandler):
    """
    only authorized parties can post messages
    """
    def post(self):
        if hmac_key and not 'signature' in self.request.arguments: return 'false'
        if 'message' in self.request.arguments:
            message = self.request.arguments['message'][0]
            group = self.request.arguments.get('group',['default'])[0]
            print '%s:MESSAGE to %s:%s' % (time.time(), group, message)
            if hmac_key:
                signature = self.request.arguments['signature'][0]
                if not hmac.new(hmac_key,message).hexdigest()==signature: return 'false'
            for client in listeners.get(group,[]): client.write_message(message)
            return 'true'
        return 'false'

class TokenHandler(tornado.web.RequestHandler):
    """
    if running with -t post a token to allow a client to join using the token
    the message here is the token (any uuid)
    allows only authorized parties to joins, for example, a chat
    """
    def post(self):
        if hmac_key and not 'message' in self.request.arguments: return 'false'
        if 'message' in self.request.arguments:
            message = self.request.arguments['message'][0]
            if hmac_key:
                signature = self.request.arguments['signature'][0]
                if not hmac.new(hmac_key,message).hexdigest()==signature: return 'false'
            tokens[message] = None
            return 'true'
        return 'false'

class DistributeHandler(tornado.websocket.WebSocketHandler):
    def open(self,params):
        group,token,name = params.split('/')+[None,None]
        self.group = group or 'default'
        self.token = token or 'none'
        self.name = name or 'anonymous'
        # only authorized parties can join
        if DistributeHandler.tokens:
            if not self.token in tokens or not token[self.token]==None:
                self.close()
            else:
                tokens[self.token] = self
        if not self.group in listeners: listeners[self.group]=[]
        # notify clients that a member has joined the groups
        for client in listeners.get(self.group,[]): client.write_message('+'+self.name)
        listeners[self.group].append(self)
        names[self] = self.name
        print '%s:CONNECT to %s' % (time.time(), self.group)
    def on_message(self, message):
        pass
    def on_close(self):
        if self.group in listeners: listeners[self.group].remove(self)
        del names[self]
        # notify clients that a member has left the groups
        for client in listeners.get(self.group,[]): client.write_message('-'+self.name)
        print '%s:DISCONNECT from %s' % (time.time(), self.group)

if __name__ == "__main__":
    usage = __doc__
    version= ""
    parser = optparse.OptionParser(usage, None, optparse.Option, version)
    parser.add_option('-p',
                      '--port',
                      default='8888',
                      dest='port',
                      help='socket')
    parser.add_option('-l',
                      '--listen',
                      default='0.0.0.0',
                      dest='address',
                      help='listener address')
    parser.add_option('-k',
                      '--hmac_key',
                      default='',
                      dest='hmac_key',
                      help='hmac_key')
    parser.add_option('-t',
                      '--tokens',
                      action='store_true',
                      default=False,
                      dest='tokens',
                      help='require tockens to join')
    (options, args) = parser.parse_args()
    hmac_key = options.hmac_key
    DistributeHandler.tokens = options.tokens
    urls=[
        (r'/', PostHandler),
        (r'/token', TokenHandler),
        (r'/realtime/(.*)', DistributeHandler)]
    application = tornado.web.Application(urls, auto_reload=True)
    http_server = tornado.httpserver.HTTPServer(application)
    http_server.listen(int(options.port), address=options.address)
    tornado.ioloop.IOLoop.instance().start()

Added gluon/contrib/feedparser.py version [5437fea58f].











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Universal feed parser

Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds

Visit http://feedparser.org/ for the latest version
Visit http://feedparser.org/docs/ for the latest documentation

Required: Python 2.1 or later
Recommended: Python 2.3 or later
Recommended: CJKCodecs and iconv_codec <http://cjkpython.i18n.org/>
"""  # + "$Revision: 1.92 $"[11:15] + "-cvs"

__version__ = '4.1'
__license__ = \
    """Copyright (c) 2002-2006, Mark Pilgrim, 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.

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__ = 'Mark Pilgrim <http://diveintomark.org/>'
__contributors__ = ['Jason Diamond <http://injektilo.org/>',
                    'John Beimler <http://john.beimler.org/>',
                    'Fazal Majid <http://www.majid.info/mylos/weblog/>'
                    , 'Aaron Swartz <http://aaronsw.com/>',
                    'Kevin Marks <http://epeus.blogspot.com/>']
_debug = 0

# HTTP "User-Agent" header to send to servers when downloading feeds.
# If you are embedding feedparser in a larger application, you should
# change this to your application name and URL.

USER_AGENT = 'UniversalFeedParser/%s +http://feedparser.org/'\
     % __version__

# HTTP "Accept" header to send to servers when downloading feeds.  If you don't
# want to send an Accept header, set this to None.

ACCEPT_HEADER = \
    'application/atom+xml,application/rdf+xml,application/rss+xml,application/x-netcdf,application/xml;q=0.9,text/xml;q=0.2,*/*;q=0.1'

# List of preferred XML parsers, by SAX driver name.  These will be tried first,
# but if they're not installed, Python will keep searching through its own list
# of pre-installed parsers until it finds one that supports everything we need.

PREFERRED_XML_PARSERS = ['drv_libxml2']

# If you want feedparser to automatically run HTML markup through HTML Tidy, set
# this to 1.  Requires mxTidy <http://www.egenix.com/files/python/mxTidy.html>
# or utidylib <http://utidylib.berlios.de/>.

TIDY_MARKUP = 0

# List of Python interfaces for HTML Tidy, in order of preference.  Only useful
# if TIDY_MARKUP = 1

PREFERRED_TIDY_INTERFACES = ['uTidy', 'mxTidy']

# ---------- required modules (should come with any Python distribution) ----------

import sgmllib
import re
import sys
import copy
import urlparse
import time
import rfc822
import types
import cgi
import urllib
import urllib2
try:
    from cStringIO import StringIO as _StringIO
except:
    from StringIO import StringIO as _StringIO

# ---------- optional modules (feedparser will work without these, but with reduced functionality) ----------

# gzip is included with most Python distributions, but may not be available if you compiled your own

try:
    import gzip
except:
    gzip = None
try:
    import zlib
except:
    zlib = None

# If a real XML parser is available, feedparser will attempt to use it.  feedparser has
# been tested with the built-in SAX parser, PyXML, and libxml2.  On platforms where the
# Python distribution does not come with an XML parser (such as Mac OS X 10.2 and some
# versions of FreeBSD), feedparser will quietly fall back on regex-based parsing.

try:
    import xml.sax
    xml.sax.make_parser(PREFERRED_XML_PARSERS)  # test for valid parsers
    from xml.sax.saxutils import escape as _xmlescape
    _XML_AVAILABLE = 1
except:
    _XML_AVAILABLE = 0


    def _xmlescape(data):
        data = data.replace('&', '&amp;')
        data = data.replace('>', '&gt;')
        data = data.replace('<', '&lt;')
        return data


# base64 support for Atom feeds that contain embedded binary data

try:
    import base64
    import binascii
except:
    base64 = binascii = None

# cjkcodecs and iconv_codec provide support for more character encodings.
# Both are available from http://cjkpython.i18n.org/

try:
    import cjkcodecs.aliases
except:
    pass
try:
    import iconv_codec
except:
    pass

# chardet library auto-detects character encodings
# Download from http://chardet.feedparser.org/

try:
    import chardet
    if _debug:
        import chardet.constants
        chardet.constants._debug = 1
except:
    chardet = None

# ---------- don't touch these ----------


class ThingsNobodyCaresAboutButMe(Exception):

    pass


class CharacterEncodingOverride(ThingsNobodyCaresAboutButMe):

    pass


class CharacterEncodingUnknown(ThingsNobodyCaresAboutButMe):

    pass


class NonXMLContentType(ThingsNobodyCaresAboutButMe):

    pass


class UndeclaredNamespace(Exception):

    pass


sgmllib.tagfind = re.compile('[a-zA-Z][-_.:a-zA-Z0-9]*')
sgmllib.special = re.compile('<!')
sgmllib.charref = re.compile('&#(x?[0-9A-Fa-f]+)[^0-9A-Fa-f]')

SUPPORTED_VERSIONS = {
    '': 'unknown',
    'rss090': 'RSS 0.90',
    'rss091n': 'RSS 0.91 (Netscape)',
    'rss091u': 'RSS 0.91 (Userland)',
    'rss092': 'RSS 0.92',
    'rss093': 'RSS 0.93',
    'rss094': 'RSS 0.94',
    'rss20': 'RSS 2.0',
    'rss10': 'RSS 1.0',
    'rss': 'RSS (unknown version)',
    'atom01': 'Atom 0.1',
    'atom02': 'Atom 0.2',
    'atom03': 'Atom 0.3',
    'atom10': 'Atom 1.0',
    'atom': 'Atom (unknown version)',
    'cdf': 'CDF',
    'hotrss': 'Hot RSS',
    }

try:
    UserDict = dict
except NameError:

    # Python 2.1 does not have dict

    from UserDict import UserDict


    def dict(aList):
        rc = {}
        for (k, v) in aList:
            rc[k] = v
        return rc


class FeedParserDict(UserDict):

    keymap = {
        'channel': 'feed',
        'items': 'entries',
        'guid': 'id',
        'date': 'updated',
        'date_parsed': 'updated_parsed',
        'description': ['subtitle', 'summary'],
        'url': ['href'],
        'modified': 'updated',
        'modified_parsed': 'updated_parsed',
        'issued': 'published',
        'issued_parsed': 'published_parsed',
        'copyright': 'rights',
        'copyright_detail': 'rights_detail',
        'tagline': 'subtitle',
        'tagline_detail': 'subtitle_detail',
        }

    def __getitem__(self, key):
        if key == 'category':
            return UserDict.__getitem__(self, 'tags')[0]['term']
        if key == 'categories':
            return [(tag['scheme'], tag['term']) for tag in
                    UserDict.__getitem__(self, 'tags')]
        realkey = self.keymap.get(key, key)
        if type(realkey) == types.ListType:
            for k in realkey:
                if UserDict.has_key(self, k):
                    return UserDict.__getitem__(self, k)
        if UserDict.has_key(self, key):
            return UserDict.__getitem__(self, key)
        return UserDict.__getitem__(self, realkey)

    def __setitem__(self, key, value):
        for k in self.keymap.keys():
            if key == k:
                key = self.keymap[k]
                if type(key) == types.ListType:
                    key = key[0]
        return UserDict.__setitem__(self, key, value)

    def get(self, key, default=None):
        if self.has_key(key):
            return self[key]
        else:
            return default

    def setdefault(self, key, value):
        if not self.has_key(key):
            self[key] = value
        return self[key]

    def has_key(self, key):
        try:
            return hasattr(self, key) or UserDict.has_key(self, key)
        except AttributeError:
            return False

    def __getattr__(self, key):
        try:
            return self.__dict__[key]
        except KeyError:
            pass
        try:
            assert not key.startswith('_')
            return self.__getitem__(key)
        except:
            raise AttributeError, "object has no attribute '%s'" % key

    def __setattr__(self, key, value):
        if key.startswith('_') or key == 'data':
            self.__dict__[key] = value
        else:
            return self.__setitem__(key, value)

    def __contains__(self, key):
        return self.has_key(key)


def zopeCompatibilityHack():
    global FeedParserDict
    del FeedParserDict

    def FeedParserDict(aDict=None):
        rc = {}
        if aDict:
            rc.update(aDict)
        return rc


_ebcdic_to_ascii_map = None


def _ebcdic_to_ascii(s):
    global _ebcdic_to_ascii_map
    if not _ebcdic_to_ascii_map:
        emap = (
            0,
            1,
            2,
            3,
            156,
            9,
            134,
            127,
            151,
            141,
            142,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            157,
            133,
            8,
            135,
            24,
            25,
            146,
            143,
            28,
            29,
            30,
            31,
            128,
            129,
            130,
            131,
            132,
            10,
            23,
            27,
            136,
            137,
            138,
            139,
            140,
            5,
            6,
            7,
            144,
            145,
            22,
            147,
            148,
            149,
            150,
            4,
            152,
            153,
            154,
            155,
            20,
            21,
            158,
            26,
            32,
            160,
            161,
            162,
            163,
            164,
            165,
            166,
            167,
            168,
            91,
            46,
            60,
            40,
            43,
            33,
            38,
            169,
            170,
            171,
            172,
            173,
            174,
            175,
            176,
            177,
            93,
            36,
            42,
            41,
            59,
            94,
            45,
            47,
            178,
            179,
            180,
            181,
            182,
            183,
            184,
            185,
            124,
            44,
            37,
            95,
            62,
            63,
            186,
            187,
            188,
            189,
            190,
            191,
            192,
            193,
            194,
            96,
            58,
            35,
            64,
            39,
            61,
            34,
            195,
            97,
            98,
            99,
            100,
            101,
            102,
            103,
            104,
            105,
            196,
            197,
            198,
            199,
            200,
            201,
            202,
            106,
            107,
            108,
            109,
            110,
            111,
            112,
            113,
            114,
            203,
            204,
            205,
            206,
            207,
            208,
            209,
            126,
            115,
            116,
            117,
            118,
            119,
            120,
            121,
            122,
            210,
            211,
            212,
            213,
            214,
            215,
            216,
            217,
            218,
            219,
            220,
            221,
            222,
            223,
            224,
            225,
            226,
            227,
            228,
            229,
            230,
            231,
            123,
            65,
            66,
            67,
            68,
            69,
            70,
            71,
            72,
            73,
            232,
            233,
            234,
            235,
            236,
            237,
            125,
            74,
            75,
            76,
            77,
            78,
            79,
            80,
            81,
            82,
            238,
            239,
            240,
            241,
            242,
            243,
            92,
            159,
            83,
            84,
            85,
            86,
            87,
            88,
            89,
            90,
            244,
            245,
            246,
            247,
            248,
            249,
            48,
            49,
            50,
            51,
            52,
            53,
            54,
            55,
            56,
            57,
            250,
            251,
            252,
            253,
            254,
            255,
            )
        import string
        _ebcdic_to_ascii_map = string.maketrans(''.join(map(chr,
                range(256))), ''.join(map(chr, emap)))
    return s.translate(_ebcdic_to_ascii_map)


_urifixer = re.compile('^([A-Za-z][A-Za-z0-9+-.]*://)(/*)(.*?)')


def _urljoin(base, uri):
    uri = _urifixer.sub(r'\1\3', uri)
    return urlparse.urljoin(base, uri)


class _FeedParserMixin:

    namespaces = {
        '': '',
        'http://backend.userland.com/rss': '',
        'http://blogs.law.harvard.edu/tech/rss': '',
        'http://purl.org/rss/1.0/': '',
        'http://my.netscape.com/rdf/simple/0.9/': '',
        'http://example.com/newformat#': '',
        'http://example.com/necho': '',
        'http://purl.org/echo/': '',
        'uri/of/echo/namespace#': '',
        'http://purl.org/pie/': '',
        'http://purl.org/atom/ns#': '',
        'http://www.w3.org/2005/Atom': '',
        'http://purl.org/rss/1.0/modules/rss091#': '',
        'http://webns.net/mvcb/': 'admin',
        'http://purl.org/rss/1.0/modules/aggregation/': 'ag',
        'http://purl.org/rss/1.0/modules/annotate/': 'annotate',
        'http://media.tangent.org/rss/1.0/': 'audio',
        'http://backend.userland.com/blogChannelModule': 'blogChannel',
        'http://web.resource.org/cc/': 'cc',
        'http://backend.userland.com/creativeCommonsRssModule': 'creativeCommons',
        'http://purl.org/rss/1.0/modules/company': 'co',
        'http://purl.org/rss/1.0/modules/content/': 'content',
        'http://my.theinfo.org/changed/1.0/rss/': 'cp',
        'http://purl.org/dc/elements/1.1/': 'dc',
        'http://purl.org/dc/terms/': 'dcterms',
        'http://purl.org/rss/1.0/modules/email/': 'email',
        'http://purl.org/rss/1.0/modules/event/': 'ev',
        'http://rssnamespace.org/feedburner/ext/1.0': 'feedburner',
        'http://freshmeat.net/rss/fm/': 'fm',
        'http://xmlns.com/foaf/0.1/': 'foaf',
        'http://www.w3.org/2003/01/geo/wgs84_pos#': 'geo',
        'http://postneo.com/icbm/': 'icbm',
        'http://purl.org/rss/1.0/modules/image/': 'image',
        'http://www.itunes.com/DTDs/PodCast-1.0.dtd': 'itunes',
        'http://example.com/DTDs/PodCast-1.0.dtd': 'itunes',
        'http://purl.org/rss/1.0/modules/link/': 'l',
        'http://search.yahoo.com/mrss': 'media',
        'http://madskills.com/public/xml/rss/module/pingback/': 'pingback',
        'http://prismstandard.org/namespaces/1.2/basic/': 'prism',
        'http://www.w3.org/1999/02/22-rdf-syntax-ns#': 'rdf',
        'http://www.w3.org/2000/01/rdf-schema#': 'rdfs',
        'http://purl.org/rss/1.0/modules/reference/': 'ref',
        'http://purl.org/rss/1.0/modules/richequiv/': 'reqv',
        'http://purl.org/rss/1.0/modules/search/': 'search',
        'http://purl.org/rss/1.0/modules/slash/': 'slash',
        'http://schemas.xmlsoap.org/soap/envelope/': 'soap',
        'http://purl.org/rss/1.0/modules/servicestatus/': 'ss',
        'http://hacks.benhammersley.com/rss/streaming/': 'str',
        'http://purl.org/rss/1.0/modules/subscription/': 'sub',
        'http://purl.org/rss/1.0/modules/syndication/': 'sy',
        'http://purl.org/rss/1.0/modules/taxonomy/': 'taxo',
        'http://purl.org/rss/1.0/modules/threading/': 'thr',
        'http://purl.org/rss/1.0/modules/textinput/': 'ti',
        'http://madskills.com/public/xml/rss/module/trackback/': 'trackback',
        'http://wellformedweb.org/commentAPI/': 'wfw',
        'http://purl.org/rss/1.0/modules/wiki/': 'wiki',
        'http://www.w3.org/1999/xhtml': 'xhtml',
        'http://www.w3.org/XML/1998/namespace': 'xml',
        'http://schemas.pocketsoap.com/rss/myDescModule/': 'szf',
        }
    _matchnamespaces = {}

    can_be_relative_uri = [
        'link',
        'id',
        'wfw_comment',
        'wfw_commentrss',
        'docs',
        'url',
        'href',
        'comments',
        'license',
        'icon',
        'logo',
        ]
    can_contain_relative_uris = [
        'content',
        'title',
        'summary',
        'info',
        'tagline',
        'subtitle',
        'copyright',
        'rights',
        'description',
        ]
    can_contain_dangerous_markup = [
        'content',
        'title',
        'summary',
        'info',
        'tagline',
        'subtitle',
        'copyright',
        'rights',
        'description',
        ]
    html_types = ['text/html', 'application/xhtml+xml']

    def __init__(
        self,
        baseuri=None,
        baselang=None,
        encoding='utf-8',
        ):
        if _debug:
            sys.stderr.write('initializing FeedParser\n')
        if not self._matchnamespaces:
            for (k, v) in self.namespaces.items():
                self._matchnamespaces[k.lower()] = v
        self.feeddata = FeedParserDict()  # feed-level data
        self.encoding = encoding  # character encoding
        self.entries = []  # list of entry-level data
        self.version = ''  # feed type/version, see SUPPORTED_VERSIONS
        self.namespacesInUse = {}  # dictionary of namespaces defined by the feed

        # the following are used internally to track state;
        # this is really out of control and should be refactored

        self.infeed = 0
        self.inentry = 0
        self.incontent = 0
        self.intextinput = 0
        self.inimage = 0
        self.inauthor = 0
        self.incontributor = 0
        self.inpublisher = 0
        self.insource = 0
        self.sourcedata = FeedParserDict()
        self.contentparams = FeedParserDict()
        self._summaryKey = None
        self.namespacemap = {}
        self.elementstack = []
        self.basestack = []
        self.langstack = []
        self.baseuri = baseuri or ''
        self.lang = baselang or None
        if baselang:
            self.feeddata['language'] = baselang

    def unknown_starttag(self, tag, attrs):
        if _debug:
            sys.stderr.write('start %s with %s\n' % (tag, attrs))

        # normalize attrs

        attrs = [(k.lower(), v) for (k, v) in attrs]
        attrs = [(k, k in ('rel', 'type') and v.lower() or v) for (k,
                 v) in attrs]

        # track xml:base and xml:lang

        attrsD = dict(attrs)
        baseuri = attrsD.get('xml:base', attrsD.get('base'))\
             or self.baseuri
        self.baseuri = _urljoin(self.baseuri, baseuri)
        lang = attrsD.get('xml:lang', attrsD.get('lang'))
        if lang == '':

            # xml:lang could be explicitly set to '', we need to capture that

            lang = None
        elif lang is None:

            # if no xml:lang is specified, use parent lang

            lang = self.lang
        if lang:
            if tag in ('feed', 'rss', 'rdf:RDF'):
                self.feeddata['language'] = lang
        self.lang = lang
        self.basestack.append(self.baseuri)
        self.langstack.append(lang)

        # track namespaces

        for (prefix, uri) in attrs:
            if prefix.startswith('xmlns:'):
                self.trackNamespace(prefix[6:], uri)
            elif prefix == 'xmlns':
                self.trackNamespace(None, uri)

        # track inline content

        if self.incontent and self.contentparams.has_key('type')\
             and not self.contentparams.get('type', 'xml'
                ).endswith('xml'):

            # element declared itself as escaped markup, but it isn't really

            self.contentparams['type'] = 'application/xhtml+xml'
        if self.incontent and self.contentparams.get('type')\
             == 'application/xhtml+xml':

            # Note: probably shouldn't simply recreate localname here, but
            # our namespace handling isn't actually 100% correct in cases where
            # the feed redefines the default namespace (which is actually
            # the usual case for inline content, thanks Sam), so here we
            # cheat and just reconstruct the element based on localname
            # because that compensates for the bugs in our namespace handling.
            # This will horribly munge inline content with non-empty qnames,
            # but nobody actually does that, so I'm not fixing it.

            tag = tag.split(':')[-1]
            return self.handle_data('<%s%s>' % (tag, ''.join([' %s="%s"'
                                     % t for t in attrs])), escape=0)

        # match namespaces

        if tag.find(':') != -1:
            (prefix, suffix) = tag.split(':', 1)
        else:
            (prefix, suffix) = ('', tag)
        prefix = self.namespacemap.get(prefix, prefix)
        if prefix:
            prefix = prefix + '_'

        # special hack for better tracking of empty textinput/image elements in illformed feeds

        if not prefix and tag not in ('title', 'link', 'description',
                'name'):
            self.intextinput = 0
        if not prefix and tag not in (
            'title',
            'link',
            'description',
            'url',
            'href',
            'width',
            'height',
            ):
            self.inimage = 0

        # call special handler (if defined) or default handler

        methodname = '_start_' + prefix + suffix
        try:
            method = getattr(self, methodname)
            return method(attrsD)
        except AttributeError:
            return self.push(prefix + suffix, 1)

    def unknown_endtag(self, tag):
        if _debug:
            sys.stderr.write('end %s\n' % tag)

        # match namespaces

        if tag.find(':') != -1:
            (prefix, suffix) = tag.split(':', 1)
        else:
            (prefix, suffix) = ('', tag)
        prefix = self.namespacemap.get(prefix, prefix)
        if prefix:
            prefix = prefix + '_'

        # call special handler (if defined) or default handler

        methodname = '_end_' + prefix + suffix
        try:
            method = getattr(self, methodname)
            method()
        except AttributeError:
            self.pop(prefix + suffix)

        # track inline content

        if self.incontent and self.contentparams.has_key('type')\
             and not self.contentparams.get('type', 'xml'
                ).endswith('xml'):

            # element declared itself as escaped markup, but it isn't really

            self.contentparams['type'] = 'application/xhtml+xml'
        if self.incontent and self.contentparams.get('type')\
             == 'application/xhtml+xml':
            tag = tag.split(':')[-1]
            self.handle_data('</%s>' % tag, escape=0)

        # track xml:base and xml:lang going out of scope

        if self.basestack:
            self.basestack.pop()
            if self.basestack and self.basestack[-1]:
                self.baseuri = self.basestack[-1]
        if self.langstack:
            self.langstack.pop()
            if self.langstack:  # and (self.langstack[-1] is not None):
                self.lang = self.langstack[-1]

    def handle_charref(self, ref):

        # called for each character reference, e.g. for '&#160;', ref will be '160'

        if not self.elementstack:
            return
        ref = ref.lower()
        if ref in (
            '34',
            '38',
            '39',
            '60',
            '62',
            'x22',
            'x26',
            'x27',
            'x3c',
            'x3e',
            ):
            text = '&#%s;' % ref
        else:
            if ref[0] == 'x':
                c = int(ref[1:], 16)
            else:
                c = int(ref)
            text = unichr(c).encode('utf-8')
        self.elementstack[-1][2].append(text)

    def handle_entityref(self, ref):

        # called for each entity reference, e.g. for '&copy;', ref will be 'copy'

        if not self.elementstack:
            return
        if _debug:
            sys.stderr.write('entering handle_entityref with %s\n'
                              % ref)
        if ref in ('lt', 'gt', 'quot', 'amp', 'apos'):
            text = '&%s;' % ref
        else:

            # entity resolution graciously donated by Aaron Swartz

            def name2cp(k):
                import htmlentitydefs
                if hasattr(htmlentitydefs, 'name2codepoint'):  # requires Python 2.3
                    return htmlentitydefs.name2codepoint[k]
                k = htmlentitydefs.entitydefs[k]
                if k.startswith('&#') and k.endswith(';'):
                    return int(k[2:-1])  # not in latin-1
                return ord(k)

            try:
                name2cp(ref)
            except KeyError:
                text = '&%s;' % ref
            else:
                text = unichr(name2cp(ref)).encode('utf-8')
        self.elementstack[-1][2].append(text)

    def handle_data(self, text, escape=1):

        # called for each block of plain text, i.e. outside of any tag and
        # not containing any character or entity references

        if not self.elementstack:
            return
        if escape and self.contentparams.get('type')\
             == 'application/xhtml+xml':
            text = _xmlescape(text)
        self.elementstack[-1][2].append(text)

    def handle_comment(self, text):

        # called for each comment, e.g. <!-- insert message here -->

        pass

    def handle_pi(self, text):

        # called for each processing instruction, e.g. <?instruction>

        pass

    def handle_decl(self, text):
        pass

    def parse_declaration(self, i):

        # override internal declaration handler to handle CDATA blocks

        if _debug:
            sys.stderr.write('entering parse_declaration\n')
        if self.rawdata[i:i + 9] == '<![CDATA[':
            k = self.rawdata.find(']]>', i)
            if k == -1:
                k = len(self.rawdata)
            self.handle_data(_xmlescape(self.rawdata[i + 9:k]), 0)
            return k + 3
        else:
            k = self.rawdata.find('>', i)
            return k + 1

    def mapContentType(self, contentType):
        contentType = contentType.lower()
        if contentType == 'text':
            contentType = 'text/plain'
        elif contentType == 'html':
            contentType = 'text/html'
        elif contentType == 'xhtml':
            contentType = 'application/xhtml+xml'
        return contentType

    def trackNamespace(self, prefix, uri):
        loweruri = uri.lower()
        if (prefix, loweruri) == (None,
                                  'http://my.netscape.com/rdf/simple/0.9/'
                                  ) and not self.version:
            self.version = 'rss090'
        if loweruri == 'http://purl.org/rss/1.0/' and not self.version:
            self.version = 'rss10'
        if loweruri == 'http://www.w3.org/2005/atom'\
             and not self.version:
            self.version = 'atom10'
        if loweruri.find('backend.userland.com/rss') != -1:

            # match any backend.userland.com namespace

            uri = 'http://backend.userland.com/rss'
            loweruri = uri
        if self._matchnamespaces.has_key(loweruri):
            self.namespacemap[prefix] = self._matchnamespaces[loweruri]
            self.namespacesInUse[self._matchnamespaces[loweruri]] = uri
        else:
            self.namespacesInUse[prefix or ''] = uri

    def resolveURI(self, uri):
        return _urljoin(self.baseuri or '', uri)

    def decodeEntities(self, element, data):
        return data

    def push(self, element, expectingText):
        self.elementstack.append([element, expectingText, []])

    def pop(self, element, stripWhitespace=1):
        if not self.elementstack:
            return
        if self.elementstack[-1][0] != element:
            return

        (element, expectingText, pieces) = self.elementstack.pop()
        output = ''.join(pieces)
        if stripWhitespace:
            output = output.strip()
        if not expectingText:
            return output

        # decode base64 content

        if base64 and self.contentparams.get('base64', 0):
            try:
                output = base64.decodestring(output)
            except binascii.Error:
                pass
            except binascii.Incomplete:
                pass

        # resolve relative URIs

        if element in self.can_be_relative_uri and output:
            output = self.resolveURI(output)

        # decode entities within embedded markup

        if not self.contentparams.get('base64', 0):
            output = self.decodeEntities(element, output)

        # remove temporary cruft from contentparams

        try:
            del self.contentparams['mode']
        except KeyError:
            pass
        try:
            del self.contentparams['base64']
        except KeyError:
            pass

        # resolve relative URIs within embedded markup

        if self.mapContentType(self.contentparams.get('type',
                               'text/html')) in self.html_types:
            if element in self.can_contain_relative_uris:
                output = _resolveRelativeURIs(output, self.baseuri,
                        self.encoding)

        # sanitize embedded markup

        if self.mapContentType(self.contentparams.get('type',
                               'text/html')) in self.html_types:
            if element in self.can_contain_dangerous_markup:
                output = _sanitizeHTML(output, self.encoding)

        if self.encoding and type(output) != type(u''):
            try:
                output = unicode(output, self.encoding)
            except:
                pass

        # categories/tags/keywords/whatever are handled in _end_category

        if element == 'category':
            return output

        # store output in appropriate place(s)

        if self.inentry and not self.insource:
            if element == 'content':
                self.entries[-1].setdefault(element, [])
                contentparams = copy.deepcopy(self.contentparams)
                contentparams['value'] = output
                self.entries[-1][element].append(contentparams)
            elif element == 'link':
                self.entries[-1][element] = output
                if output:
                    self.entries[-1]['links'][-1]['href'] = output
            else:
                if element == 'description':
                    element = 'summary'
                self.entries[-1][element] = output
                if self.incontent:
                    contentparams = copy.deepcopy(self.contentparams)
                    contentparams['value'] = output
                    self.entries[-1][element + '_detail'] = \
                        contentparams
        elif (self.infeed or self.insource) and not self.intextinput\
             and not self.inimage:
            context = self._getContext()
            if element == 'description':
                element = 'subtitle'
            context[element] = output
            if element == 'link':
                context['links'][-1]['href'] = output
            elif self.incontent:
                contentparams = copy.deepcopy(self.contentparams)
                contentparams['value'] = output
                context[element + '_detail'] = contentparams
        return output

    def pushContent(
        self,
        tag,
        attrsD,
        defaultContentType,
        expectingText,
        ):
        self.incontent += 1
        self.contentparams = FeedParserDict({'type'
                : self.mapContentType(attrsD.get('type',
                defaultContentType)), 'language': self.lang, 'base'
                : self.baseuri})
        self.contentparams['base64'] = self._isBase64(attrsD,
                self.contentparams)
        self.push(tag, expectingText)

    def popContent(self, tag):
        value = self.pop(tag)
        self.incontent -= 1
        self.contentparams.clear()
        return value

    def _mapToStandardPrefix(self, name):
        colonpos = name.find(':')
        if colonpos != -1:
            prefix = name[:colonpos]
            suffix = name[colonpos + 1:]
            prefix = self.namespacemap.get(prefix, prefix)
            name = prefix + ':' + suffix
        return name

    def _getAttribute(self, attrsD, name):
        return attrsD.get(self._mapToStandardPrefix(name))

    def _isBase64(self, attrsD, contentparams):
        if attrsD.get('mode', '') == 'base64':
            return 1
        if self.contentparams['type'].startswith('text/'):
            return 0
        if self.contentparams['type'].endswith('+xml'):
            return 0
        if self.contentparams['type'].endswith('/xml'):
            return 0
        return 1

    def _itsAnHrefDamnIt(self, attrsD):
        href = attrsD.get('url', attrsD.get('uri', attrsD.get('href',
                          None)))
        if href:
            try:
                del attrsD['url']
            except KeyError:
                pass
            try:
                del attrsD['uri']
            except KeyError:
                pass
            attrsD['href'] = href
        return attrsD

    def _save(self, key, value):
        context = self._getContext()
        context.setdefault(key, value)

    def _start_rss(self, attrsD):
        versionmap = {
            '0.91': 'rss091u',
            '0.92': 'rss092',
            '0.93': 'rss093',
            '0.94': 'rss094',
            }
        if not self.version:
            attr_version = attrsD.get('version', '')
            version = versionmap.get(attr_version)
            if version:
                self.version = version
            elif attr_version.startswith('2.'):
                self.version = 'rss20'
            else:
                self.version = 'rss'

    def _start_dlhottitles(self, attrsD):
        self.version = 'hotrss'

    def _start_channel(self, attrsD):
        self.infeed = 1
        self._cdf_common(attrsD)

    _start_feedinfo = _start_channel

    def _cdf_common(self, attrsD):
        if attrsD.has_key('lastmod'):
            self._start_modified({})
            self.elementstack[-1][-1] = attrsD['lastmod']
            self._end_modified()
        if attrsD.has_key('href'):
            self._start_link({})
            self.elementstack[-1][-1] = attrsD['href']
            self._end_link()

    def _start_feed(self, attrsD):
        self.infeed = 1
        versionmap = {'0.1': 'atom01', '0.2': 'atom02', '0.3': 'atom03'}
        if not self.version:
            attr_version = attrsD.get('version')
            version = versionmap.get(attr_version)
            if version:
                self.version = version
            else:
                self.version = 'atom'

    def _end_channel(self):
        self.infeed = 0

    _end_feed = _end_channel

    def _start_image(self, attrsD):
        self.inimage = 1
        self.push('image', 0)
        context = self._getContext()
        context.setdefault('image', FeedParserDict())

    def _end_image(self):
        self.pop('image')
        self.inimage = 0

    def _start_textinput(self, attrsD):
        self.intextinput = 1
        self.push('textinput', 0)
        context = self._getContext()
        context.setdefault('textinput', FeedParserDict())

    _start_textInput = _start_textinput

    def _end_textinput(self):
        self.pop('textinput')
        self.intextinput = 0

    _end_textInput = _end_textinput

    def _start_author(self, attrsD):
        self.inauthor = 1
        self.push('author', 1)

    _start_managingeditor = _start_author
    _start_dc_author = _start_author
    _start_dc_creator = _start_author
    _start_itunes_author = _start_author

    def _end_author(self):
        self.pop('author')
        self.inauthor = 0
        self._sync_author_detail()

    _end_managingeditor = _end_author
    _end_dc_author = _end_author
    _end_dc_creator = _end_author
    _end_itunes_author = _end_author

    def _start_itunes_owner(self, attrsD):
        self.inpublisher = 1
        self.push('publisher', 0)

    def _end_itunes_owner(self):
        self.pop('publisher')
        self.inpublisher = 0
        self._sync_author_detail('publisher')

    def _start_contributor(self, attrsD):
        self.incontributor = 1
        context = self._getContext()
        context.setdefault('contributors', [])
        context['contributors'].append(FeedParserDict())
        self.push('contributor', 0)

    def _end_contributor(self):
        self.pop('contributor')
        self.incontributor = 0

    def _start_dc_contributor(self, attrsD):
        self.incontributor = 1
        context = self._getContext()
        context.setdefault('contributors', [])
        context['contributors'].append(FeedParserDict())
        self.push('name', 0)

    def _end_dc_contributor(self):
        self._end_name()
        self.incontributor = 0

    def _start_name(self, attrsD):
        self.push('name', 0)

    _start_itunes_name = _start_name

    def _end_name(self):
        value = self.pop('name')
        if self.inpublisher:
            self._save_author('name', value, 'publisher')
        elif self.inauthor:
            self._save_author('name', value)
        elif self.incontributor:
            self._save_contributor('name', value)
        elif self.intextinput:
            context = self._getContext()
            context['textinput']['name'] = value

    _end_itunes_name = _end_name

    def _start_width(self, attrsD):
        self.push('width', 0)

    def _end_width(self):
        value = self.pop('width')
        try:
            value = int(value)
        except:
            value = 0
        if self.inimage:
            context = self._getContext()
            context['image']['width'] = value

    def _start_height(self, attrsD):
        self.push('height', 0)

    def _end_height(self):
        value = self.pop('height')
        try:
            value = int(value)
        except:
            value = 0
        if self.inimage:
            context = self._getContext()
            context['image']['height'] = value

    def _start_url(self, attrsD):
        self.push('href', 1)

    _start_homepage = _start_url
    _start_uri = _start_url

    def _end_url(self):
        value = self.pop('href')
        if self.inauthor:
            self._save_author('href', value)
        elif self.incontributor:
            self._save_contributor('href', value)
        elif self.inimage:
            context = self._getContext()
            context['image']['href'] = value
        elif self.intextinput:
            context = self._getContext()
            context['textinput']['link'] = value

    _end_homepage = _end_url
    _end_uri = _end_url

    def _start_email(self, attrsD):
        self.push('email', 0)

    _start_itunes_email = _start_email

    def _end_email(self):
        value = self.pop('email')
        if self.inpublisher:
            self._save_author('email', value, 'publisher')
        elif self.inauthor:
            self._save_author('email', value)
        elif self.incontributor:
            self._save_contributor('email', value)

    _end_itunes_email = _end_email

    def _getContext(self):
        if self.insource:
            context = self.sourcedata
        elif self.inentry:
            context = self.entries[-1]
        else:
            context = self.feeddata
        return context

    def _save_author(
        self,
        key,
        value,
        prefix='author',
        ):
        context = self._getContext()
        context.setdefault(prefix + '_detail', FeedParserDict())
        context[prefix + '_detail'][key] = value
        self._sync_author_detail()

    def _save_contributor(self, key, value):
        context = self._getContext()
        context.setdefault('contributors', [FeedParserDict()])
        context['contributors'][-1][key] = value

    def _sync_author_detail(self, key='author'):
        context = self._getContext()
        detail = context.get('%s_detail' % key)
        if detail:
            name = detail.get('name')
            email = detail.get('email')
            if name and email:
                context[key] = '%s (%s)' % (name, email)
            elif name:
                context[key] = name
            elif email:
                context[key] = email
        else:
            author = context.get(key)
            if not author:
                return
            emailmatch = \
                re.search(r'''(([a-zA-Z0-9\_\-\.\+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))'''
                          , author)
            if not emailmatch:
                return
            email = emailmatch.group(0)

            # probably a better way to do the following, but it passes all the tests

            author = author.replace(email, '')
            author = author.replace('()', '')
            author = author.strip()
            if author and author[0] == '(':
                author = author[1:]
            if author and author[-1] == ')':
                author = author[:-1]
            author = author.strip()
            context.setdefault('%s_detail' % key, FeedParserDict())
            context['%s_detail' % key]['name'] = author
            context['%s_detail' % key]['email'] = email

    def _start_subtitle(self, attrsD):
        self.pushContent('subtitle', attrsD, 'text/plain', 1)

    _start_tagline = _start_subtitle
    _start_itunes_subtitle = _start_subtitle

    def _end_subtitle(self):
        self.popContent('subtitle')

    _end_tagline = _end_subtitle
    _end_itunes_subtitle = _end_subtitle

    def _start_rights(self, attrsD):
        self.pushContent('rights', attrsD, 'text/plain', 1)

    _start_dc_rights = _start_rights
    _start_copyright = _start_rights

    def _end_rights(self):
        self.popContent('rights')

    _end_dc_rights = _end_rights
    _end_copyright = _end_rights

    def _start_item(self, attrsD):
        self.entries.append(FeedParserDict())
        self.push('item', 0)
        self.inentry = 1
        self.guidislink = 0
        id = self._getAttribute(attrsD, 'rdf:about')
        if id:
            context = self._getContext()
            context['id'] = id
        self._cdf_common(attrsD)

    _start_entry = _start_item
    _start_product = _start_item

    def _end_item(self):
        self.pop('item')
        self.inentry = 0

    _end_entry = _end_item

    def _start_dc_language(self, attrsD):
        self.push('language', 1)

    _start_language = _start_dc_language

    def _end_dc_language(self):
        self.lang = self.pop('language')

    _end_language = _end_dc_language

    def _start_dc_publisher(self, attrsD):
        self.push('publisher', 1)

    _start_webmaster = _start_dc_publisher

    def _end_dc_publisher(self):
        self.pop('publisher')
        self._sync_author_detail('publisher')

    _end_webmaster = _end_dc_publisher

    def _start_published(self, attrsD):
        self.push('published', 1)

    _start_dcterms_issued = _start_published
    _start_issued = _start_published

    def _end_published(self):
        value = self.pop('published')
        self._save('published_parsed', _parse_date(value))

    _end_dcterms_issued = _end_published
    _end_issued = _end_published

    def _start_updated(self, attrsD):
        self.push('updated', 1)

    _start_modified = _start_updated
    _start_dcterms_modified = _start_updated
    _start_pubdate = _start_updated
    _start_dc_date = _start_updated

    def _end_updated(self):
        value = self.pop('updated')
        parsed_value = _parse_date(value)
        self._save('updated_parsed', parsed_value)

    _end_modified = _end_updated
    _end_dcterms_modified = _end_updated
    _end_pubdate = _end_updated
    _end_dc_date = _end_updated

    def _start_created(self, attrsD):
        self.push('created', 1)

    _start_dcterms_created = _start_created

    def _end_created(self):
        value = self.pop('created')
        self._save('created_parsed', _parse_date(value))

    _end_dcterms_created = _end_created

    def _start_expirationdate(self, attrsD):
        self.push('expired', 1)

    def _end_expirationdate(self):
        self._save('expired_parsed', _parse_date(self.pop('expired')))

    def _start_cc_license(self, attrsD):
        self.push('license', 1)
        value = self._getAttribute(attrsD, 'rdf:resource')
        if value:
            self.elementstack[-1][2].append(value)
        self.pop('license')

    def _start_creativecommons_license(self, attrsD):
        self.push('license', 1)

    def _end_creativecommons_license(self):
        self.pop('license')

    def _addTag(
        self,
        term,
        scheme,
        label,
        ):
        context = self._getContext()
        tags = context.setdefault('tags', [])
        if not term and not scheme and not label:
            return
        value = FeedParserDict({'term': term, 'scheme': scheme, 'label'
                               : label})
        if value not in tags:
            tags.append(FeedParserDict({'term': term, 'scheme': scheme,
                        'label': label}))

    def _start_category(self, attrsD):
        if _debug:
            sys.stderr.write('entering _start_category with %s\n'
                              % repr(attrsD))
        term = attrsD.get('term')
        scheme = attrsD.get('scheme', attrsD.get('domain'))
        label = attrsD.get('label')
        self._addTag(term, scheme, label)
        self.push('category', 1)

    _start_dc_subject = _start_category
    _start_keywords = _start_category

    def _end_itunes_keywords(self):
        for term in self.pop('itunes_keywords').split():
            self._addTag(term, 'http://www.itunes.com/', None)

    def _start_itunes_category(self, attrsD):
        self._addTag(attrsD.get('text'), 'http://www.itunes.com/', None)
        self.push('category', 1)

    def _end_category(self):
        value = self.pop('category')
        if not value:
            return
        context = self._getContext()
        tags = context['tags']
        if value and len(tags) and not tags[-1]['term']:
            tags[-1]['term'] = value
        else:
            self._addTag(value, None, None)

    _end_dc_subject = _end_category
    _end_keywords = _end_category
    _end_itunes_category = _end_category

    def _start_cloud(self, attrsD):
        self._getContext()['cloud'] = FeedParserDict(attrsD)

    def _start_link(self, attrsD):
        attrsD.setdefault('rel', 'alternate')
        attrsD.setdefault('type', 'text/html')
        attrsD = self._itsAnHrefDamnIt(attrsD)
        if attrsD.has_key('href'):
            attrsD['href'] = self.resolveURI(attrsD['href'])
        expectingText = self.infeed or self.inentry or self.insource
        context = self._getContext()
        context.setdefault('links', [])
        context['links'].append(FeedParserDict(attrsD))
        if attrsD['rel'] == 'enclosure':
            self._start_enclosure(attrsD)
        if attrsD.has_key('href'):
            expectingText = 0
            if attrsD.get('rel') == 'alternate'\
                 and self.mapContentType(attrsD.get('type'))\
                 in self.html_types:
                context['link'] = attrsD['href']
        else:
            self.push('link', expectingText)

    _start_producturl = _start_link

    def _end_link(self):
        value = self.pop('link')
        context = self._getContext()
        if self.intextinput:
            context['textinput']['link'] = value
        if self.inimage:
            context['image']['link'] = value

    _end_producturl = _end_link

    def _start_guid(self, attrsD):
        self.guidislink = attrsD.get('ispermalink', 'true') == 'true'
        self.push('id', 1)

    def _end_guid(self):
        value = self.pop('id')
        self._save('guidislink', self.guidislink
                    and not self._getContext().has_key('link'))
        if self.guidislink:

            # guid acts as link, but only if 'ispermalink' is not present or is 'true',
            # and only if the item doesn't already have a link element

            self._save('link', value)

    def _start_title(self, attrsD):
        self.pushContent('title', attrsD, 'text/plain', self.infeed
                          or self.inentry or self.insource)

    _start_dc_title = _start_title
    _start_media_title = _start_title

    def _end_title(self):
        value = self.popContent('title')
        context = self._getContext()
        if self.intextinput:
            context['textinput']['title'] = value
        elif self.inimage:
            context['image']['title'] = value

    _end_dc_title = _end_title
    _end_media_title = _end_title

    def _start_description(self, attrsD):
        context = self._getContext()
        if context.has_key('summary'):
            self._summaryKey = 'content'
            self._start_content(attrsD)
        else:
            self.pushContent('description', attrsD, 'text/html',
                             self.infeed or self.inentry
                              or self.insource)

    def _start_abstract(self, attrsD):
        self.pushContent('description', attrsD, 'text/plain',
                         self.infeed or self.inentry or self.insource)

    def _end_description(self):
        if self._summaryKey == 'content':
            self._end_content()
        else:
            value = self.popContent('description')
            context = self._getContext()
            if self.intextinput:
                context['textinput']['description'] = value
            elif self.inimage:
                context['image']['description'] = value
        self._summaryKey = None

    _end_abstract = _end_description

    def _start_info(self, attrsD):
        self.pushContent('info', attrsD, 'text/plain', 1)

    _start_feedburner_browserfriendly = _start_info

    def _end_info(self):
        self.popContent('info')

    _end_feedburner_browserfriendly = _end_info

    def _start_generator(self, attrsD):
        if attrsD:
            attrsD = self._itsAnHrefDamnIt(attrsD)
            if attrsD.has_key('href'):
                attrsD['href'] = self.resolveURI(attrsD['href'])
        self._getContext()['generator_detail'] = FeedParserDict(attrsD)
        self.push('generator', 1)

    def _end_generator(self):
        value = self.pop('generator')
        context = self._getContext()
        if context.has_key('generator_detail'):
            context['generator_detail']['name'] = value

    def _start_admin_generatoragent(self, attrsD):
        self.push('generator', 1)
        value = self._getAttribute(attrsD, 'rdf:resource')
        if value:
            self.elementstack[-1][2].append(value)
        self.pop('generator')
        self._getContext()['generator_detail'] = FeedParserDict({'href'
                : value})

    def _start_admin_errorreportsto(self, attrsD):
        self.push('errorreportsto', 1)
        value = self._getAttribute(attrsD, 'rdf:resource')
        if value:
            self.elementstack[-1][2].append(value)
        self.pop('errorreportsto')

    def _start_summary(self, attrsD):
        context = self._getContext()
        if context.has_key('summary'):
            self._summaryKey = 'content'
            self._start_content(attrsD)
        else:
            self._summaryKey = 'summary'
            self.pushContent(self._summaryKey, attrsD, 'text/plain', 1)

    _start_itunes_summary = _start_summary

    def _end_summary(self):
        if self._summaryKey == 'content':
            self._end_content()
        else:
            self.popContent(self._summaryKey or 'summary')
        self._summaryKey = None

    _end_itunes_summary = _end_summary

    def _start_enclosure(self, attrsD):
        attrsD = self._itsAnHrefDamnIt(attrsD)
        self._getContext().setdefault('enclosures',
                []).append(FeedParserDict(attrsD))
        href = attrsD.get('href')
        if href:
            context = self._getContext()
            if not context.get('id'):
                context['id'] = href

    def _start_source(self, attrsD):
        self.insource = 1

    def _end_source(self):
        self.insource = 0
        self._getContext()['source'] = copy.deepcopy(self.sourcedata)
        self.sourcedata.clear()

    def _start_content(self, attrsD):
        self.pushContent('content', attrsD, 'text/plain', 1)
        src = attrsD.get('src')
        if src:
            self.contentparams['src'] = src
        self.push('content', 1)

    def _start_prodlink(self, attrsD):
        self.pushContent('content', attrsD, 'text/html', 1)

    def _start_body(self, attrsD):
        self.pushContent('content', attrsD, 'application/xhtml+xml', 1)

    _start_xhtml_body = _start_body

    def _start_content_encoded(self, attrsD):
        self.pushContent('content', attrsD, 'text/html', 1)

    _start_fullitem = _start_content_encoded

    def _end_content(self):
        copyToDescription = \
            self.mapContentType(self.contentparams.get('type'))\
             in ['text/plain'] + self.html_types
        value = self.popContent('content')
        if copyToDescription:
            self._save('description', value)

    _end_body = _end_content
    _end_xhtml_body = _end_content
    _end_content_encoded = _end_content
    _end_fullitem = _end_content
    _end_prodlink = _end_content

    def _start_itunes_image(self, attrsD):
        self.push('itunes_image', 0)
        self._getContext()['image'] = FeedParserDict({'href'
                : attrsD.get('href')})

    _start_itunes_link = _start_itunes_image

    def _end_itunes_block(self):
        value = self.pop('itunes_block', 0)
        self._getContext()['itunes_block'] = value == 'yes' and 1 or 0

    def _end_itunes_explicit(self):
        value = self.pop('itunes_explicit', 0)
        self._getContext()['itunes_explicit'] = value == 'yes' and 1\
             or 0


if _XML_AVAILABLE:


    class _StrictFeedParser(_FeedParserMixin,
        xml.sax.handler.ContentHandler):

        def __init__(
            self,
            baseuri,
            baselang,
            encoding,
            ):
            if _debug:
                sys.stderr.write('trying StrictFeedParser\n')
            xml.sax.handler.ContentHandler.__init__(self)
            _FeedParserMixin.__init__(self, baseuri, baselang, encoding)
            self.bozo = 0
            self.exc = None

        def startPrefixMapping(self, prefix, uri):
            self.trackNamespace(prefix, uri)

        def startElementNS(
            self,
            name,
            qname,
            attrs,
            ):
            (namespace, localname) = name
            lowernamespace = str(namespace or '').lower()
            if lowernamespace.find('backend.userland.com/rss') != -1:

                # match any backend.userland.com namespace

                namespace = 'http://backend.userland.com/rss'
                lowernamespace = namespace
            if qname and qname.find(':') > 0:
                givenprefix = qname.split(':')[0]
            else:
                givenprefix = None
            prefix = self._matchnamespaces.get(lowernamespace,
                    givenprefix)
            if givenprefix and (prefix == None or prefix == ''
                                 and lowernamespace == '')\
                 and not self.namespacesInUse.has_key(givenprefix):
                raise UndeclaredNamespace, \
                    "'%s' is not associated with a namespace"\
                     % givenprefix
            if prefix:
                localname = prefix + ':' + localname
            localname = str(localname).lower()
            if _debug:
                sys.stderr.write('startElementNS: qname = %s, namespace = %s, givenprefix = %s, prefix = %s, attrs = %s, localname = %s\n'
                                  % (
                    qname,
                    namespace,
                    givenprefix,
                    prefix,
                    attrs.items(),
                    localname,
                    ))

            # qname implementation is horribly broken in Python 2.1 (it
            # doesn't report any), and slightly broken in Python 2.2 (it
            # doesn't report the xml: namespace). So we match up namespaces
            # with a known list first, and then possibly override them with
            # the qnames the SAX parser gives us (if indeed it gives us any
            # at all).  Thanks to MatejC for helping me test this and
            # tirelessly telling me that it didn't work yet.

            attrsD = {}
            for ((namespace, attrlocalname), attrvalue) in \
                attrs._attrs.items():
                lowernamespace = (namespace or '').lower()
                prefix = self._matchnamespaces.get(lowernamespace, '')
                if prefix:
                    attrlocalname = prefix + ':' + attrlocalname
                attrsD[str(attrlocalname).lower()] = attrvalue
            for qname in attrs.getQNames():
                attrsD[str(qname).lower()] = \
                    attrs.getValueByQName(qname)
            self.unknown_starttag(localname, attrsD.items())

        def characters(self, text):
            self.handle_data(text)

        def endElementNS(self, name, qname):
            (namespace, localname) = name
            lowernamespace = str(namespace or '').lower()
            if qname and qname.find(':') > 0:
                givenprefix = qname.split(':')[0]
            else:
                givenprefix = ''
            prefix = self._matchnamespaces.get(lowernamespace,
                    givenprefix)
            if prefix:
                localname = prefix + ':' + localname
            localname = str(localname).lower()
            self.unknown_endtag(localname)

        def error(self, exc):
            self.bozo = 1
            self.exc = exc

        def fatalError(self, exc):
            self.error(exc)
            raise exc


class _BaseHTMLProcessor(sgmllib.SGMLParser):

    elements_no_end_tag = [
        'area',
        'base',
        'basefont',
        'br',
        'col',
        'frame',
        'hr',
        'img',
        'input',
        'isindex',
        'link',
        'meta',
        'param',
        ]

    def __init__(self, encoding):
        self.encoding = encoding
        if _debug:
            sys.stderr.write('entering BaseHTMLProcessor, encoding=%s\n'
                              % self.encoding)
        sgmllib.SGMLParser.__init__(self)

    def reset(self):
        self.pieces = []
        sgmllib.SGMLParser.reset(self)

    def _shorttag_replace(self, match):
        tag = match.group(1)
        if tag in self.elements_no_end_tag:
            return '<' + tag + ' />'
        else:
            return '<' + tag + '></' + tag + '>'

    def feed(self, data):
        data = re.compile(r'<!((?!DOCTYPE|--|\[))',
                          re.IGNORECASE).sub(r'&lt;!\1', data)

        # data = re.sub(r'<(\S+?)\s*?/>', self._shorttag_replace, data) # bug [ 1399464 ] Bad regexp for _shorttag_replace

        data = re.sub(r'<([^<\s]+?)\s*/>', self._shorttag_replace, data)
        data = data.replace('&#39;', "'")
        data = data.replace('&#34;', '"')
        if self.encoding and type(data) == type(u''):
            data = data.encode(self.encoding)
        sgmllib.SGMLParser.feed(self, data)

    def normalize_attrs(self, attrs):

        # utility method to be called by descendants

        attrs = [(k.lower(), v) for (k, v) in attrs]
        attrs = [(k, k in ('rel', 'type') and v.lower() or v) for (k,
                 v) in attrs]
        return attrs

    def unknown_starttag(self, tag, attrs):

        # called for each start tag
        # attrs is a list of (attr, value) tuples
        # e.g. for <pre class='screen'>, tag='pre', attrs=[('class', 'screen')]

        if _debug:
            sys.stderr.write('_BaseHTMLProcessor, unknown_starttag, tag=%s\n'
                              % tag)
        uattrs = []

        # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds

        for (key, value) in attrs:
            if type(value) != type(u''):
                value = unicode(value, self.encoding)
            uattrs.append((unicode(key, self.encoding), value))
        strattrs = u''.join([u' %s="%s"' % (key, value) for (key,
                            value) in uattrs]).encode(self.encoding)
        if tag in self.elements_no_end_tag:
            self.pieces.append('<%(tag)s%(strattrs)s />' % locals())
        else:
            self.pieces.append('<%(tag)s%(strattrs)s>' % locals())

    def unknown_endtag(self, tag):

        # called for each end tag, e.g. for </pre>, tag will be 'pre'
        # Reconstruct the original end tag.

        if tag not in self.elements_no_end_tag:
            self.pieces.append('</%(tag)s>' % locals())

    def handle_charref(self, ref):

        # called for each character reference, e.g. for '&#160;', ref will be '160'
        # Reconstruct the original character reference.

        self.pieces.append('&#%(ref)s;' % locals())

    def handle_entityref(self, ref):

        # called for each entity reference, e.g. for '&copy;', ref will be 'copy'
        # Reconstruct the original entity reference.

        self.pieces.append('&%(ref)s;' % locals())

    def handle_data(self, text):

        # called for each block of plain text, i.e. outside of any tag and
        # not containing any character or entity references
        # Store the original text verbatim.

        if _debug:
            sys.stderr.write('_BaseHTMLProcessor, handle_text, text=%s\n'
                              % text)
        self.pieces.append(text)

    def handle_comment(self, text):

        # called for each HTML comment, e.g. <!-- insert Javascript code here -->
        # Reconstruct the original comment.

        self.pieces.append('<!--%(text)s-->' % locals())

    def handle_pi(self, text):

        # called for each processing instruction, e.g. <?instruction>
        # Reconstruct original processing instruction.

        self.pieces.append('<?%(text)s>' % locals())

    def handle_decl(self, text):

        # called for the DOCTYPE, if present, e.g.
        # <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        #     "http://www.w3.org/TR/html4/loose.dtd">
        # Reconstruct original DOCTYPE

        self.pieces.append('<!%(text)s>' % locals())

    _new_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9:]*\s*'
            ).match

    def _scan_name(self, i, declstartpos):
        rawdata = self.rawdata
        n = len(rawdata)
        if i == n:
            return (None, -1)
        m = self._new_declname_match(rawdata, i)
        if m:
            s = m.group()
            name = s.strip()
            if i + len(s) == n:
                return (None, -1)  # end of buffer
            return (name.lower(), m.end())
        else:
            self.handle_data(rawdata)

#            self.updatepos(declstartpos, i)

            return (None, -1)

    def output(self):
        """Return processed HTML as a single string"""

        return ''.join([str(p) for p in self.pieces])


class _LooseFeedParser(_FeedParserMixin, _BaseHTMLProcessor):

    def __init__(
        self,
        baseuri,
        baselang,
        encoding,
        ):
        sgmllib.SGMLParser.__init__(self)
        _FeedParserMixin.__init__(self, baseuri, baselang, encoding)

    def decodeEntities(self, element, data):
        data = data.replace('&#60;', '&lt;')
        data = data.replace('&#x3c;', '&lt;')
        data = data.replace('&#62;', '&gt;')
        data = data.replace('&#x3e;', '&gt;')
        data = data.replace('&#38;', '&amp;')
        data = data.replace('&#x26;', '&amp;')
        data = data.replace('&#34;', '&quot;')
        data = data.replace('&#x22;', '&quot;')
        data = data.replace('&#39;', '&apos;')
        data = data.replace('&#x27;', '&apos;')
        if self.contentparams.has_key('type')\
             and not self.contentparams.get('type', 'xml'
                ).endswith('xml'):
            data = data.replace('&lt;', '<')
            data = data.replace('&gt;', '>')
            data = data.replace('&amp;', '&')
            data = data.replace('&quot;', '"')
            data = data.replace('&apos;', "'")
        return data


class _RelativeURIResolver(_BaseHTMLProcessor):

    relative_uris = [
        ('a', 'href'),
        ('applet', 'codebase'),
        ('area', 'href'),
        ('blockquote', 'cite'),
        ('body', 'background'),
        ('del', 'cite'),
        ('form', 'action'),
        ('frame', 'longdesc'),
        ('frame', 'src'),
        ('iframe', 'longdesc'),
        ('iframe', 'src'),
        ('head', 'profile'),
        ('img', 'longdesc'),
        ('img', 'src'),
        ('img', 'usemap'),
        ('input', 'src'),
        ('input', 'usemap'),
        ('ins', 'cite'),
        ('link', 'href'),
        ('object', 'classid'),
        ('object', 'codebase'),
        ('object', 'data'),
        ('object', 'usemap'),
        ('q', 'cite'),
        ('script', 'src'),
        ]

    def __init__(self, baseuri, encoding):
        _BaseHTMLProcessor.__init__(self, encoding)
        self.baseuri = baseuri

    def resolveURI(self, uri):
        return _urljoin(self.baseuri, uri)

    def unknown_starttag(self, tag, attrs):
        attrs = self.normalize_attrs(attrs)
        attrs = [(key, (tag, key) in self.relative_uris
                  and self.resolveURI(value) or value) for (key,
                 value) in attrs]
        _BaseHTMLProcessor.unknown_starttag(self, tag, attrs)


def _resolveRelativeURIs(htmlSource, baseURI, encoding):
    if _debug:
        sys.stderr.write('entering _resolveRelativeURIs\n')
    p = _RelativeURIResolver(baseURI, encoding)
    p.feed(htmlSource)
    return p.output()


class _HTMLSanitizer(_BaseHTMLProcessor):

    acceptable_elements = [
        'a',
        'abbr',
        'acronym',
        'address',
        'area',
        'b',
        'big',
        'blockquote',
        'br',
        'button',
        'caption',
        'center',
        'cite',
        'code',
        'col',
        'colgroup',
        'dd',
        'del',
        'dfn',
        'dir',
        'div',
        'dl',
        'dt',
        'em',
        'fieldset',
        'font',
        'form',
        'h1',
        'h2',
        'h3',
        'h4',
        'h5',
        'h6',
        'hr',
        'i',
        'img',
        'input',
        'ins',
        'kbd',
        'label',
        'legend',
        'li',
        'map',
        'menu',
        'ol',
        'optgroup',
        'option',
        'p',
        'pre',
        'q',
        's',
        'samp',
        'select',
        'small',
        'span',
        'strike',
        'strong',
        'sub',
        'sup',
        'table',
        'tbody',
        'td',
        'textarea',
        'tfoot',
        'th',
        'thead',
        'tr',
        'tt',
        'u',
        'ul',
        'var',
        ]

    acceptable_attributes = [
        'abbr',
        'accept',
        'accept-charset',
        'accesskey',
        'action',
        'align',
        'alt',
        'axis',
        'border',
        'cellpadding',
        'cellspacing',
        'char',
        'charoff',
        'charset',
        'checked',
        'cite',
        'class',
        'clear',
        'cols',
        'colspan',
        'color',
        'compact',
        'coords',
        'datetime',
        'dir',
        'disabled',
        'enctype',
        'for',
        'frame',
        'headers',
        'height',
        'href',
        'hreflang',
        'hspace',
        'id',
        'ismap',
        'label',
        'lang',
        'longdesc',
        'maxlength',
        'media',
        'method',
        'multiple',
        'name',
        'nohref',
        'noshade',
        'nowrap',
        'prompt',
        'readonly',
        'rel',
        'rev',
        'rows',
        'rowspan',
        'rules',
        'scope',
        'selected',
        'shape',
        'size',
        'span',
        'src',
        'start',
        'summary',
        'tabindex',
        'target',
        'title',
        'type',
        'usemap',
        'valign',
        'value',
        'vspace',
        'width',
        ]

    unacceptable_elements_with_end_tag = ['script', 'applet']

    def reset(self):
        _BaseHTMLProcessor.reset(self)
        self.unacceptablestack = 0

    def unknown_starttag(self, tag, attrs):
        if not tag in self.acceptable_elements:
            if tag in self.unacceptable_elements_with_end_tag:
                self.unacceptablestack += 1
            return
        attrs = self.normalize_attrs(attrs)
        attrs = [(key, value) for (key, value) in attrs if key
                  in self.acceptable_attributes]
        _BaseHTMLProcessor.unknown_starttag(self, tag, attrs)

    def unknown_endtag(self, tag):
        if not tag in self.acceptable_elements:
            if tag in self.unacceptable_elements_with_end_tag:
                self.unacceptablestack -= 1
            return
        _BaseHTMLProcessor.unknown_endtag(self, tag)

    def handle_pi(self, text):
        pass

    def handle_decl(self, text):
        pass

    def handle_data(self, text):
        if not self.unacceptablestack:
            _BaseHTMLProcessor.handle_data(self, text)


def _sanitizeHTML(htmlSource, encoding):
    p = _HTMLSanitizer(encoding)
    p.feed(htmlSource)
    data = p.output()
    if TIDY_MARKUP:

        # loop through list of preferred Tidy interfaces looking for one that's installed,
        # then set up a common _tidy function to wrap the interface-specific API.

        _tidy = None
        for tidy_interface in PREFERRED_TIDY_INTERFACES:
            try:
                if tidy_interface == 'uTidy':
                    from tidy import parseString as _utidy

                    def _tidy(data, **kwargs):
                        return str(_utidy(data, **kwargs))

                    break
                elif tidy_interface == 'mxTidy':
                    from mx.Tidy import Tidy as _mxtidy

                    def _tidy(data, **kwargs):
                        (nerrors, nwarnings, data, errordata) = \
                            _mxtidy.tidy(data, **kwargs)
                        return data

                    break
            except:
                pass
        if _tidy:
            utf8 = type(data) == type(u'')
            if utf8:
                data = data.encode('utf-8')
            data = _tidy(data, output_xhtml=1, numeric_entities=1,
                         wrap=0, char_encoding='utf8')
            if utf8:
                data = unicode(data, 'utf-8')
            if data.count('<body'):
                data = data.split('<body', 1)[1]
                if data.count('>'):
                    data = data.split('>', 1)[1]
            if data.count('</body'):
                data = data.split('</body', 1)[0]
    data = data.strip().replace('\r\n', '\n')
    return data


class _FeedURLHandler(urllib2.HTTPDigestAuthHandler,
    urllib2.HTTPRedirectHandler, urllib2.HTTPDefaultErrorHandler):

    def http_error_default(
        self,
        req,
        fp,
        code,
        msg,
        headers,
        ):
        if code / 100 == 3 and code != 304:
            return self.http_error_302(req, fp, code, msg, headers)
        infourl = urllib.addinfourl(fp, headers, req.get_full_url())
        infourl.status = code
        return infourl

    def http_error_302(
        self,
        req,
        fp,
        code,
        msg,
        headers,
        ):
        if headers.dict.has_key('location'):
            infourl = urllib2.HTTPRedirectHandler.http_error_302(
                self,
                req,
                fp,
                code,
                msg,
                headers,
                )
        else:
            infourl = urllib.addinfourl(fp, headers, req.get_full_url())
        if not hasattr(infourl, 'status'):
            infourl.status = code
        return infourl

    def http_error_301(
        self,
        req,
        fp,
        code,
        msg,
        headers,
        ):
        if headers.dict.has_key('location'):
            infourl = urllib2.HTTPRedirectHandler.http_error_301(
                self,
                req,
                fp,
                code,
                msg,
                headers,
                )
        else:
            infourl = urllib.addinfourl(fp, headers, req.get_full_url())
        if not hasattr(infourl, 'status'):
            infourl.status = code
        return infourl

    http_error_300 = http_error_302
    http_error_303 = http_error_302
    http_error_307 = http_error_302

    def http_error_401(
        self,
        req,
        fp,
        code,
        msg,
        headers,
        ):

        # Check if
        # - server requires digest auth, AND
        # - we tried (unsuccessfully) with basic auth, AND
        # - we're using Python 2.3.3 or later (digest auth is irreparably broken in earlier versions)
        # If all conditions hold, parse authentication information
        # out of the Authorization header we sent the first time
        # (for the username and password) and the WWW-Authenticate
        # header the server sent back (for the realm) and retry
        # the request with the appropriate digest auth headers instead.
        # This evil genius hack has been brought to you by Aaron Swartz.

        host = urlparse.urlparse(req.get_full_url())[1]
        try:
            assert sys.version.split()[0] >= '2.3.3'
            assert base64 != None
            (user, passw) = \
                base64.decodestring(req.headers['Authorization'
                                    ].split(' ')[1]).split(':')
            realm = re.findall('realm="([^"]*)"',
                               headers['WWW-Authenticate'])[0]
            self.add_password(realm, host, user, passw)
            retry = self.http_error_auth_reqed('www-authenticate',
                    host, req, headers)
            self.reset_retry_count()
            return retry
        except:
            return self.http_error_default(req, fp, code, msg, headers)


def _open_resource(
    url_file_stream_or_string,
    etag,
    modified,
    agent,
    referrer,
    handlers,
    ):
    """URL, filename, or string --> stream

    This function lets you define parsers that take any input source
    (URL, pathname to local or network file, or actual data as a string)
    and deal with it in a uniform manner.  Returned object is guaranteed
    to have all the basic stdio read methods (read, readline, readlines).
    Just .close() the object when you're done with it.

    If the etag argument is supplied, it will be used as the value of an
    If-None-Match request header.

    If the modified argument is supplied, it must be a tuple of 9 integers
    as returned by gmtime() in the standard Python time module. This MUST
    be in GMT (Greenwich Mean Time). The formatted date/time will be used
    as the value of an If-Modified-Since request header.

    If the agent argument is supplied, it will be used as the value of a
    User-Agent request header.

    If the referrer argument is supplied, it will be used as the value of a
    Referer[sic] request header.

    If handlers is supplied, it is a list of handlers used to build a
    urllib2 opener.
    """

    if hasattr(url_file_stream_or_string, 'read'):
        return url_file_stream_or_string

    if url_file_stream_or_string == '-':
        return sys.stdin

    if urlparse.urlparse(url_file_stream_or_string)[0] in ('http',
            'https', 'ftp'):
        if not agent:
            agent = USER_AGENT

        # test for inline user:password for basic auth

        auth = None
        if base64:
            (urltype, rest) = \
                urllib.splittype(url_file_stream_or_string)
            (realhost, rest) = urllib.splithost(rest)
            if realhost:
                (user_passwd, realhost) = urllib.splituser(realhost)
                if user_passwd:
                    url_file_stream_or_string = '%s://%s%s' % (urltype,
                            realhost, rest)
                    auth = base64.encodestring(user_passwd).strip()

        # try to open with urllib2 (to use optional headers)

        request = urllib2.Request(url_file_stream_or_string)
        request.add_header('User-Agent', agent)
        if etag:
            request.add_header('If-None-Match', etag)
        if modified:

            # format into an RFC 1123-compliant timestamp. We can't use
            # time.strftime() since the %a and %b directives can be affected
            # by the current locale, but RFC 2616 states that dates must be
            # in English.

            short_weekdays = [
                'Mon',
                'Tue',
                'Wed',
                'Thu',
                'Fri',
                'Sat',
                'Sun',
                ]
            months = [
                'Jan',
                'Feb',
                'Mar',
                'Apr',
                'May',
                'Jun',
                'Jul',
                'Aug',
                'Sep',
                'Oct',
                'Nov',
                'Dec',
                ]
            request.add_header('If-Modified-Since',
                               '%s, %02d %s %04d %02d:%02d:%02d GMT' % (
                short_weekdays[modified[6]],
                modified[2],
                months[modified[1] - 1],
                modified[0],
                modified[3],
                modified[4],
                modified[5],
                ))
        if referrer:
            request.add_header('Referer', referrer)
        if gzip and zlib:
            request.add_header('Accept-encoding', 'gzip, deflate')
        elif gzip:
            request.add_header('Accept-encoding', 'gzip')
        elif zlib:
            request.add_header('Accept-encoding', 'deflate')
        else:
            request.add_header('Accept-encoding', '')
        if auth:
            request.add_header('Authorization', 'Basic %s' % auth)
        if ACCEPT_HEADER:
            request.add_header('Accept', ACCEPT_HEADER)
        request.add_header('A-IM', 'feed')  # RFC 3229 support
        opener = apply(urllib2.build_opener, tuple([_FeedURLHandler()]
                        + handlers))
        opener.addheaders = []  # RMK - must clear so we only send our custom User-Agent
        try:
            return opener.open(request)
        finally:
            opener.close()  # JohnD

    # try to open with native open function (if url_file_stream_or_string is a filename)

    try:
        return open(url_file_stream_or_string)
    except:
        pass

    # treat url_file_stream_or_string as string

    return _StringIO(str(url_file_stream_or_string))


_date_handlers = []


def registerDateHandler(func):
    """Register a date handler function (takes string, returns 9-tuple date in GMT)"""

    _date_handlers.insert(0, func)


# ISO-8601 date parsing routines written by Fazal Majid.
# The ISO 8601 standard is very convoluted and irregular - a full ISO 8601
# parser is beyond the scope of feedparser and would be a worthwhile addition
# to the Python library.
# A single regular expression cannot parse ISO 8601 date formats into groups
# as the standard is highly irregular (for instance is 030104 2003-01-04 or
# 0301-04-01), so we use templates instead.
# Please note the order in templates is significant because we need a
# greedy match.

_iso8601_tmpl = [
    'YYYY-?MM-?DD',
    'YYYY-MM',
    'YYYY-?OOO',
    'YY-?MM-?DD',
    'YY-?OOO',
    'YYYY',
    '-YY-?MM',
    '-OOO',
    '-YY',
    '--MM-?DD',
    '--MM',
    '---DD',
    'CC',
    '',
    ]
_iso8601_re = [tmpl.replace('YYYY', r'(?P<year>\d{4})').replace('YY',
               r'(?P<year>\d\d)').replace('MM', r'(?P<month>[01]\d)'
               ).replace('DD', r'(?P<day>[0123]\d)').replace('OOO',
               r'(?P<ordinal>[0123]\d\d)').replace('CC',
               r'(?P<century>\d\d$)')
                + r'(T?(?P<hour>\d{2}):(?P<minute>\d{2})'
                + r'(:(?P<second>\d{2}))?'
                + r'(?P<tz>[+-](?P<tzhour>\d{2})(:(?P<tzmin>\d{2}))?|Z)?)?'
                for tmpl in _iso8601_tmpl]
del tmpl
_iso8601_matches = [re.compile(regex).match for regex in _iso8601_re]
del regex


def _parse_date_iso8601(dateString):
    """Parse a variety of ISO-8601-compatible formats like 20040105"""

    m = None
    for _iso8601_match in _iso8601_matches:
        m = _iso8601_match(dateString)
        if m:
            break
    if not m:
        return
    if m.span() == (0, 0):
        return
    params = m.groupdict()
    ordinal = params.get('ordinal', 0)
    if ordinal:
        ordinal = int(ordinal)
    else:
        ordinal = 0
    year = params.get('year', '--')
    if not year or year == '--':
        year = time.gmtime()[0]
    elif len(year) == 2:

        # ISO 8601 assumes current century, i.e. 93 -> 2093, NOT 1993

        year = 100 * int(time.gmtime()[0] / 100) + int(year)
    else:
        year = int(year)
    month = params.get('month', '-')
    if not month or month == '-':

        # ordinals are NOT normalized by mktime, we simulate them
        # by setting month=1, day=ordinal

        if ordinal:
            month = 1
        else:
            month = time.gmtime()[1]
    month = int(month)
    day = params.get('day', 0)
    if not day:

        # see above

        if ordinal:
            day = ordinal
        elif params.get('century', 0) or params.get('year', 0)\
             or params.get('month', 0):
            day = 1
        else:
            day = time.gmtime()[2]
    else:
        day = int(day)

    # special case of the century - is the first year of the 21st century
    # 2000 or 2001 ? The debate goes on...

    if 'century' in params.keys():
        year = (int(params['century']) - 1) * 100 + 1

    # in ISO 8601 most fields are optional

    for field in ['hour', 'minute', 'second', 'tzhour', 'tzmin']:
        if not params.get(field, None):
            params[field] = 0
    hour = int(params.get('hour', 0))
    minute = int(params.get('minute', 0))
    second = int(params.get('second', 0))

    # weekday is normalized by mktime(), we can ignore it

    weekday = 0

    # daylight savings is complex, but not needed for feedparser's purposes
    # as time zones, if specified, include mention of whether it is active
    # (e.g. PST vs. PDT, CET). Using -1 is implementation-dependent and
    # and most implementations have DST bugs

    daylight_savings_flag = 0
    tm = [
        year,
        month,
        day,
        hour,
        minute,
        second,
        weekday,
        ordinal,
        daylight_savings_flag,
        ]

    # ISO 8601 time zone adjustments

    tz = params.get('tz')
    if tz and tz != 'Z':
        if tz[0] == '-':
            tm[3] += int(params.get('tzhour', 0))
            tm[4] += int(params.get('tzmin', 0))
        elif tz[0] == '+':
            tm[3] -= int(params.get('tzhour', 0))
            tm[4] -= int(params.get('tzmin', 0))
        else:
            return None

    # Python's time.mktime() is a wrapper around the ANSI C mktime(3c)
    # which is guaranteed to normalize d/m/y/h/m/s.
    # Many implementations have bugs, but we'll pretend they don't.

    return time.localtime(time.mktime(tm))


registerDateHandler(_parse_date_iso8601)

# 8-bit date handling routines written by ytrewq1.

_korean_year = u'\ub144'  # b3e2 in euc-kr
_korean_month = u'\uc6d4'  # bff9 in euc-kr
_korean_day = u'\uc77c'  # c0cf in euc-kr
_korean_am = u'\uc624\uc804'  # bfc0 c0fc in euc-kr
_korean_pm = u'\uc624\ud6c4'  # bfc0 c8c4 in euc-kr

_korean_onblog_date_re = \
    re.compile('(\d{4})%s\s+(\d{2})%s\s+(\d{2})%s\s+(\d{2}):(\d{2}):(\d{2})'
                % (_korean_year, _korean_month, _korean_day))
_korean_nate_date_re = \
    re.compile(u'(\d{4})-(\d{2})-(\d{2})\s+(%s|%s)\s+(\d{,2}):(\d{,2}):(\d{,2})'
                % (_korean_am, _korean_pm))


def _parse_date_onblog(dateString):
    """Parse a string according to the OnBlog 8-bit date format"""

    m = _korean_onblog_date_re.match(dateString)
    if not m:
        return
    w3dtfdate = \
        '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s'\
         % {
        'year': m.group(1),
        'month': m.group(2),
        'day': m.group(3),
        'hour': m.group(4),
        'minute': m.group(5),
        'second': m.group(6),
        'zonediff': '+09:00',
        }
    if _debug:
        sys.stderr.write('OnBlog date parsed as: %s\n' % w3dtfdate)
    return _parse_date_w3dtf(w3dtfdate)


registerDateHandler(_parse_date_onblog)


def _parse_date_nate(dateString):
    """Parse a string according to the Nate 8-bit date format"""

    m = _korean_nate_date_re.match(dateString)
    if not m:
        return
    hour = int(m.group(5))
    ampm = m.group(4)
    if ampm == _korean_pm:
        hour += 12
    hour = str(hour)
    if len(hour) == 1:
        hour = '0' + hour
    w3dtfdate = \
        '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s'\
         % {
        'year': m.group(1),
        'month': m.group(2),
        'day': m.group(3),
        'hour': hour,
        'minute': m.group(6),
        'second': m.group(7),
        'zonediff': '+09:00',
        }
    if _debug:
        sys.stderr.write('Nate date parsed as: %s\n' % w3dtfdate)
    return _parse_date_w3dtf(w3dtfdate)


registerDateHandler(_parse_date_nate)

_mssql_date_re = \
    re.compile('(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})(\.\d+)?'
               )


def _parse_date_mssql(dateString):
    """Parse a string according to the MS SQL date format"""

    m = _mssql_date_re.match(dateString)
    if not m:
        return
    w3dtfdate = \
        '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s'\
         % {
        'year': m.group(1),
        'month': m.group(2),
        'day': m.group(3),
        'hour': m.group(4),
        'minute': m.group(5),
        'second': m.group(6),
        'zonediff': '+09:00',
        }
    if _debug:
        sys.stderr.write('MS SQL date parsed as: %s\n' % w3dtfdate)
    return _parse_date_w3dtf(w3dtfdate)


registerDateHandler(_parse_date_mssql)

# Unicode strings for Greek date strings

_greek_months = {
    u'\u0399\u03b1\u03bd': u'Jan',
    u'\u03a6\u03b5\u03b2': u'Feb',
    u'\u039c\u03ac\u03ce': u'Mar',
    u'\u039c\u03b1\u03ce': u'Mar',
    u'\u0391\u03c0\u03c1': u'Apr',
    u'\u039c\u03ac\u03b9': u'May',
    u'\u039c\u03b1\u03ca': u'May',
    u'\u039c\u03b1\u03b9': u'May',
    u'\u0399\u03bf\u03cd\u03bd': u'Jun',
    u'\u0399\u03bf\u03bd': u'Jun',
    u'\u0399\u03bf\u03cd\u03bb': u'Jul',
    u'\u0399\u03bf\u03bb': u'Jul',
    u'\u0391\u03cd\u03b3': u'Aug',
    u'\u0391\u03c5\u03b3': u'Aug',
    u'\u03a3\u03b5\u03c0': u'Sep',
    u'\u039f\u03ba\u03c4': u'Oct',
    u'\u039d\u03bf\u03ad': u'Nov',
    u'\u039d\u03bf\u03b5': u'Nov',
    u'\u0394\u03b5\u03ba': u'Dec',
    }

_greek_wdays = {
    u'\u039a\u03c5\u03c1': u'Sun',
    u'\u0394\u03b5\u03c5': u'Mon',
    u'\u03a4\u03c1\u03b9': u'Tue',
    u'\u03a4\u03b5\u03c4': u'Wed',
    u'\u03a0\u03b5\u03bc': u'Thu',
    u'\u03a0\u03b1\u03c1': u'Fri',
    u'\u03a3\u03b1\u03b2': u'Sat',
    }

_greek_date_format_re = \
    re.compile(u'([^,]+),\s+(\d{2})\s+([^\s]+)\s+(\d{4})\s+(\d{2}):(\d{2}):(\d{2})\s+([^\s]+)'
               )


def _parse_date_greek(dateString):
    """Parse a string according to a Greek 8-bit date format."""

    m = _greek_date_format_re.match(dateString)
    if not m:
        return
    try:
        wday = _greek_wdays[m.group(1)]
        month = _greek_months[m.group(3)]
    except:
        return
    rfc822date = \
        '%(wday)s, %(day)s %(month)s %(year)s %(hour)s:%(minute)s:%(second)s %(zonediff)s'\
         % {
        'wday': wday,
        'day': m.group(2),
        'month': month,
        'year': m.group(4),
        'hour': m.group(5),
        'minute': m.group(6),
        'second': m.group(7),
        'zonediff': m.group(8),
        }
    if _debug:
        sys.stderr.write('Greek date parsed as: %s\n' % rfc822date)
    return _parse_date_rfc822(rfc822date)


registerDateHandler(_parse_date_greek)

# Unicode strings for Hungarian date strings

_hungarian_months = {
    u'janu\u00e1r': u'01',
    u'febru\u00e1ri': u'02',
    u'm\u00e1rcius': u'03',
    u'\u00e1prilis': u'04',
    u'm\u00e1ujus': u'05',
    u'j\u00fanius': u'06',
    u'j\u00falius': u'07',
    u'augusztus': u'08',
    u'szeptember': u'09',
    u'okt\u00f3ber': u'10',
    u'november': u'11',
    u'december': u'12',
    }

_hungarian_date_format_re = \
    re.compile(u'(\d{4})-([^-]+)-(\d{,2})T(\d{,2}):(\d{2})((\+|-)(\d{,2}:\d{2}))'
               )


def _parse_date_hungarian(dateString):
    """Parse a string according to a Hungarian 8-bit date format."""

    m = _hungarian_date_format_re.match(dateString)
    if not m:
        return
    try:
        month = _hungarian_months[m.group(2)]
        day = m.group(3)
        if len(day) == 1:
            day = '0' + day
        hour = m.group(4)
        if len(hour) == 1:
            hour = '0' + hour
    except:
        return
    w3dtfdate = \
        '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s%(zonediff)s' % {
        'year': m.group(1),
        'month': month,
        'day': day,
        'hour': hour,
        'minute': m.group(5),
        'zonediff': m.group(6),
        }
    if _debug:
        sys.stderr.write('Hungarian date parsed as: %s\n' % w3dtfdate)
    return _parse_date_w3dtf(w3dtfdate)


registerDateHandler(_parse_date_hungarian)

# W3DTF-style date parsing adapted from PyXML xml.utils.iso8601, written by
# Drake and licensed under the Python license.  Removed all range checking
# for month, day, hour, minute, and second, since mktime will normalize
# these later


def _parse_date_w3dtf(dateString):

    def __extract_date(m):
        year = int(m.group('year'))
        if year < 100:
            year = 100 * int(time.gmtime()[0] / 100) + int(year)
        if year < 1000:
            return (0, 0, 0)
        julian = m.group('julian')
        if julian:
            julian = int(julian)
            month = julian / 30 + 1
            day = julian % 30 + 1
            jday = None
            while jday != julian:
                t = time.mktime((
                    year,
                    month,
                    day,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    ))
                jday = time.gmtime(t)[-2]
                diff = abs(jday - julian)
                if jday > julian:
                    if diff < day:
                        day = day - diff
                    else:
                        month = month - 1
                        day = 31
                elif jday < julian:
                    if day + diff < 28:
                        day = day + diff
                    else:
                        month = month + 1
            return (year, month, day)
        month = m.group('month')
        day = 1
        if month is None:
            month = 1
        else:
            month = int(month)
            day = m.group('day')
            if day:
                day = int(day)
            else:
                day = 1
        return (year, month, day)

    def __extract_time(m):
        if not m:
            return (0, 0, 0)
        hours = m.group('hours')
        if not hours:
            return (0, 0, 0)
        hours = int(hours)
        minutes = int(m.group('minutes'))
        seconds = m.group('seconds')
        if seconds:
            seconds = int(seconds)
        else:
            seconds = 0
        return (hours, minutes, seconds)

    def __extract_tzd(m):
        """Return the Time Zone Designator as an offset in seconds from UTC."""

        if not m:
            return 0
        tzd = m.group('tzd')
        if not tzd:
            return 0
        if tzd == 'Z':
            return 0
        hours = int(m.group('tzdhours'))
        minutes = m.group('tzdminutes')
        if minutes:
            minutes = int(minutes)
        else:
            minutes = 0
        offset = (hours * 60 + minutes) * 60
        if tzd[0] == '+':
            return -offset
        return offset

    __date_re = \
        '(?P<year>\\d\\d\\d\\d)(?:(?P<dsep>-|)(?:(?P<julian>\\d\\d\\d)|(?P<month>\\d\\d)(?:(?P=dsep)(?P<day>\\d\\d))?))?'

    __tzd_re = \
        '(?P<tzd>[-+](?P<tzdhours>\d\d)(?::?(?P<tzdminutes>\d\d))|Z)'
    __tzd_rx = re.compile(__tzd_re)
    __time_re = \
        '(?P<hours>\\d\\d)(?P<tsep>:|)(?P<minutes>\\d\\d)(?:(?P=tsep)(?P<seconds>\\d\\d(?:[.,]\\d+)?))?'\
         + __tzd_re
    __datetime_re = '%s(?:T%s)?' % (__date_re, __time_re)
    __datetime_rx = re.compile(__datetime_re)
    m = __datetime_rx.match(dateString)
    if m is None or m.group() != dateString:
        return
    gmt = __extract_date(m) + __extract_time(m) + (0, 0, 0)
    if gmt[0] == 0:
        return
    return time.gmtime((time.mktime(gmt) + __extract_tzd(m))
                        - time.timezone)


registerDateHandler(_parse_date_w3dtf)


def _parse_date_rfc822(dateString):
    """Parse an RFC822, RFC1123, RFC2822, or asctime-style date"""

    data = dateString.split()
    if data[0][-1] in (',', '.') or data[0].lower() in rfc822._daynames:
        del data[0]
    if len(data) == 4:
        s = data[3]
        i = s.find('+')
        if i > 0:
            data[3:] = [s[:i], s[i + 1:]]
        else:
            data.append('')
        dateString = ' '.join(data)
    if len(data) < 5:
        dateString += ' 00:00:00 GMT'
    tm = rfc822.parsedate_tz(dateString)
    if tm:
        return time.gmtime(rfc822.mktime_tz(tm))


# rfc822.py defines several time zones, but we define some extra ones.
# 'ET' is equivalent to 'EST', etc.

_additional_timezones = {
    'AT': -400,
    'ET': -500,
    'CT': -600,
    'MT': -700,
    'PT': -800,
    }
rfc822._timezones.update(_additional_timezones)
registerDateHandler(_parse_date_rfc822)


def _parse_date(dateString):
    """Parses a variety of date formats into a 9-tuple in GMT"""

    for handler in _date_handlers:
        try:
            date9tuple = handler(dateString)
            if not date9tuple:
                continue
            if len(date9tuple) != 9:
                if _debug:
                    sys.stderr.write('date handler function must return 9-tuple\n'
                            )
                raise ValueError, 'date handler function must return 9-tuple'
            map(int, date9tuple)
            return date9tuple
        except Exception, e:
            if _debug:
                sys.stderr.write('%s raised %s\n' % (handler.__name__,
                                 repr(e)))
            pass
    return None


def _getCharacterEncoding(http_headers, xml_data):
    """Get the character encoding of the XML document

    http_headers is a dictionary
    xml_data is a raw string (not Unicode)

    This is so much trickier than it sounds, it's not even funny.
    According to RFC 3023 ('XML Media Types'), if the HTTP Content-Type
    is application/xml, application/*+xml,
    application/xml-external-parsed-entity, or application/xml-dtd,
    the encoding given in the charset parameter of the HTTP Content-Type
    takes precedence over the encoding given in the XML prefix within the
    document, and defaults to 'utf-8' if neither are specified.  But, if
    the HTTP Content-Type is text/xml, text/*+xml, or
    text/xml-external-parsed-entity, the encoding given in the XML prefix
    within the document is ALWAYS IGNORED and only the encoding given in
    the charset parameter of the HTTP Content-Type header should be
    respected, and it defaults to 'us-ascii' if not specified.

    Furthermore, discussion on the atom-syntax mailing list with the
    author of RFC 3023 leads me to the conclusion that any document
    served with a Content-Type of text/* and no charset parameter
    must be treated as us-ascii.  (We now do this.)  And also that it
    must always be flagged as non-well-formed.  (We now do this too.)

    If Content-Type is unspecified (input was local file or non-HTTP source)
    or unrecognized (server just got it totally wrong), then go by the
    encoding given in the XML prefix of the document and default to
    'iso-8859-1' as per the HTTP specification (RFC 2616).

    Then, assuming we didn't find a character encoding in the HTTP headers
    (and the HTTP Content-type allowed us to look in the body), we need
    to sniff the first few bytes of the XML data and try to determine
    whether the encoding is ASCII-compatible.  Section F of the XML
    specification shows the way here:
    http://www.w3.org/TR/REC-xml/#sec-guessing-no-ext-info

    If the sniffed encoding is not ASCII-compatible, we need to make it
    ASCII compatible so that we can sniff further into the XML declaration
    to find the encoding attribute, which will tell us the true encoding.

    Of course, none of this guarantees that we will be able to parse the
    feed in the declared character encoding (assuming it was declared
    correctly, which many are not).  CJKCodecs and iconv_codec help a lot;
    you should definitely install them if you can.
    http://cjkpython.i18n.org/
    """

    def _parseHTTPContentType(content_type):
        """takes HTTP Content-Type header and returns (content type, charset)

        If no charset is specified, returns (content type, '')
        If no content type is specified, returns ('', '')
        Both return parameters are guaranteed to be lowercase strings
        """

        content_type = content_type or ''
        (content_type, params) = cgi.parse_header(content_type)
        return (content_type, params.get('charset', '').replace("'", ''
                ))

    sniffed_xml_encoding = ''
    xml_encoding = ''
    true_encoding = ''
    (http_content_type, http_encoding) = \
        _parseHTTPContentType(http_headers.get('content-type'))

    # Must sniff for non-ASCII-compatible character encodings before
    # searching for XML declaration.  This heuristic is defined in
    # section F of the XML specification:
    # http://www.w3.org/TR/REC-xml/#sec-guessing-no-ext-info

    try:
        if xml_data[:4] == '\x4c\x6f\xa7\x94':

            # EBCDIC

            xml_data = _ebcdic_to_ascii(xml_data)
        elif xml_data[:4] == '\x00\x3c\x00\x3f':

            # UTF-16BE

            sniffed_xml_encoding = 'utf-16be'
            xml_data = unicode(xml_data, 'utf-16be').encode('utf-8')
        elif len(xml_data) >= 4 and xml_data[:2] == '\xfe\xff'\
             and xml_data[2:4] != '\x00\x00':

            # UTF-16BE with BOM

            sniffed_xml_encoding = 'utf-16be'
            xml_data = unicode(xml_data[2:], 'utf-16be').encode('utf-8')
        elif xml_data[:4] == '\x3c\x00\x3f\x00':

            # UTF-16LE

            sniffed_xml_encoding = 'utf-16le'
            xml_data = unicode(xml_data, 'utf-16le').encode('utf-8')
        elif len(xml_data) >= 4 and xml_data[:2] == '\xff\xfe'\
             and xml_data[2:4] != '\x00\x00':

            # UTF-16LE with BOM

            sniffed_xml_encoding = 'utf-16le'
            xml_data = unicode(xml_data[2:], 'utf-16le').encode('utf-8')
        elif xml_data[:4] == '\x00\x00\x00\x3c':

            # UTF-32BE

            sniffed_xml_encoding = 'utf-32be'
            xml_data = unicode(xml_data, 'utf-32be').encode('utf-8')
        elif xml_data[:4] == '\x3c\x00\x00\x00':

            # UTF-32LE

            sniffed_xml_encoding = 'utf-32le'
            xml_data = unicode(xml_data, 'utf-32le').encode('utf-8')
        elif xml_data[:4] == '\x00\x00\xfe\xff':

            # UTF-32BE with BOM

            sniffed_xml_encoding = 'utf-32be'
            xml_data = unicode(xml_data[4:], 'utf-32be').encode('utf-8')
        elif xml_data[:4] == '\xff\xfe\x00\x00':

            # UTF-32LE with BOM

            sniffed_xml_encoding = 'utf-32le'
            xml_data = unicode(xml_data[4:], 'utf-32le').encode('utf-8')
        elif xml_data[:3] == '\xef\xbb\xbf':

            # UTF-8 with BOM

            sniffed_xml_encoding = 'utf-8'
            xml_data = unicode(xml_data[3:], 'utf-8').encode('utf-8')
        else:

            # ASCII-compatible

            pass
        xml_encoding_match = \
            re.compile('^<\?.*encoding=[\'"](.*?)[\'"].*\?>'
                       ).match(xml_data)
    except:
        xml_encoding_match = None
    if xml_encoding_match:
        xml_encoding = xml_encoding_match.groups()[0].lower()
        if sniffed_xml_encoding and xml_encoding in (
            'iso-10646-ucs-2',
            'ucs-2',
            'csunicode',
            'iso-10646-ucs-4',
            'ucs-4',
            'csucs4',
            'utf-16',
            'utf-32',
            'utf_16',
            'utf_32',
            'utf16',
            'u16',
            ):
            xml_encoding = sniffed_xml_encoding
    acceptable_content_type = 0
    application_content_types = ('application/xml',
                                 'application/xml-dtd',
                                 'application/xml-external-parsed-entity'
                                 )
    text_content_types = ('text/xml', 'text/xml-external-parsed-entity')
    if http_content_type in application_content_types\
         or http_content_type.startswith('application/')\
         and http_content_type.endswith('+xml'):
        acceptable_content_type = 1
        true_encoding = http_encoding or xml_encoding or 'utf-8'
    elif http_content_type in text_content_types\
         or http_content_type.startswith('text/')\
         and http_content_type.endswith('+xml'):
        acceptable_content_type = 1
        true_encoding = http_encoding or 'us-ascii'
    elif http_content_type.startswith('text/'):
        true_encoding = http_encoding or 'us-ascii'
    elif http_headers and not http_headers.has_key('content-type'):
        true_encoding = xml_encoding or 'iso-8859-1'
    else:
        true_encoding = xml_encoding or 'utf-8'
    return (true_encoding, http_encoding, xml_encoding,
            sniffed_xml_encoding, acceptable_content_type)


def _toUTF8(data, encoding):
    """Changes an XML data stream on the fly to specify a new encoding

    data is a raw sequence of bytes (not Unicode) that is presumed to be in %encoding already
    encoding is a string recognized by encodings.aliases
    """

    if _debug:
        sys.stderr.write('entering _toUTF8, trying encoding %s\n'
                          % encoding)

    # strip Byte Order Mark (if present)

    if len(data) >= 4 and data[:2] == '\xfe\xff' and data[2:4]\
         != '\x00\x00':
        if _debug:
            sys.stderr.write('stripping BOM\n')
            if encoding != 'utf-16be':
                sys.stderr.write('trying utf-16be instead\n')
        encoding = 'utf-16be'
        data = data[2:]
    elif len(data) >= 4 and data[:2] == '\xff\xfe' and data[2:4]\
         != '\x00\x00':
        if _debug:
            sys.stderr.write('stripping BOM\n')
            if encoding != 'utf-16le':
                sys.stderr.write('trying utf-16le instead\n')
        encoding = 'utf-16le'
        data = data[2:]
    elif data[:3] == '\xef\xbb\xbf':
        if _debug:
            sys.stderr.write('stripping BOM\n')
            if encoding != 'utf-8':
                sys.stderr.write('trying utf-8 instead\n')
        encoding = 'utf-8'
        data = data[3:]
    elif data[:4] == '\x00\x00\xfe\xff':
        if _debug:
            sys.stderr.write('stripping BOM\n')
            if encoding != 'utf-32be':
                sys.stderr.write('trying utf-32be instead\n')
        encoding = 'utf-32be'
        data = data[4:]
    elif data[:4] == '\xff\xfe\x00\x00':
        if _debug:
            sys.stderr.write('stripping BOM\n')
            if encoding != 'utf-32le':
                sys.stderr.write('trying utf-32le instead\n')
        encoding = 'utf-32le'
        data = data[4:]
    newdata = unicode(data, encoding)
    if _debug:
        sys.stderr.write('successfully converted %s data to unicode\n'
                          % encoding)
    declmatch = re.compile('^<\?xml[^>]*?>')
    newdecl = '''<?xml version='1.0' encoding='utf-8'?>'''
    if declmatch.search(newdata):
        newdata = declmatch.sub(newdecl, newdata)
    else:
        newdata = newdecl + u'\n' + newdata
    return newdata.encode('utf-8')


def _stripDoctype(data):
    """Strips DOCTYPE from XML document, returns (rss_version, stripped_data)

    rss_version may be 'rss091n' or None
    stripped_data is the same XML document, minus the DOCTYPE
    """

    entity_pattern = re.compile(r'<!ENTITY([^>]*?)>', re.MULTILINE)
    data = entity_pattern.sub('', data)
    doctype_pattern = re.compile(r'<!DOCTYPE([^>]*?)>', re.MULTILINE)
    doctype_results = doctype_pattern.findall(data)
    doctype = doctype_results and doctype_results[0] or ''
    if doctype.lower().count('netscape'):
        version = 'rss091n'
    else:
        version = None
    data = doctype_pattern.sub('', data)
    return (version, data)


def parse(
    url_file_stream_or_string,
    etag=None,
    modified=None,
    agent=None,
    referrer=None,
    handlers=[],
    ):
    """Parse a feed from a URL, file, stream, or string"""

    result = FeedParserDict()
    result['feed'] = FeedParserDict()
    result['entries'] = []
    if _XML_AVAILABLE:
        result['bozo'] = 0
    if type(handlers) == types.InstanceType:
        handlers = [handlers]
    try:
        f = _open_resource(
            url_file_stream_or_string,
            etag,
            modified,
            agent,
            referrer,
            handlers,
            )
        data = f.read()
    except Exception, e:
        result['bozo'] = 1
        result['bozo_exception'] = e
        data = ''
        f = None

    # if feed is gzip-compressed, decompress it

    if f and data and hasattr(f, 'headers'):
        if gzip and f.headers.get('content-encoding', '') == 'gzip':
            try:
                data = gzip.GzipFile(fileobj=_StringIO(data)).read()
            except Exception, e:

                # Some feeds claim to be gzipped but they're not, so
                # we get garbage.  Ideally, we should re-request the
                # feed without the 'Accept-encoding: gzip' header,
                # but we don't.

                result['bozo'] = 1
                result['bozo_exception'] = e
                data = ''
        elif zlib and f.headers.get('content-encoding', '')\
             == 'deflate':
            try:
                data = zlib.decompress(data, -zlib.MAX_WBITS)
            except Exception, e:
                result['bozo'] = 1
                result['bozo_exception'] = e
                data = ''

    # save HTTP headers

    if hasattr(f, 'info'):
        info = f.info()
        result['etag'] = info.getheader('ETag')
        last_modified = info.getheader('Last-Modified')
        if last_modified:
            result['modified'] = _parse_date(last_modified)
    if hasattr(f, 'url'):
        result['href'] = f.url
        result['status'] = 200
    if hasattr(f, 'status'):
        result['status'] = f.status
    if hasattr(f, 'headers'):
        result['headers'] = f.headers.dict
    if hasattr(f, 'close'):
        f.close()

    # there are four encodings to keep track of:
    # - http_encoding is the encoding declared in the Content-Type HTTP header
    # - xml_encoding is the encoding declared in the <?xml declaration
    # - sniffed_encoding is the encoding sniffed from the first 4 bytes of the XML data
    # - result['encoding'] is the actual encoding, as per RFC 3023 and a variety of other conflicting specifications

    http_headers = result.get('headers', {})
    (result['encoding'], http_encoding, xml_encoding,
     sniffed_xml_encoding, acceptable_content_type) = \
        _getCharacterEncoding(http_headers, data)
    if http_headers and not acceptable_content_type:
        if http_headers.has_key('content-type'):
            bozo_message = '%s is not an XML media type'\
                 % http_headers['content-type']
        else:
            bozo_message = 'no Content-type specified'
        result['bozo'] = 1
        result['bozo_exception'] = NonXMLContentType(bozo_message)

    (result['version'], data) = _stripDoctype(data)

    baseuri = http_headers.get('content-location', result.get('href'))
    baselang = http_headers.get('content-language', None)

    # if server sent 304, we're done

    if result.get('status', 0) == 304:
        result['version'] = ''
        result['debug_message'] = \
            'The feed has not changed since you last checked, '\
             + 'so the server sent no data.  This is a feature, not a bug!'
        return result

    # if there was a problem downloading, we're done

    if not data:
        return result

    # determine character encoding

    use_strict_parser = 0
    known_encoding = 0
    tried_encodings = []

    # try: HTTP encoding, declared XML encoding, encoding sniffed from BOM

    for proposed_encoding in (result['encoding'], xml_encoding,
                              sniffed_xml_encoding):
        if not proposed_encoding:
            continue
        if proposed_encoding in tried_encodings:
            continue
        tried_encodings.append(proposed_encoding)
        try:
            data = _toUTF8(data, proposed_encoding)
            known_encoding = use_strict_parser = 1
            break
        except:
            pass

    # if no luck and we have auto-detection library, try that

    if not known_encoding and chardet:
        try:
            proposed_encoding = chardet.detect(data)['encoding']
            if proposed_encoding and proposed_encoding\
                 not in tried_encodings:
                tried_encodings.append(proposed_encoding)
                data = _toUTF8(data, proposed_encoding)
                known_encoding = use_strict_parser = 1
        except:
            pass

    # if still no luck and we haven't tried utf-8 yet, try that

    if not known_encoding and 'utf-8' not in tried_encodings:
        try:
            proposed_encoding = 'utf-8'
            tried_encodings.append(proposed_encoding)
            data = _toUTF8(data, proposed_encoding)
            known_encoding = use_strict_parser = 1
        except:
            pass

    # if still no luck and we haven't tried windows-1252 yet, try that

    if not known_encoding and 'windows-1252' not in tried_encodings:
        try:
            proposed_encoding = 'windows-1252'
            tried_encodings.append(proposed_encoding)
            data = _toUTF8(data, proposed_encoding)
            known_encoding = use_strict_parser = 1
        except:
            pass

    # if still no luck, give up

    if not known_encoding:
        result['bozo'] = 1
        result['bozo_exception'] = \
            CharacterEncodingUnknown('document encoding unknown, I tried '
                 + '%s, %s, utf-8, and windows-1252 but nothing worked'
                 % (result['encoding'], xml_encoding))
        result['encoding'] = ''
    elif proposed_encoding != result['encoding']:
        result['bozo'] = 1
        result['bozo_exception'] = \
            CharacterEncodingOverride('documented declared as %s, but parsed as %s'
                 % (result['encoding'], proposed_encoding))
        result['encoding'] = proposed_encoding

    if not _XML_AVAILABLE:
        use_strict_parser = 0
    if use_strict_parser:

        # initialize the SAX parser

        feedparser = _StrictFeedParser(baseuri, baselang, 'utf-8')
        saxparser = xml.sax.make_parser(PREFERRED_XML_PARSERS)
        saxparser.setFeature(xml.sax.handler.feature_namespaces, 1)
        saxparser.setContentHandler(feedparser)
        saxparser.setErrorHandler(feedparser)
        source = xml.sax.xmlreader.InputSource()
        source.setByteStream(_StringIO(data))
        if hasattr(saxparser, '_ns_stack'):

            # work around bug in built-in SAX parser (doesn't recognize xml: namespace)
            # PyXML doesn't have this problem, and it doesn't have _ns_stack either

            saxparser._ns_stack.append({'http://www.w3.org/XML/1998/namespace'
                    : 'xml'})
        try:
            saxparser.parse(source)
        except Exception, e:
            if _debug:
                import traceback
                traceback.print_stack()
                traceback.print_exc()
                sys.stderr.write('xml parsing failed\n')
            result['bozo'] = 1
            result['bozo_exception'] = feedparser.exc or e
            use_strict_parser = 0
    if not use_strict_parser:
        feedparser = _LooseFeedParser(baseuri, baselang, known_encoding
                 and 'utf-8' or '')
        feedparser.feed(data)
    result['feed'] = feedparser.feeddata
    result['entries'] = feedparser.entries
    result['version'] = result['version'] or feedparser.version
    result['namespaces'] = feedparser.namespacesInUse
    return result


if __name__ == '__main__':
    if not sys.argv[1:]:
        print __doc__
        sys.exit(0)
    else:
        urls = sys.argv[1:]
    zopeCompatibilityHack()
    from pprint import pprint
    for url in urls:
        print url
        print
        result = parse(url)
        pprint(result)
        print

# REVISION HISTORY
# 1.0 - 9/27/2002 - MAP - fixed namespace processing on prefixed RSS 2.0 elements,
#  added Simon Fell's test suite
# 1.1 - 9/29/2002 - MAP - fixed infinite loop on incomplete CDATA sections
# 2.0 - 10/19/2002
#  JD - use inchannel to watch out for image and textinput elements which can
#  also contain title, link, and description elements
#  JD - check for isPermaLink='false' attribute on guid elements
#  JD - replaced openAnything with open_resource supporting ETag and
#  If-Modified-Since request headers
#  JD - parse now accepts etag, modified, agent, and referrer optional
#  arguments
#  JD - modified parse to return a dictionary instead of a tuple so that any
#  etag or modified information can be returned and cached by the caller
# 2.0.1 - 10/21/2002 - MAP - changed parse() so that if we don't get anything
#  because of etag/modified, return the old etag/modified to the caller to
#  indicate why nothing is being returned
# 2.0.2 - 10/21/2002 - JB - added the inchannel to the if statement, otherwise its
#  useless.  Fixes the problem JD was addressing by adding it.
# 2.1 - 11/14/2002 - MAP - added gzip support
# 2.2 - 1/27/2003 - MAP - added attribute support, admin:generatorAgent.
#  start_admingeneratoragent is an example of how to handle elements with
#  only attributes, no content.
# 2.3 - 6/11/2003 - MAP - added USER_AGENT for default (if caller doesn't specify);
#  also, make sure we send the User-Agent even if urllib2 isn't available.
#  Match any variation of backend.userland.com/rss namespace.
# 2.3.1 - 6/12/2003 - MAP - if item has both link and guid, return both as-is.
# 2.4 - 7/9/2003 - MAP - added preliminary Pie/Atom/Echo support based on Sam Ruby's
#  snapshot of July 1 <http://www.intertwingly.net/blog/1506.html>; changed
#  project name
# 2.5 - 7/25/2003 - MAP - changed to Python license (all contributors agree);
#  removed unnecessary urllib code -- urllib2 should always be available anyway;
#  return actual url, status, and full HTTP headers (as result['url'],
#  result['status'], and result['headers']) if parsing a remote feed over HTTP --
#  this should pass all the HTTP tests at <http://diveintomark.org/tests/client/http/>;
#  added the latest namespace-of-the-week for RSS 2.0
# 2.5.1 - 7/26/2003 - RMK - clear opener.addheaders so we only send our custom
#  User-Agent (otherwise urllib2 sends two, which confuses some servers)
# 2.5.2 - 7/28/2003 - MAP - entity-decode inline xml properly; added support for
#  inline <xhtml:body> and <xhtml:div> as used in some RSS 2.0 feeds
# 2.5.3 - 8/6/2003 - TvdV - patch to track whether we're inside an image or
#  textInput, and also to return the character encoding (if specified)
# 2.6 - 1/1/2004 - MAP - dc:author support (MarekK); fixed bug tracking
#  nested divs within content (JohnD); fixed missing sys import (JohanS);
#  fixed regular expression to capture XML character encoding (Andrei);
#  added support for Atom 0.3-style links; fixed bug with textInput tracking;
#  added support for cloud (MartijnP); added support for multiple
#  category/dc:subject (MartijnP); normalize content model: 'description' gets
#  description (which can come from description, summary, or full content if no
#  description), 'content' gets dict of base/language/type/value (which can come
#  from content:encoded, xhtml:body, content, or fullitem);
#  fixed bug matching arbitrary Userland namespaces; added xml:base and xml:lang
#  tracking; fixed bug tracking unknown tags; fixed bug tracking content when
#  <content> element is not in default namespace (like Pocketsoap feed);
#  resolve relative URLs in link, guid, docs, url, comments, wfw:comment,
#  wfw:commentRSS; resolve relative URLs within embedded HTML markup in
#  description, xhtml:body, content, content:encoded, title, subtitle,
#  summary, info, tagline, and copyright; added support for pingback and
#  trackback namespaces
# 2.7 - 1/5/2004 - MAP - really added support for trackback and pingback
#  namespaces, as opposed to 2.6 when I said I did but didn't really;
#  sanitize HTML markup within some elements; added mxTidy support (if
#  installed) to tidy HTML markup within some elements; fixed indentation
#  bug in _parse_date (FazalM); use socket.setdefaulttimeout if available
#  (FazalM); universal date parsing and normalization (FazalM): 'created', modified',
#  'issued' are parsed into 9-tuple date format and stored in 'created_parsed',
#  'modified_parsed', and 'issued_parsed'; 'date' is duplicated in 'modified'
#  and vice-versa; 'date_parsed' is duplicated in 'modified_parsed' and vice-versa
# 2.7.1 - 1/9/2004 - MAP - fixed bug handling &quot; and &apos;.  fixed memory
#  leak not closing url opener (JohnD); added dc:publisher support (MarekK);
#  added admin:errorReportsTo support (MarekK); Python 2.1 dict support (MarekK)
# 2.7.4 - 1/14/2004 - MAP - added workaround for improperly formed <br/> tags in
#  encoded HTML (skadz); fixed unicode handling in normalize_attrs (ChrisL);
#  fixed relative URI processing for guid (skadz); added ICBM support; added
#  base64 support
# 2.7.5 - 1/15/2004 - MAP - added workaround for malformed DOCTYPE (seen on many
#  blogspot.com sites); added _debug variable
# 2.7.6 - 1/16/2004 - MAP - fixed bug with StringIO importing
# 3.0b3 - 1/23/2004 - MAP - parse entire feed with real XML parser (if available);
#  added several new supported namespaces; fixed bug tracking naked markup in
#  description; added support for enclosure; added support for source; re-added
#  support for cloud which got dropped somehow; added support for expirationDate
# 3.0b4 - 1/26/2004 - MAP - fixed xml:lang inheritance; fixed multiple bugs tracking
#  xml:base URI, one for documents that don't define one explicitly and one for
#  documents that define an outer and an inner xml:base that goes out of scope
#  before the end of the document
# 3.0b5 - 1/26/2004 - MAP - fixed bug parsing multiple links at feed level
# 3.0b6 - 1/27/2004 - MAP - added feed type and version detection, result['version']
#  will be one of SUPPORTED_VERSIONS.keys() or empty string if unrecognized;
#  added support for creativeCommons:license and cc:license; added support for
#  full Atom content model in title, tagline, info, copyright, summary; fixed bug
#  with gzip encoding (not always telling server we support it when we do)
# 3.0b7 - 1/28/2004 - MAP - support Atom-style author element in author_detail
#  (dictionary of 'name', 'url', 'email'); map author to author_detail if author
#  contains name + email address
# 3.0b8 - 1/28/2004 - MAP - added support for contributor
# 3.0b9 - 1/29/2004 - MAP - fixed check for presence of dict function; added
#  support for summary
# 3.0b10 - 1/31/2004 - MAP - incorporated ISO-8601 date parsing routines from
#  xml.util.iso8601
# 3.0b11 - 2/2/2004 - MAP - added 'rights' to list of elements that can contain
#  dangerous markup; fiddled with decodeEntities (not right); liberalized
#  date parsing even further
# 3.0b12 - 2/6/2004 - MAP - fiddled with decodeEntities (still not right);
#  added support to Atom 0.2 subtitle; added support for Atom content model
#  in copyright; better sanitizing of dangerous HTML elements with end tags
#  (script, frameset)
# 3.0b13 - 2/8/2004 - MAP - better handling of empty HTML tags (br, hr, img,
#  etc.) in embedded markup, in either HTML or XHTML form (<br>, <br/>, <br />)
# 3.0b14 - 2/8/2004 - MAP - fixed CDATA handling in non-wellformed feeds under
#  Python 2.1
# 3.0b15 - 2/11/2004 - MAP - fixed bug resolving relative links in wfw:commentRSS;
#  fixed bug capturing author and contributor URL; fixed bug resolving relative
#  links in author and contributor URL; fixed bug resolvin relative links in
#  generator URL; added support for recognizing RSS 1.0; passed Simon Fell's
#  namespace tests, and included them permanently in the test suite with his
#  permission; fixed namespace handling under Python 2.1
# 3.0b16 - 2/12/2004 - MAP - fixed support for RSS 0.90 (broken in b15)
# 3.0b17 - 2/13/2004 - MAP - determine character encoding as per RFC 3023
# 3.0b18 - 2/17/2004 - MAP - always map description to summary_detail (Andrei);
#  use libxml2 (if available)
# 3.0b19 - 3/15/2004 - MAP - fixed bug exploding author information when author
#  name was in parentheses; removed ultra-problematic mxTidy support; patch to
#  workaround crash in PyXML/expat when encountering invalid entities
#  (MarkMoraes); support for textinput/textInput
# 3.0b20 - 4/7/2004 - MAP - added CDF support
# 3.0b21 - 4/14/2004 - MAP - added Hot RSS support
# 3.0b22 - 4/19/2004 - MAP - changed 'channel' to 'feed', 'item' to 'entries' in
#  results dict; changed results dict to allow getting values with results.key
#  as well as results[key]; work around embedded illformed HTML with half
#  a DOCTYPE; work around malformed Content-Type header; if character encoding
#  is wrong, try several common ones before falling back to regexes (if this
#  works, bozo_exception is set to CharacterEncodingOverride); fixed character
#  encoding issues in BaseHTMLProcessor by tracking encoding and converting
#  from Unicode to raw strings before feeding data to sgmllib.SGMLParser;
#  convert each value in results to Unicode (if possible), even if using
#  regex-based parsing
# 3.0b23 - 4/21/2004 - MAP - fixed UnicodeDecodeError for feeds that contain
#  high-bit characters in attributes in embedded HTML in description (thanks
#  Thijs van de Vossen); moved guid, date, and date_parsed to mapped keys in
#  FeedParserDict; tweaked FeedParserDict.has_key to return True if asking
#  about a mapped key
# 3.0fc1 - 4/23/2004 - MAP - made results.entries[0].links[0] and
#  results.entries[0].enclosures[0] into FeedParserDict; fixed typo that could
#  cause the same encoding to be tried twice (even if it failed the first time);
#  fixed DOCTYPE stripping when DOCTYPE contained entity declarations;
#  better textinput and image tracking in illformed RSS 1.0 feeds
# 3.0fc2 - 5/10/2004 - MAP - added and passed Sam's amp tests; added and passed
#  my blink tag tests
# 3.0fc3 - 6/18/2004 - MAP - fixed bug in _changeEncodingDeclaration that
#  failed to parse utf-16 encoded feeds; made source into a FeedParserDict;
#  duplicate admin:generatorAgent/@rdf:resource in generator_detail.url;
#  added support for image; refactored parse() fallback logic to try other
#  encodings if SAX parsing fails (previously it would only try other encodings
#  if re-encoding failed); remove unichr madness in normalize_attrs now that
#  we're properly tracking encoding in and out of BaseHTMLProcessor; set
#  feed.language from root-level xml:lang; set entry.id from rdf:about;
#  send Accept header
# 3.0 - 6/21/2004 - MAP - don't try iso-8859-1 (can't distinguish between
#  iso-8859-1 and windows-1252 anyway, and most incorrectly marked feeds are
#  windows-1252); fixed regression that could cause the same encoding to be
#  tried twice (even if it failed the first time)
# 3.0.1 - 6/22/2004 - MAP - default to us-ascii for all text/* content types;
#  recover from malformed content-type header parameter with no equals sign
#  ('text/xml; charset:iso-8859-1')
# 3.1 - 6/28/2004 - MAP - added and passed tests for converting HTML entities
#  to Unicode equivalents in illformed feeds (aaronsw); added and
#  passed tests for converting character entities to Unicode equivalents
#  in illformed feeds (aaronsw); test for valid parsers when setting
#  XML_AVAILABLE; make version and encoding available when server returns
#  a 304; add handlers parameter to pass arbitrary urllib2 handlers (like
#  digest auth or proxy support); add code to parse username/password
#  out of url and send as basic authentication; expose downloading-related
#  exceptions in bozo_exception (aaronsw); added __contains__ method to
#  FeedParserDict (aaronsw); added publisher_detail (aaronsw)
# 3.2 - 7/3/2004 - MAP - use cjkcodecs and iconv_codec if available; always
#  convert feed to UTF-8 before passing to XML parser; completely revamped
#  logic for determining character encoding and attempting XML parsing
#  (much faster); increased default timeout to 20 seconds; test for presence
#  of Location header on redirects; added tests for many alternate character
#  encodings; support various EBCDIC encodings; support UTF-16BE and
#  UTF16-LE with or without a BOM; support UTF-8 with a BOM; support
#  UTF-32BE and UTF-32LE with or without a BOM; fixed crashing bug if no
#  XML parsers are available; added support for 'Content-encoding: deflate';
#  send blank 'Accept-encoding: ' header if neither gzip nor zlib modules
#  are available
# 3.3 - 7/15/2004 - MAP - optimize EBCDIC to ASCII conversion; fix obscure
#  problem tracking xml:base and xml:lang if element declares it, child
#  doesn't, first grandchild redeclares it, and second grandchild doesn't;
#  refactored date parsing; defined public registerDateHandler so callers
#  can add support for additional date formats at runtime; added support
#  for OnBlog, Nate, MSSQL, Greek, and Hungarian dates (ytrewq1); added
#  zopeCompatibilityHack() which turns FeedParserDict into a regular
#  dictionary, required for Zope compatibility, and also makes command-
#  line debugging easier because pprint module formats real dictionaries
#  better than dictionary-like objects; added NonXMLContentType exception,
#  which is stored in bozo_exception when a feed is served with a non-XML
#  media type such as 'text/plain'; respect Content-Language as default
#  language if not xml:lang is present; cloud dict is now FeedParserDict;
#  generator dict is now FeedParserDict; better tracking of xml:lang,
#  including support for xml:lang='' to unset the current language;
#  recognize RSS 1.0 feeds even when RSS 1.0 namespace is not the default
#  namespace; don't overwrite final status on redirects (scenarios:
#  redirecting to a URL that returns 304, redirecting to a URL that
#  redirects to another URL with a different type of redirect); add
#  support for HTTP 303 redirects
# 4.0 - MAP - support for relative URIs in xml:base attribute; fixed
#  encoding issue with mxTidy (phopkins); preliminary support for RFC 3229;
#  support for Atom 1.0; support for iTunes extensions; new 'tags' for
#  categories/keywords/etc. as array of dict
#  {'term': term, 'scheme': scheme, 'label': label} to match Atom 1.0
#  terminology; parse RFC 822-style dates with no time; lots of other
#  bug fixes
# 4.1 - MAP - removed socket timeout; added support for chardet library

Added gluon/contrib/gae_retry.py version [1cb2d390ab].
























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
def autoretry_datastore_timeouts(attempts=5.0, interval=0.1, exponent=2.0):
    """
    Copyright (C)  2009  twitter.com/rcb

    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.

    ======================================================================

    This function wraps the AppEngine Datastore API to autoretry
    datastore timeouts at the lowest accessible level.

    The benefits of this approach are:

    1. Small Footprint:  Does not monkey with Model internals
                         which may break in future releases.
    2. Max Performance:  Retrying at this lowest level means
                         serialization and key formatting is not
                         needlessly repeated on each retry.
    At initialization time, execute this:

    >>> autoretry_datastore_timeouts()

    Should only be called once, subsequent calls have no effect.

    >>> autoretry_datastore_timeouts() # no effect

    Default (5) attempts: .1, .2, .4, .8, 1.6 seconds

    Parameters can each be specified as floats.

    :param attempts: maximum number of times to retry.
    :param interval: base seconds to sleep between retries.
    :param exponent: rate of exponential back-off.
    """

    import time, logging
    from google.appengine.api import apiproxy_stub_map
    from google.appengine.runtime import apiproxy_errors
    from google.appengine.datastore import datastore_pb

    attempts = float(attempts)
    interval = float(interval)
    exponent = float(exponent)
    wrapped = apiproxy_stub_map.MakeSyncCall
    errors = {datastore_pb.Error.TIMEOUT:'Timeout',
        datastore_pb.Error.CONCURRENT_TRANSACTION:'TransactionFailedError'}

    def wrapper(*args, **kwargs):
        count = 0.0
        while True:
            try:
                return wrapped(*args, **kwargs)
            except apiproxy_errors.ApplicationError, err:
                errno = err.application_error
                if errno not in errors: raise
                sleep = (exponent ** count) * interval
                count += 1.0
                if count > attempts: raise
                msg = "Datastore %s: retry #%d in %s seconds.\n%s"
                vals = ''
                if count == 1.0:
                    vals = '\n'.join([str(a) for a in args])
                logging.warning(msg % (errors[errno], count, sleep, vals))
                time.sleep(sleep)

    setattr(wrapper, '_autoretry_datastore_timeouts', False)
    if getattr(wrapped, '_autoretry_datastore_timeouts', True):
        apiproxy_stub_map.MakeSyncCall = wrapper

Added gluon/contrib/gateways/__init__.py version [adc83b19e7].


1
+

Added gluon/contrib/gateways/fcgi.py version [7ac081e792].




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Copyright (c) 2002, 2003, 2005, 2006 Allan Saddi <allan@saddi.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. 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.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
#
# $Id$

"""
fcgi - a FastCGI/WSGI gateway.

For more information about FastCGI, see <http://www.fastcgi.com/>.

For more information about the Web Server Gateway Interface, see
<http://www.python.org/peps/pep-0333.html>.

Example usage:

  #!/usr/bin/env python
  from myapplication import app # Assume app is your WSGI application object
  from fcgi import WSGIServer
  WSGIServer(app).run()

See the documentation for WSGIServer/Server for more information.

On most platforms, fcgi will fallback to regular CGI behavior if run in a
non-FastCGI context. If you want to force CGI behavior, set the environment
variable FCGI_FORCE_CGI to "Y" or "y".
"""

__author__ = 'Allan Saddi <allan@saddi.com>'
__version__ = '$Revision$'

import sys
import os
import signal
import struct
import cStringIO as StringIO
import select
import socket
import errno
import traceback

try:
    import thread
    import threading
    thread_available = True
except ImportError:
    import dummy_thread as thread
    import dummy_threading as threading
    thread_available = False

# Apparently 2.3 doesn't define SHUT_WR? Assume it is 1 in this case.
if not hasattr(socket, 'SHUT_WR'):
    socket.SHUT_WR = 1

__all__ = ['WSGIServer']

# Constants from the spec.
FCGI_LISTENSOCK_FILENO = 0

FCGI_HEADER_LEN = 8

FCGI_VERSION_1 = 1

FCGI_BEGIN_REQUEST = 1
FCGI_ABORT_REQUEST = 2
FCGI_END_REQUEST = 3
FCGI_PARAMS = 4
FCGI_STDIN = 5
FCGI_STDOUT = 6
FCGI_STDERR = 7
FCGI_DATA = 8
FCGI_GET_VALUES = 9
FCGI_GET_VALUES_RESULT = 10
FCGI_UNKNOWN_TYPE = 11
FCGI_MAXTYPE = FCGI_UNKNOWN_TYPE

FCGI_NULL_REQUEST_ID = 0

FCGI_KEEP_CONN = 1

FCGI_RESPONDER = 1
FCGI_AUTHORIZER = 2
FCGI_FILTER = 3

FCGI_REQUEST_COMPLETE = 0
FCGI_CANT_MPX_CONN = 1
FCGI_OVERLOADED = 2
FCGI_UNKNOWN_ROLE = 3

FCGI_MAX_CONNS = 'FCGI_MAX_CONNS'
FCGI_MAX_REQS = 'FCGI_MAX_REQS'
FCGI_MPXS_CONNS = 'FCGI_MPXS_CONNS'

FCGI_Header = '!BBHHBx'
FCGI_BeginRequestBody = '!HB5x'
FCGI_EndRequestBody = '!LB3x'
FCGI_UnknownTypeBody = '!B7x'

FCGI_EndRequestBody_LEN = struct.calcsize(FCGI_EndRequestBody)
FCGI_UnknownTypeBody_LEN = struct.calcsize(FCGI_UnknownTypeBody)

if __debug__:
    import time

    # Set non-zero to write debug output to a file.
    DEBUG = 0
    DEBUGLOG = '/tmp/fcgi.log'

    def _debug(level, msg):
        if DEBUG < level:
            return

        try:
            f = open(DEBUGLOG, 'a')
            f.write('%sfcgi: %s\n' % (time.ctime()[4:-4], msg))
            f.close()
        except:
            pass

class InputStream(object):
    """
    File-like object representing FastCGI input streams (FCGI_STDIN and
    FCGI_DATA). Supports the minimum methods required by WSGI spec.
    """
    def __init__(self, conn):
        self._conn = conn

        # See Server.
        self._shrinkThreshold = conn.server.inputStreamShrinkThreshold

        self._buf = ''
        self._bufList = []
        self._pos = 0 # Current read position.
        self._avail = 0 # Number of bytes currently available.

        self._eof = False # True when server has sent EOF notification.

    def _shrinkBuffer(self):
        """Gets rid of already read data (since we can't rewind)."""
        if self._pos >= self._shrinkThreshold:
            self._buf = self._buf[self._pos:]
            self._avail -= self._pos
            self._pos = 0

            assert self._avail >= 0

    def _waitForData(self):
        """Waits for more data to become available."""
        self._conn.process_input()

    def read(self, n=-1):
        if self._pos == self._avail and self._eof:
            return ''
        while True:
            if n < 0 or (self._avail - self._pos) < n:
                # Not enough data available.
                if self._eof:
                    # And there's no more coming.
                    newPos = self._avail
                    break
                else:
                    # Wait for more data.
                    self._waitForData()
                    continue
            else:
                newPos = self._pos + n
                break
        # Merge buffer list, if necessary.
        if self._bufList:
            self._buf += ''.join(self._bufList)
            self._bufList = []
        r = self._buf[self._pos:newPos]
        self._pos = newPos
        self._shrinkBuffer()
        return r

    def readline(self, length=None):
        if self._pos == self._avail and self._eof:
            return ''
        while True:
            # Unfortunately, we need to merge the buffer list early.
            if self._bufList:
                self._buf += ''.join(self._bufList)
                self._bufList = []
            # Find newline.
            i = self._buf.find('\n', self._pos)
            if i < 0:
                # Not found?
                if self._eof:
                    # No more data coming.
                    newPos = self._avail
                    break
                else:
                    # Wait for more to come.
                    self._waitForData()
                    continue
            else:
                newPos = i + 1
                break
        if length is not None:
            if self._pos + length < newPos:
                newPos = self._pos + length
        r = self._buf[self._pos:newPos]
        self._pos = newPos
        self._shrinkBuffer()
        return r

    def readlines(self, sizehint=0):
        total = 0
        lines = []
        line = self.readline()
        while line:
            lines.append(line)
            total += len(line)
            if 0 < sizehint <= total:
                break
            line = self.readline()
        return lines

    def __iter__(self):
        return self

    def next(self):
        r = self.readline()
        if not r:
            raise StopIteration
        return r

    def add_data(self, data):
        if not data:
            self._eof = True
        else:
            self._bufList.append(data)
            self._avail += len(data)

class MultiplexedInputStream(InputStream):
    """
    A version of InputStream meant to be used with MultiplexedConnections.
    Assumes the MultiplexedConnection (the producer) and the Request
    (the consumer) are running in different threads.
    """
    def __init__(self, conn):
        super(MultiplexedInputStream, self).__init__(conn)

        # Arbitrates access to this InputStream (it's used simultaneously
        # by a Request and its owning Connection object).
        lock = threading.RLock()

        # Notifies Request thread that there is new data available.
        self._lock = threading.Condition(lock)

    def _waitForData(self):
        # Wait for notification from add_data().
        self._lock.wait()

    def read(self, n=-1):
        self._lock.acquire()
        try:
            return super(MultiplexedInputStream, self).read(n)
        finally:
            self._lock.release()

    def readline(self, length=None):
        self._lock.acquire()
        try:
            return super(MultiplexedInputStream, self).readline(length)
        finally:
            self._lock.release()

    def add_data(self, data):
        self._lock.acquire()
        try:
            super(MultiplexedInputStream, self).add_data(data)
            self._lock.notify()
        finally:
            self._lock.release()

class OutputStream(object):
    """
    FastCGI output stream (FCGI_STDOUT/FCGI_STDERR). By default, calls to
    write() or writelines() immediately result in Records being sent back
    to the server. Buffering should be done in a higher level!
    """
    def __init__(self, conn, req, type, buffered=False):
        self._conn = conn
        self._req = req
        self._type = type
        self._buffered = buffered
        self._bufList = [] # Used if buffered is True
        self.dataWritten = False
        self.closed = False

    def _write(self, data):
        length = len(data)
        while length:
            toWrite = min(length, self._req.server.maxwrite - FCGI_HEADER_LEN)

            rec = Record(self._type, self._req.requestId)
            rec.contentLength = toWrite
            rec.contentData = data[:toWrite]
            self._conn.writeRecord(rec)

            data = data[toWrite:]
            length -= toWrite

    def write(self, data):
        assert not self.closed

        if not data:
            return

        self.dataWritten = True

        if self._buffered:
            self._bufList.append(data)
        else:
            self._write(data)

    def writelines(self, lines):
        assert not self.closed

        for line in lines:
            self.write(line)

    def flush(self):
        # Only need to flush if this OutputStream is actually buffered.
        if self._buffered:
            data = ''.join(self._bufList)
            self._bufList = []
            self._write(data)

    # Though available, the following should NOT be called by WSGI apps.
    def close(self):
        """Sends end-of-stream notification, if necessary."""
        if not self.closed and self.dataWritten:
            self.flush()
            rec = Record(self._type, self._req.requestId)
            self._conn.writeRecord(rec)
            self.closed = True

class TeeOutputStream(object):
    """
    Simple wrapper around two or more output file-like objects that copies
    written data to all streams.
    """
    def __init__(self, streamList):
        self._streamList = streamList

    def write(self, data):
        for f in self._streamList:
            f.write(data)

    def writelines(self, lines):
        for line in lines:
            self.write(line)

    def flush(self):
        for f in self._streamList:
            f.flush()

class StdoutWrapper(object):
    """
    Wrapper for sys.stdout so we know if data has actually been written.
    """
    def __init__(self, stdout):
        self._file = stdout
        self.dataWritten = False

    def write(self, data):
        if data:
            self.dataWritten = True
        self._file.write(data)

    def writelines(self, lines):
        for line in lines:
            self.write(line)

    def __getattr__(self, name):
        return getattr(self._file, name)

def decode_pair(s, pos=0):
    """
    Decodes a name/value pair.

    The number of bytes decoded as well as the name/value pair
    are returned.
    """
    nameLength = ord(s[pos])
    if nameLength & 128:
        nameLength = struct.unpack('!L', s[pos:pos+4])[0] & 0x7fffffff
        pos += 4
    else:
        pos += 1

    valueLength = ord(s[pos])
    if valueLength & 128:
        valueLength = struct.unpack('!L', s[pos:pos+4])[0] & 0x7fffffff
        pos += 4
    else:
        pos += 1

    name = s[pos:pos+nameLength]
    pos += nameLength
    value = s[pos:pos+valueLength]
    pos += valueLength

    return (pos, (name, value))

def encode_pair(name, value):
    """
    Encodes a name/value pair.

    The encoded string is returned.
    """
    nameLength = len(name)
    if nameLength < 128:
        s = chr(nameLength)
    else:
        s = struct.pack('!L', nameLength | 0x80000000L)

    valueLength = len(value)
    if valueLength < 128:
        s += chr(valueLength)
    else:
        s += struct.pack('!L', valueLength | 0x80000000L)

    return s + name + value

class Record(object):
    """
    A FastCGI Record.

    Used for encoding/decoding records.
    """
    def __init__(self, type=FCGI_UNKNOWN_TYPE, requestId=FCGI_NULL_REQUEST_ID):
        self.version = FCGI_VERSION_1
        self.type = type
        self.requestId = requestId
        self.contentLength = 0
        self.paddingLength = 0
        self.contentData = ''

    def _recvall(sock, length):
        """
        Attempts to receive length bytes from a socket, blocking if necessary.
        (Socket may be blocking or non-blocking.)
        """
        dataList = []
        recvLen = 0
        while length:
            try:
                data = sock.recv(length)
            except socket.error, e:
                if e[0] == errno.EAGAIN:
                    select.select([sock], [], [])
                    continue
                else:
                    raise
            if not data: # EOF
                break
            dataList.append(data)
            dataLen = len(data)
            recvLen += dataLen
            length -= dataLen
        return ''.join(dataList), recvLen
    _recvall = staticmethod(_recvall)

    def read(self, sock):
        """Read and decode a Record from a socket."""
        try:
            header, length = self._recvall(sock, FCGI_HEADER_LEN)
        except:
            raise EOFError

        if length < FCGI_HEADER_LEN:
            raise EOFError

        self.version, self.type, self.requestId, self.contentLength, \
                      self.paddingLength = struct.unpack(FCGI_Header, header)

        if __debug__: _debug(9, 'read: fd = %d, type = %d, requestId = %d, '
                             'contentLength = %d' %
                             (sock.fileno(), self.type, self.requestId,
                              self.contentLength))

        if self.contentLength:
            try:
                self.contentData, length = self._recvall(sock,
                                                         self.contentLength)
            except:
                raise EOFError

            if length < self.contentLength:
                raise EOFError

        if self.paddingLength:
            try:
                self._recvall(sock, self.paddingLength)
            except:
                raise EOFError

    def _sendall(sock, data):
        """
        Writes data to a socket and does not return until all the data is sent.
        """
        length = len(data)
        while length:
            try:
                sent = sock.send(data)
            except socket.error, e:
                if e[0] == errno.EAGAIN:
                    select.select([], [sock], [])
                    continue
                else:
                    raise
            data = data[sent:]
            length -= sent
    _sendall = staticmethod(_sendall)

    def write(self, sock):
        """Encode and write a Record to a socket."""
        self.paddingLength = -self.contentLength & 7

        if __debug__: _debug(9, 'write: fd = %d, type = %d, requestId = %d, '
                             'contentLength = %d' %
                             (sock.fileno(), self.type, self.requestId,
                              self.contentLength))

        header = struct.pack(FCGI_Header, self.version, self.type,
                             self.requestId, self.contentLength,
                             self.paddingLength)
        self._sendall(sock, header)
        if self.contentLength:
            self._sendall(sock, self.contentData)
        if self.paddingLength:
            self._sendall(sock, '\x00'*self.paddingLength)

class Request(object):
    """
    Represents a single FastCGI request.

    These objects are passed to your handler and is the main interface
    between your handler and the fcgi module. The methods should not
    be called by your handler. However, server, params, stdin, stdout,
    stderr, and data are free for your handler's use.
    """
    def __init__(self, conn, inputStreamClass):
        self._conn = conn

        self.server = conn.server
        self.params = {}
        self.stdin = inputStreamClass(conn)
        self.stdout = OutputStream(conn, self, FCGI_STDOUT)
        self.stderr = OutputStream(conn, self, FCGI_STDERR, buffered=True)
        self.data = inputStreamClass(conn)

    def run(self):
        """Runs the handler, flushes the streams, and ends the request."""
        try:
            protocolStatus, appStatus = self.server.handler(self)
        except:
            traceback.print_exc(file=self.stderr)
            self.stderr.flush()
            if not self.stdout.dataWritten:
                self.server.error(self)

            protocolStatus, appStatus = FCGI_REQUEST_COMPLETE, 0

        if __debug__: _debug(1, 'protocolStatus = %d, appStatus = %d' %
                             (protocolStatus, appStatus))

        self._flush()
        self._end(appStatus, protocolStatus)

    def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
        self._conn.end_request(self, appStatus, protocolStatus)

    def _flush(self):
        self.stdout.close()
        self.stderr.close()

class CGIRequest(Request):
    """A normal CGI request disguised as a FastCGI request."""
    def __init__(self, server):
        # These are normally filled in by Connection.
        self.requestId = 1
        self.role = FCGI_RESPONDER
        self.flags = 0
        self.aborted = False

        self.server = server
        self.params = dict(os.environ)
        self.stdin = sys.stdin
        self.stdout = StdoutWrapper(sys.stdout) # Oh, the humanity!
        self.stderr = sys.stderr
        self.data = StringIO.StringIO()

    def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
        sys.exit(appStatus)

    def _flush(self):
        # Not buffered, do nothing.
        pass

class Connection(object):
    """
    A Connection with the web server.

    Each Connection is associated with a single socket (which is
    connected to the web server) and is responsible for handling all
    the FastCGI message processing for that socket.
    """
    _multiplexed = False
    _inputStreamClass = InputStream

    def __init__(self, sock, addr, server):
        self._sock = sock
        self._addr = addr
        self.server = server

        # Active Requests for this Connection, mapped by request ID.
        self._requests = {}

    def _cleanupSocket(self):
        """Close the Connection's socket."""
        try:
            self._sock.shutdown(socket.SHUT_WR)
        except:
            return
        try:
            while True:
                r, w, e = select.select([self._sock], [], [])
                if not r or not self._sock.recv(1024):
                    break
        except:
            pass
        self._sock.close()

    def run(self):
        """Begin processing data from the socket."""
        self._keepGoing = True
        while self._keepGoing:
            try:
                self.process_input()
            except EOFError:
                break
            except (select.error, socket.error), e:
                if e[0] == errno.EBADF: # Socket was closed by Request.
                    break
                raise

        self._cleanupSocket()

    def process_input(self):
        """Attempt to read a single Record from the socket and process it."""
        # Currently, any children Request threads notify this Connection
        # that it is no longer needed by closing the Connection's socket.
        # We need to put a timeout on select, otherwise we might get
        # stuck in it indefinitely... (I don't like this solution.)
        while self._keepGoing:
            try:
                r, w, e = select.select([self._sock], [], [], 1.0)
            except ValueError:
                # Sigh. ValueError gets thrown sometimes when passing select
                # a closed socket.
                raise EOFError
            if r: break
        if not self._keepGoing:
            return
        rec = Record()
        rec.read(self._sock)

        if rec.type == FCGI_GET_VALUES:
            self._do_get_values(rec)
        elif rec.type == FCGI_BEGIN_REQUEST:
            self._do_begin_request(rec)
        elif rec.type == FCGI_ABORT_REQUEST:
            self._do_abort_request(rec)
        elif rec.type == FCGI_PARAMS:
            self._do_params(rec)
        elif rec.type == FCGI_STDIN:
            self._do_stdin(rec)
        elif rec.type == FCGI_DATA:
            self._do_data(rec)
        elif rec.requestId == FCGI_NULL_REQUEST_ID:
            self._do_unknown_type(rec)
        else:
            # Need to complain about this.
            pass

    def writeRecord(self, rec):
        """
        Write a Record to the socket.
        """
        rec.write(self._sock)

    def end_request(self, req, appStatus=0L,
                    protocolStatus=FCGI_REQUEST_COMPLETE, remove=True):
        """
        End a Request.

        Called by Request objects. An FCGI_END_REQUEST Record is
        sent to the web server. If the web server no longer requires
        the connection, the socket is closed, thereby ending this
        Connection (run() returns).
        """
        rec = Record(FCGI_END_REQUEST, req.requestId)
        rec.contentData = struct.pack(FCGI_EndRequestBody, appStatus,
                                      protocolStatus)
        rec.contentLength = FCGI_EndRequestBody_LEN
        self.writeRecord(rec)

        if remove:
            del self._requests[req.requestId]

        if __debug__: _debug(2, 'end_request: flags = %d' % req.flags)

        if not (req.flags & FCGI_KEEP_CONN) and not self._requests:
            self._cleanupSocket()
            self._keepGoing = False

    def _do_get_values(self, inrec):
        """Handle an FCGI_GET_VALUES request from the web server."""
        outrec = Record(FCGI_GET_VALUES_RESULT)

        pos = 0
        while pos < inrec.contentLength:
            pos, (name, value) = decode_pair(inrec.contentData, pos)
            cap = self.server.capability.get(name)
            if cap is not None:
                outrec.contentData += encode_pair(name, str(cap))

        outrec.contentLength = len(outrec.contentData)
        self.writeRecord(outrec)

    def _do_begin_request(self, inrec):
        """Handle an FCGI_BEGIN_REQUEST from the web server."""
        role, flags = struct.unpack(FCGI_BeginRequestBody, inrec.contentData)

        req = self.server.request_class(self, self._inputStreamClass)
        req.requestId, req.role, req.flags = inrec.requestId, role, flags
        req.aborted = False

        if not self._multiplexed and self._requests:
            # Can't multiplex requests.
            self.end_request(req, 0L, FCGI_CANT_MPX_CONN, remove=False)
        else:
            self._requests[inrec.requestId] = req

    def _do_abort_request(self, inrec):
        """
        Handle an FCGI_ABORT_REQUEST from the web server.

        We just mark a flag in the associated Request.
        """
        req = self._requests.get(inrec.requestId)
        if req is not None:
            req.aborted = True

    def _start_request(self, req):
        """Run the request."""
        # Not multiplexed, so run it inline.
        req.run()

    def _do_params(self, inrec):
        """
        Handle an FCGI_PARAMS Record.

        If the last FCGI_PARAMS Record is received, start the request.
        """
        req = self._requests.get(inrec.requestId)
        if req is not None:
            if inrec.contentLength:
                pos = 0
                while pos < inrec.contentLength:
                    pos, (name, value) = decode_pair(inrec.contentData, pos)
                    req.params[name] = value
            else:
                self._start_request(req)

    def _do_stdin(self, inrec):
        """Handle the FCGI_STDIN stream."""
        req = self._requests.get(inrec.requestId)
        if req is not None:
            req.stdin.add_data(inrec.contentData)

    def _do_data(self, inrec):
        """Handle the FCGI_DATA stream."""
        req = self._requests.get(inrec.requestId)
        if req is not None:
            req.data.add_data(inrec.contentData)

    def _do_unknown_type(self, inrec):
        """Handle an unknown request type. Respond accordingly."""
        outrec = Record(FCGI_UNKNOWN_TYPE)
        outrec.contentData = struct.pack(FCGI_UnknownTypeBody, inrec.type)
        outrec.contentLength = FCGI_UnknownTypeBody_LEN
        self.writeRecord(rec)

class MultiplexedConnection(Connection):
    """
    A version of Connection capable of handling multiple requests
    simultaneously.
    """
    _multiplexed = True
    _inputStreamClass = MultiplexedInputStream

    def __init__(self, sock, addr, server):
        super(MultiplexedConnection, self).__init__(sock, addr, server)

        # Used to arbitrate access to self._requests.
        lock = threading.RLock()

        # Notification is posted everytime a request completes, allowing us
        # to quit cleanly.
        self._lock = threading.Condition(lock)

    def _cleanupSocket(self):
        # Wait for any outstanding requests before closing the socket.
        self._lock.acquire()
        while self._requests:
            self._lock.wait()
        self._lock.release()

        super(MultiplexedConnection, self)._cleanupSocket()

    def writeRecord(self, rec):
        # Must use locking to prevent intermingling of Records from different
        # threads.
        self._lock.acquire()
        try:
            # Probably faster than calling super. ;)
            rec.write(self._sock)
        finally:
            self._lock.release()

    def end_request(self, req, appStatus=0L,
                    protocolStatus=FCGI_REQUEST_COMPLETE, remove=True):
        self._lock.acquire()
        try:
            super(MultiplexedConnection, self).end_request(req, appStatus,
                                                           protocolStatus,
                                                           remove)
            self._lock.notify()
        finally:
            self._lock.release()

    def _do_begin_request(self, inrec):
        self._lock.acquire()
        try:
            super(MultiplexedConnection, self)._do_begin_request(inrec)
        finally:
            self._lock.release()

    def _do_abort_request(self, inrec):
        self._lock.acquire()
        try:
            super(MultiplexedConnection, self)._do_abort_request(inrec)
        finally:
            self._lock.release()

    def _start_request(self, req):
        thread.start_new_thread(req.run, ())

    def _do_params(self, inrec):
        self._lock.acquire()
        try:
            super(MultiplexedConnection, self)._do_params(inrec)
        finally:
            self._lock.release()

    def _do_stdin(self, inrec):
        self._lock.acquire()
        try:
            super(MultiplexedConnection, self)._do_stdin(inrec)
        finally:
            self._lock.release()

    def _do_data(self, inrec):
        self._lock.acquire()
        try:
            super(MultiplexedConnection, self)._do_data(inrec)
        finally:
            self._lock.release()

class Server(object):
    """
    The FastCGI server.

    Waits for connections from the web server, processing each
    request.

    If run in a normal CGI context, it will instead instantiate a
    CGIRequest and run the handler through there.
    """
    request_class = Request
    cgirequest_class = CGIRequest

    # Limits the size of the InputStream's string buffer to this size + the
    # server's maximum Record size. Since the InputStream is not seekable,
    # we throw away already-read data once this certain amount has been read.
    inputStreamShrinkThreshold = 102400 - 8192

    def __init__(self, handler=None, maxwrite=8192, bindAddress=None,
                 umask=None, multiplexed=False):
        """
        handler, if present, must reference a function or method that
        takes one argument: a Request object. If handler is not
        specified at creation time, Server *must* be subclassed.
        (The handler method below is abstract.)

        maxwrite is the maximum number of bytes (per Record) to write
        to the server. I've noticed mod_fastcgi has a relatively small
        receive buffer (8K or so).

        bindAddress, if present, must either be a string or a 2-tuple. If
        present, run() will open its own listening socket. You would use
        this if you wanted to run your application as an 'external' FastCGI
        app. (i.e. the webserver would no longer be responsible for starting
        your app) If a string, it will be interpreted as a filename and a UNIX
        socket will be opened. If a tuple, the first element, a string,
        is the interface name/IP to bind to, and the second element (an int)
        is the port number.

        Set multiplexed to True if you want to handle multiple requests
        per connection. Some FastCGI backends (namely mod_fastcgi) don't
        multiplex requests at all, so by default this is off (which saves
        on thread creation/locking overhead). If threads aren't available,
        this keyword is ignored; it's not possible to multiplex requests
        at all.
        """
        if handler is not None:
            self.handler = handler
        self.maxwrite = maxwrite
        if thread_available:
            try:
                import resource
                # Attempt to glean the maximum number of connections
                # from the OS.
                maxConns = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
            except ImportError:
                maxConns = 100 # Just some made up number.
            maxReqs = maxConns
            if multiplexed:
                self._connectionClass = MultiplexedConnection
                maxReqs *= 5 # Another made up number.
            else:
                self._connectionClass = Connection
            self.capability = {
                FCGI_MAX_CONNS: maxConns,
                FCGI_MAX_REQS: maxReqs,
                FCGI_MPXS_CONNS: multiplexed and 1 or 0
                }
        else:
            self._connectionClass = Connection
            self.capability = {
                # If threads aren't available, these are pretty much correct.
                FCGI_MAX_CONNS: 1,
                FCGI_MAX_REQS: 1,
                FCGI_MPXS_CONNS: 0
                }
        self._bindAddress = bindAddress
        self._umask = umask

    def _setupSocket(self):
        if self._bindAddress is None: # Run as a normal FastCGI?
            isFCGI = True

            sock = socket.fromfd(FCGI_LISTENSOCK_FILENO, socket.AF_INET,
                                 socket.SOCK_STREAM)
            try:
                sock.getpeername()
            except socket.error, e:
                if e[0] == errno.ENOTSOCK:
                    # Not a socket, assume CGI context.
                    isFCGI = False
                elif e[0] != errno.ENOTCONN:
                    raise

            # FastCGI/CGI discrimination is broken on Mac OS X.
            # Set the environment variable FCGI_FORCE_CGI to "Y" or "y"
            # if you want to run your app as a simple CGI. (You can do
            # this with Apache's mod_env [not loaded by default in OS X
            # client, ha ha] and the SetEnv directive.)
            if not isFCGI or \
               os.environ.get('FCGI_FORCE_CGI', 'N').upper().startswith('Y'):
                req = self.cgirequest_class(self)
                req.run()
                sys.exit(0)
        else:
            # Run as a server
            oldUmask = None
            if type(self._bindAddress) is str:
                # Unix socket
                sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
                try:
                    os.unlink(self._bindAddress)
                except OSError:
                    pass
                if self._umask is not None:
                    oldUmask = os.umask(self._umask)
            else:
                # INET socket
                assert type(self._bindAddress) is tuple
                assert len(self._bindAddress) == 2
                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

            sock.bind(self._bindAddress)
            sock.listen(socket.SOMAXCONN)

            if oldUmask is not None:
                os.umask(oldUmask)

        return sock

    def _cleanupSocket(self, sock):
        """Closes the main socket."""
        sock.close()

    def _installSignalHandlers(self):
        self._oldSIGs = [(x,signal.getsignal(x)) for x in
                         (signal.SIGHUP, signal.SIGINT, signal.SIGTERM)]
        signal.signal(signal.SIGHUP, self._hupHandler)
        signal.signal(signal.SIGINT, self._intHandler)
        signal.signal(signal.SIGTERM, self._intHandler)

    def _restoreSignalHandlers(self):
        for signum,handler in self._oldSIGs:
            signal.signal(signum, handler)

    def _hupHandler(self, signum, frame):
        self._hupReceived = True
        self._keepGoing = False

    def _intHandler(self, signum, frame):
        self._keepGoing = False

    def run(self, timeout=1.0):
        """
        The main loop. Exits on SIGHUP, SIGINT, SIGTERM. Returns True if
        SIGHUP was received, False otherwise.
        """
        web_server_addrs = os.environ.get('FCGI_WEB_SERVER_ADDRS')
        if web_server_addrs is not None:
            web_server_addrs = map(lambda x: x.strip(),
                                   web_server_addrs.split(','))

        sock = self._setupSocket()

        self._keepGoing = True
        self._hupReceived = False

        # Install signal handlers.
        self._installSignalHandlers()

        while self._keepGoing:
            try:
                r, w, e = select.select([sock], [], [], timeout)
            except select.error, e:
                if e[0] == errno.EINTR:
                    continue
                raise

            if r:
                try:
                    clientSock, addr = sock.accept()
                except socket.error, e:
                    if e[0] in (errno.EINTR, errno.EAGAIN):
                        continue
                    raise

                if web_server_addrs and \
                       (len(addr) != 2 or addr[0] not in web_server_addrs):
                    clientSock.close()
                    continue

                # Instantiate a new Connection and begin processing FastCGI
                # messages (either in a new thread or this thread).
                conn = self._connectionClass(clientSock, addr, self)
                thread.start_new_thread(conn.run, ())

            self._mainloopPeriodic()

        # Restore signal handlers.
        self._restoreSignalHandlers()

        self._cleanupSocket(sock)

        return self._hupReceived

    def _mainloopPeriodic(self):
        """
        Called with just about each iteration of the main loop. Meant to
        be overridden.
        """
        pass

    def _exit(self, reload=False):
        """
        Protected convenience method for subclasses to force an exit. Not
        really thread-safe, which is why it isn't public.
        """
        if self._keepGoing:
            self._keepGoing = False
            self._hupReceived = reload

    def handler(self, req):
        """
        Default handler, which just raises an exception. Unless a handler
        is passed at initialization time, this must be implemented by
        a subclass.
        """
        raise NotImplementedError, self.__class__.__name__ + '.handler'

    def error(self, req):
        """
        Called by Request if an exception occurs within the handler. May and
        should be overridden.
        """
        import cgitb
        req.stdout.write('Content-Type: text/html\r\n\r\n' +
                         cgitb.html(sys.exc_info()))

class WSGIServer(Server):
    """
    FastCGI server that supports the Web Server Gateway Interface. See
    <http://www.python.org/peps/pep-0333.html>.
    """
    def __init__(self, application, environ=None,
                 multithreaded=True, **kw):
        """
        environ, if present, must be a dictionary-like object. Its
        contents will be copied into application's environ. Useful
        for passing application-specific variables.

        Set multithreaded to False if your application is not MT-safe.
        """
        if kw.has_key('handler'):
            del kw['handler'] # Doesn't make sense to let this through
        super(WSGIServer, self).__init__(**kw)

        if environ is None:
            environ = {}

        self.application = application
        self.environ = environ
        self.multithreaded = multithreaded

        # Used to force single-threadedness
        self._app_lock = thread.allocate_lock()

    def handler(self, req):
        """Special handler for WSGI."""
        if req.role != FCGI_RESPONDER:
            return FCGI_UNKNOWN_ROLE, 0

        # Mostly taken from example CGI gateway.
        environ = req.params
        environ.update(self.environ)

        environ['wsgi.version'] = (1,0)
        environ['wsgi.input'] = req.stdin
        if self._bindAddress is None:
            stderr = req.stderr
        else:
            stderr = TeeOutputStream((sys.stderr, req.stderr))
        environ['wsgi.errors'] = stderr
        environ['wsgi.multithread'] = not isinstance(req, CGIRequest) and \
                                      thread_available and self.multithreaded
        # Rationale for the following: If started by the web server
        # (self._bindAddress is None) in either FastCGI or CGI mode, the
        # possibility of being spawned multiple times simultaneously is quite
        # real. And, if started as an external server, multiple copies may be
        # spawned for load-balancing/redundancy. (Though I don't think
        # mod_fastcgi supports this?)
        environ['wsgi.multiprocess'] = True
        environ['wsgi.run_once'] = isinstance(req, CGIRequest)

        if environ.get('HTTPS', 'off') in ('on', '1'):
            environ['wsgi.url_scheme'] = 'https'
        else:
            environ['wsgi.url_scheme'] = 'http'

        self._sanitizeEnv(environ)

        headers_set = []
        headers_sent = []
        result = None

        def write(data):
            assert type(data) is str, 'write() argument must be string'
            assert headers_set, 'write() before start_response()'

            if not headers_sent:
                status, responseHeaders = headers_sent[:] = headers_set
                found = False
                for header,value in responseHeaders:
                    if header.lower() == 'content-length':
                        found = True
                        break
                if not found and result is not None:
                    try:
                        if len(result) == 1:
                            responseHeaders.append(('Content-Length',
                                                    str(len(data))))
                    except:
                        pass
                s = 'Status: %s\r\n' % status
                for header in responseHeaders:
                    s += '%s: %s\r\n' % header
                s += '\r\n'
                req.stdout.write(s)

            req.stdout.write(data)
            req.stdout.flush()

        def start_response(status, response_headers, exc_info=None):
            if exc_info:
                try:
                    if headers_sent:
                        # Re-raise if too late
                        raise exc_info[0], exc_info[1], exc_info[2]
                finally:
                    exc_info = None # avoid dangling circular ref
            else:
                assert not headers_set, 'Headers already set!'

            assert type(status) is str, 'Status must be a string'
            assert len(status) >= 4, 'Status must be at least 4 characters'
            assert int(status[:3]), 'Status must begin with 3-digit code'
            assert status[3] == ' ', 'Status must have a space after code'
            assert type(response_headers) is list, 'Headers must be a list'
            if __debug__:
                for name,val in response_headers:
                    assert type(name) is str, 'Header names must be strings'
                    assert type(val) is str, 'Header values must be strings'

            headers_set[:] = [status, response_headers]
            return write

        if not self.multithreaded:
            self._app_lock.acquire()
        try:
            try:
                result = self.application(environ, start_response)
                try:
                    for data in result:
                        if data:
                            write(data)
                    if not headers_sent:
                        write('') # in case body was empty
                finally:
                    if hasattr(result, 'close'):
                        result.close()
            except socket.error, e:
                if e[0] != errno.EPIPE:
                    raise # Don't let EPIPE propagate beyond server
        finally:
            if not self.multithreaded:
                self._app_lock.release()

        return FCGI_REQUEST_COMPLETE, 0

    def _sanitizeEnv(self, environ):
        """Ensure certain values are present, if required by WSGI."""
        if not environ.has_key('SCRIPT_NAME'):
            environ['SCRIPT_NAME'] = ''
        if not environ.has_key('PATH_INFO'):
            environ['PATH_INFO'] = ''

        # If any of these are missing, it probably signifies a broken
        # server...
        for name,default in [('REQUEST_METHOD', 'GET'),
                             ('SERVER_NAME', 'localhost'),
                             ('SERVER_PORT', '80'),
                             ('SERVER_PROTOCOL', 'HTTP/1.0')]:
            if not environ.has_key(name):
                environ['wsgi.errors'].write('%s: missing FastCGI param %s '
                                             'required by WSGI!\n' %
                                             (self.__class__.__name__, name))
                environ[name] = default

if __name__ == '__main__':
    def test_app(environ, start_response):
        """Probably not the most efficient example."""
        import cgi
        start_response('200 OK', [('Content-Type', 'text/html')])
        yield '<html><head><title>Hello World!</title></head>\n' \
              '<body>\n' \
              '<p>Hello World!</p>\n' \
              '<table border="1">'
        names = environ.keys()
        names.sort()
        for name in names:
            yield '<tr><td>%s</td><td>%s</td></tr>\n' % (
                name, cgi.escape(`environ[name]`))

        form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ,
                                keep_blank_values=1)
        if form.list:
            yield '<tr><th colspan="2">Form data</th></tr>'

        for field in form.list:
            yield '<tr><td>%s</td><td>%s</td></tr>\n' % (
                field.name, field.value)

        yield '</table>\n' \
              '</body></html>\n'

    WSGIServer(test_app).run()

Added gluon/contrib/generics.py version [adcdc0c9ce].

































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# fix response

import re
import os
import cPickle
import gluon.serializers
from gluon import current
from gluon.html import markmin_serializer, TAG, HTML, BODY, UL, XML
from gluon.contenttype import contenttype
from gluon.contrib.pyfpdf import FPDF, HTMLMixin
from gluon.sanitizer import sanitize
from gluon.contrib.markmin.markmin2latex import markmin2latex
from gluon.contrib.markmin.markmin2pdf import markmin2pdf

def wrapper(f):
    def g(data):
        try:
            output = f(data)
        except (TypeError, ValueError):
            raise HTTP(405, '%s serialization error' % extension.upper())
        except ImportError:
            raise HTTP(405, '%s not available' % extension.upper())
        except:
            raise HTTP(405, '%s error' % extension.upper())
        return XML(ouput)
    return g

def latex_from_html(html):
    markmin=TAG(html).element('body').flatten(markmin_serializer)
    return XML(markmin2latex(markmin))

def pdflatex_from_html(html):
    if os.system('which pdflatex > /dev/null')==0:
        markmin=TAG(html).element('body').flatten(markmin_serializer)
        out,warning,errors=markmin2pdf(markmin)
        if errors:
            current.response.headers['Content-Type']='text/html'
            raise HTTP(405,HTML(BODY(H1('errors'),
                                     LU(*errors),
                                     H1('warnings'),
                                     LU(*warnings))).xml())
        else:
            return XML(out)

def pyfpdf_from_html(html):
    request = current.request
    def image_map(path):
        if path.startswith('/%s/static/' % request.application):
            return os.path.join(request.folder,path.split('/',2)[2])
        return 'http%s://%s%s' % (request.is_https and 's' or '',request.env.http_host, path)
    class MyFPDF(FPDF, HTMLMixin): pass
    pdf=MyFPDF()
    pdf.add_page()
    html = sanitize(html, escape=False)  #### should have better list of allowed tags
    pdf.write_html(html,image_map=image_map)
    return XML(pdf.output(dest='S'))

def pdf_from_html(html):
    # try use latex and pdflatex
    if os.system('which pdflatex > /dev/null')==0:
        return pdflatex_from_html(html)
    else:
        return pyfpdf_from_html(html)

Added gluon/contrib/gql.py version [3aaca8ca98].







1
2
3
4
5
6
+
+
+
+
+
+
# this file exists for backward compatibility

__all__ = ['DAL','Field','drivers','gae']

from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType, gae

Added gluon/contrib/login_methods/__init__.py version [adc83b19e7].


1
+

Added gluon/contrib/login_methods/basic_auth.py version [2e3886c513].

























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import urllib
import urllib2
import base64


def basic_auth(server="http://127.0.0.1"):
    """
    to use basic login with a different server
    from gluon.contrib.login_methods.basic_auth import basic_auth
    auth.settings.login_methods.append(basic_auth('http://server'))
    """

    def basic_login_aux(username,
            password,
            server=server):
        key = base64.b64encode(username+':'+password)
        headers = {'Authorization': 'Basic ' + key}
        request = urllib2.Request(server, None, headers)
        try:
            urllib2.urlopen(request)
            return True
        except (urllib2.URLError, urllib2.HTTPError):
            return False
    return basic_login_aux

Added gluon/contrib/login_methods/cas_auth.py version [d133c59928].




































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2

Tinkered by Szabolcs Gyuris < szimszo n @ o regpreshaz dot eu>
"""

from gluon import current, redirect

class CasAuth( object ):
    """
    Login will be done via Web2py's CAS application, instead of web2py's
    login form.

    Include in your model (eg db.py)::

        from gluon.contrib.login_methods.cas_auth import CasAuth
        auth.define_tables(username=True)
        auth.settings.login_form=CasAuth(
            urlbase = "https://[your CAS provider]/app/default/user/cas",
                       actions=['login','validate','logout'])

    where urlbase is the actual CAS server url without the login,logout...
    Enjoy.

    ###UPDATE###
    if you want to connect to a CAS version 2 JASIG Server use this:
        auth.settings.login_form=CasAuth(
            urlbase = "https://[Your CAS server]/cas",
            actions = ['login','serviceValidate','logout'],
            casversion = 2,
            casusername = "cas:user")

    where casusername is the xml node returned by CAS server which contains
    user's username.

    """
    def __init__(self, g=None, ### g for backward compatibility ###
                 urlbase = "https://web2py.com/cas/cas",
                 actions=['login','check','logout'],
                 maps=dict(username=lambda v:v.get('username',v['user']),
                           email=lambda v:v.get('email',None),
                           user_id=lambda v:v['user']),
                 casversion = 1,
                 casusername = 'cas:user'
                 ):
        self.urlbase=urlbase
        self.cas_login_url="%s/%s"%(self.urlbase,actions[0])
        self.cas_check_url="%s/%s"%(self.urlbase,actions[1])
        self.cas_logout_url="%s/%s"%(self.urlbase,actions[2])
        self.maps=maps
        self.casversion = casversion
        self.casusername = casusername
        http_host=current.request.env.http_x_forwarded_host
        if not http_host: http_host=current.request.env.http_host
        if current.request.env.wsgi_url_scheme in [ 'https', 'HTTPS' ]: 
            scheme = 'https' 
        else: 
            scheme = 'http' 
        self.cas_my_url='%s://%s%s'%( scheme, http_host, current.request.env.path_info ) 
    
    def login_url( self, next = "/" ):
        current.session.token=self._CAS_login()
        return next
    def logout_url( self, next = "/" ):
        current.session.token=None
        current.session.auth=None
        self._CAS_logout()
        return next
    def get_user( self ):
        user=current.session.token
        if user:
            d = {'source':'web2py cas'}
            for key in self.maps:
                d[key]=self.maps[key](user)
            return d
        return None
    def _CAS_login( self ):
        """
        exposed as CAS.login(request)
        returns a token on success, None on failed authentication
        """
        import urllib
        self.ticket=current.request.vars.ticket
        if not current.request.vars.ticket:
            redirect( "%s?service=%s"% (self.cas_login_url,
                                        self.cas_my_url))
        else:
            url="%s?service=%s&ticket=%s" % (self.cas_check_url,
                                             self.cas_my_url,
                                             self.ticket )
            data=urllib.urlopen( url ).read()
            if data.startswith('yes') or data.startswith('no'):
                data = data.split('\n')
                if data[0]=='yes':
                    a,b,c = data[1].split( ':' )+[None,None]
                    return dict(user=a,email=b,username=c)
                return None
            import xml.dom.minidom as dom
            import xml.parsers.expat as expat
            try:
                dxml=dom.parseString(data)
                envelop = dxml.getElementsByTagName("cas:authenticationSuccess")
                if len(envelop)>0:
                    res = dict()
                    for x in envelop[0].childNodes:
                        if x.nodeName.startswith('cas:') and len(x.childNodes):
                            key = x.nodeName[4:].encode('utf8')
                            value = x.childNodes[0].nodeValue.encode('utf8')
                            if not key in res:
                                res[key]=value
                            else:
                                if not isinstance(res[key],list):
                                    res[key]=[res[key]]
                                res[key].append(value)
                    return res
            except expat.ExpatError: pass
            return None # fallback


    def _CAS_logout( self ):
        """
        exposed CAS.logout()
        redirects to the CAS logout page
        """
        import urllib
        redirect("%s?service=%s" % (self.cas_logout_url,self.cas_my_url))

Added gluon/contrib/login_methods/email_auth.py version [e3e7a81207].





































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import smtplib


def email_auth(server="smtp.gmail.com:587",
               domain="@gmail.com"):
    """
    to use email_login:
    from gluon.contrib.login_methods.email_auth import email_auth
    auth.settings.login_methods.append(email_auth("smtp.gmail.com:587",
                                                  "@gmail.com"))
    """

    def email_auth_aux(email,
                       password,
                       server=server,
                       domain=domain):
        if domain:
            if not isinstance(domain,(list,tuple)):
                domain=[str(domain)]
            if not [d for d in domain if email[-len(d):]==d]:
                return False
        (host, port) = server.split(':')
        try:
            server = None
            server = smtplib.SMTP(host, port)
            server.ehlo()
            server.starttls()
            server.ehlo()
            server.login(email, password)
            server.quit()
            return True
        except:
            if server:
                server.quit()
            return False
    return email_auth_aux

Added gluon/contrib/login_methods/extended_login_form.py version [3b801e0ba3].







































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# coding: utf8

"""
ExtendedLoginForm is used to extend normal login form in web2py with one more login method.
So user can choose the built-in login or extended login methods.
"""

from gluon.html import DIV

class ExtendedLoginForm(object):
    """
    Put extended_login_form under web2py/gluon/contrib/login_methods folder.
    Then inside your model where defines the auth:

    auth = Auth(globals(),db)              # authentication/authorization
    ...
    auth.define_tables()                   # You might like to put the code after auth.define_tables
    ...                                    # if the alt_login_form deals with tables of auth.

    alt_login_form = RPXAccount(request,
                                api_key="...",
                                domain="...",
                                url = "http://localhost:8000/%s/default/user/login" % request.application)
    extended_login_form = ExtendedLoginForm(auth, alt_login_form, signals=['token'])

    auth.settings.login_form = extended_login_form

    Note:
        Since rpx_account doesn't create the password for the user, you
        might need to provide a way for user to create password to do
        normal login.

    """

    def __init__(self,
                 auth,
                 alt_login_form,
                 signals=[],
                 login_arg = 'login'
                 ):
        self.auth = auth
        self.alt_login_form = alt_login_form
        self.signals = signals
        self.login_arg = login_arg

    def get_user(self):
        """
        Delegate the get_user to alt_login_form.get_user.
        """
        if hasattr(self.alt_login_form, 'get_user'):
            return self.alt_login_form.get_user()
        return None # let gluon.tools.Auth.get_or_create_user do the rest

    def login_url(self, next):
        """
        Optional implement for alt_login_form.

        In normal case, this should be replaced by get_user, and never get called.
        """
        if hasattr(self.alt_login_form, 'login_url'):
            return self.alt_login_form.login_url(next)
        return self.auth.settings.login_url

    def logout_url(self, next):
        """
        Optional implement for alt_login_form.

        Called if bool(alt_login_form.get_user) is True.

        If alt_login_form implemented logout_url function, it will return that function call.
        """
        if hasattr(self.alt_login_form, 'logout_url'):
            return self.alt_login_form.logout_url(next)
        return next

    def login_form(self):
        """
        Combine the auth() form with alt_login_form.

        If signals are set and a parameter in request matches any signals,
        it will return the call of alt_login_form.login_form instead.
        So alt_login_form can handle some particular situations, for example,
        multiple steps of OpenID login inside alt_login_form.login_form.

        Otherwise it will render the normal login form combined with
        alt_login_form.login_form.
        """
        request = self.auth.environment.request
        args = request.args

        if (self.signals and
            any([True for signal in self.signals if request.vars.has_key(signal)])
           ):
            return self.alt_login_form.login_form()

        self.auth.settings.login_form = self.auth
        form = DIV(self.auth())
        self.auth.settings.login_form = self

        form.components.append(self.alt_login_form.login_form())
        return form

Added gluon/contrib/login_methods/gae_google_account.py version [d7134f9326].






































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2

Thanks to Hans Donner <hans.donner@pobox.com> for GaeGoogleAccount.
"""

from google.appengine.api import users

class GaeGoogleAccount(object):
    """
    Login will be done via Google's Appengine login object, instead of web2py's
    login form.

    Include in your model (eg db.py)::

        from gluon.contrib.login_methods.gae_google_account import \
            GaeGoogleAccount
        auth.settings.login_form=GaeGoogleAccount()

    """

    def login_url(self, next="/"):
        return users.create_login_url(next)

    def logout_url(self, next="/"):
        return users.create_logout_url(next)

    def get_user(self):
        user = users.get_current_user()
        if user:
            return dict(nickname=user.nickname(), email=user.email(),
                        user_id=user.user_id(), source="google account")

Added gluon/contrib/login_methods/ldap_auth.py version [a193ec84c7].











































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import sys
import logging
try:
    import ldap
    ldap.set_option(ldap.OPT_REFERRALS, 0)
except Exception, e:
    logging.error('missing ldap, try "easy_install python-ldap"')
    raise e


def ldap_auth(server='ldap', port=None,
            base_dn='ou=users,dc=domain,dc=com',
            mode='uid', secure=False, cert_path=None, bind_dn=None, bind_pw=None, filterstr='objectClass=*'):
    """
    to use ldap login with MS Active Directory::

        from gluon.contrib.login_methods.ldap_auth import ldap_auth
        auth.settings.login_methods.append(ldap_auth(
            mode='ad', server='my.domain.controller',
            base_dn='ou=Users,dc=domain,dc=com'))

    to use ldap login with Notes Domino::

        auth.settings.login_methods.append(ldap_auth(
            mode='domino',server='my.domino.server'))

    to use ldap login with OpenLDAP::

        auth.settings.login_methods.append(ldap_auth(
            server='my.ldap.server', base_dn='ou=Users,dc=domain,dc=com'))

    to use ldap login with OpenLDAP and subtree search and (optionally) multiple DNs:

        auth.settings.login_methods.append(ldap_auth(
            mode='uid_r', server='my.ldap.server',
            base_dn=['ou=Users,dc=domain,dc=com','ou=Staff,dc=domain,dc=com']))

    or (if using CN)::

        auth.settings.login_methods.append(ldap_auth(
            mode='cn', server='my.ldap.server',
            base_dn='ou=Users,dc=domain,dc=com'))

    If using secure ldaps:// pass secure=True and cert_path="..."

    If you need to bind to the directory with an admin account in order to search it then specify bind_dn & bind_pw to use for this.
    - currently only implemented for Active Directory

    If you need to restrict the set of allowed users (e.g. to members of a department) then specify
    a rfc4515 search filter string.
    - currently only implemented for mode in ['ad', 'company', 'uid_r']
    """

    def ldap_auth_aux(username,
                      password,
                      ldap_server=server,
                      ldap_port=port,
                      ldap_basedn=base_dn,
                      ldap_mode=mode,
                      ldap_binddn=bind_dn,
                      ldap_bindpw=bind_pw,
                      secure=secure,
                      cert_path=cert_path,
                      filterstr=filterstr):
        try:
            if secure:
                if not ldap_port:
                    ldap_port = 636
                con = ldap.initialize(
                    "ldaps://" + ldap_server + ":" + str(ldap_port))
                if cert_path:
                    con.set_option(ldap.OPT_X_TLS_CACERTDIR, cert_path)
            else:
                if not ldap_port:
                    ldap_port = 389
                con = ldap.initialize(
                    "ldap://" + ldap_server + ":" + str(ldap_port))

            if ldap_mode == 'ad':
                # Microsoft Active Directory
                if '@' not in username:
                    domain = []
                    for x in ldap_basedn.split(','):
                        if "DC=" in x.upper():
                            domain.append(x.split('=')[-1])
                    username = "%s@%s" % (username, '.'.join(domain))
                username_bare = username.split("@")[0]
                con.set_option(ldap.OPT_PROTOCOL_VERSION, 3)
                if ldap_binddn:
                    # need to search directory with an admin account 1st
                    con.simple_bind_s(ldap_binddn, ldap_bindpw)
                else:
                    # credentials should be in the form of username@domain.tld
                    con.simple_bind_s(username, password)
                # this will throw an index error if the account is not found
                # in the ldap_basedn
                result = con.search_ext_s(
                    ldap_basedn, ldap.SCOPE_SUBTREE,
                    "(&(sAMAccountName=%s)(%s))" % (username_bare, filterstr), ["sAMAccountName"])[0][1]
                if ldap_binddn:
                    # We know the user exists & is in the correct OU
                    # so now we just check the password
                    con.simple_bind_s(username, password)

            if ldap_mode == 'domino':
                # Notes Domino
                if "@" in username:
                    username = username.split("@")[0]
                con.simple_bind_s(username, password)

            if ldap_mode == 'cn':
                # OpenLDAP (CN)
                dn = "cn=" + username + "," + ldap_basedn
                con.simple_bind_s(dn, password)

            if ldap_mode == 'uid':
                # OpenLDAP (UID)
                dn = "uid=" + username + "," + ldap_basedn
                con.simple_bind_s(dn, password)

            if ldap_mode == 'company':
                # no DNs or password needed to search directory
                dn = ""
                pw = ""
                # bind anonymously
                con.simple_bind_s(dn, pw)
                # search by e-mail address
                filter = '(&(mail=' + username + ')(' + filterstr + '))'
                # find the uid
                attrs = ['uid']
                # perform the actual search
                company_search_result=con.search_s(ldap_basedn,
                                                   ldap.SCOPE_SUBTREE,
                                                   filter, attrs)
                dn = company_search_result[0][0]
                # perform the real authentication test
                con.simple_bind_s(dn, password)

            if ldap_mode == 'uid_r':
                # OpenLDAP (UID) with subtree search and multiple DNs
                if type(ldap_basedn) == type([]):
                    basedns = ldap_basedn
                else:
                    basedns = [ldap_basedn]
                filter = '(&(uid=%s)(%s))' % (username, filterstr)
                for basedn in basedns:
                    try:
                        result = con.search_s(basedn, ldap.SCOPE_SUBTREE, filter)
                        if result:
                            user_dn = result[0][0]
                            # Check the password
                            con.simple_bind_s(user_dn, password)
                            con.unbind()
                            return True
                    except ldap.LDAPError, detail:
                        (exc_type, exc_value) = sys.exc_info()[:2]
                        sys.stderr.write("ldap_auth: searching %s for %s resulted in %s: %s\n" %
                                         (basedn, filter, exc_type, exc_value))
                return False

            con.unbind()
            return True
        except ldap.LDAPError, e:
            return False
        except IndexError, ex: # for AD membership test
            return False

    if filterstr[0] == '(' and filterstr[-1] == ')': # rfc4515 syntax
        filterstr = filterstr[1:-1] # parens added again where used
    return ldap_auth_aux

Added gluon/contrib/login_methods/linkedin_account.py version [895fd3ad22].



















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2

Thanks to Hans Donner <hans.donner@pobox.com> for GaeGoogleAccount.
"""

from gluon.http import HTTP
try:
    import linkedin
except ImportError:
    raise HTTP(400,"linkedin module not found")

class LinkedInAccount(object):
    """
    Login will be done via Google's Appengine login object, instead of web2py's
    login form.

    Include in your model (eg db.py)::

        from gluon.contrib.login_methods.linkedin_account import LinkedInAccount
        auth.settings.login_form=LinkedInAccount(request,KEY,SECRET,RETURN_URL)

    """

    def __init__(self,request,key,secret,return_url):
        self.request = request
        self.api = linkedin.LinkedIn(key,secret,return_url)
        self.token = result = self.api.requestToken()

    def login_url(self, next="/"):
        return self.api.getAuthorizeURL(self.token)

    def logout_url(self, next="/"):
        return ''

    def get_user(self):
        result = self.request.vars.verifier and self.api.accessToken(verifier = self.request.vars.verifier )
        if result:
            profile = self.api.GetProfile()
            profile = self.api.GetProfile(profile).public_url = "http://www.linkedin.com/in/ozgurv"
            return dict(first_name = profile.first_name,
                        last_name = profile.last_name,
                        username = profile.id)

Added gluon/contrib/login_methods/loginza.py version [9d60d8dc81].
















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
   Loginza.ru authentication for web2py
   Developed by Vladimir Dronnikov (Copyright © 2011)
   Email <dronnikov@gmail.com>
"""

import urllib
from gluon.html import *
from gluon.tools import fetch
from gluon.storage import Storage
import gluon.contrib.simplejson as json

class Loginza(object):

    """
    from gluon.contrib.login_methods.loginza import Loginza
    auth.settings.login_form = Loginza(request,
        url = "http://localhost:8000/%s/default/user/login" % request.application)
    """

    def __init__(self,
                 request,
                 url = "",
                 embed = True,
                 auth_url = "http://loginza.ru/api/authinfo",
                 language = "en",
                 prompt = "loginza",
                 on_login_failure = None,
                ):

        self.request = request
        self.token_url = url
        self.embed = embed
        self.auth_url = auth_url
        self.language = language
        self.prompt = prompt
        self.profile = None
        self.on_login_failure = on_login_failure
        self.mappings = Storage()

        # TODO: profile.photo is the URL to the picture
        # Howto download and store it locally?
        # FIXME: what if email is unique=True

        self.mappings["http://twitter.com/"] = lambda profile:\
            dict(registration_id = profile.get("identity",""),
                 username = profile.get("nickname",""),
                 email = profile.get("email",""),
                 last_name = profile.get("name","").get("full_name",""),
                 #avatar = profile.get("photo",""),
            )
        self.mappings["https://www.google.com/accounts/o8/ud"] = lambda profile:\
            dict(registration_id = profile.get("identity",""),
                 username = profile.get("name","").get("full_name",""),
                 email = profile.get("email",""),
                 first_name = profile.get("name","").get("first_name",""),
                 last_name = profile.get("name","").get("last_name",""),
                 #avatar = profile.get("photo",""),
            )
        self.mappings["http://vkontakte.ru/"] = lambda profile:\
            dict(registration_id=profile.get("identity",""),
                 username = profile.get("name","").get("full_name",""),
                 email = profile.get("email",""),
                 first_name = profile.get("name","").get("first_name",""),
                 last_name = profile.get("name","").get("last_name",""),
                 #avatar = profile.get("photo",""),
            )
        self.mappings.default = lambda profile:\
            dict(registration_id = profile.get("identity",""),
                 username = profile.get("name","").get("full_name"),
                 email = profile.get("email",""),
                 first_name = profile.get("name","").get("first_name",""),
                 last_name = profile.get("name","").get("last_name",""),
                 #avatar = profile.get("photo",""),
            )

    def get_user(self):
        request = self.request
        if request.vars.token:
            user = Storage()
            data = urllib.urlencode(dict(token = request.vars.token))
            auth_info_json = fetch(self.auth_url+'?'+data)
            #print auth_info_json
            auth_info = json.loads(auth_info_json)
            if auth_info["identity"] != None:
                self.profile = auth_info
                provider = self.profile["provider"]
                user = self.mappings.get(provider, self.mappings.default)(self.profile)
                #user["password"] = ???
                #user["avatar"] = ???
                return user
            elif self.on_login_failure:
                redirect(self.on_login_failure)
        return None

    def login_form(self):
        request = self.request
        args = request.args
        LOGINZA_URL = "https://loginza.ru/api/widget?lang=%s&token_url=%s&overlay=loginza"
        if self.embed:
            form = IFRAME(_src=LOGINZA_URL % (self.language, self.token_url),
                          _scrolling="no",
                          _frameborder="no",
                          _style="width:359px;height:300px;")
        else:
            form = DIV(A(self.prompt, _href=LOGINZA_URL % (self.language, self.token_url), _class="loginza"),
                   SCRIPT(_src="https://s3-eu-west-1.amazonaws.com/s1.loginza.ru/js/widget.js", _type="text/javascript"))
        return form

Added gluon/contrib/login_methods/oauth10a_account.py version [5c58b0dc60].






























































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Written by Michele Comitini <mcm@glisco.it>
License: GPL v3

Adds support for  OAuth1.0a authentication to web2py.

Dependencies:
 - python-oauth2 (http://github.com/simplegeo/python-oauth2)

"""

import oauth2 as oauth
import cgi

from urllib2 import urlopen
import urllib2
from urllib import urlencode

class OAuthAccount(object):
    """
    Login will be done via   OAuth Framework, instead of web2py's
    login form.

    Include in your model (eg db.py)::
        # define the auth_table before call to auth.define_tables()
        auth_table = db.define_table(
           auth.settings.table_user_name,
           Field('first_name', length=128, default=""),
           Field('last_name', length=128, default=""),
           Field('username', length=128, default="", unique=True),
           Field('password', 'password', length=256,
           readable=False, label='Password'),
           Field('registration_key', length=128, default= "",
           writable=False, readable=False))

        auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username)
        .
        .
        .
        auth.define_tables()
        .
        .
        .

        CLIENT_ID=\"<put your fb application id here>\"
        CLIENT_SECRET=\"<put your fb application secret here>\"
        AUTH_URL="..."
        TOKEN_URL="..."
        ACCESS_TOKEN_URL="..."
        from gluon.contrib.login_methods.oauth10a_account import OAuthAccount
        auth.settings.login_form=OAuthAccount(globals(),CLIENT_ID,CLIENT_SECRET, AUTH_URL, TOKEN_URL, ACCESS_TOKEN_URL)

    """

    def __redirect_uri(self, next=None):
        """Build the uri used by the authenticating server to redirect
        the client back to the page originating the auth request.
        Appends the _next action to the generated url so the flows continues.
        """
        r = self.request
        http_host=r.env.http_x_forwarded_for
        if not http_host: http_host=r.env.http_host

        url_scheme = r.env.wsgi_url_scheme
        if next:
            path_info = next
        else:
            path_info = r.env.path_info
        uri = '%s://%s%s' %(url_scheme, http_host, path_info)
        if r.get_vars and not next:
            uri += '?' + urlencode(r.get_vars)
        return uri


    def accessToken(self):
        """Return the access token generated by the authenticating server.

        If token is already in the session that one will be used.
        Otherwise the token is fetched from the auth server.

        """

        if self.session.access_token:
            # return the token (TODO: does it expire?)

            return self.session.access_token
        if self.session.request_token:
            # Exchange the request token with an authorization token.
            token = self.session.request_token
            self.session.request_token = None

            # Build an authorized client
            # OAuth1.0a put the verifier!
            token.set_verifier(self.request.vars.oauth_verifier)
            client = oauth.Client(self.consumer, token)


            resp, content = client.request(self.access_token_url, "POST")
            if str(resp['status']) != '200':
                self.session.request_token = None
                self.globals['redirect'](self.globals['URL'](f='user',args='logout'))


            self.session.access_token = oauth.Token.from_string(content)

            return self.session.access_token

        self.session.access_token = None
        return None

    def __init__(self, g, client_id, client_secret, auth_url,  token_url, access_token_url):
        self.globals = g
        self.client_id = client_id
        self.client_secret = client_secret
        self.code = None
        self.request = g['request']
        self.session = g['session']
        self.auth_url = auth_url
        self.token_url = token_url
        self.access_token_url = access_token_url

        # consumer init
        self.consumer = oauth.Consumer(self.client_id, self.client_secret)


    def login_url(self, next="/"):
        self.__oauth_login(next)
        return next

    def logout_url(self, next="/"):
        self.session.request_token = None
        self.session.access_token = None
        return next

    def get_user(self):
        '''Get user data.

        Since OAuth does not specify what a user
        is, this function must be implemented for the specific
        provider.
        '''
        raise NotImplementedError, "Must override get_user()"

    def __oauth_login(self, next):
        '''This method redirects the user to the authenticating form
        on authentication server if the authentication code
        and the authentication token are not available to the
        application yet.

        Once the authentication code has been received this method is
        called to set the access token into the session by calling
        accessToken()
        '''

        if not self.accessToken():
            # setup the client
            client = oauth.Client(self.consumer, None)
            # Get a request token.
            # oauth_callback *is REQUIRED* for OAuth1.0a
            # putting it in the body seems to work.
            callback_url = self.__redirect_uri(next)
            data = urlencode(dict(oauth_callback=callback_url))
            resp, content = client.request(self.token_url, "POST",  body=data)
            if resp['status'] != '200':
                self.session.request_token = None
                self.globals['redirect'](self.globals['URL'](f='user',args='logout'))

            # Store the request token in session.
            request_token = self.session.request_token = oauth.Token.from_string(content)

            # Redirect the user to the authentication URL and pass the callback url.
            data = urlencode(dict(oauth_token=request_token.key,
                                  oauth_callback=callback_url))
            auth_request_url = self.auth_url + '?' +data


            HTTP = self.globals['HTTP']


            raise HTTP(307,
                       "You are not authenticated: you are being redirected to the <a href='" + auth_request_url + "'> authentication server</a>",
                       Location=auth_request_url)

        return None


Added gluon/contrib/login_methods/oauth20_account.py version [a0753ce99b].















































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Written by Michele Comitini <mcm@glisco.it>
License: GPL v3

Adds support for  OAuth 2.0 authentication to web2py.

OAuth 2.0 Draft:  http://tools.ietf.org/html/draft-ietf-oauth-v2-10
"""

import time
import cgi

from urllib2 import urlopen
import urllib2
from urllib import urlencode

class OAuthAccount(object):
    """
    Login will be done via   OAuth Framework, instead of web2py's
    login form.

    Include in your model (eg db.py)::
        # define the auth_table before call to auth.define_tables()
        auth_table = db.define_table(
           auth.settings.table_user_name,
           Field('first_name', length=128, default=""),
           Field('last_name', length=128, default=""),
           Field('username', length=128, default="", unique=True),
           Field('password', 'password', length=256,
           readable=False, label='Password'),
           Field('registration_key', length=128, default= "",
           writable=False, readable=False))

        auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username)
        .
        .
        .
        auth.define_tables()
        .
        .
        .

        CLIENT_ID=\"<put your fb application id here>\"
        CLIENT_SECRET=\"<put your fb application secret here>\"
        AUTH_URL="http://..."
        TOKEN_URL="http://..."
        from gluon.contrib.login_methods.oauth20_account import OAuthAccount
        auth.settings.login_form=OAuthAccount(globals(),CLIENT_ID,CLIENT_SECRET,AUTH_URL, TOKEN_URL, **args )
    Any optional arg will be passed as is to remote server for requests.
    It can be used for the optional "scope" parameters for Facebook.
    """
    def __redirect_uri(self, next=None):
        """Build the uri used by the authenticating server to redirect
        the client back to the page originating the auth request.
        Appends the _next action to the generated url so the flows continues.
        """

        r = self.request
        http_host=r.env.http_x_forwarded_for
        if not http_host: http_host=r.env.http_host

        url_scheme = r.env.wsgi_url_scheme
        if next:
            path_info = next
        else:
            path_info = r.env.path_info
        uri = '%s://%s%s' %(url_scheme, http_host, path_info)
        if r.get_vars and not next:
            uri += '?' + urlencode(r.get_vars)
        return uri


    def __build_url_opener(self, uri):
        """Build the url opener for managing HTTP Basic Athentication"""
        # Create an OpenerDirector with support for Basic HTTP Authentication...
        auth_handler = urllib2.HTTPBasicAuthHandler()
        auth_handler.add_password(None,
                                  uri,
                                  self.client_id,
                                  self.client_secret)
        opener = urllib2.build_opener(auth_handler)
        return opener


    def accessToken(self):
        """Return the access token generated by the authenticating server.

        If token is already in the session that one will be used.
        Otherwise the token is fetched from the auth server.

        """
        if self.session.token and self.session.token.has_key('expires'):
            expires = self.session.token['expires']
            # reuse token until expiration
            if expires == 0 or expires > time.time():
                        return self.session.token['access_token']
        if self.session.code:
            data = dict(client_id=self.client_id,
                        client_secret=self.client_secret,
                        redirect_uri=self.session.redirect_uri,
                        response_type='token', code=self.session.code)


            if self.args:
                data.update(self.args)
            open_url = None
            opener = self.__build_url_opener(self.token_url)
            try:
                open_url = opener.open(self.token_url, urlencode(data))
            except urllib2.HTTPError, e:
                raise Exception(e.read())
            finally:
                del self.session.code # throw it away

            if open_url:
                try:
                    tokendata = cgi.parse_qs(open_url.read())
                    self.session.token = dict([(k,v[-1]) for k,v in tokendata.items()])
                    # set expiration absolute time try to avoid broken
                    # implementations where "expires_in" becomes "expires"
                    if self.session.token.has_key('expires_in'):
                        exps = 'expires_in'
                    else:
                        exps = 'expires'
                    self.session.token['expires'] = int(self.session.token[exps]) + \
                        time.time()
                finally:
                    opener.close()
                return self.session.token['access_token']

        self.session.token = None
        return None

    def __init__(self, g, client_id, client_secret, auth_url, token_url, **args):
        self.globals = g
        self.client_id = client_id
        self.client_secret = client_secret
        self.request = g['request']
        self.session = g['session']
        self.auth_url = auth_url
        self.token_url = token_url
        self.args = args

    def login_url(self, next="/"):
        self.__oauth_login(next)
        return next

    def logout_url(self, next="/"):
        del self.session.token
        return next

    def get_user(self):
        '''Returns the user using the Graph API.
        '''
        raise NotImplementedError, "Must override get_user()"
        if not self.accessToken():
            return None

        if not self.graph:
            self.graph = GraphAPI((self.accessToken()))

        user = None
        try:
            user = self.graph.get_object("me")
        except GraphAPIError:
            self.session.token = None
            self.graph = None

        if user:
            return dict(first_name = user['first_name'],
                        last_name = user['last_name'],
                        username = user['id'])



    def __oauth_login(self, next):
        '''This method redirects the user to the authenticating form
        on authentication server if the authentication code
        and the authentication token are not available to the
        application yet.

        Once the authentication code has been received this method is
        called to set the access token into the session by calling
        accessToken()
        '''
        if not self.accessToken():
            if not self.request.vars.code:
                self.session.redirect_uri=self.__redirect_uri(next)
                data = dict(redirect_uri=self.session.redirect_uri,
                                  response_type='code',
                                  client_id=self.client_id)
                if self.args:
                    data.update(self.args)
                auth_request_url = self.auth_url + "?" +urlencode(data)
                HTTP = self.globals['HTTP']
                raise HTTP(307,
                           "You are not authenticated: you are being redirected to the <a href='" + auth_request_url + "'> authentication server</a>",
                           Location=auth_request_url)
            else:
                self.session.code = self.request.vars.code
                self.accessToken()
                return self.session.code
        return None

Added gluon/contrib/login_methods/openid_auth.py version [c162874b83].
























































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# coding: utf8

"""
    OpenID authentication for web2py

    Allowed using OpenID login together with web2py built-in login.

    By default, to support OpenID login, put this in your db.py

    >>> from gluon.contrib.login_methods.openid_auth import OpenIDAuth
    >>> auth.settings.login_form = OpenIDAuth(auth)

    To show OpenID list in user profile, you can add the following code
    before the end of function user() of your_app/controllers/default.py

    +     if (request.args and request.args(0) == "profile"):
    +         form = DIV(form, openid_login_form.list_user_openids())
        return dict(form=form, login_form=login_form, register_form=register_form, self_registration=self_registration)

    More detail in the description of the class OpenIDAuth.

    Requirements:
        python-openid version 2.2.5 or later

    Reference:
        * w2p openID
          http://w2popenid.appspot.com/init/default/wiki/w2popenid
        * RPX and web2py auth module
          http://www.web2pyslices.com/main/slices/take_slice/28
        * built-in file: gluon/contrib/login_methods/rpx_account.py
        * built-in file: gluon/tools.py (Auth class)
"""
import time
from datetime import datetime, timedelta

from gluon import *
from gluon.storage import Storage, Messages

try:
    import openid.consumer.consumer
    from openid.association import Association
    from openid.store.interface import OpenIDStore
    from openid.extensions.sreg import SRegRequest, SRegResponse
    from openid.store import nonce
    from openid.consumer.discover import DiscoveryFailure
except ImportError, err:
    raise ImportError("OpenIDAuth requires python-openid package")

DEFAULT = lambda: None

class OpenIDAuth(object):
    """
    OpenIDAuth

    It supports the logout_url, implementing the get_user and login_form
    for cas usage of gluon.tools.Auth.

    It also uses the ExtendedLoginForm to allow the OpenIDAuth login_methods
    combined with the standard logon/register procedure.

    It uses OpenID Consumer when render the form and begins the OpenID
    authentication.

    Example: (put these code after auth.define_tables() in your models.)

    auth = Auth(globals(), db)                # authentication/authorization
    ...
    auth.define_tables()                      # creates all needed tables
    ...

    #include in your model after auth has been defined
    from gluon.contrib.login_methods.openid_auth import OpenIDAuth
    openid_login_form = OpenIDAuth(request, auth, db)

    from gluon.contrib.login_methods.extended_login_form import ExtendedLoginForm
    extended_login_form = ExtendedLoginForm(request, auth, openid_login_form,
                                            signals=['oid','janrain_nonce'])

    auth.settings.login_form = extended_login_form
    """

    def __init__(self, auth):
        self.auth = auth
        self.db = auth.db

        request = current.request
        self.nextvar = '_next'
        self.realm = 'http://%s' % request.env.http_host
        self.login_url = URL(r=request, f='user', args=['login'])
        self.return_to_url = self.realm + self.login_url

        self.table_alt_logins_name = "alt_logins"
        if not auth.settings.table_user:
            raise
        self.table_user = self.auth.settings.table_user
        self.openid_expiration = 15 #minutes

        self.messages = self._define_messages()

        if not self.table_alt_logins_name in self.db.tables:
            self._define_alt_login_table()

    def _define_messages(self):
        messages = Messages(current.T)
        messages.label_alt_login_username = 'Sign-in with OpenID: '
        messages.label_add_alt_login_username = 'Add a new OpenID: '
        messages.submit_button = 'Sign in'
        messages.submit_button_add = 'Add'
        messages.a_delete = 'Delete'
        messages.comment_openid_signin = 'What is OpenID?'
        messages.comment_openid_help_title = 'Start using your OpenID'
        messages.comment_openid_help_url = 'http://openid.net/get-an-openid/start-using-your-openid/'
        messages.openid_fail_discover = 'Failed to discover OpenID service. Check your OpenID or "More about OpenID"?'
        messages.flash_openid_expired = 'OpenID expired. Please login or authenticate OpenID again. Sorry for the inconvenient.'
        messages.flash_openid_associated = 'OpenID associated'
        messages.flash_associate_openid = 'Please login or register an account for this OpenID.'
        messages.p_openid_not_registered = "This Open ID haven't be registered. " \
                + "Please login to associate with it or register an account for it."
        messages.flash_openid_authenticated = 'OpenID authenticated successfully.'
        messages.flash_openid_fail_authentication = 'OpenID authentication failed. (Error message: %s)'
        messages.flash_openid_canceled = 'OpenID authentication canceled by user.'
        messages.flash_openid_need_setup = 'OpenID authentication needs to be setup by the user with the provider first.'
        messages.h_openid_login = 'OpenID Login'
        messages.h_openid_list = 'OpenID List'
        return messages

    def _define_alt_login_table(self):
        """
        Define the OpenID login table.
        Note: type is what I used for our project. We're going to support 'fackbook' and
              'plurk' alternate login methods. Otherwise it's always 'openid' and you
              may not need it. This should be easy to changed.
              (Just remove the field of "type" and remove the
               "and db.alt_logins.type == type_" in _find_matched_openid function)
        """
        db = self.db
        table = db.define_table(
            self.table_alt_logins_name,
            Field('username', length=512, default=''),
            Field('type', length=128, default='openid', readable=False),
            Field('user', self.table_user, readable=False),
        )
        table.username.requires = IS_NOT_IN_DB(db, table.username)
        self.table_alt_logins = table

    def logout_url(self, next):
        """
        Delete the w2popenid record in session as logout
        """
        if current.session.w2popenid:
            del(current.session.w2popenid)
        return next

    def login_form(self):
        """
        Start to process the OpenID response if 'janrain_nonce' in request parameters
        and not processed yet. Else return the OpenID form for login.
        """
        request = current.request
        if request.vars.has_key('janrain_nonce') and not self._processed():
            self._process_response()
            return self.auth()
        return self._form()

    def get_user(self):
        """
        It supports the logout_url, implementing the get_user and login_form
        for cas usage of gluon.tools.Auth.
        """
        request = current.request
        args = request.args

        if args[0] == 'logout':
            return True # Let logout_url got called

        if current.session.w2popenid:
            w2popenid = current.session.w2popenid
            db = self.db
            if (w2popenid.ok is True and w2popenid.oid): # OpenID authenticated
                if self._w2popenid_expired(w2popenid):
                    del(current.session.w2popenid)
                    flash = self.messages.flash_openid_expired
                    current.session.warning = flash
                    redirect(self.auth.settings.login_url)
                oid = self._remove_protocol(w2popenid.oid)
                alt_login = self._find_matched_openid(db, oid)

                nextvar = self.nextvar
                # This OpenID not in the database. If user logged in then add it
                # into database, else ask user to login or register.
                if not alt_login:
                    if self.auth.is_logged_in():
                        # TODO: ask first maybe
                        self._associate_user_openid(self.auth.user, oid)
                        if current.session.w2popenid:
                            del(current.session.w2popenid)
                        current.session.flash = self.messages.flash_openid_associated
                        if request.vars.has_key(nextvar):
                            redirect(request.vars[nextvar])
                        redirect(self.auth.settings.login_next)

                    if not request.vars.has_key(nextvar):
                        # no next var, add it and do login again
                        # so if user login or register can go back here to associate the OpenID
                        redirect(URL(r=request,
                                                      args=['login'],
                                                      vars={nextvar:self.login_url}))
                    self.login_form = self._form_with_notification()
                    current.session.flash = self.messages.flash_associate_openid
                    return None # need to login or register to associate this openid

                # Get existed OpenID user
                user = db(self.table_user.id==alt_login.user).select().first()
                if user:
                    if current.session.w2popenid:
                        del(current.session.w2popenid)
                if 'username' in self.table_user.fields():
                    username = 'username'
                elif 'email' in self.table_user.fields():
                    username = 'email'
                return {username: user[username]} if user else None # login success (almost)

        return None # just start to login

    def _find_matched_openid(self, db, oid, type_='openid'):
        """
        Get the matched OpenID for given
        """
        query = ((db.alt_logins.username == oid) & (db.alt_logins.type == type_))
        alt_login = db(query).select().first() # Get the OpenID record
        return alt_login

    def _associate_user_openid(self, user, oid):
        """
        Associate the user logged in with given OpenID
        """
        # print "[DB] %s authenticated" % oid
        self.db.alt_logins.insert(username=oid, user=user.id)

    def _form_with_notification(self):
        """
        Render the form for normal login with a notice of OpenID authenticated
        """
        form = DIV()
        # TODO: check when will happen
        if self.auth.settings.login_form in (self.auth, self):
            self.auth.settings.login_form = self.auth
            form = DIV(self.auth())

        register_note = DIV(P(self.messages.p_openid_not_registered))
        form.components.append(register_note)
        return lambda: form

    def _remove_protocol(self, oid):
        """
        Remove https:// or http:// from oid url
        """
        protocol = 'https://'
        if oid.startswith(protocol):
            oid = oid[len(protocol):]
            return oid
        protocol = 'http://'
        if oid.startswith(protocol):
            oid = oid[len(protocol):]
            return oid
        return oid

    def _init_consumerhelper(self):
        """
        Initialize the ConsumerHelper
        """
        if not hasattr(self, "consumerhelper"):
            self.consumerhelper = ConsumerHelper(current.session,
                                                 self.db)
        return self.consumerhelper


    def _form(self, style=None):
        form = DIV(H3(self.messages.h_openid_login), self._login_form(style))
        return form

    def _login_form(self,
                    openid_field_label=None,
                    submit_button=None,
                    _next=None,
                    style=None):
        """
        Render the form for OpenID login
        """
        def warning_openid_fail(session):
            session.warning = messages.openid_fail_discover

        style = style or """
background-attachment: scroll;
background-repeat: no-repeat;
background-image: url("http://wiki.openid.net/f/openid-16x16.gif");
background-position: 0% 50%;
background-color: transparent;
padding-left: 18px;
width: 400px;
"""
        style = style.replace("\n","")

        request = current.request
        session = current.session
        messages = self.messages
        hidden_next_input = ""
        if _next == 'profile':
            profile_url = URL(r=request, f='user', args=['profile'])
            hidden_next_input = INPUT(_type="hidden", _name="_next", _value=profile_url)
        form = FORM(openid_field_label or self.messages.label_alt_login_username,
                    INPUT(_type="input", _name="oid",
                          requires=IS_NOT_EMPTY(error_message=messages.openid_fail_discover),
                          _style=style),
                    hidden_next_input,
                    INPUT(_type="submit", _value=submit_button or messages.submit_button),
                    " ",
                    A(messages.comment_openid_signin,
                      _href=messages.comment_openid_help_url,
                      _title=messages.comment_openid_help_title,
                      _class='openid-identifier',
                      _target="_blank"),
                    _action=self.login_url
                   )
        if form.accepts(request.vars, session):
            oid = request.vars.oid
            consumerhelper = self._init_consumerhelper()
            url = self.login_url
            return_to_url = self.return_to_url
            if not oid:
                warning_openid_fail(session)
                redirect(url)
            try:
                if request.vars.has_key('_next'):
                    return_to_url = self.return_to_url + '?_next=' + request.vars._next
                url = consumerhelper.begin(oid, self.realm, return_to_url)
            except DiscoveryFailure:
                warning_openid_fail(session)
            redirect(url)
        return form

    def _processed(self):
        """
        Check if w2popenid authentication is processed.
        Return True if processed else False.
        """
        processed = (hasattr(current.session, 'w2popenid') and
                     current.session.w2popenid.ok is True)
        return processed

    def _set_w2popenid_expiration(self, w2popenid):
        """
        Set expiration for OpenID authentication.
        """
        w2popenid.expiration = datetime.now() + timedelta(minutes=self.openid_expiration)

    def _w2popenid_expired(self, w2popenid):
        """
        Check if w2popenid authentication is expired.
        Return True if expired else False.
        """
        return (not w2popenid.expiration) or (datetime.now() > w2popenid.expiration)

    def _process_response(self):
        """
        Process the OpenID by ConsumerHelper.
        """
        request = current.request
        request_vars = request.vars
        consumerhelper = self._init_consumerhelper()
        process_status = consumerhelper.process_response(request_vars, self.return_to_url)
        if process_status == "success":
            w2popenid = current.session.w2popenid
            user_data = self.consumerhelper.sreg()
            current.session.w2popenid.ok = True
            self._set_w2popenid_expiration(w2popenid)
            w2popenid.user_data = user_data
            current.session.flash = self.messages.flash_openid_authenticated
        elif process_status == "failure":
            flash = self.messages.flash_openid_fail_authentication % consumerhelper.error_message
            current.session.warning = flash
        elif process_status == "cancel":
            current.session.warning = self.messages.flash_openid_canceled
        elif process_status == "setup_needed":
            current.session.warning = self.messages.flash_openid_need_setup

    def list_user_openids(self):
        messages = self.messages
        request = current.request
        if request.vars.has_key('delete_openid'):
            self.remove_openid(request.vars.delete_openid)

        query = self.db.alt_logins.user == self.auth.user.id
        alt_logins = self.db(query).select()
        l = []
        for alt_login in alt_logins:
            username = alt_login.username
            delete_href = URL(r=request, f='user',
                                          args=['profile'],
                                          vars={'delete_openid': username})
            delete_link = A(messages.a_delete, _href=delete_href)
            l.append(LI(username, " ", delete_link))

        profile_url = URL(r=request, f='user', args=['profile'])
        #return_to_url = self.return_to_url + '?' + self.nextvar + '=' + profile_url
        openid_list = DIV(H3(messages.h_openid_list), UL(l),
                          self._login_form(
                              _next='profile',
                              submit_button=messages.submit_button_add,
                              openid_field_label=messages.label_add_alt_login_username)
                         )
        return openid_list


    def remove_openid(self, openid):
        query = self.db.alt_logins.username == openid
        self.db(query).delete()

class ConsumerHelper(object):
    """
    ConsumerHelper knows the python-openid and
    """

    def __init__(self, session, db):
       self.session = session
       store = self._init_store(db)
       self.consumer = openid.consumer.consumer.Consumer(session, store)

    def _init_store(self, db):
        """
        Initialize Web2pyStore
        """
        if not hasattr(self, "store"):
            store = Web2pyStore(db)
            session = self.session
            if not session.has_key('w2popenid'):
                session.w2popenid = Storage()
            self.store = store
        return self.store

    def begin(self, oid, realm, return_to_url):
        """
        Begin the OpenID authentication
        """
        w2popenid = self.session.w2popenid
        w2popenid.oid = oid
        auth_req = self.consumer.begin(oid)
        auth_req.addExtension(SRegRequest(required=['email','nickname']))
        url = auth_req.redirectURL(return_to=return_to_url, realm=realm)
        return url

    def process_response(self, request_vars, return_to_url):
        """
        Complete the process and
        """
        resp = self.consumer.complete(request_vars, return_to_url)
        if resp:
            if resp.status == openid.consumer.consumer.SUCCESS:
                self.resp = resp
                if hasattr(resp, "identity_url"):
                    self.session.w2popenid.oid = resp.identity_url
                return "success"
            if resp.status == openid.consumer.consumer.FAILURE:
                self.error_message = resp.message
                return "failure"
            if resp.status == openid.consumer.consumer.CANCEL:
                return "cancel"
            if resp.status == openid.consumer.consumer.SETUP_NEEDED:
                return "setup_needed"
        return "no resp"

    def sreg(self):
        """
        Try to get OpenID Simple Registation
        http://openid.net/specs/openid-simple-registration-extension-1_0.html
        """
        if self.resp:
            resp = self.resp
            sreg_resp = SRegResponse.fromSuccessResponse(resp)
            return sreg_resp.data if sreg_resp else None
        else:
            return None


class Web2pyStore(OpenIDStore):
    """
    Web2pyStore

    This class implements the OpenIDStore interface. OpenID stores take care
    of persisting nonces and associations. The Janrain Python OpenID library
    comes with implementations for file and memory storage. Web2pyStore uses
    the web2py db abstration layer. See the source code docs of OpenIDStore
    for a comprehensive description of this interface.
    """

    def __init__(self, database):
        self.database = database
        self.table_oid_associations_name = 'oid_associations'
        self.table_oid_nonces_name = 'oid_nonces'
        self._initDB()

    def _initDB(self):

        if self.table_oid_associations_name not in self.database:
            self.database.define_table(self.table_oid_associations_name,
                            Field('server_url', 'string', length=2047, required=True),
                            Field('handle', 'string', length=255, required=True),
                            Field('secret', 'blob', required=True),
                            Field('issued', 'integer', required=True),
                            Field('lifetime', 'integer', required=True),
                            Field('assoc_type', 'string', length=64, required=True)
                           )
        if self.table_oid_nonces_name not in self.database:
            self.database.define_table(self.table_oid_nonces_name,
                            Field('server_url', 'string', length=2047, required=True),
                            Field('timestamp', 'integer', required=True),
                            Field('salt', 'string', length=40, required=True)
                           )

    def storeAssociation(self, server_url, association):
        """
        Store associations. If there already is one with the same
        server_url and handle in the table replace it.
        """

        db = self.database
        query = (db.oid_associations.server_url == server_url) & (db.oid_associations.handle == association.handle)
        db(query).delete()
        db.oid_associations.insert(server_url = server_url,
                                   handle = association.handle,
                                   secret = association.secret,
                                   issued = association.issued,
                                   lifetime = association.lifetime,
                                   assoc_type = association.assoc_type), 'insert '*10

    def getAssociation(self, server_url, handle=None):
        """
        Return the association for server_url and handle. If handle is
        not None return the latests associations for that server_url.
        Return None if no association can be found.
        """

        db = self.database
        query = (db.oid_associations.server_url == server_url)
        if handle:
            query &= (db.oid_associations.handle == handle)
        rows = db(query).select(orderby=db.oid_associations.issued)
        keep_assoc, _ = self._removeExpiredAssocations(rows)
        if len(keep_assoc) == 0:
            return None
        else:
            assoc = keep_assoc.pop() # pop the last one as it should be the latest one
            return Association(assoc['handle'],
                               assoc['secret'],
                               assoc['issued'],
                               assoc['lifetime'],
                               assoc['assoc_type'])

    def removeAssociation(self, server_url, handle):
        db = self.database
        query = (db.oid_associations.server_url == server_url) & (db.oid_associations.handle == handle)
        return db(query).delete() != None

    def useNonce(self, server_url, timestamp, salt):
        """
        This method returns Falase if a nonce has been used before or its
        timestamp is not current.
        """

        db = self.database
        if abs(timestamp - time.time()) > nonce.SKEW:
            return False
        query = (db.oid_nonces.server_url == server_url) & (db.oid_nonces.timestamp == timestamp) & (db.oid_nonces.salt == salt)
        if db(query).count() > 0:
            return False
        else:
           db.oid_nonces.insert(server_url = server_url,
                                timestamp = timestamp,
                                salt = salt)
           return True

    def _removeExpiredAssocations(self, rows):
        """
        This helper function is not part of the interface. Given a list of
        association rows it checks which associations have expired and
        deletes them from the db. It returns a tuple of the form
        ([valid_assoc], no_of_expired_assoc_deleted).
        """

        db = self.database
        keep_assoc = []
        remove_assoc = []
        t1970 = time.time()
        for r in rows:
            if r['issued'] + r['lifetime'] < t1970:
                remove_assoc.append(r)
            else:
                keep_assoc.append(r)
        for r in remove_assoc:
            del db.oid_associations[r['id']]
        return (keep_assoc, len(remove_assoc)) # return tuple (list of valid associations, number of deleted associations)

    def cleanupNonces(self):
        """
        Remove expired nonce entries from DB and return the number
        of entries deleted.
        """

        db = self.database
        query = (db.oid_nonces.timestamp < time.time() - nonce.SKEW)
        return db(query).delete()

    def cleanupAssociations(self):
        """
        Remove expired associations from db and return the number
        of entries deleted.
        """

        db = self.database
        query = (db.oid_associations.id > 0)
        return self._removeExpiredAssocations(db(query).select())[1] #return number of assoc removed

    def cleanup(self):
        """
        This method should be run periodically to free the db from
        expired nonce and association entries.
        """

        return self.cleanupNonces(), self.cleanupAssociations()

Added gluon/contrib/login_methods/pam_auth.py version [b25e852978].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
from gluon.contrib.pam import authenticate

def pam_auth():
    """
    to use pam_login:
    from gluon.contrib.login_methods.pam_auth import pam_auth
    auth.settings.login_methods.append(pam_auth())
    """

    def pam_auth_aux(username, password):
        return authenticate(username, password)

    return pam_auth_aux

Added gluon/contrib/login_methods/rpx_account.py version [fc14c29978].


















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# coding: utf8

"""
   RPX Authentication for web2py
   Developed by Nathan Freeze (Copyright © 2009)
   Email <nathan@freezable.com>
   Modified by Massimo Di Pierro

   This file contains code to allow using RPXNow.com (now Jainrain.com)
   services with web2py
"""

import re
import urllib
from gluon.html import *
from gluon.tools import fetch
from gluon.storage import Storage
import gluon.contrib.simplejson as json

class RPXAccount(object):

    """
    from gluon.contrib.login_methods.rpx_account import RPXAccount
    auth.settings.actions_disabled=['register','change_password','request_reset_password']
    auth.settings.login_form = RPXAccount(request,
              api_key="...",
              domain="...",
              url = "http://localhost:8000/%s/default/user/login" % request.application)
    """

    def __init__(self,
                 request,
                 api_key = "",
                 domain = "",
                 url = "",
                 embed = True,
                 auth_url = "https://rpxnow.com/api/v2/auth_info",
                 language= "en",
                 prompt='rpx',
                 on_login_failure = None,
                 ):

        self.request=request
        self.api_key=api_key
        self.embed = embed
        self.auth_url = auth_url
        self.domain = domain
        self.token_url = url
        self.language = language
        self.profile = None
        self.prompt = prompt
        self.on_login_failure = on_login_failure
        self.mappings = Storage()

        self.mappings.Facebook = lambda profile:\
            dict(registration_id = profile.get("identifier",""),
                 username = profile.get("preferredUsername",""),
                 email = profile.get("email",""),
                 first_name = profile.get("name","").get("givenName",""),
                 last_name = profile.get("name","").get("familyName",""))
        self.mappings.Google = lambda profile:\
            dict(registration_id=profile.get("identifier",""),
                 username=profile.get("preferredUsername",""),
                 email=profile.get("email",""),
                 first_name=profile.get("name","").get("givenName",""),
                 last_name=profile.get("name","").get("familyName",""))
        self.mappings.default = lambda profile:\
            dict(registration_id=profile.get("identifier",""),
                 username=profile.get("preferredUsername",""),
                 email=profile.get("email",""),
                 first_name=profile.get("preferredUsername",""),
                 last_name='')

    def get_user(self):
        request = self.request
        if request.vars.token:
            user = Storage()
            data = urllib.urlencode(dict(apiKey = self.api_key, token=request.vars.token))
            auth_info_json = fetch(self.auth_url+'?'+data)
            auth_info = json.loads(auth_info_json)

            if auth_info['stat'] == 'ok':
                self.profile = auth_info['profile']
                provider = re.sub('[^\w\-]','',self.profile['providerName'])
                user = self.mappings.get(provider,self.mappings.default)(self.profile)
                return user
            elif self.on_login_failure:
                redirect(self.on_login_failure)
        return None

    def login_form(self):
        request = self.request
        args = request.args
        if self.embed:
           JANRAIN_URL = \
               "https://%s.rpxnow.com/openid/embed?token_url=%s&language_preference=%s"
           rpxform = IFRAME(_src=JANRAIN_URL % (self.domain,self.token_url,self.language),
                            _scrolling="no",
                            _frameborder="no",
                            _style="width:400px;height:240px;")
        else:
            JANRAIN_URL = \
                "https://%s.rpxnow.com/openid/v2/signin?token_url=%s"
            rpxform = DIV(SCRIPT(_src="https://rpxnow.com/openid/v2/widget",
                                 _type="text/javascript"),
                          SCRIPT("RPXNOW.overlay = true;",
                                 "RPXNOW.language_preference = '%s';" % self.language,
                                 "RPXNOW.realm = '%s';" % self.domain,
                                 "RPXNOW.token_url = '%s';" % self.token_url,
                                 "RPXNOW.show();",
                                 _type="text/javascript"))
        return rpxform

Added gluon/contrib/markdown/LICENSE version [c2fd27fef5].


1
+
markdown2.py is released under MIT license.

Added gluon/contrib/markdown/__init__.py version [d81967309e].

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from markdown2 import *
from gluon.html import XML

def WIKI(text, encoding="utf8", safe_mode='escape', html4tags=False, **attributes):
    if not text:
        test = ''
    if attributes.has_key('extras'):
        extras = attributes['extras']
        del attributes['extras']
    else:
        extras=None
    text = text.decode(encoding,'replace')

    return XML(markdown(text,extras=extras,
                        safe_mode=safe_mode, html4tags=html4tags)\
                   .encode(encoding,'xmlcharrefreplace'),**attributes)

Added gluon/contrib/markdown/markdown2.py version [91558b728e].


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)

r"""A fast and complete Python implementation of Markdown.

[from http://daringfireball.net/projects/markdown/]
> Markdown is a text-to-HTML filter; it translates an easy-to-read /
> easy-to-write structured text format into HTML.  Markdown's text
> format is most similar to that of plain text email, and supports
> features such as headers, *emphasis*, code blocks, blockquotes, and
> links.
>
> Markdown's syntax is designed not as a generic markup language, but
> specifically to serve as a front-end to (X)HTML. You can use span-level
> HTML tags anywhere in a Markdown document, and you can use block level
> HTML tags (like <div> and <table> as well).

Module usage:

    >>> import markdown2
    >>> markdown2.markdown("*boo!*")  # or use `html = markdown_path(PATH)`
    u'<p><em>boo!</em></p>\n'

    >>> markdowner = Markdown()
    >>> markdowner.convert("*boo!*")
    u'<p><em>boo!</em></p>\n'
    >>> markdowner.convert("**boom!**")
    u'<p><strong>boom!</strong></p>\n'

This implementation of Markdown implements the full "core" syntax plus a
number of extras (e.g., code syntax coloring, footnotes) as described on
<http://code.google.com/p/python-markdown2/wiki/Extras>.
"""

cmdln_desc = """A fast and complete Python implementation of Markdown, a
text-to-HTML conversion tool for web writers.
"""

# Dev Notes:
# - There is already a Python markdown processor
#   (http://www.freewisdom.org/projects/python-markdown/).
# - Python's regex syntax doesn't have '\z', so I'm using '\Z'. I'm
#   not yet sure if there implications with this. Compare 'pydoc sre'
#   and 'perldoc perlre'.

__version_info__ = (1, 0, 1, 16) # first three nums match Markdown.pl
__version__ = '1.0.1.16'
__author__ = "Trent Mick"

import os
import sys
from pprint import pprint
import re
import logging
try:
    from hashlib import md5
except ImportError:
    from md5 import md5
import optparse
from random import random, randint
import codecs
from urllib import quote



#---- Python version compat

if sys.version_info[:2] < (2,4):
    from sets import Set as set
    def reversed(sequence):
        for i in sequence[::-1]:
            yield i
    def _unicode_decode(s, encoding, errors='xmlcharrefreplace'):
        return unicode(s, encoding, errors)
else:
    def _unicode_decode(s, encoding, errors='strict'):
        return s.decode(encoding, errors)


#---- globals

DEBUG = False
log = logging.getLogger("markdown")

DEFAULT_TAB_WIDTH = 4


try:
    import uuid
except ImportError:
    SECRET_SALT = str(randint(0, 1000000))
else:
    SECRET_SALT = str(uuid.uuid4())
def _hash_ascii(s):
    #return md5(s).hexdigest()   # Markdown.pl effectively does this.
    return 'md5-' + md5(SECRET_SALT + s).hexdigest()
def _hash_text(s):
    return 'md5-' + md5(SECRET_SALT + s.encode("utf-8")).hexdigest()

# Table of hash values for escaped characters:
g_escape_table = dict([(ch, _hash_ascii(ch))
                       for ch in '\\`*_{}[]()>#+-.!'])



#---- exceptions

class MarkdownError(Exception):
    pass



#---- public api

def markdown_path(path, encoding="utf-8",
                  html4tags=False, tab_width=DEFAULT_TAB_WIDTH,
                  safe_mode=None, extras=None, link_patterns=None,
                  use_file_vars=False):
    fp = codecs.open(path, 'r', encoding)
    try:
        text = fp.read()
    finally:
        fp.close()
    return Markdown(html4tags=html4tags, tab_width=tab_width,
                    safe_mode=safe_mode, extras=extras,
                    link_patterns=link_patterns,
                    use_file_vars=use_file_vars).convert(text)

def markdown(text, html4tags=False, tab_width=DEFAULT_TAB_WIDTH,
             safe_mode=None, extras=None, link_patterns=None,
             use_file_vars=False):
    return Markdown(html4tags=html4tags, tab_width=tab_width,
                    safe_mode=safe_mode, extras=extras,
                    link_patterns=link_patterns,
                    use_file_vars=use_file_vars).convert(text)

class Markdown(object):
    # The dict of "extras" to enable in processing -- a mapping of
    # extra name to argument for the extra. Most extras do not have an
    # argument, in which case the value is None.
    #
    # This can be set via (a) subclassing and (b) the constructor
    # "extras" argument.
    extras = None

    urls = None
    titles = None
    html_blocks = None
    html_spans = None
    html_removed_text = "[HTML_REMOVED]"  # for compat with markdown.py

    # Used to track when we're inside an ordered or unordered list
    # (see _ProcessListItems() for details):
    list_level = 0

    _ws_only_line_re = re.compile(r"^[ \t]+$", re.M)

    def __init__(self, html4tags=False, tab_width=4, safe_mode=None,
                 extras=None, link_patterns=None, use_file_vars=False):
        if html4tags:
            self.empty_element_suffix = ">"
        else:
            self.empty_element_suffix = " />"
        self.tab_width = tab_width

        # For compatibility with earlier markdown2.py and with
        # markdown.py's safe_mode being a boolean,
        #   safe_mode == True -> "replace"
        if safe_mode is True:
            self.safe_mode = "replace"
        else:
            self.safe_mode = safe_mode

        if self.extras is None:
            self.extras = {}
        elif not isinstance(self.extras, dict):
            self.extras = dict([(e, None) for e in self.extras])
        if extras:
            if not isinstance(extras, dict):
                extras = dict([(e, None) for e in extras])
            self.extras.update(extras)
        assert isinstance(self.extras, dict)
        self._instance_extras = self.extras.copy()
        self.link_patterns = link_patterns
        self.use_file_vars = use_file_vars
        self._outdent_re = re.compile(r'^(\t|[ ]{1,%d})' % tab_width, re.M)

    def reset(self):
        self.urls = {}
        self.titles = {}
        self.html_blocks = {}
        self.html_spans = {}
        self.list_level = 0
        self.extras = self._instance_extras.copy()
        if "footnotes" in self.extras:
            self.footnotes = {}
            self.footnote_ids = []

    def convert(self, text):
        """Convert the given text."""
        # Main function. The order in which other subs are called here is
        # essential. Link and image substitutions need to happen before
        # _EscapeSpecialChars(), so that any *'s or _'s in the <a>
        # and <img> tags get encoded.

        # Clear the global hashes. If we don't clear these, you get conflicts
        # from other articles when generating a page which contains more than
        # one article (e.g. an index page that shows the N most recent
        # articles):
        self.reset()

        if not isinstance(text, unicode):
            #TODO: perhaps shouldn't presume UTF-8 for string input?
            text = unicode(text, 'utf-8')

        if self.use_file_vars:
            # Look for emacs-style file variable hints.
            emacs_vars = self._get_emacs_vars(text)
            if "markdown-extras" in emacs_vars:
                splitter = re.compile("[ ,]+")
                for e in splitter.split(emacs_vars["markdown-extras"]):
                    if '=' in e:
                        ename, earg = e.split('=', 1)
                        try:
                            earg = int(earg)
                        except ValueError:
                            pass
                    else:
                        ename, earg = e, None
                    self.extras[ename] = earg

        # Standardize line endings:
        text = re.sub("\r\n|\r", "\n", text)

        # Make sure $text ends with a couple of newlines:
        text += "\n\n"

        # Convert all tabs to spaces.
        text = self._detab(text)

        # Strip any lines consisting only of spaces and tabs.
        # This makes subsequent regexen easier to write, because we can
        # match consecutive blank lines with /\n+/ instead of something
        # contorted like /[ \t]*\n+/ .
        text = self._ws_only_line_re.sub("", text)

        if self.safe_mode:
            text = self._hash_html_spans(text)

        # Turn block-level HTML blocks into hash entries
        text = self._hash_html_blocks(text, raw=True)

        # Strip link definitions, store in hashes.
        if "footnotes" in self.extras:
            # Must do footnotes first because an unlucky footnote defn
            # looks like a link defn:
            #   [^4]: this "looks like a link defn"
            text = self._strip_footnote_definitions(text)
        text = self._strip_link_definitions(text)

        text = self._run_block_gamut(text)

        if "footnotes" in self.extras:
            text = self._add_footnotes(text)

        text = self._unescape_special_chars(text)

        if self.safe_mode:
            text = self._unhash_html_spans(text)

        text += "\n"
        return text

    _emacs_oneliner_vars_pat = re.compile(r"-\*-\s*([^\r\n]*?)\s*-\*-", re.UNICODE)
    # This regular expression is intended to match blocks like this:
    #    PREFIX Local Variables: SUFFIX
    #    PREFIX mode: Tcl SUFFIX
    #    PREFIX End: SUFFIX
    # Some notes:
    # - "[ \t]" is used instead of "\s" to specifically exclude newlines
    # - "(\r\n|\n|\r)" is used instead of "$" because the sre engine does
    #   not like anything other than Unix-style line terminators.
    _emacs_local_vars_pat = re.compile(r"""^
        (?P<prefix>(?:[^\r\n|\n|\r])*?)
        [\ \t]*Local\ Variables:[\ \t]*
        (?P<suffix>.*?)(?:\r\n|\n|\r)
        (?P<content>.*?\1End:)
        """, re.IGNORECASE | re.MULTILINE | re.DOTALL | re.VERBOSE)

    def _get_emacs_vars(self, text):
        """Return a dictionary of emacs-style local variables.

        Parsing is done loosely according to this spec (and according to
        some in-practice deviations from this):
        http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables
        """
        emacs_vars = {}
        SIZE = pow(2, 13) # 8kB

        # Search near the start for a '-*-'-style one-liner of variables.
        head = text[:SIZE]
        if "-*-" in head:
            match = self._emacs_oneliner_vars_pat.search(head)
            if match:
                emacs_vars_str = match.group(1)
                assert '\n' not in emacs_vars_str
                emacs_var_strs = [s.strip() for s in emacs_vars_str.split(';')
                                  if s.strip()]
                if len(emacs_var_strs) == 1 and ':' not in emacs_var_strs[0]:
                    # While not in the spec, this form is allowed by emacs:
                    #   -*- Tcl -*-
                    # where the implied "variable" is "mode". This form
                    # is only allowed if there are no other variables.
                    emacs_vars["mode"] = emacs_var_strs[0].strip()
                else:
                    for emacs_var_str in emacs_var_strs:
                        try:
                            variable, value = emacs_var_str.strip().split(':', 1)
                        except ValueError:
                            log.debug("emacs variables error: malformed -*- "
                                      "line: %r", emacs_var_str)
                            continue
                        # Lowercase the variable name because Emacs allows "Mode"
                        # or "mode" or "MoDe", etc.
                        emacs_vars[variable.lower()] = value.strip()

        tail = text[-SIZE:]
        if "Local Variables" in tail:
            match = self._emacs_local_vars_pat.search(tail)
            if match:
                prefix = match.group("prefix")
                suffix = match.group("suffix")
                lines = match.group("content").splitlines(0)
                #print "prefix=%r, suffix=%r, content=%r, lines: %s"\
                #      % (prefix, suffix, match.group("content"), lines)

                # Validate the Local Variables block: proper prefix and suffix
                # usage.
                for i, line in enumerate(lines):
                    if not line.startswith(prefix):
                        log.debug("emacs variables error: line '%s' "
                                  "does not use proper prefix '%s'"
                                  % (line, prefix))
                        return {}
                    # Don't validate suffix on last line. Emacs doesn't care,
                    # neither should we.
                    if i != len(lines)-1 and not line.endswith(suffix):
                        log.debug("emacs variables error: line '%s' "
                                  "does not use proper suffix '%s'"
                                  % (line, suffix))
                        return {}

                # Parse out one emacs var per line.
                continued_for = None
                for line in lines[:-1]: # no var on the last line ("PREFIX End:")
                    if prefix: line = line[len(prefix):] # strip prefix
                    if suffix: line = line[:-len(suffix)] # strip suffix
                    line = line.strip()
                    if continued_for:
                        variable = continued_for
                        if line.endswith('\\'):
                            line = line[:-1].rstrip()
                        else:
                            continued_for = None
                        emacs_vars[variable] += ' ' + line
                    else:
                        try:
                            variable, value = line.split(':', 1)
                        except ValueError:
                            log.debug("local variables error: missing colon "
                                      "in local variables entry: '%s'" % line)
                            continue
                        # Do NOT lowercase the variable name, because Emacs only
                        # allows "mode" (and not "Mode", "MoDe", etc.) in this block.
                        value = value.strip()
                        if value.endswith('\\'):
                            value = value[:-1].rstrip()
                            continued_for = variable
                        else:
                            continued_for = None
                        emacs_vars[variable] = value

        # Unquote values.
        for var, val in emacs_vars.items():
            if len(val) > 1 and (val.startswith('"') and val.endswith('"')
               or val.startswith('"') and val.endswith('"')):
                emacs_vars[var] = val[1:-1]

        return emacs_vars

    # Cribbed from a post by Bart Lateur:
    # <http://www.nntp.perl.org/group/perl.macperl.anyperl/154>
    _detab_re = re.compile(r'(.*?)\t', re.M)
    def _detab_sub(self, match):
        g1 = match.group(1)
        return g1 + (' ' * (self.tab_width - len(g1) % self.tab_width))
    def _detab(self, text):
        r"""Remove (leading?) tabs from a file.

            >>> m = Markdown()
            >>> m._detab("\tfoo")
            '    foo'
            >>> m._detab("  \tfoo")
            '    foo'
            >>> m._detab("\t  foo")
            '      foo'
            >>> m._detab("  foo")
            '  foo'
            >>> m._detab("  foo\n\tbar\tblam")
            '  foo\n    bar blam'
        """
        if '\t' not in text:
            return text
        return self._detab_re.subn(self._detab_sub, text)[0]

    _block_tags_a = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del'
    _strict_tag_block_re = re.compile(r"""
        (                       # save in \1
            ^                   # start of line  (with re.M)
            <(%s)               # start tag = \2
            \b                  # word break
            (.*\n)*?            # any number of lines, minimally matching
            </\2>               # the matching end tag
            [ \t]*              # trailing spaces/tabs
            (?=\n+|\Z)          # followed by a newline or end of document
        )
        """ % _block_tags_a,
        re.X | re.M)

    _block_tags_b = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math'
    _liberal_tag_block_re = re.compile(r"""
        (                       # save in \1
            ^                   # start of line  (with re.M)
            <(%s)               # start tag = \2
            \b                  # word break
            (.*\n)*?            # any number of lines, minimally matching
            .*</\2>             # the matching end tag
            [ \t]*              # trailing spaces/tabs
            (?=\n+|\Z)          # followed by a newline or end of document
        )
        """ % _block_tags_b,
        re.X | re.M)

    def _hash_html_block_sub(self, match, raw=False):
        html = match.group(1)
        if raw and self.safe_mode:
            html = self._sanitize_html(html)
        key = _hash_text(html)
        self.html_blocks[key] = html
        return "\n\n" + key + "\n\n"

    def _hash_html_blocks(self, text, raw=False):
        """Hashify HTML blocks

        We only want to do this for block-level HTML tags, such as headers,
        lists, and tables. That's because we still want to wrap <p>s around
        "paragraphs" that are wrapped in non-block-level tags, such as anchors,
        phrase emphasis, and spans. The list of tags we're looking for is
        hard-coded.

        @param raw {boolean} indicates if these are raw HTML blocks in
            the original source. It makes a difference in "safe" mode.
        """
        if '<' not in text:
            return text

        # Pass `raw` value into our calls to self._hash_html_block_sub.
        hash_html_block_sub = _curry(self._hash_html_block_sub, raw=raw)

        # First, look for nested blocks, e.g.:
        #   <div>
        #       <div>
        #       tags for inner block must be indented.
        #       </div>
        #   </div>
        #
        # The outermost tags must start at the left margin for this to match, and
        # the inner nested divs must be indented.
        # We need to do this before the next, more liberal match, because the next
        # match will start at the first `<div>` and stop at the first `</div>`.
        text = self._strict_tag_block_re.sub(hash_html_block_sub, text)

        # Now match more liberally, simply from `\n<tag>` to `</tag>\n`
        text = self._liberal_tag_block_re.sub(hash_html_block_sub, text)

        # Special case just for <hr />. It was easier to make a special
        # case than to make the other regex more complicated.
        if "<hr" in text:
            _hr_tag_re = _hr_tag_re_from_tab_width(self.tab_width)
            text = _hr_tag_re.sub(hash_html_block_sub, text)

        # Special case for standalone HTML comments:
        if "<!--" in text:
            start = 0
            while True:
                # Delimiters for next comment block.
                try:
                    start_idx = text.index("<!--", start)
                except ValueError, ex:
                    break
                try:
                    end_idx = text.index("-->", start_idx) + 3
                except ValueError, ex:
                    break

                # Start position for next comment block search.
                start = end_idx

                # Validate whitespace before comment.
                if start_idx:
                    # - Up to `tab_width - 1` spaces before start_idx.
                    for i in range(self.tab_width - 1):
                        if text[start_idx - 1] != ' ':
                            break
                        start_idx -= 1
                        if start_idx == 0:
                            break
                    # - Must be preceded by 2 newlines or hit the start of
                    #   the document.
                    if start_idx == 0:
                        pass
                    elif start_idx == 1 and text[0] == '\n':
                        start_idx = 0  # to match minute detail of Markdown.pl regex
                    elif text[start_idx-2:start_idx] == '\n\n':
                        pass
                    else:
                        break

                # Validate whitespace after comment.
                # - Any number of spaces and tabs.
                while end_idx < len(text):
                    if text[end_idx] not in ' \t':
                        break
                    end_idx += 1
                # - Must be following by 2 newlines or hit end of text.
                if text[end_idx:end_idx+2] not in ('', '\n', '\n\n'):
                    continue

                # Escape and hash (must match `_hash_html_block_sub`).
                html = text[start_idx:end_idx]
                if raw and self.safe_mode:
                    html = self._sanitize_html(html)
                key = _hash_text(html)
                self.html_blocks[key] = html
                text = text[:start_idx] + "\n\n" + key + "\n\n" + text[end_idx:]

        if "xml" in self.extras:
            # Treat XML processing instructions and namespaced one-liner
            # tags as if they were block HTML tags. E.g., if standalone
            # (i.e. are their own paragraph), the following do not get
            # wrapped in a <p> tag:
            #    <?foo bar?>
            #
            #    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter_1.md"/>
            _xml_oneliner_re = _xml_oneliner_re_from_tab_width(self.tab_width)
            text = _xml_oneliner_re.sub(hash_html_block_sub, text)

        return text

    def _strip_link_definitions(self, text):
        # Strips link definitions from text, stores the URLs and titles in
        # hash references.
        less_than_tab = self.tab_width - 1

        # Link defs are in the form:
        #   [id]: url "optional title"
        _link_def_re = re.compile(r"""
            ^[ ]{0,%d}\[(.+)\]: # id = \1
              [ \t]*
              \n?               # maybe *one* newline
              [ \t]*
            <?(.+?)>?           # url = \2
              [ \t]*
            (?:
                \n?             # maybe one newline
                [ \t]*
                (?<=\s)         # lookbehind for whitespace
                ['"(]
                ([^\n]*)        # title = \3
                ['")]
                [ \t]*
            )?  # title is optional
            (?:\n+|\Z)
            """ % less_than_tab, re.X | re.M | re.U)
        return _link_def_re.sub(self._extract_link_def_sub, text)

    def _extract_link_def_sub(self, match):
        id, url, title = match.groups()
        key = id.lower()    # Link IDs are case-insensitive
        self.urls[key] = self._encode_amps_and_angles(url)
        if title:
            self.titles[key] = title.replace('"', '&quot;')
        return ""

    def _extract_footnote_def_sub(self, match):
        id, text = match.groups()
        text = _dedent(text, skip_first_line=not text.startswith('\n')).strip()
        normed_id = re.sub(r'\W', '-', id)
        # Ensure footnote text ends with a couple newlines (for some
        # block gamut matches).
        self.footnotes[normed_id] = text + "\n\n"
        return ""

    def _strip_footnote_definitions(self, text):
        """A footnote definition looks like this:

            [^note-id]: Text of the note.

                May include one or more indented paragraphs.

        Where,
        - The 'note-id' can be pretty much anything, though typically it
          is the number of the footnote.
        - The first paragraph may start on the next line, like so:

            [^note-id]:
                Text of the note.
        """
        less_than_tab = self.tab_width - 1
        footnote_def_re = re.compile(r'''
            ^[ ]{0,%d}\[\^(.+)\]:   # id = \1
            [ \t]*
            (                       # footnote text = \2
              # First line need not start with the spaces.
              (?:\s*.*\n+)
              (?:
                (?:[ ]{%d} | \t)  # Subsequent lines must be indented.
                .*\n+
              )*
            )
            # Lookahead for non-space at line-start, or end of doc.
            (?:(?=^[ ]{0,%d}\S)|\Z)
            ''' % (less_than_tab, self.tab_width, self.tab_width),
            re.X | re.M)
        return footnote_def_re.sub(self._extract_footnote_def_sub, text)


    _hr_res = [
        re.compile(r"^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$", re.M),
        re.compile(r"^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$", re.M),
        re.compile(r"^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$", re.M),
    ]

    def _run_block_gamut(self, text):
        # These are all the transformations that form block-level
        # tags like paragraphs, headers, and list items.

        text = self._do_headers(text)

        # Do Horizontal Rules:
        hr = "\n<hr"+self.empty_element_suffix+"\n"
        for hr_re in self._hr_res:
            text = hr_re.sub(hr, text)

        text = self._do_lists(text)

        if "pyshell" in self.extras:
            text = self._prepare_pyshell_blocks(text)

        text = self._do_code_blocks(text)

        text = self._do_block_quotes(text)

        # We already ran _HashHTMLBlocks() before, in Markdown(), but that
        # was to escape raw HTML in the original Markdown source. This time,
        # we're escaping the markup we've just created, so that we don't wrap
        # <p> tags around block-level tags.
        text = self._hash_html_blocks(text)

        text = self._form_paragraphs(text)

        return text

    def _pyshell_block_sub(self, match):
        lines = match.group(0).splitlines(0)
        _dedentlines(lines)
        indent = ' ' * self.tab_width
        s = ('\n' # separate from possible cuddled paragraph
             + indent + ('\n'+indent).join(lines)
             + '\n\n')
        return s

    def _prepare_pyshell_blocks(self, text):
        """Ensure that Python interactive shell sessions are put in
        code blocks -- even if not properly indented.
        """
        if ">>>" not in text:
            return text

        less_than_tab = self.tab_width - 1
        _pyshell_block_re = re.compile(r"""
            ^([ ]{0,%d})>>>[ ].*\n   # first line
            ^(\1.*\S+.*\n)*         # any number of subsequent lines
            ^\n                     # ends with a blank line
            """ % less_than_tab, re.M | re.X)

        return _pyshell_block_re.sub(self._pyshell_block_sub, text)

    def _run_span_gamut(self, text):
        # These are all the transformations that occur *within* block-level
        # tags like paragraphs, headers, and list items.

        text = self._do_code_spans(text)

        text = self._escape_special_chars(text)

        # Process anchor and image tags.
        text = self._do_links(text)

        # Make links out of things like `<http://example.com/>`
        # Must come after _do_links(), because you can use < and >
        # delimiters in inline links like [this](<url>).
        text = self._do_auto_links(text)

        if "link-patterns" in self.extras:
            text = self._do_link_patterns(text)

        text = self._encode_amps_and_angles(text)

        text = self._do_italics_and_bold(text)

        # Do hard breaks:
        text = re.sub(r" {2,}\n", " <br%s\n" % self.empty_element_suffix, text)

        return text

    # "Sorta" because auto-links are identified as "tag" tokens.
    _sorta_html_tokenize_re = re.compile(r"""
        (
            # tag
            </?
            (?:\w+)                                     # tag name
            (?:\s+(?:[\w-]+:)?[\w-]+=(?:".*?"|'.*?'))*  # attributes
            \s*/?>
            |
            # auto-link (e.g., <http://www.activestate.com/>)
            <\w+[^>]*>
            |
            <!--.*?-->      # comment
            |
            <\?.*?\?>       # processing instruction
        )
        """, re.X)

    def _escape_special_chars(self, text):
        # Python markdown note: the HTML tokenization here differs from
        # that in Markdown.pl, hence the behaviour for subtle cases can
        # differ (I believe the tokenizer here does a better job because
        # it isn't susceptible to unmatched '<' and '>' in HTML tags).
        # Note, however, that '>' is not allowed in an auto-link URL
        # here.
        escaped = []
        is_html_markup = False
        for token in self._sorta_html_tokenize_re.split(text):
            if is_html_markup:
                # Within tags/HTML-comments/auto-links, encode * and _
                # so they don't conflict with their use in Markdown for
                # italics and strong.  We're replacing each such
                # character with its corresponding MD5 checksum value;
                # this is likely overkill, but it should prevent us from
                # colliding with the escape values by accident.
                escaped.append(token.replace('*', g_escape_table['*'])
                                    .replace('_', g_escape_table['_']))
            else:
                escaped.append(self._encode_backslash_escapes(token))
            is_html_markup = not is_html_markup
        return ''.join(escaped)

    def _hash_html_spans(self, text):
        # Used for safe_mode.

        def _is_auto_link(s):
            if ':' in s and self._auto_link_re.match(s):
                return True
            elif '@' in s and self._auto_email_link_re.match(s):
                return True
            return False

        tokens = []
        is_html_markup = False
        for token in self._sorta_html_tokenize_re.split(text):
            if is_html_markup and not _is_auto_link(token):
                sanitized = self._sanitize_html(token)
                key = _hash_text(sanitized)
                self.html_spans[key] = sanitized
                tokens.append(key)
            else:
                tokens.append(token)
            is_html_markup = not is_html_markup
        return ''.join(tokens)

    def _unhash_html_spans(self, text):
        for key, sanitized in self.html_spans.items():
            text = text.replace(key, sanitized)
        return text

    def _sanitize_html(self, s):
        if self.safe_mode == "replace":
            return self.html_removed_text
        elif self.safe_mode == "escape":
            replacements = [
                ('&', '&amp;'),
                ('<', '&lt;'),
                ('>', '&gt;'),
            ]
            for before, after in replacements:
                s = s.replace(before, after)
            return s
        else:
            raise MarkdownError("invalid value for 'safe_mode': %r (must be "
                                "'escape' or 'replace')" % self.safe_mode)

    _tail_of_inline_link_re = re.compile(r'''
          # Match tail of: [text](/url/) or [text](/url/ "title")
          \(            # literal paren
            [ \t]*
            (?P<url>            # \1
                <.*?>
                |
                .*?
            )
            [ \t]*
            (                   # \2
              (['"])            # quote char = \3
              (?P<title>.*?)
              \3                # matching quote
            )?                  # title is optional
          \)
        ''', re.X | re.S)
    _tail_of_reference_link_re = re.compile(r'''
          # Match tail of: [text][id]
          [ ]?          # one optional space
          (?:\n[ ]*)?   # one optional newline followed by spaces
          \[
            (?P<id>.*?)
          \]
        ''', re.X | re.S)

    def _do_links(self, text):
        """Turn Markdown link shortcuts into XHTML <a> and <img> tags.

        This is a combination of Markdown.pl's _DoAnchors() and
        _DoImages(). They are done together because that simplified the
        approach. It was necessary to use a different approach than
        Markdown.pl because of the lack of atomic matching support in
        Python's regex engine used in $g_nested_brackets.
        """
        MAX_LINK_TEXT_SENTINEL = 3000  # markdown2 issue 24

        # `anchor_allowed_pos` is used to support img links inside
        # anchors, but not anchors inside anchors. An anchor's start
        # pos must be `>= anchor_allowed_pos`.
        anchor_allowed_pos = 0

        curr_pos = 0
        while True: # Handle the next link.
            # The next '[' is the start of:
            # - an inline anchor:   [text](url "title")
            # - a reference anchor: [text][id]
            # - an inline img:      ![text](url "title")
            # - a reference img:    ![text][id]
            # - a footnote ref:     [^id]
            #   (Only if 'footnotes' extra enabled)
            # - a footnote defn:    [^id]: ...
            #   (Only if 'footnotes' extra enabled) These have already
            #   been stripped in _strip_footnote_definitions() so no
            #   need to watch for them.
            # - a link definition:  [id]: url "title"
            #   These have already been stripped in
            #   _strip_link_definitions() so no need to watch for them.
            # - not markup:         [...anything else...
            try:
                start_idx = text.index('[', curr_pos)
            except ValueError:
                break
            text_length = len(text)

            # Find the matching closing ']'.
            # Markdown.pl allows *matching* brackets in link text so we
            # will here too. Markdown.pl *doesn't* currently allow
            # matching brackets in img alt text -- we'll differ in that
            # regard.
            bracket_depth = 0
            for p in range(start_idx+1, min(start_idx+MAX_LINK_TEXT_SENTINEL,
                                            text_length)):
                ch = text[p]
                if ch == ']':
                    bracket_depth -= 1
                    if bracket_depth < 0:
                        break
                elif ch == '[':
                    bracket_depth += 1
            else:
                # Closing bracket not found within sentinel length.
                # This isn't markup.
                curr_pos = start_idx + 1
                continue
            link_text = text[start_idx+1:p]

            # Possibly a footnote ref?
            if "footnotes" in self.extras and link_text.startswith("^"):
                normed_id = re.sub(r'\W', '-', link_text[1:])
                if normed_id in self.footnotes:
                    self.footnote_ids.append(normed_id)
                    result = '<sup class="footnote-ref" id="fnref-%s">' \
                             '<a href="#fn-%s">%s</a></sup>' \
                             % (normed_id, normed_id, len(self.footnote_ids))
                    text = text[:start_idx] + result + text[p+1:]
                else:
                    # This id isn't defined, leave the markup alone.
                    curr_pos = p+1
                continue

            # Now determine what this is by the remainder.
            p += 1
            if p == text_length:
                return text

            # Inline anchor or img?
            if text[p] == '(': # attempt at perf improvement
                match = self._tail_of_inline_link_re.match(text, p)
                if match:
                    # Handle an inline anchor or img.
                    is_img = start_idx > 0 and text[start_idx-1] == "!"
                    if is_img:
                        start_idx -= 1

                    url, title = match.group("url"), match.group("title")
                    if url and url[0] == '<':
                        url = url[1:-1]  # '<url>' -> 'url'
                    # We've got to encode these to avoid conflicting
                    # with italics/bold.
                    url = url.replace('*', g_escape_table['*']) \
                             .replace('_', g_escape_table['_'])
                    if title:
                        title_str = ' title="%s"' \
                            % title.replace('*', g_escape_table['*']) \
                                   .replace('_', g_escape_table['_']) \
                                   .replace('"', '&quot;')
                    else:
                        title_str = ''
                    if is_img:
                        result = '<img src="%s" alt="%s"%s%s' \
                            % (url.replace('"', '&quot;'),
                               link_text.replace('"', '&quot;'),
                               title_str, self.empty_element_suffix)
                        curr_pos = start_idx + len(result)
                        text = text[:start_idx] + result + text[match.end():]
                    elif start_idx >= anchor_allowed_pos:
                        result_head = '<a href="%s"%s>' % (url, title_str)
                        result = '%s%s</a>' % (result_head, link_text)
                        # <img> allowed from curr_pos on, <a> from
                        # anchor_allowed_pos on.
                        curr_pos = start_idx + len(result_head)
                        anchor_allowed_pos = start_idx + len(result)
                        text = text[:start_idx] + result + text[match.end():]
                    else:
                        # Anchor not allowed here.
                        curr_pos = start_idx + 1
                    continue

            # Reference anchor or img?
            else:
                match = self._tail_of_reference_link_re.match(text, p)
                if match:
                    # Handle a reference-style anchor or img.
                    is_img = start_idx > 0 and text[start_idx-1] == "!"
                    if is_img:
                        start_idx -= 1
                    link_id = match.group("id").lower()
                    if not link_id:
                        link_id = link_text.lower()  # for links like [this][]
                    if link_id in self.urls:
                        url = self.urls[link_id]
                        # We've got to encode these to avoid conflicting
                        # with italics/bold.
                        url = url.replace('*', g_escape_table['*']) \
                                 .replace('_', g_escape_table['_'])
                        title = self.titles.get(link_id)
                        if title:
                            title = title.replace('*', g_escape_table['*']) \
                                         .replace('_', g_escape_table['_'])
                            title_str = ' title="%s"' % title
                        else:
                            title_str = ''
                        if is_img:
                            result = '<img src="%s" alt="%s"%s%s' \
                                % (url.replace('"', '&quot;'),
                                   link_text.replace('"', '&quot;'),
                                   title_str, self.empty_element_suffix)
                            curr_pos = start_idx + len(result)
                            text = text[:start_idx] + result + text[match.end():]
                        elif start_idx >= anchor_allowed_pos:
                            result = '<a href="%s"%s>%s</a>' \
                                % (url, title_str, link_text)
                            result_head = '<a href="%s"%s>' % (url, title_str)
                            result = '%s%s</a>' % (result_head, link_text)
                            # <img> allowed from curr_pos on, <a> from
                            # anchor_allowed_pos on.
                            curr_pos = start_idx + len(result_head)
                            anchor_allowed_pos = start_idx + len(result)
                            text = text[:start_idx] + result + text[match.end():]
                        else:
                            # Anchor not allowed here.
                            curr_pos = start_idx + 1
                    else:
                        # This id isn't defined, leave the markup alone.
                        curr_pos = match.end()
                    continue

            # Otherwise, it isn't markup.
            curr_pos = start_idx + 1

        return text


    _setext_h_re = re.compile(r'^(.+)[ \t]*\n(=+|-+)[ \t]*\n+', re.M)
    def _setext_h_sub(self, match):
        n = {"=": 1, "-": 2}[match.group(2)[0]]
        demote_headers = self.extras.get("demote-headers")
        if demote_headers:
            n = min(n + demote_headers, 6)
        return "<h%d>%s</h%d>\n\n" \
               % (n, self._run_span_gamut(match.group(1)), n)

    _atx_h_re = re.compile(r'''
        ^(\#{1,6})  # \1 = string of #'s
        [ \t]*
        (.+?)       # \2 = Header text
        [ \t]*
        (?<!\\)     # ensure not an escaped trailing '#'
        \#*         # optional closing #'s (not counted)
        \n+
        ''', re.X | re.M)
    def _atx_h_sub(self, match):
        n = len(match.group(1))
        demote_headers = self.extras.get("demote-headers")
        if demote_headers:
            n = min(n + demote_headers, 6)
        return "<h%d>%s</h%d>\n\n" \
               % (n, self._run_span_gamut(match.group(2)), n)

    def _do_headers(self, text):
        # Setext-style headers:
        #     Header 1
        #     ========
        #
        #     Header 2
        #     --------
        text = self._setext_h_re.sub(self._setext_h_sub, text)

        # atx-style headers:
        #   # Header 1
        #   ## Header 2
        #   ## Header 2 with closing hashes ##
        #   ...
        #   ###### Header 6
        text = self._atx_h_re.sub(self._atx_h_sub, text)

        return text


    _marker_ul_chars  = '*+-'
    _marker_any = r'(?:[%s]|\d+\.)' % _marker_ul_chars
    _marker_ul = '(?:[%s])' % _marker_ul_chars
    _marker_ol = r'(?:\d+\.)'

    def _list_sub(self, match):
        lst = match.group(1)
        lst_type = match.group(3) in self._marker_ul_chars and "ul" or "ol"
        result = self._process_list_items(lst)
        if self.list_level:
            return "<%s>\n%s</%s>\n" % (lst_type, result, lst_type)
        else:
            return "<%s>\n%s</%s>\n\n" % (lst_type, result, lst_type)

    def _do_lists(self, text):
        # Form HTML ordered (numbered) and unordered (bulleted) lists.

        for marker_pat in (self._marker_ul, self._marker_ol):
            # Re-usable pattern to match any entire ul or ol list:
            less_than_tab = self.tab_width - 1
            whole_list = r'''
                (                   # \1 = whole list
                  (                 # \2
                    [ ]{0,%d}
                    (%s)            # \3 = first list item marker
                    [ \t]+
                  )
                  (?:.+?)
                  (                 # \4
                      \Z
                    |
                      \n{2,}
                      (?=\S)
                      (?!           # Negative lookahead for another list item marker
                        [ \t]*
                        %s[ \t]+
                      )
                  )
                )
            ''' % (less_than_tab, marker_pat, marker_pat)

            # We use a different prefix before nested lists than top-level lists.
            # See extended comment in _process_list_items().
            #
            # Note: There's a bit of duplication here. My original implementation
            # created a scalar regex pattern as the conditional result of the test on
            # $g_list_level, and then only ran the $text =~ s{...}{...}egmx
            # substitution once, using the scalar as the pattern. This worked,
            # everywhere except when running under MT on my hosting account at Pair
            # Networks. There, this caused all rebuilds to be killed by the reaper (or
            # perhaps they crashed, but that seems incredibly unlikely given that the
            # same script on the same server ran fine *except* under MT. I've spent
            # more time trying to figure out why this is happening than I'd like to
            # admit. My only guess, backed up by the fact that this workaround works,
            # is that Perl optimizes the substition when it can figure out that the
            # pattern will never change, and when this optimization isn't on, we run
            # afoul of the reaper. Thus, the slightly redundant code to that uses two
            # static s/// patterns rather than one conditional pattern.

            if self.list_level:
                sub_list_re = re.compile("^"+whole_list, re.X | re.M | re.S)
                text = sub_list_re.sub(self._list_sub, text)
            else:
                list_re = re.compile(r"(?:(?<=\n\n)|\A\n?)"+whole_list,
                                     re.X | re.M | re.S)
                text = list_re.sub(self._list_sub, text)

        return text

    _list_item_re = re.compile(r'''
        (\n)?               # leading line = \1
        (^[ \t]*)           # leading whitespace = \2
        (%s) [ \t]+         # list marker = \3
        ((?:.+?)            # list item text = \4
         (\n{1,2}))         # eols = \5
        (?= \n* (\Z | \2 (%s) [ \t]+))
        ''' % (_marker_any, _marker_any),
        re.M | re.X | re.S)

    _last_li_endswith_two_eols = False
    def _list_item_sub(self, match):
        item = match.group(4)
        leading_line = match.group(1)
        leading_space = match.group(2)
        if leading_line or "\n\n" in item or self._last_li_endswith_two_eols:
            item = self._run_block_gamut(self._outdent(item))
        else:
            # Recursion for sub-lists:
            item = self._do_lists(self._outdent(item))
            if item.endswith('\n'):
                item = item[:-1]
            item = self._run_span_gamut(item)
        self._last_li_endswith_two_eols = (len(match.group(5)) == 2)
        return "<li>%s</li>\n" % item

    def _process_list_items(self, list_str):
        # Process the contents of a single ordered or unordered list,
        # splitting it into individual list items.

        # The $g_list_level global keeps track of when we're inside a list.
        # Each time we enter a list, we increment it; when we leave a list,
        # we decrement. If it's zero, we're not in a list anymore.
        #
        # We do this because when we're not inside a list, we want to treat
        # something like this:
        #
        #       I recommend upgrading to version
        #       8. Oops, now this line is treated
        #       as a sub-list.
        #
        # As a single paragraph, despite the fact that the second line starts
        # with a digit-period-space sequence.
        #
        # Whereas when we're inside a list (or sub-list), that line will be
        # treated as the start of a sub-list. What a kludge, huh? This is
        # an aspect of Markdown's syntax that's hard to parse perfectly
        # without resorting to mind-reading. Perhaps the solution is to
        # change the syntax rules such that sub-lists must start with a
        # starting cardinal number; e.g. "1." or "a.".
        self.list_level += 1
        self._last_li_endswith_two_eols = False
        list_str = list_str.rstrip('\n') + '\n'
        list_str = self._list_item_re.sub(self._list_item_sub, list_str)
        self.list_level -= 1
        return list_str

    def _get_pygments_lexer(self, lexer_name):
        try:
            from pygments import lexers, util
        except ImportError:
            return None
        try:
            return lexers.get_lexer_by_name(lexer_name)
        except util.ClassNotFound:
            return None

    def _color_with_pygments(self, codeblock, lexer, **formatter_opts):
        import pygments
        import pygments.formatters

        class HtmlCodeFormatter(pygments.formatters.HtmlFormatter):
            def _wrap_code(self, inner):
                """A function for use in a Pygments Formatter which
                wraps in <code> tags.
                """
                yield 0, "<code>"
                for tup in inner:
                    yield tup
                yield 0, "</code>"

            def wrap(self, source, outfile):
                """Return the source with a code, pre, and div."""
                return self._wrap_div(self._wrap_pre(self._wrap_code(source)))

        formatter = HtmlCodeFormatter(cssclass="codehilite", **formatter_opts)
        return pygments.highlight(codeblock, lexer, formatter)

    def _code_block_sub(self, match):
        codeblock = match.group(1)
        codeblock = self._outdent(codeblock)
        codeblock = self._detab(codeblock)
        codeblock = codeblock.lstrip('\n')  # trim leading newlines
        codeblock = codeblock.rstrip()      # trim trailing whitespace

        if "code-color" in self.extras and codeblock.startswith(":::"):
            lexer_name, rest = codeblock.split('\n', 1)
            lexer_name = lexer_name[3:].strip()
            lexer = self._get_pygments_lexer(lexer_name)
            codeblock = rest.lstrip("\n")   # Remove lexer declaration line.
            if lexer:
                formatter_opts = self.extras['code-color'] or {}
                colored = self._color_with_pygments(codeblock, lexer,
                                                    **formatter_opts)
                return "\n\n%s\n\n" % colored

        codeblock = self._encode_code(codeblock)
        return "\n\n<pre><code>%s\n</code></pre>\n\n" % codeblock

    def _do_code_blocks(self, text):
        """Process Markdown `<pre><code>` blocks."""
        code_block_re = re.compile(r'''
            (?:\n\n|\A)
            (               # $1 = the code block -- one or more lines, starting with a space/tab
              (?:
                (?:[ ]{%d} | \t)  # Lines must start with a tab or a tab-width of spaces
                .*\n+
              )+
            )
            ((?=^[ ]{0,%d}\S)|\Z)   # Lookahead for non-space at line-start, or end of doc
            ''' % (self.tab_width, self.tab_width),
            re.M | re.X)

        return code_block_re.sub(self._code_block_sub, text)


    # Rules for a code span:
    # - backslash escapes are not interpreted in a code span
    # - to include one or or a run of more backticks the delimiters must
    #   be a longer run of backticks
    # - cannot start or end a code span with a backtick; pad with a
    #   space and that space will be removed in the emitted HTML
    # See `test/tm-cases/escapes.text` for a number of edge-case
    # examples.
    _code_span_re = re.compile(r'''
            (?<!\\)
            (`+)        # \1 = Opening run of `
            (?!`)       # See Note A test/tm-cases/escapes.text
            (.+?)       # \2 = The code block
            (?<!`)
            \1          # Matching closer
            (?!`)
        ''', re.X | re.S)

    def _code_span_sub(self, match):
        c = match.group(2).strip(" \t")
        c = self._encode_code(c)
        return "<code>%s</code>" % c

    def _do_code_spans(self, text):
        #   *   Backtick quotes are used for <code></code> spans.
        #
        #   *   You can use multiple backticks as the delimiters if you want to
        #       include literal backticks in the code span. So, this input:
        #
        #         Just type ``foo `bar` baz`` at the prompt.
        #
        #       Will translate to:
        #
        #         <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
        #
        #       There's no arbitrary limit to the number of backticks you
        #       can use as delimters. If you need three consecutive backticks
        #       in your code, use four for delimiters, etc.
        #
        #   *   You can use spaces to get literal backticks at the edges:
        #
        #         ... type `` `bar` `` ...
        #
        #       Turns to:
        #
        #         ... type <code>`bar`</code> ...
        return self._code_span_re.sub(self._code_span_sub, text)

    def _encode_code(self, text):
        """Encode/escape certain characters inside Markdown code runs.
        The point is that in code, these characters are literals,
        and lose their special Markdown meanings.
        """
        replacements = [
            # Encode all ampersands; HTML entities are not
            # entities within a Markdown code span.
            ('&', '&amp;'),
            # Do the angle bracket song and dance:
            ('<', '&lt;'),
            ('>', '&gt;'),
            # Now, escape characters that are magic in Markdown:
            ('*', g_escape_table['*']),
            ('_', g_escape_table['_']),
            ('{', g_escape_table['{']),
            ('}', g_escape_table['}']),
            ('[', g_escape_table['[']),
            (']', g_escape_table[']']),
            ('\\', g_escape_table['\\']),
        ]
        for before, after in replacements:
            text = text.replace(before, after)
        return text

    _strong_re = re.compile(r"(?<!\w)(\*\*|__)(?=\S)(.+?[*_]*)(?<=\S)\1(?!\w)", re.S)
    _em_re = re.compile(r"(?<!\w)(\*|_)(?=\S)(.+?)(?<=\S)\1(?!\w)", re.S)
    _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.+?[*_]*)(?<=\S)\*\*", re.S)
    _code_friendly_em_re = re.compile(r"\*(?=\S)(.+?)(?<=\S)\*", re.S)
    def _do_italics_and_bold(self, text):
        # <strong> must go first:
        if "code-friendly" in self.extras:
            text = self._code_friendly_strong_re.sub(r"<strong>\1</strong>", text)
            text = self._code_friendly_em_re.sub(r"<em>\1</em>", text)
        else:
            text = self._strong_re.sub(r"<strong>\2</strong>", text)
            text = self._em_re.sub(r"<em>\2</em>", text)
        return text


    _block_quote_re = re.compile(r'''
        (                           # Wrap whole match in \1
          (
            ^[ \t]*>[ \t]?          # '>' at the start of a line
              .+\n                  # rest of the first line
            (.+\n)*                 # subsequent consecutive lines
            \n*                     # blanks
          )+
        )
        ''', re.M | re.X)
    _bq_one_level_re = re.compile('^[ \t]*>[ \t]?', re.M);

    _html_pre_block_re = re.compile(r'(\s*<pre>.+?</pre>)', re.S)
    def _dedent_two_spaces_sub(self, match):
        return re.sub(r'(?m)^  ', '', match.group(1))

    def _block_quote_sub(self, match):
        bq = match.group(1)
        bq = self._bq_one_level_re.sub('', bq)  # trim one level of quoting
        bq = self._ws_only_line_re.sub('', bq)  # trim whitespace-only lines
        bq = self._run_block_gamut(bq)          # recurse

        bq = re.sub('(?m)^', '  ', bq)
        # These leading spaces screw with <pre> content, so we need to fix that:
        bq = self._html_pre_block_re.sub(self._dedent_two_spaces_sub, bq)

        return "<blockquote>\n%s\n</blockquote>\n\n" % bq

    def _do_block_quotes(self, text):
        if '>' not in text:
            return text
        return self._block_quote_re.sub(self._block_quote_sub, text)

    def _form_paragraphs(self, text):
        # Strip leading and trailing lines:
        text = text.strip('\n')

        # Wrap <p> tags.
        grafs = re.split(r"\n{2,}", text)
        for i, graf in enumerate(grafs):
            if graf in self.html_blocks:
                # Unhashify HTML blocks
                grafs[i] = self.html_blocks[graf]
            else:
                # Wrap <p> tags.
                graf = self._run_span_gamut(graf)
                grafs[i] = "<p>" + graf.lstrip(" \t") + "</p>"

        return "\n\n".join(grafs)

    def _add_footnotes(self, text):
        if self.footnotes:
            footer = [
                '<div class="footnotes">',
                '<hr' + self.empty_element_suffix,
                '<ol>',
            ]
            for i, id in enumerate(self.footnote_ids):
                if i != 0:
                    footer.append('')
                footer.append('<li id="fn-%s">' % id)
                footer.append(self._run_block_gamut(self.footnotes[id]))
                backlink = ('<a href="#fnref-%s" '
                    'class="footnoteBackLink" '
                    'title="Jump back to footnote %d in the text.">'
                    '&#8617;</a>' % (id, i+1))
                if footer[-1].endswith("</p>"):
                    footer[-1] = footer[-1][:-len("</p>")] \
                        + '&nbsp;' + backlink + "</p>"
                else:
                    footer.append("\n<p>%s</p>" % backlink)
                footer.append('</li>')
            footer.append('</ol>')
            footer.append('</div>')
            return text + '\n\n' + '\n'.join(footer)
        else:
            return text

    # Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
    #   http://bumppo.net/projects/amputator/
    _ampersand_re = re.compile(r'&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)')
    _naked_lt_re = re.compile(r'<(?![a-z/?\$!])', re.I)
    _naked_gt_re = re.compile(r'''(?<![a-z?!/'"-])>''', re.I)

    def _encode_amps_and_angles(self, text):
        # Smart processing for ampersands and angle brackets that need
        # to be encoded.
        text = self._ampersand_re.sub('&amp;', text)

        # Encode naked <'s
        text = self._naked_lt_re.sub('&lt;', text)

        # Encode naked >'s
        # Note: Other markdown implementations (e.g. Markdown.pl, PHP
        # Markdown) don't do this.
        text = self._naked_gt_re.sub('&gt;', text)
        return text

    def _encode_backslash_escapes(self, text):
        for ch, escape in g_escape_table.items():
            text = text.replace("\\"+ch, escape)
        return text

    _auto_link_re = re.compile(r'<((https?|ftp):[^\'">\s]+)>', re.I)
    def _auto_link_sub(self, match):
        g1 = match.group(1)
        return '<a href="%s">%s</a>' % (g1, g1)

    _auto_email_link_re = re.compile(r"""
          <
           (?:mailto:)?
          (
              [-.\w]+
              \@
              [-\w]+(\.[-\w]+)*\.[a-z]+
          )
          >
        """, re.I | re.X | re.U)
    def _auto_email_link_sub(self, match):
        return self._encode_email_address(
            self._unescape_special_chars(match.group(1)))

    def _do_auto_links(self, text):
        text = self._auto_link_re.sub(self._auto_link_sub, text)
        text = self._auto_email_link_re.sub(self._auto_email_link_sub, text)
        return text

    def _encode_email_address(self, addr):
        #  Input: an email address, e.g. "foo@example.com"
        #
        #  Output: the email address as a mailto link, with each character
        #      of the address encoded as either a decimal or hex entity, in
        #      the hopes of foiling most address harvesting spam bots. E.g.:
        #
        #    <a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#102;&#111;&#111;&#64;&#101;
        #       x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;">&#102;&#111;&#111;
        #       &#64;&#101;x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;</a>
        #
        #  Based on a filter by Matthew Wickline, posted to the BBEdit-Talk
        #  mailing list: <http://tinyurl.com/yu7ue>
        chars = [_xml_encode_email_char_at_random(ch)
                 for ch in "mailto:" + addr]
        # Strip the mailto: from the visible part.
        addr = '<a href="%s">%s</a>' \
               % (''.join(chars), ''.join(chars[7:]))
        return addr

    def _do_link_patterns(self, text):
        """Caveat emptor: there isn't much guarding against link
        patterns being formed inside other standard Markdown links, e.g.
        inside a [link def][like this].

        Dev Notes: *Could* consider prefixing regexes with a negative
        lookbehind assertion to attempt to guard against this.
        """
        link_from_hash = {}
        for regex, repl in self.link_patterns:
            replacements = []
            for match in regex.finditer(text):
                if hasattr(repl, "__call__"):
                    href = repl(match)
                else:
                    href = match.expand(repl)
                replacements.append((match.span(), href))
            for (start, end), href in reversed(replacements):
                escaped_href = (
                    href.replace('"', '&quot;')  # b/c of attr quote
                        # To avoid markdown <em> and <strong>:
                        .replace('*', g_escape_table['*'])
                        .replace('_', g_escape_table['_']))
                link = '<a href="%s">%s</a>' % (escaped_href, text[start:end])
                hash = _hash_text(link)
                link_from_hash[hash] = link
                text = text[:start] + hash + text[end:]
        for hash, link in link_from_hash.items():
            text = text.replace(hash, link)
        return text

    def _unescape_special_chars(self, text):
        # Swap back in all the special characters we've hidden.
        for ch, hash in g_escape_table.items():
            text = text.replace(hash, ch)
        return text

    def _outdent(self, text):
        # Remove one level of line-leading tabs or spaces
        return self._outdent_re.sub('', text)


class MarkdownWithExtras(Markdown):
    """A markdowner class that enables most extras:

    - footnotes
    - code-color (only has effect if 'pygments' Python module on path)

    These are not included:
    - pyshell (specific to Python-related documenting)
    - code-friendly (because it *disables* part of the syntax)
    - link-patterns (because you need to specify some actual
      link-patterns anyway)
    """
    extras = ["footnotes", "code-color"]


#---- internal support functions

# From http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52549
def _curry(*args, **kwargs):
    function, args = args[0], args[1:]
    def result(*rest, **kwrest):
        combined = kwargs.copy()
        combined.update(kwrest)
        return function(*args + rest, **combined)
    return result

# Recipe: regex_from_encoded_pattern (1.0)
def _regex_from_encoded_pattern(s):
    """'foo'    -> re.compile(re.escape('foo'))
       '/foo/'  -> re.compile('foo')
       '/foo/i' -> re.compile('foo', re.I)
    """
    if s.startswith('/') and s.rfind('/') != 0:
        # Parse it: /PATTERN/FLAGS
        idx = s.rfind('/')
        pattern, flags_str = s[1:idx], s[idx+1:]
        flag_from_char = {
            "i": re.IGNORECASE,
            "l": re.LOCALE,
            "s": re.DOTALL,
            "m": re.MULTILINE,
            "u": re.UNICODE,
        }
        flags = 0
        for char in flags_str:
            try:
                flags |= flag_from_char[char]
            except KeyError:
                raise ValueError("unsupported regex flag: '%s' in '%s' "
                                 "(must be one of '%s')"
                                 % (char, s, ''.join(flag_from_char.keys())))
        return re.compile(s[1:idx], flags)
    else: # not an encoded regex
        return re.compile(re.escape(s))

# Recipe: dedent (0.1.2)
def _dedentlines(lines, tabsize=8, skip_first_line=False):
    """_dedentlines(lines, tabsize=8, skip_first_line=False) -> dedented lines

        "lines" is a list of lines to dedent.
        "tabsize" is the tab width to use for indent width calculations.
        "skip_first_line" is a boolean indicating if the first line should
            be skipped for calculating the indent width and for dedenting.
            This is sometimes useful for docstrings and similar.

    Same as dedent() except operates on a sequence of lines. Note: the
    lines list is modified **in-place**.
    """
    DEBUG = False
    if DEBUG:
        print "dedent: dedent(..., tabsize=%d, skip_first_line=%r)"\
              % (tabsize, skip_first_line)
    indents = []
    margin = None
    for i, line in enumerate(lines):
        if i == 0 and skip_first_line: continue
        indent = 0
        for ch in line:
            if ch == ' ':
                indent += 1
            elif ch == '\t':
                indent += tabsize - (indent % tabsize)
            elif ch in '\r\n':
                continue # skip all-whitespace lines
            else:
                break
        else:
            continue # skip all-whitespace lines
        if DEBUG: print "dedent: indent=%d: %r" % (indent, line)
        if margin is None:
            margin = indent
        else:
            margin = min(margin, indent)
    if DEBUG: print "dedent: margin=%r" % margin

    if margin is not None and margin > 0:
        for i, line in enumerate(lines):
            if i == 0 and skip_first_line: continue
            removed = 0
            for j, ch in enumerate(line):
                if ch == ' ':
                    removed += 1
                elif ch == '\t':
                    removed += tabsize - (removed % tabsize)
                elif ch in '\r\n':
                    if DEBUG: print "dedent: %r: EOL -> strip up to EOL" % line
                    lines[i] = lines[i][j:]
                    break
                else:
                    raise ValueError("unexpected non-whitespace char %r in "
                                     "line %r while removing %d-space margin"
                                     % (ch, line, margin))
                if DEBUG:
                    print "dedent: %r: %r -> removed %d/%d"\
                          % (line, ch, removed, margin)
                if removed == margin:
                    lines[i] = lines[i][j+1:]
                    break
                elif removed > margin:
                    lines[i] = ' '*(removed-margin) + lines[i][j+1:]
                    break
            else:
                if removed:
                    lines[i] = lines[i][removed:]
    return lines

def _dedent(text, tabsize=8, skip_first_line=False):
    """_dedent(text, tabsize=8, skip_first_line=False) -> dedented text

        "text" is the text to dedent.
        "tabsize" is the tab width to use for indent width calculations.
        "skip_first_line" is a boolean indicating if the first line should
            be skipped for calculating the indent width and for dedenting.
            This is sometimes useful for docstrings and similar.

    textwrap.dedent(s), but don't expand tabs to spaces
    """
    lines = text.splitlines(1)
    _dedentlines(lines, tabsize=tabsize, skip_first_line=skip_first_line)
    return ''.join(lines)


class _memoized(object):
   """Decorator that caches a function's return value each time it is called.
   If called later with the same arguments, the cached value is returned, and
   not re-evaluated.

   http://wiki.python.org/moin/PythonDecoratorLibrary
   """
   def __init__(self, func):
      self.func = func
      self.cache = {}
   def __call__(self, *args):
      try:
         return self.cache[args]
      except KeyError:
         self.cache[args] = value = self.func(*args)
         return value
      except TypeError:
         # uncachable -- for instance, passing a list as an argument.
         # Better to not cache than to blow up entirely.
         return self.func(*args)
   def __repr__(self):
      """Return the function's docstring."""
      return self.func.__doc__


def _xml_oneliner_re_from_tab_width(tab_width):
    """Standalone XML processing instruction regex."""
    return re.compile(r"""
        (?:
            (?<=\n\n)       # Starting after a blank line
            |               # or
            \A\n?           # the beginning of the doc
        )
        (                           # save in $1
            [ ]{0,%d}
            (?:
                <\?\w+\b\s+.*?\?>   # XML processing instruction
                |
                <\w+:\w+\b\s+.*?/>  # namespaced single tag
            )
            [ \t]*
            (?=\n{2,}|\Z)       # followed by a blank line or end of document
        )
        """ % (tab_width - 1), re.X)
_xml_oneliner_re_from_tab_width = _memoized(_xml_oneliner_re_from_tab_width)

def _hr_tag_re_from_tab_width(tab_width):
     return re.compile(r"""
        (?:
            (?<=\n\n)       # Starting after a blank line
            |               # or
            \A\n?           # the beginning of the doc
        )
        (                       # save in \1
            [ ]{0,%d}
            <(hr)               # start tag = \2
            \b                  # word break
            ([^<>])*?           #
            /?>                 # the matching end tag
            [ \t]*
            (?=\n{2,}|\Z)       # followed by a blank line or end of document
        )
        """ % (tab_width - 1), re.X)
_hr_tag_re_from_tab_width = _memoized(_hr_tag_re_from_tab_width)


def _xml_encode_email_char_at_random(ch):
    r = random()
    # Roughly 10% raw, 45% hex, 45% dec.
    # '@' *must* be encoded. I [John Gruber] insist.
    # Issue 26: '_' must be encoded.
    if r > 0.9 and ch not in "@_":
        return ch
    elif r < 0.45:
        # The [1:] is to drop leading '0': 0x63 -> x63
        return '&#%s;' % hex(ord(ch))[1:]
    else:
        return '&#%s;' % ord(ch)



#---- mainline

class _NoReflowFormatter(optparse.IndentedHelpFormatter):
    """An optparse formatter that does NOT reflow the description."""
    def format_description(self, description):
        return description or ""

def _test():
    import doctest
    doctest.testmod()

def main(argv=None):
    if argv is None:
        argv = sys.argv
    if not logging.root.handlers:
        logging.basicConfig()

    usage = "usage: %prog [PATHS...]"
    version = "%prog "+__version__
    parser = optparse.OptionParser(prog="markdown2", usage=usage,
        version=version, description=cmdln_desc,
        formatter=_NoReflowFormatter())
    parser.add_option("-v", "--verbose", dest="log_level",
                      action="store_const", const=logging.DEBUG,
                      help="more verbose output")
    parser.add_option("--encoding",
                      help="specify encoding of text content")
    parser.add_option("--html4tags", action="store_true", default=False,
                      help="use HTML 4 style for empty element tags")
    parser.add_option("-s", "--safe", metavar="MODE", dest="safe_mode",
                      help="sanitize literal HTML: 'escape' escapes "
                           "HTML meta chars, 'replace' replaces with an "
                           "[HTML_REMOVED] note")
    parser.add_option("-x", "--extras", action="append",
                      help="Turn on specific extra features (not part of "
                           "the core Markdown spec). Supported values: "
                           "'code-friendly' disables _/__ for emphasis; "
                           "'code-color' adds code-block syntax coloring; "
                           "'link-patterns' adds auto-linking based on patterns; "
                           "'footnotes' adds the footnotes syntax;"
                           "'xml' passes one-liner processing instructions and namespaced XML tags;"
                           "'pyshell' to put unindented Python interactive shell sessions in a <code> block.")
    parser.add_option("--use-file-vars",
                      help="Look for and use Emacs-style 'markdown-extras' "
                           "file var to turn on extras. See "
                           "<http://code.google.com/p/python-markdown2/wiki/Extras>.")
    parser.add_option("--link-patterns-file",
                      help="path to a link pattern file")
    parser.add_option("--self-test", action="store_true",
                      help="run internal self-tests (some doctests)")
    parser.add_option("--compare", action="store_true",
                      help="run against Markdown.pl as well (for testing)")
    parser.set_defaults(log_level=logging.INFO, compare=False,
                        encoding="utf-8", safe_mode=None, use_file_vars=False)
    opts, paths = parser.parse_args()
    log.setLevel(opts.log_level)

    if opts.self_test:
        return _test()

    if opts.extras:
        extras = {}
        for s in opts.extras:
            splitter = re.compile("[,;: ]+")
            for e in splitter.split(s):
                if '=' in e:
                    ename, earg = e.split('=', 1)
                    try:
                        earg = int(earg)
                    except ValueError:
                        pass
                else:
                    ename, earg = e, None
                extras[ename] = earg
    else:
        extras = None

    if opts.link_patterns_file:
        link_patterns = []
        f = open(opts.link_patterns_file)
        try:
            for i, line in enumerate(f.readlines()):
                if not line.strip(): continue
                if line.lstrip().startswith("#"): continue
                try:
                    pat, href = line.rstrip().rsplit(None, 1)
                except ValueError:
                    raise MarkdownError("%s:%d: invalid link pattern line: %r"
                                        % (opts.link_patterns_file, i+1, line))
                link_patterns.append(
                    (_regex_from_encoded_pattern(pat), href))
        finally:
            f.close()
    else:
        link_patterns = None

    from os.path import join, dirname, abspath, exists
    markdown_pl = join(dirname(dirname(abspath(__file__))), "test",
                       "Markdown.pl")
    for path in paths:
        if opts.compare:
            print "==== Markdown.pl ===="
            perl_cmd = 'perl %s "%s"' % (markdown_pl, path)
            o = os.popen(perl_cmd)
            perl_html = o.read()
            o.close()
            sys.stdout.write(perl_html)
            print "==== markdown2.py ===="
        html = markdown_path(path, encoding=opts.encoding,
                             html4tags=opts.html4tags,
                             safe_mode=opts.safe_mode,
                             extras=extras, link_patterns=link_patterns,
                             use_file_vars=opts.use_file_vars)
        sys.stdout.write(
            html.encode(sys.stdout.encoding or "utf-8", 'xmlcharrefreplace'))
        if opts.compare:
            test_dir = join(dirname(dirname(abspath(__file__))), "test")
            if exists(join(test_dir, "test_markdown2.py")):
                sys.path.insert(0, test_dir)
                from test_markdown2 import norm_html_from_html
                norm_html = norm_html_from_html(html)
                norm_perl_html = norm_html_from_html(perl_html)
            else:
                norm_html = html
                norm_perl_html = perl_html
            print "==== match? %r ====" % (norm_perl_html == norm_html)


if __name__ == "__main__":
    sys.exit( main(sys.argv) )

Added gluon/contrib/markmin/__init__.py version [adc83b19e7].


1
+

Added gluon/contrib/markmin/markmin.html version [396136532c].




































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<html><body><h1>Markmin markup language</h1><h2>About</h2><p>This is a new markup language that we call markmin designed to produce high quality scientific papers and books and also put them online. We provide serializers for html, latex and pdf. It is implemented in the <code class="">markmin2html</code> function in the <code class="">markmin2html.py</code>.</p><p>Example of usage:</p><pre><code class="">&gt;&gt;&gt; m = "Hello **world** [[link http://web2py.com]]"
&gt;&gt;&gt; from markmin2html import markmin2html
&gt;&gt;&gt; print markmin2html(m)
&gt;&gt;&gt; from markmin2latex import markmin2latex
&gt;&gt;&gt; print markmin2latex(m)
&gt;&gt;&gt; from markmin2pdf import markmin2pdf # requires pdflatex
&gt;&gt;&gt; print markmin2pdf(m)</code></pre><h2>Why?</h2><p>We wanted a markup language with the following requirements:</p><ul><li>less than 100 lines of functional code</li><li>easy to read</li><li>secure</li><li>support table, ul, ol, code</li><li>support html5 video and audio elements (html serialization only)</li><li>can align images and resize them</li><li>can specify class for tables and code elements</li><li>can add anchors</li><li>does not use _ for markup (since it creates odd behavior)</li><li>automatically links urls</li><li>fast</li><li>easy to extend</li><li>supports latex and pdf including references</li><li>allows to describe the markup in the markup (this document is generated from markmin syntax)</li></ul><p>(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)</p><p>The <a href="http://www.lulu.com/product/paperback/web2py-%283rd-edition%29/12822827">web2py book</a> published by lulu, for example, was entirely generated with markmin2pdf from the online <a href="http://www.web2py.com/book">web2py wiki</a></p><h2>Download</h2><ul><li>http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2html.py</li><li>http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2latex.py</li><li>http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2pdf.py</li></ul><p>markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.</p><h2>Examples</h2><h3>Bold, italic, code and links</h3><table class=""><tr><td><b>SOURCE</b>                </td><td><b>OUTPUT</b></td></tr><tr><td><code class=""># title</code>               </td><td><b>title</b></td></tr><tr><td><code class="">## section</code>            </td><td><b>section</b></td></tr><tr><td><code class="">### subsection</code>        </td><td><b>subsection</b></td></tr><tr><td><code class="">**bold**</code>              </td><td><b>bold</b></td></tr><tr><td><code class="">''italic''</code>            </td><td><i>italic</i></td></tr><tr><td><code class="">``verbatim``</code>      </td><td><code class="">verbatim</code></td></tr><tr><td><code class="">http://google.com</code>     </td><td>http://google.com</td></tr><tr><td><code class="">[[click me #myanchor]]</code></td><td><a href="#myanchor">click me</a></td></tr></table>
<h3>More on links</h3><p>The format is always <code class="">[[title link]]</code>. Notice you can nest bold, italic and code inside the link title.</p><h3>Anchors <span id="myanchor"><span></h3><p>You can place an anchor anywhere in the text using the syntax <code class="">[[name]]</code> where <i>name</i> is the name of the anchor.
You can then link the anchor with <a href="#myanchor">link</a>, i.e. <code class="">[[link #myanchor]]</code>.</p><h3>Images</h3><p><img src="http://www.web2py.com/examples/static/web2py_logo.png" alt="some image" align="right" width="200px" />
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code</p><p><code class="">[[some image http://www.web2py.com/examples/static/web2py_logo.png right 200px]]</code>.</p><h3>Unordered Lists</h3><pre><code class="">- Dog
- Cat
- Mouse</code></pre><p>is rendered as</p><ul><li>Dog</li><li>Cat</li><li>Mouse</li></ul><p>Two new lines between items break the list in two lists.</p><h3>Ordered Lists</h3><pre><code class="">+ Dog
+ Cat
+ Mouse</code></pre><p>is rendered as</p><ol><li>Dog</li><li>Cat</li><li>Mouse</li></ol><h3>Tables</h3><p>Something like this
<pre><code class="">---------
**A** | **B** | **C**
0 | 0 | X
0 | X | 0
X | 0 | 0
-----:abc</code></pre>
is a table and is rendered as
<table class="abc"><tr><td><b>A</b></td><td><b>B</b></td><td><b>C</b></td></tr><tr><td>0</td><td>0</td><td>X</td></tr><tr><td>0</td><td>X</td><td>0</td></tr><tr><td>X</td><td>0</td><td>0</td></tr></table>Four or more dashes delimit the table and | separates the columns.
The <code class="">:abc</code> at the end sets the class for the table and it is optional.</p><h3>Blockquote</h3><p>A table with a single cell is rendered as a blockquote:</p><blockquote class="">Hello world</blockquote>
<h3>Code, <code class="">&lt;code&gt;</code>, escaping and extra stuff</h3><pre><code class="python">def test():
    return "this is Python code"</code></pre><p>Optionally a ` inside a <code class="">``...``</code> block can be inserted escaped with !`!.
The <code class="">:python</code> after the markup is also optional. If present, by default, it is used to set the class of the &lt;code&gt; block.
The behavior can be overridden by passing an argument <code class="">extra</code> to the <code class="">render</code> function. For example:</p><pre><code class="python">&gt;&gt;&gt; markmin2html("``aaa``:custom",
       extra=dict(custom=lambda text: 'x'+text+'x'))</code></pre><p>generates</p><code class="python">'xaaax'</code><p>(the <code class="">``...``:custom</code> block is rendered by the <code class="">custom=lambda</code> function passed to <code class="">render</code>).</p><h3>Html5 support</h3><p>Markmin also supports the &lt;video&gt; and &lt;audio&gt; html5 tags using the notation:
<pre><code class="">[[title link video]]
[[title link audio]]</code></pre></p><h3>Latex</h3><p>Formulas can be embedded into HTML with <code class="">$</code><code class="">$</code>formula<code class="">$</code><code class="">$</code>.
You can use Google charts to render the formula:</p><pre><code class="">&gt;&gt;&gt; LATEX = '&lt;img src="http://chart.apis.google.com/chart?cht=tx&amp;chl=%s" align="center"/&gt;'
&gt;&gt;&gt; markmin2html(text,{'latex':lambda code: LATEX % code.replace('"','"')})</code></pre><h3>Citations and References</h3><p>Citations are treated as internal links in html and proper citations in latex if there is a final section called "References". Items like</p><pre><code class="">- [[key]] value</code></pre><p>in the References will be translated into Latex</p><pre><code class="">\bibitem{key} value</code></pre><p>Here is an example of usage:</p><pre><code class="">As shown in Ref.``mdipierro``:cite

## References
- [[mdipierro]] web2py Manual, 3rd Edition, lulu.com</code></pre><h3>Caveats</h3><p><code class="">&lt;ul/&gt;</code>, <code class="">&lt;ol/&gt;</code>, <code class="">&lt;code/&gt;</code>, <code class="">&lt;table/&gt;</code>, <code class="">&lt;blockquote/&gt;</code>, <code class="">&lt;h1/&gt;</code>, ..., <code class="">&lt;h6/&gt;</code> do not have <code class="">&lt;p&gt;...&lt;/p&gt;</code> around them.</p></body></html>

Added gluon/contrib/markmin/markmin.pdf version [a519c805cb].

cannot compute difference between binary files

Added gluon/contrib/markmin/markmin2html.py version [4b3f535252].








































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python                                                                                                        # created my Massimo Di Pierro
# license MIT/BSD/GPL
import re
import cgi

__all__ = ['render', 'markmin2html']

__doc__ = """
# Markmin markup language

## About

This is a new markup language that we call markmin designed to produce high quality scientific papers and books and also put them online. We provide serializers for html, latex and pdf. It is implemented in the ``markmin2html`` function in the ``markmin2html.py``.

Example of usage:

``
>>> m = "Hello **world** [[link http://web2py.com]]"
>>> from markmin2html import markmin2html
>>> print markmin2html(m)
>>> from markmin2latex import markmin2latex
>>> print markmin2latex(m)
>>> from markmin2pdf import markmin2pdf # requires pdflatex
>>> print markmin2pdf(m)
``

## Why?

We wanted a markup language with the following requirements:
- less than 100 lines of functional code
- easy to read
- secure
- support table, ul, ol, code
- support html5 video and audio elements (html serialization only)
- can align images and resize them
- can specify class for tables and code elements
- can add anchors
- does not use _ for markup (since it creates odd behavior)
- automatically links urls
- fast
- easy to extend
- supports latex and pdf including references
- allows to describe the markup in the markup (this document is generated from markmin syntax)

(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)

The [[web2py book http://www.lulu.com/product/paperback/web2py-%283rd-edition%29/12822827]] published by lulu, for example, was entirely generated with markmin2pdf from the online [[web2py wiki http://www.web2py.com/book]]

## Download

- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2html.py
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2latex.py
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2pdf.py

markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.

## Examples

### Bold, italic, code and links

--------------------------------------------------
**SOURCE**                 | **OUTPUT**
``# title``                | **title**
``## section``             | **section**
``### subsection``         | **subsection**
``**bold**``               | **bold**
``''italic''``             | ''italic''
``!`!`verbatim`!`!``       | ``verbatim``
``http://google.com``      | http://google.com
``[[click me #myanchor]]`` | [[click me #myanchor]]
---------------------------------------------------

### More on links

The format is always ``[[title link]]``. Notice you can nest bold, italic and code inside the link title.

### Anchors [[myanchor]]

You can place an anchor anywhere in the text using the syntax ``[[name]]`` where ''name'' is the name of the anchor.
You can then link the anchor with [[link #myanchor]], i.e. ``[[link #myanchor]]``.

### Images

[[some image http://www.web2py.com/examples/static/web2py_logo.png right 200px]]
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code

``[[some image http://www.web2py.com/examples/static/web2py_logo.png right 200px]]``.

### Unordered Lists

``
- Dog
- Cat
- Mouse
``

is rendered as
- Dog
- Cat
- Mouse

Two new lines between items break the list in two lists.

### Ordered Lists

``
+ Dog
+ Cat
+ Mouse
``

is rendered as
+ Dog
+ Cat
+ Mouse


### Tables

Something like this
``
---------
**A** | **B** | **C**
0 | 0 | X
0 | X | 0
X | 0 | 0
-----:abc
``
is a table and is rendered as
---------
**A** | **B** | **C**
0 | 0 | X
0 | X | 0
X | 0 | 0
-----:abc
Four or more dashes delimit the table and | separates the columns.
The ``:abc`` at the end sets the class for the table and it is optional.

### Blockquote

A table with a single cell is rendered as a blockquote:

-----
Hello world
-----

### Code, ``<code>``, escaping and extra stuff

``
def test():
    return "this is Python code"
``:python

Optionally a ` inside a ``!`!`...`!`!`` block can be inserted escaped with !`!.
The ``:python`` after the markup is also optional. If present, by default, it is used to set the class of the <code> block.
The behavior can be overridden by passing an argument ``extra`` to the ``render`` function. For example:

``
>>> markmin2html("!`!!`!aaa!`!!`!:custom",
       extra=dict(custom=lambda text: 'x'+text+'x'))
``:python

generates

``'xaaax'``:python

(the ``!`!`...`!`!:custom`` block is rendered by the ``custom=lambda`` function passed to ``render``).


### Html5 support

Markmin also supports the <video> and <audio> html5 tags using the notation:
``
[[title link video]]
[[title link audio]]
``

### Latex and other extensions

Formulas can be embedded into HTML with ``$````$``formula``$````$``.
You can use Google charts to render the formula:

``
>>> LATEX = '<img src="http://chart.apis.google.com/chart?cht=tx&chl=%s" align="ce\
nter"/>'
>>> markmin2html(text,{'latex':lambda code: LATEX % code.replace('"','\"')})
``

### Code with syntax highlighting

This requires a syntax highlighting tool, such as the web2py CODE helper.

``
>>> extra={'code_cpp':lambda text: CODE(text,language='cpp').xml(),
           'code_java':lambda text: CODE(text,language='java').xml(),
           'code_python':lambda text: CODE(text,language='python').xml(),
           'code_html':lambda text: CODE(text,language='html').xml()}
>>> markmin2html(text,extra=extra)
``

Code can now be marked up as in this example:

``
!`!`
<html><body>example</body></html>
!`!`:code_html
``

### Citations and References

Citations are treated as internal links in html and proper citations in latex if there is a final section called "References". Items like

``
- [[key]] value
``

in the References will be translated into Latex

``
\\bibitem{key} value
``

Here is an example of usage:

``
As shown in Ref.!`!`mdipierro`!`!:cite

## References
- [[mdipierro]] web2py Manual, 3rd Edition, lulu.com
``

### Caveats
``<ul/>``, ``<ol/>``, ``<code/>``, ``<table/>``, ``<blockquote/>``, ``<h1/>``, ..., ``<h6/>`` do not have ``<p>...</p>`` around them.

"""

META = 'META'
LATEX = '<img src="http://chart.apis.google.com/chart?cht=tx&chl=%s" align="center"/>'
regex_newlines = re.compile('(\n\r)|(\r\n)')
regex_dd=re.compile('\$\$(?P<latex>.*?)\$\$')
regex_code = re.compile('('+META+')|(``(?P<t>.*?)``(:(?P<c>\w+))?)',re.S)
regex_maps = [
    (re.compile('[ \t\r]+\n'),'\n'),
    (re.compile('[ \t\r]+\n'),'\n'),
    (re.compile('\*\*(?P<t>[^\s\*]+( +[^\s\*]+)*)\*\*'),'<b>\g<t></b>'),
    (re.compile("''(?P<t>[^\s']+( +[^\s']+)*)''"),'<i>\g<t></i>'),
    (re.compile('^#{6} (?P<t>[^\n]+)',re.M),'\n\n<<h6>\g<t></h6>\n'),
    (re.compile('^#{5} (?P<t>[^\n]+)',re.M),'\n\n<<h5>\g<t></h5>\n'),
    (re.compile('^#{4} (?P<t>[^\n]+)',re.M),'\n\n<<h4>\g<t></h4>\n'),
    (re.compile('^#{3} (?P<t>[^\n]+)',re.M),'\n\n<<h3>\g<t></h3>\n'),
    (re.compile('^#{2} (?P<t>[^\n]+)',re.M),'\n\n<<h2>\g<t></h2>\n'),
    (re.compile('^#{1} (?P<t>[^\n]+)',re.M),'\n\n<<h1>\g<t></h1>\n'),
    (re.compile('^\- +(?P<t>.*)',re.M),'<<ul><li>\g<t></li></ul>'),
    (re.compile('^\+ +(?P<t>.*)',re.M),'<<ol><li>\g<t></li></ol>'),
    (re.compile('</ol>\n<<ol>'),''),
    (re.compile('</ul>\n<<ul>'),''),
    (re.compile('<<'),'\n\n<<'),
    (re.compile('\n\s+\n'),'\n\n')]
regex_table = re.compile('^\-{4,}\n(?P<t>.*?)\n\-{4,}(:(?P<c>\w+))?\n',re.M|re.S)
regex_anchor = re.compile('\[\[(?P<t>\S+)\]\]')
regex_image_width = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +(?P<p>left|right|center) +(?P<w>\d+px)\]\]')
regex_image = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +(?P<p>left|right|center)\]\]')
regex_video = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +video\]\]')
regex_audio = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +audio\]\]')
regex_link = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+)\]\]')
regex_link_popup = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) popup\]\]')
regex_link_no_anchor = re.compile('\[\[ +(?P<k>\S+)\]\]')
regex_auto = re.compile('(?<!["\w\>])(?P<k>\w+://[\w\.\-\+\?&%\/]+)',re.M)

def render(text,extra={},allowed={},sep='p'):
    """
    Arguments:
    - text is the text to be processed
    - extra is a dict like extra=dict(custom=lambda value: value) that process custom code
      as in " ``this is custom code``:custom "
    - allowed is a dictionary of list of allowed classes like
      allowed = dict(code=('python','cpp','java'))
    - sep can be 'p' to separate text in <p>...</p>
      or can be 'br' to separate text using <br />


    >>> render('this is\\n# a section\\nparagraph')
    '<p>this is</p><h1>a section</h1><p>paragraph</p>'
    >>> render('this is\\n## a subsection\\nparagraph')
    '<p>this is</p><h2>a subsection</h2><p>paragraph</p>'
    >>> render('this is\\n### a subsubsection\\nparagraph')
    '<p>this is</p><h3>a subsubsection</h3><p>paragraph</p>'
    >>> render('**hello world**')
    '<p><b>hello world</b></p>'
    >>> render('``hello world``')
    '<code class="">hello world</code>'
    >>> render('``hello world``:python')
    '<code class="python">hello world</code>'
    >>> render('``\\nhello\\nworld\\n``:python')
    '<pre><code class="python">hello\\nworld</code></pre>'
    >>> render("''hello world''")
    '<p><i>hello world</i></p>'
    >>> render('** hello** **world**')
    '<p>** hello** <b>world</b></p>'

    >>> render('- this\\n- is\\n- a list\\n\\nand this\\n- is\\n- another')
    '<ul><li>this</li><li>is</li><li>a list</li></ul><p>and this</p><ul><li>is</li><li>another</li></ul>'

    >>> render('+ this\\n+ is\\n+ a list\\n\\nand this\\n+ is\\n+ another')
    '<ol><li>this</li><li>is</li><li>a list</li></ol><p>and this</p><ol><li>is</li><li>another</li></ol>'

    >>> render("----\\na | b\\nc | d\\n----\\n")
    '<table class=""><tr><td>a</td><td>b</td></tr><tr><td>c</td><td>d</td></tr></table>'

    >>> render("----\\nhello world\\n----\\n")
    '<blockquote class="">hello world</blockquote>'

    >>> render('[[this is a link http://example.com]]')
    '<p><a href="http://example.com">this is a link</a></p>'

    >>> render('[[this is an image http://example.com left]]')
    '<p><img src="http://example.com" alt="this is an image" align="left" /></p>'
    >>> render('[[this is an image http://example.com left 200px]]')
    '<p><img src="http://example.com" alt="this is an image" align="left" width="200px" /></p>'

    >>> render('[[this is an image http://example.com video]]')
    '<p><video src="http://example.com" controls></video></p>'
    >>> render('[[this is an image http://example.com audio]]')
    '<p><audio src="http://example.com" controls></audio></p>'

    >>> render('[[this is a **link** http://example.com]]')
    '<p><a href="http://example.com">this is a <b>link</b></a></p>'

    >>> render("``aaa``:custom",extra=dict(custom=lambda text: 'x'+text+'x'))
    'xaaax'
    >>> render(r"$$\int_a^b sin(x)dx$$")
    '<code class="latex">\\\\int_a^b sin(x)dx</code>'
    """
    text = str(text or '')
    #############################################################
    # replace all blocks marked with ``...``:class with META
    # store them into segments they will be treated as code
    #############################################################
    segments, i = [], 0
    text = regex_dd.sub('``\g<latex>``:latex ',text)
    text = regex_newlines.sub('\n',text)
    while True:
        item = regex_code.search(text,i)
        if not item: break
        if item.group()==META:
            segments.append((None,None))
            text = text[:item.start()]+META+text[item.end():]
        else:
            c = item.group('c') or ''
            if 'code' in allowed and not c in allowed['code']: c = ''
            code = item.group('t').replace('!`!','`')
            segments.append((code,c))
            text = text[:item.start()]+META+text[item.end():]
        i=item.start()+3

    #############################################################
    # do h1,h2,h3,h4,h5,h6,b,i,ol,ul and normalize spaces
    #############################################################
    text = '\n'.join(t.strip() for t in text.split('\n'))
    text = cgi.escape(text)
    for regex, sub in regex_maps:
        text = regex.sub(sub,text)

    #############################################################
    # process tables and blockquotes
    #############################################################
    while True:
        item = regex_table.search(text)
        if not item: break
        c = item.group('c') or ''
        if 'table' in allowed and not c in allowed['table']: c = ''
        content = item.group('t')
        if ' | ' in content:
            rows = content.replace('\n','</td></tr><tr><td>').replace(' | ','</td><td>')
            text = text[:item.start()] + '<<table class="%s"><tr><td>'%c + rows + '</td></tr></table>' + text[item.end():]
        else:
            text = text[:item.start()] + '<<blockquote class="%s">'%c + content + '</blockquote>' + text[item.end():]

    #############################################################
    # deal with images, videos, audios and links
    #############################################################

    text = regex_anchor.sub('<span id="\g<t>"><span>', text)
    text = regex_image_width.sub('<img src="\g<k>" alt="\g<t>" align="\g<p>" width="\g<w>" />', text)
    text = regex_image.sub('<img src="\g<k>" alt="\g<t>" align="\g<p>" />', text)
    text = regex_video.sub('<video src="\g<k>" controls></video>', text)
    text = regex_audio.sub('<audio src="\g<k>" controls></audio>', text)
    text = regex_link_popup.sub('<a href="\g<k>" target="_blank">\g<t></a>', text)
    text = regex_link_no_anchor.sub('<a href="\g<k>">\g<k></a>', text)
    text = regex_link.sub('<a href="\g<k>">\g<t></a>', text)
    text = regex_auto.sub('<a href="\g<k>">\g<k></a>', text)

    #############################################################
    # deal with paragraphs (trick <<ul, <<ol, <<table, <<h1, etc)
    # the << indicates that there should NOT be a new paragraph
    # META indicates a code block therefore no new paragraph
    #############################################################
    items = [item.strip() for item in text.split('\n\n')]
    if sep=='p':
        text = ''.join(p[:2]!='<<' and p!=META and '<p>%s</p>'%p or '%s'%p for p in items if p)
    elif sep=='br':
        text = '<br />'.join(items)

    #############################################################
    # finally get rid of <<
    #############################################################
    text=text.replace('<<','<')

    #############################################################
    # process all code text
    #############################################################
    parts = text.split(META)
    text = parts[0]
    for i,(code,b) in enumerate(segments):
        if code==None:
            html = META
        else:
            if b in extra:
                if code[:1]=='\n': code=code[1:]
                if code[-1:]=='\n': code=code[:-1]
                html = extra[b](code)
            elif b=='cite':
                html = '['+','.join('<a href="#%s" class="%s">%s</a>' \
                      % (d,b,d) \
                      for d in cgi.escape(code).split(','))+']'
            elif b=='latex':
                html = LATEX % code.replace('"','\"').replace('\n',' ')
            elif code[:1]=='\n' or code[-1:]=='\n':
                if code[:1]=='\n': code=code[1:]
                if code[-1:]=='\n': code=code[:-1]
                html = '<pre><code class="%s">%s</code></pre>' % (b,cgi.escape(code))
            else:
                if code[:1]=='\n': code=code[1:]
                if code[-1:]=='\n': code=code[:-1]
                html = '<code class="%s">%s</code>' % (b,cgi.escape(code))
        text = text+html+parts[i+1]
    return text


def markmin2html(text,extra={},allowed={},sep='p'):
    return render(text,extra,allowed,sep)

if __name__ == '__main__':
    import sys
    import doctest
    if sys.argv[1:2]==['-h']:
        print '<html><body>'+markmin2html(__doc__)+'</body></html>'
    elif len(sys.argv)>1:
        fargv = open(sys.argv[1],'r')
        try:
            print '<html><body>'+markmin2html(fargv.read())+'</body></html>'
        finally:
            fargv.close()
    else:
        doctest.testmod()

Added gluon/contrib/markmin/markmin2latex.py version [b2aa948b56].





























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# created my Massimo Di Pierro
# license MIT/BSD/GPL
import re
import cgi
import sys
import doctest
from optparse import OptionParser

__all__ = ['render','markmin2latex']

META = 'META'
regex_newlines = re.compile('(\n\r)|(\r\n)')
regex_dd=re.compile('\$\$(?P<latex>.*?)\$\$')
regex_code = re.compile('('+META+')|(``(?P<t>.*?)``(:(?P<c>\w+))?)',re.S)
regex_title = re.compile('^#{1} (?P<t>[^\n]+)',re.M)
regex_maps = [
    (re.compile('[ \t\r]+\n'),'\n'),
    (re.compile('[ \t\r]+\n'),'\n'),
    (re.compile('\*\*(?P<t>[^\s\*]+( +[^\s\*]+)*)\*\*'),'{\\\\bf \g<t>}'),
    (re.compile("''(?P<t>[^\s']+( +[^\s']+)*)''"),'{\\it \g<t>}'),
    (re.compile('^#{6} (?P<t>[^\n]+)',re.M),'\n\n{\\\\bf \g<t>}\n'),
    (re.compile('^#{5} (?P<t>[^\n]+)',re.M),'\n\n{\\\\bf \g<t>}\n'),
    (re.compile('^#{4} (?P<t>[^\n]+)',re.M),'\n\n\\\\goodbreak\\subsubsection{\g<t>}\n'),
    (re.compile('^#{3} (?P<t>[^\n]+)',re.M),'\n\n\\\\goodbreak\\subsection{\g<t>}\n'),
    (re.compile('^#{2} (?P<t>[^\n]+)',re.M),'\n\n\\\\goodbreak\\section{\g<t>}\n'),
    (re.compile('^#{1} (?P<t>[^\n]+)',re.M),''),
    (re.compile('^\- +(?P<t>.*)',re.M),'\\\\begin{itemize}\n\\item \g<t>\n\\end{itemize}'),
    (re.compile('^\+ +(?P<t>.*)',re.M),'\\\\begin{itemize}\n\\item \g<t>\n\\end{itemize}'),
    (re.compile('\\\\end\{itemize\}\s+\\\\begin\{itemize\}'),'\n'),
    (re.compile('\n\s+\n'),'\n\n')]
regex_table = re.compile('^\-{4,}\n(?P<t>.*?)\n\-{4,}(:(?P<c>\w+))?\n',re.M|re.S)

regex_anchor = re.compile('\[\[(?P<t>\S+)\]\]')
regex_bibitem = re.compile('\-\s*\[\[(?P<t>\S+)\]\]')
regex_image_width = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +(?P<p>left|right|center) +(?P<w>\d+px)\]\]')
regex_image = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +(?P<p>left|right|center)\]\]')
#regex_video = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +video\]\]')
#regex_audio = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+) +audio\]\]')
regex_link = re.compile('\[\[(?P<t>.*?) +(?P<k>\S+)\]\]')
regex_auto = re.compile('(?<!["\w])(?P<k>\w+://[\w\.\-\?&%]+)',re.M)
regex_commas = re.compile('[ ]+(?P<t>[,;\.])')
regex_noindent = re.compile('\n\n(?P<t>[a-z])')
regex_quote_left = re.compile('"(?=\w)')
regex_quote_right = re.compile('(?=\w\.)"')

def latex_escape(text,pound=True):
    text=text.replace('\\','{\\textbackslash}')
    for c in '^_&$%{}': text=text.replace(c,'\\'+c)
    text=text.replace('\\{\\textbackslash\\}','{\\textbackslash}')
    if pound: text=text.replace('#','\\#')
    return text

def render(text,extra={},allowed={},sep='p',image_mapper=lambda x:x):
    #############################################################
    # replace all blocks marked with ``...``:class with META
    # store them into segments they will be treated as code
    #############################################################
    text = str(text or '')
    segments, i = [], 0
    text = regex_dd.sub('``\g<latex>``:latex ',text)
    text = regex_newlines.sub('\n',text)
    while True:
        item = regex_code.search(text,i)
        if not item: break
        if item.group()==META:
            segments.append((None,None))
            text = text[:item.start()]+META+text[item.end():]
        else:
            c = item.group('c') or ''
            if 'code' in allowed and not c in allowed['code']: c = ''
            code = item.group('t').replace('!`!','`')
            segments.append((code,c))
            text = text[:item.start()]+META+text[item.end():]
        i=item.start()+3


    #############################################################
    # do h1,h2,h3,h4,h5,h6,b,i,ol,ul and normalize spaces
    #############################################################

    title = regex_title.search(text)
    if not title: title='Title'
    else: title=title.group('t')

    text = latex_escape(text,pound=False)

    texts = text.split('## References',1)
    text = regex_anchor.sub('\\label{\g<t>}', texts[0])
    if len(texts)==2:
        text += '\n\\begin{thebibliography}{999}\n'
        text += regex_bibitem.sub('\n\\\\bibitem{\g<t>}', texts[1])
        text += '\n\\end{thebibliography}\n'

    text = '\n'.join(t.strip() for t in text.split('\n'))
    for regex, sub in regex_maps:
        text = regex.sub(sub,text)
    text=text.replace('#','\\#')
    text=text.replace('`',"'")

    #############################################################
    # process tables and blockquotes
    #############################################################
    while True:
        item = regex_table.search(text)
        if not item: break
        c = item.group('c') or ''
        if 'table' in allowed and not c in allowed['table']: c = ''
        content = item.group('t')
        if ' | ' in content:
            rows = content.replace('\n','\\\\\n').replace(' | ',' & ')
            row0,row2 = rows.split('\\\\\n',1)
            cols=row0.count(' & ')+1
            cal='{'+''.join('l' for j in range(cols))+'}'
            tabular = '\\begin{center}\n{\\begin{tabular}'+cal+'\\hline\n' + row0+'\\\\ \\hline\n'+row2 + ' \\\\ \\hline\n\\end{tabular}}\n\\end{center}'
            if row2.count('\n')>20: tabular='\\newpage\n'+tabular
            text = text[:item.start()] + tabular + text[item.end():]
        else:
            text = text[:item.start()] + '\\begin{quote}' + content + '\\end{quote}' + text[item.end():]

    #############################################################
    # deal with images, videos, audios and links
    #############################################################

    def sub(x):
        f=image_mapper(x.group('k'))
        if not f: return None
        return '\n\\begin{center}\\includegraphics[width=8cm]{%s}\\end{center}\n' % (f)
    text = regex_image_width.sub(sub,text)
    text = regex_image.sub(sub,text)

    text = regex_link.sub('{\\\\footnotesize\\href{\g<k>}{\g<t>}}', text)
    text = regex_commas.sub('\g<t>',text)
    text = regex_noindent.sub('\n\\\\noindent \g<t>',text)

    ### fix paths in images
    regex=re.compile('\\\\_[\w_]*\.(eps|png|jpg|gif)')
    while True:
        match=regex.search(text)
        if not match: break
        text=text[:match.start()]+text[match.start()+1:]
    text = regex_quote_left.sub('``',text)
    text = regex_quote_right.sub("''",text)

    #############################################################
    # process all code text
    #############################################################
    parts = text.split(META)
    text = parts[0]
    authors = []
    for i,(code,b) in enumerate(segments):
        if code==None:
            html = META
        else:
            if b=='hidden':
                html=''
            elif b=='author':
                author = latex_escape(code.strip())
                authors.append(author)
                html=''
            elif b=='inxx':
                html='\inxx{%s}' % latex_escape(code)
            elif b=='cite':
                html='~\cite{%s}' % latex_escape(code.strip())
            elif b=='ref':
                html='~\ref{%s}' % latex_escape(code.strip())
            elif b=='latex':
                if '\n' in code:
                    html='\n\\begin{equation}\n%s\n\\end{equation}\n' % code.strip()
                else:
                    html='$%s$' % code.strip()
            elif b=='latex_eqnarray':
                code=code.strip()
                code='\\\\'.join(x.replace('=','&=&',1) for x in code.split('\\\\'))
                html='\n\\begin{eqnarray}\n%s\n\\end{eqnarray}\n' % code
            elif b.startswith('latex_'):
                key=b[6:]
                html='\\begin{%s}%s\\end{%s}' % (key,code,key)
            elif b in extra:
                if code[:1]=='\n': code=code[1:]
                if code[-1:]=='\n': code=code[:-1]
                html = extra[b](code)
            elif code[:1]=='\n' or code[:-1]=='\n':
                if code[:1]=='\n': code=code[1:]
                if code[-1:]=='\n': code=code[:-1]
                if code.startswith('<') or code.startswith('{{') or code.startswith('http'):
                    html = '\\begin{lstlisting}[keywords={}]\n%s\n\\end{lstlisting}' % code
                else:
                    html = '\\begin{lstlisting}\n%s\n\\end{lstlisting}' % code
            else:
                if code[:1]=='\n': code=code[1:]
                if code[-1:]=='\n': code=code[:-1]
                html = '{\\ft %s}' % latex_escape(code)
        try:
            text = text+html+parts[i+1]
        except:
            text = text + '... WIKI PROCESSING ERROR ...'
            break
    text =  text.replace(' ~\\cite','~\\cite')
    return text, title, authors

WRAPPER = """
\\documentclass[12pt]{article}
\\usepackage{hyperref}
\\usepackage{listings}
\\usepackage{upquote}
\\usepackage{color}
\\usepackage{graphicx}
\\usepackage{grffile}
\\usepackage[utf8x]{inputenc}
\\definecolor{lg}{rgb}{0.9,0.9,0.9}
\\definecolor{dg}{rgb}{0.3,0.3,0.3}
\\def\\ft{\\small\\tt}
\\lstset{
   basicstyle=\\footnotesize,
   breaklines=true, basicstyle=\\ttfamily\\color{black}\\footnotesize,
   keywordstyle=\\bf\\ttfamily,
   commentstyle=\\it\\ttfamily,
   stringstyle=\\color{dg}\\it\\ttfamily,
   numbers=left, numberstyle=\\color{dg}\\tiny, stepnumber=1, numbersep=5pt,
   backgroundcolor=\\color{lg}, tabsize=4, showspaces=false,
   showstringspaces=false
}
\\title{%(title)s}
\\author{%(author)s}
\\begin{document}
\\maketitle
\\tableofcontents
\\newpage
%(body)s
\\end{document}
"""

def markmin2latex(data, image_mapper=lambda x:x, extra={},
                  wrapper=WRAPPER):
    body, title, authors = render(data, extra=extra, image_mapper=image_mapper)
    author = '\n\\and\n'.join(a.replace('\n','\\\\\n\\footnotesize ') for a in authors)
    return wrapper % dict(title=title, author=author, body=body)

if __name__ == '__main__':
    parser = OptionParser()
    parser.add_option("-i", "--info", dest="info",
                      help="markmin help")
    parser.add_option("-t", "--test", dest="test", action="store_true",
                      default=False)
    parser.add_option("-n", "--no_wrapper", dest="no_wrapper",
                      action="store_true",default=False)
    parser.add_option("-1", "--one", dest="one",action="store_true",
                      default=False,help="switch section for chapter")
    parser.add_option("-w", "--wrapper", dest="wrapper", default=False,
                      help="latex file containing header and footer")

    (options, args) = parser.parse_args()
    if options.info:
        import markmin2html
        markmin2latex(markmin2html.__doc__)
    elif options.test:
        doctest.testmod()
    else:
        if options.wrapper:
            fwrapper = open(options.wrapper,'rb')
            try:
                wrapper = fwrapper.read()
            finally:
                fwrapper.close()
        elif options.no_wrapper:
            wrapper  = '%(body)s'
        else:
            wrapper = WRAPPER
        for f in args:
            fargs = open(f,'r')
            content_data = []
            try:
                content_data.append(fargs.read())
            finally:
                fargs.close()
        content = '\n'.join(content_data)
        output= markmin2latex(content,wrapper=wrapper)
        if options.one:
            output=output.replace(r'\section*{',r'\chapter*{')
            output=output.replace(r'\section{',r'\chapter{')
            output=output.replace(r'subsection{',r'section{')
        print output

Added gluon/contrib/markmin/markmin2pdf.py version [10244f7fd3].


































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
Created by Massimo Di Pierro
Licese BSD
"""

import subprocess
import os
import os.path
import re
import sys
from tempfile import mkstemp, mkdtemp, NamedTemporaryFile
from markmin2latex import markmin2latex

__all__ = ['markmin2pdf']

def removeall(path):

    ERROR_STR= """Error removing %(path)s, %(error)s """
    def rmgeneric(path, __func__):
        try:
            __func__(path)
        except OSError, (errno, strerror):
            print ERROR_STR % {'path' : path, 'error': strerror }

    files=[path]

    while files:
        file=files[0]
        if os.path.isfile(file):
            f=os.remove
            rmgeneric(file, os.remove)
            del files[0]
        elif os.path.isdir(file):
            nested = os.listdir(file)
            if not nested:
                rmgeneric(file, os.rmdir)
                del files[0]
            else:
                files = [os.path.join(file,x) for x in nested] + files


def latex2pdf(latex, pdflatex='pdflatex', passes=3):
    """
    calls pdflatex in a tempfolder

    Arguments:

    - pdflatex: path to the pdflatex command. Default is just 'pdflatex'.
    - passes:   defines how often pdflates should be run in the texfile.
    """

    pdflatex=pdflatex
    passes=passes
    warnings=[]

    # setup the envoriment
    tmpdir = mkdtemp()
    texfile = open(tmpdir+'/test.tex','wb')
    texfile.write(latex)
    texfile.seek(0)
    texfile.close()
    texfile = os.path.abspath(texfile.name)

    # start doing some work
    for i in range(0, passes):
        logfd,logname = mkstemp()
        outfile=os.fdopen(logfd)
        try:
            ret = subprocess.call([pdflatex,
                                   '-interaction=nonstopmode',
                                   '-output-format', 'pdf',
                                   '-output-directory', tmpdir,
                                   texfile],
                                  cwd=os.path.dirname(texfile), stdout=outfile,
                                  stderr=subprocess.PIPE)
        finally:
            outfile.close()
        re_errors=re.compile('^\!(.*)$',re.M)
        re_warnings=re.compile('^LaTeX Warning\:(.*)$',re.M)
        flog = open(logname)
        try:
            loglines = flog.read()
        finally:
            flog.close()
        errors=re_errors.findall(loglines)
        warnings=re_warnings.findall(loglines)
        os.unlink(logname)

    pdffile=texfile.rsplit('.',1)[0]+'.pdf'
    if os.path.isfile(pdffile):
        fpdf = open(pdffile, 'rb')
        try:
            data = fpdf.read()
        finally:
            fpdf.close()
    else:
        data = None
    removeall(tmpdir)
    return data, warnings, errors


def markmin2pdf(text, image_mapper=lambda x: None, extra={}):
    return latex2pdf(markmin2latex(text,image_mapper=image_mapper, extra=extra))


if __name__ == '__main__':
    import sys
    import doctest
    import markmin2html
    if sys.argv[1:2]==['-h']:
        data, warnings, errors = markmin2pdf(markmin2html.__doc__)
        if errors:
            print 'ERRORS:'+'\n'.join(errors)
            print 'WARNGINS:'+'\n'.join(warnings)
        else:
            print data
    elif len(sys.argv)>1:
        fargv = open(sys.argv[1],'rb')
        try:
            data, warnings, errors = markmin2pdf(fargv.read())
        finally:
            fargv.close()
        if errors:
            print 'ERRORS:'+'\n'.join(errors)
            print 'WARNGINS:'+'\n'.join(warnings)
        else:
            print data
    else:
        doctest.testmod()

Added gluon/contrib/memdb.py version [b91e54b5c2].












































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu> and
Robin B <robi123@gmail.com>.
License: GPL v2
"""

__all__ = ['MEMDB', 'Field']

import re
import sys
import os
import types
import datetime
import thread
import cStringIO
import csv
import copy
import gluon.validators as validators
from gluon.storage import Storage
import random

SQL_DIALECTS = {'memcache': {
    'boolean': bool,
    'string': unicode,
    'text': unicode,
    'password': unicode,
    'blob': unicode,
    'upload': unicode,
    'integer': long,
    'double': float,
    'date': datetime.date,
    'time': datetime.time,
    'datetime': datetime.datetime,
    'id': int,
    'reference': int,
    'lower': None,
    'upper': None,
    'is null': 'IS NULL',
    'is not null': 'IS NOT NULL',
    'extract': None,
    'left join': None,
    }}


def cleanup(text):
    if re.compile('[^0-9a-zA-Z_]').findall(text):
        raise SyntaxError, \
            'Can\'t cleanup \'%s\': only [0-9a-zA-Z_] allowed in table and field names' % text
    return text


def assert_filter_fields(*fields):
    for field in fields:
        if isinstance(field, (Field, Expression)) and field.type\
             in ['text', 'blob']:
            raise SyntaxError, 'AppEngine does not index by: %s'\
                 % field.type


def dateobj_to_datetime(object):

    # convert dates,times to datetimes for AppEngine

    if isinstance(object, datetime.date):
        object = datetime.datetime(object.year, object.month,
                                   object.day)
    if isinstance(object, datetime.time):
        object = datetime.datetime(
            1970,
            1,
            1,
            object.hour,
            object.minute,
            object.second,
            object.microsecond,
            )
    return object


def sqlhtml_validators(field_type, length):
    v = {
        'boolean': [],
        'string': validators.IS_LENGTH(length),
        'text': [],
        'password': validators.IS_LENGTH(length),
        'blob': [],
        'upload': [],
        'double': validators.IS_FLOAT_IN_RANGE(-1e100, 1e100),
        'integer': validators.IS_INT_IN_RANGE(-1e100, 1e100),
        'date': validators.IS_DATE(),
        'time': validators.IS_TIME(),
        'datetime': validators.IS_DATETIME(),
        'reference': validators.IS_INT_IN_RANGE(0, 1e100),
        }
    try:
        return v[field_type[:9]]
    except KeyError:
        return []


class DALStorage(dict):

    """
    a dictionary that let you do d['a'] as well as d.a
    """

    def __getattr__(self, key):
        return self[key]

    def __setattr__(self, key, value):
        if key in self:
            raise SyntaxError, 'Object \'%s\'exists and cannot be redefined' % key
        self[key] = value

    def __repr__(self):
        return '<DALStorage ' + dict.__repr__(self) + '>'


class SQLCallableList(list):

    def __call__(self):
        return copy.copy(self)


class MEMDB(DALStorage):

    """
    an instance of this class represents a database connection

    Example::

       db=MEMDB(Client())
       db.define_table('tablename',Field('fieldname1'),
                                   Field('fieldname2'))
    """

    def __init__(self, client):
        self._dbname = 'memdb'
        self['_lastsql'] = ''
        self.tables = SQLCallableList()
        self._translator = SQL_DIALECTS['memcache']
        self.client = client

    def define_table(
        self,
        tablename,
        *fields,
        **args
        ):
        tablename = cleanup(tablename)
        if tablename in dir(self) or tablename[0] == '_':
            raise SyntaxError, 'invalid table name: %s' % tablename
        if not tablename in self.tables:
            self.tables.append(tablename)
        else:
            raise SyntaxError, 'table already defined: %s' % tablename
        t = self[tablename] = Table(self, tablename, *fields)
        t._create()
        return t

    def __call__(self, where=''):
        return Set(self, where)


class SQLALL(object):

    def __init__(self, table):
        self.table = table


class Table(DALStorage):

    """
    an instance of this class represents a database table

    Example::

        db=MEMDB(Client())
        db.define_table('users',Field('name'))
        db.users.insert(name='me')
    """

    def __init__(
        self,
        db,
        tablename,
        *fields
        ):
        self._db = db
        self._tablename = tablename
        self.fields = SQLCallableList()
        self._referenced_by = []
        fields = list(fields)
        fields.insert(0, Field('id', 'id'))
        for field in fields:
            self.fields.append(field.name)
            self[field.name] = field
            field._tablename = self._tablename
            field._table = self
            field._db = self._db
        self.ALL = SQLALL(self)

    def _create(self):
        fields = []
        myfields = {}
        for k in self.fields:
            field = self[k]
            attr = {}
            if not field.type[:9] in ['id', 'reference']:
                if field.notnull:
                    attr = dict(required=True)
            if field.type[:2] == 'id':
                continue
            if field.type[:9] == 'reference':
                referenced = field.type[10:].strip()
                if not referenced:
                    raise SyntaxError, \
                        'Table %s: reference \'%s\' to nothing!' % (self._tablename, k)
                if not referenced in self._db:
                    raise SyntaxError, \
                        'Table: table %s does not exist' % referenced
                referee = self._db[referenced]
                ftype = \
                    self._db._translator[field.type[:9]](
                        self._db[referenced]._tableobj)
                if self._tablename in referee.fields:  # ## THIS IS OK
                    raise SyntaxError, \
                        'Field: table \'%s\' has same name as a field ' \
                        'in referenced table \'%s\'' % (self._tablename, referenced)
                self._db[referenced]._referenced_by.append((self._tablename,
                        field.name))
            elif not field.type in self._db._translator\
                 or not self._db._translator[field.type]:
                raise SyntaxError, 'Field: unkown field type %s' % field.type
        self._tableobj = self._db.client
        return None

    def create(self):

        # nothing to do, here for backward compatility

        pass

    def drop(self):

        # nothing to do, here for backward compatibility

        self._db(self.id > 0).delete()

    def insert(self, **fields):
        id = self._create_id()
        if self.update(id, **fields):
            return long(id)
        else:
            return None

    def get(self, id):
        val = self._tableobj.get(self._id_to_key(id))
        if val:
            return Storage(val)
        else:
            return None

    def update(self, id, **fields):
        for field in fields:
            if not field in fields and self[field].default\
                 != None:
                fields[field] = self[field].default
            if field in fields:
                fields[field] = obj_represent(fields[field],
                        self[field].type, self._db)
        return self._tableobj.set(self._id_to_key(id), fields)

    def delete(self, id):
        return self._tableobj.delete(self._id_to_key(id))

    def _shard_key(self, shard):
        return self._id_to_key('s/%s' % shard)

    def _id_to_key(self, id):
        return '__memdb__/t/%s/k/%s' % (self._tablename, str(id))

    def _create_id(self):
        shard = random.randint(10, 99)
        shard_id = self._shard_key(shard)
        id = self._tableobj.incr(shard_id)
        if not id:
            if self._tableobj.set(shard_id, '0'):
                id = 0
            else:
                raise Exception, 'cannot set memcache'
        return long(str(shard) + str(id))

    def __str__(self):
        return self._tablename


class Expression(object):

    def __init__(
        self,
        name,
        type='string',
        db=None,
        ):
        (self.name, self.type, self._db) = (name, type, db)

    def __str__(self):
        return self.name

    def __or__(self, other):  # for use in sortby
        assert_filter_fields(self, other)
        return Expression(self.name + '|' + other.name, None, None)

    def __invert__(self):
        assert_filter_fields(self)
        return Expression('-' + self.name, self.type, None)

    # for use in Query

    def __eq__(self, value):
        return Query(self, '=', value)

    def __ne__(self, value):
        return Query(self, '!=', value)

    def __lt__(self, value):
        return Query(self, '<', value)

    def __le__(self, value):
        return Query(self, '<=', value)

    def __gt__(self, value):
        return Query(self, '>', value)

    def __ge__(self, value):
        return Query(self, '>=', value)

    # def like(self,value): return Query(self,' LIKE ',value)
    # def belongs(self,value): return Query(self,' IN ',value)
    # for use in both Query and sortby

    def __add__(self, other):
        return Expression('%s+%s' % (self, other), 'float', None)

    def __sub__(self, other):
        return Expression('%s-%s' % (self, other), 'float', None)

    def __mul__(self, other):
        return Expression('%s*%s' % (self, other), 'float', None)

    def __div__(self, other):
        return Expression('%s/%s' % (self, other), 'float', None)


class Field(Expression):

    """
    an instance of this class represents a database field

    example::

        a = Field(name, 'string', length=32, required=False,
                     default=None, requires=IS_NOT_EMPTY(), notnull=False,
                     unique=False, uploadfield=True)

    to be used as argument of GQLDB.define_table

    allowed field types:
    string, boolean, integer, double, text, blob,
    date, time, datetime, upload, password

    strings must have a length or 512 by default.
    fields should have a default or they will be required in SQLFORMs
    the requires argument are used to validate the field input in SQLFORMs

    """

    def __init__(
        self,
        fieldname,
        type='string',
        length=None,
        default=None,
        required=False,
        requires=sqlhtml_validators,
        ondelete='CASCADE',
        notnull=False,
        unique=False,
        uploadfield=True,
        ):

        self.name = cleanup(fieldname)
        if fieldname in dir(Table) or fieldname[0] == '_':
            raise SyntaxError, 'Field: invalid field name: %s' % fieldname
        if isinstance(type, Table):
            type = 'reference ' + type._tablename
        if not length:
            length = 512
        self.type = type  # 'string', 'integer'
        self.length = length  # the length of the string
        self.default = default  # default value for field
        self.required = required  # is this field required
        self.ondelete = ondelete.upper()  # this is for reference fields only
        self.notnull = notnull
        self.unique = unique
        self.uploadfield = uploadfield
        if requires == sqlhtml_validators:
            requires = sqlhtml_validators(type, length)
        elif requires is None:
            requires = []
        self.requires = requires  # list of validators

    def formatter(self, value):
        if value is None or not self.requires:
            return value
        if not isinstance(self.requires, (list, tuple)):
            requires = [self.requires]
        else:
            requires = copy.copy(self.requires)
        requires.reverse()
        for item in requires:
            if hasattr(item, 'formatter'):
                value = item.formatter(value)
        return value

    def __str__(self):
        return '%s.%s' % (self._tablename, self.name)


MEMDB.Field = Field  # ## required by gluon/globals.py session.connect


def obj_represent(object, fieldtype, db):
    if object != None:
        if fieldtype == 'date' and not isinstance(object,
                datetime.date):
            (y, m, d) = [int(x) for x in str(object).strip().split('-')]
            object = datetime.date(y, m, d)
        elif fieldtype == 'time' and not isinstance(object, datetime.time):
            time_items = [int(x) for x in str(object).strip().split(':')[:3]]
            if len(time_items) == 3:
                (h, mi, s) = time_items
            else:
                (h, mi, s) = time_items + [0]
            object = datetime.time(h, mi, s)
        elif fieldtype == 'datetime' and not isinstance(object,
                datetime.datetime):
            (y, m, d) = [int(x) for x in
                         str(object)[:10].strip().split('-')]
            time_items = [int(x) for x in
                          str(object)[11:].strip().split(':')[:3]]
            if len(time_items) == 3:
                (h, mi, s) = time_items
            else:
                (h, mi, s) = time_items + [0]
            object = datetime.datetime(
                y,
                m,
                d,
                h,
                mi,
                s,
                )
        elif fieldtype == 'integer' and not isinstance(object, long):
            object = long(object)

    return object


class QueryException:

    def __init__(self, **a):
        self.__dict__ = a


class Query(object):

    """
    A query object necessary to define a set.
    It can be stored or can be passed to GQLDB.__call__() to obtain a Set

    Example:
    query=db.users.name=='Max'
    set=db(query)
    records=set.select()
    """

    def __init__(
        self,
        left,
        op=None,
        right=None,
        ):
        if isinstance(right, (Field, Expression)):
            raise SyntaxError, \
                'Query: right side of filter must be a value or entity'
        if isinstance(left, Field) and left.name == 'id':
            if op == '=':
                self.get_one = \
                    QueryException(tablename=left._tablename,
                                   id=long(right))
                return
            else:
                raise SyntaxError, 'only equality by id is supported'
        raise SyntaxError, 'not supported'

    def __str__(self):
        return str(self.left)


class Set(object):

    """
    As Set represents a set of records in the database,
    the records are identified by the where=Query(...) object.
    normally the Set is generated by GQLDB.__call__(Query(...))

    given a set, for example
       set=db(db.users.name=='Max')
    you can:
       set.update(db.users.name='Massimo')
       set.delete() # all elements in the set
       set.select(orderby=db.users.id,groupby=db.users.name,limitby=(0,10))
    and take subsets:
       subset=set(db.users.id<5)
    """

    def __init__(self, db, where=None):
        self._db = db
        self._tables = []
        self.filters = []
        if hasattr(where, 'get_all'):
            self.where = where
            self._tables.insert(0, where.get_all)
        elif hasattr(where, 'get_one') and isinstance(where.get_one,
                QueryException):
            self.where = where.get_one
        else:

            # find out which tables are involved

            if isinstance(where, Query):
                self.filters = where.left
            self.where = where
            self._tables = [field._tablename for (field, op, val) in
                            self.filters]

    def __call__(self, where):
        if isinstance(self.where, QueryException) or isinstance(where,
                QueryException):
            raise SyntaxError, \
                'neither self.where nor where can be a QueryException instance'
        if self.where:
            return Set(self._db, self.where & where)
        else:
            return Set(self._db, where)

    def _get_table_or_raise(self):
        tablenames = list(set(self._tables))  # unique
        if len(tablenames) < 1:
            raise SyntaxError, 'Set: no tables selected'
        if len(tablenames) > 1:
            raise SyntaxError, 'Set: no join in appengine'
        return self._db[tablenames[0]]._tableobj

    def _getitem_exception(self):
        (tablename, id) = (self.where.tablename, self.where.id)
        fields = self._db[tablename].fields
        self.colnames = ['%s.%s' % (tablename, t) for t in fields]
        item = self._db[tablename].get(id)
        return (item, fields, tablename, id)

    def _select_except(self):
        (item, fields, tablename, id) = self._getitem_exception()
        if not item:
            return []
        new_item = []
        for t in fields:
            if t == 'id':
                new_item.append(long(id))
            else:
                new_item.append(getattr(item, t))
        r = [new_item]
        return Rows(self._db, r, *self.colnames)

    def select(self, *fields, **attributes):
        """
        Always returns a Rows object, even if it may be empty
        """

        if isinstance(self.where, QueryException):
            return self._select_except()
        else:
            raise SyntaxError, 'select arguments not supported'

    def count(self):
        return len(self.select())

    def delete(self):
        if isinstance(self.where, QueryException):
            (item, fields, tablename, id) = self._getitem_exception()
            if not item:
                return
            self._db[tablename].delete(id)
        else:
            raise Exception, 'deletion not implemented'

    def update(self, **update_fields):
        if isinstance(self.where, QueryException):
            (item, fields, tablename, id) = self._getitem_exception()
            if not item:
                return
            for (key, value) in update_fields.items():
                setattr(item, key, value)
            self._db[tablename].update(id, **item)
        else:
            raise Exception, 'update not implemented'


def update_record(
    t,
    s,
    id,
    a,
    ):
    item = s.get(id)
    for (key, value) in a.items():
        t[key] = value
        setattr(item, key, value)
    s.update(id, **item)


class Rows(object):

    """
    A wrapper for the return value of a select. It basically represents a table.
    It has an iterator and each row is represented as a dictionary.
    """

    # ## this class still needs some work to care for ID/OID

    def __init__(
        self,
        db,
        response,
        *colnames
        ):
        self._db = db
        self.colnames = colnames
        self.response = response

    def __len__(self):
        return len(self.response)

    def __getitem__(self, i):
        if i >= len(self.response) or i < 0:
            raise SyntaxError, 'Rows: no such row: %i' % i
        if len(self.response[0]) != len(self.colnames):
            raise SyntaxError, 'Rows: internal error'
        row = DALStorage()
        for j in xrange(len(self.colnames)):
            value = self.response[i][j]
            if isinstance(value, unicode):
                value = value.encode('utf-8')
            packed = self.colnames[j].split('.')
            try:
                (tablename, fieldname) = packed
            except:
                if not '_extra' in row:
                    row['_extra'] = DALStorage()
                row['_extra'][self.colnames[j]] = value
                continue
            table = self._db[tablename]
            field = table[fieldname]
            if not tablename in row:
                row[tablename] = DALStorage()
            if field.type[:9] == 'reference':
                referee = field.type[10:].strip()
                rid = value
                row[tablename][fieldname] = rid
            elif field.type == 'boolean' and value != None:

                # row[tablename][fieldname]=Set(self._db[referee].id==rid)

                if value == True or value == 'T':
                    row[tablename][fieldname] = True
                else:
                    row[tablename][fieldname] = False
            elif field.type == 'date' and value != None\
                 and not isinstance(value, datetime.date):
                (y, m, d) = [int(x) for x in
                             str(value).strip().split('-')]
                row[tablename][fieldname] = datetime.date(y, m, d)
            elif field.type == 'time' and value != None\
                 and not isinstance(value, datetime.time):
                time_items = [int(x) for x in
                              str(value).strip().split(':')[:3]]
                if len(time_items) == 3:
                    (h, mi, s) = time_items
                else:
                    (h, mi, s) = time_items + [0]
                row[tablename][fieldname] = datetime.time(h, mi, s)
            elif field.type == 'datetime' and value != None\
                 and not isinstance(value, datetime.datetime):
                (y, m, d) = [int(x) for x in
                             str(value)[:10].strip().split('-')]
                time_items = [int(x) for x in
                              str(value)[11:].strip().split(':')[:3]]
                if len(time_items) == 3:
                    (h, mi, s) = time_items
                else:
                    (h, mi, s) = time_items + [0]
                row[tablename][fieldname] = datetime.datetime(
                    y,
                    m,
                    d,
                    h,
                    mi,
                    s,
                    )
            else:
                row[tablename][fieldname] = value
            if fieldname == 'id':
                id = row[tablename].id
                row[tablename].update_record = lambda t = row[tablename], \
                    s = self._db[tablename], id = id, **a: update_record(t,
                        s, id, a)
                for (referee_table, referee_name) in \
                    table._referenced_by:
                    s = self._db[referee_table][referee_name]
                    row[tablename][referee_table] = Set(self._db, s
                             == id)
        if len(row.keys()) == 1:
            return row[row.keys()[0]]
        return row

    def __iter__(self):
        """
        iterator over records
        """

        for i in xrange(len(self)):
            yield self[i]

    def __str__(self):
        """
        serializes the table into a csv file
        """

        s = cStringIO.StringIO()
        writer = csv.writer(s)
        writer.writerow(self.colnames)
        c = len(self.colnames)
        for i in xrange(len(self)):
            row = [self.response[i][j] for j in xrange(c)]
            for k in xrange(c):
                if isinstance(row[k], unicode):
                    row[k] = row[k].encode('utf-8')
            writer.writerow(row)
        return s.getvalue()

    def xml(self):
        """
        serializes the table using sqlhtml.SQLTABLE (if present)
        """

        return sqlhtml.SQLTABLE(self).xml()


def test_all():
    """
    How to run from web2py dir:
     export PYTHONPATH=.:YOUR_PLATFORMS_APPENGINE_PATH
     python gluon/contrib/memdb.py

    Setup the UTC timezone and database stubs

    >>> import os
    >>> os.environ['TZ'] = 'UTC'
    >>> import time
    >>> if hasattr(time, 'tzset'):
    ...   time.tzset()
    >>>
    >>> from google.appengine.api import apiproxy_stub_map
    >>> from google.appengine.api.memcache import memcache_stub
    >>> apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
    >>> apiproxy_stub_map.apiproxy.RegisterStub('memcache', memcache_stub.MemcacheServiceStub())

        Create a table with all possible field types
    >>> from google.appengine.api.memcache import Client
    >>> db=MEMDB(Client())
    >>> tmp=db.define_table('users',              Field('stringf','string',length=32,required=True),              Field('booleanf','boolean',default=False),              Field('passwordf','password',notnull=True),              Field('blobf','blob'),              Field('uploadf','upload'),              Field('integerf','integer',unique=True),              Field('doublef','double',unique=True,notnull=True),              Field('datef','date',default=datetime.date.today()),              Field('timef','time'),              Field('datetimef','datetime'),              migrate='test_user.table')

   Insert a field

    >>> user_id = db.users.insert(stringf='a',booleanf=True,passwordf='p',blobf='0A',                       uploadf=None, integerf=5,doublef=3.14,                       datef=datetime.date(2001,1,1),                       timef=datetime.time(12,30,15),                       datetimef=datetime.datetime(2002,2,2,12,30,15))
    >>> user_id != None
    True

    Select all

    # >>> all = db().select(db.users.ALL)

    Drop the table

    # >>> db.users.drop()

    Select many entities

    >>> tmp = db.define_table(\"posts\",              Field('body','text'),              Field('total','integer'),              Field('created_at','datetime'))
    >>> many = 20   #2010 # more than 1000 single fetch limit (it can be slow)
    >>> few = 5
    >>> most = many - few
    >>> 0 < few < most < many
    True
    >>> for i in range(many):
    ...     f=db.posts.insert(body='',                total=i,created_at=datetime.datetime(2008, 7, 6, 14, 15, 42, i))
    >>>

    # test timezones
    >>> class TZOffset(datetime.tzinfo):
    ...   def __init__(self,offset=0):
    ...     self.offset = offset
    ...   def utcoffset(self, dt): return datetime.timedelta(hours=self.offset)
    ...   def dst(self, dt): return datetime.timedelta(0)
    ...   def tzname(self, dt): return 'UTC' + str(self.offset)
    ...
    >>> SERVER_OFFSET = -8
    >>>
    >>> stamp = datetime.datetime(2008, 7, 6, 14, 15, 42, 828201)
    >>> post_id = db.posts.insert(created_at=stamp,body='body1')
    >>> naive_stamp = db(db.posts.id==post_id).select()[0].created_at
    >>> utc_stamp=naive_stamp.replace(tzinfo=TZOffset())
    >>> server_stamp = utc_stamp.astimezone(TZOffset(SERVER_OFFSET))
    >>> stamp == naive_stamp
    True
    >>> utc_stamp == server_stamp
    True
    >>> rows = db(db.posts.id==post_id).select()
    >>> len(rows) == 1
    True
    >>> rows[0].body == 'body1'
    True
    >>> db(db.posts.id==post_id).delete()
    >>> rows = db(db.posts.id==post_id).select()
    >>> len(rows) == 0
    True

    >>> id = db.posts.insert(total='0')   # coerce str to integer
    >>> rows = db(db.posts.id==id).select()
    >>> len(rows) == 1
    True
    >>> rows[0].total == 0
    True

    Examples of insert, select, update, delete

    >>> tmp=db.define_table('person', Field('name'), Field('birth','date'), migrate='test_person.table')
    >>> marco_id=db.person.insert(name=\"Marco\",birth='2005-06-22')
    >>> person_id=db.person.insert(name=\"Massimo\",birth='1971-12-21')
    >>> me=db(db.person.id==person_id).select()[0] # test select
    >>> me.name
    'Massimo'
    >>> db(db.person.id==person_id).update(name='massimo') # test update
    >>> me = db(db.person.id==person_id).select()[0]
    >>> me.name
    'massimo'
    >>> str(me.birth)
    '1971-12-21'

    # resave date to ensure it comes back the same
    >>> me=db(db.person.id==person_id).update(birth=me.birth) # test update
    >>> me = db(db.person.id==person_id).select()[0]
    >>> me.birth
    datetime.date(1971, 12, 21)
    >>> db(db.person.id==marco_id).delete() # test delete
    >>> len(db(db.person.id==marco_id).select())
    0

    Update a single record

    >>> me.update_record(name=\"Max\")
    >>> me.name
    'Max'
    >>> me = db(db.person.id == person_id).select()[0]
    >>> me.name
    'Max'

    """

SQLField = Field
SQLTable = Table
SQLXorable = Expression
SQLQuery = Query
SQLSet = Set
SQLRows = Rows
SQLStorage = DALStorage

if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/contrib/pam.py version [0f00a610f9].





























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# (c) 2007 Chris AtLee <chris@atlee.ca>
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
"""
PAM module for python

Provides an authenticate function that will allow the caller to authenticate
a user against the Pluggable Authentication Modules (PAM) on the system.

Implemented using ctypes, so no compilation is necessary.
"""
__all__ = ['authenticate']

from ctypes import CDLL, POINTER, Structure, CFUNCTYPE, cast, pointer, sizeof
from ctypes import c_void_p, c_uint, c_char_p, c_char, c_int
from ctypes.util import find_library

LIBPAM = CDLL(find_library("pam"))
LIBC = CDLL(find_library("c"))

CALLOC = LIBC.calloc
CALLOC.restype = c_void_p
CALLOC.argtypes = [c_uint, c_uint]

STRDUP = LIBC.strdup
STRDUP.argstypes = [c_char_p]
STRDUP.restype = POINTER(c_char) # NOT c_char_p !!!!

# Various constants
PAM_PROMPT_ECHO_OFF = 1
PAM_PROMPT_ECHO_ON = 2
PAM_ERROR_MSG = 3
PAM_TEXT_INFO = 4

class PamHandle(Structure):
    """wrapper class for pam_handle_t"""
    _fields_ = [
            ("handle", c_void_p)
            ]

    def __init__(self):
        Structure.__init__(self)
        self.handle = 0

class PamMessage(Structure):
    """wrapper class for pam_message structure"""
    _fields_ = [
            ("msg_style", c_int),
            ("msg", c_char_p),
            ]

    def __repr__(self):
        return "<PamMessage %i '%s'>" % (self.msg_style, self.msg)

class PamResponse(Structure):
    """wrapper class for pam_response structure"""
    _fields_ = [
            ("resp", c_char_p),
            ("resp_retcode", c_int),
            ]

    def __repr__(self):
        return "<PamResponse %i '%s'>" % (self.resp_retcode, self.resp)

CONV_FUNC = CFUNCTYPE(c_int,
        c_int, POINTER(POINTER(PamMessage)),
               POINTER(POINTER(PamResponse)), c_void_p)

class PamConv(Structure):
    """wrapper class for pam_conv structure"""
    _fields_ = [
            ("conv", CONV_FUNC),
            ("appdata_ptr", c_void_p)
            ]

PAM_START = LIBPAM.pam_start
PAM_START.restype = c_int
PAM_START.argtypes = [c_char_p, c_char_p, POINTER(PamConv),
        POINTER(PamHandle)]

PAM_AUTHENTICATE = LIBPAM.pam_authenticate
PAM_AUTHENTICATE.restype = c_int
PAM_AUTHENTICATE.argtypes = [PamHandle, c_int]

def authenticate(username, password, service='login'):
    """Returns True if the given username and password authenticate for the
    given service.  Returns False otherwise

    ``username``: the username to authenticate

    ``password``: the password in plain text

    ``service``: the PAM service to authenticate against.
                 Defaults to 'login'"""
    @CONV_FUNC
    def my_conv(n_messages, messages, p_response, app_data):
        """Simple conversation function that responds to any
        prompt where the echo is off with the supplied password"""
        # Create an array of n_messages response objects
        addr = CALLOC(n_messages, sizeof(PamResponse))
        p_response[0] = cast(addr, POINTER(PamResponse))
        for i in range(n_messages):
            if messages[i].contents.msg_style == PAM_PROMPT_ECHO_OFF:
                pw_copy = STRDUP(str(password))
                p_response.contents[i].resp = cast(pw_copy, c_char_p)
                p_response.contents[i].resp_retcode = 0
        return 0

    handle = PamHandle()
    conv = PamConv(my_conv, 0)
    retval = PAM_START(service, username, pointer(conv), pointer(handle))

    if retval != 0:
        # TODO: This is not an authentication error, something
        # has gone wrong starting up PAM
        return False

    retval = PAM_AUTHENTICATE(handle, 0)
    return retval == 0

if __name__ == "__main__":
    import getpass
    print authenticate(getpass.getuser(), getpass.getpass())

Added gluon/contrib/populate.py version [5bbd5140d2].

cannot compute difference between binary files

Added gluon/contrib/pyfpdf/README version [aa4384f3d2].


1
+
Read more about this http://code.google.com/p/pyfpdf

Added gluon/contrib/pyfpdf/__init__.py version [5d666989e3].





1
2
3
4
+
+
+
+
from fpdf import FPDF
from html import HTMLMixin
from template import Template

Added gluon/contrib/pyfpdf/designer.py version [1f28537045].
































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: latin-1 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

"Visual Template designer for PyFPDF (using wxPython OGL library)"

__author__ = "Mariano Reingart <reingart@gmail.com>"
__copyright__ = "Copyright (C) 2011 Mariano Reingart"
__license__ = "GPL 3.0"
__version__ = "1.01a"

# Based on:
#  * pySjetch.py wxPython sample application
#  * OGL.py and other wxPython demo modules


import os, sys
import wx
import wx.lib.ogl as ogl
from wx.lib.wordwrap import wordwrap

DEBUG = True


class CustomDialog(wx.Dialog):
    "A dinamyc dialog to ask user about arbitrary fields"

    def __init__(
            self, parent, ID, title, size=wx.DefaultSize, pos=wx.DefaultPosition,
            style=wx.DEFAULT_DIALOG_STYLE, fields=None, data=None,
            ):

        wx.Dialog.__init__ (self, parent, ID, title, pos, size, style)

        sizer = wx.BoxSizer(wx.VERTICAL)

        self.textctrls = {}
        for field in fields:
            box = wx.BoxSizer(wx.HORIZONTAL)
            label = wx.StaticText(self, -1, field)
            label.SetHelpText("This is the help text for the label")
            box.Add(label, 1, wx.ALIGN_CENTRE|wx.ALL, 5)
            text = wx.TextCtrl(self, -1, "", size=(80,-1))
            text.SetHelpText("Here's some help text for field #1")
            if field in data:
                text.SetValue(repr(data[field]))
            box.Add(text, 1, wx.ALIGN_CENTRE|wx.ALL, 1)
            sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 1)
            self.textctrls[field] = text

        line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL)
        sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)

        btnsizer = wx.StdDialogButtonSizer()

        btn = wx.Button(self, wx.ID_OK)
        btn.SetHelpText("The OK button completes the dialog")
        btn.SetDefault()
        btnsizer.AddButton(btn)

        btn = wx.Button(self, wx.ID_CANCEL)
        btn.SetHelpText("The Cancel button cancels the dialog. (Cool, huh?)")
        btnsizer.AddButton(btn)
        btnsizer.Realize()

        sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)

        self.SetSizer(sizer)
        sizer.Fit(self)

    @classmethod
    def do_input(Class, parent, title, fields, data):
        dlg = Class(parent, -1, title, size=(350, 200),
                         style=wx.DEFAULT_DIALOG_STYLE, # & ~wx.CLOSE_BOX,
                        fields=fields, data=data
                         )
        dlg.CenterOnScreen()
        while 1:
            val = dlg.ShowModal()
            if val == wx.ID_OK:
                values = {}
                for field in fields:
                    try:
                        values[field] = eval(dlg.textctrls[field].GetValue())
                    except Exception, e:
                        msg = wx.MessageDialog(parent, unicode(e),
                               "Error in field %s" % field,
                               wx.OK | wx.ICON_INFORMATION
                               )
                        msg.ShowModal()
                        msg.Destroy()
                        break
                else:
                    return dict([(field, values[field]) for field in fields])
            else:
                return None


class MyEvtHandler(ogl.ShapeEvtHandler):
    "Custom Event Handler for Shapes"
    def __init__(self, callback):
        ogl.ShapeEvtHandler.__init__(self)
        self.callback = callback

    def OnLeftClick(self, x, y, keys=0, attachment=0):
        shape = self.GetShape()
        canvas = shape.GetCanvas()
        dc = wx.ClientDC(canvas)
        canvas.PrepareDC(dc)

        if shape.Selected() and keys & ogl.KEY_SHIFT:
            shape.Select(False, dc)
            #canvas.Redraw(dc)
            canvas.Refresh(False)
        else:
            redraw = False
            shapeList = canvas.GetDiagram().GetShapeList()
            toUnselect = []

            for s in shapeList:
                if s.Selected() and not keys & ogl.KEY_SHIFT:
                    # If we unselect it now then some of the objects in
                    # shapeList will become invalid (the control points are
                    # shapes too!) and bad things will happen...
                    toUnselect.append(s)

            shape.Select(True, dc)

            if toUnselect:
                for s in toUnselect:
                    s.Select(False, dc)
                ##canvas.Redraw(dc)
                canvas.Refresh(False)

        self.callback()

    def OnEndDragLeft(self, x, y, keys=0, attachment=0):
        shape = self.GetShape()
        ogl.ShapeEvtHandler.OnEndDragLeft(self, x, y, keys, attachment)

        if not shape.Selected():
            self.OnLeftClick(x, y, keys, attachment)

        self.callback()

    def OnSizingEndDragLeft(self, pt, x, y, keys, attch):
        ogl.ShapeEvtHandler.OnSizingEndDragLeft(self, pt, x, y, keys, attch)
        self.callback()

    def OnMovePost(self, dc, x, y, oldX, oldY, display):
        shape = self.GetShape()
        ogl.ShapeEvtHandler.OnMovePost(self, dc, x, y, oldX, oldY, display)
        self.callback()
        if "wxMac" in wx.PlatformInfo:
            shape.GetCanvas().Refresh(False)

    def OnLeftDoubleClick(self, x, y, keys = 0, attachment = 0):
        self.callback("LeftDoubleClick")

    def OnRightClick(self, *dontcare):
        self.callback("RightClick")


class Element(object):
    "Visual class that represent a placeholder in the template"

    fields = ['name', 'type',
                  'x1', 'y1', 'x2', 'y2',
                  'font', 'size',
                  'bold', 'italic', 'underline',
                  'foreground', 'background',
                  'align', 'text', 'priority',]

    def __init__(self, canvas=None, frame=None, zoom=5.0, static=False, **kwargs):
        self.kwargs = kwargs
        self.zoom = zoom
        self.frame = frame
        self.canvas = canvas
        self.static = static

        name = kwargs['name']
        kwargs['type']
        type = kwargs['type']

        x, y, w, h = self.set_coordinates(kwargs['x1'], kwargs['y1'], kwargs['x2'], kwargs['y2'])

        text = kwargs['text']

        shape = self.shape = ogl.RectangleShape(w, h)

        if not static:
            shape.SetDraggable(True, True)

        shape.SetX(x)
        shape.SetY(y)
        #if pen:    shape.SetPen(pen)
        #if brush:  shape.SetBrush(brush)
        shape.SetBrush(wx.TRANSPARENT_BRUSH)

        if type not in ('L', 'B', 'BC'):
            if not static:
                pen = wx.LIGHT_GREY_PEN
            else:
                pen = wx.RED_PEN
            shape.SetPen(pen)

        self.text = kwargs['text']

        evthandler = MyEvtHandler(self.evt_callback)
        evthandler.SetShape(shape)
        evthandler.SetPreviousHandler(shape.GetEventHandler())
        shape.SetEventHandler(evthandler)
        shape.SetCentreResize(False)
        shape.SetMaintainAspectRatio(False)

        canvas.AddShape( shape )

    @classmethod
    def new(Class, parent):
        data = dict(name='some_name', type='T',
                    x1=5.0, y1=5.0, x2=100.0, y2=10.0,
                    font="Arial", size=12,
                 bold=False, italic=False, underline=False,
                    foreground= 0x000000, background=0xFFFFFF,
                    align="L", text="", priority=0)
        data = CustomDialog.do_input(parent, 'New element', Class.fields, data)
        if data:
            return Class(canvas=parent.canvas, frame=parent, **data)

    def edit(self):
        "Edit current element (show a dialog box with all fields)"
        data = self.kwargs.copy()
        x1, y1, x2, y2 = self.get_coordinates()
        data.update(dict(name=self.name,
                         text=self.text,
                         x1=x1, y1=y1, x2=x2, y2=y2,
                       ))
        data = CustomDialog.do_input(self.frame, 'Edit element', self.fields, data)
        if data:
            self.kwargs.update(data)
            self.name = data['name']
            self.text = data['text']
            x,y, w, h = self.set_coordinates(data['x1'], data['y1'], data['x2'], data['y2'])
            self.shape.SetX(x)
            self.shape.SetY(y)
            self.shape.SetWidth(w)
            self.shape.SetHeight(h)
            self.canvas.Refresh(False)
            self.canvas.GetDiagram().ShowAll(1)

    def edit_text(self):
        "Allow text edition (i.e. for doubleclick)"
        dlg = wx.TextEntryDialog(
            self.frame, 'Text for %s' % self.name,
            'Edit Text', '')
        if self.text:
            dlg.SetValue(self.text)
        if dlg.ShowModal() == wx.ID_OK:
            self.text = dlg.GetValue().encode("latin1")
        dlg.Destroy()

    def copy(self):
        "Return an identical duplicate"
        kwargs = self.as_dict()
        element = Element(canvas=self.canvas, frame=self.frame, zoom=self.zoom, static=self.static, **kwargs)
        return element

    def remove(self):
        "Erases visual shape from OGL canvas (element must be deleted manually)"
        self.canvas.RemoveShape(self.shape)

    def move(self, dx, dy):
        "Change pdf coordinates (converting to wx internal values)"
        x1, y1, x2, y2 = self.get_coordinates()
        x1 += dx
        x2 += dx
        y1 += dy
        y2 += dy
        x, y, w, h = self.set_coordinates(x1, y1, x2, y2)
        self.shape.SetX(x)
        self.shape.SetY(y)

    def evt_callback(self, evt_type=None):
        "Event dispatcher"
        if evt_type=="LeftDoubleClick":
            self.edit_text()
        if evt_type=='RightClick':
            self.edit()

        # update the status bar
        x1, y1, x2, y2 = self.get_coordinates()
        self.frame.SetStatusText("%s (%0.2f, %0.2f) - (%0.2f, %0.2f)" %
                                        (self.name, x1, y1, x2, y2))

    def get_coordinates(self):
        "Convert from wx to pdf coordinates"
        x, y = self.shape.GetX(), self.shape.GetY()
        w, h = self.shape.GetBoundingBoxMax()
        w -= 1
        h -= 1
        x1 = x/self.zoom - w/self.zoom/2.0
        x2 = x/self.zoom + w/self.zoom/2.0
        y1 = y/self.zoom - h/self.zoom/2.0
        y2 = y/self.zoom + h/self.zoom/2.0
        return x1, y1, x2, y2

    def set_coordinates(self, x1, y1, x2, y2):
        "Convert from pdf to wx coordinates"
        x1 = x1 * self.zoom
        x2 = x2 * self.zoom
        y1 = y1 * self.zoom
        y2 = y2 * self.zoom

        # shapes seems to be centred, pdf coord not
        w = max(x1, x2) - min(x1, x2) + 1
        h = max(y1, y2) - min(y1, y2) + 1
        x = (min(x1, x2) + w/2.0)
        y = (min(y1, y2) + h/2.0)
        return x, y, w, h

    def text(self, txt=None):
        if txt is not None:
            if not isinstance(txt,str):
                txt = str(txt)
            self.kwargs['text'] = txt
            self.shape.ClearText()
            for line in txt.split('\n'):
                self.shape.AddText(unicode(line, "latin1"))
            self.canvas.Refresh(False)
        return self.kwargs['text']
    text = property(text, text)

    def set_x(self, x):
        self.shape.SetX(x)
        self.canvas.Refresh(False)
        self.evt_callback()
    def set_y(self, y):
        self.shape.SetY(y)
        self.canvas.Refresh(False)
        self.evt_callback()
    def get_x(self):
        return self.shape.GetX()
    def get_y(self):
        return self.shape.GetY()

    x = property(get_x, set_x)
    y = property(get_y, set_y)

    def selected(self, sel=None):
        if sel is not None:
            print "Setting Select(%s)" % sel
            self.shape.Select(sel)
        return self.shape.Selected()
    selected = property(selected, selected)

    def name(self, name=None):
        if name is not None:
            self.kwargs['name'] = name
        return self.kwargs['name']
    name = property(name, name)

    def __contains__(self, k):
        "Implement in keyword for searchs"
        return k in self.name.lower() or self.text and k in self.text.lower()

    def as_dict(self):
        "Return a dictionary representation, used by pyfpdf"
        d = self.kwargs
        x1, y1, x2, y2 = self.get_coordinates()
        d.update({
                'x1': x1, 'y1': y1, 'x2': x2, 'y2': y2,
                'text': self.text})
        return d


class AppFrame(wx.Frame):
    "OGL Designer main window"
    title = "PyFPDF Template Designer (wx OGL)"

    def __init__(self):
        wx.Frame.__init__( self,
                          None, -1, self.title,
                          size=(640,480),
                          style=wx.DEFAULT_FRAME_STYLE )
        sys.excepthook  = self.except_hook
        self.filename = ""
        # Create a toolbar:
        tsize = (16,16)
        self.toolbar = self.CreateToolBar(wx.TB_HORIZONTAL | wx.NO_BORDER | wx.TB_FLAT)

        artBmp = wx.ArtProvider.GetBitmap
        self.toolbar.AddSimpleTool(
            wx.ID_NEW, artBmp(wx.ART_NEW, wx.ART_TOOLBAR, tsize), "New")
        self.toolbar.AddSimpleTool(
            wx.ID_OPEN, artBmp(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, tsize), "Open")
        self.toolbar.AddSimpleTool(
            wx.ID_SAVE, artBmp(wx.ART_FILE_SAVE, wx.ART_TOOLBAR, tsize), "Save")
        self.toolbar.AddSimpleTool(
            wx.ID_SAVEAS, artBmp(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, tsize),
            "Save As...")
        #-------
        self.toolbar.AddSeparator()
        self.toolbar.AddSimpleTool(
            wx.ID_UNDO, artBmp(wx.ART_UNDO, wx.ART_TOOLBAR, tsize), "Undo")
        self.toolbar.AddSimpleTool(
            wx.ID_REDO, artBmp(wx.ART_REDO, wx.ART_TOOLBAR, tsize), "Redo")
        self.toolbar.AddSeparator()
        #-------
        self.toolbar.AddSimpleTool(
            wx.ID_CUT, artBmp(wx.ART_CUT, wx.ART_TOOLBAR, tsize), "Remove")
        self.toolbar.AddSimpleTool(
            wx.ID_COPY, artBmp(wx.ART_COPY, wx.ART_TOOLBAR, tsize), "Duplicate")
        self.toolbar.AddSimpleTool(
            wx.ID_PASTE, artBmp(wx.ART_PASTE, wx.ART_TOOLBAR, tsize), "Insert")
        self.toolbar.AddSeparator()
        self.toolbar.AddSimpleTool(
            wx.ID_FIND, artBmp(wx.ART_FIND, wx.ART_TOOLBAR, tsize), "Find")
        self.toolbar.AddSeparator()
        self.toolbar.AddSimpleTool(
            wx.ID_PRINT, artBmp(wx.ART_PRINT, wx.ART_TOOLBAR, tsize), "Print")
        self.toolbar.AddSimpleTool(
            wx.ID_ABOUT, artBmp(wx.ART_HELP, wx.ART_TOOLBAR, tsize), "About")

        self.toolbar.Realize()

        self.toolbar.EnableTool(wx.ID_SAVEAS,       False)
        self.toolbar.EnableTool(wx.ID_UNDO,         False)
        self.toolbar.EnableTool(wx.ID_REDO,         False)

        menu_handlers = [
            (wx.ID_NEW, self.do_new),
            (wx.ID_OPEN, self.do_open),
            (wx.ID_SAVE, self.do_save),
            (wx.ID_PRINT, self.do_print),
            (wx.ID_FIND, self.do_find),
            (wx.ID_CUT, self.do_cut),
            (wx.ID_COPY, self.do_copy),
            (wx.ID_PASTE, self.do_paste),
            (wx.ID_ABOUT, self.do_about),
        ]
        for menu_id, handler in menu_handlers:
            self.Bind(wx.EVT_MENU, handler, id = menu_id)

        sizer = wx.BoxSizer(wx.VERTICAL)
        # put stuff into sizer

        self.CreateStatusBar()

        canvas = self.canvas = ogl.ShapeCanvas( self )
        maxWidth  = 1500
        maxHeight = 2000
        canvas.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
        sizer.Add( canvas, 1, wx.GROW )

        canvas.SetBackgroundColour("WHITE") #

        diagram = self.diagram = ogl.Diagram()
        canvas.SetDiagram( diagram )
        diagram.SetCanvas( canvas )
        diagram.SetSnapToGrid( False )

        # apply sizer
        self.SetSizer(sizer)
        self.SetAutoLayout(1)
        self.Show(1)

        self.Bind(wx.EVT_CHAR_HOOK, self.on_key_event)
        self.elements = []

    def on_key_event(self, event):
        """ Respond to a keypress event.

            We make the arrow keys move the selected object(s) by one pixel in
            the given direction.
        """
        step = 1
        if event.ControlDown():
            step = 20

        if event.GetKeyCode() == wx.WXK_UP:
            self.move_elements(0, -step)
        elif event.GetKeyCode() == wx.WXK_DOWN:
            self.move_elements(0, step)
        elif event.GetKeyCode() == wx.WXK_LEFT:
            self.move_elements(-step, 0)
        elif event.GetKeyCode() == wx.WXK_RIGHT:
            self.move_elements(step, 0)
        elif event.GetKeyCode() == wx.WXK_DELETE:
            self.do_cut()
        else:
            event.Skip()

    def do_new(self, evt=None):
        for element in self.elements:
            element.remove()
        self.elements = []
        # draw paper size guides
        for k, (w, h) in [('legal', (216, 356)), ('A4', (210, 297)), ('letter', (216, 279))]:
            self.create_elements(
                k, 'R', 0, 0, w, h,
                size=70, foreground=0x808080, priority=-100,
                canvas=self.canvas, frame=self, static=True)
        self.diagram.ShowAll( 1 )

    def do_open(self, evt):
        dlg = wx.FileDialog(
            self, message="Choose a file",
            defaultDir=os.getcwd(),
            defaultFile="invoice.csv",
            wildcard="CSV Files (*.csv)|*.csv",
            style=wx.OPEN
            )

        if dlg.ShowModal() == wx.ID_OK:
            # This returns a Python list of files that were selected.
            self.filename = dlg.GetPaths()[0]

        dlg.Destroy()
        self.SetTitle(self.filename + " - " + self.title)

        self.do_new()
        tmp = []
        f = open(self.filename)
        try:
            filedata = f.readlines()
        finally:
            f.close()
        for lno, linea in enumerate(filedata):
            if DEBUG: print "processing line", lno, linea
            args = []
            for i,v in enumerate(linea.split(";")):
                if not v.startswith("'"):
                    v = v.replace(",",".")
                else:
                    v = v#.decode('latin1')
                if v.strip()=='':
                    v = None
                else:
                    v = eval(v.strip())
                args.append(v)
            tmp.append(args)

        # sort by z-order (priority)
        for args in sorted(tmp, key=lambda t: t[-1]):
            if DEBUG: print args
            self.create_elements(*args)
        self.diagram.ShowAll( 1 )                       #

        return True

    def do_save(self, evt, filename=None):
        try:
            from time import gmtime, strftime
            ts = strftime("%Y%m%d%H%M%S", gmtime())
            os.rename(self.filename, self.filename + ts + ".bak")
        except Exception, e:
            if DEBUG: print e
            pass

        def csv_repr(v, decimal_sep="."):
            if isinstance(v, float):
                return ("%0.2f" % v).replace(".", decimal_sep)
            else:
                return repr(v)

        f = open(self.filename, "w")
        try:
            for element in sorted(self.elements, key=lambda e:e.name):
                if element.static:
                    continue
                d = element.as_dict()
                l = [d['name'], d['type'],
                     d['x1'], d['y1'], d['x2'], d['y2'],
                     d['font'], d['size'],
                     d['bold'], d['italic'], d['underline'],
                     d['foreground'], d['background'],
                     d['align'], d['text'], d['priority'],
                    ]
                f.write(";".join([csv_repr(v) for v in l]))
                f.write("\n")
        finally:
            f.close()

    def do_print(self, evt):
        # genero el renderizador con propiedades del PDF
        from template import Template
        t = Template(elements=[e.as_dict() for e in self.elements if not e.static])
        t.add_page()
        if not t['logo'] or not os.path.exists(t['logo']):
            # put a default logo so it doesn't trow an exception
            logo = os.path.join(os.path.dirname(__file__), 'tutorial','logo.png')
            t.set('logo', logo)
        try:
            t.render(self.filename +".pdf")
        except:
            if DEBUG and False:
                import pdb;
                pdb.pm()
            else:
                raise
        if sys.platform=="linux2":
            os.system("evince ""%s""" % self.filename +".pdf")
        else:
            os.startfile(self.filename +".pdf")

    def do_find(self, evt):
        # busco nombre o texto
        dlg = wx.TextEntryDialog(
            self, 'Enter text to search for',
            'Find Text', '')
        if dlg.ShowModal() == wx.ID_OK:
            txt = dlg.GetValue().encode("latin1").lower()
            for element in self.elements:
                if txt in element:
                    element.selected = True
                    print "Found:", element.name
            self.canvas.Refresh(False)
        dlg.Destroy()

    def do_cut(self, evt=None):
        "Delete selected elements"
        new_elements = []
        for element in self.elements:
            if element.selected:
                print "Erasing:", element.name
                element.selected = False
                self.canvas.Refresh(False)
                element.remove()
            else:
                new_elements.append(element)
        self.elements = new_elements
        self.canvas.Refresh(False)
        self.diagram.ShowAll( 1 )

    def do_copy(self, evt):
        "Duplicate selected elements"
        fields = ['qty', 'dx', 'dy']
        data = {'qty': 1, 'dx': 0.0, 'dy': 5.0}
        data = CustomDialog.do_input(self, 'Copy elements', fields, data)
        if data:
            new_elements = []
            for i in range(1, data['qty']+1):
                for element in self.elements:
                    if element.selected:
                        print "Copying:", element.name
                        new_element = element.copy()
                        name = new_element.name
                        if len(name)>2 and name[-2:].isdigit():
                            new_element.name = name[:-2] + "%02d" % (int(name[-2:])+i)
                        else:
                            new_element.name = new_element.name + "_copy"
                        new_element.selected = False
                        new_element.move(data['dx']*i, data['dy']*i)
                        new_elements.append(new_element)
            self.elements.extend(new_elements)
            self.canvas.Refresh(False)
            self.diagram.ShowAll( 1 )

    def do_paste(self, evt):
        "Insert new elements"
        element = Element.new(self)
        if element:
            self.canvas.Refresh(False)
            self.elements.append(element)
            self.diagram.ShowAll( 1 )

    def create_elements(self, name, type, x1, y1, x2, y2,
                   font="Arial", size=12,
                   bold=False, italic=False, underline=False,
                   foreground= 0x000000, background=0xFFFFFF,
                   align="L", text="", priority=0, canvas=None, frame=None, static=False,
                   **kwargs):
        element = Element(name=name, type=type, x1=x1, y1=y1, x2=x2, y2=y2,
                   font=font, size=size,
                   bold=bold, italic=italic, underline=underline,
                   foreground= foreground, background=background,
                   align=align, text=text, priority=priority,
                   canvas=canvas or self.canvas, frame=frame or self,
                   static=static)
        self.elements.append(element)

    def move_elements(self, x, y):
        for element in self.elements:
            if element.selected:
                print "moving", element.name, x, y
                element.x = element.x + x
                element.y = element.y + y

    def do_about(self, evt):
        info = wx.AboutDialogInfo()
        info.Name = self.title
        info.Version = __version__
        info.Copyright = __copyright__
        info.Description = (
            "Visual Template designer for PyFPDF (using wxPython OGL library)\n"
            "Input files are CSV format describing the layout, separated by ;\n"
            "Use toolbar buttons to open, save, print (preview) your template, "
            "and there are buttons to find, add, remove or duplicate elements.\n"
            "Over an element, a double left click opens edit text dialog, "
            "and a right click opens edit properties dialog. \n"
            "Multiple element can be selected with shift left click. \n"
            "Use arrow keys or drag-and-drop to move elements.\n"
            "For further information see project webpage:"
            )
        info.WebSite = ("http://code.google.com/p/pyfpdf/wiki/Templates",
                        "pyfpdf Google Code Project")
        info.Developers = [ __author__, ]

        info.License = wordwrap(__license__, 500, wx.ClientDC(self))

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)

    def except_hook(self, type, value, trace):
        import traceback
        exc = traceback.format_exception(type, value, trace)
        for e in exc: wx.LogError(e)
        wx.LogError('Unhandled Error: %s: %s'%(str(type), str(value)))


app = wx.PySimpleApp()
ogl.OGLInitialize()
frame = AppFrame()
app.MainLoop()
app.Destroy()


Added gluon/contrib/pyfpdf/fpdf.py version [f8476450e4].























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: latin-1 -*-
# ******************************************************************************
# * Software: FPDF for python                                                  *
# * Version:  1.54c                                                            *
# * Date:     2010-09-10                                                       *
# * License:  LGPL v3.0                                                        *
# *                                                                            *
# * Original Author (PHP):  Olivier PLATHEY 2004-12-31                         *
# * Ported to Python 2.4 by Max (maxpat78@yahoo.it) on 2006-05                 *
# * Maintainer:  Mariano Reingart (reingart@gmail.com) et al since 2008 (est.) *
# * NOTE: 'I' and 'D' destinations are disabled, and simply print to STDOUT    *
# *****************************************************************************/

from datetime import datetime
import math
import os, sys, zlib, struct

try:
    # Check if PIL is available, necessary for JPEG support.
    import Image
except ImportError:
    Image = None

def substr(s, start, length=-1):
       if length < 0:
               length=len(s)-start
       return s[start:start+length]

def sprintf(fmt, *args): return fmt % args

# Global variables
FPDF_VERSION='1.54b'
FPDF_FONT_DIR=os.path.join(os.path.dirname(__file__),'font')
fpdf_charwidths = {}

class FPDF:
#Private properties
#~ page;               #current page number
#~ n;                  #current object number
#~ offsets;            #array of object offsets
#~ buffer;             #buffer holding in-memory PDF
#~ pages;              #array containing pages
#~ state;              #current document state
#~ compress;           #compression flag
#~ def_orientation;     #default orientation
#~ cur_orientation;     #current orientation
#~ orientation_changes; #array indicating orientation changes
#~ k;                  #scale factor (number of points in user unit)
#~ fw_pt,fh_pt;         #dimensions of page format in points
#~ fw,fh;             #dimensions of page format in user unit
#~ w_pt,h_pt;           #current dimensions of page in points
#~ w,h;               #current dimensions of page in user unit
#~ l_margin;            #left margin
#~ t_margin;            #top margin
#~ r_margin;            #right margin
#~ b_margin;            #page break margin
#~ c_margin;            #cell margin
#~ x,y;               #current position in user unit for cell positioning
#~ lasth;              #height of last cell printed
#~ line_width;          #line width in user unit
#~ core_fonts;          #array of standard font names
#~ fonts;              #array of used fonts
#~ font_files;          #array of font files
#~ diffs;              #array of encoding differences
#~ images;             #array of used images
#~ page_links;          #array of links in pages
#~ links;              #array of internal links
#~ font_family;         #current font family
#~ font_style;          #current font style
#~ underline;          #underlining flag
#~ current_font;        #current font info
#~ font_size_pt;         #current font size in points
#~ font_size;           #current font size in user unit
#~ draw_color;          #commands for drawing color
#~ fill_color;          #commands for filling color
#~ text_color;          #commands for text color
#~ color_flag;          #indicates whether fill and text colors are different
#~ ws;                 #word spacing
#~ auto_page_break;      #automatic page breaking
#~ page_break_trigger;   #threshold used to trigger page breaks
#~ in_footer;           #flag set when processing footer
#~ zoom_mode;           #zoom display mode
#~ layout_mode;         #layout display mode
#~ title;              #title
#~ subject;            #subject
#~ author;             #author
#~ keywords;           #keywords
#~ creator;            #creator
#~ alias_nb_pages;       #alias for total number of pages
#~ pdf_version;         #PDF version number

# ******************************************************************************
# *                                                                              *
# *                               Public methods                                 *
# *                                                                              *
# *******************************************************************************/
    def __init__(self, orientation='P',unit='mm',format='A4'):
        #Some checks
        self._dochecks()
        #Initialization of properties
        self.offsets={}
        self.page=0
        self.n=2
        self.buffer=''
        self.pages={}
        self.orientation_changes={}
        self.state=0
        self.fonts={}
        self.font_files={}
        self.diffs={}
        self.images={}
        self.page_links={}
        self.links={}
        self.in_footer=0
        self.lastw=0
        self.lasth=0
        self.font_family=''
        self.font_style=''
        self.font_size_pt=12
        self.underline=0
        self.draw_color='0 G'
        self.fill_color='0 g'
        self.text_color='0 g'
        self.color_flag=0
        self.ws=0
        self.angle=0
        #Standard fonts
        self.core_fonts={'courier':'Courier','courierB':'Courier-Bold','courierI':'Courier-Oblique','courierBI':'Courier-BoldOblique',
            'helvetica':'Helvetica','helveticaB':'Helvetica-Bold','helveticaI':'Helvetica-Oblique','helveticaBI':'Helvetica-BoldOblique',
            'times':'Times-Roman','timesB':'Times-Bold','timesI':'Times-Italic','timesBI':'Times-BoldItalic',
            'symbol':'Symbol','zapfdingbats':'ZapfDingbats'}
        #Scale factor
        if(unit=='pt'):
            self.k=1
        elif(unit=='mm'):
            self.k=72/25.4
        elif(unit=='cm'):
            self.k=72/2.54
        elif(unit=='in'):
            self.k=72
        else:
            self.error('Incorrect unit: '+unit)
        #Page format
        if(isinstance(format,basestring)):
            format=format.lower()
            if(format=='a3'):
                format=(841.89,1190.55)
            elif(format=='a4'):
                format=(595.28,841.89)
            elif(format=='a5'):
                format=(420.94,595.28)
            elif(format=='letter'):
                format=(612,792)
            elif(format=='legal'):
                format=(612,1008)
            else:
                self.error('Unknown page format: '+format)
            self.fw_pt=format[0]
            self.fh_pt=format[1]
        else:
            self.fw_pt=format[0]*self.k
            self.fh_pt=format[1]*self.k
        self.fw=self.fw_pt/self.k
        self.fh=self.fh_pt/self.k
        #Page orientation
        orientation=orientation.lower()
        if(orientation=='p' or orientation=='portrait'):
            self.def_orientation='P'
            self.w_pt=self.fw_pt
            self.h_pt=self.fh_pt
        elif(orientation=='l' or orientation=='landscape'):
            self.def_orientation='L'
            self.w_pt=self.fh_pt
            self.h_pt=self.fw_pt
        else:
            self.error('Incorrect orientation: '+orientation)
        self.cur_orientation=self.def_orientation
        self.w=self.w_pt/self.k
        self.h=self.h_pt/self.k
        #Page margins (1 cm)
        margin=28.35/self.k
        self.set_margins(margin,margin)
        #Interior cell margin (1 mm)
        self.c_margin=margin/10.0
        #line width (0.2 mm)
        self.line_width=.567/self.k
        #Automatic page break
        self.set_auto_page_break(1,2*margin)
        #Full width display mode
        self.set_display_mode('fullwidth')
        #Enable compression
        self.set_compression(1)
        #Set default PDF version number
        self.pdf_version='1.3'

    def set_margins(self, left,top,right=-1):
        "Set left, top and right margins"
        self.l_margin=left
        self.t_margin=top
        if(right==-1):
            right=left
        self.r_margin=right

    def set_left_margin(self, margin):
        "Set left margin"
        self.l_margin=margin
        if(self.page>0 and self.x<margin):
            self.x=margin

    def set_top_margin(self, margin):
        "Set top margin"
        self.t_margin=margin

    def set_right_margin(self, margin):
        "Set right margin"
        self.r_margin=margin

    def set_auto_page_break(self, auto,margin=0):
        "Set auto page break mode and triggering margin"
        self.auto_page_break=auto
        self.b_margin=margin
        self.page_break_trigger=self.h-margin

    def set_display_mode(self, zoom,layout='continuous'):
        "Set display mode in viewer"
        if(zoom=='fullpage' or zoom=='fullwidth' or zoom=='real' or zoom=='default' or not isinstance(zoom,basestring)):
            self.zoom_mode=zoom
        else:
            self.error('Incorrect zoom display mode: '+zoom)
        if(layout=='single' or layout=='continuous' or layout=='two' or layout=='default'):
            self.layout_mode=layout
        else:
            self.error('Incorrect layout display mode: '+layout)

    def set_compression(self, compress):
        "Set page compression"
        self.compress=compress

    def set_title(self, title):
        "Title of document"
        self.title=title

    def set_subject(self, subject):
        "Subject of document"
        self.subject=subject

    def set_author(self, author):
        "Author of document"
        self.author=author

    def set_keywords(self, keywords):
        "Keywords of document"
        self.keywords=keywords

    def set_creator(self, creator):
        "Creator of document"
        self.creator=creator

    def alias_nb_pages(self, alias='{nb}'):
        "Define an alias for total number of pages"
        self.str_alias_nb_pages=alias
        return alias

    def error(self, msg):
        "Fatal error"
        raise RuntimeError('FPDF error: '+msg)

    def open(self):
        "Begin document"
        self.state=1

    def close(self):
        "Terminate document"
        if(self.state==3):
            return
        if(self.page==0):
            self.add_page()
        #Page footer
        self.in_footer=1
        self.footer()
        self.in_footer=0
        #close page
        self._endpage()
        #close document
        self._enddoc()

    def add_page(self, orientation=''):
        "Start a new page"
        if(self.state==0):
            self.open()
        family=self.font_family
        if self.underline:
            style = self.font_style + 'U'
        else:
            style = self.font_style
        size=self.font_size_pt
        lw=self.line_width
        dc=self.draw_color
        fc=self.fill_color
        tc=self.text_color
        cf=self.color_flag
        if(self.page>0):
            #Page footer
            self.in_footer=1
            self.footer()
            self.in_footer=0
            #close page
            self._endpage()
        #Start new page
        self._beginpage(orientation)
        #Set line cap style to square
        self._out('2 J')
        #Set line width
        self.line_width=lw
        self._out(sprintf('%.2f w',lw*self.k))
        #Set font
        if(family):
            self.set_font(family,style,size)
        #Set colors
        self.draw_color=dc
        if(dc!='0 G'):
            self._out(dc)
        self.fill_color=fc
        if(fc!='0 g'):
            self._out(fc)
        self.text_color=tc
        self.color_flag=cf
        #Page header
        self.header()
        #Restore line width
        if(self.line_width!=lw):
            self.line_width=lw
            self._out(sprintf('%.2f w',lw*self.k))
        #Restore font
        if(family):
            self.set_font(family,style,size)
        #Restore colors
        if(self.draw_color!=dc):
            self.draw_color=dc
            self._out(dc)
        if(self.fill_color!=fc):
            self.fill_color=fc
            self._out(fc)
        self.text_color=tc
        self.color_flag=cf

    def header(self):
        "Header to be implemented in your own inherited class"
        pass

    def footer(self):
        "Footer to be implemented in your own inherited class"
        pass

    def page_no(self):
        "Get current page number"
        return self.page

    def set_draw_color(self, r,g=-1,b=-1):
        "Set color for all stroking operations"
        if((r==0 and g==0 and b==0) or g==-1):
            self.draw_color=sprintf('%.3f G',r/255.0)
        else:
            self.draw_color=sprintf('%.3f %.3f %.3f RG',r/255.0,g/255.0,b/255.0)
        if(self.page>0):
            self._out(self.draw_color)

    def set_fill_color(self,r,g=-1,b=-1):
        "Set color for all filling operations"
        if((r==0 and g==0 and b==0) or g==-1):
            self.fill_color=sprintf('%.3f g',r/255.0)
        else:
            self.fill_color=sprintf('%.3f %.3f %.3f rg',r/255.0,g/255.0,b/255.0)
        self.color_flag=(self.fill_color!=self.text_color)
        if(self.page>0):
            self._out(self.fill_color)

    def set_text_color(self, r,g=-1,b=-1):
        "Set color for text"
        if((r==0 and g==0 and b==0) or g==-1):
            self.text_color=sprintf('%.3f g',r/255.0)
        else:
            self.text_color=sprintf('%.3f %.3f %.3f rg',r/255.0,g/255.0,b/255.0)
        self.color_flag=(self.fill_color!=self.text_color)

    def get_string_width(self, s):
        "Get width of a string in the current font"
        cw=self.current_font['cw']
        w=0
        l=len(s)
        for i in xrange(0, l):
            w += cw.get(s[i],0)
        return w*self.font_size/1000.0

    def set_line_width(self, width):
        "Set line width"
        self.line_width=width
        if(self.page>0):
            self._out(sprintf('%.2f w',width*self.k))

    def line(self, x1,y1,x2,y2):
        "Draw a line"
        self._out(sprintf('%.2f %.2f m %.2f %.2f l S',x1*self.k,(self.h-y1)*self.k,x2*self.k,(self.h-y2)*self.k))

    def rect(self, x,y,w,h,style=''):
        "Draw a rectangle"
        if(style=='F'):
            op='f'
        elif(style=='FD' or style=='DF'):
            op='B'
        else:
            op='S'
        self._out(sprintf('%.2f %.2f %.2f %.2f re %s',x*self.k,(self.h-y)*self.k,w*self.k,-h*self.k,op))

    def add_font(self, family,style='',fname=''):
        "Add a TrueType or Type1 font"
        family=family.lower()
        if(fname==''):
            fname=family.replace(' ','')+style.lower()+'.font'
        fname=os.path.join(FPDF_FONT_DIR,fname)
        if(family=='arial'):
            family='helvetica'
        style=style.upper()
        if(style=='IB'):
            style='BI'
        fontkey=family+style
        if fontkey in self.fonts:
            self.error('Font already added: '+family+' '+style)
        execfile(fname, globals(), globals())
        if 'name' not in globals():
            self.error('Could not include font definition file')
        i=len(self.fonts)+1
        self.fonts[fontkey]={'i':i,'type':type,'name':name,'desc':desc,'up':up,'ut':ut,'cw':cw,'enc':enc,'file':filename}
        if(diff):
            #Search existing encodings
            d=0
            nb=len(self.diffs)
            for i in xrange(1,nb+1):
                if(self.diffs[i]==diff):
                    d=i
                    break
            if(d==0):
                d=nb+1
                self.diffs[d]=diff
            self.fonts[fontkey]['diff']=d
        if(filename):
            if(type=='TrueType'):
                self.font_files[filename]={'length1':originalsize}
            else:
                self.font_files[filename]={'length1':size1,'length2':size2}

    def set_font(self, family,style='',size=0):
        "Select a font; size given in points"
        family=family.lower()
        if(family==''):
            family=self.font_family
        if(family=='arial'):
            family='helvetica'
        elif(family=='symbol' or family=='zapfdingbats'):
            style=''
        style=style.upper()
        if('U' in style):
            self.underline=1
            style=style.replace('U','')
        else:
            self.underline=0
        if(style=='IB'):
            style='BI'
        if(size==0):
            size=self.font_size_pt
        #Test if font is already selected
        if(self.font_family==family and self.font_style==style and self.font_size_pt==size):
            return
        #Test if used for the first time
        fontkey=family+style
        if fontkey not in self.fonts:
            #Check if one of the standard fonts
            if fontkey in self.core_fonts:
                if fontkey not in fpdf_charwidths:
                    #Load metric file
                    name=os.path.join(FPDF_FONT_DIR,family)
                    if(family=='times' or family=='helvetica'):
                        name+=style.lower()
                    execfile(name+'.font')
                    if fontkey not in fpdf_charwidths:
                        self.error('Could not include font metric file for'+fontkey)
                i=len(self.fonts)+1
                self.fonts[fontkey]={'i':i,'type':'core','name':self.core_fonts[fontkey],'up':-100,'ut':50,'cw':fpdf_charwidths[fontkey]}
            else:
                self.error('Undefined font: '+family+' '+style)
        #Select it
        self.font_family=family
        self.font_style=style
        self.font_size_pt=size
        self.font_size=size/self.k
        self.current_font=self.fonts[fontkey]
        if(self.page>0):
            self._out(sprintf('BT /F%d %.2f Tf ET',self.current_font['i'],self.font_size_pt))

    def set_font_size(self, size):
        "Set font size in points"
        if(self.font_size_pt==size):
            return
        self.font_size_pt=size
        self.font_size=size/self.k
        if(self.page>0):
            self._out(sprintf('BT /F%d %.2f Tf ET',self.current_font['i'],self.font_size_pt))

    def add_link(self):
        "Create a new internal link"
        n=len(self.links)+1
        self.links[n]=(0,0)
        return n

    def set_link(self, link,y=0,page=-1):
        "Set destination of internal link"
        if(y==-1):
            y=self.y
        if(page==-1):
            page=self.page
        self.links[link]=[page,y]

    def link(self, x,y,w,h,link):
        "Put a link on the page"
        if not self.page in self.page_links:
            self.page_links[self.page] = []
        self.page_links[self.page] += [(x*self.k,self.h_pt-y*self.k,w*self.k,h*self.k,link),]

    def text(self, x,y,txt):
        "Output a string"
        s=sprintf('BT %.2f %.2f Td (%s) Tj ET',x*self.k,(self.h-y)*self.k,self._escape(txt))
        if(self.underline and txt!=''):
            s+=' '+self._dounderline(x,y,txt)
        if(self.color_flag):
            s='q '+self.text_color+' '+s+' Q'
        self._out(s)

    def rotate(self, angle, x=None, y=None):
        if x is None:
            x = self.x
        if y is None:
            y = self.y;
        if self.angle!=0:
            self._out('Q')
        self.angle = angle
        if angle!=0:
            angle *= math.pi/180;
            c = math.cos(angle);
            s = math.sin(angle);
            cx = x*self.k;
            cy = (self.h-y)*self.k
            s = sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',c,s,-s,c,cx,cy,-cx,-cy)
            self._out(s)

    def accept_page_break(self):
        "Accept automatic page break or not"
        return self.auto_page_break

    def cell(self, w,h=0,txt='',border=0,ln=0,align='',fill=0,link=''):
        "Output a cell"
        k=self.k
        if(self.y+h>self.page_break_trigger and not self.in_footer and self.accept_page_break()):
            #Automatic page break
            x=self.x
            ws=self.ws
            if(ws>0):
                self.ws=0
                self._out('0 Tw')
            self.add_page(self.cur_orientation)
            self.x=x
            if(ws>0):
                self.ws=ws
                self._out(sprintf('%.3f Tw',ws*k))
        if(w==0):
            w=self.w-self.r_margin-self.x
        s=''
        if(fill==1 or border==1):
            if(fill==1):
                if border==1:
                    op='B'
                else:
                    op='f'
            else:
                op='S'
            s=sprintf('%.2f %.2f %.2f %.2f re %s ',self.x*k,(self.h-self.y)*k,w*k,-h*k,op)
        if(isinstance(border,basestring)):
            x=self.x
            y=self.y
            if('L' in border):
                s+=sprintf('%.2f %.2f m %.2f %.2f l S ',x*k,(self.h-y)*k,x*k,(self.h-(y+h))*k)
            if('T' in border):
                s+=sprintf('%.2f %.2f m %.2f %.2f l S ',x*k,(self.h-y)*k,(x+w)*k,(self.h-y)*k)
            if('R' in border):
                s+=sprintf('%.2f %.2f m %.2f %.2f l S ',(x+w)*k,(self.h-y)*k,(x+w)*k,(self.h-(y+h))*k)
            if('B' in border):
                s+=sprintf('%.2f %.2f m %.2f %.2f l S ',x*k,(self.h-(y+h))*k,(x+w)*k,(self.h-(y+h))*k)
        if(txt!=''):
            if(align=='R'):
                dx=w-self.c_margin-self.get_string_width(txt)
            elif(align=='C'):
                dx=(w-self.get_string_width(txt))/2.0
            else:
                dx=self.c_margin
            if(self.color_flag):
                s+='q '+self.text_color+' '
            txt2=txt.replace('\\','\\\\').replace(')','\\)').replace('(','\\(')
            s+=sprintf('BT %.2f %.2f Td (%s) Tj ET',(self.x+dx)*k,(self.h-(self.y+.5*h+.3*self.font_size))*k,txt2)
            if(self.underline):
                s+=' '+self._dounderline(self.x+dx,self.y+.5*h+.3*self.font_size,txt)
            if(self.color_flag):
                s+=' Q'
            if(link):
                self.link(self.x+dx,self.y+.5*h-.5*self.font_size,self.get_string_width(txt),self.font_size,link)
        if(s):
            self._out(s)
        self.lasth=h
        if(ln>0):
            #Go to next line
            self.y+=h
            if(ln==1):
                self.x=self.l_margin
        else:
            self.x+=w

    def multi_cell(self, w,h,txt,border=0,align='J',fill=0, split_only=False):
        "Output text with automatic or explicit line breaks"
        ret = [] # if split_only = True, returns splited text cells
        cw=self.current_font['cw']
        if(w==0):
            w=self.w-self.r_margin-self.x
        wmax=(w-2*self.c_margin)*1000.0/self.font_size
        s=txt.replace("\r",'')
        nb=len(s)
        if(nb>0 and s[nb-1]=="\n"):
            nb-=1
        b=0
        if(border):
            if(border==1):
                border='LTRB'
                b='LRT'
                b2='LR'
            else:
                b2=''
                if('L' in border):
                    b2+='L'
                if('R' in border):
                    b2+='R'
                if ('T' in border):
                    b=b2+'T'
                else:
                    b=b2
        sep=-1
        i=0
        j=0
        l=0
        ns=0
        nl=1
        while(i<nb):
            #Get next character
            c=s[i]
            if(c=="\n"):
                #Explicit line break
                if(self.ws>0):
                    self.ws=0
                    self._out('0 Tw')
                if not split_only:
                    self.cell(w,h,substr(s,j,i-j),b,2,align,fill)
                else:
                    ret.append(substr(s,j,i-j))
                i+=1
                sep=-1
                j=i
                l=0
                ns=0
                nl+=1
                if(border and nl==2):
                    b=b2
                continue
            if(c==' '):
                sep=i
                ls=l
                ns+=1
            l+=cw.get(c,0)
            if(l>wmax):
                #Automatic line break
                if(sep==-1):
                    if(i==j):
                        i+=1
                    if(self.ws>0):
                        self.ws=0
                        self._out('0 Tw')
                    if not split_only:
                        self.cell(w,h,substr(s,j,i-j),b,2,align,fill)
                    else:
                        ret.append(substr(s,j,i-j))
                else:
                    if(align=='J'):
                        if ns>1:
                            self.ws=(wmax-ls)/1000.0*self.font_size/(ns-1)
                        else:
                            self.ws=0
                        self._out(sprintf('%.3f Tw',self.ws*self.k))
                    if not split_only:
                        self.cell(w,h,substr(s,j,sep-j),b,2,align,fill)
                    else:
                        ret.append(substr(s,j,sep-j))
                    i=sep+1
                sep=-1
                j=i
                l=0
                ns=0
                nl+=1
                if(border and nl==2):
                    b=b2
            else:
                i+=1
        #Last chunk
        if(self.ws>0):
            self.ws=0
            self._out('0 Tw')
        if(border and 'B' in border):
            b+='B'
        if not split_only:
            self.cell(w,h,substr(s,j,i-j),b,2,align,fill)
        else:
            ret.append(substr(s,j,i-j))
        self.x=self.l_margin
        return ret

    def write(self, h,txt,link=''):
        "Output text in flowing mode"
        cw=self.current_font['cw']
        w=self.w-self.r_margin-self.x
        wmax=(w-2*self.c_margin)*1000.0/self.font_size
        s=txt.replace("\r",'')
        nb=len(s)
        sep=-1
        i=0
        j=0
        l=0
        nl=1
        while(i<nb):
            #Get next character
            c=s[i]
            if(c=="\n"):
                #Explicit line break
                self.cell(w,h,substr(s,j,i-j),0,2,'',0,link)
                i+=1
                sep=-1
                j=i
                l=0
                if(nl==1):
                    self.x=self.l_margin
                    w=self.w-self.r_margin-self.x
                    wmax=(w-2*self.c_margin)*1000.0/self.font_size
                nl+=1
                continue
            if(c==' '):
                sep=i
            l+=cw.get(c,0)
            if(l>wmax):
                #Automatic line break
                if(sep==-1):
                    if(self.x>self.l_margin):
                        #Move to next line
                        self.x=self.l_margin
                        self.y+=h
                        w=self.w-self.r_margin-self.x
                        wmax=(w-2*self.c_margin)*1000.0/self.font_size
                        i+=1
                        nl+=1
                        continue
                    if(i==j):
                        i+=1
                    self.cell(w,h,substr(s,j,i-j),0,2,'',0,link)
                else:
                    self.cell(w,h,substr(s,j,sep-j),0,2,'',0,link)
                    i=sep+1
                sep=-1
                j=i
                l=0
                if(nl==1):
                    self.x=self.l_margin
                    w=self.w-self.r_margin-self.x
                    wmax=(w-2*self.c_margin)*1000.0/self.font_size
                nl+=1
            else:
                i+=1
        #Last chunk
        if(i!=j):
            self.cell(l/1000.0*self.font_size,h,substr(s,j),0,0,'',0,link)

    def image(self, name,x,y,w=0,h=0,type='',link=''):
        "Put an image on the page"
        if not name in self.images:
            #First use of image, get info
            if(type==''):
                pos=name.rfind('.')
                if(not pos):
                    self.error('image file has no extension and no type was specified: '+name)
                type=substr(name,pos+1)
            type=type.lower()
            if(type=='jpg' or type=='jpeg'):
                info=self._parsejpg(name)
            elif(type=='png'):
                info=self._parsepng(name)
            else:
                #Allow for additional formats
                mtd='_parse'+type
                if not hasattr(self,mtd):
                    self.error('Unsupported image type: '+type)
                info=self.mtd(name)
            info['i']=len(self.images)+1
            self.images[name]=info
        else:
            info=self.images[name]
        #Automatic width and height calculation if needed
        if(w==0 and h==0):
            #Put image at 72 dpi
            w=info['w']/self.k
            h=info['h']/self.k
        if(w==0):
            w=h*info['w']/info['h']
        if(h==0):
            h=w*info['h']/info['w']
        self._out(sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',w*self.k,h*self.k,x*self.k,(self.h-(y+h))*self.k,info['i']))
        if(link):
            self.link(x,y,w,h,link)

    def ln(self, h=''):
        "Line Feed; default value is last cell height"
        self.x=self.l_margin
        if(isinstance(h, basestring)):
            self.y+=self.lasth
        else:
            self.y+=h

    def get_x(self):
        "Get x position"
        return self.x

    def set_x(self, x):
        "Set x position"
        if(x>=0):
            self.x=x
        else:
            self.x=self.w+x

    def get_y(self):
        "Get y position"
        return self.y

    def set_y(self, y):
        "Set y position and reset x"
        self.x=self.l_margin
        if(y>=0):
            self.y=y
        else:
            self.y=self.h+y

    def set_xy(self, x,y):
        "Set x and y positions"
        self.set_y(y)
        self.set_x(x)

    def output(self, name='',dest=''):
        "Output PDF to some destination"
        #Finish document if necessary
        if(self.state<3):
            self.close()
        #Normalize parameters
 #       if(type(dest)==type(bool())):
 #           if dest:
 #               dest='D'
 #           else:
 #               dest='F'
        dest=dest.upper()
        if(dest==''):
            if(name==''):
                name='doc.pdf'
                dest='I'
            else:
                dest='F'
        if dest=='I':
            print self.buffer
        elif dest=='D':
            print self.buffer
        elif dest=='F':
            #Save to local file
            f=file(name,'wb')
            if(not f):
                self.error('Unable to create output file: '+name)
            f.write(self.buffer)
            f.close()
        elif dest=='S':
            #Return as a string
            return self.buffer
        else:
            self.error('Incorrect output destination: '+dest)
        return ''

# ******************************************************************************
# *                                                                              *
# *                              Protected methods                               *
# *                                                                              *
# *******************************************************************************/
    def _dochecks(self):
        #Check for locale-related bug
#        if(1.1==1):
#            self.error("Don\'t alter the locale before including class file");
        #Check for decimal separator
        if(sprintf('%.1f',1.0)!='1.0'):
            import locale
            locale.setlocale(locale.LC_NUMERIC,'C')

    def _getfontpath(self):
        return FPDF_FONT_DIR+'/'

    def _putpages(self):
        nb=self.page
        if hasattr(self,'str_alias_nb_pages'):
            #Replace number of pages
            for n in xrange(1,nb+1):
                self.pages[n]=self.pages[n].replace(self.str_alias_nb_pages,str(nb))
        if(self.def_orientation=='P'):
            w_pt=self.fw_pt
            h_pt=self.fh_pt
        else:
            w_pt=self.fh_pt
            h_pt=self.fw_pt
        if self.compress:
            filter='/Filter /FlateDecode '
        else:
            filter=''
        for n in xrange(1,nb+1):
            #Page
            self._newobj()
            self._out('<</Type /Page')
            self._out('/Parent 1 0 R')
            if n in self.orientation_changes:
                self._out(sprintf('/MediaBox [0 0 %.2f %.2f]',h_pt,w_pt))
            self._out('/Resources 2 0 R')
            if self.page_links and n in self.page_links:
                #Links
                annots='/Annots ['
                for pl in self.page_links[n]:
                    rect=sprintf('%.2f %.2f %.2f %.2f',pl[0],pl[1],pl[0]+pl[2],pl[1]-pl[3])
                    annots+='<</Type /Annot /Subtype /Link /Rect ['+rect+'] /Border [0 0 0] '
                    if(isinstance(pl[4],basestring)):
                        annots+='/A <</S /URI /URI '+self._textstring(pl[4])+'>>>>'
                    else:
                        l=self.links[pl[4]]
                        if l[0] in self.orientation_changes:
                            h=w_pt
                        else:
                            h=h_pt
                        annots+=sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]>>',1+2*l[0],h-l[1]*self.k)
                self._out(annots+']')
            self._out('/Contents '+str(self.n+1)+' 0 R>>')
            self._out('endobj')
            #Page content
            if self.compress:
                p = zlib.compress(self.pages[n])
            else:
                p = self.pages[n]
            self._newobj()
            self._out('<<'+filter+'/Length '+str(len(p))+'>>')
            self._putstream(p)
            self._out('endobj')
        #Pages root
        self.offsets[1]=len(self.buffer)
        self._out('1 0 obj')
        self._out('<</Type /Pages')
        kids='/Kids ['
        for i in xrange(0,nb):
            kids+=str(3+2*i)+' 0 R '
        self._out(kids+']')
        self._out('/Count '+str(nb))
        self._out(sprintf('/MediaBox [0 0 %.2f %.2f]',w_pt,h_pt))
        self._out('>>')
        self._out('endobj')

    def _putfonts(self):
        nf=self.n
        for diff in self.diffs:
            #Encodings
            self._newobj()
            self._out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['+self.diffs[diff]+']>>')
            self._out('endobj')
        for name,info in self.font_files.iteritems():
            #Font file embedding
            self._newobj()
            self.font_files[name]['n']=self.n
            font=''
            f=file(self._getfontpath()+name,'rb',1)
            if(not f):
                self.error('Font file not found')
            font=f.read()
            f.close()
            compressed=(substr(name,-2)=='.z')
            if(not compressed and 'length2' in info):
                header=(ord(font[0])==128)
                if(header):
                    #Strip first binary header
                    font=substr(font,6)
                if(header and ord(font[info['length1']])==128):
                    #Strip second binary header
                    font=substr(font,0,info['length1'])+substr(font,info['length1']+6)
            self._out('<</Length '+str(len(font)))
            if(compressed):
                self._out('/Filter /FlateDecode')
            self._out('/Length1 '+str(info['length1']))
            if('length2' in info):
                self._out('/Length2 '+str(info['length2'])+' /Length3 0')
            self._out('>>')
            self._putstream(font)
            self._out('endobj')
        for k,font in self.fonts.iteritems():
            #Font objects
            self.fonts[k]['n']=self.n+1
            type=font['type']
            name=font['name']
            if(type=='core'):
                #Standard font
                self._newobj()
                self._out('<</Type /Font')
                self._out('/BaseFont /'+name)
                self._out('/Subtype /Type1')
                if(name!='Symbol' and name!='ZapfDingbats'):
                    self._out('/Encoding /WinAnsiEncoding')
                self._out('>>')
                self._out('endobj')
            elif(type=='Type1' or type=='TrueType'):
                #Additional Type1 or TrueType font
                self._newobj()
                self._out('<</Type /Font')
                self._out('/BaseFont /'+name)
                self._out('/Subtype /'+type)
                self._out('/FirstChar 32 /LastChar 255')
                self._out('/Widths '+str(self.n+1)+' 0 R')
                self._out('/FontDescriptor '+str(self.n+2)+' 0 R')
                if(font['enc']):
                    if('diff' in font):
                        self._out('/Encoding '+str(nf+font['diff'])+' 0 R')
                    else:
                        self._out('/Encoding /WinAnsiEncoding')
                self._out('>>')
                self._out('endobj')
                #Widths
                self._newobj()
                cw=font['cw']
                s='['
                for i in xrange(32,256):
                    # Get doesn't rise exception; returns 0 instead of None if not set
                    s+=str(cw.get(chr(i)) or 0)+' '
                self._out(s+']')
                self._out('endobj')
                #Descriptor
                self._newobj()
                s='<</Type /FontDescriptor /FontName /'+name
                for k,v in font['desc'].iteritems():
                    s+=' /'+str(k)+' '+str(v)
                filename=font['file']
                if(filename):
                    s+=' /FontFile'
                    if type!='Type1':
                        s+='2'
                    s+=' '+str(self.font_files[filename]['n'])+' 0 R'
                self._out(s+'>>')
                self._out('endobj')
            else:
                #Allow for additional types
                mtd='_put'+type.lower()
                if(not method_exists(self,mtd)):
                    self.error('Unsupported font type: '+type)
                self.mtd(font)

    def _putimages(self):
        filter=''
        if self.compress:
            filter='/Filter /FlateDecode '
        for filename,info in self.images.iteritems():
            self._newobj()
            self.images[filename]['n']=self.n
            self._out('<</Type /XObject')
            self._out('/Subtype /Image')
            self._out('/Width '+str(info['w']))
            self._out('/Height '+str(info['h']))
            if(info['cs']=='Indexed'):
                self._out('/ColorSpace [/Indexed /DeviceRGB '+str(len(info['pal'])/3-1)+' '+str(self.n+1)+' 0 R]')
            else:
                self._out('/ColorSpace /'+info['cs'])
                if(info['cs']=='DeviceCMYK'):
                    self._out('/Decode [1 0 1 0 1 0 1 0]')
            self._out('/BitsPerComponent '+str(info['bpc']))
            if 'f' in info:
                self._out('/Filter /'+info['f'])
            if 'parms' in info:
                self._out(info['parms'])
            if('trns' in info and type([])==info['trns']):
                trns=''
                for i in xrange(0,len(info['trns'])):
                    trns+=str(info['trns'][i])+' '+str(info['trns'][i])+' '
                self._out('/Mask ['+trns+']')
            self._out('/Length '+str(len(info['data']))+'>>')
            self._putstream(info['data'])
            self.images[filename]['data'] = None
            self._out('endobj')
            #Palette
            if(info['cs']=='Indexed'):
                self._newobj()
                if self.compress:
                    pal=zlib.compress(info['pal'])
                else:
                    pal=info['pal']
                self._out('<<'+filter+'/Length '+str(len(pal))+'>>')
                self._putstream(pal)
                self._out('endobj')

    def _putxobjectdict(self):
        for image in self.images.values():
            self._out('/I'+str(image['i'])+' '+str(image['n'])+' 0 R')

    def _putresourcedict(self):
        self._out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]')
        self._out('/Font <<')
        for font in self.fonts.values():
            self._out('/F'+str(font['i'])+' '+str(font['n'])+' 0 R')
        self._out('>>')
        self._out('/XObject <<')
        self._putxobjectdict()
        self._out('>>')

    def _putresources(self):
        self._putfonts()
        self._putimages()
        #Resource dictionary
        self.offsets[2]=len(self.buffer)
        self._out('2 0 obj')
        self._out('<<')
        self._putresourcedict()
        self._out('>>')
        self._out('endobj')

    def _putinfo(self):
        self._out('/Producer '+self._textstring('PyFPDF '+FPDF_VERSION+' http://pyfpdf.googlecode.com/'))
        if hasattr(self,'title'):
            self._out('/Title '+self._textstring(self.title))
        if hasattr(self,'subject'):
            self._out('/Subject '+self._textstring(self.subject))
        if hasattr(self,'author'):
            self._out('/Author '+self._textstring(self.author))
        if hasattr (self,'keywords'):
            self._out('/Keywords '+self._textstring(self.keywords))
        if hasattr(self,'creator'):
            self._out('/Creator '+self._textstring(self.creator))
        self._out('/CreationDate '+self._textstring('D:'+datetime.now().strftime('%Y%m%d%H%M%S')))

    def _putcatalog(self):
        self._out('/Type /Catalog')
        self._out('/Pages 1 0 R')
        if(self.zoom_mode=='fullpage'):
            self._out('/OpenAction [3 0 R /Fit]')
        elif(self.zoom_mode=='fullwidth'):
            self._out('/OpenAction [3 0 R /FitH null]')
        elif(self.zoom_mode=='real'):
            self._out('/OpenAction [3 0 R /XYZ null null 1]')
        elif(not isinstance(self.zoom_mode,basestring)):
            self._out('/OpenAction [3 0 R /XYZ null null '+(self.zoom_mode/100)+']')
        if(self.layout_mode=='single'):
            self._out('/PageLayout /SinglePage')
        elif(self.layout_mode=='continuous'):
            self._out('/PageLayout /OneColumn')
        elif(self.layout_mode=='two'):
            self._out('/PageLayout /TwoColumnLeft')

    def _putheader(self):
        self._out('%PDF-'+self.pdf_version)

    def _puttrailer(self):
        self._out('/Size '+str(self.n+1))
        self._out('/Root '+str(self.n)+' 0 R')
        self._out('/Info '+str(self.n-1)+' 0 R')

    def _enddoc(self):
        self._putheader()
        self._putpages()
        self._putresources()
        #Info
        self._newobj()
        self._out('<<')
        self._putinfo()
        self._out('>>')
        self._out('endobj')
        #Catalog
        self._newobj()
        self._out('<<')
        self._putcatalog()
        self._out('>>')
        self._out('endobj')
        #Cross-ref
        o=len(self.buffer)
        self._out('xref')
        self._out('0 '+(str(self.n+1)))
        self._out('0000000000 65535 f ')
        for i in xrange(1,self.n+1):
            self._out(sprintf('%010d 00000 n ',self.offsets[i]))
        #Trailer
        self._out('trailer')
        self._out('<<')
        self._puttrailer()
        self._out('>>')
        self._out('startxref')
        self._out(o)
        self._out('%%EOF')
        self.state=3

    def _beginpage(self, orientation):
        self.page+=1
        self.pages[self.page]=''
        self.state=2
        self.x=self.l_margin
        self.y=self.t_margin
        self.font_family=''
        #Page orientation
        if(not orientation):
            orientation=self.def_orientation
        else:
            orientation=orientation[0].upper()
            if(orientation!=self.def_orientation):
                self.orientation_changes[self.page]=1
        if(orientation!=self.cur_orientation):
            #Change orientation
            if(orientation=='P'):
                self.w_pt=self.fw_pt
                self.h_pt=self.fh_pt
                self.w=self.fw
                self.h=self.fh
            else:
                self.w_pt=self.fh_pt
                self.h_pt=self.fw_pt
                self.w=self.fh
                self.h=self.fw
            self.page_break_trigger=self.h-self.b_margin
            self.cur_orientation=orientation

    def _endpage(self):
        #End of page contents
        self.state=1

    def _newobj(self):
        #Begin a new object
        self.n+=1
        self.offsets[self.n]=len(self.buffer)
        self._out(str(self.n)+' 0 obj')

    def _dounderline(self, x,y,txt):
        #Underline text
        up=self.current_font['up']
        ut=self.current_font['ut']
        w=self.get_string_width(txt)+self.ws*txt.count(' ')
        return sprintf('%.2f %.2f %.2f %.2f re f',x*self.k,(self.h-(y-up/1000.0*self.font_size))*self.k,w*self.k,-ut/1000.0*self.font_size_pt)

    def _parsejpg(self, filename):
        # Extract info from a JPEG file
        if Image is None:
            self.error('PIL not installed')
        try:
            f = open(filename, 'rb')
            im = Image.open(f)
        except Exception, e:
            self.error('Missing or incorrect image file: %s. error: %s' % (filename, str(e)))
        else:
            a = im.size
        # We shouldn't get into here, as Jpeg is RGB=8bpp right(?), but, just in case...
        bpc=8
        if im.mode == 'RGB':
            colspace='DeviceRGB'
        elif im.mode == 'CMYK':
            colspace='DeviceCMYK'
        else:
            colspace='DeviceGray'

        # Read whole file from the start
        f.seek(0)
        data = f.read()
        f.close()
        return {'w':a[0],'h':a[1],'cs':colspace,'bpc':bpc,'f':'DCTDecode','data':data}

    def _parsepng(self, name):
        #Extract info from a PNG file
        if name.startswith("http://") or name.startswith("https://"):
            import urllib
            f = urllib.urlopen(name)
        else:
            f=open(name,'rb')
        if(not f):
            self.error("Can't open image file: "+name)
        #Check signature
        if(f.read(8)!='\x89'+'PNG'+'\r'+'\n'+'\x1a'+'\n'):
            self.error('Not a PNG file: '+name)
        #Read header chunk
        f.read(4)
        if(f.read(4)!='IHDR'):
            self.error('Incorrect PNG file: '+name)
        w=self._freadint(f)
        h=self._freadint(f)
        bpc=ord(f.read(1))
        if(bpc>8):
            self.error('16-bit depth not supported: '+name)
        ct=ord(f.read(1))
        if(ct==0):
            colspace='DeviceGray'
        elif(ct==2):
            colspace='DeviceRGB'
        elif(ct==3):
            colspace='Indexed'
        else:
            self.error('Alpha channel not supported: '+name)
        if(ord(f.read(1))!=0):
            self.error('Unknown compression method: '+name)
        if(ord(f.read(1))!=0):
            self.error('Unknown filter method: '+name)
        if(ord(f.read(1))!=0):
            self.error('Interlacing not supported: '+name)
        f.read(4)
        parms='/DecodeParms <</Predictor 15 /Colors '
        if ct==2:
            parms+='3'
        else:
            parms+='1'
        parms+=' /BitsPerComponent '+str(bpc)+' /Columns '+str(w)+'>>'
        #Scan chunks looking for palette, transparency and image data
        pal=''
        trns=''
        data=''
        n=1
        while n != None:
            n=self._freadint(f)
            type=f.read(4)
            if(type=='PLTE'):
                #Read palette
                pal=f.read(n)
                f.read(4)
            elif(type=='tRNS'):
                #Read transparency info
                t=f.read(n)
                if(ct==0):
                    trns=[ord(substr(t,1,1)),]
                elif(ct==2):
                    trns=[ord(substr(t,1,1)),ord(substr(t,3,1)),ord(substr(t,5,1))]
                else:
                    pos=t.find('\x00')
                    if(pos!=-1):
                        trns=[pos,]
                f.read(4)
            elif(type=='IDAT'):
                #Read image data block
                data+=f.read(n)
                f.read(4)
            elif(type=='IEND'):
                break
            else:
                f.read(n+4)
        if(colspace=='Indexed' and not pal):
            self.error('Missing palette in '+name)
        f.close()
        return {'w':w,'h':h,'cs':colspace,'bpc':bpc,'f':'FlateDecode','parms':parms,'pal':pal,'trns':trns,'data':data}

    def _freadint(self, f):
        #Read a 4-byte integer from file
        try:
            return struct.unpack('>HH',f.read(4))[1]
        except:
            return None

    def _textstring(self, s):
        #Format a text string
        return '('+self._escape(s)+')'

    def _escape(self, s):
        #Add \ before \, ( and )
        return s.replace('\\','\\\\').replace(')','\\)').replace('(','\\(')

    def _putstream(self, s):
        self._out('stream')
        self._out(s)
        self._out('endstream')

    def _out(self, s):
        #Add a line to the document
        if(self.state==2):
            self.pages[self.page]+=s+"\n"
        else:
            self.buffer+=str(s)+"\n"

    def interleaved2of5(self, txt, x, y, w=1.0, h=10.0):
        "Barcode I2of5 (numeric), adds a 0 if odd lenght"
        narrow = w / 3.0
        wide = w

        # wide/narrow codes for the digits
        bar_char={}
        bar_char['0'] = 'nnwwn'
        bar_char['1'] = 'wnnnw'
        bar_char['2'] = 'nwnnw'
        bar_char['3'] = 'wwnnn'
        bar_char['4'] = 'nnwnw'
        bar_char['5'] = 'wnwnn'
        bar_char['6'] = 'nwwnn'
        bar_char['7'] = 'nnnww'
        bar_char['8'] = 'wnnwn'
        bar_char['9'] = 'nwnwn'
        bar_char['A'] = 'nn'
        bar_char['Z'] = 'wn'

        self.set_fill_color(0)
        code = txt
        # add leading zero if code-length is odd
        if len(code) % 2 != 0:
            code = '0' + code

        # add start and stop codes
        code = 'AA' + code.lower() + 'ZA'

        for i in xrange(0, len(code), 2):
            # choose next pair of digits
            char_bar = code[i];
            char_space = code[i+1];
            # check whether it is a valid digit
            if not char_bar in bar_char.keys():
                raise RuntimeError ('Caractr "%s" invlido para el cdigo de barras I25: ' % char_bar)
            if not char_space in bar_char.keys():
                raise RuntimeError ('Caractr "%s" invlido para el cdigo de barras I25: ' % char_space)

            # create a wide/narrow-sequence (first digit=bars, second digit=spaces)
            seq = ''
            for s in xrange(0, len(bar_char[char_bar])):
                seq += bar_char[char_bar][s] + bar_char[char_space][s]

            for bar in xrange(0, len(seq)):
                # set line_width depending on value
                if seq[bar] == 'n':
                    line_width = narrow
                else:
                    line_width = wide

                # draw every second value, because the second digit of the pair is represented by the spaces
                if bar % 2 == 0:
                    self.rect(x, y, line_width, h, 'F')

                x += line_width


    def code39(self, txt, x, y, w=1.5, h=5.0):
        "Barcode 3of9"
        wide = w
        narrow = w /3.0
        gap = narrow

        bar_char={}
        bar_char['0'] = 'nnnwwnwnn'
        bar_char['1'] = 'wnnwnnnnw'
        bar_char['2'] = 'nnwwnnnnw'
        bar_char['3'] = 'wnwwnnnnn'
        bar_char['4'] = 'nnnwwnnnw'
        bar_char['5'] = 'wnnwwnnnn'
        bar_char['6'] = 'nnwwwnnnn'
        bar_char['7'] = 'nnnwnnwnw'
        bar_char['8'] = 'wnnwnnwnn'
        bar_char['9'] = 'nnwwnnwnn'
        bar_char['A'] = 'wnnnnwnnw'
        bar_char['B'] = 'nnwnnwnnw'
        bar_char['C'] = 'wnwnnwnnn'
        bar_char['D'] = 'nnnnwwnnw'
        bar_char['E'] = 'wnnnwwnnn'
        bar_char['F'] = 'nnwnwwnnn'
        bar_char['G'] = 'nnnnnwwnw'
        bar_char['H'] = 'wnnnnwwnn'
        bar_char['I'] = 'nnwnnwwnn'
        bar_char['J'] = 'nnnnwwwnn'
        bar_char['K'] = 'wnnnnnnww'
        bar_char['L'] = 'nnwnnnnww'
        bar_char['M'] = 'wnwnnnnwn'
        bar_char['N'] = 'nnnnwnnww'
        bar_char['O'] = 'wnnnwnnwn'
        bar_char['P'] = 'nnwnwnnwn'
        bar_char['Q'] = 'nnnnnnwww'
        bar_char['R'] = 'wnnnnnwwn'
        bar_char['S'] = 'nnwnnnwwn'
        bar_char['T'] = 'nnnnwnwwn'
        bar_char['U'] = 'wwnnnnnnw'
        bar_char['V'] = 'nwwnnnnnw'
        bar_char['W'] = 'wwwnnnnnn'
        bar_char['X'] = 'nwnnwnnnw'
        bar_char['Y'] = 'wwnnwnnnn'
        bar_char['Z'] = 'nwwnwnnnn'
        bar_char['-'] = 'nwnnnnwnw'
        bar_char['.'] = 'wwnnnnwnn'
        bar_char[' '] = 'nwwnnnwnn'
        bar_char['*'] = 'nwnnwnwnn'
        bar_char['$'] = 'nwnwnwnnn'
        bar_char['/'] = 'nwnwnnnwn'
        bar_char['+'] = 'nwnnnwnwn'
        bar_char['%'] = 'nnnwnwnwn'

        self.set_fill_color(0)
        code = txt

        code = code.upper()
        for i in xrange (0, len(code), 2):
            char_bar = code[i];

            if not char_bar in bar_char.keys():
                raise RuntimeError ('Caracter "%s" invlido para el cdigo de barras' % char_bar)

            seq= ''
            for s in xrange(0, len(bar_char[char_bar])):
                seq += bar_char[char_bar][s]

            for bar in xrange(0, len(seq)):
                if seq[bar] == 'n':
                    line_width = narrow
                else:
                    line_width = wide

                if bar % 2 == 0:
                    self.rect(x,y,line_width,h,'F')
                x += line_width
        x += gap

#End of class

# Fonts:

fpdf_charwidths['courier']={}

for i in xrange(0,256):
    fpdf_charwidths['courier'][chr(i)]=600
    fpdf_charwidths['courierB']=fpdf_charwidths['courier']
    fpdf_charwidths['courierI']=fpdf_charwidths['courier']
    fpdf_charwidths['courierBI']=fpdf_charwidths['courier']

fpdf_charwidths['helvetica']={
    '\x00':278,'\x01':278,'\x02':278,'\x03':278,'\x04':278,'\x05':278,'\x06':278,'\x07':278,'\x08':278,'\t':278,'\n':278,'\x0b':278,'\x0c':278,'\r':278,'\x0e':278,'\x0f':278,'\x10':278,'\x11':278,'\x12':278,'\x13':278,'\x14':278,'\x15':278,
    '\x16':278,'\x17':278,'\x18':278,'\x19':278,'\x1a':278,'\x1b':278,'\x1c':278,'\x1d':278,'\x1e':278,'\x1f':278,' ':278,'!':278,'"':355,'#':556,'$':556,'%':889,'&':667,'\'':191,'(':333,')':333,'*':389,'+':584,
    ',':278,'-':333,'.':278,'/':278,'0':556,'1':556,'2':556,'3':556,'4':556,'5':556,'6':556,'7':556,'8':556,'9':556,':':278,';':278,'<':584,'=':584,'>':584,'?':556,'@':1015,'A':667,
    'B':667,'C':722,'D':722,'E':667,'F':611,'G':778,'H':722,'I':278,'J':500,'K':667,'L':556,'M':833,'N':722,'O':778,'P':667,'Q':778,'R':722,'S':667,'T':611,'U':722,'V':667,'W':944,
    'X':667,'Y':667,'Z':611,'[':278,'\\':278,']':278,'^':469,'_':556,'`':333,'a':556,'b':556,'c':500,'d':556,'e':556,'f':278,'g':556,'h':556,'i':222,'j':222,'k':500,'l':222,'m':833,
    'n':556,'o':556,'p':556,'q':556,'r':333,'s':500,'t':278,'u':556,'v':500,'w':722,'x':500,'y':500,'z':500,'{':334,'|':260,'}':334,'~':584,'\x7f':350,'\x80':556,'\x81':350,'\x82':222,'\x83':556,
    '\x84':333,'\x85':1000,'\x86':556,'\x87':556,'\x88':333,'\x89':1000,'\x8a':667,'\x8b':333,'\x8c':1000,'\x8d':350,'\x8e':611,'\x8f':350,'\x90':350,'\x91':222,'\x92':222,'\x93':333,'\x94':333,'\x95':350,'\x96':556,'\x97':1000,'\x98':333,'\x99':1000,
    '\x9a':500,'\x9b':333,'\x9c':944,'\x9d':350,'\x9e':500,'\x9f':667,'\xa0':278,'\xa1':333,'\xa2':556,'\xa3':556,'\xa4':556,'\xa5':556,'\xa6':260,'\xa7':556,'\xa8':333,'\xa9':737,'\xaa':370,'\xab':556,'\xac':584,'\xad':333,'\xae':737,'\xaf':333,
    '\xb0':400,'\xb1':584,'\xb2':333,'\xb3':333,'\xb4':333,'\xb5':556,'\xb6':537,'\xb7':278,'\xb8':333,'\xb9':333,'\xba':365,'\xbb':556,'\xbc':834,'\xbd':834,'\xbe':834,'\xbf':611,'\xc0':667,'\xc1':667,'\xc2':667,'\xc3':667,'\xc4':667,'\xc5':667,
    '\xc6':1000,'\xc7':722,'\xc8':667,'\xc9':667,'\xca':667,'\xcb':667,'\xcc':278,'\xcd':278,'\xce':278,'\xcf':278,'\xd0':722,'\xd1':722,'\xd2':778,'\xd3':778,'\xd4':778,'\xd5':778,'\xd6':778,'\xd7':584,'\xd8':778,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':667,'\xde':667,'\xdf':611,'\xe0':556,'\xe1':556,'\xe2':556,'\xe3':556,'\xe4':556,'\xe5':556,'\xe6':889,'\xe7':500,'\xe8':556,'\xe9':556,'\xea':556,'\xeb':556,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':556,'\xf1':556,
    '\xf2':556,'\xf3':556,'\xf4':556,'\xf5':556,'\xf6':556,'\xf7':584,'\xf8':611,'\xf9':556,'\xfa':556,'\xfb':556,'\xfc':556,'\xfd':500,'\xfe':556,'\xff':500}

fpdf_charwidths['helveticaB']={
    '\x00':278,'\x01':278,'\x02':278,'\x03':278,'\x04':278,'\x05':278,'\x06':278,'\x07':278,'\x08':278,'\t':278,'\n':278,'\x0b':278,'\x0c':278,'\r':278,'\x0e':278,'\x0f':278,'\x10':278,'\x11':278,'\x12':278,'\x13':278,'\x14':278,'\x15':278,
    '\x16':278,'\x17':278,'\x18':278,'\x19':278,'\x1a':278,'\x1b':278,'\x1c':278,'\x1d':278,'\x1e':278,'\x1f':278,' ':278,'!':333,'"':474,'#':556,'$':556,'%':889,'&':722,'\'':238,'(':333,')':333,'*':389,'+':584,
    ',':278,'-':333,'.':278,'/':278,'0':556,'1':556,'2':556,'3':556,'4':556,'5':556,'6':556,'7':556,'8':556,'9':556,':':333,';':333,'<':584,'=':584,'>':584,'?':611,'@':975,'A':722,
    'B':722,'C':722,'D':722,'E':667,'F':611,'G':778,'H':722,'I':278,'J':556,'K':722,'L':611,'M':833,'N':722,'O':778,'P':667,'Q':778,'R':722,'S':667,'T':611,'U':722,'V':667,'W':944,
    'X':667,'Y':667,'Z':611,'[':333,'\\':278,']':333,'^':584,'_':556,'`':333,'a':556,'b':611,'c':556,'d':611,'e':556,'f':333,'g':611,'h':611,'i':278,'j':278,'k':556,'l':278,'m':889,
    'n':611,'o':611,'p':611,'q':611,'r':389,'s':556,'t':333,'u':611,'v':556,'w':778,'x':556,'y':556,'z':500,'{':389,'|':280,'}':389,'~':584,'\x7f':350,'\x80':556,'\x81':350,'\x82':278,'\x83':556,
    '\x84':500,'\x85':1000,'\x86':556,'\x87':556,'\x88':333,'\x89':1000,'\x8a':667,'\x8b':333,'\x8c':1000,'\x8d':350,'\x8e':611,'\x8f':350,'\x90':350,'\x91':278,'\x92':278,'\x93':500,'\x94':500,'\x95':350,'\x96':556,'\x97':1000,'\x98':333,'\x99':1000,
    '\x9a':556,'\x9b':333,'\x9c':944,'\x9d':350,'\x9e':500,'\x9f':667,'\xa0':278,'\xa1':333,'\xa2':556,'\xa3':556,'\xa4':556,'\xa5':556,'\xa6':280,'\xa7':556,'\xa8':333,'\xa9':737,'\xaa':370,'\xab':556,'\xac':584,'\xad':333,'\xae':737,'\xaf':333,
    '\xb0':400,'\xb1':584,'\xb2':333,'\xb3':333,'\xb4':333,'\xb5':611,'\xb6':556,'\xb7':278,'\xb8':333,'\xb9':333,'\xba':365,'\xbb':556,'\xbc':834,'\xbd':834,'\xbe':834,'\xbf':611,'\xc0':722,'\xc1':722,'\xc2':722,'\xc3':722,'\xc4':722,'\xc5':722,
    '\xc6':1000,'\xc7':722,'\xc8':667,'\xc9':667,'\xca':667,'\xcb':667,'\xcc':278,'\xcd':278,'\xce':278,'\xcf':278,'\xd0':722,'\xd1':722,'\xd2':778,'\xd3':778,'\xd4':778,'\xd5':778,'\xd6':778,'\xd7':584,'\xd8':778,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':667,'\xde':667,'\xdf':611,'\xe0':556,'\xe1':556,'\xe2':556,'\xe3':556,'\xe4':556,'\xe5':556,'\xe6':889,'\xe7':556,'\xe8':556,'\xe9':556,'\xea':556,'\xeb':556,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':611,'\xf1':611,
    '\xf2':611,'\xf3':611,'\xf4':611,'\xf5':611,'\xf6':611,'\xf7':584,'\xf8':611,'\xf9':611,'\xfa':611,'\xfb':611,'\xfc':611,'\xfd':556,'\xfe':611,'\xff':556
}

fpdf_charwidths['helveticaBI']={
    '\x00':278,'\x01':278,'\x02':278,'\x03':278,'\x04':278,'\x05':278,'\x06':278,'\x07':278,'\x08':278,'\t':278,'\n':278,'\x0b':278,'\x0c':278,'\r':278,'\x0e':278,'\x0f':278,'\x10':278,'\x11':278,'\x12':278,'\x13':278,'\x14':278,'\x15':278,
    '\x16':278,'\x17':278,'\x18':278,'\x19':278,'\x1a':278,'\x1b':278,'\x1c':278,'\x1d':278,'\x1e':278,'\x1f':278,' ':278,'!':333,'"':474,'#':556,'$':556,'%':889,'&':722,'\'':238,'(':333,')':333,'*':389,'+':584,
    ',':278,'-':333,'.':278,'/':278,'0':556,'1':556,'2':556,'3':556,'4':556,'5':556,'6':556,'7':556,'8':556,'9':556,':':333,';':333,'<':584,'=':584,'>':584,'?':611,'@':975,'A':722,
    'B':722,'C':722,'D':722,'E':667,'F':611,'G':778,'H':722,'I':278,'J':556,'K':722,'L':611,'M':833,'N':722,'O':778,'P':667,'Q':778,'R':722,'S':667,'T':611,'U':722,'V':667,'W':944,
    'X':667,'Y':667,'Z':611,'[':333,'\\':278,']':333,'^':584,'_':556,'`':333,'a':556,'b':611,'c':556,'d':611,'e':556,'f':333,'g':611,'h':611,'i':278,'j':278,'k':556,'l':278,'m':889,
    'n':611,'o':611,'p':611,'q':611,'r':389,'s':556,'t':333,'u':611,'v':556,'w':778,'x':556,'y':556,'z':500,'{':389,'|':280,'}':389,'~':584,'\x7f':350,'\x80':556,'\x81':350,'\x82':278,'\x83':556,
    '\x84':500,'\x85':1000,'\x86':556,'\x87':556,'\x88':333,'\x89':1000,'\x8a':667,'\x8b':333,'\x8c':1000,'\x8d':350,'\x8e':611,'\x8f':350,'\x90':350,'\x91':278,'\x92':278,'\x93':500,'\x94':500,'\x95':350,'\x96':556,'\x97':1000,'\x98':333,'\x99':1000,
    '\x9a':556,'\x9b':333,'\x9c':944,'\x9d':350,'\x9e':500,'\x9f':667,'\xa0':278,'\xa1':333,'\xa2':556,'\xa3':556,'\xa4':556,'\xa5':556,'\xa6':280,'\xa7':556,'\xa8':333,'\xa9':737,'\xaa':370,'\xab':556,'\xac':584,'\xad':333,'\xae':737,'\xaf':333,
    '\xb0':400,'\xb1':584,'\xb2':333,'\xb3':333,'\xb4':333,'\xb5':611,'\xb6':556,'\xb7':278,'\xb8':333,'\xb9':333,'\xba':365,'\xbb':556,'\xbc':834,'\xbd':834,'\xbe':834,'\xbf':611,'\xc0':722,'\xc1':722,'\xc2':722,'\xc3':722,'\xc4':722,'\xc5':722,
    '\xc6':1000,'\xc7':722,'\xc8':667,'\xc9':667,'\xca':667,'\xcb':667,'\xcc':278,'\xcd':278,'\xce':278,'\xcf':278,'\xd0':722,'\xd1':722,'\xd2':778,'\xd3':778,'\xd4':778,'\xd5':778,'\xd6':778,'\xd7':584,'\xd8':778,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':667,'\xde':667,'\xdf':611,'\xe0':556,'\xe1':556,'\xe2':556,'\xe3':556,'\xe4':556,'\xe5':556,'\xe6':889,'\xe7':556,'\xe8':556,'\xe9':556,'\xea':556,'\xeb':556,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':611,'\xf1':611,
    '\xf2':611,'\xf3':611,'\xf4':611,'\xf5':611,'\xf6':611,'\xf7':584,'\xf8':611,'\xf9':611,'\xfa':611,'\xfb':611,'\xfc':611,'\xfd':556,'\xfe':611,'\xff':556}

fpdf_charwidths['helveticaI']={
    '\x00':278,'\x01':278,'\x02':278,'\x03':278,'\x04':278,'\x05':278,'\x06':278,'\x07':278,'\x08':278,'\t':278,'\n':278,'\x0b':278,'\x0c':278,'\r':278,'\x0e':278,'\x0f':278,'\x10':278,'\x11':278,'\x12':278,'\x13':278,'\x14':278,'\x15':278,
    '\x16':278,'\x17':278,'\x18':278,'\x19':278,'\x1a':278,'\x1b':278,'\x1c':278,'\x1d':278,'\x1e':278,'\x1f':278,' ':278,'!':278,'"':355,'#':556,'$':556,'%':889,'&':667,'\'':191,'(':333,')':333,'*':389,'+':584,
    ',':278,'-':333,'.':278,'/':278,'0':556,'1':556,'2':556,'3':556,'4':556,'5':556,'6':556,'7':556,'8':556,'9':556,':':278,';':278,'<':584,'=':584,'>':584,'?':556,'@':1015,'A':667,
    'B':667,'C':722,'D':722,'E':667,'F':611,'G':778,'H':722,'I':278,'J':500,'K':667,'L':556,'M':833,'N':722,'O':778,'P':667,'Q':778,'R':722,'S':667,'T':611,'U':722,'V':667,'W':944,
    'X':667,'Y':667,'Z':611,'[':278,'\\':278,']':278,'^':469,'_':556,'`':333,'a':556,'b':556,'c':500,'d':556,'e':556,'f':278,'g':556,'h':556,'i':222,'j':222,'k':500,'l':222,'m':833,
    'n':556,'o':556,'p':556,'q':556,'r':333,'s':500,'t':278,'u':556,'v':500,'w':722,'x':500,'y':500,'z':500,'{':334,'|':260,'}':334,'~':584,'\x7f':350,'\x80':556,'\x81':350,'\x82':222,'\x83':556,
    '\x84':333,'\x85':1000,'\x86':556,'\x87':556,'\x88':333,'\x89':1000,'\x8a':667,'\x8b':333,'\x8c':1000,'\x8d':350,'\x8e':611,'\x8f':350,'\x90':350,'\x91':222,'\x92':222,'\x93':333,'\x94':333,'\x95':350,'\x96':556,'\x97':1000,'\x98':333,'\x99':1000,
    '\x9a':500,'\x9b':333,'\x9c':944,'\x9d':350,'\x9e':500,'\x9f':667,'\xa0':278,'\xa1':333,'\xa2':556,'\xa3':556,'\xa4':556,'\xa5':556,'\xa6':260,'\xa7':556,'\xa8':333,'\xa9':737,'\xaa':370,'\xab':556,'\xac':584,'\xad':333,'\xae':737,'\xaf':333,
    '\xb0':400,'\xb1':584,'\xb2':333,'\xb3':333,'\xb4':333,'\xb5':556,'\xb6':537,'\xb7':278,'\xb8':333,'\xb9':333,'\xba':365,'\xbb':556,'\xbc':834,'\xbd':834,'\xbe':834,'\xbf':611,'\xc0':667,'\xc1':667,'\xc2':667,'\xc3':667,'\xc4':667,'\xc5':667,
    '\xc6':1000,'\xc7':722,'\xc8':667,'\xc9':667,'\xca':667,'\xcb':667,'\xcc':278,'\xcd':278,'\xce':278,'\xcf':278,'\xd0':722,'\xd1':722,'\xd2':778,'\xd3':778,'\xd4':778,'\xd5':778,'\xd6':778,'\xd7':584,'\xd8':778,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':667,'\xde':667,'\xdf':611,'\xe0':556,'\xe1':556,'\xe2':556,'\xe3':556,'\xe4':556,'\xe5':556,'\xe6':889,'\xe7':500,'\xe8':556,'\xe9':556,'\xea':556,'\xeb':556,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':556,'\xf1':556,
    '\xf2':556,'\xf3':556,'\xf4':556,'\xf5':556,'\xf6':556,'\xf7':584,'\xf8':611,'\xf9':556,'\xfa':556,'\xfb':556,'\xfc':556,'\xfd':500,'\xfe':556,'\xff':500}

fpdf_charwidths['symbol']={
    '\x00':250,'\x01':250,'\x02':250,'\x03':250,'\x04':250,'\x05':250,'\x06':250,'\x07':250,'\x08':250,'\t':250,'\n':250,'\x0b':250,'\x0c':250,'\r':250,'\x0e':250,'\x0f':250,'\x10':250,'\x11':250,'\x12':250,'\x13':250,'\x14':250,'\x15':250,
    '\x16':250,'\x17':250,'\x18':250,'\x19':250,'\x1a':250,'\x1b':250,'\x1c':250,'\x1d':250,'\x1e':250,'\x1f':250,' ':250,'!':333,'"':713,'#':500,'$':549,'%':833,'&':778,'\'':439,'(':333,')':333,'*':500,'+':549,
    ',':250,'-':549,'.':250,'/':278,'0':500,'1':500,'2':500,'3':500,'4':500,'5':500,'6':500,'7':500,'8':500,'9':500,':':278,';':278,'<':549,'=':549,'>':549,'?':444,'@':549,'A':722,
    'B':667,'C':722,'D':612,'E':611,'F':763,'G':603,'H':722,'I':333,'J':631,'K':722,'L':686,'M':889,'N':722,'O':722,'P':768,'Q':741,'R':556,'S':592,'T':611,'U':690,'V':439,'W':768,
    'X':645,'Y':795,'Z':611,'[':333,'\\':863,']':333,'^':658,'_':500,'`':500,'a':631,'b':549,'c':549,'d':494,'e':439,'f':521,'g':411,'h':603,'i':329,'j':603,'k':549,'l':549,'m':576,
    'n':521,'o':549,'p':549,'q':521,'r':549,'s':603,'t':439,'u':576,'v':713,'w':686,'x':493,'y':686,'z':494,'{':480,'|':200,'}':480,'~':549,'\x7f':0,'\x80':0,'\x81':0,'\x82':0,'\x83':0,
    '\x84':0,'\x85':0,'\x86':0,'\x87':0,'\x88':0,'\x89':0,'\x8a':0,'\x8b':0,'\x8c':0,'\x8d':0,'\x8e':0,'\x8f':0,'\x90':0,'\x91':0,'\x92':0,'\x93':0,'\x94':0,'\x95':0,'\x96':0,'\x97':0,'\x98':0,'\x99':0,
    '\x9a':0,'\x9b':0,'\x9c':0,'\x9d':0,'\x9e':0,'\x9f':0,'\xa0':750,'\xa1':620,'\xa2':247,'\xa3':549,'\xa4':167,'\xa5':713,'\xa6':500,'\xa7':753,'\xa8':753,'\xa9':753,'\xaa':753,'\xab':1042,'\xac':987,'\xad':603,'\xae':987,'\xaf':603,
    '\xb0':400,'\xb1':549,'\xb2':411,'\xb3':549,'\xb4':549,'\xb5':713,'\xb6':494,'\xb7':460,'\xb8':549,'\xb9':549,'\xba':549,'\xbb':549,'\xbc':1000,'\xbd':603,'\xbe':1000,'\xbf':658,'\xc0':823,'\xc1':686,'\xc2':795,'\xc3':987,'\xc4':768,'\xc5':768,
    '\xc6':823,'\xc7':768,'\xc8':768,'\xc9':713,'\xca':713,'\xcb':713,'\xcc':713,'\xcd':713,'\xce':713,'\xcf':713,'\xd0':768,'\xd1':713,'\xd2':790,'\xd3':790,'\xd4':890,'\xd5':823,'\xd6':549,'\xd7':250,'\xd8':713,'\xd9':603,'\xda':603,'\xdb':1042,
    '\xdc':987,'\xdd':603,'\xde':987,'\xdf':603,'\xe0':494,'\xe1':329,'\xe2':790,'\xe3':790,'\xe4':786,'\xe5':713,'\xe6':384,'\xe7':384,'\xe8':384,'\xe9':384,'\xea':384,'\xeb':384,'\xec':494,'\xed':494,'\xee':494,'\xef':494,'\xf0':0,'\xf1':329,
    '\xf2':274,'\xf3':686,'\xf4':686,'\xf5':686,'\xf6':384,'\xf7':384,'\xf8':384,'\xf9':384,'\xfa':384,'\xfb':384,'\xfc':494,'\xfd':494,'\xfe':494,'\xff':0}

fpdf_charwidths['times']={
    '\x00':250,'\x01':250,'\x02':250,'\x03':250,'\x04':250,'\x05':250,'\x06':250,'\x07':250,'\x08':250,'\t':250,'\n':250,'\x0b':250,'\x0c':250,'\r':250,'\x0e':250,'\x0f':250,'\x10':250,'\x11':250,'\x12':250,'\x13':250,'\x14':250,'\x15':250,
    '\x16':250,'\x17':250,'\x18':250,'\x19':250,'\x1a':250,'\x1b':250,'\x1c':250,'\x1d':250,'\x1e':250,'\x1f':250,' ':250,'!':333,'"':408,'#':500,'$':500,'%':833,'&':778,'\'':180,'(':333,')':333,'*':500,'+':564,
    ',':250,'-':333,'.':250,'/':278,'0':500,'1':500,'2':500,'3':500,'4':500,'5':500,'6':500,'7':500,'8':500,'9':500,':':278,';':278,'<':564,'=':564,'>':564,'?':444,'@':921,'A':722,
    'B':667,'C':667,'D':722,'E':611,'F':556,'G':722,'H':722,'I':333,'J':389,'K':722,'L':611,'M':889,'N':722,'O':722,'P':556,'Q':722,'R':667,'S':556,'T':611,'U':722,'V':722,'W':944,
    'X':722,'Y':722,'Z':611,'[':333,'\\':278,']':333,'^':469,'_':500,'`':333,'a':444,'b':500,'c':444,'d':500,'e':444,'f':333,'g':500,'h':500,'i':278,'j':278,'k':500,'l':278,'m':778,
    'n':500,'o':500,'p':500,'q':500,'r':333,'s':389,'t':278,'u':500,'v':500,'w':722,'x':500,'y':500,'z':444,'{':480,'|':200,'}':480,'~':541,'\x7f':350,'\x80':500,'\x81':350,'\x82':333,'\x83':500,
    '\x84':444,'\x85':1000,'\x86':500,'\x87':500,'\x88':333,'\x89':1000,'\x8a':556,'\x8b':333,'\x8c':889,'\x8d':350,'\x8e':611,'\x8f':350,'\x90':350,'\x91':333,'\x92':333,'\x93':444,'\x94':444,'\x95':350,'\x96':500,'\x97':1000,'\x98':333,'\x99':980,
    '\x9a':389,'\x9b':333,'\x9c':722,'\x9d':350,'\x9e':444,'\x9f':722,'\xa0':250,'\xa1':333,'\xa2':500,'\xa3':500,'\xa4':500,'\xa5':500,'\xa6':200,'\xa7':500,'\xa8':333,'\xa9':760,'\xaa':276,'\xab':500,'\xac':564,'\xad':333,'\xae':760,'\xaf':333,
    '\xb0':400,'\xb1':564,'\xb2':300,'\xb3':300,'\xb4':333,'\xb5':500,'\xb6':453,'\xb7':250,'\xb8':333,'\xb9':300,'\xba':310,'\xbb':500,'\xbc':750,'\xbd':750,'\xbe':750,'\xbf':444,'\xc0':722,'\xc1':722,'\xc2':722,'\xc3':722,'\xc4':722,'\xc5':722,
    '\xc6':889,'\xc7':667,'\xc8':611,'\xc9':611,'\xca':611,'\xcb':611,'\xcc':333,'\xcd':333,'\xce':333,'\xcf':333,'\xd0':722,'\xd1':722,'\xd2':722,'\xd3':722,'\xd4':722,'\xd5':722,'\xd6':722,'\xd7':564,'\xd8':722,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':722,'\xde':556,'\xdf':500,'\xe0':444,'\xe1':444,'\xe2':444,'\xe3':444,'\xe4':444,'\xe5':444,'\xe6':667,'\xe7':444,'\xe8':444,'\xe9':444,'\xea':444,'\xeb':444,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':500,'\xf1':500,
    '\xf2':500,'\xf3':500,'\xf4':500,'\xf5':500,'\xf6':500,'\xf7':564,'\xf8':500,'\xf9':500,'\xfa':500,'\xfb':500,'\xfc':500,'\xfd':500,'\xfe':500,'\xff':500}

fpdf_charwidths['timesB']={
    '\x00':250,'\x01':250,'\x02':250,'\x03':250,'\x04':250,'\x05':250,'\x06':250,'\x07':250,'\x08':250,'\t':250,'\n':250,'\x0b':250,'\x0c':250,'\r':250,'\x0e':250,'\x0f':250,'\x10':250,'\x11':250,'\x12':250,'\x13':250,'\x14':250,'\x15':250,
    '\x16':250,'\x17':250,'\x18':250,'\x19':250,'\x1a':250,'\x1b':250,'\x1c':250,'\x1d':250,'\x1e':250,'\x1f':250,' ':250,'!':333,'"':555,'#':500,'$':500,'%':1000,'&':833,'\'':278,'(':333,')':333,'*':500,'+':570,
    ',':250,'-':333,'.':250,'/':278,'0':500,'1':500,'2':500,'3':500,'4':500,'5':500,'6':500,'7':500,'8':500,'9':500,':':333,';':333,'<':570,'=':570,'>':570,'?':500,'@':930,'A':722,
    'B':667,'C':722,'D':722,'E':667,'F':611,'G':778,'H':778,'I':389,'J':500,'K':778,'L':667,'M':944,'N':722,'O':778,'P':611,'Q':778,'R':722,'S':556,'T':667,'U':722,'V':722,'W':1000,
    'X':722,'Y':722,'Z':667,'[':333,'\\':278,']':333,'^':581,'_':500,'`':333,'a':500,'b':556,'c':444,'d':556,'e':444,'f':333,'g':500,'h':556,'i':278,'j':333,'k':556,'l':278,'m':833,
    'n':556,'o':500,'p':556,'q':556,'r':444,'s':389,'t':333,'u':556,'v':500,'w':722,'x':500,'y':500,'z':444,'{':394,'|':220,'}':394,'~':520,'\x7f':350,'\x80':500,'\x81':350,'\x82':333,'\x83':500,
    '\x84':500,'\x85':1000,'\x86':500,'\x87':500,'\x88':333,'\x89':1000,'\x8a':556,'\x8b':333,'\x8c':1000,'\x8d':350,'\x8e':667,'\x8f':350,'\x90':350,'\x91':333,'\x92':333,'\x93':500,'\x94':500,'\x95':350,'\x96':500,'\x97':1000,'\x98':333,'\x99':1000,
    '\x9a':389,'\x9b':333,'\x9c':722,'\x9d':350,'\x9e':444,'\x9f':722,'\xa0':250,'\xa1':333,'\xa2':500,'\xa3':500,'\xa4':500,'\xa5':500,'\xa6':220,'\xa7':500,'\xa8':333,'\xa9':747,'\xaa':300,'\xab':500,'\xac':570,'\xad':333,'\xae':747,'\xaf':333,
    '\xb0':400,'\xb1':570,'\xb2':300,'\xb3':300,'\xb4':333,'\xb5':556,'\xb6':540,'\xb7':250,'\xb8':333,'\xb9':300,'\xba':330,'\xbb':500,'\xbc':750,'\xbd':750,'\xbe':750,'\xbf':500,'\xc0':722,'\xc1':722,'\xc2':722,'\xc3':722,'\xc4':722,'\xc5':722,
    '\xc6':1000,'\xc7':722,'\xc8':667,'\xc9':667,'\xca':667,'\xcb':667,'\xcc':389,'\xcd':389,'\xce':389,'\xcf':389,'\xd0':722,'\xd1':722,'\xd2':778,'\xd3':778,'\xd4':778,'\xd5':778,'\xd6':778,'\xd7':570,'\xd8':778,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':722,'\xde':611,'\xdf':556,'\xe0':500,'\xe1':500,'\xe2':500,'\xe3':500,'\xe4':500,'\xe5':500,'\xe6':722,'\xe7':444,'\xe8':444,'\xe9':444,'\xea':444,'\xeb':444,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':500,'\xf1':556,
    '\xf2':500,'\xf3':500,'\xf4':500,'\xf5':500,'\xf6':500,'\xf7':570,'\xf8':500,'\xf9':556,'\xfa':556,'\xfb':556,'\xfc':556,'\xfd':500,'\xfe':556,'\xff':500}

fpdf_charwidths['timesBI']={
    '\x00':250,'\x01':250,'\x02':250,'\x03':250,'\x04':250,'\x05':250,'\x06':250,'\x07':250,'\x08':250,'\t':250,'\n':250,'\x0b':250,'\x0c':250,'\r':250,'\x0e':250,'\x0f':250,'\x10':250,'\x11':250,'\x12':250,'\x13':250,'\x14':250,'\x15':250,
    '\x16':250,'\x17':250,'\x18':250,'\x19':250,'\x1a':250,'\x1b':250,'\x1c':250,'\x1d':250,'\x1e':250,'\x1f':250,' ':250,'!':389,'"':555,'#':500,'$':500,'%':833,'&':778,'\'':278,'(':333,')':333,'*':500,'+':570,
    ',':250,'-':333,'.':250,'/':278,'0':500,'1':500,'2':500,'3':500,'4':500,'5':500,'6':500,'7':500,'8':500,'9':500,':':333,';':333,'<':570,'=':570,'>':570,'?':500,'@':832,'A':667,
    'B':667,'C':667,'D':722,'E':667,'F':667,'G':722,'H':778,'I':389,'J':500,'K':667,'L':611,'M':889,'N':722,'O':722,'P':611,'Q':722,'R':667,'S':556,'T':611,'U':722,'V':667,'W':889,
    'X':667,'Y':611,'Z':611,'[':333,'\\':278,']':333,'^':570,'_':500,'`':333,'a':500,'b':500,'c':444,'d':500,'e':444,'f':333,'g':500,'h':556,'i':278,'j':278,'k':500,'l':278,'m':778,
    'n':556,'o':500,'p':500,'q':500,'r':389,'s':389,'t':278,'u':556,'v':444,'w':667,'x':500,'y':444,'z':389,'{':348,'|':220,'}':348,'~':570,'\x7f':350,'\x80':500,'\x81':350,'\x82':333,'\x83':500,
    '\x84':500,'\x85':1000,'\x86':500,'\x87':500,'\x88':333,'\x89':1000,'\x8a':556,'\x8b':333,'\x8c':944,'\x8d':350,'\x8e':611,'\x8f':350,'\x90':350,'\x91':333,'\x92':333,'\x93':500,'\x94':500,'\x95':350,'\x96':500,'\x97':1000,'\x98':333,'\x99':1000,
    '\x9a':389,'\x9b':333,'\x9c':722,'\x9d':350,'\x9e':389,'\x9f':611,'\xa0':250,'\xa1':389,'\xa2':500,'\xa3':500,'\xa4':500,'\xa5':500,'\xa6':220,'\xa7':500,'\xa8':333,'\xa9':747,'\xaa':266,'\xab':500,'\xac':606,'\xad':333,'\xae':747,'\xaf':333,
    '\xb0':400,'\xb1':570,'\xb2':300,'\xb3':300,'\xb4':333,'\xb5':576,'\xb6':500,'\xb7':250,'\xb8':333,'\xb9':300,'\xba':300,'\xbb':500,'\xbc':750,'\xbd':750,'\xbe':750,'\xbf':500,'\xc0':667,'\xc1':667,'\xc2':667,'\xc3':667,'\xc4':667,'\xc5':667,
    '\xc6':944,'\xc7':667,'\xc8':667,'\xc9':667,'\xca':667,'\xcb':667,'\xcc':389,'\xcd':389,'\xce':389,'\xcf':389,'\xd0':722,'\xd1':722,'\xd2':722,'\xd3':722,'\xd4':722,'\xd5':722,'\xd6':722,'\xd7':570,'\xd8':722,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':611,'\xde':611,'\xdf':500,'\xe0':500,'\xe1':500,'\xe2':500,'\xe3':500,'\xe4':500,'\xe5':500,'\xe6':722,'\xe7':444,'\xe8':444,'\xe9':444,'\xea':444,'\xeb':444,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':500,'\xf1':556,
    '\xf2':500,'\xf3':500,'\xf4':500,'\xf5':500,'\xf6':500,'\xf7':570,'\xf8':500,'\xf9':556,'\xfa':556,'\xfb':556,'\xfc':556,'\xfd':444,'\xfe':500,'\xff':444}

fpdf_charwidths['timesI']={
    '\x00':250,'\x01':250,'\x02':250,'\x03':250,'\x04':250,'\x05':250,'\x06':250,'\x07':250,'\x08':250,'\t':250,'\n':250,'\x0b':250,'\x0c':250,'\r':250,'\x0e':250,'\x0f':250,'\x10':250,'\x11':250,'\x12':250,'\x13':250,'\x14':250,'\x15':250,
    '\x16':250,'\x17':250,'\x18':250,'\x19':250,'\x1a':250,'\x1b':250,'\x1c':250,'\x1d':250,'\x1e':250,'\x1f':250,' ':250,'!':333,'"':420,'#':500,'$':500,'%':833,'&':778,'\'':214,'(':333,')':333,'*':500,'+':675,
    ',':250,'-':333,'.':250,'/':278,'0':500,'1':500,'2':500,'3':500,'4':500,'5':500,'6':500,'7':500,'8':500,'9':500,':':333,';':333,'<':675,'=':675,'>':675,'?':500,'@':920,'A':611,
    'B':611,'C':667,'D':722,'E':611,'F':611,'G':722,'H':722,'I':333,'J':444,'K':667,'L':556,'M':833,'N':667,'O':722,'P':611,'Q':722,'R':611,'S':500,'T':556,'U':722,'V':611,'W':833,
    'X':611,'Y':556,'Z':556,'[':389,'\\':278,']':389,'^':422,'_':500,'`':333,'a':500,'b':500,'c':444,'d':500,'e':444,'f':278,'g':500,'h':500,'i':278,'j':278,'k':444,'l':278,'m':722,
    'n':500,'o':500,'p':500,'q':500,'r':389,'s':389,'t':278,'u':500,'v':444,'w':667,'x':444,'y':444,'z':389,'{':400,'|':275,'}':400,'~':541,'\x7f':350,'\x80':500,'\x81':350,'\x82':333,'\x83':500,
    '\x84':556,'\x85':889,'\x86':500,'\x87':500,'\x88':333,'\x89':1000,'\x8a':500,'\x8b':333,'\x8c':944,'\x8d':350,'\x8e':556,'\x8f':350,'\x90':350,'\x91':333,'\x92':333,'\x93':556,'\x94':556,'\x95':350,'\x96':500,'\x97':889,'\x98':333,'\x99':980,
    '\x9a':389,'\x9b':333,'\x9c':667,'\x9d':350,'\x9e':389,'\x9f':556,'\xa0':250,'\xa1':389,'\xa2':500,'\xa3':500,'\xa4':500,'\xa5':500,'\xa6':275,'\xa7':500,'\xa8':333,'\xa9':760,'\xaa':276,'\xab':500,'\xac':675,'\xad':333,'\xae':760,'\xaf':333,
    '\xb0':400,'\xb1':675,'\xb2':300,'\xb3':300,'\xb4':333,'\xb5':500,'\xb6':523,'\xb7':250,'\xb8':333,'\xb9':300,'\xba':310,'\xbb':500,'\xbc':750,'\xbd':750,'\xbe':750,'\xbf':500,'\xc0':611,'\xc1':611,'\xc2':611,'\xc3':611,'\xc4':611,'\xc5':611,
    '\xc6':889,'\xc7':667,'\xc8':611,'\xc9':611,'\xca':611,'\xcb':611,'\xcc':333,'\xcd':333,'\xce':333,'\xcf':333,'\xd0':722,'\xd1':667,'\xd2':722,'\xd3':722,'\xd4':722,'\xd5':722,'\xd6':722,'\xd7':675,'\xd8':722,'\xd9':722,'\xda':722,'\xdb':722,
    '\xdc':722,'\xdd':556,'\xde':611,'\xdf':500,'\xe0':500,'\xe1':500,'\xe2':500,'\xe3':500,'\xe4':500,'\xe5':500,'\xe6':667,'\xe7':444,'\xe8':444,'\xe9':444,'\xea':444,'\xeb':444,'\xec':278,'\xed':278,'\xee':278,'\xef':278,'\xf0':500,'\xf1':500,
    '\xf2':500,'\xf3':500,'\xf4':500,'\xf5':500,'\xf6':500,'\xf7':675,'\xf8':500,'\xf9':500,'\xfa':500,'\xfb':500,'\xfc':500,'\xfd':444,'\xfe':500,'\xff':444}

fpdf_charwidths['zapfdingbats']={
    '\x00':0,'\x01':0,'\x02':0,'\x03':0,'\x04':0,'\x05':0,'\x06':0,'\x07':0,'\x08':0,'\t':0,'\n':0,'\x0b':0,'\x0c':0,'\r':0,'\x0e':0,'\x0f':0,'\x10':0,'\x11':0,'\x12':0,'\x13':0,'\x14':0,'\x15':0,
    '\x16':0,'\x17':0,'\x18':0,'\x19':0,'\x1a':0,'\x1b':0,'\x1c':0,'\x1d':0,'\x1e':0,'\x1f':0,' ':278,'!':974,'"':961,'#':974,'$':980,'%':719,'&':789,'\'':790,'(':791,')':690,'*':960,'+':939,
    ',':549,'-':855,'.':911,'/':933,'0':911,'1':945,'2':974,'3':755,'4':846,'5':762,'6':761,'7':571,'8':677,'9':763,':':760,';':759,'<':754,'=':494,'>':552,'?':537,'@':577,'A':692,
    'B':786,'C':788,'D':788,'E':790,'F':793,'G':794,'H':816,'I':823,'J':789,'K':841,'L':823,'M':833,'N':816,'O':831,'P':923,'Q':744,'R':723,'S':749,'T':790,'U':792,'V':695,'W':776,
    'X':768,'Y':792,'Z':759,'[':707,'\\':708,']':682,'^':701,'_':826,'`':815,'a':789,'b':789,'c':707,'d':687,'e':696,'f':689,'g':786,'h':787,'i':713,'j':791,'k':785,'l':791,'m':873,
    'n':761,'o':762,'p':762,'q':759,'r':759,'s':892,'t':892,'u':788,'v':784,'w':438,'x':138,'y':277,'z':415,'{':392,'|':392,'}':668,'~':668,'\x7f':0,'\x80':390,'\x81':390,'\x82':317,'\x83':317,
    '\x84':276,'\x85':276,'\x86':509,'\x87':509,'\x88':410,'\x89':410,'\x8a':234,'\x8b':234,'\x8c':334,'\x8d':334,'\x8e':0,'\x8f':0,'\x90':0,'\x91':0,'\x92':0,'\x93':0,'\x94':0,'\x95':0,'\x96':0,'\x97':0,'\x98':0,'\x99':0,
    '\x9a':0,'\x9b':0,'\x9c':0,'\x9d':0,'\x9e':0,'\x9f':0,'\xa0':0,'\xa1':732,'\xa2':544,'\xa3':544,'\xa4':910,'\xa5':667,'\xa6':760,'\xa7':760,'\xa8':776,'\xa9':595,'\xaa':694,'\xab':626,'\xac':788,'\xad':788,'\xae':788,'\xaf':788,
    '\xb0':788,'\xb1':788,'\xb2':788,'\xb3':788,'\xb4':788,'\xb5':788,'\xb6':788,'\xb7':788,'\xb8':788,'\xb9':788,'\xba':788,'\xbb':788,'\xbc':788,'\xbd':788,'\xbe':788,'\xbf':788,'\xc0':788,'\xc1':788,'\xc2':788,'\xc3':788,'\xc4':788,'\xc5':788,
    '\xc6':788,'\xc7':788,'\xc8':788,'\xc9':788,'\xca':788,'\xcb':788,'\xcc':788,'\xcd':788,'\xce':788,'\xcf':788,'\xd0':788,'\xd1':788,'\xd2':788,'\xd3':788,'\xd4':894,'\xd5':838,'\xd6':1016,'\xd7':458,'\xd8':748,'\xd9':924,'\xda':748,'\xdb':918,
    '\xdc':927,'\xdd':928,'\xde':928,'\xdf':834,'\xe0':873,'\xe1':828,'\xe2':924,'\xe3':924,'\xe4':917,'\xe5':930,'\xe6':931,'\xe7':463,'\xe8':883,'\xe9':836,'\xea':836,'\xeb':867,'\xec':867,'\xed':696,'\xee':696,'\xef':874,'\xf0':0,'\xf1':874,
    '\xf2':760,'\xf3':946,'\xf4':771,'\xf5':865,'\xf6':771,'\xf7':888,'\xf8':967,'\xf9':888,'\xfa':831,'\xfb':873,'\xfc':927,'\xfd':970,'\xfe':918,'\xff':0}


Added gluon/contrib/pyfpdf/html.py version [163edc0937].









































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: latin-1 -*-

"HTML Renderer for FPDF.py"

__author__ = "Mariano Reingart <reingart@gmail.com>"
__copyright__ = "Copyright (C) 2010 Mariano Reingart"
__license__ = "LGPL 3.0"

# Inspired by tuto5.py and several examples from fpdf.org, html2fpdf, etc.

from fpdf import FPDF
from HTMLParser import HTMLParser

DEBUG = False

def px2mm(px):
    return int(px)*25.4/72.0

def hex2dec(color = "#000000"):
    if color:
        r = int(color[1:3], 16)
        g = int(color[3:5], 16)
        b = int(color[5:7], 16)
        return r, g, b

class HTML2FPDF(HTMLParser):
    "Render basic HTML to FPDF"

    def __init__(self, pdf, image_map):
        HTMLParser.__init__(self)
        self.image_map = image_map
        self.style = {}
        self.pre = False
        self.href = ''
        self.align = ''
        self.page_links = {}
        self.font_list = ("times","courier", "helvetica")
        self.pdf = pdf
        self.r = self.g = self.b = 0
        self.indent = 0
        self.bullet = []
        self.set_font("times", 12)
        self.table = None           # table attributes
        self.table_col_width = None # column (header) widths
        self.table_col_index = None # current column index
        self.td = None              # cell attributes
        self.th = False             # header enabled
        self.tr = None
        self.theader = None           # table header cells
        self.tfooter = None           # table footer cells
        self.thead = None
        self.tfoot = None
        self.theader_out = self.tfooter_out = False

    def width2mm(self, length):
        if length[-1]=='%':
            total = self.pdf.w - self.pdf.r_margin - self.pdf.l_margin
            if self.table['width'][-1]=='%':
                total *= int(self.table['width'][:-1])/100.0
            return int(length[:-1]) * total / 101.0
        else:
            return int(length) / 6.0

    def handle_data(self, txt):
        if self.td is not None: # drawing a table?
            if 'width' not in self.td and 'colspan' not in self.td:
                l = [self.table_col_width[self.table_col_index]]
            elif 'colspan' in self.td:
                i = self.table_col_index
                colspan = int(self.td['colspan'])
                l = self.table_col_width[i:i+colspan]
            else:
                l = [self.td.get('width','240')]
            w = sum([self.width2mm(lenght) for lenght in l])
            h = int(self.td.get('height', 0)) / 4 or self.h*1.30
            self.table_h = h
            border = int(self.table.get('border', 0))
            if not self.th:
                align = self.td.get('align', 'L')[0].upper()
                border = border and 'LR'
            else:
                self.set_style('B',True)
                border = border or 'B'
                align = 'C'
            bgcolor = hex2dec(self.td.get('bgcolor', self.tr.get('bgcolor', '')))
            # parsing table header/footer (drawn later):
            if self.thead is not None:
                self.theader.append(((w,h,txt,border,0,align), bgcolor))
            if self.tfoot is not None:
                self.tfooter.append(((w,h,txt,border,0,align), bgcolor))
            # check if reached end of page, add table footer and header:
            height = h + (self.tfooter and self.tfooter[0][0][1] or 0)
            if self.pdf.y+height>self.pdf.page_break_trigger and not self.th:
                self.output_table_footer()
                self.pdf.add_page()
                self.theader_out = self.tfooter_out = False
            if self.tfoot is None and self.thead is None:
                if not self.theader_out:
                    self.output_table_header()
                self.box_shadow(w, h, bgcolor)
                if DEBUG: print "td cell", self.pdf.x, w, txt, "*"
                self.pdf.cell(w,h,txt,border,0,align)
        elif self.table is not None:
            # ignore anything else than td inside a table
            pass
        elif self.align:
            if DEBUG: print "cell", txt, "*"
            self.pdf.cell(0,self.h,txt,0,1,self.align[0].upper(), self.href)
        else:
            txt = txt.replace("\n"," ")
            if self.href:
                self.put_link(self.href,txt)
            else:
                if DEBUG: print "write", txt, "*"
                self.pdf.write(self.h,txt)

    def box_shadow(self, w, h, bgcolor):
        if DEBUG: print "box_shadow", w, h, bgcolor
        if bgcolor:
            fill_color = self.pdf.fill_color
            self.pdf.set_fill_color(*bgcolor)
            self.pdf.rect(self.pdf.x, self.pdf.y, w, h, 'F')
            self.pdf.fill_color = fill_color

    def output_table_header(self):
        if self.theader:
            b = self.b
            x = self.pdf.x
            self.pdf.set_x(self.table_offset)
            self.set_style('B',True)
            for cell, bgcolor in self.theader:
                self.box_shadow(cell[0], cell[1], bgcolor)
                self.pdf.cell(*cell)
            self.set_style('B',b)
            self.pdf.ln(self.theader[0][0][1])
            self.pdf.set_x(self.table_offset)
            #self.pdf.set_x(x)
        self.theader_out = True

    def output_table_footer(self):
        if self.tfooter:
            x = self.pdf.x
            self.pdf.set_x(self.table_offset)
            #TODO: self.output_table_sep()
            for cell, bgcolor in self.tfooter:
                self.box_shadow(cell[0], cell[1], bgcolor)
                self.pdf.cell(*cell)
            self.pdf.ln(self.tfooter[0][0][1])
            self.pdf.set_x(x)
        if int(self.table.get('border', 0)):
            self.output_table_sep()
        self.tfooter_out = True

    def output_table_sep(self):
        self.pdf.set_x(self.table_offset)
        x1 = self.pdf.x
        y1 = self.pdf.y
        w = sum([self.width2mm(lenght) for lenght in self.table_col_width])
        self.pdf.line(x1,y1,x1+w,y1)


    def handle_starttag(self, tag, attrs):
        attrs = dict(attrs)
        if DEBUG: print "STARTTAG", tag, attrs
        if tag=='b' or tag=='i' or tag=='u':
            self.set_style(tag,1)
        if tag=='a':
            self.href=attrs['href']
        if tag=='br':
            self.pdf.ln(5)
        if tag=='p':
            self.pdf.ln(5)
            if attrs:
                self.align=attrs['align'].lower()
        if tag in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6'):
            k = (2, 1.5, 1.17, 1, 0.83, 0.67)[int(tag[1])]
            self.pdf.ln(5*k)
            self.pdf.set_text_color(150,0,0)
            self.pdf.set_font_size(12 * k)
            if attrs: self.align = attrs.get('align')
        if tag=='hr':
            self.put_line()
        if tag=='pre':
            self.pdf.set_font('Courier','',11)
            self.pdf.set_font_size(11)
            self.set_style('B',False)
            self.set_style('I',False)
            self.pre = True
        if tag=='blockquote':
            self.set_text_color(100,0,45)
            self.pdf.ln(3)
        if tag=='ul':
            self.indent+=1
            self.bullet.append('\x95')
        if tag=='ol':
            self.indent+=1
            self.bullet.append(0)
        if tag=='li':
            self.pdf.ln(self.h+2)
            self.pdf.set_text_color(190,0,0)
            bullet = self.bullet[self.indent-1]
            if not isinstance(bullet, basestring):
                bullet += 1
                self.bullet[self.indent-1] = bullet
                bullet = "%s. " % bullet
            self.pdf.write(self.h,'%s%s ' % (' '*5*self.indent, bullet))
            self.set_text_color()
        if tag=='font':
            if 'color' in attrs:
                self.color = hex2dec(attrs['color'])
                self.set_text_color(*color)
                self.color = color
            if 'face' in attrs and attrs['face'].lower() in self.font_list:
                face = attrs.get('face').lower()
                self.pdf.set_font(face)
                self.font_face = face
            if 'size' in attrs:
                face = attrs.get('size')
                self.pdf.set_font('', size)
                self.font_size = size
        if tag=='table':
            self.table = dict([(k.lower(), v) for k,v in attrs.items()])
            if not 'width' in self.table:
                self.table['width'] = '100%'
            if self.table['width'][-1]=='%':
                w = self.pdf.w - self.pdf.r_margin - self.pdf.l_margin
                w *= int(self.table['width'][:-1])/100.0
                self.table_offset = (self.pdf.w-w)/2.0
            self.table_col_width = []
            self.theader_out = self.tfooter_out = False
            self.theader = []
            self.tfooter = []
            self.thead = None
            self.tfoot = None
            self.pdf.ln()
        if tag=='tr':
            self.tr = dict([(k.lower(), v) for k,v in attrs.items()])
            self.table_col_index = 0
            self.pdf.set_x(self.table_offset)
        if tag=='td':
            self.td = dict([(k.lower(), v) for k,v in attrs.items()])
        if tag=='th':
            self.td = dict([(k.lower(), v) for k,v in attrs.items()])
            self.th = True
            if self.td['width']:
                self.table_col_width.append(self.td['width'])
        if tag=='thead':
            self.thead = {}
        if tag=='tfoot':
            self.tfoot = {}
        if tag=='img':
            if 'src' in attrs:
                x = self.pdf.get_x()
                y = self.pdf.get_y()
                w = px2mm(attrs.get('width', 0))
                h = px2mm(attrs.get('height',0))
                if self.align and self.align[0].upper() == 'C':
                    x = (self.pdf.w-x)/2.0 - w/2.0
                self.pdf.image(self.image_map(attrs['src']),
                               x, y, w, h, link=self.href)
                self.pdf.set_x(x+w)
                self.pdf.set_y(y+h)
        if tag=='b' or tag=='i' or tag=='u':
            self.set_style(tag, True)
        if tag=='center':
            self.align = 'Center'

    def handle_endtag(self, tag):
        #Closing tag
        if DEBUG: print "ENDTAG", tag
        if tag=='h1' or tag=='h2' or tag=='h3' or tag=='h4':
            self.pdf.ln(6)
            self.set_font()
            self.set_style()
            self.align = None
        if tag=='pre':
            self.pdf.set_font(self.font or 'Times','',12)
            self.pdf.set_font_size(12)
            self.pre=False
        if tag=='blockquote':
            self.set_text_color(0,0,0)
            self.pdf.ln(3)
        if tag=='strong':
            tag='b'
        if tag=='em':
            tag='i'
        if tag=='b' or tag=='i' or tag=='u':
            self.set_style(tag, False)
        if tag=='a':
            self.href=''
        if tag=='p':
            self.align=''
        if tag in ('ul', 'ol'):
            self.indent-=1
            self.bullet.pop()
        if tag=='table':
            if not self.tfooter_out:
                self.output_table_footer()
            self.table = None
            self.th = False
            self.theader = None
            self.tfooter = None
            self.pdf.ln()
        if tag=='thead':
            self.thead = None
        if tag=='tfoot':
            self.tfoot = None
        if tag=='tbody':
            # draw a line separator between table bodies
            self.pdf.set_x(self.table_offset)
            self.output_table_sep()
        if tag=='tr':
            h = self.table_h
            if self.tfoot is None:
                self.pdf.ln(h)
            self.tr = None
        if tag=='td' or tag=='th':
            if self.th:
                if DEBUG: print "revert style"
                self.set_style('B', False) # revert style
            self.table_col_index += int(self.td.get('colspan','1'))
            self.td = None
            self.th = False
        if tag=='font':
            if self.color:
                self.pdf.set_text_color(0,0,0)
                self.color = None
            if self.font:
                self.SetFont('Times','',12)
                self.font = None
        if tag=='center':
            self.align = None

    def set_font(self, face=None, size=None):
        if face:
            self.font_face = face
        if size:
            self.font_size = size
            self.h = size / 72.0*25.4
            if DEBUG: print "H", self.h
        self.pdf.set_font(self.font_face or 'times','',12)
        self.pdf.set_font_size(self.font_size or 12)
        self.set_style('u', False)
        self.set_style('b', False)
        self.set_style('i', False)
        self.set_text_color()

    def set_style(self, tag=None, enable=None):
        #Modify style and select corresponding font
        if tag:
            t = self.style.get(tag.lower())
            self.style[tag.lower()] = enable
        style=''
        for s in ('b','i','u'):
            if self.style.get(s):
                style+=s
        if DEBUG: print "SET_FONT_STYLE", style
        self.pdf.set_font('',style)

    def set_text_color(self, r=None, g=0, b=0):
        if r is None:
            self.pdf.set_text_color(self.r,self.g,self.b)
        else:
            self.pdf.set_text_color(r, g, b)
            self.r = r
            self.g = g
            self.b = b

    def put_link(self, url, txt):
        #Put a hyperlink
        self.set_text_color(0,0,255)
        self.set_style('u', True)
        self.pdf.write(5,txt,url)
        self.set_style('u', False)
        self.set_text_color(0)

    def put_line(self):
        self.pdf.ln(2)
        self.pdf.line(self.pdf.get_x(),self.pdf.get_y(),self.pdf.get_x()+187,self.pdf.get_y())
        self.pdf.ln(3)

class HTMLMixin():
    def write_html(self, text, image_map=lambda x:x):
        "Parse HTML and convert it to PDF"
        h2p = HTML2FPDF(self,image_map=image_map)
        h2p.feed(text)

if __name__=='__main__':
    html="""
<H1 align="center">html2fpdf</H1>
<h2>Basic usage</h2>
<p>You can now easily print text mixing different
styles : <B>bold</B>, <I>italic</I>, <U>underlined</U>, or
<B><I><U>all at once</U></I></B>!<BR>You can also insert links
on text, such as <A HREF="http://www.fpdf.org">www.fpdf.org</A>,
or on an image: click on the logo.<br>
<center>
<A HREF="http://www.fpdf.org"><img src="tutorial/logo.png" width="104" height="71"></A>
</center>
<h3>Sample List</h3>
<ul><li>option 1</li>
<ol><li>option 2</li></ol>
<li>option 3</li></ul>

<table border="0" align="center" width="50%">
<thead><tr><th width="30%">Header 1</th><th width="70%">header 2</th></tr></thead>
<tbody>
<tr><td>cell 1</td><td>cell 2</td></tr>
<tr><td>cell 2</td><td>cell 3</td></tr>
</tbody>
</table>


<table border="1">
<thead><tr bgcolor="#A0A0A0"><th width="30%">Header 1</th><th width="70%">header 2</th></tr></thead>
<tfoot><tr bgcolor="#E0E0E0"><td>footer 1</td><td>footer 2</td></tr></tfoot>
<tbody>
<tr><td>cell 1</td><td>cell 2</td></tr>
<tr>
<td width="30%">cell 1</td><td width="70%" bgcolor="#D0D0FF" align='right'>cell 2</td>
</tr>
</tbody>
<tbody><tr><td colspan="2">cell spanned</td></tr></tbody>
<tbody>
""" + """<tr bgcolor="#F0F0F0">
<td>cell 3</td><td>cell 4</td>
</tr><tr bgcolor="#FFFFFF">
<td>cell 5</td><td>cell 6</td>
</tr>""" * 200 + """
</tbody>
</table>
"""

    class MyFPDF(FPDF, HTMLMixin):
        def header(self):
            self.image('tutorial/logo_pb.png',10,8,33)
            self.set_font('Arial','B',15)
            self.cell(80)
            self.cell(30,10,'Title',1,0,'C')
            self.ln(20)

        def footer(self):
            self.set_y(-15)
            self.set_font('Arial','I',8)
            txt = 'Page %s of %s' % (self.page_no(), self.alias_nb_pages())
            self.cell(0,10,txt,0,0,'C')

    pdf=MyFPDF()
    #First page
    pdf.add_page()
    pdf.write_html(html)
    pdf.output('html.pdf','F')

    import os
    os.system("evince html.pdf")

Added gluon/contrib/pyfpdf/template.py version [8c2f756bd0].






















































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: iso-8859-1 -*-

"PDF Template Helper for FPDF.py"

__author__ = "Mariano Reingart <reingart@gmail.com>"
__copyright__ = "Copyright (C) 2010 Mariano Reingart"
__license__ = "LGPL 3.0"

import sys,os,csv
from fpdf import FPDF

def rgb(col):
    return (col // 65536), (col // 256 % 256), (col% 256)

class Template:
    def __init__(self, infile=None, elements=None, format='A4', orientation='portrait',
                 title='', author='', subject='', creator='', keywords=''):
        if elements:
            self.elements = dict([(v['name'].lower(),v) for v in elements])
        self.handlers = {'T': self.text, 'L': self.line, 'I': self.image,
                         'B': self.rect, 'BC': self.barcode, }
        self.pg_no = 0
        self.texts = {}
        pdf = self.pdf = FPDF(format=format,orientation=orientation, unit="mm")
        pdf.set_title(title)
        pdf.set_author(author)
        pdf.set_creator(creator)
        pdf.set_subject(subject)
        pdf.set_keywords(keywords)

    def parse_csv(self, infile, delimiter=",", decimal_sep="."):
        "Parse template format csv file and create elements dict"
        keys = ('name','type','x1','y1','x2','y2','font','size',
            'bold','italic','underline','foreground','background',
            'align','text','priority')
        self.elements = {}
        f = open(infile, 'rb')
        try:
            for row in csv.reader(f, delimiter=delimiter):
                kargs = {}
                for i,v in enumerate(row):
                    if not v.startswith("'") and decimal_sep!=".":
                        v = v.replace(decimal_sep,".")
                    else:
                        v = v
                    if v=='':
                        v = None
                    else:
                        v = eval(v.strip())
                    kargs[keys[i]] = v
                self.elements[kargs['name'].lower()] = kargs
        finally:
            f.close()

    def add_page(self):
        self.pg_no += 1
        self.texts[self.pg_no] = {}

    def __setitem__(self, name, value):
        if name.lower() in self.elements:
            if isinstance(value,unicode):
                value = value.encode("latin1","ignore")
            else:
                value = str(value)
            self.texts[self.pg_no][name.lower()] = value

    # setitem shortcut (may be further extended)
    set = __setitem__

    def __getitem__(self, name):
        if name.lower() in self.elements:
            return self.texts[self.pg_no].get(name.lower(), self.elements[name.lower()]['text'])

    def split_multicell(self, text, element_name):
        "Divide (\n) a string using a given element width"
        pdf = self.pdf
        element = self.elements[element_name.lower()]
        style = ""
        if element['bold']: style += "B"
        if element['italic']: style += "I"
        if element['underline']: style += "U"
        pdf.set_font(element['font'],style,element['size'])
        align = {'L':'L','R':'R','I':'L','D':'R','C':'C','':''}.get(element['align']) # D/I in spanish
        if isinstance(text, unicode):
            text = text.encode("latin1","ignore")
        else:
            text = str(text)
        return pdf.multi_cell(w=element['x2']-element['x1'],
                             h=element['y2']-element['y1'],
                             txt=text,align=align,split_only=True)

    def render(self, outfile, dest="F"):
        pdf = self.pdf
        for pg in range(1, self.pg_no+1):
            pdf.add_page()
            pdf.set_font('Arial','B',16)
            pdf.set_auto_page_break(False,margin=0)

            for element in sorted(self.elements.values(),key=lambda x: x['priority']):
                #print "dib",element['type'], element['name'], element['x1'], element['y1'], element['x2'], element['y2']
                element = element.copy()
                element['text'] = self.texts[pg].get(element['name'].lower(), element['text'])
                if 'rotate' in element:
                    pdf.rotate(element['rotate'], element['x1'], element['y1'])
                self.handlers[element['type'].upper()](pdf, **element)
                if 'rotate' in element:
                    pdf.rotate(0)

        return pdf.output(outfile, dest)

    def text(self, pdf, x1=0, y1=0, x2=0, y2=0, text='', font="arial", size=10,
             bold=False, italic=False, underline=False, align="",
             foreground=0, backgroud=65535,
             *args, **kwargs):
        if text:
            if pdf.text_color!=rgb(foreground):
                pdf.set_text_color(*rgb(foreground))
            if pdf.fill_color!=rgb(backgroud):
                pdf.set_fill_color(*rgb(backgroud))

            font = font.strip().lower()
            if font == 'arial black':
                font = 'arial'
            style = ""
            for tag in 'B', 'I', 'U':
                if (text.startswith("<%s>" % tag) and text.endswith("</%s>" %tag)):
                    text = text[3:-4]
                    style += tag
            if bold: style += "B"
            if italic: style += "I"
            if underline: style += "U"
            align = {'L':'L','R':'R','I':'L','D':'R','C':'C','':''}.get(align) # D/I in spanish
            pdf.set_font(font,style,size)
            ##m_k = 72 / 2.54
            ##h = (size/m_k)
            pdf.set_xy(x1,y1)
            pdf.cell(w=x2-x1,h=y2-y1,txt=text,border=0,ln=0,align=align)
            #pdf.Text(x=x1,y=y1,txt=text)

    def line(self, pdf, x1=0, y1=0, x2=0, y2=0, size=0, foreground=0, *args, **kwargs):
        if pdf.draw_color!=rgb(foreground):
            #print "SetDrawColor", hex(foreground)
            pdf.set_draw_color(*rgb(foreground))
        #print "SetLineWidth", size
        pdf.set_line_width(size)
        pdf.line(x1, y1, x2, y2)

    def rect(self, pdf, x1=0, y1=0, x2=0, y2=0, size=0, foreground=0, backgroud=65535, *args, **kwargs):
        if pdf.draw_color!=rgb(foreground):
            pdf.set_draw_color(*rgb(foreground))
        if pdf.fill_color!=rgb(backgroud):
            pdf.set_fill_color(*rgb(backgroud))
        pdf.set_line_width(size)
        pdf.rect(x1, y1, x2-x1, y2-y1)

    def image(self, pdf, x1=0, y1=0, x2=0, y2=0, text='', *args,**kwargs):
        pdf.image(text,x1,y1,w=x2-x1,h=y2-y1,type='',link='')

    def barcode(self, pdf, x1=0, y1=0, x2=0, y2=0, text='', font="arial", size=1,
             foreground=0, *args, **kwargs):
        if pdf.draw_color!=rgb(foreground):
            pdf.set_draw_color(*rgb(foreground))
        font = font.lower().strip()
        if font == 'interleaved 2of5 nt':
            pdf.interleaved2of5(text,x1,y1,w=size,h=y2-y1)


if __name__ == "__main__":

    # generate sample invoice (according Argentina's regulations)

    import random
    from decimal import Decimal

    f = Template(format="A4",
             title="Sample Invoice", author="Sample Company",
             subject="Sample Customer", keywords="Electronic TAX Invoice")
    f.parse_csv(infile="invoice.csv", delimiter=";", decimal_sep=",")

    detail = "Lorem ipsum dolor sit amet, consectetur. " * 30
    items = []
    for i in range(1, 30):
        ds = "Sample product %s" % i
        qty = random.randint(1,10)
        price = round(random.random()*100,3)
        code = "%s%s%02d" % (chr(random.randint(65,90)), chr(random.randint(65,90)),i)
        items.append(dict(code=code, unit='u',
                          qty=qty, price=price,
                          amount=qty*price,
                          ds="%s: %s" % (i,ds)))

    # divide and count lines
    lines = 0
    li_items = []
    for it in items:
        qty = it['qty']
        code = it['code']
        unit = it['unit']
        for ds in f.split_multicell(it['ds'], 'item_description01'):
            # add item description line (without price nor amount)
            li_items.append(dict(code=code, ds=ds, qty=qty, unit=unit, price=None, amount=None))
            # clean qty and code (show only at first)
            unit = qty = code = None
        # set last item line price and amount
        li_items[-1].update(amount = it['amount'],
                            price = it['price'])

    obs="\n<U>Detail:</U>\n\n" + detail
    for ds in f.split_multicell(obs, 'item_description01'):
        li_items.append(dict(code=code, ds=ds, qty=qty, unit=unit, price=None, amount=None))

    # calculate pages:
    lines = len(li_items)
    max_lines_per_page = 24
    pages = lines / (max_lines_per_page - 1)
    if lines % (max_lines_per_page - 1): pages = pages + 1

    # completo campos y hojas
    for page in range(1, pages+1):
        f.add_page()
        f['page'] = 'Page %s of %s' % (page, pages)
        if pages>1 and page<pages:
            s = 'Continues on page %s' % (page+1)
        else:
            s = ''
        f['item_description%02d' % (max_lines_per_page+1)] = s

        f["company_name"] = "Sample Company"
        f["company_logo"] = "tutorial/logo.png"
        f["company_header1"] = "Some Address - somewhere -"
        f["company_header2"] = "http://www.example.com"
        f["company_footer1"] = "Tax Code ..."
        f["company_footer2"] = "Tax/VAT ID ..."
        f['number'] = '0001-00001234'
        f['issue_date'] = '2010-09-10'
        f['due_date'] = '2099-09-10'
        f['customer_name'] = "Sample Client"
        f['customer_address'] = "Siempreviva 1234"

        # print line item...
        li = 0
        k = 0
        total = Decimal("0.00")
        for it in li_items:
            k = k + 1
            if k > page * (max_lines_per_page - 1):
                break
            if it['amount']:
                total += Decimal("%.6f" % it['amount'])
            if k > (page - 1) * (max_lines_per_page - 1):
                li += 1
                if it['qty'] is not None:
                    f['item_quantity%02d' % li] = it['qty']
                if it['code'] is not None:
                    f['item_code%02d' % li] = it['code']
                if it['unit'] is not None:
                    f['item_unit%02d' % li] = it['unit']
                f['item_description%02d' % li] = it['ds']
                if it['price'] is not None:
                    f['item_price%02d' % li] = "%0.3f" % it['price']
                if it['amount'] is not None:
                    f['item_amount%02d' % li] = "%0.2f" % it['amount']

        if pages == page:
            f['net'] = "%0.2f" % (total/Decimal("1.21"))
            f['vat'] = "%0.2f" % (total*(1-1/Decimal("1.21")))
            f['total_label'] = 'Total:'
        else:
            f['total_label'] = 'SubTotal:'
        f['total'] = "%0.2f" % total

    f.render("./invoice.pdf")
    if sys.platform.startswith("linux"):
        os.system("evince ./invoice.pdf")
    else:
        os.system("./invoice.pdf")

Added gluon/contrib/pymysql/LICENSE version [723756e2ec].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Copyright (c) 2010 PyMySQL contributors

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.

Added gluon/contrib/pymysql/README version [df39bff948].






































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
====================
PyMySQL Installation
====================

.. contents::
..
   This package contains a pure-Python MySQL client library.
   Documentation on the MySQL client/server protocol can be found here:
   http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol
   If you would like to run the test suite, create a ~/.my.cnf file and
   a database called "test_pymysql". The goal of pymysql is to be a drop-in
   replacement for MySQLdb and work on CPython 2.3+, Jython, IronPython, PyPy
   and Python 3. We test for compatibility by simply changing the import
   statements in the Django MySQL backend and running its unit tests as well
   as running it against the MySQLdb and myconnpy unit tests.

Requirements
-------------

+ Python 2.4 or higher

 * http://www.python.org/
 
 * 2.6 is the primary test environment.

* MySQL 4.1 or higher
    
 * protocol41 support, experimental 4.0 support

Installation
------------

# easy_install pymysql
# ... or ...
# python setup.py install


Added gluon/contrib/pymysql/__init__.py version [78c4ae0f0c].




































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
'''
PyMySQL: A pure-Python drop-in replacement for MySQLdb.

Copyright (c) 2010 PyMySQL contributors

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.

'''

VERSION = (0, 4, None)

from constants import FIELD_TYPE
from converters import escape_dict, escape_sequence, escape_string
from err import Warning, Error, InterfaceError, DataError, \
     DatabaseError, OperationalError, IntegrityError, InternalError, \
     NotSupportedError, ProgrammingError
from times import Date, Time, Timestamp, \
    DateFromTicks, TimeFromTicks, TimestampFromTicks

import sys

try:
    frozenset
except NameError:
    from sets import ImmutableSet as frozenset
    try:
        from sets import BaseSet as set
    except ImportError:
        from sets import Set as set

threadsafety = 1
apilevel = "2.0"
paramstyle = "format"

class DBAPISet(frozenset):


    def __ne__(self, other):
        if isinstance(other, set):
            return super(DBAPISet, self).__ne__(self, other)
        else:
            return other not in self

    def __eq__(self, other):
        if isinstance(other, frozenset):
            return frozenset.__eq__(self, other)
        else:
            return other in self

    def __hash__(self):
        return frozenset.__hash__(self)


STRING    = DBAPISet([FIELD_TYPE.ENUM, FIELD_TYPE.STRING,
                     FIELD_TYPE.VAR_STRING])
BINARY    = DBAPISet([FIELD_TYPE.BLOB, FIELD_TYPE.LONG_BLOB,
                     FIELD_TYPE.MEDIUM_BLOB, FIELD_TYPE.TINY_BLOB])
NUMBER    = DBAPISet([FIELD_TYPE.DECIMAL, FIELD_TYPE.DOUBLE, FIELD_TYPE.FLOAT,
                     FIELD_TYPE.INT24, FIELD_TYPE.LONG, FIELD_TYPE.LONGLONG,
                     FIELD_TYPE.TINY, FIELD_TYPE.YEAR])
DATE      = DBAPISet([FIELD_TYPE.DATE, FIELD_TYPE.NEWDATE])
TIME      = DBAPISet([FIELD_TYPE.TIME])
TIMESTAMP = DBAPISet([FIELD_TYPE.TIMESTAMP, FIELD_TYPE.DATETIME])
DATETIME  = TIMESTAMP
ROWID     = DBAPISet()

def Binary(x):
    """Return x as a binary type."""
    return str(x)

def Connect(*args, **kwargs):
    """
    Connect to the database; see connections.Connection.__init__() for
    more information.
    """
    from connections import Connection
    return Connection(*args, **kwargs)

def get_client_info():  # for MySQLdb compatibility
  return '%s.%s.%s' % VERSION

connect = Connection = Connect

# we include a doctored version_info here for MySQLdb compatibility
version_info = (1,2,2,"final",0)

NULL = "NULL"

__version__ = get_client_info()

def thread_safe():
    return True # match MySQLdb.thread_safe()

def install_as_MySQLdb():
    """
    After this function is called, any application that imports MySQLdb or
    _mysql will unwittingly actually use 
    """
    sys.modules["MySQLdb"] = sys.modules["_mysql"] = sys.modules["pymysql"]

__all__ = [
    'BINARY', 'Binary', 'Connect', 'Connection', 'DATE', 'Date',
    'Time', 'Timestamp', 'DateFromTicks', 'TimeFromTicks', 'TimestampFromTicks',
    'DataError', 'DatabaseError', 'Error', 'FIELD_TYPE', 'IntegrityError',
    'InterfaceError', 'InternalError', 'MySQLError', 'NULL', 'NUMBER',
    'NotSupportedError', 'DBAPISet', 'OperationalError', 'ProgrammingError',
    'ROWID', 'STRING', 'TIME', 'TIMESTAMP', 'Warning', 'apilevel', 'connect',
    'connections', 'constants', 'converters', 'cursors', 'debug', 'escape',
    'escape_dict', 'escape_sequence', 'escape_string', 'get_client_info',
    'paramstyle', 'string_literal', 'threadsafety', 'version_info',

    "install_as_MySQLdb",

    "NULL","__version__",
    ]

Added gluon/contrib/pymysql/charset.py version [52fa72dd4e].















































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
MBLENGTH = {
        8:1,
        33:3,
        88:2,
        91:2
        }

class Charset:
    def __init__(self, id, name, collation, is_default):
        self.id, self.name, self.collation = id, name, collation
        self.is_default = is_default == 'Yes'

class Charsets:
    def __init__(self):
        self._by_id = {}

    def add(self, c):
        self._by_id[c.id] = c

    def by_id(self, id):
        return self._by_id[id]

    def by_name(self, name):
        for c in self._by_id.values():
            if c.name == name and c.is_default:
                return c

_charsets = Charsets()
"""
Generated with:

mysql -N -s -e "select id, character_set_name, collation_name, is_default
from information_schema.collations order by id;" | python -c "import sys
for l in sys.stdin.readlines():
        id, name, collation, is_default  = l.split(chr(9))
        print '_charsets.add(Charset(%s, \'%s\', \'%s\', \'%s\'))' \
                % (id, name, collation, is_default.strip())
"

"""
_charsets.add(Charset(1, 'big5', 'big5_chinese_ci', 'Yes'))
_charsets.add(Charset(2, 'latin2', 'latin2_czech_cs', ''))
_charsets.add(Charset(3, 'dec8', 'dec8_swedish_ci', 'Yes'))
_charsets.add(Charset(4, 'cp850', 'cp850_general_ci', 'Yes'))
_charsets.add(Charset(5, 'latin1', 'latin1_german1_ci', ''))
_charsets.add(Charset(6, 'hp8', 'hp8_english_ci', 'Yes'))
_charsets.add(Charset(7, 'koi8r', 'koi8r_general_ci', 'Yes'))
_charsets.add(Charset(8, 'latin1', 'latin1_swedish_ci', 'Yes'))
_charsets.add(Charset(9, 'latin2', 'latin2_general_ci', 'Yes'))
_charsets.add(Charset(10, 'swe7', 'swe7_swedish_ci', 'Yes'))
_charsets.add(Charset(11, 'ascii', 'ascii_general_ci', 'Yes'))
_charsets.add(Charset(12, 'ujis', 'ujis_japanese_ci', 'Yes'))
_charsets.add(Charset(13, 'sjis', 'sjis_japanese_ci', 'Yes'))
_charsets.add(Charset(14, 'cp1251', 'cp1251_bulgarian_ci', ''))
_charsets.add(Charset(15, 'latin1', 'latin1_danish_ci', ''))
_charsets.add(Charset(16, 'hebrew', 'hebrew_general_ci', 'Yes'))
_charsets.add(Charset(18, 'tis620', 'tis620_thai_ci', 'Yes'))
_charsets.add(Charset(19, 'euckr', 'euckr_korean_ci', 'Yes'))
_charsets.add(Charset(20, 'latin7', 'latin7_estonian_cs', ''))
_charsets.add(Charset(21, 'latin2', 'latin2_hungarian_ci', ''))
_charsets.add(Charset(22, 'koi8u', 'koi8u_general_ci', 'Yes'))
_charsets.add(Charset(23, 'cp1251', 'cp1251_ukrainian_ci', ''))
_charsets.add(Charset(24, 'gb2312', 'gb2312_chinese_ci', 'Yes'))
_charsets.add(Charset(25, 'greek', 'greek_general_ci', 'Yes'))
_charsets.add(Charset(26, 'cp1250', 'cp1250_general_ci', 'Yes'))
_charsets.add(Charset(27, 'latin2', 'latin2_croatian_ci', ''))
_charsets.add(Charset(28, 'gbk', 'gbk_chinese_ci', 'Yes'))
_charsets.add(Charset(29, 'cp1257', 'cp1257_lithuanian_ci', ''))
_charsets.add(Charset(30, 'latin5', 'latin5_turkish_ci', 'Yes'))
_charsets.add(Charset(31, 'latin1', 'latin1_german2_ci', ''))
_charsets.add(Charset(32, 'armscii8', 'armscii8_general_ci', 'Yes'))
_charsets.add(Charset(33, 'utf8', 'utf8_general_ci', 'Yes'))
_charsets.add(Charset(34, 'cp1250', 'cp1250_czech_cs', ''))
_charsets.add(Charset(35, 'ucs2', 'ucs2_general_ci', 'Yes'))
_charsets.add(Charset(36, 'cp866', 'cp866_general_ci', 'Yes'))
_charsets.add(Charset(37, 'keybcs2', 'keybcs2_general_ci', 'Yes'))
_charsets.add(Charset(38, 'macce', 'macce_general_ci', 'Yes'))
_charsets.add(Charset(39, 'macroman', 'macroman_general_ci', 'Yes'))
_charsets.add(Charset(40, 'cp852', 'cp852_general_ci', 'Yes'))
_charsets.add(Charset(41, 'latin7', 'latin7_general_ci', 'Yes'))
_charsets.add(Charset(42, 'latin7', 'latin7_general_cs', ''))
_charsets.add(Charset(43, 'macce', 'macce_bin', ''))
_charsets.add(Charset(44, 'cp1250', 'cp1250_croatian_ci', ''))
_charsets.add(Charset(47, 'latin1', 'latin1_bin', ''))
_charsets.add(Charset(48, 'latin1', 'latin1_general_ci', ''))
_charsets.add(Charset(49, 'latin1', 'latin1_general_cs', ''))
_charsets.add(Charset(50, 'cp1251', 'cp1251_bin', ''))
_charsets.add(Charset(51, 'cp1251', 'cp1251_general_ci', 'Yes'))
_charsets.add(Charset(52, 'cp1251', 'cp1251_general_cs', ''))
_charsets.add(Charset(53, 'macroman', 'macroman_bin', ''))
_charsets.add(Charset(57, 'cp1256', 'cp1256_general_ci', 'Yes'))
_charsets.add(Charset(58, 'cp1257', 'cp1257_bin', ''))
_charsets.add(Charset(59, 'cp1257', 'cp1257_general_ci', 'Yes'))
_charsets.add(Charset(63, 'binary', 'binary', 'Yes'))
_charsets.add(Charset(64, 'armscii8', 'armscii8_bin', ''))
_charsets.add(Charset(65, 'ascii', 'ascii_bin', ''))
_charsets.add(Charset(66, 'cp1250', 'cp1250_bin', ''))
_charsets.add(Charset(67, 'cp1256', 'cp1256_bin', ''))
_charsets.add(Charset(68, 'cp866', 'cp866_bin', ''))
_charsets.add(Charset(69, 'dec8', 'dec8_bin', ''))
_charsets.add(Charset(70, 'greek', 'greek_bin', ''))
_charsets.add(Charset(71, 'hebrew', 'hebrew_bin', ''))
_charsets.add(Charset(72, 'hp8', 'hp8_bin', ''))
_charsets.add(Charset(73, 'keybcs2', 'keybcs2_bin', ''))
_charsets.add(Charset(74, 'koi8r', 'koi8r_bin', ''))
_charsets.add(Charset(75, 'koi8u', 'koi8u_bin', ''))
_charsets.add(Charset(77, 'latin2', 'latin2_bin', ''))
_charsets.add(Charset(78, 'latin5', 'latin5_bin', ''))
_charsets.add(Charset(79, 'latin7', 'latin7_bin', ''))
_charsets.add(Charset(80, 'cp850', 'cp850_bin', ''))
_charsets.add(Charset(81, 'cp852', 'cp852_bin', ''))
_charsets.add(Charset(82, 'swe7', 'swe7_bin', ''))
_charsets.add(Charset(83, 'utf8', 'utf8_bin', ''))
_charsets.add(Charset(84, 'big5', 'big5_bin', ''))
_charsets.add(Charset(85, 'euckr', 'euckr_bin', ''))
_charsets.add(Charset(86, 'gb2312', 'gb2312_bin', ''))
_charsets.add(Charset(87, 'gbk', 'gbk_bin', ''))
_charsets.add(Charset(88, 'sjis', 'sjis_bin', ''))
_charsets.add(Charset(89, 'tis620', 'tis620_bin', ''))
_charsets.add(Charset(90, 'ucs2', 'ucs2_bin', ''))
_charsets.add(Charset(91, 'ujis', 'ujis_bin', ''))
_charsets.add(Charset(92, 'geostd8', 'geostd8_general_ci', 'Yes'))
_charsets.add(Charset(93, 'geostd8', 'geostd8_bin', ''))
_charsets.add(Charset(94, 'latin1', 'latin1_spanish_ci', ''))
_charsets.add(Charset(95, 'cp932', 'cp932_japanese_ci', 'Yes'))
_charsets.add(Charset(96, 'cp932', 'cp932_bin', ''))
_charsets.add(Charset(97, 'eucjpms', 'eucjpms_japanese_ci', 'Yes'))
_charsets.add(Charset(98, 'eucjpms', 'eucjpms_bin', ''))
_charsets.add(Charset(99, 'cp1250', 'cp1250_polish_ci', ''))
_charsets.add(Charset(128, 'ucs2', 'ucs2_unicode_ci', ''))
_charsets.add(Charset(129, 'ucs2', 'ucs2_icelandic_ci', ''))
_charsets.add(Charset(130, 'ucs2', 'ucs2_latvian_ci', ''))
_charsets.add(Charset(131, 'ucs2', 'ucs2_romanian_ci', ''))
_charsets.add(Charset(132, 'ucs2', 'ucs2_slovenian_ci', ''))
_charsets.add(Charset(133, 'ucs2', 'ucs2_polish_ci', ''))
_charsets.add(Charset(134, 'ucs2', 'ucs2_estonian_ci', ''))
_charsets.add(Charset(135, 'ucs2', 'ucs2_spanish_ci', ''))
_charsets.add(Charset(136, 'ucs2', 'ucs2_swedish_ci', ''))
_charsets.add(Charset(137, 'ucs2', 'ucs2_turkish_ci', ''))
_charsets.add(Charset(138, 'ucs2', 'ucs2_czech_ci', ''))
_charsets.add(Charset(139, 'ucs2', 'ucs2_danish_ci', ''))
_charsets.add(Charset(140, 'ucs2', 'ucs2_lithuanian_ci', ''))
_charsets.add(Charset(141, 'ucs2', 'ucs2_slovak_ci', ''))
_charsets.add(Charset(142, 'ucs2', 'ucs2_spanish2_ci', ''))
_charsets.add(Charset(143, 'ucs2', 'ucs2_roman_ci', ''))
_charsets.add(Charset(144, 'ucs2', 'ucs2_persian_ci', ''))
_charsets.add(Charset(145, 'ucs2', 'ucs2_esperanto_ci', ''))
_charsets.add(Charset(146, 'ucs2', 'ucs2_hungarian_ci', ''))
_charsets.add(Charset(192, 'utf8', 'utf8_unicode_ci', ''))
_charsets.add(Charset(193, 'utf8', 'utf8_icelandic_ci', ''))
_charsets.add(Charset(194, 'utf8', 'utf8_latvian_ci', ''))
_charsets.add(Charset(195, 'utf8', 'utf8_romanian_ci', ''))
_charsets.add(Charset(196, 'utf8', 'utf8_slovenian_ci', ''))
_charsets.add(Charset(197, 'utf8', 'utf8_polish_ci', ''))
_charsets.add(Charset(198, 'utf8', 'utf8_estonian_ci', ''))
_charsets.add(Charset(199, 'utf8', 'utf8_spanish_ci', ''))
_charsets.add(Charset(200, 'utf8', 'utf8_swedish_ci', ''))
_charsets.add(Charset(201, 'utf8', 'utf8_turkish_ci', ''))
_charsets.add(Charset(202, 'utf8', 'utf8_czech_ci', ''))
_charsets.add(Charset(203, 'utf8', 'utf8_danish_ci', ''))
_charsets.add(Charset(204, 'utf8', 'utf8_lithuanian_ci', ''))
_charsets.add(Charset(205, 'utf8', 'utf8_slovak_ci', ''))
_charsets.add(Charset(206, 'utf8', 'utf8_spanish2_ci', ''))
_charsets.add(Charset(207, 'utf8', 'utf8_roman_ci', ''))
_charsets.add(Charset(208, 'utf8', 'utf8_persian_ci', ''))
_charsets.add(Charset(209, 'utf8', 'utf8_esperanto_ci', ''))
_charsets.add(Charset(210, 'utf8', 'utf8_hungarian_ci', ''))

def charset_by_name(name):
    return _charsets.by_name(name)

def charset_by_id(id):
    return _charsets.by_id(id)

Added gluon/contrib/pymysql/connections.py version [450fe7200b].





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Python implementation of the MySQL client-server protocol
#   http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol

try:
    import hashlib
    sha_new = lambda *args, **kwargs: hashlib.new("sha1", *args, **kwargs)
except ImportError:
    import sha
    sha_new = sha.new

import socket
try:
    import ssl
    SSL_ENABLED = True
except ImportError:
    SSL_ENABLED = False

import struct
import sys
import os
import ConfigParser

try:
    import cStringIO as StringIO
except ImportError:
    import StringIO

from charset import MBLENGTH, charset_by_name, charset_by_id
from cursors import Cursor
from constants import FIELD_TYPE, FLAG
from constants import SERVER_STATUS
from constants.CLIENT import *
from constants.COMMAND import *
from util import join_bytes, byte2int, int2byte
from converters import escape_item, encoders, decoders
from err import raise_mysql_exception, Warning, Error, \
     InterfaceError, DataError, DatabaseError, OperationalError, \
     IntegrityError, InternalError, NotSupportedError, ProgrammingError

DEBUG = False

NULL_COLUMN = 251
UNSIGNED_CHAR_COLUMN = 251
UNSIGNED_SHORT_COLUMN = 252
UNSIGNED_INT24_COLUMN = 253
UNSIGNED_INT64_COLUMN = 254
UNSIGNED_CHAR_LENGTH = 1
UNSIGNED_SHORT_LENGTH = 2
UNSIGNED_INT24_LENGTH = 3
UNSIGNED_INT64_LENGTH = 8

DEFAULT_CHARSET = 'latin1'
MAX_PACKET_LENGTH = 256*256*256-1


def dump_packet(data):
    
    def is_ascii(data):
        if byte2int(data) >= 65 and byte2int(data) <= 122: #data.isalnum():
            return data
        return '.'
    print "packet length %d" % len(data)
    print "method call[1]: %s" % sys._getframe(1).f_code.co_name
    print "method call[2]: %s" % sys._getframe(2).f_code.co_name
    print "method call[3]: %s" % sys._getframe(3).f_code.co_name
    print "method call[4]: %s" % sys._getframe(4).f_code.co_name
    print "method call[5]: %s" % sys._getframe(5).f_code.co_name
    print "-" * 88
    dump_data = [data[i:i+16] for i in xrange(len(data)) if i%16 == 0]
    for d in dump_data:
        print ' '.join(map(lambda x:"%02X" % byte2int(x), d)) + \
                '   ' * (16 - len(d)) + ' ' * 2 + \
                ' '.join(map(lambda x:"%s" % is_ascii(x), d))
    print "-" * 88
    print ""

def _scramble(password, message):
    if password == None or len(password) == 0:
        return int2byte(0)
    if DEBUG: print 'password=' + password
    stage1 = sha_new(password).digest()
    stage2 = sha_new(stage1).digest()
    s = sha_new()
    s.update(message)
    s.update(stage2)
    result = s.digest()
    return _my_crypt(result, stage1)

def _my_crypt(message1, message2):
    length = len(message1)
    result = struct.pack('B', length)
    for i in xrange(length):
        x = (struct.unpack('B', message1[i:i+1])[0] ^ \
             struct.unpack('B', message2[i:i+1])[0])
        result += struct.pack('B', x)
    return result

# old_passwords support ported from libmysql/password.c
SCRAMBLE_LENGTH_323 = 8

class RandStruct_323(object):
    def __init__(self, seed1, seed2):
        self.max_value = 0x3FFFFFFFL
        self.seed1 = seed1 % self.max_value
        self.seed2 = seed2 % self.max_value

    def my_rnd(self):
        self.seed1 = (self.seed1 * 3L + self.seed2) % self.max_value
        self.seed2 = (self.seed1 + self.seed2 + 33L) % self.max_value
        return float(self.seed1) / float(self.max_value)

def _scramble_323(password, message):
    hash_pass = _hash_password_323(password)
    hash_message = _hash_password_323(message[:SCRAMBLE_LENGTH_323])
    hash_pass_n = struct.unpack(">LL", hash_pass)
    hash_message_n = struct.unpack(">LL", hash_message)

    rand_st = RandStruct_323(hash_pass_n[0] ^ hash_message_n[0],
                             hash_pass_n[1] ^ hash_message_n[1])
    outbuf = StringIO.StringIO()
    for _ in xrange(min(SCRAMBLE_LENGTH_323, len(message))):
        outbuf.write(int2byte(int(rand_st.my_rnd() * 31) + 64))
    extra = int2byte(int(rand_st.my_rnd() * 31))
    out = outbuf.getvalue()
    outbuf = StringIO.StringIO()
    for c in out:
        outbuf.write(int2byte(byte2int(c) ^ byte2int(extra)))
    return outbuf.getvalue()

def _hash_password_323(password):
    nr = 1345345333L
    add = 7L
    nr2 = 0x12345671L

    for c in [byte2int(x) for x in password if x not in (' ', '\t')]:
        nr^= (((nr & 63)+add)*c)+ (nr << 8) & 0xFFFFFFFF
        nr2= (nr2 + ((nr2 << 8) ^ nr)) & 0xFFFFFFFF
        add= (add + c) & 0xFFFFFFFF

    r1 = nr & ((1L << 31) - 1L) # kill sign bits
    r2 = nr2 & ((1L << 31) - 1L)

    # pack
    return struct.pack(">LL", r1, r2)

def pack_int24(n):
    return struct.pack('BBB', n&0xFF, (n>>8)&0xFF, (n>>16)&0xFF)

def unpack_uint16(n):
  return struct.unpack('<H', n[0:2])[0]


# TODO: stop using bit-shifting in these functions...
# TODO: rename to "uint" to make it clear they're unsigned...
def unpack_int24(n):
    return struct.unpack('B',n[0])[0] + (struct.unpack('B', n[1])[0] << 8) +\
        (struct.unpack('B',n[2])[0] << 16)

def unpack_int32(n):
    return struct.unpack('B',n[0])[0] + (struct.unpack('B', n[1])[0] << 8) +\
        (struct.unpack('B',n[2])[0] << 16) + (struct.unpack('B', n[3])[0] << 24)

def unpack_int64(n):
    return struct.unpack('B',n[0])[0] + (struct.unpack('B', n[1])[0]<<8) +\
    (struct.unpack('B',n[2])[0] << 16) + (struct.unpack('B',n[3])[0]<<24)+\
    (struct.unpack('B',n[4])[0] << 32) + (struct.unpack('B',n[5])[0]<<40)+\
    (struct.unpack('B',n[6])[0] << 48) + (struct.unpack('B',n[7])[0]<<56)

def defaulterrorhandler(connection, cursor, errorclass, errorvalue):
    err = errorclass, errorvalue
    if DEBUG:
        raise

    if cursor:
        cursor.messages.append(err)
    else:
        connection.messages.append(err)
    del cursor
    del connection

    if not issubclass(errorclass, Error):
        raise Error(errorclass, errorvalue)
    else:
        raise errorclass, errorvalue


class MysqlPacket(object):
  """Representation of a MySQL response packet.  Reads in the packet
  from the network socket, removes packet header and provides an interface
  for reading/parsing the packet results."""

  def __init__(self, socket):
    self.__position = 0
    self.__recv_packet(socket)
    del socket

  def __recv_packet(self, socket):
    """Parse the packet header and read entire packet payload into buffer."""
    packet_header = socket.recv(4)
    while len(packet_header) < 4:
        d = socket.recv(4 - len(packet_header))
        if len(d) == 0:
            raise OperationalError(2013, "Lost connection to MySQL server during query")
        packet_header += d

    if DEBUG: dump_packet(packet_header)
    packet_length_bin = packet_header[:3]
    self.__packet_number = byte2int(packet_header[3])
    # TODO: check packet_num is correct (+1 from last packet)

    bin_length = packet_length_bin + int2byte(0)  # pad little-endian number
    bytes_to_read = struct.unpack('<I', bin_length)[0]

    payload_buff = []  # this is faster than cStringIO
    while bytes_to_read > 0:
      recv_data = socket.recv(bytes_to_read)
      if len(recv_data) == 0:
            raise OperationalError(2013, "Lost connection to MySQL server during query")
      if DEBUG: dump_packet(recv_data)
      payload_buff.append(recv_data)
      bytes_to_read -= len(recv_data)
    self.__data = join_bytes(payload_buff)

  def packet_number(self): return self.__packet_number

  def get_all_data(self): return self.__data

  def read(self, size):
    """Read the first 'size' bytes in packet and advance cursor past them."""
    result = self.peek(size)
    self.advance(size)
    return result

  def read_all(self):
    """Read all remaining data in the packet.

    (Subsequent read() or peek() will return errors.)
    """
    result = self.__data[self.__position:]
    self.__position = None  # ensure no subsequent read() or peek()
    return result

  def advance(self, length):
    """Advance the cursor in data buffer 'length' bytes."""
    new_position = self.__position + length
    if new_position < 0 or new_position > len(self.__data):
      raise Exception('Invalid advance amount (%s) for cursor.  '
                      'Position=%s' % (length, new_position))
    self.__position = new_position

  def rewind(self, position=0):
    """Set the position of the data buffer cursor to 'position'."""
    if position < 0 or position > len(self.__data):
      raise Exception("Invalid position to rewind cursor to: %s." % position)
    self.__position = position

  def peek(self, size):
    """Look at the first 'size' bytes in packet without moving cursor."""
    result = self.__data[self.__position:(self.__position+size)]
    if len(result) != size:
      error = ('Result length not requested length:\n'
               'Expected=%s.  Actual=%s.  Position: %s.  Data Length: %s'
               % (size, len(result), self.__position, len(self.__data)))
      if DEBUG:
        print error
        self.dump()
      raise AssertionError(error)
    return result

  def get_bytes(self, position, length=1):
    """Get 'length' bytes starting at 'position'.

    Position is start of payload (first four packet header bytes are not
    included) starting at index '0'.

    No error checking is done.  If requesting outside end of buffer
    an empty string (or string shorter than 'length') may be returned!
    """
    return self.__data[position:(position+length)]

  def read_length_coded_binary(self):
    """Read a 'Length Coded Binary' number from the data buffer.

    Length coded numbers can be anywhere from 1 to 9 bytes depending
    on the value of the first byte.
    """
    c = byte2int(self.read(1))
    if c == NULL_COLUMN:
      return None
    if c < UNSIGNED_CHAR_COLUMN:
      return c
    elif c == UNSIGNED_SHORT_COLUMN:
      return unpack_uint16(self.read(UNSIGNED_SHORT_LENGTH))
    elif c == UNSIGNED_INT24_COLUMN:
      return unpack_int24(self.read(UNSIGNED_INT24_LENGTH))
    elif c == UNSIGNED_INT64_COLUMN:
      # TODO: what was 'longlong'?  confirm it wasn't used?
      return unpack_int64(self.read(UNSIGNED_INT64_LENGTH))

  def read_length_coded_string(self):
    """Read a 'Length Coded String' from the data buffer.

    A 'Length Coded String' consists first of a length coded
    (unsigned, positive) integer represented in 1-9 bytes followed by
    that many bytes of binary data.  (For example "cat" would be "3cat".)
    """
    length = self.read_length_coded_binary()
    if length is None:
        return None
    return self.read(length)

  def is_ok_packet(self):
    return byte2int(self.get_bytes(0)) == 0

  def is_eof_packet(self):
    return byte2int(self.get_bytes(0)) == 254  # 'fe'

  def is_resultset_packet(self):
    field_count = byte2int(self.get_bytes(0))
    return field_count >= 1 and field_count <= 250

  def is_error_packet(self):
    return byte2int(self.get_bytes(0)) == 255

  def check_error(self):
    if self.is_error_packet():
      self.rewind()
      self.advance(1)  # field_count == error (we already know that)
      errno = unpack_uint16(self.read(2))
      if DEBUG: print "errno = %d" % errno
      raise_mysql_exception(self.__data)

  def dump(self):
    dump_packet(self.__data)


class FieldDescriptorPacket(MysqlPacket):
  """A MysqlPacket that represents a specific column's metadata in the result.

  Parsing is automatically done and the results are exported via public
  attributes on the class such as: db, table_name, name, length, type_code.
  """

  def __init__(self, *args):
    MysqlPacket.__init__(self, *args)
    self.__parse_field_descriptor()

  def __parse_field_descriptor(self):
    """Parse the 'Field Descriptor' (Metadata) packet.

    This is compatible with MySQL 4.1+ (not compatible with MySQL 4.0).
    """
    self.catalog = self.read_length_coded_string()
    self.db = self.read_length_coded_string()
    self.table_name = self.read_length_coded_string()
    self.org_table = self.read_length_coded_string()
    self.name = self.read_length_coded_string()
    self.org_name = self.read_length_coded_string()
    self.advance(1)  # non-null filler
    self.charsetnr = struct.unpack('<H', self.read(2))[0]
    self.length = struct.unpack('<I', self.read(4))[0]
    self.type_code = byte2int(self.read(1))
    self.flags = struct.unpack('<H', self.read(2))[0]
    self.scale = byte2int(self.read(1))  # "decimals"
    self.advance(2)  # filler (always 0x00)

    # 'default' is a length coded binary and is still in the buffer?
    # not used for normal result sets...

  def description(self):
    """Provides a 7-item tuple compatible with the Python PEP249 DB Spec."""
    desc = []
    desc.append(self.name)
    desc.append(self.type_code)
    desc.append(None) # TODO: display_length; should this be self.length?
    desc.append(self.get_column_length()) # 'internal_size'
    desc.append(self.get_column_length()) # 'precision'  # TODO: why!?!?
    desc.append(self.scale)

    # 'null_ok' -- can this be True/False rather than 1/0?
    #              if so just do:  desc.append(bool(self.flags % 2 == 0))
    if self.flags % 2 == 0:
      desc.append(1)
    else:
      desc.append(0)
    return tuple(desc)

  def get_column_length(self):
    if self.type_code == FIELD_TYPE.VAR_STRING:
      mblen = MBLENGTH.get(self.charsetnr, 1)
      return self.length // mblen
    return self.length

  def __str__(self):
    return ('%s %s.%s.%s, type=%s'
            % (self.__class__, self.db, self.table_name, self.name,
               self.type_code))


class Connection(object):
    """
    Representation of a socket with a mysql server.

    The proper way to get an instance of this class is to call
    connect()."""
    errorhandler = defaulterrorhandler

    def __init__(self, host="localhost", user=None, passwd="",
                 db=None, port=3306, unix_socket=None,
                 charset='', sql_mode=None,
                 read_default_file=None, conv=decoders, use_unicode=None,
                 client_flag=0, cursorclass=Cursor, init_command=None,
                 connect_timeout=None, ssl=None, read_default_group=None,
                 compress=None, named_pipe=None):
        """
        Establish a connection to the MySQL database. Accepts several
        arguments:

        host: Host where the database server is located
        user: Username to log in as
        passwd: Password to use.
        db: Database to use, None to not use a particular one.
        port: MySQL port to use, default is usually OK.
        unix_socket: Optionally, you can use a unix socket rather than TCP/IP.
        charset: Charset you want to use.
        sql_mode: Default SQL_MODE to use.
        read_default_file: Specifies  my.cnf file to read these parameters from under the [client] section.
        conv: Decoders dictionary to use instead of the default one. This is used to provide custom marshalling of types. See converters.
        use_unicode: Whether or not to default to unicode strings. This option defaults to true for Py3k.
        client_flag: Custom flags to send to MySQL. Find potential values in constants.CLIENT.
        cursorclass: Custom cursor class to use.
        init_command: Initial SQL statement to run when connection is established.
        connect_timeout: Timeout before throwing an exception when connecting.
        ssl: A dict of arguments similar to mysql_ssl_set()'s parameters. For now the capath and cipher arguments are not supported.
        read_default_group: Group to read from in the configuration file.
        compress; Not supported
        named_pipe: Not supported
        """

        if use_unicode is None and sys.version_info[0] > 2:
            use_unicode = True

        if compress or named_pipe:
            raise NotImplementedError, "compress and named_pipe arguments are not supported"

        if ssl and (ssl.has_key('capath') or ssl.has_key('cipher')):
            raise NotImplementedError, 'ssl options capath and cipher are not supported'

        self.ssl = False
        if ssl:
            if not SSL_ENABLED:
                raise NotImplementedError, "ssl module not found"
            self.ssl = True
            client_flag |= SSL
            for k in ('key', 'cert', 'ca'):
                v = None
                if ssl.has_key(k):
                    v = ssl[k]
                setattr(self, k, v)

        if read_default_group and not read_default_file:
            if sys.platform.startswith("win"):
                read_default_file = "c:\\my.ini"
            else:
                read_default_file = "/etc/my.cnf"

        if read_default_file:
            if not read_default_group:
                read_default_group = "client"

            cfg = ConfigParser.RawConfigParser()
            cfg.read(os.path.expanduser(read_default_file))

            def _config(key, default):
                try:
                    return cfg.get(read_default_group,key)
                except:
                    return default

            user = _config("user",user)
            passwd = _config("password",passwd)
            host = _config("host", host)
            db = _config("db",db)
            unix_socket = _config("socket",unix_socket)
            port = _config("port", port)
            charset = _config("default-character-set", charset)

        self.host = host
        self.port = port
        self.user = user
        self.password = passwd
        self.db = db
        self.unix_socket = unix_socket
        if charset:
            self.charset = charset
            self.use_unicode = True
        else:
            self.charset = DEFAULT_CHARSET
            self.use_unicode = False

        if use_unicode:
            self.use_unicode = use_unicode

        client_flag |= CAPABILITIES
        client_flag |= MULTI_STATEMENTS
        if self.db:
            client_flag |= CONNECT_WITH_DB
        self.client_flag = client_flag

        self.cursorclass = cursorclass
        self.connect_timeout = connect_timeout

        self._connect()

        self.messages = []
        self.set_charset(charset)
        self.encoders = encoders
        self.decoders = conv

        self._affected_rows = 0
        self.host_info = "Not connected"

        self.autocommit(False)

        if sql_mode is not None:
            c = self.cursor()
            c.execute("SET sql_mode=%s", (sql_mode,))

        self.commit()

        if init_command is not None:
            c = self.cursor()
            c.execute(init_command)

            self.commit()


    def close(self):
        ''' Send the quit message and close the socket '''
        send_data = struct.pack('<i',1) + int2byte(COM_QUIT)
        self.socket.send(send_data)
        self.socket.close()
        self.socket = None

    def autocommit(self, value):
        ''' Set whether or not to commit after every execute() '''
        try:
            self._execute_command(COM_QUERY, "SET AUTOCOMMIT = %s" % \
                                      self.escape(value))
            self.read_packet()
        except:
            exc,value,tb = sys.exc_info()
            self.errorhandler(None, exc, value)

    def commit(self):
        ''' Commit changes to stable storage '''
        try:
            self._execute_command(COM_QUERY, "COMMIT")
            self.read_packet()
        except:
            exc,value,tb = sys.exc_info()
            self.errorhandler(None, exc, value)

    def rollback(self):
        ''' Roll back the current transaction '''
        try:
            self._execute_command(COM_QUERY, "ROLLBACK")
            self.read_packet()
        except:
            exc,value,tb = sys.exc_info()
            self.errorhandler(None, exc, value)

    def escape(self, obj):
        ''' Escape whatever value you pass to it  '''
        return escape_item(obj, self.charset)

    def literal(self, obj):
        ''' Alias for escape() '''
        return escape_item(obj, self.charset)

    def cursor(self):
        ''' Create a new cursor to execute queries with '''
        return self.cursorclass(self)

    def __enter__(self):
        ''' Context manager that returns a Cursor '''
        return self.cursor()

    def __exit__(self, exc, value, traceback):
        ''' On successful exit, commit. On exception, rollback. '''
        if exc:
            self.rollback()
        else:
            self.commit()

    # The following methods are INTERNAL USE ONLY (called from Cursor)
    def query(self, sql):
        self._execute_command(COM_QUERY, sql)
        self._affected_rows = self._read_query_result()
        return self._affected_rows

    def next_result(self):
        self._affected_rows = self._read_query_result()
        return self._affected_rows

    def affected_rows(self):
        return self._affected_rows

    def kill(self, thread_id):
        arg = struct.pack('<I', thread_id)
        try:
            self._execute_command(COM_PROCESS_KILL, arg)
        except:
            exc,value,tb = sys.exc_info()
            self.errorhandler(None, exc, value)
            return
        pkt = self.read_packet()
        return pkt.is_ok_packet()

    def ping(self, reconnect=True):
        ''' Check if the server is alive '''
        try:
            self._execute_command(COM_PING, "")
        except:
            if reconnect:
                self._connect()
                return self.ping(False)
            else:
                exc,value,tb = sys.exc_info()
                self.errorhandler(None, exc, value)
                return

        pkt = self.read_packet()
        return pkt.is_ok_packet()

    def set_charset(self, charset):
        try:
            if charset:
                self._execute_command(COM_QUERY, "SET NAMES %s" %
                                      self.escape(charset))
                self.read_packet()
                self.charset = charset
        except:
            exc,value,tb = sys.exc_info()
            self.errorhandler(None, exc, value)

    def _connect(self):
        try:
            if self.unix_socket and (self.host == 'localhost' or self.host == '127.0.0.1'):
                sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
                t = sock.gettimeout()
                sock.settimeout(self.connect_timeout)
                sock.connect(self.unix_socket)
                sock.settimeout(t)
                self.host_info = "Localhost via UNIX socket"
                if DEBUG: print 'connected using unix_socket'
            else:
                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                t = sock.gettimeout()
                sock.settimeout(self.connect_timeout)
                sock.connect((self.host, self.port))
                sock.settimeout(t)
                self.host_info = "socket %s:%d" % (self.host, self.port)
                if DEBUG: print 'connected using socket'
            self.socket = sock
            self._get_server_information()
            self._request_authentication()
        except socket.error, e:
            raise OperationalError(2003, "Can't connect to MySQL server on %r (%d)" % (self.host, e.args[0]))

    def read_packet(self, packet_type=MysqlPacket):
      """Read an entire "mysql packet" in its entirety from the network
      and return a MysqlPacket type that represents the results."""

      # TODO: is socket.recv(small_number) significantly slower than
      #       socket.recv(large_number)?  if so, maybe we should buffer
      #       the socket.recv() (though that obviously makes memory management
      #       more complicated.
      packet = packet_type(self.socket)
      packet.check_error()
      return packet

    def _read_query_result(self):
        result = MySQLResult(self)
        result.read()
        self._result = result
        return result.affected_rows

    def _send_command(self, command, sql):
        #send_data = struct.pack('<i', len(sql) + 1) + command + sql
        # could probably be more efficient, at least it's correct
        if not self.socket:
            self.errorhandler(None, InterfaceError, "(0, '')")

        if isinstance(sql, unicode):
            sql = sql.encode(self.charset)

        buf = int2byte(command) + sql
        pckt_no = 0
        while len(buf) >= MAX_PACKET_LENGTH:
            header = struct.pack('<i', MAX_PACKET_LENGTH)[:-1]+int2byte(pckt_no)
            send_data = header + buf[:MAX_PACKET_LENGTH]
            self.socket.send(send_data)
            if DEBUG: dump_packet(send_data)
            buf = buf[MAX_PACKET_LENGTH:]
            pckt_no += 1
        header = struct.pack('<i', len(buf))[:-1]+int2byte(pckt_no)
        self.socket.send(header+buf)


        #sock = self.socket
        #sock.send(send_data)

        #

    def _execute_command(self, command, sql):
        self._send_command(command, sql)
        
    def _request_authentication(self):
        self._send_authentication()

    def _send_authentication(self):
        sock = self.socket
        self.client_flag |= CAPABILITIES
        if self.server_version.startswith('5'):
            self.client_flag |= MULTI_RESULTS

        if self.user is None:
            raise ValueError, "Did not specify a username"

        charset_id = charset_by_name(self.charset).id
        self.user = self.user.encode(self.charset)

        data_init = struct.pack('<i', self.client_flag) + struct.pack("<I", 1) + \
                     int2byte(charset_id) + int2byte(0)*23

        next_packet = 1

        if self.ssl:
            data = pack_int24(len(data_init)) + int2byte(next_packet) + data_init
            next_packet += 1

            if DEBUG: dump_packet(data)

            sock.send(data)
            sock = self.socket = ssl.wrap_socket(sock, keyfile=self.key,
                                           certfile=self.cert,
                                           ssl_version=ssl.PROTOCOL_TLSv1,
                                           cert_reqs=ssl.CERT_REQUIRED,
                                           ca_certs=self.ca)

        data = data_init + self.user+int2byte(0) + _scramble(self.password.encode(self.charset), self.salt)

        if self.db:
            self.db = self.db.encode(self.charset)
            data += self.db + int2byte(0)

        data = pack_int24(len(data)) + int2byte(next_packet) + data
        next_packet += 2

        if DEBUG: dump_packet(data)

        sock.send(data)

        auth_packet = MysqlPacket(sock)
        auth_packet.check_error()
        if DEBUG: auth_packet.dump()

        # if old_passwords is enabled the packet will be 1 byte long and
        # have the octet 254

        if auth_packet.is_eof_packet():
            # send legacy handshake
            #raise NotImplementedError, "old_passwords are not supported. Check to see if mysqld was started with --old-passwords, if old-passwords=1 in a my.cnf file, or if there are some short hashes in your mysql.user table."
            # TODO: is this the correct charset?
            data = _scramble_323(self.password.encode(self.charset), self.salt.encode(self.charset)) + int2byte(0)
            data = pack_int24(len(data)) + int2byte(next_packet) + data

            sock.send(data)
            auth_packet = MysqlPacket(sock)
            auth_packet.check_error()
            if DEBUG: auth_packet.dump()


    # _mysql support
    def thread_id(self):
        return self.server_thread_id[0]

    def character_set_name(self):
        return self.charset

    def get_host_info(self):
        return self.host_info

    def get_proto_info(self):
        return self.protocol_version

    def _get_server_information(self):
        sock = self.socket
        i = 0
        packet = MysqlPacket(sock)
        data = packet.get_all_data()

        if DEBUG: dump_packet(data)
        #packet_len = byte2int(data[i:i+1])
        #i += 4
        self.protocol_version = byte2int(data[i:i+1])

        i += 1
        server_end = data.find(int2byte(0), i)
        # TODO: is this the correct charset? should it be default_charset?
        self.server_version = data[i:server_end].decode(self.charset)

        i = server_end + 1
        self.server_thread_id = struct.unpack('<h', data[i:i+2])

        i += 4
        self.salt = data[i:i+8]

        i += 9
        if len(data) >= i + 1:
            i += 1

        self.server_capabilities = struct.unpack('<h', data[i:i+2])[0]

        i += 1
        self.server_language = byte2int(data[i:i+1])
        self.server_charset = charset_by_id(self.server_language).name

        i += 16
        if len(data) >= i+12-1:
            rest_salt = data[i:i+12]
            self.salt += rest_salt

    def get_server_info(self):
        return self.server_version

    Warning = Warning
    Error = Error
    InterfaceError = InterfaceError
    DatabaseError = DatabaseError
    DataError = DataError
    OperationalError = OperationalError
    IntegrityError = IntegrityError
    InternalError = InternalError
    ProgrammingError = ProgrammingError
    NotSupportedError = NotSupportedError

# TODO: move OK and EOF packet parsing/logic into a proper subclass
#       of MysqlPacket like has been done with FieldDescriptorPacket.
class MySQLResult(object):

    def __init__(self, connection):
        from weakref import proxy
        self.connection = proxy(connection)
        self.affected_rows = None
        self.insert_id = None
        self.server_status = 0
        self.warning_count = 0
        self.message = None
        self.field_count = 0
        self.description = None
        self.rows = None
        self.has_next = None

    def read(self):
        self.first_packet = self.connection.read_packet()

        # TODO: use classes for different packet types?
        if self.first_packet.is_ok_packet():
            self._read_ok_packet()
        else:
            self._read_result_packet()

    def _read_ok_packet(self):
        self.first_packet.advance(1)  # field_count (always '0')
        self.affected_rows = self.first_packet.read_length_coded_binary()
        self.insert_id = self.first_packet.read_length_coded_binary()
        self.server_status = struct.unpack('<H', self.first_packet.read(2))[0]
        self.warning_count = struct.unpack('<H', self.first_packet.read(2))[0]
        self.message = self.first_packet.read_all()

    def _read_result_packet(self):
        self.field_count = byte2int(self.first_packet.read(1))
        self._get_descriptions()
        self._read_rowdata_packet()

    # TODO: implement this as an iteratable so that it is more
    #       memory efficient and lower-latency to client...
    def _read_rowdata_packet(self):
      """Read a rowdata packet for each data row in the result set."""
      rows = []
      while True:
        packet = self.connection.read_packet()
        if packet.is_eof_packet():
            self.warning_count = packet.read(2)
            server_status = struct.unpack('<h', packet.read(2))[0]
            self.has_next = (server_status
                             & SERVER_STATUS.SERVER_MORE_RESULTS_EXISTS)
            break

        row = []
        for field in self.fields:
            if field.type_code in self.connection.decoders:
                converter = self.connection.decoders[field.type_code]

                if DEBUG: print "DEBUG: field=%s, converter=%s" % (field, converter)
                data = packet.read_length_coded_string()
                converted = None
                if data != None:
                    converted = converter(self.connection, field, data)

            row.append(converted)

        rows.append(tuple(row))

      self.affected_rows = len(rows)
      self.rows = tuple(rows)
      if DEBUG: self.rows

    def _get_descriptions(self):
        """Read a column descriptor packet for each column in the result."""
        self.fields = []
        description = []
        for i in xrange(self.field_count):
            field = self.connection.read_packet(FieldDescriptorPacket)
            self.fields.append(field)
            description.append(field.description())

        eof_packet = self.connection.read_packet()
        assert eof_packet.is_eof_packet(), 'Protocol error, expecting EOF'
        self.description = tuple(description)

Added gluon/contrib/pymysql/constants/CLIENT.py version [f8a12bc0fc].





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

LONG_PASSWORD = 1
FOUND_ROWS = 1 << 1
LONG_FLAG = 1 << 2
CONNECT_WITH_DB = 1 << 3
NO_SCHEMA = 1 << 4
COMPRESS = 1 << 5
ODBC = 1 << 6
LOCAL_FILES = 1 << 7
IGNORE_SPACE = 1 << 8
PROTOCOL_41 = 1 << 9
INTERACTIVE = 1 << 10
SSL = 1 << 11
IGNORE_SIGPIPE = 1 << 12
TRANSACTIONS  = 1 << 13
SECURE_CONNECTION = 1 << 15
MULTI_STATEMENTS = 1 << 16
MULTI_RESULTS = 1 << 17
CAPABILITIES = LONG_PASSWORD|LONG_FLAG|TRANSACTIONS| \
    PROTOCOL_41|SECURE_CONNECTION

Added gluon/contrib/pymysql/constants/COMMAND.py version [0f12cea6b0].
























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

COM_SLEEP = 0x00
COM_QUIT = 0x01
COM_INIT_DB = 0x02
COM_QUERY = 0x03
COM_FIELD_LIST = 0x04
COM_CREATE_DB = 0x05
COM_DROP_DB = 0x06
COM_REFRESH = 0x07
COM_SHUTDOWN = 0x08
COM_STATISTICS = 0x09
COM_PROCESS_INFO = 0x0a
COM_CONNECT = 0x0b
COM_PROCESS_KILL = 0x0c
COM_DEBUG = 0x0d
COM_PING = 0x0e
COM_TIME = 0x0f
COM_DELAYED_INSERT = 0x10
COM_CHANGE_USER = 0x11
COM_BINLOG_DUMP = 0x12
COM_TABLE_DUMP = 0x13
COM_CONNECT_OUT = 0x14
COM_REGISTER_SLAVE = 0x15

Added gluon/contrib/pymysql/constants/ER.py version [9716f9dcda].

























































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

ERROR_FIRST = 1000
HASHCHK = 1000
NISAMCHK = 1001
NO = 1002
YES = 1003
CANT_CREATE_FILE = 1004
CANT_CREATE_TABLE = 1005
CANT_CREATE_DB = 1006
DB_CREATE_EXISTS = 1007
DB_DROP_EXISTS = 1008
DB_DROP_DELETE = 1009
DB_DROP_RMDIR = 1010
CANT_DELETE_FILE = 1011
CANT_FIND_SYSTEM_REC = 1012
CANT_GET_STAT = 1013
CANT_GET_WD = 1014
CANT_LOCK = 1015
CANT_OPEN_FILE = 1016
FILE_NOT_FOUND = 1017
CANT_READ_DIR = 1018
CANT_SET_WD = 1019
CHECKREAD = 1020
DISK_FULL = 1021
DUP_KEY = 1022
ERROR_ON_CLOSE = 1023
ERROR_ON_READ = 1024
ERROR_ON_RENAME = 1025
ERROR_ON_WRITE = 1026
FILE_USED = 1027
FILSORT_ABORT = 1028
FORM_NOT_FOUND = 1029
GET_ERRNO = 1030
ILLEGAL_HA = 1031
KEY_NOT_FOUND = 1032
NOT_FORM_FILE = 1033
NOT_KEYFILE = 1034
OLD_KEYFILE = 1035
OPEN_AS_READONLY = 1036
OUTOFMEMORY = 1037
OUT_OF_SORTMEMORY = 1038
UNEXPECTED_EOF = 1039
CON_COUNT_ERROR = 1040
OUT_OF_RESOURCES = 1041
BAD_HOST_ERROR = 1042
HANDSHAKE_ERROR = 1043
DBACCESS_DENIED_ERROR = 1044
ACCESS_DENIED_ERROR = 1045
NO_DB_ERROR = 1046
UNKNOWN_COM_ERROR = 1047
BAD_NULL_ERROR = 1048
BAD_DB_ERROR = 1049
TABLE_EXISTS_ERROR = 1050
BAD_TABLE_ERROR = 1051
NON_UNIQ_ERROR = 1052
SERVER_SHUTDOWN = 1053
BAD_FIELD_ERROR = 1054
WRONG_FIELD_WITH_GROUP = 1055
WRONG_GROUP_FIELD = 1056
WRONG_SUM_SELECT = 1057
WRONG_VALUE_COUNT = 1058
TOO_LONG_IDENT = 1059
DUP_FIELDNAME = 1060
DUP_KEYNAME = 1061
DUP_ENTRY = 1062
WRONG_FIELD_SPEC = 1063
PARSE_ERROR = 1064
EMPTY_QUERY = 1065
NONUNIQ_TABLE = 1066
INVALID_DEFAULT = 1067
MULTIPLE_PRI_KEY = 1068
TOO_MANY_KEYS = 1069
TOO_MANY_KEY_PARTS = 1070
TOO_LONG_KEY = 1071
KEY_COLUMN_DOES_NOT_EXITS = 1072
BLOB_USED_AS_KEY = 1073
TOO_BIG_FIELDLENGTH = 1074
WRONG_AUTO_KEY = 1075
READY = 1076
NORMAL_SHUTDOWN = 1077
GOT_SIGNAL = 1078
SHUTDOWN_COMPLETE = 1079
FORCING_CLOSE = 1080
IPSOCK_ERROR = 1081
NO_SUCH_INDEX = 1082
WRONG_FIELD_TERMINATORS = 1083
BLOBS_AND_NO_TERMINATED = 1084
TEXTFILE_NOT_READABLE = 1085
FILE_EXISTS_ERROR = 1086
LOAD_INFO = 1087
ALTER_INFO = 1088
WRONG_SUB_KEY = 1089
CANT_REMOVE_ALL_FIELDS = 1090
CANT_DROP_FIELD_OR_KEY = 1091
INSERT_INFO = 1092
UPDATE_TABLE_USED = 1093
NO_SUCH_THREAD = 1094
KILL_DENIED_ERROR = 1095
NO_TABLES_USED = 1096
TOO_BIG_SET = 1097
NO_UNIQUE_LOGFILE = 1098
TABLE_NOT_LOCKED_FOR_WRITE = 1099
TABLE_NOT_LOCKED = 1100
BLOB_CANT_HAVE_DEFAULT = 1101
WRONG_DB_NAME = 1102
WRONG_TABLE_NAME = 1103
TOO_BIG_SELECT = 1104
UNKNOWN_ERROR = 1105
UNKNOWN_PROCEDURE = 1106
WRONG_PARAMCOUNT_TO_PROCEDURE = 1107
WRONG_PARAMETERS_TO_PROCEDURE = 1108
UNKNOWN_TABLE = 1109
FIELD_SPECIFIED_TWICE = 1110
INVALID_GROUP_FUNC_USE = 1111
UNSUPPORTED_EXTENSION = 1112
TABLE_MUST_HAVE_COLUMNS = 1113
RECORD_FILE_FULL = 1114
UNKNOWN_CHARACTER_SET = 1115
TOO_MANY_TABLES = 1116
TOO_MANY_FIELDS = 1117
TOO_BIG_ROWSIZE = 1118
STACK_OVERRUN = 1119
WRONG_OUTER_JOIN = 1120
NULL_COLUMN_IN_INDEX = 1121
CANT_FIND_UDF = 1122
CANT_INITIALIZE_UDF = 1123
UDF_NO_PATHS = 1124
UDF_EXISTS = 1125
CANT_OPEN_LIBRARY = 1126
CANT_FIND_DL_ENTRY = 1127
FUNCTION_NOT_DEFINED = 1128
HOST_IS_BLOCKED = 1129
HOST_NOT_PRIVILEGED = 1130
PASSWORD_ANONYMOUS_USER = 1131
PASSWORD_NOT_ALLOWED = 1132
PASSWORD_NO_MATCH = 1133
UPDATE_INFO = 1134
CANT_CREATE_THREAD = 1135
WRONG_VALUE_COUNT_ON_ROW = 1136
CANT_REOPEN_TABLE = 1137
INVALID_USE_OF_NULL = 1138
REGEXP_ERROR = 1139
MIX_OF_GROUP_FUNC_AND_FIELDS = 1140
NONEXISTING_GRANT = 1141
TABLEACCESS_DENIED_ERROR = 1142
COLUMNACCESS_DENIED_ERROR = 1143
ILLEGAL_GRANT_FOR_TABLE = 1144
GRANT_WRONG_HOST_OR_USER = 1145
NO_SUCH_TABLE = 1146
NONEXISTING_TABLE_GRANT = 1147
NOT_ALLOWED_COMMAND = 1148
SYNTAX_ERROR = 1149
DELAYED_CANT_CHANGE_LOCK = 1150
TOO_MANY_DELAYED_THREADS = 1151
ABORTING_CONNECTION = 1152
NET_PACKET_TOO_LARGE = 1153
NET_READ_ERROR_FROM_PIPE = 1154
NET_FCNTL_ERROR = 1155
NET_PACKETS_OUT_OF_ORDER = 1156
NET_UNCOMPRESS_ERROR = 1157
NET_READ_ERROR = 1158
NET_READ_INTERRUPTED = 1159
NET_ERROR_ON_WRITE = 1160
NET_WRITE_INTERRUPTED = 1161
TOO_LONG_STRING = 1162
TABLE_CANT_HANDLE_BLOB = 1163
TABLE_CANT_HANDLE_AUTO_INCREMENT = 1164
DELAYED_INSERT_TABLE_LOCKED = 1165
WRONG_COLUMN_NAME = 1166
WRONG_KEY_COLUMN = 1167
WRONG_MRG_TABLE = 1168
DUP_UNIQUE = 1169
BLOB_KEY_WITHOUT_LENGTH = 1170
PRIMARY_CANT_HAVE_NULL = 1171
TOO_MANY_ROWS = 1172
REQUIRES_PRIMARY_KEY = 1173
NO_RAID_COMPILED = 1174
UPDATE_WITHOUT_KEY_IN_SAFE_MODE = 1175
KEY_DOES_NOT_EXITS = 1176
CHECK_NO_SUCH_TABLE = 1177
CHECK_NOT_IMPLEMENTED = 1178
CANT_DO_THIS_DURING_AN_TRANSACTION = 1179
ERROR_DURING_COMMIT = 1180
ERROR_DURING_ROLLBACK = 1181
ERROR_DURING_FLUSH_LOGS = 1182
ERROR_DURING_CHECKPOINT = 1183
NEW_ABORTING_CONNECTION = 1184
DUMP_NOT_IMPLEMENTED = 1185
FLUSH_MASTER_BINLOG_CLOSED = 1186
INDEX_REBUILD = 1187
MASTER = 1188
MASTER_NET_READ = 1189
MASTER_NET_WRITE = 1190
FT_MATCHING_KEY_NOT_FOUND = 1191
LOCK_OR_ACTIVE_TRANSACTION = 1192
UNKNOWN_SYSTEM_VARIABLE = 1193
CRASHED_ON_USAGE = 1194
CRASHED_ON_REPAIR = 1195
WARNING_NOT_COMPLETE_ROLLBACK = 1196
TRANS_CACHE_FULL = 1197
SLAVE_MUST_STOP = 1198
SLAVE_NOT_RUNNING = 1199
BAD_SLAVE = 1200
MASTER_INFO = 1201
SLAVE_THREAD = 1202
TOO_MANY_USER_CONNECTIONS = 1203
SET_CONSTANTS_ONLY = 1204
LOCK_WAIT_TIMEOUT = 1205
LOCK_TABLE_FULL = 1206
READ_ONLY_TRANSACTION = 1207
DROP_DB_WITH_READ_LOCK = 1208
CREATE_DB_WITH_READ_LOCK = 1209
WRONG_ARGUMENTS = 1210
NO_PERMISSION_TO_CREATE_USER = 1211
UNION_TABLES_IN_DIFFERENT_DIR = 1212
LOCK_DEADLOCK = 1213
TABLE_CANT_HANDLE_FT = 1214
CANNOT_ADD_FOREIGN = 1215
NO_REFERENCED_ROW = 1216
ROW_IS_REFERENCED = 1217
CONNECT_TO_MASTER = 1218
QUERY_ON_MASTER = 1219
ERROR_WHEN_EXECUTING_COMMAND = 1220
WRONG_USAGE = 1221
WRONG_NUMBER_OF_COLUMNS_IN_SELECT = 1222
CANT_UPDATE_WITH_READLOCK = 1223
MIXING_NOT_ALLOWED = 1224
DUP_ARGUMENT = 1225
USER_LIMIT_REACHED = 1226
SPECIFIC_ACCESS_DENIED_ERROR = 1227
LOCAL_VARIABLE = 1228
GLOBAL_VARIABLE = 1229
NO_DEFAULT = 1230
WRONG_VALUE_FOR_VAR = 1231
WRONG_TYPE_FOR_VAR = 1232
VAR_CANT_BE_READ = 1233
CANT_USE_OPTION_HERE = 1234
NOT_SUPPORTED_YET = 1235
MASTER_FATAL_ERROR_READING_BINLOG = 1236
SLAVE_IGNORED_TABLE = 1237
INCORRECT_GLOBAL_LOCAL_VAR = 1238
WRONG_FK_DEF = 1239
KEY_REF_DO_NOT_MATCH_TABLE_REF = 1240
OPERAND_COLUMNS = 1241
SUBQUERY_NO_1_ROW = 1242
UNKNOWN_STMT_HANDLER = 1243
CORRUPT_HELP_DB = 1244
CYCLIC_REFERENCE = 1245
AUTO_CONVERT = 1246
ILLEGAL_REFERENCE = 1247
DERIVED_MUST_HAVE_ALIAS = 1248
SELECT_REDUCED = 1249
TABLENAME_NOT_ALLOWED_HERE = 1250
NOT_SUPPORTED_AUTH_MODE = 1251
SPATIAL_CANT_HAVE_NULL = 1252
COLLATION_CHARSET_MISMATCH = 1253
SLAVE_WAS_RUNNING = 1254
SLAVE_WAS_NOT_RUNNING = 1255
TOO_BIG_FOR_UNCOMPRESS = 1256
ZLIB_Z_MEM_ERROR = 1257
ZLIB_Z_BUF_ERROR = 1258
ZLIB_Z_DATA_ERROR = 1259
CUT_VALUE_GROUP_CONCAT = 1260
WARN_TOO_FEW_RECORDS = 1261
WARN_TOO_MANY_RECORDS = 1262
WARN_NULL_TO_NOTNULL = 1263
WARN_DATA_OUT_OF_RANGE = 1264
WARN_DATA_TRUNCATED = 1265
WARN_USING_OTHER_HANDLER = 1266
CANT_AGGREGATE_2COLLATIONS = 1267
DROP_USER = 1268
REVOKE_GRANTS = 1269
CANT_AGGREGATE_3COLLATIONS = 1270
CANT_AGGREGATE_NCOLLATIONS = 1271
VARIABLE_IS_NOT_STRUCT = 1272
UNKNOWN_COLLATION = 1273
SLAVE_IGNORED_SSL_PARAMS = 1274
SERVER_IS_IN_SECURE_AUTH_MODE = 1275
WARN_FIELD_RESOLVED = 1276
BAD_SLAVE_UNTIL_COND = 1277
MISSING_SKIP_SLAVE = 1278
UNTIL_COND_IGNORED = 1279
WRONG_NAME_FOR_INDEX = 1280
WRONG_NAME_FOR_CATALOG = 1281
WARN_QC_RESIZE = 1282
BAD_FT_COLUMN = 1283
UNKNOWN_KEY_CACHE = 1284
WARN_HOSTNAME_WONT_WORK = 1285
UNKNOWN_STORAGE_ENGINE = 1286
WARN_DEPRECATED_SYNTAX = 1287
NON_UPDATABLE_TABLE = 1288
FEATURE_DISABLED = 1289
OPTION_PREVENTS_STATEMENT = 1290
DUPLICATED_VALUE_IN_TYPE = 1291
TRUNCATED_WRONG_VALUE = 1292
TOO_MUCH_AUTO_TIMESTAMP_COLS = 1293
INVALID_ON_UPDATE = 1294
UNSUPPORTED_PS = 1295
GET_ERRMSG = 1296
GET_TEMPORARY_ERRMSG = 1297
UNKNOWN_TIME_ZONE = 1298
WARN_INVALID_TIMESTAMP = 1299
INVALID_CHARACTER_STRING = 1300
WARN_ALLOWED_PACKET_OVERFLOWED = 1301
CONFLICTING_DECLARATIONS = 1302
SP_NO_RECURSIVE_CREATE = 1303
SP_ALREADY_EXISTS = 1304
SP_DOES_NOT_EXIST = 1305
SP_DROP_FAILED = 1306
SP_STORE_FAILED = 1307
SP_LILABEL_MISMATCH = 1308
SP_LABEL_REDEFINE = 1309
SP_LABEL_MISMATCH = 1310
SP_UNINIT_VAR = 1311
SP_BADSELECT = 1312
SP_BADRETURN = 1313
SP_BADSTATEMENT = 1314
UPDATE_LOG_DEPRECATED_IGNORED = 1315
UPDATE_LOG_DEPRECATED_TRANSLATED = 1316
QUERY_INTERRUPTED = 1317
SP_WRONG_NO_OF_ARGS = 1318
SP_COND_MISMATCH = 1319
SP_NORETURN = 1320
SP_NORETURNEND = 1321
SP_BAD_CURSOR_QUERY = 1322
SP_BAD_CURSOR_SELECT = 1323
SP_CURSOR_MISMATCH = 1324
SP_CURSOR_ALREADY_OPEN = 1325
SP_CURSOR_NOT_OPEN = 1326
SP_UNDECLARED_VAR = 1327
SP_WRONG_NO_OF_FETCH_ARGS = 1328
SP_FETCH_NO_DATA = 1329
SP_DUP_PARAM = 1330
SP_DUP_VAR = 1331
SP_DUP_COND = 1332
SP_DUP_CURS = 1333
SP_CANT_ALTER = 1334
SP_SUBSELECT_NYI = 1335
STMT_NOT_ALLOWED_IN_SF_OR_TRG = 1336
SP_VARCOND_AFTER_CURSHNDLR = 1337
SP_CURSOR_AFTER_HANDLER = 1338
SP_CASE_NOT_FOUND = 1339
FPARSER_TOO_BIG_FILE = 1340
FPARSER_BAD_HEADER = 1341
FPARSER_EOF_IN_COMMENT = 1342
FPARSER_ERROR_IN_PARAMETER = 1343
FPARSER_EOF_IN_UNKNOWN_PARAMETER = 1344
VIEW_NO_EXPLAIN = 1345
FRM_UNKNOWN_TYPE = 1346
WRONG_OBJECT = 1347
NONUPDATEABLE_COLUMN = 1348
VIEW_SELECT_DERIVED = 1349
VIEW_SELECT_CLAUSE = 1350
VIEW_SELECT_VARIABLE = 1351
VIEW_SELECT_TMPTABLE = 1352
VIEW_WRONG_LIST = 1353
WARN_VIEW_MERGE = 1354
WARN_VIEW_WITHOUT_KEY = 1355
VIEW_INVALID = 1356
SP_NO_DROP_SP = 1357
SP_GOTO_IN_HNDLR = 1358
TRG_ALREADY_EXISTS = 1359
TRG_DOES_NOT_EXIST = 1360
TRG_ON_VIEW_OR_TEMP_TABLE = 1361
TRG_CANT_CHANGE_ROW = 1362
TRG_NO_SUCH_ROW_IN_TRG = 1363
NO_DEFAULT_FOR_FIELD = 1364
DIVISION_BY_ZERO = 1365
TRUNCATED_WRONG_VALUE_FOR_FIELD = 1366
ILLEGAL_VALUE_FOR_TYPE = 1367
VIEW_NONUPD_CHECK = 1368
VIEW_CHECK_FAILED = 1369
PROCACCESS_DENIED_ERROR = 1370
RELAY_LOG_FAIL = 1371
PASSWD_LENGTH = 1372
UNKNOWN_TARGET_BINLOG = 1373
IO_ERR_LOG_INDEX_READ = 1374
BINLOG_PURGE_PROHIBITED = 1375
FSEEK_FAIL = 1376
BINLOG_PURGE_FATAL_ERR = 1377
LOG_IN_USE = 1378
LOG_PURGE_UNKNOWN_ERR = 1379
RELAY_LOG_INIT = 1380
NO_BINARY_LOGGING = 1381
RESERVED_SYNTAX = 1382
WSAS_FAILED = 1383
DIFF_GROUPS_PROC = 1384
NO_GROUP_FOR_PROC = 1385
ORDER_WITH_PROC = 1386
LOGGING_PROHIBIT_CHANGING_OF = 1387
NO_FILE_MAPPING = 1388
WRONG_MAGIC = 1389
PS_MANY_PARAM = 1390
KEY_PART_0 = 1391
VIEW_CHECKSUM = 1392
VIEW_MULTIUPDATE = 1393
VIEW_NO_INSERT_FIELD_LIST = 1394
VIEW_DELETE_MERGE_VIEW = 1395
CANNOT_USER = 1396
XAER_NOTA = 1397
XAER_INVAL = 1398
XAER_RMFAIL = 1399
XAER_OUTSIDE = 1400
XAER_RMERR = 1401
XA_RBROLLBACK = 1402
NONEXISTING_PROC_GRANT = 1403
PROC_AUTO_GRANT_FAIL = 1404
PROC_AUTO_REVOKE_FAIL = 1405
DATA_TOO_LONG = 1406
SP_BAD_SQLSTATE = 1407
STARTUP = 1408
LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR = 1409
CANT_CREATE_USER_WITH_GRANT = 1410
WRONG_VALUE_FOR_TYPE = 1411
TABLE_DEF_CHANGED = 1412
SP_DUP_HANDLER = 1413
SP_NOT_VAR_ARG = 1414
SP_NO_RETSET = 1415
CANT_CREATE_GEOMETRY_OBJECT = 1416
FAILED_ROUTINE_BREAK_BINLOG = 1417
BINLOG_UNSAFE_ROUTINE = 1418
BINLOG_CREATE_ROUTINE_NEED_SUPER = 1419
EXEC_STMT_WITH_OPEN_CURSOR = 1420
STMT_HAS_NO_OPEN_CURSOR = 1421
COMMIT_NOT_ALLOWED_IN_SF_OR_TRG = 1422
NO_DEFAULT_FOR_VIEW_FIELD = 1423
SP_NO_RECURSION = 1424
TOO_BIG_SCALE = 1425
TOO_BIG_PRECISION = 1426
M_BIGGER_THAN_D = 1427
WRONG_LOCK_OF_SYSTEM_TABLE = 1428
CONNECT_TO_FOREIGN_DATA_SOURCE = 1429
QUERY_ON_FOREIGN_DATA_SOURCE = 1430
FOREIGN_DATA_SOURCE_DOESNT_EXIST = 1431
FOREIGN_DATA_STRING_INVALID_CANT_CREATE = 1432
FOREIGN_DATA_STRING_INVALID = 1433
CANT_CREATE_FEDERATED_TABLE = 1434
TRG_IN_WRONG_SCHEMA = 1435
STACK_OVERRUN_NEED_MORE = 1436
TOO_LONG_BODY = 1437
WARN_CANT_DROP_DEFAULT_KEYCACHE = 1438
TOO_BIG_DISPLAYWIDTH = 1439
XAER_DUPID = 1440
DATETIME_FUNCTION_OVERFLOW = 1441
CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG = 1442
VIEW_PREVENT_UPDATE = 1443
PS_NO_RECURSION = 1444
SP_CANT_SET_AUTOCOMMIT = 1445
MALFORMED_DEFINER = 1446
VIEW_FRM_NO_USER = 1447
VIEW_OTHER_USER = 1448
NO_SUCH_USER = 1449
FORBID_SCHEMA_CHANGE = 1450
ROW_IS_REFERENCED_2 = 1451
NO_REFERENCED_ROW_2 = 1452
SP_BAD_VAR_SHADOW = 1453
TRG_NO_DEFINER = 1454
OLD_FILE_FORMAT = 1455
SP_RECURSION_LIMIT = 1456
SP_PROC_TABLE_CORRUPT = 1457
SP_WRONG_NAME = 1458
TABLE_NEEDS_UPGRADE = 1459
SP_NO_AGGREGATE = 1460
MAX_PREPARED_STMT_COUNT_REACHED = 1461
VIEW_RECURSIVE = 1462
NON_GROUPING_FIELD_USED = 1463
TABLE_CANT_HANDLE_SPKEYS = 1464
NO_TRIGGERS_ON_SYSTEM_SCHEMA = 1465
USERNAME = 1466
HOSTNAME = 1467
WRONG_STRING_LENGTH = 1468
ERROR_LAST = 1468

Added gluon/contrib/pymysql/constants/FIELD_TYPE.py version [240c8ff9ef].

































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


DECIMAL = 0
TINY = 1
SHORT = 2
LONG = 3
FLOAT = 4
DOUBLE = 5
NULL = 6
TIMESTAMP = 7
LONGLONG = 8
INT24 = 9
DATE = 10
TIME = 11
DATETIME = 12
YEAR = 13
NEWDATE = 14
VARCHAR = 15
BIT = 16
NEWDECIMAL = 246
ENUM = 247
SET = 248
TINY_BLOB = 249
MEDIUM_BLOB = 250
LONG_BLOB = 251
BLOB = 252
VAR_STRING = 253
STRING = 254
GEOMETRY = 255

CHAR = TINY
INTERVAL = ENUM

Added gluon/contrib/pymysql/constants/FLAG.py version [70999f0934].
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NOT_NULL = 1
PRI_KEY = 2
UNIQUE_KEY = 4
MULTIPLE_KEY = 8
BLOB = 16
UNSIGNED = 32
ZEROFILL = 64
BINARY = 128
ENUM = 256
AUTO_INCREMENT = 512
TIMESTAMP = 1024
SET = 2048
PART_KEY = 16384
GROUP = 32767
UNIQUE = 65536

Added gluon/contrib/pymysql/constants/SERVER_STATUS.py version [bf9f310cfd].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+

SERVER_STATUS_IN_TRANS = 1
SERVER_STATUS_AUTOCOMMIT = 2
SERVER_MORE_RESULTS_EXISTS = 8
SERVER_QUERY_NO_GOOD_INDEX_USED = 16
SERVER_QUERY_NO_INDEX_USED = 32
SERVER_STATUS_CURSOR_EXISTS = 64
SERVER_STATUS_LAST_ROW_SENT = 128
SERVER_STATUS_DB_DROPPED = 256
SERVER_STATUS_NO_BACKSLASH_ESCAPES = 512
SERVER_STATUS_METADATA_CHANGED = 1024

Added gluon/contrib/pymysql/constants/__init__.py version [da39a3ee5e].

Added gluon/contrib/pymysql/converters.py version [757622cc63].



























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import re
import datetime
import time

from constants import FIELD_TYPE, FLAG
from charset import charset_by_id

try:
    set
except NameError:
    try:
        from sets import BaseSet as set
    except ImportError:
        from sets import Set as set

ESCAPE_REGEX = re.compile(r"[\0\n\r\032\'\"\\]")
ESCAPE_MAP = {'\0': '\\0', '\n': '\\n', '\r': '\\r', '\032': '\\Z',
              '\'': '\\\'', '"': '\\"', '\\': '\\\\'}

def escape_item(val, charset):
    if type(val) in [tuple, list, set]:
        return escape_sequence(val, charset)
    if type(val) is dict:
        return escape_dict(val, charset)
    if hasattr(val, "decode") and not isinstance(val, unicode):
        # deal with py3k bytes
        val = val.decode(charset)
    encoder = encoders[type(val)]
    val = encoder(val)
    if type(val) is str:
        return val
    val = val.encode(charset)
    return val

def escape_dict(val, charset):
    n = {}
    for k, v in val.items():
        quoted = escape_item(v, charset)
        n[k] = quoted
    return n

def escape_sequence(val, charset):
    n = []
    for item in val:
        quoted = escape_item(item, charset)
        n.append(quoted)
    return tuple(n)

def escape_set(val, charset):
    val = map(lambda x: escape_item(x, charset), val)
    return ','.join(val)

def escape_bool(value):
    return str(int(value))

def escape_object(value):
    return str(value)

escape_int = escape_long = escape_object

def escape_float(value):
    return ('%.15g' % value)

def escape_string(value):
    return ("'%s'" % ESCAPE_REGEX.sub(
            lambda match: ESCAPE_MAP.get(match.group(0)), value))

def escape_unicode(value):
    return escape_string(value)

def escape_None(value):
    return 'NULL'

def escape_timedelta(obj):
    seconds = int(obj.seconds) % 60
    minutes = int(obj.seconds // 60) % 60
    hours = int(obj.seconds // 3600) % 24 + int(obj.days) * 24
    return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))

def escape_time(obj):
    s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),
                            int(obj.second))
    if obj.microsecond:
        s += ".%f" % obj.microsecond

    return escape_string(s)

def escape_datetime(obj):
    return escape_string(obj.strftime("%Y-%m-%d %H:%M:%S"))

def escape_date(obj):
    return escape_string(obj.strftime("%Y-%m-%d"))

def escape_struct_time(obj):
    return escape_datetime(datetime.datetime(*obj[:6]))

def convert_datetime(connection, field, obj):
    """Returns a DATETIME or TIMESTAMP column value as a datetime object:

      >>> datetime_or_None('2007-02-25 23:06:20')
      datetime.datetime(2007, 2, 25, 23, 6, 20)
      >>> datetime_or_None('2007-02-25T23:06:20')
      datetime.datetime(2007, 2, 25, 23, 6, 20)

    Illegal values are returned as None:

      >>> datetime_or_None('2007-02-31T23:06:20') is None
      True
      >>> datetime_or_None('0000-00-00 00:00:00') is None
      True

    """
    if not isinstance(obj, unicode):
        obj = obj.decode(connection.charset)
    if ' ' in obj:
        sep = ' '
    elif 'T' in obj:
        sep = 'T'
    else:
        return convert_date(connection, field, obj)

    try:
        ymd, hms = obj.split(sep, 1)
        return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])
    except ValueError:
        return convert_date(connection, field, obj)

def convert_timedelta(connection, field, obj):
    """Returns a TIME column as a timedelta object:

      >>> timedelta_or_None('25:06:17')
      datetime.timedelta(1, 3977)
      >>> timedelta_or_None('-25:06:17')
      datetime.timedelta(-2, 83177)

    Illegal values are returned as None:

      >>> timedelta_or_None('random crap') is None
      True

    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but
    can accept values as (+|-)DD HH:MM:SS. The latter format will not
    be parsed correctly by this function.
    """
    from math import modf
    try:
        if not isinstance(obj, unicode):
            obj = obj.decode(connection.charset)
        hours, minutes, seconds = tuple([int(x) for x in obj.split(':')])
        tdelta = datetime.timedelta(
            hours = int(hours),
            minutes = int(minutes),
            seconds = int(seconds),
            microseconds = int(modf(float(seconds))[0]*1000000),
            )
        return tdelta
    except ValueError:
        return None

def convert_time(connection, field, obj):
    """Returns a TIME column as a time object:

      >>> time_or_None('15:06:17')
      datetime.time(15, 6, 17)

    Illegal values are returned as None:

      >>> time_or_None('-25:06:17') is None
      True
      >>> time_or_None('random crap') is None
      True

    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but
    can accept values as (+|-)DD HH:MM:SS. The latter format will not
    be parsed correctly by this function.

    Also note that MySQL's TIME column corresponds more closely to
    Python's timedelta and not time. However if you want TIME columns
    to be treated as time-of-day and not a time offset, then you can
    use set this function as the converter for FIELD_TYPE.TIME.
    """
    from math import modf
    try:
        hour, minute, second = obj.split(':')
        return datetime.time(hour=int(hour), minute=int(minute),
                             second=int(second),
                             microsecond=int(modf(float(second))[0]*1000000))
    except ValueError:
        return None

def convert_date(connection, field, obj):
    """Returns a DATE column as a date object:

      >>> date_or_None('2007-02-26')
      datetime.date(2007, 2, 26)

    Illegal values are returned as None:

      >>> date_or_None('2007-02-31') is None
      True
      >>> date_or_None('0000-00-00') is None
      True

    """
    try:
        if not isinstance(obj, unicode):
            obj = obj.decode(connection.charset)
        return datetime.date(*[ int(x) for x in obj.split('-', 2) ])
    except ValueError:
        return None

def convert_mysql_timestamp(connection, field, timestamp):
    """Convert a MySQL TIMESTAMP to a Timestamp object.

    MySQL >= 4.1 returns TIMESTAMP in the same format as DATETIME:

      >>> mysql_timestamp_converter('2007-02-25 22:32:17')
      datetime.datetime(2007, 2, 25, 22, 32, 17)

    MySQL < 4.1 uses a big string of numbers:

      >>> mysql_timestamp_converter('20070225223217')
      datetime.datetime(2007, 2, 25, 22, 32, 17)

    Illegal values are returned as None:

      >>> mysql_timestamp_converter('2007-02-31 22:32:17') is None
      True
      >>> mysql_timestamp_converter('00000000000000') is None
      True

    """
    if not isinstance(timestamp, unicode):
        timestamp = timestamp.decode(connection.charset)

    if timestamp[4] == '-':
        return convert_datetime(connection, field, timestamp)
    timestamp += "0"*(14-len(timestamp)) # padding
    year, month, day, hour, minute, second = \
        int(timestamp[:4]), int(timestamp[4:6]), int(timestamp[6:8]), \
        int(timestamp[8:10]), int(timestamp[10:12]), int(timestamp[12:14])
    try:
        return datetime.datetime(year, month, day, hour, minute, second)
    except ValueError:
        return None

def convert_set(s):
    return set(s.split(","))

def convert_bit(connection, field, b):
    #b = "\x00" * (8 - len(b)) + b # pad w/ zeroes
    #return struct.unpack(">Q", b)[0]
    #
    # the snippet above is right, but MySQLdb doesn't process bits,
    # so we shouldn't either
    return b

def convert_characters(connection, field, data):
    field_charset = charset_by_id(field.charsetnr).name
    if field.flags & FLAG.SET:
        return convert_set(data.decode(field_charset))
    if field.flags & FLAG.BINARY:
        return data

    if connection.use_unicode:
        data = data.decode(field_charset)
    elif connection.charset != field_charset:
        data = data.decode(field_charset)
        data = data.encode(connection.charset)
    else:
        data = data.decode(connection.charset)
    return data

def convert_int(connection, field, data):
    return int(data)

def convert_long(connection, field, data):
    return long(data)

def convert_float(connection, field, data):
    return float(data)

encoders = {
        bool: escape_bool,
        int: escape_int,
        long: escape_long,
        float: escape_float,
        str: escape_string,
        unicode: escape_unicode,
        tuple: escape_sequence,
        list:escape_sequence,
        set:escape_sequence,
        dict:escape_dict,
        type(None):escape_None,
        datetime.date: escape_date,
        datetime.datetime : escape_datetime,
        datetime.timedelta : escape_timedelta,
        datetime.time : escape_time,
        time.struct_time : escape_struct_time,
        }

decoders = {
        FIELD_TYPE.BIT: convert_bit,
        FIELD_TYPE.TINY: convert_int,
        FIELD_TYPE.SHORT: convert_int,
        FIELD_TYPE.LONG: convert_long,
        FIELD_TYPE.FLOAT: convert_float,
        FIELD_TYPE.DOUBLE: convert_float,
        FIELD_TYPE.DECIMAL: convert_float,
        FIELD_TYPE.NEWDECIMAL: convert_float,
        FIELD_TYPE.LONGLONG: convert_long,
        FIELD_TYPE.INT24: convert_int,
        FIELD_TYPE.YEAR: convert_int,
        FIELD_TYPE.TIMESTAMP: convert_mysql_timestamp,
        FIELD_TYPE.DATETIME: convert_datetime,
        FIELD_TYPE.TIME: convert_timedelta,
        FIELD_TYPE.DATE: convert_date,
        FIELD_TYPE.SET: convert_set,
        FIELD_TYPE.BLOB: convert_characters,
        FIELD_TYPE.TINY_BLOB: convert_characters,
        FIELD_TYPE.MEDIUM_BLOB: convert_characters,
        FIELD_TYPE.LONG_BLOB: convert_characters,
        FIELD_TYPE.STRING: convert_characters,
        FIELD_TYPE.VAR_STRING: convert_characters,
        FIELD_TYPE.VARCHAR: convert_characters,
        #FIELD_TYPE.BLOB: str,
        #FIELD_TYPE.STRING: str,
        #FIELD_TYPE.VAR_STRING: str,
        #FIELD_TYPE.VARCHAR: str
        }
conversions = decoders  # for MySQLdb compatibility

try:
    # python version > 2.3
    from decimal import Decimal
    def convert_decimal(connection, field, data):
        return Decimal(data)
    decoders[FIELD_TYPE.DECIMAL] = convert_decimal
    decoders[FIELD_TYPE.NEWDECIMAL] = convert_decimal

    def escape_decimal(obj):
        return unicode(obj)
    encoders[Decimal] = escape_decimal

except ImportError:
    pass

Added gluon/contrib/pymysql/cursors.py version [5fb47ad768].



























































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-
import struct
import re

try:
    import cStringIO as StringIO
except ImportError:
    import StringIO

from err import Warning, Error, InterfaceError, DataError, \
             DatabaseError, OperationalError, IntegrityError, InternalError, \
            NotSupportedError, ProgrammingError

insert_values = re.compile(r'\svalues\s*(\(.+\))', re.IGNORECASE)

class Cursor(object):
    '''
    This is the object you use to interact with the database.
    '''
    def __init__(self, connection):
        '''
        Do not create an instance of a Cursor yourself. Call
        connections.Connection.cursor().
        '''
        from weakref import proxy
        self.connection = proxy(connection)
        self.description = None
        self.rownumber = 0
        self.rowcount = -1
        self.arraysize = 1
        self._executed = None
        self.messages = []
        self.errorhandler = connection.errorhandler
        self._has_next = None
        self._rows = ()

    def __del__(self):
        '''
        When this gets GC'd close it.
        '''
        self.close()

    def close(self):
        '''
        Closing a cursor just exhausts all remaining data.
        '''
        if not self.connection:
            return
        try:
            while self.nextset():
                pass
        except:
            pass

        self.connection = None

    def _get_db(self):
        if not self.connection:
            self.errorhandler(self, ProgrammingError, "cursor closed")
        return self.connection

    def _check_executed(self):
        if not self._executed:
            self.errorhandler(self, ProgrammingError, "execute() first")

    def setinputsizes(self, *args):
        """Does nothing, required by DB API."""

    def setoutputsizes(self, *args):
        """Does nothing, required by DB API."""

    def nextset(self):
        ''' Get the next query set '''
        if self._executed:
            self.fetchall()
        del self.messages[:]

        if not self._has_next:
            return None
        connection = self._get_db()
        connection.next_result()
        self._do_get_result()
        return True

    def execute(self, query, args=None):
        ''' Execute a query '''
        from sys import exc_info

        conn = self._get_db()
        charset = conn.charset
        del self.messages[:]

        # TODO: make sure that conn.escape is correct

        if args is not None:
            query = query % conn.escape(args)

        if isinstance(query, unicode):
            query = query.encode(charset)

        result = 0
        try:
            result = self._query(query)
        except:
            exc, value, tb = exc_info()
            del tb
            self.messages.append((exc,value))
            self.errorhandler(self, exc, value)

        self._executed = query
        return result

    def executemany(self, query, args):
        ''' Run several data against one query '''
        del self.messages[:]
        conn = self._get_db()
        if not args:
            return
        charset = conn.charset
        if isinstance(query, unicode):
            query = query.encode(charset)

        self.rowcount = sum([ self.execute(query, arg) for arg in args ])
        return self.rowcount


    def callproc(self, procname, args=()):
        """Execute stored procedure procname with args

        procname -- string, name of procedure to execute on server

        args -- Sequence of parameters to use with procedure

        Returns the original args.

        Compatibility warning: PEP-249 specifies that any modified
        parameters must be returned. This is currently impossible
        as they are only available by storing them in a server
        variable and then retrieved by a query. Since stored
        procedures return zero or more result sets, there is no
        reliable way to get at OUT or INOUT parameters via callproc.
        The server variables are named @_procname_n, where procname
        is the parameter above and n is the position of the parameter
        (from zero). Once all result sets generated by the procedure
        have been fetched, you can issue a SELECT @_procname_0, ...
        query using .execute() to get any OUT or INOUT values.

        Compatibility warning: The act of calling a stored procedure
        itself creates an empty result set. This appears after any
        result sets generated by the procedure. This is non-standard
        behavior with respect to the DB-API. Be sure to use nextset()
        to advance through all result sets; otherwise you may get
        disconnected.
        """
        conn = self._get_db()
        for index, arg in enumerate(args):
            q = "SET @_%s_%d=%s" % (procname, index, conn.escape(arg))
            if isinstance(q, unicode):
                q = q.encode(conn.charset)
            self._query(q)
            self.nextset()

        q = "CALL %s(%s)" % (procname,
                             ','.join(['@_%s_%d' % (procname, i)
                                       for i in range(len(args))]))
        if isinstance(q, unicode):
            q = q.encode(conn.charset)
        self._query(q)
        self._executed = q

        return args

    def fetchone(self):
        ''' Fetch the next row '''
        self._check_executed()
        if self._rows is None or self.rownumber >= len(self._rows):
            return None
        result = self._rows[self.rownumber]
        self.rownumber += 1
        return result

    def fetchmany(self, size=None):
        ''' Fetch several rows '''
        self._check_executed()
        end = self.rownumber + (size or self.arraysize)
        result = self._rows[self.rownumber:end]
        if self._rows is None:
            return None
        self.rownumber = min(end, len(self._rows))
        return result

    def fetchall(self):
        ''' Fetch all the rows '''
        self._check_executed()
        if self._rows is None:
            return None
        if self.rownumber:
            result = self._rows[self.rownumber:]
        else:
            result = self._rows
        self.rownumber = len(self._rows)
        return result

    def scroll(self, value, mode='relative'):
        self._check_executed()
        if mode == 'relative':
            r = self.rownumber + value
        elif mode == 'absolute':
            r = value
        else:
            self.errorhandler(self, ProgrammingError,
                    "unknown scroll mode %s" % mode)

        if r < 0 or r >= len(self._rows):
            self.errorhandler(self, IndexError, "out of range")
        self.rownumber = r

    def _query(self, q):
        conn = self._get_db()
        self._last_executed = q
        conn.query(q)
        self._do_get_result()
        return self.rowcount

    def _do_get_result(self):
        conn = self._get_db()
        self.rowcount = conn._result.affected_rows

        self.rownumber = 0
        self.description = conn._result.description
        self.lastrowid = conn._result.insert_id
        self._rows = conn._result.rows
        self._has_next = conn._result.has_next
        conn._result = None

    def __iter__(self):
        self._check_executed()
        result = self.rownumber and self._rows[self.rownumber:] or self._rows
        return iter(result)

    Warning = Warning
    Error = Error
    InterfaceError = InterfaceError
    DatabaseError = DatabaseError
    DataError = DataError
    OperationalError = OperationalError
    IntegrityError = IntegrityError
    InternalError = InternalError
    ProgrammingError = ProgrammingError
    NotSupportedError = NotSupportedError

Added gluon/contrib/pymysql/err.py version [5e9f1064e5].













































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import struct


try:
    Exception, Warning
except ImportError:
    try:
        from exceptions import Exception, Warning
    except ImportError:
        import sys
        e = sys.modules['exceptions']
        Exception = e.Exception
        Warning = e.Warning
    
from constants import ER

class MySQLError(Exception):
    
    """Exception related to operation with MySQL."""


class Warning(Warning, MySQLError):

    """Exception raised for important warnings like data truncations
    while inserting, etc."""

class Error(MySQLError):

    """Exception that is the base class of all other error exceptions
    (not Warning)."""


class InterfaceError(Error):

    """Exception raised for errors that are related to the database
    interface rather than the database itself."""


class DatabaseError(Error):

    """Exception raised for errors that are related to the
    database."""


class DataError(DatabaseError):

    """Exception raised for errors that are due to problems with the
    processed data like division by zero, numeric value out of range,
    etc."""


class OperationalError(DatabaseError):

    """Exception raised for errors that are related to the database's
    operation and not necessarily under the control of the programmer,
    e.g. an unexpected disconnect occurs, the data source name is not
    found, a transaction could not be processed, a memory allocation
    error occurred during processing, etc."""


class IntegrityError(DatabaseError):

    """Exception raised when the relational integrity of the database
    is affected, e.g. a foreign key check fails, duplicate key,
    etc."""


class InternalError(DatabaseError):

    """Exception raised when the database encounters an internal
    error, e.g. the cursor is not valid anymore, the transaction is
    out of sync, etc."""


class ProgrammingError(DatabaseError):

    """Exception raised for programming errors, e.g. table not found
    or already exists, syntax error in the SQL statement, wrong number
    of parameters specified, etc."""


class NotSupportedError(DatabaseError):

    """Exception raised in case a method or database API was used
    which is not supported by the database, e.g. requesting a
    .rollback() on a connection that does not support transaction or
    has transactions turned off."""


error_map = {}

def _map_error(exc, *errors):
    for error in errors:
        error_map[error] = exc

_map_error(ProgrammingError, ER.DB_CREATE_EXISTS, ER.SYNTAX_ERROR,
           ER.PARSE_ERROR, ER.NO_SUCH_TABLE, ER.WRONG_DB_NAME,
           ER.WRONG_TABLE_NAME, ER.FIELD_SPECIFIED_TWICE,
           ER.INVALID_GROUP_FUNC_USE, ER.UNSUPPORTED_EXTENSION,
           ER.TABLE_MUST_HAVE_COLUMNS, ER.CANT_DO_THIS_DURING_AN_TRANSACTION)
_map_error(DataError, ER.WARN_DATA_TRUNCATED, ER.WARN_NULL_TO_NOTNULL,
           ER.WARN_DATA_OUT_OF_RANGE, ER.NO_DEFAULT, ER.PRIMARY_CANT_HAVE_NULL,
           ER.DATA_TOO_LONG, ER.DATETIME_FUNCTION_OVERFLOW)
_map_error(IntegrityError, ER.DUP_ENTRY, ER.NO_REFERENCED_ROW,
           ER.NO_REFERENCED_ROW_2, ER.ROW_IS_REFERENCED, ER.ROW_IS_REFERENCED_2,
           ER.CANNOT_ADD_FOREIGN)
_map_error(NotSupportedError, ER.WARNING_NOT_COMPLETE_ROLLBACK,
           ER.NOT_SUPPORTED_YET, ER.FEATURE_DISABLED, ER.UNKNOWN_STORAGE_ENGINE)

del _map_error, ER

    
def _get_error_info(data):
    errno = struct.unpack('<h', data[1:3])[0]
    if data[3] == "#":
        # version 4.1
        sqlstate = data[4:9].decode("utf8")
        errorvalue = data[9:].decode("utf8")
        return (errno, sqlstate, errorvalue)
    else:
        # version 4.0
        return (errno, None, data[3:].decode("utf8"))

def _check_mysql_exception(errinfo):
    errno, sqlstate, errorvalue = errinfo 
    errorclass = error_map.get(errno, None)
    if errorclass:
        raise errorclass, (errno,errorvalue)

    # couldn't find the right error number
    raise InternalError, (errno, errorvalue)

def raise_mysql_exception(data):
    errinfo = _get_error_info(data)
    _check_mysql_exception(errinfo)
    




Added gluon/contrib/pymysql/tests/__init__.py version [15e49bdd8c].








1
2
3
4
5
6
7
+
+
+
+
+
+
+
from pymysql.tests.test_issues import *
from pymysql.tests.test_example import *
from pymysql.tests.test_basic import *

if __name__ == "__main__":
    import unittest
    unittest.main()

Added gluon/contrib/pymysql/tests/base.py version [4705567ad3].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import pymysql
import unittest

class PyMySQLTestCase(unittest.TestCase):
    databases = [
        {"host":"localhost","user":"root",
         "passwd":"","db":"test_pymysql", "use_unicode": True},
        {"host":"localhost","user":"root","passwd":"","db":"test_pymysql2"}]

    def setUp(self):
        self.connections = []

        for params in self.databases:
            self.connections.append(pymysql.connect(**params))

    def tearDown(self):
        for connection in self.connections:
            connection.close()

Added gluon/contrib/pymysql/tests/test_basic.py version [42267e781e].














































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from pymysql.tests import base
from pymysql import util

import time
import datetime

class TestConversion(base.PyMySQLTestCase):
    def test_datatypes(self):
        """ test every data type """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table test_datatypes (b bit, i int, l bigint, f real, s varchar(32), u varchar(32), bb blob, d date, dt datetime, ts timestamp, td time, t time, st datetime)")
        try:
            # insert values
            v = (True, -3, 123456789012, 5.7, "hello'\" world", u"Espa\xc3\xb1ol", "binary\x00data".encode(conn.charset), datetime.date(1988,2,2), datetime.datetime.now(), datetime.timedelta(5,6), datetime.time(16,32), time.localtime())
            c.execute("insert into test_datatypes (b,i,l,f,s,u,bb,d,dt,td,t,st) values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)", v)
            c.execute("select b,i,l,f,s,u,bb,d,dt,td,t,st from test_datatypes")
            r = c.fetchone()
            self.assertEqual(util.int2byte(1), r[0])
            self.assertEqual(v[1:8], r[1:8])
            # mysql throws away microseconds so we need to check datetimes
            # specially. additionally times are turned into timedeltas.
            self.assertEqual(datetime.datetime(*v[8].timetuple()[:6]), r[8])
            self.assertEqual(v[9], r[9]) # just timedeltas
            self.assertEqual(datetime.timedelta(0, 60 * (v[10].hour * 60 + v[10].minute)), r[10])
            self.assertEqual(datetime.datetime(*v[-1][:6]), r[-1])

            c.execute("delete from test_datatypes")

            # check nulls
            c.execute("insert into test_datatypes (b,i,l,f,s,u,bb,d,dt,td,t,st) values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)", [None] * 12)
            c.execute("select b,i,l,f,s,u,bb,d,dt,td,t,st from test_datatypes")
            r = c.fetchone()
            self.assertEqual(tuple([None] * 12), r)

            c.execute("delete from test_datatypes")

            # check sequence type
            c.execute("insert into test_datatypes (i, l) values (2,4), (6,8), (10,12)")
            c.execute("select l from test_datatypes where i in %s order by i", ((2,6),))
            r = c.fetchall()
            self.assertEqual(((4,),(8,)), r)
        finally:
            c.execute("drop table test_datatypes")

    def test_dict(self):
        """ test dict escaping """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table test_dict (a integer, b integer, c integer)")
        try:
            c.execute("insert into test_dict (a,b,c) values (%(a)s, %(b)s, %(c)s)", {"a":1,"b":2,"c":3})
            c.execute("select a,b,c from test_dict")
            self.assertEqual((1,2,3), c.fetchone())
        finally:
            c.execute("drop table test_dict")

    def test_big_blob(self):
        """ test tons of data """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table test_big_blob (b blob)")
        try:
            data = "pymysql" * 1024
            c.execute("insert into test_big_blob (b) values (%s)", (data,))
            c.execute("select b from test_big_blob")
            self.assertEqual(data.encode(conn.charset), c.fetchone()[0])
        finally:
            c.execute("drop table test_big_blob")

class TestCursor(base.PyMySQLTestCase):
    # this test case does not work quite right yet, however,
    # we substitute in None for the erroneous field which is
    # compatible with the DB-API 2.0 spec and has not broken
    # any unit tests for anything we've tried.

    #def test_description(self):
    #    """ test description attribute """
    #    # result is from MySQLdb module
    #    r = (('Host', 254, 11, 60, 60, 0, 0),
    #         ('User', 254, 16, 16, 16, 0, 0),
    #         ('Password', 254, 41, 41, 41, 0, 0),
    #         ('Select_priv', 254, 1, 1, 1, 0, 0),
    #         ('Insert_priv', 254, 1, 1, 1, 0, 0),
    #         ('Update_priv', 254, 1, 1, 1, 0, 0),
    #         ('Delete_priv', 254, 1, 1, 1, 0, 0),
    #         ('Create_priv', 254, 1, 1, 1, 0, 0),
    #         ('Drop_priv', 254, 1, 1, 1, 0, 0),
    #         ('Reload_priv', 254, 1, 1, 1, 0, 0),
    #         ('Shutdown_priv', 254, 1, 1, 1, 0, 0),
    #         ('Process_priv', 254, 1, 1, 1, 0, 0),
    #         ('File_priv', 254, 1, 1, 1, 0, 0),
    #         ('Grant_priv', 254, 1, 1, 1, 0, 0),
    #         ('References_priv', 254, 1, 1, 1, 0, 0),
    #         ('Index_priv', 254, 1, 1, 1, 0, 0),
    #         ('Alter_priv', 254, 1, 1, 1, 0, 0),
    #         ('Show_db_priv', 254, 1, 1, 1, 0, 0),
    #         ('Super_priv', 254, 1, 1, 1, 0, 0),
    #         ('Create_tmp_table_priv', 254, 1, 1, 1, 0, 0),
    #         ('Lock_tables_priv', 254, 1, 1, 1, 0, 0),
    #         ('Execute_priv', 254, 1, 1, 1, 0, 0),
    #         ('Repl_slave_priv', 254, 1, 1, 1, 0, 0),
    #         ('Repl_client_priv', 254, 1, 1, 1, 0, 0),
    #         ('Create_view_priv', 254, 1, 1, 1, 0, 0),
    #         ('Show_view_priv', 254, 1, 1, 1, 0, 0),
    #         ('Create_routine_priv', 254, 1, 1, 1, 0, 0),
    #         ('Alter_routine_priv', 254, 1, 1, 1, 0, 0),
    #         ('Create_user_priv', 254, 1, 1, 1, 0, 0),
    #         ('Event_priv', 254, 1, 1, 1, 0, 0),
    #         ('Trigger_priv', 254, 1, 1, 1, 0, 0),
    #         ('ssl_type', 254, 0, 9, 9, 0, 0),
    #         ('ssl_cipher', 252, 0, 65535, 65535, 0, 0),
    #         ('x509_issuer', 252, 0, 65535, 65535, 0, 0),
    #         ('x509_subject', 252, 0, 65535, 65535, 0, 0),
    #         ('max_questions', 3, 1, 11, 11, 0, 0),
    #         ('max_updates', 3, 1, 11, 11, 0, 0),
    #         ('max_connections', 3, 1, 11, 11, 0, 0),
    #         ('max_user_connections', 3, 1, 11, 11, 0, 0))
    #    conn = self.connections[0]
    #    c = conn.cursor()
    #    c.execute("select * from mysql.user")
    #
    #    self.assertEqual(r, c.description)

    def test_fetch_no_result(self):
        """ test a fetchone() with no rows """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table test_nr (b varchar(32))")
        try:
            data = "pymysql"
            c.execute("insert into test_nr (b) values (%s)", (data,))
            self.assertEqual(None, c.fetchone())
        finally:
            c.execute("drop table test_nr")

__all__ = ["TestConversion","TestCursor"]

if __name__ == "__main__":
    import unittest
    unittest.main()

Added gluon/contrib/pymysql/tests/test_example.py version [546a59aed3].

































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import pymysql
from pymysql.tests import base

class TestExample(base.PyMySQLTestCase):
    def test_example(self):
        conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='', db='mysql')
   

        cur = conn.cursor()

        cur.execute("SELECT Host,User FROM user")

        # print cur.description

        # r = cur.fetchall()
        # print r
        # ...or...
        u = False

        for r in cur.fetchall():
            u = u or conn.user in r

        self.assertTrue(u)

        cur.close()
        conn.close()

__all__ = ["TestExample"]

if __name__ == "__main__":
    import unittest
    unittest.main()

Added gluon/contrib/pymysql/tests/test_issues.py version [5003a3d78d].

















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import pymysql
from pymysql.tests import base

import sys

try:
    import imp
    reload = imp.reload
except AttributeError:
    pass

import datetime

class TestOldIssues(base.PyMySQLTestCase):
    def test_issue_3(self):
        """ undefined methods datetime_or_None, date_or_None """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table issue3 (d date, t time, dt datetime, ts timestamp)")
        try:
            c.execute("insert into issue3 (d, t, dt, ts) values (%s,%s,%s,%s)", (None, None, None, None))
            c.execute("select d from issue3")
            self.assertEqual(None, c.fetchone()[0])
            c.execute("select t from issue3")
            self.assertEqual(None, c.fetchone()[0])
            c.execute("select dt from issue3")
            self.assertEqual(None, c.fetchone()[0])
            c.execute("select ts from issue3")
            self.assertTrue(isinstance(c.fetchone()[0], datetime.datetime))
        finally:
            c.execute("drop table issue3")

    def test_issue_4(self):
        """ can't retrieve TIMESTAMP fields """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table issue4 (ts timestamp)")
        try:
            c.execute("insert into issue4 (ts) values (now())")
            c.execute("select ts from issue4")
            self.assertTrue(isinstance(c.fetchone()[0], datetime.datetime))
        finally:
            c.execute("drop table issue4")

    def test_issue_5(self):
        """ query on information_schema.tables fails """
        con = self.connections[0]
        cur = con.cursor()
        cur.execute("select * from information_schema.tables")

    def test_issue_6(self):
        """ exception: TypeError: ord() expected a character, but string of length 0 found """
        conn = pymysql.connect(host="localhost",user="root",passwd="",db="mysql")
        c = conn.cursor()
        c.execute("select * from user")
        conn.close()

    def test_issue_8(self):
        """ Primary Key and Index error when selecting data """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("""CREATE TABLE `test` (`station` int(10) NOT NULL DEFAULT '0', `dh`
datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `echeance` int(1) NOT NULL
DEFAULT '0', `me` double DEFAULT NULL, `mo` double DEFAULT NULL, PRIMARY
KEY (`station`,`dh`,`echeance`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;""")
        try:
            self.assertEqual(0, c.execute("SELECT * FROM test"))
            c.execute("ALTER TABLE `test` ADD INDEX `idx_station` (`station`)")
            self.assertEqual(0, c.execute("SELECT * FROM test"))
        finally:
            c.execute("drop table test")

    def test_issue_9(self):
        """ sets DeprecationWarning in Python 2.6 """
        try:
            reload(pymysql)
        except DeprecationWarning:
            self.fail()

    def test_issue_10(self):
        """ Allocate a variable to return when the exception handler is permissive """
        conn = self.connections[0]
        conn.errorhandler = lambda cursor, errorclass, errorvalue: None
        cur = conn.cursor()
        cur.execute( "create table t( n int )" )
        cur.execute( "create table t( n int )" )

    def test_issue_13(self):
        """ can't handle large result fields """
        conn = self.connections[0]
        cur = conn.cursor()
        cur.execute("create table issue13 (t text)")
        try:
            # ticket says 18k
            size = 18*1024
            cur.execute("insert into issue13 (t) values (%s)", ("x" * size,))
            cur.execute("select t from issue13")
            # use assert_ so that obscenely huge error messages don't print
            r = cur.fetchone()[0]
            self.assert_("x" * size == r)
        finally:
            cur.execute("drop table issue13")

    def test_issue_14(self):
        """ typo in converters.py """
        self.assertEqual('1', pymysql.converters.escape_item(1, "utf8"))
        self.assertEqual('1', pymysql.converters.escape_item(1L, "utf8"))

        self.assertEqual('1', pymysql.converters.escape_object(1))
        self.assertEqual('1', pymysql.converters.escape_object(1L))

    def test_issue_15(self):
        """ query should be expanded before perform character encoding """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table issue15 (t varchar(32))")
        try:
            c.execute("insert into issue15 (t) values (%s)", (u'\xe4\xf6\xfc'))
            c.execute("select t from issue15")
            self.assertEqual(u'\xe4\xf6\xfc', c.fetchone()[0])
        finally:
            c.execute("drop table issue15")

    def test_issue_16(self):
        """ Patch for string and tuple escaping """
        conn = self.connections[0]
        c = conn.cursor()
        c.execute("create table issue16 (name varchar(32) primary key, email varchar(32))")
        try:
            c.execute("insert into issue16 (name, email) values ('pete', 'floydophone')")
            c.execute("select email from issue16 where name=%s", ("pete",))
            self.assertEqual("floydophone", c.fetchone()[0])
        finally:
            c.execute("drop table issue16")

    def test_issue_17(self):
        """ could not connect mysql use passwod """
        conn = self.connections[0]
        host = self.databases[0]["host"]
        db = self.databases[0]["db"]
        c = conn.cursor()
        # grant access to a table to a user with a password
        try:
            c.execute("create table issue17 (x varchar(32) primary key)")
            c.execute("insert into issue17 (x) values ('hello, world!')")
            c.execute("grant all privileges on %s.issue17 to 'issue17user'@'%%' identified by '1234'" % db)
            conn.commit()
            
            conn2 = pymysql.connect(host=host, user="issue17user", passwd="1234", db=db)
            c2 = conn2.cursor()
            c2.execute("select x from issue17")
            self.assertEqual("hello, world!", c2.fetchone()[0])
        finally:
            c.execute("drop table issue17")

def _uni(s, e):
    # hack for py3
    if sys.version_info[0] > 2:
        return unicode(bytes(s, sys.getdefaultencoding()), e)
    else:
        return unicode(s, e)

class TestNewIssues(base.PyMySQLTestCase):
    def test_issue_34(self):
        try:
            pymysql.connect(host="localhost", port=1237, user="root")
            self.fail()
        except pymysql.OperationalError, e:
            self.assertEqual(2003, e.args[0])
        except:
            self.fail()

    def test_issue_33(self):
        conn = pymysql.connect(host="localhost", user="root", db=self.databases[0]["db"], charset="utf8")
        c = conn.cursor()
        try:
            c.execute(_uni("create table hei\xc3\x9fe (name varchar(32))", "utf8"))
            c.execute(_uni("insert into hei\xc3\x9fe (name) values ('Pi\xc3\xb1ata')", "utf8"))
            c.execute(_uni("select name from hei\xc3\x9fe", "utf8"))
            self.assertEqual(_uni("Pi\xc3\xb1ata","utf8"), c.fetchone()[0])
        finally:
            c.execute(_uni("drop table hei\xc3\x9fe", "utf8"))

    # Will fail without manual intervention:
    #def test_issue_35(self):
    #
    #    conn = self.connections[0]
    #    c = conn.cursor()
    #    print "sudo killall -9 mysqld within the next 10 seconds"
    #    try:
    #        c.execute("select sleep(10)")
    #        self.fail()
    #    except pymysql.OperationalError, e:
    #        self.assertEqual(2013, e.args[0])

    def test_issue_36(self):
        conn = self.connections[0]
        c = conn.cursor()
        # kill connections[0]
        original_count = c.execute("show processlist")
        kill_id = None
        for id,user,host,db,command,time,state,info in c.fetchall():
            if info == "show processlist":
                kill_id = id
                break
        # now nuke the connection
        conn.kill(kill_id)
        # make sure this connection has broken
        try:
            c.execute("show tables")
            self.fail()
        except:
            pass
        # check the process list from the other connection
        self.assertEqual(original_count - 1, self.connections[1].cursor().execute("show processlist"))
        del self.connections[0]

    def test_issue_37(self):
        conn = self.connections[0]
        c = conn.cursor()
        self.assertEqual(1, c.execute("SELECT @foo"))
        self.assertEqual((None,), c.fetchone())
        self.assertEqual(0, c.execute("SET @foo = 'bar'"))
        c.execute("set @foo = 'bar'")

    def test_issue_38(self):
        conn = self.connections[0]
        c = conn.cursor()
        datum = "a" * 1024 * 1023 # reduced size for most default mysql installs
        
        try:
            c.execute("create table issue38 (id integer, data mediumblob)")
            c.execute("insert into issue38 values (1, %s)", datum)
        finally:
            c.execute("drop table issue38")
__all__ = ["TestOldIssues", "TestNewIssues"]

if __name__ == "__main__":
    import unittest
    unittest.main()

Added gluon/contrib/pymysql/times.py version [61417113cb].

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from time import localtime
from datetime import date, datetime, time, timedelta

Date = date
Time = time
TimeDelta = timedelta
Timestamp = datetime

def DateFromTicks(ticks):
    return date(*localtime(ticks)[:3])

def TimeFromTicks(ticks):
    return time(*localtime(ticks)[3:6])

def TimestampFromTicks(ticks):
    return datetime(*localtime(ticks)[:6])

Added gluon/contrib/pymysql/util.py version [22ae6bac87].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import struct

def byte2int(b):
    if isinstance(b, int):
        return b
    else:
        return struct.unpack("!B", b)[0]

def int2byte(i):
    return struct.pack("!B", i)

def join_bytes(bs):
    if len(bs) == 0:
        return ""
    else:
        rv = bs[0]
        for b in bs[1:]:
            rv += b
        return rv

Added gluon/contrib/pyrtf/Constants.py version [2d350ca81b].






























































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ViewKind :
    """An integer (0-5) that represents the view mode of the document."""

    NONE           = 0
    PageLayout     = 1
    Outline        = 2
    MasterDocument = 3
    Normal         = 4
    OnlineLayout   = 5

    DEFAULT = PageLayout

    def _IsValid( cls, value ) :
        return value in [ 0, 1, 2, 3, 4, 5 ]
    IsValid = classmethod( _IsValid )

class ViewScale :
    """Zoom level of the document; the N argument is a value representing a percentage (the default is 100)."""

    def _IsValid( cls, value ) :
        return value is None or (0 < value < 101)
    IsValid = classmethod( _IsValid )

class ViewZoomKind :
    """An integer (0 to 2) that represents the zoom kind of the document."""

    NONE     = 0
    FullPage = 1
    BestFit  = 2

    def _IsValid( cls, value ) :
        return value in [ None, 0, 1, 2 ]
    IsValid = classmethod( _IsValid )


class Languages :
    NoLanguage            = 1024
    Albanian              = 1052
    Arabic                = 1025
    Bahasa                = 1057
    BelgianDutch          = 2067
    BelgianFrench         = 2060
    BrazilianPortuguese   = 1046
    Bulgarian             = 1026
    Catalan               = 1027
    CroatoSerbianLatin    = 1050
    Czech                 = 1029
    Danish                = 1030
    Dutch                 = 1043
    EnglishAustralian     = 3081
    EnglishUK             = 2057
    EnglishUS             = 1033
    Finnish               = 1035
    French                = 1036
    FrenchCanadian        = 3084
    German                = 1031
    Greek                 = 1032
    Hebrew                = 1037
    Hungarian             = 1038
    Icelandic             = 1039
    Italian               = 1040
    Japanese              = 1041
    Korean                = 1042
    NorwegianBokmal       = 1044
    NorwegianNynorsk      = 2068
    Polish                = 1045
    Portuguese            = 2070
    RhaetoRomanic         = 1047
    Romanian              = 1048
    Russian               = 1049
    SerboCroatianCyrillic = 2074
    SimplifiedChinese     = 2052
    Slovak                = 1051
    SpanishCastilian      = 1034
    SpanishMexican        = 2058
    Swedish               = 1053
    SwissFrench           = 4108
    SwissGerman           = 2055
    SwissItalian          = 2064
    Thai                  = 1054
    TraditionalChinese    = 1028
    Turkish               = 1055
    Urdu                  = 1056
    SesothoSotho          = 1072
    Afrikaans             = 1078
    Zulu                  = 1077
    Xhosa                 = 1076
    Venda                 = 1075
    Tswana                = 1074
    Tsonga                = 1073
    FarsiPersian          = 1065

    Codes = [ 1024,
              1052,
              1025,
              1057,
              2067,
              2060,
              1046,
              1026,
              1027,
              1050,
              1029,
              1030,
              1043,
              3081,
              2057,
              1033,
              1035,
              1036,
              3084,
              1031,
              1032,
              1037,
              1038,
              1039,
              1040,
              1041,
              1042,
              1044,
              2068,
              1045,
              2070,
              1047,
              1048,
              1049,
              2074,
              2052,
              1051,
              1034,
              2058,
              1053,
              4108,
              2055,
              2064,
              1054,
              1028,
              1055,
              1056,
              1072,
              1078,
              1077,
              1076,
              1075,
              1074,
              1073,
              1065 ]

    #  make it Australian as that is what I use most of the time
    DEFAULT = EnglishAustralian

    def _IsValid( cls, value ) :
        return value in cls.Codes
    IsValid = classmethod( _IsValid )

if __name__ == '__main__' :
    PrintHexTable()

Added gluon/contrib/pyrtf/Elements.py version [35d5cf4635].





















































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from    types       import  IntType, FloatType, LongType, StringTypes
from    copy        import  deepcopy
from    binascii    import  hexlify

from    Constants   import  *
from    Styles      import  *

class UnhandledParamError( Exception ) :
    def __init__( self, param ) :
        Exception.__init__( self, "Don't know what to do with param %s" % param )

#                                               red green blue
StandardColours = Colours()
StandardColours.append( Colour( 'Black',         0,    0,   0 ) )
StandardColours.append( Colour( 'Blue',          0,    0, 255 ) )
StandardColours.append( Colour( 'Turquoise',     0,  255, 255 ) )
StandardColours.append( Colour( 'Green',         0,  255,   0 ) )
StandardColours.append( Colour( 'Pink',        255,    0, 255 ) )
StandardColours.append( Colour( 'Red',         255,    0,   0 ) )
StandardColours.append( Colour( 'Yellow',      255,  255,   0 ) )
StandardColours.append( Colour( 'White',       255,  255, 255 ) )
StandardColours.append( Colour( 'Blue Dark',     0,    0, 128 ) )
StandardColours.append( Colour( 'Teal',          0,  128, 128 ) )
StandardColours.append( Colour( 'Green Dark',    0,  128,   0 ) )
StandardColours.append( Colour( 'Violet',      128,    0, 128 ) )
StandardColours.append( Colour( 'Red Dark',    128,    0,   0 ) )
StandardColours.append( Colour( 'Yellow Dark', 128,  128,   0 ) )
StandardColours.append( Colour( 'Grey Dark',   128,  128, 128 ) )
StandardColours.append( Colour( 'Grey',        192,  192, 192 ) )

StandardFonts = Fonts()
StandardFonts.append( Font( 'Arial'                   , 'swiss' , 0, 2, '020b0604020202020204' ) )
StandardFonts.append( Font( 'Arial Black'             , 'swiss' , 0, 2, '020b0a04020102020204' ) )
StandardFonts.append( Font( 'Arial Narrow'            , 'swiss' , 0, 2, '020b0506020202030204' ) )
StandardFonts.append( Font( 'Bitstream Vera Sans Mono', 'modern', 0, 1, '020b0609030804020204' ) )
StandardFonts.append( Font( 'Bitstream Vera Sans'     , 'swiss' , 0, 2, '020b0603030804020204' ) )
StandardFonts.append( Font( 'Bitstream Vera Serif'    , 'roman' , 0, 2, '02060603050605020204' ) )
StandardFonts.append( Font( 'Book Antiqua'            , 'roman' , 0, 2, '02040602050305030304' ) )
StandardFonts.append( Font( 'Bookman Old Style'       , 'roman' , 0, 2, '02050604050505020204' ) )
StandardFonts.append( Font( 'Castellar'               , 'roman' , 0, 2, '020a0402060406010301' ) )
StandardFonts.append( Font( 'Century Gothic'          , 'swiss' , 0, 2, '020b0502020202020204' ) )
StandardFonts.append( Font( 'Comic Sans MS'           , 'script', 0, 2, '030f0702030302020204' ) )
StandardFonts.append( Font( 'Courier New'             , 'modern', 0, 1, '02070309020205020404' ) )
StandardFonts.append( Font( 'Franklin Gothic Medium'  , 'swiss' , 0, 2, '020b0603020102020204' ) )
StandardFonts.append( Font( 'Garamond'                , 'roman' , 0, 2, '02020404030301010803' ) )
StandardFonts.append( Font( 'Georgia'                 , 'roman' , 0, 2, '02040502050405020303' ) )
StandardFonts.append( Font( 'Haettenschweiler'        , 'swiss' , 0, 2, '020b0706040902060204' ) )
StandardFonts.append( Font( 'Impact'                  , 'swiss' , 0, 2, '020b0806030902050204' ) )
StandardFonts.append( Font( 'Lucida Console'          , 'modern', 0, 1, '020b0609040504020204' ) )
StandardFonts.append( Font( 'Lucida Sans Unicode'     , 'swiss' , 0, 2, '020b0602030504020204' ) )
StandardFonts.append( Font( 'Microsoft Sans Serif'    , 'swiss' , 0, 2, '020b0604020202020204' ) )
StandardFonts.append( Font( 'Monotype Corsiva'        , 'script', 0, 2, '03010101010201010101' ) )
StandardFonts.append( Font( 'Palatino Linotype'       , 'roman' , 0, 2, '02040502050505030304' ) )
StandardFonts.append( Font( 'Papyrus'                 , 'script', 0, 2, '03070502060502030205' ) )
StandardFonts.append( Font( 'Sylfaen'                 , 'roman' , 0, 2, '010a0502050306030303' ) )
StandardFonts.append( Font( 'Symbol'                  , 'roman' , 2, 2, '05050102010706020507' ) )
StandardFonts.append( Font( 'Tahoma'                  , 'swiss' , 0, 2, '020b0604030504040204' ) )
StandardFonts.append( Font( 'Times New Roman'         , 'roman' , 0, 2, '02020603050405020304' ) )
StandardFonts.append( Font( 'Trebuchet MS'            , 'swiss' , 0, 2, '020b0603020202020204' ) )
StandardFonts.append( Font( 'Verdana'                 , 'swiss' , 0, 2, '020b0604030504040204' ) )

StandardFonts.Castellar.SetAlternate( StandardFonts.Georgia )

"""
Found the following definition at http://www.pbdr.com/vbtips/gen/convtwip.htm

Twips are screen-independent units used to ensure that the placement and
proportion of screen elements in your screen application are the same on all
display systems. A twip is a unit of screen measurement equal to 1/20 of a
printer's point. The conversion between twips and
inches/centimeters/millimeters is as follows:

There are approximately 1440 twips to a inch (the length of a screen item
measuring one inch when printed).

As there are 2.54 centimeters to 1 inch, then there are approximately 567
twips to a centimeter (the length of a screen item measuring one centimeter
when printed).

Or in millimeters, as there are 25.4 millimeters to 1 inch, therefore there
are approximately 56.7 twips to a millimeter (the length of a screen item
measuring one millimeter when printed)."""

# Width default is 12240, Height default is 15840
StandardPaper = Papers()
StandardPaper.append( Paper( 'LETTER'             ,  1,  'Letter 8 1/2 x 11 in'               ,   12240,  15840 ) )
StandardPaper.append( Paper( 'LETTERSMALL'        ,  2,  'Letter Small 8 1/2 x 11 in'         ,   12240,  15840 ) )
StandardPaper.append( Paper( 'TABLOID'            ,  3,  'Tabloid 11 x 17 in'                 ,   15840,  24480 ) )
StandardPaper.append( Paper( 'LEDGER'             ,  4,  'Ledger 17 x 11 in'                  ,   24480,  15840 ) )
StandardPaper.append( Paper( 'LEGAL'              ,  5,  'Legal 8 1/2 x 14 in'                ,   12240,  20160 ) )
StandardPaper.append( Paper( 'STATEMENT'          ,  6,  'Statement 5 1/2 x 8 1/2 in'         ,    7920,  12240 ) )
StandardPaper.append( Paper( 'EXECUTIVE'          ,  7,  'Executive 7 1/4 x 10 1/2 in'        ,   10440,  15120 ) )
StandardPaper.append( Paper( 'A3'                 ,  8,  'A3 297 x 420 mm'                    ,   16838,  23811 ) )
StandardPaper.append( Paper( 'A4'                 ,  9,  'A4 210 x 297 mm'                    ,   11907,  16838 ) )
StandardPaper.append( Paper( 'A4SMALL'            , 10,  'A4 Small 210 x 297 mm'              ,   11907,  16838 ) )
StandardPaper.append( Paper( 'A5'                 , 11,  'A5 148 x 210 mm'                    ,    8391,  11907 ) )
StandardPaper.append( Paper( 'B4'                 , 12,  'B4 (JIS) 250 x 354'                 ,   14175,  20072 ) )
StandardPaper.append( Paper( 'B5'                 , 13,  'B5 (JIS) 182 x 257 mm'              ,   10319,  14572 ) )
StandardPaper.append( Paper( 'FOLIO'              , 14,  'Folio 8 1/2 x 13 in'                ,   12240,  18720 ) )
StandardPaper.append( Paper( 'QUARTO'             , 15,  'Quarto 215 x 275 mm'                ,   12191,  15593 ) )
StandardPaper.append( Paper( '10X14'              , 16,  '10x14 in'                           ,   14400,  20160 ) )
StandardPaper.append( Paper( '11X17'              , 17,  '11x17 in'                           ,   15840,  24480 ) )
StandardPaper.append( Paper( 'NOTE'               , 18,  'Note 8 1/2 x 11 in'                 ,   12240,  15840 ) )
StandardPaper.append( Paper( 'ENV_9'              , 19,  'Envelope #9 3 7/8 x 8 7/8'          ,    5580,  12780 ) )
StandardPaper.append( Paper( 'ENV_10'             , 20,  'Envelope #10 4 1/8 x 9 1/2'         ,    5940,  13680 ) )
StandardPaper.append( Paper( 'ENV_11'             , 21,  'Envelope #11 4 1/2 x 10 3/8'        ,    6480,  14940 ) )
StandardPaper.append( Paper( 'ENV_12'             , 22,  'Envelope #12 4 3/4 x 11'            ,    6840,  15840 ) )
StandardPaper.append( Paper( 'ENV_14'             , 23,  'Envelope #14 5 x 11 1/2'            ,    7200,  16560 ) )
StandardPaper.append( Paper( 'CSHEET'             , 24,  'C size sheet 18 x 24 in'            ,   29520,  34560 ) )
StandardPaper.append( Paper( 'DSHEET'             , 25,  'D size sheet 22 x 34 in'            ,   31680,  48960 ) )
StandardPaper.append( Paper( 'ESHEET'             , 26,  'E size sheet 34 x 44 in'            ,   48960,  63360 ) )
StandardPaper.append( Paper( 'ENV_DL'             , 27,  'Envelope DL 110 x 220mm'            ,    6237,  12474 ) )
StandardPaper.append( Paper( 'ENV_C5'             , 28,  'Envelope C5 162 x 229 mm'           ,    9185,  12984 ) )
StandardPaper.append( Paper( 'ENV_C3'             , 29,  'Envelope C3  324 x 458 mm'          ,   18371,  25969 ) )
StandardPaper.append( Paper( 'ENV_C4'             , 30,  'Envelope C4  229 x 324 mm'          ,   12984,  18371 ) )
StandardPaper.append( Paper( 'ENV_C6'             , 31,  'Envelope C6  114 x 162 mm'          ,    6464,   9185 ) )
StandardPaper.append( Paper( 'ENV_C65'            , 32,  'Envelope C65 114 x 229 mm'          ,    6464,  12984 ) )
StandardPaper.append( Paper( 'ENV_B4'             , 33,  'Envelope B4  250 x 353 mm'          ,   14175,  20015 ) )
StandardPaper.append( Paper( 'ENV_B5'             , 34,  'Envelope B5  176 x 250 mm'          ,    9979,  14175 ) )
StandardPaper.append( Paper( 'ENV_B6'             , 35,  'Envelope B6  176 x 125 mm'          ,    9979,   7088 ) )
StandardPaper.append( Paper( 'ENV_ITALY'          , 36,  'Envelope 110 x 230 mm'              ,    6237,  13041 ) )
StandardPaper.append( Paper( 'ENV_MONARCH'        , 37,  'Envelope Monarch 3.875 x 7.5 in'    ,    5580,  10800 ) )
StandardPaper.append( Paper( 'ENV_PERSONAL'       , 38,  '6 3/4 Envelope 3 5/8 x 6 1/2 in'    ,    5220,   9360 ) )
StandardPaper.append( Paper( 'FANFOLD_US'         , 39,  'US Std Fanfold 14 7/8 x 11 in'      ,   21420,  15840 ) )
StandardPaper.append( Paper( 'FANFOLD_STD_GERMAN' , 40,  'German Std Fanfold 8 1/2 x 12 in'   ,   12240,  17280 ) )
StandardPaper.append( Paper( 'FANFOLD_LGL_GERMAN' , 41,  'German Legal Fanfold 8 1/2 x 13 in' ,   12240,  18720 ) )

#
#   Finally a StyleSheet in which all of this stuff is put together
#
class StyleSheet :
    def __init__( self, colours=None, fonts=None ) :

        self.Colours = colours or deepcopy( StandardColours )
        self.Fonts   = fonts   or deepcopy( StandardFonts   )

        self.TextStyles      = AttributedList()
        self.ParagraphStyles = AttributedList()

class Section( list ) :
    NONE   = 1
    COLUMN = 2
    PAGE   = 3
    EVEN   = 4
    ODD    = 5
    BREAK_TYPES = [ NONE, COLUMN, PAGE, EVEN, ODD ]

    def __init__( self, paper=None, margins=None, break_type=None, headery=None, footery=None, landscape=None, first_page_number=None ) :
        super( Section, self ).__init__()

        self.Paper   = paper   or StandardPaper.A4
        self.SetMargins( margins )

        self.Header = []
        self.Footer = []
        self.FirstHeader = []
        self.FirstFooter = []

        self.SetBreakType( break_type or self.NONE )
        self.SetHeaderY( headery )
        self.SetFooterY( footery )
        self.SetLandscape( landscape )
        self.SetFirstPageNumber( first_page_number )

    def TwipsToRightMargin( self ) :
        return self.Paper.Width - ( self.Margins.Left + self.Margins.Right )

    def SetMargins( self, value ) :
        self.Margins = value or MarginsPropertySet( top=1000, left=1200, bottom=1000, right=1200 )
        self.Width   = self.Paper.Width - ( self.Margins.Left + self.Margins.Right )

    def SetBreakType( self, value ) :
        assert value in self.BREAK_TYPES
        self.BreakType = value
        return self

    def SetHeaderY( self, value ) :
        self.HeaderY = value
        return self

    def SetFooterY( self, value ) :
        self.FooterY = value
        return self

    def SetLandscape( self, value ) :
        self.Landscape = False
        if value : self.Landscape = True
        return self

    def SetFirstPageNumber( self, value ) :
        self.FirstPageNumber = value
        return self

def MakeDefaultStyleSheet( ) :
    result = StyleSheet()

    NormalText = TextStyle( TextPropertySet( result.Fonts.Arial, 22 ) )

    ps = ParagraphStyle( 'Normal',
                         NormalText.Copy(),
                         ParagraphPropertySet( space_before = 60,
                                               space_after  = 60 ) )
    result.ParagraphStyles.append( ps )

    ps = ParagraphStyle( 'Normal Short',
                         NormalText.Copy() )
    result.ParagraphStyles.append( ps )

    NormalText.TextPropertySet.SetSize( 32 )
    ps = ParagraphStyle( 'Heading 1',
                         NormalText.Copy(),
                         ParagraphPropertySet( space_before = 240,
                                               space_after  = 60 ) )
    result.ParagraphStyles.append( ps )

    NormalText.TextPropertySet.SetSize( 24 ).SetBold( True )
    ps = ParagraphStyle( 'Heading 2',
                         NormalText.Copy(),
                         ParagraphPropertySet( space_before = 240,
                                               space_after  = 60 ) )
    result.ParagraphStyles.append( ps )

    #   Add some more in that are based on the normal template but that
    #   have some indenting set that makes them suitable for doing numbered
    normal_numbered = result.ParagraphStyles.Normal.Copy()
    normal_numbered.SetName( 'Normal Numbered' )
    normal_numbered.ParagraphPropertySet.SetFirstLineIndent( TabPropertySet.DEFAULT_WIDTH * -1 )
    normal_numbered.ParagraphPropertySet.SetLeftIndent     ( TabPropertySet.DEFAULT_WIDTH )

    result.ParagraphStyles.append( normal_numbered )

    normal_numbered2 = result.ParagraphStyles.Normal.Copy()
    normal_numbered2.SetName( 'Normal Numbered 2' )
    normal_numbered2.ParagraphPropertySet.SetFirstLineIndent( TabPropertySet.DEFAULT_WIDTH * -1 )
    normal_numbered2.ParagraphPropertySet.SetLeftIndent     ( TabPropertySet.DEFAULT_WIDTH *  2 )

    result.ParagraphStyles.append( normal_numbered2 )

    ## LIST STYLES
    for idx, indent in [ (1, TabPS.DEFAULT_WIDTH    ),
                         (2, TabPS.DEFAULT_WIDTH * 2),
                         (3, TabPS.DEFAULT_WIDTH * 3) ] :
        indent = TabPropertySet.DEFAULT_WIDTH
        ps = ParagraphStyle( 'List %s' % idx,
                             TextStyle( TextPropertySet( result.Fonts.Arial, 22 ) ),
                             ParagraphPropertySet( space_before = 60,
                                                   space_after  = 60,
                                                   first_line_indent = -indent,
                                                   left_indent       = indent) )
        result.ParagraphStyles.append( ps )

    return result

class TAB  : pass
class LINE : pass

class RawCode :
    def __init__( self, data ) :
        self.Data = data

PAGE_NUMBER   = RawCode( r'{\field{\fldinst page}}'   )
TOTAL_PAGES   = RawCode( r'{\field{\fldinst numpages}}' )
SECTION_PAGES = RawCode( r'{\field{\fldinst sectionpages}}' )
ARIAL_BULLET  = RawCode( r'{\f2\'95}' )

def _get_jpg_dimensions( fin ):
    """
    converted from: http://dev.w3.org/cvsweb/Amaya/libjpeg/rdjpgcom.c?rev=1.2
    """

    M_SOF0   = chr( 0xC0 )  #   /* Start Of Frame N */
    M_SOF1   = chr( 0xC1 )  #   /* N indicates which compression process */
    M_SOF2   = chr( 0xC2 )  #   /* Only SOF0-SOF2 are now in common use */
    M_SOF3   = chr( 0xC3 )  #
    M_SOF5   = chr( 0xC5 )  #   /* NB: codes C4 and CC are NOT SOF markers */
    M_SOF6   = chr( 0xC6 )  #
    M_SOF7   = chr( 0xC7 )  #
    M_SOF9   = chr( 0xC9 )  #
    M_SOF10  = chr( 0xCA )  #
    M_SOF11  = chr( 0xCB )  #
    M_SOF13  = chr( 0xCD )  #
    M_SOF14  = chr( 0xCE )  #
    M_SOF15  = chr( 0xCF )  #
    M_SOI    = chr( 0xD8 )  #   /* Start Of Image (beginning of datastream) */
    M_EOI    = chr( 0xD9 )  #   /* End Of Image (end of datastream) */

    M_FF = chr( 0xFF )

    MARKERS = [ M_SOF0, M_SOF1,  M_SOF2,  M_SOF3,
                M_SOF5, M_SOF6,  M_SOF7,  M_SOF9,
                M_SOF10,M_SOF11, M_SOF13, M_SOF14,
                M_SOF15 ]

    def get_length() :
        b1 = fin.read( 1 )
        b2 = fin.read( 1 )
        return (ord(b1) << 8) + ord(b2)

    def next_marker() :
        #  markers come straight after an 0xFF so skip everything
        #  up to the first 0xFF that we find
        while fin.read(1) != M_FF :
            pass

        #  there can be more than one 0xFF as they can be used
        #  for padding so we are now looking for the first byte
        #  that isn't an 0xFF, this will be the marker
        while True :
            result = fin.read(1)
            if result != M_FF :
                return result

        raise Exception( 'Invalid JPEG' )

    #  BODY OF THE FUNCTION
    if not ((fin.read(1) == M_FF) and (fin.read(1) == M_SOI)) :
        raise Exception( 'Invalid Jpeg' )

    while True :
        marker = next_marker()

        #  the marker is always followed by two bytes representing the length of the data field
        length = get_length ()
        if length < 2 : raise Exception( "Erroneous JPEG marker length" )

        #  if it is a compression process marker then it will contain the dimension of the image
        if marker in MARKERS :
            #  the next byte is the data precision, just skip it
            fin.read(1)

            #  bingo
            image_height = get_length()
            image_width  = get_length()
            return image_width, image_height

        #  just skip whatever data it contains
        fin.read( length - 2 )

    raise Exception( 'Invalid JPEG, end of stream reached' )


_PNG_HEADER = '\x89\x50\x4e'
def _get_png_dimensions( data ) :
    if data[0:3] != _PNG_HEADER :
        raise Exception( 'Invalid PNG image' )

    width  = (ord(data[18]) * 256) + (ord(data[19]))
    height = (ord(data[22]) * 256) + (ord(data[23]))
    return width, height

def _get_emf_dimensions( fin ):
    import struct
    def get_DWORD():
        return struct.unpack("<L",fin.read(4))[0]
    def get_LONG():
        return struct.unpack("<l",fin.read(4))[0]
    def get_WORD():
        return struct.unpack("<H",fin.read(2))[0]
    class Empty:
        pass
    header = Empty()
    header.RecordType = get_DWORD()      # Record type
    header.RecordSize = get_DWORD()      # Size of the record in bytes
    header.BoundsLeft = get_LONG()       # Left inclusive bounds
    header.BoundsTop = get_LONG()        # Top inclusive bounds
    header.BoundsRight = get_LONG()      # Right inclusive bounds
    header.BoundsBottom = get_LONG()     # Bottom inclusive bounds
    header.FrameLeft = get_LONG()        # Left side of inclusive picture frame
    header.FrameTop = get_LONG()         # Top side of inclusive picture frame
    header.FrameRight = get_LONG()       # Right side of inclusive picture frame
    header.FrameBottom = get_LONG()      # Bottom side of inclusive picture frame
    header.Signature = get_DWORD()       # Signature ID (always 0x464D4520)
    header.Version = get_DWORD()         # Version of the metafile
    header.Size = get_DWORD()            # Size of the metafile in bytes
    header.NumOfRecords = get_DWORD()    # Number of records in the metafile
    header.NumOfHandles = get_WORD()     # Number of handles in the handle table
    header.Reserved = get_WORD()         # Not used (always 0)
    header.SizeOfDescrip = get_DWORD()   # Size of description string in WORDs
    header.OffsOfDescrip = get_DWORD()   # Offset of description string in metafile
    header.NumPalEntries = get_DWORD()   # Number of color palette entries
    header.WidthDevPixels = get_LONG()   # Width of reference device in pixels
    header.HeightDevPixels = get_LONG()  # Height of reference device in pixels
    header.WidthDevMM = get_LONG()       # Width of reference device in millimeters
    header.HeightDevMM = get_LONG()      # Height of reference device in millimeters

    if 0:
        klist = header.__dict__.keys()
        klist.sort()
        for k in klist:
            print "%20s:%s" % (k,header.__dict__[k])

    dw = header.FrameRight-header.FrameLeft
    dh = header.FrameBottom-header.FrameTop

    # convert from 0.01mm units to 1/72in units
    return int(dw * 72.0/2540.0), int(dh * 72.0/2540.0)

class Image( RawCode ) :

    #  Need to add in the width and height in twips as it crashes
    #  word xp with these values.  Still working out the most
    #  efficient way of getting these values.
    # \picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0
    # picwgoal900\pichgoal281

    PNG_LIB = 'pngblip'
    JPG_LIB = 'jpegblip'
    EMF_LIB = 'emfblip'
    PICT_TYPES = { 'png' : PNG_LIB,
                   'jpg' : JPG_LIB,
                   'emf' : EMF_LIB}

    def __init__( self, infile, **kwargs ) :

        if hasattr( infile, 'read' ):
            fin = infile
            if 'datatype' not in kwargs.keys():
                msg = "If passing in a file object, you must also specify type='xxx' where xxx is one of %s" % self.PICT_TYPES.keys()
                raise ValueError,msg
            file_name = kwargs.pop('datatype')
        else:
            fin = file( infile, 'rb' )
            file_name = infile

        pict_type = self.PICT_TYPES[ file_name[ -3 : ].lower() ]
        if pict_type == self.PNG_LIB :
            width, height = _get_png_dimensions( fin.read( 100 ) )
        elif pict_type == self.JPG_LIB :
            width, height = _get_jpg_dimensions( fin )
        elif pict_type == self.EMF_LIB :
            width, height = _get_emf_dimensions( fin )


        # if user specified height or width but not both, then
        # scale unspecified dimension to maintain aspect ratio

        if ('width' in kwargs) and ('height' not in kwargs):
            height = int(height * float(kwargs['width'])/width)
        elif ('height' in kwargs) and ('width' not in kwargs):
            width = int(width * float(kwargs['height'])/height)

        width  = kwargs.pop('width',width)
        height = kwargs.pop('height', height)

        codes = [ pict_type,
                  'picwgoal%s' % (width  * 20),
                  'pichgoal%s' % (height * 20) ]
        # let user specify global scaling
        scale = kwargs.pop('scale',100)

        for kwarg, code, default in [ ( 'scale_x',     'scalex', scale ),
                                      ( 'scale_y',     'scaley', scale ),
                                      ( 'crop_left',   'cropl',    '0' ),
                                      ( 'crop_right',  'cropr',    '0' ),
                                      ( 'crop_top',    'cropt',    '0' ),
                                      ( 'crop_bottom', 'cropb',    '0' ) ] :
            codes.append( 'pic%s%s' % ( code, kwargs.pop( kwarg, default ) ) )


        #  reset back to the start of the file to get all of it and now
        #  turn it into hex.
        fin.seek( 0, 0 )
        image = hexlify( fin.read() )
        fin.close()
        data = []
        for i in range( 0, len( image ), 128 ) :
            data.append( image[ i : i + 128 ] )

        data = r'{\pict{\%s}%s}' % ( '\\'.join( codes ), '\n'.join( data ) )
        RawCode.__init__( self, data )

    def ToRawCode( self, var_name ) :
        return '%s = RawCode( """%s""" )' % ( var_name, self.Data )

class Text :
    def __init__( self, *params ) :
        self.Data       = None
        self.Style      = None
        self.Properties = None
        self.Shading    = None

        for param in params :
            if   isinstance( param, TextStyle  ) : self.Style      = param
            elif isinstance( param, TextPS     ) : self.Properties = param
            elif isinstance( param, ShadingPS  ) : self.Shading    = param
            else :
                #   otherwise let the rendering custom handler sort it out itself
                self.Data = param

    def SetData( self, value ) :
        self.Data = value

class Inline( list ) :
    def __init__( self, *params ) :
        super( Inline, self ).__init__()

        self.Style      = None
        self.Properties = None
        self.Shading    = None

        self._append = super( Inline, self ).append

        for param in params :
            if   isinstance( param, TextStyle  ) : self.Style      = param
            elif isinstance( param, TextPS     ) : self.Properties = param
            elif isinstance( param, ShadingPS  ) : self.Shading    = param
            else :
                #   otherwise we add to it to our list of elements and let
                #   the rendering custom handler sort it out itself.
                self.append( param )

    def append( self, *params ) :
        #   filter out any that are explicitly None
        [ self._append( param ) for param in params if param is not None ]

class Paragraph( list ) :
    def __init__( self, *params ) :
        super( Paragraph, self ).__init__()

        self.Style      = None
        self.Properties = None
        self.Frame      = None
        self.Shading    = None

        self._append = super( Paragraph, self ).append

        for param in params :
            if   isinstance( param, ParagraphStyle ) : self.Style      = param
            elif isinstance( param, ParagraphPS    ) : self.Properties = param
            elif isinstance( param, FramePS        ) : self.Frame      = param
            elif isinstance( param, ShadingPS      ) : self.Shading    = param
            else :
                #   otherwise we add to it to our list of elements and let
                #   the rendering custom handler sort it out itself.
                self.append( param )

    def append( self, *params ) :
        #   filter out any that are explicitly None
        [ self._append( param ) for param in params if param is not None ]

    def insert( self, index, value ) :
        if value is not None :
            super( Paragraph, self ).insert( index, value )

class Table :
    LEFT    = 1
    RIGHT   = 2
    CENTER  = 3
    ALIGNMENT = [ LEFT, RIGHT, CENTER ]

    NO_WRAPPING = 1
    WRAP_AROUND = 2
    WRAPPING = [ NO_WRAPPING, WRAP_AROUND ]

    #   trrh height of row, 0 means automatically adjust, use negative for an absolute
    #   trgaph is half of the space between a table cell in width, reduce this one
    #   to get a really tiny column

    def __init__( self, *column_widths, **kwargs ) :

        self.Rows = []

        self.SetAlignment      ( kwargs.pop( 'alignment',         self.LEFT ) )
        self.SetLeftOffset     ( kwargs.pop( 'left_offset',       None      ) )
        self.SetGapBetweenCells( kwargs.pop( 'gap_between_cells', None      ) )
        self.SetColumnWidths   ( *column_widths         )

        assert not kwargs, 'invalid keyword args %s' % kwargs

    def SetAlignment( self, value ) :
        assert value is None or value in self.ALIGNMENT
        self.Alignment = value or self.LEFT
        return self

    def SetLeftOffset( self, value ) :
        self.LeftOffset = value
        return self

    def SetGapBetweenCells( self, value ) :
        self.GapBetweenCells = value
        return self

    def SetColumnWidths( self, *column_widths ) :
        self.ColumnWidths = column_widths
        self.ColumnCount  = len( column_widths )
        return self

    def AddRow( self, *cells ) :
        height = None
        if isinstance( cells[ 0 ], (IntType, FloatType, LongType) ):
            height = int( cells[ 0 ] )
            cells  = cells[ 1 : ]

        #  make sure all of the spans add up to the number of columns
        #  otherwise the table will get corrupted
        if self.ColumnCount != sum( [ cell.Span for cell in cells ] ) :
            raise Exception( 'ColumnCount != the total of this row\'s cell.Spans.' )

        self.Rows.append( ( height, cells ) )

    append = AddRow

class Cell( list ) :

    """
    \clvertalt  Text is top-aligned in cell (the default).
    \clvertalc  Text is centered vertically in cell.
    \clvertalb  Text is bottom-aligned in cell.
    \cltxlrtb   Vertical text aligned left (direction bottom up).
    \cltxtbrl   Vertical text aligned right (direction top down).
    """

    ALIGN_TOP    = 1
    ALIGN_CENTER = 2
    ALIGN_BOTTOM = 3

    FLOW_LR_TB          = 1
    FLOW_RL_TB          = 2
    FLOW_LR_BT          = 3
    FLOW_VERTICAL_LR_TB = 4
    FLOW_VERTICAL_TB_RL = 5

    def __init__( self, *params, **kwargs ) :
        super( Cell, self ).__init__()

        self.SetFrame  ( None )
        self.SetMargins( None )

        self.SetAlignment( kwargs.get( 'alignment', self.ALIGN_TOP  ) )
        self.SetFlow     ( kwargs.get( 'flow'     , self.FLOW_LR_TB ) )
        self.SetSpan     ( kwargs.get( 'span',      1               ) )

        self.SetStartVerticalMerge( kwargs.get( 'start_vertical_merge', False ) )
        self.SetVerticalMerge     ( kwargs.get( 'vertical_merge',       False ) )

        self._append = super( Cell, self ).append

        for param in params :
            if   isinstance( param, StringType ) : self.append    ( param )
            elif isinstance( param, Paragraph  ) : self.append    ( param )
            elif isinstance( param, FramePS    ) : self.SetFrame  ( param )
            elif isinstance( param, MarginsPS  ) : self.SetMargins( param )

    def SetFrame( self, value ) :
        self.Frame = value
        return self

    def SetMargins( self, value ) :
        self.Margins = value
        return self

    def SetAlignment( self, value ) :
        assert value in [ self.ALIGN_TOP, self.ALIGN_CENTER, self.ALIGN_BOTTOM ] #, self.ALIGN_TEXT_TOP_DOWN, self.ALIGN_TEXT_BOTTOM_UP ]
        self.Alignment = value

    def SetFlow( self, value ) :
        assert value in [ self.FLOW_LR_TB, self.FLOW_RL_TB, self.FLOW_LR_BT, self.FLOW_VERTICAL_LR_TB, self.FLOW_VERTICAL_TB_RL ]
        self.Flow = value

    def SetSpan( self, value ) :
        #  must be a positive integer
        self.Span = int( max( value, 1 ) )
        return self

    def SetStartVerticalMerge( self, value ) :
        self.StartVerticalMerge = False
        if value :
            self.StartVerticalMerge = True
        return self

    def SetVerticalMerge( self, value ) :
        self.VerticalMerge  = False
        if value :
            self.VerticalMerge = True
        return self

    def append( self, *params ) :
        [ self._append( param ) for param in params ]

class Document :
    def __init__( self, style_sheet=None, default_language=None, view_kind=None, view_zoom_kind=None, view_scale=None ) :
        self.StyleSheet = style_sheet or MakeDefaultStyleSheet()
        self.Sections = AttributedList( Section )

        self.SetTitle( None )

        self.DefaultLanguage = default_language or Languages.DEFAULT
        self.ViewKind        = view_kind        or ViewKind.DEFAULT
        self.ViewZoomKind    = view_zoom_kind
        self.ViewScale       = view_scale

    def NewSection( self, *params, **kwargs ) :
        result = Section( *params, **kwargs )
        self.Sections.append( result )
        return result

    def SetTitle( self, value ) :
        self.Title = value
        return self

    def Copy( self ) :
        result = Document( style_sheet      = self.StyleSheet.Copy(),
                           default_language = self.DefaultLanguage,
                           view_kind        = self.ViewKind,
                           view_zoom_kind   = self.ViewZoomKind,
                           view_scale       = self.ViewScale )
        result.SetTitle( self.Title )
        result.Sections = self.Sections.Copy()

        return result

def TEXT( *params, **kwargs ) :
    text_props = TextPropertySet()
    text_props.SetFont     ( kwargs.get( 'font',      None  ) )
    text_props.SetSize     ( kwargs.get( 'size',      None  ) )
    text_props.SetBold     ( kwargs.get( 'bold',      False ) )
    text_props.SetItalic   ( kwargs.get( 'italic',    False ) )
    text_props.SetUnderline( kwargs.get( 'underline', False ) )
    text_props.SetColour   ( kwargs.get( 'colour',    None  ) )

    if len( params ) == 1 :
        return Text( params[ 0 ], text_props )

    result = Inline( text_props )
    apply( result.append, params )
    return result

def B( *params ) :
    text_props = TextPropertySet( bold=True )

    if len( params ) == 1 :
        return Text( params[ 0 ], text_props )

    result = Inline( text_props )
    apply( result.append, params )
    return result

def I( *params ) :
    text_props = TextPropertySet( italic=True )

    if len( params ) == 1 :
        return Text( params[ 0 ], text_props )

    result = Inline( text_props )
    apply( result.append, params )
    return result

def U( *params ) :
    text_props = TextPropertySet( underline=True )

    if len( params ) == 1 :
        return Text( params[ 0 ], text_props )

    result = Inline( text_props )
    apply( result.append, params )
    return result

Added gluon/contrib/pyrtf/PropertySets.py version [3f0dc65a6d].









































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
PropertySets group common attributes together, each property set is used to control a specific part of the rendering.

PropertySets can be used in different elements of the document.

For example the FramePropertySet is used in paragraphs, tables, cells, etc.

The TextPropertySet can be used for text or in a Paragraph Style.

"""

from    types       import  StringType
from    copy        import  deepcopy


#
#   We need some basic Type like fonts, colours and paper definitions
#
def MakeAttributeName( value ) :
    assert value and type( value ) is StringType
    value = value.replace( ' ', '' )
    return value

class AttributedList( list ) :
    def __init__( self, accepted_type=None ) :
        super( AttributedList, self ).__init__()
        self.AcceptedType = accepted_type
        self._append = super( AttributedList, self ).append

    def append( self, *values ) :
        for value in values :
            if self.AcceptedType : assert isinstance( value, self.AcceptedType )

            self._append( value )

            name = getattr( value, 'Name', None )
            if name :
                name = MakeAttributeName( value.Name )
                setattr( self, name, value )

    def __deepcopy__( self, memo ) :
        result = self.__class__()
        result.append( *self[:] )
        return result

class Colour :
    def __init__( self, name, red, green, blue ) :
        self.SetName ( name  )
        self.SetRed  ( red   )
        self.SetGreen( green )
        self.SetBlue ( blue  )

    def SetName( self, value ) :
        self.Name = value
        return self

    def SetRed( self, value ) :
        self.Red = value
        return self

    def SetGreen( self, value ) :
        self.Green = value
        return self

    def SetBlue( self, value ) :
        self.Blue = value
        return self

class Colours( AttributedList ) :
    def __init__( self ) :
        super( Colours, self ).__init__( Colour )

class Font :
    def __init__( self, name, family, character_set = 0, pitch = None, panose = None, alternate = None ) :
        self.SetName        ( name          )
        self.SetFamily      ( family        )
        self.SetCharacterSet( character_set )
        self.SetPitch       ( pitch         )
        self.SetPanose      ( panose        )
        self.SetAlternate   ( alternate     )

    def SetName( self, value ) :
        self.Name = value
        return self

    def SetFamily( self, value ) :
        self.Family = value
        return self

    def SetCharacterSet( self, value ) :
        self.CharacterSet = value
        return self

    def SetPitch( self, value ) :
        self.Pitch = value
        return self

    def SetPanose( self, value ) :
        self.Panose = value
        return self

    def SetAlternate( self, value ) :
        self.Alternate = value
        return self

class Fonts( AttributedList ) :
    def __init__( self ) :
        super( Fonts, self ).__init__( Font )

class Paper :
    def __init__( self, name, code, description, width, height ) :
        self.SetName       ( name        )
        self.SetCode       ( code        )
        self.SetDescription( description )
        self.SetWidth      ( width       )
        self.SetHeight     ( height      )

    def SetName( self, value ) :
        self.Name = value
        return self

    def SetCode( self, value ) :
        self.Code = value
        return self

    def SetDescription( self, value ) :
        self.Description = value
        return self

    def SetWidth( self, value ) :
        self.Width = value
        return self

    def SetHeight( self, value ) :
        self.Height = value
        return self

class Papers( AttributedList ) :
    def __init__( self ) :
        super( Papers, self ).__init__( Paper )

#
#   Then we have property sets which represent different aspects of Styles
#
class MarginsPropertySet :
    def __init__( self, top=None, left=None, bottom=None, right=None ) :
        self.SetTop   ( top    )
        self.SetLeft  ( left   )
        self.SetBottom( bottom )
        self.SetRight ( right  )

    def SetTop( self, value ) :
        self.Top = value
        return self

    def SetLeft( self, value ) :
        self.Left = value
        return self

    def SetBottom( self, value ) :
        self.Bottom = value
        return self

    def SetRight( self, value ) :
        self.Right = value
        return self

class ShadingPropertySet :
    HORIZONTAL             =  1
    VERTICAL               =  2
    FORWARD_DIAGONAL       =  3
    BACKWARD_DIAGONAL      =  4
    VERTICAL_CROSS         =  5
    DIAGONAL_CROSS         =  6
    DARK_HORIZONTAL        =  7
    DARK_VERTICAL          =  8
    DARK_FORWARD_DIAGONAL  =  9
    DARK_BACKWARD_DIAGONAL = 10
    DARK_VERTICAL_CROSS    = 11
    DARK_DIAGONAL_CROSS    = 12
    PATTERNS = [ HORIZONTAL,
                 VERTICAL,
                 FORWARD_DIAGONAL,
                 BACKWARD_DIAGONAL,
                 VERTICAL_CROSS,
                 DIAGONAL_CROSS,
                 DARK_HORIZONTAL,
                 DARK_VERTICAL,
                 DARK_FORWARD_DIAGONAL,
                 DARK_BACKWARD_DIAGONAL,
                 DARK_VERTICAL_CROSS,
                 DARK_DIAGONAL_CROSS ]

    def __init__( self, shading=None, pattern=None, foreground=None, background=None ) :
        self.SetShading   ( shading    )
        self.SetForeground( foreground )
        self.SetBackground( background )
        self.SetPattern   ( pattern    )

    def __deepcopy__( self, memo ) :
        return ShadingPropertySet( self.Shading,
                                   self.Foreground,
                                   self.Background,
                                   self.Pattern )

    def SetShading( self, value ) :
        self.Shading = value
        return self

    def SetPattern( self, value ) :
        assert value is None or value in self.PATTERNS
        self.Pattern = value
        return self

    def SetForeground( self, value ) :
        assert not value or isinstance( value, Colour )
        self.Foreground = value
        return self

    def SetBackground( self, value ) :
        assert not value or isinstance( value, Colour )
        self.Background = value
        return self


class BorderPropertySet :
    SINGLE    = 1
    DOUBLE    = 2
    SHADOWED  = 3
    DOUBLED   = 4
    DOTTED    = 5
    DASHED    = 6
    HAIRLINE  = 7
    STYLES    = [ SINGLE, DOUBLE, SHADOWED, DOUBLED, DOTTED, DASHED, HAIRLINE ]

    def __init__( self, width=None, style=None, colour=None, spacing=None ) :
        self.SetWidth  ( width   )
        self.SetStyle  ( style or self.SINGLE )
        self.SetColour ( colour  )
        self.SetSpacing( spacing )

    def SetWidth( self, value ) :
        self.Width = value
        return self

    def SetStyle( self, value ) :
        assert value is None or value in self.STYLES
        self.Style = value
        return self

    def SetColour( self, value ) :
        assert value is None or isinstance( value, Colour )
        self.Colour = value
        return self

    def SetSpacing( self, value ) :
        self.Spacing = value
        return self

class FramePropertySet :
    def __init__( self, top=None, left=None, bottom=None, right=None ) :
        self.SetTop   ( top    )
        self.SetLeft  ( left   )
        self.SetBottom( bottom )
        self.SetRight ( right  )

    def SetTop( self, value ) :
        assert value is None or isinstance( value, BorderPropertySet )
        self.Top = value
        return self

    def SetLeft( self, value ) :
        assert value is None or isinstance( value, BorderPropertySet )
        self.Left = value
        return self

    def SetBottom( self, value ) :
        assert value is None or isinstance( value, BorderPropertySet )
        self.Bottom = value
        return self

    def SetRight( self, value ) :
        assert value is None or isinstance( value, BorderPropertySet )
        self.Right = value
        return self

class TabPropertySet :
    DEFAULT_WIDTH = 720

    LEFT      = 1
    RIGHT     = 2
    CENTER    = 3
    DECIMAL   = 4
    ALIGNMENT = [ LEFT, RIGHT, CENTER, DECIMAL ]

    DOTS        = 1
    HYPHENS     = 2
    UNDERLINE   = 3
    THICK_LINE  = 4
    EQUAL_SIGN  = 5
    LEADERS = [ DOTS, HYPHENS, UNDERLINE, THICK_LINE, EQUAL_SIGN ]

    def __init__( self, width=None, alignment=None, leader=None ) :
        self.SetWidth    ( width     )
        self.SetAlignment( alignment or self.LEFT )
        self.SetLeader   ( leader    )

    def SetWidth( self, value ) :
        self.Width = value
        return self

    def SetAlignment( self, value ) :
        assert value in self.ALIGNMENT
        self.Alignment = value
        return self

    def SetLeader( self, value ) :
        assert not value or value in self.LEADERS
        self.Leader = value
        return self

class TextPropertySet :

    def __init__( self, font=None, size=None, bold=None, italic=None, underline=None, colour=None, frame=None, expansion=None ) :
        self.SetFont         ( font )
        self.SetSize         ( size )

        self.SetBold         ( bold      or False )
        self.SetItalic       ( italic    or False )
        self.SetUnderline    ( underline or False )

        self.SetColour( colour )
        self.SetFrame ( frame  )

        self.SetStrikeThrough  ( False )
        self.SetDottedUnderline( False )
        self.SetDoubleUnderline( False )
        self.SetWordUnderline  ( False )
        self.SetExpansion      ( expansion )

    def Copy( self ) :
        return deepcopy( self )

    def __deepcopy__( self, memo ) :
        #   the font must remain a reference to the same font that we are looking at
        #   so we want to stop the recursiveness at this point and return an object
        #   with the right references.
        result = TextPropertySet( self.Font,
                                  self.Size,
                                  self.Bold,
                                  self.Italic,
                                  self.Underline,
                                  self.Colour,
                                  deepcopy( self.Frame, memo ) )
        result.SetStrikeThrough( self.StrikeThrough )
        return result

    def SetFont( self, value ) :
        assert not value or isinstance( value, Font )
        self.Font = value
        return self

    def SetSize( self, value ) :
        self.Size = value
        return self

    def SetBold( self, value ) :
        self.Bold = False
        if value : self.Bold = True
        return self

    def SetItalic( self, value ) :
        self.Italic = False
        if value : self.Italic = True
        return self

    def SetUnderline( self, value ) :
        self.Underline = False
        if value : self.Underline = True
        return self

    def SetColour( self, value ) :
        assert value is None or isinstance( value, Colour )
        self.Colour = value
        return self

    def SetFrame( self, value ) :
        assert value is None or isinstance( value, BorderPropertySet )
        self.Frame = value
        return self

    def SetStrikeThrough( self, value ) :
        self.StrikeThrough = False
        if value : self.StrikeThrough = True
        return self

    def SetDottedUnderline( self, value ) :
        self.DottedUnderline = False
        if value : self.DottedUnderline = True
        return self

    def SetDoubleUnderline( self, value ) :
        self.DoubleUnderline = False
        if value : self.DoubleUnderline = True
        return self

    def SetWordUnderline( self, value ) :
        self.WordUnderline = False
        if value : self.WordUnderline = True
        return self

    def SetExpansion( self, value ) :
        self.Expansion = value
        return self

class ParagraphPropertySet :
    LEFT       = 1
    RIGHT      = 2
    CENTER     = 3
    JUSTIFY    = 4
    DISTRIBUTE = 5
    ALIGNMENT  = [ LEFT, RIGHT, CENTER, JUSTIFY, DISTRIBUTE ]

    def __init__( self, alignment=None, space_before=None, space_after=None, tabs=None, first_line_indent=None, left_indent=None, right_indent=None, page_break_before=None ) :
        self.SetAlignment  ( alignment or self.LEFT )
        self.SetSpaceBefore( space_before )
        self.SetSpaceAfter ( space_after  )

        self.Tabs = []
        if tabs : apply( self.SetTabs, tabs )

        self.SetFirstLineIndent( first_line_indent or None )
        self.SetLeftIndent     ( left_indent or None )
        self.SetRightIndent    ( right_indent or None )

        self.SetPageBreakBefore( page_break_before )

        self.SetSpaceBetweenLines( None )

    def Copy( self ) :
        return deepcopy( self )

    def SetAlignment( self, value ) :
        assert not value or value in self.ALIGNMENT
        self.Alignment = value or self.LEFT
        return self

    def SetSpaceBefore( self, value ) :
        self.SpaceBefore = value
        return self

    def SetSpaceAfter( self, value ) :
        self.SpaceAfter = value
        return self

    def SetTabs( self, *params ) :
        self.Tabs = params
        return self

    def SetFirstLineIndent( self, value ) :
        self.FirstLineIndent = value
        return self

    def SetLeftIndent( self, value ) :
        self.LeftIndent = value
        return self

    def SetRightIndent( self, value ) :
        self.RightIndent = value
        return self

    def SetSpaceBetweenLines( self, value ) :
        self.SpaceBetweenLines = value
        return self

    def SetPageBreakBefore( self, value ) :
        self.PageBreakBefore = False
        if value : self.PageBreakBefore = True
        return self

#   Some short cuts to make the code a bit easier to read
MarginsPS   = MarginsPropertySet
ShadingPS   = ShadingPropertySet
BorderPS    = BorderPropertySet
FramePS     = FramePropertySet
TabPS       = TabPropertySet
TextPS      = TextPropertySet
ParagraphPS = ParagraphPropertySet

Added gluon/contrib/pyrtf/README version [2426571322].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Version 0.46

Added EMF support.

Added more sophisticated scaling options.

See examples2.py for both.

Grant Edwards, grante@users.sourceforge.net



Version 0.45

Finally, image support!!!  Handles PNGs and JPGs.

See examples2.py for the gory details.

Simon Cusack, scusack@sourceforge.net

Added gluon/contrib/pyrtf/Renderer.py version [96ed85b1dc].































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
from types import StringType, ListType, TupleType
from copy import deepcopy
from Elements import *

DEFAULT_TAB_WIDTH = 720

ParagraphAlignmentMap = { ParagraphPropertySet.LEFT       : 'ql',
                          ParagraphPropertySet.RIGHT      : 'qr',
                          ParagraphPropertySet.CENTER     : 'qc',
                          ParagraphPropertySet.JUSTIFY    : 'qj',
                          ParagraphPropertySet.DISTRIBUTE : 'qd' }

TabAlignmentMap = { TabPropertySet.LEFT    : '',
                    TabPropertySet.RIGHT   : 'tqr',
                    TabPropertySet.CENTER  : 'tqc',
                    TabPropertySet.DECIMAL : 'tqdec' }

TableAlignmentMap = { Table.LEFT   : 'trql',
                      Table.RIGHT  : 'trqr',
                      Table.CENTER : 'trqc' }

CellAlignmentMap = { Cell.ALIGN_TOP            : '', # clvertalt
                     Cell.ALIGN_CENTER         : 'clvertalc',
                     Cell.ALIGN_BOTTOM         : 'clvertalb' }

CellFlowMap = { Cell.FLOW_LR_TB          : '',           # cltxlrtb, Text in a cell flows from left to right and top to bottom (default)
                Cell.FLOW_RL_TB          : 'cltxtbrl',   # Text in a cell flows right to left and top to bottom
                Cell.FLOW_LR_BT          : 'cltxbtlr',   # Text in a cell flows left to right and bottom to top
                Cell.FLOW_VERTICAL_LR_TB : 'cltxlrtbv',  # Text in a cell flows left to right and top to bottom, vertical
                Cell.FLOW_VERTICAL_TB_RL : 'cltxtbrlv' } # Text in a cell flows top to bottom and right to left, vertical

ShadingPatternMap = { ShadingPropertySet.HORIZONTAL             : 'bghoriz',
                      ShadingPropertySet.VERTICAL               : 'bgvert',
                      ShadingPropertySet.FORWARD_DIAGONAL       : 'bgfdiag',
                      ShadingPropertySet.BACKWARD_DIAGONAL      : 'bgbdiag',
                      ShadingPropertySet.VERTICAL_CROSS         : 'bgcross',
                      ShadingPropertySet.DIAGONAL_CROSS         : 'bgdcross',
                      ShadingPropertySet.DARK_HORIZONTAL        : 'bgdkhoriz',
                      ShadingPropertySet.DARK_VERTICAL          : 'bgdkvert',
                      ShadingPropertySet.DARK_FORWARD_DIAGONAL  : 'bgdkfdiag',
                      ShadingPropertySet.DARK_BACKWARD_DIAGONAL : 'bgdkbdiag',
                      ShadingPropertySet.DARK_VERTICAL_CROSS    : 'bgdkcross',
                      ShadingPropertySet.DARK_DIAGONAL_CROSS    : 'bgdkdcross' }

TabLeaderMap = { TabPropertySet.DOTS        : 'tldot',
                 TabPropertySet.HYPHENS     : 'tlhyph',
                 TabPropertySet.UNDERLINE   : 'tlul',
                 TabPropertySet.THICK_LINE  : 'tlth',
                 TabPropertySet.EQUAL_SIGN  : 'tleq' }

BorderStyleMap = { BorderPropertySet.SINGLE   : 'brdrs',
                   BorderPropertySet.DOUBLE   : 'brdrth',
                   BorderPropertySet.SHADOWED : 'brdrsh',
                   BorderPropertySet.DOUBLED  : 'brdrdb',
                   BorderPropertySet.DOTTED   : 'brdrdot',
                   BorderPropertySet.DASHED   : 'brdrdash',
                   BorderPropertySet.HAIRLINE : 'brdrhair' }

SectionBreakTypeMap = { Section.NONE   : 'sbknone',
                        Section.COLUMN : 'sbkcol',
                        Section.PAGE   : 'sbkpage',
                        Section.EVEN   : 'sbkeven',
                        Section.ODD    : 'sbkodd' }

class Settings( list ) :
    def __init__( self ) :
        super( Settings, self ).__init__()
        self._append = super( Settings, self ).append

    def append( self, value, mask=None, fallback=None ) :
        if (value is not 0) and value in [ False, None, '' ] :
            if fallback : self._append( self, fallback )

        else :
            if mask :
                if value is True :
                    value = mask
                else :
                    value = mask % value
            self._append( value )

    def Join( self ) :
        if self : return r'\%s' % '\\'.join( self )
        return ''

    def __repr__( self ) :
        return self.Join()

class Renderer :
    def __init__( self, write_custom_element_callback=None ) :
        self.character_style_map = {}
        self.paragraph_style_map = {}
        self.WriteCustomElement  = write_custom_element_callback

    #
    #   All of the Rend* Functions populate a Settings object with values
    #
    def _RendPageProperties( self, section, settings, in_section ) :
        #  this one is different from the others as it takes the settings from a
        if in_section :
            #paper_size_code   = 'psz%s'
            paper_width_code  = 'pgwsxn%s'
            paper_height_code = 'pghsxn%s'
            landscape         = 'lndscpsxn'
            margin_suffix     = 'sxn'

        else :
            #paper_size_code   = 'psz%s'
            paper_width_code  = 'paperw%s'
            paper_height_code = 'paperh%s'
            landscape         = 'landscape'
            margin_suffix     = ''

        #settings.append( section.Paper.Code,   paper_size_code  )
        settings.append( section.Paper.Width,  paper_width_code  )
        settings.append( section.Paper.Height, paper_height_code )

        if section.Landscape :
            settings.append( landscape )

        if section.FirstPageNumber :
            settings.append( section.FirstPageNumber, 'pgnstarts%s' )
            settings.append( 'pgnrestart' )

        self._RendMarginsPropertySet( section.Margins, settings, margin_suffix )

    def _RendShadingPropertySet( self, shading_props, settings, prefix='' ) :
        if not shading_props : return

        settings.append( shading_props.Shading, prefix + 'shading%s' )
        settings.append( ShadingPatternMap.get( shading_props.Pattern, False ) )

        settings.append( self._colour_map.get( shading_props.Foreground, False ), prefix + 'cfpat%s' )
        settings.append( self._colour_map.get( shading_props.Background, False ), prefix + 'cbpat%s' )

    def _RendBorderPropertySet( self, edge_props, settings ) :
        settings.append( BorderStyleMap[ edge_props.Style ] )
        settings.append( edge_props.Width                                , 'brdrw%s'  )
        settings.append( self._colour_map.get( edge_props.Colour, False ), 'brdrcf%s' )
        settings.append( edge_props.Spacing or False                     , 'brsp%s'   )

    def _RendFramePropertySet( self, frame_props, settings, tag_prefix='' ) :
        if not frame_props : return

        if frame_props.Top :
            settings.append( tag_prefix + 'brdrt' )
            self._RendBorderPropertySet( frame_props.Top, settings )

        if frame_props.Left :
            settings.append( tag_prefix + 'brdrl' )
            self._RendBorderPropertySet( frame_props.Left, settings )

        if frame_props.Bottom :
            settings.append( tag_prefix + 'brdrb' )
            self._RendBorderPropertySet( frame_props.Bottom, settings )

        if frame_props.Right :
            settings.append( tag_prefix + 'brdrr' )
            self._RendBorderPropertySet( frame_props.Right, settings )

    def _RendMarginsPropertySet( self, margin_props, settings, suffix='' ) :
        if not margin_props : return

        settings.append( margin_props.Top,    'margt' + suffix + '%s' )
        settings.append( margin_props.Left,   'margl' + suffix + '%s' )
        settings.append( margin_props.Bottom, 'margb' + suffix + '%s' )
        settings.append( margin_props.Right,  'margr' + suffix + '%s' )

    def _RendParagraphPropertySet( self, paragraph_props, settings ) :
        if not paragraph_props : return
        settings.append( ParagraphAlignmentMap[ paragraph_props.Alignment ] )

        settings.append( paragraph_props.SpaceBefore, 'sb%s' )
        settings.append( paragraph_props.SpaceAfter,  'sa%s' )

        #   then we have to find out all of the tabs
        width = 0
        for tab in paragraph_props.Tabs :
            settings.append( TabAlignmentMap[ tab.Alignment ]   )
            settings.append( TabLeaderMap.get( tab.Leader, '' ) )

            width += tab.Width or DEFAULT_TAB_WIDTH
            settings.append( 'tx%s' % width             )

        settings.append( paragraph_props.PageBreakBefore, 'pagebb' )

        settings.append( paragraph_props.FirstLineIndent, 'fi%s'   )
        settings.append( paragraph_props.LeftIndent,      'li%s'   )
        settings.append( paragraph_props.RightIndent,     'ri%s'   )

        if paragraph_props.SpaceBetweenLines :
            if paragraph_props.SpaceBetweenLines < 0 :
                settings.append( paragraph_props.SpaceBetweenLines, r'sl%s\slmult0' )
            else :
                settings.append( paragraph_props.SpaceBetweenLines, r'sl%s\slmult1' )

    def _RendTextPropertySet( self, text_props, settings ) :
        if not text_props : return

        if text_props.Expansion :
            settings.append( text_props.Expansion, 'expndtw%s' )

        settings.append( text_props.Bold,            'b'    )
        settings.append( text_props.Italic,          'i'    )
        settings.append( text_props.Underline,       'ul'   )
        settings.append( text_props.DottedUnderline, 'uld'  )
        settings.append( text_props.DoubleUnderline, 'uldb' )
        settings.append( text_props.WordUnderline,   'ulw'  )

        settings.append( self._font_map.get( text_props.Font, False ), 'f%s' )
        settings.append( text_props.Size, 'fs%s' )
        settings.append( self._colour_map.get( text_props.Colour, False ), 'cf%s' )

        if text_props.Frame :
            frame = text_props.Frame
            settings.append( 'chbrdr' )
            settings.append( BorderStyleMap[ frame.Style ] )
            settings.append( frame.Width                                , 'brdrw%s' )
            settings.append( self._colour_map.get( frame.Colour, False ), 'brdrcf%s' )

    #
    #   All of the Write* functions will write to the internal file object
    #
    #   the _ ones probably don't need to be used by anybody outside
    #   but the other ones like WriteTextElement could be used in the Custom
    #   callback.
    def Write( self, document, fout ) :
        #  write all of the standard stuff based upon the first document
        self._doc  = document
        self._fout = fout
        self._WriteDocument  ()
        self._WriteColours   ()
        self._WriteFonts     ()
        self._WriteStyleSheet()

        settings = Settings()
        self._RendPageProperties( self._doc.Sections[ 0 ], settings, in_section=False )
        self._write( repr( settings ) )

        #  handle the simplest case first, we don't need to do anymore mucking around
        #  with section headers, etc we can just rip the document out
        if len( document.Sections ) == 1 :
            self._WriteSection( document.Sections[ 0 ],
                                is_first   = True,
                                add_header = False )

        else :
            for section_idx, section in enumerate( document.Sections ) :
                is_first       = section_idx == 0
                add_header     = True
                self._WriteSection( section, is_first, add_header )

        self._write( '}' )

        del self._fout, self._doc, self._CurrentStyle

    def _write( self, data, *params ) :
        #----------------------------------
        # begin modification
        # by Herbert Weinhandl
        # to convert accented characters
        # to their rtf-compatible form
        #for c in range( 128, 256 ) :
        #   data = data.replace( chr(c), "\'%x" % c)
        # end modification
        #
        #  This isn't the right place for this as it is going to do
        #  this loop for all sorts of writes, including settings, control codes, etc.
        #
        #  I will create a def _WriteText (or something) method that is used when the
        #  actual string that is to be viewed in the document is written, this can then
        #  do the final accented character check.
        #
        #  I left it here so that I remember to do the right thing when I have time
        #----------------------------------

        if params : data = data % params
        self._fout.write( data )

    def _WriteDocument( self ) :
        settings = Settings()

        assert Languages.IsValid   ( self._doc.DefaultLanguage )
        assert ViewKind.IsValid    ( self._doc.ViewKind        )
        assert ViewZoomKind.IsValid( self._doc.ViewZoomKind    )
        assert ViewScale.IsValid   ( self._doc.ViewScale       )

        settings.append( self._doc.DefaultLanguage, 'deflang%s'   )
        settings.append( self._doc.ViewKind       , 'viewkind%s'  )
        settings.append( self._doc.ViewZoomKind   , 'viewzk%s'    )
        settings.append( self._doc.ViewScale      , 'viewscale%s' )

        self._write( "{\\rtf1\\ansi\\ansicpg1252\\deff0%s\n" % settings )

    def _WriteColours( self ) :
        self._write( r"{\colortbl ;" )

        self._colour_map = {}
        offset = 0
        for colour in self._doc.StyleSheet.Colours :
            self._write( r'\red%s\green%s\blue%s;', colour.Red, colour.Green, colour.Blue )
            self._colour_map[ colour ] = offset + 1
            offset += 1
        self._write( "}\n" )

    def _WriteFonts( self ) :
        self._write( r'{\fonttbl' )

        self._font_map = {}
        offset = 0
        for font in self._doc.StyleSheet.Fonts :
            pitch     = ''
            panose    = ''
            alternate = ''
            if font.Pitch     : pitch     = r'\fprq%s'    % font.Pitch
            if font.Panose    : panose    = r'{\*\panose %s}' % font.Panose
            if font.Alternate : alternate = r'{\*\falt %s}'   % font.Alternate.Name

            self._write( r'{\f%s\f%s%s\fcharset%s%s %s%s;}',
                         offset,
                         font.Family,
                         pitch,
                         font.CharacterSet,
                         panose,
                         font.Name,
                         alternate )

            self._font_map[ font ] = offset
            offset += 1

        self._write( "}\n" )

    def _WriteStyleSheet( self ) :
        self._write( r"{\stylesheet" )

        #   TO DO: character styles, does anybody actually use them?

        offset_map = {}
        for idx, style in enumerate( self._doc.StyleSheet.ParagraphStyles ) :
            offset_map[ style ] = idx

        #   paragraph styles
        self.paragraph_style_map = {}
        for idx, style in enumerate( self._doc.StyleSheet.ParagraphStyles ) :

            if idx == 0 :
                default = style
            else :
                self._write( '\n' )

            settings = Settings()

            #   paragraph properties
            self._RendParagraphPropertySet( style.ParagraphPropertySet, settings )
            self._RendFramePropertySet    ( style.FramePropertySet,     settings )
            self._RendShadingPropertySet  ( style.ShadingPropertySet,   settings )

            #   text properties
            self._RendTextPropertySet   ( style.TextStyle.TextPropertySet,     settings )
            self._RendShadingPropertySet( style.TextStyle.ShadingPropertySet,  settings )

            #   have to take
            based_on = '\\sbasedon%s' % offset_map.get( style.BasedOn, 0 )
            next     = '\\snext%s'    % offset_map.get( style.Next,    0 )

            inln = '\\s%s%s' % ( idx, settings )
            self._write( "{%s%s%s %s;}", inln, based_on, next, style.Name )

            self.paragraph_style_map[ style ] = inln

        #   if now style is specified for the first paragraph to be written, this one
        #   will be used
        self._CurrentStyle = self.paragraph_style_map[ default ]

        self._write( "}\n" )

    def _WriteSection( self, section, is_first, add_header ) :

        def WriteHF( hf, rtfword ) :
            #if not hf : return

            #  if we don't have anything in the header/footer then include
            #  a blank paragraph, this stops it from picking up the header/footer
            #  from the previous section
            # if not hf :   hf = [ Paragraph( '' ) ]
            if not hf : hf = []

            self._write( '{\\%s' % rtfword )
            self._WriteElements( hf )
            self._write( '}\n' )

        settings = Settings()

        if not is_first :
            #  we need to finish off the preceding section
            #  and reset all of our defaults back to standard
            settings.append( 'sect'  )

        #  reset to our defaults
        settings.append( 'sectd' )

        if add_header :
            settings.append( SectionBreakTypeMap[ section.BreakType ] )
            self._RendPageProperties( section, settings, in_section=True )

        settings.append( section.HeaderY, 'headery%s' )
        settings.append( section.FooterY, 'footery%s' )

        #  write all of these out now as we need to do a write elements in the
        #  next section
        self._write( repr( settings ) )

        #   finally after all that has settled down we can do the
        #   headers and footers
        if section.FirstHeader or section.FirstFooter :
            #  include the titlepg flag if the first page has a special format
            self._write( r'\titlepg' )
            WriteHF( section.FirstHeader, 'headerf' )
            WriteHF( section.FirstFooter, 'footerf' )

        WriteHF( section.Header, 'header' )
        WriteHF( section.Footer, 'footer' )

        #   and at last the contents of the section that actually appear on the page
        self._WriteElements( section )

    def _WriteElements( self, elements ) :
        new_line = ''
        for element in elements :
            self._write( new_line )
            new_line = '\n'

            clss = element.__class__

            if clss == Paragraph :
                self.WriteParagraphElement( element )

            elif clss == Table :
                self.WriteTableElement( element )

            elif clss == StringType :
                self.WriteParagraphElement( Paragraph( element ) )

            elif clss in [ RawCode, Image ] :
                self.WriteRawCode( element )

            #elif clss == List  :
            #   self._HandleListElement( element )

            elif self.WriteCustomElement :
                self.WriteCustomElement( self, element )

            else :
                raise Exception( "Don't know how to handle elements of type %s" % clss )

    def WriteParagraphElement( self, paragraph_elem, tag_prefix='', tag_suffix=r'\par', opening='{', closing='}' ) :

        #   the tag_prefix and the tag_suffix take care of paragraphs in tables.  A
        #   paragraph in a table requires and extra tag at the front (intbl) and we
        #   don't want the ending tag everytime.  We want it for all paragraphs but
        #   the last.

        overrides = Settings()
        self._RendParagraphPropertySet( paragraph_elem.Properties, overrides )
        self._RendFramePropertySet    ( paragraph_elem.Frame,      overrides )
        self._RendShadingPropertySet  ( paragraph_elem.Shading,    overrides )

        #   when writing the RTF the style is carried from the previous paragraph to the next,
        #   so if the currently written paragraph has a style then make it the current one,
        #   otherwise leave it as it was
        self._CurrentStyle = self.paragraph_style_map.get( paragraph_elem.Style, self._CurrentStyle )

        self._write( r'%s\pard\plain%s %s%s ' % ( opening, tag_prefix, self._CurrentStyle, overrides ) )

        for element in paragraph_elem :

            if isinstance( element, StringType ) :
                self._write( element )

            elif isinstance( element, RawCode ) :
                self._write( element.Data )

            elif isinstance( element, Text ) :
                self.WriteTextElement( element )

            elif isinstance( element, Inline ) :
                self.WriteInlineElement( element )

            elif element == TAB :
                self._write( r'\tab ' )

            elif element == LINE :
                self._write( r'\line ' )

            elif self.WriteCustomElement :
                self.WriteCustomElement( self, element )

            else :
                raise Exception( 'Don\'t know how to handle %s' % element )

        self._write( tag_suffix + closing )

    def WriteRawCode( self, raw_elem ) :
        self._write( raw_elem.Data )

    def WriteTextElement( self, text_elem ) :
        overrides = Settings()

        self._RendTextPropertySet   ( text_elem.Properties, overrides )
        self._RendShadingPropertySet( text_elem.Shading,    overrides, 'ch' )

        #   write the wrapper and then let the custom handler have a go
        if overrides : self._write( '{%s ' % repr( overrides ) )

        #   if the data is just a string then we can now write it
        if isinstance( text_elem.Data, StringType ) :
            self._write( text_elem.Data or '' )

        elif text_elem.Data == TAB :
            self._write( r'\tab ' )

        else :
            self.WriteCustomElement( self, text_elem.Data )

        if overrides : self._write( '}' )

    def WriteInlineElement( self, inline_elem ) :
        overrides = Settings()

        self._RendTextPropertySet   ( inline_elem.Properties, overrides )
        self._RendShadingPropertySet( inline_elem.Shading,    overrides, 'ch' )

        #   write the wrapper and then let the custom handler have a go
        if overrides : self._write( '{%s ' % repr( overrides ) )

        for element in inline_elem :
            #   if the data is just a string then we can now write it
            if isinstance( element, StringType ) :
                self._write( element )

            elif isinstance( element, RawCode ) :
                self._write( element.Data )

            elif element == TAB :
                self._write( r'\tab ' )

            elif element == LINE :
                self._write( r'\line ' )

            else :
                self.WriteCustomElement( self, element )

        if overrides : self._write( '}' )

    def WriteText( self, text ) :
        self._write( text or '' )

    def WriteTableElement( self, table_elem ) :

        vmerge = [ False ] * table_elem.ColumnCount
        for height, cells in table_elem.Rows :

            #   calculate the right hand edge of the cells taking into account the spans
            offset   = table_elem.LeftOffset or 0
            cellx    = []
            cell_idx = 0
            for cell in cells :
                cellx.append( offset + sum( table_elem.ColumnWidths[ : cell_idx + cell.Span ] ) )
                cell_idx += cell.Span

            self._write( r'{\trowd' )

            settings = Settings()

            #   the spec says that this value is mandatory and I think that 108 is the default value
            #   so I'll take care of it here
            settings.append( table_elem.GapBetweenCells or 108, 'trgaph%s' )
            settings.append( TableAlignmentMap[ table_elem.Alignment ] )
            settings.append( height, 'trrh%s' )
            settings.append( table_elem.LeftOffset, 'trleft%s' )

            width = table_elem.LeftOffset or 0
            for idx, cell in enumerate( cells ) :
                self._RendFramePropertySet  ( cell.Frame,   settings, 'cl' )

                #  cells don't have margins so I don't know why I was doing this
                #  I think it might have an affect in some versions of some WPs.
                #self._RendMarginsPropertySet( cell.Margins, settings, 'cl' )

                #  if we are starting to merge or if this one is the first in what is
                #  probably a series of merges then start the vertical merging
                if cell.StartVerticalMerge or (cell.VerticalMerge and not vmerge[ idx ]) :
                    settings.append( 'clvmgf' )
                    vmerge[ idx ] = True

                elif cell.VerticalMerge :
                    #..continuing a merge
                    settings.append( 'clvmrg' )

                else :
                    #..no merging going on so make sure that it is off
                    vmerge[ idx ] = False

                #  for any cell in the next row that is covered by this span we
                #  need to run off the vertical merging as we don't want them
                #  merging up into this spanned cell
                for vmerge_idx in range( idx + 1, idx + cell.Span - 1 ) :
                    vmerge[ vmerge_idx ] = False

                settings.append( CellAlignmentMap[ cell.Alignment ] )
                settings.append( CellFlowMap[ cell.Flow ] )

                #  this terminates the definition of a cell and represents the right most edge of the cell from the left margin
                settings.append( cellx[ idx ], 'cellx%s' )

            self._write( repr( settings ) )

            for cell in cells :
                if len( cell ) :
                    last_idx = len( cell ) - 1
                    for element_idx, element in enumerate( cell ) :
                        #   wrap plain strings in paragraph tags
                        if isinstance( element, StringType ) :
                            element = Paragraph( element )

                        #   don't forget the prefix or else word crashes and does all sorts of strange things
                        if element_idx == last_idx :
                            self.WriteParagraphElement( element, tag_prefix=r'\intbl', tag_suffix='', opening='', closing='' )

                        else :
                            self.WriteParagraphElement( element, tag_prefix=r'\intbl', opening='', closing='' )

                    self._write( r'\cell' )

                else :
                    self._write( r'\pard\intbl\cell' )

            self._write( '\\row}\n' )

Added gluon/contrib/pyrtf/Styles.py version [8959273adb].






























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
A Styles is a collection of PropertySets that can be applied to a particular RTF element.

At present there are only two, Text and Paragraph but ListStyles will be added soon too.


"""

from PropertySets import *

class TextStyle :
    def __init__( self, text_props, name=None, shading_props=None ) :
        self.SetTextPropertySet   ( text_props    )
        self.SetName              ( name          )
        self.SetShadingPropertySet( shading_props )

    def Copy( self ) :
        return deepcopy( self )

    def SetName( self, value ) :
        self.Name = value
        return self

    def SetTextPropertySet( self, value ) :
        assert isinstance( value, TextPropertySet )
        self.TextPropertySet = value
        return self

    def SetShadingPropertySet( self, value ) :
        assert value is None or isinstance( value, ShadingPropertySet )
        self.ShadingPropertySet = value or ShadingPropertySet()
        return self

class ParagraphStyle :
    def __init__( self, name, text_style, paragraph_props=None, frame_props=None, shading_props=None ) :

        #   A style must have Font and a Font Size but the Text property set doesn't
        #   make these mandatory so that they can be used for overrides so at this point
        #   we need to make sure that that we have these values set
        if not text_style.TextPropertySet.Font : raise Exception( 'Paragraph Styles must have a Font specified.'      )
        if not text_style.TextPropertySet.Size : raise Exception( 'Paragraph Styles must have a Font Size specified.' )

        self.SetName                ( name            )
        self.SetTextStyle           ( text_style      )
        self.SetParagraphPropertySet( paragraph_props )
        self.SetFramePropertySet    ( frame_props     )
        self.SetShadingPropertySet  ( shading_props   )

        self.SetBasedOn( None )
        self.SetNext   ( None )

    def Copy( self ) :
        return deepcopy( self )

    def SetName( self, value ) :
        self.Name = value
        return self

    def SetTextStyle( self, value ) :
        assert isinstance( value, TextStyle )
        self.TextStyle = value
        return self

    def SetParagraphPropertySet( self, value ) :
        assert value is None or isinstance( value, ParagraphPropertySet )
        self.ParagraphPropertySet = value or ParagraphPropertySet()
        return self

    def SetFramePropertySet( self, value ) :
        assert value is None or isinstance( value, FramePropertySet )
        self.FramePropertySet = value or FramePropertySet()
        return self

    def SetShadingPropertySet( self, value ) :
        """Set the background shading for the paragraph."""

        assert value is None or isinstance( value, ShadingPropertySet )
        self.ShadingPropertySet = value or ShadingPropertySet()
        return self

    def SetBasedOn( self, value ) :
        """Set the Paragraph Style that this one is based on."""

        assert not value or isinstance( value, ParagraphStyle )
        self.BasedOn = value
        return self

    def SetNext( self, value ) :
        """Set the Paragraph Style that should follow this one."""

        assert not value or isinstance( value, ParagraphStyle )
        self.Next    = value
        return self

Added gluon/contrib/pyrtf/__init__.py version [8899891f0b].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
from    PropertySets    import  *
from    Elements    import  *
from    Styles      import  *
from    Renderer    import  *

def dumps(doc):
    import cStringIO
    s=cStringIO.StringIO()
    r=Renderer()
    r.Write(doc,s)
    return s.getvalue()

Added gluon/contrib/pysimplesoap/__init__.py version [5bfa6115e7].




1
2
3
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"Contributed modules"

Added gluon/contrib/pysimplesoap/client.py version [08dd76e0d3].

















































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: latin-1 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 3, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

"Pythonic simple SOAP Client implementation"

__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2008 Mariano Reingart"
__license__ = "LGPL 3.0"
__version__ = "1.02c"

import urllib
try:
    import httplib2
    Http = httplib2.Http
except ImportError:
    import urllib2
    class Http(): # wrapper to use when httplib2 not available
        def request(self, url, method, body, headers):
            f = urllib2.urlopen(urllib2.Request(url, body, headers))
            return f.info(), f.read()

    
from simplexml import SimpleXMLElement, TYPE_MAP, OrderedDict

class SoapFault(RuntimeError):
    def __init__(self,faultcode,faultstring):
        self.faultcode = faultcode
        self.faultstring = faultstring

# soap protocol specification & namespace
soap_namespaces = dict(
    soap11="http://schemas.xmlsoap.org/soap/envelope/",
    soap="http://schemas.xmlsoap.org/soap/envelope/",
    soapenv="http://schemas.xmlsoap.org/soap/envelope/",
    soap12="http://www.w3.org/2003/05/soap-env",
)

class SoapClient(object):
    "Simple SOAP Client (s�mil PHP)"
    def __init__(self, location = None, action = None, namespace = None,
                 cert = None, trace = False, exceptions = True, proxy = None, ns=False, 
                 soap_ns=None, wsdl = None, cache = False):
        self.certssl = cert             
        self.keyssl = None              
        self.location = location        # server location (url)
        self.action = action            # SOAP base action
        self.namespace = namespace      # message 
        self.trace = trace              # show debug messages
        self.exceptions = exceptions    # lanzar execpiones? (Soap Faults)
        self.xml_request = self.xml_response = ''
        if not soap_ns and not ns:
            self.__soap_ns = 'soap' # 1.1
        elif not soap_ns and ns:
            self.__soap_ns = 'soapenv' # 1.2
        else:
            self.__soap_ns = soap_ns
        
        # parse wsdl url
        self.services = wsdl and self.wsdl(wsdl, debug=trace, cache=cache) 
        self.service_port = None                 # service port for late binding

        if not proxy:
            self.http = Http()
        else:
            import socks
            ##httplib2.debuglevel=4
            self.http = httplib2.Http(proxy_info = httplib2.ProxyInfo(
                proxy_type=socks.PROXY_TYPE_HTTP, **proxy))
        #if self.certssl: # esto funciona para validar al server?
        #    self.http.add_certificate(self.keyssl, self.keyssl, self.certssl)
        self.__ns = ns # namespace prefix or False to not use it
        if not ns:
            self.__xml = """<?xml version="1.0" encoding="UTF-8"?> 
<%(soap_ns)s:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:%(soap_ns)s="%(soap_uri)s">
<%(soap_ns)s:Body>
    <%(method)s xmlns="%(namespace)s">
    </%(method)s>
</%(soap_ns)s:Body>
</%(soap_ns)s:Envelope>"""
        else:
            self.__xml = """<?xml version="1.0" encoding="UTF-8"?>
<%(soap_ns)s:Envelope xmlns:%(soap_ns)s="%(soap_uri)s" xmlns:%(ns)s="%(namespace)s">
<%(soap_ns)s:Header/>
<%(soap_ns)s:Body>
    <%(ns)s:%(method)s>
    </%(ns)s:%(method)s>
</%(soap_ns)s:Body>
</%(soap_ns)s:Envelope>"""

    def __getattr__(self, attr):
        "Return a pseudo-method that can be called"
        if not self.services: # not using WSDL?
            return lambda self=self, *args, **kwargs: self.call(attr,*args,**kwargs)
        else: # using WSDL:
            return lambda self=self, *args, **kwargs: self.wsdl_call(attr,*args,**kwargs)
        
    def call(self, method, *args, **kwargs):
        "Prepare xml request and make SOAP call, returning a SimpleXMLElement"                
        #TODO: method != input_message
        # Basic SOAP request:
        xml = self.__xml % dict(method=method, namespace=self.namespace, ns=self.__ns,
                                soap_ns=self.__soap_ns, soap_uri=soap_namespaces[self.__soap_ns])
        request = SimpleXMLElement(xml,namespace=self.__ns and self.namespace, prefix=self.__ns)
        # serialize parameters
        if kwargs:
            parameters = kwargs.items()
        else:
            parameters = args
        if parameters and isinstance(parameters[0], SimpleXMLElement):
            # merge xmlelement parameter ("raw" - already marshalled)
            for param in parameters[0].children():
                getattr(request,method).import_node(param)
        else:
            # marshall parameters:
            for k,v in parameters: # dict: tag=valor
                getattr(request,method).marshall(k,v)
        self.xml_request = request.as_xml()
        self.xml_response = self.send(method, self.xml_request)
        response = SimpleXMLElement(self.xml_response, namespace=self.namespace)
        if self.exceptions and response("Fault", ns=soap_namespaces.values(), error=False):
            raise SoapFault(unicode(response.faultcode), unicode(response.faultstring))
        return response
    
    def send(self, method, xml):
        "Send SOAP request using HTTP"
        if self.location == 'test': return
        location = "%s" % self.location #?op=%s" % (self.location, method)
        if self.services:
            soap_action = self.action 
        else:
            soap_action = self.action+method
        headers={
                'Content-type': 'text/xml; charset="UTF-8"',
                'Content-length': str(len(xml)),
                "SOAPAction": "\"%s\"" % (soap_action)
                }
        if self.trace:
            print "-"*80
            print "POST %s" % location
            print '\n'.join(["%s: %s" % (k,v) for k,v in headers.items()])
            print u"\n%s" % xml.decode("utf8","ignore")
        response, content = self.http.request(
            location,"POST", body=xml, headers=headers )
        self.response = response
        self.content = content
        if self.trace: 
            print 
            print '\n'.join(["%s: %s" % (k,v) for k,v in response.items()])
            print content#.decode("utf8","ignore")
            print "="*80
        return content

    def get_operation(self, method):
        # try to find operation in wsdl file
        soap_ver = self.__soap_ns == 'soap12' and 'soap12' or 'soap11'
        if not self.service_port:
            for service_name, service in self.services.items():
                for port_name, port in [port for port in service['ports'].items()]:
                    if port['soap_ver'] == soap_ver:
                        self.service_port = service_name, port_name
                        break
                else:
                    raise RuntimeError("Cannot determine service in WSDL: "
                                       "SOAP version: %s" % soap_ver)
        else:
            port = self.services[self.service_port[0]]['ports'][self.service_port[1]]
        self.location = port['location']
        operation = port['operations'].get(unicode(method))
        if not operation:
            raise RuntimeError("Operation %s not found in WSDL: "
                               "Service/Port Type: %s" %
                               (method, self.service_port))
        return operation
    
    def wsdl_call(self, method, *args, **kwargs):
        "Pre and post process SOAP call, input and output parameters using WSDL"
        soap_uri = soap_namespaces[self.__soap_ns]
        operation = self.get_operation(method)
        # get i/o type declarations:
        input = operation['input']
        output = operation['output']
        if 'action' in operation:
            self.action = operation['action']
        # sort parameters (same order as xsd:sequence)
        def sort_dict(od, d):
            if isinstance(od, dict):
                ret = OrderedDict()
                for k in od.keys():
                    v = d.get(k)
                    if v:
                        if isinstance(v, dict):
                            v = sort_dict(od[k], v)
                        elif isinstance(v, list):
                            v = [sort_dict(od[k][0], v1) 
                                    for v1 in v]
                        ret[str(k)] = v 
                return ret
            else:
                return d
        if input and kwargs:
            params = sort_dict(input.values()[0], kwargs).items()
            method = input.keys()[0]
        #elif not input:
            #TODO: no message! (see wsmtxca.dummy) 
        else:
            params = kwargs and kwargs.items()
        # call remote procedure
        response = self.call(method, *params)
        # parse results:
        resp = response('Body',ns=soap_uri).children().unmarshall(output)
        return resp and resp.values()[0] # pass Response tag children

    def help(self, method):
        "Return operation documentation and invocation/returned value example"
        operation = self.get_operation(method)
        input = operation['input'].values()
        input = input and input[0]
        output = operation['output'].values()[0] 
        return u"%s(%s)\n -> %s:\n\n%s" % (
            method, 
            input and ", ".join("%s=%s" % (k,repr(v)) for k,v 
                                 in input.items()) or "",
            output and output or "",
            operation.get("documentation",""),
            )

    def wsdl(self, url, debug=False, cache=False):
        "Parse Web Service Description v1.1"
        soap_ns = {
            "http://schemas.xmlsoap.org/wsdl/soap/": 'soap11',
            "http://schemas.xmlsoap.org/wsdl/soap12/": 'soap12',
            }
        wsdl_uri="http://schemas.xmlsoap.org/wsdl/"
        xsd_uri="http://www.w3.org/2001/XMLSchema"
        xsi_uri="http://www.w3.org/2001/XMLSchema-instance"
        
        get_local_name = lambda s: str((':' in s) and s.split(':')[1] or s)
        
        REVERSE_TYPE_MAP = dict([(v,k) for k,v in TYPE_MAP.items()])

        def fetch(url):
            "Fetch a document from a URL, save it locally if cache enabled"
            import os, hashlib
            # make md5 hash of the url for caching... 
            filename = "%s.xml" % hashlib.md5(url).hexdigest()
            if isinstance(cache, basestring):
                filename = os.path.join(cache, filename) 
            if cache and os.path.exists(filename):
                if debug: print "Reading file %s" % (filename, )
                f = open(filename, "r")
                xml = f.read()
                f.close()
            else:
                if debug: print "Fetching url %s" % (url, )
                f = urllib.urlopen(url)
                xml = f.read()
                if cache:
                    if debug: print "Writing file %s" % (filename, )
                    f = open(filename, "w")
                    f.write(xml)
                    f.close()
            return xml
            
        # Open uri and read xml:
        xml = fetch(url)
        # Parse WSDL XML:
        wsdl = SimpleXMLElement(xml, namespace=wsdl_uri)

        # detect soap prefix and uri (xmlns attributes of <definitions>)
        xsd_ns = None
        soap_uris = {}
        for k, v in wsdl[:]:
            if v in soap_ns and k.startswith("xmlns:"):
                soap_uris[get_local_name(k)] = v
            if v== xsd_uri and k.startswith("xmlns:"):
                xsd_ns = get_local_name(k)

        # Extract useful data:
        self.namespace = wsdl['targetNamespace']
        self.documentation = unicode(wsdl('documentation', error=False) or '')
        
        services = {}
        bindings = {}           # binding_name: binding
        operations = {}         # operation_name: operation
        port_type_bindings = {} # port_type_name: binding
        messages = {}           # message: element
        elements = {}           # element: type def
        
        for service in wsdl.service:
            service_name=service['name']
            if not service_name:
                continue # empty service?
            if debug: print "Processing service", service_name
            serv = services.setdefault(service_name, {'ports': {}})
            serv['documentation']=service['documentation'] or ''
            for port in service.port:
                binding_name = get_local_name(port['binding'])
                address = port('address', ns=soap_uris.values(), error=False)
                location = address and address['location'] or None
                soap_uri = address and soap_uris.get(address.get_prefix())
                soap_ver = soap_uri and soap_ns.get(soap_uri)
                bindings[binding_name] = {'service_name': service_name,
                    'location': location,
                    'soap_uri': soap_uri, 'soap_ver': soap_ver,
                    }
                serv['ports'][port['name']] = bindings[binding_name]
             
        for binding in wsdl.binding:
            binding_name = binding['name']
            if debug: print "Processing binding", service_name
            soap_binding = binding('binding', ns=soap_uris.values(), error=False)
            transport = soap_binding and soap_binding['transport'] or None
            port_type_name = get_local_name(binding['type'])
            bindings[binding_name].update({
                'port_type_name': port_type_name,
                'transport': transport, 'operations': {},
                })
            port_type_bindings[port_type_name] = bindings[binding_name]
            for operation in binding.operation:
                op_name = operation['name']
                op = operation('operation',ns=soap_uris.values(), error=False)
                action = op and op['soapAction']
                d = operations.setdefault(op_name, {})
                bindings[binding_name]['operations'][op_name] = d
                d.update({'name': op_name})
                #if action: #TODO: separe operation_binding from operation
                if action:
                    d["action"] = action
        
        #TODO: cleanup element/schema/types parsing:
        def process_element(element_name, node):
            "Parse and define simple element types"
            if debug: print "Processing element", element_name
            for tag in node:
                if tag.get_local_name() in ("annotation", "documentation"):
                    continue
                elif tag.get_local_name() in ('element', 'restriction'):
                    if debug: print element_name,"has not children!",tag
                    children = tag # element "alias"?
                    alias = True
                elif tag.children():
                    children = tag.children()
                    alias = False
                else:
                    if debug: print element_name,"has not children!",tag
                    continue #TODO: abstract?
                d = OrderedDict()                    
                for e in children:
                    t = e['type']
                    if not t:
                        t = e['base'] # complexContent (extension)!
                    if not t:
                        t = 'anyType' # no type given!
                    t = t.split(":")
                    if len(t)>1:
                        ns, type_name = t
                    else:
                        ns, type_name = None, t[0]
                    if element_name == type_name:
                        continue # prevent infinite recursion
                    uri = ns and e.get_namespace_uri(ns) or xsd_uri
                    if uri==xsd_uri:
                        # look for the type, None == any
                        fn = REVERSE_TYPE_MAP.get(unicode(type_name), None)
                    else:
                        # complex type, postprocess later
                        fn = elements.setdefault(unicode(type_name), OrderedDict())
                    if e['name'] is not None and not alias:
                        e_name = unicode(e['name'])
                        d[e_name] = fn
                    else:
                        if debug: print "complexConent/simpleType/element", element_name, "=", type_name
                        d[None] = fn
                    if e['maxOccurs']=="unbounded":
                        # it's an array... TODO: compound arrays?
                        d.array = True
                    if e is not None and e.get_local_name() == 'extension' and e.children():
                        # extend base element:
                        process_element(element_name, e.children())
                elements.setdefault(element_name, OrderedDict()).update(d)

        # check axis2 namespace at schema types attributes
        self.namespace = dict(wsdl.types("schema", ns=xsd_uri)[:]).get('targetNamespace', self.namespace) 

        imported_schemas = {}

        def preprocess_schema(schema):
            "Find schema elements and complex types"
            for element in schema.children():
                if element.get_local_name() in ('import', ):
                    schema_namespace = element['namespace']
                    schema_location = element['schemaLocation']
                    if schema_location is None:
                        if debug: print "Schema location not provided for %s!" % (schema_namespace, )
                        continue
                    if schema_location in imported_schemas:
                        if debug: print "Schema %s already imported!" % (schema_location, )
                        continue
                    imported_schemas[schema_location] = schema_namespace
                    if debug: print "Importing schema %s from %s" % (schema_namespace, schema_location)
                    # Open uri and read xml:
                    xml = fetch(schema_location)
                    # Parse imported XML schema (recursively):
                    imported_schema = SimpleXMLElement(xml, namespace=xsd_uri)
                    preprocess_schema(imported_schema)

                if element.get_local_name() in ('element', 'complexType', "simpleType"):
                    element_name = unicode(element['name'])
                    if debug: print "Parsing Element %s: %s" % (element.get_local_name(),element_name)
                    if element.get_local_name() == 'complexType':
                        children = element.children()
                    elif element.get_local_name() == 'simpleType':
                        children = element("restriction", ns=xsd_uri)
                    elif element.get_local_name() == 'element' and element['type']:
                        children = element
                    else:
                        children = element.children()
                        if children:
                            children = children.children()
                        elif element.get_local_name() == 'element':
                            children = element
                    if children:
                        process_element(element_name, children)

        def postprocess_element(elements):
            "Fix unresolved references (elements referenced before its definition, thanks .net)"
            for k,v in elements.items():
                if isinstance(v, OrderedDict):
                    if v.array:
                        elements[k] = [v] # convert arrays to python lists
                    if v!=elements: #TODO: fix recursive elements
                        postprocess_element(v)
                    if None in v and v[None]: # extension base?
                        if isinstance(v[None], dict):
                            for i, kk in enumerate(v[None]):
                                # extend base -keep orginal order-
                                elements[k].insert(kk, v[None][kk], i)
                            del v[None]
                        else:  # "alias", just replace
                            if debug: print "Replacing ", k , " = ", v[None]
                            elements[k] = v[None]
                            #break
                if isinstance(v, list):
                    for n in v: # recurse list
                        postprocess_element(n)

                        
        # process current wsdl schema:
        for schema in wsdl.types("schema", ns=xsd_uri): 
            preprocess_schema(schema)                

        postprocess_element(elements)

        for message in wsdl.message:
            if debug: print "Processing message", message['name']
            part = message('part', error=False)
            element = {}
            if part:
                element_name = part['element']
                if not element_name:
                    element_name = part['type'] # some uses type instead
                element_name = get_local_name(element_name)
                element = {element_name: elements.get(element_name)}
            messages[message['name']] = element
        
        for port_type in wsdl.portType:
            port_type_name = port_type['name']
            if debug: print "Processing port type", port_type_name
            binding = port_type_bindings[port_type_name]

            for operation in port_type.operation:
                op_name = operation['name']
                op = operations[op_name] 
                op['documentation'] = unicode(operation('documentation', error=False) or '')
                if binding['soap_ver']: 
                    #TODO: separe operation_binding from operation (non SOAP?)
                    input = get_local_name(operation.input['message'])
                    output = get_local_name(operation.output['message'])
                    op['input'] = messages[input]
                    op['output'] = messages[output]

        if debug:
            import pprint
            pprint.pprint(services)
        
        return services

def parse_proxy(proxy_str):
    "Parses proxy address user:pass@host:port into a dict suitable for httplib2"
    proxy_dict = {}
    if proxy_str is None:
        return 
    if "@" in proxy_str:
        user_pass, host_port = proxy_str.split("@")
    else:
        user_pass, host_port = "", proxy_str
    if ":" in host_port:
        host, port = host_port.split(":")
        proxy_dict['proxy_host'], proxy_dict['proxy_port'] = host, int(port)
    if ":" in user_pass:
        proxy_dict['proxy_user'], proxy_dict['proxy_pass'] = user_pass.split(":")
    return proxy_dict
    
    
if __name__=="__main__":
    import sys
    
    if '--web2py' in sys.argv:
        # test local sample webservice exposed by web2py
        from client import SoapClient
        if not '--wsdl' in sys.argv:
            client = SoapClient(
                location = "http://127.0.0.1:8000/webservices/sample/call/soap",
                action = 'http://127.0.0.1:8000/webservices/sample/call/soap', # SOAPAction
                namespace = "http://127.0.0.1:8000/webservices/sample/call/soap", 
                soap_ns='soap', trace = True, ns = False, exceptions=True)
        else:
            client = SoapClient(wsdl="http://127.0.0.1:8000/webservices/sample/call/soap?WSDL",trace=True)
        response = client.Dummy()
        print 'dummy', response
        response = client.Echo(value='hola')
        print 'echo', repr(response)
        response = client.AddIntegers(a=1,b=2)
        if not '--wsdl' in sys.argv:
            result = response.AddResult # manully convert returned type
            print int(result)
        else:
            result = response['AddResult']
            print result, type(result), "auto-unmarshalled"

    if '--raw' in sys.argv:
        # raw (unmarshalled parameter) local sample webservice exposed by web2py
        from client import SoapClient
        client = SoapClient(
            location = "http://127.0.0.1:8000/webservices/sample/call/soap",
            action = 'http://127.0.0.1:8000/webservices/sample/call/soap', # SOAPAction
            namespace = "http://127.0.0.1:8000/webservices/sample/call/soap", 
            soap_ns='soap', trace = True, ns = False)
        params = SimpleXMLElement("""<?xml version="1.0" encoding="UTF-8"?><AddIntegers><a>3</a><b>2</b></AddIntegers>""") # manully convert returned type
        response = client.call('AddIntegers',params)
        result = response.AddResult 
        print int(result) # manully convert returned type
            
    if '--ctg' in sys.argv:
        # test AFIP Agriculture webservice
        client = SoapClient(
            location = "https://fwshomo.afip.gov.ar/wsctg/services/CTGService",
            action = 'http://impl.service.wsctg.afip.gov.ar/CTGService/', # SOAPAction
            namespace = "http://impl.service.wsctg.afip.gov.ar/CTGService/",
            trace = True,
            ns = True)
        response = client.dummy()
        result = response.dummyResponse
        print str(result.appserver)
        print str(result.dbserver)
        print str(result.authserver)
    
    if '--wsfe' in sys.argv:
        # Demo & Test (AFIP Electronic Invoice):
        ta_file = open("TA.xml")
        try:
            ta_string = ta_file.read()   # read access ticket (wsaa.py)
        finally:
            ta_file.close()
        ta = SimpleXMLElement(ta_string)
        token = str(ta.credentials.token)
        sign = str(ta.credentials.sign)
        cuit = long(20267565393)
        id = 1234
        cbte =199
        client = SoapClient(
            location = "https://wswhomo.afip.gov.ar/wsfe/service.asmx",
            action = 'http://ar.gov.afip.dif.facturaelectronica/', # SOAPAction
            namespace = "http://ar.gov.afip.dif.facturaelectronica/",
            trace = True)
        results = client.FERecuperaQTYRequest(
            argAuth= {"Token": token, "Sign": sign, "cuit":long(cuit)}
        )
        if int(results.FERecuperaQTYRequestResult.RError.percode) != 0:
            print "Percode: %s" % results.FERecuperaQTYRequestResult.RError.percode
            print "MSGerror: %s" % results.FERecuperaQTYRequestResult.RError.perrmsg
        else:
            print int(results.FERecuperaQTYRequestResult.qty.value)
    
    if '--feriados' in sys.argv:
        # Demo & Test: Argentina Holidays (Ministerio del Interior):
        # this webservice seems disabled
        from datetime import datetime, timedelta
        client = SoapClient(
            location = "http://webservices.mininterior.gov.ar/Feriados/Service.svc",
            action = 'http://tempuri.org/IMyService/', # SOAPAction
            namespace = "http://tempuri.org/FeriadoDS.xsd",
            trace = True)
        dt1 = datetime.today() - timedelta(days=60)
        dt2 = datetime.today() + timedelta(days=60)
        feriadosXML = client.FeriadosEntreFechasas_xml(dt1=dt1.isoformat(), dt2=dt2.isoformat());
        print feriadosXML

    if '--wsdl-parse' in sys.argv:
        client = SoapClient()
        # Test PySimpleSOAP WSDL
        client.wsdl("file:C:/test.wsdl", debug=True)
        # Test Java Axis WSDL:
        client.wsdl('https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl',debug=True)
        # Test .NET 2.0 WSDL:
        client.wsdl('https://wswhomo.afip.gov.ar/wsfe/service.asmx?WSDL',debug=True)
        client.wsdl('https://wswhomo.afip.gov.ar/wsfex/service.asmx?WSDL',debug=True)
        client.wsdl('https://testdia.afip.gov.ar/Dia/Ws/wDigDepFiel/wDigDepFiel.asmx?WSDL',debug=True)
        # Test JBoss WSDL:
        client.wsdl('https://fwshomo.afip.gov.ar/wsctg/services/CTGService?wsdl',debug=True)
        client.wsdl('https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl',debug=True)

    if '--wsdl-client' in sys.argv:
        client = SoapClient(wsdl='https://wswhomo.afip.gov.ar/wsfex/service.asmx?WSDL',trace=True)
        results = client.FEXDummy()
        print results['FEXDummyResult']['AppServer']
        print results['FEXDummyResult']['DbServer']
        print results['FEXDummyResult']['AuthServer']
        ta_file = open("TA.xml")
        try:
            ta_string = ta_file.read()   # read access ticket (wsaa.py)
        finally:
            ta_file.close()
        ta = SimpleXMLElement(ta_string)
        token = str(ta.credentials.token)
        sign = str(ta.credentials.sign)
        response = client.FEXGetCMP(
            Auth={"Token": token, "Sign": sign, "Cuit": 20267565393},
            Cmp={"Tipo_cbte": 19, "Punto_vta": 1, "Cbte_nro": 1}) 
        result = response['FEXGetCMPResult']
        if False: print result
        if 'FEXErr' in result:
            print "FEXError:", result['FEXErr']['ErrCode'], result['FEXErr']['ErrCode'] 
        cbt = result['FEXResultGet']
        print cbt['Cae']
        FEX_event = result['FEXEvents']
        print FEX_event['EventCode'], FEX_event['EventMsg']

    if '--wsdl-ctg' in sys.argv:
        client = SoapClient(wsdl='https://fwshomo.afip.gov.ar/wsctg/services/CTGService?wsdl',
                            trace=True, ns = "ctg")
        results = client.dummy()
        print results
        print results['DummyResponse']['appserver']
        print results['DummyResponse']['dbserver']
        print results['DummyResponse']['authserver']
        ta_file = open("TA.xml")
        try:
            ta_string = ta_file.read()   # read access ticket (wsaa.py)
        finally:
            ta_file.close()
        ta = SimpleXMLElement(ta_string)
        token = str(ta.credentials.token)
        sign = str(ta.credentials.sign)
        print client.help("obtenerProvincias")
        response = client.obtenerProvincias(auth={"token":token, "sign":sign, "cuitRepresentado":20267565393})
        print "response=",response
        for ret in response:
            print ret['return']['codigoProvincia'], ret['return']['descripcionProvincia'].encode("latin1")
        prueba = dict(numeroCartaDePorte=512345678, codigoEspecie=23,
                cuitRemitenteComercial=20267565393, cuitDestino=20267565393, cuitDestinatario=20267565393, 
                codigoLocalidadOrigen=3058, codigoLocalidadDestino=3059, 
                codigoCosecha='0910', pesoNetoCarga=1000, cantHoras=1, 
                patenteVehiculo='CZO985', cuitTransportista=20267565393,
                numeroCTG="43816783", transaccion='10000001681', observaciones='',
            )

        response = client.solicitarCTG( 
            auth={"token": token, "sign": sign, "cuitRepresentado": 20267565393},
            solicitarCTGRequest= prueba)

        print response['return']['numeroCTG']

    ##print parse_proxy(None)
    ##print parse_proxy("host:1234")
    ##print parse_proxy("user:pass@host:1234")
    ##sys.exit(0) 

Added gluon/contrib/pysimplesoap/server.py version [7ef2196ac7].







































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: latin-1 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 3, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

"Simple SOAP Server implementation"

__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2010 Mariano Reingart"
__license__ = "LGPL 3.0"
__version__ = "1.02c"

from simplexml import SimpleXMLElement, TYPE_MAP, DateTime, Date, Decimal

DEBUG = False


class SoapDispatcher(object):
    "Simple Dispatcher for SOAP Server"
    
    def __init__(self, name, documentation='', action='', location='', 
                 namespace=None, prefix=False, 
                 soap_uri="http://schemas.xmlsoap.org/soap/envelope/", 
                 soap_ns='soap',
                 **kwargs):
        self.methods = {}
        self.name = name
        self.documentation = documentation
        self.action = action # base SoapAction
        self.location = location
        self.namespace = namespace # targetNamespace
        self.prefix = prefix
        self.soap_ns = soap_ns
        self.soap_uri = soap_uri
    
    def register_function(self, name, fn, returns=None, args=None, doc=None):
        self.methods[name] = fn, returns, args, doc or getattr(fn,"__doc__","")
        
    def dispatch(self, xml, action=None):
        "Receive and proccess SOAP call"
        # default values:
        prefix = self.prefix
        ret = fault = None
        soap_ns, soap_uri = self.soap_ns, self.soap_uri
        soap_fault_code = 'VersionMismatch'

        try:
            request = SimpleXMLElement(xml, namespace=self.namespace)

            # detect soap prefix and uri (xmlns attributes of Envelope)
            for k, v in request[:]:
                if v in ("http://schemas.xmlsoap.org/soap/envelope/",
                                  "http://www.w3.org/2003/05/soap-env",):
                    soap_ns = request.attributes()[k].localName
                    soap_uri = request.attributes()[k].value
            
            soap_fault_code = 'Client'
            
            # parse request message and get local method            
            method = request('Body', ns=soap_uri).children()(0)
            if action:
                # method name = action 
                name = action[len(self.action)+1:-1]
                prefix = self.prefix
            if not action or not name:
                # method name = input message name
                name = method.get_local_name()
                prefix = method.get_prefix()

            if DEBUG: print "dispatch method", name
            function, returns_types, args_types, doc = self.methods[name]
        
            # de-serialize parameters (if type definitions given)
            if args_types:
                args = method.children().unmarshall(args_types)
            elif args_types is None:
                args = {'request':method} # send raw request
            else:
                args = {} # no parameters
 
            soap_fault_code = 'Server'
            # execute function
            ret = function(**args)
            if DEBUG: print ret

        except Exception, e:
            import sys
            etype, evalue, etb = sys.exc_info()
            if DEBUG: 
                import traceback
                detail = ''.join(traceback.format_exception(etype, evalue, etb))
                detail += '\n\nXML REQUEST\n\n' + xml
            else:
                detail = None
            fault = {'faultcode': "%s.%s" % (soap_fault_code, etype.__name__), 
                     'faultstring': unicode(evalue), 
                     'detail': detail}

        # build response message
        if not prefix:
            xml = """<%(soap_ns)s:Envelope xmlns:%(soap_ns)s="%(soap_uri)s"/>"""  
        else:
            xml = """<%(soap_ns)s:Envelope xmlns:%(soap_ns)s="%(soap_uri)s"
                       xmlns:%(prefix)s="%(namespace)s"/>"""  
            
        xml = xml % {'namespace': self.namespace, 'prefix': prefix,
                     'soap_ns': soap_ns, 'soap_uri': soap_uri}

        response = SimpleXMLElement(xml, namespace=self.namespace,
                                    prefix=prefix)
    
        response['xmlns:xsi'] = "http://www.w3.org/2001/XMLSchema-instance"
        response['xmlns:xsd'] = "http://www.w3.org/2001/XMLSchema"

        body = response.add_child("%s:Body" % soap_ns, ns=False)
        if fault:
            # generate a Soap Fault (with the python exception)
            body.marshall("%s:Fault" % soap_ns, fault, ns=False)
        else:
            # return normal value
            res = body.add_child("%sResponse" % name, ns=prefix)
            if not prefix:
                res['xmlns'] = self.namespace # add target namespace

            # serialize returned values (response) if type definition available
            if returns_types:
                if not isinstance(ret, dict):
                    res.marshall(returns_types.keys()[0], ret, )
                else:
                    for k,v in ret.items():
                        res.marshall(k, v)
            elif returns_types is None:
                # merge xmlelement returned
                res.import_node(ret)

        return response.as_xml()

    # Introspection functions:

    def list_methods(self):
        "Return a list of aregistered operations"
        return [(method, doc) for method, (function, returns, args, doc) in self.methods.items()] 

    def help(self, method=None):
        "Generate sample request and response messages"
        (function, returns, args, doc) = self.methods[method]
        xml = """
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><%(method)s xmlns="%(namespace)s"/></soap:Body>
</soap:Envelope>"""  % {'method':method, 'namespace':self.namespace}
        request = SimpleXMLElement(xml, namespace=self.namespace, prefix=self.prefix)
        if args:
            items = args.items()
        elif args is None:
            items = [('value', None)]
        else:
            items = []
        for k,v in items:
            request(method).marshall(k, v, add_comments=True, ns=False)

        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}
        response = SimpleXMLElement(xml, namespace=self.namespace, prefix=self.prefix)
        if returns:
            items = returns.items()
        elif args is None:
            items = [('value', None)]
        else:
            items = []
        for k,v in items:
            response('%sResponse'%method).marshall(k, v, add_comments=True, ns=False)

        return request.as_xml(pretty=True), response.as_xml(pretty=True), doc


    def wsdl(self):
        "Generate Web Service Description v1.1"
        xml = """<?xml version="1.0"?>
<wsdl:definitions name="%(name)s" 
          targetNamespace="%(namespace)s"
          xmlns:tns="%(namespace)s"
          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">%(documentation)s</wsdl:documentation>

    <wsdl:types>
       <xsd:schema targetNamespace="%(namespace)s"
              elementFormDefault="qualified"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       </xsd:schema>
    </wsdl:types>

</wsdl:definitions>
""" % {'namespace': self.namespace, 'name': self.name, 'documentation': self.documentation}
        wsdl = SimpleXMLElement(xml)

        for method, (function, returns, args, doc) in self.methods.items():
            # create elements:
                
            def parse_element(name, values, array=False, complex=False):
                if not complex:
                    element = wsdl('wsdl:types')('xsd:schema').add_child('xsd:element')
                    complex = element.add_child("xsd:complexType")
                else:
                    complex = wsdl('wsdl:types')('xsd:schema').add_child('xsd:complexType')
                    element = complex
                element['name'] = name
                if values:
                    items = values
                elif values is None:
                    items = [('value', None)]
                else:
                    items = []
                if not array and items:
                    all = complex.add_child("xsd:all")
                elif items:
                    all = complex.add_child("xsd:sequence")
                for k,v in items:
                    e = all.add_child("xsd:element")
                    e['name'] = k
                    if array:
                        e[:]={'minOccurs': "0", 'maxOccurs': "unbounded"}
                    if v in TYPE_MAP.keys():
                        t='xsd:%s' % TYPE_MAP[v]
                    elif v is None:
                        t='xsd:anyType'
                    elif isinstance(v, list):
                        n="ArrayOf%s%s" % (name, k)
                        l = []
                        for d in v:
                            l.extend(d.items())
                        parse_element(n, l, array=True, complex=True)
                        t = "tns:%s" % n
                    elif isinstance(v, dict): 
                        n="%s%s" % (name, k)
                        parse_element(n, v.items(), complex=True)
                        t = "tns:%s" % n
                    e.add_attribute('type', t)
            
            parse_element("%s" % method, args and args.items())
            parse_element("%sResponse" % method, returns and returns.items())

            # create messages:
            for m,e in ('Input',''), ('Output','Response'):
                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)}

        # create ports
        portType = wsdl.add_child('wsdl:portType')
        portType['name'] = "%sPortType" % self.name
        for method, (function, returns, args, doc) in self.methods.items():
            op = portType.add_child('wsdl:operation')
            op['name'] = method
            if doc:
                op.add_child("wsdl:documentation", doc)
            input = op.add_child("wsdl:input")
            input['message'] = "tns:%sInput" % method
            output = op.add_child("wsdl:output")
            output['message'] = "tns:%sOutput" % method

        # create bindings
        binding = wsdl.add_child('wsdl:binding')
        binding['name'] = "%sBinding" % self.name
        binding['type'] = "tns:%sPortType" % self.name
        soapbinding = binding.add_child('soap:binding')
        soapbinding['style'] = "document"
        soapbinding['transport'] = "http://schemas.xmlsoap.org/soap/http"
        for method in self.methods.keys():
            op = binding.add_child('wsdl:operation')
            op['name'] = method
            soapop = op.add_child('soap:operation')
            soapop['soapAction'] = self.action + method
            soapop['style'] = 'document'
            input = op.add_child("wsdl:input")
            ##input.add_attribute('name', "%sInput" % method)
            soapbody = input.add_child("soap:body")
            soapbody["use"] = "literal"
            output = op.add_child("wsdl:output")
            ##output.add_attribute('name', "%sOutput" % method)
            soapbody = output.add_child("soap:body")
            soapbody["use"] = "literal"

        service = wsdl.add_child('wsdl:service')
        service["name"] = "%sService" % self.name
        service.add_child('wsdl:documentation', text=self.documentation)
        port=service.add_child('wsdl:port')
        port["name"] = "%s" % self.name
        port["binding"] = "tns:%sBinding" % self.name
        soapaddress = port.add_child('soap:address')
        soapaddress["location"] = self.location
        return wsdl.as_xml(pretty=True)
    

from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class SOAPHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        "User viewable help information and wsdl"
        args = self.path[1:].split("?")
        print "serving", args
        if self.path != "/" and args[0] not in self.server.dispatcher.methods.keys():
            self.send_error(404, "Method not found: %s" % args[0])
        else:
            if self.path == "/":
                # return wsdl if no method supplied
                response = self.server.dispatcher.wsdl()
            else:
                # return supplied method help (?request or ?response messages)
                req, res, doc = self.server.dispatcher.help(args[0])
                if len(args)==1 or args[1]=="request":
                    response = req
                else:
                    response = res                
            self.send_response(200)
            self.send_header("Content-type", "text/xml")
            self.end_headers()
            self.wfile.write(response)

    def do_POST(self):
        "SOAP POST gateway"
        self.send_response(200)
        self.send_header("Content-type", "text/xml")
        self.end_headers()
        request = self.rfile.read(int(self.headers.getheader('content-length')))
        response = self.server.dispatcher.dispatch(request)
        self.wfile.write(response)


if __name__=="__main__":
    import sys

    dispatcher = SoapDispatcher(
        name = "PySimpleSoapSample",
        location = "http://localhost:8008/",
        action = 'http://localhost:8008/', # SOAPAction
        namespace = "http://example.com/pysimplesoapsamle/", prefix="ns0",
        documentation = 'Example soap service using PySimpleSoap',
        trace = True,
        ns = True)
    
    def adder(p,c, dt=None):
        "Add several values"
        print c[0]['d'],c[1]['d'],
        import datetime
        dt = dt + datetime.timedelta(365)
        return {'ab': p['a']+p['b'], 'dd': c[0]['d']+c[1]['d'], 'dt': dt}

    def dummy(in0):
        "Just return input"
        return in0

    def echo(request):
        "Copy request->response (generic, any type)"
        return request.value

    dispatcher.register_function('Adder', adder,
        returns={'AddResult': {'ab': int, 'dd': str } }, 
        args={'p': {'a': int,'b': int}, 'dt': Date, 'c': [{'d': Decimal}]})

    dispatcher.register_function('Dummy', dummy,
        returns={'out0': str}, 
        args={'in0': str})

    dispatcher.register_function('Echo', echo)

    if '--local' in sys.argv:

        wsdl=dispatcher.wsdl()
        print wsdl
        testfile = open("C:/test.wsdl","w")
        try:
            testfile.write(wsdl)
        finally:
            testfile.close()
        # dummy local test (clasic soap dialect)
        xml = """<?xml version="1.0" encoding="UTF-8"?> 
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
       <soap:Body>
         <Adder xmlns="http://example.com/sample.wsdl">
           <p><a>1</a><b>2</b></p><c><d>5000000.1</d><d>.2</d></c><dt>20100724</dt>
        </Adder>
       </soap:Body>
    </soap:Envelope>"""

        print dispatcher.dispatch(xml)

        # dummy local test (modern soap dialect, SoapUI)
        xml = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pys="http://example.com/pysimplesoapsamle/">
   <soapenv:Header/>
   <soapenv:Body>
      <pys:Adder>
         <pys:p><pys:a>9</pys:a><pys:b>3</pys:b></pys:p>
         <pys:dt>19690720<!--1969-07-20T21:28:00--></pys:dt>
         <pys:c><pys:d>10.001</pys:d><pys:d>5.02</pys:d></pys:c>
      </pys:Adder>
   </soapenv:Body>
</soapenv:Envelope>
    """
        print dispatcher.dispatch(xml)

        # echo local test (generic soap service)
        xml = """<?xml version="1.0" encoding="UTF-8"?> 
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
         <Echo xmlns="http://example.com/sample.wsdl">
           <value xsi:type="xsd:string">Hello world</value>
        </Echo>
       </soap:Body>
    </soap:Envelope>"""

        print dispatcher.dispatch(xml)


        for method, doc in dispatcher.list_methods():
            request, response, doc = dispatcher.help(method)
            ##print request
            ##print response
            
    if '--serve' in sys.argv:
        print "Starting server..."
        httpd = HTTPServer(("", 8008), SOAPHandler)
        httpd.dispatcher = dispatcher
        httpd.serve_forever()

    if '--consume' in sys.argv:
        from client import SoapClient
        client = SoapClient(
            location = "http://localhost:8008/",
            action = 'http://localhost:8008/', # SOAPAction
            namespace = "http://example.com/sample.wsdl", 
            soap_ns='soap',
            trace = True,
            ns = False)
        response = client.Adder(p={'a':1,'b':2},dt='20100724',c=[{'d':'1.20'},{'d':'2.01'}])
        result = response.AddResult
        print int(result.ab)
        print str(result.dd)


Added gluon/contrib/pysimplesoap/simplexml.py version [dad238090a].
































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: latin-1 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 3, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

"Simple XML manipulation"

__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2008/009 Mariano Reingart"
__license__ = "LGPL 3.0"
__version__ = "1.02c"

import xml.dom.minidom
from decimal import Decimal
import datetime 
import time

DEBUG = False

# Functions to serialize/unserialize special immutable types:
datetime_u = lambda s: datetime.datetime.strptime(s, "%Y-%m-%dT%H:%M:%S")
datetime_m = lambda dt: dt.isoformat('T')
date_u = lambda s: datetime.datetime.strptime(s[0:10], "%Y-%m-%d").date()
date_m = lambda d: d.strftime("%Y-%m-%d")
time_u = lambda s: datetime.datetime.strptime(s, "%H:%M:%S").time()
time_m = lambda d: d.strftime("%H%M%S")
bool_u = lambda s: {'0':False, 'false': False, '1': True, 'true': True}[s]

# aliases:
class Alias():
    def __init__(self, py_type, xml_type):
        self.py_type, self.xml_type = py_type, xml_type
    def __call__(self, value):
        return self.py_type(value)
    def __repr__(self):
        return "<alias '%s' for '%s'>" % (self.xml_type, self.py_type)
        
byte = Alias(str,'byte')
short = Alias(int,'short')
double = Alias(float,'double')
integer = Alias(long,'integer')
DateTime = datetime.datetime
Date = datetime.date
Time = datetime.time

# Define convertion function (python type): xml schema type
TYPE_MAP = {str:'string',unicode:'string',
            bool:'boolean', short:'short', byte:'byte',
            int:'int', long:'long', integer:'integer', 
            float:'float', double:'double',
            Decimal:'decimal',
            datetime.datetime:'dateTime', datetime.date:'date',
            }
TYPE_MARSHAL_FN = {datetime.datetime:datetime_m, datetime.date:date_m,}
TYPE_UNMARSHAL_FN = {datetime.datetime:datetime_u, datetime.date:date_u,
                     bool:bool_u,
            }


class OrderedDict(dict):
    "Minimal ordered dictionary for xsd:sequences"
    def __init__(self):
        self.__keys = []
        self.array = False
    def __setitem__(self, key, value):
        if key not in self.__keys:
            self.__keys.append(key)
        dict.__setitem__(self, key, value)
    def insert(self, key, value, index=0):
        if key not in self.__keys:
            self.__keys.insert(index, key)
        dict.__setitem__(self, key, value)
    def __delitem__(self, key):
        if key in self.__keys:
            self.__keys.remove(key)
        dict.__delitem__(self, key)
    def __iter__(self):
        return iter(self.__keys)
    def keys(self):
        return self.__keys
    def items(self):
        return [(key, self[key]) for key in self.__keys]
    def update(self, other):
        for k,v in other.items():
            self[k] = v
        if isinstance(other, OrderedDict):
            self.array = other.array
    def __str__(self):
        return "*%s*" % dict.__str__(self)
    def __repr__(self):
        s= "*{%s}*" % ", ".join(['%s: %s' % (repr(k),repr(v)) for k,v in self.items()])
        if self.array and False:
            s = "[%s]" % s
        return s


class SimpleXMLElement(object):
    "Simple XML manipulation (simil PHP)"
    
    def __init__(self, text = None, elements = None, document = None, namespace = None, prefix=None):
        self.__ns = namespace
        self.__prefix = prefix
        if text:
            try:
                self.__document = xml.dom.minidom.parseString(text)
            except:
                if DEBUG: print text
                raise
            self.__elements = [self.__document.documentElement]
        else:
            self.__elements = elements
            self.__document = document
    
    def add_child(self,name,text=None,ns=True):
        "Adding a child tag to a node"
        if not ns or not self.__ns:
            if DEBUG: print "adding %s" % (name)
            element = self.__document.createElement(name)
        else:
            if DEBUG: print "adding %s ns %s %s" % (name, self.__ns,ns)
            if self.__prefix:
                element = self.__document.createElementNS(self.__ns, "%s:%s" % (self.__prefix, name))
            else:
                element = self.__document.createElementNS(self.__ns, name)
        if text:
            if isinstance(text, unicode):
                element.appendChild(self.__document.createTextNode(text))
            else:
                element.appendChild(self.__document.createTextNode(str(text)))
        self._element.appendChild(element)
        return SimpleXMLElement(
                    elements=[element],
                    document=self.__document,
                    namespace=self.__ns,
                    prefix=self.__prefix)
    
    def __setattr__(self, tag, text):
        "Add text child tag node (short form)"
        if tag.startswith("_"):
            object.__setattr__(self, tag, text)
        else:
            if DEBUG: print "__setattr__(%s,%s)" % (tag, text)
            self.add_child(tag,text)

    def add_comment(self, data):
        "Add an xml comment to this child"
        comment = self.__document.createComment(data)
        self._element.appendChild(comment)

    def as_xml(self,filename=None,pretty=False):
        "Return the XML representation of the document"
        if not pretty:
            return self.__document.toxml('UTF-8')
        else:
            return self.__document.toprettyxml(encoding='UTF-8')

    def __repr__(self):
        "Return the XML representation of this tag"
        return self._element.toxml('UTF-8')

    def get_name(self):
        "Return the tag name of this node"
        return self._element.tagName

    def get_local_name(self):
        "Return the tag loca name (prefix:name) of this node"
        return self._element.localName

    def get_prefix(self):
        "Return the namespace prefix of this node"
        return self._element.prefix

    def get_namespace_uri(self, ns):
        "Return the namespace uri for a prefix"
        v = self.__document.documentElement.attributes['xmlns:%s' % ns]
        return v.value

    def attributes(self):
        "Return a dict of attributes for this tag"
        #TODO: use slice syntax [:]?
        return self._element.attributes

    def __getitem__(self, item):
        "Return xml tag attribute value or a slice of attributes (iter)"
        if DEBUG: print "__getitem__(%s)" % item 
        if isinstance(item,basestring):
            if self._element.hasAttribute(item):
                return self._element.attributes[item].value
        elif isinstance(item, slice):
            # return a list with name:values
            return self._element.attributes.items()[item]
        else:
            # return element by index (position)
            element = self.__elements[item]
            return SimpleXMLElement(
                    elements=[element],
                    document=self.__document,
                    namespace=self.__ns,
                    prefix=self.__prefix)
            
    def add_attribute(self, name, value):
        "Set an attribute value from a string"
        self._element.setAttribute(name, value)
 
    def __setitem__(self, item, value):
        "Set an attribute value"
        if isinstance(item,basestring):
            self.add_attribute(item, value)
        elif isinstance(item, slice):
            # set multiple attributes at once
            for k, v in value.items():
                self.add_attribute(k, v)

    def __call__(self, tag=None, ns=None, children=False, error=True):
        "Search (even in child nodes) and return a child tag by name"
        try:
            if tag is None:
                # if no name given, iterate over siblings (same level)
                return self.__iter__()
            if children:
                # future: filter children? by ns?
                return self.children()
            elements = None
            if isinstance(tag, int):
                # return tag by index
                elements=[self.__elements[tag]]
            if ns and not elements:
                for ns_uri in isinstance(ns, (tuple, list)) and ns or (ns, ):
                    if DEBUG: print "searching %s by ns=%s" % (tag,ns_uri)
                    elements = self._element.getElementsByTagNameNS(ns_uri, tag)
                    if elements: 
                        break
            if self.__ns and not elements:
                if DEBUG: print "searching %s by ns=%s" % (tag, self.__ns)
                elements = self._element.getElementsByTagNameNS(self.__ns, tag)
            if not elements:
                if DEBUG: print "searching %s " % (tag)
                elements = self._element.getElementsByTagName(tag)
            if not elements:
                if DEBUG: print self._element.toxml()
                if error:
                    raise AttributeError("No elements found")
                else:
                    return
            return SimpleXMLElement(
                elements=elements,
                document=self.__document,
                namespace=self.__ns,
                prefix=self.__prefix)
        except AttributeError, e:
            raise AttributeError("Tag not found: %s (%s)" % (tag, str(e)))

    def __getattr__(self, tag):
        "Shortcut for __call__"
        return self.__call__(tag)
        
    def __iter__(self):
        "Iterate over xml tags at this level"
        try:
            for __element in self.__elements:
                yield SimpleXMLElement(
                    elements=[__element],
                    document=self.__document,
                    namespace=self.__ns,
                    prefix=self.__prefix)
        except:
            raise

    def __dir__(self):
        "List xml children tags names"
        return [node.tagName for node 
                in self._element.childNodes
                if node.nodeType != node.TEXT_NODE]

    def children(self):
        "Return xml children tags element"
        elements=[__element for __element in self._element.childNodes
                          if __element.nodeType == __element.ELEMENT_NODE]
        if not elements:
            return None
            #raise IndexError("Tag %s has no children" % self._element.tagName)
        return SimpleXMLElement(
                elements=elements,
                document=self.__document,
                namespace=self.__ns,
                prefix=self.__prefix)

    def __len__(self):
        "Return elements count"
        return len(self.__elements)
        
    def __contains__( self, item):
        "Search for a tag name in this element or child nodes"
        return self._element.getElementsByTagName(item)
    
    def __unicode__(self):
        "Returns the unicode text nodes of the current element"
        if self._element.childNodes:
            rc = u""
            for node in self._element.childNodes:
                if node.nodeType == node.TEXT_NODE:
                    rc = rc + node.data
            return rc
        return ''
    
    def __str__(self):
        "Returns the str text nodes of the current element"
        return unicode(self).encode("utf8","ignore")

    def __int__(self):
        "Returns the integer value of the current element"
        return int(self.__str__())

    def __float__(self):
        "Returns the float value of the current element"
        try:
            return float(self.__str__())
        except:
            raise IndexError(self._element.toxml())    
    
    _element = property(lambda self: self.__elements[0])

    def unmarshall(self, types):
        "Convert to python values the current serialized xml element"
        # types is a dict of {tag name: convertion function}
        # example: types={'p': {'a': int,'b': int}, 'c': [{'d':str}]}
        #   expected xml: <p><a>1</a><b>2</b></p><c><d>hola</d><d>chau</d>
        #   returnde value: {'p': {'a':1,'b':2}, `'c':[{'d':'hola'},{'d':'chau'}]}
        d = {}
        for node in self():
            name = str(node.get_local_name())
            try:
                fn = types[name]
            except (KeyError, ), e:
                raise TypeError("Tag: %s invalid" % (name,))
            if isinstance(fn,list):
                value = []
                children = node.children()
                for child in children and children() or []:
                    value.append(child.unmarshall(fn[0]))
            elif isinstance(fn,dict):
                children = node.children()
                value = children and children.unmarshall(fn)
            else:
                if fn is None: # xsd:anyType not unmarshalled
                    value = node
                elif str(node) or fn == str:
                    try:
                        # get special desserialization function (if any)
                        fn = TYPE_UNMARSHAL_FN.get(fn,fn) 
                        value = fn(unicode(node))
                    except (ValueError, TypeError), e:
                        raise ValueError("Tag: %s: %s" % (name, unicode(e)))
                else:
                    value = None
            d[name] = value
        return d

    def marshall(self, name, value, add_child=True, add_comments=False, ns=False):
        "Analize python value and add the serialized XML element using tag name"
        if isinstance(value, dict):  # serialize dict (<key>value</key>)
            child = add_child and self.add_child(name,ns=ns) or self
            for k,v in value.items():
                child.marshall(k, v, add_comments=add_comments, ns=ns)
        elif isinstance(value, tuple):  # serialize tuple (<key>value</key>)
            child = add_child and self.add_child(name,ns=ns) or self
            for k,v in value:
                getattr(self,name).marshall(k, v, add_comments=add_comments, ns=ns)
        elif isinstance(value, list): # serialize lists
            child=self.add_child(name,ns=ns)
            if add_comments:
                child.add_comment("Repetitive array of:")
            for t in value:
                child.marshall(name,t, False, add_comments=add_comments, ns=ns)
        elif isinstance(value, basestring): # do not convert strings or unicodes
            self.add_child(name,value,ns=ns)
        elif value is None: # sent a empty tag?
            self.add_child(name,ns=ns)
        elif value in TYPE_MAP.keys():
            # add commented placeholders for simple tipes (for examples/help only)
            child = self.add_child(name,ns=ns) 
            child.add_comment(TYPE_MAP[value])
        else: # the rest of object types are converted to string 
            # get special serialization function (if any)
            fn = TYPE_MARSHAL_FN.get(type(value),str)
            self.add_child(name,fn(value),ns=ns) 

    def import_node(self, other):
        x = self.__document.importNode(other._element, True)  # deep copy
        self._element.appendChild(x)


if __name__ == "__main__":
    span = SimpleXMLElement('<span><a href="python.org.ar">pyar</a><prueba><i>1</i><float>1.5</float></prueba></span>')
    assert str(span.a)==str(span('a'))==str(span.a(0))=="pyar"
    assert span.a['href']=="python.org.ar"
    assert int(span.prueba.i)==1 and float(span.prueba.float)==1.5
    span1 = SimpleXMLElement('<span><a href="google.com">google</a><a>yahoo</a><a>hotmail</a></span>')
    assert [str(a) for a in span1.a()] == ['google', 'yahoo', 'hotmail']
    span1.add_child('a','altavista')
    span1.b = "ex msn"
    d = {'href':'http://www.bing.com/', 'alt': 'Bing'} 
    span1.b[:] = d
    assert sorted([(k,v) for k,v in span1.b[:]]) == sorted(d.items())
    print span1.as_xml()
    assert 'b' in span1
    span.import_node(span1)
    print span.as_xml()

Added gluon/contrib/rss2.py version [16f1766766].














































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""PyRSS2Gen - A Python library for generating RSS 2.0 feeds."""

__name__ = 'PyRSS2Gen'
__version__ = (1, 0, 0)
__author__ = 'Andrew Dalke <dalke@dalkescientific.com>'

_generator_name = __name__ + '-' + '.'.join(map(str, __version__))

import datetime
import cStringIO

# Could make this the base class; will need to add 'publish'


class WriteXmlMixin:

    def write_xml(self, outfile, encoding='iso-8859-1'):
        from xml.sax import saxutils
        handler = saxutils.XMLGenerator(outfile, encoding)
        handler.startDocument()
        self.publish(handler)
        handler.endDocument()

    def to_xml(self, encoding='iso-8859-1'):
        try:
            import cStringIO as StringIO
        except ImportError:
            import StringIO
        f = StringIO.StringIO()
        self.write_xml(f, encoding)
        return f.getvalue()


def _element(
    handler,
    name,
    obj,
    d={},
    ):
    if isinstance(obj, basestring) or obj is None:

        # special-case handling to make the API easier
        # to use for the common case.

        handler.startElement(name, d)
        if obj is not None:
            handler.characters(obj)
        handler.endElement(name)
    else:

        # It better know how to emit the correct XML.

        obj.publish(handler)


def _opt_element(handler, name, obj):
    if obj is None:
        return
    _element(handler, name, obj)


def _format_date(dt):
    """convert a datetime into an RFC 822 formatted date

    Input date must be in GMT.
    """

    # Looks like:
    #   Sat, 07 Sep 2002 00:00:01 GMT
    # Can't use strftime because that's locale dependent
    #
    # Isn't there a standard way to do this for Python?  The
    # rfc822 and email.Utils modules assume a timestamp.  The
    # following is based on the rfc822 module.

    return '%s, %02d %s %04d %02d:%02d:%02d GMT' % (
        [
            'Mon',
            'Tue',
            'Wed',
            'Thu',
            'Fri',
            'Sat',
            'Sun',
            ][dt.weekday()],
        dt.day,
        [
            'Jan',
            'Feb',
            'Mar',
            'Apr',
            'May',
            'Jun',
            'Jul',
            'Aug',
            'Sep',
            'Oct',
            'Nov',
            'Dec',
            ][dt.month - 1],
        dt.year,
        dt.hour,
        dt.minute,
        dt.second,
        )


##
# A couple simple wrapper objects for the fields which
# take a simple value other than a string.


class IntElement:

    """implements the 'publish' API for integers

    Takes the tag name and the integer value to publish.

    (Could be used for anything which uses str() to be published
    to text for XML.)
    """

    element_attrs = {}

    def __init__(self, name, val):
        self.name = name
        self.val = val

    def publish(self, handler):
        handler.startElement(self.name, self.element_attrs)
        handler.characters(str(self.val))
        handler.endElement(self.name)


class DateElement:

    """implements the 'publish' API for a datetime.datetime

    Takes the tag name and the datetime to publish.

    Converts the datetime to RFC 2822 timestamp (4-digit year).
    """

    def __init__(self, name, dt):
        self.name = name
        self.dt = dt

    def publish(self, handler):
        _element(handler, self.name, _format_date(self.dt))


# ###


class Category:

    """Publish a category element"""

    def __init__(self, category, domain=None):
        self.category = category
        self.domain = domain

    def publish(self, handler):
        d = {}
        if self.domain is not None:
            d['domain'] = self.domain
        _element(handler, 'category', self.category, d)


class Cloud:

    """Publish a cloud"""

    def __init__(
        self,
        domain,
        port,
        path,
        registerProcedure,
        protocol,
        ):
        self.domain = domain
        self.port = port
        self.path = path
        self.registerProcedure = registerProcedure
        self.protocol = protocol

    def publish(self, handler):
        _element(handler, 'cloud', None, {
            'domain': self.domain,
            'port': str(self.port),
            'path': self.path,
            'registerProcedure': self.registerProcedure,
            'protocol': self.protocol,
            })


class Image:

    """Publish a channel Image"""

    element_attrs = {}

    def __init__(
        self,
        url,
        title,
        link,
        width=None,
        height=None,
        description=None,
        ):
        self.url = url
        self.title = title
        self.link = link
        self.width = width
        self.height = height
        self.description = description

    def publish(self, handler):
        handler.startElement('image', self.element_attrs)

        _element(handler, 'url', self.url)
        _element(handler, 'title', self.title)
        _element(handler, 'link', self.link)

        width = self.width
        if isinstance(width, int):
            width = IntElement('width', width)
        _opt_element(handler, 'width', width)

        height = self.height
        if isinstance(height, int):
            height = IntElement('height', height)
        _opt_element(handler, 'height', height)

        _opt_element(handler, 'description', self.description)

        handler.endElement('image')


class Guid:

    """Publish a guid

    Defaults to being a permalink, which is the assumption if it's
    omitted.  Hence strings are always permalinks.
    """

    def __init__(self, guid, isPermaLink=1):
        self.guid = guid
        self.isPermaLink = isPermaLink

    def publish(self, handler):
        d = {}
        if self.isPermaLink:
            d['isPermaLink'] = 'true'
        else:
            d['isPermaLink'] = 'false'
        _element(handler, 'guid', self.guid, d)


class TextInput:

    """Publish a textInput

    Apparently this is rarely used.
    """

    element_attrs = {}

    def __init__(
        self,
        title,
        description,
        name,
        link,
        ):
        self.title = title
        self.description = description
        self.name = name
        self.link = link

    def publish(self, handler):
        handler.startElement('textInput', self.element_attrs)
        _element(handler, 'title', self.title)
        _element(handler, 'description', self.description)
        _element(handler, 'name', self.name)
        _element(handler, 'link', self.link)
        handler.endElement('textInput')


class Enclosure:

    """Publish an enclosure"""

    def __init__(
        self,
        url,
        length,
        type,
        ):
        self.url = url
        self.length = length
        self.type = type

    def publish(self, handler):
        _element(handler, 'enclosure', None,
            {'url': self.url, 'length': str(self.length), 'type': self.type})


class Source:

    """Publish the item's original source, used by aggregators"""

    def __init__(self, name, url):
        self.name = name
        self.url = url

    def publish(self, handler):
        _element(handler, 'source', self.name, {'url': self.url})


class SkipHours:

    """Publish the skipHours

    This takes a list of hours, as integers.
    """

    element_attrs = {}

    def __init__(self, hours):
        self.hours = hours

    def publish(self, handler):
        if self.hours:
            handler.startElement('skipHours', self.element_attrs)
            for hour in self.hours:
                _element(handler, 'hour', str(hour))
            handler.endElement('skipHours')


class SkipDays:

    """Publish the skipDays

    This takes a list of days as strings.
    """

    element_attrs = {}

    def __init__(self, days):
        self.days = days

    def publish(self, handler):
        if self.days:
            handler.startElement('skipDays', self.element_attrs)
            for day in self.days:
                _element(handler, 'day', day)
            handler.endElement('skipDays')


class RSS2(WriteXmlMixin):

    """The main RSS class.

    Stores the channel attributes, with the \"category\" elements under
    \".categories\" and the RSS items under \".items\".
    """

    rss_attrs = {'version': '2.0'}
    element_attrs = {}

    def __init__(
        self,
        title,
        link,
        description,
        language=None,
        copyright=None,
        managingEditor=None,
        webMaster=None,
        pubDate=None,
        lastBuildDate=None,
        categories=None,
        generator=_generator_name,
        docs='http://blogs.law.harvard.edu/tech/rss',
        cloud=None,
        ttl=None,
        image=None,
        rating=None,
        textInput=None,
        skipHours=None,
        skipDays=None,
        items=None,
        ):

        self.title = title
        self.link = link
        self.description = description
        self.language = language
        self.copyright = copyright
        self.managingEditor = managingEditor

        self.webMaster = webMaster
        self.pubDate = pubDate
        self.lastBuildDate = lastBuildDate

        if categories is None:
            categories = []
        self.categories = categories
        self.generator = generator
        self.docs = docs
        self.cloud = cloud
        self.ttl = ttl
        self.image = image
        self.rating = rating
        self.textInput = textInput
        self.skipHours = skipHours
        self.skipDays = skipDays

        if items is None:
            items = []
        self.items = items

    def publish(self, handler):
        handler.startElement('rss', self.rss_attrs)
        handler.startElement('channel', self.element_attrs)
        _element(handler, 'title', self.title)
        _element(handler, 'link', self.link)
        _element(handler, 'description', self.description)

        self.publish_extensions(handler)

        _opt_element(handler, 'language', self.language)
        _opt_element(handler, 'copyright', self.copyright)
        _opt_element(handler, 'managingEditor', self.managingEditor)
        _opt_element(handler, 'webMaster', self.webMaster)

        pubDate = self.pubDate
        if isinstance(pubDate, datetime.datetime):
            pubDate = DateElement('pubDate', pubDate)
        _opt_element(handler, 'pubDate', pubDate)

        lastBuildDate = self.lastBuildDate
        if isinstance(lastBuildDate, datetime.datetime):
            lastBuildDate = DateElement('lastBuildDate', lastBuildDate)
        _opt_element(handler, 'lastBuildDate', lastBuildDate)

        for category in self.categories:
            if isinstance(category, basestring):
                category = Category(category)
            category.publish(handler)

        _opt_element(handler, 'generator', self.generator)
        _opt_element(handler, 'docs', self.docs)

        if self.cloud is not None:
            self.cloud.publish(handler)

        ttl = self.ttl
        if isinstance(self.ttl, int):
            ttl = IntElement('ttl', ttl)
        _opt_element(handler, 'tt', ttl)

        if self.image is not None:
            self.image.publish(handler)

        _opt_element(handler, 'rating', self.rating)
        if self.textInput is not None:
            self.textInput.publish(handler)
        if self.skipHours is not None:
            self.skipHours.publish(handler)
        if self.skipDays is not None:
            self.skipDays.publish(handler)

        for item in self.items:
            item.publish(handler)

        handler.endElement('channel')
        handler.endElement('rss')

    def publish_extensions(self, handler):

        # Derived classes can hook into this to insert
        # output after the three required fields.

        pass


class RSSItem(WriteXmlMixin):

    """Publish an RSS Item"""

    element_attrs = {}

    def __init__(
        self,
        title=None,
        link=None,
        description=None,
        author=None,
        categories=None,
        comments=None,
        enclosure=None,
        guid=None,
        pubDate=None,
        source=None,
        ):

        if title is None and description is None:
            raise TypeError(
                "RSSItem must define at least one of 'title' or 'description'")
        self.title = title
        self.link = link
        self.description = description
        self.author = author
        if categories is None:
            categories = []
        self.categories = categories
        self.comments = comments
        self.enclosure = enclosure
        self.guid = guid
        self.pubDate = pubDate
        self.source = source

        # It sure does get tedious typing these names three times...

    def publish(self, handler):
        handler.startElement('item', self.element_attrs)
        _opt_element(handler, 'title', self.title)
        _opt_element(handler, 'link', self.link)
        self.publish_extensions(handler)
        _opt_element(handler, 'description', self.description)
        _opt_element(handler, 'author', self.author)

        for category in self.categories:
            if isinstance(category, basestring):
                category = Category(category)
            category.publish(handler)

        _opt_element(handler, 'comments', self.comments)
        if self.enclosure is not None:
            self.enclosure.publish(handler)
        _opt_element(handler, 'guid', self.guid)

        pubDate = self.pubDate
        if isinstance(pubDate, datetime.datetime):
            pubDate = DateElement('pubDate', pubDate)
        _opt_element(handler, 'pubDate', pubDate)

        if self.source is not None:
            self.source.publish(handler)

        handler.endElement('item')

    def publish_extensions(self, handler):

        # Derived classes can hook into this to insert
        # output after the title and link elements

        pass


def dumps(rss, encoding='utf-8'):
    s = cStringIO.StringIO()
    rss.write_xml(s, encoding)
    return s.getvalue()


def test():
    rss = RSS2(title='web2py feed', link='http://www.web2py.com',
               description='About web2py',
               lastBuildDate=datetime.datetime.now(),
               items=[RSSItem(title='web2py and PyRSS2Gen-0.0',
               link='http://www.web2py.com/examples/simple_examples/getrss',
               description='web2py can now make rss feeds!',
               guid=Guid('http://www.web2py.com/'),
               pubDate=datetime.datetime(2007, 11, 14, 10, 30))])
    return dumps(rss)


if __name__ == '__main__':
    print test()

Added gluon/contrib/shell.py version [cee4aa579b].












































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Modified by Massimo Di Pierro so it works with and without GAE with web2py
# the modified version of this file is still released under the original Apache license
# and it is not released under the web2py license.
#
# This should be compatible with the Apache license since it states:
# "For the purposes of this License, Derivative Works shall not include works
#   that remain separable from, or merely link (or bind by name) to the interfaces of,
#   the Work and Derivative Works thereof."
#
# In fact this file is Apache-licensed and it is separable from the rest of web2py.


"""
An interactive, stateful AJAX shell that runs Python code on the server.
"""

import logging
import new
import os
import cPickle
import sys
import traceback
import types
import wsgiref.handlers
import StringIO
import threading
locker = threading.RLock()

# Set to True if stack traces should be shown in the browser, etc.
_DEBUG = True

# The entity kind for shell historys. Feel free to rename to suit your app.
_HISTORY_KIND = '_Shell_History'

# Types that can't be pickled.
UNPICKLABLE_TYPES = (
    types.ModuleType,
    types.TypeType,
    types.ClassType,
    types.FunctionType,
    )

# Unpicklable statements to seed new historys with.
INITIAL_UNPICKLABLES = [
    'import logging',
    'import os',
    'import sys',
    ]


class History:
    """A shell history. Stores the history's globals.

    Each history globals is stored in one of two places:

    If the global is picklable, it's stored in the parallel globals and
    global_names list properties. (They're parallel lists to work around the
    unfortunate fact that the datastore can't store dictionaries natively.)

    If the global is not picklable (e.g. modules, classes, and functions), or if
    it was created by the same statement that created an unpicklable global,
    it's not stored directly. Instead, the statement is stored in the
    unpicklables list property. On each request, before executing the current
    statement, the unpicklable statements are evaluated to recreate the
    unpicklable globals.

    The unpicklable_names property stores all of the names of globals that were
    added by unpicklable statements. When we pickle and store the globals after
    executing a statement, we skip the ones in unpicklable_names.

    Using Text instead of string is an optimization. We don't query on any of
    these properties, so they don't need to be indexed.
    """
    global_names = []
    globals = []
    unpicklable_names = []
    unpicklables = []

    def set_global(self, name, value):
        """Adds a global, or updates it if it already exists.

        Also removes the global from the list of unpicklable names.

        Args:
            name: the name of the global to remove
            value: any picklable value
        """
        blob = cPickle.dumps(value)

        if name in self.global_names:
            index = self.global_names.index(name)
            self.globals[index] = blob
        else:
            self.global_names.append(name)
            self.globals.append(blob)

        self.remove_unpicklable_name(name)

    def remove_global(self, name):
        """Removes a global, if it exists.

        Args:
            name: string, the name of the global to remove
        """
        if name in self.global_names:
            index = self.global_names.index(name)
            del self.global_names[index]
            del self.globals[index]

    def globals_dict(self):
        """Returns a dictionary view of the globals.
        """
        return dict((name, cPickle.loads(val))
                    for name, val in zip(self.global_names, self.globals))

    def add_unpicklable(self, statement, names):
        """Adds a statement and list of names to the unpicklables.

        Also removes the names from the globals.

        Args:
            statement: string, the statement that created new unpicklable global(s).
            names: list of strings; the names of the globals created by the statement.
        """
        self.unpicklables.append(statement)

        for name in names:
            self.remove_global(name)
            if name not in self.unpicklable_names:
                self.unpicklable_names.append(name)

    def remove_unpicklable_name(self, name):
        """Removes a name from the list of unpicklable names, if it exists.

        Args:
            name: string, the name of the unpicklable global to remove
        """
        if name in self.unpicklable_names:
            self.unpicklable_names.remove(name)

def represent(obj):
    """Returns a string representing the given object's value, which should allow the
    code below to determine whether the object changes over time.
    """
    try:
        return cPickle.dumps(obj)
    except:
        return repr(obj)

def run(history, statement, env={}):
    """
    Evaluates a python statement in a given history and returns the result.
    """
    history.unpicklables = INITIAL_UNPICKLABLES

    # extract the statement to be run
    if not statement:
        return ''

    # the python compiler doesn't like network line endings
    statement = statement.replace('\r\n', '\n')

    # add a couple newlines at the end of the statement. this makes
    # single-line expressions such as 'class Foo: pass' evaluate happily.
    statement += '\n\n'


    # log and compile the statement up front
    try:
        logging.info('Compiling and evaluating:\n%s' % statement)
        compiled = compile(statement, '<string>', 'single')
    except:
        return str(traceback.format_exc())

    # create a dedicated module to be used as this statement's __main__
    statement_module = new.module('__main__')

    # use this request's __builtin__, since it changes on each request.
    # this is needed for import statements, among other things.
    import __builtin__
    statement_module.__builtins__ = __builtin__

    # load the history from the datastore
    history = History()

    # swap in our custom module for __main__. then unpickle the history
    # globals, run the statement, and re-pickle the history globals, all
    # inside it.
    old_main = sys.modules.get('__main__')
    output = StringIO.StringIO()
    try:
        sys.modules['__main__'] = statement_module
        statement_module.__name__ = '__main__'
        statement_module.__dict__.update(env)

        # re-evaluate the unpicklables
        for code in history.unpicklables:
            exec code in statement_module.__dict__

        # re-initialize the globals
        for name, val in history.globals_dict().items():
            try:
                statement_module.__dict__[name] = val
            except:
                msg = 'Dropping %s since it could not be unpickled.\n' % name
                output.write(msg)
                logging.warning(msg + traceback.format_exc())
                history.remove_global(name)

        # run!
        old_globals = dict((key,represent(value)) for key,value in statement_module.__dict__.items())
        try:
            old_stdout, old_stderr = sys.stdout, sys.stderr
            try:
                sys.stderr = sys.stdout = output
                locker.acquire()
                exec compiled in statement_module.__dict__
            finally:
                locker.release()
                sys.stdout, sys.stderr = old_stdout, old_stderr
        except:
            output.write(str(traceback.format_exc()))
            return output.getvalue()

        # extract the new globals that this statement added
        new_globals = {}
        for name, val in statement_module.__dict__.items():
            if name not in old_globals or represent(val) != old_globals[name]:
                new_globals[name] = val

        if True in [isinstance(val, UNPICKLABLE_TYPES)
                    for val in new_globals.values()]:
            # this statement added an unpicklable global. store the statement and
            # the names of all of the globals it added in the unpicklables.
            history.add_unpicklable(statement, new_globals.keys())
            logging.debug('Storing this statement as an unpicklable.')
        else:
            # this statement didn't add any unpicklables. pickle and store the
            # new globals back into the datastore.
            for name, val in new_globals.items():
                if not name.startswith('__'):
                    history.set_global(name, val)

    finally:
        sys.modules['__main__'] = old_main
    return output.getvalue()

if __name__=='__main__':
    history=History()
    while True: print run(history, raw_input('>>> ')).rstrip()

Added gluon/contrib/simplejson/LICENSE.txt version [1c49204669].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Copyright (c) 2006 Bob Ippolito

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.

Added gluon/contrib/simplejson/__init__.py version [85545ee92e].
























































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.

:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of the :mod:`json` library contained in Python 2.6, but maintains
compatibility with Python 2.4 and Python 2.5 and (currently) has
significant performance advantages, even without using the optional C
extension for speedups.

Encoding basic Python object hierarchies::

    >>> import simplejson as json
    >>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
    '["foo", {"bar": ["baz", null, 1.0, 2]}]'
    >>> print json.dumps("\"foo\bar")
    "\"foo\bar"
    >>> print json.dumps(u'\u1234')
    "\u1234"
    >>> print json.dumps('\\')
    "\\"
    >>> print json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True)
    {"a": 0, "b": 0, "c": 0}
    >>> from StringIO import StringIO
    >>> io = StringIO()
    >>> json.dump(['streaming API'], io)
    >>> io.getvalue()
    '["streaming API"]'

Compact encoding::

    >>> import simplejson as json
    >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':'))
    '[1,2,3,{"4":5,"6":7}]'

Pretty printing::

    >>> import simplejson as json
    >>> s = json.dumps({'4': 5, '6': 7}, sort_keys=True, indent='    ')
    >>> print '\n'.join([l.rstrip() for l in  s.splitlines()])
    {
        "4": 5,
        "6": 7
    }

Decoding JSON::

    >>> import simplejson as json
    >>> obj = [u'foo', {u'bar': [u'baz', None, 1.0, 2]}]
    >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') == obj
    True
    >>> json.loads('"\\"foo\\bar"') == u'"foo\x08ar'
    True
    >>> from StringIO import StringIO
    >>> io = StringIO('["streaming API"]')
    >>> json.load(io)[0] == 'streaming API'
    True

Specializing JSON object decoding::

    >>> import simplejson as json
    >>> def as_complex(dct):
    ...     if '__complex__' in dct:
    ...         return complex(dct['real'], dct['imag'])
    ...     return dct
    ...
    >>> json.loads('{"__complex__": true, "real": 1, "imag": 2}',
    ...     object_hook=as_complex)
    (1+2j)
    >>> from decimal import Decimal
    >>> json.loads('1.1', parse_float=Decimal) == Decimal('1.1')
    True

Specializing JSON object encoding::

    >>> import simplejson as json
    >>> def encode_complex(obj):
    ...     if isinstance(obj, complex):
    ...         return [obj.real, obj.imag]
    ...     raise TypeError(repr(o) + " is not JSON serializable")
    ...
    >>> json.dumps(2 + 1j, default=encode_complex)
    '[2.0, 1.0]'
    >>> json.JSONEncoder(default=encode_complex).encode(2 + 1j)
    '[2.0, 1.0]'
    >>> ''.join(json.JSONEncoder(default=encode_complex).iterencode(2 + 1j))
    '[2.0, 1.0]'


Using simplejson.tool from the shell to validate and pretty-print::

    $ echo '{"json":"obj"}' | python -m simplejson.tool
    {
        "json": "obj"
    }
    $ echo '{ 1.2:3.4}' | python -m simplejson.tool
    Expecting property name: line 1 column 2 (char 2)
"""
__version__ = '2.1.3'
__all__ = [
    'dump', 'dumps', 'load', 'loads',
    'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
    'OrderedDict',
]

__author__ = 'Bob Ippolito <bob@redivi.com>'

from decimal import Decimal

from decoder import JSONDecoder, JSONDecodeError
from encoder import JSONEncoder
def _import_OrderedDict():
    import collections
    try:
        return collections.OrderedDict
    except AttributeError:
        import ordered_dict
        return ordered_dict.OrderedDict
OrderedDict = _import_OrderedDict()

def _import_c_make_encoder():
    try:
        raise ImportError # because assumes simplejson in path
        from simplejson._speedups import make_encoder
        return make_encoder
    except ImportError:
        return None

_default_encoder = JSONEncoder(
    skipkeys=False,
    ensure_ascii=True,
    check_circular=True,
    allow_nan=True,
    indent=None,
    separators=None,
    encoding='utf-8',
    default=None,
    use_decimal=False,
)

def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True,
        allow_nan=True, cls=None, indent=None, separators=None,
        encoding='utf-8', default=None, use_decimal=False, **kw):
    """Serialize ``obj`` as a JSON formatted stream to ``fp`` (a
    ``.write()``-supporting file-like object).

    If ``skipkeys`` is true then ``dict`` keys that are not basic types
    (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)
    will be skipped instead of raising a ``TypeError``.

    If ``ensure_ascii`` is false, then the some chunks written to ``fp``
    may be ``unicode`` instances, subject to normal Python ``str`` to
    ``unicode`` coercion rules. Unless ``fp.write()`` explicitly
    understands ``unicode`` (as in ``codecs.getwriter()``) this is likely
    to cause an error.

    If ``check_circular`` is false, then the circular reference check
    for container types will be skipped and a circular reference will
    result in an ``OverflowError`` (or worse).

    If ``allow_nan`` is false, then it will be a ``ValueError`` to
    serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``)
    in strict compliance of the JSON specification, instead of using the
    JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``).

    If *indent* is a string, then JSON array elements and object members
    will be pretty-printed with a newline followed by that string repeated
    for each level of nesting. ``None`` (the default) selects the most compact
    representation without any newlines. For backwards compatibility with
    versions of simplejson earlier than 2.1.0, an integer is also accepted
    and is converted to a string with that many spaces.

    If ``separators`` is an ``(item_separator, dict_separator)`` tuple
    then it will be used instead of the default ``(', ', ': ')`` separators.
    ``(',', ':')`` is the most compact JSON representation.

    ``encoding`` is the character encoding for str instances, default is UTF-8.

    ``default(obj)`` is a function that should return a serializable version
    of obj or raise TypeError. The default simply raises TypeError.

    If *use_decimal* is true (default: ``False``) then decimal.Decimal
    will be natively serialized to JSON with full precision.

    To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the
    ``.default()`` method to serialize additional types), specify it with
    the ``cls`` kwarg.

    """
    # cached encoder
    if (not skipkeys and ensure_ascii and
        check_circular and allow_nan and
        cls is None and indent is None and separators is None and
        encoding == 'utf-8' and default is None and not use_decimal
        and not kw):
        iterable = _default_encoder.iterencode(obj)
    else:
        if cls is None:
            cls = JSONEncoder
        iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii,
            check_circular=check_circular, allow_nan=allow_nan, indent=indent,
            separators=separators, encoding=encoding,
            default=default, use_decimal=use_decimal, **kw).iterencode(obj)
    # could accelerate with writelines in some versions of Python, at
    # a debuggability cost
    for chunk in iterable:
        fp.write(chunk)


def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True,
        allow_nan=True, cls=None, indent=None, separators=None,
        encoding='utf-8', default=None, use_decimal=False, **kw):
    """Serialize ``obj`` to a JSON formatted ``str``.

    If ``skipkeys`` is false then ``dict`` keys that are not basic types
    (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)
    will be skipped instead of raising a ``TypeError``.

    If ``ensure_ascii`` is false, then the return value will be a
    ``unicode`` instance subject to normal Python ``str`` to ``unicode``
    coercion rules instead of being escaped to an ASCII ``str``.

    If ``check_circular`` is false, then the circular reference check
    for container types will be skipped and a circular reference will
    result in an ``OverflowError`` (or worse).

    If ``allow_nan`` is false, then it will be a ``ValueError`` to
    serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in
    strict compliance of the JSON specification, instead of using the
    JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``).

    If ``indent`` is a string, then JSON array elements and object members
    will be pretty-printed with a newline followed by that string repeated
    for each level of nesting. ``None`` (the default) selects the most compact
    representation without any newlines. For backwards compatibility with
    versions of simplejson earlier than 2.1.0, an integer is also accepted
    and is converted to a string with that many spaces.

    If ``separators`` is an ``(item_separator, dict_separator)`` tuple
    then it will be used instead of the default ``(', ', ': ')`` separators.
    ``(',', ':')`` is the most compact JSON representation.

    ``encoding`` is the character encoding for str instances, default is UTF-8.

    ``default(obj)`` is a function that should return a serializable version
    of obj or raise TypeError. The default simply raises TypeError.

    If *use_decimal* is true (default: ``False``) then decimal.Decimal
    will be natively serialized to JSON with full precision.

    To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the
    ``.default()`` method to serialize additional types), specify it with
    the ``cls`` kwarg.

    """
    # cached encoder
    if (not skipkeys and ensure_ascii and
        check_circular and allow_nan and
        cls is None and indent is None and separators is None and
        encoding == 'utf-8' and default is None and not use_decimal
        and not kw):
        return _default_encoder.encode(obj)
    if cls is None:
        cls = JSONEncoder
    return cls(
        skipkeys=skipkeys, ensure_ascii=ensure_ascii,
        check_circular=check_circular, allow_nan=allow_nan, indent=indent,
        separators=separators, encoding=encoding, default=default,
        use_decimal=use_decimal, **kw).encode(obj)


_default_decoder = JSONDecoder(encoding=None, object_hook=None,
                               object_pairs_hook=None)


def load(fp, encoding=None, cls=None, object_hook=None, parse_float=None,
        parse_int=None, parse_constant=None, object_pairs_hook=None,
        use_decimal=False, **kw):
    """Deserialize ``fp`` (a ``.read()``-supporting file-like object containing
    a JSON document) to a Python object.

    *encoding* determines the encoding used to interpret any
    :class:`str` objects decoded by this instance (``'utf-8'`` by
    default).  It has no effect when decoding :class:`unicode` objects.

    Note that currently only encodings that are a superset of ASCII work,
    strings of other encodings should be passed in as :class:`unicode`.

    *object_hook*, if specified, will be called with the result of every
    JSON object decoded and its return value will be used in place of the
    given :class:`dict`.  This can be used to provide custom
    deserializations (e.g. to support JSON-RPC class hinting).

    *object_pairs_hook* is an optional function that will be called with
    the result of any object literal decode with an ordered list of pairs.
    The return value of *object_pairs_hook* will be used instead of the
    :class:`dict`.  This feature can be used to implement custom decoders
    that rely on the order that the key and value pairs are decoded (for
    example, :func:`collections.OrderedDict` will remember the order of
    insertion). If *object_hook* is also defined, the *object_pairs_hook*
    takes priority.

    *parse_float*, if specified, will be called with the string of every
    JSON float to be decoded.  By default, this is equivalent to
    ``float(num_str)``. This can be used to use another datatype or parser
    for JSON floats (e.g. :class:`decimal.Decimal`).

    *parse_int*, if specified, will be called with the string of every
    JSON int to be decoded.  By default, this is equivalent to
    ``int(num_str)``.  This can be used to use another datatype or parser
    for JSON integers (e.g. :class:`float`).

    *parse_constant*, if specified, will be called with one of the
    following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.  This
    can be used to raise an exception if invalid JSON numbers are
    encountered.

    If *use_decimal* is true (default: ``False``) then it implies
    parse_float=decimal.Decimal for parity with ``dump``.

    To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
    kwarg.

    """
    return loads(fp.read(),
        encoding=encoding, cls=cls, object_hook=object_hook,
        parse_float=parse_float, parse_int=parse_int,
        parse_constant=parse_constant, object_pairs_hook=object_pairs_hook,
        use_decimal=use_decimal, **kw)


def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
        parse_int=None, parse_constant=None, object_pairs_hook=None,
        use_decimal=False, **kw):
    """Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON
    document) to a Python object.

    *encoding* determines the encoding used to interpret any
    :class:`str` objects decoded by this instance (``'utf-8'`` by
    default).  It has no effect when decoding :class:`unicode` objects.

    Note that currently only encodings that are a superset of ASCII work,
    strings of other encodings should be passed in as :class:`unicode`.

    *object_hook*, if specified, will be called with the result of every
    JSON object decoded and its return value will be used in place of the
    given :class:`dict`.  This can be used to provide custom
    deserializations (e.g. to support JSON-RPC class hinting).

    *object_pairs_hook* is an optional function that will be called with
    the result of any object literal decode with an ordered list of pairs.
    The return value of *object_pairs_hook* will be used instead of the
    :class:`dict`.  This feature can be used to implement custom decoders
    that rely on the order that the key and value pairs are decoded (for
    example, :func:`collections.OrderedDict` will remember the order of
    insertion). If *object_hook* is also defined, the *object_pairs_hook*
    takes priority.

    *parse_float*, if specified, will be called with the string of every
    JSON float to be decoded.  By default, this is equivalent to
    ``float(num_str)``. This can be used to use another datatype or parser
    for JSON floats (e.g. :class:`decimal.Decimal`).

    *parse_int*, if specified, will be called with the string of every
    JSON int to be decoded.  By default, this is equivalent to
    ``int(num_str)``.  This can be used to use another datatype or parser
    for JSON integers (e.g. :class:`float`).

    *parse_constant*, if specified, will be called with one of the
    following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.  This
    can be used to raise an exception if invalid JSON numbers are
    encountered.

    If *use_decimal* is true (default: ``False``) then it implies
    parse_float=decimal.Decimal for parity with ``dump``.

    To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
    kwarg.

    """
    if (cls is None and encoding is None and object_hook is None and
            parse_int is None and parse_float is None and
            parse_constant is None and object_pairs_hook is None
            and not use_decimal and not kw):
        return _default_decoder.decode(s)
    if cls is None:
        cls = JSONDecoder
    if object_hook is not None:
        kw['object_hook'] = object_hook
    if object_pairs_hook is not None:
        kw['object_pairs_hook'] = object_pairs_hook
    if parse_float is not None:
        kw['parse_float'] = parse_float
    if parse_int is not None:
        kw['parse_int'] = parse_int
    if parse_constant is not None:
        kw['parse_constant'] = parse_constant
    if use_decimal:
        if parse_float is not None:
            raise TypeError("use_decimal=True implies parse_float=Decimal")
        kw['parse_float'] = Decimal
    return cls(encoding=encoding, **kw).decode(s)


def _toggle_speedups(enabled):
    import decoder as dec
    import encoder as enc
    import scanner as scan
    c_make_encoder = _import_c_make_encoder()
    if enabled:
        dec.scanstring = dec.c_scanstring or dec.py_scanstring
        enc.c_make_encoder = c_make_encoder
        enc.encode_basestring_ascii = (enc.c_encode_basestring_ascii or 
            enc.py_encode_basestring_ascii)
        scan.make_scanner = scan.c_make_scanner or scan.py_make_scanner
    else:
        dec.scanstring = dec.py_scanstring
        enc.c_make_encoder = None
        enc.encode_basestring_ascii = enc.py_encode_basestring_ascii
        scan.make_scanner = scan.py_make_scanner
    dec.make_scanner = scan.make_scanner
    global _default_decoder
    _default_decoder = JSONDecoder(
        encoding=None,
        object_hook=None,
        object_pairs_hook=None,
    )
    global _default_encoder
    _default_encoder = JSONEncoder(
       skipkeys=False,
       ensure_ascii=True,
       check_circular=True,
       allow_nan=True,
       indent=None,
       separators=None,
       encoding='utf-8',
       default=None,
   )

Added gluon/contrib/simplejson/decoder.py version [c0be9ced86].







































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""Implementation of JSONDecoder
"""
import re
import sys
import struct

from scanner import make_scanner
def _import_c_scanstring():
    try:
        raise ImportError # because assumes simplejson in path
        from simplejson._speedups import scanstring
        return scanstring
    except ImportError:
        return None
c_scanstring = _import_c_scanstring()

__all__ = ['JSONDecoder']

FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL

def _floatconstants():
    _BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
    # The struct module in Python 2.4 would get frexp() out of range here
    # when an endian is specified in the format string. Fixed in Python 2.5+
    if sys.byteorder != 'big':
        _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1]
    nan, inf = struct.unpack('dd', _BYTES)
    return nan, inf, -inf

NaN, PosInf, NegInf = _floatconstants()


class JSONDecodeError(ValueError):
    """Subclass of ValueError with the following additional properties:

    msg: The unformatted error message
    doc: The JSON document being parsed
    pos: The start index of doc where parsing failed
    end: The end index of doc where parsing failed (may be None)
    lineno: The line corresponding to pos
    colno: The column corresponding to pos
    endlineno: The line corresponding to end (may be None)
    endcolno: The column corresponding to end (may be None)

    """
    def __init__(self, msg, doc, pos, end=None):
        ValueError.__init__(self, errmsg(msg, doc, pos, end=end))
        self.msg = msg
        self.doc = doc
        self.pos = pos
        self.end = end
        self.lineno, self.colno = linecol(doc, pos)
        if end is not None:
            self.endlineno, self.endcolno = linecol(doc, end)
        else:
            self.endlineno, self.endcolno = None, None


def linecol(doc, pos):
    lineno = doc.count('\n', 0, pos) + 1
    if lineno == 1:
        colno = pos
    else:
        colno = pos - doc.rindex('\n', 0, pos)
    return lineno, colno


def errmsg(msg, doc, pos, end=None):
    # Note that this function is called from _speedups
    lineno, colno = linecol(doc, pos)
    if end is None:
        #fmt = '{0}: line {1} column {2} (char {3})'
        #return fmt.format(msg, lineno, colno, pos)
        fmt = '%s: line %d column %d (char %d)'
        return fmt % (msg, lineno, colno, pos)
    endlineno, endcolno = linecol(doc, end)
    #fmt = '{0}: line {1} column {2} - line {3} column {4} (char {5} - {6})'
    #return fmt.format(msg, lineno, colno, endlineno, endcolno, pos, end)
    fmt = '%s: line %d column %d - line %d column %d (char %d - %d)'
    return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end)


_CONSTANTS = {
    '-Infinity': NegInf,
    'Infinity': PosInf,
    'NaN': NaN,
}

STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS)
BACKSLASH = {
    '"': u'"', '\\': u'\\', '/': u'/',
    'b': u'\b', 'f': u'\f', 'n': u'\n', 'r': u'\r', 't': u'\t',
}

DEFAULT_ENCODING = "utf-8"

def py_scanstring(s, end, encoding=None, strict=True,
        _b=BACKSLASH, _m=STRINGCHUNK.match):
    """Scan the string s for a JSON string. End is the index of the
    character in s after the quote that started the JSON string.
    Unescapes all valid JSON string escape sequences and raises ValueError
    on attempt to decode an invalid string. If strict is False then literal
    control characters are allowed in the string.

    Returns a tuple of the decoded string and the index of the character in s
    after the end quote."""
    if encoding is None:
        encoding = DEFAULT_ENCODING
    chunks = []
    _append = chunks.append
    begin = end - 1
    while 1:
        chunk = _m(s, end)
        if chunk is None:
            raise JSONDecodeError(
                "Unterminated string starting at", s, begin)
        end = chunk.end()
        content, terminator = chunk.groups()
        # Content is contains zero or more unescaped string characters
        if content:
            if not isinstance(content, unicode):
                content = unicode(content, encoding)
            _append(content)
        # Terminator is the end of string, a literal control character,
        # or a backslash denoting that an escape sequence follows
        if terminator == '"':
            break
        elif terminator != '\\':
            if strict:
                msg = "Invalid control character %r at" % (terminator,)
                #msg = "Invalid control character {0!r} at".format(terminator)
                raise JSONDecodeError(msg, s, end)
            else:
                _append(terminator)
                continue
        try:
            esc = s[end]
        except IndexError:
            raise JSONDecodeError(
                "Unterminated string starting at", s, begin)
        # If not a unicode escape sequence, must be in the lookup table
        if esc != 'u':
            try:
                char = _b[esc]
            except KeyError:
                msg = "Invalid \\escape: " + repr(esc)
                raise JSONDecodeError(msg, s, end)
            end += 1
        else:
            # Unicode escape sequence
            esc = s[end + 1:end + 5]
            next_end = end + 5
            if len(esc) != 4:
                msg = "Invalid \\uXXXX escape"
                raise JSONDecodeError(msg, s, end)
            uni = int(esc, 16)
            # Check for surrogate pair on UCS-4 systems
            if 0xd800 <= uni <= 0xdbff and sys.maxunicode > 65535:
                msg = "Invalid \\uXXXX\\uXXXX surrogate pair"
                if not s[end + 5:end + 7] == '\\u':
                    raise JSONDecodeError(msg, s, end)
                esc2 = s[end + 7:end + 11]
                if len(esc2) != 4:
                    raise JSONDecodeError(msg, s, end)
                uni2 = int(esc2, 16)
                uni = 0x10000 + (((uni - 0xd800) << 10) | (uni2 - 0xdc00))
                next_end += 6
            char = unichr(uni)
            end = next_end
        # Append the unescaped character
        _append(char)
    return u''.join(chunks), end


# Use speedup if available
scanstring = c_scanstring or py_scanstring

WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS)
WHITESPACE_STR = ' \t\n\r'

def JSONObject((s, end), encoding, strict, scan_once, object_hook,
        object_pairs_hook, memo=None,
        _w=WHITESPACE.match, _ws=WHITESPACE_STR):
    # Backwards compatibility
    if memo is None:
        memo = {}
    memo_get = memo.setdefault
    pairs = []
    # Use a slice to prevent IndexError from being raised, the following
    # check will raise a more specific ValueError if the string is empty
    nextchar = s[end:end + 1]
    # Normally we expect nextchar == '"'
    if nextchar != '"':
        if nextchar in _ws:
            end = _w(s, end).end()
            nextchar = s[end:end + 1]
        # Trivial empty object
        if nextchar == '}':
            if object_pairs_hook is not None:
                result = object_pairs_hook(pairs)
                return result, end + 1
            pairs = {}
            if object_hook is not None:
                pairs = object_hook(pairs)
            return pairs, end + 1
        elif nextchar != '"':
            raise JSONDecodeError("Expecting property name", s, end)
    end += 1
    while True:
        key, end = scanstring(s, end, encoding, strict)
        key = memo_get(key, key)

        # To skip some function call overhead we optimize the fast paths where
        # the JSON key separator is ": " or just ":".
        if s[end:end + 1] != ':':
            end = _w(s, end).end()
            if s[end:end + 1] != ':':
                raise JSONDecodeError("Expecting : delimiter", s, end)

        end += 1

        try:
            if s[end] in _ws:
                end += 1
                if s[end] in _ws:
                    end = _w(s, end + 1).end()
        except IndexError:
            pass

        try:
            value, end = scan_once(s, end)
        except StopIteration:
            raise JSONDecodeError("Expecting object", s, end)
        pairs.append((key, value))

        try:
            nextchar = s[end]
            if nextchar in _ws:
                end = _w(s, end + 1).end()
                nextchar = s[end]
        except IndexError:
            nextchar = ''
        end += 1

        if nextchar == '}':
            break
        elif nextchar != ',':
            raise JSONDecodeError("Expecting , delimiter", s, end - 1)

        try:
            nextchar = s[end]
            if nextchar in _ws:
                end += 1
                nextchar = s[end]
                if nextchar in _ws:
                    end = _w(s, end + 1).end()
                    nextchar = s[end]
        except IndexError:
            nextchar = ''

        end += 1
        if nextchar != '"':
            raise JSONDecodeError("Expecting property name", s, end - 1)

    if object_pairs_hook is not None:
        result = object_pairs_hook(pairs)
        return result, end
    pairs = dict(pairs)
    if object_hook is not None:
        pairs = object_hook(pairs)
    return pairs, end

def JSONArray((s, end), scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR):
    values = []
    nextchar = s[end:end + 1]
    if nextchar in _ws:
        end = _w(s, end + 1).end()
        nextchar = s[end:end + 1]
    # Look-ahead for trivial empty array
    if nextchar == ']':
        return values, end + 1
    _append = values.append
    while True:
        try:
            value, end = scan_once(s, end)
        except StopIteration:
            raise JSONDecodeError("Expecting object", s, end)
        _append(value)
        nextchar = s[end:end + 1]
        if nextchar in _ws:
            end = _w(s, end + 1).end()
            nextchar = s[end:end + 1]
        end += 1
        if nextchar == ']':
            break
        elif nextchar != ',':
            raise JSONDecodeError("Expecting , delimiter", s, end)

        try:
            if s[end] in _ws:
                end += 1
                if s[end] in _ws:
                    end = _w(s, end + 1).end()
        except IndexError:
            pass

    return values, end

class JSONDecoder(object):
    """Simple JSON <http://json.org> decoder

    Performs the following translations in decoding by default:

    +---------------+-------------------+
    | JSON          | Python            |
    +===============+===================+
    | object        | dict              |
    +---------------+-------------------+
    | array         | list              |
    +---------------+-------------------+
    | string        | unicode           |
    +---------------+-------------------+
    | number (int)  | int, long         |
    +---------------+-------------------+
    | number (real) | float             |
    +---------------+-------------------+
    | true          | True              |
    +---------------+-------------------+
    | false         | False             |
    +---------------+-------------------+
    | null          | None              |
    +---------------+-------------------+

    It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as
    their corresponding ``float`` values, which is outside the JSON spec.

    """

    def __init__(self, encoding=None, object_hook=None, parse_float=None,
            parse_int=None, parse_constant=None, strict=True,
            object_pairs_hook=None):
        """
        *encoding* determines the encoding used to interpret any
        :class:`str` objects decoded by this instance (``'utf-8'`` by
        default).  It has no effect when decoding :class:`unicode` objects.

        Note that currently only encodings that are a superset of ASCII work,
        strings of other encodings should be passed in as :class:`unicode`.

        *object_hook*, if specified, will be called with the result of every
        JSON object decoded and its return value will be used in place of the
        given :class:`dict`.  This can be used to provide custom
        deserializations (e.g. to support JSON-RPC class hinting).

        *object_pairs_hook* is an optional function that will be called with
        the result of any object literal decode with an ordered list of pairs.
        The return value of *object_pairs_hook* will be used instead of the
        :class:`dict`.  This feature can be used to implement custom decoders
        that rely on the order that the key and value pairs are decoded (for
        example, :func:`collections.OrderedDict` will remember the order of
        insertion). If *object_hook* is also defined, the *object_pairs_hook*
        takes priority.

        *parse_float*, if specified, will be called with the string of every
        JSON float to be decoded.  By default, this is equivalent to
        ``float(num_str)``. This can be used to use another datatype or parser
        for JSON floats (e.g. :class:`decimal.Decimal`).

        *parse_int*, if specified, will be called with the string of every
        JSON int to be decoded.  By default, this is equivalent to
        ``int(num_str)``.  This can be used to use another datatype or parser
        for JSON integers (e.g. :class:`float`).

        *parse_constant*, if specified, will be called with one of the
        following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.  This
        can be used to raise an exception if invalid JSON numbers are
        encountered.

        *strict* controls the parser's behavior when it encounters an
        invalid control character in a string. The default setting of
        ``True`` means that unescaped control characters are parse errors, if
        ``False`` then control characters will be allowed in strings.

        """
        self.encoding = encoding
        self.object_hook = object_hook
        self.object_pairs_hook = object_pairs_hook
        self.parse_float = parse_float or float
        self.parse_int = parse_int or int
        self.parse_constant = parse_constant or _CONSTANTS.__getitem__
        self.strict = strict
        self.parse_object = JSONObject
        self.parse_array = JSONArray
        self.parse_string = scanstring
        self.memo = {}
        self.scan_once = make_scanner(self)

    def decode(self, s, _w=WHITESPACE.match):
        """Return the Python representation of ``s`` (a ``str`` or ``unicode``
        instance containing a JSON document)

        """
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
        end = _w(s, end).end()
        if end != len(s):
            raise JSONDecodeError("Extra data", s, end, len(s))
        return obj

    def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` or ``unicode``
        beginning with a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.

        """
        try:
            obj, end = self.scan_once(s, idx)
        except StopIteration:
            raise JSONDecodeError("No JSON object could be decoded", s, idx)
        return obj, end

Added gluon/contrib/simplejson/encoder.py version [f221e2871e].























































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""Implementation of JSONEncoder
"""
import re
from decimal import Decimal

def _import_speedups():
    try:
        raise ImportError # because assumes simplejson in path
        from simplejson import _speedups
        return _speedups.encode_basestring_ascii, _speedups.make_encoder
    except ImportError:
        return None, None
c_encode_basestring_ascii, c_make_encoder = _import_speedups()

from decoder import PosInf

ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
HAS_UTF8 = re.compile(r'[\x80-\xff]')
ESCAPE_DCT = {
    '\\': '\\\\',
    '"': '\\"',
    '\b': '\\b',
    '\f': '\\f',
    '\n': '\\n',
    '\r': '\\r',
    '\t': '\\t',
}
for i in range(0x20):
    #ESCAPE_DCT.setdefault(chr(i), '\\u{0:04x}'.format(i))
    ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))

FLOAT_REPR = repr

def encode_basestring(s):
    """Return a JSON representation of a Python string

    """
    if isinstance(s, str) and HAS_UTF8.search(s) is not None:
        s = s.decode('utf-8')
    def replace(match):
        return ESCAPE_DCT[match.group(0)]
    return u'"' + ESCAPE.sub(replace, s) + u'"'


def py_encode_basestring_ascii(s):
    """Return an ASCII-only JSON representation of a Python string

    """
    if isinstance(s, str) and HAS_UTF8.search(s) is not None:
        s = s.decode('utf-8')
    def replace(match):
        s = match.group(0)
        try:
            return ESCAPE_DCT[s]
        except KeyError:
            n = ord(s)
            if n < 0x10000:
                #return '\\u{0:04x}'.format(n)
                return '\\u%04x' % (n,)
            else:
                # surrogate pair
                n -= 0x10000
                s1 = 0xd800 | ((n >> 10) & 0x3ff)
                s2 = 0xdc00 | (n & 0x3ff)
                #return '\\u{0:04x}\\u{1:04x}'.format(s1, s2)
                return '\\u%04x\\u%04x' % (s1, s2)
    return '"' + str(ESCAPE_ASCII.sub(replace, s)) + '"'


encode_basestring_ascii = (
    c_encode_basestring_ascii or py_encode_basestring_ascii)

class JSONEncoder(object):
    """Extensible JSON <http://json.org> encoder for Python data structures.

    Supports the following objects and types by default:

    +-------------------+---------------+
    | Python            | JSON          |
    +===================+===============+
    | dict              | object        |
    +-------------------+---------------+
    | list, tuple       | array         |
    +-------------------+---------------+
    | str, unicode      | string        |
    +-------------------+---------------+
    | int, long, float  | number        |
    +-------------------+---------------+
    | True              | true          |
    +-------------------+---------------+
    | False             | false         |
    +-------------------+---------------+
    | None              | null          |
    +-------------------+---------------+

    To extend this to recognize other objects, subclass and implement a
    ``.default()`` method with another method that returns a serializable
    object for ``o`` if possible, otherwise it should call the superclass
    implementation (to raise ``TypeError``).

    """
    item_separator = ', '
    key_separator = ': '
    def __init__(self, skipkeys=False, ensure_ascii=True,
            check_circular=True, allow_nan=True, sort_keys=False,
            indent=None, separators=None, encoding='utf-8', default=None,
            use_decimal=False):
        """Constructor for JSONEncoder, with sensible defaults.

        If skipkeys is false, then it is a TypeError to attempt
        encoding of keys that are not str, int, long, float or None.  If
        skipkeys is True, such items are simply skipped.

        If ensure_ascii is true, the output is guaranteed to be str
        objects with all incoming unicode characters escaped.  If
        ensure_ascii is false, the output will be unicode object.

        If check_circular is true, then lists, dicts, and custom encoded
        objects will be checked for circular references during encoding to
        prevent an infinite recursion (which would cause an OverflowError).
        Otherwise, no such check takes place.

        If allow_nan is true, then NaN, Infinity, and -Infinity will be
        encoded as such.  This behavior is not JSON specification compliant,
        but is consistent with most JavaScript based encoders and decoders.
        Otherwise, it will be a ValueError to encode such floats.

        If sort_keys is true, then the output of dictionaries will be
        sorted by key; this is useful for regression tests to ensure
        that JSON serializations can be compared on a day-to-day basis.

        If indent is a string, then JSON array elements and object members
        will be pretty-printed with a newline followed by that string repeated
        for each level of nesting. ``None`` (the default) selects the most compact
        representation without any newlines. For backwards compatibility with
        versions of simplejson earlier than 2.1.0, an integer is also accepted
        and is converted to a string with that many spaces.

        If specified, separators should be a (item_separator, key_separator)
        tuple.  The default is (', ', ': ').  To get the most compact JSON
        representation you should specify (',', ':') to eliminate whitespace.

        If specified, default is a function that gets called for objects
        that can't otherwise be serialized.  It should return a JSON encodable
        version of the object or raise a ``TypeError``.

        If encoding is not None, then all input strings will be
        transformed into unicode using that encoding prior to JSON-encoding.
        The default is UTF-8.

        If use_decimal is true (not the default), ``decimal.Decimal`` will
        be supported directly by the encoder. For the inverse, decode JSON
        with ``parse_float=decimal.Decimal``.

        """

        self.skipkeys = skipkeys
        self.ensure_ascii = ensure_ascii
        self.check_circular = check_circular
        self.allow_nan = allow_nan
        self.sort_keys = sort_keys
        self.use_decimal = use_decimal
        if isinstance(indent, (int, long)):
            indent = ' ' * indent
        self.indent = indent
        if separators is not None:
            self.item_separator, self.key_separator = separators
        if default is not None:
            self.default = default
        self.encoding = encoding

    def default(self, o):
        """Implement this method in a subclass such that it returns
        a serializable object for ``o``, or calls the base implementation
        (to raise a ``TypeError``).

        For example, to support arbitrary iterators, you could
        implement default like this::

            def default(self, o):
                try:
                    iterable = iter(o)
                except TypeError:
                    pass
                else:
                    return list(iterable)
                return JSONEncoder.default(self, o)

        """
        raise TypeError(repr(o) + " is not JSON serializable")

    def encode(self, o):
        """Return a JSON string representation of a Python data structure.

        >>> from simplejson import JSONEncoder
        >>> JSONEncoder().encode({"foo": ["bar", "baz"]})
        '{"foo": ["bar", "baz"]}'

        """
        # This is for extremely simple cases and benchmarks.
        if isinstance(o, basestring):
            if isinstance(o, str):
                _encoding = self.encoding
                if (_encoding is not None
                        and not (_encoding == 'utf-8')):
                    o = o.decode(_encoding)
            if self.ensure_ascii:
                return encode_basestring_ascii(o)
            else:
                return encode_basestring(o)
        # This doesn't pass the iterator directly to ''.join() because the
        # exceptions aren't as detailed.  The list call should be roughly
        # equivalent to the PySequence_Fast that ''.join() would do.
        chunks = self.iterencode(o, _one_shot=True)
        if not isinstance(chunks, (list, tuple)):
            chunks = list(chunks)
        if self.ensure_ascii:
            return ''.join(chunks)
        else:
            return u''.join(chunks)

    def iterencode(self, o, _one_shot=False):
        """Encode the given object and yield each string
        representation as available.

        For example::

            for chunk in JSONEncoder().iterencode(bigobject):
                mysocket.write(chunk)

        """
        if self.check_circular:
            markers = {}
        else:
            markers = None
        if self.ensure_ascii:
            _encoder = encode_basestring_ascii
        else:
            _encoder = encode_basestring
        if self.encoding != 'utf-8':
            def _encoder(o, _orig_encoder=_encoder, _encoding=self.encoding):
                if isinstance(o, str):
                    o = o.decode(_encoding)
                return _orig_encoder(o)

        def floatstr(o, allow_nan=self.allow_nan,
                _repr=FLOAT_REPR, _inf=PosInf, _neginf=-PosInf):
            # Check for specials. Note that this type of test is processor
            # and/or platform-specific, so do tests which don't depend on
            # the internals.

            if o != o:
                text = 'NaN'
            elif o == _inf:
                text = 'Infinity'
            elif o == _neginf:
                text = '-Infinity'
            else:
                return _repr(o)

            if not allow_nan:
                raise ValueError(
                    "Out of range float values are not JSON compliant: " +
                    repr(o))

            return text


        key_memo = {}
        if (_one_shot and c_make_encoder is not None
                and self.indent is None):
            _iterencode = c_make_encoder(
                markers, self.default, _encoder, self.indent,
                self.key_separator, self.item_separator, self.sort_keys,
                self.skipkeys, self.allow_nan, key_memo, self.use_decimal)
        else:
            _iterencode = _make_iterencode(
                markers, self.default, _encoder, self.indent, floatstr,
                self.key_separator, self.item_separator, self.sort_keys,
                self.skipkeys, _one_shot, self.use_decimal)
        try:
            return _iterencode(o, 0)
        finally:
            key_memo.clear()


class JSONEncoderForHTML(JSONEncoder):
    """An encoder that produces JSON safe to embed in HTML.

    To embed JSON content in, say, a script tag on a web page, the
    characters &, < and > should be escaped. They cannot be escaped
    with the usual entities (e.g. &amp;) because they are not expanded
    within <script> tags.
    """

    def encode(self, o):
        # Override JSONEncoder.encode because it has hacks for
        # performance that make things more complicated.
        chunks = self.iterencode(o, True)
        if self.ensure_ascii:
            return ''.join(chunks)
        else:
            return u''.join(chunks)

    def iterencode(self, o, _one_shot=False):
        chunks = super(JSONEncoderForHTML, self).iterencode(o, _one_shot)
        for chunk in chunks:
            chunk = chunk.replace('&', '\\u0026')
            chunk = chunk.replace('<', '\\u003c')
            chunk = chunk.replace('>', '\\u003e')
            yield chunk


def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
        _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot,
        _use_decimal,
        ## HACK: hand-optimized bytecode; turn globals into locals
        False=False,
        True=True,
        ValueError=ValueError,
        basestring=basestring,
        Decimal=Decimal,
        dict=dict,
        float=float,
        id=id,
        int=int,
        isinstance=isinstance,
        list=list,
        long=long,
        str=str,
        tuple=tuple,
    ):

    def _iterencode_list(lst, _current_indent_level):
        if not lst:
            yield '[]'
            return
        if markers is not None:
            markerid = id(lst)
            if markerid in markers:
                raise ValueError("Circular reference detected")
            markers[markerid] = lst
        buf = '['
        if _indent is not None:
            _current_indent_level += 1
            newline_indent = '\n' + (_indent * _current_indent_level)
            separator = _item_separator + newline_indent
            buf += newline_indent
        else:
            newline_indent = None
            separator = _item_separator
        first = True
        for value in lst:
            if first:
                first = False
            else:
                buf = separator
            if isinstance(value, basestring):
                yield buf + _encoder(value)
            elif value is None:
                yield buf + 'null'
            elif value is True:
                yield buf + 'true'
            elif value is False:
                yield buf + 'false'
            elif isinstance(value, (int, long)):
                yield buf + str(value)
            elif isinstance(value, float):
                yield buf + _floatstr(value)
            elif _use_decimal and isinstance(value, Decimal):
                yield buf + str(value)
            else:
                yield buf
                if isinstance(value, (list, tuple)):
                    chunks = _iterencode_list(value, _current_indent_level)
                elif isinstance(value, dict):
                    chunks = _iterencode_dict(value, _current_indent_level)
                else:
                    chunks = _iterencode(value, _current_indent_level)
                for chunk in chunks:
                    yield chunk
        if newline_indent is not None:
            _current_indent_level -= 1
            yield '\n' + (_indent * _current_indent_level)
        yield ']'
        if markers is not None:
            del markers[markerid]

    def _iterencode_dict(dct, _current_indent_level):
        if not dct:
            yield '{}'
            return
        if markers is not None:
            markerid = id(dct)
            if markerid in markers:
                raise ValueError("Circular reference detected")
            markers[markerid] = dct
        yield '{'
        if _indent is not None:
            _current_indent_level += 1
            newline_indent = '\n' + (_indent * _current_indent_level)
            item_separator = _item_separator + newline_indent
            yield newline_indent
        else:
            newline_indent = None
            item_separator = _item_separator
        first = True
        if _sort_keys:
            items = dct.items()
            items.sort(key=lambda kv: kv[0])
        else:
            items = dct.iteritems()
        for key, value in items:
            if isinstance(key, basestring):
                pass
            # JavaScript is weakly typed for these, so it makes sense to
            # also allow them.  Many encoders seem to do something like this.
            elif isinstance(key, float):
                key = _floatstr(key)
            elif key is True:
                key = 'true'
            elif key is False:
                key = 'false'
            elif key is None:
                key = 'null'
            elif isinstance(key, (int, long)):
                key = str(key)
            elif _skipkeys:
                continue
            else:
                raise TypeError("key " + repr(key) + " is not a string")
            if first:
                first = False
            else:
                yield item_separator
            yield _encoder(key)
            yield _key_separator
            if isinstance(value, basestring):
                yield _encoder(value)
            elif value is None:
                yield 'null'
            elif value is True:
                yield 'true'
            elif value is False:
                yield 'false'
            elif isinstance(value, (int, long)):
                yield str(value)
            elif isinstance(value, float):
                yield _floatstr(value)
            elif _use_decimal and isinstance(value, Decimal):
                yield str(value)
            else:
                if isinstance(value, (list, tuple)):
                    chunks = _iterencode_list(value, _current_indent_level)
                elif isinstance(value, dict):
                    chunks = _iterencode_dict(value, _current_indent_level)
                else:
                    chunks = _iterencode(value, _current_indent_level)
                for chunk in chunks:
                    yield chunk
        if newline_indent is not None:
            _current_indent_level -= 1
            yield '\n' + (_indent * _current_indent_level)
        yield '}'
        if markers is not None:
            del markers[markerid]

    def _iterencode(o, _current_indent_level):
        if isinstance(o, basestring):
            yield _encoder(o)
        elif o is None:
            yield 'null'
        elif o is True:
            yield 'true'
        elif o is False:
            yield 'false'
        elif isinstance(o, (int, long)):
            yield str(o)
        elif isinstance(o, float):
            yield _floatstr(o)
        elif isinstance(o, (list, tuple)):
            for chunk in _iterencode_list(o, _current_indent_level):
                yield chunk
        elif isinstance(o, dict):
            for chunk in _iterencode_dict(o, _current_indent_level):
                yield chunk
        elif _use_decimal and isinstance(o, Decimal):
            yield str(o)
        else:
            if markers is not None:
                markerid = id(o)
                if markerid in markers:
                    raise ValueError("Circular reference detected")
                markers[markerid] = o
            o = _default(o)
            for chunk in _iterencode(o, _current_indent_level):
                yield chunk
            if markers is not None:
                del markers[markerid]

    return _iterencode

Added gluon/contrib/simplejson/ordered_dict.py version [a551f0ccc4].
























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger

http://code.activestate.com/recipes/576693/

"""
from UserDict import DictMixin

# Modified from original to support Python 2.4, see
# http://code.google.com/p/simplejson/issues/detail?id=53
try:
    all
except NameError:
    def all(seq):
        for elem in seq:
            if not elem:
                return False
        return True

class OrderedDict(dict, DictMixin):

    def __init__(self, *args, **kwds):
        if len(args) > 1:
            raise TypeError('expected at most 1 arguments, got %d' % len(args))
        try:
            self.__end
        except AttributeError:
            self.clear()
        self.update(*args, **kwds)

    def clear(self):
        self.__end = end = []
        end += [None, end, end]         # sentinel node for doubly linked list
        self.__map = {}                 # key --> [key, prev, next]
        dict.clear(self)

    def __setitem__(self, key, value):
        if key not in self:
            end = self.__end
            curr = end[1]
            curr[2] = end[1] = self.__map[key] = [key, curr, end]
        dict.__setitem__(self, key, value)

    def __delitem__(self, key):
        dict.__delitem__(self, key)
        key, prev, next = self.__map.pop(key)
        prev[2] = next
        next[1] = prev

    def __iter__(self):
        end = self.__end
        curr = end[2]
        while curr is not end:
            yield curr[0]
            curr = curr[2]

    def __reversed__(self):
        end = self.__end
        curr = end[1]
        while curr is not end:
            yield curr[0]
            curr = curr[1]

    def popitem(self, last=True):
        if not self:
            raise KeyError('dictionary is empty')
        # Modified from original to support Python 2.4, see
        # http://code.google.com/p/simplejson/issues/detail?id=53
        if last:
            key = reversed(self).next()
        else:
            key = iter(self).next()
        value = self.pop(key)
        return key, value

    def __reduce__(self):
        items = [[k, self[k]] for k in self]
        tmp = self.__map, self.__end
        del self.__map, self.__end
        inst_dict = vars(self).copy()
        self.__map, self.__end = tmp
        if inst_dict:
            return (self.__class__, (items,), inst_dict)
        return self.__class__, (items,)

    def keys(self):
        return list(self)

    setdefault = DictMixin.setdefault
    update = DictMixin.update
    pop = DictMixin.pop
    values = DictMixin.values
    items = DictMixin.items
    iterkeys = DictMixin.iterkeys
    itervalues = DictMixin.itervalues
    iteritems = DictMixin.iteritems

    def __repr__(self):
        if not self:
            return '%s()' % (self.__class__.__name__,)
        return '%s(%r)' % (self.__class__.__name__, self.items())

    def copy(self):
        return self.__class__(self)

    @classmethod
    def fromkeys(cls, iterable, value=None):
        d = cls()
        for key in iterable:
            d[key] = value
        return d

    def __eq__(self, other):
        if isinstance(other, OrderedDict):
            return len(self)==len(other) and \
                   all(p==q for p, q in  zip(self.items(), other.items()))
        return dict.__eq__(self, other)

    def __ne__(self, other):
        return not self == other

Added gluon/contrib/simplejson/scanner.py version [cc67bf7550].















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""JSON token scanner
"""
import re
def _import_c_make_scanner():
    try:
        raise ImportError # because assumes simplejson in path
        from simplejson._speedups import make_scanner
        return make_scanner
    except ImportError:
        return None
c_make_scanner = _import_c_make_scanner()

__all__ = ['make_scanner']

NUMBER_RE = re.compile(
    r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
    (re.VERBOSE | re.MULTILINE | re.DOTALL))

def py_make_scanner(context):
    parse_object = context.parse_object
    parse_array = context.parse_array
    parse_string = context.parse_string
    match_number = NUMBER_RE.match
    encoding = context.encoding
    strict = context.strict
    parse_float = context.parse_float
    parse_int = context.parse_int
    parse_constant = context.parse_constant
    object_hook = context.object_hook
    object_pairs_hook = context.object_pairs_hook
    memo = context.memo

    def _scan_once(string, idx):
        try:
            nextchar = string[idx]
        except IndexError:
            raise StopIteration

        if nextchar == '"':
            return parse_string(string, idx + 1, encoding, strict)
        elif nextchar == '{':
            return parse_object((string, idx + 1), encoding, strict,
                _scan_once, object_hook, object_pairs_hook, memo)
        elif nextchar == '[':
            return parse_array((string, idx + 1), _scan_once)
        elif nextchar == 'n' and string[idx:idx + 4] == 'null':
            return None, idx + 4
        elif nextchar == 't' and string[idx:idx + 4] == 'true':
            return True, idx + 4
        elif nextchar == 'f' and string[idx:idx + 5] == 'false':
            return False, idx + 5

        m = match_number(string, idx)
        if m is not None:
            integer, frac, exp = m.groups()
            if frac or exp:
                res = parse_float(integer + (frac or '') + (exp or ''))
            else:
                res = parse_int(integer)
            return res, m.end()
        elif nextchar == 'N' and string[idx:idx + 3] == 'NaN':
            return parse_constant('NaN'), idx + 3
        elif nextchar == 'I' and string[idx:idx + 8] == 'Infinity':
            return parse_constant('Infinity'), idx + 8
        elif nextchar == '-' and string[idx:idx + 9] == '-Infinity':
            return parse_constant('-Infinity'), idx + 9
        else:
            raise StopIteration

    def scan_once(string, idx):
        try:
            return _scan_once(string, idx)
        finally:
            memo.clear()

    return scan_once

make_scanner = c_make_scanner or py_make_scanner

Added gluon/contrib/simplejson/tool.py version [db7eaed84c].











































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
r"""Command-line tool to validate and pretty-print JSON

Usage::

    $ echo '{"json":"obj"}' | python -m simplejson.tool
    {
        "json": "obj"
    }
    $ echo '{ 1.2:3.4}' | python -m simplejson.tool
    Expecting property name: line 1 column 2 (char 2)

"""
import sys
import simplejson as json

def main():
    if len(sys.argv) == 1:
        infile = sys.stdin
        outfile = sys.stdout
    elif len(sys.argv) == 2:
        infile = open(sys.argv[1], 'rb')
        outfile = sys.stdout
    elif len(sys.argv) == 3:
        infile = open(sys.argv[1], 'rb')
        outfile = open(sys.argv[2], 'wb')
    else:
        raise SystemExit(sys.argv[0] + " [infile [outfile]]")
    try:
        try:
            obj = json.load(infile,
                            object_pairs_hook=json.OrderedDict,
                            use_decimal=True)
        except ValueError, e:
            raise SystemExit(e)
        json.dump(obj, outfile, sort_keys=True, indent='    ', use_decimal=True)
        outfile.write('\n')
    finally:
        infile.close()
        outfile.close()

if __name__ == '__main__':
    main()

Added gluon/contrib/sms_utils.py version [91ca572846].


















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
SMSCODES = {
    'Aliant':'@chat.wirefree.ca',
    'Alltel':'@message.alltel.com',
    'Ameritech':'@paging.acswireless.com',
    'AT&T':'@txt.att.net',
    'AU by KDDI':'@ezweb.ne.jp',
    'BeeLine GSM':'@sms.beemail.ru',
    'Bell Mobility Canada':'@txt.bellmobility.ca',
    'Bellsouth':'@bellsouth.cl',
    'BellSouth Mobility':'@blsdcs.net',
    'Blue Sky Frog':'@blueskyfrog.com',
    'Boost':'@myboostmobile.com',
    'Cellular South':'@csouth1.com',
    'CellularOne':'@mobile.celloneusa.com',
    'CellularOne West':'@mycellone.com',
    'Cincinnati Bell':'@gocbw.com',
    'Claro':'@clarotorpedo.com.br',
    'Comviq':'@sms.comviq.se',
    'Dutchtone/Orange-NL':'@sms.orange.nl',
    'Edge Wireless':'@sms.edgewireless.com',
    'EinsteinPCS / Airadigm Communications':'@einsteinsms.com',
    'EPlus':'@smsmail.eplus.de',
    'Fido Canada':'@fido.ca',
    'Golden Telecom':'@sms.goldentele.com',
    'Idea Cellular':'@ideacellular.net',
    'Kyivstar':'@sms.kyivstar.net',
    'LMT':'@sms.lmt.lv',
    'Manitoba Telecom Systems':'@text.mtsmobility.com',
    'Meteor':'@sms.mymeteor.ie',
    'Metro PCS':'@mymetropcs.com',
    'Metrocall Pager':'@page.metrocall.com',
    'MobileOne':'@m1.com.sg',
    'Mobilfone':'@page.mobilfone.com',
    'Mobility Bermuda':'@ml.bm',
    'Netcom':'@sms.netcom.no',
    'Nextel':'@messaging.nextel.com',
    'NPI Wireless':'@npiwireless.com',
    'O2':'@o2.co.uk',
    'O2 M-mail':'@mmail.co.uk',
    'Optus':'@optusmobile.com.au',
    'Orange':'@orange.net',
    'Oskar':'@mujoskar.cz',
    'Pagenet':'@pagenet.net',
    'PCS Rogers':'@pcs.rogers.com',
    'Personal Communication':'@pcom.ru',
    'Plus GSM Poland':'@text.plusgsm.pl',
    'Powertel':'@ptel.net',
    'Primtel':'@sms.primtel.ru',
    'PSC Wireless':'@sms.pscel.com',
    'Qualcomm':'@pager.qualcomm.com',
    'Qwest':'@qwestmp.com',
    'Safaricom':'@safaricomsms.com',
    'Satelindo GSM':'@satelindogsm.com',
    'SCS-900':'@scs-900.ru',
    'Simple Freedom':'@text.simplefreedom.net',
    'Skytel - Alphanumeric':'@skytel.com',
    'Smart Telecom':'@mysmart.mymobile.ph',
    'Southern Linc':'@page.southernlinc.com',
    'Sprint PCS':'@messaging.sprintpcs.com',
    'Sprint PCS - Short Mail':'@sprintpcs.com',
    'SunCom':'@tms.suncom.com',
    'SureWest Communications':'@mobile.surewest.com',
    'SwissCom Mobile':'@bluewin.ch',
    'T-Mobile Germany':'@T-D1-SMS.de',
    'T-Mobile Netherlands':'@gin.nl',
    'T-Mobile UK':'@t-mobile.uk.net',
    'T-Mobile USA (tmail)':'@tmail.com',
    'T-Mobile USA (tmomail)':'@tmomail.net',
    'Tele2 Latvia':'@sms.tele2.lv',
    'Telefonica Movistar':'@movistar.net',
    'Telenor':'@mobilpost.no',
    'Telia Denmark':'@gsm1800.telia.dk',
    'Telus Mobility':'@msg.telus.com',
    'The Phone House':'@sms.phonehouse.de',
    'TIM':'@timnet.com',
    'UMC':'@sms.umc.com.ua',
    'Unicel':'@utext.com',
    'US Cellular':'@email.uscc.net',
    'Verizon Wireless (vtext)':'@vtext.com',
    'Verizon Wireless (airtouchpaging)':'@airtouchpaging.com',
    'Verizon Wireless (myairmail)':'@myairmail.com',
    'Vessotel':'@pager.irkutsk.ru',
    'Virgin Mobile Canada':'@vmobile.ca',
    'Virgin Mobile USA':'@vmobl.com',
    'Vodafone Italy':'@sms.vodafone.it',
    'Vodafone Japan (n)':'@n.vodafone.ne.jp',
    'Vodafone Japan (d)':'@d.vodafone.ne.jp',
    'Vodafone Japan (r)':'@r.vodafone.ne.jp',
    'Vodafone Japan (k)':'@k.vodafone.ne.jp',
    'Vodafone Japan (t)':'@t.vodafone.ne.jp',
    'Vodafone Japan (q)':'@q.vodafone.ne.jp',
    'Vodafone Japan (s)':'@s.vodafone.ne.jp',
    'Vodafone Japan (h)':'@h.vodafone.ne.jp',
    'Vodafone Japan (c)':'@c.vodafone.ne.jp',
    'Vodafone Spain':'@vodafone.es',
    'Vodafone UK':'@vodafone.net',
    'Weblink Wireless':'@airmessage.net',
    'WellCom':'@sms.welcome2well.com',
    'WyndTell':'@wyndtell.com',
    }

def sms_email(number,provider):
    """
    >>> print sms_email('1 (312) 375-6536','T-Mobile USA (tmail)')
    print 13123756536@tmail.com
    """
    import re
    if number[0]=='+1': number=number[1:]
    elif number[0]=='+': number=number[3:]
    elif number[:2]=='00': number=number[3:]
    number=re.sub('[^\d]','',number)
    return number+SMSCODES[provider]

Added gluon/contrib/spreadsheet.py version [c2702b5142].








































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
Developed by Massimo Di Pierro, optional component of web2py, GPL2 license.
"""
import re
import pickle
import copy


def quote(text):
    return str(text).replace('\\', '\\\\').replace("'", "\\'")


class Node:
    """
    Example::

         # controller
         from gluon.contrib.spreadsheet import Sheet

         def callback():
             return cache.ram('sheet1', lambda: None, None).process(request)

         def index():
             sheet = cache.ram('sheet1',
                 lambda: Sheet(10, 10, URL(r=request, f='callback')), 0)
             #sheet.cell('r0c3', value='=r0c0+r0c1+r0c2', readonly=True)
             return dict(sheet=sheet)

         # view
         {{extend 'layout.html'}}
         {{=sheet}}

         or insert invidivual cells via

         {{=sheet.nodes['r0c0']}}

    """

    def __init__(self, name, value, url='.', readonly=False, active=True,
            onchange=None):
        self.url = url
        self.name = name
        self.value = str(value)
        self.computed_value = ''
        self.incoming = {}
        self.outcoming = {}
        self.readonly = readonly
        self.active = active
        self.onchange = onchange
        self.size = 4
        self.locked = False

    def xml(self):
        return """<input name="%s" id="%s" value="%s" size="%s"
        onkeyup="ajax('%s/keyup',['%s'], ':eval');"
        onfocus="ajax('%s/focus',['%s'], ':eval');"
        onblur="ajax('%s/blur',['%s'], ':eval');" %s/>
        """ % (self.name, self.name, self.computed_value, self.size,
               self.url, self.name, self.url, self.name, self.url, self.name,
               (self.readonly and 'readonly ') or '')

    def __repr__(self):
        return '%s:%s' % (self.name, self.computed_value)


class Sheet:

    regex=re.compile('(?<!\w)[a-zA-Z_]\w*')

    re_strings = re.compile(r'(?P<name>'
                            + r"[uU]?[rR]?'''([^']+|'{1,2}(?!'))*'''|"
                            + r"'([^'\\]|\\.)*'|"
                            + r'"""([^"]|"{1,2}(?!"))*"""|'
                            + r'"([^"\\]|\\.)*")', re.DOTALL)

    def dumps(self):
        dump = pickle.dumps(self)
        return dump

    @staticmethod
    def loads(data):
        sheet = pickle.loads(data)
        return sheet

    def process(self, request):
        """
        call this in action that creates table, it will handle ajax callbacks
        """
        cell = request.vars.keys()[0]
        if request.args(0) == 'focus':
            return "jQuery('#%s').val('%s');" % (cell, quote(self[cell].value))
        value = request.vars[cell]
        self[cell] = value
        if request.args(0) == 'blur':
            return "jQuery('#%s').val('%s');" \
                % (cell, quote(self[cell].computed_value))
        elif request.args(0) == 'keyup':
            jquery = ''
            for other_key in self.modified:
                if other_key != cell:
                    jquery += "jQuery('#%s').val('%s');" % \
                        (other_key, quote(self[other_key].computed_value))
        return jquery

    def __init__(self, rows, cols, url='.', readonly=False, active=True,
            onchange=None):
        self.rows = rows
        self.cols = cols
        self.url = url
        self.nodes = {}
        self.error = 'ERROR: %(error)s'
        self.allowed_keywords = ['for', 'in', 'if', 'else', 'and', 'or', 'not',
                               'i', 'j', 'k', 'x', 'y', 'z', 'sum']
        self.environment = {}
        [self.cell('r%sc%s'%(k/cols, k%cols), '0.0', readonly, active, onchange)
            for k in xrange(rows*cols)]
        exec('from math import *', {}, self.environment)

    def delete_from(self, other_list):
        indices = [k for (k, node) in enumerate(other_list) if k == node]
        if indices:
            del other_list[indices[0]]

    def changed(self, node, changed_nodes=[]):
        for other_node in node.outcoming:
            if not other_node in changed_nodes:
                changed_nodes.append(other_node)
                self.changed(other_node, changed_nodes)
        return changed_nodes

    def define(self, name, obj):
        self.environment[name] = obj

    def cell(self, key, value, readonly=False, active=True, onchange=None):
        """
        key is the name of the cell
        value is the initial value of the cell. It can be a formula "=1+3"
        a cell is active if it evaluates formuls
        """
        key = str(key)
        if not self.regex.match(key):
            raise SyntaxError, "Invalid cell name: %s" % key
        node = Node(key, value, self.url, readonly, active, onchange)
        self.nodes[key] = node
        self[key] = value

    def __setitem__(self, key, value):
        key = str(key)
        value = str(value)
        node = self.nodes[key]
        node.value = value
        if value[:1] == '=' and node.active:
            # clear all edges involving current node
            for other_node in node.incoming:
                del other_node.outcoming[node]
            node.incoming.clear()
            # build new edges
            command = self.re_strings.sub("''", value[1:])
            node.locked = False
            for match in self.regex.finditer(command):
                other_key = match.group()
                if other_key == key:
                    self.computed_value = self.error % dict(error='cycle')
                    self.modified={}
                    break
                if other_key in self.nodes:
                    other_node = self.nodes[other_key]
                    other_node.outcoming[node] = True
                    node.incoming[other_node] = True
                elif not other_key in self.allowed_keywords and \
                        not other_key in self.environment:
                    node.locked = True
                    node.computed_value = \
                        self.error % dict(error='invalid keyword: ' + other_key)
                    self.modified = {}
                    break
            self.compute(node)
        else:
            try:
                node.computed_value = int(node.value)
            except:
                try:
                    node.computed_value = float(node.value)
                except:
                    node.computed_value = node.value
            self.environment[key] = node.computed_value
            if node.onchange:
                node.onchange(node)
        self.modified = self.iterate(node)

    def compute(self, node):
        if node.value[:1] == '=' and not node.locked:
            try:
                exec('__value__=' + node.value[1:], {}, self.environment)
                node.computed_value = self.environment['__value__']
                del self.environment['__value__']
            except Exception, e:
                node.computed_value = self.error % dict(error=str(e))
        self.environment[node.name] = node.computed_value
        if node.onchange:
            node.onchange(node)

    def iterate(self, node):
        output = {node.name: node.computed_value}
        changed_nodes = self.changed(node)
        while changed_nodes:
            ok=False
            set_changed_nodes = set(changed_nodes)
            for (k, other_node) in enumerate(changed_nodes):
                #print other_node, changed_nodes
                if not set(other_node.incoming.keys()).\
                        intersection(set_changed_nodes):
                    #print 'ok'
                    self.compute(other_node)
                    output[other_node.name] = other_node.computed_value
                    #print other_node
                    del changed_nodes[k]
                    ok = True
                    break
            if not ok:
                return {}
        return output

    def __getitem__(self, key):
        return self.nodes[str(key)]

    def get_computed_values(self):
        d={}
        for key in self.nodes:
            node = self.nodes[key]
            if node.value[:1] != '=' or not node.active:
                d[key] = node.computed_value
        return d

    def set_computed_values(self, d):
        for key in d:
            if not key in self.nodes:
                continue
            node = self.nodes[key]
            if node.value[:1] != '=' or not node.active:
                node.value = d[key]

    def xml(self):
        import gluon.html
        (DIV, TABLE, TR, TD, TH, BR) = \
            (gluon.html.DIV, gluon.html.TABLE, gluon.html.TR, gluon.html.TD,
             gluon.html.TH, gluon.html.BR)
        regex = re.compile('r\d+c\d+')
        return DIV(TABLE(TR(TH(), *[TH('c%s' % c) for c in range(self.cols)]),
                         *[TR(TH('r%s' % r), *[TD(self.nodes['r%sc%s'%(r, c)]) \
                                                  for c in range(self.cols)]) \
                                                    for r in range(self.rows)]),
                   BR(),
                   TABLE(*[TR(TH(key), TD(self.nodes[key])) \
                       for key in self.nodes if not regex.match(key)])).xml()

if __name__ == '__main__':
    s = Sheet(0, 0)
    s.cell('a', value="2")
    s.cell('b', value="=sin(a)")
    s.cell('c', value="=cos(a)**2+b*b")
    print s['c'].computed_value

Added gluon/contrib/taskbar_widget.py version [72bc51f407].





















































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# # Creates a taskbar icon for web2py
# # Author: Mark Larsen, mostly stolen from Mark Hammond's
# #   C:\Python25\Lib\site-packages\win32\Demos\win32gui_taskbar.py
# # 11/7/08
# dual licensed under the web2py license (LGPL) and the Python license.

import os
import sys
import base64
import win32con
import win32api
import win32gui


class TaskBarIcon:

    def __init__(self, iconPath=None):

        self.iconPath = iconPath
        self.status = []

        msg_TaskbarRestart = \
            win32api.RegisterWindowMessage('TaskbarCreated')
        message_map = {
            msg_TaskbarRestart: self.OnRestart,
            win32con.WM_DESTROY: self.OnDestroy,
            win32con.WM_COMMAND: self.OnCommand,
            win32con.WM_USER + 20: self.OnTaskbarNotify,
            }

        # Register the Window class.

        wc = win32gui.WNDCLASS()
        hinst = wc.hInstance = win32api.GetModuleHandle(None)
        wc.lpszClassName = 'web2pyTaskbar'
        wc.style = win32con.CS_VREDRAW | win32con.CS_HREDRAW
        wc.hCursor = win32gui.LoadCursor(0, win32con.IDC_ARROW)
        wc.hbrBackground = win32con.COLOR_WINDOW
        wc.lpfnWndProc = message_map  # could also specify a wndproc.
        classAtom = win32gui.RegisterClass(wc)

        # Create the Window.

        style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU
        self.hwnd = win32gui.CreateWindow(
            classAtom,
            'web2pyTaskbar',
            style,
            0,
            0,
            win32con.CW_USEDEFAULT,
            win32con.CW_USEDEFAULT,
            0,
            0,
            hinst,
            None,
            )
        win32gui.UpdateWindow(self.hwnd)
        self.SetServerStopped()

    def __createIcon(self):

        # try and use custom icon

        if self.iconPath and os.path.isfile(self.iconPath):
            hicon = self.__loadFromFile(self.iconPath)
        else:
            try:
                fp = 'tmp.ico'
                icFH = file(fp, 'wb')
                if self.serverState == self.EnumServerState.STOPPED:
                    icFH.write(base64.b64decode(self.__getIconStopped()))
                elif self.serverState == self.EnumServerState.RUNNING:
                    icFH.write(base64.b64decode(self.__getIconRunning()))
                icFH.close()
                hicon = self.__loadFromFile(fp)
                os.unlink(fp)
            except:
                print "Can't load web2py icons - using default"
                hicon = win32gui.LoadIcon(0, win32con.IDI_APPLICATION)

        flags = win32gui.NIF_ICON | win32gui.NIF_MESSAGE\
             | win32gui.NIF_TIP
        nid = (
            self.hwnd,
            0,
            flags,
            win32con.WM_USER + 20,
            hicon,
            'web2py Framework',
            )
        try:
            win32gui.Shell_NotifyIcon(win32gui.NIM_MODIFY, nid)
        except:
            try:
                win32gui.Shell_NotifyIcon(win32gui.NIM_ADD, nid)
            except win32api.error:

                # This is common when windows is starting, and this code is hit
                # before the taskbar has been created.

                print 'Failed to add the taskbar icon - is explorer running?'

                # but keep running anyway - when explorer starts, we get the

    def OnRestart(
        self,
        hwnd,
        msg,
        wparam,
        lparam,
        ):
        self._DoCreateIcons()

    def OnDestroy(
        self,
        hwnd,
        msg,
        wparam,
        lparam,
        ):
        nid = (self.hwnd, 0)
        win32gui.Shell_NotifyIcon(win32gui.NIM_DELETE, nid)

    def OnTaskbarNotify(
        self,
        hwnd,
        msg,
        wparam,
        lparam,
        ):
        if lparam == win32con.WM_LBUTTONUP:
            pass
        elif lparam == win32con.WM_LBUTTONDBLCLK:
            pass
        elif lparam == win32con.WM_RBUTTONUP:
            menu = win32gui.CreatePopupMenu()
            win32gui.AppendMenu(menu, win32con.MF_STRING, 1023,
                                'Toggle Display')
            win32gui.AppendMenu(menu, win32con.MF_SEPARATOR, 0, '')
            if self.serverState == self.EnumServerState.STOPPED:
                win32gui.AppendMenu(menu, win32con.MF_STRING, 1024,
                                    'Start Server')
                win32gui.AppendMenu(menu, win32con.MF_STRING
                                     | win32con.MF_GRAYED, 1025,
                                    'Restart Server')
                win32gui.AppendMenu(menu, win32con.MF_STRING
                                     | win32con.MF_GRAYED, 1026,
                                    'Stop Server')
            else:
                win32gui.AppendMenu(menu, win32con.MF_STRING
                                     | win32con.MF_GRAYED, 1024,
                                    'Start Server')
                win32gui.AppendMenu(menu, win32con.MF_STRING, 1025,
                                    'Restart Server')
                win32gui.AppendMenu(menu, win32con.MF_STRING, 1026,
                                    'Stop Server')
            win32gui.AppendMenu(menu, win32con.MF_SEPARATOR, 0, '')
            win32gui.AppendMenu(menu, win32con.MF_STRING, 1027,
                                'Quit (pid:%i)' % os.getpid())
            pos = win32gui.GetCursorPos()

            # See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/menus_0hdi.asp

            win32gui.SetForegroundWindow(self.hwnd)
            win32gui.TrackPopupMenu(
                menu,
                win32con.TPM_LEFTALIGN,
                pos[0],
                pos[1],
                0,
                self.hwnd,
                None,
                )
            win32api.PostMessage(self.hwnd, win32con.WM_NULL, 0, 0)
        return 1

    def OnCommand(
        self,
        hwnd,
        msg,
        wparam,
        lparam,
        ):
        id = win32api.LOWORD(wparam)
        if id == 1023:
            self.status.append(self.EnumStatus.TOGGLE)
        elif id == 1024:
            self.status.append(self.EnumStatus.START)
        elif id == 1025:
            self.status.append(self.EnumStatus.RESTART)
        elif id == 1026:
            self.status.append(self.EnumStatus.STOP)
        elif id == 1027:
            self.status.append(self.EnumStatus.QUIT)
            self.Destroy()
        else:
            print 'Unknown command -', id

    def Destroy(self):
        win32gui.DestroyWindow(self.hwnd)

    def SetServerRunning(self):
        self.serverState = self.EnumServerState.RUNNING
        self.__createIcon()

    def SetServerStopped(self):
        self.serverState = self.EnumServerState.STOPPED
        self.__createIcon()

    def __getIconRunning(self):
        return 'AAABAAEAEBAQAAAAAAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAIXMGAABe/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABERAgAAIAAAEAACAAAgAAABEAIiACIgAAABAgAgIAIAEAECACAgAgABEAIiACACAAAAAAAAAAAAICACIiAiIAICAgIAACACAgICAgAAIAICAgICIiAiIAICAgIAACACAgICAgAAIAICAgICIiAiIAAAAAAAAAAAD//wAAhe8AAL3vAADMYwAA9a0AALWtAADMbQAA//8AAKwjAABV7QAAVe0AAFQjAABV7QAAVe0AAFQjAAD//wAA'

    def __getIconStopped(self):
        return 'AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCdIAIXMGAABe/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzMzMzMzMzAwERMjMzIzAzEDMyMzMjAzMxAzIiMyAjMzMwMjMjAzIzEzECMyAjMjMxEzAiAyMyMzMzMwAzMzMzIyMyACMiIzIyMjAzAyMyMjIyAjMwIzIyMjAyIiMCIzIyAjIzMyAyMjAyMjMzIwIyAjIyIiMiIDAzMzMzMzMzB//gAAhe0AAJ3rAADMYwAA9a0AALGNAADMLQAA/n8AAKwjAABVrQAAUc0AAFQjAABF5QAAVekAABQhAAB//gAA'

    def __loadFromFile(self, iconPath):
        hinst = win32api.GetModuleHandle(None)
        icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE
        hicon = win32gui.LoadImage(
            hinst,
            iconPath,
            win32con.IMAGE_ICON,
            0,
            0,
            icon_flags,
            )
        return hicon

    class EnumStatus:

        TOGGLE = 0
        START = 1
        STOP = 2
        RESTART = 3
        QUIT = 4

    class EnumServerState:

        RUNNING = 0
        STOPPED = 1

Added gluon/contrib/user_agent_parser.py version [bbbb0c1942].











































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
Extract client information from http user agent
The module does not try to detect all capabilities of browser in current form (it can easily be extended though).
Aim is
    * fast
    * very easy to extend
    * reliable enough for practical purposes
    * and assist python web apps to detect clients.
    
Taken from http://pypi.python.org/pypi/httpagentparser (MIT license)
Modified my Ross Peoples for web2py to better support iPhone and iPad.
"""
import sys
from storage import Storage

class DetectorsHub(dict):
    _known_types = ['os', 'dist', 'flavor', 'browser']

    def __init__(self, *args, **kw):
        dict.__init__(self, *args, **kw)
        for typ in self._known_types:
            self.setdefault(typ, [])
        self.registerDetectors()

    def register(self, detector):
        if detector.info_type not in self._known_types:
            self[detector.info_type] = [detector]
            self._known_types.insert(detector.order, detector.info_type)
        else:
            self[detector.info_type].append(detector)

    def reorderByPrefs(self, detectors, prefs):
        if prefs is None:
            return []
        elif prefs == []:
            return detectors
        else:
            prefs.insert(0, '')
            def key_name(d):
                return d.name in prefs and prefs.index(d.name) or sys.maxint
            return sorted(detectors, key=key_name)

    def __iter__(self):
        return iter(self._known_types)

    def registerDetectors(self):
        detectors = [v() for v in globals().values() \
                         if DetectorBase in getattr(v, '__mro__', [])]
        for d in detectors:
            if d.can_register:
                self.register(d)


class DetectorBase(object):
    name = "" # "to perform match in DetectorsHub object"
    info_type = "override me"
    result_key = "override me"
    order = 10 # 0 is highest
    look_for = "string to look for"
    skip_if_found = [] # strings if present stop processin
    can_register = False
    prefs = Storage() # dict(info_type = [name1, name2], ..)
    version_splitters = ["/", " "]
    _suggested_detectors = None

    def __init__(self):
        if not self.name:
            self.name = self.__class__.__name__
        self.can_register = (self.__class__.__dict__.get('can_register', True))

    def detect(self, agent, result):
        if agent and self.checkWords(agent):
            result[self.info_type] = Storage(name=self.name)
            version = self.getVersion(agent)
            if version:
                result[self.info_type].version = version
            return True
        return False

    def checkWords(self, agent):
        for w in self.skip_if_found:
            if w in agent:
                return False
        if self.look_for:
            return True
        return False

    def getVersion(self, agent):
        # -> version string /None
        vs = self.version_splitters
        return agent.split(self.look_for + vs[0])[-1].split(vs[1])[0].strip()


class OS(DetectorBase):
    info_type = "os"
    can_register = False
    version_splitters = [";", " "]


class Dist(DetectorBase):
    info_type = "dist"
    can_register = False


class Flavor(DetectorBase):
    info_type = "flavor"
    can_register = False


class Browser(DetectorBase):
    info_type = "browser"
    can_register = False


class Macintosh(OS):
    look_for = 'Macintosh'
    prefs = Storage(dist=None)
    def getVersion(self, agent):
        pass


class Firefox(Browser):
    look_for = "Firefox"


class Konqueror(Browser):
    look_for = "Konqueror"
    version_splitters = ["/", ";"]


class Opera(Browser):
    look_for = "Opera"
    def getVersion(self, agent):
        return agent.split(self.look_for)[1][1:].split(' ')[0]

class Netscape(Browser):
    look_for = "Netscape"

class MSIE(Browser):
    look_for = "MSIE"
    skip_if_found = ["Opera"]
    name = "Microsoft Internet Explorer"
    version_splitters = [" ", ";"]


class Galeon(Browser):
    look_for = "Galeon"


class Safari(Browser):
    look_for = "Safari"

    def checkWords(self, agent):
        unless_list = ["Chrome", "OmniWeb"]
        if self.look_for in agent:
            for word in unless_list:
                if word in agent:
                    return False
            return True

    def getVersion(self, agent):
        if "Version/" in agent:
            return agent.split('Version/')[-1].split(' ')[0].strip()
        else:
            # Mobile Safari
            return agent.split('Safari ')[-1].split(' ')[0].strip() 


class Linux(OS):
    look_for = 'Linux'
    prefs = Storage(browser=["Firefox"], 
                    dist=["Ubuntu", "Android"], flavor=None)

    def getVersion(self, agent):
        pass


class Macintosh(OS):
    look_for = 'Macintosh'
    prefs = Storage(dist=None, flavor=['MacOS'])
    def getVersion(self, agent):
        pass


class MacOS(Flavor):
    look_for = 'Mac OS'
    prefs = Storage(browser=['Firefox', 'Opera', "Microsoft Internet Explorer"])

    def getVersion(self, agent):
        version_end_chars = [';', ')']
        part = agent.split('Mac OS')[-1].strip()
        for c in version_end_chars:
            if c in part:
                version = part.split(c)[0]
                break
        return version.replace('_', '.')


class Windows(OS):
    look_for = 'Windows'
    prefs = Storage(browser=["Microsoft Internet Explorer", 'Firefox'],
                    dict=None, flavor=None)

    def getVersion(self, agent):
        v = agent.split('Windows')[-1].split(';')[0].strip()
        if ')' in v:
            v = v.split(')')[0]
        return v


class Ubuntu(Dist):
    look_for = 'Ubuntu'
    version_splitters = ["/", " "]
    prefs = Storage(browser=['Firefox'])


class Debian(Dist):
    look_for = 'Debian'
    version_splitters = ["/", " "]
    prefs = Storage(browser=['Firefox'])


class Chrome(Browser):
    look_for = "Chrome"
    version_splitters = ["/", " "]

class ChromeOS(OS):
    look_for = "CrOS"
    version_splitters = [" ", " "]
    prefs = Storage(browser=['Chrome'])
    def getVersion(self, agent):
        vs = self.version_splitters
        return agent.split(self.look_for+vs[0])[-1].split(vs[1])[1].strip()[:-1]

class Android(Dist):
    look_for = 'Android'

    def getVersion(self, agent):
        return agent.split('Android')[-1].split(';')[0].strip()


class iPhone(Dist):
    look_for = 'iPhone'

    def getVersion(self, agent):
        version_end_chars = ['like', ';', ')']
        part = agent.split('CPU OS')[-1].strip()
        for c in version_end_chars:
            if c in part:
                version = 'iOS ' + part.split(c)[0].strip()
                break
        return version.replace('_', '.')
        
class iPad(Dist):
    look_for = 'iPad'

    def getVersion(self, agent):
        version_end_chars = ['like', ';', ')']
        part = agent.split('CPU OS')[-1].strip()
        for c in version_end_chars:
            if c in part:
                version = 'iOS ' + part.split(c)[0].strip()
                break
        return version.replace('_', '.')

detectorshub = DetectorsHub()

def detect(agent):
    result = Storage()
    prefs = Storage()
    _suggested_detectors = []
    for info_type in detectorshub:
        if not _suggested_detectors:
            detectors = detectorshub[info_type]
            _d_prefs = prefs.get(info_type, [])
            detectors = detectorshub.reorderByPrefs(detectors, _d_prefs)
            if "detector" in locals():
                detector._suggested_detectors = detectors
        else:
            detectors = _suggested_detectors
        for detector in detectors:
            print "detector name: ", detector.name
            if detector.detect(agent, result):
                prefs = detector.prefs
                _suggested_detectors = detector._suggested_detectors
                break
    return result


class Result(Storage):
    def __missing__(self, k):
        return ""


def detect(agent):
    result = Result()
    _suggested_detectors = []
    for info_type in detectorshub:
        detectors = _suggested_detectors or detectorshub[info_type]
        for detector in detectors:
            if detector.detect(agent, result):
                if detector.prefs and not detector._suggested_detectors:
                    _suggested_detectors = detectorshub.reorderByPrefs(
                        detectors, detector.prefs.get(info_type))
                    detector._suggested_detectors = _suggested_detectors
                    break
    return result


def simple_detect(agent):
    """
    -> (os, browser) # tuple of strings
    """
    result = detect(agent)
    os_list = []
    if 'flavor' in result: os_list.append(result['flavor']['name'])
    if 'dist' in result: os_list.append(result['dist']['name'])
    if 'os' in result: os_list.append(result['os']['name'])

    os = os_list and " ".join(os_list) or "Unknown OS"
    os_version = os_list and (result['flavor'] and result['flavor'].get(
            'version')) or (result['dist'] and result['dist'].get('version')) \
            or (result['os'] and result['os'].get('version')) or ""
    browser = 'browser' in result and result['browser']['name'] \
        or 'Unknown Browser'
    browser_version = 'browser' in result \
        and result['browser'].get('version') or ""
    if browser_version:
        browser = " ".join((browser, browser_version))
    if os_version:
        os = " ".join((os, os_version))
    return os, browser


if __name__ == '__main__':
    import time
    import unittest

    data = (
        ("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10",
         ('MacOS Macintosh X 10.5', 'Firefox 3.0.10'),
         {'flavor': {'version': 'X 10.5', 'name': 'MacOS'}, 'os': {'name': 'Macintosh'}, 'browser': {'version': '3.0.10', 'name': 'Firefox'}},),
        ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.3 Safari/534.24,gzip(gfe)",
         ('MacOS Macintosh X 10.6.6', 'Chrome 11.0.696.3'),
         {'flavor': {'version': 'X 10.6.6', 'name': 'MacOS'}, 'os': {'name': 'Macintosh'}, 'browser': {'version': '11.0.696.3', 'name': 'Chrome'}},),
        ("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) Gecko/20100308 Ubuntu/10.04 (lucid) Firefox/3.6 GTB7.1",
         ('Ubuntu Linux 10.04', 'Firefox 3.6'),
         {'dist': {'version': '10.04', 'name': 'Ubuntu'}, 'os': {'name': 'Linux'}, 'browser': {'version': '3.6', 'name': 'Firefox'}},),
        ("Mozilla/5.0 (Linux; U; Android 2.2.1; fr-ch; A43 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
         ('Android Linux 2.2.1', 'Safari 4.0'),
         {'dist': {'version': '2.2.1', 'name': 'Android'}, 'os': {'name': 'Linux'}, 'browser': {'version': '4.0', 'name': 'Safari'}},),
        ("Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3",
         ('MacOS IPhone X', 'Safari 3.0'),
         {'flavor': {'version': 'X', 'name': 'MacOS'}, 'dist': {'version': 'X', 'name': 'IPhone'}, 'browser': {'version': '3.0', 'name': 'Safari'}},),
        ("Mozilla/5.0 (X11; CrOS i686 0.0.0) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.27 Safari/534.24,gzip(gfe)",
         ('ChromeOS 0.0.0', 'Chrome 11.0.696.27'),
         {'os': {'name': 'ChromeOS', 'version': '0.0.0'}, 'browser': {'name': 'Chrome', 'version': '11.0.696.27'}},),
        ("Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.02 [en]",
         ('Windows NT 5.1', 'Opera 7.02'),
         {'os': {'name': 'Windows', 'version': 'NT 5.1'}, 'browser': {'name': 'Opera', 'version': '7.02'}},),
        ("Opera/9.80 (X11; Linux i686; U; en) Presto/2.9.168 Version/11.50",
         ("Linux", "Opera 9.80"),
         {"os": {"name": "Linux"}, "browser": {"name": "Opera", "version": "9.80"}},),
        ("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20060127 Netscape/8.1",
         ("Windows NT 5.1", "Netscape 8.1"),
         {'os': {'name': 'Windows', 'version': 'NT 5.1'}, 'browser': {'name': 'Netscape', 'version': '8.1'}},),
        )
    
    class TestHAP(unittest.TestCase):
        def setUp(self):
            self.harass_repeat = 1000
            self.data = data

        def test_simple_detect(self):
            for agent, simple_res, res in data:
                self.assertEqual(simple_detect(agent), simple_res)

        def test_detect(self):
            for agent, simple_res, res in data:
                self.assertEqual(detect(agent), res)

        def test_harass(self):
            then = time.time()
            for agent, simple_res, res in data * self.harass_repeat:
                detect(agent)
            time_taken = time.time() - then
            no_of_tests = len(self.data) * self.harass_repeat
            print "\nTime taken for %s detecttions: %s" \
                % (no_of_tests, time_taken)
            print "Time taken for single detecttion: ", \
                time_taken / (len(self.data) * self.harass_repeat)

    unittest.main()

Added gluon/custom_import.py version [9bbb533900].
























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import __builtin__
import os
import re
import sys
import threading

# Install the new import function:
def custom_import_install(web2py_path):
        global _web2py_importer
        global _web2py_path
        if _web2py_importer:
            return  # Already installed
        _web2py_path = web2py_path
        _web2py_importer = _Web2pyImporter(web2py_path)
        __builtin__.__import__ = _web2py_importer

def is_tracking_changes():
    """
    @return: True: neo_importer is tracking changes made to Python source
    files. False: neo_import does not reload Python modules.
    """

    global _is_tracking_changes
    return _is_tracking_changes

def track_changes(track=True):
    """
    Tell neo_importer to start/stop tracking changes made to Python modules.
    @param track: True: Start tracking changes. False: Stop tracking changes.
    """

    global _is_tracking_changes
    global _web2py_importer
    global _web2py_date_tracker_importer
    assert track is True or track is False, "Boolean expected."
    if track == _is_tracking_changes:
        return
    if track:
        if not _web2py_date_tracker_importer:
            _web2py_date_tracker_importer = \
              _Web2pyDateTrackerImporter(_web2py_path)
        __builtin__.__import__ = _web2py_date_tracker_importer
    else:
        __builtin__.__import__ = _web2py_importer
    _is_tracking_changes = track

_STANDARD_PYTHON_IMPORTER = __builtin__.__import__ # Keep standard importer
_web2py_importer = None # The standard web2py importer
_web2py_date_tracker_importer = None # The web2py importer with date tracking
_web2py_path = None # Absolute path of the web2py directory

_is_tracking_changes = False # The tracking mode

class _BaseImporter(object):
    """
    The base importer. Dispatch the import the call to the standard Python
    importer.
    """

    def begin(self):
        """
        Many imports can be made for a single import statement. This method
        help the management of this aspect.
        """

    def __call__(self, name, globals={}, locals={}, fromlist=[], level=-1):
        """
        The import method itself.
        """
        return _STANDARD_PYTHON_IMPORTER(name, globals, locals, fromlist,
                                         level)

    def end(self):
        """
        Needed for clean up.
        """


class _DateTrackerImporter(_BaseImporter):
    """
    An importer tracking the date of the module files and reloading them when
    they have changed.
    """

    _PACKAGE_PATH_SUFFIX = os.path.sep+"__init__.py"

    def __init__(self):
        super(_DateTrackerImporter, self).__init__()
        self._import_dates = {} # Import dates of the files of the modules
        # Avoid reloading cause by file modifications of reload:
        self._tl = threading.local()
        self._tl._modules_loaded = None

    def begin(self):
        self._tl._modules_loaded = set()

    def __call__(self, name, globals={}, locals={}, fromlist=[], level=-1):
        """
        The import method itself.
        """

        call_begin_end = self._tl._modules_loaded == None
        if call_begin_end:
            self.begin()

	try:
            self._tl.globals = globals
            self._tl.locals = locals
            self._tl.level = level

            # Check the date and reload if needed:
            self._update_dates(name, fromlist)

            # Try to load the module and update the dates if it works:
            result = super(_DateTrackerImporter, self) \
              .__call__(name, globals, locals, fromlist, level)
            # Module maybe loaded for the 1st time so we need to set the date
            self._update_dates(name, fromlist)
            return result
        except Exception, e:
            raise e  # Don't hide something that went wrong
        finally:
            if call_begin_end:
                self.end()

    def _update_dates(self, name, fromlist):
        """
        Update all the dates associated to the statement import. A single
        import statement may import many modules.
        """

        self._reload_check(name)
        if fromlist:
            for fromlist_name in fromlist:
                self._reload_check("%s.%s" % (name, fromlist_name))

    def _reload_check(self, name):
        """
        Update the date associated to the module and reload the module if
        the file has changed.
        """

        module = sys.modules.get(name)
        file = self._get_module_file(module)
        if file:
            date = self._import_dates.get(file)
            new_date = None
            reload_mod = False
            mod_to_pack = False # Module turning into a package? (special case)
            try:
                new_date = os.path.getmtime(file)
            except:
                self._import_dates.pop(file, None)  # Clean up
                # Handle module changing in package and
                #package changing in module:
                if file.endswith(".py"):
                    # Get path without file ext:
                    file = os.path.splitext(file)[0]
                    reload_mod = os.path.isdir(file) \
                      and os.path.isfile(file+self._PACKAGE_PATH_SUFFIX)
                    mod_to_pack = reload_mod
                else: # Package turning into module?
                    file += ".py"
                    reload_mod = os.path.isfile(file)
                if reload_mod:
                    new_date = os.path.getmtime(file) # Refresh file date
            if reload_mod or not date or new_date > date:
                self._import_dates[file] = new_date
            if reload_mod or (date and new_date > date):
                if module not in self._tl._modules_loaded:
                    if mod_to_pack:
                        # Module turning into a package:
                        mod_name = module.__name__
                        del sys.modules[mod_name] # Delete the module
                        # Reload the module:
                        super(_DateTrackerImporter, self).__call__ \
                          (mod_name, self._tl.globals, self._tl.locals, [],
                           self._tl.level)
                    else:
                        reload(module)
                        self._tl._modules_loaded.add(module)

    def end(self):
        self._tl._modules_loaded = None

    @classmethod
    def _get_module_file(cls, module):
        """
        Get the absolute path file associated to the module or None.
        """

        file = getattr(module, "__file__", None)
        if file:
            # Make path absolute if not:
            #file = os.path.join(cls.web2py_path, file)

            file = os.path.splitext(file)[0]+".py" # Change .pyc for .py
            if file.endswith(cls._PACKAGE_PATH_SUFFIX):
                file = os.path.dirname(file)  # Track dir for packages
        return file

class _Web2pyImporter(_BaseImporter):
    """
    The standard web2py importer. Like the standard Python importer but it
    tries to transform import statements as something like
    "import applications.app_name.modules.x". If the import failed, fall back
    on _BaseImporter.
    """

    _RE_ESCAPED_PATH_SEP = re.escape(os.path.sep)  # os.path.sep escaped for re

    def __init__(self, web2py_path):
        """
        @param web2py_path: The absolute path of the web2py installation.
        """

        global DEBUG
        super(_Web2pyImporter, self).__init__()
        self.web2py_path =  web2py_path
        self.__web2py_path_os_path_sep = self.web2py_path+os.path.sep
        self.__web2py_path_os_path_sep_len = len(self.__web2py_path_os_path_sep)
        self.__RE_APP_DIR = re.compile(
          self._RE_ESCAPED_PATH_SEP.join( \
          ( \
            #"^" + re.escape(web2py_path),   # Not working with Python 2.5
            "^(" + "applications",
            "[^",
            "]+)",
            "",
          ) ))

    def _matchAppDir(self, file_path):
        """
        Does the file in a directory inside the "applications" directory?
        """

        if file_path.startswith(self.__web2py_path_os_path_sep):
            file_path = file_path[self.__web2py_path_os_path_sep_len:]
            return self.__RE_APP_DIR.match(file_path)
        return False

    def __call__(self, name, globals={}, locals={}, fromlist=[], level=-1):
        """
        The import method itself.
        """

        self.begin()
        #try:
        # if not relative and not from applications:
        if not name.startswith(".") and level <= 0 \
                    and not name.startswith("applications.") \
                    and isinstance(globals, dict):
            # Get the name of the file do the import
            caller_file_name = os.path.join(self.web2py_path, \
                                            globals.get("__file__", ""))
            # Is the path in an application directory?
            match_app_dir = self._matchAppDir(caller_file_name)
            if match_app_dir:
                try:
                    # Get the prefix to add for the import
                    # (like applications.app_name.modules):
                    modules_prefix = \
                        ".".join((match_app_dir.group(1). \
                        replace(os.path.sep, "."), "modules"))
                    if not fromlist:
                        # import like "import x" or "import x.y"
                        return self.__import__dot(modules_prefix, name,
                            globals, locals, fromlist, level)
                    else:
                        # import like "from x import a, b, ..."
                        return super(_Web2pyImporter, self) \
                            .__call__(modules_prefix+"."+name,
                                    globals, locals, fromlist, level)
                except ImportError:
                    pass
        return super(_Web2pyImporter, self).__call__(name, globals, locals,
                                                    fromlist, level)
        #except Exception, e:
        #    raise e  # Don't hide something that went wrong
        #finally:
        self.end()

    def __import__dot(self, prefix, name, globals, locals, fromlist,
                      level):
        """
        Here we will import x.y.z as many imports like:
        from applications.app_name.modules import x
        from applications.app_name.modules.x import y
        from applications.app_name.modules.x.y import z.
        x will be the module returned.
        """

        result = None
        for name in name.split("."):
            new_mod = super(_Web2pyImporter, self).__call__(prefix, globals,
                                                        locals, [name], level)
            try:
                result = result or new_mod.__dict__[name]
            except KeyError:
                raise ImportError()
            prefix += "." + name
        return result

class _Web2pyDateTrackerImporter(_Web2pyImporter, _DateTrackerImporter):
    """
    Like _Web2pyImporter but using a _DateTrackerImporter.
    """

Added gluon/dal.py version [e194d94214].
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Thanks to
    * Niall Sweeny <niall.sweeny@fonjax.com> for MS SQL support
    * Marcel Leuthi <mluethi@mlsystems.ch> for Oracle support
    * Denes
    * Chris Clark
    * clach05
    * Denes Lengyel
    * and many others who have contributed to current and previous versions

This file contains the DAL support for many relational databases,
including:
- SQLite
- MySQL
- Postgres
- Oracle
- MS SQL
- DB2
- Interbase
- Ingres
- SapDB (experimental)
- Cubrid (experimental)
- CouchDB (experimental)
- MongoDB (in progress)
- Google:nosql
- Google:sql

Example of usage:

>>> # from dal import DAL, Field

### create DAL connection (and create DB if not exists)
>>> db=DAL(('mysql://a:b@locahost/x','sqlite://storage.sqlite'),folder=None)

### define a table 'person' (create/aster as necessary)
>>> person = db.define_table('person',Field('name','string'))

### insert a record
>>> id = person.insert(name='James')

### retrieve it by id
>>> james = person(id)

### retrieve it by name
>>> james = person(name='James')

### retrieve it by arbitrary query
>>> query = (person.name=='James')&(person.name.startswith('J'))
>>> james = db(query).select(person.ALL)[0]

### update one record
>>> james.update_record(name='Jim')

### update multiple records by query
>>> db(person.name.like('J%')).update(name='James')
1

### delete records by query
>>> db(person.name.lower()=='jim').delete()
0

### retrieve multiple records (rows)
>>> people = db(person).select(orderby=person.name,groupby=person.name,limitby=(0,100))

### further filter them
>>> james = people.find(lambda row: row.name=='James').first()
>>> print james.id, james.name
1 James

### check aggrgates
>>> counter = person.id.count()
>>> print db(person).select(counter).first()(counter)
1

### delete one record
>>> james.delete_record()
1

### delete (drop) entire database table
>>> person.drop()

Supported field types:
id string text boolean integer double decimal password upload blob time date datetime,

Supported DAL URI strings:
'sqlite://test.db'
'sqlite:memory'
'jdbc:sqlite://test.db'
'mysql://root:none@localhost/test'
'postgres://mdipierro:none@localhost/test'
'jdbc:postgres://mdipierro:none@localhost/test'
'mssql://web2py:none@A64X2/web2py_test'
'mssql2://web2py:none@A64X2/web2py_test' # alternate mappings
'oracle://username:password@database'
'firebird://user:password@server:3050/database'
'db2://DSN=dsn;UID=user;PWD=pass'
'firebird://username:password@hostname/database'
'firebird_embedded://username:password@c://path'
'informix://user:password@server:3050/database'
'informixu://user:password@server:3050/database' # unicode informix
'google:datastore' # for google app engine datastore
'google:sql' # for google app engine with sql (mysql compatible)
'teradata://DSN=dsn;UID=user;PWD=pass' # experimental 

For more info:
help(DAL)
help(Field)
"""

###################################################################################
# this file orly exposes DAL and Field
###################################################################################

__all__ = ['DAL', 'Field']
MAXCHARLENGTH = 512
INFINITY = 2**15 # not quite but reasonable default max char length

import re
import sys
import locale
import os
import types
import cPickle
import datetime
import threading
import time
import cStringIO
import csv
import copy
import socket
import logging
import copy_reg
import base64
import shutil
import marshal
import decimal
import struct
import urllib
import hashlib
import uuid
import glob

CALLABLETYPES = (types.LambdaType, types.FunctionType, types.BuiltinFunctionType,
                 types.MethodType, types.BuiltinMethodType)


###################################################################################
# following checks allows running of dal without web2py as a standalone module
###################################################################################
try:
    from utils import web2py_uuid
except ImportError:
    import uuid
    def web2py_uuid(): return str(uuid.uuid4())

try:
    import portalocker
    have_portalocker = True
except ImportError:
    have_portalocker = False

try:
    import serializers
    have_serializers = True
except ImportError:
    have_serializers = False

try:
    import validators
    have_validators = True
except ImportError:
    have_validators = False

logger = logging.getLogger("web2py.dal")
DEFAULT = lambda:0

sql_locker = threading.RLock()
thread = threading.local()

# internal representation of tables with field
#  <table>.<field>, tables and fields may only be [a-zA-Z0-0_]

regex_dbname = re.compile('^(\w+)(\:\w+)*')
table_field = re.compile('^[\w_]+\.[\w_]+$')
regex_content = re.compile('(?P<table>[\w\-]+)\.(?P<field>[\w\-]+)\.(?P<uuidkey>[\w\-]+)\.(?P<name>\w+)\.\w+$')
regex_cleanup_fn = re.compile('[\'"\s;]+')
string_unpack=re.compile('(?<!\|)\|(?!\|)')
regex_python_keywords = re.compile('^(and|del|from|not|while|as|elif|global|or|with|assert|else|if|pass|yield|break|except|import|print|class|exec|in|raise|continue|finally|is|return|def|for|lambda|try)$')



# list of drivers will be built on the fly
# and lists only what is available
drivers = []

try:
    from new import classobj
    from google.appengine.ext import db as gae
    from google.appengine.api import namespace_manager, rdbms
    from google.appengine.api.datastore_types import Key  ### needed for belongs on ID
    from google.appengine.ext.db.polymodel import PolyModel
    drivers.append('google')
except ImportError:
    pass

if not 'google' in drivers:

    try:
        from pysqlite2 import dbapi2 as sqlite3
        drivers.append('pysqlite2')
    except ImportError:
        try:
            from sqlite3 import dbapi2 as sqlite3
            drivers.append('SQLite3')
        except ImportError:
            logger.debug('no sqlite3 or pysqlite2.dbapi2 driver')

    try:
        import contrib.pymysql as pymysql
        drivers.append('pymysql')
    except ImportError:
        logger.debug('no pymysql driver')

    try:
        import psycopg2
        drivers.append('PostgreSQL')
    except ImportError:
        logger.debug('no psycopg2 driver')

    try:
        import cx_Oracle
        drivers.append('Oracle')
    except ImportError:
        logger.debug('no cx_Oracle driver')

    try:
        import pyodbc
        drivers.append('MSSQL/DB2')
    except ImportError:
        logger.debug('no MSSQL/DB2 driver')

    try:
        import kinterbasdb
        drivers.append('Interbase')
    except ImportError:
        logger.debug('no kinterbasdb driver')

    try:
        import firebirdsql
        drivers.append('Firebird')
    except ImportError:
        logger.debug('no Firebird driver')

    try:
        import informixdb
        drivers.append('Informix')
        logger.warning('Informix support is experimental')
    except ImportError:
        logger.debug('no informixdb driver')
        
    try:
        import sapdb
        drivers.append('SAPDB')
        logger.warning('SAPDB support is experimental')
    except ImportError:
        logger.debug('no sapdb driver')

    try:
        import cubriddb
        drivers.append('Cubrid')
        logger.warning('Cubrid support is experimental')
    except ImportError:
        logger.debug('no cubriddb driver')

    try:
        from com.ziclix.python.sql import zxJDBC
        import java.sql
        # Try sqlite jdbc driver from http://www.zentus.com/sqlitejdbc/
        from org.sqlite import JDBC # required by java.sql; ensure we have it
        drivers.append('zxJDBC')
        logger.warning('zxJDBC support is experimental')
        is_jdbc = True
    except ImportError:
        logger.debug('no zxJDBC driver')
        is_jdbc = False

    try:
        import ingresdbi
        drivers.append('Ingres')
    except ImportError:
        logger.debug('no Ingres driver')
    # NOTE could try JDBC.......

    try:
        import couchdb
        drivers.append('CouchDB')
    except ImportError:
        logger.debug('no couchdb driver')

    try:
        import pymongo
        drivers.append('mongoDB')
    except:
        logger.debug('no mongoDB driver')


if 'google' in drivers:

    is_jdbc = False

    class GAEDecimalProperty(gae.Property):
        """
        GAE decimal implementation
        """
        data_type = decimal.Decimal

        def __init__(self, precision, scale, **kwargs):
            super(GAEDecimalProperty, self).__init__(self, **kwargs)
            d = '1.'
            for x in range(scale):
                d += '0'
            self.round = decimal.Decimal(d)

        def get_value_for_datastore(self, model_instance):
            value = super(GAEDecimalProperty, self).get_value_for_datastore(model_instance)
            if value:
                return str(value)
            else:
                return None

        def make_value_from_datastore(self, value):
            if value:
                return decimal.Decimal(value).quantize(self.round)
            else:
                return None

        def validate(self, value):
            value = super(GAEDecimalProperty, self).validate(value)
            if value is None or isinstance(value, decimal.Decimal):
                return value
            elif isinstance(value, basestring):
                return decimal.Decimal(value)
            raise gae.BadValueError("Property %s must be a Decimal or string." % self.name)

###################################################################################
# class that handles connection pooling (all adapters derived form this one)
###################################################################################

class ConnectionPool(object):

    pools = {}

    @staticmethod
    def set_folder(folder):
        thread.folder = folder

    # ## this allows gluon to commit/rollback all dbs in this thread

    @staticmethod
    def close_all_instances(action):
        """ to close cleanly databases in a multithreaded environment """
        if not hasattr(thread,'instances'):
            return
        while thread.instances:
            instance = thread.instances.pop()
            getattr(instance,action)()
            # ## if you want pools, recycle this connection
            really = True
            if instance.pool_size:
                sql_locker.acquire()
                pool = ConnectionPool.pools[instance.uri]
                if len(pool) < instance.pool_size:
                    pool.append(instance.connection)
                    really = False
                sql_locker.release()
            if really:
                getattr(instance,'close')()
        return

    def find_or_make_work_folder(self):
        """ this actually does not make the folder. it has to be there """
        if hasattr(thread,'folder'):
            self.folder = thread.folder
        else:
            self.folder = thread.folder = ''

        # Creating the folder if it does not exist
        if False and self.folder and not os.path.exists(self.folder):
            os.mkdir(self.folder)

    def pool_connection(self, f):
        if not self.pool_size:
            self.connection = f()
        else:
            uri = self.uri
            sql_locker.acquire()
            if not uri in ConnectionPool.pools:
                ConnectionPool.pools[uri] = []
            if ConnectionPool.pools[uri]:
                self.connection = ConnectionPool.pools[uri].pop()
                sql_locker.release()
            else:
                sql_locker.release()
                self.connection = f()
        if not hasattr(thread,'instances'):
            thread.instances = []
        thread.instances.append(self)


###################################################################################
# this is a generic adapter that does nothing; all others are derived form this one
###################################################################################

class BaseAdapter(ConnectionPool):

    driver = None
    maxcharlength = INFINITY
    commit_on_alter_table = False
    support_distributed_transaction = False
    uploads_in_blob = False
    types = {
        'boolean': 'CHAR(1)',
        'string': 'CHAR(%(length)s)',
        'text': 'TEXT',
        'password': 'CHAR(%(length)s)',
        'blob': 'BLOB',
        'upload': 'CHAR(%(length)s)',
        'integer': 'INTEGER',
        'double': 'DOUBLE',
        'decimal': 'DOUBLE',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'TIMESTAMP',
        'id': 'INTEGER PRIMARY KEY AUTOINCREMENT',
        'reference': 'INTEGER REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'list:integer': 'TEXT',
        'list:string': 'TEXT',
        'list:reference': 'TEXT',
        }

    def integrity_error(self):
        return self.driver.IntegrityError

    def file_exists(self, filename):
        """
        to be used ONLY for files that on GAE may not be on filesystem
        """
        return os.path.exists(filename)

    def file_open(self, filename, mode='rb', lock=True):
        """
        to be used ONLY for files that on GAE may not be on filesystem
        """
        fileobj = open(filename,mode)
        if have_portalocker and lock:
            if mode in ('r','rb'):
                portalocker.lock(fileobj,portalocker.LOCK_SH)
            elif mode in ('w','wb','a'):
                portalocker.lock(fileobj,portalocker.LOCK_EX)
            else:
                fileobj.close()
                raise RuntimeError, "Unsupported file_open mode"
        return fileobj

    def file_close(self, fileobj, unlock=True):
        """
        to be used ONLY for files that on GAE may not be on filesystem
        """
        if fileobj:
            if have_portalocker and unlock:
                portalocker.unlock(fileobj)
            fileobj.close()

    def file_delete(self, filename):
        os.unlink(filename)

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                 adapter_args={}):
        self.db = db
        self.dbengine = "None"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        class Dummy(object):
            lastrowid = 1
            def __getattr__(self, value):
                return lambda *a, **b: []
        self.connection = Dummy()
        self.cursor = Dummy()

    def sequence_name(self,tablename):
        return '%s_sequence' % tablename

    def trigger_name(self,tablename):
        return '%s_sequence' % tablename


    def create_table(self, table, migrate=True, fake_migrate=False, polymodel=None):
        fields = []
        sql_fields = {}
        sql_fields_aux = {}
        TFK = {}
        tablename = table._tablename
        sortable = 0
        for field in table:
            sortable += 1
            k = field.name
            if isinstance(field.type,SQLCustomType):
                ftype = field.type.native or field.type.type
            elif field.type.startswith('reference'):
                referenced = field.type[10:].strip()
                constraint_name = self.constraint_name(tablename, field.name)
                if hasattr(table,'_primarykey'):
                    rtablename,rfieldname = referenced.split('.')
                    rtable = table._db[rtablename]
                    rfield = rtable[rfieldname]
                    # must be PK reference or unique
                    if rfieldname in rtable._primarykey or rfield.unique:
                        ftype = self.types[rfield.type[:9]] % dict(length=rfield.length)
                        # multicolumn primary key reference?
                        if not rfield.unique and len(rtable._primarykey)>1 :
                            # then it has to be a table level FK
                            if rtablename not in TFK:
                                TFK[rtablename] = {}
                            TFK[rtablename][rfieldname] = field.name
                        else:
                            ftype = ftype + \
                                self.types['reference FK'] %dict(\
                                constraint_name=constraint_name,
                                table_name=tablename,
                                field_name=field.name,
                                foreign_key='%s (%s)'%(rtablename, rfieldname),
                                on_delete_action=field.ondelete)
                else:
                    # make a guess here for circular references
                    id_fieldname = referenced in table._db and table._db[referenced]._id.name or 'id'
                    ftype = self.types[field.type[:9]]\
                        % dict(table_name=tablename,
                               field_name=field.name,
                               constraint_name=constraint_name,
                               foreign_key=referenced + ('(%s)' % id_fieldname),
                               on_delete_action=field.ondelete)
            elif field.type.startswith('list:reference'):
                ftype = self.types[field.type[:14]]
            elif field.type.startswith('decimal'):
                precision, scale = map(int,field.type[8:-1].split(','))
                ftype = self.types[field.type[:7]] % \
                    dict(precision=precision,scale=scale)
            elif not field.type in self.types:
                raise SyntaxError, 'Field: unknown field type: %s for %s' % \
                    (field.type, field.name)
            else:
                ftype = self.types[field.type]\
                     % dict(length=field.length)
            if not field.type.startswith('id') and not field.type.startswith('reference'):
                if field.notnull:
                    ftype += ' NOT NULL'
                else:
                    ftype += self.ALLOW_NULL()
                if field.unique:
                    ftype += ' UNIQUE'

            # add to list of fields
            sql_fields[field.name] = dict(sortable=sortable,
                                          type=str(field.type),
                                          sql=ftype)

            if isinstance(field.default,(str,int,float)):
                # caveat: sql_fields and sql_fields_aux differ for default values
                # sql_fields is used to trigger migrations and sql_fields_aux
                # are used for create table
                # the reason is that we do not want to trigger a migration simply
                # because a default value changes
                not_null = self.NOT_NULL(field.default,field.type)
                ftype = ftype.replace('NOT NULL',not_null)
            sql_fields_aux[field.name] = dict(sql=ftype)

            fields.append('%s %s' % (field.name, ftype))
        other = ';'

        # backend-specific extensions to fields
        if self.dbengine == 'mysql':
            if not hasattr(table, "_primarykey"):
                fields.append('PRIMARY KEY(%s)' % table._id.name)
            other = ' ENGINE=InnoDB CHARACTER SET utf8;'

        fields = ',\n    '.join(fields)
        for rtablename in TFK:
            rfields = TFK[rtablename]
            pkeys = table._db[rtablename]._primarykey
            fkeys = [ rfields[k] for k in pkeys ]
            fields = fields + ',\n    ' + \
                     self.types['reference TFK'] %\
                     dict(table_name=tablename,
                     field_name=', '.join(fkeys),
                     foreign_table=rtablename,
                     foreign_key=', '.join(pkeys),
                     on_delete_action=field.ondelete)

        if hasattr(table,'_primarykey'):
            query = '''CREATE TABLE %s(\n    %s,\n    %s) %s''' % \
                (tablename, fields, self.PRIMARY_KEY(', '.join(table._primarykey)),other)
        else:
            query = '''CREATE TABLE %s(\n    %s\n)%s''' % \
                (tablename, fields, other)

        if self.uri.startswith('sqlite:///'):
            path_encoding = sys.getfilesystemencoding() or locale.getdefaultlocale()[1] or 'utf8'
            dbpath = self.uri[9:self.uri.rfind('/')].decode('utf8').encode(path_encoding)
        else:
            dbpath = self.folder

        if not migrate:
            return query
        elif self.uri.startswith('sqlite:memory'):
            table._dbt = None
        elif isinstance(migrate, str):
            table._dbt = os.path.join(dbpath, migrate)
        else:
            table._dbt = os.path.join(dbpath, '%s_%s.table' \
                                          % (table._db._uri_hash, tablename))
        if table._dbt:
            table._loggername = os.path.join(dbpath, 'sql.log')
            logfile = self.file_open(table._loggername, 'a')
        else:
            logfile = None
        if not table._dbt or not self.file_exists(table._dbt):
            if table._dbt:
                logfile.write('timestamp: %s\n'
                               % datetime.datetime.today().isoformat())
                logfile.write(query + '\n')
            if not fake_migrate:
                self.create_sequence_and_triggers(query,table)
                table._db.commit()
            if table._dbt:
                tfile = self.file_open(table._dbt, 'w')
                cPickle.dump(sql_fields, tfile)
                self.file_close(tfile)
                if fake_migrate:
                    logfile.write('faked!\n')
                else:
                    logfile.write('success!\n')
        else:
            tfile = self.file_open(table._dbt, 'r')
            try:
                sql_fields_old = cPickle.load(tfile)
            except EOFError:
                self.file_close(tfile)
                self.file_close(logfile)
                raise RuntimeError, 'File %s appears corrupted' % table._dbt
            self.file_close(tfile)
            if sql_fields != sql_fields_old:
                self.migrate_table(table,
                                   sql_fields, sql_fields_old,
                                   sql_fields_aux, logfile,
                                   fake_migrate=fake_migrate)
        self.file_close(logfile)
        return query

    def migrate_table(
        self,
        table,
        sql_fields,
        sql_fields_old,
        sql_fields_aux,
        logfile,
        fake_migrate=False,
        ):
        tablename = table._tablename
        def fix(item):
            k,v=item
            if not isinstance(v,dict):
                v=dict(type='unkown',sql=v)
            return k.lower(),v
        ### make sure all field names are lower case to avoid conflicts
        sql_fields = dict(map(fix,sql_fields.items()))
        sql_fields_old = dict(map(fix,sql_fields_old.items()))
        sql_fields_aux = dict(map(fix,sql_fields_aux.items()))

        keys = sql_fields.keys()
        for key in sql_fields_old:
            if not key in keys:
                keys.append(key)
        if self.dbengine == 'mssql':
            new_add = '; ALTER TABLE %s ADD ' % tablename
        else:
            new_add = ', ADD '

        metadata_change = False
        sql_fields_current = copy.copy(sql_fields_old)
        for key in keys:
            query = None
            if not key in sql_fields_old:
                sql_fields_current[key] = sql_fields[key]
                query = ['ALTER TABLE %s ADD %s %s;' % \
                         (tablename, key,
                          sql_fields_aux[key]['sql'].replace(', ', new_add))]
                metadata_change = True
            elif self.dbengine == 'sqlite':
                if key in sql_fields:
                    sql_fields_current[key] = sql_fields[key]
                metadata_change = True
            elif not key in sql_fields:
                del sql_fields_current[key]
                if not self.dbengine in ('firebird',):
                    query = ['ALTER TABLE %s DROP COLUMN %s;' % (tablename, key)]
                else:
                    query = ['ALTER TABLE %s DROP %s;' % (tablename, key)]
                metadata_change = True
            elif sql_fields[key]['sql'] != sql_fields_old[key]['sql'] \
                  and not isinstance(table[key].type, SQLCustomType) \
                  and not (table[key].type.startswith('reference') and \
                      sql_fields[key]['sql'].startswith('INT,') and \
                      sql_fields_old[key]['sql'].startswith('INT NOT NULL,')):
                sql_fields_current[key] = sql_fields[key]
                t = tablename
                tt = sql_fields_aux[key]['sql'].replace(', ', new_add)
                if not self.dbengine in ('firebird',):
                    query = ['ALTER TABLE %s ADD %s__tmp %s;' % (t, key, tt),
                             'UPDATE %s SET %s__tmp=%s;' % (t, key, key),
                             'ALTER TABLE %s DROP COLUMN %s;' % (t, key),
                             'ALTER TABLE %s ADD %s %s;' % (t, key, tt),
                             'UPDATE %s SET %s=%s__tmp;' % (t, key, key),
                             'ALTER TABLE %s DROP COLUMN %s__tmp;' % (t, key)]
                else:
                    query = ['ALTER TABLE %s ADD %s__tmp %s;' % (t, key, tt),
                             'UPDATE %s SET %s__tmp=%s;' % (t, key, key),
                             'ALTER TABLE %s DROP %s;' % (t, key),
                             'ALTER TABLE %s ADD %s %s;' % (t, key, tt),
                             'UPDATE %s SET %s=%s__tmp;' % (t, key, key),
                             'ALTER TABLE %s DROP %s__tmp;' % (t, key)]
                metadata_change = True
            elif sql_fields[key]['type'] != sql_fields_old[key]['type']:
                sql_fields_current[key] = sql_fields[key]
                metadata_change = True

            if query:
                logfile.write('timestamp: %s\n'
                              % datetime.datetime.today().isoformat())
                table._db['_lastsql'] = '\n'.join(query)
                for sub_query in query:
                    logfile.write(sub_query + '\n')
                    if not fake_migrate:
                        self.execute(sub_query)
                        # caveat. mysql, oracle and firebird do not allow multiple alter table
                        # in one transaction so we must commit partial transactions and
                        # update table._dbt after alter table.
                        if table._db._adapter.commit_on_alter_table:
                            table._db.commit()
                            tfile = self.file_open(table._dbt, 'w')
                            cPickle.dump(sql_fields_current, tfile)
                            self.file_close(tfile)
                            logfile.write('success!\n')
                    else:
                        logfile.write('faked!\n')
            elif metadata_change:
                tfile = self.file_open(table._dbt, 'w')
                cPickle.dump(sql_fields_current, tfile)
                self.file_close(tfile)

        if metadata_change and \
                not (query and self.dbengine in ('mysql','oracle','firebird')):
            table._db.commit()
            tfile = self.file_open(table._dbt, 'w')
            cPickle.dump(sql_fields_current, tfile)
            self.file_close(tfile)

    def LOWER(self,first):
        return 'LOWER(%s)' % self.expand(first)

    def UPPER(self,first):
        return 'UPPER(%s)' % self.expand(first)

    def EXTRACT(self,first,what):
        return "EXTRACT(%s FROM %s)" % (what, self.expand(first))

    def AGGREGATE(self,first,what):
        return "%s(%s)" % (what,self.expand(first))

    def JOIN(self):
        return 'JOIN'

    def LEFT_JOIN(self):
        return 'LEFT JOIN'

    def RANDOM(self):
        return 'Random()'

    def NOT_NULL(self,default,field_type):
        return 'NOT NULL DEFAULT %s' % self.represent(default,field_type)

    def COALESCE_ZERO(self,first):
        return 'COALESCE(%s,0)' % self.expand(first)

    def ALLOW_NULL(self):
        return ''

    def SUBSTRING(self,field,parameters):
        return 'SUBSTR(%s,%s,%s)' % (self.expand(field), parameters[0], parameters[1])

    def PRIMARY_KEY(self,key):
        return 'PRIMARY KEY(%s)' % key

    def _drop(self,table,mode):
        return ['DROP TABLE %s;' % table]

    def drop(self, table, mode=''):
        if table._dbt:
            logfile = self.file_open(table._loggername, 'a')
        queries = self._drop(table, mode)
        for query in queries:
            if table._dbt:
                logfile.write(query + '\n')
            self.execute(query)
        table._db.commit()
        del table._db[table._tablename]
        del table._db.tables[table._db.tables.index(table._tablename)]
        table._db._update_referenced_by(table._tablename)
        if table._dbt:
            self.file_delete(table._dbt)
            logfile.write('success!\n')

    def _insert(self,table,fields):
        keys = ','.join(f.name for f,v in fields)
        values = ','.join(self.expand(v,f.type) for f,v in fields)
        return 'INSERT INTO %s(%s) VALUES (%s);' % (table, keys, values)

    def insert(self,table,fields):
        query = self._insert(table,fields)
        try:
            self.execute(query)
        except Exception, e:
            if isinstance(e,self.integrity_error_class()):
                return None
            raise e
        if hasattr(table,'_primarykey'):
            return dict([(k[0].name, k[1]) for k in fields \
                             if k[0].name in table._primarykey])
        id = self.lastrowid(table)
        if not isinstance(id,int):
            return id
        rid = Reference(id)
        (rid._table, rid._record) = (table, None)
        return rid

    def bulk_insert(self,table,items):
        return [self.insert(table,item) for item in items]

    def NOT(self,first):
        return '(NOT %s)' % self.expand(first)

    def AND(self,first,second):
        return '(%s AND %s)' % (self.expand(first),self.expand(second))

    def OR(self,first,second):
        return '(%s OR %s)' % (self.expand(first),self.expand(second))

    def BELONGS(self,first,second):
        if isinstance(second,str):
            return '(%s IN (%s))' % (self.expand(first),second[:-1])
        elif second==[] or second==():
            return '(0)'
        items =','.join(self.expand(item,first.type) for item in second)
        return '(%s IN (%s))' % (self.expand(first),items)

    def LIKE(self,first,second):
        return '(%s LIKE %s)' % (self.expand(first),self.expand(second,'string'))

    def STARTSWITH(self,first,second):
        return '(%s LIKE %s)' % (self.expand(first),self.expand(second+'%','string'))

    def ENDSWITH(self,first,second):
        return '(%s LIKE %s)' % (self.expand(first),self.expand('%'+second,'string'))

    def CONTAINS(self,first,second):
        if first.type in ('string','text'):
            key = '%'+str(second).replace('%','%%')+'%'
        elif first.type.startswith('list:'):
            key = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
        return '(%s LIKE %s)' % (self.expand(first),self.expand(key,'string'))

    def EQ(self,first,second=None):
        if second is None:
            return '(%s IS NULL)' % self.expand(first)
        return '(%s = %s)' % (self.expand(first),self.expand(second,first.type))

    def NE(self,first,second=None):
        if second is None:
            return '(%s IS NOT NULL)' % self.expand(first)
        return '(%s <> %s)' % (self.expand(first),self.expand(second,first.type))

    def LT(self,first,second=None):
        return '(%s < %s)' % (self.expand(first),self.expand(second,first.type))

    def LE(self,first,second=None):
        return '(%s <= %s)' % (self.expand(first),self.expand(second,first.type))

    def GT(self,first,second=None):
        return '(%s > %s)' % (self.expand(first),self.expand(second,first.type))

    def GE(self,first,second=None):
        return '(%s >= %s)' % (self.expand(first),self.expand(second,first.type))

    def ADD(self,first,second):
        return '(%s + %s)' % (self.expand(first),self.expand(second,first.type))

    def SUB(self,first,second):
        return '(%s - %s)' % (self.expand(first),self.expand(second,first.type))

    def MUL(self,first,second):
        return '(%s * %s)' % (self.expand(first),self.expand(second,first.type))

    def DIV(self,first,second):
        return '(%s / %s)' % (self.expand(first),self.expand(second,first.type))

    def MOD(self,first,second):
        return '(%s %% %s)' % (self.expand(first),self.expand(second,first.type))

    def AS(self,first,second):
        return '%s AS %s' % (self.expand(first),second)

    def ON(self,first,second):
        return '%s ON %s' % (self.expand(first),self.expand(second))

    def INVERT(self,first):
        return '%s DESC' % self.expand(first)

    def COMMA(self,first,second):
        return '%s, %s' % (self.expand(first),self.expand(second))

    def expand(self,expression,field_type=None):
        if isinstance(expression,Field):
            return str(expression)
        elif isinstance(expression, (Expression, Query)):
            if not expression.second is None:
                return expression.op(expression.first, expression.second)
            elif not expression.first is None:
                return expression.op(expression.first)
            else:
                return expression.op()
        elif field_type:
            return self.represent(expression,field_type)
        elif isinstance(expression,(list,tuple)):
            return ','.join([self.represent(item,field_type) for item in expression])
        else:
            return str(expression)

    def alias(self,table,alias):
        """
        given a table object, makes a new table object
        with alias name.
        """
        other = copy.copy(table)
        other['_ot'] = other._tablename
        other['ALL'] = SQLALL(other)
        other['_tablename'] = alias
        for fieldname in other.fields:
            other[fieldname] = copy.copy(other[fieldname])
            other[fieldname]._tablename = alias
            other[fieldname].tablename = alias
            other[fieldname].table = other
        table._db[alias] = other
        return other

    def _truncate(self,table,mode = ''):
        tablename = table._tablename
        return ['TRUNCATE TABLE %s %s;' % (tablename, mode or '')]

    def truncate(self,table,mode= ' '):
        # Prepare functions "write_to_logfile" and "close_logfile"
        if table._dbt:
            logfile = self.file_open(table._loggername, 'a')
        else:
            class Logfile(object):
                def write(self, value):
                    pass
                def close(self):
                    pass
            logfile = Logfile()

        try:
            queries = table._db._adapter._truncate(table, mode)
            for query in queries:
                logfile.write(query + '\n')
                self.execute(query)
            table._db.commit()
            logfile.write('success!\n')
        finally:
            logfile.close()

    def _update(self,tablename,query,fields):
        if query:
            sql_w = ' WHERE ' + self.expand(query)
        else:
            sql_w = ''
        sql_v = ','.join(['%s=%s' % (field.name, self.expand(value,field.type)) for (field,value) in fields])
        return 'UPDATE %s SET %s%s;' % (tablename, sql_v, sql_w)

    def update(self,tablename,query,fields):
        sql = self._update(tablename,query,fields)
        self.execute(sql)
        try:
            return self.cursor.rowcount
        except:
            return None

    def _delete(self,tablename, query):
        if query:
            sql_w = ' WHERE ' + self.expand(query)
        else:
            sql_w = ''
        return 'DELETE FROM %s%s;' % (tablename, sql_w)

    def delete(self,tablename,query):
        sql = self._delete(tablename,query)
        ### special code to handle CASCADE in SQLite
        db = self.db
        table = db[tablename]
        if self.dbengine=='sqlite' and table._referenced_by:
            deleted = [x[table._id.name] for x in db(query).select(table._id)]
        ### end special code to handle CASCADE in SQLite
        self.execute(sql)
        try:
            counter = self.cursor.rowcount
        except:
            counter =  None
        ### special code to handle CASCADE in SQLite
        if self.dbengine=='sqlite' and counter:
            for tablename,fieldname in table._referenced_by:
                f = db[tablename][fieldname]
                if f.type=='reference '+table._tablename and f.ondelete=='CASCADE':
                    db(db[tablename][fieldname].belongs(deleted)).delete()
        ### end special code to handle CASCADE in SQLite
        return counter

    def get_table(self,query):
        tablenames = self.tables(query)
        if len(tablenames)==1:
            return tablenames[0]
        elif len(tablenames)<1:
            raise RuntimeError, "No table selected"
        else:
            raise RuntimeError, "Too many tables selected"

    def _select(self, query, fields, attributes):
        for key in set(attributes.keys())-set(('orderby','groupby','limitby',
                                               'required','cache','left',
                                               'distinct','having', 'join')):
            raise SyntaxError, 'invalid select attribute: %s' % key
        # ## if not fields specified take them all from the requested tables
        new_fields = []
        for item in fields:
            if isinstance(item,SQLALL):
                new_fields += item.table
            else:
                new_fields.append(item)
        fields = new_fields
        tablenames = self.tables(query)
        query = self.filter_tenant(query,tablenames)
        if not fields:
            for table in tablenames:
                for field in self.db[table]:
                    fields.append(field)
        else:
            for field in fields:
                if isinstance(field,basestring) and table_field.match(field):
                    tn,fn = field.split('.')
                    field = self.db[tn][fn]
                for tablename in self.tables(field):
                    if not tablename in tablenames:
                        tablenames.append(tablename)
        if len(tablenames) < 1:
            raise SyntaxError, 'Set: no tables selected'
        sql_f = ', '.join(map(self.expand,fields))
        self._colnames = [c.strip() for c in sql_f.split(', ')]
        if query:
            sql_w = ' WHERE ' + self.expand(query)
        else:
            sql_w = ''
        sql_o = ''
        sql_s = ''
        left = attributes.get('left', False)
        inner_join = attributes.get('join', False)
        distinct = attributes.get('distinct', False)
        groupby = attributes.get('groupby', False)
        orderby = attributes.get('orderby', False)
        having = attributes.get('having', False)
        limitby = attributes.get('limitby', False)
        if distinct is True:
            sql_s += 'DISTINCT'
        elif distinct:
            sql_s += 'DISTINCT ON (%s)' % distinct
        if inner_join:
            icommand = self.JOIN()
            if not isinstance(inner_join, (tuple, list)):
                inner_join = [inner_join]
            ijoint = [t._tablename for t in inner_join if not isinstance(t,Expression)]
            ijoinon = [t for t in inner_join if isinstance(t, Expression)]
            ijoinont = [t.first._tablename for t in ijoinon]
            iexcluded = [t for t in tablenames if not t in ijoint + ijoinont]
        if left:
            join = attributes['left']
            command = self.LEFT_JOIN()
            if not isinstance(join, (tuple, list)):
                join = [join]
            joint = [t._tablename for t in join if not isinstance(t,Expression)]
            joinon = [t for t in join if isinstance(t, Expression)]
            #patch join+left patch (solves problem with ordering in left joins)
            tables_to_merge={}
            [tables_to_merge.update(dict.fromkeys(self.tables(t))) for t in joinon]
            joinont = [t.first._tablename for t in joinon]
            [tables_to_merge.pop(t) for t in joinont if t in tables_to_merge]
            important_tablenames = joint + joinont + tables_to_merge.keys()
            excluded = [t for t in tablenames if not t in important_tablenames ]
        def alias(t):
            return str(self.db[t])
        if inner_join and not left:
            sql_t = ', '.join(alias(t) for t in iexcluded)
            for t in ijoinon:
                sql_t += ' %s %s' % (icommand, str(t))
        elif not inner_join and left:
            sql_t = ', '.join([alias(t) for t in excluded + tables_to_merge.keys()])
            if joint:
                sql_t += ' %s %s' % (command, ','.join([t for t in joint]))
            for t in joinon:
                sql_t += ' %s %s' % (command, str(t))
        elif inner_join and left:
            sql_t = ','.join([alias(t) for t in excluded + \
                                  tables_to_merge.keys() if t in iexcluded ])
            for t in ijoinon:
                sql_t += ' %s %s' % (icommand, str(t))
            if joint:
                sql_t += ' %s %s' % (command, ','.join([t for t in joint]))
            for t in joinon:
                sql_t += ' %s %s' % (command, str(t))
        else:
            sql_t = ', '.join(alias(t) for t in tablenames)
        if groupby:
            if isinstance(groupby, (list, tuple)):
                groupby = xorify(groupby)
            sql_o += ' GROUP BY %s' % self.expand(groupby)
            if having:
                sql_o += ' HAVING %s' % attributes['having']
        if orderby:
            if isinstance(orderby, (list, tuple)):
                orderby = xorify(orderby)
            if str(orderby) == '<random>':
                sql_o += ' ORDER BY %s' % self.RANDOM()
            else:
                sql_o += ' ORDER BY %s' % self.expand(orderby)
        if limitby:
            if not orderby and tablenames:
                sql_o += ' ORDER BY %s' % ', '.join(['%s.%s'%(t,x) for t in tablenames for x in ((hasattr(self.db[t],'_primarykey') and self.db[t]._primarykey) or [self.db[t]._id.name])])
            # oracle does not support limitby
        return self.select_limitby(sql_s, sql_f, sql_t, sql_w, sql_o, limitby)

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            sql_o += ' LIMIT %i OFFSET %i' % (lmax - lmin, lmin)
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def select(self,query,fields,attributes):
        """
        Always returns a Rows object, even if it may be empty
        """
        def response(sql):
            self.execute(sql)
            return self.cursor.fetchall()
        sql = self._select(query,fields,attributes)
        if attributes.get('cache', None):
            (cache_model, time_expire) = attributes['cache']
            del attributes['cache']
            key = self.uri + '/' + sql
            key = (key<=200) and key or hashlib.md5(key).hexdigest()
            rows = cache_model(key, lambda: response(sql), time_expire)
        else:
            rows = response(sql)
        if isinstance(rows,tuple):
            rows = list(rows)
        limitby = attributes.get('limitby',None) or (0,)
        rows = self.rowslice(rows,limitby[0],None)
        return self.parse(rows,self._colnames)

    def _count(self,query,distinct=None):
        tablenames = self.tables(query)
        if query:
            sql_w = ' WHERE ' + self.expand(query)
        else:
            sql_w = ''
        sql_t = ','.join(tablenames)
        if distinct:
            if isinstance(distinct,(list,tuple)):
                distinct = xorify(distinct)
            sql_d = self.expand(distinct)
            return 'SELECT count(DISTINCT %s) FROM %s%s' % (sql_d, sql_t, sql_w)
        return 'SELECT count(*) FROM %s%s' % (sql_t, sql_w)

    def count(self,query,distinct=None):
        self.execute(self._count(query,distinct))
        return self.cursor.fetchone()[0]


    def tables(self,query):
        tables = set()
        if isinstance(query, Field):
            tables.add(query.tablename)
        elif isinstance(query, (Expression, Query)):
            if query.first!=None:
                tables = tables.union(self.tables(query.first))
            if query.second!=None:
                tables = tables.union(self.tables(query.second))
        return list(tables)

    def commit(self):
        return self.connection.commit()

    def rollback(self):
        return self.connection.rollback()

    def close(self):
        return self.connection.close()

    def distributed_transaction_begin(self,key):
        return

    def prepare(self,key):
        self.connection.prepare()

    def commit_prepared(self,key):
        self.connection.commit()

    def rollback_prepared(self,key):
        self.connection.rollback()

    def concat_add(self,table):
        return ', ADD '

    def constraint_name(self, table, fieldname):
        return '%s_%s__constraint' % (table,fieldname)

    def create_sequence_and_triggers(self, query, table, **args):
        self.execute(query)

    def log_execute(self,*a,**b):
        self.db._lastsql = a[0]
        t0 = time.time()
        ret = self.cursor.execute(*a,**b)
        self.db._timings.append((a[0],time.time()-t0))
        return ret

    def execute(self,*a,**b):
        return self.log_execute(*a, **b)

    def represent(self, obj, fieldtype):
        if isinstance(obj,CALLABLETYPES):
            obj = obj()
        if isinstance(fieldtype, SQLCustomType):
            return fieldtype.encoder(obj)
        if isinstance(obj, (Expression, Field)):
            return str(obj)
        if fieldtype.startswith('list:'):
            if not obj:
                obj = []
            if not isinstance(obj, (list, tuple)):
                obj = [obj]
        if isinstance(obj, (list, tuple)):
            obj = bar_encode(obj)
        if obj is None:
            return 'NULL'
        if obj == '' and not fieldtype[:2] in ['st', 'te', 'pa', 'up']:
            return 'NULL'
        r = self.represent_exceptions(obj,fieldtype)
        if r != None:
            return r
        if fieldtype == 'boolean':
            if obj and not str(obj)[:1].upper() in ['F', '0']:
                return "'T'"
            else:
                return "'F'"
        if fieldtype == 'id' or fieldtype == 'integer':
            return str(int(obj))
        if fieldtype.startswith('decimal'):
            return str(obj)
        elif fieldtype.startswith('reference'): # reference
            if fieldtype.find('.')>0:
                return repr(obj)
            elif isinstance(obj, (Row, Reference)):
                return str(obj['id'])
            return str(int(obj))
        elif fieldtype == 'double':
            return repr(float(obj))
        if isinstance(obj, unicode):
            obj = obj.encode(self.db_codec)
        if fieldtype == 'blob':
            obj = base64.b64encode(str(obj))
        elif fieldtype == 'date':
            if isinstance(obj, (datetime.date, datetime.datetime)):
                obj = obj.isoformat()[:10]
            else:
                obj = str(obj)
        elif fieldtype == 'datetime':
            if isinstance(obj, datetime.datetime):
                obj = obj.isoformat()[:19].replace('T',' ')
            elif isinstance(obj, datetime.date):
                obj = obj.isoformat()[:10]+' 00:00:00'
            else:
                obj = str(obj)
        elif fieldtype == 'time':
            if isinstance(obj, datetime.time):
                obj = obj.isoformat()[:10]
            else:
                obj = str(obj)
        if not isinstance(obj,str):
            obj = str(obj)
        try:
            obj.decode(self.db_codec)
        except:
            obj = obj.decode('latin1').encode(self.db_codec)
        return "'%s'" % obj.replace("'", "''")

    def represent_exceptions(self, obj, fieldtype):
        return None

    def lastrowid(self,table):
        return None

    def integrity_error_class(self):
        return type(None)

    def rowslice(self,rows,minimum=0,maximum=None):
        """ by default this function does nothing, overload when db does not do slicing """
        return rows

    def parse(self, rows, colnames, blob_decode=True):
        db = self.db
        virtualtables = []
        new_rows = []
        for (i,row) in enumerate(rows):
            new_row = Row()
            for j,colname in enumerate(colnames):
                value = row[j]
                if not table_field.match(colnames[j]):
                    if not '_extra' in new_row:
                        new_row['_extra'] = Row()
                    new_row['_extra'][colnames[j]] = value
                    select_as_parser = re.compile("\s+AS\s+(\S+)")
                    new_column_name = select_as_parser.search(colnames[j])
                    if not new_column_name is None:
                        column_name = new_column_name.groups(0)
                        setattr(new_row,column_name[0],value)
                    continue
                (tablename, fieldname) = colname.split('.')
                table = db[tablename]
                field = table[fieldname]
                field_type = field.type
                if field.type != 'blob' and isinstance(value, str):
                    try:
                        value = value.decode(db._db_codec)
                    except Exception:
                        pass
                if isinstance(value, unicode):
                    value = value.encode('utf-8')
                if not tablename in new_row:
                    colset = new_row[tablename] = Row()
                    if tablename not in virtualtables:
                        virtualtables.append(tablename)
                else:
                    colset = new_row[tablename]

                if isinstance(field_type, SQLCustomType):
                    colset[fieldname] = field_type.decoder(value)
                    # field_type = field_type.type
                elif not isinstance(field_type, str) or value is None:
                    colset[fieldname] = value
                elif isinstance(field_type, str) and \
                        field_type.startswith('reference'):
                    referee = field_type[10:].strip()
                    if not '.' in referee:
                        colset[fieldname] = rid = Reference(value)
                        (rid._table, rid._record) = (db[referee], None)
                    else: ### reference not by id
                        colset[fieldname] = value
                elif field_type == 'boolean':
                    if value == True or str(value)[:1].lower() == 't':
                        colset[fieldname] = True
                    else:
                        colset[fieldname] = False
                elif field_type == 'date' \
                        and (not isinstance(value, datetime.date)\
                                 or isinstance(value, datetime.datetime)):
                    (y, m, d) = map(int, str(value)[:10].strip().split('-'))
                    colset[fieldname] = datetime.date(y, m, d)
                elif field_type == 'time' \
                        and not isinstance(value, datetime.time):
                    time_items = map(int,str(value)[:8].strip().split(':')[:3])
                    if len(time_items) == 3:
                        (h, mi, s) = time_items
                    else:
                        (h, mi, s) = time_items + [0]
                    colset[fieldname] = datetime.time(h, mi, s)
                elif field_type == 'datetime'\
                        and not isinstance(value, datetime.datetime):
                    (y, m, d) = map(int,str(value)[:10].strip().split('-'))
                    time_items = map(int,str(value)[11:19].strip().split(':')[:3])
                    if len(time_items) == 3:
                        (h, mi, s) = time_items
                    else:
                        (h, mi, s) = time_items + [0]
                    colset[fieldname] = datetime.datetime(y, m, d, h, mi, s)
                elif field_type == 'blob' and blob_decode:
                    colset[fieldname] = base64.b64decode(str(value))
                elif field_type.startswith('decimal'):
                    decimals = int(field_type[8:-1].split(',')[-1])
                    if self.dbengine == 'sqlite':
                        value = ('%.' + str(decimals) + 'f') % value
                    if not isinstance(value, decimal.Decimal):
                        value = decimal.Decimal(str(value))
                    colset[fieldname] = value
                elif field_type.startswith('list:integer'):
                    if not self.dbengine=='google:datastore':
                        colset[fieldname] = bar_decode_integer(value)
                    else:
                        colset[fieldname] = value
                elif field_type.startswith('list:reference'):
                    if not self.dbengine=='google:datastore':
                        colset[fieldname] = bar_decode_integer(value)
                    else:
                        colset[fieldname] = value
                elif field_type.startswith('list:string'):
                    if not self.dbengine=='google:datastore':
                        colset[fieldname] = bar_decode_string(value)
                    else:
                        colset[fieldname] = value
                else:
                    colset[fieldname] = value
                if field_type == 'id':
                    id = colset[field.name]
                    colset.update_record = lambda _ = (colset, table, id), **a: update_record(_, a)
                    colset.delete_record = lambda t = table, i = id: t._db(t._id==i).delete()
                    for (referee_table, referee_name) in \
                            table._referenced_by:
                        s = db[referee_table][referee_name]
                        if not referee_table in colset:
                            # for backward compatibility
                            colset[referee_table] = Set(db, s == id)
                        ### add new feature?
                        ### colset[referee_table+'_by_'+refree_name] = Set(db, s == id)
                    colset['id'] = id
            new_rows.append(new_row)
        rowsobj = Rows(db, new_rows, colnames, rawrows=rows)
        for tablename in virtualtables:
            for item in db[tablename].virtualfields:
                try:
                    rowsobj = rowsobj.setvirtualfields(**{tablename:item})
                except KeyError:
                    # to avoid breaking virtualfields when partial select
                    pass
        return rowsobj

    def filter_tenant(self,query,tablenames):
        fieldname = self.db._request_tenant
        for tablename in tablenames:
            table = self.db[tablename]
            if fieldname in table:
                default = table[fieldname].default
                if default!=None:
                    query = query&(table[fieldname]==default)
        return query

###################################################################################
# List of all the available adapters, they all extend BaseAdapter
###################################################################################

class SQLiteAdapter(BaseAdapter):

    driver = globals().get('sqlite3',None)

    def EXTRACT(self,field,what):
        return "web2py_extract('%s',%s)" % (what,self.expand(field))

    @staticmethod
    def web2py_extract(lookup, s):
        table = {
            'year': (0, 4),
            'month': (5, 7),
            'day': (8, 10),
            'hour': (11, 13),
            'minute': (14, 16),
            'second': (17, 19),
            }
        try:
            (i, j) = table[lookup]
            return int(s[i:j])
        except:
            return None

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "sqlite"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        path_encoding = sys.getfilesystemencoding() or locale.getdefaultlocale()[1] or 'utf8'
        if uri.startswith('sqlite:memory'):
            dbpath = ':memory:'
        else:
            dbpath = uri.split('://')[1]
            if dbpath[0] != '/':
                dbpath = os.path.join(self.folder.decode(path_encoding).encode('utf8'),dbpath)
        if not 'check_same_thread' in driver_args:
            driver_args['check_same_thread'] = False
        def connect(dbpath=dbpath, driver_args=driver_args):
            return self.driver.Connection(dbpath, **driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()
        self.connection.create_function('web2py_extract', 2, SQLiteAdapter.web2py_extract)

    def _truncate(self,table,mode = ''):
        tablename = table._tablename
        return ['DELETE FROM %s;' % tablename,
                "DELETE FROM sqlite_sequence WHERE name='%s';" % tablename]

    def lastrowid(self,table):
        return self.cursor.lastrowid


class JDBCSQLiteAdapter(SQLiteAdapter):

    driver = globals().get('zxJDBC',None)

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "sqlite"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        path_encoding = sys.getfilesystemencoding() or locale.getdefaultlocale()[1] or 'utf8'
        if uri.startswith('sqlite:memory'):
            dbpath = ':memory:'
        else:
            dbpath = uri.split('://')[1]
            if dbpath[0] != '/':
                dbpath = os.path.join(self.folder.decode(path_encoding).encode('utf8'),dbpath)
        def connect(dbpath=dbpath,driver_args=driver_args):
            return self.driver.connect(java.sql.DriverManager.getConnection('jdbc:sqlite:'+dbpath),**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()
        # FIXME http://www.zentus.com/sqlitejdbc/custom_functions.html for UDFs
        # self.connection.create_function('web2py_extract', 2, SQLiteAdapter.web2py_extract)

    def execute(self,a):
        return self.log_execute(a[:-1])


class MySQLAdapter(BaseAdapter):

    driver = globals().get('pymysql',None)
    maxcharlength = 255
    commit_on_alter_table = True
    support_distributed_transaction = True
    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'LONGTEXT',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'LONGBLOB',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INT',
        'double': 'DOUBLE',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'DATETIME',
        'id': 'INT AUTO_INCREMENT NOT NULL',
        'reference': 'INT, INDEX %(field_name)s__idx (%(field_name)s), FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'list:integer': 'LONGTEXT',
        'list:string': 'LONGTEXT',
        'list:reference': 'LONGTEXT',
        }

    def RANDOM(self):
        return 'RAND()'

    def SUBSTRING(self,field,parameters):
        return 'SUBSTRING(%s,%s,%s)' % (self.expand(field), parameters[0], parameters[1])

    def _drop(self,table,mode):
        # breaks db integrity but without this mysql does not drop table
        return ['SET FOREIGN_KEY_CHECKS=0;','DROP TABLE %s;' % table,'SET FOREIGN_KEY_CHECKS=1;']

    def distributed_transaction_begin(self,key):
        self.execute('XA START;')

    def prepare(self,key):
        self.execute("XA END;")
        self.execute("XA PREPARE;")

    def commit_prepared(self,ley):
        self.execute("XA COMMIT;")

    def rollback_prepared(self,key):
        self.execute("XA ROLLBACK;")

    def concat_add(self,table):
        return '; ALTER TABLE %s ADD ' % table

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "mysql"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>[^?]+)(\?set_encoding=(?P<charset>\w+))?$').match(uri)
        if not m:
            raise SyntaxError, \
                "Invalid URI string in DAL: %s" % self.uri
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        port = int(m.group('port') or '3306')
        charset = m.group('charset') or 'utf8'
        driver_args.update(dict(db=db,
                                user=credential_decoder(user),
                                passwd=credential_decoder(password),
                                host=host,
                                port=port,
                                charset=charset))
        def connect(driver_args=driver_args):
            return self.driver.connect(**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()
        self.execute('SET FOREIGN_KEY_CHECKS=1;')
        self.execute("SET sql_mode='NO_BACKSLASH_ESCAPES';")

    def lastrowid(self,table):
        self.execute('select last_insert_id();')
        return int(self.cursor.fetchone()[0])


class PostgreSQLAdapter(BaseAdapter):

    driver = globals().get('psycopg2',None)

    support_distributed_transaction = True
    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'TEXT',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'BYTEA',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INTEGER',
        'double': 'FLOAT8',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'TIMESTAMP',
        'id': 'SERIAL PRIMARY KEY',
        'reference': 'INTEGER REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'list:integer': 'TEXT',
        'list:string': 'TEXT',
        'list:reference': 'TEXT',
        }

    def sequence_name(self,table):
        return '%s_id_Seq' % table

    def RANDOM(self):
        return 'RANDOM()'

    def distributed_transaction_begin(self,key):
        return

    def prepare(self,key):
        self.execute("PREPARE TRANSACTION '%s';" % key)

    def commit_prepared(self,key):
        self.execute("COMMIT PREPARED '%s';" % key)

    def rollback_prepared(self,key):
        self.execute("ROLLBACK PREPARED '%s';" % key)

    def create_sequence_and_triggers(self, query, table, **args):
        # following lines should only be executed if table._sequence_name does not exist
        # self.execute('CREATE SEQUENCE %s;' % table._sequence_name)
        # self.execute("ALTER TABLE %s ALTER COLUMN %s SET DEFAULT NEXTVAL('%s');" \
        #              % (table._tablename, table._fieldname, table._sequence_name))
        self.execute(query)

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "postgres"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:@/]+)(\:(?P<port>[0-9]+))?/(?P<db>[^\?]+)(\?sslmode=(?P<sslmode>.+))?$').match(uri)
        if not m:
            raise SyntaxError, "Invalid URI string in DAL"
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        port = m.group('port') or '5432'
        sslmode = m.group('sslmode')
        if sslmode:
            msg = ("dbname='%s' user='%s' host='%s'"
                   "port=%s password='%s' sslmode='%s'") \
                   % (db, user, host, port, password, sslmode)
        else:
            msg = ("dbname='%s' user='%s' host='%s'"
                   "port=%s password='%s'") \
                   % (db, user, host, port, password)
        def connect(msg=msg,driver_args=driver_args):
            return self.driver.connect(msg,**driver_args)
        self.pool_connection(connect)
        self.connection.set_client_encoding('UTF8')
        self.cursor = self.connection.cursor()
        self.execute('BEGIN;')
        self.execute("SET CLIENT_ENCODING TO 'UNICODE';")
        self.execute("SET standard_conforming_strings=on;")

    def lastrowid(self,table):
        self.execute("select currval('%s')" % table._sequence_name)
        return int(self.cursor.fetchone()[0])

    def LIKE(self,first,second):
        return '(%s ILIKE %s)' % (self.expand(first),self.expand(second,'string'))

    def STARTSWITH(self,first,second):
        return '(%s ILIKE %s)' % (self.expand(first),self.expand(second+'%','string'))

    def ENDSWITH(self,first,second):
        return '(%s ILIKE %s)' % (self.expand(first),self.expand('%'+second,'string'))

    def CONTAINS(self,first,second):
        if first.type in ('string','text'):
            key = '%'+str(second).replace('%','%%')+'%'
        elif first.type.startswith('list:'):
            key = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
        return '(%s ILIKE %s)' % (self.expand(first),self.expand(key,'string'))

class JDBCPostgreSQLAdapter(PostgreSQLAdapter):

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "postgres"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>.+)$').match(uri)
        if not m:
            raise SyntaxError, "Invalid URI string in DAL"
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        port = m.group('port') or '5432'
        msg = ('jdbc:postgresql://%s:%s/%s' % (host, port, db), user, password)
        def connect(msg=msg,driver_args=driver_args):
            return self.driver.connect(*msg,**driver_args)
        self.pool_connection(connect)
        self.connection.set_client_encoding('UTF8')
        self.cursor = self.connection.cursor()
        self.execute('BEGIN;')
        self.execute("SET CLIENT_ENCODING TO 'UNICODE';")


class OracleAdapter(BaseAdapter):

    driver = globals().get('cx_Oracle',None)

    commit_on_alter_table = False
    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR2(%(length)s)',
        'text': 'CLOB',
        'password': 'VARCHAR2(%(length)s)',
        'blob': 'CLOB',
        'upload': 'VARCHAR2(%(length)s)',
        'integer': 'INT',
        'double': 'FLOAT',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'CHAR(8)',
        'datetime': 'DATE',
        'id': 'NUMBER PRIMARY KEY',
        'reference': 'NUMBER, CONSTRAINT %(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'list:integer': 'CLOB',
        'list:string': 'CLOB',
        'list:reference': 'CLOB',
        }

    def sequence_name(self,tablename):
        return '%s_sequence' % tablename

    def trigger_name(self,tablename):
        return '%s_trigger' % tablename

    def LEFT_JOIN(self):
        return 'LEFT OUTER JOIN'

    def RANDOM(self):
        return 'dbms_random.value'

    def NOT_NULL(self,default,field_type):
        return 'DEFAULT %s NOT NULL' % self.represent(default,field_type)

    def _drop(self,table,mode):
        sequence_name = table._sequence_name
        return ['DROP TABLE %s %s;' % (table, mode), 'DROP SEQUENCE %s;' % sequence_name]

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            if len(sql_w) > 1:
                sql_w_row = sql_w + ' AND w_row > %i' % lmin
            else:
                sql_w_row = 'WHERE w_row > %i' % lmin
            return 'SELECT %s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o)
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def constraint_name(self, tablename, fieldname):
        constraint_name = BaseAdapter.constraint_name(self, tablename, fieldname)
        if len(constraint_name)>30:
            constraint_name = '%s_%s__constraint' % (tablename[:10], fieldname[:7])
        return constraint_name

    def represent_exceptions(self, obj, fieldtype):
        if fieldtype == 'blob':
            obj = base64.b64encode(str(obj))
            return ":CLOB('%s')" % obj
        elif fieldtype == 'date':
            if isinstance(obj, (datetime.date, datetime.datetime)):
                obj = obj.isoformat()[:10]
            else:
                obj = str(obj)
            return "to_date('%s','yyyy-mm-dd')" % obj
        elif fieldtype == 'datetime':
            if isinstance(obj, datetime.datetime):
                obj = obj.isoformat()[:19].replace('T',' ')
            elif isinstance(obj, datetime.date):
                obj = obj.isoformat()[:10]+' 00:00:00'
            else:
                obj = str(obj)
            return "to_date('%s','yyyy-mm-dd hh24:mi:ss')" % obj
        return None

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "oracle"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        if not 'threaded' in driver_args:
            driver_args['threaded']=True
        def connect(uri=uri,driver_args=driver_args):
            return self.driver.connect(uri,**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()
        self.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';")
        self.execute("ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS';")
    oracle_fix = re.compile("[^']*('[^']*'[^']*)*\:(?P<clob>CLOB\('([^']+|'')*'\))")

    def execute(self, command):
        args = []
        i = 1
        while True:
            m = self.oracle_fix.match(command)
            if not m:
                break
            command = command[:m.start('clob')] + str(i) + command[m.end('clob'):]
            args.append(m.group('clob')[6:-2].replace("''", "'"))
            i += 1
        return self.log_execute(command[:-1], args)

    def create_sequence_and_triggers(self, query, table, **args):
        tablename = table._tablename
        sequence_name = table._sequence_name
        trigger_name = table._trigger_name
        self.execute(query)
        self.execute('CREATE SEQUENCE %s START WITH 1 INCREMENT BY 1 NOMAXVALUE;' % sequence_name)
        self.execute('CREATE OR REPLACE TRIGGER %s BEFORE INSERT ON %s FOR EACH ROW BEGIN SELECT %s.nextval INTO :NEW.id FROM DUAL; END;\n' % (trigger_name, tablename, sequence_name))

    def lastrowid(self,table):
        sequence_name = table._sequence_name
        self.execute('SELECT %s.currval FROM dual;' % sequence_name)
        return int(self.cursor.fetchone()[0])


class MSSQLAdapter(BaseAdapter):

    driver = globals().get('pyodbc',None)

    types = {
        'boolean': 'BIT',
        'string': 'VARCHAR(%(length)s)',
        'text': 'TEXT',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'IMAGE',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INT',
        'double': 'FLOAT',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATETIME',
        'time': 'CHAR(8)',
        'datetime': 'DATETIME',
        'id': 'INT IDENTITY PRIMARY KEY',
        'reference': 'INT NULL, CONSTRAINT %(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s',
        'list:integer': 'TEXT',
        'list:string': 'TEXT',
        'list:reference': 'TEXT',
        }

    def EXTRACT(self,field,what):
        return "DATEPART(%s,%s)" % (what, self.expand(field))

    def LEFT_JOIN(self):
        return 'LEFT OUTER JOIN'

    def RANDOM(self):
        return 'NEWID()'

    def ALLOW_NULL(self):
        return ' NULL'

    def SUBSTRING(self,field,parameters):
        return 'SUBSTRING(%s,%s,%s)' % (self.expand(field), parameters[0], parameters[1])

    def PRIMARY_KEY(self,key):
        return 'PRIMARY KEY CLUSTERED (%s)' % key

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            sql_s += ' TOP %i' % lmax
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def represent_exceptions(self, obj, fieldtype):
        if fieldtype == 'boolean':
            if obj and not str(obj)[0].upper() == 'F':
                return '1'
            else:
                return '0'
        return None

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}, fake_connect=False):
        self.db = db
        self.dbengine = "mssql"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        # ## read: http://bytes.com/groups/python/460325-cx_oracle-utf8
        uri = uri.split('://')[1]
        if '@' not in uri:
            try:
                m = re.compile('^(?P<dsn>.+)$').match(uri)
                if not m:
                    raise SyntaxError, \
                        'Parsing uri string(%s) has no result' % self.uri
                dsn = m.group('dsn')
                if not dsn:
                    raise SyntaxError, 'DSN required'
            except SyntaxError, e:
                logger.error('NdGpatch error')
                raise e
            cnxn = 'DSN=%s' % dsn
        else:
            m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>[^\?]+)(\?(?P<urlargs>.*))?$').match(uri)
            if not m:
                raise SyntaxError, \
                    "Invalid URI string in DAL: %s" % uri
            user = credential_decoder(m.group('user'))
            if not user:
                raise SyntaxError, 'User required'
            password = credential_decoder(m.group('password'))
            if not password:
                password = ''
            host = m.group('host')
            if not host:
                raise SyntaxError, 'Host name required'
            db = m.group('db')
            if not db:
                raise SyntaxError, 'Database name required'
            port = m.group('port') or '1433'
            # Parse the optional url name-value arg pairs after the '?'
            # (in the form of arg1=value1&arg2=value2&...)
            # Default values (drivers like FreeTDS insist on uppercase parameter keys)
            argsdict = { 'DRIVER':'{SQL Server}' }
            urlargs = m.group('urlargs') or ''
            argpattern = re.compile('(?P<argkey>[^=]+)=(?P<argvalue>[^&]*)')
            for argmatch in argpattern.finditer(urlargs):
                argsdict[str(argmatch.group('argkey')).upper()] = argmatch.group('argvalue')
            urlargs = ';'.join(['%s=%s' % (ak, av) for (ak, av) in argsdict.items()])
            cnxn = 'SERVER=%s;PORT=%s;DATABASE=%s;UID=%s;PWD=%s;%s' \
                % (host, port, db, user, password, urlargs)
        def connect(cnxn=cnxn,driver_args=driver_args):
            return self.driver.connect(cnxn,**driver_args)
        if not fake_connect:
            self.pool_connection(connect)
            self.cursor = self.connection.cursor()

    def lastrowid(self,table):
        #self.execute('SELECT @@IDENTITY;')
        self.execute('SELECT SCOPE_IDENTITY();')
        return int(self.cursor.fetchone()[0])

    def integrity_error_class(self):
        return pyodbc.IntegrityError

    def rowslice(self,rows,minimum=0,maximum=None):
        if maximum is None:
            return rows[minimum:]
        return rows[minimum:maximum]


class MSSQL2Adapter(MSSQLAdapter):
    types = {
        'boolean': 'CHAR(1)',
        'string': 'NVARCHAR(%(length)s)',
        'text': 'NTEXT',
        'password': 'NVARCHAR(%(length)s)',
        'blob': 'IMAGE',
        'upload': 'NVARCHAR(%(length)s)',
        'integer': 'INT',
        'double': 'FLOAT',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATETIME',
        'time': 'CHAR(8)',
        'datetime': 'DATETIME',
        'id': 'INT IDENTITY PRIMARY KEY',
        'reference': 'INT, CONSTRAINT %(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s',
        'list:integer': 'NTEXT',
        'list:string': 'NTEXT',
        'list:reference': 'NTEXT',
        }

    def represent(self, obj, fieldtype):
        value = BaseAdapter.represent(self, obj, fieldtype)
        if (fieldtype == 'string' or fieldtype == 'text') and value[:1]=="'":
            value = 'N'+value
        return value

    def execute(self,a):
        return self.log_execute(a.decode('utf8'))


class FireBirdAdapter(BaseAdapter):

    driver = globals().get('pyodbc',None)

    commit_on_alter_table = False
    support_distributed_transaction = True
    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'BLOB SUB_TYPE 1',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'BLOB SUB_TYPE 0',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INTEGER',
        'double': 'DOUBLE PRECISION',
        'decimal': 'DECIMAL(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'TIMESTAMP',
        'id': 'INTEGER PRIMARY KEY',
        'reference': 'INTEGER REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'list:integer': 'BLOB SUB_TYPE 1',
        'list:string': 'BLOB SUB_TYPE 1',
        'list:reference': 'BLOB SUB_TYPE 1',
        }

    def sequence_name(self,tablename):
        return 'genid_%s' % tablename

    def trigger_name(self,tablename):
        return 'trg_id_%s' % tablename

    def RANDOM(self):
        return 'RAND()'

    def NOT_NULL(self,default,field_type):
        return 'DEFAULT %s NOT NULL' % self.represent(default,field_type)

    def SUBSTRING(self,field,parameters):
        return 'SUBSTRING(%s from %s for %s)' % (self.expand(field), parameters[0], parameters[1])

    def _drop(self,table,mode):
        sequence_name = table._sequence_name
        return ['DROP TABLE %s %s;' % (table, mode), 'DROP GENERATOR %s;' % sequence_name]

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            sql_s += ' FIRST %i SKIP %i' % (lmax - lmin, lmin)
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def _truncate(self,table,mode = ''):
        return ['DELETE FROM %s;' % table._tablename,
                'SET GENERATOR %s TO 0;' % table._sequence_name]

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "firebird"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>.+?)(\?set_encoding=(?P<charset>\w+))?$').match(uri)
        if not m:
            raise SyntaxError, "Invalid URI string in DAL: %s" % uri
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        port = int(m.group('port') or 3050)
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        charset = m.group('charset') or 'UTF8'
        driver_args.update(dict(dsn='%s/%s:%s' % (host,port,db),
                                   user = credential_decoder(user),
                                   password = credential_decoder(password),
                                   charset = charset))
        if adapter_args.has_key('driver_name'):
            if adapter_args['driver_name'] == 'kinterbasdb':
                self.driver = kinterbasdb
            elif adapter_args['driver_name'] == 'firebirdsql':
                self.driver = firebirdsql
        else:
            self.driver = kinterbasdb        
        def connect(driver_args=driver_args):
            return self.driver.connect(**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()

    def create_sequence_and_triggers(self, query, table, **args):
        tablename = table._tablename
        sequence_name = table._sequence_name
        trigger_name = table._trigger_name
        self.execute(query)
        self.execute('create generator %s;' % sequence_name)
        self.execute('set generator %s to 0;' % sequence_name)
        self.execute('create trigger %s for %s active before insert position 0 as\nbegin\nif(new.id is null) then\nbegin\nnew.id = gen_id(%s, 1);\nend\nend;' % (trigger_name, tablename, sequence_name))

    def lastrowid(self,table):
        sequence_name = table._sequence_name
        self.execute('SELECT gen_id(%s, 0) FROM rdb$database' % sequence_name)
        return int(self.cursor.fetchone()[0])


class FireBirdEmbeddedAdapter(FireBirdAdapter):

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "firebird"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<path>[^\?]+)(\?set_encoding=(?P<charset>\w+))?$').match(uri)
        if not m:
            raise SyntaxError, \
                "Invalid URI string in DAL: %s" % self.uri
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        pathdb = m.group('path')
        if not pathdb:
            raise SyntaxError, 'Path required'
        charset = m.group('charset')
        if not charset:
            charset = 'UTF8'
        host = ''
        driver_args.update(dict(host=host,
                                   database=pathdb,
                                   user=credential_decoder(user),
                                   password=credential_decoder(password),
                                   charset=charset))
        #def connect(driver_args=driver_args):
        #    return kinterbasdb.connect(**driver_args)
        if adapter_args.has_key('driver_name'):
            if adapter_args['driver_name'] == 'kinterbasdb':
                self.driver = kinterbasdb
            elif adapter_args['driver_name'] == 'firebirdsql':
                self.driver = firebirdsql
        else:
            self.driver = kinterbasdb        
        def connect(driver_args=driver_args):
            return self.driver.connect(**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()


class InformixAdapter(BaseAdapter):

    driver = globals().get('informixdb',None)

    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'BLOB SUB_TYPE 1',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'BLOB SUB_TYPE 0',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INTEGER',
        'double': 'FLOAT',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'CHAR(8)',
        'datetime': 'DATETIME',
        'id': 'SERIAL',
        'reference': 'INTEGER REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': 'REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s CONSTRAINT FK_%(table_name)s_%(field_name)s',
        'reference TFK': 'FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s CONSTRAINT TFK_%(table_name)s_%(field_name)s',
        'list:integer': 'BLOB SUB_TYPE 1',
        'list:string': 'BLOB SUB_TYPE 1',
        'list:reference': 'BLOB SUB_TYPE 1',
        }

    def RANDOM(self):
        return 'Random()'

    def NOT_NULL(self,default,field_type):
        return 'DEFAULT %s NOT NULL' % self.represent(default,field_type)

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            fetch_amt = lmax - lmin
            dbms_version = int(self.connection.dbms_version.split('.')[0])
            if lmin and (dbms_version >= 10):
                # Requires Informix 10.0+
                sql_s += ' SKIP %d' % (lmin, )
            if fetch_amt and (dbms_version >= 9):
                # Requires Informix 9.0+
                sql_s += ' FIRST %d' % (fetch_amt, )
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def represent_exceptions(self, obj, fieldtype):
        if fieldtype == 'date':
            if isinstance(obj, (datetime.date, datetime.datetime)):
                obj = obj.isoformat()[:10]
            else:
                obj = str(obj)
            return "to_date('%s','yyyy-mm-dd')" % obj
        elif fieldtype == 'datetime':
            if isinstance(obj, datetime.datetime):
                obj = obj.isoformat()[:19].replace('T',' ')
            elif isinstance(obj, datetime.date):
                obj = obj.isoformat()[:10]+' 00:00:00'
            else:
                obj = str(obj)
            return "to_date('%s','yyyy-mm-dd hh24:mi:ss')" % obj
        return None

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "informix"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>.+)$').match(uri)
        if not m:
            raise SyntaxError, \
                "Invalid URI string in DAL: %s" % self.uri
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        user = credential_decoder(user)
        password = credential_decoder(password)
        dsn = '%s@%s' % (db,host)
        driver_args.update(dict(user=user,password=password,autocommit=True))
        def connect(dsn=dsn,driver_args=driver_args):
            return self.driver.connect(dsn,**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()

    def execute(self,command):
        if command[-1:]==';':
            command = command[:-1]
        return self.log_execute(command)

    def lastrowid(self,table):
        return self.cursor.sqlerrd[1]

    def integrity_error_class(self):
        return informixdb.IntegrityError


class DB2Adapter(BaseAdapter):

    driver = globals().get('pyodbc',None)

    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'CLOB',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'BLOB',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INT',
        'double': 'DOUBLE',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'TIMESTAMP',
        'id': 'INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL',
        'reference': 'INT, FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s',
        'list:integer': 'CLOB',
        'list:string': 'CLOB',
        'list:reference': 'CLOB',
        }

    def LEFT_JOIN(self):
        return 'LEFT OUTER JOIN'

    def RANDOM(self):
        return 'RAND()'

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            sql_o += ' FETCH FIRST %i ROWS ONLY' % lmax
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def represent_exceptions(self, obj, fieldtype):
        if fieldtype == 'blob':
            obj = base64.b64encode(str(obj))
            return "BLOB('%s')" % obj
        elif fieldtype == 'datetime':
            if isinstance(obj, datetime.datetime):
                obj = obj.isoformat()[:19].replace('T','-').replace(':','.')
            elif isinstance(obj, datetime.date):
                obj = obj.isoformat()[:10]+'-00.00.00'
            return "'%s'" % obj
        return None

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "db2"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        cnxn = uri.split('://', 1)[1]
        def connect(cnxn=cnxn,driver_args=driver_args):
            return self.driver.connect(cnxn,**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()

    def execute(self,command):
        if command[-1:]==';':
            command = command[:-1]
        return self.log_execute(command)

    def lastrowid(self,table):
        self.execute('SELECT DISTINCT IDENTITY_VAL_LOCAL() FROM %s;' % table)
        return int(self.cursor.fetchone()[0])

    def rowslice(self,rows,minimum=0,maximum=None):
        if maximum is None:
            return rows[minimum:]
        return rows[minimum:maximum]


class TeradataAdapter(DB2Adapter):

    driver = globals().get('pyodbc',None)

    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'CLOB',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'BLOB',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INT',
        'double': 'DOUBLE',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'TIMESTAMP',
        'id': 'INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL',
        'reference': 'INT, FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s',
        'list:integer': 'CLOB',
        'list:string': 'CLOB',
        'list:reference': 'CLOB',
        }


    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "teradata"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        cnxn = uri.split('://', 1)[1]
        def connect(cnxn=cnxn,driver_args=driver_args):
            return self.driver.connect(cnxn,**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()


INGRES_SEQNAME='ii***lineitemsequence' # NOTE invalid database object name
                                       # (ANSI-SQL wants this form of name
                                       # to be a delimited identifier)

class IngresAdapter(BaseAdapter):

    driver = globals().get('ingresdbi',None)

    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'CLOB',
        'password': 'VARCHAR(%(length)s)',  ## Not sure what this contains utf8 or nvarchar. Or even bytes?
        'blob': 'BLOB',
        'upload': 'VARCHAR(%(length)s)',  ## FIXME utf8 or nvarchar... or blob? what is this type?
        'integer': 'INTEGER4', # or int8...
        'double': 'FLOAT8',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'ANSIDATE',
        'time': 'TIME WITHOUT TIME ZONE',
        'datetime': 'TIMESTAMP WITHOUT TIME ZONE',
        'id': 'integer4 not null unique with default next value for %s' % INGRES_SEQNAME,
        'reference': 'integer4, FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s', ## FIXME TODO
        'list:integer': 'CLOB',
        'list:string': 'CLOB',
        'list:reference': 'CLOB',
        }

    def LEFT_JOIN(self):
        return 'LEFT OUTER JOIN'

    def RANDOM(self):
        return 'RANDOM()'

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            fetch_amt = lmax - lmin
            if fetch_amt:
                sql_s += ' FIRST %d ' % (fetch_amt, )
            if lmin:
                # Requires Ingres 9.2+
                sql_o += ' OFFSET %d' % (lmin, )
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "ingres"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        connstr = self._uri.split(':', 1)[1]
        # Simple URI processing
        connstr = connstr.lstrip()
        while connstr.startswith('/'):
            connstr = connstr[1:]
        database_name=connstr # Assume only (local) dbname is passed in
        vnode = '(local)'
        servertype = 'ingres'
        trace = (0, None) # No tracing
        driver_args.update(dict(database=database_name,
                                   vnode=vnode,
                                   servertype=servertype,
                                   trace=trace))
        def connect(driver_args=driver_args):
            return self.driver.connect(**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()

    def create_sequence_and_triggers(self, query, table, **args):
        # post create table auto inc code (if needed)
        # modify table to btree for performance....
        # Older Ingres releases could use rule/trigger like Oracle above.
        if hasattr(table,'_primarykey'):
            modify_tbl_sql = 'modify %s to btree unique on %s' % \
                (table._tablename,
                 ', '.join(["'%s'" % x for x in table.primarykey]))
            self.execute(modify_tbl_sql)
        else:
            tmp_seqname='%s_iisq' % table._tablename
            query=query.replace(INGRES_SEQNAME, tmp_seqname)
            self.execute('create sequence %s' % tmp_seqname)
            self.execute(query)
            self.execute('modify %s to btree unique on %s' % (table._tablename, 'id'))


    def lastrowid(self,table):
        tmp_seqname='%s_iisq' % table
        self.execute('select current value for %s' % tmp_seqname)
        return int(self.cursor.fetchone()[0]) # don't really need int type cast here...

    def integrity_error_class(self):
        return ingresdbi.IntegrityError


class IngresUnicodeAdapter(IngresAdapter):
    types = {
        'boolean': 'CHAR(1)',
        'string': 'NVARCHAR(%(length)s)',
        'text': 'NCLOB',
        'password': 'NVARCHAR(%(length)s)',  ## Not sure what this contains utf8 or nvarchar. Or even bytes?
        'blob': 'BLOB',
        'upload': 'VARCHAR(%(length)s)',  ## FIXME utf8 or nvarchar... or blob? what is this type?
        'integer': 'INTEGER4', # or int8...
        'double': 'FLOAT8',
        'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
        'date': 'ANSIDATE',
        'time': 'TIME WITHOUT TIME ZONE',
        'datetime': 'TIMESTAMP WITHOUT TIME ZONE',
        'id': 'integer4 not null unique with default next value for %s'% INGRES_SEQNAME,
        'reference': 'integer4, FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s', ## FIXME TODO
        'list:integer': 'NCLOB',
        'list:string': 'NCLOB',
        'list:reference': 'NCLOB',
        }

class SAPDBAdapter(BaseAdapter):

    driver = globals().get('sapdb',None)
    support_distributed_transaction = False
    types = {
        'boolean': 'CHAR(1)',
        'string': 'VARCHAR(%(length)s)',
        'text': 'LONG',
        'password': 'VARCHAR(%(length)s)',
        'blob': 'LONG',
        'upload': 'VARCHAR(%(length)s)',
        'integer': 'INT',
        'double': 'FLOAT',
        'decimal': 'FIXED(%(precision)s,%(scale)s)',
        'date': 'DATE',
        'time': 'TIME',
        'datetime': 'TIMESTAMP',
        'id': 'INT PRIMARY KEY',
        'reference': 'INT, FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
        'list:integer': 'LONG',
        'list:string': 'LONG',
        'list:reference': 'LONG',
        }

    def sequence_name(self,table):
        return '%s_id_Seq' % table

    def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
        if limitby:
            (lmin, lmax) = limitby
            if len(sql_w) > 1:
                sql_w_row = sql_w + ' AND w_row > %i' % lmin
            else:
                sql_w_row = 'WHERE w_row > %i' % lmin
            return '%s %s FROM (SELECT w_tmp.*, ROWNO w_row FROM (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNO=%i) %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o)
        return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)

    def create_sequence_and_triggers(self, query, table, **args):
        # following lines should only be executed if table._sequence_name does not exist
        self.execute('CREATE SEQUENCE %s;' % table._sequence_name)
        self.execute("ALTER TABLE %s ALTER COLUMN %s SET DEFAULT NEXTVAL('%s');" \
                         % (table._tablename, table._id.name, table._sequence_name))
        self.execute(query)

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.dbengine = "sapdb"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:@/]+)(\:(?P<port>[0-9]+))?/(?P<db>[^\?]+)(\?sslmode=(?P<sslmode>.+))?$').match(uri)
        if not m:
            raise SyntaxError, "Invalid URI string in DAL"
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        def connect(user=user,password=password,database=db,
                    host=host,driver_args=driver_args):
            return self.driver.Connection(user,password,database,
                                          host,**driver_args)
        self.pool_connection(connect)
        # self.connection.set_client_encoding('UTF8')
        self.cursor = self.connection.cursor()

    def lastrowid(self,table):
        self.execute("select %s.NEXTVAL from dual" % table._sequence_name)
        return int(self.cursor.fetchone()[0])

class CubridAdapter(MySQLAdapter):

    driver = globals().get('cubriddb',None)

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                 adapter_args={}):
        self.db = db
        self.dbengine = "cubrid"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.find_or_make_work_folder()
        uri = uri.split('://')[1]
        m = re.compile('^(?P<user>[^:@]+)(\:(?P<password>[^@]*))?@(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>[^?]+)(\?set_encoding=(?P<charset>\w+))?$').match(uri)
        if not m:
            raise SyntaxError, \
                "Invalid URI string in DAL: %s" % self.uri
        user = credential_decoder(m.group('user'))
        if not user:
            raise SyntaxError, 'User required'
        password = credential_decoder(m.group('password'))
        if not password:
            password = ''
        host = m.group('host')
        if not host:
            raise SyntaxError, 'Host name required'
        db = m.group('db')
        if not db:
            raise SyntaxError, 'Database name required'
        port = int(m.group('port') or '30000')
        charset = m.group('charset') or 'utf8'
        user=credential_decoder(user),
        passwd=credential_decoder(password),
        def connect(host,port,db,user,passwd,driver_args=driver_args):
            return self.driver.connect(host,port,db,user,passwd,**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()
        self.execute('SET FOREIGN_KEY_CHECKS=1;')
        self.execute("SET sql_mode='NO_BACKSLASH_ESCAPES';")


######## GAE MySQL ##########

class DatabaseStoredFile:

    web2py_filesystem = False

    def __init__(self,db,filename,mode):
        if db._adapter.dbengine != 'mysql':
            raise RuntimeError, "only MySQL can store metadata .table files in database for now"
        self.db = db
        self.filename = filename
        self.mode = mode
        if not self.web2py_filesystem:
            self.db.executesql("CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(512), content LONGTEXT, PRIMARY KEY(path) ) ENGINE=InnoDB;")
            DatabaseStoredFile.web2py_filesystem = True
        self.p=0
        self.data = ''
        if mode in ('r','rw','a'):
            query = "SELECT content FROM web2py_filesystem WHERE path='%s'" % filename
            rows = self.db.executesql(query)
            if rows:
                self.data = rows[0][0]
            elif os.path.exists(filename):
                datafile = open(filename, 'r')
                try:
                    self.data = datafile.read()
                finally:
                    datafile.close()
            elif mode in ('r','rw'):
                raise RuntimeError, "File %s does not exist" % filename

    def read(self, bytes):
        data = self.data[self.p:self.p+bytes]
        self.p += len(data)
        return data

    def readline(self):
        i = self.data.find('\n',self.p)+1
        if i>0:
            data, self.p = self.data[self.p:i], i
        else:
            data, self.p = self.data[self.p:], len(self.data)
        return data

    def write(self,data):
        self.data += data

    def close(self):
        self.db.executesql("DELETE FROM web2py_filesystem WHERE path='%s'" % self.filename)
        query = "INSERT INTO web2py_filesystem(path,content) VALUES ('%s','%s')" % \
            (self.filename, self.data.replace("'","''"))
        self.db.executesql(query)
        self.db.commit()

    @staticmethod
    def exists(db,filename):
        if os.path.exists(filename):
            return True
        query = "SELECT path FROM web2py_filesystem WHERE path='%s'" % filename
        if db.executesql(query):
            return True
        return False


class UseDatabaseStoredFile:

    def file_exists(self, filename):
        return DatabaseStoredFile.exists(self.db,filename)

    def file_open(self, filename, mode='rb', lock=True):
        return DatabaseStoredFile(self.db,filename,mode)

    def file_close(self, fileobj, unlock=True):
        fileobj.close()

    def file_delete(self,filename):
        query = "DELETE FROM web2py_filesystem WHERE path='%s'" % filename
        self.db.executesql(query)
        self.db.commit()

class GoogleSQLAdapter(UseDatabaseStoredFile,MySQLAdapter):

    def __init__(self, db, uri='google:sql://realm:domain/database', pool_size=0,
                 folder=None, db_codec='UTF-8', check_reserved=None,
                 migrate=True, fake_migrate=False,
                 credential_decoder = lambda x:x, driver_args={},
                    adapter_args={}):

        self.db = db
        self.dbengine = "mysql"
        self.uri = uri
        self.pool_size = pool_size
        self.folder = folder
        self.db_codec = db_codec
        self.folder = folder or '$HOME/'+thread.folder.split('/applications/',1)[1]

        m = re.compile('^(?P<instance>.*)/(?P<db>.*)$').match(self.uri[len('google:sql://'):])
        if not m:
            raise SyntaxError, "Invalid URI string in SQLDB: %s" % self._uri
        instance = credential_decoder(m.group('instance'))
        db = credential_decoder(m.group('db'))
        driver_args['instance'] = instance
        if not migrate:
            driver_args['database'] = db
        def connect(driver_args=driver_args):
            return rdbms.connect(**driver_args)
        self.pool_connection(connect)
        self.cursor = self.connection.cursor()
        if migrate:
            # self.execute('DROP DATABASE %s' % db)
            self.execute('CREATE DATABASE IF NOT EXISTS %s' % db)
            self.execute('USE %s' % db)
        self.execute("SET FOREIGN_KEY_CHECKS=1;")
        self.execute("SET sql_mode='NO_BACKSLASH_ESCAPES';")

class NoSQLAdapter(BaseAdapter):

    @staticmethod
    def to_unicode(obj):
        if isinstance(obj, str):
            return obj.decode('utf8')
        elif not isinstance(obj, unicode):
            return unicode(obj)
        return obj

    def represent(self, obj, fieldtype):
        if isinstance(obj,CALLABLETYPES):
            obj = obj()
        if isinstance(fieldtype, SQLCustomType):
            return fieldtype.encoder(obj)
        if isinstance(obj, (Expression, Field)):
            raise SyntaxError, "non supported on GAE"
        if self.dbengine=='google:datastore' in globals():
            if isinstance(fieldtype, gae.Property):
                return obj
        if fieldtype.startswith('list:'):
            if not obj:
                obj = []
            if not isinstance(obj, (list, tuple)):
                obj = [obj]
        if obj == '' and  not fieldtype[:2] in ['st','te','pa','up']:
            return None
        if obj != None:
            if isinstance(obj, list) and not fieldtype.startswith('list'):
                obj = [self.represent(o, fieldtype) for o in obj]
            elif fieldtype in ('integer','id'):
                obj = long(obj)
            elif fieldtype == 'double':
                obj = float(obj)
            elif fieldtype.startswith('reference'):
                if isinstance(obj, (Row, Reference)):
                    obj = obj['id']
                obj = long(obj)
            elif fieldtype == 'boolean':
                if obj and not str(obj)[0].upper() == 'F':
                    obj = True
                else:
                    obj = False
            elif fieldtype == 'date':
                if not isinstance(obj, datetime.date):
                    (y, m, d) = map(int,str(obj).strip().split('-'))
                    obj = datetime.date(y, m, d)
                elif isinstance(obj,datetime.datetime):
                    (y, m, d) = (obj.year, obj.month, obj.day)
                    obj = datetime.date(y, m, d)
            elif fieldtype == 'time':
                if not isinstance(obj, datetime.time):
                    time_items = map(int,str(obj).strip().split(':')[:3])
                    if len(time_items) == 3:
                        (h, mi, s) = time_items
                    else:
                        (h, mi, s) = time_items + [0]
                    obj = datetime.time(h, mi, s)
            elif fieldtype == 'datetime':
                if not isinstance(obj, datetime.datetime):
                    (y, m, d) = map(int,str(obj)[:10].strip().split('-'))
                    time_items = map(int,str(obj)[11:].strip().split(':')[:3])
                    while len(time_items)<3:
                        time_items.append(0)
                    (h, mi, s) = time_items
                    obj = datetime.datetime(y, m, d, h, mi, s)
            elif fieldtype == 'blob':
                pass
            elif fieldtype.startswith('list:string'):
                return map(self.to_unicode,obj)
            elif fieldtype.startswith('list:'):
                return map(int,obj)
            else:
                obj = self.to_unicode(obj)
        return obj

    def _insert(self,table,fields):
        return 'insert %s in %s' % (fields, table)

    def _count(self,query,distinct=None):
        return 'count %s' % repr(query)

    def _select(self,query,fields,attributes):
        return 'select %s where %s' % (repr(fields), repr(query))

    def _delete(self,tablename, query):
        return 'delete %s where %s' % (repr(tablename),repr(query))

    def _update(self,tablename,query,fields):
        return 'update %s (%s) where %s' % (repr(tablename),
                                            repr(fields),repr(query))

    def commit(self):
        """
        remember: no transactions on many NoSQL
        """
        pass

    def rollback(self):
        """
        remember: no transactions on many NoSQL
        """
        pass

    def close(self):
        """
        remember: no transactions on many NoSQL
        """
        pass


    # these functions should never be called!
    def OR(self,first,second): raise SyntaxError, "Not supported"
    def AND(self,first,second): raise SyntaxError, "Not supported"
    def AS(self,first,second): raise SyntaxError, "Not supported"
    def ON(self,first,second): raise SyntaxError, "Not supported"
    def STARTSWITH(self,first,second=None): raise SyntaxError, "Not supported"
    def ENDSWITH(self,first,second=None): raise SyntaxError, "Not supported"
    def ADD(self,first,second): raise SyntaxError, "Not supported"
    def SUB(self,first,second): raise SyntaxError, "Not supported"
    def MUL(self,first,second): raise SyntaxError, "Not supported"
    def DIV(self,first,second): raise SyntaxError, "Not supported"
    def LOWER(self,first): raise SyntaxError, "Not supported"
    def UPPER(self,first): raise SyntaxError, "Not supported"
    def EXTRACT(self,first,what): raise SyntaxError, "Not supported"
    def AGGREGATE(self,first,what): raise SyntaxError, "Not supported"
    def LEFT_JOIN(self): raise SyntaxError, "Not supported"
    def RANDOM(self): raise SyntaxError, "Not supported"
    def SUBSTRING(self,field,parameters):  raise SyntaxError, "Not supported"
    def PRIMARY_KEY(self,key):  raise SyntaxError, "Not supported"
    def LIKE(self,first,second): raise SyntaxError, "Not supported"
    def drop(self,table,mode):  raise SyntaxError, "Not supported"
    def alias(self,table,alias): raise SyntaxError, "Not supported"
    def migrate_table(self,*a,**b): raise SyntaxError, "Not supported"
    def distributed_transaction_begin(self,key): raise SyntaxError, "Not supported"
    def prepare(self,key): raise SyntaxError, "Not supported"
    def commit_prepared(self,key): raise SyntaxError, "Not supported"
    def rollback_prepared(self,key): raise SyntaxError, "Not supported"
    def concat_add(self,table): raise SyntaxError, "Not supported"
    def constraint_name(self, table, fieldname): raise SyntaxError, "Not supported"
    def create_sequence_and_triggers(self, query, table, **args): pass
    def log_execute(self,*a,**b): raise SyntaxError, "Not supported"
    def execute(self,*a,**b): raise SyntaxError, "Not supported"
    def represent_exceptions(self, obj, fieldtype): raise SyntaxError, "Not supported"
    def lastrowid(self,table): raise SyntaxError, "Not supported"
    def integrity_error_class(self): raise SyntaxError, "Not supported"
    def rowslice(self,rows,minimum=0,maximum=None): raise SyntaxError, "Not supported"


class GAEF(object):
    def __init__(self,name,op,value,apply):
        self.name=name=='id' and '__key__' or name
        self.op=op
        self.value=value
        self.apply=apply
    def __repr__(self):
        return '(%s %s %s:%s)' % (self.name, self.op, repr(self.value), type(self.value))

class GoogleDatastoreAdapter(NoSQLAdapter):
    uploads_in_blob = True
    types = {}

    def file_exists(self, filename): pass
    def file_open(self, filename, mode='rb', lock=True): pass
    def file_close(self, fileobj, unlock=True): pass

    def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.types.update({
                'boolean': gae.BooleanProperty,
                'string': (lambda: gae.StringProperty(multiline=True)),
                'text': gae.TextProperty,
                'password': gae.StringProperty,
                'blob': gae.BlobProperty,
                'upload': gae.StringProperty,
                'integer': gae.IntegerProperty,
                'double': gae.FloatProperty,
                'decimal': GAEDecimalProperty,
                'date': gae.DateProperty,
                'time': gae.TimeProperty,
                'datetime': gae.DateTimeProperty,
                'id': None,
                'reference': gae.IntegerProperty,
                'list:string': (lambda: gae.StringListProperty(default=None)),
                'list:integer': (lambda: gae.ListProperty(int,default=None)),
                'list:reference': (lambda: gae.ListProperty(int,default=None)),
        })
        self.db = db
        self.uri = uri
        self.dbengine = 'google:datastore'
        self.folder = folder
        db['_lastsql'] = ''
        self.db_codec = 'UTF-8'
        self.pool_size = 0
        match = re.compile('.*://(?P<namespace>.+)').match(uri)
        if match:
            namespace_manager.set_namespace(match.group('namespace'))

    def create_table(self,table,migrate=True,fake_migrate=False, polymodel=None):
        myfields = {}
        for k in table.fields:
            if isinstance(polymodel,Table) and k in polymodel.fields():
                continue
            field = table[k]
            attr = {}
            if isinstance(field.type, SQLCustomType):
                ftype = self.types[field.type.native or field.type.type](**attr)
            elif isinstance(field.type, gae.Property):
                ftype = field.type
            elif field.type.startswith('id'):
                continue
            elif field.type.startswith('decimal'):
                precision, scale = field.type[7:].strip('()').split(',')
                precision = int(precision)
                scale = int(scale)
                ftype = GAEDecimalProperty(precision, scale, **attr)
            elif field.type.startswith('reference'):
                if field.notnull:
                    attr = dict(required=True)
                referenced = field.type[10:].strip()
                ftype = self.types[field.type[:9]](table._db[referenced])
            elif field.type.startswith('list:reference'):
                if field.notnull:
                    attr = dict(required=True)
                referenced = field.type[15:].strip()
                ftype = self.types[field.type[:14]](**attr)
            elif field.type.startswith('list:'):
                ftype = self.types[field.type](**attr)
            elif not field.type in self.types\
                 or not self.types[field.type]:
                raise SyntaxError, 'Field: unknown field type: %s' % field.type
            else:
                ftype = self.types[field.type](**attr)
            myfields[field.name] = ftype
        if not polymodel:
            table._tableobj = classobj(table._tablename, (gae.Model, ), myfields)
        elif polymodel==True:
            table._tableobj = classobj(table._tablename, (PolyModel, ), myfields)
        elif isinstance(polymodel,Table):
            table._tableobj = classobj(table._tablename, (polymodel._tableobj, ), myfields)
        else:
            raise SyntaxError, "polymodel must be None, True, a table or a tablename"
        return None

    def expand(self,expression,field_type=None):
        if isinstance(expression,Field):
            if expression.type in ('text','blob'):
                raise SyntaxError, 'AppEngine does not index by: %s' % expression.type
            return expression.name
        elif isinstance(expression, (Expression, Query)):
            if not expression.second is None:
                return expression.op(expression.first, expression.second)
            elif not expression.first is None:
                return expression.op(expression.first)
            else:
                return expression.op()
        elif field_type:
                return self.represent(expression,field_type)
        elif isinstance(expression,(list,tuple)):
            return ','.join([self.represent(item,field_type) for item in expression])
        else:
            return str(expression)

    ### TODO from gql.py Expression
    def AND(self,first,second):
        a = self.expand(first)
        b = self.expand(second)
        if b[0].name=='__key__' and a[0].name!='__key__':
            return b+a
        return a+b

    def EQ(self,first,second=None):
        if isinstance(second, Key):
            return [GAEF(first.name,'=',second,lambda a,b:a==b)]
        return [GAEF(first.name,'=',self.represent(second,first.type),lambda a,b:a==b)]

    def NE(self,first,second=None):
        if first.type != 'id':
            return [GAEF(first.name,'!=',self.represent(second,first.type),lambda a,b:a!=b)]
        else:
            second = Key.from_path(first._tablename, long(second))
            return [GAEF(first.name,'!=',second,lambda a,b:a!=b)]

    def LT(self,first,second=None):
        if first.type != 'id':
            return [GAEF(first.name,'<',self.represent(second,first.type),lambda a,b:a<b)]
        else:
            second = Key.from_path(first._tablename, long(second))
            return [GAEF(first.name,'<',second,lambda a,b:a<b)]

    def LE(self,first,second=None):
        if first.type != 'id':
            return [GAEF(first.name,'<=',self.represent(second,first.type),lambda a,b:a<=b)]
        else:
            second = Key.from_path(first._tablename, long(second))
            return [GAEF(first.name,'<=',second,lambda a,b:a<=b)]

    def GT(self,first,second=None):
        if first.type != 'id' or second==0 or second == '0':
            return [GAEF(first.name,'>',self.represent(second,first.type),lambda a,b:a>b)]
        else:
            second = Key.from_path(first._tablename, long(second))
            return [GAEF(first.name,'>',second,lambda a,b:a>b)]

    def GE(self,first,second=None):
        if first.type != 'id':
            return [GAEF(first.name,'>=',self.represent(second,first.type),lambda a,b:a>=b)]
        else:
            second = Key.from_path(first._tablename, long(second))
            return [GAEF(first.name,'>=',second,lambda a,b:a>=b)]

    def INVERT(self,first):
        return '-%s' % first.name

    def COMMA(self,first,second):
        return '%s, %s' % (self.expand(first),self.expand(second))

    def BELONGS(self,first,second=None):
        if not isinstance(second,(list, tuple)):
            raise SyntaxError, "Not supported"
        if first.type != 'id':
            return [GAEF(first.name,'in',self.represent(second,first.type),lambda a,b:a in b)]
        else:
            second = [Key.from_path(first._tablename, i) for i in second]
            return [GAEF(first.name,'in',second,lambda a,b:a in b)]

    def CONTAINS(self,first,second):
        if not first.type.startswith('list:'):
            raise SyntaxError, "Not supported"
        return [GAEF(first.name,'=',self.expand(second,first.type[5:]),lambda a,b:a in b)]

    def NOT(self,first):
        nops = { self.EQ: self.NE,
                 self.NE: self.EQ,
                 self.LT: self.GE,
                 self.GT: self.LE,
                 self.LE: self.GT,
                 self.GE: self.LT}
        if not isinstance(first,Query):
            raise SyntaxError, "Not suported"
        nop = nops.get(first.op,None)
        if not nop:
            raise SyntaxError, "Not suported %s" % first.op.__name__
        first.op = nop
        return self.expand(first)

    def truncate(self,table,mode):
        self.db(table._id > 0).delete()

    def select_raw(self,query,fields=[],attributes={}):
        new_fields = []
        for item in fields:
            if isinstance(item,SQLALL):
                new_fields += item.table
            else:
                new_fields.append(item)
        fields = new_fields
        if query:
            tablename = self.get_table(query)
        elif fields:
            tablename = fields[0].tablename
            query = fields[0].table._id>0
        else:
            raise SyntaxError, "Unable to determine a tablename"
        query = self.filter_tenant(query,[tablename])
        tableobj = self.db[tablename]._tableobj
        items = tableobj.all()
        filters = self.expand(query)
        for filter in filters:
            if filter.name=='__key__' and filter.op=='>' and filter.value==0:
                continue
            elif filter.name=='__key__' and filter.op=='=':
                if filter.value==0:
                    items = []
                elif isinstance(filter.value, Key):
                    item = tableobj.get(filter.value)
                    items = (item and [item]) or []
                else:
                    item = tableobj.get_by_id(filter.value)
                    items = (item and [item]) or []
            elif isinstance(items,list): # i.e. there is a single record!
                items = [i for i in items if filter.apply(getattr(item,filter.name),
                                                          filter.value)]
            else:
                if filter.name=='__key__': items.order('__key__')
                items = items.filter('%s %s' % (filter.name,filter.op),filter.value)
        if not isinstance(items,list):
            if attributes.get('left', None):
                raise SyntaxError, 'Set: no left join in appengine'
            if attributes.get('groupby', None):
                raise SyntaxError, 'Set: no groupby in appengine'
            orderby = attributes.get('orderby', False)
            if orderby:
                ### THIS REALLY NEEDS IMPROVEMENT !!!
                if isinstance(orderby, (list, tuple)):
                    orderby = xorify(orderby)
                if isinstance(orderby,Expression):
                    orderby = self.expand(orderby)
                orders = orderby.split(', ')
                for order in orders:
                    order={'-id':'-__key__','id':'__key__'}.get(order,order)
                    items = items.order(order)
            if attributes.get('limitby', None):
                (lmin, lmax) = attributes['limitby']
                (limit, offset) = (lmax - lmin, lmin)
                items = items.fetch(limit, offset=offset)
        fields = self.db[tablename].fields
        return (items, tablename, fields)

    def select(self,query,fields,attributes):
        (items, tablename, fields) = self.select_raw(query,fields,attributes)
        # self.db['_lastsql'] = self._select(query,fields,attributes)
        rows = [
            [t=='id' and int(item.key().id()) or getattr(item, t) for t in fields]
            for item in items]
        colnames = ['%s.%s' % (tablename, t) for t in fields]
        return self.parse(rows, colnames, False)


    def count(self,query,distinct=None):
        if distinct:
            raise RuntimeError, "COUNT DISTINCT not supported"
        (items, tablename, fields) = self.select_raw(query)
        # self.db['_lastsql'] = self._count(query)
        try:
            return len(items)
        except TypeError:
            return items.count(limit=None)

    def delete(self,tablename, query):
        """
        This function was changed on 2010-05-04 because according to
        http://code.google.com/p/googleappengine/issues/detail?id=3119
        GAE no longer support deleting more than 1000 records.
        """
        # self.db['_lastsql'] = self._delete(tablename,query)
        (items, tablename, fields) = self.select_raw(query)
        # items can be one item or a query
        if not isinstance(items,list):
            counter = items.count(limit=None)
            leftitems = items.fetch(1000)
            while len(leftitems):
                gae.delete(leftitems)
                leftitems = items.fetch(1000)
        else:
            counter = len(items)
            gae.delete(items)
        return counter

    def update(self,tablename,query,update_fields):
        # self.db['_lastsql'] = self._update(tablename,query,update_fields)
        (items, tablename, fields) = self.select_raw(query)
        counter = 0
        for item in items:
            for field, value in update_fields:
                setattr(item, field.name, self.represent(value,field.type))
            item.put()
            counter += 1
        logger.info(str(counter))
        return counter

    def insert(self,table,fields):
        dfields=dict((f.name,self.represent(v,f.type)) for f,v in fields)
        # table._db['_lastsql'] = self._insert(table,fields)
        tmp = table._tableobj(**dfields)
        tmp.put()
        rid = Reference(tmp.key().id())
        (rid._table, rid._record) = (table, None)
        return rid

    def bulk_insert(self,table,items):
        parsed_items = []
        for item in items:
            dfields=dict((f.name,self.represent(v,f.type)) for f,v in item)
            parsed_items.append(table._tableobj(**dfields))
        gae.put(parsed_items)
        return True

def uuid2int(uuidv):
    return uuid.UUID(uuidv).int

def int2uuid(n):
    return str(uuid.UUID(int=n))

class CouchDBAdapter(NoSQLAdapter):
    uploads_in_blob = True
    types = {
                'boolean': bool,
                'string': str,
                'text': str,
                'password': str,
                'blob': str,
                'upload': str,
                'integer': long,
                'double': float,
                'date': datetime.date,
                'time': datetime.time,
                'datetime': datetime.datetime,
                'id': long,
                'reference': long,
                'list:string': list,
                'list:integer': list,
                'list:reference': list,
        }

    def file_exists(self, filename): pass
    def file_open(self, filename, mode='rb', lock=True): pass
    def file_close(self, fileobj, unlock=True): pass

    def expand(self,expression,field_type=None):
        if isinstance(expression,Field):
            if expression.type=='id':
                return "%s._id" % expression.tablename
        return BaseAdapter.expand(self,expression,field_type)

    def AND(self,first,second):
        return '(%s && %s)' % (self.expand(first),self.expand(second))

    def OR(self,first,second):
        return '(%s || %s)' % (self.expand(first),self.expand(second))

    def EQ(self,first,second):
        if second is None:
            return '(%s == null)' % self.expand(first)
        return '(%s == %s)' % (self.expand(first),self.expand(second,first.type))

    def NE(self,first,second):
        if second is None:
            return '(%s != null)' % self.expand(first)
        return '(%s != %s)' % (self.expand(first),self.expand(second,first.type))

    def COMMA(self,first,second):
        return '%s + %s' % (self.expand(first),self.expand(second))

    def represent(self, obj, fieldtype):
        value = NoSQLAdapter.represent(self, obj, fieldtype)
        if fieldtype=='id':
            return repr(str(int(value)))
        return repr(not isinstance(value,unicode) and value or value.encode('utf8'))

    def __init__(self,db,uri='couchdb://127.0.0.1:5984',
                 pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.uri = uri
        self.dbengine = 'couchdb'
        self.folder = folder
        db['_lastsql'] = ''
        self.db_codec = 'UTF-8'
        self.pool_size = pool_size

        url='http://'+uri[10:]
        def connect(url=url,driver_args=driver_args):
            return couchdb.Server(url,**driver_args)
        self.pool_connection(connect)

    def create_table(self, table, migrate=True, fake_migrate=False, polymodel=None):
        if migrate:
            try:
                self.connection.create(table._tablename)
            except:
                pass

    def insert(self,table,fields):
        id = uuid2int(web2py_uuid())
        ctable = self.connection[table._tablename]
        values = dict((k.name,NoSQLAdapter.represent(self,v,k.type)) for k,v in fields)
        values['_id'] = str(id)
        ctable.save(values)
        return id

    def _select(self,query,fields,attributes):
        if not isinstance(query,Query):
            raise SyntaxError, "Not Supported"
        for key in set(attributes.keys())-set(('orderby','groupby','limitby',
                                               'required','cache','left',
                                               'distinct','having')):
            raise SyntaxError, 'invalid select attribute: %s' % key
        new_fields=[]
        for item in fields:
            if isinstance(item,SQLALL):
                new_fields += item.table
            else:
                new_fields.append(item)
        def uid(fd):
            return fd=='id' and '_id' or fd
        def get(row,fd):
            return fd=='id' and int(row['_id']) or row.get(fd,None)
        fields = new_fields
        tablename = self.get_table(query)
        fieldnames = [f.name for f in (fields or self.db[tablename])]
        colnames = ['%s.%s' % (tablename,k) for k in fieldnames]
        fields = ','.join(['%s.%s' % (tablename,uid(f)) for f in fieldnames])
        fn="function(%(t)s){if(%(query)s)emit(%(order)s,[%(fields)s]);}" %\
            dict(t=tablename,
                 query=self.expand(query),
                 order='%s._id' % tablename,
                 fields=fields)
        return fn, colnames

    def select(self,query,fields,attributes):
        if not isinstance(query,Query):
            raise SyntaxError, "Not Supported"
        fn, colnames = self._select(query,fields,attributes)
        tablename = colnames[0].split('.')[0]
        ctable = self.connection[tablename]
        rows = [cols['value'] for cols in ctable.query(fn)]
        return self.parse(rows, colnames, False)

    def delete(self,tablename,query):
        if not isinstance(query,Query):
            raise SyntaxError, "Not Supported"
        if query.first.type=='id' and query.op==self.EQ:
            id = query.second
            tablename = query.first.tablename
            assert(tablename == query.first.tablename)
            ctable = self.connection[tablename]
            try:
                del ctable[str(id)]
                return 1
            except couchdb.http.ResourceNotFound:
                return 0
        else:
            tablename = self.get_table(query)
            rows = self.select(query,[self.db[tablename]._id],{})
            ctable = self.connection[tablename]
            for row in rows:
                del ctable[str(row.id)]
            return len(rows)

    def update(self,tablename,query,fields):
        if not isinstance(query,Query):
            raise SyntaxError, "Not Supported"
        if query.first.type=='id' and query.op==self.EQ:
            id = query.second
            tablename = query.first.tablename
            ctable = self.connection[tablename]
            try:
                doc = ctable[str(id)]
                for key,value in fields:
                    doc[key.name] = NoSQLAdapter.represent(self,value,self.db[tablename][key.name].type)
                ctable.save(doc)
                return 1
            except couchdb.http.ResourceNotFound:
                return 0
        else:
            tablename = self.get_table(query)
            rows = self.select(query,[self.db[tablename]._id],{})
            ctable = self.connection[tablename]
            table = self.db[tablename]
            for row in rows:
                doc = ctable[str(row.id)]
                for key,value in fields:
                    doc[key.name] = NoSQLAdapter.represent(self,value,table[key.name].type)
                ctable.save(doc)
            return len(rows)

    def count(self,query,distinct=None):
        if distinct:
            raise RuntimeError, "COUNT DISTINCT not supported"
        if not isinstance(query,Query):
            raise SyntaxError, "Not Supported"
        tablename = self.get_table(query)
        rows = self.select(query,[self.db[tablename]._id],{})
        return len(rows)

def cleanup(text):
    """
    validates that the given text is clean: only contains [0-9a-zA-Z_]
    """

    if re.compile('[^0-9a-zA-Z_]').findall(text):
        raise SyntaxError, \
            'only [0-9a-zA-Z_] allowed in table and field names, received %s' \
            % text
    return text


class MongoDBAdapter(NoSQLAdapter):
    uploads_in_blob = True
    types = {
                'boolean': bool,
                'string': str,
                'text': str,
                'password': str,
                'blob': str,
                'upload': str,
                'integer': long,
                'double': float,
                'date': datetime.date,
                'time': datetime.time,
                'datetime': datetime.datetime,
                'id': long,
                'reference': long,
                'list:string': list,
                'list:integer': list,
                'list:reference': list,
        }

    def __init__(self,db,uri='mongodb://127.0.0.1:5984/db',
                 pool_size=0,folder=None,db_codec ='UTF-8',
                 credential_decoder=lambda x:x, driver_args={},
                    adapter_args={}):
        self.db = db
        self.uri = uri
        self.dbengine = 'mongodb'
        self.folder = folder
        db['_lastsql'] = ''
        self.db_codec = 'UTF-8'
        self.pool_size = pool_size

        m = re.compile('^(?P<host>[^\:/]+)(\:(?P<port>[0-9]+))?/(?P<db>.+)$').match(self._uri[10:])
        if not m:
            raise SyntaxError, "Invalid URI string in DAL: %s" % self._uri
        host = m.group('host')
        if not host:
            raise SyntaxError, 'mongodb: host name required'
        dbname = m.group('db')
        if not dbname:
            raise SyntaxError, 'mongodb: db name required'
        port = m.group('port') or 27017
        driver_args.update(dict(host=host,port=port))
        def connect(dbname=dbname,driver_args=driver_args):
            return pymongo.Connection(**driver_args)[dbname]
        self.pool_connection(connect)

    def insert(self,table,fields):
        ctable = self.connection[table._tablename]
        values = dict((k,self.represent(v,table[k].type)) for k,v in fields)
        ctable.insert(values)
        return uuid2int(id)


    def count(self,query):
        raise RuntimeError, "Not implemented"

    def select(self,query,fields,attributes):
        raise RuntimeError, "Not implemented"

    def delete(self,tablename, query):
        raise RuntimeError, "Not implemented"

    def update(self,tablename,query,fields):
        raise RuntimeError, "Not implemented"


########################################################################
# end of adapters
########################################################################

ADAPTERS = {
    'sqlite': SQLiteAdapter,
    'sqlite:memory': SQLiteAdapter,
    'mysql': MySQLAdapter,
    'postgres': PostgreSQLAdapter,
    'oracle': OracleAdapter,
    'mssql': MSSQLAdapter,
    'mssql2': MSSQL2Adapter,
    'db2': DB2Adapter,
    'teradata': TeradataAdapter,
    'informix': InformixAdapter,
    'firebird': FireBirdAdapter,
    'firebird_embedded': FireBirdAdapter,
    'ingres': IngresAdapter,
    'ingresu': IngresUnicodeAdapter,
    'sapdb': SAPDBAdapter,
    'cubrid': CubridAdapter,
    'jdbc:sqlite': JDBCSQLiteAdapter,
    'jdbc:sqlite:memory': JDBCSQLiteAdapter,
    'jdbc:postgres': JDBCPostgreSQLAdapter,
    'gae': GoogleDatastoreAdapter, # discouraged, for backward compatibility
    'google:datastore': GoogleDatastoreAdapter,
    'google:sql': GoogleSQLAdapter,
    'couchdb': CouchDBAdapter,
    'mongodb': MongoDBAdapter,
}


def sqlhtml_validators(field):
    """
    Field type validation, using web2py's validators mechanism.

    makes sure the content of a field is in line with the declared
    fieldtype
    """
    if not have_validators:
        return []
    field_type, field_length = field.type, field.length
    if isinstance(field_type, SQLCustomType):
        if hasattr(field_type, 'validator'):
            return field_type.validator
        else:
            field_type = field_type.type
    elif not isinstance(field_type,str):
        return []
    requires=[]
    def ff(r,id):
        row=r(id)
        if not row:
            return id
        elif hasattr(r, '_format') and isinstance(r._format,str):
            return r._format % row
        elif hasattr(r, '_format') and callable(r._format):
            return r._format(row)
        else:
            return id
    if field_type == 'string':
        requires.append(validators.IS_LENGTH(field_length))
    elif field_type == 'text':
        requires.append(validators.IS_LENGTH(field_length))
    elif field_type == 'password':
        requires.append(validators.IS_LENGTH(field_length))
    elif field_type == 'double':
        requires.append(validators.IS_FLOAT_IN_RANGE(-1e100, 1e100))
    elif field_type == 'integer':
        requires.append(validators.IS_INT_IN_RANGE(-1e100, 1e100))
    elif field_type.startswith('decimal'):
        requires.append(validators.IS_DECIMAL_IN_RANGE(-10**10, 10**10))
    elif field_type == 'date':
        requires.append(validators.IS_DATE())
    elif field_type == 'time':
        requires.append(validators.IS_TIME())
    elif field_type == 'datetime':
        requires.append(validators.IS_DATETIME())
    elif field.db and field_type.startswith('reference') and \
            field_type.find('.') < 0 and \
            field_type[10:] in field.db.tables:
        referenced = field.db[field_type[10:]]
        def repr_ref(id, r=referenced, f=ff): return f(r, id)
        field.represent = field.represent or repr_ref
        if hasattr(referenced, '_format') and referenced._format:
            requires = validators.IS_IN_DB(field.db,referenced._id,
                                           referenced._format)
            if field.unique:
                requires._and = validators.IS_NOT_IN_DB(field.db,field)
            if field.tablename == field_type[10:]:
                return validators.IS_EMPTY_OR(requires)
            return requires
    elif field.db and field_type.startswith('list:reference') and \
            field_type.find('.') < 0 and \
            field_type[15:] in field.db.tables:
        referenced = field.db[field_type[15:]]
        def list_ref_repr(ids, r=referenced, f=ff):
            if not ids:
                return None
            refs = r._db(r._id.belongs(ids)).select(r._id)
            return (refs and ', '.join(str(f(r,ref.id)) for ref in refs) or '')
        field.represent = field.represent or list_ref_repr
        if hasattr(referenced, '_format') and referenced._format:
            requires = validators.IS_IN_DB(field.db,referenced._id,
                                           referenced._format,multiple=True)
        else:
            requires = validators.IS_IN_DB(field.db,referenced._id,
                                           multiple=True)
        if field.unique:
            requires._and = validators.IS_NOT_IN_DB(field.db,field)
        return requires
    elif field_type.startswith('list:'):
        def repr_list(values): return', '.join(str(v) for v in (values or []))
        field.represent = field.represent or repr_list
    if field.unique:
        requires.insert(0,validators.IS_NOT_IN_DB(field.db,field))
    sff = ['in', 'do', 'da', 'ti', 'de', 'bo']
    if field.notnull and not field_type[:2] in sff:
        requires.insert(0, validators.IS_NOT_EMPTY())
    elif not field.notnull and field_type[:2] in sff and requires:
        requires[-1] = validators.IS_EMPTY_OR(requires[-1])
    return requires


def bar_escape(item):
    return str(item).replace('|', '||')

def bar_encode(items):
    return '|%s|' % '|'.join(bar_escape(item) for item in items if str(item).strip())

def bar_decode_integer(value):
    return [int(x) for x in value.split('|') if x.strip()]

def bar_decode_string(value):
    return [x.replace('||', '|') for x in string_unpack.split(value[1:-1]) if x.strip()]


class Row(dict):

    """
    a dictionary that lets you do d['a'] as well as d.a
    this is only used to store a Row
    """

    def __getitem__(self, key):
        key=str(key)
        if key in self.get('_extra',{}):
            return self._extra[key]
        return dict.__getitem__(self, key)

    def __call__(self,key):
        return self.__getitem__(key)

    def __setitem__(self, key, value):
        dict.__setitem__(self, str(key), value)

    def __getattr__(self, key):
        return self[key]

    def __setattr__(self, key, value):
        self[key] = value

    def __repr__(self):
        return '<Row ' + dict.__repr__(self) + '>'

    def __int__(self):
        return dict.__getitem__(self,'id')

    def __eq__(self,other):
        try:
            return self.as_dict() == other.as_dict()
        except AttributeError:
            return False

    def __ne__(self,other):
        return not (self == other)

    def __copy__(self):
        return Row(dict(self))

    def as_dict(self,datetime_to_str=False):
        SERIALIZABLE_TYPES = (str,unicode,int,long,float,bool,list)
        d = dict(self)
        for k in copy.copy(d.keys()):
            v=d[k]
            if d[k] is None:
                continue
            elif isinstance(v,Row):
                d[k]=v.as_dict()
            elif isinstance(v,Reference):
                d[k]=int(v)
            elif isinstance(v,decimal.Decimal):
                d[k]=float(v)
            elif isinstance(v, (datetime.date, datetime.datetime, datetime.time)):
                if datetime_to_str:
                    d[k] = v.isoformat().replace('T',' ')[:19]
            elif not isinstance(v,SERIALIZABLE_TYPES):
                del d[k]
        return d


def Row_unpickler(data):
    return Row(cPickle.loads(data))

def Row_pickler(data):
    return Row_unpickler, (cPickle.dumps(data.as_dict(datetime_to_str=False)),)

copy_reg.pickle(Row, Row_pickler, Row_unpickler)


################################################################################
# Everything below should be independent on the specifics of the
# database and should for RDBMs and some NoSQL databases
################################################################################

class SQLCallableList(list):
    def __call__(self):
        return copy.copy(self)


class DAL(dict):

    """
    an instance of this class represents a database connection

    Example::

       db = DAL('sqlite://test.db')
       db.define_table('tablename', Field('fieldname1'),
                                    Field('fieldname2'))
    """

    @staticmethod
    def set_folder(folder):
        """
        # ## this allows gluon to set a folder for this thread
        # ## <<<<<<<<< Should go away as new DAL replaces old sql.py
        """
        BaseAdapter.set_folder(folder)

    @staticmethod
    def distributed_transaction_begin(*instances):
        if not instances:
            return
        thread_key = '%s.%s' % (socket.gethostname(), threading.currentThread())
        keys = ['%s.%i' % (thread_key, i) for (i,db) in instances]
        instances = enumerate(instances)
        for (i, db) in instances:
            if not db._adapter.support_distributed_transaction():
                raise SyntaxError, \
                    'distributed transaction not suported by %s' % db._dbname
        for (i, db) in instances:
            db._adapter.distributed_transaction_begin(keys[i])

    @staticmethod
    def distributed_transaction_commit(*instances):
        if not instances:
            return
        instances = enumerate(instances)
        thread_key = '%s.%s' % (socket.gethostname(), threading.currentThread())
        keys = ['%s.%i' % (thread_key, i) for (i,db) in instances]
        for (i, db) in instances:
            if not db._adapter.support_distributed_transaction():
                raise SyntaxError, \
                    'distributed transaction not suported by %s' % db._dbanme
        try:
            for (i, db) in instances:
                db._adapter.prepare(keys[i])
        except:
            for (i, db) in instances:
                db._adapter.rollback_prepared(keys[i])
            raise RuntimeError, 'failure to commit distributed transaction'
        else:
            for (i, db) in instances:
                db._adapter.commit_prepared(keys[i])
        return


    def __init__(self, uri='sqlite://dummy.db', pool_size=0, folder=None,
                 db_codec='UTF-8', check_reserved=None,
                 migrate=True, fake_migrate=False,
                 migrate_enabled=True, fake_migrate_all=False,
                 decode_credentials=False, driver_args=None,
                 adapter_args={}, attempts=5, auto_import=False):
        """
        Creates a new Database Abstraction Layer instance.

        Keyword arguments:

        :uri: string that contains information for connecting to a database.
               (default: 'sqlite://dummy.db')
        :pool_size: How many open connections to make to the database object.
        :folder: <please update me>
        :db_codec: string encoding of the database (default: 'UTF-8')
        :check_reserved: list of adapters to check tablenames and column names
                         against sql reserved keywords. (Default None)

        * 'common' List of sql keywords that are common to all database types
                such as "SELECT, INSERT". (recommended)
        * 'all' Checks against all known SQL keywords. (not recommended)
                <adaptername> Checks against the specific adapters list of keywords
                (recommended)
        * '<adaptername>_nonreserved' Checks against the specific adapters
                list of nonreserved keywords. (if available)
        :migrate (defaults to True) sets default migrate behavior for all tables
        :fake_migrate (defaults to False) sets default fake_migrate behavior for all tables
        :migrate_enabled (defaults to True). If set to False disables ALL migrations
        :fake_migrate_all (defaults to False). If sets to True fake migrates ALL tables
        :attempts (defaults to 5). Number of times to attempt connecting
        """
        if not decode_credentials:
            credential_decoder = lambda cred: cred
        else:
            credential_decoder = lambda cred: urllib.unquote(cred)
        if folder:
            self.set_folder(folder)
        self._uri = uri
        self._pool_size = pool_size
        self._db_codec = db_codec
        self._lastsql = ''
        self._timings = []
        self._pending_references = {}
        self._request_tenant = 'request_tenant'
        self._common_fields = []
        if not str(attempts).isdigit() or attempts < 0:
            attempts = 5
        if uri:
            uris = isinstance(uri,(list,tuple)) and uri or [uri]
            error = ''
            connected = False
            for k in range(attempts):
                for uri in uris:
                    try:
                        if is_jdbc and not uri.startswith('jdbc:'):
                            uri = 'jdbc:'+uri
                        self._dbname = regex_dbname.match(uri).group()
                        if not self._dbname in ADAPTERS:
                            raise SyntaxError, "Error in URI '%s' or database not supported" % self._dbname
                        # notice that driver args or {} else driver_args defaults to {} global, not correct
                        args = (self,uri,pool_size,folder,db_codec,credential_decoder,driver_args or {}, adapter_args)
                        self._adapter = ADAPTERS[self._dbname](*args)
                        connected = True
                        break
                    except SyntaxError:
                        raise
                    except Exception, error:
                        sys.stderr.write('DEBUG_c: Exception %r' % ((Exception, error,),))
                if connected:
                    break
                else:
                    time.sleep(1)
            if not connected:
                raise RuntimeError, "Failure to connect, tried %d times:\n%s" % (attempts, error)
        else:
            args = (self,'None',0,folder,db_codec)
            self._adapter = BaseAdapter(*args)
            migrate = fake_migrate = False
        adapter = self._adapter
        self._uri_hash = hashlib.md5(adapter.uri).hexdigest()
        self.tables = SQLCallableList()
        self.check_reserved = check_reserved
        if self.check_reserved:
            from reserved_sql_keywords import ADAPTERS as RSK
            self.RSK = RSK
        self._migrate = migrate
        self._fake_migrate = fake_migrate
        self._migrate_enabled = migrate_enabled
        self._fake_migrate_all = fake_migrate_all
        if auto_import:
            self.import_table_definitions(adapter.folder)

    def import_table_definitions(self,path,migrate=False,fake_migrate=False):
        pattern = os.path.join(path,self._uri_hash+'_*.table')
        for filename in glob.glob(pattern):
            tfile = self._adapter.file_open(filename, 'r')
            try:
                sql_fields = cPickle.load(tfile)
                name = filename[len(pattern)-7:-6]
                mf = [(value['sortable'],Field(key,type=value['type'])) \
                          for key, value in sql_fields.items()]
                mf.sort(lambda a,b: cmp(a[0],b[0]))
                self.define_table(name,*[item[1] for item in mf],
                                  **dict(migrate=migrate,fake_migrate=fake_migrate))
            finally:
                self._adapter.file_close(tfile)

    def check_reserved_keyword(self, name):
        """
        Validates ``name`` against SQL keywords
        Uses self.check_reserve which is a list of
        operators to use.
        self.check_reserved
        ['common', 'postgres', 'mysql']
        self.check_reserved
        ['all']
        """
        for backend in self.check_reserved:
            if name.upper() in self.RSK[backend]:
                raise SyntaxError, 'invalid table/column name "%s" is a "%s" reserved SQL keyword' % (name, backend.upper())

    def __contains__(self, tablename):
        if self.has_key(tablename):
            return True
        else:
            return False

    def parse_as_rest(self,patterns,args,vars,query=None,nested_select=True):
        """
        EXAMPLE:

db.define_table('person',Field('name'),Field('info'))
db.define_table('pet',Field('person',db.person),Field('name'),Field('info'))

@request.restful()
def index():
    def GET(*kargs,**kvars):
        patterns = [
            "/persons[person]",
            "/{person.name.startswith}",
            "/{person.name}/:field",
            "/{person.name}/pets[pet.person]",
            "/{person.name}/pet[pet.person]/{pet.name}",
            "/{person.name}/pet[pet.person]/{pet.name}/:field"
            ]
        parser = db.parse_as_rest(patterns,kargs,kvars)
        if parser.status == 200:
            return dict(content=parser.response)
        else:
            raise HTTP(parser.status,parser.error)
    def POST(table_name,**kvars):
        if table_name == 'person':
            return db.person.validate_and_insert(**kvars)
        elif table_name == 'pet':
            return db.pet.validate_and_insert(**kvars)
        else:
            raise HTTP(400)
    return locals()
        """

        db = self
        re1 = re.compile('^{[^\.]+\.[^\.]+(\.(lt|gt|le|ge|eq|ne|contains|startswith|year|month|day|hour|minute|second))?(\.not)?}$')
        re2 = re.compile('^.+\[.+\]$')

        def auto_table(table,base='',depth=0):
            patterns = []
            for field in db[table].fields:
                if base:
                    tag = '%s/%s' % (base,field.replace('_','-'))
                else:
                    tag = '/%s/%s' % (table.replace('_','-'),field.replace('_','-'))
                f = db[table][field]
                if not f.readable: continue
                if f.type=='id' or 'slug' in field or f.type.startswith('reference'):
                    tag += '/{%s.%s}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                elif f.type.startswith('boolean'):
                    tag += '/{%s.%s}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                elif f.type.startswith('double') or f.type.startswith('integer'):
                    tag += '/{%s.%s.ge}/{%s.%s.lt}' % (table,field,table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                elif f.type.startswith('list:'):
                    tag += '/{%s.%s.contains}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                elif f.type in ('date','datetime'):
                    tag+= '/{%s.%s.year}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                    tag+='/{%s.%s.month}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                    tag+='/{%s.%s.day}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                if f.type in ('datetime','time'):
                    tag+= '/{%s.%s.hour}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                    tag+='/{%s.%s.minute}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                    tag+='/{%s.%s.second}' % (table,field)
                    patterns.append(tag)
                    patterns.append(tag+'/:field')
                if depth>0:
                    for rtable,rfield in db[table]._referenced_by:
                        tag+='/%s[%s.%s]' % (rtable,rtable,rfield)
                        patterns.append(tag)
                        patterns += auto_table(rtable,base=tag,depth=depth-1)
            return patterns

        if patterns=='auto':
            patterns=[]
            for table in db.tables:
                if not table.startswith('auth_'):
                    patterns += auto_table(table,base='',depth=1)
        else:
            i = 0
            while i<len(patterns):
                pattern = patterns[i]
                tokens = pattern.split('/')
                if tokens[-1].startswith(':auto') and re2.match(tokens[-1]):
                    new_patterns = auto_table(tokens[-1][tokens[-1].find('[')+1:-1],'/'.join(tokens[:-1]))
                    patterns = patterns[:i]+new_patterns+patterns[i+1:]
                    i += len(new_patterns)
                else:
                    i += 1
        if '/'.join(args) == 'patterns':
            return Row({'status':200,'pattern':'list',
                        'error':None,'response':patterns})
        for pattern in patterns:
            otable=table=None
            dbset=db(query)
            i=0
            tags = pattern[1:].split('/')
            # print pattern
            if len(tags)!=len(args):
                continue
            for tag in tags:
                # print i, tag, args[i]
                if re1.match(tag):
                    # print 're1:'+tag
                    tokens = tag[1:-1].split('.')
                    table, field = tokens[0], tokens[1]
                    if not otable or table == otable:
                        if len(tokens)==2 or tokens[2]=='eq':
                            query = db[table][field]==args[i]
                        elif tokens[2]=='ne':
                            query = db[table][field]!=args[i]
                        elif tokens[2]=='lt':
                            query = db[table][field]<args[i]
                        elif tokens[2]=='gt':
                            query = db[table][field]>args[i]
                        elif tokens[2]=='ge':
                            query = db[table][field]>=args[i]
                        elif tokens[2]=='le':
                            query = db[table][field]<=args[i]
                        elif tokens[2]=='year':
                            query = db[table][field].year()==args[i]
                        elif tokens[2]=='month':
                            query = db[table][field].month()==args[i]
                        elif tokens[2]=='day':
                            query = db[table][field].day()==args[i]
                        elif tokens[2]=='hour':
                            query = db[table][field].hour()==args[i]
                        elif tokens[2]=='minute':
                            query = db[table][field].minutes()==args[i]
                        elif tokens[2]=='second':
                            query = db[table][field].seconds()==args[i]
                        elif tokens[2]=='startswith':
                            query = db[table][field].startswith(args[i])
                        elif tokens[2]=='contains':
                            query = db[table][field].contains(args[i])
                        else:
                            raise RuntimeError, "invalid pattern: %s" % pattern
                        if len(tokens)==4 and tokens[3]=='not':
                            query = ~query
                        elif len(tokens)>=4:
                            raise RuntimeError, "invalid pattern: %s" % pattern
                        dbset=dbset(query)
                    else:
                        raise RuntimeError, "missing relation in pattern: %s" % pattern
                elif otable and re2.match(tag) and args[i]==tag[:tag.find('[')]:
                    # print 're2:'+tag
                    ref = tag[tag.find('[')+1:-1]
                    if '.' in ref:
                        table,field = ref.split('.')
                        # print table,field
                        if nested_select:
                            try:
                                dbset=db(db[table][field].belongs(dbset._select(db[otable]._id)))
                            except ValueError:
                                return Row({'status':400,'pattern':pattern,
                                            'error':'invalid path','response':None})
                        else:
                            items = [item.id for item in dbset.select(db[otable]._id)]
                            dbset=db(db[table][field].belongs(items))
                    else:
                        dbset=dbset(db[ref])
                elif tag==':field' and table:
                    # # print 're3:'+tag
                    field = args[i]
                    if not field in db[table]: break
                    try:
                        item =  dbset.select(db[table][field],limitby=(0,1)).first()
                    except ValueError:
                        return Row({'status':400,'pattern':pattern,
                                    'error':'invalid path','response':None})
                    if not item:
                        return Row({'status':404,'pattern':pattern,
                                    'error':'record not found','response':None})
                    else:
                        return Row({'status':200,'response':item[field],
                                    'pattern':pattern})
                elif tag != args[i]:
                    break
                otable = table
                i += 1
                if i==len(tags) and table:
                    otable,ofield = vars.get('order','%s.%s' % (table,field)).split('.',1)
                    try:
                        if otable[:1]=='~': orderby = ~db[otable[1:]][ofield]
                        else: orderby = db[otable][ofield]
                    except KeyError:
                        return Row({'status':400,'error':'invalid orderby','response':None})
                    fields = [field for field in db[table] if field.readable]
                    count = dbset.count()
                    try:
                        limits = (int(vars.get('min',0)),int(vars.get('max',1000)))
                        if limits[0]<0 or limits[1]<limits[0]: raise ValueError
                    except ValueError:
                        Row({'status':400,'error':'invalid limits','response':None})
                    if count > limits[1]-limits[0]:
                        Row({'status':400,'error':'too many records','response':None})
                    try:
                        response = dbset.select(limitby=limits,orderby=orderby,*fields)
                    except ValueError:
                        return Row({'status':400,'pattern':pattern,
                                    'error':'invalid path','response':None})
                    return Row({'status':200,'response':response,'pattern':pattern})
        return Row({'status':400,'error':'no matching pattern','response':None})


    def define_table(
        self,
        tablename,
        *fields,
        **args
        ):

        for key in args:
            if key not in [
                    'migrate',
                    'primarykey',
                    'fake_migrate',
                    'format',
                    'trigger_name',
                    'sequence_name',
                    'polymodel']:
                raise SyntaxError, 'invalid table "%s" attribute: %s' % (tablename, key)
        migrate = self._migrate_enabled and args.get('migrate',self._migrate)
        fake_migrate = self._fake_migrate_all or args.get('fake_migrate',self._fake_migrate)
        format = args.get('format',None)
        trigger_name = args.get('trigger_name', None)
        sequence_name = args.get('sequence_name', None)
        primarykey=args.get('primarykey',None)
        polymodel=args.get('polymodel',None)
        if not isinstance(tablename,str):
            raise SyntaxError, "missing table name"
        tablename = cleanup(tablename)
        lowertablename = tablename.lower()

        if tablename.startswith('_') or hasattr(self,lowertablename) or \
                regex_python_keywords.match(tablename):
            raise SyntaxError, 'invalid table name: %s' % tablename
        elif lowertablename in self.tables:
            raise SyntaxError, 'table already defined: %s' % tablename
        elif self.check_reserved:
            self.check_reserved_keyword(tablename)

        if self._common_fields:
            fields = [f for f in fields] + [f for f in self._common_fields]

        t = self[tablename] = Table(self, tablename, *fields,
                                    **dict(primarykey=primarykey,
                                    trigger_name=trigger_name,
                                    sequence_name=sequence_name))
        # db magic
        if self._uri in (None,'None'):
            return t

        t._create_references()

        if migrate or self._adapter.dbengine=='google:datastore':
            try:
                sql_locker.acquire()
                self._adapter.create_table(t,migrate=migrate,
                                           fake_migrate=fake_migrate,
                                           polymodel=polymodel)
            finally:
                sql_locker.release()
        else:
            t._dbt = None
        self.tables.append(tablename)
        t._format = format
        return t

    def __iter__(self):
        for tablename in self.tables:
            yield self[tablename]

    def __getitem__(self, key):
        return dict.__getitem__(self, str(key))

    def __setitem__(self, key, value):
        dict.__setitem__(self, str(key), value)

    def __getattr__(self, key):
        return self[key]

    def __setattr__(self, key, value):
        if key[:1]!='_' and key in self:
            raise SyntaxError, \
                'Object %s exists and cannot be redefined' % key
        self[key] = value

    def __repr__(self):
        return '<DAL ' + dict.__repr__(self) + '>'

    def __call__(self, query=None):
        if isinstance(query,Table):
            query = query._id>0
        elif isinstance(query,Field):
            query = query!=None
        return Set(self, query)

    def commit(self):
        self._adapter.commit()

    def rollback(self):
        self._adapter.rollback()

    def executesql(self, query, placeholders=None, as_dict=False):
        """
        placeholders is optional and will always be None when using DAL
        if using raw SQL with placeholders, placeholders may be
        a sequence of values to be substituted in
        or, *if supported by the DB driver*, a dictionary with keys
        matching named placeholders in your SQL.

        Added 2009-12-05 "as_dict" optional argument. Will always be
        None when using DAL. If using raw SQL can be set to True
        and the results cursor returned by the DB driver will be
        converted to a sequence of dictionaries keyed with the db
        field names. Tested with SQLite but should work with any database
        since the cursor.description used to get field names is part of the
        Python dbi 2.0 specs. Results returned with as_dict = True are
        the same as those returned when applying .to_list() to a DAL query.

        [{field1: value1, field2: value2}, {field1: value1b, field2: value2b}]

        --bmeredyk
        """
        if placeholders:
            self._adapter.execute(query, placeholders)
        else:
            self._adapter.execute(query)
        if as_dict:
            if not hasattr(self._adapter.cursor,'description'):
                raise RuntimeError, "database does not support executesql(...,as_dict=True)"
            # Non-DAL legacy db query, converts cursor results to dict.
            # sequence of 7-item sequences. each sequence tells about a column.
            # first item is always the field name according to Python Database API specs
            columns = self._adapter.cursor.description
            # reduce the column info down to just the field names
            fields = [f[0] for f in columns]
            # will hold our finished resultset in a list
            data = self._adapter.cursor.fetchall()
            # convert the list for each row into a dictionary so it's
            # easier to work with. row['field_name'] rather than row[0]
            return [dict(zip(fields,row)) for row in data]
        # see if any results returned from database
        try:
            return self._adapter.cursor.fetchall()
        except:
            return None

    def _update_referenced_by(self, other):
        for tablename in self.tables:
            by = self[tablename]._referenced_by
            by[:] = [item for item in by if not item[0] == other]

    def export_to_csv_file(self, ofile, *args, **kwargs):
        for table in self.tables:
            ofile.write('TABLE %s\r\n' % table)
            self(self[table]._id > 0).select().export_to_csv_file(ofile, *args, **kwargs)
            ofile.write('\r\n\r\n')
        ofile.write('END')

    def import_from_csv_file(self, ifile, id_map={}, null='<NULL>',
                             unique='uuid', *args, **kwargs):
        for line in ifile:
            line = line.strip()
            if not line:
                continue
            elif line == 'END':
                return
            elif not line.startswith('TABLE ') or not line[6:] in self.tables:
                raise SyntaxError, 'invalid file format'
            else:
                tablename = line[6:]
                self[tablename].import_from_csv_file(ifile, id_map, null,
                                                     unique, *args, **kwargs)


class SQLALL(object):
    """
    Helper class providing a comma-separated string having all the field names
    (prefixed by table name and '.')

    normally only called from within gluon.sql
    """

    def __init__(self, table):
        self.table = table

    def __str__(self):
        return ', '.join([str(field) for field in self.table])


class Reference(int):

    def __allocate(self):
        if not self._record:
            self._record = self._table[int(self)]
        if not self._record:
            raise RuntimeError, "Using a recursive select but encountered a broken reference: %s %d"%(self._table, int(self))

    def __getattr__(self, key):
        if key == 'id':
            return int(self)
        self.__allocate()
        return self._record.get(key, None)

    def __setattr__(self, key, value):
        if key.startswith('_'):
            int.__setattr__(self, key, value)
            return
        self.__allocate()
        self._record[key] =  value

    def __getitem__(self, key):
        if key == 'id':
            return int(self)
        self.__allocate()
        return self._record.get(key, None)

    def __setitem__(self,key,value):
        self.__allocate()
        self._record[key] = value


def Reference_unpickler(data):
    return marshal.loads(data)

def Reference_pickler(data):
    try:
        marshal_dump = marshal.dumps(int(data))
    except AttributeError:
        marshal_dump = 'i%s' % struct.pack('<i', int(data))
    return (Reference_unpickler, (marshal_dump,))

copy_reg.pickle(Reference, Reference_pickler, Reference_unpickler)


class Table(dict):

    """
    an instance of this class represents a database table

    Example::

        db = DAL(...)
        db.define_table('users', Field('name'))
        db.users.insert(name='me') # print db.users._insert(...) to see SQL
        db.users.drop()
    """

    def __init__(
        self,
        db,
        tablename,
        *fields,
        **args
        ):
        """
        Initializes the table and performs checking on the provided fields.

        Each table will have automatically an 'id'.

        If a field is of type Table, the fields (excluding 'id') from that table
        will be used instead.

        :raises SyntaxError: when a supplied field is of incorrect type.
        """
        self._tablename = tablename
        self._sequence_name = args.get('sequence_name',None) or \
            db and db._adapter.sequence_name(tablename)
        self._trigger_name = args.get('trigger_name',None) or \
            db and db._adapter.trigger_name(tablename)

        primarykey = args.get('primarykey', None)
        fieldnames,newfields=set(),[]
        if primarykey:
            if not isinstance(primarykey,list):
                raise SyntaxError, \
                    "primarykey must be a list of fields from table '%s'" \
                    % tablename
            self._primarykey = primarykey            
        elif not [f for f in fields if isinstance(f,Field) and f.type=='id']:
            field = Field('id', 'id')
            newfields.append(field)
            fieldnames.add('id')
            self._id = field
        for field in fields:
            if not isinstance(field, (Field, Table)):
                raise SyntaxError, \
                    'define_table argument is not a Field or Table: %s' % field
            elif isinstance(field, Field) and not field.name in fieldnames:
                if hasattr(field, '_db'):
                    field = copy.copy(field)
                newfields.append(field)
                fieldnames.add(field.name)
                if field.type=='id':
                    self._id = field
            elif isinstance(field, Table):
                table = field
                for field in table:
                    if not field.name in fieldnames and not field.type=='id':
                        newfields.append(copy.copy(field))
                        fieldnames.add(field.name)
            else:
                # let's ignore new fields with duplicated names!!!
                pass
        fields = newfields
        self._db = db
        tablename = tablename
        self.fields = SQLCallableList()
        self.virtualfields = []
        fields = list(fields)

        if db and self._db._adapter.uploads_in_blob==True:
            for field in fields:
                if isinstance(field, Field) and field.type == 'upload'\
                        and field.uploadfield is True:
                    tmp = field.uploadfield = '%s_blob' % field.name
                    fields.append(self._db.Field(tmp, 'blob', default=''))

        lower_fieldnames = set()
        reserved = dir(Table) + ['fields'] 
        for field in fields:
            if db and db.check_reserved:
                db.check_reserved_keyword(field.name)
            elif field.name in reserved:
                raise SyntaxError, "field name %s not allowed" % field.name

            if field.name.lower() in lower_fieldnames:
                raise SyntaxError, "duplicate field %s in table %s" \
                    % (field.name, tablename)
            else:
                lower_fieldnames.add(field.name.lower())

            self.fields.append(field.name)
            self[field.name] = field
            if field.type == 'id':
                self['id'] = field
            field.tablename = field._tablename = tablename
            field.table = field._table = self
            field.db = field._db = self._db
            if self._db and field.type!='text' and \
                    self._db._adapter.maxcharlength < field.length:
                field.length = self._db._adapter.maxcharlength
            if field.requires == DEFAULT:
                field.requires = sqlhtml_validators(field)
        self.ALL = SQLALL(self)

        if hasattr(self,'_primarykey'):
            for k in self._primarykey:
                if k not in self.fields:
                    raise SyntaxError, \
                        "primarykey must be a list of fields from table '%s " % tablename
                else:
                    self[k].notnull = True

    def _validate(self,**vars):
        errors = Row()
        for key,value in vars.items():
            value,error = self[key].validate(value)
            if error:
                errors[key] = error
        return errors

    def _create_references(self):
        pr = self._db._pending_references
        self._referenced_by = []
        for fieldname in self.fields:
            field=self[fieldname]
            if isinstance(field.type,str) and field.type[:10] == 'reference ':
                ref = field.type[10:].strip()
                if not ref.split():
                    raise SyntaxError, 'Table: reference to nothing: %s' %ref
                refs = ref.split('.')
                rtablename = refs[0]
                if not rtablename in self._db:
                    pr[rtablename] = pr.get(rtablename,[]) + [field]
                    continue
                rtable = self._db[rtablename]
                if len(refs)==2:
                    rfieldname = refs[1]
                    if not hasattr(rtable,'_primarykey'):
                        raise SyntaxError,\
                            'keyed tables can only reference other keyed tables (for now)'
                    if rfieldname not in rtable.fields:
                        raise SyntaxError,\
                            "invalid field '%s' for referenced table '%s' in table '%s'" \
                            % (rfieldname, rtablename, self._tablename)
                rtable._referenced_by.append((self._tablename, field.name))
        for referee in pr.get(self._tablename,[]):
            self._referenced_by.append((referee._tablename,referee.name))

    def _filter_fields(self, record, id=False):
        return dict([(k, v) for (k, v) in record.items() if k
                     in self.fields and (self[k].type!='id' or id)])

    def _build_query(self,key):
        """ for keyed table only """
        query = None
        for k,v in key.iteritems():
            if k in self._primarykey:
                if query:
                    query = query & (self[k] == v)
                else:
                    query = (self[k] == v)
            else:
                raise SyntaxError, \
                'Field %s is not part of the primary key of %s' % \
                (k,self._tablename)
        return query

    def __getitem__(self, key):
        if not key:
            return None
        elif isinstance(key, dict):
            """ for keyed table """
            query = self._build_query(key)
            rows = self._db(query).select()
            if rows:
                return rows[0]
            return None
        elif str(key).isdigit():
            return self._db(self._id == key).select(limitby=(0,1)).first()
        elif key:
            return dict.__getitem__(self, str(key))

    def __call__(self, key=DEFAULT, **kwargs):
        if key!=DEFAULT:
            if isinstance(key, Query):
                record = self._db(key).select(limitby=(0,1)).first()
            elif not str(key).isdigit():
                record = None
            else:
                record = self._db(self._id == key).select(limitby=(0,1)).first()
            if record:
                for k,v in kwargs.items():
                    if record[k]!=v: return None
            return record
        elif kwargs:
            query = reduce(lambda a,b:a&b,[self[k]==v for k,v in kwargs.items()])
            return self._db(query).select(limitby=(0,1)).first()
        else:
            return None

    def __setitem__(self, key, value):
        if isinstance(key, dict) and isinstance(value, dict):
            """ option for keyed table """
            if set(key.keys()) == set(self._primarykey):
                value = self._filter_fields(value)
                kv = {}
                kv.update(value)
                kv.update(key)
                if not self.insert(**kv):
                    query = self._build_query(key)
                    self._db(query).update(**self._filter_fields(value))
            else:
                raise SyntaxError,\
                    'key must have all fields from primary key: %s'%\
                    (self._primarykey)
        elif str(key).isdigit():
            if key == 0:
                self.insert(**self._filter_fields(value))
            elif not self._db(self._id == key)\
                    .update(**self._filter_fields(value)):
                raise SyntaxError, 'No such record: %s' % key
        else:
            if isinstance(key, dict):
                raise SyntaxError,\
                    'value must be a dictionary: %s' % value
            dict.__setitem__(self, str(key), value)

    def __delitem__(self, key):
        if isinstance(key, dict):
            query = self._build_query(key)
            if not self._db(query).delete():
                raise SyntaxError, 'No such record: %s' % key
        elif not str(key).isdigit() or not self._db(self._id == key).delete():
            raise SyntaxError, 'No such record: %s' % key

    def __getattr__(self, key):
        return self[key]

    def __setattr__(self, key, value):
        if key in self:
            raise SyntaxError, 'Object exists and cannot be redefined: %s' % key
        self[key] = value

    def __iter__(self):
        for fieldname in self.fields:
            yield self[fieldname]

    def __repr__(self):
        return '<Table ' + dict.__repr__(self) + '>'

    def __str__(self):
        if self.get('_ot', None):
            return '%s AS %s' % (self._ot, self._tablename)
        return self._tablename

    def _drop(self, mode = ''):
        return self._db._adapter._drop(self, mode)

    def drop(self, mode = ''):
        return self._db._adapter.drop(self,mode)

    def _listify(self,fields,update=False):
        new_fields = []
        new_fields_names = []
        for name in fields:
            if not name in self.fields:
                if name != 'id':
                    raise SyntaxError, 'Field %s does not belong to the table' % name
            else:
                new_fields.append((self[name],fields[name]))
                new_fields_names.append(name)
        for ofield in self:
            if not ofield.name in new_fields_names:
                if not update and ofield.default!=None:
                    new_fields.append((ofield,ofield.default))
                elif update and ofield.update!=None:
                    new_fields.append((ofield,ofield.update))
        for ofield in self:
            if not ofield.name in new_fields_names and ofield.compute:
                try:
                    new_fields.append((ofield,ofield.compute(Row(fields))))
                except KeyError:
                    pass
            if not update and ofield.required and not ofield.name in new_fields_names:
                raise SyntaxError,'Table: missing required field: %s' % ofield.name
        return new_fields

    def _insert(self, **fields):
        return self._db._adapter._insert(self,self._listify(fields))

    def insert(self, **fields):
        return self._db._adapter.insert(self,self._listify(fields))

    def validate_and_insert(self,**fields):
        response = Row()
        response.errors = self._validate(**fields)
        if not response.errors:
            response.id = self.insert(**fields)
        else:
            response.id = None
        return response

    def update_or_insert(self, key=DEFAULT, **values):
        if key==DEFAULT:
            record = self(**values)
        else:
            record = self(key)
        if record:
            record.update_record(**values)
            newid = None
        else:
            newid = self.insert(**values)
        return newid

    def bulk_insert(self, items):
        """
        here items is a list of dictionaries
        """
        items = [self._listify(item) for item in items]
        return self._db._adapter.bulk_insert(self,items)

    def _truncate(self, mode = None):
        return self._db._adapter._truncate(self, mode)

    def truncate(self, mode = None):
        return self._db._adapter.truncate(self, mode)

    def import_from_csv_file(
        self,
        csvfile,
        id_map=None,
        null='<NULL>',
        unique='uuid',
        *args, **kwargs
        ):
        """
        import records from csv file. Column headers must have same names as
        table fields. field 'id' is ignored. If column names read 'table.file'
        the 'table.' prefix is ignored.
        'unique' argument is a field which must be unique
        (typically a uuid field)
        """

        delimiter = kwargs.get('delimiter', ',')
        quotechar = kwargs.get('quotechar', '"')
        quoting = kwargs.get('quoting', csv.QUOTE_MINIMAL)

        reader = csv.reader(csvfile, delimiter=delimiter, quotechar=quotechar, quoting=quoting)
        colnames = None
        if isinstance(id_map, dict):
            if not self._tablename in id_map:
                id_map[self._tablename] = {}
            id_map_self = id_map[self._tablename]

        def fix(field, value, id_map):
            if value == null:
                value = None
            elif field.type=='blob':
                value = base64.b64decode(value)
            elif field.type=='double':
                if not value.strip():
                    value = None
                else:
                    value = float(value)
            elif field.type=='integer':
                if not value.strip():
                    value = None
                else:
                    value = int(value)
            elif field.type.startswith('list:string'):
                value = bar_decode_string(value)
            elif field.type.startswith('list:reference'):
                ref_table = field.type[10:].strip()
                value = [id_map[ref_table][int(v)] \
                             for v in bar_decode_string(value)]
            elif field.type.startswith('list:'):
                value = bar_decode_integer(value)
            elif id_map and field.type.startswith('reference'):
                try:
                    value = id_map[field.type[9:].strip()][value]
                except KeyError:
                    pass
            return (field.name, value)

        def is_id(colname):
            if colname in self:
                return self[colname].type == 'id'
            else:
                return False

        for line in reader:
            if not line:
                break
            if not colnames:
                colnames = [x.split('.',1)[-1] for x in line][:len(line)]
                cols, cid = [], []
                for i,colname in enumerate(colnames):
                    if is_id(colname):
                        cid = i
                    else:
                        cols.append(i)
                    if colname == unique:
                        unique_idx = i
            else:
                items = [fix(self[colnames[i]], line[i], id_map) \
                             for i in cols if colnames[i] in self.fields]
                # Validation. Check for duplicate of 'unique' &,
                # if present, update instead of insert.
                if not unique or unique not in colnames:
                    new_id = self.insert(**dict(items))
                else:
                    unique_value = line[unique_idx]
                    query = self._db[self][unique] == unique_value
                    record = self._db(query).select().first()
                    if record:
                        record.update_record(**dict(items))
                        new_id = record[self._id.name]
                    else:
                        new_id = self.insert(**dict(items))
                if id_map and cid != []:
                    id_map_self[line[cid]] = new_id

    def with_alias(self, alias):
        return self._db._adapter.alias(self,alias)

    def on(self, query):
        return Expression(self._db,self._db._adapter.ON,self,query)



class Expression(object):

    def __init__(
        self,
        db,
        op,
        first=None,
        second=None,
        type=None,
        ):

        self.db = db
        self.op = op
        self.first = first
        self.second = second
        ### self._tablename =  first._tablename ## CHECK
        if not type and first and hasattr(first,'type'):
            self.type = first.type
        else:
            self.type = type

    def sum(self):
        return Expression(self.db, self.db._adapter.AGGREGATE, self, 'SUM', self.type)

    def max(self):
        return Expression(self.db, self.db._adapter.AGGREGATE, self, 'MAX', self.type)

    def min(self):
        return Expression(self.db, self.db._adapter.AGGREGATE, self, 'MIN', self.type)

    def len(self):
        return Expression(self.db, self.db._adapter.AGGREGATE, self, 'LENGTH', 'integer')

    def lower(self):
        return Expression(self.db, self.db._adapter.LOWER, self, None, self.type)

    def upper(self):
        return Expression(self.db, self.db._adapter.UPPER, self, None, self.type)

    def year(self):
        return Expression(self.db, self.db._adapter.EXTRACT, self, 'year', 'integer')

    def month(self):
        return Expression(self.db, self.db._adapter.EXTRACT, self, 'month', 'integer')

    def day(self):
        return Expression(self.db, self.db._adapter.EXTRACT, self, 'day', 'integer')

    def hour(self):
        return Expression(self.db, self.db._adapter.EXTRACT, self, 'hour', 'integer')

    def minutes(self):
        return Expression(self.db, self.db._adapter.EXTRACT, self, 'minute', 'integer')

    def coalesce_zero(self):
            return Expression(self.db, self.db._adapter.COALESCE_ZERO, self, None, self.type)

    def seconds(self):
        return Expression(self.db, self.db._adapter.EXTRACT, self, 'second', 'integer')

    def __getslice__(self, start, stop):
        if start < 0:
            pos0 = '(%s - %d)' % (self.len(), abs(start) - 1)
        else:
            pos0 = start + 1

        if stop < 0:
            length = '(%s - %d - %s)' % (self.len(), abs(stop) - 1, pos0)
        elif stop == sys.maxint:
            length = self.len()
        else:
            length = '(%s - %s)' % (stop + 1, pos0)
        return Expression(self.db,self.db._adapter.SUBSTRING,
                          self, (pos0, length), self.type)

    def __getitem__(self, i):
        return self[i:i + 1]

    def __str__(self):
        return self.db._adapter.expand(self,self.type)

    def __or__(self, other):  # for use in sortby
        return Expression(self.db,self.db._adapter.COMMA,self,other,self.type)

    def __invert__(self):
        if hasattr(self,'_op') and self.op == self.db._adapter.INVERT:
            return self.first
        return Expression(self.db,self.db._adapter.INVERT,self,type=self.type)

    def __add__(self, other):
        return Expression(self.db,self.db._adapter.ADD,self,other,self.type)

    def __sub__(self, other):
        if self.type == 'integer':
            result_type = 'integer'
        elif self.type in ['date','time','datetime','double']:
            result_type = 'double'
        else:
            raise SyntaxError, "subtraction operation not supported for type"
        return Expression(self.db,self.db._adapter.SUB,self,other,
                          result_type)
    def __mul__(self, other):
        return Expression(self.db,self.db._adapter.MUL,self,other,self.type)

    def __div__(self, other):
        return Expression(self.db,self.db._adapter.DIV,self,other,self.type)

    def __mod__(self, other):
        return Expression(self.db,self.db._adapter.MOD,self,other,self.type)

    def __eq__(self, value):
        return Query(self.db, self.db._adapter.EQ, self, value)

    def __ne__(self, value):
        return Query(self.db, self.db._adapter.NE, self, value)

    def __lt__(self, value):
        return Query(self.db, self.db._adapter.LT, self, value)

    def __le__(self, value):
        return Query(self.db, self.db._adapter.LE, self, value)

    def __gt__(self, value):
        return Query(self.db, self.db._adapter.GT, self, value)

    def __ge__(self, value):
        return Query(self.db, self.db._adapter.GE, self, value)

    def like(self, value):
        return Query(self.db, self.db._adapter.LIKE, self, value)

    def belongs(self, value):
        return Query(self.db, self.db._adapter.BELONGS, self, value)

    def startswith(self, value):
        if not self.type in ('string', 'text'):
            raise SyntaxError, "startswith used with incompatible field type"
        return Query(self.db, self.db._adapter.STARTSWITH, self, value)

    def endswith(self, value):
        if not self.type in ('string', 'text'):
            raise SyntaxError, "endswith used with incompatible field type"
        return Query(self.db, self.db._adapter.ENDSWITH, self, value)

    def contains(self, value):
        if not self.type in ('string', 'text') and not self.type.startswith('list:'):
            raise SyntaxError, "contains used with incompatible field type"
        return Query(self.db, self.db._adapter.CONTAINS, self, value)

    def with_alias(self,alias):
        return Expression(self.db,self.db._adapter.AS,self,alias,self.type)

    # for use in both Query and sortby


class SQLCustomType(object):
    """
    allows defining of custom SQL types

    Example::

        decimal = SQLCustomType(
            type ='double',
            native ='integer',
            encoder =(lambda x: int(float(x) * 100)),
            decoder = (lambda x: Decimal("0.00") + Decimal(str(float(x)/100)) )
            )

        db.define_table(
            'example',
            Field('value', type=decimal)
            )

    :param type: the web2py type (default = 'string')
    :param native: the backend type
    :param encoder: how to encode the value to store it in the backend
    :param decoder: how to decode the value retrieved from the backend
    :param validator: what validators to use ( default = None, will use the
        default validator for type)
    """

    def __init__(
        self,
        type='string',
        native=None,
        encoder=None,
        decoder=None,
        validator=None,
        _class=None,
        ):

        self.type = type
        self.native = native
        self.encoder = encoder or (lambda x: x)
        self.decoder = decoder or (lambda x: x)
        self.validator = validator
        self._class = _class or type

    def startswith(self, dummy=None):
        return False

    def __getslice__(self, a=0, b=100):
        return None

    def __getitem__(self, i):
        return None

    def __str__(self):
        return self._class


class Field(Expression):

    """
    an instance of this class represents a database field

    example::

        a = Field(name, 'string', length=32, default=None, required=False,
            requires=IS_NOT_EMPTY(), ondelete='CASCADE',
            notnull=False, unique=False,
            uploadfield=True, widget=None, label=None, comment=None,
            uploadfield=True, # True means store on disk,
                              # 'a_field_name' means store in this field in db
                              # False means file content will be discarded.
            writable=True, readable=True, update=None, authorize=None,
            autodelete=False, represent=None, uploadfolder=None,
            uploadseparate=False # upload to separate directories by uuid_keys
                                 # first 2 character and tablename.fieldname
                                 # False - old behavior
                                 # True - put uploaded file in
                                 #   <uploaddir>/<tablename>.<fieldname>/uuid_key[:2]
                                 #        directory)

    to be used as argument of DAL.define_table

    allowed field types:
    string, boolean, integer, double, text, blob,
    date, time, datetime, upload, password

    strings must have a length of Adapter.maxcharlength by default (512 or 255 for mysql)
    fields should have a default or they will be required in SQLFORMs
    the requires argument is used to validate the field input in SQLFORMs

    """

    def __init__(
        self,
        fieldname,
        type='string',
        length=None,
        default=DEFAULT,
        required=False,
        requires=DEFAULT,
        ondelete='CASCADE',
        notnull=False,
        unique=False,
        uploadfield=True,
        widget=None,
        label=None,
        comment=None,
        writable=True,
        readable=True,
        update=None,
        authorize=None,
        autodelete=False,
        represent=None,
        uploadfolder=None,
        uploadseparate=False,
        compute=None,
        custom_store=None,
        custom_retrieve=None,
        custom_delete=None,
        ):
        self.db = None
        self.op = None
        self.first = None
        self.second = None
        if not isinstance(fieldname,str):
            raise SyntaxError, "missing field name"
        if fieldname.startswith(':'):
            fieldname,readable,writable=fieldname[1:],False,False
        elif fieldname.startswith('.'):
            fieldname,readable,writable=fieldname[1:],False,False
        if '=' in fieldname:
            fieldname,default = fieldname.split('=',1)
        self.name = fieldname = cleanup(fieldname)
        if hasattr(Table,fieldname) or fieldname[0] == '_' or \
                regex_python_keywords.match(fieldname):
            raise SyntaxError, 'Field: invalid field name: %s' % fieldname
        if isinstance(type, Table):
            type = 'reference ' + type._tablename
        self.type = type  # 'string', 'integer'
        self.length = (length is None) and MAXCHARLENGTH or length
        if default==DEFAULT:
            self.default = update or None
        else:
            self.default = default
        self.required = required  # is this field required
        self.ondelete = ondelete.upper()  # this is for reference fields only
        self.notnull = notnull
        self.unique = unique
        self.uploadfield = uploadfield
        self.uploadfolder = uploadfolder
        self.uploadseparate = uploadseparate
        self.widget = widget
        self.label = label or ' '.join(item.capitalize() for item in fieldname.split('_'))
        self.comment = comment
        self.writable = writable
        self.readable = readable
        self.update = update
        self.authorize = authorize
        self.autodelete = autodelete
        if not represent and type in ('list:integer','list:string'):
            represent=lambda x: ', '.join(str(y) for y in x or [])
        self.represent = represent
        self.compute = compute
        self.isattachment = True
        self.custom_store = custom_store
        self.custom_retrieve = custom_retrieve
        self.custom_delete = custom_delete
        if self.label is None:
            self.label = ' '.join([x.capitalize() for x in
                                  fieldname.split('_')])
        if requires is None:
            self.requires = []
        else:
            self.requires = requires

    def store(self, file, filename=None, path=None):
        if self.custom_store:
            return self.custom_store(file,filename,path)
        if not filename:
            filename = file.name
        filename = os.path.basename(filename.replace('/', os.sep)\
                                        .replace('\\', os.sep))
        m = re.compile('\.(?P<e>\w{1,5})$').search(filename)
        extension = m and m.group('e') or 'txt'
        uuid_key = web2py_uuid().replace('-', '')[-16:]
        encoded_filename = base64.b16encode(filename).lower()
        newfilename = '%s.%s.%s.%s' % \
            (self._tablename, self.name, uuid_key, encoded_filename)
        newfilename = newfilename[:200] + '.' + extension
        if isinstance(self.uploadfield,Field):
            blob_uploadfield_name = self.uploadfield.uploadfield
            keys={self.uploadfield.name: newfilename,
                  blob_uploadfield_name: file.read()}
            self.uploadfield.table.insert(**keys)
        elif self.uploadfield == True:
            if path:
                pass
            elif self.uploadfolder:
                path = self.uploadfolder
            elif self.db._adapter.folder:
                path = os.path.join(self.db._adapter.folder, '..', 'uploads')
            else:
                raise RuntimeError, "you must specify a Field(...,uploadfolder=...)"
            if self.uploadseparate:
                path = os.path.join(path,"%s.%s" % (self._tablename, self.name),uuid_key[:2])
            if not os.path.exists(path):
                os.makedirs(path)
            pathfilename = os.path.join(path, newfilename)
            dest_file = open(pathfilename, 'wb')
            try:
                shutil.copyfileobj(file, dest_file)
            finally:
                dest_file.close()
        return newfilename

    def retrieve(self, name, path=None):
        if self.custom_retrieve:
            return self.custom_retrieve(name, path)
        import http
        if self.authorize or isinstance(self.uploadfield, str):
            row = self.db(self == name).select().first()
            if not row:
                raise http.HTTP(404)
        if self.authorize and not self.authorize(row):
            raise http.HTTP(403)
        try:
            m = regex_content.match(name)
            if not m or not self.isattachment:
                raise TypeError, 'Can\'t retrieve %s' % name
            filename = base64.b16decode(m.group('name'), True)
            filename = regex_cleanup_fn.sub('_', filename)
        except (TypeError, AttributeError):
            filename = name
        if isinstance(self.uploadfield, str):  # ## if file is in DB
            return (filename, cStringIO.StringIO(row[self.uploadfield] or ''))
        elif isinstance(self.uploadfield,Field):
            blob_uploadfield_name = self.uploadfield.uploadfield
            query = self.uploadfield == name
            data = self.uploadfield.table(query)[blob_uploadfield_name]
            return (filename, cStringIO.StringIO(data))
        else:
            # ## if file is on filesystem
            if path:
                pass
            elif self.uploadfolder:
                path = self.uploadfolder
            else:
                path = os.path.join(self.db._adapter.folder, '..', 'uploads')
            if self.uploadseparate:
                t = m.group('table')
                f = m.group('field')
                u = m.group('uuidkey')
                path = os.path.join(path,"%s.%s" % (t,f),u[:2])
            return (filename, open(os.path.join(path, name), 'rb'))

    def formatter(self, value):
        if value is None or not self.requires:
            return value
        if not isinstance(self.requires, (list, tuple)):
            requires = [self.requires]
        elif isinstance(self.requires, tuple):
            requires = list(self.requires)
        else:
            requires = copy.copy(self.requires)
        requires.reverse()
        for item in requires:
            if hasattr(item, 'formatter'):
                value = item.formatter(value)
        return value

    def validate(self, value):
        if not self.requires:
            return (value, None)
        requires = self.requires
        if not isinstance(requires, (list, tuple)):
            requires = [requires]
        for validator in requires:
            (value, error) = validator(value)
            if error:
                return (value, error)
        return (value, None)

    def count(self):
        return Expression(self.db, self.db._adapter.AGGREGATE, self, 'COUNT', 'integer')

    def __nonzero__(self):
        return True

    def __str__(self):
        try:
            return '%s.%s' % (self.tablename, self.name)
        except:
            return '<no table>.%s' % self.name


class Query(object):

    """
    a query object necessary to define a set.
    it can be stored or can be passed to DAL.__call__() to obtain a Set

    Example::

        query = db.users.name=='Max'
        set = db(query)
        records = set.select()

    """

    def __init__(
        self,
        db,
        op,
        first=None,
        second=None,
        ):
        self.db = db
        self.op = op
        self.first = first
        self.second = second

    def __str__(self):
        return self.db._adapter.expand(self)

    def __and__(self, other):
        return Query(self.db,self.db._adapter.AND,self,other)

    def __or__(self, other):
        return Query(self.db,self.db._adapter.OR,self,other)

    def __invert__(self):
        if self.op==self.db._adapter.NOT:
            return self.first
        return Query(self.db,self.db._adapter.NOT,self)


regex_quotes = re.compile("'[^']*'")


def xorify(orderby):
    if not orderby:
        return None
    orderby2 = orderby[0]
    for item in orderby[1:]:
        orderby2 = orderby2 | item
    return orderby2


class Set(object):

    """
    a Set represents a set of records in the database,
    the records are identified by the query=Query(...) object.
    normally the Set is generated by DAL.__call__(Query(...))

    given a set, for example
       set = db(db.users.name=='Max')
    you can:
       set.update(db.users.name='Massimo')
       set.delete() # all elements in the set
       set.select(orderby=db.users.id, groupby=db.users.name, limitby=(0,10))
    and take subsets:
       subset = set(db.users.id<5)
    """

    def __init__(self, db, query):
        self.db = db
        self._db = db # for backward compatibility
        self.query = query

    def __call__(self, query):
        if isinstance(query,Table):
            query = query._id>0
        elif isinstance(query,Field):
            query = query!=None
        if self.query:
            return Set(self.db, self.query & query)
        else:
            return Set(self.db, query)

    def _count(self,distinct=None):
        return self.db._adapter._count(self.query,distinct)

    def _select(self, *fields, **attributes):
        return self.db._adapter._select(self.query,fields,attributes)

    def _delete(self):
        tablename=self.db._adapter.get_table(self.query)
        return self.db._adapter._delete(tablename,self.query)

    def _update(self, **update_fields):
        tablename = self.db._adapter.get_table(self.query)
        fields = self.db[tablename]._listify(update_fields,update=True)
        return self.db._adapter._update(tablename,self.query,fields)

    def isempty(self):
        return not self.select(limitby=(0,1))

    def count(self,distinct=None):
        return self.db._adapter.count(self.query,distinct)

    def select(self, *fields, **attributes):
        return self.db._adapter.select(self.query,fields,attributes)

    def delete(self):
        tablename=self.db._adapter.get_table(self.query)
        self.delete_uploaded_files()
        return self.db._adapter.delete(tablename,self.query)

    def update(self, **update_fields):
        tablename = self.db._adapter.get_table(self.query)
        fields = self.db[tablename]._listify(update_fields,update=True)
        if not fields:
            raise SyntaxError, "No fields to update"
        self.delete_uploaded_files(update_fields)
        return self.db._adapter.update(tablename,self.query,fields)
    
    def validate_and_update(self, **update_fields):
        tablename = self.db._adapter.get_table(self.query)
        response = Row()
        response.errors = self.db[tablename]._validate(**update_fields) 
        fields = self.db[tablename]._listify(update_fields,update=True)
        if not fields:
            raise SyntaxError, "No fields to update"
        self.delete_uploaded_files(update_fields)
        if not response.errors:
            response.updated = self.db._adapter.update(tablename,self.query,fields)
        else:
            response.updated = None
        return response

    def delete_uploaded_files(self, upload_fields=None):
        table = self.db[self.db._adapter.tables(self.query)[0]]
        # ## mind uploadfield==True means file is not in DB
        if upload_fields:
            fields = upload_fields.keys()
        else:
            fields = table.fields
        fields = [f for f in fields if table[f].type == 'upload'
                   and table[f].uploadfield == True
                   and table[f].autodelete]
        if not fields:
            return
        for record in self.select(*[table[f] for f in fields]):
            for fieldname in fields:
                field = table[fieldname]
                oldname = record.get(fieldname, None)
                if not oldname:
                    continue
                if upload_fields and oldname == upload_fields[fieldname]:
                    continue
                if field.custom_delete:
                    field.custom_delete(oldname)
                else:
                    uploadfolder = field.uploadfolder
                    if not uploadfolder:
                        uploadfolder = os.path.join(self.db._adapter.folder, '..', 'uploads')
                    if field.uploadseparate:
                        items = oldname.split('.')
                        uploadfolder = os.path.join(uploadfolder,
                                                    "%s.%s" % (items[0], items[1]),
                                                    items[2][:2])                
                    oldpath = os.path.join(uploadfolder, oldname)
                    if os.path.exists(oldpath):
                        os.unlink(oldpath)

def update_record(pack, a={}):
    (colset, table, id) = pack
    b = a or dict(colset)
    c = dict([(k,v) for (k,v) in b.items() if k in table.fields and table[k].type!='id'])
    table._db(table._id==id).update(**c)
    for (k, v) in c.items():
        colset[k] = v


class Rows(object):

    """
    A wrapper for the return value of a select. It basically represents a table.
    It has an iterator and each row is represented as a dictionary.
    """

    # ## TODO: this class still needs some work to care for ID/OID

    def __init__(
        self,
        db=None,
        records=[],
        colnames=[],
        compact=True,
        rawrows=None
        ):
        self.db = db
        self.records = records
        self.colnames = colnames
        self.compact = compact
        self.response = rawrows

    def setvirtualfields(self,**keyed_virtualfields):
        if not keyed_virtualfields:
            return self
        for row in self.records:
            for (tablename,virtualfields) in keyed_virtualfields.items():
                attributes = dir(virtualfields)
                virtualfields.__dict__.update(row)
                if not tablename in row:
                    box = row[tablename] = Row()
                else:
                    box = row[tablename]
                for attribute in attributes:
                    if attribute[0] != '_':
                        method = getattr(virtualfields,attribute)
                        if hasattr(method,'im_func') and method.im_func.func_code.co_argcount:
                            box[attribute]=method()
        return self

    def __and__(self,other):
        if self.colnames!=other.colnames: raise Exception, 'Cannot & incompatible Rows objects'
        records = self.records+other.records
        return Rows(self.db,records,self.colnames)

    def __or__(self,other):
        if self.colnames!=other.colnames: raise Exception, 'Cannot | incompatible Rows objects'
        records = self.records
        records += [record for record in other.records \
                        if not record in records]
        return Rows(self.db,records,self.colnames)

    def __nonzero__(self):
        if len(self.records):
            return 1
        return 0

    def __len__(self):
        return len(self.records)

    def __getslice__(self, a, b):
        return Rows(self.db,self.records[a:b],self.colnames)

    def __getitem__(self, i):
        row = self.records[i]
        keys = row.keys()
        if self.compact and len(keys) == 1 and keys[0] != '_extra':
            return row[row.keys()[0]]
        return row

    def __iter__(self):
        """
        iterator over records
        """

        for i in xrange(len(self)):
            yield self[i]

    def __str__(self):
        """
        serializes the table into a csv file
        """

        s = cStringIO.StringIO()
        self.export_to_csv_file(s)
        return s.getvalue()

    def first(self):
        if not self.records:
            return None
        return self[0]

    def last(self):
        if not self.records:
            return None
        return self[-1]

    def find(self,f):
        """
        returns a new Rows object, a subset of the original object,
        filtered by the function f
        """
        if not self.records:
            return Rows(self.db, [], self.colnames)
        records = []
        for i in range(0,len(self)):
            row = self[i]
            if f(row):
                records.append(self.records[i])
        return Rows(self.db, records, self.colnames)

    def exclude(self, f):
        """
        removes elements from the calling Rows object, filtered by the function f,
        and returns a new Rows object containing the removed elements
        """
        if not self.records:
            return Rows(self.db, [], self.colnames)
        removed = []
        i=0
        while i<len(self):
            row = self[i]
            if f(row):
                removed.append(self.records[i])
                del self.records[i]
            else:
                i += 1
        return Rows(self.db, removed, self.colnames)

    def sort(self, f, reverse=False):
        """
        returns a list of sorted elements (not sorted in place)
        """
        return Rows(self.db,sorted(self,key=f,reverse=reverse),self.colnames)

    def as_list(self,
                compact=True,
                storage_to_dict=True,
                datetime_to_str=True):
        """
        returns the data as a list or dictionary.
        :param storage_to_dict: when True returns a dict, otherwise a list(default True)
        :param datetime_to_str: convert datetime fields as strings (default True)
        """
        (oc, self.compact) = (self.compact, compact)
        if storage_to_dict:
            items = [item.as_dict(datetime_to_str) for item in self]
        else:
            items = [item for item in self]
        self.compact = compact
        return items


    def as_dict(self,
                key='id',
                compact=True,
                storage_to_dict=True,
                datetime_to_str=True):
        """
        returns the data as a dictionary of dictionaries (storage_to_dict=True) or records (False)

        :param key: the name of the field to be used as dict key, normally the id
        :param compact: ? (default True)
        :param storage_to_dict: when True returns a dict, otherwise a list(default True)
        :param datetime_to_str: convert datetime fields as strings (default True)
        """
        rows = self.as_list(compact, storage_to_dict, datetime_to_str)
        if isinstance(key,str) and key.count('.')==1:
            (table, field) = key.split('.')
            return dict([(r[table][field],r) for r in rows])
        elif isinstance(key,str):
            return dict([(r[key],r) for r in rows])
        else:
            return dict([(key(r),r) for r in rows])

    def export_to_csv_file(self, ofile, null='<NULL>', *args, **kwargs):
        """
        export data to csv, the first line contains the column names

        :param ofile: where the csv must be exported to
        :param null: how null values must be represented (default '<NULL>')
        :param delimiter: delimiter to separate values (default ',')
        :param quotechar: character to use to quote string values (default '"')
        :param quoting: quote system, use csv.QUOTE_*** (default csv.QUOTE_MINIMAL)
        :param represent: use the fields .represent value (default False)
        :param colnames: list of column names to use (default self.colnames)
                         This will only work when exporting rows objects!!!!
                         DO NOT use this with db.export_to_csv()
        """
        delimiter = kwargs.get('delimiter', ',')
        quotechar = kwargs.get('quotechar', '"')
        quoting = kwargs.get('quoting', csv.QUOTE_MINIMAL)
        represent = kwargs.get('represent', False)
        writer = csv.writer(ofile, delimiter=delimiter,
                            quotechar=quotechar, quoting=quoting)
        colnames = kwargs.get('colnames', self.colnames)
        # a proper csv starting with the column names
        writer.writerow(colnames)

        def none_exception(value):
            """
            returns a cleaned up value that can be used for csv export:
            - unicode text is encoded as such
            - None values are replaced with the given representation (default <NULL>)
            """
            if value is None:
                return null
            elif isinstance(value, unicode):
                return value.encode('utf8')
            elif isinstance(value,Reference):
                return int(value)
            elif hasattr(value, 'isoformat'):
                return value.isoformat()[:19].replace('T', ' ')
            elif isinstance(value, (list,tuple)): # for type='list:..'
                return bar_encode(value)
            return value

        for record in self:
            row = []
            for col in colnames:
                if not table_field.match(col):
                    row.append(record._extra[col])
                else:
                    (t, f) = col.split('.')
                    field = self.db[t][f]
                    if isinstance(record.get(t, None), (Row,dict)):
                        value = record[t][f]
                    else:
                        value = record[f]
                    if field.type=='blob' and value!=None:
                        value = base64.b64encode(value)
                    elif represent and field.represent:
                        value = field.represent(value)
                    row.append(none_exception(value))
            writer.writerow(row)

    def xml(self):
        """
        serializes the table using sqlhtml.SQLTABLE (if present)
        """

        import sqlhtml
        return sqlhtml.SQLTABLE(self).xml()

    def json(self, mode='object', default=None):
        """
        serializes the table to a JSON list of objects
        """
        mode = mode.lower()
        if not mode in ['object', 'array']:
            raise SyntaxError, 'Invalid JSON serialization mode: %s' % mode

        def inner_loop(record, col):
            (t, f) = col.split('.')
            res = None
            if not table_field.match(col):
                res = record._extra[col]
            else:
                if isinstance(record.get(t, None), Row):
                    res = record[t][f]
                else:
                    res = record[f]
            if mode == 'object':
                return (f, res)
            else:
                return res

        if mode == 'object':
            items = [dict([inner_loop(record, col) for col in
                     self.colnames]) for record in self]
        else:
            items = [[inner_loop(record, col) for col in self.colnames]
                     for record in self]
        if have_serializers:
            return serializers.json(items,default=default or serializers.custom_json)
        else:
            import simplejson
            return simplejson.dumps(items)

def Rows_unpickler(data):
    return cPickle.loads(data)

def Rows_pickler(data):
    return Rows_unpickler, \
        (cPickle.dumps(data.as_list(storage_to_dict=True,
                                    datetime_to_str=False)),)

copy_reg.pickle(Rows, Rows_pickler, Rows_unpickler)


################################################################################
# dummy function used to define some doctests
################################################################################

def test_all():
    """

    >>> if len(sys.argv)<2: db = DAL(\"sqlite://test.db\")
    >>> if len(sys.argv)>1: db = DAL(sys.argv[1])
    >>> tmp = db.define_table('users',\
              Field('stringf', 'string', length=32, required=True),\
              Field('booleanf', 'boolean', default=False),\
              Field('passwordf', 'password', notnull=True),\
              Field('uploadf', 'upload'),\
              Field('blobf', 'blob'),\
              Field('integerf', 'integer', unique=True),\
              Field('doublef', 'double', unique=True,notnull=True),\
              Field('datef', 'date', default=datetime.date.today()),\
              Field('timef', 'time'),\
              Field('datetimef', 'datetime'),\
              migrate='test_user.table')

   Insert a field

    >>> db.users.insert(stringf='a', booleanf=True, passwordf='p', blobf='0A',\
                       uploadf=None, integerf=5, doublef=3.14,\
                       datef=datetime.date(2001, 1, 1),\
                       timef=datetime.time(12, 30, 15),\
                       datetimef=datetime.datetime(2002, 2, 2, 12, 30, 15))
    1

    Drop the table

    >>> db.users.drop()

    Examples of insert, select, update, delete

    >>> tmp = db.define_table('person',\
              Field('name'),\
              Field('birth','date'),\
              migrate='test_person.table')
    >>> person_id = db.person.insert(name=\"Marco\",birth='2005-06-22')
    >>> person_id = db.person.insert(name=\"Massimo\",birth='1971-12-21')

    commented len(db().select(db.person.ALL))
    commented 2

    >>> me = db(db.person.id==person_id).select()[0] # test select
    >>> me.name
    'Massimo'
    >>> db(db.person.name=='Massimo').update(name='massimo') # test update
    1
    >>> db(db.person.name=='Marco').select().first().delete_record() # test delete
    1

    Update a single record

    >>> me.update_record(name=\"Max\")
    >>> me.name
    'Max'

    Examples of complex search conditions

    >>> len(db((db.person.name=='Max')&(db.person.birth<'2003-01-01')).select())
    1
    >>> len(db((db.person.name=='Max')&(db.person.birth<datetime.date(2003,01,01))).select())
    1
    >>> len(db((db.person.name=='Max')|(db.person.birth<'2003-01-01')).select())
    1
    >>> me = db(db.person.id==person_id).select(db.person.name)[0]
    >>> me.name
    'Max'

    Examples of search conditions using extract from date/datetime/time

    >>> len(db(db.person.birth.month()==12).select())
    1
    >>> len(db(db.person.birth.year()>1900).select())
    1

    Example of usage of NULL

    >>> len(db(db.person.birth==None).select()) ### test NULL
    0
    >>> len(db(db.person.birth!=None).select()) ### test NULL
    1

    Examples of search conditions using lower, upper, and like

    >>> len(db(db.person.name.upper()=='MAX').select())
    1
    >>> len(db(db.person.name.like('%ax')).select())
    1
    >>> len(db(db.person.name.upper().like('%AX')).select())
    1
    >>> len(db(~db.person.name.upper().like('%AX')).select())
    0

    orderby, groupby and limitby

    >>> people = db().select(db.person.name, orderby=db.person.name)
    >>> order = db.person.name|~db.person.birth
    >>> people = db().select(db.person.name, orderby=order)

    >>> people = db().select(db.person.name, orderby=db.person.name, groupby=db.person.name)

    >>> people = db().select(db.person.name, orderby=order, limitby=(0,100))

    Example of one 2 many relation

    >>> tmp = db.define_table('dog',\
               Field('name'),\
               Field('birth','date'),\
               Field('owner',db.person),\
               migrate='test_dog.table')
    >>> db.dog.insert(name='Snoopy', birth=None, owner=person_id)
    1

    A simple JOIN

    >>> len(db(db.dog.owner==db.person.id).select())
    1

    >>> len(db().select(db.person.ALL, db.dog.name,left=db.dog.on(db.dog.owner==db.person.id)))
    1

    Drop tables

    >>> db.dog.drop()
    >>> db.person.drop()

    Example of many 2 many relation and Set

    >>> tmp = db.define_table('author', Field('name'),\
                            migrate='test_author.table')
    >>> tmp = db.define_table('paper', Field('title'),\
                            migrate='test_paper.table')
    >>> tmp = db.define_table('authorship',\
            Field('author_id', db.author),\
            Field('paper_id', db.paper),\
            migrate='test_authorship.table')
    >>> aid = db.author.insert(name='Massimo')
    >>> pid = db.paper.insert(title='QCD')
    >>> tmp = db.authorship.insert(author_id=aid, paper_id=pid)

    Define a Set

    >>> authored_papers = db((db.author.id==db.authorship.author_id)&(db.paper.id==db.authorship.paper_id))
    >>> rows = authored_papers.select(db.author.name, db.paper.title)
    >>> for row in rows: print row.author.name, row.paper.title
    Massimo QCD

    Example of search condition using  belongs

    >>> set = (1, 2, 3)
    >>> rows = db(db.paper.id.belongs(set)).select(db.paper.ALL)
    >>> print rows[0].title
    QCD

    Example of search condition using nested select

    >>> nested_select = db()._select(db.authorship.paper_id)
    >>> rows = db(db.paper.id.belongs(nested_select)).select(db.paper.ALL)
    >>> print rows[0].title
    QCD

    Example of expressions

    >>> mynumber = db.define_table('mynumber', Field('x', 'integer'))
    >>> db(mynumber.id>0).delete()
    0
    >>> for i in range(10): tmp = mynumber.insert(x=i)
    >>> db(mynumber.id>0).select(mynumber.x.sum())[0](mynumber.x.sum())
    45

    >>> db(mynumber.x+2==5).select(mynumber.x + 2)[0](mynumber.x + 2)
    5

    Output in csv

    >>> print str(authored_papers.select(db.author.name, db.paper.title)).strip()
    author.name,paper.title\r
    Massimo,QCD

    Delete all leftover tables

    >>> DAL.distributed_transaction_commit(db)

    >>> db.mynumber.drop()
    >>> db.authorship.drop()
    >>> db.author.drop()
    >>> db.paper.drop()
    """
################################################################################
# deprecated since the new DAL; here only for backward compatibility
################################################################################

SQLField = Field
SQLTable = Table
SQLXorable = Expression
SQLQuery = Query
SQLSet = Set
SQLRows = Rows
SQLStorage = Row
SQLDB = DAL
GQLDB = DAL
DAL.Field = Field  # was necessary in gluon/globals.py session.connect
DAL.Table = Table  # was necessary in gluon/globals.py session.connect

################################################################################
# run tests
################################################################################

if __name__ == '__main__':
    import doctest
    doctest.testmod()



Added gluon/debug.py version [48b9d6a75a].






















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>,
limodou <limodou@gmail.com> and srackham <srackham@gmail.com>.
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

"""

import logging
import pdb
import Queue
import sys

logger = logging.getLogger("web2py")

class Pipe(Queue.Queue):
    def __init__(self, name, mode='r', *args, **kwargs):
        self.__name = name
        Queue.Queue.__init__(self, *args, **kwargs)

    def write(self, data):
        logger.debug("debug %s writting %s" % (self.__name, data))
        self.put(data)

    def flush(self):
        # mark checkpoint (complete message)
        logger.debug("debug %s flushing..." % self.__name)
        self.put(None)
        # wait until it is processed
        self.join()
        logger.debug("debug %s flush done" % self.__name)

    def read(self, count=None, timeout=None):
        logger.debug("debug %s reading..." % (self.__name, ))
        data = self.get(block=True, timeout=timeout)
        # signal that we are ready
        self.task_done()
        logger.debug("debug %s read %s" % (self.__name, data))
        return data

    def readline(self):
        logger.debug("debug %s readline..." % (self.__name, ))
        return self.read()


pipe_in = Pipe('in')
pipe_out = Pipe('out')

debugger = pdb.Pdb(completekey=None, stdin=pipe_in, stdout=pipe_out,)

def set_trace():
    "breakpoint shortcut (like pdb)"
    logger.info("DEBUG: set_trace!")
    debugger.set_trace(sys._getframe().f_back)


def stop_trace():
    "stop waiting for the debugger (called atexit)"
    # this should prevent communicate is wait forever a command result
    # and the main thread has finished
    logger.info("DEBUG: stop_trace!")
    pipe_out.write("debug finished!")
    pipe_out.write(None)
    #pipe_out.flush()

def communicate(command=None):
    "send command to debbuger, wait result"
    if command is not None:
        logger.info("DEBUG: sending command %s" % command)
        pipe_in.write(command)
        #pipe_in.flush()
    result = []
    while True:
        data = pipe_out.read()
        if data is None:
            break
        result.append(data)
    logger.info("DEBUG: result %s" % repr(result))
    return ''.join(result)



Added gluon/decoder.py version [b310fed651].












































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import codecs, encodings

"""Caller will hand this library a buffer and ask it to either convert
it or auto-detect the type.

Based on http://code.activestate.com/recipes/52257/

Licensed under the PSF License
"""

# 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")
                 }

def autoDetectXMLEncoding(buffer):
    """ buffer -> encoding_name
    The buffer should be at least 4 bytes long.
        Returns None if encoding cannot be detected.
        Note that encoding_name might not have an installed
        decoder (e.g. EBCDIC)
    """
    # a more efficient implementation would not decode the whole
    # 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.
    if len(buffer)>=4:
        bytes = (byte1, byte2, byte3, byte4) = tuple(map(ord, buffer[0:4]))
        enc_info = autodetect_dict.get(bytes, None)
        if not enc_info: # try autodetection again removing potentially
            # variable bytes
            bytes = (byte1, byte2, None, None)
            enc_info = autodetect_dict.get(bytes)
    else:
        enc_info = None

    if enc_info:
        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]
        (decoded,length) = secret_decoder_ring(buffer)
        first_line = decoded.split("\n")[0]
        if first_line and first_line.startswith(u"<?xml"):
            encoding_pos = first_line.find(u"encoding")
            if encoding_pos!=-1:
                # look for double quote
                quote_pos=first_line.find('"', encoding_pos)

                if quote_pos==-1:                 # look for single quote
                    quote_pos=first_line.find("'", encoding_pos)

                if quote_pos>-1:
                    quote_char,rest=(first_line[quote_pos],
                                                first_line[quote_pos+1:])
                    encoding=rest[:rest.find(quote_char)]

    return encoding

def decoder(buffer):
    encoding = autoDetectXMLEncoding(buffer)
    return buffer.decode(encoding).encode('utf8')

Added gluon/fileutils.py version [e355481567].




































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import storage
import os
import re
import tarfile
import glob
import time
from http import HTTP
from gzip import open as gzopen
from settings import global_settings


__all__ = [
    'read_file',
    'write_file',
    'readlines_file',
    'up',
    'abspath',
    'mktree',
    'listdir',
    'recursive_unlink',
    'cleanpath',
    'tar',
    'untar',
    'tar_compiled',
    'get_session',
    'check_credentials',
    'w2p_pack',
    'w2p_unpack',
    'w2p_pack_plugin',
    'w2p_unpack_plugin',
    'fix_newlines',
    'make_fake_file_like_object',
    ]

def read_file(filename, mode='r'):
    "returns content from filename, making sure to close the file explicitly on exit."
    f = open(filename, mode)
    try:
        return f.read()
    finally:
        f.close()

def write_file(filename, value, mode='w'):
    "writes <value> to filename, making sure to close the file explicitly on exit."
    f = open(filename, mode)
    try:
        return f.write(value)
    finally:
        f.close()

def readlines_file(filename, mode='r'):
    "applies .split('\n') to the output of read_file()"
    return read_file(filename, mode).split('\n')

def abspath(*relpath, **base):
    "convert relative path to absolute path based (by default) on applications_parent"
    path = os.path.join(*relpath)
    gluon = base.get('gluon', False)
    if os.path.isabs(path):
        return path
    if gluon:
        return os.path.join(global_settings.gluon_parent, path)
    return os.path.join(global_settings.applications_parent, path)


def mktree(path):
    head,tail =os.path.split(path)
    if head:
        if tail: mktree(head)
        if not os.path.exists(head):
            os.mkdir(head)

def listdir(
    path,
    expression='^.+$',
    drop=True,
    add_dirs=False,
    sort=True,
    ):
    """
    like os.listdir() but you can specify a regex pattern to filter files.
    if add_dirs is True, the returned items will have the full path.
    """
    if path[-1:] != os.path.sep:
        path = path + os.path.sep
    if drop:
        n = len(path)
    else:
        n = 0
    regex = re.compile(expression)
    items = []
    for (root, dirs, files) in os.walk(path, topdown=True):
        for dir in dirs[:]:
            if dir.startswith('.'):
                dirs.remove(dir)
        if add_dirs:
            items.append(root[n:])
        for file in sorted(files):
            if regex.match(file) and not file.startswith('.'):
                items.append(os.path.join(root, file)[n:])
    if sort:
        return sorted(items)
    else:
        return items


def recursive_unlink(f):
    if os.path.isdir(f):
        for s in os.listdir(f):
            recursive_unlink(os.path.join(f,s))
        os.rmdir(f)
    elif os.path.isfile(f):
        os.unlink(f)


def cleanpath(path):
    """
    turns any expression/path into a valid filename. replaces / with _ and
    removes special characters.
    """

    items = path.split('.')
    if len(items) > 1:
        path = re.sub('[^\w\.]+', '_', '_'.join(items[:-1]) + '.'
                       + ''.join(items[-1:]))
    else:
        path = re.sub('[^\w\.]+', '_', ''.join(items[-1:]))
    return path


def _extractall(filename, path='.', members=None):
    if not hasattr(tarfile.TarFile, 'extractall'):
        from tarfile import ExtractError

        class TarFile(tarfile.TarFile):

            def extractall(self, path='.', members=None):
                """Extract all members from the archive to the current working
             directory and set owner, modification time and permissions on
             directories afterwards. `path' specifies a different directory
             to extract to. `members' is optional and must be a subset of the
             list returned by getmembers().
                """

                directories = []
                if members is None:
                    members = self
                for tarinfo in members:
                    if tarinfo.isdir():

                        # Extract directory with a safe mode, so that
                        # all files below can be extracted as well.

                        try:
                            os.makedirs(os.path.join(path,
                                    tarinfo.name), 0777)
                        except EnvironmentError:
                            pass
                        directories.append(tarinfo)
                    else:
                        self.extract(tarinfo, path)

                # Reverse sort directories.

                directories.sort(lambda a, b: cmp(a.name, b.name))
                directories.reverse()

                # Set correct owner, mtime and filemode on directories.

                for tarinfo in directories:
                    path = os.path.join(path, tarinfo.name)
                    try:
                        self.chown(tarinfo, path)
                        self.utime(tarinfo, path)
                        self.chmod(tarinfo, path)
                    except ExtractError, e:
                        if self.errorlevel > 1:
                            raise
                        else:
                            self._dbg(1, 'tarfile: %s' % e)


        _cls = TarFile
    else:
        _cls = tarfile.TarFile

    tar = _cls(filename, 'r')
    ret = tar.extractall(path, members)
    tar.close()
    return ret

def tar(file, dir, expression='^.+$'):
    """
    tars dir into file, only tars file that match expression
    """

    tar = tarfile.TarFile(file, 'w')
    try:
        for file in listdir(dir, expression, add_dirs=True):
            tar.add(os.path.join(dir, file), file, False)
    finally:
        tar.close()

def untar(file, dir):
    """
    untar file into dir
    """

    _extractall(file, dir)


def w2p_pack(filename, path, compiled=False):
    filename = abspath(filename)
    path = abspath(path)
    tarname = filename + '.tar'
    if compiled:
        tar_compiled(tarname, path, '^[\w\.\-]+$')
    else:
        tar(tarname, path, '^[\w\.\-]+$')
    w2pfp = gzopen(filename, 'wb')
    tarfp = open(tarname, 'rb')
    w2pfp.write(tarfp.read())
    w2pfp.close()
    tarfp.close()
    os.unlink(tarname)

def w2p_unpack(filename, path, delete_tar=True):
    filename = abspath(filename)
    path = abspath(path)
    if filename[-4:] == '.w2p' or filename[-3:] == '.gz':
        if filename[-4:] == '.w2p':
            tarname = filename[:-4] + '.tar'
        else:
            tarname = filename[:-3] + '.tar'
        fgzipped = gzopen(filename, 'rb')
        tarfile = open(tarname, 'wb')
        tarfile.write(fgzipped.read())
        tarfile.close()
        fgzipped.close()
    else:
        tarname = filename
    untar(tarname, path)
    if delete_tar:
        os.unlink(tarname)


def w2p_pack_plugin(filename, path, plugin_name):
    """Pack the given plugin into a w2p file.
    Will match files at:
        <path>/*/plugin_[name].*
        <path>/*/plugin_[name]/*
    """
    filename = abspath(filename)
    path = abspath(path)
    if not filename.endswith('web2py.plugin.%s.w2p' % plugin_name):
        raise Exception, "Not a web2py plugin name"
    plugin_tarball = tarfile.open(filename, 'w:gz')
    try:
        app_dir = path
        while app_dir[-1]=='/':
            app_dir = app_dir[:-1]
        files1=glob.glob(os.path.join(app_dir,'*/plugin_%s.*' % plugin_name))
        files2=glob.glob(os.path.join(app_dir,'*/plugin_%s/*' % plugin_name))
        for file in files1+files2:
            plugin_tarball.add(file, arcname=file[len(app_dir)+1:])
    finally:
        plugin_tarball.close()


def w2p_unpack_plugin(filename, path, delete_tar=True):
    filename = abspath(filename)
    path = abspath(path)
    if not os.path.basename(filename).startswith('web2py.plugin.'):
        raise Exception, "Not a web2py plugin"
    w2p_unpack(filename,path,delete_tar)


def tar_compiled(file, dir, expression='^.+$'):
    """
    used to tar a compiled application.
    the content of models, views, controllers is not stored in the tar file.
    """

    tar = tarfile.TarFile(file, 'w')
    for file in listdir(dir, expression, add_dirs=True):
        filename = os.path.join(dir, file)
        if os.path.islink(filename):
            continue
        if os.path.isfile(filename) and file[-4:] != '.pyc':
            if file[:6] == 'models':
                continue
            if file[:5] == 'views':
                continue
            if file[:11] == 'controllers':
                continue
            if file[:7] == 'modules':
                continue
        tar.add(filename, file, False)
    tar.close()

def up(path):
    return os.path.dirname(os.path.normpath(path))


def get_session(request, other_application='admin'):
    """ checks that user is authorized to access other_application"""
    if request.application == other_application:
        raise KeyError
    try:
        session_id = request.cookies['session_id_' + other_application].value
        osession = storage.load_storage(os.path.join(
                up(request.folder), other_application, 'sessions', session_id))
    except:
        osession = storage.Storage()
    return osession


def check_credentials(request, other_application='admin', expiration = 60*60):
    """ checks that user is authorized to access other_application"""
    if request.env.web2py_runtime_gae:
        from google.appengine.api import users
        if users.is_current_user_admin():
            return True
        else:
            login_html = '<a href="%s">Sign in with your google account</a>.' \
                % users.create_login_url(request.env.path_info)
            raise HTTP(200, '<html><body>%s</body></html>' % login_html)
    else:
        dt = time.time() - expiration
        s = get_session(request, other_application)
        return (s.authorized and s.last_time and s.last_time > dt)


def fix_newlines(path):
    regex = re.compile(r'''(\r
|\r|
)''')
    for filename in listdir(path, '.*\.(py|html)$', drop=False):
        rdata = read_file(filename, 'rb')
        wdata = regex.sub('\n', rdata)
        if wdata != rdata:
            write_file(filename, wdata, 'wb')

def copystream(
    src,
    dest,
    size,
    chunk_size=10 ** 5,
    ):
    """
    this is here because I think there is a bug in shutil.copyfileobj
    """
    while size > 0:
        if size < chunk_size:
            data = src.read(size)
        else:
            data = src.read(chunk_size)
        length = len(data)
        if length > size:
            (data, length) = (data[:size], size)
        size -= length
        if length == 0:
            break
        dest.write(data)
        if length < chunk_size:
            break
    dest.seek(0)
    return


def make_fake_file_like_object():
    class LogFile(object):
        def write(self, value):
            pass
        def close(self):
            pass
    return LogFile()

Added gluon/globals.py version [60a5318a8f].

















































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Contains the classes for the global used variables:

- Request
- Response
- Session

"""

from storage import Storage, List
from streamer import streamer, stream_file_or_304_or_206, DEFAULT_CHUNK_SIZE
from xmlrpc import handler
from contenttype import contenttype
from html import xmlescape, TABLE, TR, PRE
from http import HTTP
from fileutils import up
from serializers import json, custom_json
import settings
from utils import web2py_uuid
from settings import global_settings

import hashlib
import portalocker
import cPickle
import cStringIO
import datetime
import re
import Cookie
import os
import sys
import traceback
import threading

regex_session_id = re.compile('^([\w\-]+/)?[\w\-\.]+$')

__all__ = ['Request', 'Response', 'Session']

current = threading.local()  # thread-local storage for request-scope globals

class Request(Storage):

    """
    defines the request object and the default values of its members

    - env: environment variables, by gluon.main.wsgibase()
    - cookies
    - get_vars
    - post_vars
    - vars
    - folder
    - application
    - function
    - args
    - extension
    - now: datetime.datetime.today()
    - restful()
    """

    def __init__(self):
        self.wsgi = Storage() # hooks to environ and start_response
        self.env = Storage()
        self.cookies = Cookie.SimpleCookie()
        self.get_vars = Storage()
        self.post_vars = Storage()
        self.vars = Storage()
        self.folder = None
        self.application = None
        self.function = None
        self.args = List()
        self.extension = None
        self.now = datetime.datetime.now()
        self.is_restful = False
        self.is_https = False
        self.is_local = False

    def compute_uuid(self):
        self.uuid = '%s/%s.%s.%s' % (
            self.application,
            self.client.replace(':', '_'),
            self.now.strftime('%Y-%m-%d.%H-%M-%S'),
            web2py_uuid())
        return self.uuid

    def user_agent(self):
        from gluon.contrib import user_agent_parser
        session = current.session
        session._user_agent = session._user_agent or \
            user_agent_parser.detect(self.env.http_user_agent)
        return session._user_agent

    def restful(self):
        def wrapper(action,self=self):
            def f(_action=action,_self=self,*a,**b):
                self.is_restful = True
                method = _self.env.request_method
                if len(_self.args) and '.' in _self.args[-1]:
                    _self.args[-1],_self.extension = _self.args[-1].rsplit('.',1)
                if not method in ['GET','POST','DELETE','PUT']:
                    raise HTTP(400,"invalid method")
                rest_action = _action().get(method,None)
                if not rest_action:
                    raise HTTP(400,"method not supported")
                try:
                    return rest_action(*_self.args,**_self.vars)
                except TypeError, e:
                    exc_type, exc_value, exc_traceback = sys.exc_info()
                    if len(traceback.extract_tb(exc_traceback))==1:
                        raise HTTP(400,"invalid arguments")
                    else:
                        raise e
            f.__doc__ = action.__doc__
            f.__name__ = action.__name__
            return f
        return wrapper


class Response(Storage):

    """
    defines the response object and the default values of its members
    response.write(   ) can be used to write in the output html
    """

    def __init__(self):
        self.status = 200
        self.headers = Storage()
        self.headers['X-Powered-By'] = 'web2py'
        self.body = cStringIO.StringIO()
        self.session_id = None
        self.cookies = Cookie.SimpleCookie()
        self.postprocessing = []
        self.flash = ''            # used by the default view layout
        self.meta = Storage()      # used by web2py_ajax.html
        self.menu = []             # used by the default view layout
        self.files = []            # used by web2py_ajax.html
        self.generic_patterns = [] # patterns to allow generic views
        self._vars = None
        self._caller = lambda f: f()
        self._view_environment = None
        self._custom_commit = None
        self._custom_rollback = None

    def write(self, data, escape=True):
        if not escape:
            self.body.write(str(data))
        else:
            self.body.write(xmlescape(data))

    def render(self, *a, **b):
        from compileapp import run_view_in
        if len(a) > 2:
            raise SyntaxError, 'Response.render can be called with two arguments, at most'
        elif len(a) == 2:
            (view, self._vars) = (a[0], a[1])
        elif len(a) == 1 and isinstance(a[0], str):
            (view, self._vars) = (a[0], {})
        elif len(a) == 1 and hasattr(a[0], 'read') and callable(a[0].read):
            (view, self._vars) = (a[0], {})
        elif len(a) == 1 and isinstance(a[0], dict):
            (view, self._vars) = (None, a[0])
        else:
            (view, self._vars) = (None, {})
        self._vars.update(b)
        self._view_environment.update(self._vars)
        if view:
            import cStringIO
            (obody, oview) = (self.body, self.view)
            (self.body, self.view) = (cStringIO.StringIO(), view)
            run_view_in(self._view_environment)
            page = self.body.getvalue()
            self.body.close()
            (self.body, self.view) = (obody, oview)
        else:
            run_view_in(self._view_environment)
            page = self.body.getvalue()
        return page

    def stream(
        self,
        stream,
        chunk_size = DEFAULT_CHUNK_SIZE,
        request=None,
        ):
        """
        if a controller function::

            return response.stream(file, 100)

        the file content will be streamed at 100 bytes at the time
        """

        if isinstance(stream, (str, unicode)):
            stream_file_or_304_or_206(stream,
                                      chunk_size=chunk_size,
                                      request=request,
                                      headers=self.headers)

        # ## the following is for backward compatibility

        if hasattr(stream, 'name'):
            filename = stream.name
        else:
            filename = None
        keys = [item.lower() for item in self.headers]
        if filename and not 'content-type' in keys:
            self.headers['Content-Type'] = contenttype(filename)
        if filename and not 'content-length' in keys:
            try:
                self.headers['Content-Length'] = \
                    os.path.getsize(filename)
            except OSError:
                pass
        if request and request.env.web2py_use_wsgi_file_wrapper:
            wrapped = request.env.wsgi_file_wrapper(stream, chunk_size)
        else:
            wrapped = streamer(stream, chunk_size=chunk_size)
        return wrapped

    def download(self, request, db, chunk_size = DEFAULT_CHUNK_SIZE, attachment=True):
        """
        example of usage in controller::

            def download():
                return response.download(request, db)

        downloads from http://..../download/filename
        """

        import contenttype as c
        if not request.args:
            raise HTTP(404)
        name = request.args[-1]
        items = re.compile('(?P<table>.*?)\.(?P<field>.*?)\..*')\
                           .match(name)
        if not items:
            raise HTTP(404)
        (t, f) = (items.group('table'), items.group('field'))
        field = db[t][f]
        try:
            (filename, stream) = field.retrieve(name)
        except IOError:
            raise HTTP(404)
        self.headers['Content-Type'] = c.contenttype(name)
        if attachment:
            self.headers['Content-Disposition'] = \
                "attachment; filename=%s" % filename
        return self.stream(stream, chunk_size = chunk_size, request=request)

    def json(self, data, default=None):
        return json(data, default = default or custom_json)

    def xmlrpc(self, request, methods):
        """
        assuming::

            def add(a, b):
                return a+b

        if a controller function \"func\"::

            return response.xmlrpc(request, [add])

        the controller will be able to handle xmlrpc requests for
        the add function. Example::

            import xmlrpclib
            connection = xmlrpclib.ServerProxy('http://hostname/app/contr/func')
            print connection.add(3, 4)

        """

        return handler(request, self, methods)

    def toolbar(self):
        from html import DIV, SCRIPT, BEAUTIFY, TAG, URL
        BUTTON = TAG.button
        admin = URL("admin","default","design",
                    args=current.request.application)
        from gluon.dal import thread
        dbstats = [TABLE(*[TR(PRE(row[0]),'%.2fms' % (row[1]*1000)) \
                               for row in i.db._timings]) \
                       for i in thread.instances]        
        u = web2py_uuid() 
        return DIV(
            BUTTON('design',_onclick="document.location='%s'" % admin),
            BUTTON('request',_onclick="jQuery('#request-%s').slideToggle()"%u),
            DIV(BEAUTIFY(current.request),_class="hidden",_id="request-%s"%u),
            BUTTON('session',_onclick="jQuery('#session-%s').slideToggle()"%u),
            DIV(BEAUTIFY(current.session),_class="hidden",_id="session-%s"%u),
            BUTTON('response',_onclick="jQuery('#response-%s').slideToggle()"%u),
            DIV(BEAUTIFY(current.response),_class="hidden",_id="response-%s"%u),
            BUTTON('db stats',_onclick="jQuery('#db-stats-%s').slideToggle()"%u),
            DIV(BEAUTIFY(dbstats),_class="hidden",_id="db-stats-%s"%u),
            SCRIPT("jQuery('.hidden').hide()")
            )

class Session(Storage):

    """
    defines the session object and the default values of its members (None)
    """

    def connect(
        self,
        request,
        response,
        db=None,
        tablename='web2py_session',
        masterapp=None,
        migrate=True,
        separate = None,
        check_client=False,
        ):
        """
        separate can be separate=lambda(session_name): session_name[-2:]
        and it is used to determine a session prefix.
        separate can be True and it is set to session_name[-2:]
        """
        if separate == True:
            separate = lambda session_name: session_name[-2:]
        self._unlock(response)
        if not masterapp:
            masterapp = request.application
        response.session_id_name = 'session_id_%s' % masterapp.lower()

        if not db:
            if global_settings.db_sessions is True or masterapp in global_settings.db_sessions:
                return
            response.session_new = False
            client = request.client.replace(':', '.')
            if response.session_id_name in request.cookies:
                response.session_id = \
                    request.cookies[response.session_id_name].value
                if regex_session_id.match(response.session_id):
                    response.session_filename = \
                        os.path.join(up(request.folder), masterapp,
                            'sessions', response.session_id)
                else:
                    response.session_id = None
            if response.session_id:
                try:
                    response.session_file = \
                        open(response.session_filename, 'rb+')
                    try:
                        portalocker.lock(response.session_file,
                                portalocker.LOCK_EX)
                        response.session_locked = True
                        self.update(cPickle.load(response.session_file))
                        response.session_file.seek(0)
                        oc = response.session_filename.split('/')[-1].split('-')[0]
                        if check_client and client!=oc:
                            raise Exception, "cookie attack"
                    finally:
                        pass
                        #This causes admin login to break. Must find out why.
                        #self._close(response)
                except:
                    response.session_id = None
            if not response.session_id:
                uuid = web2py_uuid()
                response.session_id = '%s-%s' % (client, uuid)
                if separate:
                    prefix = separate(response.session_id)
                    response.session_id = '%s/%s' % (prefix,response.session_id)
                response.session_filename = \
                    os.path.join(up(request.folder), masterapp,
                                 'sessions', response.session_id)
                response.session_new = True
        else:
            if global_settings.db_sessions is not True:
                global_settings.db_sessions.add(masterapp)
            response.session_db = True
            if response.session_file:
                self._close(response)
            if settings.global_settings.web2py_runtime_gae:
                # in principle this could work without GAE
                request.tickets_db = db
            if masterapp == request.application:
                table_migrate = migrate
            else:
                table_migrate = False
            tname = tablename + '_' + masterapp
            table = db.get(tname, None)
            if table is None:
                table = db.define_table(
                    tname,
                    db.Field('locked', 'boolean', default=False),
                    db.Field('client_ip', length=64),
                    db.Field('created_datetime', 'datetime',
                             default=request.now),
                    db.Field('modified_datetime', 'datetime'),
                    db.Field('unique_key', length=64),
                    db.Field('session_data', 'blob'),
                    migrate=table_migrate,
                    )
            try:
                key = request.cookies[response.session_id_name].value
                (record_id, unique_key) = key.split(':')
                if record_id == '0':
                    raise Exception, 'record_id == 0'
                rows = db(table.id == record_id).select()
                if len(rows) == 0 or rows[0].unique_key != unique_key:
                    raise Exception, 'No record'

                 # rows[0].update_record(locked=True)

                session_data = cPickle.loads(rows[0].session_data)
                self.update(session_data)
            except Exception:
                record_id = None
                unique_key = web2py_uuid()
                session_data = {}
            response._dbtable_and_field = \
                (response.session_id_name, table, record_id, unique_key)
            response.session_id = '%s:%s' % (record_id, unique_key)
        response.cookies[response.session_id_name] = response.session_id
        response.cookies[response.session_id_name]['path'] = '/'
        self.__hash = hashlib.md5(str(self)).digest()
        if self.flash:
            (response.flash, self.flash) = (self.flash, None)

    def is_new(self):
        if self._start_timestamp:
            return False
        else:
            self._start_timestamp = datetime.datetime.today()
            return True

    def is_expired(self, seconds = 3600):
        now = datetime.datetime.today()
        if not self._last_timestamp or \
                self._last_timestamp + datetime.timedelta(seconds = seconds) > now:
            self._last_timestamp = now
            return False
        else:
            return True

    def secure(self):
        self._secure = True

    def forget(self, response=None):
        self._close(response)
        self._forget = True

    def _try_store_in_db(self, request, response):

        # don't save if file-based sessions, no session id, or session being forgotten
        if not response.session_db or not response.session_id or self._forget:
            return

        # don't save if no change to session
        __hash = self.__hash
        if __hash is not None:
            del self.__hash
            if __hash == hashlib.md5(str(self)).digest():
                return

        (record_id_name, table, record_id, unique_key) = \
            response._dbtable_and_field
        dd = dict(locked=False, client_ip=request.env.remote_addr,
                  modified_datetime=request.now,
                  session_data=cPickle.dumps(dict(self)),
                  unique_key=unique_key)
        if record_id:
            table._db(table.id == record_id).update(**dd)
        else:
            record_id = table.insert(**dd)
        response.cookies[response.session_id_name] = '%s:%s'\
             % (record_id, unique_key)
        response.cookies[response.session_id_name]['path'] = '/'

    def _try_store_on_disk(self, request, response):

        # don't save if sessions not not file-based
        if response.session_db:
            return

        # don't save if no change to session
        __hash = self.__hash
        if __hash is not None:
            del self.__hash
            if __hash == hashlib.md5(str(self)).digest():
                self._close(response)
                return

        if not response.session_id or self._forget:
            self._close(response)
            return

        if response.session_new:
            # Tests if the session sub-folder exists, if not, create it
            session_folder = os.path.dirname(response.session_filename)
            if not os.path.exists(session_folder):
                os.mkdir(session_folder)
            response.session_file = open(response.session_filename, 'wb')
            portalocker.lock(response.session_file, portalocker.LOCK_EX)
            response.session_locked = True

        if response.session_file:
            cPickle.dump(dict(self), response.session_file)
            response.session_file.truncate()
            self._close(response)

    def _unlock(self, response):
        if response and response.session_file and response.session_locked:
            try:
                portalocker.unlock(response.session_file)
                response.session_locked = False
            except: ### this should never happen but happens in Windows
                pass

    def _close(self, response):
        if response and response.session_file:
            self._unlock(response)
            try:
                response.session_file.close()
                del response.session_file
            except:
                pass


Added gluon/highlight.py version [3472f01bc9].















































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import re
import cgi

__all__ = ['highlight']


class Highlighter(object):

    """
    Do syntax highlighting.
    """

    def __init__(
        self,
        mode,
        link=None,
        styles={},
        ):
        """
        Initialise highlighter:
            mode = language (PYTHON, WEB2PY,C, CPP, HTML, HTML_PLAIN)
        """

        mode = mode.upper()
        if link and link[-1] != '/':
            link = link + '/'
        self.link = link
        self.styles = styles
        self.output = []
        self.span_style = None
        if mode == 'WEB2PY':
            (mode, self.suppress_tokens) = ('PYTHON', [])
        elif mode == 'PYTHON':
            self.suppress_tokens = ['GOTOHTML']
        elif mode == 'CPP':
            (mode, self.suppress_tokens) = ('C', [])
        elif mode == 'C':
            self.suppress_tokens = ['CPPKEYWORD']
        elif mode == 'HTML_PLAIN':
            (mode, self.suppress_tokens) = ('HTML', ['GOTOPYTHON'])
        elif mode == 'HTML':
            self.suppress_tokens = []
        else:
            raise SyntaxError, 'Unknown mode: %s' % mode
        self.mode = mode

    def c_tokenizer(
        self,
        token,
        match,
        style,
        ):
        """
        Callback for C specific highlighting.
        """

        value = cgi.escape(match.group())
        self.change_style(token, style)
        self.output.append(value)

    def python_tokenizer(
        self,
        token,
        match,
        style,
        ):
        """
        Callback for python specific highlighting.
        """

        value = cgi.escape(match.group())
        if token == 'MULTILINESTRING':
            self.change_style(token, style)
            self.output.append(value)
            self.strMultilineString = match.group(1)
            return 'PYTHONMultilineString'
        elif token == 'ENDMULTILINESTRING':
            if match.group(1) == self.strMultilineString:
                self.output.append(value)
                self.strMultilineString = ''
                return 'PYTHON'
        if style and style[:5] == 'link:':
            self.change_style(None, None)
            (url, style) = style[5:].split(';', 1)
            if url == 'None' or url == '':
                self.output.append('<span style="%s">%s</span>'
                                    % (style, value))
            else:
                self.output.append('<a href="%s%s" style="%s">%s</a>'
                                    % (url, value, style, value))
        else:
            self.change_style(token, style)
            self.output.append(value)
        if token == 'GOTOHTML':
            return 'HTML'
        return None

    def html_tokenizer(
        self,
        token,
        match,
        style,
        ):
        """
        Callback for HTML specific highlighting.
        """

        value = cgi.escape(match.group())
        self.change_style(token, style)
        self.output.append(value)
        if token == 'GOTOPYTHON':
            return 'PYTHON'
        return None

    all_styles = {
        'C': (c_tokenizer, (
            ('COMMENT', re.compile(r'//.*\r?\n'),
             'color: green; font-style: italic'),
            ('MULTILINECOMMENT', re.compile(r'/\*.*?\*/', re.DOTALL),
             'color: green; font-style: italic'),
            ('PREPROCESSOR', re.compile(r'\s*#.*?[^\\]\s*\n',
             re.DOTALL), 'color: magenta; font-style: italic'),
            ('PUNC', re.compile(r'[-+*!&|^~/%\=<>\[\]{}(),.:]'),
             'font-weight: bold'),
            ('NUMBER',
             re.compile(r'0x[0-9a-fA-F]+|[+-]?\d+(\.\d+)?([eE][+-]\d+)?|\d+'),
             'color: red'),
            ('KEYWORD', re.compile(r'(sizeof|int|long|short|char|void|'
              + r'signed|unsigned|float|double|'
              + r'goto|break|return|continue|asm|'
              + r'case|default|if|else|switch|while|for|do|'
              + r'struct|union|enum|typedef|'
              + r'static|register|auto|volatile|extern|const)(?![a-zA-Z0-9_])'),
             'color:#185369; font-weight: bold'),
            ('CPPKEYWORD',
             re.compile(r'(class|private|protected|public|template|new|delete|'
              + r'this|friend|using|inline|export|bool|throw|try|catch|'
              + r'operator|typeid|virtual)(?![a-zA-Z0-9_])'),
             'color: blue; font-weight: bold'),
            ('STRING', re.compile(r'r?u?\'(.*?)(?<!\\)\'|"(.*?)(?<!\\)"'),
             'color: #FF9966'),
            ('IDENTIFIER', re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*'),
             None),
            ('WHITESPACE', re.compile(r'[   \r\n]+'), 'Keep'),
            )),
        'PYTHON': (python_tokenizer, (
            ('GOTOHTML', re.compile(r'\}\}'), 'color: red'),
            ('PUNC', re.compile(r'[-+*!|&^~/%\=<>\[\]{}(),.:]'),
             'font-weight: bold'),
            ('NUMBER',
             re.compile(r'0x[0-9a-fA-F]+|[+-]?\d+(\.\d+)?([eE][+-]\d+)?|\d+'
             ), 'color: red'),
            ('KEYWORD',
             re.compile(r'(def|class|break|continue|del|exec|finally|pass|'
              + r'print|raise|return|try|except|global|assert|lambda|'
              + r'yield|for|while|if|elif|else|and|in|is|not|or|import|'
              + r'from|True|False)(?![a-zA-Z0-9_])'),
             'color:#185369; font-weight: bold'),
            ('WEB2PY',
             re.compile(r'(request|response|session|cache|redirect|local_import|HTTP|TR|XML|URL|BEAUTIFY|A|BODY|BR|B|CAT|CENTER|CODE|DIV|EM|EMBED|FIELDSET|LEGEND|FORM|H1|H2|H3|H4|H5|H6|IFRAME|HEAD|HR|HTML|I|IMG|INPUT|LABEL|LI|LINK|MARKMIN|MENU|META|OBJECT|OL|ON|OPTION|P|PRE|SCRIPT|SELECT|SPAN|STYLE|TABLE|THEAD|TBODY|TFOOT|TAG|TD|TEXTAREA|TH|TITLE|TT|T|UL|XHTML|IS_SLUG|IS_STRONG|IS_LOWER|IS_UPPER|IS_ALPHANUMERIC|IS_DATETIME|IS_DATETIME_IN_RANGE|IS_DATE|IS_DATE_IN_RANGE|IS_DECIMAL_IN_RANGE|IS_EMAIL|IS_EXPR|IS_FLOAT_IN_RANGE|IS_IMAGE|IS_INT_IN_RANGE|IS_IN_SET|IS_IPV4|IS_LIST_OF|IS_LENGTH|IS_MATCH|IS_EQUAL_TO|IS_EMPTY_OR|IS_NULL_OR|IS_NOT_EMPTY|IS_TIME|IS_UPLOAD_FILENAME|IS_URL|CLEANUP|CRYPT|IS_IN_DB|IS_NOT_IN_DB|DAL|Field|SQLFORM|SQLTABLE|xmlescape|embed64)(?![a-zA-Z0-9_])'
             ), 'link:%(link)s;text-decoration:None;color:#FF5C1F;'),
            ('MAGIC', re.compile(r'self|None'),
             'color:#185369; font-weight: bold'),
            ('MULTILINESTRING', re.compile(r'r?u?(\'\'\'|""")'),
             'color: #FF9966'),
            ('STRING', re.compile(r'r?u?\'(.*?)(?<!\\)\'|"(.*?)(?<!\\)"'
             ), 'color: #FF9966'),
            ('IDENTIFIER', re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*'),
             None),
            ('COMMENT', re.compile(r'\#.*\r?\n'),
             'color: green; font-style: italic'),
            ('WHITESPACE', re.compile(r'[   \r\n]+'), 'Keep'),
            )),
        'PYTHONMultilineString': (python_tokenizer,
                                  (('ENDMULTILINESTRING',
                                  re.compile(r'.*?("""|\'\'\')',
                                  re.DOTALL), 'color: darkred'), )),
        'HTML': (html_tokenizer, (
            ('GOTOPYTHON', re.compile(r'\{\{'), 'color: red'),
            ('COMMENT', re.compile(r'<!--[^>]*-->|<!>'),
             'color: green; font-style: italic'),
            ('XMLCRAP', re.compile(r'<![^>]*>'),
             'color: blue; font-style: italic'),
            ('SCRIPT', re.compile(r'<script .*?</script>', re.IGNORECASE
              + re.DOTALL), 'color: black'),
            ('TAG', re.compile(r'</?\s*[a-zA-Z0-9]+'),
             'color: darkred; font-weight: bold'),
            ('ENDTAG', re.compile(r'/?>'),
             'color: darkred; font-weight: bold'),
            )),
        }

    def highlight(self, data):
        """
        Syntax highlight some python code.
        Returns html version of code.
        """

        i = 0
        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:
                    match = o_re.match(data, i)
                    if match:
                        if style:
                            new_mode = \
                                Highlighter.all_styles[mode][0](self,
                                    token, match, style
                                     % dict(link=self.link))
                        else:
                            new_mode = \
                                Highlighter.all_styles[mode][0](self,
                                    token, match, style)
                        if new_mode != None:
                            mode = new_mode
                        i += max(1, len(match.group()))
                        break
            else:
                self.change_style(None, None)
                self.output.append(data[i])
                i += 1
        self.change_style(None, None)
        return ''.join(self.output).expandtabs(4)

    def change_style(self, token, style):
        """
        Generate output to change from existing style to another style only.
        """

        if token in self.styles:
            style = self.styles[token]
        if self.span_style != style:
            if style != 'Keep':
                if self.span_style != None:
                    self.output.append('</span>')
                if style != None:
                    self.output.append('<span style="%s">' % style)
                self.span_style = style


def highlight(
    code,
    language,
    link='/examples/globals/vars/',
    counter=1,
    styles={},
    highlight_line=None,
    attributes={},
    ):
    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']

    if language and language.upper() in ['PYTHON', 'C', 'CPP', 'HTML',
            'WEB2PY']:
        code = Highlighter(language, link, styles).highlight(code)
    else:
        code = cgi.escape(code)
    lines = code.split('\n')

    if counter is None:
        linenumbers = [''] * len(lines)
    elif isinstance(counter, str):
        linenumbers = [cgi.escape(counter)] * len(lines)
    else:
        linenumbers = [str(i + counter) + '.' for i in
                               xrange(len(lines))]

    if highlight_line:
        if counter and not isinstance(counter, str):
            lineno = highlight_line - counter
        else:
            lineno = highlight_line
        if lineno<len(lines):
            lines[lineno] = '<div style="%s">%s</div>' % (linehighlight_style, lines[lineno])
            linenumbers[lineno] = '<div style="%s">%s</div>' % (linehighlight_style, linenumbers[lineno])

    code = '<br/>'.join(lines)
    numbers = '<br/>'.join(linenumbers)

    items = attributes.items()
    fa = ' '.join([key[1:].lower() for (key, value) in items if key[:1]
                   == '_' and value == None] + ['%s="%s"'
                   % (key[1:].lower(), str(value).replace('"', "'"))
                  for (key, value) in attributes.items() if key[:1]
                   == '_' and value])
    if fa:
        fa = ' ' + fa
    return '<table%s><tr valign="top"><td style="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__':
    import sys
    argfp = open(sys.argv[1])
    data = argfp.read()
    argfp.close()
    print '<html><body>' + highlight(data, sys.argv[2])\
         + '</body></html>'

Added gluon/html.py version [a67293b7f5].
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import cgi
import os
import re
import copy
import types
import urllib
import base64
import sanitizer
import rewrite
import itertools
import decoder
import copy_reg
import cPickle
import marshal
from HTMLParser import HTMLParser
from htmlentitydefs import name2codepoint
from contrib.markmin.markmin2html import render

from storage import Storage
from highlight import highlight
from utils import web2py_uuid, hmac_hash

import hmac
import hashlib

regex_crlf = re.compile('\r|\n')

join = ''.join

__all__ = [
    'A',
    'B',
    'BEAUTIFY',
    'BODY',
    'BR',
    'BUTTON',
    'CENTER',
    'CAT',
    'CODE',
    'DIV',
    'EM',
    'EMBED',
    'FIELDSET',
    'FORM',
    'H1',
    'H2',
    'H3',
    'H4',
    'H5',
    'H6',
    'HEAD',
    'HR',
    'HTML',
    'I',
    'IFRAME',
    'IMG',
    'INPUT',
    'LABEL',
    'LEGEND',
    'LI',
    'LINK',
    'OL',
    'UL',
    'MARKMIN',
    'MENU',
    'META',
    'OBJECT',
    'ON',
    'OPTION',
    'P',
    'PRE',
    'SCRIPT',
    'OPTGROUP',
    'SELECT',
    'SPAN',
    'STYLE',
    'TABLE',
    'TAG',
    'TD',
    'TEXTAREA',
    'TH',
    'THEAD',
    'TBODY',
    'TFOOT',
    'TITLE',
    'TR',
    'TT',
    'URL',
    'XHTML',
    'XML',
    'xmlescape',
    'embed64',
    ]


def xmlescape(data, quote = True):
    """
    returns an escaped string of the provided data

    :param data: the data to be escaped
    :param quote: optional (default False)
    """

    # first try the xml function
    if hasattr(data,'xml') and callable(data.xml):
        return data.xml()

    # otherwise, make it a string
    if not isinstance(data, (str, unicode)):
        data = str(data)
    elif isinstance(data, unicode):
        data = data.encode('utf8', 'xmlcharrefreplace')

    # ... and do the escaping
    data = cgi.escape(data, quote).replace("'","&#x27;")
    return data


def URL(
    a=None,
    c=None,
    f=None,
    r=None,
    args=[],
    vars={},
    anchor='',
    extension=None,
    env=None,
    hmac_key=None,
    hash_vars=True,
    salt=None,
    user_signature=None,
    scheme=None,
    host=None,
    port=None,
    ):
    """
    generate a URL

    example::

        >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
        ...     vars={'p':1, 'q':2}, anchor='1'))
        '/a/c/f/x/y/z?p=1&q=2#1'

        >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
        ...     vars={'p':(1,3), 'q':2}, anchor='1'))
        '/a/c/f/x/y/z?p=1&p=3&q=2#1'

        >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
        ...     vars={'p':(3,1), 'q':2}, anchor='1'))
        '/a/c/f/x/y/z?p=3&p=1&q=2#1'

        >>> str(URL(a='a', c='c', f='f', anchor='1+2'))
        '/a/c/f#1%2B2'

        >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'],
        ...     vars={'p':(1,3), 'q':2}, anchor='1', hmac_key='key'))
        '/a/c/f/x/y/z?p=1&p=3&q=2&_signature=5d06bb8a4a6093dd325da2ee591c35c61afbd3c6#1'

    generates a url '/a/c/f' corresponding to application a, controller c
    and function f. If r=request is passed, a, c, f are set, respectively,
    to r.application, r.controller, r.function.

    The more typical usage is:

    URL(r=request, f='index') that generates a url for the index function
    within the present application and controller.

    :param a: application (default to current if r is given)
    :param c: controller (default to current if r is given)
    :param f: function (default to current if r is given)
    :param r: request (optional)
    :param args: any arguments (optional)
    :param vars: any variables (optional)
    :param anchor: anchorname, without # (optional)
    :param hmac_key: key to use when generating hmac signature (optional)
    :param hash_vars: which of the vars to include in our hmac signature
        True (default) - hash all vars, False - hash none of the vars,
        iterable - hash only the included vars ['key1','key2']
    :param scheme: URI scheme (True, 'http' or 'https', etc); forces absolute URL (optional)
    :param host: string to force absolute URL with host (True means http_host)
    :param port: optional port number (forces absolute URL)

    :raises SyntaxError: when no application, controller or function is
        available
    :raises SyntaxError: when a CRLF is found in the generated url
    """

    if args in (None,[]): args = []
    vars = vars or {}
    application = None
    controller = None
    function = None

    if not r:
        if a and not c and not f: (f,a,c)=(a,c,f)
        elif a and c and not f: (c,f,a)=(a,c,f)
        from globals import current
        if hasattr(current,'request'):
            r = current.request
    if r:
        application = r.application
        controller = r.controller
        function = r.function
        env = r.env
        if extension is None and r.extension != 'html':
            extension = r.extension
    if a:
        application = a
    if c:
        controller = c
    if f:
        if not isinstance(f, str):
            function = f.__name__
        elif '.' in f:
            function, extension = f.split('.', 1)
        else:
            function = f

    function2 = '%s.%s' % (function,extension or 'html')

    if not (application and controller and function):
        raise SyntaxError, 'not enough information to build the url'

    if not isinstance(args, (list, tuple)):
        args = [args]
    other = args and urllib.quote('/' + '/'.join([str(x) for x in args])) or ''
    if other.endswith('/'):
        other += '/'    # add trailing slash to make last trailing empty arg explicit

    if vars.has_key('_signature'): vars.pop('_signature')
    list_vars = []
    for (key, vals) in sorted(vars.items()):
        if not isinstance(vals, (list, tuple)):
            vals = [vals]
        for val in vals:
            list_vars.append((key, val))

    if user_signature:
        from globals import current
        if current.session.auth:
            hmac_key = current.session.auth.hmac_key

    if hmac_key:
        # generate an hmac signature of the vars & args so can later
        # verify the user hasn't messed with anything

        h_args = '/%s/%s/%s%s' % (application, controller, function2, other)

        # how many of the vars should we include in our hash?
        if hash_vars is True:       # include them all
            h_vars = list_vars
        elif hash_vars is False:    # include none of them
            h_vars = ''
        else:                       # include just those specified
            if hash_vars and not isinstance(hash_vars, (list, tuple)):
                hash_vars = [hash_vars]
            h_vars = [(k, v) for (k, v) in list_vars if k in hash_vars]

        # re-assembling the same way during hash authentication
        message = h_args + '?' + urllib.urlencode(sorted(h_vars))

        sig = hmac_hash(message,hmac_key,salt=salt)
        # add the signature into vars
        list_vars.append(('_signature', sig))

    if list_vars:
        other += '?%s' % urllib.urlencode(list_vars)
    if anchor:
        other += '#' + urllib.quote(str(anchor))
    if extension:
        function += '.' + extension

    if regex_crlf.search(join([application, controller, function, other])):
        raise SyntaxError, 'CRLF Injection Detected'
    url = rewrite.url_out(r, env, application, controller, function,
                          args, other, scheme, host, port)
    return url


def verifyURL(request, hmac_key=None, hash_vars=True, salt=None, user_signature=None):
    """
    Verifies that a request's args & vars have not been tampered with by the user

    :param request: web2py's request object
    :param hmac_key: the key to authenticate with, must be the same one previously
                    used when calling URL()
    :param hash_vars: which vars to include in our hashing. (Optional)
                    Only uses the 1st value currently
                    True (or undefined) means all, False none,
                    an iterable just the specified keys

    do not call directly. Use instead:

    URL.verify(hmac_key='...')

    the key has to match the one used to generate the URL.

        >>> r = Storage()
        >>> gv = Storage(p=(1,3),q=2,_signature='5d06bb8a4a6093dd325da2ee591c35c61afbd3c6')
        >>> r.update(dict(application='a', controller='c', function='f'))
        >>> r['args'] = ['x', 'y', 'z']
        >>> r['get_vars'] = gv
        >>> verifyURL(r, 'key')
        True
        >>> verifyURL(r, 'kay')
        False
        >>> r.get_vars.p = (3, 1)
        >>> verifyURL(r, 'key')
        True
        >>> r.get_vars.p = (3, 2)
        >>> verifyURL(r, 'key')
        False

    """

    if not request.get_vars.has_key('_signature'):
        return False # no signature in the request URL

    # check if user_signature requires
    if user_signature:
        from globals import current
        if not current.session:
            return False
        hmac_key = current.session.auth.hmac_key
    if not hmac_key:
        return False

    # get our sig from request.get_vars for later comparison
    original_sig = request.get_vars._signature

    # now generate a new hmac for the remaining args & vars
    vars, args = request.get_vars, request.args

    # remove the signature var since it was not part of our signed message
    request.get_vars.pop('_signature')

    # join all the args & vars into one long string

    # always include all of the args
    other = args and urllib.quote('/' + '/'.join([str(x) for x in args])) or ''
    h_args = '/%s/%s/%s.%s%s' % (request.application,
                                 request.controller,
                                 request.function,
                                 request.extension,
                                 other)

    # but only include those vars specified (allows more flexibility for use with
    # forms or ajax)

    list_vars = []
    for (key, vals) in sorted(vars.items()):
        if not isinstance(vals, (list, tuple)):
            vals = [vals]
        for val in vals:
            list_vars.append((key, val))

    # which of the vars are to be included?
    if hash_vars is True:       # include them all
        h_vars = list_vars
    elif hash_vars is False:    # include none of them
        h_vars = ''
    else:                       # include just those specified
        # wrap in a try - if the desired vars have been removed it'll fail
        try:
            if hash_vars and not isinstance(hash_vars, (list, tuple)):
                hash_vars = [hash_vars]
            h_vars = [(k, v) for (k, v) in list_vars if k in hash_vars]
        except:
            # user has removed one of our vars! Immediate fail
            return False
    # build the full message string with both args & vars
    message = h_args + '?' + urllib.urlencode(sorted(h_vars))

    # hash with the hmac_key provided
    sig = hmac_hash(message,str(hmac_key),salt=salt)

    # put _signature back in get_vars just in case a second call to URL.verify is performed
    # (otherwise it'll immediately return false)
    request.get_vars['_signature'] = original_sig

    # return whether or not the signature in the request matched the one we just generated
    # (I.E. was the message the same as the one we originally signed)
    return original_sig == sig

URL.verify = verifyURL

ON = True


class XmlComponent(object):
    """
    Abstract root for all Html components
    """

    # TODO: move some DIV methods to here

    def xml(self):
        raise NotImplementedError


class XML(XmlComponent):
    """
    use it to wrap a string that contains XML/HTML so that it will not be
    escaped by the template

    example:

    >>> XML('<h1>Hello</h1>').xml()
    '<h1>Hello</h1>'
    """

    def __init__(
        self,
        text,
        sanitize = False,
        permitted_tags = [
            'a',
            'b',
            'blockquote',
            'br/',
            'i',
            'li',
            'ol',
            'ul',
            'p',
            'cite',
            'code',
            'pre',
            'img/',
            'h1','h2','h3','h4','h5','h6',
            'table','tr','td','div',
            ],
        allowed_attributes = {
            'a': ['href', 'title'],
            'img': ['src', 'alt'],
            'blockquote': ['type'],
            'td': ['colspan'],
            },
        ):
        """
        :param text: the XML text
        :param sanitize: sanitize text using the permitted tags and allowed
            attributes (default False)
        :param permitted_tags: list of permitted tags (default: simple list of
            tags)
        :param allowed_attributes: dictionary of allowed attributed (default
            for A, IMG and BlockQuote).
            The key is the tag; the value is a list of allowed attributes.
        """

        if sanitize:
            text = sanitizer.sanitize(text, permitted_tags,
                    allowed_attributes)
        if isinstance(text, unicode):
            text = text.encode('utf8', 'xmlcharrefreplace')
        elif not isinstance(text, str):
            text = str(text)
        self.text = text

    def xml(self):
        return self.text

    def __str__(self):
        return self.xml()

    def __add__(self,other):
        return '%s%s' % (self,other)

    def __radd__(self,other):
        return '%s%s' % (other,self)

    def __cmp__(self,other):
        return cmp(str(self),str(other))

    def __hash__(self):
        return hash(str(self))

    def __getattr__(self,name):
        return getattr(str(self),name)

    def __getitem__(self,i):
        return str(self)[i]

    def __getslice__(self,i,j):
        return str(self)[i:j]

    def __iter__(self):
        for c in str(self): yield c

    def __len__(self):
        return len(str(self))

    def flatten(self,render=None):
        """
        return the text stored by the XML object rendered by the render function
        """
        if render:
            return render(self.text,None,{})
        return self.text

    def elements(self, *args, **kargs):
        """
        to be considered experimental since the behavior of this method is questionable
        another options could be TAG(self.text).elements(*args,**kargs)
        """
        return []

### important to allow safe session.flash=T(....)
def XML_unpickle(data):
    return marshal.loads(data)
def XML_pickle(data):
    return XML_unpickle, (marshal.dumps(str(data)),)
copy_reg.pickle(XML, XML_pickle, XML_unpickle)



class DIV(XmlComponent):
    """
    HTML helper, for easy generating and manipulating a DOM structure.
    Little or no validation is done.

    Behaves like a dictionary regarding updating of attributes.
    Behaves like a list regarding inserting/appending components.

    example::

        >>> DIV('hello', 'world', _style='color:red;').xml()
        '<div style=\"color:red;\">helloworld</div>'

    all other HTML helpers are derived from DIV.

    _something=\"value\" attributes are transparently translated into
    something=\"value\" HTML attributes
    """

    # name of the tag, subclasses should update this
    # tags ending with a '/' denote classes that cannot
    # contain components
    tag = 'div'

    def __init__(self, *components, **attributes):
        """
        :param *components: any components that should be nested in this element
        :param **attributes: any attributes you want to give to this element

        :raises SyntaxError: when a stand alone tag receives components
        """

        if self.tag[-1:] == '/' and components:
            raise SyntaxError, '<%s> tags cannot have components'\
                 % self.tag
        if len(components) == 1 and isinstance(components[0], (list,tuple)):
            self.components = list(components[0])
        else:
            self.components = list(components)
        self.attributes = attributes
        self._fixup()
        # converts special attributes in components attributes
        self._postprocessing()
        self.parent = None
        for c in self.components:
            self._setnode(c)

    def update(self, **kargs):
        """
        dictionary like updating of the tag attributes
        """

        for (key, value) in kargs.items():
            self[key] = value
        return self

    def append(self, value):
        """
        list style appending of components

        >>> a=DIV()
        >>> a.append(SPAN('x'))
        >>> print a
        <div><span>x</span></div>
        """
        self._setnode(value)
        ret = self.components.append(value)
        self._fixup()
        return ret

    def insert(self, i, value):
        """
        list style inserting of components

        >>> a=DIV()
        >>> a.insert(0,SPAN('x'))
        >>> print a
        <div><span>x</span></div>
        """
        self._setnode(value)
        ret = self.components.insert(i, value)
        self._fixup()
        return ret

    def __getitem__(self, i):
        """
        gets attribute with name 'i' or component #i.
        If attribute 'i' is not found returns None

        :param i: index
           if i is a string: the name of the attribute
           otherwise references to number of the component
        """

        if isinstance(i, str):
            try:
                return self.attributes[i]
            except KeyError:
                return None
        else:
            return self.components[i]

    def __setitem__(self, i, value):
        """
        sets attribute with name 'i' or component #i.

        :param i: index
           if i is a string: the name of the attribute
           otherwise references to number of the component
        :param value: the new value
        """
        self._setnode(value)
        if isinstance(i, (str, unicode)):
            self.attributes[i] = value
        else:
            self.components[i] = value

    def __delitem__(self, i):
        """
        deletes attribute with name 'i' or component #i.

        :param i: index
           if i is a string: the name of the attribute
           otherwise references to number of the component
        """

        if isinstance(i, str):
            del self.attributes[i]
        else:
            del self.components[i]

    def __len__(self):
        """
        returns the number of included components
        """
        return len(self.components)

    def __nonzero__(self):
        """
        always return True
        """
        return True

    def _fixup(self):
        """
        Handling of provided components.

        Nothing to fixup yet. May be overridden by subclasses,
        eg for wrapping some components in another component or blocking them.
        """
        return

    def _wrap_components(self, allowed_parents,
                         wrap_parent = None,
                         wrap_lambda = None):
        """
        helper for _fixup. Checks if a component is in allowed_parents,
        otherwise wraps it in wrap_parent

        :param allowed_parents: (tuple) classes that the component should be an
            instance of
        :param wrap_parent: the class to wrap the component in, if needed
        :param wrap_lambda: lambda to use for wrapping, if needed

        """
        components = []
        for c in self.components:
            if isinstance(c, allowed_parents):
                pass
            elif wrap_lambda:
                c = wrap_lambda(c)
            else:
                c = wrap_parent(c)
            if isinstance(c,DIV):
                c.parent = self
            components.append(c)
        self.components = components

    def _postprocessing(self):
        """
        Handling of attributes (normally the ones not prefixed with '_').

        Nothing to postprocess yet. May be overridden by subclasses
        """
        return

    def _traverse(self, status, hideerror=False):
        # TODO: docstring
        newstatus = status
        for c in self.components:
            if hasattr(c, '_traverse') and callable(c._traverse):
                c.vars = self.vars
                c.request_vars = self.request_vars
                c.errors = self.errors
                c.latest = self.latest
                c.session = self.session
                c.formname = self.formname
                c['hideerror']=hideerror
                newstatus = c._traverse(status,hideerror) and newstatus

        # for input, textarea, select, option
        # deal with 'value' and 'validation'

        name = self['_name']
        if newstatus:
            newstatus = self._validate()
            self._postprocessing()
        elif 'old_value' in self.attributes:
            self['value'] = self['old_value']
            self._postprocessing()
        elif name and name in self.vars:
            self['value'] = self.vars[name]
            self._postprocessing()
        if name:
            self.latest[name] = self['value']
        return newstatus

    def _validate(self):
        """
        nothing to validate yet. May be overridden by subclasses
        """
        return True

    def _setnode(self,value):
        if isinstance(value,DIV):
            value.parent = self

    def _xml(self):
        """
        helper for xml generation. Returns separately:
        - the component attributes
        - the generated xml of the inner components

        Component attributes start with an underscore ('_') and
        do not have a False or None value. The underscore is removed.
        A value of True is replaced with the attribute name.

        :returns: tuple: (attributes, components)
        """

        # get the attributes for this component
        # (they start with '_', others may have special meanings)
        fa = ''
        for key in sorted(self.attributes):
            value = self[key]
            if key[:1] != '_':
                continue
            name = key[1:]
            if value is True:
                value = name
            elif value is False or value is None:
                continue
            fa += ' %s="%s"' % (name, xmlescape(value, True))

        # get the xml for the inner components
        co = join([xmlescape(component) for component in
                     self.components])

        return (fa, co)

    def xml(self):
        """
        generates the xml for this component.
        """

        (fa, co) = self._xml()

        if not self.tag:
            return co

        if self.tag[-1:] == '/':
            # <tag [attributes] />
            return '<%s%s />' % (self.tag[:-1], fa)

        # else: <tag [attributes]>  inner components xml </tag>
        return '<%s%s>%s</%s>' % (self.tag, fa, co, self.tag)

    def __str__(self):
        """
        str(COMPONENT) returns equals COMPONENT.xml()
        """

        return self.xml()

    def flatten(self, render=None):
        """
        return the text stored by the DIV object rendered by the render function
        the render function must take text, tagname, and attributes
        render=None is equivalent to render=lambda text, tag, attr: text

        >>> markdown = lambda text,tag=None,attributes={}: \
                        {None: re.sub('\s+',' ',text), \
                         'h1':'#'+text+'\\n\\n', \
                         'p':text+'\\n'}.get(tag,text)
        >>> a=TAG('<h1>Header</h1><p>this is a     test</p>')
        >>> a.flatten(markdown)
        '#Header\\n\\nthis is a test\\n'
        """

        text = ''
        for c in self.components:
            if isinstance(c,XmlComponent):
                s=c.flatten(render)
            elif render:
                s=render(str(c))
            else:
                s=str(c)
            text+=s
        if render:
            text = render(text,self.tag,self.attributes)
        return text

    regex_tag=re.compile('^[\w\-\:]+')
    regex_id=re.compile('#([\w\-]+)')
    regex_class=re.compile('\.([\w\-]+)')
    regex_attr=re.compile('\[([\w\-\:]+)=(.*?)\]')


    def elements(self, *args, **kargs):
        """
        find all component that match the supplied attribute dictionary,
        or None if nothing could be found

        All components of the components are searched.

        >>> a = DIV(DIV(SPAN('x'),3,DIV(SPAN('y'))))
        >>> for c in a.elements('span',first_only=True): c[0]='z'
        >>> print a
        <div><div><span>z</span>3<div><span>y</span></div></div></div>
        >>> for c in a.elements('span'): c[0]='z'
        >>> print a
        <div><div><span>z</span>3<div><span>z</span></div></div></div>

        It also supports a syntax compatible with jQuery

        >>> a=TAG('<div><span><a id="1-1" u:v=$>hello</a></span><p class="this is a test">world</p></div>')
        >>> for e in a.elements('div a#1-1, p.is'): print e.flatten()
        hello
        world
        >>> for e in a.elements('#1-1'): print e.flatten()
        hello
        >>> a.elements('a[u:v=$]')[0].xml()
        '<a id="1-1" u:v="$">hello</a>'

        >>> a=FORM( INPUT(_type='text'), SELECT(range(1)), TEXTAREA() )
        >>> for c in a.elements('input, select, textarea'): c['_disabled'] = 'disabled'
        >>> a.xml()
        '<form action="" enctype="multipart/form-data" method="post"><input disabled="disabled" type="text" /><select disabled="disabled"><option value="0">0</option></select><textarea cols="40" disabled="disabled" rows="10"></textarea></form>'
        """
        if len(args)==1:
            args = [a.strip() for a in args[0].split(',')]
        if len(args)>1:
            subset = [self.elements(a,**kargs) for a in args]
            return reduce(lambda a,b:a+b,subset,[])
        elif len(args)==1:
            items = args[0].split()
            if len(items)>1:
                subset=[a.elements(' '.join(items[1:]),**kargs) for a in self.elements(items[0])]
                return reduce(lambda a,b:a+b,subset,[])
            else:
                item=items[0]
                if '#' in item or '.' in item or '[' in item:
                    match_tag = self.regex_tag.search(item)
                    match_id = self.regex_id.search(item)
                    match_class = self.regex_class.search(item)
                    match_attr = self.regex_attr.finditer(item)
                    args = []
                    if match_tag: args = [match_tag.group()]
                    if match_id: kargs['_id'] = match_id.group(1)
                    if match_class: kargs['_class'] = re.compile('(?<!\w)%s(?!\w)' % \
                       match_class.group(1).replace('-','\\-').replace(':','\\:'))
                    for item in match_attr:
                        kargs['_'+item.group(1)]=item.group(2)
                    return self.elements(*args,**kargs)
        # make a copy of the components
        matches = []
        first_only = False
        if kargs.has_key("first_only"):
            first_only = kargs["first_only"]
            del kargs["first_only"]
        # check if the component has an attribute with the same
        # value as provided
        check = True
        tag = getattr(self,'tag').replace("/","")
        if args and tag not in args:
            check = False
        for (key, value) in kargs.items():
            if isinstance(value,(str,int)):
                if self[key] != str(value):
                    check = False
            elif key in self.attributes:
                if not value.search(str(self[key])):
                    check = False
            else:
                check = False
        if 'find' in kargs:
            find = kargs['find']
            for c in self.components:
                if isinstance(find,(str,int)):
                    if isinstance(c,str) and str(find) in c:
                        check = True
                else:
                    if isinstance(c,str) and find.search(c):
                        check = True
        # if found, return the component
        if check:
            matches.append(self)
            if first_only:
                return matches
        # loop the copy
        for c in self.components:
            if isinstance(c, XmlComponent):
                kargs['first_only'] = first_only
                child_matches = c.elements( *args,  **kargs )
                if first_only  and len(child_matches) != 0:
                    return child_matches
                matches.extend( child_matches )
        return matches


    def element(self, *args, **kargs):
        """
        find the first component that matches the supplied attribute dictionary,
        or None if nothing could be found

        Also the components of the components are searched.
        """
        kargs['first_only'] = True
        elements = self.elements(*args, **kargs)
        if not elements:
            # we found nothing
            return None
        return elements[0]

    def siblings(self,*args,**kargs):
        """
        find all sibling components that match the supplied argument list
        and attribute dictionary, or None if nothing could be found
        """
        sibs = [s for s in self.parent.components if not s == self]
        matches = []
        first_only = False
        if kargs.has_key("first_only"):
            first_only = kargs["first_only"]
            del kargs["first_only"]
        for c in sibs:
            try:
                check = True
                tag = getattr(c,'tag').replace("/","")
                if args and tag not in args:
                        check = False
                for (key, value) in kargs.items():
                    if c[key] != value:
                            check = False
                if check:
                    matches.append(c)
                    if first_only: break
            except:
                pass
        return matches

    def sibling(self,*args,**kargs):
        """
        find the first sibling component that match the supplied argument list
        and attribute dictionary, or None if nothing could be found
        """
        kargs['first_only'] = True
        sibs = self.siblings(*args, **kargs)
        if not sibs:
            return None
        return sibs[0]

class CAT(DIV):
    
    tag = ''

def TAG_unpickler(data):
    return cPickle.loads(data)

def TAG_pickler(data):
    d = DIV()
    d.__dict__ = data.__dict__
    marshal_dump = cPickle.dumps(d)
    return (TAG_unpickler, (marshal_dump,))

class __TAG__(XmlComponent):

    """
    TAG factory example::

        >>> print TAG.first(TAG.second('test'), _key = 3)
        <first key=\"3\"><second>test</second></first>

    """

    def __getitem__(self, name):
        return self.__getattr__(name)

    def __getattr__(self, name):
        if name[-1:] == '_':
            name = name[:-1] + '/'
        if isinstance(name,unicode):
            name = name.encode('utf-8')
        class __tag__(DIV):
            tag = name
        copy_reg.pickle(__tag__, TAG_pickler, TAG_unpickler)
        return lambda *a, **b: __tag__(*a, **b)

    def __call__(self,html):
        return web2pyHTMLParser(decoder.decoder(html)).tree

TAG = __TAG__()


class HTML(DIV):
    """
    There are four predefined document type definitions.
    They can be specified in the 'doctype' parameter:

    -'strict' enables strict doctype
    -'transitional' enables transitional doctype (default)
    -'frameset' enables frameset doctype
    -'html5' enables HTML 5 doctype
    -any other string will be treated as user's own doctype

    'lang' parameter specifies the language of the document.
    Defaults to 'en'.

    See also :class:`DIV`
    """

    tag = 'html'

    strict = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n'
    transitional = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'
    frameset = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\n'
    html5 = '<!DOCTYPE HTML>\n'

    def xml(self):
        lang = self['lang']
        if not lang:
            lang = 'en'
        self.attributes['_lang'] = lang
        doctype = self['doctype']
        if doctype:
            if doctype == 'strict':
                doctype = self.strict
            elif doctype == 'transitional':
                doctype = self.transitional
            elif doctype == 'frameset':
                doctype = self.frameset
            elif doctype == 'html5':
                doctype = self.html5
            else:
                doctype = '%s\n' % doctype
        else:
            doctype = self.transitional
        (fa, co) = self._xml()
        return '%s<%s%s>%s</%s>' % (doctype, self.tag, fa, co, self.tag)

class XHTML(DIV):
    """
    This is XHTML version of the HTML helper.

    There are three predefined document type definitions.
    They can be specified in the 'doctype' parameter:

    -'strict' enables strict doctype
    -'transitional' enables transitional doctype (default)
    -'frameset' enables frameset doctype
    -any other string will be treated as user's own doctype

    'lang' parameter specifies the language of the document and the xml document.
    Defaults to 'en'.

    'xmlns' parameter specifies the xml namespace.
    Defaults to 'http://www.w3.org/1999/xhtml'.

    See also :class:`DIV`
    """

    tag = 'html'

    strict = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'
    transitional = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'
    frameset = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n'
    xmlns = 'http://www.w3.org/1999/xhtml'

    def xml(self):
        xmlns = self['xmlns']
        if xmlns:
            self.attributes['_xmlns'] = xmlns
        else:
            self.attributes['_xmlns'] = self.xmlns
        lang = self['lang']
        if not lang:
            lang = 'en'
        self.attributes['_lang'] = lang
        self.attributes['_xml:lang'] = lang
        doctype = self['doctype']
        if doctype:
            if doctype == 'strict':
                doctype = self.strict
            elif doctype == 'transitional':
                doctype = self.transitional
            elif doctype == 'frameset':
                doctype = self.frameset
            else:
                doctype = '%s\n' % doctype
        else:
            doctype = self.transitional
        (fa, co) = self._xml()
        return '%s<%s%s>%s</%s>' % (doctype, self.tag, fa, co, self.tag)


class HEAD(DIV):

    tag = 'head'

class TITLE(DIV):

    tag = 'title'


class META(DIV):

    tag = 'meta/'


class LINK(DIV):

    tag = 'link/'


class SCRIPT(DIV):

    tag = 'script'

    def xml(self):
        (fa, co) = self._xml()
        # no escaping of subcomponents
        co = '\n'.join([str(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)
        else:
            return DIV.xml(self)


class STYLE(DIV):

    tag = 'style'

    def xml(self):
        (fa, co) = self._xml()
        # no escaping of subcomponents
        co = '\n'.join([str(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)
        else:
            return DIV.xml(self)


class IMG(DIV):

    tag = 'img/'


class SPAN(DIV):

    tag = 'span'


class BODY(DIV):

    tag = 'body'


class H1(DIV):

    tag = 'h1'


class H2(DIV):

    tag = 'h2'


class H3(DIV):

    tag = 'h3'


class H4(DIV):

    tag = 'h4'


class H5(DIV):

    tag = 'h5'


class H6(DIV):

    tag = 'h6'


class P(DIV):
    """
    Will replace ``\\n`` by ``<br />`` if the `cr2br` attribute is provided.

    see also :class:`DIV`
    """

    tag = 'p'

    def xml(self):
        text = DIV.xml(self)
        if self['cr2br']:
            text = text.replace('\n', '<br />')
        return text


class B(DIV):

    tag = 'b'


class BR(DIV):

    tag = 'br/'


class HR(DIV):

    tag = 'hr/'


class A(DIV):

    tag = 'a'

    def xml(self):
        if self['callback']:
            self['_onclick']="ajax('%s',[],'%s');return false;" % \
                (self['callback'],self['target'] or '')
            self['_href'] = self['_href'] or '#null'
        elif self['cid']:
            self['_onclick']='web2py_component("%s","%s");return false;' % \
                (self['_href'],self['cid'])
        return DIV.xml(self)


class BUTTON(DIV):
    
    tag = 'button'


class EM(DIV):

    tag = 'em'


class EMBED(DIV):

    tag = 'embed/'


class TT(DIV):

    tag = 'tt'


class PRE(DIV):

    tag = 'pre'


class CENTER(DIV):

    tag = 'center'


class CODE(DIV):

    """
    displays code in HTML with syntax highlighting.

    :param attributes: optional attributes:

        - language: indicates the language, otherwise PYTHON is assumed
        - link: can provide a link
        - styles: for styles

    Example::

        {{=CODE(\"print 'hello world'\", language='python', link=None,
            counter=1, styles={}, highlight_line=None)}}


    supported languages are \"python\", \"html_plain\", \"c\", \"cpp\",
    \"web2py\", \"html\".
    The \"html\" language interprets {{ and }} tags as \"web2py\" code,
    \"html_plain\" doesn't.

    if a link='/examples/global/vars/' is provided web2py keywords are linked to
    the online docs.

    the counter is used for line numbering, counter can be None or a prompt
    string.
    """

    def xml(self):
        language = self['language'] or 'PYTHON'
        link = self['link']
        counter = self.attributes.get('counter', 1)
        highlight_line = self.attributes.get('highlight_line', None)
        styles = self['styles'] or {}
        return highlight(
            join(self.components),
            language=language,
            link=link,
            counter=counter,
            styles=styles,
            attributes=self.attributes,
            highlight_line=highlight_line,
            )


class LABEL(DIV):

    tag = 'label'


class LI(DIV):

    tag = 'li'


class UL(DIV):
    """
    UL Component.

    If subcomponents are not LI-components they will be wrapped in a LI

    see also :class:`DIV`
    """

    tag = 'ul'

    def _fixup(self):
        self._wrap_components(LI, LI)


class OL(UL):

    tag = 'ol'


class TD(DIV):

    tag = 'td'


class TH(DIV):

    tag = 'th'


class TR(DIV):
    """
    TR Component.

    If subcomponents are not TD/TH-components they will be wrapped in a TD

    see also :class:`DIV`
    """

    tag = 'tr'

    def _fixup(self):
        self._wrap_components((TD, TH), TD)

class THEAD(DIV):

    tag = 'thead'

    def _fixup(self):
        self._wrap_components(TR, TR)


class TBODY(DIV):

    tag = 'tbody'

    def _fixup(self):
        self._wrap_components(TR, TR)


class TFOOT(DIV):

    tag = 'tfoot'

    def _fixup(self):
        self._wrap_components(TR, TR)


class COL(DIV):

    tag = 'col'


class COLGROUP(DIV):

    tag = 'colgroup'


class TABLE(DIV):
    """
    TABLE Component.

    If subcomponents are not TR/TBODY/THEAD/TFOOT-components
    they will be wrapped in a TR

    see also :class:`DIV`
    """

    tag = 'table'

    def _fixup(self):
        self._wrap_components((TR, TBODY, THEAD, TFOOT, COL, COLGROUP), TR)

class I(DIV):

    tag = 'i'

class IFRAME(DIV):

    tag = 'iframe'


class INPUT(DIV):

    """
        INPUT Component

        examples::

            >>> INPUT(_type='text', _name='name', value='Max').xml()
            '<input name=\"name\" type=\"text\" value=\"Max\" />'

            >>> INPUT(_type='checkbox', _name='checkbox', value='on').xml()
            '<input checked=\"checked\" name=\"checkbox\" type=\"checkbox\" value=\"on\" />'

            >>> INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()
            '<input checked=\"checked\" name=\"radio\" type=\"radio\" value=\"yes\" />'

            >>> INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()
            '<input name=\"radio\" type=\"radio\" value=\"no\" />'

        the input helper takes two special attributes value= and requires=.

        :param value: used to pass the initial value for the input field.
            value differs from _value because it works for checkboxes, radio,
            textarea and select/option too.

            - for a checkbox value should be '' or 'on'.
            - for a radio or select/option value should be the _value
                of the checked/selected item.

        :param requires: should be None, or a validator or a list of validators
            for the value of the field.
        """

    tag = 'input/'

    def _validate(self):

        # # this only changes value, not _value

        name = self['_name']
        if name is None or name == '':
            return True
        name = str(name)

        if self['_type'] != 'checkbox':
            self['old_value'] = self['value'] or self['_value'] or ''
            value = self.request_vars.get(name, '')
            self['value'] = value
        else:
            self['old_value'] = self['value'] or False
            value = self.request_vars.get(name)
            if isinstance(value, (tuple, list)):
                self['value'] = self['_value'] in value
            else:
                self['value'] = self['_value'] == value
        requires = self['requires']
        if requires:
            if not isinstance(requires, (list, tuple)):
                requires = [requires]
            for validator in requires:
                (value, errors) = validator(value)
                if errors != None:
                    self.vars[name] = value
                    self.errors[name] = errors
                    break
        if not name in self.errors:
            self.vars[name] = value
            return True
        return False

    def _postprocessing(self):
        t = self['_type']
        if not t:
            t = self['_type'] = 'text'
        t = t.lower()
        value = self['value']
        if self['_value'] == None:
            _value = None
        else:
            _value = str(self['_value'])
        if t == 'checkbox':
            if not _value:
                _value = self['_value'] = 'on'
            if not value:
                value = []
            elif value is True:
                value = [_value]
            elif not isinstance(value,(list,tuple)):
                value = str(value).split('|')
            self['_checked'] = _value in value and 'checked' or None
        elif t == 'radio':
            if str(value) == str(_value):
                self['_checked'] = 'checked'
            else:
                self['_checked'] = None
        elif t == 'text' or t == 'hidden':
            if value != None:
                self['_value'] = value
            else:
                self['value'] = _value

    def xml(self):
        name = self.attributes.get('_name', None)
        if name and hasattr(self, 'errors') \
                and self.errors.get(name, None) \
                and self['hideerror'] != True:
            return DIV.xml(self) + DIV(self.errors[name], _class='error',
                errors=None, _id='%s__error' % name).xml()
        else:
            return DIV.xml(self)


class TEXTAREA(INPUT):

    """
    example::

        TEXTAREA(_name='sometext', value='blah '*100, requires=IS_NOT_EMPTY())

    'blah blah blah ...' will be the content of the textarea field.
    """

    tag = 'textarea'

    def _postprocessing(self):
        if not '_rows' in self.attributes:
            self['_rows'] = 10
        if not '_cols' in self.attributes:
            self['_cols'] = 40
        if self['value'] != None:
            self.components = [self['value']]
        elif self.components:
            self['value'] = self.components[0]


class OPTION(DIV):

    tag = 'option'

    def _fixup(self):
        if not '_value' in self.attributes:
            self.attributes['_value'] = str(self.components[0])


class OBJECT(DIV):

    tag = 'object'

class OPTGROUP(DIV):

    tag = 'optgroup'

    def _fixup(self):
        components = []
        for c in self.components:
            if isinstance(c, OPTION):
                components.append(c)
            else:
                components.append(OPTION(c, _value=str(c)))
        self.components = components


class SELECT(INPUT):

    """
    example::

        >>> from validators import IS_IN_SET
        >>> SELECT('yes', 'no', _name='selector', value='yes',
        ...    requires=IS_IN_SET(['yes', 'no'])).xml()
        '<select name=\"selector\"><option selected=\"selected\" value=\"yes\">yes</option><option value=\"no\">no</option></select>'

    """

    tag = 'select'

    def _fixup(self):
        components = []
        for c in self.components:
            if isinstance(c, (OPTION, OPTGROUP)):
                components.append(c)
            else:
                components.append(OPTION(c, _value=str(c)))
        self.components = components

    def _postprocessing(self):
        component_list = []
        for c in self.components:
            if isinstance(c, OPTGROUP):
                component_list.append(c.components)
            else:
                component_list.append([c])
        options = itertools.chain(*component_list)

        value = self['value']
        if value != None:
            if not self['_multiple']:
                for c in options: # my patch
                    if value and str(c['_value'])==str(value):
                        c['_selected'] = 'selected'
                    else:
                        c['_selected'] = None
            else:
                if isinstance(value,(list,tuple)):
                    values = [str(item) for item in value]
                else:
                    values = [str(value)]
                for c in options: # my patch
                    if value and str(c['_value']) in values:
                        c['_selected'] = 'selected'
                    else:
                        c['_selected'] = None


class FIELDSET(DIV):

    tag = 'fieldset'


class LEGEND(DIV):

    tag = 'legend'


class FORM(DIV):

    """
    example::

        >>> from validators import IS_NOT_EMPTY
        >>> form=FORM(INPUT(_name=\"test\", requires=IS_NOT_EMPTY()))
        >>> form.xml()
        '<form action=\"\" enctype=\"multipart/form-data\" method=\"post\"><input name=\"test\" type=\"text\" /></form>'

    a FORM is container for INPUT, TEXTAREA, SELECT and other helpers

    form has one important method::

        form.accepts(request.vars, session)

    if form is accepted (and all validators pass) form.vars contains the
    accepted vars, otherwise form.errors contains the errors.
    in case of errors the form is modified to present the errors to the user.
    """

    tag = 'form'

    def __init__(self, *components, **attributes):
        DIV.__init__(self, *components,  **attributes)
        self.vars = Storage()
        self.errors = Storage()
        self.latest = Storage()

    def accepts(
        self,
        vars,
        session=None,
        formname='default',
        keepvalues=False,
        onvalidation=None,
        hideerror=False,
        ):
        if vars.__class__.__name__ == 'Request':
            vars=vars.post_vars
        self.errors.clear()
        self.request_vars = Storage()
        self.request_vars.update(vars)
        self.session = session
        self.formname = formname
        self.keepvalues = keepvalues

        # if this tag is a form and we are in accepting mode (status=True)
        # check formname and formkey

        status = True
        if self.session:
            formkey = self.session.get('_formkey[%s]' % self.formname, None)
            # check if user tampering with form and void CSRF
            if formkey != self.request_vars._formkey:
                status = False
        if self.formname != self.request_vars._formname:
            status = False
        if status and self.session:
            # check if editing a record that has been modified by the server
            if hasattr(self,'record_hash') and self.record_hash != formkey:
                status = False
                self.record_changed = True
        status = self._traverse(status,hideerror)
        if onvalidation:
            if isinstance(onvalidation, dict):
                onsuccess = onvalidation.get('onsuccess', None)
                onfailure = onvalidation.get('onfailure', None)
                if onsuccess and status:
                    onsuccess(self)
                if onfailure and vars and not status:
                    onfailure(self)
                    status = len(self.errors) == 0
            elif status:
                if isinstance(onvalidation, (list, tuple)):
                    [f(self) for f in onvalidation]
                else:
                    onvalidation(self)
        if self.errors:
            status = False
        if session != None:
            if hasattr(self,'record_hash'):
                formkey = self.record_hash
            else:
                formkey = web2py_uuid()
            self.formkey = session['_formkey[%s]' % formname] = formkey
        if status and not keepvalues:
            self._traverse(False,hideerror)
        return status

    def _postprocessing(self):
        if not '_action' in self.attributes:
            self['_action'] = ''
        if not '_method' in self.attributes:
            self['_method'] = 'post'
        if not '_enctype' in self.attributes:
            self['_enctype'] = 'multipart/form-data'

    def hidden_fields(self):
        c = []
        if 'hidden' in self.attributes:
            for (key, value) in self.attributes.get('hidden',{}).items():
                c.append(INPUT(_type='hidden', _name=key, _value=value))

        if hasattr(self, 'formkey') and self.formkey:
            c.append(INPUT(_type='hidden', _name='_formkey',
                     _value=self.formkey))
        if hasattr(self, 'formname') and self.formname:
            c.append(INPUT(_type='hidden', _name='_formname',
                     _value=self.formname))
        return DIV(c, _class="hidden")

    def xml(self):
        newform = FORM(*self.components, **self.attributes)
        hidden_fields = self.hidden_fields()
        if hidden_fields.components:
            newform.append(hidden_fields)
        return DIV.xml(newform)

    def validate(self, 
                 values=None,
                 session=None, 
                 formname='default',
                 keepvalues=False,
                 onvalidation=None,
                 hideerror=False,
                 onsuccess='flash',
                 onfailure='flash',
                 message_onsuccess=None, 
                 message_onfailure=None, 
                 ):
        """
        This function validates the form, 
        you can use it instead of directly form.accepts.

        Usage:
        In controller

        def action():
            form=FORM(INPUT(_name=\"test\", requires=IS_NOT_EMPTY()))
            form.validate() #you can pass some args here - see below
            return dict(form=form)

        This can receive a bunch of arguments        

        onsuccess = 'flash' - will show message_onsuccess in response.flash
                    None - will do nothing
                    can be a function (lambda form: pass)
        onfailure = 'flash' - will show message_onfailure in response.flash
                    None - will do nothing
                    can be a function (lambda form: pass)

        values = values to test the validation - dictionary, response.vars, session or other - Default to (request.vars, session)
        message_onsuccess
        message_onfailure
        """
        from gluon import current
        if not session: session = current.session
        if not values: values = current.request.post_vars
         
        message_onsuccess = message_onsuccess or current.T("Success!")
        message_onfailure = message_onfailure or \
            current.T("Errors in form, please check it out.")

        if self.accepts(values, session):
            if onsuccess == 'flash':
                current.response.flash = message_onsuccess
            elif callable(onsuccess):
                onsuccess(self)
            return True
        elif self.errors:
            if onfailure == 'flash':
                current.response.flash = message_onfailure
            elif callable(onfailure):
                onfailure(self)
            return False

    def process(self, values=None, session=None, **args):
        """
        Perform the .validate() method but returns the form

        Usage in controllers:
        # directly on return
        def action():
            #some code here
            return dict(form=FORM(...).process(...))

        You can use it with FORM, SQLFORM or FORM based plugins

        Examples:
        #response.flash messages
        def action():
            form = SQLFORM(db.table).process(message_onsuccess='Sucess!')
            retutn dict(form=form)

        # callback function
        # callback receives True or False as first arg, and a list of args.
        def my_callback(status, msg):
           response.flash = "Success! "+msg if status else "Errors occured"

        # after argument can be 'flash' to response.flash messages
        # or a function name to use as callback or None to do nothing.
        def action():
            return dict(form=SQLFORM(db.table).process(onsuccess=my_callback)
        """ 
        self.validate(values=values, session=session, **args)
        return self


class BEAUTIFY(DIV):

    """
    example::

        >>> BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
        '<div><table><tr><td><div>a</div></td></tr><tr><td><div>b</div></td></tr><tr><td><div><table><tr><td style="font-weight:bold;">hello</td><td valign="top">:</td><td><div>world</div></td></tr></table></div></td></tr></table></div>'

    turns any list, dictionary, etc into decent looking html.
    Two special attributes are
    :sorted: a function that takes the dict and returned sorted keys
    :keyfilter: a funciton that takes a key and returns its representation
                or None if the key is to be skipped. By default key[:1]=='_' is skipped.
    """

    tag = 'div'

    @staticmethod
    def no_underscore(key):
        if key[:1]=='_':
            return None
        return key

    def __init__(self, component, **attributes):
        self.components = [component]
        self.attributes = attributes
        sorter = attributes.get('sorted',sorted)
        keyfilter = attributes.get('keyfilter',BEAUTIFY.no_underscore)
        components = []
        attributes = copy.copy(self.attributes)
        level = attributes['level'] = attributes.get('level',6) - 1
        if '_class' in attributes:
            attributes['_class'] += 'i'
        if level == 0:
            return
        for c in self.components:
            if hasattr(c,'xml') and callable(c.xml):
                components.append(c)
                continue
            elif hasattr(c,'keys') and callable(c.keys):
                rows = []
                try:
                    keys = (sorter and sorter(c)) or c
                    for key in keys:
                        if isinstance(key,(str,unicode)) and keyfilter:
                            filtered_key = keyfilter(key)
                        else:
                            filtered_key = str(key)
                        if filtered_key is None:
                            continue
                        value = c[key]
                        if type(value) == types.LambdaType:
                            continue
                        rows.append(TR(TD(filtered_key, _style='font-weight:bold;'),
                                       TD(':',_valign='top'),
                                       TD(BEAUTIFY(value, **attributes))))
                    components.append(TABLE(*rows, **attributes))
                    continue
                except:
                    pass
            if isinstance(c, str):
                components.append(str(c))
            elif isinstance(c, unicode):
                components.append(c.encode('utf8'))
            elif isinstance(c, (list, tuple)):
                items = [TR(TD(BEAUTIFY(item, **attributes)))
                         for item in c]
                components.append(TABLE(*items, **attributes))
            elif isinstance(c, cgi.FieldStorage):
                components.append('FieldStorage object')
            else:
                components.append(repr(c))
        self.components = components


class MENU(DIV):
    """
    Used to build menus

    Optional arguments
      _class: defaults to 'web2py-menu web2py-menu-vertical'
      ul_class: defaults to 'web2py-menu-vertical'
      li_class: defaults to 'web2py-menu-expand'

    Example:
        menu = MENU([['name', False, URL(...), [submenu]], ...])
        {{=menu}}
    """

    tag = 'ul'

    def __init__(self, data, **args):
        self.data = data
        self.attributes = args
        if not '_class' in self.attributes:
            self['_class'] = 'web2py-menu web2py-menu-vertical'
        if not 'ul_class' in self.attributes:
            self['ul_class'] = 'web2py-menu-vertical'
        if not 'li_class' in self.attributes:
            self['li_class'] = 'web2py-menu-expand'
        if not 'li_active' in self.attributes:
            self['li_active'] = 'web2py-menu-active'

    def serialize(self, data, level=0):
        if level == 0:
            ul = UL(**self.attributes)
        else:
            ul = UL(_class=self['ul_class'])
        for item in data:
            (name, active, link) = item[:3]
            if isinstance(link,DIV):
                li = LI(link)
            elif 'no_link_url' in self.attributes and self['no_link_url']==link:
                li = LI(DIV(name))
            elif link:
                li = LI(A(name, _href=link))
            else:
                li = LI(A(name, _href='#',
                          _onclick='javascript:void(0);return false;'))
            if len(item) > 3 and item[3]:
                li['_class'] = self['li_class']
                li.append(self.serialize(item[3], level+1))
            if active or ('active_url' in self.attributes and self['active_url']==link):
                if li['_class']:
                    li['_class'] = li['_class']+' '+self['li_active']
                else:
                    li['_class'] = self['li_active']
            ul.append(li)
        return ul

    def xml(self):
        return self.serialize(self.data, 0).xml()


def embed64(
    filename = None,
    file = None,
    data = None,
    extension = 'image/gif',
    ):
    """
    helper to encode the provided (binary) data into base64.

    :param filename: if provided, opens and reads this file in 'rb' mode
    :param file: if provided, reads this file
    :param data: if provided, uses the provided data
    """

    if filename and os.path.exists(file):
        fp = open(filename, 'rb')
        data = fp.read()
        fp.close()
    data = base64.b64encode(data)
    return 'data:%s;base64,%s' % (extension, data)


def test():
    """
    Example:

    >>> from validators import *
    >>> print DIV(A('click me', _href=URL(a='a', c='b', f='c')), BR(), HR(), DIV(SPAN(\"World\"), _class='unknown')).xml()
    <div><a href=\"/a/b/c\">click me</a><br /><hr /><div class=\"unknown\"><span>World</span></div></div>
    >>> print DIV(UL(\"doc\",\"cat\",\"mouse\")).xml()
    <div><ul><li>doc</li><li>cat</li><li>mouse</li></ul></div>
    >>> print DIV(UL(\"doc\", LI(\"cat\", _class='feline'), 18)).xml()
    <div><ul><li>doc</li><li class=\"feline\">cat</li><li>18</li></ul></div>
    >>> print TABLE(['a', 'b', 'c'], TR('d', 'e', 'f'), TR(TD(1), TD(2), TD(3))).xml()
    <table><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>d</td><td>e</td><td>f</td></tr><tr><td>1</td><td>2</td><td>3</td></tr></table>
    >>> form=FORM(INPUT(_type='text', _name='myvar', requires=IS_EXPR('int(value)<10')))
    >>> print form.xml()
    <form action=\"\" enctype=\"multipart/form-data\" method=\"post\"><input name=\"myvar\" type=\"text\" /></form>
    >>> print form.accepts({'myvar':'34'}, formname=None)
    False
    >>> print form.xml()
    <form action="" enctype="multipart/form-data" method="post"><input name="myvar" type="text" value="34" /><div class="error" id="myvar__error">invalid expression</div></form>
    >>> print form.accepts({'myvar':'4'}, formname=None, keepvalues=True)
    True
    >>> print form.xml()
    <form action=\"\" enctype=\"multipart/form-data\" method=\"post\"><input name=\"myvar\" type=\"text\" value=\"4\" /></form>
    >>> form=FORM(SELECT('cat', 'dog', _name='myvar'))
    >>> print form.accepts({'myvar':'dog'}, formname=None, keepvalues=True)
    True
    >>> print form.xml()
    <form action=\"\" enctype=\"multipart/form-data\" method=\"post\"><select name=\"myvar\"><option value=\"cat\">cat</option><option selected=\"selected\" value=\"dog\">dog</option></select></form>
    >>> form=FORM(INPUT(_type='text', _name='myvar', requires=IS_MATCH('^\w+$', 'only alphanumeric!')))
    >>> print form.accepts({'myvar':'as df'}, formname=None)
    False
    >>> print form.xml()
    <form action=\"\" enctype=\"multipart/form-data\" method=\"post\"><input name=\"myvar\" type=\"text\" value=\"as df\" /><div class=\"error\" id=\"myvar__error\">only alphanumeric!</div></form>
    >>> session={}
    >>> form=FORM(INPUT(value=\"Hello World\", _name=\"var\", requires=IS_MATCH('^\w+$')))
    >>> if form.accepts({}, session,formname=None): print 'passed'
    >>> if form.accepts({'var':'test ', '_formkey': session['_formkey[None]']}, session, formname=None): print 'passed'
    """
    pass


class web2pyHTMLParser(HTMLParser):
    """
    obj = web2pyHTMLParser(text) parses and html/xml text into web2py helpers.
    obj.tree contains the root of the tree, and tree can be manipulated

    >>> str(web2pyHTMLParser('hello<div a="b" c=3>wor&lt;ld<span>xxx</span>y<script/>yy</div>zzz').tree)
    'hello<div a="b" c="3">wor&lt;ld<span>xxx</span>y<script></script>yy</div>zzz'
    >>> str(web2pyHTMLParser('<div>a<span>b</div>c').tree)
    '<div>a<span>b</span></div>c'
    >>> tree = web2pyHTMLParser('hello<div a="b">world</div>').tree
    >>> tree.element(_a='b')['_c']=5
    >>> str(tree)
    'hello<div a="b" c="5">world</div>'
    """
    def __init__(self,text,closed=('input','link')):
        HTMLParser.__init__(self)
        self.tree = self.parent = TAG['']()
        self.closed = closed
        self.tags = [x for x in __all__ if isinstance(eval(x),DIV)]
        self.last = None
        self.feed(text)
    def handle_starttag(self, tagname, attrs):
        if tagname.upper() in self.tags:
            tag=eval(tagname.upper())
        else:
            if tagname in self.closed: tagname+='/'
            tag = TAG[tagname]()
        for key,value in attrs: tag['_'+key]=value
        tag.parent = self.parent
        self.parent.append(tag)
        if not tag.tag.endswith('/'):
            self.parent=tag
        else:
            self.last = tag.tag[:-1]
    def handle_data(self,data):
        try:
            self.parent.append(data.encode('utf8','xmlcharref'))
        except:
            self.parent.append(data.decode('latin1').encode('utf8','xmlcharref'))
    def handle_charref(self,name):
        if name[1].lower()=='x':
            self.parent.append(unichr(int(name[2:], 16)).encode('utf8'))
        else:
            self.parent.append(unichr(int(name[1:], 10)).encode('utf8'))
    def handle_entityref(self,name):
        self.parent.append(unichr(name2codepoint[name]).encode('utf8'))
    def handle_endtag(self, tagname):
        # this deals with unbalanced tags
        if tagname==self.last:
            return
        while True:
            try:
                parent_tagname=self.parent.tag
                self.parent = self.parent.parent
            except:
                raise RuntimeError, "unable to balance tag %s" % tagname
            if parent_tagname[:len(tagname)]==tagname: break

def markdown_serializer(text,tag=None,attr={}):
    if tag is None: return re.sub('\s+',' ',text)
    if tag=='br': return '\n\n'
    if tag=='h1': return '#'+text+'\n\n'
    if tag=='h2': return '#'*2+text+'\n\n'
    if tag=='h3': return '#'*3+text+'\n\n'
    if tag=='h4': return '#'*4+text+'\n\n'
    if tag=='p': return text+'\n\n'
    if tag=='b' or tag=='strong': return '**%s**' % text
    if tag=='em' or tag=='i': return '*%s*' % text
    if tag=='tt' or tag=='code': return '`%s`' % text
    if tag=='a': return '[%s](%s)' % (text,attr.get('_href',''))
    if tag=='img': return '![%s](%s)' % (attr.get('_alt',''),attr.get('_src',''))
    return text

def markmin_serializer(text,tag=None,attr={}):
    # if tag is None: return re.sub('\s+',' ',text)
    if tag=='br': return '\n\n'
    if tag=='h1': return '# '+text+'\n\n'
    if tag=='h2': return '#'*2+' '+text+'\n\n'
    if tag=='h3': return '#'*3+' '+text+'\n\n'
    if tag=='h4': return '#'*4+' '+text+'\n\n'
    if tag=='p': return text+'\n\n'
    if tag=='li': return '\n- '+text.replace('\n',' ')
    if tag=='tr': return text[3:].replace('\n',' ')+'\n'
    if tag in ['table','blockquote']: return '\n-----\n'+text+'\n------\n'
    if tag in ['td','th']: return ' | '+text
    if tag in ['b','strong','label']: return '**%s**' % text
    if tag in ['em','i']: return "''%s''" % text
    if tag in ['tt']: return '``%s``' % text.strip()
    if tag in ['code']: return '``\n%s``' % text
    if tag=='a': return '[[%s %s]]' % (text,attr.get('_href',''))
    if tag=='img': return '[[%s %s left]]' % (attr.get('_alt','no title'),attr.get('_src',''))
    return text


class MARKMIN(XmlComponent):
    """
    For documentation: http://web2py.com/examples/static/markmin.html
    """
    def __init__(self, text, extra={}, allowed={}, sep='p'):
        self.text = text
        self.extra = extra
        self.allowed = allowed
        self.sep = sep

    def xml(self):
        """
        calls the gluon.contrib.markmin render function to convert the wiki syntax
        """
        return render(self.text,extra=self.extra,allowed=self.allowed,sep=self.sep)

    def __str__(self):
        return self.xml()

    def flatten(self,render=None):
        """
        return the text stored by the MARKMIN object rendered by the render function
        """
        return self.text

    def elements(self, *args, **kargs):
        """
        to be considered experimental since the behavior of this method is questionable
        another options could be TAG(self.text).elements(*args,**kargs)
        """
        return [self.text]


if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/http.py version [4537bde179].
































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

__all__ = ['HTTP', 'redirect']

defined_status = {
    200: 'OK',
    201: 'CREATED',
    202: 'ACCEPTED',
    203: 'NON-AUTHORITATIVE INFORMATION',
    204: 'NO CONTENT',
    205: 'RESET CONTENT',
    206: 'PARTIAL CONTENT',
    301: 'MOVED PERMANENTLY',
    302: 'FOUND',
    303: 'SEE OTHER',
    304: 'NOT MODIFIED',
    305: 'USE PROXY',
    307: 'TEMPORARY REDIRECT',
    400: 'BAD REQUEST',
    401: 'UNAUTHORIZED',
    403: 'FORBIDDEN',
    404: 'NOT FOUND',
    405: 'METHOD NOT ALLOWED',
    406: 'NOT ACCEPTABLE',
    407: 'PROXY AUTHENTICATION REQUIRED',
    408: 'REQUEST TIMEOUT',
    409: 'CONFLICT',
    410: 'GONE',
    411: 'LENGTH REQUIRED',
    412: 'PRECONDITION FAILED',
    413: 'REQUEST ENTITY TOO LARGE',
    414: 'REQUEST-URI TOO LONG',
    415: 'UNSUPPORTED MEDIA TYPE',
    416: 'REQUESTED RANGE NOT SATISFIABLE',
    417: 'EXPECTATION FAILED',
    500: 'INTERNAL SERVER ERROR',
    501: 'NOT IMPLEMENTED',
    502: 'BAD GATEWAY',
    503: 'SERVICE UNAVAILABLE',
    504: 'GATEWAY TIMEOUT',
    505: 'HTTP VERSION NOT SUPPORTED',
    }

# If web2py is executed with python2.4 we need
# to use Exception instead of BaseException

try:
    BaseException
except NameError:
    BaseException = Exception


class HTTP(BaseException):

    def __init__(
        self,
        status,
        body='',
        **headers
        ):
        self.status = status
        self.body = body
        self.headers = headers

    def to(self, responder):
        if self.status in defined_status:
            status = '%d %s' % (self.status, defined_status[self.status])
        else:
            status = str(self.status) + ' '
        if not 'Content-Type' in self.headers:
            self.headers['Content-Type'] = 'text/html; charset=UTF-8'
        body = self.body
        if status[:1] == '4':
            if not body:
                body = status
            if isinstance(body, str):
                if len(body)<512 and self.headers['Content-Type'].startswith('text/html'):
                    body += '<!-- %s //-->' % ('x'*512) ### trick IE
                self.headers['Content-Length'] = len(body)
        headers = []
        for (k, v) in self.headers.items():
            if isinstance(v, list):
                for item in v:
                    headers.append((k, str(item)))
            else:
                headers.append((k, str(v)))
        responder(status, headers)
        if hasattr(body, '__iter__') and not isinstance(self.body, str):
            return body
        return [str(body)]

    @property
    def message(self):
        '''
        compose a message describing this exception

        "status defined_status [web2py_error]"

        message elements that are not defined are omitted
        '''
        msg = '%(status)d'
        if self.status in defined_status:
            msg = '%(status)d %(defined_status)s'
        if 'web2py_error' in self.headers:
            msg += ' [%(web2py_error)s]'
        return msg % dict(status=self.status,
                          defined_status=defined_status.get(self.status),
                          web2py_error=self.headers.get('web2py_error'))

    def __str__(self):
        "stringify me"
        return self.message


def redirect(location, how=303):
    location = location.replace('\r', '%0D').replace('\n', '%0A')
    raise HTTP(how,
               'You are being redirected <a href="%s">here</a>' % location,
               Location=location)

Added gluon/import_all.py version [91c08d2cb3].















































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

This file is not strictly required by web2py. It is used for three purposes:

1) check that all required modules are installed properly
2) provide py2exe and py2app a list of modules to be packaged in the binary
3) (optional) preload modules in memory to speed up http responses

"""

import os
import sys

base_modules = ['aifc', 'anydbm', 'array', 'asynchat', 'asyncore', 'atexit',
                'audioop', 'base64', 'BaseHTTPServer', 'Bastion', 'binascii',
                'binhex', 'bisect', 'bz2', 'calendar', 'cgi', 'CGIHTTPServer',
                'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
                'collections', 'colorsys', 'compileall', 'compiler',
                'compiler.ast', 'compiler.visitor', 'ConfigParser',
                'contextlib', 'Cookie', 'cookielib', 'copy', 'copy_reg',
                'cPickle', 'cProfile', 'cStringIO', 'csv', 'ctypes',
                'datetime', 'decimal', 'difflib', 'dircache', 'dis',
                'doctest', 'DocXMLRPCServer', 'dumbdbm', 'dummy_thread',
                'dummy_threading', 'email', 'email.charset', 'email.encoders',
                'email.errors', 'email.generator', 'email.header',
                'email.iterators', 'email.message', 'email.mime',
                'email.mime.audio', 'email.mime.base', 'email.mime.image',
                'email.mime.message', 'email.mime.multipart',
                'email.mime.nonmultipart', 'email.mime.text', 'email.parser',
                'email.utils', 'encodings.idna', 'errno', 'exceptions',
                'filecmp', 'fileinput', 'fnmatch', 'formatter', 'fpformat',
                'ftplib', 'functools', 'gc', 'getopt', 'getpass', 'gettext',
                'glob', 'gzip', 'hashlib', 'heapq', 'hmac', 'hotshot',
                'hotshot.stats', 'htmlentitydefs', 'htmllib', 'HTMLParser',
                'httplib', 'imaplib', 'imghdr', 'imp', 'inspect',
                'itertools', 'keyword', 'linecache', 'locale', 'logging',
                'macpath', 'mailbox', 'mailcap', 'marshal', 'math',
                'mimetools', 'mimetypes', 'mmap', 'modulefinder', 'mutex',
                'netrc', 'new', 'nntplib', 'operator', 'optparse', 'os',
                'parser', 'pdb', 'pickle', 'pickletools', 'pkgutil',
                'platform', 'poplib', 'pprint', 'py_compile', 'pyclbr',
                'pydoc', 'Queue', 'quopri', 'random', 're', 'repr',
                'rexec', 'rfc822', 'rlcompleter', 'robotparser', 'runpy',
                'sched', 'select', 'sgmllib', 'shelve',
                'shlex', 'shutil', 'signal', 'SimpleHTTPServer',
                'SimpleXMLRPCServer', 'site', 'smtpd', 'smtplib',
                'sndhdr', 'socket', 'SocketServer', 'sqlite3',
                'stat', 'statvfs', 'string', 'StringIO',
                'stringprep', 'struct', 'subprocess', 'sunau', 'symbol',
                'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'textwrap', 'thread', 'threading',
                'time', 'timeit', 'Tix', 'Tkinter', 'token',
                'tokenize', 'trace', 'traceback', 'types',
                'unicodedata', 'unittest', 'urllib', 'urllib2',
                'urlparse', 'user', 'UserDict', 'UserList', 'UserString',
                'uu', 'uuid', 'warnings', 'wave', 'weakref', 'webbrowser',
                'whichdb', 'wsgiref', 'wsgiref.handlers', 'wsgiref.headers',
                'wsgiref.simple_server', 'wsgiref.util', 'wsgiref.validate',
                'xdrlib', 'xml.dom', 'xml.dom.minidom', 'xml.dom.pulldom',
                'xml.etree.ElementTree', 'xml.parsers.expat', 'xml.sax',
                'xml.sax.handler', 'xml.sax.saxutils', 'xml.sax.xmlreader',
                'xmlrpclib', 'zipfile', 'zipimport', 'zlib', 'mhlib',
                'MimeWriter', 'mimify', 'multifile', 'sets']

contributed_modules = []
for root, dirs, files in os.walk('gluon'):
    for candidate in ['.'.join(
      os.path.join(root, os.path.splitext(name)[0]).split(os.sep))
      for name in files if name.endswith('.py')
        and root.split(os.sep) != ['gluon', 'tests']
      ]:
        contributed_modules.append(candidate)

# Python base version
python_version = sys.version[:3]

# Modules which we want to raise an Exception if they are missing
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
py26_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']
py27_deprecated = [] # ['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']
    base_modules = list(set(base_modules).difference(set(py27_deprecated)))

# Now iterate in the base_modules, trying to do the import
for module in base_modules + contributed_modules:
    try:
         __import__(module, globals(), locals(), [])
    except:
        # Raise an exception if the current module is a dependency
        if module in alert_dependency:
            msg = "Missing dependency: %(module)s\n" % locals()
            msg += "Try the following command: "
            msg += "easy_install-%(python_version)s -U %(module)s" % locals()
            raise ImportError, msg

Added gluon/languages.py version [1245d246fd].





























































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import os
import re
import cgi
import portalocker
import logging
import marshal
import copy_reg
from fileutils import listdir
import settings
from cfs import getcfs

__all__ = ['translator', 'findT', 'update_all_languages']

is_gae = settings.global_settings.web2py_runtime_gae

# pattern to find T(blah blah blah) expressions

PY_STRING_LITERAL_RE = r'(?<=[^\w]T\()(?P<name>'\
     + r"[uU]?[rR]?(?:'''(?:[^']|'{1,2}(?!'))*''')|"\
     + r"(?:'(?:[^'\\]|\\.)*')|" + r'(?:"""(?:[^"]|"{1,2}(?!"))*""")|'\
     + r'(?:"(?:[^"\\]|\\.)*"))'

regex_translate = re.compile(PY_STRING_LITERAL_RE, re.DOTALL)

# patter for a valid accept_language

regex_language = \
    re.compile('^[a-zA-Z]{2}(\-[a-zA-Z]{2})?(\-[a-zA-Z]+)?$')


def read_dict_aux(filename):
    fp = open(filename, 'r')
    portalocker.lock(fp, portalocker.LOCK_SH)
    lang_text = fp.read().replace('\r\n', '\n')
    portalocker.unlock(fp)
    fp.close()
    if not lang_text.strip():
        return {}
    try:
        return eval(lang_text)
    except:
        logging.error('Syntax error in %s' % filename)
        return {}

def read_dict(filename):
    return getcfs('language:%s'%filename,filename,
                  lambda filename=filename:read_dict_aux(filename))

def utf8_repr(s):
    r''' # note that we use raw strings to avoid having to use double back slashes below

    utf8_repr() works same as repr() when processing ascii string
    >>> utf8_repr('abc') == utf8_repr("abc") == repr('abc') == repr("abc") == "'abc'"
    True
    >>> utf8_repr('a"b"c') == repr('a"b"c') == '\'a"b"c\''
    True
    >>> utf8_repr("a'b'c") == repr("a'b'c") == '"a\'b\'c"'
    True
    >>> utf8_repr('a\'b"c') == repr('a\'b"c') == utf8_repr("a'b\"c") == repr("a'b\"c") == '\'a\\\'b"c\''
    True
    >>> utf8_repr('a\r\nb') == repr('a\r\nb') == "'a\\r\\nb'" # Test for \r, \n
    True

    Unlike repr(), utf8_repr() remains utf8 content when processing utf8 string
    >>> utf8_repr('中文字') == utf8_repr("中文字") == "'中文字'" != repr('中文字')
    True
    >>> utf8_repr('中"文"字') == "'中\"文\"字'" != repr('中"文"字')
    True
    >>> utf8_repr("中'文'字") == '"中\'文\'字"' != repr("中'文'字")
    True
    >>> utf8_repr('中\'文"字') == utf8_repr("中'文\"字") == '\'中\\\'文"字\'' != repr('中\'文"字') == repr("中'文\"字")
    True
    >>> utf8_repr('中\r\n文') == "'中\\r\\n文'" != repr('中\r\n文') # Test for \r, \n
    True
    '''
    if (s.find("'") >= 0) and (s.find('"') < 0): # only single quote exists
        s = ''.join(['"', s, '"']) # s = ''.join(['"', s.replace('"','\\"'), '"'])
    else:
        s = ''.join(["'", s.replace("'","\\'"), "'"])
    return s.replace("\n","\\n").replace("\r","\\r")


def write_dict(filename, contents):
    try:
        fp = open(filename, 'w')
    except IOError:
        logging.error('Unable to write to file %s' % filename)
        return
    portalocker.lock(fp, portalocker.LOCK_EX)
    fp.write('# coding: utf8\n{\n')
    for key in sorted(contents):
        fp.write('%s: %s,\n' % (utf8_repr(key), utf8_repr(contents[key])))
    fp.write('}\n')
    portalocker.unlock(fp)
    fp.close()


class lazyT(object):

    """
    never to be called explicitly, returned by translator.__call__
    """

    m = None
    s = None
    T = None

    def __init__(
        self,
        message,
        symbols = {},
        T = None,
        ):
        self.m = message
        self.s = symbols
        self.T = T

    def __repr__(self):
        return "<lazyT %s>" % (repr(str(self.m)), )

    def __str__(self):
        return self.T.translate(self.m, self.s)

    def __eq__(self, other):
        return self.T.translate(self.m, self.s) == other

    def __ne__(self, other):
        return self.T.translate(self.m, self.s) != other

    def __add__(self, other):
        return '%s%s' % (self, other)

    def __radd__(self, other):
        return '%s%s' % (other, self)

    def __cmp__(self,other):
        return cmp(str(self),str(other))

    def __hash__(self):
        return hash(str(self))

    def __getattr__(self, name):
        return getattr(str(self),name)

    def __getitem__(self, i):
        return str(self)[i]

    def __getslice__(self, i, j):
        return str(self)[i:j]

    def __iter__(self):
        for c in str(self): yield c

    def __len__(self):
        return len(str(self))

    def xml(self):
        return cgi.escape(str(self))

    def encode(self, *a, **b):
        return str(self).encode(*a, **b)

    def decode(self, *a, **b):
        return str(self).decode(*a, **b)

    def read(self):
        return str(self)

    def __mod__(self, symbols):
        return self.T.translate(self.m, symbols)


class translator(object):

    """
    this class is instantiated by gluon.compileapp.build_environment
    as the T object

    ::

        T.force(None) # turns off translation
        T.force('fr, it') # forces web2py to translate using fr.py or it.py

        T(\"Hello World\") # translates \"Hello World\" using the selected file

    notice 1: there is no need to force since, by default, T uses
    accept_language to determine a translation file.

    notice 2: en and en-en are considered different languages!
    """

    def __init__(self, request):
        self.request = request
        self.folder = request.folder
        self.current_languages = ['en']
        self.accepted_language = None
        self.language_file = None
        self.http_accept_language = request.env.http_accept_language
        self.requested_languages = self.force(self.http_accept_language)
        self.lazy = True
        self.otherTs = {}

    def get_possible_languages(self):
        possible_languages = self.current_languages
        file_ending = re.compile("\.py$")
        for langfile in os.listdir(os.path.join(self.folder,'languages')):
            if file_ending.search(langfile):
                possible_languages.append(file_ending.sub('',langfile))
        return possible_languages

    def set_current_languages(self, *languages):
        if len(languages) == 1 and isinstance(languages[0], (tuple, list)):
            languages = languages[0]
        self.current_languages = languages
        self.force(self.http_accept_language)

    def force(self, *languages):
        if not languages or languages[0] == None:
            languages = []
        if len(languages) == 1 and isinstance(languages[0], (str, unicode)):
            languages = languages[0]
        if languages:
            if isinstance(languages, (str, unicode)):
                accept_languages = languages.split(';')
                languages = []
                [languages.extend(al.split(',')) for al in accept_languages]
                languages = [item.strip().lower() for item in languages \
                                 if regex_language.match(item.strip())]

            for language in languages:
                if language in self.current_languages:
                    self.accepted_language = language
                    break
                filename = os.path.join(self.folder, 'languages/', language + '.py')
                if os.path.exists(filename):
                    self.accepted_language = language
                    self.language_file = filename
                    self.t = read_dict(filename)
                    return languages
        self.language_file = None
        self.t = {}  # ## no language by default
        return languages

    def __call__(self, message, symbols={},language=None):
        if not language:
            if self.lazy:
                return lazyT(message, symbols, self)
            else:
                return self.translate(message, symbols)
        else:
            try:
                otherT = self.otherTs[language]
            except KeyError:
                otherT = self.otherTs[language] = translator(self.request)
                otherT.force(language)
            return otherT(message,symbols)

    def translate(self, message, symbols):
        """
        user ## 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)

        T(' hello world ') -> ' hello world '
        T(' hello world ## token') -> 'hello world'
        T('hello ## world ## token') -> 'hello ## world'

        the ## notation is ignored in multiline strings and strings that
        start with ##. this is to allow markmin syntax to be translated
        """
        if not message.startswith('#') and not '\n' in message:
            tokens = message.rsplit('##', 1)
        else:
            # this allows markmin syntax in translations
            tokens = [message]
        if len(tokens) == 2:
            tokens[0] = tokens[0].strip()
            message = tokens[0] + '##' + tokens[1].strip()
        mt = self.t.get(message, None)
        if mt == None:
            self.t[message] = mt = tokens[0]
            if self.language_file and not is_gae:
                write_dict(self.language_file, self.t)
        if symbols or symbols == 0:
            return mt % symbols
        return mt


def findT(path, language='en-us'):
    """
    must be run by the admin app
    """
    filename = os.path.join(path, 'languages', '%s.py' % language)
    sentences = read_dict(filename)
    mp = os.path.join(path, 'models')
    cp = os.path.join(path, 'controllers')
    vp = os.path.join(path, 'views')
    for file in listdir(mp, '.+\.py', 0) + listdir(cp, '.+\.py', 0)\
         + listdir(vp, '.+\.html', 0):
        fp = open(file, 'r')
        portalocker.lock(fp, portalocker.LOCK_SH)
        data = fp.read()
        portalocker.unlock(fp)
        fp.close()
        items = regex_translate.findall(data)
        for item in items:
            try:
                message = eval(item)
                if not message.startswith('#') and not '\n' in message:
                    tokens = message.rsplit('##', 1)
                else:
                    # this allows markmin syntax in translations
                    tokens = [message]
                if len(tokens) == 2:
                    message = tokens[0].strip() + '##' + tokens[1].strip()
                if message and not message in sentences:
                    sentences[message] = message
            except:
                pass
    write_dict(filename, sentences)

### important to allow safe session.flash=T(....)
def lazyT_unpickle(data):
    return marshal.loads(data)
def lazyT_pickle(data):
    return lazyT_unpickle, (marshal.dumps(str(data)),)
copy_reg.pickle(lazyT, lazyT_pickle, lazyT_unpickle)

def update_all_languages(application_path):
    path = os.path.join(application_path, 'languages/')
    for language in listdir(path, '^\w+(\-\w+)?\.py$'):
        findT(application_path, language[:-3])


if __name__ == '__main__':
    import doctest
    doctest.testmod()


Added gluon/main.py version [a23025057a].











































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Contains:

- wsgibase: the gluon wsgi application

"""

import gc
import cgi
import cStringIO
import Cookie
import os
import re
import copy
import sys
import time
import thread
import datetime
import signal
import socket
import tempfile
import random
import string
import platform
from fileutils import abspath, write_file
from settings import global_settings
from admin import add_path_first, create_missing_folders, create_missing_app_folders
from globals import current

from custom_import import custom_import_install
from contrib.simplejson import dumps

#  Remarks:
#  calling script has inserted path to script directory into sys.path
#  applications_parent (path to applications/, site-packages/ etc)
#  defaults to that directory set sys.path to
#  ("", gluon_parent/site-packages, gluon_parent, ...)
#
#  this is wrong:
#  web2py_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
#  because we do not want the path to this file which may be Library.zip
#  gluon_parent is the directory containing gluon, web2py.py, logging.conf
#  and the handlers.
#  applications_parent (web2py_path) is the directory containing applications/
#  and routes.py
#  The two are identical unless web2py_path is changed via the web2py.py -f folder option
#  main.web2py_path is the same as applications_parent (for backward compatibility)

if not hasattr(os, 'mkdir'):
    global_settings.db_sessions = True
if global_settings.db_sessions is not True:
    global_settings.db_sessions = set()
global_settings.gluon_parent = os.environ.get('web2py_path', os.getcwd())
global_settings.applications_parent = global_settings.gluon_parent
web2py_path = global_settings.applications_parent # backward compatibility
global_settings.app_folders = set()
global_settings.debugging = False

custom_import_install(web2py_path)

create_missing_folders()

# set up logging for subsequent imports
import logging
import logging.config
logpath = abspath("logging.conf")
if os.path.exists(logpath):
    logging.config.fileConfig(abspath("logging.conf"))
else:
    logging.basicConfig()
logger = logging.getLogger("web2py")

from restricted import RestrictedError
from http import HTTP, redirect
from globals import Request, Response, Session
from compileapp import build_environment, run_models_in, \
    run_controller_in, run_view_in
from fileutils import copystream
from contenttype import contenttype
from dal import BaseAdapter
from settings import global_settings
from validators import CRYPT
from cache import Cache
from html import URL as Url
import newcron
import rewrite

__all__ = ['wsgibase', 'save_password', 'appfactory', 'HttpServer']

requests = 0    # gc timer

# Security Checks: validate URL and session_id here,
# accept_language is validated in languages

# pattern used to validate client address
regex_client = re.compile('[\w\-:]+(\.[\w\-]+)*\.?')  # ## to account for IPV6

version_info = open(abspath('VERSION', gluon=True), 'r')
web2py_version = version_info.read()
version_info.close()

try:
    import rocket
except:
    if not global_settings.web2py_runtime_gae:
        logger.warn('unable to import Rocket')

rewrite.load()

def get_client(env):
    """
    guess the client address from the environment variables

    first tries 'http_x_forwarded_for', secondly 'remote_addr'
    if all fails assume '127.0.0.1' (running locally)
    """
    g = regex_client.search(env.get('http_x_forwarded_for', ''))
    if g:
        return g.group()
    g = regex_client.search(env.get('remote_addr', ''))
    if g:
        return g.group()
    return '127.0.0.1'

def copystream_progress(request, chunk_size= 10**5):
    """
    copies request.env.wsgi_input into request.body
    and stores progress upload status in cache.ram
    X-Progress-ID:length and X-Progress-ID:uploaded
    """
    if not request.env.content_length:
        return cStringIO.StringIO()
    source = request.env.wsgi_input
    size = int(request.env.content_length)
    dest = tempfile.TemporaryFile()
    if not 'X-Progress-ID' in request.vars:
        copystream(source, dest, size, chunk_size)
        return dest
    cache_key = 'X-Progress-ID:'+request.vars['X-Progress-ID']
    cache = Cache(request)
    cache.ram(cache_key+':length', lambda: size, 0)
    cache.ram(cache_key+':uploaded', lambda: 0, 0)
    while size > 0:
        if size < chunk_size:
            data = source.read(size)
            cache.ram.increment(cache_key+':uploaded', size)
        else:
            data = source.read(chunk_size)
            cache.ram.increment(cache_key+':uploaded', chunk_size)
        length = len(data)
        if length > size:
            (data, length) = (data[:size], size)
        size -= length
        if length == 0:
            break
        dest.write(data)
        if length < chunk_size:
            break
    dest.seek(0)
    cache.ram(cache_key+':length', None)
    cache.ram(cache_key+':uploaded', None)
    return dest


def serve_controller(request, response, session):
    """
    this function is used to generate a dynamic page.
    It first runs all models, then runs the function in the controller,
    and then tries to render the output using a view/template.
    this function must run from the [application] folder.
    A typical example would be the call to the url
    /[application]/[controller]/[function] that would result in a call
    to [function]() in applications/[application]/[controller].py
    rendered by applications/[application]/views/[controller]/[function].html
    """

    # ##################################################
    # build environment for controller and view
    # ##################################################

    environment = build_environment(request, response, session)

    # set default view, controller can override it

    response.view = '%s/%s.%s' % (request.controller,
                                  request.function,
                                  request.extension)

    # also, make sure the flash is passed through
    # ##################################################
    # process models, controller and view (if required)
    # ##################################################

    run_models_in(environment)
    response._view_environment = copy.copy(environment)
    page = run_controller_in(request.controller, request.function, environment)
    if isinstance(page, dict):
        response._vars = page
        for key in page:
            response._view_environment[key] = page[key]
        run_view_in(response._view_environment)
        page = response.body.getvalue()
    # 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
    raise HTTP(response.status, page, **response.headers)


def start_response_aux(status, headers, exc_info, response=None):
    """
    in controller you can use::

    - request.wsgi.environ
    - request.wsgi.start_response

    to call third party WSGI applications
    """
    response.status = str(status).split(' ',1)[0]
    response.headers = dict(headers)
    return lambda *args, **kargs: response.write(escape=False,*args,**kargs)


def middleware_aux(request, response, *middleware_apps):
    """
    In you controller use::

        @request.wsgi.middleware(middleware1, middleware2, ...)

    to decorate actions with WSGI middleware. actions must return strings.
    uses a simulated environment so it may have weird behavior in some cases
    """
    def middleware(f):
        def app(environ, start_response):
            data = f()
            start_response(response.status,response.headers.items())
            if isinstance(data,list):
                return data
            return [data]
        for item in middleware_apps:
            app=item(app)
        def caller(app):
            return app(request.wsgi.environ,request.wsgi.start_response)
        return lambda caller=caller, app=app: caller(app)
    return middleware

def environ_aux(environ,request):
    new_environ = copy.copy(environ)
    new_environ['wsgi.input'] = request.body
    new_environ['wsgi.version'] = 1
    return new_environ

def parse_get_post_vars(request, environ):

    # always parse variables in URL for GET, POST, PUT, DELETE, etc. in get_vars
    dget = cgi.parse_qsl(request.env.query_string or '', keep_blank_values=1)
    for (key, value) in dget:
        if key in request.get_vars:
            if isinstance(request.get_vars[key], list):
                request.get_vars[key] += [value]
            else:
                request.get_vars[key] = [request.get_vars[key]] + [value]
        else:
            request.get_vars[key] = value
        request.vars[key] = request.get_vars[key]

    # parse POST variables on POST, PUT, BOTH only in post_vars
    request.body = copystream_progress(request) ### stores request body
    if (request.body and request.env.request_method in ('POST', 'PUT', 'BOTH')):
        dpost = cgi.FieldStorage(fp=request.body,environ=environ,keep_blank_values=1)
        # The same detection used by FieldStorage to detect multipart POSTs
        is_multipart = dpost.type[:10] == 'multipart/'
        request.body.seek(0)
        isle25 = sys.version_info[1] <= 5

        def listify(a):
            return (not isinstance(a,list) and [a]) or a
        try:
            keys = sorted(dpost)
        except TypeError:
            keys = []
        for key in keys:
            dpk = dpost[key]
            # if en element is not a file replace it with its value else leave it alone
            if isinstance(dpk, list):
                if not dpk[0].filename:
                    value = [x.value for x in dpk]
                else:
                    value = [x for x in dpk]
            elif not dpk.filename:
                value = dpk.value
            else:
                value = dpk
            pvalue = listify(value)
            if key in request.vars:
                gvalue = listify(request.vars[key])
                if isle25:
                    value = pvalue + gvalue
                elif is_multipart:
                    pvalue = pvalue[len(gvalue):]
                else:
                    pvalue = pvalue[:-len(gvalue)]
            request.vars[key] = value
            if len(pvalue):
                request.post_vars[key] = (len(pvalue)>1 and pvalue) or pvalue[0]


def wsgibase(environ, responder):
    """
    this is the gluon wsgi application. the first function called when a page
    is requested (static or dynamic). it can be called by paste.httpserver
    or by apache mod_wsgi.

      - fills request with info
      - the environment variables, replacing '.' with '_'
      - adds web2py path and version info
      - compensates for fcgi missing path_info and query_string
      - validates the path in url

    The url path must be either:

    1. for static pages:

      - /<application>/static/<file>

    2. for dynamic pages:

      - /<application>[/<controller>[/<function>[/<sub>]]][.<extension>]
      - (sub may go several levels deep, currently 3 levels are supported:
         sub1/sub2/sub3)

    The naming conventions are:

      - application, controller, function and extension may only contain
        [a-zA-Z0-9_]
      - file and sub may also contain '-', '=', '.' and '/'
    """

    current.__dict__.clear()
    request = Request()
    response = Response()
    session = Session()
    request.env.web2py_path = global_settings.applications_parent
    request.env.web2py_version = web2py_version
    request.env.update(global_settings)
    static_file = False
    try:
        try:
            try:
                # ##################################################
                # handle fcgi missing path_info and query_string
                # select rewrite parameters
                # rewrite incoming URL
                # parse rewritten header variables
                # parse rewritten URL
                # serve file if static
                # ##################################################

                if not environ.get('PATH_INFO',None) and \
                        environ.get('REQUEST_URI',None):
                    # for fcgi, get path_info and query_string from request_uri
                    items = environ['REQUEST_URI'].split('?')
                    environ['PATH_INFO'] = items[0]
                    if len(items) > 1:
                        environ['QUERY_STRING'] = items[1]
                    else:
                        environ['QUERY_STRING'] = ''
                if not environ.get('HTTP_HOST',None):
                    environ['HTTP_HOST'] = '%s:%s' % (environ.get('SERVER_NAME'),
                                                      environ.get('SERVER_PORT'))

                (static_file, environ) = rewrite.url_in(request, environ)
                if static_file:
                    if request.env.get('query_string', '')[:10] == 'attachment':
                        response.headers['Content-Disposition'] = 'attachment'
                    response.stream(static_file, request=request)

                # ##################################################
                # fill in request items
                # ##################################################

                http_host = request.env.http_host.split(':',1)[0]

                local_hosts = [http_host,'::1','127.0.0.1','::ffff:127.0.0.1']
                if not global_settings.web2py_runtime_gae:
                    local_hosts += [socket.gethostname(),
                                    socket.gethostbyname(http_host)]
                request.client = get_client(request.env)
                request.folder = abspath('applications',
                                         request.application) + os.sep
                x_req_with = str(request.env.http_x_requested_with).lower()
                request.ajax = x_req_with == 'xmlhttprequest'
                request.cid = request.env.http_web2py_component_element
                request.is_local = request.env.remote_addr in local_hosts
                request.is_https = request.env.wsgi_url_scheme \
                    in ['https', 'HTTPS'] or request.env.https == 'on'

                # ##################################################
                # compute a request.uuid to be used for tickets and toolbar
                # ##################################################

                response.uuid = request.compute_uuid()

                # ##################################################
                # access the requested application
                # ##################################################

                if not os.path.exists(request.folder):
                    if request.application == rewrite.thread.routes.default_application and request.application != 'welcome':
                        request.application = 'welcome'
                        redirect(Url(r=request))
                    elif rewrite.thread.routes.error_handler:
                        redirect(Url(rewrite.thread.routes.error_handler['application'],
                                     rewrite.thread.routes.error_handler['controller'],
                                     rewrite.thread.routes.error_handler['function'],
                                     args=request.application))
                    else:
                        raise HTTP(404,
                                   rewrite.thread.routes.error_message % 'invalid request',
                                   web2py_error='invalid application')
                request.url = Url(r=request, args=request.args,
                                       extension=request.raw_extension)

                # ##################################################
                # build missing folders
                # ##################################################

                create_missing_app_folders(request)

                # ##################################################
                # get the GET and POST data
                # ##################################################

                parse_get_post_vars(request, environ)

                # ##################################################
                # expose wsgi hooks for convenience
                # ##################################################

                request.wsgi.environ = environ_aux(environ,request)
                request.wsgi.start_response = lambda status='200', headers=[], \
                    exec_info=None, response=response: \
                    start_response_aux(status, headers, exec_info, response)
                request.wsgi.middleware = lambda *a: middleware_aux(request,response,*a)

                # ##################################################
                # load cookies
                # ##################################################

                if request.env.http_cookie:
                    try:
                        request.cookies.load(request.env.http_cookie)
                    except Cookie.CookieError, e:
                        pass # invalid cookies

                # ##################################################
                # try load session or create new session file
                # ##################################################

                session.connect(request, response)

                # ##################################################
                # set no-cache headers
                # ##################################################

                response.headers['Content-Type'] = contenttype('.'+request.extension)
                response.headers['Cache-Control'] = \
                    'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'
                response.headers['Expires'] = \
                    time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime())
                response.headers['Pragma'] = 'no-cache'

                # ##################################################
                # run controller
                # ##################################################

                serve_controller(request, response, session)

            except HTTP, http_response:
                if static_file:
                    return http_response.to(responder)

                if request.body:
                    request.body.close()

                # ##################################################
                # on success, try store session in database
                # ##################################################
                session._try_store_in_db(request, response)

                # ##################################################
                # on success, commit database
                # ##################################################

                if response._custom_commit:
                    response._custom_commit()
                else:
                    BaseAdapter.close_all_instances('commit')

                # ##################################################
                # if session not in db try store session on filesystem
                # this must be done after trying to commit database!
                # ##################################################

                session._try_store_on_disk(request, response)

                # ##################################################
                # store cookies in headers
                # ##################################################

                if request.cid:

                    if response.flash and not 'web2py-component-flash' in http_response.headers:
                        http_response.headers['web2py-component-flash'] = \
                            str(response.flash).replace('\n','')
                    if response.js and not 'web2py-component-command' in http_response.headers:
                        http_response.headers['web2py-component-command'] = \
                            response.js.replace('\n','')
                if session._forget and \
                        response.session_id_name in response.cookies:
                    del response.cookies[response.session_id_name]
                elif session._secure:
                    response.cookies[response.session_id_name]['secure'] = True
                if len(response.cookies)>0:
                    http_response.headers['Set-Cookie'] = \
                        [str(cookie)[11:] for cookie in response.cookies.values()]
                ticket=None

            except RestrictedError, e:

                if request.body:
                    request.body.close()

                # ##################################################
                # on application error, rollback database
                # ##################################################

                ticket = e.log(request) or 'unknown'
                if response._custom_rollback:
                    response._custom_rollback()
                else:
                    BaseAdapter.close_all_instances('rollback')

                http_response = \
                    HTTP(500,
                         rewrite.thread.routes.error_message_ticket % dict(ticket=ticket),
                         web2py_error='ticket %s' % ticket)

        except:

            if request.body:
                request.body.close()

            # ##################################################
            # on application error, rollback database
            # ##################################################

            try:
                if response._custom_rollback:
                    response._custom_rollback()
                else:
                    BaseAdapter.close_all_instances('rollback')
            except:
                pass
            e = RestrictedError('Framework', '', '', locals())
            ticket = e.log(request) or 'unrecoverable'
            http_response = \
                HTTP(500,
                     rewrite.thread.routes.error_message_ticket % dict(ticket=ticket),
                     web2py_error='ticket %s' % ticket)

    finally:
        if response and hasattr(response, 'session_file') and response.session_file:
            response.session_file.close()
#         if global_settings.debugging:
#             import gluon.debug
#             gluon.debug.stop_trace()

    session._unlock(response)
    http_response, new_environ = rewrite.try_rewrite_on_error(
        http_response, request, environ, ticket)
    if not http_response:
        return wsgibase(new_environ,responder)
    if global_settings.web2py_crontype == 'soft':
        newcron.softcron(global_settings.applications_parent).start()
    return http_response.to(responder)
    

def save_password(password, port):
    """
    used by main() to save the password in the parameters_port.py file.
    """

    password_file = abspath('parameters_%i.py' % port)
    if password == '<random>':
        # make up a new password
        chars = string.letters + string.digits
        password = ''.join([random.choice(chars) for i in range(8)])
        cpassword = CRYPT()(password)[0]
        print '******************* IMPORTANT!!! ************************'
        print 'your admin password is "%s"' % password
        print '*********************************************************'
    elif password == '<recycle>':
        # reuse the current password if any
        if os.path.exists(password_file):
            return
        else:
            password = ''
    elif password.startswith('<pam_user:'):
        # use the pam password for specified user
        cpassword = password[1:-1]
    else:
        # use provided password
        cpassword = CRYPT()(password)[0]
    fp = open(password_file, 'w')
    if password:
        fp.write('password="%s"\n' % cpassword)
    else:
        fp.write('password=None\n')
    fp.close()


def appfactory(wsgiapp=wsgibase,
               logfilename='httpserver.log',
               profilerfilename='profiler.log'):
    """
    generates a wsgi application that does logging and profiling and calls
    wsgibase

    .. function:: gluon.main.appfactory(
            [wsgiapp=wsgibase
            [, logfilename='httpserver.log'
            [, profilerfilename='profiler.log']]])

    """
    if profilerfilename and os.path.exists(profilerfilename):
        os.unlink(profilerfilename)
    locker = thread.allocate_lock()

    def app_with_logging(environ, responder):
        """
        a wsgi app that does logging and profiling and calls wsgibase
        """
        status_headers = []

        def responder2(s, h):
            """
            wsgi responder app
            """
            status_headers.append(s)
            status_headers.append(h)
            return responder(s, h)

        time_in = time.time()
        ret = [0]
        if not profilerfilename:
            ret[0] = wsgiapp(environ, responder2)
        else:
            import cProfile
            import pstats
            logger.warn('profiler is on. this makes web2py slower and serial')

            locker.acquire()
            cProfile.runctx('ret[0] = wsgiapp(environ, responder2)',
                            globals(), locals(), profilerfilename+'.tmp')
            stat = pstats.Stats(profilerfilename+'.tmp')
            stat.stream = cStringIO.StringIO()
            stat.strip_dirs().sort_stats("time").print_stats(80)
            profile_out = stat.stream.getvalue()
            profile_file = open(profilerfilename, 'a')
            profile_file.write('%s\n%s\n%s\n%s\n\n' % \
               ('='*60, environ['PATH_INFO'], '='*60, profile_out))
            profile_file.close()
            locker.release()
        try:
            line = '%s, %s, %s, %s, %s, %s, %f\n' % (
                environ['REMOTE_ADDR'],
                datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S'),
                environ['REQUEST_METHOD'],
                environ['PATH_INFO'].replace(',', '%2C'),
                environ['SERVER_PROTOCOL'],
                (status_headers[0])[:3],
                time.time() - time_in,
                )
            if not logfilename:
                sys.stdout.write(line)
            elif isinstance(logfilename, str):
                write_file(logfilename, line, 'a')
            else:
                logfilename.write(line)
        except:
            pass
        return ret[0]

    return app_with_logging


class HttpServer(object):
    """
    the web2py web server (Rocket)
    """

    def __init__(
        self,
        ip='127.0.0.1',
        port=8000,
        password='',
        pid_filename='httpserver.pid',
        log_filename='httpserver.log',
        profiler_filename=None,
        ssl_certificate=None,
        ssl_private_key=None,
        min_threads=None,
        max_threads=None,
        server_name=None,
        request_queue_size=5,
        timeout=10,
        shutdown_timeout=None, # Rocket does not use a shutdown timeout
        path=None,
        interfaces=None # Rocket is able to use several interfaces - must be list of socket-tuples as string
        ):
        """
        starts the web server.
        """

        if interfaces:
            # if interfaces is specified, it must be tested for rocket parameter correctness
            # not necessarily completely tested (e.g. content of tuples or ip-format)
            import types
            if isinstance(interfaces,types.ListType):
                for i in interfaces:
                    if not isinstance(i,types.TupleType):
                        raise "Wrong format for rocket interfaces parameter - see http://packages.python.org/rocket/"
            else:
                raise "Wrong format for rocket interfaces parameter - see http://packages.python.org/rocket/"

        if path:
            # if a path is specified change the global variables so that web2py
            # runs from there instead of cwd or os.environ['web2py_path']
            global web2py_path
            path = os.path.normpath(path)
            web2py_path = path
            global_settings.applications_parent = path
            os.chdir(path)
            [add_path_first(p) for p in (path, abspath('site-packages'), "")]

        save_password(password, port)
        self.pid_filename = pid_filename
        if not server_name:
            server_name = socket.gethostname()
        logger.info('starting web server...')
        rocket.SERVER_NAME = server_name
        sock_list = [ip, port]
        if not ssl_certificate or not ssl_private_key:
            logger.info('SSL is off')
        elif not rocket.ssl:
            logger.warning('Python "ssl" module unavailable. SSL is OFF')
        elif not os.path.exists(ssl_certificate):
            logger.warning('unable to open SSL certificate. SSL is OFF')
        elif not os.path.exists(ssl_private_key):
            logger.warning('unable to open SSL private key. SSL is OFF')
        else:
            sock_list.extend([ssl_private_key, ssl_certificate])
            logger.info('SSL is ON')
        app_info = {'wsgi_app': appfactory(wsgibase,
                                           log_filename,
                                           profiler_filename) }

        self.server = rocket.Rocket(interfaces or tuple(sock_list),
                                    method='wsgi',
                                    app_info=app_info,
                                    min_threads=min_threads,
                                    max_threads=max_threads,
                                    queue_size=int(request_queue_size),
                                    timeout=int(timeout),
                                    handle_signals=False,
                                    )


    def start(self):
        """
        start the web server
        """
        try:
            signal.signal(signal.SIGTERM, lambda a, b, s=self: s.stop())
            signal.signal(signal.SIGINT, lambda a, b, s=self: s.stop())
        except:
            pass
        write_file(self.pid_filename, str(os.getpid()))
        self.server.start()

    def stop(self, stoplogging=False):
        """
        stop cron and the web server
        """
        newcron.stopcron()
        self.server.stop(stoplogging)
        try:
            os.unlink(self.pid_filename)
        except:
            pass

Added gluon/myregex.py version [a8dd66dbcb].






























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import re

# pattern to find defined tables

regex_tables = re.compile(\
    """^[\w]+\.define_table\(\s*[\'\"](?P<name>[\w_]+)[\'\"]""",
    flags=re.M)

# pattern to find exposed functions in controller

regex_expose = re.compile(\
    '^def\s+(?P<name>(?:[a-zA-Z0-9]\w*)|(?:_[a-zA-Z0-9]\w*))\(\)\s*:',
    flags=re.M)

regex_include = re.compile(\
    '(?P<all>\{\{\s*include\s+[\'"](?P<name>[^\'"]*)[\'"]\s*\}\})')

regex_extend = re.compile(\
    '^\s*(?P<all>\{\{\s*extend\s+[\'"](?P<name>[^\'"]+)[\'"]\s*\}\})',re.MULTILINE)

Added gluon/newcron.py version [196ddfcd9f].


























































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Created by Attila Csipa <web2py@csipa.in.rs>
Modified by Massimo Di Pierro <mdipierro@cs.depaul.edu>
"""

import sys
import os
import threading
import logging
import time
import sched
import re
import datetime
import platform
import portalocker
import fileutils
import cPickle
from settings import global_settings

logger = logging.getLogger("web2py.cron")
_cron_stopping = False

def stopcron():
    "graceful shutdown of cron"
    global _cron_stopping
    _cron_stopping = True

class extcron(threading.Thread):

    def __init__(self, applications_parent):
        threading.Thread.__init__(self)
        self.setDaemon(False)
        self.path = applications_parent
        crondance(self.path, 'external', startup=True)

    def run(self):
        if not _cron_stopping:
            logger.debug('external cron invocation')
            crondance(self.path, 'external', startup=False)

class hardcron(threading.Thread):

    def __init__(self, applications_parent):
        threading.Thread.__init__(self)
        self.setDaemon(True)
        self.path = applications_parent
        crondance(self.path, 'hard', startup=True)

    def launch(self):
        if not _cron_stopping:
            logger.debug('hard cron invocation')
            crondance(self.path, 'hard', startup = False)

    def run(self):
        s = sched.scheduler(time.time, time.sleep)
        logger.info('Hard cron daemon started')
        while not _cron_stopping:
            now = time.time()
            s.enter(60 - now % 60, 1, self.launch, ())
            s.run()

class softcron(threading.Thread):

    def __init__(self, applications_parent):
        threading.Thread.__init__(self)
        self.path = applications_parent
        crondance(self.path, 'soft', startup=True)

    def run(self):
        if not _cron_stopping:
            logger.debug('soft cron invocation')
            crondance(self.path, 'soft', startup=False)

class Token(object):

    def __init__(self,path):
        self.path = os.path.join(path, 'cron.master')
        if not os.path.exists(self.path):
            fileutils.write_file(self.path, '', 'wb')
        self.master = None
        self.now = time.time()

    def acquire(self,startup=False):
        """
        returns the time when the lock is acquired or
        None if cron already running

        lock is implemented by writing a pickle (start, stop) in cron.master
        start is time when cron job starts and stop is time when cron completed
        stop == 0 if job started but did not yet complete
        if a cron job started within less than 60 seconds, acquire returns None
        if a cron job started before 60 seconds and did not stop,
        a warning is issue "Stale cron.master detected"
        """
        if portalocker.LOCK_EX == None:
            logger.warning('WEB2PY CRON: Disabled because no file locking')
            return None
        self.master = open(self.path,'rb+')
        try:
            ret = None
            portalocker.lock(self.master,portalocker.LOCK_EX)
            try:
                (start, stop) =  cPickle.load(self.master)
            except:
                (start, stop) = (0, 1)
            if startup or self.now - start > 59.99:
                ret = self.now
                if not stop:
                    # this happens if previous cron job longer than 1 minute
                    logger.warning('WEB2PY CRON: Stale cron.master detected')
                logger.debug('WEB2PY CRON: Acquiring lock')
                self.master.seek(0)
                cPickle.dump((self.now,0),self.master)
        finally:
            portalocker.unlock(self.master)
        if not ret:
            # do this so no need to release
            self.master.close()
        return ret

    def release(self):
        """
        this function writes into cron.master the time when cron job
        was completed
        """
        if not self.master.closed:
            portalocker.lock(self.master,portalocker.LOCK_EX)
            logger.debug('WEB2PY CRON: Releasing cron lock')
            self.master.seek(0)
            (start, stop) =  cPickle.load(self.master)
            if start == self.now: # if this is my lock
                self.master.seek(0)
                cPickle.dump((self.now,time.time()),self.master)
            portalocker.unlock(self.master)
            self.master.close()


def rangetolist(s, period='min'):
    retval = []
    if s.startswith('*'):
        if period == 'min':
            s = s.replace('*', '0-59', 1)
        elif period == 'hr':
            s = s.replace('*', '0-23', 1)
        elif period == 'dom':
            s = s.replace('*', '1-31', 1)
        elif period == 'mon':
            s = s.replace('*', '1-12', 1)
        elif period == 'dow':
            s = s.replace('*', '0-6', 1)
    m = re.compile(r'(\d+)-(\d+)/(\d+)')
    match = m.match(s)
    if match:
        for i in range(int(match.group(1)), int(match.group(2)) + 1):
            if i % int(match.group(3)) == 0:
                retval.append(i)
    return retval


def parsecronline(line):
    task = {}
    if line.startswith('@reboot'):
        line=line.replace('@reboot', '-1 * * * *')
    elif line.startswith('@yearly'):
        line=line.replace('@yearly', '0 0 1 1 *')
    elif line.startswith('@annually'):
        line=line.replace('@annually', '0 0 1 1 *')
    elif line.startswith('@monthly'):
        line=line.replace('@monthly', '0 0 1 * *')
    elif line.startswith('@weekly'):
        line=line.replace('@weekly', '0 0 * * 0')
    elif line.startswith('@daily'):
        line=line.replace('@daily', '0 0 * * *')
    elif line.startswith('@midnight'):
        line=line.replace('@midnight', '0 0 * * *')
    elif line.startswith('@hourly'):
        line=line.replace('@hourly', '0 * * * *')
    params = line.strip().split(None, 6)
    if len(params) < 7:
        return None
    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, '*']:
            task[id] = []
            vals = s.split(',')
            for val in vals:
                if val != '-1' and '-' in val and '/' not in val:
                    val = '%s/1' % val
                if '/' in val:
                    task[id] += rangetolist(val, id)
                elif val.isdigit() or val=='-1':
                    task[id].append(int(val))
                elif id=='dow' and val[:3].lower() in daysofweek:
                    task[id].append(daysofweek(val[:3].lower()))
    task['user'] = params[5]
    task['cmd'] = params[6]
    return task


class cronlauncher(threading.Thread):

    def __init__(self, cmd, shell=True):
        threading.Thread.__init__(self)
        if platform.system() == 'Windows':
            shell = False
        elif isinstance(cmd,list):
            cmd = ' '.join(cmd)
        self.cmd = cmd
        self.shell = shell

    def run(self):
        import subprocess
        proc = subprocess.Popen(self.cmd,
                                stdin=subprocess.PIPE,
                                stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE,
                                shell=self.shell)
        (stdoutdata,stderrdata) = proc.communicate()
        if proc.returncode != 0:
            logger.warning(
                'WEB2PY CRON Call returned code %s:\n%s' % \
                    (proc.returncode, stdoutdata+stderrdata))
        else:
            logger.debug('WEB2PY CRON Call returned success:\n%s' \
                              % stdoutdata)

def crondance(applications_parent, ctype='soft', startup=False):
    apppath = os.path.join(applications_parent,'applications')
    cron_path = os.path.join(apppath,'admin','cron')
    token = Token(cron_path)
    cronmaster = token.acquire(startup=startup)
    if not cronmaster:
        return
    now_s = time.localtime()
    checks=(('min',now_s.tm_min),
            ('hr',now_s.tm_hour),
            ('mon',now_s.tm_mon),
            ('dom',now_s.tm_mday),
            ('dow',(now_s.tm_wday+1)%7))

    apps = [x for x in os.listdir(apppath)
            if os.path.isdir(os.path.join(apppath, x))]

    for app in apps:
        if _cron_stopping:
            break;
        apath = os.path.join(apppath,app)
        cronpath = os.path.join(apath, 'cron')
        crontab = os.path.join(cronpath, 'crontab')
        if not os.path.exists(crontab):
            continue
        try:
            cronlines = fileutils.readlines_file(crontab, 'rt')
            lines = [x.strip() for x in cronlines if x.strip() and not x.strip().startswith('#')]
            tasks = [parsecronline(cline) for cline in lines]
        except Exception, e:
            logger.error('WEB2PY CRON: crontab read error %s' % e)
            continue

        for task in tasks:
            if _cron_stopping:
                break;
            commands = [sys.executable]
            w2p_path = fileutils.abspath('web2py.py', gluon=True)
            if os.path.exists(w2p_path):
                commands.append(w2p_path)
            if global_settings.applications_parent != global_settings.gluon_parent:
                commands.extend(('-f', global_settings.applications_parent))
            citems = [(k in task and not v in task[k]) for k,v in checks]
            task_min= task.get('min',[])
            if not task:
                continue
            elif not startup and task_min == [-1]:
                continue
            elif task_min != [-1] and reduce(lambda a,b: a or b, citems):
                continue
            logger.info('WEB2PY CRON (%s): %s executing %s in %s at %s' \
                             % (ctype, app, task.get('cmd'),
                                os.getcwd(), datetime.datetime.now()))
            action, command, models = False, task['cmd'], ''
            if command.startswith('**'):
                (action,models,command) = (True,'',command[2:])
            elif command.startswith('*'):
                (action,models,command) = (True,'-M',command[1:])
            else:
                action=False
            if action and command.endswith('.py'):
                commands.extend(('-J',                # cron job
                                 models,              # import models?
                                 '-S', app,           # app name
                                 '-a', '"<recycle>"', # password
                                 '-R', command))      # command
                shell = True
            elif action:
                commands.extend(('-J',                  # cron job
                                 models,                # import models?
                                 '-S', app+'/'+command, # app name
                                 '-a', '"<recycle>"'))  # password
                shell = True
            else:
                commands = command
                shell = False
            try:
                cronlauncher(commands, shell=shell).start()
            except Exception, e:
                logger.warning(
                    'WEB2PY CRON: Execution error for %s: %s' \
                        % (task.get('cmd'), e))
    token.release()

Added gluon/portalocker.py version [65a3d73919].




























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# portalocker.py - Cross-platform (posix/nt) API for flock-style file locking.
#                  Requires python 1.5.2 or better.

"""
Cross-platform (posix/nt) API for flock-style file locking.

Synopsis:

   import portalocker
   file = open(\"somefile\", \"r+\")
   portalocker.lock(file, portalocker.LOCK_EX)
   file.seek(12)
   file.write(\"foo\")
   file.close()

If you know what you're doing, you may choose to

   portalocker.unlock(file)

before closing the file, but why?

Methods:

   lock( file, flags )
   unlock( file )

Constants:

   LOCK_EX
   LOCK_SH
   LOCK_NB

I learned the win32 technique for locking files from sample code
provided by John Nielsen <nielsenjf@my-deja.com> in the documentation
that accompanies the win32 modules.

Author: Jonathan Feinberg <jdf@pobox.com>
Version: $Id: portalocker.py,v 1.3 2001/05/29 18:47:55 Administrator Exp $
"""

import os
import logging
import platform
logger = logging.getLogger("web2py")

os_locking = None
try:
    import fcntl
    os_locking = 'posix'
except:
    pass
try:
    import win32con
    import win32file
    import pywintypes
    os_locking = 'windows'
except:
    pass

if os_locking == 'windows':
    LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK
    LOCK_SH = 0  # the default
    LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY

    # is there any reason not to reuse the following structure?

    __overlapped = pywintypes.OVERLAPPED()

    def lock(file, flags):
        hfile = win32file._get_osfhandle(file.fileno())
        win32file.LockFileEx(hfile, flags, 0, 0x7fff0000, __overlapped)

    def unlock(file):
        hfile = win32file._get_osfhandle(file.fileno())
        win32file.UnlockFileEx(hfile, 0, 0x7fff0000, __overlapped)


elif os_locking == 'posix':
    LOCK_EX = fcntl.LOCK_EX
    LOCK_SH = fcntl.LOCK_SH
    LOCK_NB = fcntl.LOCK_NB

    def lock(file, flags):
        fcntl.flock(file.fileno(), flags)

    def unlock(file):
        fcntl.flock(file.fileno(), fcntl.LOCK_UN)


else:
    if platform.system() == 'Windows':
        logger.error('no file locking, you must install the win32 extensions from: http://sourceforge.net/projects/pywin32/files/')
    else:
        logger.debug('no file locking, this will cause problems')

    LOCK_EX = None
    LOCK_SH = None
    LOCK_NB = None

    def lock(file, flags):
        pass

    def unlock(file):
        pass


if __name__ == '__main__':
    from time import time, strftime, localtime
    import sys

    log = open('log.txt', 'a+')
    lock(log, LOCK_EX)

    timestamp = strftime('%m/%d/%Y %H:%M:%S\n', localtime(time()))
    log.write(timestamp)

    print 'Wrote lines. Hit enter to release lock.'
    dummy = sys.stdin.readline()

    log.close()

Added gluon/reserved_sql_keywords.py version [b06be514b4].



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# encoding utf-8

__author__ = "Thadeus Burgess <thadeusb@thadeusb.com>"

#    we classify as "non-reserved" those key words that are explicitly known
#    to the parser but are allowed as column or table names. Some key words
#    that are otherwise non-reserved cannot be used as function or data type n
#    ames and are in the nonreserved list. (Most of these words represent
#    built-in functions or data types with special syntax. The function
#    or type is still available but it cannot be redefined by the user.)
#    Labeled "reserved" are those tokens that are not allowed as column or
#    table names. Some reserved key words are allowable as names for
#    functions or data typesself.

# Note at the bottom of the list is a dict containing references to the
# tuples, and also if you add a list don't forget to remove its default
# set of COMMON.

# Keywords that are adapter specific. Such as a list of "postgresql"
# or "mysql" keywords

# These are keywords that are common to all SQL dialects, and should
# never be used as a table or column. Even if you use one of these
# the cursor will throw an OperationalError for the SQL syntax.
COMMON = set((
    'SELECT',
    'INSERT',
    'DELETE',
    'UPDATE',
    'DROP',
    'CREATE',
    'ALTER',

    'WHERE',
    'FROM',
    'INNER',
    'JOIN',
    'AND',
    'OR',
    'LIKE',
    'ON',
    'IN',
    'SET',

    'BY',
    'GROUP',
    'ORDER',
    'LEFT',
    'OUTER',

    'IF',
    'END',
    'THEN',
    'LOOP',
    'AS',
    'ELSE',
    'FOR',

    'CASE',
    'WHEN',
    'MIN',
    'MAX',
    'DISTINCT',
))


POSTGRESQL = set((
    'FALSE',
    'TRUE',
    'ALL',
    'ANALYSE',
    'ANALYZE',
    'AND',
    'ANY',
    'ARRAY',
    'AS',
    'ASC',
    'ASYMMETRIC',
    'AUTHORIZATION',
    'BETWEEN',
    'BIGINT',
    'BINARY',
    'BIT',
    'BOOLEAN',
    'BOTH',
    'CASE',
    'CAST',
    'CHAR',
    'CHARACTER',
    'CHECK',
    'COALESCE',
    'COLLATE',
    'COLUMN',
    'CONSTRAINT',
    'CREATE',
    'CROSS',
    'CURRENT_CATALOG',
    'CURRENT_DATE',
    'CURRENT_ROLE',
    'CURRENT_SCHEMA',
    'CURRENT_TIME',
    'CURRENT_TIMESTAMP',
    'CURRENT_USER',
    'DEC',
    'DECIMAL',
    'DEFAULT',
    'DEFERRABLE',
    'DESC',
    'DISTINCT',
    'DO',
    'ELSE',
    'END',
    'EXCEPT',
    'EXISTS',
    'EXTRACT',
    'FETCH',
    'FLOAT',
    'FOR',
    'FOREIGN',
    'FREEZE',
    'FROM',
    'FULL',
    'GRANT',
    'GREATEST',
    'GROUP',
    'HAVING',
    'ILIKE',
    'IN',
    'INITIALLY',
    'INNER',
    'INOUT',
    'INT',
    'INTEGER',
    'INTERSECT',
    'INTERVAL',
    'INTO',
    'IS',
    'ISNULL',
    'JOIN',
    'LEADING',
    'LEAST',
    'LEFT',
    'LIKE',
    'LIMIT',
    'LOCALTIME',
    'LOCALTIMESTAMP',
    'NATIONAL',
    'NATURAL',
    'NCHAR',
    'NEW',
    'NONE',
    'NOT',
    'NOTNULL',
    'NULL',
    'NULLIF',
    'NUMERIC',
    'OFF',
    'OFFSET',
    'OLD',
    'ON',
    'ONLY',
    'OR',
    'ORDER',
    'OUT',
    'OUTER',
    'OVERLAPS',
    'OVERLAY',
    'PLACING',
    'POSITION',
    'PRECISION',
    'PRIMARY',
    'REAL',
    'REFERENCES',
    'RETURNING',
    'RIGHT',
    'ROW',
    'SELECT',
    'SESSION_USER',
    'SETOF',
    'SIMILAR',
    'SMALLINT',
    'SOME',
    'SUBSTRING',
    'SYMMETRIC',
    'TABLE',
    'THEN',
    'TIME',
    'TIMESTAMP',
    'TO',
    'TRAILING',
    'TREAT',
    'TRIM',
    'UNION',
    'UNIQUE',
    'USER',
    'USING',
    'VALUES',
    'VARCHAR',
    'VARIADIC',
    'VERBOSE',
    'WHEN',
    'WHERE',
    'WITH',
    'XMLATTRIBUTES',
    'XMLCONCAT',
    'XMLELEMENT',
    'XMLFOREST',
    'XMLPARSE',
    'XMLPI',
    'XMLROOT',
    'XMLSERIALIZE',
))


POSTGRESQL_NONRESERVED = set((
    'A',
    'ABORT',
    'ABS',
    'ABSENT',
    'ABSOLUTE',
    'ACCESS',
    'ACCORDING',
    'ACTION',
    'ADA',
    'ADD',
    'ADMIN',
    'AFTER',
    'AGGREGATE',
    'ALIAS',
    'ALLOCATE',
    'ALSO',
    'ALTER',
    'ALWAYS',
    'ARE',
    'ARRAY_AGG',
    'ASENSITIVE',
    'ASSERTION',
    'ASSIGNMENT',
    'AT',
    'ATOMIC',
    'ATTRIBUTE',
    'ATTRIBUTES',
    'AVG',
    'BACKWARD',
    'BASE64',
    'BEFORE',
    'BEGIN',
    'BERNOULLI',
    'BIT_LENGTH',
    'BITVAR',
    'BLOB',
    'BOM',
    'BREADTH',
    'BY',
    'C',
    'CACHE',
    'CALL',
    'CALLED',
    'CARDINALITY',
    'CASCADE',
    'CASCADED',
    'CATALOG',
    'CATALOG_NAME',
    'CEIL',
    'CEILING',
    'CHAIN',
    'CHAR_LENGTH',
    'CHARACTER_LENGTH',
    'CHARACTER_SET_CATALOG',
    'CHARACTER_SET_NAME',
    'CHARACTER_SET_SCHEMA',
    'CHARACTERISTICS',
    'CHARACTERS',
    'CHECKED',
    'CHECKPOINT',
    'CLASS',
    'CLASS_ORIGIN',
    'CLOB',
    'CLOSE',
    'CLUSTER',
    'COBOL',
    'COLLATION',
    'COLLATION_CATALOG',
    'COLLATION_NAME',
    'COLLATION_SCHEMA',
    'COLLECT',
    'COLUMN_NAME',
    'COLUMNS',
    'COMMAND_FUNCTION',
    'COMMAND_FUNCTION_CODE',
    'COMMENT',
    'COMMIT',
    'COMMITTED',
    'COMPLETION',
    'CONCURRENTLY',
    'CONDITION',
    'CONDITION_NUMBER',
    'CONFIGURATION',
    'CONNECT',
    'CONNECTION',
    'CONNECTION_NAME',
    'CONSTRAINT_CATALOG',
    'CONSTRAINT_NAME',
    'CONSTRAINT_SCHEMA',
    'CONSTRAINTS',
    'CONSTRUCTOR',
    'CONTAINS',
    'CONTENT',
    'CONTINUE',
    'CONVERSION',
    'CONVERT',
    'COPY',
    'CORR',
    'CORRESPONDING',
    'COST',
    'COUNT',
    'COVAR_POP',
    'COVAR_SAMP',
    'CREATEDB',
    'CREATEROLE',
    'CREATEUSER',
    'CSV',
    'CUBE',
    'CUME_DIST',
    'CURRENT',
    'CURRENT_DEFAULT_TRANSFORM_GROUP',
    'CURRENT_PATH',
    'CURRENT_TRANSFORM_GROUP_FOR_TYPE',
    'CURSOR',
    'CURSOR_NAME',
    'CYCLE',
    'DATA',
    'DATABASE',
    'DATE',
    'DATETIME_INTERVAL_CODE',
    'DATETIME_INTERVAL_PRECISION',
    'DAY',
    'DEALLOCATE',
    'DECLARE',
    'DEFAULTS',
    'DEFERRED',
    'DEFINED',
    'DEFINER',
    'DEGREE',
    'DELETE',
    'DELIMITER',
    'DELIMITERS',
    'DENSE_RANK',
    'DEPTH',
    'DEREF',
    'DERIVED',
    'DESCRIBE',
    'DESCRIPTOR',
    'DESTROY',
    'DESTRUCTOR',
    'DETERMINISTIC',
    'DIAGNOSTICS',
    'DICTIONARY',
    'DISABLE',
    'DISCARD',
    'DISCONNECT',
    'DISPATCH',
    'DOCUMENT',
    'DOMAIN',
    'DOUBLE',
    'DROP',
    'DYNAMIC',
    'DYNAMIC_FUNCTION',
    'DYNAMIC_FUNCTION_CODE',
    'EACH',
    'ELEMENT',
    'EMPTY',
    'ENABLE',
    'ENCODING',
    'ENCRYPTED',
    'END-EXEC',
    'ENUM',
    'EQUALS',
    'ESCAPE',
    'EVERY',
    'EXCEPTION',
    'EXCLUDE',
    'EXCLUDING',
    'EXCLUSIVE',
    'EXEC',
    'EXECUTE',
    'EXISTING',
    'EXP',
    'EXPLAIN',
    'EXTERNAL',
    'FAMILY',
    'FILTER',
    'FINAL',
    'FIRST',
    'FIRST_VALUE',
    'FLAG',
    'FLOOR',
    'FOLLOWING',
    'FORCE',
    'FORTRAN',
    'FORWARD',
    'FOUND',
    'FREE',
    'FUNCTION',
    'FUSION',
    'G',
    'GENERAL',
    'GENERATED',
    'GET',
    'GLOBAL',
    'GO',
    'GOTO',
    'GRANTED',
    'GROUPING',
    'HANDLER',
    'HEADER',
    'HEX',
    'HIERARCHY',
    'HOLD',
    'HOST',
    'HOUR',
#    'ID',
    'IDENTITY',
    'IF',
    'IGNORE',
    'IMMEDIATE',
    'IMMUTABLE',
    'IMPLEMENTATION',
    'IMPLICIT',
    'INCLUDING',
    'INCREMENT',
    'INDENT',
    'INDEX',
    'INDEXES',
    'INDICATOR',
    'INFIX',
    'INHERIT',
    'INHERITS',
    'INITIALIZE',
    'INPUT',
    'INSENSITIVE',
    'INSERT',
    'INSTANCE',
    'INSTANTIABLE',
    'INSTEAD',
    'INTERSECTION',
    'INVOKER',
    'ISOLATION',
    'ITERATE',
    'K',
    'KEY',
    'KEY_MEMBER',
    'KEY_TYPE',
    'LAG',
    'LANCOMPILER',
    'LANGUAGE',
    'LARGE',
    'LAST',
    'LAST_VALUE',
    'LATERAL',
    'LC_COLLATE',
    'LC_CTYPE',
    'LEAD',
    'LENGTH',
    'LESS',
    'LEVEL',
    'LIKE_REGEX',
    'LISTEN',
    'LN',
    'LOAD',
    'LOCAL',
    'LOCATION',
    'LOCATOR',
    'LOCK',
    'LOGIN',
    'LOWER',
    'M',
    'MAP',
    'MAPPING',
    'MATCH',
    'MATCHED',
    'MAX',
    'MAX_CARDINALITY',
    'MAXVALUE',
    'MEMBER',
    'MERGE',
    'MESSAGE_LENGTH',
    'MESSAGE_OCTET_LENGTH',
    'MESSAGE_TEXT',
    'METHOD',
    'MIN',
    'MINUTE',
    'MINVALUE',
    'MOD',
    'MODE',
    'MODIFIES',
    'MODIFY',
    'MODULE',
    'MONTH',
    'MORE',
    'MOVE',
    'MULTISET',
    'MUMPS',
#    'NAME',
    'NAMES',
    'NAMESPACE',
    'NCLOB',
    'NESTING',
    'NEXT',
    'NFC',
    'NFD',
    'NFKC',
    'NFKD',
    'NIL',
    'NO',
    'NOCREATEDB',
    'NOCREATEROLE',
    'NOCREATEUSER',
    'NOINHERIT',
    'NOLOGIN',
    'NORMALIZE',
    'NORMALIZED',
    'NOSUPERUSER',
    'NOTHING',
    'NOTIFY',
    'NOWAIT',
    'NTH_VALUE',
    'NTILE',
    'NULLABLE',
    'NULLS',
    'NUMBER',
    'OBJECT',
    'OCCURRENCES_REGEX',
    'OCTET_LENGTH',
    'OCTETS',
    'OF',
    'OIDS',
    'OPEN',
    'OPERATION',
    'OPERATOR',
    'OPTION',
    'OPTIONS',
    'ORDERING',
    'ORDINALITY',
    'OTHERS',
    'OUTPUT',
    'OVER',
    'OVERRIDING',
    'OWNED',
    'OWNER',
    'P',
    'PAD',
    'PARAMETER',
    'PARAMETER_MODE',
    'PARAMETER_NAME',
    'PARAMETER_ORDINAL_POSITION',
    'PARAMETER_SPECIFIC_CATALOG',
    'PARAMETER_SPECIFIC_NAME',
    'PARAMETER_SPECIFIC_SCHEMA',
    'PARAMETERS',
    'PARSER',
    'PARTIAL',
    'PARTITION',
    'PASCAL',
    'PASSING',
#    'PASSWORD',
    'PATH',
    'PERCENT_RANK',
    'PERCENTILE_CONT',
    'PERCENTILE_DISC',
    'PLANS',
    'PLI',
    'POSITION_REGEX',
    'POSTFIX',
    'POWER',
    'PRECEDING',
    'PREFIX',
    'PREORDER',
    'PREPARE',
    'PREPARED',
    'PRESERVE',
    'PRIOR',
    'PRIVILEGES',
    'PROCEDURAL',
    'PROCEDURE',
    'PUBLIC',
    'QUOTE',
    'RANGE',
    'RANK',
    'READ',
    'READS',
    'REASSIGN',
    'RECHECK',
    'RECURSIVE',
    'REF',
    'REFERENCING',
    'REGR_AVGX',
    'REGR_AVGY',
    'REGR_COUNT',
    'REGR_INTERCEPT',
    'REGR_R2',
    'REGR_SLOPE',
    'REGR_SXX',
    'REGR_SXY',
    'REGR_SYY',
    'REINDEX',
    'RELATIVE',
    'RELEASE',
    'RENAME',
    'REPEATABLE',
    'REPLACE',
    'REPLICA',
    'RESET',
    'RESPECT',
    'RESTART',
    'RESTRICT',
    'RESULT',
    'RETURN',
    'RETURNED_CARDINALITY',
    'RETURNED_LENGTH',
    'RETURNED_OCTET_LENGTH',
    'RETURNED_SQLSTATE',
    'RETURNS',
    'REVOKE',
#    'ROLE',
    'ROLLBACK',
    'ROLLUP',
    'ROUTINE',
    'ROUTINE_CATALOG',
    'ROUTINE_NAME',
    'ROUTINE_SCHEMA',
    'ROW_COUNT',
    'ROW_NUMBER',
    'ROWS',
    'RULE',
    'SAVEPOINT',
    'SCALE',
    'SCHEMA',
    'SCHEMA_NAME',
    'SCOPE',
    'SCOPE_CATALOG',
    'SCOPE_NAME',
    'SCOPE_SCHEMA',
    'SCROLL',
    'SEARCH',
    'SECOND',
    'SECTION',
    'SECURITY',
    'SELF',
    'SENSITIVE',
    'SEQUENCE',
    'SERIALIZABLE',
    'SERVER',
    'SERVER_NAME',
    'SESSION',
    'SET',
    'SETS',
    'SHARE',
    'SHOW',
    'SIMPLE',
    'SIZE',
    'SOURCE',
    'SPACE',
    'SPECIFIC',
    'SPECIFIC_NAME',
    'SPECIFICTYPE',
    'SQL',
    'SQLCODE',
    'SQLERROR',
    'SQLEXCEPTION',
    'SQLSTATE',
    'SQLWARNING',
    'SQRT',
    'STABLE',
    'STANDALONE',
    'START',
    'STATE',
    'STATEMENT',
    'STATIC',
    'STATISTICS',
    'STDDEV_POP',
    'STDDEV_SAMP',
    'STDIN',
    'STDOUT',
    'STORAGE',
    'STRICT',
    'STRIP',
    'STRUCTURE',
    'STYLE',
    'SUBCLASS_ORIGIN',
    'SUBLIST',
    'SUBMULTISET',
    'SUBSTRING_REGEX',
    'SUM',
    'SUPERUSER',
    'SYSID',
    'SYSTEM',
    'SYSTEM_USER',
    'T',
#    'TABLE_NAME',
    'TABLESAMPLE',
    'TABLESPACE',
    'TEMP',
    'TEMPLATE',
    'TEMPORARY',
    'TERMINATE',
    'TEXT',
    'THAN',
    'TIES',
    'TIMEZONE_HOUR',
    'TIMEZONE_MINUTE',
    'TOP_LEVEL_COUNT',
    'TRANSACTION',
    'TRANSACTION_ACTIVE',
    'TRANSACTIONS_COMMITTED',
    'TRANSACTIONS_ROLLED_BACK',
    'TRANSFORM',
    'TRANSFORMS',
    'TRANSLATE',
    'TRANSLATE_REGEX',
    'TRANSLATION',
    'TRIGGER',
    'TRIGGER_CATALOG',
    'TRIGGER_NAME',
    'TRIGGER_SCHEMA',
    'TRIM_ARRAY',
    'TRUNCATE',
    'TRUSTED',
    'TYPE',
    'UESCAPE',
    'UNBOUNDED',
    'UNCOMMITTED',
    'UNDER',
    'UNENCRYPTED',
    'UNKNOWN',
    'UNLISTEN',
    'UNNAMED',
    'UNNEST',
    'UNTIL',
    'UNTYPED',
    'UPDATE',
    'UPPER',
    'URI',
    'USAGE',
    'USER_DEFINED_TYPE_CATALOG',
    'USER_DEFINED_TYPE_CODE',
    'USER_DEFINED_TYPE_NAME',
    'USER_DEFINED_TYPE_SCHEMA',
    'VACUUM',
    'VALID',
    'VALIDATOR',
    'VALUE',
    'VAR_POP',
    'VAR_SAMP',
    'VARBINARY',
    'VARIABLE',
    'VARYING',
    'VERSION',
    'VIEW',
    'VOLATILE',
    'WHENEVER',
    'WHITESPACE',
    'WIDTH_BUCKET',
    'WINDOW',
    'WITHIN',
    'WITHOUT',
    'WORK',
    'WRAPPER',
    'WRITE',
    'XML',
    'XMLAGG',
    'XMLBINARY',
    'XMLCAST',
    'XMLCOMMENT',
    'XMLDECLARATION',
    'XMLDOCUMENT',
    'XMLEXISTS',
    'XMLITERATE',
    'XMLNAMESPACES',
    'XMLQUERY',
    'XMLSCHEMA',
    'XMLTABLE',
    'XMLTEXT',
    'XMLVALIDATE',
    'YEAR',
    'YES',
    'ZONE',
))

#Thanks villas
FIREBIRD = set((
    'ABS',
    'ACTIVE',
    'ADMIN',
    'AFTER',
    'ASCENDING',
    'AUTO',
    'AUTODDL',
    'BASED',
    'BASENAME',
    'BASE_NAME',
    'BEFORE',
    'BIT_LENGTH',
    'BLOB',
    'BLOBEDIT',
    'BOOLEAN',
    'BOTH',
    'BUFFER',
    'CACHE',
    'CHAR_LENGTH',
    'CHARACTER_LENGTH',
    'CHECK_POINT_LEN',
    'CHECK_POINT_LENGTH',
    'CLOSE',
    'COMMITTED',
    'COMPILETIME',
    'COMPUTED',
    'CONDITIONAL',
    'CONNECT',
    'CONTAINING',
    'CROSS',
    'CSTRING',
    'CURRENT_CONNECTION',
    'CURRENT_ROLE',
    'CURRENT_TRANSACTION',
    'CURRENT_USER',
    'DATABASE',
    'DB_KEY',
    'DEBUG',
    'DESCENDING',
    'DISCONNECT',
    'DISPLAY',
    'DO',
    'ECHO',
    'EDIT',
    'ENTRY_POINT',
    'EVENT',
    'EXIT',
    'EXTERN',
    'FALSE',
    'FETCH',
    'FILE',
    'FILTER',
    'FREE_IT',
    'FUNCTION',
    'GDSCODE',
    'GENERATOR',
    'GEN_ID',
    'GLOBAL',
    'GROUP_COMMIT_WAIT',
    'GROUP_COMMIT_WAIT_TIME',
    'HELP',
    'IF',
    'INACTIVE',
    'INDEX',
    'INIT',
    'INPUT_TYPE',
    'INSENSITIVE',
    'ISQL',
    'LC_MESSAGES',
    'LC_TYPE',
    'LEADING',
    'LENGTH',
    'LEV',
    'LOGFILE',
    'LOG_BUFFER_SIZE',
    'LOG_BUF_SIZE',
    'LONG',
    'LOWER',
    'MANUAL',
    'MAXIMUM',
    'MAXIMUM_SEGMENT',
    'MAX_SEGMENT',
    'MERGE',
    'MESSAGE',
    'MINIMUM',
    'MODULE_NAME',
    'NOAUTO',
    'NUM_LOG_BUFS',
    'NUM_LOG_BUFFERS',
    'OCTET_LENGTH',
    'OPEN',
    'OUTPUT_TYPE',
    'OVERFLOW',
    'PAGE',
    'PAGELENGTH',
    'PAGES',
    'PAGE_SIZE',
    'PARAMETER',
#    'PASSWORD',
    'PLAN',
    'POST_EVENT',
    'QUIT',
    'RAW_PARTITIONS',
    'RDB$DB_KEY',
    'RECORD_VERSION',
    'RECREATE',
    'RECURSIVE',
    'RELEASE',
    'RESERV',
    'RESERVING',
    'RETAIN',
    'RETURN',
    'RETURNING_VALUES',
    'RETURNS',
#    'ROLE',
    'ROW_COUNT',
    'ROWS',
    'RUNTIME',
    'SAVEPOINT',
    'SECOND',
    'SENSITIVE',
    'SHADOW',
    'SHARED',
    'SHELL',
    'SHOW',
    'SINGULAR',
    'SNAPSHOT',
    'SORT',
    'STABILITY',
    'START',
    'STARTING',
    'STARTS',
    'STATEMENT',
    'STATIC',
    'STATISTICS',
    'SUB_TYPE',
    'SUSPEND',
    'TERMINATOR',
    'TRAILING',
    'TRIGGER',
    'TRIM',
    'TRUE',
    'TYPE',
    'UNCOMMITTED',
    'UNKNOWN',
    'USING',
    'VARIABLE',
    'VERSION',
    'WAIT',
    'WEEKDAY',
    'WHILE',
    'YEARDAY',
))
FIREBIRD_NONRESERVED = set((
    'BACKUP',
    'BLOCK',
    'COALESCE',
    'COLLATION',
    'COMMENT',
    'DELETING',
    'DIFFERENCE',
    'IIF',
    'INSERTING',
    'LAST',
    'LEAVE',
    'LOCK',
    'NEXT',
    'NULLIF',
    'NULLS',
    'RESTART',
    'RETURNING',
    'SCALAR_ARRAY',
    'SEQUENCE',
    'STATEMENT',
    'UPDATING',
    'ABS',
    'ACCENT',
    'ACOS',
    'ALWAYS',
    'ASCII_CHAR',
    'ASCII_VAL',
    'ASIN',
    'ATAN',
    'ATAN2',
    'BACKUP',
    'BIN_AND',
    'BIN_OR',
    'BIN_SHL',
    'BIN_SHR',
    'BIN_XOR',
    'BLOCK',
    'CEIL',
    'CEILING',
    'COLLATION',
    'COMMENT',
    'COS',
    'COSH',
    'COT',
    'DATEADD',
    'DATEDIFF',
    'DECODE',
    'DIFFERENCE',
    'EXP',
    'FLOOR',
    'GEN_UUID',
    'GENERATED',
    'HASH',
    'IIF',
    'LIST',
    'LN',
    'LOG',
    'LOG10',
    'LPAD',
    'MATCHED',
    'MATCHING',
    'MAXVALUE',
    'MILLISECOND',
    'MINVALUE',
    'MOD',
    'NEXT',
    'OVERLAY',
    'PAD',
    'PI',
    'PLACING',
    'POWER',
    'PRESERVE',
    'RAND',
    'REPLACE',
    'RESTART',
    'RETURNING',
    'REVERSE',
    'ROUND',
    'RPAD',
    'SCALAR_ARRAY',
    'SEQUENCE',
    'SIGN',
    'SIN',
    'SINH',
    'SPACE',
    'SQRT',
    'TAN',
    'TANH',
    'TEMPORARY',
    'TRUNC',
    'WEEK',
))

# Thanks Jonathan Lundell
MYSQL = set((
    'ACCESSIBLE',
    'ADD',
    'ALL',
    'ALTER',
    'ANALYZE',
    'AND',
    'AS',
    'ASC',
    'ASENSITIVE',
    'BEFORE',
    'BETWEEN',
    'BIGINT',
    'BINARY',
    'BLOB',
    'BOTH',
    'BY',
    'CALL',
    'CASCADE',
    'CASE',
    'CHANGE',
    'CHAR',
    'CHARACTER',
    'CHECK',
    'COLLATE',
    'COLUMN',
    'CONDITION',
    'CONSTRAINT',
    'CONTINUE',
    'CONVERT',
    'CREATE',
    'CROSS',
    'CURRENT_DATE',
    'CURRENT_TIME',
    'CURRENT_TIMESTAMP',
    'CURRENT_USER',
    'CURSOR',
    'DATABASE',
    'DATABASES',
    'DAY_HOUR',
    'DAY_MICROSECOND',
    'DAY_MINUTE',
    'DAY_SECOND',
    'DEC',
    'DECIMAL',
    'DECLARE',
    'DEFAULT',
    'DELAYED',
    'DELETE',
    'DESC',
    'DESCRIBE',
    'DETERMINISTIC',
    'DISTINCT',
    'DISTINCTROW',
    'DIV',
    'DOUBLE',
    'DROP',
    'DUAL',
    'EACH',
    'ELSE',
    'ELSEIF',
    'ENCLOSED',
    'ESCAPED',
    'EXISTS',
    'EXIT',
    'EXPLAIN',
    'FALSE',
    'FETCH',
    'FLOAT',
    'FLOAT4',
    'FLOAT8',
    'FOR',
    'FORCE',
    'FOREIGN',
    'FROM',
    'FULLTEXT',
    'GRANT',
    'GROUP',
    'HAVING',
    'HIGH_PRIORITY',
    'HOUR_MICROSECOND',
    'HOUR_MINUTE',
    'HOUR_SECOND',
    'IF',
    'IGNORE',
    'IGNORE_SERVER_IDS',
    'IGNORE_SERVER_IDS',
    'IN',
    'INDEX',
    'INFILE',
    'INNER',
    'INOUT',
    'INSENSITIVE',
    'INSERT',
    'INT',
    'INT1',
    'INT2',
    'INT3',
    'INT4',
    'INT8',
    'INTEGER',
    'INTERVAL',
    'INTO',
    'IS',
    'ITERATE',
    'JOIN',
    'KEY',
    'KEYS',
    'KILL',
    'LEADING',
    'LEAVE',
    'LEFT',
    'LIKE',
    'LIMIT',
    'LINEAR',
    'LINES',
    'LOAD',
    'LOCALTIME',
    'LOCALTIMESTAMP',
    'LOCK',
    'LONG',
    'LONGBLOB',
    'LONGTEXT',
    'LOOP',
    'LOW_PRIORITY',
    'MASTER_HEARTBEAT_PERIOD',
    'MASTER_HEARTBEAT_PERIOD',
    'MASTER_SSL_VERIFY_SERVER_CERT',
    'MATCH',
    'MAXVALUE',
    'MAXVALUE',
    'MEDIUMBLOB',
    'MEDIUMINT',
    'MEDIUMTEXT',
    'MIDDLEINT',
    'MINUTE_MICROSECOND',
    'MINUTE_SECOND',
    'MOD',
    'MODIFIES',
    'NATURAL',
    'NO_WRITE_TO_BINLOG',
    'NOT',
    'NULL',
    'NUMERIC',
    'ON',
    'OPTIMIZE',
    'OPTION',
    'OPTIONALLY',
    'OR',
    'ORDER',
    'OUT',
    'OUTER',
    'OUTFILE',
    'PRECISION',
    'PRIMARY',
    'PROCEDURE',
    'PURGE',
    'RANGE',
    'READ',
    'READ_WRITE',
    'READS',
    'REAL',
    'REFERENCES',
    'REGEXP',
    'RELEASE',
    'RENAME',
    'REPEAT',
    'REPLACE',
    'REQUIRE',
    'RESIGNAL',
    'RESIGNAL',
    'RESTRICT',
    'RETURN',
    'REVOKE',
    'RIGHT',
    'RLIKE',
    'SCHEMA',
    'SCHEMAS',
    'SECOND_MICROSECOND',
    'SELECT',
    'SENSITIVE',
    'SEPARATOR',
    'SET',
    'SHOW',
    'SIGNAL',
    'SIGNAL',
    'SMALLINT',
    'SPATIAL',
    'SPECIFIC',
    'SQL',
    'SQL_BIG_RESULT',
    'SQL_CALC_FOUND_ROWS',
    'SQL_SMALL_RESULT',
    'SQLEXCEPTION',
    'SQLSTATE',
    'SQLWARNING',
    'SSL',
    'STARTING',
    'STRAIGHT_JOIN',
    'TABLE',
    'TERMINATED',
    'THEN',
    'TINYBLOB',
    'TINYINT',
    'TINYTEXT',
    'TO',
    'TRAILING',
    'TRIGGER',
    'TRUE',
    'UNDO',
    'UNION',
    'UNIQUE',
    'UNLOCK',
    'UNSIGNED',
    'UPDATE',
    'USAGE',
    'USE',
    'USING',
    'UTC_DATE',
    'UTC_TIME',
    'UTC_TIMESTAMP',
    'VALUES',
    'VARBINARY',
    'VARCHAR',
    'VARCHARACTER',
    'VARYING',
    'WHEN',
    'WHERE',
    'WHILE',
    'WITH',
    'WRITE',
    'XOR',
    'YEAR_MONTH',
    'ZEROFILL',
))

MSSQL = set((
    'ADD',
    'ALL',
    'ALTER',
    'AND',
    'ANY',
    'AS',
    'ASC',
    'AUTHORIZATION',
    'BACKUP',
    'BEGIN',
    'BETWEEN',
    'BREAK',
    'BROWSE',
    'BULK',
    'BY',
    'CASCADE',
    'CASE',
    'CHECK',
    'CHECKPOINT',
    'CLOSE',
    'CLUSTERED',
    'COALESCE',
    'COLLATE',
    'COLUMN',
    'COMMIT',
    'COMPUTE',
    'CONSTRAINT',
    'CONTAINS',
    'CONTAINSTABLE',
    'CONTINUE',
    'CONVERT',
    'CREATE',
    'CROSS',
    'CURRENT',
    'CURRENT_DATE',
    'CURRENT_TIME',
    'CURRENT_TIMESTAMP',
    'CURRENT_USER',
    'CURSOR',
    'DATABASE',
    'DBCC',
    'DEALLOCATE',
    'DECLARE',
    'DEFAULT',
    'DELETE',
    'DENY',
    'DESC',
    'DISK',
    'DISTINCT',
    'DISTRIBUTED',
    'DOUBLE',
    'DROP',
    'DUMMY',
    'DUMP',
    'ELSE',
    'END',
    'ERRLVL',
    'ESCAPE',
    'EXCEPT',
    'EXEC',
    'EXECUTE',
    'EXISTS',
    'EXIT',
    'FETCH',
    'FILE',
    'FILLFACTOR',
    'FOR',
    'FOREIGN',
    'FREETEXT',
    'FREETEXTTABLE',
    'FROM',
    'FULL',
    'FUNCTION',
    'GOTO',
    'GRANT',
    'GROUP',
    'HAVING',
    'HOLDLOCK',
    'IDENTITY',
    'IDENTITY_INSERT',
    'IDENTITYCOL',
    'IF',
    'IN',
    'INDEX',
    'INNER',
    'INSERT',
    'INTERSECT',
    'INTO',
    'IS',
    'JOIN',
    'KEY',
    'KILL',
    'LEFT',
    'LIKE',
    'LINENO',
    'LOAD',
    'NATIONAL ',
    'NOCHECK',
    'NONCLUSTERED',
    'NOT',
    'NULL',
    'NULLIF',
    'OF',
    'OFF',
    'OFFSETS',
    'ON',
    'OPEN',
    'OPENDATASOURCE',
    'OPENQUERY',
    'OPENROWSET',
    'OPENXML',
    'OPTION',
    'OR',
    'ORDER',
    'OUTER',
    'OVER',
    'PERCENT',
    'PLAN',
    'PRECISION',
    'PRIMARY',
    'PRINT',
    'PROC',
    'PROCEDURE',
    'PUBLIC',
    'RAISERROR',
    'READ',
    'READTEXT',
    'RECONFIGURE',
    'REFERENCES',
    'REPLICATION',
    'RESTORE',
    'RESTRICT',
    'RETURN',
    'REVOKE',
    'RIGHT',
    'ROLLBACK',
    'ROWCOUNT',
    'ROWGUIDCOL',
    'RULE',
    'SAVE',
    'SCHEMA',
    'SELECT',
    'SESSION_USER',
    'SET',
    'SETUSER',
    'SHUTDOWN',
    'SOME',
    'STATISTICS',
    'SYSTEM_USER',
    'TABLE',
    'TEXTSIZE',
    'THEN',
    'TO',
    'TOP',
    'TRAN',
    'TRANSACTION',
    'TRIGGER',
    'TRUNCATE',
    'TSEQUAL',
    'UNION',
    'UNIQUE',
    'UPDATE',
    'UPDATETEXT',
    'USE',
    'USER',
    'VALUES',
    'VARYING',
    'VIEW',
    'WAITFOR',
    'WHEN',
    'WHERE',
    'WHILE',
    'WITH',
    'WRITETEXT',
))

ORACLE = set((
    'ACCESS',
    'ADD',
    'ALL',
    'ALTER',
    'AND',
    'ANY',
    'AS',
    'ASC',
    'AUDIT',
    'BETWEEN',
    'BY',
    'CHAR',
    'CHECK',
    'CLUSTER',
    'COLUMN',
    'COMMENT',
    'COMPRESS',
    'CONNECT',
    'CREATE',
    'CURRENT',
    'DATE',
    'DECIMAL',
    'DEFAULT',
    'DELETE',
    'DESC',
    'DISTINCT',
    'DROP',
    'ELSE',
    'EXCLUSIVE',
    'EXISTS',
    'FILE',
    'FLOAT',
    'FOR',
    'FROM',
    'GRANT',
    'GROUP',
    'HAVING',
    'IDENTIFIED',
    'IMMEDIATE',
    'IN',
    'INCREMENT',
    'INDEX',
    'INITIAL',
    'INSERT',
    'INTEGER',
    'INTERSECT',
    'INTO',
    'IS',
    'LEVEL',
    'LIKE',
    'LOCK',
    'LONG',
    'MAXEXTENTS',
    'MINUS',
    'MLSLABEL',
    'MODE',
    'MODIFY',
    'NOAUDIT',
    'NOCOMPRESS',
    'NOT',
    'NOWAIT',
    'NULL',
    'NUMBER',
    'OF',
    'OFFLINE',
    'ON',
    'ONLINE',
    'OPTION',
    'OR',
    'ORDER',
    'PCTFREE',
    'PRIOR',
    'PRIVILEGES',
    'PUBLIC',
    'RAW',
    'RENAME',
    'RESOURCE',
    'REVOKE',
    'ROW',
    'ROWID',
    'ROWNUM',
    'ROWS',
    'SELECT',
    'SESSION',
    'SET',
    'SHARE',
    'SIZE',
    'SMALLINT',
    'START',
    'SUCCESSFUL',
    'SYNONYM',
    'SYSDATE',
    'TABLE',
    'THEN',
    'TO',
    'TRIGGER',
    'UID',
    'UNION',
    'UNIQUE',
    'UPDATE',
    'USER',
    'VALIDATE',
    'VALUES',
    'VARCHAR',
    'VARCHAR2',
    'VIEW',
    'WHENEVER',
    'WHERE',
    'WITH',
))

SQLITE = set((
    'ABORT',
    'ACTION',
    'ADD',
    'AFTER',
    'ALL',
    'ALTER',
    'ANALYZE',
    'AND',
    'AS',
    'ASC',
    'ATTACH',
    'AUTOINCREMENT',
    'BEFORE',
    'BEGIN',
    'BETWEEN',
    'BY',
    'CASCADE',
    'CASE',
    'CAST',
    'CHECK',
    'COLLATE',
    'COLUMN',
    'COMMIT',
    'CONFLICT',
    'CONSTRAINT',
    'CREATE',
    'CROSS',
    'CURRENT_DATE',
    'CURRENT_TIME',
    'CURRENT_TIMESTAMP',
    'DATABASE',
    'DEFAULT',
    'DEFERRABLE',
    'DEFERRED',
    'DELETE',
    'DESC',
    'DETACH',
    'DISTINCT',
    'DROP',
    'EACH',
    'ELSE',
    'END',
    'ESCAPE',
    'EXCEPT',
    'EXCLUSIVE',
    'EXISTS',
    'EXPLAIN',
    'FAIL',
    'FOR',
    'FOREIGN',
    'FROM',
    'FULL',
    'GLOB',
    'GROUP',
    'HAVING',
    'IF',
    'IGNORE',
    'IMMEDIATE',
    'IN',
    'INDEX',
    'INDEXED',
    'INITIALLY',
    'INNER',
    'INSERT',
    'INSTEAD',
    'INTERSECT',
    'INTO',
    'IS',
    'ISNULL',
    'JOIN',
    'KEY',
    'LEFT',
    'LIKE',
    'LIMIT',
    'MATCH',
    'NATURAL',
    'NO',
    'NOT',
    'NOTNULL',
    'NULL',
    'OF',
    'OFFSET',
    'ON',
    'OR',
    'ORDER',
    'OUTER',
    'PLAN',
    'PRAGMA',
    'PRIMARY',
    'QUERY',
    'RAISE',
    'REFERENCES',
    'REGEXP',
    'REINDEX',
    'RELEASE',
    'RENAME',
    'REPLACE',
    'RESTRICT',
    'RIGHT',
    'ROLLBACK',
    'ROW',
    'SAVEPOINT',
    'SELECT',
    'SET',
    'TABLE',
    'TEMP',
    'TEMPORARY',
    'THEN',
    'TO',
    'TRANSACTION',
    'TRIGGER',
    'UNION',
    'UNIQUE',
    'UPDATE',
    'USING',
    'VACUUM',
    'VALUES',
    'VIEW',
    'VIRTUAL',
    'WHEN',
    'WHERE',
))

# remove from here when you add a list.
JDBCSQLITE = SQLITE
DB2 = INFORMIX = INGRES = JDBCPOSTGRESQL = COMMON

ADAPTERS = {
    'sqlite': SQLITE,
    'mysql': MYSQL,
    'postgres': POSTGRESQL,
    'postgres_nonreserved': POSTGRESQL_NONRESERVED,
    'oracle': ORACLE,
    'mssql': MSSQL,
    'mssql2': MSSQL,
    'db2': DB2,
    'informix': INFORMIX,
    'firebird': FIREBIRD,
    'firebird_embedded': FIREBIRD,
    'firebird_nonreserved': FIREBIRD_NONRESERVED,
    'ingres': INGRES,
    'ingresu': INGRES,
    'jdbc:sqlite': JDBCSQLITE,
    'jdbc:postgres': JDBCPOSTGRESQL,
    'common': COMMON,
}

ADAPTERS['all'] = reduce(lambda a,b:a.union(b),(x for x in ADAPTERS.values()))

Added gluon/restricted.py version [610deece4c].































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import sys
import cPickle
import traceback
import types
import os
import datetime
import logging

from utils import web2py_uuid
from storage import Storage
from http import HTTP
from html import BEAUTIFY

logger = logging.getLogger("web2py")

__all__ = ['RestrictedError', 'restricted', 'TicketStorage', 'compile2']

class TicketStorage(Storage):

    """
    defines the ticket object and the default values of its members (None)
    """

    def __init__(
        self,
        db=None,
        tablename='web2py_ticket'
        ):
        self.db = db
        self.tablename = tablename

    def store(self, request, ticket_id, ticket_data):
        """
        stores the ticket. It will figure out if this must be on disk or in db
        """
        if self.db:
            self._store_in_db(request, ticket_id, ticket_data)
        else:
            self._store_on_disk(request, ticket_id, ticket_data)

    def _store_in_db(self, request, ticket_id, ticket_data):
        table = self._get_table(self.db, self.tablename, request.application)
        table.insert(ticket_id=ticket_id,
                     ticket_data=cPickle.dumps(ticket_data),
                     created_datetime=request.now)
        logger.error('In FILE: %(layer)s\n\n%(traceback)s\n' % ticket_data)

    def _store_on_disk(self, request, ticket_id, ticket_data):
        ef = self._error_file(request, ticket_id, 'wb')
        try:
            cPickle.dump(ticket_data, ef)
        finally:
            ef.close()

    def _error_file(self, request, ticket_id, mode, app=None):
        root = request.folder
        if app:
            root = os.path.join(os.path.join(root, '..'), app)
        errors_folder = os.path.abspath(os.path.join(root, 'errors'))#.replace('\\', '/')
        return open(os.path.join(errors_folder, ticket_id), mode)

    def _get_table(self, db, tablename, app):
        tablename = tablename + '_' + app
        table = db.get(tablename, None)
        if table is None:
            db.rollback()   # not necessary but one day
                            # any app may store tickets on DB
            table = db.define_table(
                tablename,
                db.Field('ticket_id', length=100),
                db.Field('ticket_data', 'text'),
                db.Field('created_datetime', 'datetime'),
                )
        return table

    def load(
        self,
        request,
        app,
        ticket_id,
        ):
        if not self.db:
            ef = self._error_file(request, ticket_id, 'rb', app)
            try:
                return cPickle.load(ef)
            finally:
                ef.close()
        table = self._get_table(self.db, self.tablename, app)
        rows = self.db(table.ticket_id == ticket_id).select()
        if rows:
            return cPickle.loads(rows[0].ticket_data)
        return None


class RestrictedError(Exception):
    """
    class used to wrap an exception that occurs in the restricted environment
    below. the traceback is used to log the exception and generate a ticket.
    """

    def __init__(
        self,
        layer='',
        code='',
        output='',
        environment={},
        ):
        """
        layer here is some description of where in the system the exception
        occurred.
        """

        self.layer = layer
        self.code = code
        self.output = output
        if layer:
            try:
                self.traceback = traceback.format_exc()
            except:
                self.traceback = 'no traceback because template parting error'
            try:
                self.snapshot = snapshot(context=10,code=code,environment=environment)
            except:
                self.snapshot = {}
        else:
            self.traceback = '(no error)'
            self.snapshot = {}
        self.environment = environment

    def log(self, request):
        """
        logs the exception.
        """

        try:
            d = {
                'layer': str(self.layer),
                'code': str(self.code),
                'output': str(self.output),
                'traceback': str(self.traceback),
                'snapshot': self.snapshot,
                }
            ticket_storage = TicketStorage(db=request.tickets_db)
            ticket_storage.store(request, request.uuid.split('/',1)[1], d)
            return request.uuid
        except:
            logger.error(self.traceback)
            return None


    def load(self, request, app, ticket_id):
        """
        loads a logged exception.
        """
        ticket_storage = TicketStorage(db=request.tickets_db)
        d = ticket_storage.load(request, app, ticket_id)

        self.layer = d['layer']
        self.code = d['code']
        self.output = d['output']
        self.traceback = d['traceback']
        self.snapshot = d.get('snapshot')


def compile2(code,layer):
    """
    The +'\n' is necessary else compile fails when code ends in a comment.
    """
    return compile(code.rstrip().replace('\r\n','\n')+'\n', layer, 'exec')

def restricted(code, environment={}, layer='Unknown'):
    """
    runs code in environment and returns the output. if an exception occurs
    in code it raises a RestrictedError containing the traceback. layer is
    passed to RestrictedError to identify where the error occurred.
    """
    environment['__file__'] = layer
    try:
        if type(code) == types.CodeType:
            ccode = code
        else:
            ccode = compile2(code,layer)
        exec ccode in environment
    except HTTP:
        raise
    except Exception, error:
        # XXX Show exception in Wing IDE if running in debugger
        if __debug__ and 'WINGDB_ACTIVE' in os.environ:
            etype, evalue, tb = sys.exc_info()
            sys.excepthook(etype, evalue, tb)
        raise RestrictedError(layer, code, '', environment)

def snapshot(info=None, context=5, code=None, environment=None):
    """Return a dict describing a given traceback (based on cgitb.text)."""
    import os, types, time, traceback, linecache, inspect, pydoc, cgitb

    # if no exception info given, get current:
    etype, evalue, etb = info or sys.exc_info()

    if type(etype) is types.ClassType:
        etype = etype.__name__

    # create a snapshot dict with some basic information
    s = {}
    s['pyver'] = 'Python ' + sys.version.split()[0] + ': ' + sys.executable
    s['date'] = time.ctime(time.time())

    # start to process frames
    records = inspect.getinnerframes(etb, context)
    s['frames'] = []
    for frame, file, lnum, func, lines, index in records:
        file = file and os.path.abspath(file) or '?'
        args, varargs, varkw, locals = inspect.getargvalues(frame)
        call = ''
        if func != '?':
            call = inspect.formatargvalues(args, varargs, varkw, locals,
                    formatvalue=lambda value: '=' + pydoc.text.repr(value))

        # basic frame information
        f = {'file': file, 'func': func, 'call': call, 'lines': {}, 'lnum': lnum}

        highlight = {}
        def reader(lnum=[lnum]):
            highlight[lnum[0]] = 1
            try: return linecache.getline(file, lnum[0])
            finally: lnum[0] += 1
        vars = cgitb.scanvars(reader, frame, locals)

        # if it is a view, replace with generated code
        if file.endswith('html'):
            lmin = lnum>context and (lnum-context) or 0
            lmax = lnum+context
            lines = code.split("\n")[lmin:lmax]
            index = min(context, lnum) - 1

        if index is not None:
            i = lnum - index
            for line in lines:
                f['lines'][i] = line.rstrip()
                i += 1

        # dump local variables (referenced in current line only)
        f['dump'] = {}
        for name, where, value in vars:
            if name in f['dump']: continue
            if value is not cgitb.__UNDEF__:
                if where == 'global': name = 'global ' + name
                elif where != 'local': name = where + name.split('.')[-1]
                f['dump'][name] = pydoc.text.repr(value)
            else:
                f['dump'][name] = 'undefined'

        s['frames'].append(f)

    # add exception type, value and attributes
    s['etype'] = str(etype)
    s['evalue'] = str(evalue)
    s['exception'] = {}
    if isinstance(evalue, BaseException):
        for name in dir(evalue):
            # prevent py26 DeprecatedWarning:
            if name!='message' or sys.version_info<(2.6):
                value = pydoc.text.repr(getattr(evalue, name))
                s['exception'][name] = value

    # add all local values (of last frame) to the snapshot
    s['locals'] = {}
    for name, value in locals.items():
        s['locals'][name] = pydoc.text.repr(value)

    # add web2py environment variables
    for k,v in environment.items():
        if k in ('request', 'response', 'session'):
            s[k] = BEAUTIFY(v)

    return s

Added gluon/rewrite.py version [a3895bf0e7].





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

gluon.rewrite parses incoming URLs and formats outgoing URLs for gluon.html.URL.

In addition, it rewrites both incoming and outgoing URLs based on the (optional) user-supplied routes.py,
which also allows for rewriting of certain error messages.

routes.py supports two styles of URL rewriting, depending on whether 'routers' is defined.
Refer to router.example.py and routes.example.py for additional documentation.

"""

import os
import re
import logging
import traceback
import threading
import urllib
from storage import Storage, List
from http import HTTP
from fileutils import abspath, read_file
from settings import global_settings

logger = logging.getLogger('web2py.rewrite')

thread = threading.local()  # thread-local storage for routing parameters

def _router_default():
    "return new copy of default base router"
    router = Storage(
        default_application = 'init',
            applications = 'ALL',
        default_controller = 'default',
            controllers = 'DEFAULT',
        default_function = 'index',
            functions = None,
        default_language = None,
            languages = None,
        root_static = ['favicon.ico', 'robots.txt'],
        domains = None,
        exclusive_domain = False,
        map_hyphen = False,
        acfe_match = r'\w+$',              # legal app/ctlr/fcn/ext
        file_match = r'(\w+[-=./]?)+$',    # legal file (path) name
        args_match = r'([\w@ -]+[=.]?)*$', # legal arg in args
    )
    return router

def _params_default(app=None):
    "return new copy of default parameters"
    p = Storage()
    p.name = app or "BASE"
    p.default_application = app or "init"
    p.default_controller = "default"
    p.default_function = "index"
    p.routes_app = []
    p.routes_in = []
    p.routes_out = []
    p.routes_onerror = []
    p.routes_apps_raw = []
    p.error_handler = None
    p.error_message = '<html><body><h1>%s</h1></body></html>'
    p.error_message_ticket = \
        '<html><body><h1>Internal error</h1>Ticket issued: <a href="/admin/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a></body><!-- this is junk text else IE does not display the page: '+('x'*512)+' //--></html>'
    p.routers = None
    return p

params_apps = dict()
params = _params_default(app=None)  # regex rewrite parameters
thread.routes = params              # default to base regex rewrite parameters
routers = None

ROUTER_KEYS = set(('default_application', 'applications', 'default_controller', 'controllers',
    'default_function', 'functions', 'default_language', 'languages',
    'domain', 'domains', 'root_static', 'path_prefix',
    'exclusive_domain', 'map_hyphen', 'map_static',
    'acfe_match', 'file_match', 'args_match'))

ROUTER_BASE_KEYS = set(('applications', 'default_application', 'domains', 'path_prefix'))

#  The external interface to rewrite consists of:
#
#  load: load routing configuration file(s)
#  url_in: parse and rewrite incoming URL
#  url_out: assemble and rewrite outgoing URL
#
#  thread.routes.default_application
#  thread.routes.error_message
#  thread.routes.error_message_ticket
#  thread.routes.try_redirect_on_error
#  thread.routes.error_handler
#
#  filter_url: helper for doctest & unittest
#  filter_err: helper for doctest & unittest
#  regex_filter_out: doctest

def url_in(request, environ):
    "parse and rewrite incoming URL"
    if routers:
        return map_url_in(request, environ)
    return regex_url_in(request, environ)

def url_out(request, env, application, controller, function, args, other, scheme, host, port):
    "assemble and rewrite outgoing URL"
    if routers:
        acf = map_url_out(request, env, application, controller, function, args, other, scheme, host, port)
        url = '%s%s' % (acf, other)
    else:
        url = '/%s/%s/%s%s' % (application, controller, function, other)
        url = regex_filter_out(url, env)
    #
    #  fill in scheme and host if absolute URL is requested
    #  scheme can be a string, eg 'http', 'https', 'ws', 'wss'
    #
    if scheme or port is not None:
        if host is None:    # scheme or port implies host
            host = True
    if not scheme or scheme is True:
        if request and request.env:
            scheme = request.env.get('WSGI_URL_SCHEME', 'http').lower()
        else:
            scheme = 'http' # some reasonable default in case we need it
    if host is not None:
        if host is True:
            host = request.env.http_host
    if host:
        if port is None:
            port = ''
        else:
            port = ':%s' % port
        url = '%s://%s%s%s' % (scheme, host, port, url)
    return url

def try_rewrite_on_error(http_response, request, environ, ticket=None):
    """
    called from main.wsgibase to rewrite the http response.
    """
    status = int(str(http_response.status).split()[0])
    if status>=399 and thread.routes.routes_onerror:
        keys=set(('%s/%s' % (request.application, status),
                  '%s/*' % (request.application),
                  '*/%s' % (status),
                  '*/*'))
        for (key,uri) in thread.routes.routes_onerror:
            if key in keys:
                if uri == '!':
                    # do nothing!
                    return http_response, environ
                elif '?' in uri:
                    path_info, query_string = uri.split('?',1)
                    query_string += '&'
                else:
                    path_info, query_string = uri, ''
                query_string += \
                    'code=%s&ticket=%s&requested_uri=%s&request_url=%s' % \
                    (status,ticket,request.env.request_uri,request.url)
                if uri.startswith('http://') or uri.startswith('https://'):
                    # make up a response
                    url = path_info+'?'+query_string
                    message = 'You are being redirected <a href="%s">here</a>'
                    return HTTP(303, message % url, Location=url), environ
                elif path_info!=environ['PATH_INFO']:
                    # rewrite request, call wsgibase recursively, avoid loop
                    environ['PATH_INFO'] = path_info
                    environ['QUERY_STRING'] = query_string
                    return None, environ
    # do nothing!
    return http_response, environ

def try_redirect_on_error(http_object, request, ticket=None):
    "called from main.wsgibase to rewrite the http response"
    status = int(str(http_object.status).split()[0])
    if status>399 and thread.routes.routes_onerror:
        keys=set(('%s/%s' % (request.application, status),
                  '%s/*' % (request.application),
                  '*/%s' % (status),
                  '*/*'))
        for (key,redir) in thread.routes.routes_onerror:
            if key in keys:
                if redir == '!':
                    break
                elif '?' in redir:
                    url = '%s&code=%s&ticket=%s&requested_uri=%s&request_url=%s' % \
                        (redir,status,ticket,request.env.request_uri,request.url)
                else:
                    url = '%s?code=%s&ticket=%s&requested_uri=%s&request_url=%s' % \
                        (redir,status,ticket,request.env.request_uri,request.url)
                return HTTP(303,
                            'You are being redirected <a href="%s">here</a>' % url,
                            Location=url)
    return http_object


def load(routes='routes.py', app=None, data=None, rdict=None):
    """
    load: read (if file) and parse routes
    store results in params
    (called from main.py at web2py initialization time)
    If data is present, it's used instead of the routes.py contents.
    If rdict is present, it must be a dict to be used for routers (unit test)
    """
    global params
    global routers
    if app is None:
        # reinitialize
        global params_apps
        params_apps = dict()
        params = _params_default(app=None)  # regex rewrite parameters
        thread.routes = params              # default to base regex rewrite parameters
        routers = None

    if isinstance(rdict, dict):
        symbols = dict(routers=rdict)
        path = 'rdict'
    else:
        if data is not None:
            path = 'routes'
        else:
            if app is None:
                path = abspath(routes)
            else:
                path = abspath('applications', app, routes)
            if not os.path.exists(path):
                return
            data = read_file(path).replace('\r\n','\n')

        symbols = {}
        try:
            exec (data + '\n') in symbols
        except SyntaxError, e:
            logger.error(
                '%s has a syntax error and will not be loaded\n' % path
                + traceback.format_exc())
            raise e

    p = _params_default(app)

    for sym in ('routes_app', 'routes_in', 'routes_out'):
        if sym in symbols:
            for (k, v) in symbols[sym]:
                p[sym].append(compile_regex(k, v))
    for sym in ('routes_onerror', 'routes_apps_raw',
                'error_handler','error_message', 'error_message_ticket',
                'default_application','default_controller', 'default_function'):
        if sym in symbols:
            p[sym] = symbols[sym]
    if 'routers' in symbols:
        p.routers = Storage(symbols['routers'])
        for key in p.routers:
            if isinstance(p.routers[key], dict):
                p.routers[key] = Storage(p.routers[key])

    if app is None:
        params = p                  # install base rewrite parameters
        thread.routes = params      # install default as current routes
        #
        #  create the BASE router if routers in use
        #
        routers = params.routers    # establish routers if present
        if isinstance(routers, dict):
            routers = Storage(routers)
        if routers is not None:
            router = _router_default()
            if routers.BASE:
                router.update(routers.BASE)
            routers.BASE = router

        #  scan each app in applications/
        #    create a router, if routers are in use
        #    parse the app-specific routes.py if present
        #
        all_apps = []
        for appname in [app for app in os.listdir(abspath('applications')) if not app.startswith('.')]:
            if os.path.isdir(abspath('applications', appname)) and \
               os.path.isdir(abspath('applications', appname, 'controllers')):
                all_apps.append(appname)
                if routers:
                    router = Storage(routers.BASE)   # new copy
                    if appname in routers:
                        for key in routers[appname].keys():
                            if key in ROUTER_BASE_KEYS:
                                raise SyntaxError, "BASE-only key '%s' in router '%s'" % (key, appname)
                        router.update(routers[appname])
                    routers[appname] = router
                if os.path.exists(abspath('applications', appname, routes)):
                    load(routes, appname)

        if routers:
            load_routers(all_apps)

    else: # app
        params_apps[app] = p
        if routers and p.routers:
            if app in p.routers:
                routers[app].update(p.routers[app])

    logger.debug('URL rewrite is on. configuration in %s' % path)


regex_at = re.compile(r'(?<!\\)\$[a-zA-Z]\w*')
regex_anything = re.compile(r'(?<!\\)\$anything')

def compile_regex(k, v):
    """
    Preprocess and compile the regular expressions in routes_app/in/out

    The resulting regex will match a pattern of the form:

        [remote address]:[protocol]://[host]:[method] [path]

    We allow abbreviated regexes on input; here we try to complete them.
    """
    k0 = k  # original k for error reporting
    # bracket regex in ^...$ if not already done
    if not k[0] == '^':
        k = '^%s' % k
    if not k[-1] == '$':
        k = '%s$' % k
    # if there are no :-separated parts, prepend a catch-all for the IP address
    if k.find(':') < 0:
        # k = '^.*?:%s' % k[1:]
        k = '^.*?:https?://[^:/]+:[a-z]+ %s' % k[1:]
    # if there's no ://, provide a catch-all for the protocol, host & method
    if k.find('://') < 0:
        i = k.find(':/')
        if i < 0:
            raise SyntaxError, "routes pattern syntax error: path needs leading '/' [%s]" % k0
        k = r'%s:https?://[^:/]+:[a-z]+ %s' % (k[:i], k[i+1:])
    # $anything -> ?P<anything>.*
    for item in regex_anything.findall(k):
        k = k.replace(item, '(?P<anything>.*)')
    # $a (etc) -> ?P<a>\w+
    for item in regex_at.findall(k):
        k = k.replace(item, r'(?P<%s>\w+)' % item[1:])
    # same for replacement pattern, but with \g
    for item in regex_at.findall(v):
        v = v.replace(item, r'\g<%s>' % item[1:])
    return (re.compile(k, re.DOTALL), v)

def load_routers(all_apps):
    "load-time post-processing of routers"

    for app in routers.keys():
        # initialize apps with routers that aren't present, on behalf of unit tests
        if app not in all_apps:
            all_apps.append(app)
            router = Storage(routers.BASE)   # new copy
            if app != 'BASE':
                for key in routers[app].keys():
                    if key in ROUTER_BASE_KEYS:
                        raise SyntaxError, "BASE-only key '%s' in router '%s'" % (key, app)
            router.update(routers[app])
            routers[app] = router
        router = routers[app]
        for key in router.keys():
            if key not in ROUTER_KEYS:
                raise SyntaxError, "unknown key '%s' in router '%s'" % (key, app)
        if not router.controllers:
            router.controllers = set()
        elif not isinstance(router.controllers, str):
            router.controllers = set(router.controllers)
        if router.functions:
            router.functions = set(router.functions)
        else:
            router.functions = set()
        if router.languages:
            router.languages = set(router.languages)
        else:
            router.languages = set()
        if app != 'BASE':
            for base_only in ROUTER_BASE_KEYS:
                router.pop(base_only, None)
            if 'domain' in router:
                routers.BASE.domains[router.domain] = app
            if isinstance(router.controllers, str) and router.controllers == 'DEFAULT':
                router.controllers = set()
                if os.path.isdir(abspath('applications', app)):
                    cpath = abspath('applications', app, 'controllers')
                    for cname in os.listdir(cpath):
                        if os.path.isfile(abspath(cpath, cname)) and cname.endswith('.py'):
                            router.controllers.add(cname[:-3])
            if router.controllers:
                router.controllers.add('static')
                router.controllers.add(router.default_controller)
            if router.functions:
                router.functions.add(router.default_function)

    if isinstance(routers.BASE.applications, str) and routers.BASE.applications == 'ALL':
        routers.BASE.applications = list(all_apps)
    if routers.BASE.applications:
        routers.BASE.applications = set(routers.BASE.applications)
    else:
        routers.BASE.applications = set()

    for app in routers.keys():
        # set router name
        router = routers[app]
        router.name = app
        # compile URL validation patterns
        router._acfe_match = re.compile(router.acfe_match)
        router._file_match = re.compile(router.file_match)
        if router.args_match:
            router._args_match = re.compile(router.args_match)
        # convert path_prefix to a list of path elements
        if router.path_prefix:
            if isinstance(router.path_prefix, str):
                router.path_prefix = router.path_prefix.strip('/').split('/')

    #  rewrite BASE.domains as tuples
    #
    #      key:   'domain[:port]' -> (domain, port)
    #      value: 'application[/controller] -> (application, controller)
    #      (port and controller may be None)
    #
    domains = dict()
    if routers.BASE.domains:
        for (domain, app) in [(d.strip(':'), a.strip('/')) for (d, a) in routers.BASE.domains.items()]:
            port = None
            if ':' in domain:
                (domain, port) = domain.split(':')
            ctlr = None
            if '/' in app:
                (app, ctlr) = app.split('/')
            if app not in all_apps and app not in routers:
                raise SyntaxError, "unknown app '%s' in domains" % app
            domains[(domain, port)] = (app, ctlr)
    routers.BASE.domains = domains

def regex_uri(e, regexes, tag, default=None):
    "filter incoming URI against a list of regexes"
    path = e['PATH_INFO']
    host = e.get('HTTP_HOST', 'localhost').lower()
    i = host.find(':')
    if i > 0:
        host = host[:i]
    key = '%s:%s://%s:%s %s' % \
        (e.get('REMOTE_ADDR','localhost'),
         e.get('WSGI_URL_SCHEME', 'http').lower(), host,
         e.get('REQUEST_METHOD', 'get').lower(), path)
    for (regex, value) in regexes:
        if regex.match(key):
            rewritten = regex.sub(value, key)
            logger.debug('%s: [%s] [%s] -> %s' % (tag, key, value, rewritten))
            return rewritten
    logger.debug('%s: [%s] -> %s (not rewritten)' % (tag, key, default))
    return default

def regex_select(env=None, app=None, request=None):
    """
    select a set of regex rewrite params for the current request
    """
    if app:
        thread.routes = params_apps.get(app, params)
    elif env and params.routes_app:
        if routers:
            map_url_in(request, env, app=True)
        else:
            app = regex_uri(env, params.routes_app, "routes_app")
            thread.routes = params_apps.get(app, params)
    else:
        thread.routes = params # default to base rewrite parameters
    logger.debug("select routing parameters: %s" % thread.routes.name)
    return app  # for doctest

def regex_filter_in(e):
    "regex rewrite incoming URL"
    query = e.get('QUERY_STRING', None)
    e['WEB2PY_ORIGINAL_URI'] = e['PATH_INFO'] + (query and ('?' + query) or '')
    if thread.routes.routes_in:
        path = regex_uri(e, thread.routes.routes_in, "routes_in", e['PATH_INFO'])
        items = path.split('?', 1)
        e['PATH_INFO'] = items[0]
        if len(items) > 1:
            if query:
                query = items[1] + '&' + query
            else:
                query = items[1]
            e['QUERY_STRING'] = query
    e['REQUEST_URI'] = e['PATH_INFO'] + (query and ('?' + query) or '')
    return e


# pattern to replace spaces with underscore in URL
#   also the html escaped variants '+' and '%20' are covered
regex_space = re.compile('(\+|\s|%20)+')

# pattern to find valid paths in url /application/controller/...
#   this could be:
#     for static pages:
#        /<b:application>/static/<x:file>
#     for dynamic pages:
#        /<a:application>[/<c:controller>[/<f:function>[.<e:ext>][/<s:args>]]]
#   application, controller, function and ext may only contain [a-zA-Z0-9_]
#   file and args may also contain '-', '=', '.' and '/'
#   apps in routes_apps_raw must parse raw_args into args

regex_static = re.compile(r'''
     (^                              # static pages
         /(?P<b> \w+)                # b=app
         /static                     # /b/static
         /(?P<x> (\w[\-\=\./]?)* )   # x=file
     $)
     ''', re.X)

regex_url = re.compile(r'''
     (^(                                  # (/a/c/f.e/s)
         /(?P<a> [\w\s+]+ )               # /a=app
         (                                # (/c.f.e/s)
             /(?P<c> [\w\s+]+ )           # /a/c=controller
             (                            # (/f.e/s)
                 /(?P<f> [\w\s+]+ )       # /a/c/f=function
                 (                        # (.e)
                     \.(?P<e> [\w\s+]+ )  # /a/c/f.e=extension
                 )?
                 (                        # (/s)
                     /(?P<r>              # /a/c/f.e/r=raw_args
                     .*
                     )
                 )?
             )?
         )?
     )?
     /?$)
     ''', re.X)

regex_args = re.compile(r'''
     (^
         (?P<s>
             ( [\w@/-][=.]? )*          # s=args
         )?
     /?$)    # trailing slash
     ''', re.X)

def regex_url_in(request, environ):
    "rewrite and parse incoming URL"

    # ##################################################
    # select application
    # rewrite URL if routes_in is defined
    # update request.env
    # ##################################################

    regex_select(env=environ, request=request)

    if thread.routes.routes_in:
        environ = regex_filter_in(environ)

    for (key, value) in environ.items():
        request.env[key.lower().replace('.', '_')] = value

    path = request.env.path_info.replace('\\', '/')

    # ##################################################
    # serve if a static file
    # ##################################################

    match = regex_static.match(regex_space.sub('_', path))
    if match and match.group('x'):
        static_file = os.path.join(request.env.applications_parent,
                                   'applications', match.group('b'),
                                   'static', match.group('x'))
        return (static_file, environ)

    # ##################################################
    # parse application, controller and function
    # ##################################################

    path = re.sub('%20', ' ', path)
    match = regex_url.match(path)
    if not match or match.group('c') == 'static':
        raise HTTP(400,
                   thread.routes.error_message % 'invalid request',
                   web2py_error='invalid path')

    request.application = \
        regex_space.sub('_', match.group('a') or thread.routes.default_application)
    request.controller = \
        regex_space.sub('_', match.group('c') or thread.routes.default_controller)
    request.function = \
        regex_space.sub('_', match.group('f') or thread.routes.default_function)
    group_e = match.group('e')
    request.raw_extension = group_e and regex_space.sub('_', group_e) or None
    request.extension = request.raw_extension or 'html'
    request.raw_args = match.group('r')
    request.args = List([])
    if request.application in thread.routes.routes_apps_raw:
        # application is responsible for parsing args
        request.args = None
    elif request.raw_args:
        match = regex_args.match(request.raw_args.replace(' ', '_'))
        if match:
            group_s = match.group('s')
            request.args = \
                List((group_s and group_s.split('/')) or [])
            if request.args and request.args[-1] == '':
                request.args.pop()  # adjust for trailing empty arg
        else:
            raise HTTP(400,
                       thread.routes.error_message % 'invalid request',
                       web2py_error='invalid path (args)')
    return (None, environ)


def regex_filter_out(url, e=None):
    "regex rewrite outgoing URL"
    if not hasattr(thread, 'routes'):
        regex_select()    # ensure thread.routes is set (for application threads)
    if routers:
        return url  # already filtered
    if thread.routes.routes_out:
        items = url.split('?', 1)
        if e:
            host = e.get('http_host', 'localhost').lower()
            i = host.find(':')
            if i > 0:
                host = host[:i]
            items[0] = '%s:%s://%s:%s %s' % \
                 (e.get('remote_addr', ''),
                  e.get('wsgi_url_scheme', 'http').lower(), host,
                  e.get('request_method', 'get').lower(), items[0])
        else:
            items[0] = ':http://localhost:get %s' % items[0]
        for (regex, value) in thread.routes.routes_out:
            if regex.match(items[0]):
                rewritten = '?'.join([regex.sub(value, items[0])] + items[1:])
                logger.debug('routes_out: [%s] -> %s' % (url, rewritten))
                return rewritten
    logger.debug('routes_out: [%s] not rewritten' % url)
    return url


def filter_url(url, method='get', remote='0.0.0.0', out=False, app=False, lang=None,
        domain=(None,None), env=False, scheme=None, host=None, port=None):
    "doctest/unittest interface to regex_filter_in() and regex_filter_out()"
    regex_url = re.compile(r'^(?P<scheme>http|https|HTTP|HTTPS)\://(?P<host>[^/]*)(?P<uri>.*)')
    match = regex_url.match(url)
    urlscheme = match.group('scheme').lower()
    urlhost = match.group('host').lower()
    uri = match.group('uri')
    k = uri.find('?')
    if k < 0:
        k = len(uri)
    (path_info, query_string) = (uri[:k], uri[k+1:])
    path_info = urllib.unquote(path_info)   # simulate server
    e = {
         'REMOTE_ADDR': remote,
         'REQUEST_METHOD': method,
         'WSGI_URL_SCHEME': urlscheme,
         'HTTP_HOST': urlhost,
         'REQUEST_URI': uri,
         'PATH_INFO': path_info,
         'QUERY_STRING': query_string,
         #for filter_out request.env use lowercase
         'remote_addr': remote,
         'request_method': method,
         'wsgi_url_scheme': urlscheme,
         'http_host': urlhost
    }

    request = Storage()
    e["applications_parent"] = global_settings.applications_parent
    request.env = Storage(e)
    request.uri_language = lang

    #  determine application only
    #
    if app:
        if routers:
            return map_url_in(request, e, app=True)
        return regex_select(e)

    #  rewrite outbound URL
    #
    if out:
        (request.env.domain_application, request.env.domain_controller) = domain
        items = path_info.lstrip('/').split('/')
        if items[-1] == '':
            items.pop() # adjust trailing empty args
        assert len(items) >= 3, "at least /a/c/f is required"
        a = items.pop(0)
        c = items.pop(0)
        f = items.pop(0)
        if not routers:
            return regex_filter_out(uri, e)
        acf = map_url_out(request, None, a, c, f, items, None, scheme, host, port)
        if items:
            url = '%s/%s' % (acf, '/'.join(items))
            if items[-1] == '':
                url += '/'
        else:
            url = acf
        if query_string:
            url += '?' + query_string
        return url

    #  rewrite inbound URL
    #
    (static, e) = url_in(request, e)
    if static:
        return static
    result = "/%s/%s/%s" % (request.application, request.controller, request.function)
    if request.extension and request.extension != 'html':
        result += ".%s" % request.extension
    if request.args:
        result += " %s" % request.args
    if e['QUERY_STRING']:
        result += " ?%s" % e['QUERY_STRING']
    if request.uri_language:
        result += " (%s)" % request.uri_language
    if env:
        return request.env
    return result


def filter_err(status, application='app', ticket='tkt'):
    "doctest/unittest interface to routes_onerror"
    if status > 399 and thread.routes.routes_onerror:
        keys = set(('%s/%s' % (application, status),
                  '%s/*' % (application),
                  '*/%s' % (status),
                  '*/*'))
        for (key,redir) in thread.routes.routes_onerror:
            if key in keys:
                if redir == '!':
                    break
                elif '?' in redir:
                    url = redir + '&' + 'code=%s&ticket=%s' % (status,ticket)
                else:
                    url = redir + '?' + 'code=%s&ticket=%s' % (status,ticket)
                return url # redirection
    return status # no action

#  router support
#
class MapUrlIn(object):
    "logic for mapping incoming URLs"

    def __init__(self, request=None, env=None):
        "initialize a map-in object"
        self.request = request
        self.env = env

        self.router = None
        self.application = None
        self.language = None
        self.controller = None
        self.function = None
        self.extension = 'html'

        self.controllers = set()
        self.functions = set()
        self.languages = set()
        self.default_language = None
        self.map_hyphen = False
        self.exclusive_domain = False

        path = self.env['PATH_INFO']
        self.query = self.env.get('QUERY_STRING', None)
        path = path.lstrip('/')
        self.env['PATH_INFO'] = '/' + path
        self.env['WEB2PY_ORIGINAL_URI'] = self.env['PATH_INFO'] + (self.query and ('?' + self.query) or '')

        # to handle empty args, strip exactly one trailing slash, if present
        # .../arg1// represents one trailing empty arg
        #
        if path.endswith('/'):
            path = path[:-1]
        self.args = List(path and path.split('/') or [])

        # see http://www.python.org/dev/peps/pep-3333/#url-reconstruction for URL composition
        self.remote_addr = self.env.get('REMOTE_ADDR','localhost')
        self.scheme = self.env.get('WSGI_URL_SCHEME', 'http').lower()
        self.method = self.env.get('REQUEST_METHOD', 'get').lower()
        self.host = self.env.get('HTTP_HOST')
        self.port = None
        if not self.host:
            self.host = self.env.get('SERVER_NAME')
            self.port = self.env.get('SERVER_PORT')
        if not self.host:
            self.host = 'localhost'
            self.port = '80'
        if ':' in self.host:
            (self.host, self.port) = self.host.split(':')
        if not self.port:
            if self.scheme == 'https':
                self.port = '443'
            else:
                self.port = '80'

    def map_prefix(self):
        "strip path prefix, if present in its entirety"
        prefix = routers.BASE.path_prefix
        if prefix:
            prefixlen = len(prefix)
            if prefixlen > len(self.args):
                return
            for i in xrange(prefixlen):
                if prefix[i] != self.args[i]:
                    return  # prefix didn't match
            self.args = List(self.args[prefixlen:]) # strip the prefix

    def map_app(self):
        "determine application name"
        base = routers.BASE  # base router
        self.domain_application = None
        self.domain_controller = None
        arg0 = self.harg0
        if base.applications and arg0 in base.applications:
            self.application = arg0
        elif (self.host, self.port) in base.domains:
            (self.application, self.domain_controller) = base.domains[(self.host, self.port)]
            self.env['domain_application'] = self.application
            self.env['domain_controller'] = self.domain_controller
        elif (self.host, None) in base.domains:
            (self.application, self.domain_controller) = base.domains[(self.host, None)]
            self.env['domain_application'] = self.application
            self.env['domain_controller'] = self.domain_controller
        elif arg0 and not base.applications:
            self.application = arg0
        else:
            self.application = base.default_application or ''
        self.pop_arg_if(self.application == arg0)

        if not base._acfe_match.match(self.application):
            raise HTTP(400, thread.routes.error_message % 'invalid request',
                       web2py_error="invalid application: '%s'" % self.application)

        if self.application not in routers and \
          (self.application != thread.routes.default_application or self.application == 'welcome'):
            raise HTTP(400, thread.routes.error_message % 'invalid request',
                web2py_error="unknown application: '%s'" % self.application)

        #  set the application router
        #
        logger.debug("select application=%s" % self.application)
        self.request.application = self.application
        if self.application not in routers:
            self.router = routers.BASE                # support gluon.main.wsgibase init->welcome
        else:
            self.router = routers[self.application]   # application router
        self.controllers = self.router.controllers
        self.default_controller = self.domain_controller or self.router.default_controller
        self.functions = self.router.functions
        self.languages = self.router.languages
        self.default_language = self.router.default_language
        self.map_hyphen = self.router.map_hyphen
        self.exclusive_domain = self.router.exclusive_domain
        self._acfe_match = self.router._acfe_match
        self._file_match = self.router._file_match
        self._args_match = self.router._args_match

    def map_root_static(self):
        '''
        handle root-static files (no hyphen mapping)

        a root-static file is one whose incoming URL expects it to be at the root,
        typically robots.txt & favicon.ico
        '''
        if len(self.args) == 1 and self.arg0 in self.router.root_static:
            self.controller = self.request.controller = 'static'
            root_static_file = os.path.join(self.request.env.applications_parent,
                                   'applications', self.application,
                                   self.controller, self.arg0)
            logger.debug("route: root static=%s" % root_static_file)
            return root_static_file
        return None

    def map_language(self):
        "handle language (no hyphen mapping)"
        arg0 = self.arg0  # no hyphen mapping
        if arg0 and self.languages and arg0 in self.languages:
            self.language = arg0
        else:
            self.language = self.default_language
        if self.language:
            logger.debug("route: language=%s" % self.language)
            self.pop_arg_if(self.language == arg0)
            arg0 = self.arg0

    def map_controller(self):
        "identify controller"
        #  handle controller
        #
        arg0 = self.harg0    # map hyphens
        if not arg0 or (self.controllers and arg0 not in self.controllers):
            self.controller = self.default_controller or ''
        else:
            self.controller = arg0
        self.pop_arg_if(arg0 == self.controller)
        logger.debug("route: controller=%s" % self.controller)
        if not self.router._acfe_match.match(self.controller):
            raise HTTP(400, thread.routes.error_message % 'invalid request',
                       web2py_error='invalid controller')

    def map_static(self):
        '''
        handle static files
        file_match but no hyphen mapping
        '''
        if self.controller != 'static':
            return None
        file = '/'.join(self.args)
        if not self.router._file_match.match(file):
            raise HTTP(400, thread.routes.error_message % 'invalid request',
                       web2py_error='invalid static file')
        #
        #  support language-specific static subdirectories,
        #  eg /appname/en/static/filename => applications/appname/static/en/filename
        #  if language-specific file doesn't exist, try same file in static
        #
        if self.language:
            static_file = os.path.join(self.request.env.applications_parent,
                                   'applications', self.application,
                                   'static', self.language, file)
        if not self.language or not os.path.isfile(static_file):
            static_file = os.path.join(self.request.env.applications_parent,
                                   'applications', self.application,
                                   'static', file)
        logger.debug("route: static=%s" % static_file)
        return static_file

    def map_function(self):
        "handle function.extension"
        arg0 = self.harg0    # map hyphens
        if not arg0 or self.functions and arg0 not in self.functions and self.controller == self.default_controller:
            self.function = self.router.default_function or ""
            self.pop_arg_if(arg0 and self.function == arg0)
        else:
            func_ext = arg0.split('.')
            if len(func_ext) > 1:
                self.function = func_ext[0]
                self.extension = func_ext[-1]
            else:
                self.function = arg0
            self.pop_arg_if(True)
        logger.debug("route: function.ext=%s.%s" % (self.function, self.extension))

        if not self.router._acfe_match.match(self.function):
            raise HTTP(400, thread.routes.error_message % 'invalid request',
                       web2py_error='invalid function')
        if self.extension and not self.router._acfe_match.match(self.extension):
            raise HTTP(400, thread.routes.error_message % 'invalid request',
                       web2py_error='invalid extension')

    def validate_args(self):
        '''
        check args against validation pattern
        '''
        for arg in self.args:
            if not self.router._args_match.match(arg):
                raise HTTP(400, thread.routes.error_message % 'invalid request',
                           web2py_error='invalid arg <%s>' % arg)

    def update_request(self):
        '''
        update request from self
        build env.request_uri
        make lower-case versions of http headers in env
        '''
        self.request.application = self.application
        self.request.controller = self.controller
        self.request.function = self.function
        self.request.extension = self.extension
        self.request.args = self.args
        if self.language:
            self.request.uri_language = self.language
        uri = '/%s/%s/%s' % (self.application, self.controller, self.function)
        if self.map_hyphen:
            uri = uri.replace('_', '-')
        if self.extension != 'html':
            uri += '.' + self.extension
        if self.language:
            uri = '/%s%s' % (self.language, uri)
        uri += self.args and urllib.quote('/' + '/'.join([str(x) for x in self.args])) or ''
        uri += (self.query and ('?' + self.query) or '')
        self.env['REQUEST_URI'] = uri
        for (key, value) in self.env.items():
            self.request.env[key.lower().replace('.', '_')] = value

    @property
    def arg0(self):
        "return first arg"
        return self.args(0)

    @property
    def harg0(self):
        "return first arg with optional hyphen mapping"
        if self.map_hyphen and self.args(0):
            return self.args(0).replace('-', '_')
        return self.args(0)

    def pop_arg_if(self, dopop):
        "conditionally remove first arg and return new first arg"
        if dopop:
            self.args.pop(0)

class MapUrlOut(object):
    "logic for mapping outgoing URLs"

    def __init__(self, request, env, application, controller, function, args, other, scheme, host, port):
        "initialize a map-out object"
        self.default_application = routers.BASE.default_application
        if application in routers:
            self.router = routers[application]
        else:
            self.router = routers.BASE
        self.request = request
        self.env = env
        self.application = application
        self.controller = controller
        self.function = function
        self.args = args
        self.other = other
        self.scheme = scheme
        self.host = host
        self.port = port

        self.applications = routers.BASE.applications
        self.controllers = self.router.controllers
        self.functions = self.router.functions
        self.languages = self.router.languages
        self.default_language = self.router.default_language
        self.exclusive_domain = self.router.exclusive_domain
        self.map_hyphen = self.router.map_hyphen
        self.map_static = self.router.map_static
        self.path_prefix = routers.BASE.path_prefix

        self.domain_application = request and self.request.env.domain_application
        self.domain_controller = request and self.request.env.domain_controller
        self.default_function = self.router.default_function

        if (self.router.exclusive_domain and self.domain_application and self.domain_application != self.application and not self.host):
            raise SyntaxError, 'cross-domain conflict: must specify host'

        lang = request and request.uri_language
        if lang and self.languages and lang in self.languages:
            self.language = lang
        else:
            self.language = None

        self.omit_application = False
        self.omit_language = False
        self.omit_controller = False
        self.omit_function = False

    def omit_lang(self):
        "omit language if possible"

        if not self.language or self.language == self.default_language:
            self.omit_language = True

    def omit_acf(self):
        "omit what we can of a/c/f"

        router = self.router

        #  Handle the easy no-args case of tail-defaults: /a/c  /a  /
        #
        if not self.args and self.function == router.default_function:
            self.omit_function = True
            if self.controller == router.default_controller:
                self.omit_controller = True
                if self.application == self.default_application:
                    self.omit_application = True

        #  omit default application
        #  (which might be the domain default application)
        #
        default_application = self.domain_application or self.default_application
        if self.application == default_application:
            self.omit_application = True

        #  omit controller if default controller
        #
        default_controller = ((self.application == self.domain_application) and self.domain_controller) or router.default_controller or ''
        if self.controller == default_controller:
            self.omit_controller = True

        #  omit function if default controller/function
        #
        if self.functions and self.function == self.default_function and self.omit_controller:
            self.omit_function = True

        #  prohibit ambiguous cases
        #
        #  because we presume the lang string to be unambiguous, its presence protects application omission
        #
        if self.omit_language:
            if not self.applications or self.controller in self.applications:
                self.omit_application = False
            if self.omit_application:
                if not self.applications or self.function in self.applications:
                    self.omit_controller = False
        if not self.controllers or self.function in self.controllers:
            self.omit_controller = False
        if self.args:
            if self.args[0] in self.functions or self.args[0] in self.controllers or self.args[0] in self.applications:
                self.omit_function = False
        if self.omit_controller:
            if self.function in self.controllers or self.function in self.applications:
                self.omit_controller = False
        if self.omit_application:
            if self.controller in self.applications:
                self.omit_application = False

        #  handle static as a special case
        #  (easier for external static handling)
        #
        if self.controller == 'static' or self.controller.startswith('static/'):
            if not self.map_static:
                self.omit_application = False
                if self.language:
                    self.omit_language = False
            self.omit_controller = False
            self.omit_function = False

    def build_acf(self):
        "build acf from components"
        acf = ''
        if self.map_hyphen:
            self.application = self.application.replace('_', '-')
            self.controller = self.controller.replace('_', '-')
            if self.controller != 'static' and not self.controller.startswith('static/'):
                self.function = self.function.replace('_', '-')
        if not self.omit_application:
            acf += '/' + self.application
        if not self.omit_language:
            acf += '/' + self.language
        if not self.omit_controller:
            acf += '/' + self.controller
        if not self.omit_function:
            acf += '/' + self.function
        if self.path_prefix:
            acf = '/' + '/'.join(self.path_prefix) + acf
        if self.args:
            return acf
        return acf or '/'

    def acf(self):
        "convert components to /app/lang/controller/function"

        if not routers:
            return None         # use regex filter
        self.omit_lang()        # try to omit language
        self.omit_acf()         # try to omit a/c/f
        return self.build_acf() # build and return the /a/lang/c/f string


def map_url_in(request, env, app=False):
    "route incoming URL"

    #  initialize router-url object
    #
    thread.routes = params  # default to base routes
    map = MapUrlIn(request=request, env=env)
    map.map_prefix()  # strip prefix if present
    map.map_app()     # determine application

    #  configure thread.routes for error rewrite
    #
    if params.routes_app:
        thread.routes = params_apps.get(app, params)

    if app:
        return map.application

    root_static_file = map.map_root_static() # handle root-static files
    if root_static_file:
        return (root_static_file, map.env)
    map.map_language()
    map.map_controller()
    static_file = map.map_static()
    if static_file:
        return (static_file, map.env)
    map.map_function()
    map.validate_args()
    map.update_request()
    return (None, map.env)

def map_url_out(request, env, application, controller, function, args, other, scheme, host, port):
    '''
    supply /a/c/f (or /a/lang/c/f) portion of outgoing url

    The basic rule is that we can only make transformations
    that map_url_in can reverse.

    Suppose that the incoming arguments are a,c,f,args,lang
    and that the router defaults are da, dc, df, dl.

    We can perform these transformations trivially if args=[] and lang=None or dl:

    /da/dc/df => /
    /a/dc/df => /a
    /a/c/df => /a/c

    We would also like to be able to strip the default application or application/controller
    from URLs with function/args present, thus:

        /da/c/f/args  => /c/f/args
        /da/dc/f/args => /f/args

    We use [applications] and [controllers] and [functions] to suppress ambiguous omissions.

    We assume that language names do not collide with a/c/f names.
    '''
    map = MapUrlOut(request, env, application, controller, function, args, other, scheme, host, port)
    return map.acf()

def get_effective_router(appname):
    "return a private copy of the effective router for the specified application"
    if not routers or appname not in routers:
        return None
    return Storage(routers[appname])  # return a copy

Added gluon/rocket.py version [069a2f3dcb].


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*- coding: utf-8 -*-

# This file is part of the Rocket Web Server
# Copyright (c) 2010 Timothy Farrell

# Import System Modules
import sys
import errno
import socket
import logging
import platform

# Define Constants
VERSION = '1.2.2'
SERVER_NAME = socket.gethostname()
SERVER_SOFTWARE = 'Rocket %s' % VERSION
HTTP_SERVER_SOFTWARE = '%s Python/%s' % (SERVER_SOFTWARE, sys.version.split(' ')[0])
BUF_SIZE = 16384
SOCKET_TIMEOUT = 1 # in secs
THREAD_STOP_CHECK_INTERVAL = 1 # in secs, How often should threads check for a server stop message?
IS_JYTHON = platform.system() == 'Java' # Handle special cases for Jython
IGNORE_ERRORS_ON_CLOSE = set([errno.ECONNABORTED, errno.ECONNRESET])
DEFAULT_LISTEN_QUEUE_SIZE = 5
DEFAULT_MIN_THREADS = 10
DEFAULT_MAX_THREADS = 0
DEFAULTS = dict(LISTEN_QUEUE_SIZE = DEFAULT_LISTEN_QUEUE_SIZE,
                MIN_THREADS = DEFAULT_MIN_THREADS,
                MAX_THREADS = DEFAULT_MAX_THREADS)

PY3K = sys.version_info[0] > 2

class NullHandler(logging.Handler):
    "A Logging handler to prevent library errors."
    def emit(self, record):
        pass

if PY3K:
    def b(val):
        """ Convert string/unicode/bytes literals into bytes.  This allows for
        the same code to run on Python 2.x and 3.x. """
        if isinstance(val, str):
            return val.encode()
        else:
            return val

    def u(val, encoding="us-ascii"):
        """ Convert bytes into string/unicode.  This allows for the
        same code to run on Python 2.x and 3.x. """
        if isinstance(val, bytes):
            return val.decode(encoding)
        else:
            return val

else:
    def b(val):
        """ Convert string/unicode/bytes literals into bytes.  This allows for
        the same code to run on Python 2.x and 3.x. """
        if isinstance(val, unicode):
            return val.encode()
        else:
            return val

    def u(val, encoding="us-ascii"):
        """ Convert bytes into string/unicode.  This allows for the
        same code to run on Python 2.x and 3.x. """
        if isinstance(val, str):
            return val.decode(encoding)
        else:
            return val

# Import Package Modules
# package imports removed in monolithic build

__all__ = ['VERSION', 'SERVER_SOFTWARE', 'HTTP_SERVER_SOFTWARE', 'BUF_SIZE',
           'IS_JYTHON', 'IGNORE_ERRORS_ON_CLOSE', 'DEFAULTS', 'PY3K', 'b', 'u',
           'Rocket', 'CherryPyWSGIServer', 'SERVER_NAME', 'NullHandler']

# Monolithic build...end of module: rocket\__init__.py
# Monolithic build...start of module: rocket\connection.py

# Import System Modules
import sys
import time
import socket
try:
    import ssl
    has_ssl = True
except ImportError:
    has_ssl = False
# package imports removed in monolithic build

class Connection(object):
    __slots__ = [
        'setblocking',
        'sendall',
        'shutdown',
        'makefile',
        'fileno',
        'client_addr',
        'client_port',
        'server_port',
        'socket',
        'start_time',
        'ssl',
        'secure'
    ]

    def __init__(self, sock_tuple, port, secure=False):
        self.client_addr, self.client_port = sock_tuple[1]
        self.server_port = port
        self.socket = sock_tuple[0]
        self.start_time = time.time()
        self.ssl = has_ssl and isinstance(self.socket, ssl.SSLSocket)
        self.secure = secure

        if IS_JYTHON:
            # In Jython we must set TCP_NODELAY here since it does not
            # inherit from the listening socket.
            # See: http://bugs.jython.org/issue1309
            self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

        self.socket.settimeout(SOCKET_TIMEOUT)

        self.sendall = self.socket.sendall
        self.shutdown = self.socket.shutdown
        self.fileno = self.socket.fileno
        self.makefile = self.socket.makefile
        self.setblocking = self.socket.setblocking

    def close(self):
        if hasattr(self.socket, '_sock'):
            try:
                self.socket._sock.close()
            except socket.error:
                info = sys.exc_info()
                if info[1].errno != socket.EBADF:
                    raise info[1]
                else:
                    pass
        self.socket.close()

# Monolithic build...end of module: rocket\connection.py
# Monolithic build...start of module: rocket\listener.py

# Import System Modules
import os
import socket
import logging
import traceback
from threading import Thread

try:
    import ssl
    from ssl import SSLError
    has_ssl = True
except ImportError:
    has_ssl = False
    class SSLError(socket.error):
        pass
# Import Package Modules
# package imports removed in monolithic build

class Listener(Thread):
    """The Listener class is a class responsible for accepting connections
    and queuing them to be processed by a worker thread."""

    def __init__(self, interface, queue_size, active_queue, *args, **kwargs):
        Thread.__init__(self, *args, **kwargs)

        # Instance variables
        self.active_queue = active_queue
        self.interface = interface
        self.addr = interface[0]
        self.port = interface[1]
        self.secure = len(interface) == 4 and \
                      os.path.exists(interface[2]) and \
                      os.path.exists(interface[3])
        self.ready = False

        # Error Log
        self.err_log = logging.getLogger('Rocket.Errors.Port%i' % self.port)
        self.err_log.addHandler(NullHandler())

        # Build the socket
        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        if not listener:
            self.err_log.error("Failed to get socket.")
            return

        if self.secure:
            if not has_ssl:
                self.err_log.error("ssl module required to serve HTTPS.")
                return
            elif not os.path.exists(interface[2]):
                data = (interface[2], interface[0], interface[1])
                self.err_log.error("Cannot find key file "
                          "'%s'.  Cannot bind to %s:%s" % data)
                return
            elif not os.path.exists(interface[3]):
                data = (interface[3], interface[0], interface[1])
                self.err_log.error("Cannot find certificate file "
                          "'%s'.  Cannot bind to %s:%s" % data)
                return

        # Set socket options
        try:
            listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        except:
            msg = "Cannot share socket.  Using %s:%i exclusively."
            self.err_log.warning(msg % (self.addr, self.port))

        try:
            if not IS_JYTHON:
                listener.setsockopt(socket.IPPROTO_TCP,
                                    socket.TCP_NODELAY,
                                    1)
        except:
            msg = "Cannot set TCP_NODELAY, things might run a little slower"
            self.err_log.warning(msg)

        try:
            listener.bind((self.addr, self.port))
        except:
            msg = "Socket %s:%i in use by other process and it won't share."
            self.err_log.error(msg % (self.addr, self.port))
        else:
            # We want socket operations to timeout periodically so we can
            # check if the server is shutting down
            listener.settimeout(THREAD_STOP_CHECK_INTERVAL)
            # Listen for new connections allowing queue_size number of
            # connections to wait before rejecting a connection.
            listener.listen(queue_size)

            self.listener = listener

            self.ready = True

    def wrap_socket(self, sock):
        try:
            sock = ssl.wrap_socket(sock,
                                   keyfile = self.interface[2],
                                   certfile = self.interface[3],
                                   server_side = True,
                                   ssl_version = ssl.PROTOCOL_SSLv23)
        except SSLError:
            # Generally this happens when an HTTP request is received on a
            # secure socket. We don't do anything because it will be detected
            # by Worker and dealt with appropriately.
            pass

        return sock


    def run(self):
        if not self.ready:
            self.err_log.warning('Listener started when not ready.')
            return

        if __debug__:
            self.err_log.debug('Entering main loop.')
        while True:
            try:
                sock, addr = self.listener.accept()

                if self.secure:
                    sock = self.wrap_socket(sock)

                self.active_queue.put(((sock, addr),
                                       self.interface[1],
                                       self.secure))

            except socket.timeout:
                # socket.timeout will be raised every THREAD_STOP_CHECK_INTERVAL
                # seconds.  When that happens, we check if it's time to die.

                if not self.ready:
                    if __debug__:
                        self.err_log.debug('Listener exiting.')
                    return
                else:
                    continue
            except:
                self.err_log.error(str(traceback.format_exc()))

# Monolithic build...end of module: rocket\listener.py
# Monolithic build...start of module: rocket\main.py

# Import System Modules
import sys
import time
import socket
import logging
import traceback

try:
    from queue import Queue
except ImportError:
    from Queue import Queue

# Import Package Modules
# package imports removed in monolithic build





# Setup Logging
log = logging.getLogger('Rocket')
log.addHandler(NullHandler())

class Rocket(object):
    """The Rocket class is responsible for handling threads and accepting and
    dispatching connections."""

    def __init__(self,
                 interfaces = ('127.0.0.1', 8000),
                 method = 'wsgi',
                 app_info = None,
                 min_threads = None,
                 max_threads = None,
                 queue_size = None,
                 timeout = 600,
                 handle_signals = True):

        self.handle_signals = handle_signals

        if not isinstance(interfaces, list):
            self.interfaces = [interfaces]
        else:
            self.interfaces = interfaces

        if min_threads is None:
            min_threads = DEFAULTS['MIN_THREADS']

        if max_threads is None:
            max_threads = DEFAULTS['MAX_THREADS']

        if not queue_size:
            if hasattr(socket, 'SOMAXCONN'):
                queue_size = socket.SOMAXCONN
            else:
                queue_size = DEFAULTS['LISTEN_QUEUE_SIZE']

        if max_threads and queue_size > max_threads:
            queue_size = max_threads

        if isinstance(app_info, dict):
            app_info['server_software'] = SERVER_SOFTWARE

        monitor_queue = Queue()
        active_queue = Queue()

        self._monitor = Monitor(monitor_queue, active_queue, timeout)

        self._threadpool = ThreadPool(get_method(method),
                                      app_info = app_info,
                                      active_queue=active_queue,
                                      monitor_queue = monitor_queue,
                                      min_threads=min_threads,
                                      max_threads=max_threads)

        # Build our socket listeners
        self.listeners = [Listener(i, queue_size, active_queue) for i in self.interfaces]
        for ndx in range(len(self.listeners)-1, 0, -1):
            if not self.listeners[ndx].ready:
                del self.listeners[ndx]

        if not self.listeners:
            log.critical("No interfaces to listen on...closing.")
            sys.exit(1)

    def _sigterm(self, signum, frame):
        log.info('Received SIGTERM')
        self.stop()

    def _sighup(self, signum, frame):
        log.info('Received SIGHUP')
        self.restart()

    def start(self):
        log.info('Starting %s' % SERVER_SOFTWARE)

        # Set up our shutdown signals
        if self.handle_signals:
            try:
                import signal
                signal.signal(signal.SIGTERM, self._sigterm)
                signal.signal(signal.SIGUSR1, self._sighup)
            except:
                log.debug('This platform does not support signals.')

        # Start our worker threads
        self._threadpool.start()

        # Start our monitor thread
        self._monitor.setDaemon(True)
        self._monitor.start()

        # I know that EXPR and A or B is bad but I'm keeping it for Py2.4
        # compatibility.
        str_extract = lambda l: (l.addr, l.port, l.secure and '*' or '')

        msg = 'Listening on sockets: '
        msg += ', '.join(['%s:%i%s' % str_extract(l) for l in self.listeners])
        log.info(msg)

        for l in self.listeners:
            l.start()

        tp = self._threadpool
        dynamic_resize = tp.dynamic_resize

        while not tp.stop_server:
            try:
                dynamic_resize()
                time.sleep(THREAD_STOP_CHECK_INTERVAL)
            except KeyboardInterrupt:
                # Capture a keyboard interrupt when running from a console
                break
            except:
                if not tp.stop_server:
                    log.error(str(traceback.format_exc()))
                    continue

        return self.stop()

    def stop(self, stoplogging = True):
        log.info("Stopping Server")

        # Stop listeners
        for l in self.listeners:
            l.ready = False
            if l.isAlive():
                l.join()

        # Stop Worker threads
        self._threadpool.stop()

        # Stop Monitor
        self._monitor.stop()
        if self._monitor.isAlive():
            self._monitor.join()

        if stoplogging:
            logging.shutdown()

    def restart(self):
        self.stop(False)
        self.start()

def CherryPyWSGIServer(bind_addr,
                       wsgi_app,
                       numthreads = 10,
                       server_name = None,
                       max = -1,
                       request_queue_size = 5,
                       timeout = 10,
                       shutdown_timeout = 5):
    """ A Cherrypy wsgiserver-compatible wrapper. """
    max_threads = max
    if max_threads < 0:
        max_threads = 0
    return Rocket(bind_addr, 'wsgi', {'wsgi_app': wsgi_app},
                  min_threads = numthreads,
                  max_threads = max_threads,
                  queue_size = request_queue_size,
                  timeout = timeout)

# Monolithic build...end of module: rocket\main.py
# Monolithic build...start of module: rocket\monitor.py

# Import System Modules
import time
import logging
import select
from threading import Thread

# Import Package Modules
# package imports removed in monolithic build

class Monitor(Thread):
    # Monitor worker class.

    def __init__(self,
                 monitor_queue,
                 active_queue,
                 timeout,
                 *args,
                 **kwargs):

        Thread.__init__(self, *args, **kwargs)

        # Instance Variables
        self.monitor_queue = monitor_queue
        self.active_queue = active_queue
        self.timeout = timeout

        self.connections = set()
        self.active = False

    def run(self):
        self.name = self.getName()
        self.log = logging.getLogger('Rocket.Monitor')
        self.log.addHandler(NullHandler())

        self.active = True
        conn_list = list()
        list_changed = False

        if __debug__:
            self.log.debug('Entering monitor loop.')

        # Enter thread main loop
        while self.active:
            # Move the queued connections to the selection pool
            while not self.monitor_queue.empty() or not len(self.connections):
                if __debug__:
                    self.log.debug('In "receive timed-out connections" loop.')

                c = self.monitor_queue.get()

                if c is None:
                    # A non-client is a signal to die
                    if __debug__:
                        self.log.debug('Received a death threat.')
                    return

                self.log.debug('Received a timed out connection.')

                if __debug__:
                    assert(c not in self.connections)

                if IS_JYTHON:
                    # Jython requires a socket to be in Non-blocking mode in
                    # order to select on it.
                    c.setblocking(False)

                if __debug__:
                    self.log.debug('Adding connection to monitor list.')

                self.connections.add(c)
                list_changed = True

            # Wait on those connections
            self.log.debug('Blocking on connections')
            if list_changed:
                conn_list = list(self.connections)
                list_changed = False

            try:
                readable = select.select(conn_list,
                                         [],
                                         [],
                                         THREAD_STOP_CHECK_INTERVAL)[0]
            except:
                if self.active:
                    raise
                else:
                    break

            # If we have any readable connections, put them back
            for r in readable:
                if __debug__:
                    self.log.debug('Restoring readable connection')

                if IS_JYTHON:
                    # Jython requires a socket to be in Non-blocking mode in
                    # order to select on it, but the rest of the code requires
                    # that it be in blocking mode.
                    r.setblocking(True)

                r.start_time = time.time()
                self.active_queue.put(r)

                self.connections.remove(r)
                list_changed = True

            # If we have any stale connections, kill them off.
            if self.timeout:
                now = time.time()
                stale = set()
                for c in self.connections:
                    if (now - c.start_time) >= self.timeout:
                        stale.add(c)

                for c in stale:
                    if __debug__:
                        # "EXPR and A or B" kept for Py2.4 compatibility
                        data = (c.client_addr, c.server_port, c.ssl and '*' or '')
                        self.log.debug('Flushing stale connection: %s:%i%s' % data)

                    self.connections.remove(c)
                    list_changed = True

                    try:
                        c.close()
                    finally:
                        del c

    def stop(self):
        self.active = False

        if __debug__:
            self.log.debug('Flushing waiting connections')

        for c in self.connections:
            try:
                c.close()
            finally:
                del c

        if __debug__:
            self.log.debug('Flushing queued connections')

        while not self.monitor_queue.empty():
            c = self.monitor_queue.get()

            if c is None:
                continue

            try:
                c.close()
            finally:
                del c

        # Place a None sentry value to cause the monitor to die.
        self.monitor_queue.put(None)

# Monolithic build...end of module: rocket\monitor.py
# Monolithic build...start of module: rocket\threadpool.py

# Import System Modules
import logging
# Import Package Modules
# package imports removed in monolithic build

# Setup Logging
log = logging.getLogger('Rocket.Errors.ThreadPool')
log.addHandler(NullHandler())

class ThreadPool:
    """The ThreadPool class is a container class for all the worker threads. It
    manages the number of actively running threads."""

    def __init__(self,
                 method,
                 app_info,
                 active_queue,
                 monitor_queue,
                 min_threads=DEFAULTS['MIN_THREADS'],
                 max_threads=DEFAULTS['MAX_THREADS'],
                 ):

        if __debug__:
            log.debug("Initializing ThreadPool.")

        self.check_for_dead_threads = 0
        self.active_queue = active_queue

        self.worker_class = method
        self.min_threads = min_threads
        self.max_threads = max_threads
        self.monitor_queue = monitor_queue
        self.stop_server = False

        # TODO - Optimize this based on some real-world usage data
        self.grow_threshold = int(max_threads/10) + 2

        if not isinstance(app_info, dict):
            app_info = dict()

        app_info.update(max_threads=max_threads,
                        min_threads=min_threads)

        self.app_info = app_info

        self.threads = set()
        for x in range(min_threads):
            worker = self.worker_class(app_info,
                                       self.active_queue,
                                       self.monitor_queue)
            self.threads.add(worker)

    def start(self):
        self.stop_server = False
        if __debug__:
            log.debug("Starting threads.")

        for thread in self.threads:
            thread.setDaemon(True)
            thread.start()

    def stop(self):
        if __debug__:
            log.debug("Stopping threads.")

        self.stop_server = True

        # Prompt the threads to die
        for t in self.threads:
            self.active_queue.put(None)

        # Give them the gun
        for t in self.threads:
            t.kill()

        # Wait until they pull the trigger
        for t in self.threads:
            t.join()

        # Clean up the mess
        self.bring_out_your_dead()

    def bring_out_your_dead(self):
        # Remove dead threads from the pool

        dead_threads = [t for t in self.threads if not t.isAlive()]
        for t in dead_threads:
            if __debug__:
                log.debug("Removing dead thread: %s." % t.getName())
            try:
                # Py2.4 complains here so we put it in a try block
                self.threads.remove(t)
            except:
                pass
        self.check_for_dead_threads -= len(dead_threads)

    def grow(self, amount=None):
        if self.stop_server:
            return

        if not amount:
            amount = self.max_threads

        amount = min([amount, self.max_threads - len(self.threads)])

        if __debug__:
            log.debug("Growing by %i." % amount)

        for x in range(amount):
            worker = self.worker_class(self.app_info,
                                       self.active_queue,
                                       self.monitor_queue)

            worker.setDaemon(True)
            self.threads.add(worker)
            worker.start()

    def shrink(self, amount=1):
        if __debug__:
            log.debug("Shrinking by %i." % amount)

        self.check_for_dead_threads += amount

        for x in range(amount):
            self.active_queue.put(None)

    def dynamic_resize(self):
        if (self.max_threads > self.min_threads or self.max_threads == 0):
            if self.check_for_dead_threads > 0:
                self.bring_out_your_dead()

            queueSize = self.active_queue.qsize()
            threadCount = len(self.threads)

            if __debug__:
                log.debug("Examining ThreadPool. %i threads and %i Q'd conxions"
                          % (threadCount, queueSize))

            if queueSize == 0 and threadCount > self.min_threads:
                self.shrink()

            elif queueSize > self.grow_threshold:

                self.grow(queueSize)

# Monolithic build...end of module: rocket\threadpool.py
# Monolithic build...start of module: rocket\worker.py

# Import System Modules
import re
import sys
import socket
import logging
import traceback
#from wsgiref.headers import Headers
from threading import Thread
from datetime import datetime

try:
    from urllib import unquote
except ImportError:
    from urllib.parse import unquote

try:
    from io import StringIO
except ImportError:
    try:
        from cStringIO import StringIO
    except ImportError:
        from StringIO import StringIO

try:
    from ssl import SSLError
except ImportError:
    class SSLError(socket.error):
        pass
# Import Package Modules
# package imports removed in monolithic build


# Define Constants
re_SLASH = re.compile('%2F', re.IGNORECASE)
re_REQUEST_LINE = re.compile(r"""^
(?P<method>OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT)   # Request Method
\                                                            # (single space)
(
    (?P<scheme>[^:/]+)                                       # Scheme
    (://)  #
    (?P<host>[^/]+)                                          # Host
)? #
(?P<path>(\*|/[^ \?]*))                                      # Path
(\? (?P<query_string>[^ ]+))?                                # Query String
\                                                            # (single space)
(?P<protocol>HTTPS?/1\.[01])                                 # Protocol
$
""", re.X)
LOG_LINE = '%(client_ip)s - "%(request_line)s" - %(status)s %(size)s'
RESPONSE = '''\
HTTP/1.1 %s
Content-Length: %i
Content-Type: %s

%s
'''
if IS_JYTHON:
    HTTP_METHODS = set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT'])

###
# The Headers and FileWrapper classes are ripped straight from the Python
# Standard Library. I've removed some docstrings and integrated my BUF_SIZE.
# See the Python License here: http://docs.python.org/license.html
###

# Regular expression that matches `special' characters in parameters, the
# existance of which force quoting of the parameter value.
import re
_tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')

def _formatparam(param, value=None, quote=1):
    """Convenience function to format and return a key=value pair.

    This will quote the value if needed or if quote is true.
    """
    if value is not None and len(value) > 0:
        if quote or _tspecials.search(value):
            value = value.replace('\\', '\\\\').replace('"', r'\"')
            return '%s="%s"' % (param, value)
        else:
            return '%s=%s' % (param, value)
    else:
        return param

class Headers:
    def __init__(self,headers):
        if type(headers) is not type([]):
            raise TypeError("Headers must be a list of name/value tuples")
        self._headers = headers

    def __len__(self):
        return len(self._headers)

    def __setitem__(self, name, val):
        del self[name]
        self._headers.append((name, val))

    def __delitem__(self,name):
        name = name.lower()
        self._headers[:] = [kv for kv in self._headers if kv[0].lower() != name]

    def __getitem__(self,name):
        return self.get(name)

    def has_key(self, name):
        return self.get(name) is not None

    __contains__ = has_key

    def get_all(self, name):
        name = name.lower()
        return [kv[1] for kv in self._headers if kv[0].lower()==name]

    def get(self,name,default=None):
        name = name.lower()
        for k,v in self._headers:
            if k.lower()==name:
                return v
        return default

    def keys(self):
        return [k for k, v in self._headers]

    def values(self):
        return [v for k, v in self._headers]

    def items(self):
        return self._headers[:]

    def __repr__(self):
        return "Headers(%r)" % self._headers

    def __str__(self):
        return '\r\n'.join(["%s: %s" % kv for kv in self._headers]+['',''])

    def setdefault(self,name,value):
        result = self.get(name)
        if result is None:
            self._headers.append((name,value))
            return value
        else:
            return result


    def add_header(self, _name, _value, **_params):
        parts = []
        if _value is not None:
            parts.append(_value)
        for k, v in _params.items():
            if v is None:
                parts.append(k.replace('_', '-'))
            else:
                parts.append(_formatparam(k.replace('_', '-'), v))
        self._headers.append((_name, "; ".join(parts)))

class FileWrapper:
    """Wrapper to convert file-like objects to iterables"""

    def __init__(self, filelike, blksize=BUF_SIZE):
        self.filelike = filelike
        self.blksize = blksize
        if hasattr(filelike,'close'):
            self.close = filelike.close

    def __getitem__(self,key):
        data = self.filelike.read(self.blksize)
        if data:
            return data
        raise IndexError

    def __iter__(self):
        return self

    def next(self):
        data = self.filelike.read(self.blksize)
        if data:
            return data
        raise StopIteration

class Worker(Thread):
    """The Worker class is a base class responsible for receiving connections
    and (a subclass) will run an application to process the the connection """

    def __init__(self,
                 app_info,
                 active_queue,
                 monitor_queue,
                 *args,
                 **kwargs):

        Thread.__init__(self, *args, **kwargs)

        # Instance Variables
        self.app_info = app_info
        self.active_queue = active_queue
        self.monitor_queue = monitor_queue

        self.size = 0
        self.status = "200 OK"
        self.closeConnection = True

        # Request Log
        self.req_log = logging.getLogger('Rocket.Requests')
        self.req_log.addHandler(NullHandler())

        # Error Log
        self.err_log = logging.getLogger('Rocket.Errors.'+self.getName())
        self.err_log.addHandler(NullHandler())

    def _handleError(self, typ, val, tb):
        if typ == SSLError:
            if 'timed out' in val.args[0]:
                typ = SocketTimeout
        if typ == SocketTimeout:
            if __debug__:
                self.err_log.debug('Socket timed out')
            self.monitor_queue.put(self.conn)
            return True
        if typ == SocketClosed:
            self.closeConnection = True
            if __debug__:
                self.err_log.debug('Client closed socket')
            return False
        if typ == BadRequest:
            self.closeConnection = True
            if __debug__:
                self.err_log.debug('Client sent a bad request')
            return True
        if typ == socket.error:
            self.closeConnection = True
            if val.args[0] in IGNORE_ERRORS_ON_CLOSE:
                if __debug__:
                    self.err_log.debug('Ignorable socket Error received...'
                                       'closing connection.')
                return False
            else:
                self.status = "999 Utter Server Failure"
                tb_fmt = traceback.format_exception(typ, val, tb)
                self.err_log.error('Unhandled Error when serving '
                                   'connection:\n' + '\n'.join(tb_fmt))
                return False

        self.closeConnection = True
        tb_fmt = traceback.format_exception(typ, val, tb)
        self.err_log.error('\n'.join(tb_fmt))
        self.send_response('500 Server Error')
        return False

    def run(self):
        if __debug__:
            self.err_log.debug('Entering main loop.')

        # Enter thread main loop
        while True:
            conn = self.active_queue.get()

            if not conn:
                # A non-client is a signal to die
                if __debug__:
                    self.err_log.debug('Received a death threat.')
                return conn

            if isinstance(conn, tuple):
                conn = Connection(*conn)

            self.conn = conn

            if conn.ssl != conn.secure:
                self.err_log.info('Received HTTP connection on HTTPS port.')
                self.send_response('400 Bad Request')
                self.closeConnection = True
                conn.close()
                continue
            else:
                if __debug__:
                    self.err_log.debug('Received a connection.')
                self.closeConnection = False

            # Enter connection serve loop
            while True:
                if __debug__:
                    self.err_log.debug('Serving a request')
                try:
                    self.run_app(conn)
                    log_info = dict(client_ip = conn.client_addr,
                                    time = datetime.now().strftime('%c'),
                                    status = self.status.split(' ')[0],
                                    size = self.size,
                                    request_line = self.request_line)
                    self.req_log.info(LOG_LINE % log_info)
                except:
                    exc = sys.exc_info()
                    handled = self._handleError(*exc)
                    if handled:
                        break
                    else:
                        if self.request_line:
                            log_info = dict(client_ip = conn.client_addr,
                                            time = datetime.now().strftime('%c'),
                                            status = self.status.split(' ')[0],
                                            size = self.size,
                                            request_line = self.request_line + ' - not stopping')
                            self.req_log.info(LOG_LINE % log_info)

                if self.closeConnection:
                    try:
                        conn.close()
                    except:
                        self.err_log.error(str(traceback.format_exc()))

                    break

    def run_app(self, conn):
        # Must be overridden with a method reads the request from the socket
        # and sends a response.
        self.closeConnection = True
        raise NotImplementedError('Overload this method!')

    def send_response(self, status):
        stat_msg = status.split(' ', 1)[1]
        msg = RESPONSE % (status,
                          len(stat_msg),
                          'text/plain',
                          stat_msg)
        try:
            self.conn.sendall(b(msg))
        except socket.error:
            self.closeConnection = True
            self.err_log.error('Tried to send "%s" to client but received socket'
                           ' error' % status)

    def kill(self):
        if self.isAlive() and hasattr(self, 'conn'):
            try:
                self.conn.shutdown(socket.SHUT_RDWR)
            except socket.error:
                info = sys.exc_info()
                if info[1].args[0] != socket.EBADF:
                    self.err_log.debug('Error on shutdown: '+str(info))

    def read_request_line(self, sock_file):
        self.request_line = ''
        try:
            # Grab the request line
            d = sock_file.readline()
            if PY3K:
                d = d.decode('ISO-8859-1')

            if d == '\r\n':
                # Allow an extra NEWLINE at the beginning per HTTP 1.1 spec
                if __debug__:
                    self.err_log.debug('Client sent newline')

                d = sock_file.readline()
                if PY3K:
                    d = d.decode('ISO-8859-1')
        except socket.timeout:
            raise SocketTimeout("Socket timed out before request.")

        d = d.strip()

        if not d:
            if __debug__:
                self.err_log.debug('Client did not send a recognizable request.')
            raise SocketClosed('Client closed socket.')

        self.request_line = d

        # NOTE: I've replaced the traditional method of procedurally breaking
        # apart the request line with a (rather unsightly) regular expression.
        # However, Java's regexp support sucks so bad that it actually takes
        # longer in Jython to process the regexp than procedurally. So I've
        # left the old code here for Jython's sake...for now.
        if IS_JYTHON:
            return self._read_request_line_jython(d)

        match = re_REQUEST_LINE.match(d)

        if not match:
            self.send_response('400 Bad Request')
            raise BadRequest

        req = match.groupdict()
        for k,v in req.items():
            if not v:
                req[k] = ""
            if k == 'path':
                req['path'] = r'%2F'.join([unquote(x) for x in re_SLASH.split(v)])

        return req

    def _read_request_line_jython(self, d):
        d = d.strip()
        try:
            method, uri, proto = d.split(' ')
            if not proto.startswith('HTTP') or \
               proto[-3:] not in ('1.0', '1.1') or \
               method not in HTTP_METHODS:
                self.send_response('400 Bad Request')
                raise BadRequest
        except ValueError:
            self.send_response('400 Bad Request')
            raise BadRequest

        req = dict(method=method, protocol = proto)
        scheme = ''
        host = ''
        if uri == '*' or uri.startswith('/'):
            path = uri
        elif '://' in uri:
            scheme, rest = uri.split('://')
            host, path = rest.split('/', 1)
            path = '/' + path
        else:
            self.send_response('400 Bad Request')
            raise BadRequest

        query_string = ''
        if '?' in path:
            path, query_string = path.split('?', 1)

        path = r'%2F'.join([unquote(x) for x in re_SLASH.split(path)])

        req.update(path=path,
                   query_string=query_string,
                   scheme=scheme.lower(),
                   host=host)
        return req


    def read_headers(self, sock_file):
        headers = dict()
        l = sock_file.readline()

        lname = None
        lval = None
        while True:
            if PY3K:
                try:
                    l = str(l, 'ISO-8859-1')
                except UnicodeDecodeError:
                    self.err_log.warning('Client sent invalid header: ' + repr(l))

            if l == '\r\n':
                break

            if l[0] in ' \t' and lname:
                # Some headers take more than one line
                lval += ',' + l.strip()
            else:
                # HTTP header values are latin-1 encoded
                l = l.split(':', 1)
                # HTTP header names are us-ascii encoded

                lname = l[0].strip().upper().replace('-', '_')
                lval = l[-1].strip()
            headers[str(lname)] = str(lval)

            l = sock_file.readline()
        return headers

class SocketTimeout(Exception):
    "Exception for when a socket times out between requests."
    pass

class BadRequest(Exception):
    "Exception for when a client sends an incomprehensible request."
    pass

class SocketClosed(Exception):
    "Exception for when a socket is closed by the client."
    pass

class ChunkedReader(object):
    def __init__(self, sock_file):
        self.stream = sock_file
        self.chunk_size = 0

    def _read_header(self):
        chunk_len = ""
        try:
            while "" == chunk_len:
                chunk_len = self.stream.readline().strip()
            return int(chunk_len, 16)
        except ValueError:
            return 0

    def read(self, size):
        data = b('')
        chunk_size = self.chunk_size
        while size:
            if not chunk_size:
                chunk_size = self._read_header()

            if size < chunk_size:
                data += self.stream.read(size)
                chunk_size -= size
                break
            else:
                if not chunk_size:
                    break
                data += self.stream.read(chunk_size)
                size -= chunk_size
                chunk_size = 0

        self.chunk_size = chunk_size
        return data

    def readline(self):
        data = b('')
        c = self.read(1)
        while c and c != b('\n'):
            data += c
            c = self.read(1)
        data += c
        return data

    def readlines(self):
        yield self.readline()

def get_method(method):

    methods = dict(wsgi=WSGIWorker)
    return methods[method.lower()]

# Monolithic build...end of module: rocket\worker.py
# Monolithic build...start of module: rocket\methods\__init__.py

# Monolithic build...end of module: rocket\methods\__init__.py
# Monolithic build...start of module: rocket\methods\wsgi.py

# Import System Modules
import sys
import socket
#from wsgiref.headers import Headers
#from wsgiref.util import FileWrapper
# Import Package Modules
# package imports removed in monolithic build


if PY3K:
    from email.utils import formatdate
else:
    # Caps Utils for Py2.4 compatibility
    from email.Utils import formatdate

# Define Constants
NEWLINE = b('\r\n')
HEADER_RESPONSE = '''HTTP/1.1 %s\r\n%s'''
BASE_ENV = {'SERVER_NAME': SERVER_NAME,
            'SCRIPT_NAME': '',  # Direct call WSGI does not need a name
            'wsgi.errors': sys.stderr,
            'wsgi.version': (1, 0),
            'wsgi.multiprocess': False,
            'wsgi.run_once': False,
            'wsgi.file_wrapper': FileWrapper
            }

class WSGIWorker(Worker):
    def __init__(self, *args, **kwargs):
        """Builds some instance variables that will last the life of the
        thread."""
        Worker.__init__(self, *args, **kwargs)

        if isinstance(self.app_info, dict):
            multithreaded = self.app_info.get('max_threads') != 1
        else:
            multithreaded = False
        self.base_environ = dict({'SERVER_SOFTWARE': self.app_info['server_software'],
                                  'wsgi.multithread': multithreaded,
                                  })
        self.base_environ.update(BASE_ENV)
        # Grab our application
        self.app = self.app_info.get('wsgi_app')

        if not hasattr(self.app, "__call__"):
            raise TypeError("The wsgi_app specified (%s) is not a valid WSGI application." % repr(self.app))


    def build_environ(self, sock_file, conn):
        """ Build the execution environment. """
        # Grab the request line
        request = self.read_request_line(sock_file)

        # Copy the Base Environment
        environ = self.base_environ.copy()

        # Grab the headers
        for k, v in self.read_headers(sock_file).items():
            environ[str('HTTP_'+k)] = v

        # Add CGI Variables
        environ['REQUEST_METHOD'] = request['method']
        environ['PATH_INFO'] = request['path']
        environ['SERVER_PROTOCOL'] = request['protocol']
        environ['SERVER_PORT'] = str(conn.server_port)
        environ['REMOTE_PORT'] = str(conn.client_port)
        environ['REMOTE_ADDR'] = str(conn.client_addr)
        environ['QUERY_STRING'] = request['query_string']
        if 'HTTP_CONTENT_LENGTH' in environ:
            environ['CONTENT_LENGTH'] = environ['HTTP_CONTENT_LENGTH']
        if 'HTTP_CONTENT_TYPE' in environ:
            environ['CONTENT_TYPE'] = environ['HTTP_CONTENT_TYPE']

        # Save the request method for later
        self.request_method = environ['REQUEST_METHOD']

        # Add Dynamic WSGI Variables
        if conn.ssl:
            environ['wsgi.url_scheme'] = 'https'
            environ['HTTPS'] = 'on'
        else:
            environ['wsgi.url_scheme'] = 'http'

        if environ.get('HTTP_TRANSFER_ENCODING', '') == 'chunked':
            environ['wsgi.input'] = ChunkedReader(sock_file)
        else:
            environ['wsgi.input'] = sock_file

        return environ

    def send_headers(self, data, sections):
        h_set = self.header_set

        # Does the app want us to send output chunked?
        self.chunked = h_set.get('transfer-encoding', '').lower() == 'chunked'

        # Add a Date header if it's not there already
        if not 'date' in h_set:
            h_set['Date'] = formatdate(usegmt=True)

        # Add a Server header if it's not there already
        if not 'server' in h_set:
            h_set['Server'] = HTTP_SERVER_SOFTWARE

        if 'content-length' in h_set:
            self.size = int(h_set['content-length'])
        else:
            s = int(self.status.split(' ')[0])
            if s < 200 or s not in (204, 205, 304):
                if not self.chunked:
                    if sections == 1:
                        # Add a Content-Length header if it's not there already
                        h_set['Content-Length'] = str(len(data))
                        self.size = len(data)
                    else:
                        # If they sent us more than one section, we blow chunks
                        h_set['Transfer-Encoding'] = 'Chunked'
                        self.chunked = True
                        if __debug__:
                            self.err_log.debug('Adding header...'
                                               'Transfer-Encoding: Chunked')

        if 'connection' not in h_set:
            # If the application did not provide a connection header, fill it in
            client_conn = self.environ.get('HTTP_CONNECTION', '').lower()
            if self.environ['SERVER_PROTOCOL'] == 'HTTP/1.1':
                # HTTP = 1.1 defaults to keep-alive connections
                if client_conn:
                    h_set['Connection'] = client_conn
                else:
                    h_set['Connection'] = 'keep-alive'
            else:
                # HTTP < 1.1 supports keep-alive but it's quirky so we don't support it
                h_set['Connection'] = 'close'

        # Close our connection if we need to.
        self.closeConnection = h_set.get('connection', '').lower() == 'close'

        # Build our output headers
        header_data = HEADER_RESPONSE % (self.status, str(h_set))

        # Send the headers
        if __debug__:
            self.err_log.debug('Sending Headers: %s' % repr(header_data))
        self.conn.sendall(b(header_data))
        self.headers_sent = True

    def write_warning(self, data, sections=None):
        self.err_log.warning('WSGI app called write method directly.  This is '
                             'deprecated behavior.  Please update your app.')
        return self.write(data, sections)

    def write(self, data, sections=None):
        """ Write the data to the output socket. """

        if self.error[0]:
            self.status = self.error[0]
            data = b(self.error[1])

        if not self.headers_sent:
            self.send_headers(data, sections)

        if self.request_method != 'HEAD':
            try:
                if self.chunked:
                    self.conn.sendall(b('%x\r\n%s\r\n' % (len(data), data)))
                else:
                    self.conn.sendall(data)
            except socket.error:
                # But some clients will close the connection before that
                # resulting in a socket error.
                self.closeConnection = True

    def start_response(self, status, response_headers, exc_info=None):
        """ Store the HTTP status and headers to be sent when self.write is
        called. """
        if exc_info:
            try:
                if self.headers_sent:
                    # Re-raise original exception if headers sent
                    # because this violates WSGI specification.
                    raise
            finally:
                exc_info = None
        elif self.header_set:
            raise AssertionError("Headers already set!")

        if PY3K and not isinstance(status, str):
            self.status = str(status, 'ISO-8859-1')
        else:
            self.status = status
        # Make sure headers are bytes objects
        try:
            self.header_set = Headers(response_headers)
        except UnicodeDecodeError:
            self.error = ('500 Internal Server Error',
                          'HTTP Headers should be bytes')
            self.err_log.error('Received HTTP Headers from client that contain'
                               ' invalid characters for Latin-1 encoding.')

        return self.write_warning

    def run_app(self, conn):
        self.size = 0
        self.header_set = Headers([])
        self.headers_sent = False
        self.error = (None, None)
        self.chunked = False
        sections = None
        output = None

        if __debug__:
            self.err_log.debug('Getting sock_file')

        # Build our file-like object
        sock_file = conn.makefile('rb',BUF_SIZE)

        try:
            # Read the headers and build our WSGI environment
            self.environ = environ = self.build_environ(sock_file, conn)

            # Handle 100 Continue
            if environ.get('HTTP_EXPECT', '') == '100-continue':
                res = environ['SERVER_PROTOCOL'] + ' 100 Continue\r\n\r\n'
                conn.sendall(b(res))

            # Send it to our WSGI application
            output = self.app(environ, self.start_response)

            if not hasattr(output, '__len__') and not hasattr(output, '__iter__'):
                self.error = ('500 Internal Server Error',
                              'WSGI applications must return a list or '
                              'generator type.')

            if hasattr(output, '__len__'):
                sections = len(output)

            for data in output:
                # Don't send headers until body appears
                if data:
                    self.write(data, sections)

            if self.chunked:
                # If chunked, send our final chunk length
                self.conn.sendall(b('0\r\n\r\n'))
            elif not self.headers_sent:
                # Send headers if the body was empty
                self.send_headers('', sections)

        # Don't capture exceptions here.  The Worker class handles
        # them appropriately.
        finally:
            if __debug__:
                self.err_log.debug('Finally closing output and sock_file')

            if hasattr(output,'close'):
                output.close()

            sock_file.close()

# Monolithic build...end of module: rocket\methods\wsgi.py

#
# the following code is not part of Rocket but was added in web2py for testing purposes
#

def demo_app(environ, start_response):
    global static_folder
    import os
    types = {'htm': 'text/html','html': 'text/html','gif': 'image/gif',
             'jpg': 'image/jpeg','png': 'image/png','pdf': 'applications/pdf'}
    if static_folder:
        if not static_folder.startswith('/'):
            static_folder = os.path.join(os.getcwd(),static_folder)
        path = os.path.join(static_folder, environ['PATH_INFO'][1:] or 'index.html')
        type = types.get(path.split('.')[-1],'text')
        if os.path.exists(path):
            try:
                pathfile = open(path,'rb')
                try:
                    data = pathfile.read()
                finally:
                    pathfile.close()
                start_response('200 OK', [('Content-Type', type)])
            except IOError:
                start_response('404 NOT FOUND', [])
                data = '404 NOT FOUND'
        else:
            start_response('500 INTERNAL SERVER ERROR', [])
            data = '500 INTERNAL SERVER ERROR'
    else:
        start_response('200 OK', [('Content-Type', 'text/html')])
        data = '<html><body><h1>Hello from Rocket Web Server</h1></body></html>'
    return [data]

def demo():
    from optparse import OptionParser
    parser = OptionParser()
    parser.add_option("-i", "--ip", dest="ip",default="127.0.0.1",
                      help="ip address of the network interface")
    parser.add_option("-p", "--port", dest="port",default="8000",
                      help="post where to run web server")
    parser.add_option("-s", "--static", dest="static",default=None,
                      help="folder containing static files")
    (options, args) = parser.parse_args()
    global static_folder
    static_folder = options.static
    print 'Rocket running on %s:%s' % (options.ip, options.port)
    r=Rocket((options.ip,int(options.port)),'wsgi', {'wsgi_app':demo_app})
    r.start()

if __name__=='__main__':
    demo()

Added gluon/sanitizer.py version [a160c3e797].


































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
::

    # from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496942
    # Title: Cross-site scripting (XSS) defense
    # Submitter: Josh Goldfoot (other recipes)
    # Last Updated: 2006/08/05
    # Version no: 1.0

"""


from htmllib import HTMLParser
from cgi import escape
from urlparse import urlparse
from formatter import AbstractFormatter
from htmlentitydefs import entitydefs
from xml.sax.saxutils import quoteattr

__all__ = ['sanitize']


def xssescape(text):
    """Gets rid of < and > and & and, for good measure, :"""

    return escape(text, quote=True).replace(':', '&#58;')


class XssCleaner(HTMLParser):

    def __init__(
        self,
        permitted_tags=[
            'a',
            'b',
            'blockquote',
            'br/',
            'i',
            'li',
            'ol',
            'ul',
            'p',
            'cite',
            'code',
            'pre',
            'img/',
            ],
        allowed_attributes={'a': ['href', 'title'], 'img': ['src', 'alt'
                            ], 'blockquote': ['type']},
        fmt=AbstractFormatter,
        strip_disallowed = False
        ):

        HTMLParser.__init__(self, fmt)
        self.result = ''
        self.open_tags = []
        self.permitted_tags = [i for i in permitted_tags if i[-1] != '/']
        self.requires_no_close = [i[:-1] for i in permitted_tags
                                  if i[-1] == '/']
        self.permitted_tags += self.requires_no_close
        self.allowed_attributes = allowed_attributes

        # The only schemes allowed in URLs (for href and src attributes).
        # Adding "javascript" or "vbscript" to this list would not be smart.

        self.allowed_schemes = ['http', 'https', 'ftp']

        #to strip or escape disallowed tags?
        self.strip_disallowed = strip_disallowed
        self.in_disallowed = False

    def handle_data(self, data):
        if data and not self.in_disallowed:
            self.result += xssescape(data)

    def handle_charref(self, ref):
        if self.in_disallowed:
            return
        elif len(ref) < 7 and ref.isdigit():
            self.result += '&#%s;' % ref
        else:
            self.result += xssescape('&#%s' % ref)

    def handle_entityref(self, ref):
        if self.in_disallowed:
            return
        elif ref in entitydefs:
            self.result += '&%s;' % ref
        else:
            self.result += xssescape('&%s' % ref)

    def handle_comment(self, comment):
        if self.in_disallowed:
            return
        elif comment:
            self.result += xssescape('<!--%s-->' % comment)

    def handle_starttag(
        self,
        tag,
        method,
        attrs,
        ):
        if tag not in self.permitted_tags:
            if self.strip_disallowed:
                self.in_disallowed = True
            else:
                self.result += xssescape('<%s>' % tag)
        else:
            bt = '<' + tag
            if tag in self.allowed_attributes:
                attrs = dict(attrs)
                self.allowed_attributes_here = [x for x in
                        self.allowed_attributes[tag] if x in attrs
                         and len(attrs[x]) > 0]
                for attribute in self.allowed_attributes_here:
                    if attribute in ['href', 'src', 'background']:
                        if self.url_is_acceptable(attrs[attribute]):
                            bt += ' %s="%s"' % (attribute,
                                    attrs[attribute])
                    else:
                        bt += ' %s=%s' % (xssescape(attribute),
                                quoteattr(attrs[attribute]))
            if bt == '<a' or bt == '<img':
                return
            if tag in self.requires_no_close:
                bt += ' /'
            bt += '>'
            self.result += bt
            self.open_tags.insert(0, tag)

    def handle_endtag(self, tag, attrs):
        bracketed = '</%s>' % tag
        if tag not in self.permitted_tags:
            if self.strip_disallowed:
                self.in_disallowed = False
            else:
                self.result += xssescape(bracketed)
        elif tag in self.open_tags:
            self.result += bracketed
            self.open_tags.remove(tag)

    def unknown_starttag(self, tag, attributes):
        self.handle_starttag(tag, None, attributes)

    def unknown_endtag(self, tag):
        self.handle_endtag(tag, None)

    def url_is_acceptable(self, url):
        """
        Accepts relative and absolute urls
        """

        parsed = urlparse(url)
        return (parsed[0] in self.allowed_schemes and '.' in parsed[1]) \
            or (parsed[0] == '' and parsed[2].startswith('/'))

    def strip(self, rawstring, escape=True):
        """
        Returns the argument stripped of potentially harmful
        HTML or Javascript code

        @type escape: boolean
        @param escape: If True (default) it escapes the potentially harmful
          content, otherwise remove it
        """

        if not isinstance(rawstring, str): return str(rawstring)
        for tag in self.requires_no_close:
            rawstring = rawstring.replace("<%s/>" % tag, "<%s />" % tag)
        if not escape:
            self.strip_disallowed = True
        self.result = ''
        self.feed(rawstring)
        for endtag in self.open_tags:
            if endtag not in self.requires_no_close:
                self.result += '</%s>' % endtag
        return self.result

    def xtags(self):
        """
        Returns a printable string informing the user which tags are allowed
        """

        tg = ''
        for x in sorted(self.permitted_tags):
            tg += '<' + x
            if x in self.allowed_attributes:
                for y in self.allowed_attributes[x]:
                    tg += ' %s=""' % y
            tg += '> '
        return xssescape(tg.strip())


def sanitize(text, permitted_tags=[
        'a',
        'b',
        'blockquote',
        'br/',
        'i',
        'li',
        'ol',
        'ul',
        'p',
        'cite',
        'code',
        'pre',
        'img/',
        'h1','h2','h3','h4','h5','h6',
        'table','tr','td','div',
        ],
             allowed_attributes = {
        'a': ['href', 'title'],
        'img': ['src', 'alt'],
        'blockquote': ['type'],
        'td': ['colspan'],
        },
             escape=True):
    if not isinstance(text, str): return str(text)
    return XssCleaner(permitted_tags=permitted_tags,
                      allowed_attributes=allowed_attributes).strip(text, escape)

Added gluon/serializers.py version [4a4a474858].















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import datetime
from storage import Storage
from html import TAG
from html import xmlescape
from languages import lazyT
import contrib.simplejson as simplejson
import contrib.rss2 as rss2

def custom_json(o):
    if hasattr(o,'custom_json') and callable(o.custom_json):
        return o.custom_json()
    if isinstance(o, (datetime.date,
                      datetime.datetime,
                      datetime.time)):
        return o.isoformat()[:19].replace('T',' ')
    elif isinstance(o, (int, long)):
        return int(o)
    elif isinstance(o, lazyT):
        return str(o)
    elif hasattr(o,'as_list') and callable(o.as_list):
        return o.as_list()
    elif hasattr(o,'as_dict') and callable(o.as_dict):
        return o.as_dict()
    else:
        raise TypeError(repr(o) + " is not JSON serializable")


def xml_rec(value, key):
    if hasattr(value,'custom_xml') and callable(value.custom_xml):
        return value.custom_xml()
    elif isinstance(value, (dict, Storage)):
        return TAG[key](*[TAG[k](xml_rec(v, '')) for k, v in value.items()])
    elif isinstance(value, list):
        return TAG[key](*[TAG.item(xml_rec(item, '')) for item in value])
    elif hasattr(value,'as_list') and callable(value.as_list):
        return str(xml_rec(value.as_list(),''))
    elif hasattr(value,'as_dict') and callable(value.as_dict):
        return str(xml_rec(value.as_dict(),''))
    else:
        return xmlescape(value)


def xml(value, encoding='UTF-8', key='document'):
    return ('<?xml version="1.0" encoding="%s"?>' % encoding) + str(xml_rec(value,key))


def json(value,default=custom_json):
    return simplejson.dumps(value,default=default)


def csv(value):
    return ''


def rss(feed):
    if not 'entries' in feed and 'items' in feed:
        feed['entries'] = feed['items']
    now=datetime.datetime.now()
    rss = rss2.RSS2(title = feed['title'],
                    link = str(feed['link']),
                    description = feed['description'],
                    lastBuildDate = feed.get('created_on', now),
                    items = [rss2.RSSItem(\
                                        title=entry['title'],
                                        link=str(entry['link']),
                                        description=entry['description'],
                                        pubDate=entry.get('created_on', now)
                                        )\
                                    for entry in feed['entries']
                                    ]
                    )
    return rss2.dumps(rss)

Added gluon/settings.py version [5c78f2495b].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

from storage import Storage

global_settings = Storage()
settings = global_settings  # legacy compatibility

Added gluon/shell.py version [e6d16bd699].

















































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>,
limodou <limodou@gmail.com> and srackham <srackham@gmail.com>.
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

"""

import os
import sys
import code
import logging
import types
import re
import optparse
import glob

import fileutils
import settings
from utils import web2py_uuid
from compileapp import build_environment, read_pyc, run_models_in
from restricted import RestrictedError
from globals import Request, Response, Session
from storage import Storage
from admin import w2p_unpack


logger = logging.getLogger("web2py")

def exec_environment(
    pyfile='',
    request=None,
    response=None,
    session=None,
    ):
    """
    .. function:: gluon.shell.exec_environment([pyfile=''[, request=Request()
        [, response=Response[, session=Session()]]]])

        Environment builder and module loader.


        Builds a web2py environment and optionally executes a Python
        file into the environment.
        A Storage dictionary containing the resulting environment is returned.
        The working directory must be web2py root -- this is the web2py default.

    """

    if request==None: request = Request()
    if response==None: response = Response()
    if session==None: session = Session()

    if request.folder is None:
        mo = re.match(r'(|.*/)applications/(?P<appname>[^/]+)', pyfile)
        if mo:
            appname = mo.group('appname')
            request.folder = os.path.join('applications', appname)
        else:
            request.folder = ''
    env = build_environment(request, response, session, store_current=False)
    if pyfile:
        pycfile = pyfile + 'c'
        if os.path.isfile(pycfile):
            exec read_pyc(pycfile) in env
        else:
            execfile(pyfile, env)
    return Storage(env)


def env(
    a,
    import_models=False,
    c=None,
    f=None,
    dir='',
    extra_request={},
    ):
    """
    Return web2py execution environment for application (a), controller (c),
    function (f).
    If import_models is True the exec all application models into the
    environment.

    extra_request allows you to pass along any extra
    variables to the request object before your models
    get executed. This was mainly done to support
    web2py_utils.test_runner, however you can use it
    with any wrapper scripts that need access to the
    web2py environment.
    """

    request = Request()
    response = Response()
    session = Session()
    request.application = a

    # Populate the dummy environment with sensible defaults.

    if not dir:
        request.folder = os.path.join('applications', a)
    else:
        request.folder = dir
    request.controller = c or 'default'
    request.function = f or 'index'
    response.view = '%s/%s.html' % (request.controller,
                                    request.function)
    request.env.path_info = '/%s/%s/%s' % (a, c, f)
    request.env.http_host = '127.0.0.1:8000'
    request.env.remote_addr = '127.0.0.1'
    request.env.web2py_runtime_gae = settings.global_settings.web2py_runtime_gae

    for k,v in extra_request.items():
        request[k] = v

    # Monkey patch so credentials checks pass.

    def check_credentials(request, other_application='admin'):
        return True

    fileutils.check_credentials = check_credentials

    environment = build_environment(request, response, session)

    if import_models:
        try:
            run_models_in(environment)
        except RestrictedError, e:
            sys.stderr.write(e.traceback+'\n')
            sys.exit(1)

    environment['__name__'] = '__main__'
    return environment


def exec_pythonrc():
    pythonrc = os.environ.get('PYTHONSTARTUP')
    if pythonrc and os.path.isfile(pythonrc):
        try:
            execfile(pythonrc)
        except NameError:
            pass


def run(
    appname,
    plain=False,
    import_models=False,
    startfile=None,
    bpython=False
    ):
    """
    Start interactive shell or run Python script (startfile) in web2py
    controller environment. appname is formatted like:

    a      web2py application name
    a/c    exec the controller c into the application environment
    """

    (a, c, f) = parse_path_info(appname)
    errmsg = 'invalid application name: %s' % appname
    if not a:
        die(errmsg)
    adir = os.path.join('applications', a)
    if not os.path.exists(adir):
        if raw_input('application %s does not exist, create (y/n)?'
                      % a).lower() in ['y', 'yes']:
            os.mkdir(adir)
            w2p_unpack('welcome.w2p', adir)
            for subfolder in ['models','views','controllers', 'databases',
                              'modules','cron','errors','sessions',
                              'languages','static','private','uploads']:
                subpath =  os.path.join(adir,subfolder)
                if not os.path.exists(subpath):
                    os.mkdir(subpath)
            db = os.path.join(adir,'models/db.py')
            if os.path.exists(db):
                data = fileutils.read_file(db)
                data = data.replace('<your secret key>','sha512:'+web2py_uuid())
                fileutils.write_file(db, data)

    if c:
        import_models = True
    _env = env(a, c=c, import_models=import_models)
    if c:
        cfile = os.path.join('applications', a, 'controllers', c + '.py')
        if not os.path.isfile(cfile):
            cfile = os.path.join('applications', a, 'compiled', "controllers_%s_%s.pyc" % (c,f))
            if not os.path.isfile(cfile):
                die(errmsg)
            else:
                exec read_pyc(cfile) in _env
        else:
            execfile(cfile, _env)

    if f:
        exec ('print %s()' % f, _env)
    elif startfile:
        exec_pythonrc()
        try:
            execfile(startfile, _env)
        except RestrictedError, e:
            print e.traceback
    else:
        if not plain:
            if bpython:
                try:
                    import bpython
                    bpython.embed(locals_=_env)
                    return
                except:
                    logger.warning(
                        'import bpython error; trying ipython...')
            else:
                try:
                    import IPython
                    # following 2 lines fix a problem with IPython; thanks Michael Toomim
                    if '__builtins__' in _env:
                        del _env['__builtins__']
                    shell = IPython.Shell.IPShell(argv=[], user_ns=_env)
                    shell.mainloop()
                    return
                except:
                    logger.warning(
                        'import IPython error; use default python shell')
        try:
            import readline
            import rlcompleter
        except ImportError:
            pass
        else:
            readline.set_completer(rlcompleter.Completer(_env).complete)
            readline.parse_and_bind('tab:complete')
        exec_pythonrc()
        code.interact(local=_env)


def parse_path_info(path_info):
    """
    Parse path info formatted like a/c/f where c and f are optional
    and a leading / accepted.
    Return tuple (a, c, f). If invalid path_info a is set to None.
    If c or f are omitted they are set to None.
    """

    mo = re.match(r'^/?(?P<a>\w+)(/(?P<c>\w+)(/(?P<f>\w+))?)?$',
                  path_info)
    if mo:
        return (mo.group('a'), mo.group('c'), mo.group('f'))
    else:
        return (None, None, None)


def die(msg):
    print >> sys.stderr, msg
    sys.exit(1)


def test(testpath, import_models=True, verbose=False):
    """
    Run doctests in web2py environment. testpath is formatted like:

    a      tests all controllers in application a
    a/c    tests controller c in application a
    a/c/f  test function f in controller c, application a

    Where a, c and f are application, controller and function names
    respectively. If the testpath is a file name the file is tested.
    If a controller is specified models are executed by default.
    """

    import doctest
    if os.path.isfile(testpath):
        mo = re.match(r'(|.*/)applications/(?P<a>[^/]+)', testpath)
        if not mo:
            die('test file is not in application directory: %s'
                 % testpath)
        a = mo.group('a')
        c = f = None
        files = [testpath]
    else:
        (a, c, f) = parse_path_info(testpath)
        errmsg = 'invalid test path: %s' % testpath
        if not a:
            die(errmsg)
        cdir = os.path.join('applications', a, 'controllers')
        if not os.path.isdir(cdir):
            die(errmsg)
        if c:
            cfile = os.path.join(cdir, c + '.py')
            if not os.path.isfile(cfile):
                die(errmsg)
            files = [cfile]
        else:
            files = glob.glob(os.path.join(cdir, '*.py'))
    for testfile in files:
        globs = env(a, import_models)
        ignores = globs.keys()
        execfile(testfile, globs)

        def doctest_object(name, obj):
            """doctest obj and enclosed methods and classes."""

            if type(obj) in (types.FunctionType, types.TypeType,
                             types.ClassType, types.MethodType,
                             types.UnboundMethodType):

                # Reload environment before each test.

                globs = env(a, c=c, f=f, import_models=import_models)
                execfile(testfile, globs)
                doctest.run_docstring_examples(obj, globs=globs,
                        name='%s: %s' % (os.path.basename(testfile),
                        name), verbose=verbose)
                if type(obj) in (types.TypeType, types.ClassType):
                    for attr_name in dir(obj):

                        # Execute . operator so decorators are executed.

                        o = eval('%s.%s' % (name, attr_name), globs)
                        doctest_object(attr_name, o)

        for (name, obj) in globs.items():
            if name not in ignores and (f is None or f == name):
                doctest_object(name, obj)


def get_usage():
    usage = """
  %prog [options] pythonfile
"""
    return usage


def execute_from_command_line(argv=None):
    if argv is None:
        argv = sys.argv

    parser = optparse.OptionParser(usage=get_usage())

    parser.add_option('-S', '--shell', dest='shell', metavar='APPNAME',
        help='run web2py in interactive shell or IPython(if installed) ' + \
            'with specified appname')
    msg = 'run web2py in interactive shell or bpython (if installed) with'
    msg += ' specified appname (if app does not exist it will be created).'
    msg += '\n Use combined with --shell'
    parser.add_option(
        '-B',
        '--bpython',
        action='store_true',
        default=False,
        dest='bpython',
        help=msg,
        )
    parser.add_option(
        '-P',
        '--plain',
        action='store_true',
        default=False,
        dest='plain',
        help='only use plain python shell, should be used with --shell option',
        )
    parser.add_option(
        '-M',
        '--import_models',
        action='store_true',
        default=False,
        dest='import_models',
        help='auto import model files, default is False, ' + \
            ' should be used with --shell option',
        )
    parser.add_option(
        '-R',
        '--run',
        dest='run',
        metavar='PYTHON_FILE',
        default='',
        help='run PYTHON_FILE in web2py environment, ' + \
            'should be used with --shell option',
        )

    (options, args) = parser.parse_args(argv[1:])

    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(0)

    if len(args) > 0:
        startfile = args[0]
    else:
        startfile = ''
    run(options.shell, options.plain, startfile=startfile, bpython=options.bpython)


if __name__ == '__main__':
    execute_from_command_line()

Added gluon/sql.py version [8df4f4f856].







1
2
3
4
5
6
+
+
+
+
+
+
# this file exists for backward compatibility

__all__ = ['DAL','Field','drivers']

from dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType

Added gluon/sqlhtml.py version [aa2336d433].



























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Holds:

- SQLFORM: provide a form for a table (with/without record)
- SQLTABLE: provides a table for a set of records
- form_factory: provides a SQLFORM for an non-db backed table

"""

from http import HTTP
from html import XML, SPAN, TAG, A, DIV, UL, LI, TEXTAREA, BR, IMG, SCRIPT
from html import FORM, INPUT, LABEL, OPTION, SELECT
from html import TABLE, THEAD, TBODY, TR, TD, TH
from html import URL as Url
from dal import DAL, Table, Row, CALLABLETYPES
from storage import Storage
from utils import md5_hash
from validators import IS_EMPTY_OR

import urllib
import re
import cStringIO


table_field = re.compile('[\w_]+\.[\w_]+')
widget_class = re.compile('^\w*')

def represent(field,value,record):
    f = field.represent
    if not callable(f):
        return str(value)
    n = f.func_code.co_argcount-len(f.func_defaults or [])
    if n==1:
        return f(value)
    elif n==2:
        return f(value,record)
    else:
        raise RuntimeError, "field representation must take 1 or 2 args"

def safe_int(x):
    try:
        return int(x)
    except ValueError:
        return 0

def safe_float(x):
    try:
        return float(x)
    except ValueError:
        return 0

class FormWidget(object):
    """
    helper for SQLFORM to generate form input fields (widget),
    related to the fieldtype
    """

    @staticmethod
    def _attributes(field, widget_attributes, **attributes):
        """
        helper to build a common set of attributes

        :param field: the field involved, some attributes are derived from this
        :param widget_attributes:  widget related attributes
        :param attributes: any other supplied attributes
        """
        attr = dict(
            _id = '%s_%s' % (field._tablename, field.name),
            _class = widget_class.match(str(field.type)).group(),
            _name = field.name,
            requires = field.requires,
            )
        attr.update(widget_attributes)
        attr.update(attributes)
        return attr

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates the widget for the field.

        When serialized, will provide an INPUT tag:

        - id = tablename_fieldname
        - class = field.type
        - name = fieldname

        :param field: the field needing the widget
        :param value: value
        :param attributes: any other attributes to be applied
        """

        raise NotImplementedError

class StringWidget(FormWidget):

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates an INPUT text tag.

        see also: :meth:`FormWidget.widget`
        """

        default = dict(
            _type = 'text',
            value = (value!=None and str(value)) or '',
            )
        attr = StringWidget._attributes(field, default, **attributes)

        return INPUT(**attr)


class IntegerWidget(StringWidget):

    pass


class DoubleWidget(StringWidget):

    pass


class DecimalWidget(StringWidget):

    pass


class TimeWidget(StringWidget):

    pass


class DateWidget(StringWidget):

    pass


class DatetimeWidget(StringWidget):

    pass


class TextWidget(FormWidget):

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates a TEXTAREA tag.

        see also: :meth:`FormWidget.widget`
        """

        default = dict(
            value = value,
            )
        attr = TextWidget._attributes(field, default, **attributes)

        return TEXTAREA(**attr)


class BooleanWidget(FormWidget):

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates an INPUT checkbox tag.

        see also: :meth:`FormWidget.widget`
        """

        default=dict(
            _type='checkbox',
            value=value,
            )
        attr = BooleanWidget._attributes(field, default, **attributes)

        return INPUT(**attr)


class OptionsWidget(FormWidget):

    @staticmethod
    def has_options(field):
        """
        checks if the field has selectable options

        :param field: the field needing checking
        :returns: True if the field has options
        """

        return hasattr(field.requires, 'options')

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates a SELECT tag, including OPTIONs (only 1 option allowed)

        see also: :meth:`FormWidget.widget`
        """
        default = dict(
            value=value,
            )
        attr = OptionsWidget._attributes(field, default, **attributes)

        requires = field.requires
        if not isinstance(requires, (list, tuple)):
            requires = [requires]
        if requires:
            if hasattr(requires[0], 'options'):
                options = requires[0].options()
            else:
                raise SyntaxError, 'widget cannot determine options of %s' \
                    % field
        opts = [OPTION(v, _value=k) for (k, v) in options]

        return SELECT(*opts, **attr)

class ListWidget(StringWidget):
    @staticmethod
    def widget(field,value,**attributes):
        _id = '%s_%s' % (field._tablename, field.name)
        _name = field.name
        if field.type=='list:integer': _class = 'integer'
        else: _class = 'string'
        items=[LI(INPUT(_id=_id,_class=_class,_name=_name,value=v,hideerror=True)) \
                   for v in value or ['']]
        script=SCRIPT("""
// from http://refactormycode.com/codes/694-expanding-input-list-using-jquery
(function(){
jQuery.fn.grow_input = function() {
  return this.each(function() {
    var ul = this;
    jQuery(ul).find(":text").after('<a href="javascript:void(0)>+</a>').keypress(function (e) { return (e.which == 13) ? pe(ul) : true; }).next().click(function(){ pe(ul) });
  });
};
function pe(ul) {
  var new_line = ml(ul);
  rel(ul);
  new_line.appendTo(ul);
  new_line.find(":text").focus();
  return false;
}
function ml(ul) {
  var line = jQuery(ul).find("li:first").clone(true);
  line.find(':text').val('');
  return line;
}
function rel(ul) {
  jQuery(ul).find("li").each(function() {
    var trimmed = jQuery.trim(jQuery(this.firstChild).val());
    if (trimmed=='') jQuery(this).remove(); else jQuery(this.firstChild).val(trimmed);
  });
}
})();
jQuery(document).ready(function(){jQuery('#%s_grow_input').grow_input();});
""" % _id)
        attributes['_id']=_id+'_grow_input'
        return TAG[''](UL(*items,**attributes),script)


class MultipleOptionsWidget(OptionsWidget):

    @staticmethod
    def widget(field, value, size=5, **attributes):
        """
        generates a SELECT tag, including OPTIONs (multiple options allowed)

        see also: :meth:`FormWidget.widget`

        :param size: optional param (default=5) to indicate how many rows must
            be shown
        """

        attributes.update(dict(_size=size, _multiple=True))

        return OptionsWidget.widget(field, value, **attributes)


class RadioWidget(OptionsWidget):

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates a TABLE tag, including INPUT radios (only 1 option allowed)

        see also: :meth:`FormWidget.widget`
        """

        attr = OptionsWidget._attributes(field, {}, **attributes)

        requires = field.requires
        if not isinstance(requires, (list, tuple)):
            requires = [requires]
        if requires:
            if hasattr(requires[0], 'options'):
                options = requires[0].options()
            else:
                raise SyntaxError, 'widget cannot determine options of %s' \
                    % field

        options = [(k, v) for k, v in options if str(v)]
        opts = []
        cols = attributes.get('cols',1)
        totals = len(options)
        mods = totals%cols
        rows = totals/cols
        if mods:
            rows += 1

        for r_index in range(rows):
            tds = []
            for k, v in options[r_index*cols:(r_index+1)*cols]:
                tds.append(TD(INPUT(_type='radio', _name=field.name,
                         requires=attr.get('requires',None),
                         hideerror=True, _value=k,
                         value=value), v))
            opts.append(TR(tds))

        if opts:
            opts[-1][0][0]['hideerror'] = False
        return TABLE(*opts, **attr)


class CheckboxesWidget(OptionsWidget):

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates a TABLE tag, including INPUT checkboxes (multiple allowed)

        see also: :meth:`FormWidget.widget`
        """

        # was values = re.compile('[\w\-:]+').findall(str(value))
        if isinstance(value, (list, tuple)):
            values = [str(v) for v in value]
        else:
            values = [str(value)]

        attr = OptionsWidget._attributes(field, {}, **attributes)

        requires = field.requires
        if not isinstance(requires, (list, tuple)):
            requires = [requires]
        if requires:
            if hasattr(requires[0], 'options'):
                options = requires[0].options()
            else:
                raise SyntaxError, 'widget cannot determine options of %s' \
                    % field

        options = [(k, v) for k, v in options if k != '']
        opts = []
        cols = attributes.get('cols', 1)
        totals = len(options)
        mods = totals % cols
        rows = totals / cols
        if mods:
            rows += 1

        for r_index in range(rows):
            tds = []
            for k, v in options[r_index*cols:(r_index+1)*cols]:
                if k in values:
                    r_value = k
                else:
                    r_value = []
                tds.append(TD(INPUT(_type='checkbox', _name=field.name,
                         requires=attr.get('requires', None),
                         hideerror=True, _value=k,
                         value=r_value), v))
            opts.append(TR(tds))

        if opts:
            opts[-1][0][0]['hideerror'] = False
        return TABLE(*opts, **attr)


class PasswordWidget(FormWidget):

    DEFAULT_PASSWORD_DISPLAY = 8*('*')

    @staticmethod
    def widget(field, value, **attributes):
        """
        generates a INPUT password tag.
        If a value is present it will be shown as a number of '*', not related
        to the length of the actual value.

        see also: :meth:`FormWidget.widget`
        """

        default=dict(
            _type='password',
            _value=(value and PasswordWidget.DEFAULT_PASSWORD_DISPLAY) or '',
            )
        attr = PasswordWidget._attributes(field, default, **attributes)

        return INPUT(**attr)


class UploadWidget(FormWidget):

    DEFAULT_WIDTH = '150px'
    ID_DELETE_SUFFIX = '__delete'
    GENERIC_DESCRIPTION = 'file'
    DELETE_FILE = 'delete'

    @staticmethod
    def widget(field, value, download_url=None, **attributes):
        """
        generates a INPUT file tag.

        Optionally provides an A link to the file, including a checkbox so
        the file can be deleted.
        All is wrapped in a DIV.

        see also: :meth:`FormWidget.widget`

        :param download_url: Optional URL to link to the file (default = None)
        """

        default=dict(
            _type='file',
            )
        attr = UploadWidget._attributes(field, default, **attributes)

        inp = INPUT(**attr)

        if download_url and value:
            url = download_url + '/' + value
            (br, image) = ('', '')
            if UploadWidget.is_image(value):
                br = BR()
                image = IMG(_src = url, _width = UploadWidget.DEFAULT_WIDTH)

            requires = attr["requires"]
            if requires == [] or isinstance(requires, IS_EMPTY_OR):
                inp = DIV(inp, '[',
                          A(UploadWidget.GENERIC_DESCRIPTION, _href = url),
                          '|',
                          INPUT(_type='checkbox',
                                _name=field.name + UploadWidget.ID_DELETE_SUFFIX),
                          UploadWidget.DELETE_FILE,
                          ']', br, image)
            else:
                inp = DIV(inp, '[',
                          A(UploadWidget.GENERIC_DESCRIPTION, _href = url),
                          ']', br, image)
        return inp

    @staticmethod
    def represent(field, value, download_url=None):
        """
        how to represent the file:

        - with download url and if it is an image: <A href=...><IMG ...></A>
        - otherwise with download url: <A href=...>file</A>
        - otherwise: file

        :param field: the field
        :param value: the field value
        :param download_url: url for the file download (default = None)
        """

        inp = UploadWidget.GENERIC_DESCRIPTION

        if download_url and value:
            url = download_url + '/' + value
            if UploadWidget.is_image(value):
                inp = IMG(_src = url, _width = UploadWidget.DEFAULT_WIDTH)
            inp = A(inp, _href = url)

        return inp

    @staticmethod
    def is_image(value):
        """
        Tries to check if the filename provided references to an image

        Checking is based on filename extension. Currently recognized:
           gif, png, jp(e)g, bmp

        :param value: filename
        """

        extension = value.split('.')[-1].lower()
        if extension in ['gif', 'png', 'jpg', 'jpeg', 'bmp']:
            return True
        return False


class AutocompleteWidget(object):

    def __init__(self, request, field, id_field=None, db=None,
                 orderby=None, limitby=(0,10),
                 keyword='_autocomplete_%(fieldname)s',
                 min_length=2):
        self.request = request
        self.keyword = keyword % dict(fieldname=field.name)
        self.db = db or field._db
        self.orderby = orderby
        self.limitby = limitby
        self.min_length = min_length
        self.fields=[field]
        if id_field:
            self.is_reference = True
            self.fields.append(id_field)
        else:
            self.is_reference = False
        if hasattr(request,'application'):
            self.url = Url(r=request, args=request.args)
            self.callback()
        else:
            self.url = request
    def callback(self):
        if self.keyword in self.request.vars:
            field = self.fields[0]
            rows = self.db(field.like(self.request.vars[self.keyword]+'%'))\
                .select(orderby=self.orderby,limitby=self.limitby,*self.fields)
            if rows:
                if self.is_reference:
                    id_field = self.fields[1]
                    raise HTTP(200,SELECT(_id=self.keyword,_class='autocomplete',
                                          _size=len(rows),_multiple=(len(rows)==1),
                                          *[OPTION(s[field.name],_value=s[id_field.name],
                                                   _selected=(k==0)) \
                                                for k,s in enumerate(rows)]).xml())
                else:
                    raise HTTP(200,SELECT(_id=self.keyword,_class='autocomplete',
                                          _size=len(rows),_multiple=(len(rows)==1),
                                          *[OPTION(s[field.name],
                                                   _selected=(k==0)) \
                                                for k,s in enumerate(rows)]).xml())
            else:

                raise HTTP(200,'')
    def __call__(self,field,value,**attributes):
        default = dict(
            _type = 'text',
            value = (value!=None and str(value)) or '',
            )
        attr = StringWidget._attributes(field, default, **attributes)
        div_id = self.keyword+'_div'
        attr['_autocomplete']='off'
        if self.is_reference:
            key2 = self.keyword+'_aux'
            key3 = self.keyword+'_auto'
            attr['_class']='string'
            name = attr['_name']
            if 'requires' in attr: del attr['requires']
            attr['_name'] = key2
            value = attr['value']
            record = self.db(self.fields[1]==value).select(self.fields[0]).first()
            attr['value'] = record and record[self.fields[0].name]
            attr['_onblur']="jQuery('#%(div_id)s').delay(3000).fadeOut('slow');" % \
                dict(div_id=div_id,u='F'+self.keyword)
            attr['_onkeyup'] = "jQuery('#%(key3)s').val('');var e=event.which?event.which:event.keyCode; function %(u)s(){jQuery('#%(id)s').val(jQuery('#%(key)s :selected').text());jQuery('#%(key3)s').val(jQuery('#%(key)s').val())}; if(e==39) %(u)s(); else if(e==40) {if(jQuery('#%(key)s option:selected').next().length)jQuery('#%(key)s option:selected').attr('selected',null).next().attr('selected','selected'); %(u)s();} else if(e==38) {if(jQuery('#%(key)s option:selected').prev().length)jQuery('#%(key)s option:selected').attr('selected',null).prev().attr('selected','selected'); %(u)s();} else if(jQuery('#%(id)s').val().length>=%(min_length)s) jQuery.get('%(url)s?%(key)s='+escape(jQuery('#%(id)s').val()),function(data){if(data=='')jQuery('#%(key3)s').val('');else{jQuery('#%(id)s').next('.error').hide();jQuery('#%(div_id)s').html(data).show().focus();jQuery('#%(div_id)s select').css('width',jQuery('#%(id)s').css('width'));jQuery('#%(key3)s').val(jQuery('#%(key)s').val());jQuery('#%(key)s').change(%(u)s);jQuery('#%(key)s').click(%(u)s);};}); else jQuery('#%(div_id)s').fadeOut('slow');" % \
                dict(url=self.url,min_length=self.min_length,
                     key=self.keyword,id=attr['_id'],key2=key2,key3=key3,
                     name=name,div_id=div_id,u='F'+self.keyword)
            if self.min_length==0:
                attr['_onfocus'] = attr['_onkeyup']
            return TAG[''](INPUT(**attr),INPUT(_type='hidden',_id=key3,_value=value,
                                               _name=name,requires=field.requires),
                           DIV(_id=div_id,_style='position:absolute;'))
        else:
            attr['_name']=field.name
            attr['_onblur']="jQuery('#%(div_id)s').delay(3000).fadeOut('slow');" % \
                dict(div_id=div_id,u='F'+self.keyword)
            attr['_onkeyup'] = "var e=event.which?event.which:event.keyCode; function %(u)s(){jQuery('#%(id)s').val(jQuery('#%(key)s').val())}; if(e==39) %(u)s(); else if(e==40) {if(jQuery('#%(key)s option:selected').next().length)jQuery('#%(key)s option:selected').attr('selected',null).next().attr('selected','selected'); %(u)s();} else if(e==38) {if(jQuery('#%(key)s option:selected').prev().length)jQuery('#%(key)s option:selected').attr('selected',null).prev().attr('selected','selected'); %(u)s();} else if(jQuery('#%(id)s').val().length>=%(min_length)s) jQuery.get('%(url)s?%(key)s='+escape(jQuery('#%(id)s').val()),function(data){jQuery('#%(id)s').next('.error').hide();jQuery('#%(div_id)s').html(data).show().focus();jQuery('#%(div_id)s select').css('width',jQuery('#%(id)s').css('width'));jQuery('#%(key)s').change(%(u)s);jQuery('#%(key)s').click(%(u)s);}); else jQuery('#%(div_id)s').fadeOut('slow');" % \
                dict(url=self.url,min_length=self.min_length,
                     key=self.keyword,id=attr['_id'],div_id=div_id,u='F'+self.keyword)
            if self.min_length==0:
                attr['_onfocus'] = attr['_onkeyup']
            return TAG[''](INPUT(**attr),DIV(_id=div_id,_style='position:absolute;'))


class SQLFORM(FORM):

    """
    SQLFORM is used to map a table (and a current record) into an HTML form

    given a SQLTable stored in db.table

    generates an insert form::

        SQLFORM(db.table)

    generates an update form::

        record=db.table[some_id]
        SQLFORM(db.table, record)

    generates an update with a delete button::

        SQLFORM(db.table, record, deletable=True)

    if record is an int::

        record=db.table[record]

    optional arguments:

    :param fields: a list of fields that should be placed in the form,
        default is all.
    :param labels: a dictionary with labels for each field, keys are the field
        names.
    :param col3: a dictionary with content for an optional third column
            (right of each field). keys are field names.
    :param linkto: the URL of a controller/function to access referencedby
        records
            see controller appadmin.py for examples
    :param upload: the URL of a controller/function to download an uploaded file
            see controller appadmin.py for examples

    any named optional attribute is passed to the <form> tag
            for example _class, _id, _style, _action, _method, etc.

    """

    # usability improvements proposal by fpp - 4 May 2008 :
    # - correct labels (for points to field id, not field name)
    # - add label for delete checkbox
    # - add translatable label for record ID
    # - add third column to right of fields, populated from the col3 dict

    widgets = Storage(dict(
        string = StringWidget,
        text = TextWidget,
        password = PasswordWidget,
        integer = IntegerWidget,
        double = DoubleWidget,
        decimal = DecimalWidget,
        time = TimeWidget,
        date = DateWidget,
        datetime = DatetimeWidget,
        upload = UploadWidget,
        boolean = BooleanWidget,
        blob = None,
        options = OptionsWidget,
        multiple = MultipleOptionsWidget,
        radio = RadioWidget,
        checkboxes = CheckboxesWidget,
        autocomplete = AutocompleteWidget,
        list = ListWidget,
        ))

    FIELDNAME_REQUEST_DELETE = 'delete_this_record'
    FIELDKEY_DELETE_RECORD = 'delete_record'
    ID_LABEL_SUFFIX = '__label'
    ID_ROW_SUFFIX = '__row'

    def __init__(
        self,
        table,
        record = None,
        deletable = False,
        linkto = None,
        upload = None,
        fields = None,
        labels = None,
        col3 = {},
        submit_button = 'Submit',
        delete_label = 'Check to delete:',
        showid = True,
        readonly = False,
        comments = True,
        keepopts = [],
        ignore_rw = False,
        record_id = None,
        formstyle = 'table3cols',
        buttons = ['submit'],
        separator = ': ',
        **attributes
        ):
        """
        SQLFORM(db.table,
               record=None,
               fields=['name'],
               labels={'name': 'Your name'},
               linkto=URL(r=request, f='table/db/')
        """

        self.ignore_rw = ignore_rw
        self.formstyle = formstyle
        nbsp = XML('&nbsp;') # Firefox2 does not display fields with blanks
        FORM.__init__(self, *[], **attributes)
        ofields = fields
        keyed = hasattr(table,'_primarykey')

        # if no fields are provided, build it from the provided table
        # will only use writable or readable fields, unless forced to ignore
        if fields == None:
            fields = [f.name for f in table if (ignore_rw or f.writable or f.readable) and not f.compute]
        self.fields = fields

        # make sure we have an id
        if self.fields[0] != table.fields[0] and \
                isinstance(table,Table) and not keyed:
            self.fields.insert(0, table.fields[0])

        self.table = table

        # try to retrieve the indicated record using its id
        # otherwise ignore it
        if record and isinstance(record, (int, long, str, unicode)):
            if not str(record).isdigit():
                raise HTTP(404, "Object not found")
            record = table._db(table._id == record).select().first()
            if not record:
                raise HTTP(404, "Object not found")
        self.record = record

        self.record_id = record_id
        if keyed:
            if record:
                self.record_id = dict([(k,record[k]) for k in table._primarykey])
            else:
                self.record_id = dict([(k,None) for k in table._primarykey])
        self.field_parent = {}
        xfields = []
        self.fields = fields
        self.custom = Storage()
        self.custom.dspval = Storage()
        self.custom.inpval = Storage()
        self.custom.label = Storage()
        self.custom.comment = Storage()
        self.custom.widget = Storage()
        self.custom.linkto = Storage()

        sep = separator or ''
        
        for fieldname in self.fields:
            if fieldname.find('.') >= 0:
                continue

            field = self.table[fieldname]
            comment = None

            if comments:
                comment = col3.get(fieldname, field.comment)
            if comment == None:
                comment = ''
            self.custom.comment[fieldname] = comment

            if labels != None and fieldname in labels:
                label = labels[fieldname]
            else:
                label = field.label
            self.custom.label[fieldname] = label

            field_id = '%s_%s' % (table._tablename, fieldname)

            label = LABEL(label, sep, _for=field_id,
                          _id=field_id+SQLFORM.ID_LABEL_SUFFIX)

            row_id = field_id+SQLFORM.ID_ROW_SUFFIX
            if field.type == 'id':
                self.custom.dspval.id = nbsp
                self.custom.inpval.id = ''
                widget = ''
                if record:
                    if showid and 'id' in fields and field.readable:
                        v = record['id']
                        widget = SPAN(v, _id=field_id)
                        self.custom.dspval.id = str(v)
                        xfields.append((row_id,label, widget,comment))
                    self.record_id = str(record['id'])
                self.custom.widget.id = widget
                continue

            if readonly and not ignore_rw and not field.readable:
                continue

            if record:
                default = record[fieldname]
            else:
                default = field.default
                if isinstance(default,CALLABLETYPES):
                    default=default()

            cond = readonly or \
                (not ignore_rw and not field.writable and field.readable)

            if default and not cond:
                default = field.formatter(default)
            dspval = default
            inpval = default

            if cond:

                # ## if field.represent is available else
                # ## ignore blob and preview uploaded images
                # ## format everything else

                if field.represent:
                    inp = represent(field,default,record)
                elif field.type in ['blob']:
                    continue
                elif field.type == 'upload':
                    inp = UploadWidget.represent(field, default, upload)
                elif field.type == 'boolean':
                    inp = self.widgets.boolean.widget(field, default, _disabled=True)
                else:
                    inp = field.formatter(default)
            elif field.type == 'upload':
                if hasattr(field, 'widget') and field.widget:
                    inp = field.widget(field, default, upload)
                else:
                    inp = self.widgets.upload.widget(field, default, upload)
            elif hasattr(field, 'widget') and field.widget:
                inp = field.widget(field, default)
            elif field.type == 'boolean':
                inp = self.widgets.boolean.widget(field, default)
                if default:
                    inpval = 'checked'
                else:
                    inpval = ''
            elif OptionsWidget.has_options(field):
                if not field.requires.multiple:
                    inp = self.widgets.options.widget(field, default)
                else:
                    inp = self.widgets.multiple.widget(field, default)
                if fieldname in keepopts:
                    inpval = TAG[''](*inp.components)
            elif field.type.startswith('list:'):
                inp = self.widgets.list.widget(field,default)
            elif field.type == 'text':
                inp = self.widgets.text.widget(field, default)
            elif field.type == 'password':
                inp = self.widgets.password.widget(field, default)
                if self.record:
                    dspval = PasswordWidget.DEFAULT_PASSWORD_DISPLAY
                else:
                    dspval = ''
            elif field.type == 'blob':
                continue
            else:
                inp = self.widgets.string.widget(field, default)

            xfields.append((row_id,label,inp,comment))
            self.custom.dspval[fieldname] = dspval or nbsp
            self.custom.inpval[fieldname] = inpval or ''
            self.custom.widget[fieldname] = inp

        # if a record is provided and found, as is linkto
        # build a link
        if record and linkto:
            db = linkto.split('/')[-1]
            for (rtable, rfield) in table._referenced_by:
                if keyed:
                    rfld = table._db[rtable][rfield]
                    query = urllib.quote('%s.%s==%s' % (db,rfld,record[rfld.type[10:].split('.')[1]]))
                else:
                    query = urllib.quote('%s.%s==%s' % (db,table._db[rtable][rfield],record.id))
                lname = olname = '%s.%s' % (rtable, rfield)
                if ofields and not olname in ofields:
                    continue
                if labels and lname in labels:
                    lname = labels[lname]
                widget = A(lname,
                           _class='reference',
                           _href='%s/%s?query=%s' % (linkto, rtable, query))
                xfields.append((olname.replace('.', '__')+SQLFORM.ID_ROW_SUFFIX,
                                '',widget,col3.get(olname,'')))
                self.custom.linkto[olname.replace('.', '__')] = widget
#                 </block>

        # when deletable, add delete? checkbox
        self.custom.deletable = ''
        if record and deletable:
            widget = INPUT(_type='checkbox',
                            _class='delete',
                            _id=self.FIELDKEY_DELETE_RECORD,
                            _name=self.FIELDNAME_REQUEST_DELETE,
                            )
            xfields.append((self.FIELDKEY_DELETE_RECORD+SQLFORM.ID_ROW_SUFFIX,
                            LABEL(
                                delete_label,
                                _for=self.FIELDKEY_DELETE_RECORD,
                                _id=self.FIELDKEY_DELETE_RECORD+SQLFORM.ID_LABEL_SUFFIX),
                            widget,
                            col3.get(self.FIELDKEY_DELETE_RECORD, '')))
            self.custom.deletable = widget
        # when writable, add submit button
        self.custom.submit = ''
        if (not readonly) and ('submit' in buttons):
            widget = INPUT(_type='submit',
                           _value=submit_button)
            xfields.append(('submit_record'+SQLFORM.ID_ROW_SUFFIX,
                            '', widget,col3.get('submit_button', '')))
            self.custom.submit = widget
        # if a record is provided and found
        # make sure it's id is stored in the form
        if record:
            if not self['hidden']:
                self['hidden'] = {}
            if not keyed:
                self['hidden']['id'] = record['id']

        (begin, end) = self._xml()
        self.custom.begin = XML("<%s %s>" % (self.tag, begin))
        self.custom.end = XML("%s</%s>" % (end, self.tag))
        table = self.createform(xfields)
        self.components = [table]

    def createform(self, xfields):
        if self.formstyle == 'table3cols':
            table = TABLE()
            for id,a,b,c in xfields:
                td_b = self.field_parent[id] = TD(b,_class='w2p_fw')
                table.append(TR(TD(a,_class='w2p_fl'),
                                td_b,
                                TD(c,_class='w2p_fc'),_id=id))
        elif self.formstyle == 'table2cols':
            table = TABLE()
            for id,a,b,c in xfields:
                td_b = self.field_parent[id] = TD(b,_class='w2p_fw',_colspan="2")
                table.append(TR(TD(a,_class='w2p_fl'),
                                TD(c,_class='w2p_fc'),_id=id
                                +'1',_class='even'))
                table.append(TR(td_b,_id=id+'2',_class='odd'))
        elif self.formstyle == 'divs':
            table = TAG['']()
            for id,a,b,c in xfields:
                div_b = self.field_parent[id] = DIV(b,_class='w2p_fw')
                table.append(DIV(DIV(a,_class='w2p_fl'),
                                 div_b,
                                 DIV(c,_class='w2p_fc'),_id=id))
        elif self.formstyle == 'ul':
            table = UL()
            for id,a,b,c in xfields:
                div_b = self.field_parent[id] = DIV(b,_class='w2p_fw')
                table.append(LI(DIV(a,_class='w2p_fl'),
                                div_b,
                                DIV(c,_class='w2p_fc'),_id=id))
        elif type(self.formstyle) == type(lambda:None):
            table = TABLE()
            for id,a,b,c in xfields:
                td_b = self.field_parent[id] = TD(b,_class='w2p_fw')
                newrows = self.formstyle(id,a,td_b,c)
                if type(newrows).__name__ != "tuple":
                    newrows = [newrows]
                for newrow in newrows:
                    table.append(newrow)
        else:
            raise RuntimeError, 'formstyle not supported'
        return table


    def accepts(
        self,
        request_vars,
        session=None,
        formname='%(tablename)s/%(record_id)s',
        keepvalues=False,
        onvalidation=None,
        dbio=True,
        hideerror=False,
        detect_record_change=False,
        ):

        """
        similar FORM.accepts but also does insert, update or delete in DAL.
        but if detect_record_change == True than:
          form.record_changed = False (record is properly validated/submitted)
          form.record_changed = True (record cannot be submitted because changed)
        elseif detect_record_change == False than:
          form.record_changed = None
        """

        if request_vars.__class__.__name__ == 'Request':
            request_vars = request_vars.post_vars

        keyed = hasattr(self.table, '_primarykey')

        # implement logic to detect whether record exist but has been modified
        # server side
        self.record_changed = None
        if detect_record_change:
            if self.record:
                self.record_changed = False
                serialized = '|'.join(str(self.record[k]) for k in self.table.fields())
                self.record_hash = md5_hash(serialized)

        # logic to deal with record_id for keyed tables
        if self.record:
            if keyed:
                formname_id = '.'.join(str(self.record[k])
                                       for k in self.table._primarykey
                                       if hasattr(self.record,k))
                record_id = dict((k, request_vars[k]) for k in self.table._primarykey)
            else:
                (formname_id, record_id) = (self.record.id,
                                            request_vars.get('id', None))
            keepvalues = True
        else:
            if keyed:
                formname_id = 'create'
                record_id = dict([(k, None) for k in self.table._primarykey])
            else:
                (formname_id, record_id) = ('create', None)

        if not keyed and isinstance(record_id, (list, tuple)):
            record_id = record_id[0]

        if formname:
            formname = formname % dict(tablename = self.table._tablename,
                                       record_id = formname_id)

        # ## THIS IS FOR UNIQUE RECORDS, read IS_NOT_IN_DB

        for fieldname in self.fields:
            field = self.table[fieldname]
            requires = field.requires or []
            if not isinstance(requires, (list, tuple)):
                requires = [requires]
            [item.set_self_id(self.record_id) for item in requires
            if hasattr(item, 'set_self_id') and self.record_id]

        # ## END

        fields = {}
        for key in self.vars:
            fields[key] = self.vars[key]

        ret = FORM.accepts(
            self,
            request_vars,
            session,
            formname,
            keepvalues,
            onvalidation,
            hideerror=hideerror,
            )

        if not ret and self.record and self.errors:
            ### if there are errors in update mode
            # and some errors refers to an already uploaded file
            # delete error if
            # - user not trying to upload a new file
            # - there is existing file and user is not trying to delete it
            # this is because removing the file may not pass validation
            for key in self.errors.keys():
                if key in self.table \
                        and self.table[key].type == 'upload' \
                        and request_vars.get(key, None) in (None, '') \
                        and self.record[key] \
                        and not key + UploadWidget.ID_DELETE_SUFFIX in request_vars:
                    del self.errors[key]
            if not self.errors:
                ret = True

        requested_delete = \
            request_vars.get(self.FIELDNAME_REQUEST_DELETE, False)

        self.custom.end = TAG[''](self.hidden_fields(), self.custom.end)

        auch = record_id and self.errors and requested_delete

        # auch is true when user tries to delete a record
        # that does not pass validation, yet it should be deleted

        if not ret and not auch:
            for fieldname in self.fields:
                field = self.table[fieldname]
                ### this is a workaround! widgets should always have default not None!
                if not field.widget and field.type.startswith('list:') and \
                        not OptionsWidget.has_options(field):
                    field.widget = self.widgets.list.widget
                if hasattr(field, 'widget') and field.widget and fieldname in request_vars:
                    if fieldname in self.vars:
                        value = self.vars[fieldname]
                    elif self.record:
                        value = self.record[fieldname]
                    else:
                        value = self.table[fieldname].default
                    row_id = '%s_%s%s' % (self.table, fieldname, SQLFORM.ID_ROW_SUFFIX)
                    widget = field.widget(field, value)
                    self.field_parent[row_id].components = [ widget ]
                    if not field.type.startswith('list:'):
                        self.field_parent[row_id]._traverse(False, hideerror)
                    self.custom.widget[ fieldname ] = widget
            return ret

        if record_id and str(record_id) != str(self.record_id):
            raise SyntaxError, 'user is tampering with form\'s record_id: ' \
                '%s != %s' % (record_id, self.record_id)

        if record_id and dbio:
            if keyed:
                self.vars.update(record_id)
            else:
                self.vars.id = self.record.id

        if requested_delete and self.custom.deletable:
            if dbio:
                if keyed:
                    qry = reduce(lambda x, y: x & y,
                                 [self.table[k] == record_id[k] for k in self.table._primarykey])
                else:
                    qry = self.table._id == self.record.id
                self.table._db(qry).delete()
            self.errors.clear()
            for component in self.elements('input, select, textarea'):
                component['_disabled'] = True
            return True

        for fieldname in self.fields:
            if not fieldname in self.table.fields:
                continue

            if not self.ignore_rw and not self.table[fieldname].writable:
                ### this happens because FORM has no knowledge of writable
                ### and thinks that a missing boolean field is a None
                if self.table[fieldname].type == 'boolean' and \
                    self.vars.get(fieldname, True) == None:
                    del self.vars[fieldname]
                continue

            field = self.table[fieldname]
            if field.type == 'id':
                continue
            if field.type == 'boolean':
                if self.vars.get(fieldname, False):
                    self.vars[fieldname] = fields[fieldname] = True
                else:
                    self.vars[fieldname] = fields[fieldname] = False
            elif field.type == 'password' and self.record\
                and request_vars.get(fieldname, None) == \
                    PasswordWidget.DEFAULT_PASSWORD_DISPLAY:
                continue  # do not update if password was not changed
            elif field.type == 'upload':
                f = self.vars[fieldname]
                fd = '%s__delete' % fieldname
                if f == '' or f == None:
                    if self.vars.get(fd, False) or not self.record:
                        fields[fieldname] = ''
                    else:
                        fields[fieldname] = self.record[fieldname]
                    self.vars[fieldname] = fields[fieldname]
                    continue
                elif hasattr(f, 'file'):
                    (source_file, original_filename) = (f.file, f.filename)
                elif isinstance(f, (str, unicode)):
                    ### do not know why this happens, it should not
                    (source_file, original_filename) = \
                        (cStringIO.StringIO(f), 'file.txt')
                newfilename = field.store(source_file, original_filename)
                # this line is for backward compatibility only
                self.vars['%s_newfilename' % fieldname] = newfilename
                fields[fieldname] = newfilename
                if isinstance(field.uploadfield, str):
                    fields[field.uploadfield] = source_file.read()
                # proposed by Hamdy (accept?) do we need fields at this point?
                self.vars[fieldname] = fields[fieldname]
                continue
            elif fieldname in self.vars:
                fields[fieldname] = self.vars[fieldname]
            elif field.default == None and field.type != 'blob':
                self.errors[fieldname] = 'no data'
                return False
            value = fields.get(fieldname,None)
            if field.type == 'list:string':
                if not isinstance(value, (tuple, list)):
                    fields[fieldname] = value and [value] or []
            elif isinstance(field.type,str) and field.type.startswith('list:'):
                if not isinstance(value, list):
                    fields[fieldname] = [safe_int(x) for x in (value and [value] or [])]
            elif field.type == 'integer':
                if value != None:
                    fields[fieldname] = safe_int(value)
            elif field.type.startswith('reference'):
                if value != None and isinstance(self.table, Table) and not keyed:
                    fields[fieldname] = safe_int(value)
            elif field.type == 'double':
                if value != None:
                    fields[fieldname] = safe_float(value)

        for fieldname in self.vars:
            if fieldname != 'id' and fieldname in self.table.fields\
                 and not fieldname in fields and not fieldname\
                 in request_vars:
                fields[fieldname] = self.vars[fieldname]

        if dbio:            
            if 'delete_this_record' in fields:
                # this should never happen but seems to happen to some
                del fields['delete_this_record']
            for field in self.table:
                if not field.name in fields and field.writable==False:
                    if record_id:
                        fields[field.name] = self.record[field.name]
                    elif self.table[field.name].default!=None:
                        fields[field.name] = self.table[field.name].default
            if keyed:
                if reduce(lambda x, y: x and y, record_id.values()): # if record_id
                    if fields:
                        qry = reduce(lambda x, y: x & y,
                            [self.table[k] == self.record[k] for k in self.table._primarykey])
                        self.table._db(qry).update(**fields)
                else:
                    pk = self.table.insert(**fields)
                    if pk:
                        self.vars.update(pk)
                    else:
                        ret = False
            else:
                if record_id:
                    self.vars.id = self.record.id
                    if fields:
                        self.table._db(self.table._id == self.record.id).update(**fields)
                else:
                    self.vars.id = self.table.insert(**fields)
        return ret

    @staticmethod
    def factory(*fields, **attributes):
        """
        generates a SQLFORM for the given fields.

        Internally will build a non-database based data model
        to hold the fields.
        """
        # Define a table name, this way it can be logical to our CSS.
        # And if you switch from using SQLFORM to SQLFORM.factory
        # your same css definitions will still apply.

        table_name = attributes.get('table_name', 'no_table')

        # So it won't interfear with SQLDB.define_table
        if 'table_name' in attributes:
            del attributes['table_name']

        return SQLFORM(DAL(None).define_table(table_name, *fields), **attributes)


class SQLTABLE(TABLE):

    """
    given a Rows object, as returned by a db().select(), generates
    an html table with the rows.

    optional arguments:

    :param linkto: URL (or lambda to generate a URL) to edit individual records
    :param upload: URL to download uploaded files
    :param orderby: Add an orderby link to column headers.
    :param headers: dictionary of headers to headers redefinions
                    headers can also be a string to gerenare the headers from data
                    for now only headers="fieldname:capitalize",
                    headers="labels" and headers=None are supported
    :param truncate: length at which to truncate text in table cells.
        Defaults to 16 characters.
    :param columns: a list or dict contaning the names of the columns to be shown
        Defaults to all

    Optional names attributes for passed to the <table> tag

    The keys of headers and columns must be of the form "tablename.fieldname"

    Simple linkto example::

        rows = db.select(db.sometable.ALL)
        table = SQLTABLE(rows, linkto='someurl')

    This will link rows[id] to .../sometable/value_of_id


    More advanced linkto example::

        def mylink(field, type, ref):
            return URL(r=request, args=[field])

        rows = db.select(db.sometable.ALL)
        table = SQLTABLE(rows, linkto=mylink)

    This will link rows[id] to
        current_app/current_controlle/current_function/value_of_id
        
    New Implements: 24 June 2011:
    -----------------------------
    
    :param selectid: The id you want to select
    :param renderstyle: Boolean render the style with the table
    
    :param extracolums = [{'label':A('Extra',_href='#'),
                    'class': '', #class name of the header
                    'width':'', #width in pixels or %
                    'content':lambda row, rc: A('Edit',_href='edit/%s'%row.id),                     
                    'selected': False #agregate class selected to this column
                    }]
                    
                    
    :param headers = {'table.id':{'label':'Id',
                           'class':'', #class name of the header
                           'width':'', #width in pixels or %
                           'truncate': 16, #truncate the content to...
                           'selected': False #agregate class selected to this column
                           }, 
               'table.myfield':{'label':'My field',
                                'class':'', #class name of the header
                                'width':'', #width in pixels or %
                                'truncate': 16, #truncate the content to...
                                'selected': False #agregate class selected to this column
                                },
               }
               
    table = SQLTABLE(rows, headers=headers, extracolums=extracolums)


    """

    def __init__(
        self,
        sqlrows,
        linkto=None,
        upload=None,
        orderby=None,
        headers={},
        truncate=16,
        columns=None,        
        th_link='',
        extracolumns=None,
        selectid=None,
        renderstyle=False,
        **attributes
        ):

        TABLE.__init__(self, **attributes)
        self.components = []
        self.attributes = attributes
        self.sqlrows = sqlrows
        (components, row) = (self.components, [])
        if not sqlrows:
            return
        if not columns:
            columns = sqlrows.colnames
        if headers=='fieldname:capitalize':
            headers = {}
            for c in columns:
                headers[c] = ' '.join([w.capitalize() for w in c.split('.')[-1].split('_')])
        elif headers=='labels':
            headers = {}
            for c in columns:
                (t,f) = c.split('.')
                field = sqlrows.db[t][f]
                headers[c] = field.label
        if headers!=None:
            for c in columns:#new implement dict
                if isinstance(headers.get(c, c), dict):
                    coldict = headers.get(c, c)
                    attrcol = dict()
                    if coldict['width']!="":
                        attrcol.update(_width=coldict['width'])
                    if coldict['class']!="":
                        attrcol.update(_class=coldict['class'])
                    row.append(TH(coldict['label'],**attrcol))
                elif orderby:
                    row.append(TH(A(headers.get(c, c),
                                    _href=th_link+'?orderby=' + c)))
                else:
                    row.append(TH(headers.get(c, c)))
                    
            if extracolumns:#new implement dict
                for c in extracolumns:
                    attrcol = dict()
                    if c['width']!="":
                        attrcol.update(_width=c['width'])
                    if c['class']!="":
                        attrcol.update(_class=c['class'])
                    row.append(TH(c['label'],**attrcol))
                    
            components.append(THEAD(TR(*row)))
        

        tbody = []
        for (rc, record) in enumerate(sqlrows):
            row = []
            if rc % 2 == 0:
                _class = 'even'
            else:
                _class = 'odd'
                
            if selectid!=None:#new implement
                if record.id==selectid:
                    _class += ' rowselected'
                    
            for colname in columns:
                if not table_field.match(colname):
                    if "_extra" in record and colname in record._extra:
                        r = record._extra[colname]
                        row.append(TD(r))
                        continue
                    else:
                        raise KeyError("Column %s not found (SQLTABLE)" % colname)
                (tablename, fieldname) = colname.split('.')
                try:
                    field = sqlrows.db[tablename][fieldname]
                except KeyError:
                    field = None
                if tablename in record \
                        and isinstance(record,Row) \
                        and isinstance(record[tablename],Row):
                    r = record[tablename][fieldname]
                elif fieldname in record:
                    r = record[fieldname]
                else:
                    raise SyntaxError, 'something wrong in Rows object'
                r_old = r
                if not field:
                    pass
                elif linkto and field.type == 'id':
                    try:
                        href = linkto(r, 'table', tablename)
                    except TypeError:
                        href = '%s/%s/%s' % (linkto, tablename, r_old)
                    r = A(r, _href=href)
                elif field.type.startswith('reference'):
                    if linkto:
                        ref = field.type[10:]
                        try:
                            href = linkto(r, 'reference', ref)
                        except TypeError:
                            href = '%s/%s/%s' % (linkto, ref, r_old)
                            if ref.find('.') >= 0:
                                tref,fref = ref.split('.')
                                if hasattr(sqlrows.db[tref],'_primarykey'):
                                    href = '%s/%s?%s' % (linkto, tref, urllib.urlencode({fref:r}))
                        r = A(represent(field,r,record), _href=str(href))
                    elif field.represent:
                        r = represent(field,r,record)
                elif linkto and hasattr(field._table,'_primarykey') and fieldname in field._table._primarykey:
                    # have to test this with multi-key tables
                    key = urllib.urlencode(dict( [ \
                                ((tablename in record \
                                      and isinstance(record, Row) \
                                      and isinstance(record[tablename], Row)) and
                                 (k, record[tablename][k])) or (k, record[k]) \
                                    for k in field._table._primarykey ] ))
                    r = A(r, _href='%s/%s?%s' % (linkto, tablename, key))
                elif field.type.startswith('list:'):
                    r = represent(field,r or [],record)
                elif field.represent:
                    r = represent(field,r,record)
                elif field.type == 'blob' and r:
                    r = 'DATA'
                elif field.type == 'upload':
                    if upload and r:
                        r = A('file', _href='%s/%s' % (upload, r))
                    elif r:
                        r = 'file'
                    else:
                        r = ''
                elif field.type in ['string','text']:
                    r = str(field.formatter(r))
                    ur = unicode(r, 'utf8')                    
                    if headers!={}: #new implement dict
                        if isinstance(headers[colname],dict):
                            if isinstance(headers[colname]['truncate'], int) \
                                    and len(ur)>headers[colname]['truncate']:
                                r = ur[:headers[colname]['truncate'] - 3]
                                r = r.encode('utf8') + '...'
                    elif truncate!=None and len(ur) > truncate:
                        r = ur[:truncate - 3].encode('utf8') + '...'
                        
                attrcol = dict()#new implement dict
                if headers!={}:
                    if isinstance(headers[colname],dict):
                        colclass=headers[colname]['class']
                        if headers[colname]['selected']:
                            colclass= str(headers[colname]['class'] + " colselected").strip()
                        if colclass!="":
                            attrcol.update(_class=colclass)
                        
                row.append(TD(r,**attrcol))
                
            if extracolumns:#new implement dict
                for c in extracolumns:
                    attrcol = dict()
                    colclass=c['class']
                    if c['selected']:
                        colclass= str(c['class'] + " colselected").strip()
                    if colclass!="":
                        attrcol.update(_class=colclass)
                    contentfunc = c['content']
                    row.append(TD(contentfunc(record, rc),**attrcol))
                    
            tbody.append(TR(_class=_class, *row))
            
        if renderstyle:
            components.append(STYLE(self.style()))
        
        components.append(TBODY(*tbody))
        
    
    def style(self):
        
        css = '''
        table tbody tr.odd {
            background-color: #DFD;
        }
        table tbody tr.even {
            background-color: #EFE;
        }
        table tbody tr.rowselected {
            background-color: #FDD;
        }
        table tbody tr td.colselected {
            background-color: #FDD;
        }
        table tbody tr:hover {
            background: #DDF;
        }
        '''
        
        return css

form_factory = SQLFORM.factory # for backward compatibility, deprecated


Added gluon/storage.py version [01254dd1ce].

































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Provides:

- List; like list but returns None instead of IndexOutOfBounds
- Storage; like dictionary allowing also for `obj.foo` for `obj['foo']`
"""

import cPickle
import portalocker

__all__ = ['List', 'Storage', 'Settings', 'Messages',
           'StorageList', 'load_storage', 'save_storage']


class List(list):
    """
    Like a regular python list but a[i] if i is out of bounds return None
    instead of IndexOutOfBounds
    """

    def __call__(self, i, default=None):
        if 0<=i<len(self):
            return self[i]
        else:
            return default

class Storage(dict):

    """
    A Storage object is like a dictionary except `obj.foo` can be used
    in addition to `obj['foo']`.

        >>> o = Storage(a=1)
        >>> print o.a
        1

        >>> o['a']
        1

        >>> o.a = 2
        >>> print o['a']
        2

        >>> del o.a
        >>> print o.a
        None

    """

    def __getattr__(self, key):
        if key in self:
            return self[key]
        else:
            return None

    def __setattr__(self, key, value):
        if value == None:
            if key in self:
                del self[key]
        else:
            self[key] = value

    def __delattr__(self, key):
        if key in self:
            del self[key]
        else:
            raise AttributeError, "missing key=%s" % key

    def __repr__(self):
        return '<Storage ' + dict.__repr__(self) + '>'

    def __getstate__(self):
        return dict(self)

    def __setstate__(self, value):
        for (k, v) in value.items():
            self[k] = v

    def getlist(self, key):
        """Return a Storage value as a list.

        If the value is a list it will be returned as-is.
        If object is None, an empty list will be returned.
        Otherwise, [value] will be returned.

        Example output for a query string of ?x=abc&y=abc&y=def
        >>> request = Storage()
        >>> request.vars = Storage()
        >>> request.vars.x = 'abc'
        >>> request.vars.y = ['abc', 'def']
        >>> request.vars.getlist('x')
        ['abc']
        >>> request.vars.getlist('y')
        ['abc', 'def']
        >>> request.vars.getlist('z')
        []

        """
        value = self.get(key, None)
        if isinstance(value, (list, tuple)):
            return value
        elif value is None:
            return []
        return [value]

    def getfirst(self, key):
        """Return the first or only value when given a request.vars-style key.

        If the value is a list, its first item will be returned;
        otherwise, the value will be returned as-is.

        Example output for a query string of ?x=abc&y=abc&y=def
        >>> request = Storage()
        >>> request.vars = Storage()
        >>> request.vars.x = 'abc'
        >>> request.vars.y = ['abc', 'def']
        >>> request.vars.getfirst('x')
        'abc'
        >>> request.vars.getfirst('y')
        'abc'
        >>> request.vars.getfirst('z')

        """
        value = self.getlist(key)
        if len(value):
            return value[0]
        return None

    def getlast(self, key):
        """Returns the last or only single value when given a request.vars-style key.

        If the value is a list, the last item will be returned;
        otherwise, the value will be returned as-is.

        Simulated output with a query string of ?x=abc&y=abc&y=def
        >>> request = Storage()
        >>> request.vars = Storage()
        >>> request.vars.x = 'abc'
        >>> request.vars.y = ['abc', 'def']
        >>> request.vars.getlast('x')
        'abc'
        >>> request.vars.getlast('y')
        'def'
        >>> request.vars.getlast('z')

        """
        value = self.getlist(key)
        if len(value):
            return value[-1]
        return None

class StorageList(Storage):
    """
    like Storage but missing elements default to [] instead of None
    """
    def __getattr__(self, key):
        if key in self:
            return self[key]
        else:
            self[key] = []
            return self[key]

def load_storage(filename):
    fp = open(filename, 'rb')
    try:
        portalocker.lock(fp, portalocker.LOCK_EX)
        storage = cPickle.load(fp)
        portalocker.unlock(fp)
    finally:
        fp.close()
    return Storage(storage)


def save_storage(storage, filename):
    fp = open(filename, 'wb')
    try:
        portalocker.lock(fp, portalocker.LOCK_EX)
        cPickle.dump(dict(storage), fp)
        portalocker.unlock(fp)
    finally:
        fp.close()


class Settings(Storage):

    def __setattr__(self, key, value):
        if key != 'lock_keys' and self.get('lock_keys', None)\
             and not key in self:
            raise SyntaxError, 'setting key \'%s\' does not exist' % key
        if key != 'lock_values' and self.get('lock_values', None):
            raise SyntaxError, 'setting value cannot be changed: %s' % key
        self[key] = value


class Messages(Storage):

    def __init__(self, T):
        self['T'] = T

    def __setattr__(self, key, value):
        if key != 'lock_keys' and self.get('lock_keys', None)\
             and not key in self:
            raise SyntaxError, 'setting key \'%s\' does not exist' % key
        if key != 'lock_values' and self.get('lock_values', None):
            raise SyntaxError, 'setting value cannot be changed: %s' % key
        self[key] = value

    def __getattr__(self, key):
        value = self[key]
        if isinstance(value, str):
            return str(self['T'](value))
        return value

if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/streamer.py version [10f9ac82a7].














































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import os
import stat
import time
import re
import errno
import rewrite
from http import HTTP
from contenttype import contenttype


regex_start_range = re.compile('\d+(?=\-)')
regex_stop_range = re.compile('(?<=\-)\d+')

DEFAULT_CHUNK_SIZE = 64*1024

def streamer(stream, chunk_size = DEFAULT_CHUNK_SIZE, bytes = None):
    offset = 0
    while bytes == None or offset < bytes:
        if bytes != None and bytes - offset < chunk_size:
            chunk_size = bytes - offset
        data = stream.read(chunk_size)
        length = len(data)
        if not length:
            break
        else:
            yield data
        if length < chunk_size:
            break
        offset += length
    stream.close()

def stream_file_or_304_or_206(
    static_file,
    chunk_size = DEFAULT_CHUNK_SIZE,
    request = None,
    headers = {},
    error_message = None,
    ):
    if error_message is None:
        error_message = rewrite.thread.routes.error_message % 'invalid request'
    try:
        fp = open(static_file)
    except IOError, e:
        if e[0] == errno.EISDIR:
            raise HTTP(403, error_message, web2py_error='file is a directory')
        elif e[0] == errno.EACCES:
            raise HTTP(403, error_message, web2py_error='inaccessible file')
        else:
            raise HTTP(404, error_message, web2py_error='invalid file')
    else:
        fp.close()
    stat_file = os.stat(static_file)
    fsize = stat_file[stat.ST_SIZE]
    mtime = time.strftime('%a, %d %b %Y %H:%M:%S GMT',
                          time.gmtime(stat_file[stat.ST_MTIME]))
    headers['Content-Type'] = contenttype(static_file)
    headers['Last-Modified'] = mtime
    headers['Pragma'] = 'cache'
    headers['Cache-Control'] = 'private'

    if request and request.env.http_if_modified_since == mtime:
        raise HTTP(304, **{'Content-Type': headers['Content-Type']})

    elif request and request.env.http_range:
        start_items = regex_start_range.findall(request.env.http_range)
        if not start_items:
            start_items = [0]
        stop_items = regex_stop_range.findall(request.env.http_range)
        if not stop_items or int(stop_items[0]) > fsize - 1:
            stop_items = [fsize - 1]
        part = (int(start_items[0]), int(stop_items[0]), fsize)
        bytes = part[1] - part[0] + 1
        try:
            stream = open(static_file, 'rb')
        except IOError, e:
            if e[0] in (errno.EISDIR, errno.EACCES):
                raise HTTP(403)
            else:
                raise HTTP(404)
        stream.seek(part[0])
        headers['Content-Range'] = 'bytes %i-%i/%i' % part
        headers['Content-Length'] = '%i' % bytes
        status = 206
    else:
        try:
            stream = open(static_file, 'rb')
        except IOError, e:
            if e[0] in (errno.EISDIR, errno.EACCES):
                raise HTTP(403)
            else:
                raise HTTP(404)
        headers['Content-Length'] = fsize
        bytes = None
        status = 200
    if request and request.env.web2py_use_wsgi_file_wrapper:
        wrapped = request.env.wsgi_file_wrapper(stream, chunk_size)
    else:
        wrapped = streamer(stream, chunk_size=chunk_size, bytes=bytes)
    raise HTTP(status, wrapped, **headers)

Added gluon/template.py version [851c8388c4].




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework (Copyrighted, 2007-2011).
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Author: Thadeus Burgess

Contributors:

- Thank you to Massimo Di Pierro for creating the original gluon/template.py
- Thank you to Jonathan Lundell for extensively testing the regex on Jython.
- Thank you to Limodou (creater of uliweb) who inspired the block-element support for web2py.
"""

import os
import re
import cgi
import cStringIO
import logging
try:
    from restricted import RestrictedError
except:
    def RestrictedError(a,b,c):
        logging.error(str(a)+':'+str(b)+':'+str(c))
        return RuntimeError

class Node(object):
    """
    Basic Container Object
    """
    def __init__(self, value = None, pre_extend = False):
        self.value = value
        self.pre_extend = pre_extend

    def __str__(self):
        return str(self.value)

class SuperNode(Node):
    def __init__(self, name = '', pre_extend = False):
        self.name = name
        self.value = None
        self.pre_extend = pre_extend

    def __str__(self):
        if self.value:
            return str(self.value)
        else:
            raise SyntaxError("Undefined parent block ``%s``. \n" % self.name + \
"You must define a block before referencing it.\nMake sure you have not left out an ``{{end}}`` tag." )

    def __repr__(self):
        return "%s->%s" % (self.name, self.value)

class BlockNode(Node):
    """
    Block Container.

    This Node can contain other Nodes and will render in a hierarchical order
    of when nodes were added.

    ie::

        {{ block test }}
            This is default block test
        {{ end }}
    """
    def __init__(self, name = '', pre_extend = False, delimiters = ('{{','}}')):
        """
        name - Name of this Node.
        """
        self.nodes = []
        self.name = name
        self.pre_extend = pre_extend
        self.left, self.right = delimiters

    def __repr__(self):
        lines = ['%sblock %s%s' % (self.left,self.name,self.right)]
        for node in self.nodes:
            lines.append(str(node))
        lines.append('%send%s' % (self.left, self.right))
        return ''.join(lines)

    def __str__(self):
        """
        Get this BlockNodes content, not including child Nodes
        """
        lines = []
        for node in self.nodes:
            if not isinstance(node, BlockNode):
                lines.append(str(node))
        return ''.join(lines)

    def append(self, node):
        """
        Add an element to the nodes.

        Keyword Arguments

        - node -- Node object or string to append.
        """
        if isinstance(node, str) or isinstance(node, Node):
            self.nodes.append(node)
        else:
            raise TypeError("Invalid type; must be instance of ``str`` or ``BlockNode``. %s" % node)

    def extend(self, other):
        """
        Extend the list of nodes with another BlockNode class.

        Keyword Arguments

        - other -- BlockNode or Content object to extend from.
        """
        if isinstance(other, BlockNode):
            self.nodes.extend(other.nodes)
        else:
            raise TypeError("Invalid type; must be instance of ``BlockNode``. %s" % other)

    def output(self, blocks):
        """
        Merges all nodes into a single string.

        blocks -- Dictionary of blocks that are extending
        from this template.
        """
        lines = []
        # Get each of our nodes
        for node in self.nodes:
            # If we have a block level node.
            if isinstance(node, BlockNode):
                # If we can override this block.
                if node.name in blocks:
                    # Override block from vars.
                    lines.append(blocks[node.name].output(blocks))
                # Else we take the default
                else:
                    lines.append(node.output(blocks))
            # Else its just a string
            else:
                lines.append(str(node))
        # Now combine all of our lines together.
        return ''.join(lines)

class Content(BlockNode):
    """
    Parent Container -- Used as the root level BlockNode.

    Contains functions that operate as such.
    """
    def __init__(self, name = "ContentBlock", pre_extend = False):
        """
        Keyword Arguments

        name -- Unique name for this BlockNode
        """
        self.name = name
        self.nodes = []
        self.blocks = {}
        self.pre_extend = pre_extend

    def __str__(self):
        lines = []
        # For each of our nodes
        for node in self.nodes:
            # If it is a block node.
            if isinstance(node, BlockNode):
                # And the node has a name that corresponds with a block in us
                if node.name in self.blocks:
                    # Use the overriding output.
                    lines.append(self.blocks[node.name].output(self.blocks))
                else:
                    # Otherwise we just use the nodes output.
                    lines.append(node.output(self.blocks))
            else:
                # It is just a string, so include it.
                lines.append(str(node))
        # Merge our list together.
        return ''.join(lines)

    def _insert(self, other, index = 0):
        """
        Inserts object at index.
        """
        if isinstance(other, str) or isinstance(other, Node):
            self.nodes.insert(index, other)
        else:
            raise TypeError("Invalid type, must be instance of ``str`` or ``Node``.")

    def insert(self, other, index = 0):
        """
        Inserts object at index.

        You may pass a list of objects and have them inserted.
        """
        if isinstance(other, (list, tuple)):
            # Must reverse so the order stays the same.
            other.reverse()
            for item in other:
                self._insert(item, index)
        else:
            self._insert(other, index)

    def append(self, node):
        """
        Adds a node to list. If it is a BlockNode then we assign a block for it.
        """
        if isinstance(node, str) or isinstance(node, Node):
            self.nodes.append(node)
            if isinstance(node, BlockNode):
                self.blocks[node.name] = node
        else:
            raise TypeError("Invalid type, must be instance of ``str`` or ``BlockNode``. %s" % node)

    def extend(self, other):
        """
        Extends the objects list of nodes with another objects nodes
        """
        if isinstance(other, BlockNode):
            self.nodes.extend(other.nodes)
            self.blocks.update(other.blocks)
        else:
            raise TypeError("Invalid type; must be instance of ``BlockNode``. %s" % other)

    def clear_content(self):
        self.nodes = []

class TemplateParser(object):

    r_tag = re.compile(r'(\{\{.*?\}\})', re.DOTALL)

    r_multiline = re.compile(r'(""".*?""")|(\'\'\'.*?\'\'\')', re.DOTALL)

    # These are used for re-indentation.
    # Indent + 1
    re_block = re.compile('^(elif |else:|except:|except |finally:).*$',
                      re.DOTALL)
    # Indent - 1
    re_unblock = re.compile('^(return|continue|break|raise)( .*)?$', re.DOTALL)
    # Indent - 1
    re_pass = re.compile('^pass( .*)?$', re.DOTALL)

    def __init__(self, text,
                 name    = "ParserContainer",
                 context = dict(),
                 path    = 'views/',
                 writer  = 'response.write',
                 lexers  = {},
                 delimiters = ('{{','}}'),
                 _super_nodes = [],
                 ):
        """
        text -- text to parse
        context -- context to parse in
        path -- folder path to templates
        writer -- string of writer class to use
        lexers -- dict of custom lexers to use.
        delimiters -- for example ('{{','}}')
        _super_nodes -- a list of nodes to check for inclusion
                        this should only be set by "self.extend"
                        It contains a list of SuperNodes from a child
                        template that need to be handled.
        """

        # Keep a root level name.
        self.name = name
        # Raw text to start parsing.
        self.text = text
        # Writer to use (refer to the default for an example).
        # This will end up as
        # "%s(%s, escape=False)" % (self.writer, value)
        self.writer = writer

        # Dictionary of custom name lexers to use.
        if isinstance(lexers, dict):
            self.lexers = lexers
        else:
            self.lexers = {}

        # Path of templates
        self.path = path
        # Context for templates.
        self.context = context

        # allow optional alternative delimiters
        self.delimiters = delimiters
        if delimiters!=('{{','}}'):
            escaped_delimiters = (re.escape(delimiters[0]),re.escape(delimiters[1]))
            self.r_tag = re.compile(r'(%s.*?%s)' % escaped_delimiters, re.DOTALL)


        # Create a root level Content that everything will go into.
        self.content = Content(name=name)

        # Stack will hold our current stack of nodes.
        # As we descend into a node, it will be added to the stack
        # And when we leave, it will be removed from the stack.
        # self.content should stay on the stack at all times.
        self.stack = [self.content]

        # This variable will hold a reference to every super block
        # that we come across in this template.
        self.super_nodes = []

        # This variable will hold a reference to the child
        # super nodes that need handling.
        self.child_super_nodes = _super_nodes

        # This variable will hold a reference to every block
        # that we come across in this template
        self.blocks = {}

        # Begin parsing.
        self.parse(text)

    def to_string(self):
        """
        Return the parsed template with correct indentation.

        Used to make it easier to port to python3.
        """
        return self.reindent(str(self.content))

    def __str__(self):
        "Make sure str works exactly the same as python 3"
        return self.to_string()

    def __unicode__(self):
        "Make sure str works exactly the same as python 3"
        return self.to_string()

    def reindent(self, text):
        """
        Reindents a string of unindented python code.
        """

        # Get each of our lines into an array.
        lines = text.split('\n')

        # Our new lines
        new_lines = []

        # Keeps track of how many indents we have.
        # Used for when we need to drop a level of indentation
        # only to reindent on the next line.
        credit = 0

        # Current indentation
        k = 0

        #################
        # THINGS TO KNOW
        #################

        # k += 1 means indent
        # k -= 1 means unindent
        # credit = 1 means unindent on the next line.

        for raw_line in lines:
            line = raw_line.strip()

            # ignore empty lines
            if not line:
                continue

            # If we have a line that contains python code that
            # should be unindented for this line of code.
            # and then reindented for the next line.
            if TemplateParser.re_block.match(line):
                k = k + credit - 1

            # We obviously can't have a negative indentation
            k = max(k,0)

            # Add the indentation!
            new_lines.append(' '*(4*k)+line)

            # Bank account back to 0 again :(
            credit = 0

            # If we are a pass block, we obviously de-dent.
            if TemplateParser.re_pass.match(line):
                k -= 1

            # If we are any of the following, de-dent.
            # However, we should stay on the same level
            # But the line right after us will be de-dented.
            # So we add one credit to keep us at the level
            # while moving back one indentation level.
            if TemplateParser.re_unblock.match(line):
                credit = 1
                k -= 1

            # If we are an if statement, a try, or a semi-colon we
            # probably need to indent the next line.
            if line.endswith(':') and not line.startswith('#'):
                k += 1

        # This must come before so that we can raise an error with the
        # right content.
        new_text = '\n'.join(new_lines)

        if k > 0:
            self._raise_error('missing "pass" in view', new_text)
        elif k < 0:
            self._raise_error('too many "pass" in view', new_text)

        return new_text

    def _raise_error(self, message='', text=None):
        """
        Raise an error using itself as the filename and textual content.
        """
        raise RestrictedError(self.name, text or self.text, message)

    def _get_file_text(self, filename):
        """
        Attempt to open ``filename`` and retrieve its text.

        This will use self.path to search for the file.
        """

        # If they didn't specify a filename, how can we find one!
        if not filename.strip():
            self._raise_error('Invalid template filename')

        # Get the filename; filename looks like ``"template.html"``.
        # We need to eval to remove the quotes and get the string type.
        filename = eval(filename, self.context)

        # Get the path of the file on the system.
        filepath = os.path.join(self.path, filename)

        # try to read the text.
        try:
            fileobj = open(filepath, 'rb')
            text = fileobj.read()
            fileobj.close()
        except IOError:
            self._raise_error('Unable to open included view file: ' + filepath)

        return text

    def include(self, content, filename):
        """
        Include ``filename`` here.
        """
        text = self._get_file_text(filename)

        t = TemplateParser(text,
                           name    = filename,
                           context = self.context,
                           path    = self.path,
                           writer  = self.writer,
                           delimiters = self.delimiters)

        content.append(t.content)

    def extend(self, filename):
        """
        Extend ``filename``. Anything not declared in a block defined by the
        parent will be placed in the parent templates ``{{include}}`` block.
        """
        text = self._get_file_text(filename)

        # Create out nodes list to send to the parent
        super_nodes = []
        # We want to include any non-handled nodes.
        super_nodes.extend(self.child_super_nodes)
        # And our nodes as well.
        super_nodes.extend(self.super_nodes)

        t = TemplateParser(text,
                    name         = filename,
                    context      = self.context,
                    path         = self.path,
                    writer       = self.writer,
                    delimiters   = self.delimiters,
                    _super_nodes = super_nodes)

        # Make a temporary buffer that is unique for parent
        # template.
        buf = BlockNode(name='__include__' + filename, delimiters=self.delimiters)
        pre = []

        # Iterate through each of our nodes
        for node in self.content.nodes:
            # If a node is a block
            if isinstance(node, BlockNode):
                # That happens to be in the parent template
                if node.name in t.content.blocks:
                    # Do not include it
                    continue

            if isinstance(node, Node):
                # Or if the node was before the extension
                # we should not include it
                if node.pre_extend:
                    pre.append(node)
                    continue

            # Otherwise, it should go int the
            # Parent templates {{include}} section.
                buf.append(node)
            else:
                buf.append(node)

        # Clear our current nodes. We will be replacing this with
        # the parent nodes.
        self.content.nodes = []

        # Set our include, unique by filename
        t.content.blocks['__include__' + filename] = buf

        # Make sure our pre_extended nodes go first
        t.content.insert(pre)

        # Then we extend our blocks
        t.content.extend(self.content)

        # Work off the parent node.
        self.content = t.content

    def parse(self, text):

        # Basically, r_tag.split will split the text into
        # an array containing, 'non-tag', 'tag', 'non-tag', 'tag'
        # so if we alternate this variable, we know
        # what to look for. This is alternate to
        # line.startswith("{{")
        in_tag = False
        extend = None
        pre_extend = True

        # Use a list to store everything in
        # This is because later the code will "look ahead"
        # for missing strings or brackets.
        ij = self.r_tag.split(text)
        # j = current index
        # i = current item
        for j in range(len(ij)):
            i = ij[j]

            if i:
                if len(self.stack) == 0:
                    self._raise_error('The "end" tag is unmatched, please check if you have a starting "block" tag')

                # Our current element in the stack.
                top = self.stack[-1]

                if in_tag:
                    line = i

                    # If we are missing any strings!!!!
                    # This usually happens with the following example
                    # template code
                    #
                    # {{a = '}}'}}
                    # or
                    # {{a = '}}blahblah{{'}}
                    #
                    # This will fix these
                    # This is commented out because the current template
                    # system has this same limitation. Since this has a
                    # performance hit on larger templates, I do not recommend
                    # using this code on production systems. This is still here
                    # for "i told you it *can* be fixed" purposes.
                    #
                    #
#                    if line.count("'") % 2 != 0 or line.count('"') % 2 != 0:
#
#                        # Look ahead
#                        la = 1
#                        nextline = ij[j+la]
#
#                        # As long as we have not found our ending
#                        # brackets keep going
#                        while '}}' not in nextline:
#                            la += 1
#                            nextline += ij[j+la]
#                            # clear this line, so we
#                            # don't attempt to parse it
#                            # this is why there is an "if i"
#                            # around line 530
#                            ij[j+la] = ''
#
#                        # retrieve our index.
#                        index = nextline.index('}}')
#
#                        # Everything before the new brackets
#                        before = nextline[:index+2]
#
#                        # Everything after
#                        after = nextline[index+2:]
#
#                        # Make the next line everything after
#                        # so it parses correctly, this *should* be
#                        # all html
#                        ij[j+1] = after
#
#                        # Add everything before to the current line
#                        line += before

                    # Get rid of '{{' and '}}'
                    line = line[2:-2].strip()

                    # This is bad juju, but let's do it anyway
                    if not line:
                        continue

                    # We do not want to replace the newlines in code,
                    # only in block comments.
                    def remove_newline(re_val):
                        # Take the entire match and replace newlines with
                        # escaped newlines.
                        return re_val.group(0).replace('\n', '\\n')

                    # Perform block comment escaping.
                    # This performs escaping ON anything
                    # in between """ and """
                    line = re.sub(TemplateParser.r_multiline,
                                remove_newline,
                                line)

                    if line.startswith('='):
                        # IE: {{=response.title}}
                        name, value = '=', line[1:].strip()
                    else:
                        v = line.split(' ', 1)
                        if len(v) == 1:
                            # Example
                            # {{ include }}
                            # {{ end }}
                            name = v[0]
                            value = ''
                        else:
                            # Example
                            # {{ block pie }}
                            # {{ include "layout.html" }}
                            # {{ for i in range(10): }}
                            name = v[0]
                            value = v[1]

                    # This will replace newlines in block comments
                    # with the newline character. This is so that they
                    # retain their formatting, but squish down to one
                    # line in the rendered template.

                    # First check if we have any custom lexers
                    if name in self.lexers:
                        # Pass the information to the lexer
                        # and allow it to inject in the environment

                        # You can define custom names such as
                        # '{{<<variable}}' which could potentially
                        # write unescaped version of the variable.
                        self.lexers[name](parser    = self,
                                          value     = value,
                                          top       = top,
                                          stack     = self.stack,)

                    elif name == '=':
                        # So we have a variable to insert into
                        # the template
                        buf = "\n%s(%s)" % (self.writer, value)
                        top.append(Node(buf, pre_extend = pre_extend))

                    elif name == 'block' and not value.startswith('='):
                        # Make a new node with name.
                        node = BlockNode(name = value.strip(),
                                         pre_extend = pre_extend,
                                         delimiters = self.delimiters)

                        # Append this node to our active node
                        top.append(node)

                        # Make sure to add the node to the stack.
                        # so anything after this gets added
                        # to this node. This allows us to
                        # "nest" nodes.
                        self.stack.append(node)

                    elif name == 'end' and not value.startswith('='):
                        # We are done with this node.

                        # Save an instance of it
                        self.blocks[top.name] = top

                        # Pop it.
                        self.stack.pop()

                    elif name == 'super' and not value.startswith('='):
                        # Get our correct target name
                        # If they just called {{super}} without a name
                        # attempt to assume the top blocks name.
                        if value:
                            target_node = value
                        else:
                            target_node = top.name

                        # Create a SuperNode instance
                        node = SuperNode(name = target_node,
                                            pre_extend = pre_extend)

                        # Add this to our list to be taken care of
                        self.super_nodes.append(node)

                        # And put in in the tree
                        top.append(node)

                    elif name == 'include' and not value.startswith('='):
                        # If we know the target file to include
                        if value:
                            self.include(top, value)

                        # Otherwise, make a temporary include node
                        # That the child node will know to hook into.
                        else:
                            include_node = BlockNode(name = '__include__' + self.name,
                                                     pre_extend = pre_extend,
                                                     delimiters = self.delimiters)
                            top.append(include_node)

                    elif name == 'extend' and not value.startswith('='):
                        # We need to extend the following
                        # template.
                        extend = value
                        pre_extend = False

                    else:
                        # If we don't know where it belongs
                        # we just add it anyways without formatting.
                        if line and in_tag:

                            # Split on the newlines >.<
                            tokens = line.split('\n')

                            # We need to look for any instances of
                            # for i in range(10):
                            #   = i
                            # pass
                            # So we can properly put a response.write() in place.
                            continuation = False
                            len_parsed = 0
                            for k in range(len(tokens)):

                                tokens[k] = tokens[k].strip()
                                len_parsed += len(tokens[k])

                                if tokens[k].startswith('='):
                                    if tokens[k].endswith('\\'):
                                        continuation = True
                                        tokens[k] = "\n%s(%s" % (self.writer, tokens[k][1:].strip())
                                    else:
                                        tokens[k] = "\n%s(%s)" % (self.writer, tokens[k][1:].strip())
                                elif continuation:
                                    tokens[k] += ')'
                                    continuation = False


                            buf = "\n%s" % '\n'.join(tokens)
                            top.append(Node(buf, pre_extend = pre_extend))

                else:
                    # It is HTML so just include it.
                    buf = "\n%s(%r, escape=False)" % (self.writer, i)
                    top.append(Node(buf, pre_extend = pre_extend))

            # Remember: tag, not tag, tag, not tag
            in_tag = not in_tag

        # Make a list of items to remove from child
        to_rm = []

        # Go through each of the children nodes
        for node in self.child_super_nodes:
            # If we declared a block that this node wants to include
            if node.name in self.blocks:
                # Go ahead and include it!
                node.value = self.blocks[node.name]
                # Since we processed this child, we don't need to
                # pass it along to the parent
                to_rm.append(node)

        # Remove some of the processed nodes
        for node in to_rm:
            # Since this is a pointer, it works beautifully.
            # Sometimes I miss C-Style pointers... I want my asterisk...
            self.child_super_nodes.remove(node)

        # If we need to extend a template.
        if extend:
            self.extend(extend)

# We need this for integration with gluon
def parse_template(filename,
                   path    = 'views/',
                   context = dict(),
                   lexers  = {},
                   delimiters = ('{{','}}')
                   ):
    """
    filename can be a view filename in the views folder or an input stream
    path is the path of a views folder
    context is a dictionary of symbols used to render the template
    """

    # First, if we have a str try to open the file
    if isinstance(filename, str):
        try:
            fp = open(os.path.join(path, filename), 'rb')
            text = fp.read()
            fp.close()
        except IOError:
            raise RestrictedError(filename, '', 'Unable to find the file')
    else:
        text = filename.read()

    # Use the file contents to get a parsed template and return it.
    return str(TemplateParser(text, context=context, path=path, lexers=lexers, delimiters=delimiters))

def get_parsed(text):
    """
    Returns the indented python code of text. Useful for unit testing.

    """
    return str(TemplateParser(text))

# And this is a generic render function.
# Here for integration with gluon.
def render(content = "hello world",
           stream = None,
           filename = None,
           path = None,
           context = {},
           lexers  = {},
           delimiters = ('{{','}}')
           ):
    """
    >>> render()
    'hello world'
    >>> render(content='abc')
    'abc'
    >>> render(content='abc\\'')
    "abc'"
    >>> render(content='a"\\'bc')
    'a"\\'bc'
    >>> render(content='a\\nbc')
    'a\\nbc'
    >>> render(content='a"bcd"e')
    'a"bcd"e'
    >>> render(content="'''a\\nc'''")
    "'''a\\nc'''"
    >>> render(content="'''a\\'c'''")
    "'''a\'c'''"
    >>> render(content='{{for i in range(a):}}{{=i}}<br />{{pass}}', context=dict(a=5))
    '0<br />1<br />2<br />3<br />4<br />'
    >>> render(content='{%for i in range(a):%}{%=i%}<br />{%pass%}', context=dict(a=5),delimiters=('{%','%}'))
    '0<br />1<br />2<br />3<br />4<br />'
    >>> render(content="{{='''hello\\nworld'''}}")
    'hello\\nworld'
    >>> render(content='{{for i in range(3):\\n=i\\npass}}')
    '012'
    """
    # Here to avoid circular Imports
    try:
        from globals import Response
    except:
        # Working standalone. Build a mock Response object.
        class Response():
            def __init__(self):
                self.body = cStringIO.StringIO()
            def write(self, data, escape=True):
                if not escape:
                    self.body.write(str(data))
                elif hasattr(data,'xml') and callable(data.xml):
                    self.body.write(data.xml())
                else:
                    # make it a string
                    if not isinstance(data, (str, unicode)):
                        data = str(data)
                    elif isinstance(data, unicode):
                        data = data.encode('utf8', 'xmlcharrefreplace')
                    data = cgi.escape(data, True).replace("'","&#x27;")
                    self.body.write(data)

        # A little helper to avoid escaping.
        class NOESCAPE():
            def __init__(self, text):
                self.text = text
            def xml(self):
                return self.text
        # Add it to the context so we can use it.
        context['NOESCAPE'] = NOESCAPE

    # If we don't have anything to render, why bother?
    if not content and not stream and not filename:
        raise SyntaxError, "Must specify a stream or filename or content"

    # Here for legacy purposes, probably can be reduced to something more simple.
    close_stream = False
    if not stream:
        if filename:
            stream = open(filename, 'rb')
            close_stream = True
        elif content:
            stream = cStringIO.StringIO(content)

    # Get a response class.
    context['response'] = Response()

    # Execute the template.
    code = str(TemplateParser(stream.read(), context=context, path=path, lexers=lexers, delimiters=delimiters))
    try:
        exec(code) in context
    except Exception:
        # for i,line in enumerate(code.split('\n')): print i,line
        raise

    if close_stream:
        stream.close()

    # Returned the rendered content.
    return context['response'].body.getvalue()


if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/tests/__init__.py version [adc83b19e7].


1
+

Added gluon/tests/test.sh version [e89726c191].














































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/sh
#
#  run unit tests under nose if available,
#  optionally with coverage
#
#  test.sh [cover [gluon.rewrite]]
#
#  easy_install nose
#  easy_install coverage
#
NOSETESTS=nosetests
COVER=gluon		# change to (eg) gluon.rewrite to collect coverage stats on a single module
PROCESSES=4

WHICH=`which $NOSETESTS`
if [ "$WHICH" == "" ]; then
	# if nose isn't available, run the tests directly
	for testmod in test_*.py; do
		python $testmod
	done
else
	if [ "$1" = "cover" ]; then
		# note: coverage doesn't handle multiple processes
		if [ "$2" != "" ]; then
			COVER=$2
		fi
		$NOSETESTS --with-coverage --cover-package=$COVER --cover-erase
	elif [ "$1" = "doctest" ]; then
		# this has to run in gluon's parent; needs work
		#
		# the problem is that doctests run this way have a very different environment,
		# apparently due to imports that don't happen in the normal course of running
		# doctest via __main__.
		#
		echo doctest not supported >&2
		exit 1
		if [ ! -d gluon ]; then
			cd ../..
		fi
		$NOSETESTS --with-doctest
	else
		$NOSETESTS --processes=$PROCESSES
	fi
fi

Added gluon/tests/test_dal.py version [ace25276bd].







































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    Unit tests for gluon.sql
"""

import sys
import os
if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon'))
else:
    sys.path.append(os.path.realpath('../'))

import unittest
import datetime
from dal import DAL, Field, Table, SQLALL

ALLOWED_DATATYPES = [
    'string',
    'text',
    'integer',
    'boolean',
    'double',
    'blob',
    'date',
    'time',
    'datetime',
    'upload',
    'password',
    ]


def setUpModule():
    pass

def tearDownModule():
    if os.path.isfile('sql.log'):
        os.unlink('sql.log')


class TestFields(unittest.TestCase):

    def testFieldName(self):

        # Check that Fields cannot start with underscores
        self.assertRaises(SyntaxError, Field, '_abc', 'string')

        # Check that Fields cannot contain punctuation other than underscores
        self.assertRaises(SyntaxError, Field, 'a.bc', 'string')

        # Check that Fields cannot be a name of a method or property of Table
        for x in ['drop', 'on', 'truncate']:
            self.assertRaises(SyntaxError, Field, x, 'string')

        # Check that Fields allows underscores in the body of a field name.
        self.assert_(Field('a_bc', 'string'),
            "Field isn't allowing underscores in fieldnames.  It should.")

    def testFieldTypes(self):

        # Check that string, text, and password default length is 512
        for typ in ['string', 'password']:
            self.assert_(Field('abc', typ).length == 512,
                         "Default length for type '%s' is not 512 or 255" % typ)

        # Check that upload default length is 512
        self.assert_(Field('abc', 'upload').length == 512,
                     "Default length for type 'upload' is not 128")

        # Check that Tables passed in the type creates a reference
        self.assert_(Field('abc', Table(None, 'temp')).type
                      == 'reference temp',
                     'Passing an Table does not result in a reference type.')

    def testFieldLabels(self):

        # Check that a label is successfully built from the supplied fieldname
        self.assert_(Field('abc', 'string').label == 'Abc',
                     'Label built is incorrect')
        self.assert_(Field('abc_def', 'string').label == 'Abc Def',
                     'Label built is incorrect')

    def testFieldFormatters(self):  # Formatter should be called Validator

        # Test the default formatters
        for typ in ALLOWED_DATATYPES:
            f = Field('abc', typ)
            if typ not in ['date', 'time', 'datetime']:
                isinstance(f.formatter('test'), str)
            else:
                isinstance(f.formatter(datetime.datetime.now()), str)

    def testRun(self):
        db = DAL('sqlite:memory:')
        for ft in ['string', 'text', 'password', 'upload', 'blob']:
            db.define_table('t', Field('a', ft, default=''))
            self.assertEqual(db.t.insert(a='x'), 1)
            self.assertEqual(db().select(db.t.a)[0].a, 'x')
            db.t.drop()
        db.define_table('t', Field('a', 'integer', default=1))
        self.assertEqual(db.t.insert(a=3), 1)
        self.assertEqual(db().select(db.t.a)[0].a, 3)
        db.t.drop()
        db.define_table('t', Field('a', 'double', default=1))
        self.assertEqual(db.t.insert(a=3.1), 1)
        self.assertEqual(db().select(db.t.a)[0].a, 3.1)
        db.t.drop()
        db.define_table('t', Field('a', 'boolean', default=True))
        self.assertEqual(db.t.insert(a=True), 1)
        self.assertEqual(db().select(db.t.a)[0].a, True)
        db.t.drop()
        db.define_table('t', Field('a', 'date',
                        default=datetime.date.today()))
        t0 = datetime.date.today()
        self.assertEqual(db.t.insert(a=t0), 1)
        self.assertEqual(db().select(db.t.a)[0].a, t0)
        db.t.drop()
        db.define_table('t', Field('a', 'datetime',
                        default=datetime.datetime.today()))
        t0 = datetime.datetime(
            1971,
            12,
            21,
            10,
            30,
            55,
            0,
            )
        self.assertEqual(db.t.insert(a=t0), 1)
        self.assertEqual(db().select(db.t.a)[0].a, t0)
        db.t.drop()
        db.define_table('t', Field('a', 'time', default='11:30'))
        t0 = datetime.time(10, 30, 55)
        self.assertEqual(db.t.insert(a=t0), 1)
        self.assertEqual(db().select(db.t.a)[0].a, t0)
        db.t.drop()


class TestAll(unittest.TestCase):

    def setUp(self):
        self.pt = Table(None,'PseudoTable',Field('name'),Field('birthdate'))

    def testSQLALL(self):
        ans = 'PseudoTable.id, PseudoTable.name, PseudoTable.birthdate'
        self.assertEqual(str(SQLALL(self.pt)), ans)


class TestTable(unittest.TestCase):

    def testTableCreation(self):

        # Check for error when not passing type other than Field or Table

        self.assertRaises(SyntaxError, Table, None, 'test', None)

        persons = Table(None, 'persons',
                        Field('firstname','string'), 
                        Field('lastname', 'string'))
        
        # Does it have the correct fields?

        self.assert_(set(persons.fields).issuperset(set(['firstname',
                                                         'lastname'])))

        # ALL is set correctly

        self.assert_('persons.firstname, persons.lastname'
                      in str(persons.ALL))

    def testTableAlias(self):
        db = DAL('sqlite:memory:')
        persons = Table(db, 'persons', Field('firstname',
                           'string'), Field('lastname', 'string'))
        aliens = persons.with_alias('aliens')

        # Are the different table instances with the same fields

        self.assert_(persons is not aliens)
        self.assert_(set(persons.fields) == set(aliens.fields))

    def testTableInheritance(self):
        persons = Table(None, 'persons', Field('firstname',
                           'string'), Field('lastname', 'string'))
        customers = Table(None, 'customers',
                             Field('items_purchased', 'integer'),
                             persons)
        self.assert_(set(customers.fields).issuperset(set(
            ['items_purchased', 'firstname', 'lastname'])))


class TestInsert(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        self.assertEqual(db.t.insert(a='1'), 1)
        self.assertEqual(db.t.insert(a='1'), 2)
        self.assertEqual(db.t.insert(a='1'), 3)
        self.assertEqual(db(db.t.a == '1').count(), 3)
        self.assertEqual(db(db.t.a == '1').update(a='2'), 3)
        self.assertEqual(db(db.t.a == '2').count(), 3)
        self.assertEqual(db(db.t.a == '2').delete(), 3)
        db.t.drop()


class TestSelect(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        self.assertEqual(db.t.insert(a='1'), 1)
        self.assertEqual(db.t.insert(a='2'), 2)
        self.assertEqual(db.t.insert(a='3'), 3)
        self.assertEqual(len(db(db.t.id > 0).select()), 3)
        self.assertEqual(db(db.t.id > 0).select(orderby=~db.t.a
                          | db.t.id)[0].a, '3')
        self.assertEqual(len(db(db.t.id > 0).select(limitby=(1, 2))), 1)
        self.assertEqual(db(db.t.id > 0).select(limitby=(1, 2))[0].a,
                         '2')
        self.assertEqual(len(db().select(db.t.ALL)), 3)
        self.assertEqual(len(db(db.t.a == None).select()), 0)
        self.assertEqual(len(db(db.t.a != None).select()), 3)
        self.assertEqual(len(db(db.t.a > '1').select()), 2)
        self.assertEqual(len(db(db.t.a >= '1').select()), 3)
        self.assertEqual(len(db(db.t.a == '1').select()), 1)
        self.assertEqual(len(db(db.t.a != '1').select()), 2)
        self.assertEqual(len(db(db.t.a < '3').select()), 2)
        self.assertEqual(len(db(db.t.a <= '3').select()), 3)
        self.assertEqual(len(db(db.t.a > '1')(db.t.a < '3').select()), 1)
        self.assertEqual(len(db((db.t.a > '1') & (db.t.a < '3')).select()), 1)
        self.assertEqual(len(db((db.t.a > '1') | (db.t.a < '3')).select()), 3)
        self.assertEqual(len(db((db.t.a > '1') & ~(db.t.a > '2')).select()), 1)
        self.assertEqual(len(db(~(db.t.a > '1') & (db.t.a > '2')).select()), 0)
        db.t.drop()


class TestBelongs(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        self.assertEqual(db.t.insert(a='1'), 1)
        self.assertEqual(db.t.insert(a='2'), 2)
        self.assertEqual(db.t.insert(a='3'), 3)
        self.assertEqual(len(db(db.t.a.belongs(('1', '3'))).select()),
                         2)
        self.assertEqual(len(db(db.t.a.belongs(db(db.t.id
                          > 2)._select(db.t.a))).select()), 1)
        self.assertEqual(len(db(db.t.a.belongs(db(db.t.a.belongs(('1',
                         '3')))._select(db.t.a))).select()), 2)
        self.assertEqual(len(db(db.t.a.belongs(db(db.t.a.belongs(db
                         (db.t.a.belongs(('1', '3')))._select(db.t.a)))._select(
                         db.t.a))).select()),
                         2)
        db.t.drop()


class TestLike(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        self.assertEqual(db.t.insert(a='abc'), 1)
        self.assertEqual(len(db(db.t.a.like('a%')).select()), 1)
        self.assertEqual(len(db(db.t.a.like('%b%')).select()), 1)
        self.assertEqual(len(db(db.t.a.like('%c')).select()), 1)
        self.assertEqual(len(db(db.t.a.like('%d%')).select()), 0)
        self.assertEqual(len(db(db.t.a.lower().like('A%')).select()), 1)
        self.assertEqual(len(db(db.t.a.lower().like('%B%')).select()),
                         1)
        self.assertEqual(len(db(db.t.a.lower().like('%C')).select()), 1)
        self.assertEqual(len(db(db.t.a.upper().like('A%')).select()), 1)
        self.assertEqual(len(db(db.t.a.upper().like('%B%')).select()),
                         1)
        self.assertEqual(len(db(db.t.a.upper().like('%C')).select()), 1)
        db.t.drop()


class TestDatetime(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a', 'datetime'))
        self.assertEqual(db.t.insert(a=datetime.datetime(1971, 12, 21,
                         11, 30)), 1)
        self.assertEqual(db.t.insert(a=datetime.datetime(1971, 11, 21,
                         10, 30)), 2)
        self.assertEqual(db.t.insert(a=datetime.datetime(1970, 12, 21,
                         9, 30)), 3)
        self.assertEqual(len(db(db.t.a == datetime.datetime(1971, 12,
                         21, 11, 30)).select()), 1)
        self.assertEqual(len(db(db.t.a.year() == 1971).select()), 2)
        self.assertEqual(len(db(db.t.a.month() == 12).select()), 2)
        self.assertEqual(len(db(db.t.a.day() == 21).select()), 3)
        self.assertEqual(len(db(db.t.a.hour() == 11).select()), 1)
        self.assertEqual(len(db(db.t.a.minutes() == 30).select()), 3)
        self.assertEqual(len(db(db.t.a.seconds() == 0).select()), 3)
        db.t.drop()


class TestExpressions(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a', 'integer'))
        self.assertEqual(db.t.insert(a=1), 1)
        self.assertEqual(db.t.insert(a=2), 2)
        self.assertEqual(db.t.insert(a=3), 3)
        self.assertEqual(db(db.t.a == 3).update(a=db.t.a + 1), 1)
        self.assertEqual(len(db(db.t.a == 4).select()), 1)
        db.t.drop()


class TestJoin(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t1', Field('a'))
        db.define_table('t2', Field('a'), Field('b', db.t1))
        i1 = db.t1.insert(a='1')
        i2 = db.t1.insert(a='2')
        i3 = db.t1.insert(a='3')
        db.t2.insert(a='4', b=i1)
        db.t2.insert(a='5', b=i2)
        db.t2.insert(a='6', b=i2)
        self.assertEqual(len(db(db.t1.id
                          == db.t2.b).select(orderby=db.t1.a
                          | db.t2.a)), 3)
        self.assertEqual(db(db.t1.id == db.t2.b).select(orderby=db.t1.a
                          | db.t2.a)[2].t1.a, '2')
        self.assertEqual(db(db.t1.id == db.t2.b).select(orderby=db.t1.a
                          | db.t2.a)[2].t2.a, '6')
        self.assertEqual(len(db().select(db.t1.ALL, db.t2.ALL,
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a)), 4)
        self.assertEqual(db().select(db.t1.ALL, db.t2.ALL,
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a)[2].t1.a, '2')
        self.assertEqual(db().select(db.t1.ALL, db.t2.ALL,
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a)[2].t2.a, '6')
        self.assertEqual(db().select(db.t1.ALL, db.t2.ALL,
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a)[3].t1.a, '3')
        self.assertEqual(db().select(db.t1.ALL, db.t2.ALL,
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a)[3].t2.a, None)
        self.assertEqual(len(db().select(db.t1.ALL, db.t2.id.count(),
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a, groupby=db.t1.a)),
                         3)
        self.assertEqual(db().select(db.t1.ALL, db.t2.id.count(),
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a,
                         groupby=db.t1.a)[0]._extra[db.t2.id.count()],
                         1)
        self.assertEqual(db().select(db.t1.ALL, db.t2.id.count(),
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a,
                         groupby=db.t1.a)[1]._extra[db.t2.id.count()],
                         2)
        self.assertEqual(db().select(db.t1.ALL, db.t2.id.count(),
                         left=db.t2.on(db.t1.id == db.t2.b),
                         orderby=db.t1.a | db.t2.a,
                         groupby=db.t1.a)[2]._extra[db.t2.id.count()],
                         0)
        db.t1.drop()
        db.t2.drop()


class TestMinMaxSum(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a', 'integer'))
        self.assertEqual(db.t.insert(a=1), 1)
        self.assertEqual(db.t.insert(a=2), 2)
        self.assertEqual(db.t.insert(a=3), 3)
        s = db.t.a.min()
        self.assertEqual(db(db.t.id > 0).select(s)[0]._extra[s], 1)
        s = db.t.a.max()
        self.assertEqual(db(db.t.id > 0).select(s)[0]._extra[s], 3)
        s = db.t.a.sum()
        self.assertEqual(db(db.t.id > 0).select(s)[0]._extra[s], 6)
        s = db.t.a.count()
        self.assertEqual(db(db.t.id > 0).select(s)[0]._extra[s], 3)
        db.t.drop()


#class TestCache(unittest.
#    def testRun(self):
#        cache = cache.ram
#        db = DAL('sqlite:memory:')
#        db.define_table('t', Field('a'))
#        db.t.insert(a='1')
#        r1 = db().select(db.t.ALL, cache=(cache, 1000))
#        db.t.insert(a='1')
#        r2 = db().select(db.t.ALL, cache=(cache, 1000))
#        self.assertEqual(r1.response, r2.response)
#        db.t.drop()


class TestMigrations(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite://.storage.db')
        db.define_table('t', Field('a'), migrate='.storage.table')
        db.commit()
        db = DAL('sqlite://.storage.db')
        db.define_table('t', Field('a'), Field('b'),
                        migrate='.storage.table')
        db.commit()
        db = DAL('sqlite://.storage.db')
        db.define_table('t', Field('a'), Field('b', 'text'),
                        migrate='.storage.table')
        db.commit()
        db = DAL('sqlite://.storage.db')
        db.define_table('t', Field('a'), migrate='.storage.table')
        db.t.drop()
        db.commit()

    def tearDown(self):
        os.unlink('.storage.db')

class TestReferece(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('name'), Field('a','reference t'))
        db.commit()
        x = db.t.insert(name='max')
        assert x.id == 1
        assert x['id'] == 1
        x.a = x
        assert x.a == 1
        x.update_record()
        y = db.t[1]
        assert y.a == 1
        assert y.a.a.a.a.a.a.name == 'max'
        z=db.t.insert(name='xxx', a = y)
        assert z.a == y.id
        db.t.drop()
        db.commit()

class TestClientLevelOps(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        db.commit()
        db.t.insert(a="test")
        rows1 = db(db.t.id>0).select()
        rows2 = db(db.t.id>0).select()
        rows3 = rows1 & rows2
        assert len(rows3) == 2
        rows4 = rows1 | rows2
        assert len(rows4) == 1
        rows5 = rows1.find(lambda row: row.a=="test")
        assert len(rows5) == 1
        rows6 = rows2.exclude(lambda row: row.a=="test")
        assert len(rows6) == 1
        rows7 = rows5.sort(lambda row: row.a)
        assert len(rows7) == 1
        db.t.drop()
        db.commit()


class TestVirtualFields(unittest.TestCase):

    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        db.commit()
        db.t.insert(a="test")
        class Compute:
            def a_upper(row): return row.t.a.upper()
        db.t.virtualfields.append(Compute())
        assert db(db.t.id>0).select().first().a_upper == 'TEST'
        db.t.drop()
        db.commit()


if __name__ == '__main__':
    unittest.main()
    tearDownModule()

Added gluon/tests/test_html.py version [70b7e37286].



























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/python
# -*- coding: utf-8 -*-

"""
    Unit tests for gluon.html
"""

import sys
import os
if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon'))
else:
    sys.path.append(os.path.realpath('../'))

import unittest
from html import *


class TestBareHelpers(unittest.TestCase):

    def testRun(self):
        self.assertEqual(BR(_a='1', _b='2').xml(), '<br a="1" b="2" />')
        self.assertEqual(EMBED(_a='1', _b='2').xml(),
                         '<embed a="1" b="2" />')
        self.assertEqual(HR(_a='1', _b='2').xml(), '<hr a="1" b="2" />')
        self.assertEqual(IMG(_a='1', _b='2').xml(),
                         '<img a="1" b="2" />')
        self.assertEqual(INPUT(_a='1', _b='2').xml(),
                         '<input a="1" b="2" type="text" />')
        self.assertEqual(LINK(_a='1', _b='2').xml(),
                         '<link a="1" b="2" />')
        self.assertEqual(META(_a='1', _b='2').xml(),
                         '<meta a="1" b="2" />')

        self.assertEqual(A('<>', _a='1', _b='2').xml(),
                         '<a a="1" b="2">&lt;&gt;</a>')
        self.assertEqual(B('<>', _a='1', _b='2').xml(),
                         '<b a="1" b="2">&lt;&gt;</b>')
        self.assertEqual(BODY('<>', _a='1', _b='2').xml(),
                         '<body a="1" b="2">&lt;&gt;</body>')
        self.assertEqual(CENTER('<>', _a='1', _b='2').xml(),
                         '<center a="1" b="2">&lt;&gt;</center>')
        self.assertEqual(DIV('<>', _a='1', _b='2').xml(),
                         '<div a="1" b="2">&lt;&gt;</div>')
        self.assertEqual(EM('<>', _a='1', _b='2').xml(),
                         '<em a="1" b="2">&lt;&gt;</em>')
        self.assertEqual(FIELDSET('<>', _a='1', _b='2').xml(),
                         '<fieldset a="1" b="2">&lt;&gt;</fieldset>')
        self.assertEqual(FORM('<>', _a='1', _b='2').xml(),
                         '<form a="1" action="" b="2" enctype="multipart/form-data" method="post">&lt;&gt;</form>')
        self.assertEqual(H1('<>', _a='1', _b='2').xml(),
                         '<h1 a="1" b="2">&lt;&gt;</h1>')
        self.assertEqual(H2('<>', _a='1', _b='2').xml(),
                         '<h2 a="1" b="2">&lt;&gt;</h2>')
        self.assertEqual(H3('<>', _a='1', _b='2').xml(),
                         '<h3 a="1" b="2">&lt;&gt;</h3>')
        self.assertEqual(H4('<>', _a='1', _b='2').xml(),
                         '<h4 a="1" b="2">&lt;&gt;</h4>')
        self.assertEqual(H5('<>', _a='1', _b='2').xml(),
                         '<h5 a="1" b="2">&lt;&gt;</h5>')
        self.assertEqual(H6('<>', _a='1', _b='2').xml(),
                         '<h6 a="1" b="2">&lt;&gt;</h6>')
        self.assertEqual(HEAD('<>', _a='1', _b='2').xml(),
                         '<head a="1" b="2">&lt;&gt;</head>')
        self.assertEqual(HTML('<>', _a='1', _b='2').xml(),
                         '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html a="1" b="2" lang="en">&lt;&gt;</html>')
        self.assertEqual(IFRAME('<>', _a='1', _b='2').xml(),
                         '<iframe a="1" b="2">&lt;&gt;</iframe>')
        self.assertEqual(LABEL('<>', _a='1', _b='2').xml(),
                         '<label a="1" b="2">&lt;&gt;</label>')
        self.assertEqual(LI('<>', _a='1', _b='2').xml(),
                         '<li a="1" b="2">&lt;&gt;</li>')
        self.assertEqual(OBJECT('<>', _a='1', _b='2').xml(),
                         '<object a="1" b="2">&lt;&gt;</object>')
        self.assertEqual(OL('<>', _a='1', _b='2').xml(),
                         '<ol a="1" b="2"><li>&lt;&gt;</li></ol>')
        self.assertEqual(OPTION('<>', _a='1', _b='2').xml(),
                         '<option a="1" b="2" value="&lt;&gt;">&lt;&gt;' + \
                         '</option>')
        self.assertEqual(P('<>', _a='1', _b='2').xml(),
                         '<p a="1" b="2">&lt;&gt;</p>')
        self.assertEqual(PRE('<>', _a='1', _b='2').xml(),
                         '<pre a="1" b="2">&lt;&gt;</pre>')
        self.assertEqual(SCRIPT('<>', _a='1', _b='2').xml(),
                         '''<script a="1" b="2"><!--
<>
//--></script>''')
        self.assertEqual(SELECT('<>', _a='1', _b='2').xml(),
                         '<select a="1" b="2">'+ \
                         '<option value="&lt;&gt;">&lt;&gt;</option></select>')
        self.assertEqual(SPAN('<>', _a='1', _b='2').xml(),
                         '<span a="1" b="2">&lt;&gt;</span>')
        self.assertEqual(STYLE('<>', _a='1', _b='2').xml(),
                         '<style a="1" b="2"><!--/*--><![CDATA[/*><!--*/\n<>\n/*]]>*/--></style>')
        self.assertEqual(TABLE('<>', _a='1', _b='2').xml(),
                         '<table a="1" b="2"><tr><td>&lt;&gt;</td></tr>' + \
                         '</table>')
        self.assertEqual(TBODY('<>', _a='1', _b='2').xml(),
                         '<tbody a="1" b="2"><tr><td>&lt;&gt;</td></tr></tbody>')
        self.assertEqual(TD('<>', _a='1', _b='2').xml(),
                         '<td a="1" b="2">&lt;&gt;</td>')
        self.assertEqual(TEXTAREA('<>', _a='1', _b='2').xml(),
                        '<textarea a="1" b="2" cols="40" rows="10">&lt;&gt;' + \
                        '</textarea>')
        self.assertEqual(TFOOT('<>', _a='1', _b='2').xml(),
                         '<tfoot a="1" b="2"><tr><td>&lt;&gt;</td></tr></tfoot>')
        self.assertEqual(TH('<>', _a='1', _b='2').xml(),
                         '<th a="1" b="2">&lt;&gt;</th>')
        self.assertEqual(THEAD('<>', _a='1', _b='2').xml(),
                         '<thead a="1" b="2"><tr><td>&lt;&gt;</td></tr></thead>')
        self.assertEqual(TITLE('<>', _a='1', _b='2').xml(),
                         '<title a="1" b="2">&lt;&gt;</title>')
        self.assertEqual(TR('<>', _a='1', _b='2').xml(),
                         '<tr a="1" b="2"><td>&lt;&gt;</td></tr>')
        self.assertEqual(TT('<>', _a='1', _b='2').xml(),
                         '<tt a="1" b="2">&lt;&gt;</tt>')
        self.assertEqual(UL('<>', _a='1', _b='2').xml(),
                         '<ul a="1" b="2"><li>&lt;&gt;</li></ul>')


if __name__ == '__main__':
    unittest.main()

Added gluon/tests/test_is_url.py version [f39ed93a5e].





































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Unit tests for IS_URL()
"""

import sys
import os
if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon'))
else:
    sys.path.append(os.path.realpath('../'))

import unittest
from validators import IS_URL, IS_HTTP_URL, IS_GENERIC_URL, \
    unicode_to_ascii_authority


class TestIsUrl(unittest.TestCase):

    def testModeHttp(self):

        # defaults to mode='http'

        x = IS_URL()
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('google.ca'), ('http://google.ca', None))
        self.assertEqual(x('google.ca:80'), ('http://google.ca:80',
                         None))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))
        self.assertEqual(x('google..ca'), ('google..ca', 'enter a valid URL'))
        self.assertEqual(x('google.ca..'), ('google.ca..', 'enter a valid URL'))

        # explicit use of 'http' mode

        x = IS_URL(mode='http')
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('google.ca'), ('http://google.ca', None))
        self.assertEqual(x('google.ca:80'), ('http://google.ca:80',
                         None))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))

        # prepends 'https' instead of 'http'

        x = IS_URL(mode='http', prepend_scheme='https')
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('google.ca'), ('https://google.ca', None))
        self.assertEqual(x('google.ca:80'), ('https://google.ca:80',
                         None))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))

        # prepending disabled

        x = IS_URL(prepend_scheme=None)
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('google.ca'), ('google.ca', None))
        self.assertEqual(x('google.ca:80'), ('google.ca:80', None))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))

        # custom allowed_schemes

        x = IS_URL(mode='http', allowed_schemes=[None, 'http'])
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('https://google.ca'), ('https://google.ca',
                         'enter a valid URL'))
        self.assertEqual(x('google.ca'), ('http://google.ca', None))
        self.assertEqual(x('google.ca:80'), ('http://google.ca:80',
                         None))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))

        # custom allowed_schemes, excluding None

        x = IS_URL(allowed_schemes=['http'])
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('https://google.ca'), ('https://google.ca',
                         'enter a valid URL'))
        self.assertEqual(x('google.ca'), ('google.ca', 'enter a valid URL'))
        self.assertEqual(x('google.ca:80'), ('google.ca:80',
                         'enter a valid URL'))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))

        # custom allowed_schemes and prepend_scheme

        x = IS_URL(allowed_schemes=[None, 'https'],
                   prepend_scheme='https')
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         'enter a valid URL'))
        self.assertEqual(x('https://google.ca'), ('https://google.ca',
                         None))
        self.assertEqual(x('google.ca'), ('https://google.ca', None))
        self.assertEqual(x('google.ca:80'), ('https://google.ca:80',
                         None))
        self.assertEqual(x('unreal.blargg'), ('unreal.blargg',
                         'enter a valid URL'))

        # Now any URL requiring prepending will fail, but prepending is still
        # enabled!

        x = IS_URL(allowed_schemes=['http'])
        self.assertEqual(x('google.ca'), ('google.ca', 'enter a valid URL'))

    def testModeGeneric(self):

        # 'generic' mode

        x = IS_URL(mode='generic')
        self.assertEqual(x('http://google.ca'), ('http://google.ca',None))
        self.assertEqual(x('google.ca'), ('google.ca', None))
        self.assertEqual(x('google.ca:80'), ('http://google.ca:80',None))
        self.assertEqual(x('blargg://unreal'), ('blargg://unreal',
                         'enter a valid URL'))

        # 'generic' mode with custom allowed_schemes that still includes
        # 'http' (the default for prepend_scheme)

        x = IS_URL(mode='generic', allowed_schemes=['http', 'blargg'])
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('ftp://google.ca'), ('ftp://google.ca',
                         'enter a valid URL'))
        self.assertEqual(x('google.ca'), ('google.ca', 'enter a valid URL'))
        self.assertEqual(x('google.ca:80'), ('google.ca:80',
                         'enter a valid URL'))
        self.assertEqual(x('blargg://unreal'), ('blargg://unreal',
                         None))

        # 'generic' mode with overriden prepend_scheme

        x = IS_URL(mode='generic', prepend_scheme='ftp')
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         None))
        self.assertEqual(x('ftp://google.ca'), ('ftp://google.ca',
                         None))
        self.assertEqual(x('google.ca'), ('google.ca', None))
        self.assertEqual(x('google.ca:80'), ('ftp://google.ca:80',
                         None))
        self.assertEqual(x('blargg://unreal'), ('blargg://unreal',
                         'enter a valid URL'))

        # 'generic' mode with overriden allowed_schemes and prepend_scheme

        x = IS_URL(mode='generic', allowed_schemes=[None, 'ftp', 'ftps'
                   ], prepend_scheme='ftp')
        self.assertEqual(x('http://google.ca'), ('http://google.ca',
                         'enter a valid URL'))
        self.assertEqual(x('google.ca'), ('google.ca', None))
        self.assertEqual(x('ftp://google.ca'), ('ftp://google.ca',
                         None))
        self.assertEqual(x('google.ca:80'), ('ftp://google.ca:80',
                         None))
        self.assertEqual(x('blargg://unreal'), ('blargg://unreal',
                         'enter a valid URL'))

        # Now any URL requiring prepending will fail, but prepending is still
        # enabled!

        x = IS_URL(mode='generic', allowed_schemes=['http'])
        self.assertEqual(x('google.ca'), ('google.ca', 'enter a valid URL'))

    def testExceptionalUse(self):

        # mode must be in set ['http', 'generic']

        try:
            x = IS_URL(mode='ftp')
            x('http://www.google.ca')
        except Exception, e:
            if str(e) != "invalid mode 'ftp' in IS_URL":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid mode: 'ftp'")

        # allowed_schemes in 'http' mode must be in set [None, 'http', 'https']

        try:
            x = IS_URL(allowed_schemes=[None, 'ftp', 'ftps'],
                       prepend_scheme='ftp')
            x('http://www.benn.ca')  # we can only reasonably know about the
                                     # error at calling time
        except Exception, e:
            if str(e)\
                 != "allowed_scheme value 'ftp' is not in [None, 'http', 'https']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid allowed_schemes: [None, 'ftp', 'ftps']")

        # prepend_scheme's value must be in allowed_schemes (default for 'http'
        # mode is [None, 'http', 'https'])

        try:
            x = IS_URL(prepend_scheme='ftp')
            x('http://www.benn.ca')  # we can only reasonably know about the
                                     # error at calling time
        except Exception, e:
            if str(e)\
                 != "prepend_scheme='ftp' is not in allowed_schemes=[None, 'http', 'https']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid prepend_scheme: 'ftp'")

        # custom allowed_schemes that excludes 'http', so prepend_scheme must be
        # specified!

        try:
            x = IS_URL(allowed_schemes=[None, 'https'])
        except Exception, e:
            if str(e)\
                 != "prepend_scheme='http' is not in allowed_schemes=[None, 'https']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid prepend_scheme: 'http'")

        # prepend_scheme must be in allowed_schemes

        try:
            x = IS_URL(allowed_schemes=[None, 'http'],
                       prepend_scheme='https')
        except Exception, e:
            if str(e)\
                 != "prepend_scheme='https' is not in allowed_schemes=[None, 'http']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid prepend_scheme: 'https'")

        # prepend_scheme's value (default is 'http') must be in allowed_schemes

        try:
            x = IS_URL(mode='generic', allowed_schemes=[None, 'ftp',
                       'ftps'])
        except Exception, e:
            if str(e)\
                 != "prepend_scheme='http' is not in allowed_schemes=[None, 'ftp', 'ftps']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid prepend_scheme: 'http'")

        # prepend_scheme's value must be in allowed_schemes, which by default
        # is all schemes that really exist

        try:
            x = IS_URL(mode='generic', prepend_scheme='blargg')
            x('http://www.google.ca')  # we can only reasonably know about the error at calling time
        except Exception, e:
            if not str(e).startswith(
                    "prepend_scheme='blargg' is not in allowed_schemes="):
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid prepend_scheme: 'blargg'")

        # prepend_scheme's value must be in allowed_schemes

        try:
            x = IS_URL(mode='generic', allowed_schemes=[None, 'http'],
                       prepend_scheme='blargg')
        except Exception, e:
            if str(e)\
                 != "prepend_scheme='blargg' is not in allowed_schemes=[None, 'http']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Accepted invalid prepend_scheme: 'blargg'")

        # Not inluding None in the allowed_schemes essentially disabled
        # prepending, so even though
        # prepend_scheme has the invalid value 'http', we don't care!

        x = IS_URL(allowed_schemes=['https'], prepend_scheme='https')
        self.assertEqual(x('google.ca'), ('google.ca', 'enter a valid URL'))

        # Not inluding None in the allowed_schemes essentially disabled prepending, so even though
        # prepend_scheme has the invalid value 'http', we don't care!

        x = IS_URL(mode='generic', allowed_schemes=['https'],
            prepend_scheme='https')
        self.assertEqual(x('google.ca'), ('google.ca', 'enter a valid URL'))


# ##############################################################################


class TestIsGenericUrl(unittest.TestCase):

    x = IS_GENERIC_URL()

    def testInvalidUrls(self):
        urlsToCheckA = []
        for i in range(0, 32) + [127]:

            # Control characters are disallowed in any part of a URL

            urlsToCheckA.append('http://www.benn' + chr(i) + '.ca')

        urlsToCheckB = [
            None,
            '',
            'http://www.no spaces allowed.com',
            'http://www.benn.ca/no spaces allowed/',
            'http://www.benn.ca/angle_<bracket/',
            'http://www.benn.ca/angle_>bracket/',
            'http://www.benn.ca/invalid%character',
            'http://www.benn.ca/illegal%%20use',
            'http://www.benn.ca/illegaluse%',
            'http://www.benn.ca/illegaluse%0',
            'http://www.benn.ca/illegaluse%x',
            'http://www.benn.ca/ill%egaluse%x',
            'http://www.benn.ca/double"quote/',
            'http://www.curly{brace.com',
            'http://www.benn.ca/curly}brace/',
            'http://www.benn.ca/or|symbol/',
            'http://www.benn.ca/back\slash',
            'http://www.benn.ca/the^carat',
            'http://left[bracket.me',
            'http://www.benn.ca/right]bracket',
            'http://www.benn.ca/angle`quote',
            '-ttp://www.benn.ca',
            '+ttp://www.benn.ca',
            '.ttp://www.benn.ca',
            '9ttp://www.benn.ca',
            'ht;tp://www.benn.ca',
            'ht@tp://www.benn.ca',
            'ht&tp://www.benn.ca',
            'ht=tp://www.benn.ca',
            'ht$tp://www.benn.ca',
            'ht,tp://www.benn.ca',
            'ht:tp://www.benn.ca',
            'htp://invalid_scheme.com',
            ]

        failures = []

        for url in urlsToCheckA + urlsToCheckB:
            if self.x(url)[1] == None:
                failures.append('Incorrectly accepted: ' + str(url))

        if len(failures) > 0:
            self.fail(failures)

    def testValidUrls(self):
        urlsToCheck = [
            'ftp://ftp.is.co.za/rfc/rfc1808.txt',
            'gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles',
            'http://www.math.uio.no/faq/compression-faq/part1.html',
            'mailto:mduerst@ifi.unizh.ch',
            'news:comp.infosystems.www.servers.unix',
            'telnet://melvyl.ucop.edu/',
            'hTTp://www.benn.ca',
            '%66%74%70://ftp.is.co.za/rfc/rfc1808.txt',
            '%46%74%70://ftp.is.co.za/rfc/rfc1808.txt',
            '/faq/compression-faq/part1.html',
            'google.com',
            'www.google.com:8080',
            '128.127.123.250:8080',
            'blargg:ping',
            'http://www.benn.ca',
            'http://benn.ca',
            'http://amazon.com/books/',
            'https://amazon.com/movies',
            'rtsp://idontknowthisprotocol',
            'HTTP://allcaps.com',
            'http://localhost',
            'http://localhost#fragment',
            'http://localhost/hello',
            'http://localhost/hello?query=True',
            'http://localhost/hello/',
            'http://localhost:8080',
            'http://localhost:8080/',
            'http://localhost:8080/hello',
            'http://localhost:8080/hello/',
            'file:///C:/Documents%20and%20Settings/Jonathan/Desktop/view.py'
                ,
            ]

        failures = []

        for url in urlsToCheck:
            if self.x(url)[1] != None:
                failures.append('Incorrectly rejected: ' + str(url))

        if len(failures) > 0:
            self.fail(failures)

    def testPrepending(self):
        # Does not prepend scheme for abbreviated domains
        self.assertEqual(self.x('google.ca'), ('google.ca', None))

        # Does not prepend scheme for abbreviated domains
        self.assertEqual(self.x('google.ca:8080'), ('google.ca:8080', None))

        # Does not prepend when scheme already exists
        self.assertEqual(self.x('https://google.ca'),
                         ('https://google.ca', None))

        # Does not prepend if None type is not specified in allowed_scheme,
        # because a scheme is required

        y = IS_GENERIC_URL(allowed_schemes=['http', 'blargg'],
            prepend_scheme='http')
        self.assertEqual(y('google.ca'), ('google.ca', 'enter a valid URL'))


# ##############################################################################


class TestIsHttpUrl(unittest.TestCase):

    x = IS_HTTP_URL()

    def testInvalidUrls(self):
        urlsToCheck = [
            None,
            '',
            'http://invalid' + chr(2) + '.com',
            'htp://invalid_scheme.com',
            'blargg://invalid_scheme.com',
            'http://-123.com',
            'http://abcd-.ca',
            'http://-abc123-.me',
            'http://www.dom&ain.com/',
            'http://www.dom=ain.com/',
            'http://www.benn.ca&',
            'http://%62%65%6E%6E%2E%63%61/path',
            'http://.domain.com',
            'http://.domain.com./path',
            'http://domain..com',
            'http://domain...at..com',
            'http://domain.com..',
            'http://domain.com../path',
            'http://domain.3m',
            'http://domain.-3m',
            'http://domain.3m-',
            'http://domain.-3m-',
            'http://domain.co&m',
            'http://domain.m3456',
            'http://domain.m-3/path#fragment',
            'http://domain.m---k/path?query=value',
            'http://23.32..',
            'http://23..32.56.0',
            'http://38997.222.999',
            'http://23.32.56.99.',
            'http://.23.32.56.99',
            'http://.23.32.56.99.',
            'http://w127.123.0.256:8080',
            'http://23.32.56.99:abcd',
            'http://23.32.56.99:23cd',
            'http://google.com:cd22',
            'http://23.32:1300.56.99',
            'http://www.yahoo:1600.com',
            'path/segment/without/starting/slash',
            'http://www.math.uio.no;param=3',
            '://ABC.com:/%7esmith/home.html',
            ]

        failures = []

        for url in urlsToCheck:
            if self.x(url)[1] == None:
                failures.append('Incorrectly accepted: ' + str(url))

        if len(failures) > 0:
            self.fail(failures)

    def testValidUrls(self):

        urlsToCheck = [
            'http://abc.com:80/~smith/home.html',
            'http://ABC.com/%7Esmith/home.html',
            'http://ABC.com:/%7esmith/home.html',
            'http://www.math.uio.no/faq/compression-faq/part1.html',
            '//google.ca/faq/compression-faq/part1.html',
            '//google.ca/faq;param=3',
            '//google.ca/faq/index.html?query=5',
            '//google.ca/faq/index.html;param=value?query=5',
            '/faq/compression-faq/part1.html',
            '/faq;param=3',
            '/faq/index.html?query=5',
            '/faq/index.html;param=value?query=5',
            'google.com',
            'benn.ca/init/default',
            'benn.ca/init;param=value/default?query=value',
            'http://host-name---with-dashes.me',
            'http://www.host-name---with-dashes.me',
            'http://a.com',
            'http://a.3.com',
            'http://a.bl-ck.com',
            'http://bl-e.b.com',
            'http://host123with456numbers.ca',
            'http://1234567890.com.',
            'http://1234567890.com./path',
            'http://google.com./path',
            'http://domain.xn--0zwm56d',
            'http://127.123.0.256',
            'http://127.123.0.256/document/drawer',
            '127.123.0.256/document/',
            '156.212.123.100',
            'http://www.google.com:180200',
            'http://www.google.com:8080/path',
            'http://www.google.com:8080',
            '//www.google.com:8080',
            'www.google.com:8080',
            'http://127.123.0.256:8080/path',
            '//127.123.0.256:8080',
            '127.123.0.256:8080',
            'http://example.me??query=value?',
            'http://a.com',
            'http://3.com',
            'http://www.benn.ca',
            'http://benn.ca',
            'http://amazon.com/books/',
            'https://amazon.com/movies',
            'hTTp://allcaps.com',
            'http://localhost',
            'HTTPS://localhost.',
            'http://localhost#fragment',
            'http://localhost/hello;param=value',
            'http://localhost/hello;param=value/hi;param2=value2;param3=value3'
                ,
            'http://localhost/hello?query=True',
            'http://www.benn.ca/hello;param=value/hi;param2=value2;param3=value3/index.html?query=3',
            'http://localhost/hello/?query=1500&five=6',
            'http://localhost:8080',
            'http://localhost:8080/',
            'http://localhost:8080/hello',
            'http://localhost:8080/hello%20world/',
            'http://www.a.3.be-nn.5.ca',
            'http://www.amazon.COM',
            ]

        failures = []

        for url in urlsToCheck:
            if self.x(url)[1] != None:
                failures.append('Incorrectly rejected: ' + str(url))

        if len(failures) > 0:
            self.fail(failures)

    def testPrepending(self):
        # prepends scheme for abbreviated domains
        self.assertEqual(self.x('google.ca'), ('http://google.ca', None))

        # prepends scheme for abbreviated domains
        self.assertEqual(self.x('google.ca:8080'),
                         ('http://google.ca:8080', None))

        # does not prepend when scheme already exists
        self.assertEqual(self.x('https://google.ca'),
                         ('https://google.ca', None))

        y = IS_HTTP_URL(prepend_scheme='https', allowed_schemes=[None, 'https'])
        self.assertEqual(y('google.ca'), ('https://google.ca', None))  # prepends https if asked

        z = IS_HTTP_URL(prepend_scheme=None)
        self.assertEqual(z('google.ca:8080'), ('google.ca:8080', None))  # prepending disabled

        try:
            IS_HTTP_URL(prepend_scheme='mailto')
        except Exception, e:
            if str(e)\
                 != "prepend_scheme='mailto' is not in allowed_schemes=[None, 'http', 'https']":
                self.fail('Wrong exception: ' + str(e))
        else:
            self.fail("Got invalid prepend_scheme: 'mailto'")

        # Does not prepend if None type is not specified in allowed_scheme, because a scheme is required

        a = IS_HTTP_URL(allowed_schemes=['http'])
        self.assertEqual(a('google.ca'), ('google.ca', 'enter a valid URL'))
        self.assertEqual(a('google.ca:80'), ('google.ca:80',
                         'enter a valid URL'))

class TestUnicode(unittest.TestCase):
    x = IS_URL()
    y = IS_URL(allowed_schemes=['https'], prepend_scheme='https') #excludes the option for abbreviated URLs with no scheme
    z = IS_URL(prepend_scheme=None) # disables prepending the scheme in the return value


    def testUnicodeToAsciiUrl(self):
        self.assertEquals(unicode_to_ascii_authority(u'www.Alliancefran\xe7aise.nu'), 'www.xn--alliancefranaise-npb.nu')
        self.assertEquals(unicode_to_ascii_authority(u'www.benn.ca'), 'www.benn.ca')
        self.assertRaises(UnicodeError, unicode_to_ascii_authority, u'\u4e2d'*1000) #label is too long


    def testValidUrls(self):
        self.assertEquals(self.x(u'www.Alliancefrancaise.nu'), ('http://www.Alliancefrancaise.nu', None))
        self.assertEquals(self.x(u'www.Alliancefran\xe7aise.nu'), ('http://www.xn--alliancefranaise-npb.nu', None))
        self.assertEquals(self.x(u'www.Alliancefran\xe7aise.nu:8080'), ('http://www.xn--alliancefranaise-npb.nu:8080', None))
        self.assertEquals(self.x(u'http://www.Alliancefran\xe7aise.nu'), ('http://www.xn--alliancefranaise-npb.nu', None))
        self.assertEquals(self.x(u'http://www.Alliancefran\xe7aise.nu/parnaise/blue'), ('http://www.xn--alliancefranaise-npb.nu/parnaise/blue', None))
        self.assertEquals(self.x(u'http://www.Alliancefran\xe7aise.nu/parnaise/blue#fragment'), ('http://www.xn--alliancefranaise-npb.nu/parnaise/blue#fragment', None))
        self.assertEquals(self.x(u'http://www.Alliancefran\xe7aise.nu/parnaise/blue?query=value#fragment'), ('http://www.xn--alliancefranaise-npb.nu/parnaise/blue?query=value#fragment', None))
        self.assertEquals(self.x(u'http://www.Alliancefran\xe7aise.nu:8080/parnaise/blue?query=value#fragment'), ('http://www.xn--alliancefranaise-npb.nu:8080/parnaise/blue?query=value#fragment', None))
        self.assertEquals(self.x(u'www.Alliancefran\xe7aise.nu/parnaise/blue?query=value#fragment'), ('http://www.xn--alliancefranaise-npb.nu/parnaise/blue?query=value#fragment', None))
        self.assertEquals(self.x(u'http://\u4e2d\u4fd4.com'), ('http://xn--fiq13b.com', None))
        self.assertEquals(self.x(u'http://\u4e2d\u4fd4.com/\u4e86'), ('http://xn--fiq13b.com/%4e%86', None))
        self.assertEquals(self.x(u'http://\u4e2d\u4fd4.com/\u4e86?query=\u4e86'), ('http://xn--fiq13b.com/%4e%86?query=%4e%86', None))
        self.assertEquals(self.x(u'http://\u4e2d\u4fd4.com/\u4e86?query=\u4e86#fragment'), ('http://xn--fiq13b.com/%4e%86?query=%4e%86#fragment', None))
        self.assertEquals(self.x(u'http://\u4e2d\u4fd4.com?query=\u4e86#fragment'), ('http://xn--fiq13b.com?query=%4e%86#fragment', None))
        self.assertEquals(self.x(u'http://B\xfccher.ch'), ('http://xn--bcher-kva.ch', None))
        self.assertEquals(self.x(u'http://\xe4\xf6\xfc\xdf.com'), ('http://xn--ss-uia6e4a.com', None))
        self.assertEquals(self.x(u'http://visegr\xe1d.com'), ('http://xn--visegrd-mwa.com', None))
        self.assertEquals(self.x(u'http://h\xe1zipatika.com'), ('http://xn--hzipatika-01a.com', None))
        self.assertEquals(self.x(u'http://www.\xe7ukurova.com'), ('http://www.xn--ukurova-txa.com', None))
        self.assertEquals(self.x(u'http://nixier\xf6hre.nixieclock-tube.com'), ('http://xn--nixierhre-57a.nixieclock-tube.com', None))
        self.assertEquals(self.x(u'google.ca.'), ('http://google.ca.', None))

        self.assertEquals(self.y(u'https://google.ca'), ('https://google.ca', None))
        self.assertEquals(self.y(u'https://\u4e2d\u4fd4.com'), ('https://xn--fiq13b.com', None))

        self.assertEquals(self.z(u'google.ca'), ('google.ca', None))


    def testInvalidUrls(self):
        self.assertEquals(self.x(u'://ABC.com'), (u'://ABC.com', 'enter a valid URL'))
        self.assertEquals(self.x(u'http://\u4e2d\u4fd4.dne'), (u'http://\u4e2d\u4fd4.dne', 'enter a valid URL'))
        self.assertEquals(self.x(u'https://google.dne'), (u'https://google.dne', 'enter a valid URL'))
        self.assertEquals(self.x(u'https://google..ca'), (u'https://google..ca', 'enter a valid URL'))
        self.assertEquals(self.x(u'google..ca'), (u'google..ca', 'enter a valid URL'))
        self.assertEquals(self.x(u'http://' + u'\u4e2d'*1000 + u'.com'), (u'http://' + u'\u4e2d'*1000 + u'.com', 'enter a valid URL'))

        self.assertEquals(self.x(u'http://google.com#fragment_\u4e86'), (u'http://google.com#fragment_\u4e86', 'enter a valid URL'))
        self.assertEquals(self.x(u'http\u4e86://google.com'), (u'http\u4e86://google.com', 'enter a valid URL'))
        self.assertEquals(self.x(u'http\u4e86://google.com#fragment_\u4e86'), (u'http\u4e86://google.com#fragment_\u4e86', 'enter a valid URL'))

        self.assertEquals(self.y(u'http://\u4e2d\u4fd4.com/\u4e86'), (u'http://\u4e2d\u4fd4.com/\u4e86', 'enter a valid URL'))
        #self.assertEquals(self.y(u'google.ca'), (u'google.ca', 'enter a valid URL'))

        self.assertEquals(self.z(u'invalid.domain..com'), (u'invalid.domain..com', 'enter a valid URL'))
        self.assertEquals(self.z(u'invalid.\u4e2d\u4fd4.blargg'), (u'invalid.\u4e2d\u4fd4.blargg', 'enter a valid URL'))

# ##############################################################################

if __name__ == '__main__':
    unittest.main()

Added gluon/tests/test_router.py version [ca0892ab11].






















































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Unit tests for rewrite.py routers option"""

import sys
import os
import unittest
import tempfile
import logging

if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon')) # running from web2py base
else:
    sys.path.append(os.path.realpath('../')) # running from gluon/tests/

from rewrite import load, filter_url, filter_err, get_effective_router, map_url_out
from html import URL
from fileutils import abspath
from settings import global_settings
from http import HTTP
from storage import Storage

logger = None
oldcwd = None
root = None

def setUpModule():
    def make_apptree():
        "build a temporary applications tree"
        #  applications/
        os.mkdir(abspath('applications'))
        #  applications/app/
        for app in ('admin', 'examples', 'welcome'):
            os.mkdir(abspath('applications', app))
            #  applications/app/(controllers, static)
            for subdir in ('controllers', 'static'):
                os.mkdir(abspath('applications', app, subdir))
        #  applications/admin/controllers/*.py
        for ctr in ('appadmin', 'default', 'gae', 'mercurial', 'shell', 'wizard'):
            open(abspath('applications', 'admin', 'controllers', '%s.py' % ctr), 'w').close()
        #  applications/examples/controllers/*.py
        for ctr in ('ajax_examples', 'appadmin', 'default', 'global', 'spreadsheet'):
            open(abspath('applications', 'examples', 'controllers', '%s.py' % ctr), 'w').close()
        #  applications/welcome/controllers/*.py
        for ctr in ('appadmin', 'default'):
            open(abspath('applications', 'welcome', 'controllers', '%s.py' % ctr), 'w').close()
        #  create an app-specific routes.py for examples app
        routes = open(abspath('applications', 'examples', 'routes.py'), 'w')
        routes.write("routers=dict(examples=dict(default_function='exdef'))")
        routes.close()
        #  create language files for examples app
        for lang in ('en', 'it'):
            os.mkdir(abspath('applications', 'examples', 'static', lang))
            open(abspath('applications', 'examples', 'static', lang, 'file'), 'w').close()

    global oldcwd
    if oldcwd is None:  # do this only once
        oldcwd = os.getcwd()
        if not os.path.isdir('gluon'):
            os.chdir(os.path.realpath('../../'))    # run from web2py base directory
        import main   # for initialization after chdir
        global logger
        logger = logging.getLogger('web2py.rewrite')
        global_settings.applications_parent = tempfile.mkdtemp()
        global root
        root = global_settings.applications_parent
        make_apptree()

def tearDownModule():
    global oldcwd
    if oldcwd is not None:
        os.chdir(oldcwd)
        oldcwd = None


class TestRouter(unittest.TestCase):
    """ Tests the routers logic from gluon.rewrite """

    def test_router_syntax(self):
        """ Test router syntax error """
        level = logger.getEffectiveLevel()
        logger.setLevel(logging.CRITICAL)  # disable logging temporarily
        self.assertRaises(SyntaxError, load, data='x:y')
        self.assertRaises(SyntaxError, load, rdict=dict(BASE=dict(badkey="value")))
        self.assertRaises(SyntaxError, load, rdict=dict(BASE=dict(), app=dict(default_application="name")))
        try:
            # 2.7+ only
            self.assertRaisesRegexp(SyntaxError, "invalid syntax", 
                load, data='x:y')
            self.assertRaisesRegexp(SyntaxError, "unknown key", 
                load, rdict=dict(BASE=dict(badkey="value")))
            self.assertRaisesRegexp(SyntaxError, "BASE-only key", 
                load, rdict=dict(BASE=dict(), app=dict(default_application="name")))
        except AttributeError:
            pass
        logger.setLevel(level)

    def test_router_null(self):
        """ Tests the null router """
        load(rdict=dict())
        # app resolution
        self.assertEqual(filter_url('http://domain.com/welcome', app=True), 'welcome')
        self.assertEqual(filter_url('http://domain.com/', app=True), 'init')
        # incoming
        self.assertEqual(filter_url('http://domain.com/favicon.ico'), '%s/applications/init/static/favicon.ico' % root)
        self.assertEqual(filter_url('http://domain.com/abc'), '/init/default/abc')
        self.assertEqual(filter_url('http://domain.com/index/abc'), "/init/default/index ['abc']")
        self.assertEqual(filter_url('http://domain.com/abc/def'), "/init/default/abc ['def']")
        self.assertEqual(filter_url('http://domain.com/index/a%20bc'), "/init/default/index ['a bc']")
        self.assertEqual(filter_url('http://domain.com/welcome/static/path/to/static'), "%s/applications/welcome/static/path/to/static" % root)
        self.assertRaises(HTTP, filter_url, 'http://domain.com/welcome/static/bad/path/to/st~tic')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*invalid static file", filter_url, 'http://domain.com/welcome/static/bad/path/to/st~tic')
        except AttributeError:
            pass
        # outgoing
        self.assertEqual(filter_url('http://domain.com/init/default/index', out=True), '/')
        self.assertEqual(filter_url('http://domain.com/init/default/index/arg1', out=True), '/index/arg1')
        self.assertEqual(filter_url('http://domain.com/init/default/abc', out=True), '/abc')
        self.assertEqual(filter_url('http://domain.com/init/static/abc', out=True), '/init/static/abc')
        self.assertEqual(filter_url('http://domain.com/init/appadmin/index', out=True), '/appadmin')
        self.assertEqual(filter_url('http://domain.com/init/appadmin/abc', out=True), '/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/init/admin/index', out=True), '/init/admin')
        self.assertEqual(filter_url('http://domain.com/init/admin/abc', out=True), '/init/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')

    def test_router_specific(self):
        """ 
        Test app-specific routes.py 
        
        Note that make_apptree above created applications/examples/routes.py with a default_function.
        """
        load(rdict=dict())
        self.assertEqual(filter_url('http://domain.com/welcome'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/examples'), '/examples/default/exdef')

    def test_router_defapp(self):
        """ Test the default-application function """
        routers = dict(BASE=dict(default_application='welcome'))
        load(rdict=routers)
        # app resolution
        self.assertEqual(filter_url('http://domain.com/welcome', app=True), 'welcome')
        self.assertEqual(filter_url('http://domain.com/', app=True), 'welcome')
        # incoming
        self.assertEqual(filter_url('http://domain.com'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/appadmin'), '/welcome/appadmin/index')
        self.assertEqual(filter_url('http://domain.com/abc'), '/welcome/default/abc')
        self.assertEqual(filter_url('http://domain.com/index/abc'), "/welcome/default/index ['abc']")
        self.assertEqual(filter_url('http://domain.com/abc/def'), "/welcome/default/abc ['def']")
        self.assertEqual(filter_url('http://domain.com/favicon.ico'), '%s/applications/welcome/static/favicon.ico' % root)
        self.assertEqual(filter_url('http://domain.com/static/abc'), '%s/applications/welcome/static/abc' % root)
        self.assertEqual(filter_url('http://domain.com/static/path/to/static'), "%s/applications/welcome/static/path/to/static" % root)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/default/admin', out=True), '/default/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), 
            '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/appadmin')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')

    def test_router_nodef(self):
        """ Test no-default functions """
        routers = dict(
            BASE=dict(default_application='welcome'),
            welcome=dict(controllers=None),
        )
        load(rdict=routers)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/default')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/default/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/default/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), 
            '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/appadmin')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')
        # incoming
        self.assertEqual(filter_url('http://domain.com'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/appadmin'), '/welcome/appadmin/index')
        self.assertEqual(filter_url('http://domain.com/abc'), '/welcome/abc/index')
        self.assertEqual(filter_url('http://domain.com/index/abc'), "/welcome/index/abc")
        self.assertEqual(filter_url('http://domain.com/abc/def'), "/welcome/abc/def")
        self.assertEqual(filter_url('http://domain.com/abc/def/ghi'), "/welcome/abc/def ['ghi']")

        routers = dict(
            BASE=dict(default_application=None),
        )
        load(rdict=routers)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/welcome')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/welcome/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/welcome/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/welcome/appadmin')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/welcome/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')
        # incoming
        self.assertRaises(HTTP, filter_url, 'http://domain.com')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/appadmin')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*invalid application", filter_url, 'http://domain.com')
            self.assertRaisesRegexp(HTTP, "400.*invalid application", filter_url, 'http://domain.com/appadmin')
        except AttributeError:
            pass

        routers = dict(
            BASE=dict(default_application='welcome', applications=None),
        )
        load(rdict=routers)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/welcome')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/welcome/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/welcome/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/welcome/appadmin')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/welcome/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')
        # incoming
        self.assertEqual(filter_url('http://domain.com'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/'), '/welcome/default/index')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/appadmin')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*unknown application: 'appadmin'", filter_url, 'http://domain.com/appadmin')
        except AttributeError:
            pass

        routers = dict(
            BASE=dict(default_application='welcome', applications=None),
            welcome=dict(controllers=None),
        )
        load(rdict=routers)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/welcome/default')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/welcome/default/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/welcome/default/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/welcome/appadmin')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/welcome/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')
        # incoming
        self.assertEqual(filter_url('http://domain.com'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/'), '/welcome/default/index')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/appadmin')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*unknown application: 'appadmin'", filter_url, 'http://domain.com/appadmin')
        except AttributeError:
            pass

        routers = dict(
            BASE=dict(default_application='welcome', applications=None),
            welcome=dict(default_controller=None),
        )
        load(rdict=routers)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/welcome/default')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/welcome/default/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/welcome/default/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/welcome/appadmin')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/welcome/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')
        # incoming
        self.assertRaises(HTTP, filter_url, 'http://domain.com')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/appadmin')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*invalid controller", filter_url, 'http://domain.com')
            self.assertRaisesRegexp(HTTP, "400.*unknown application: 'appadmin'", filter_url, 'http://domain.com/appadmin')
        except AttributeError:
            pass

        routers = dict(
            BASE=dict(default_application='welcome', applications=None),
            welcome=dict(controllers=None, default_function=None),
        )
        load(rdict=routers)
        # outgoing
        self.assertEqual(filter_url('http://domain.com/welcome/default/index', out=True), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/arg1', out=True), '/welcome/default/index/arg1')
        self.assertEqual(filter_url('http://domain.com/welcome/default/abc', out=True), '/welcome/default/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc', out=True), '/welcome/static/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/index', out=True), '/welcome/appadmin/index')
        self.assertEqual(filter_url('http://domain.com/welcome/appadmin/abc', out=True), '/welcome/appadmin/abc')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/index', out=True), '/welcome/admin/index')
        self.assertEqual(filter_url('http://domain.com/welcome/admin/abc', out=True), '/welcome/admin/abc')
        self.assertEqual(filter_url('http://domain.com/admin/default/abc', out=True), '/admin/abc')
        # incoming
        self.assertRaises(HTTP, filter_url, 'http://domain.com')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/appadmin')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*invalid function", filter_url, 'http://domain.com')
            self.assertRaisesRegexp(HTTP, "400.*unknown application: 'appadmin'", filter_url, 'http://domain.com/appadmin')
        except AttributeError:
            pass

    def test_router_app(self):
        """ Tests the doctest router app resolution"""
        routers = dict(
            BASE = dict(
                domains = {
                    "domain1.com" : "app1",
                    "www.domain1.com" : "app1",
                    "domain2.com" : "app2",
                },
            ),
            app1 = dict(),
            app2 = dict(),
            goodapp = dict(),
        )
        routers['bad!app'] = dict()
        load(rdict=routers)
        self.assertEqual(filter_url('http://domain.com/welcome', app=True), 'welcome')
        self.assertEqual(filter_url('http://domain.com/welcome/', app=True), 'welcome')
        self.assertEqual(filter_url('http://domain.com', app=True), 'init')
        self.assertEqual(filter_url('http://domain.com/', app=True), 'init')
        self.assertEqual(filter_url('http://domain.com/abc', app=True), 'init')
        self.assertEqual(filter_url('http://domain1.com/abc', app=True), 'app1')
        self.assertEqual(filter_url('http://www.domain1.com/abc', app=True), 'app1')
        self.assertEqual(filter_url('http://domain2.com/abc', app=True), 'app2')
        self.assertEqual(filter_url('http://domain2.com/admin', app=True), 'admin')

        self.assertEqual(filter_url('http://domain.com/goodapp', app=True), 'goodapp')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/bad!app', app=True)
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, '400.*invalid application', filter_url, 'http://domain.com/bad!app')
        except AttributeError:
            pass

        routers['BASE']['domains']['domain3.com'] = 'app3'
        self.assertRaises(SyntaxError, load, rdict=routers)
        try:
            # 2.7+ only
            self.assertRaisesRegexp(SyntaxError, "unknown.*app3", load, rdict=routers)
        except AttributeError:
            pass

    def test_router_domains(self):
        '''
        Test URLs that map domains
        '''
        routers = dict(
            BASE = dict(
                applications = ['app1', 'app2', 'app2A', 'app3', 'app4', 'app5', 'app6'],
                domains = {
                    #  two domains to the same app
                    "domain1.com"     : "app1",
                    "www.domain1.com" : "app1",
                    #  same domain, two ports, to two apps
                    "domain2.com"      : "app2a",
                    "domain2.com:8080" : "app2b",
                    #  two domains, same app, two controllers
                    "domain3a.com" : "app3/c3a",
                    "domain3b.com" : "app3/c3b",
                    #  http vs https
                    "domain6.com:80"  : "app6",
                    "domain6.com:443" : "app6s",
                },
            ),
            app1 =  dict( default_controller = 'c1',  default_function = 'f1',  controllers = ['c1'], exclusive_domain=True, ),
            app2a = dict( default_controller = 'c2a', default_function = 'f2a', controllers = ['c2a'], ),
            app2b = dict( default_controller = 'c2b', default_function = 'f2b', controllers = ['c2b'], ),
            app3 =  dict( controllers = ['c3a', 'c3b'], ),
            app4 =  dict( default_controller = 'c4', controllers = ['c4'], domain = 'domain4.com' ),
            app5 =  dict( default_controller = 'c5', controllers = ['c5'], domain = 'localhost' ),
            app6 =  dict( default_controller = 'c6',  default_function = 'f6',  controllers = ['c6'], ),
            app6s =  dict( default_controller = 'c6s',  default_function = 'f6s',  controllers = ['c6s'], ),
        )

        load(rdict=routers)
        self.assertEqual(filter_url('http://domain1.com/abc'), '/app1/c1/abc')
        self.assertEqual(filter_url('http://domain1.com/c1/abc'), '/app1/c1/abc')
        self.assertEqual(filter_url('http://domain1.com/abc.html'), '/app1/c1/abc')
        self.assertEqual(filter_url('http://domain1.com/abc.css'), '/app1/c1/abc.css')
        self.assertEqual(filter_url('http://domain1.com/index/abc'), "/app1/c1/index ['abc']")
        
        self.assertEqual(filter_url('https://domain1.com/app1/ctr/fcn', domain=('app1',None), out=True), "/ctr/fcn")
        self.assertEqual(filter_url('https://www.domain1.com/app1/ctr/fcn', domain=('app1',None), out=True), "/ctr/fcn")

        self.assertEqual(filter_url('http://domain2.com/abc'), '/app2a/c2a/abc')
        self.assertEqual(filter_url('http://domain2.com:8080/abc'), '/app2b/c2b/abc')

        self.assertEqual(filter_url('http://domain2.com/app2a/ctr/fcn', domain=('app2a',None), out=True), "/ctr/fcn")
        self.assertEqual(filter_url('http://domain2.com/app2a/ctr/f2a', domain=('app2a',None), out=True), "/ctr")
        self.assertEqual(filter_url('http://domain2.com/app2a/c2a/f2a', domain=('app2a',None), out=True), "/")
        self.assertEqual(filter_url('http://domain2.com/app2a/c2a/fcn', domain=('app2a',None), out=True), "/fcn")
        self.assertEqual(filter_url('http://domain2.com/app2a/ctr/fcn', domain=('app2b',None), out=True), "/app2a/ctr/fcn")
        self.assertEqual(filter_url('http://domain2.com/app2a/ctr/f2a', domain=('app2b',None), out=True), "/app2a/ctr")
        self.assertEqual(filter_url('http://domain2.com/app2a/c2a/f2a', domain=('app2b',None), out=True), "/app2a")

        self.assertEqual(filter_url('http://domain3a.com/'), '/app3/c3a/index')
        self.assertEqual(filter_url('http://domain3a.com/abc'), '/app3/c3a/abc')
        self.assertEqual(filter_url('http://domain3a.com/c3b'), '/app3/c3b/index')
        self.assertEqual(filter_url('http://domain3b.com/abc'), '/app3/c3b/abc')

        self.assertEqual(filter_url('http://domain3a.com/app3/c3a/fcn', domain=('app3','c3a'), out=True), "/fcn")
        self.assertEqual(filter_url('http://domain3a.com/app3/c3a/fcn', domain=('app3','c3b'), out=True), "/c3a/fcn")
        self.assertEqual(filter_url('http://domain3a.com/app3/c3a/fcn', domain=('app1',None), out=True), "/app3/c3a/fcn")

        self.assertEqual(filter_url('http://domain4.com/abc'), '/app4/c4/abc')
        self.assertEqual(filter_url('https://domain4.com/app4/c4/fcn', domain=('app4',None), out=True), "/fcn")

        self.assertEqual(filter_url('http://localhost/abc'), '/app5/c5/abc')
        self.assertEqual(filter_url('http:///abc'), '/app5/c5/abc') # test null host => localhost
        self.assertEqual(filter_url('https://localhost/app5/c5/fcn', domain=('app5',None), out=True), "/fcn")

        self.assertEqual(filter_url('http://domain6.com'), '/app6/c6/f6')
        self.assertEqual(filter_url('https://domain6.com'), '/app6s/c6s/f6s')

        self.assertEqual(filter_url('http://domain2.com/app3/c3a/f3', domain=('app2b',None), out=True), "/app3/c3a/f3")
        self.assertRaises(SyntaxError, filter_url, 'http://domain1.com/app1/c1/f1', domain=('app2b',None), out=True)
        try:
            # 2.7+ only
            self.assertRaisesRegexp(SyntaxError, 'cross-domain conflict', filter_url, 'http://domain1.com/app1/c1/f1', domain=('app2b',None), out=True)
        except AttributeError:
            pass
        self.assertEqual(filter_url('http://domain1.com/app1/c1/f1', domain=('app2b',None), host='domain2.com', out=True), "/app1")

    def test_router_raise(self):
        '''
        Test URLs that raise exceptions
        '''
        # test non-exception variants
        router_raise = dict(
            init = dict(
                controllers = [],
            ),
            welcome = dict(
                map_hyphen = False,
            ),
        )
        load(rdict=router_raise)
        self.assertEqual(filter_url('http://domain.com/ctl'),  "/init/ctl/index")
        self.assertEqual(filter_url('http://domain.com/default/fcn'),  "/init/default/fcn")
        self.assertEqual(filter_url('http://domain.com/default/fcn.ext'),  "/init/default/fcn.ext")
        self.assertEqual(filter_url('http://domain.com/default/fcn/arg'),  "/init/default/fcn ['arg']")
        # now raise-HTTP variants
        self.assertRaises(HTTP, filter_url, 'http://domain.com/bad!ctl')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/ctl/bad!fcn')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/ctl/fcn.bad!ext')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/ctl/fcn/bad!arg')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, '400.*invalid controller', filter_url, 'http://domain.com/init/bad!ctl')
            self.assertRaisesRegexp(HTTP, '400.*invalid function', filter_url, 'http://domain.com/init/ctlr/bad!fcn')
            self.assertRaisesRegexp(HTTP, '400.*invalid extension', filter_url, 'http://domain.com/init/ctlr/fcn.bad!ext')
            self.assertRaisesRegexp(HTTP, '400.*invalid arg', filter_url, 'http://domain.com/appc/init/fcn/bad!arg')
        except AttributeError:
            pass

        self.assertEqual(filter_url('http://domain.com/welcome/default/fcn_1'),  "/welcome/default/fcn_1")
        self.assertRaises(HTTP, filter_url, 'http://domain.com/welcome/default/fcn-1')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, '400.*invalid function', filter_url, 'http://domain.com/welcome/default/fcn-1')
        except AttributeError:
            pass

    def test_router_out(self):
        '''
        Test basic outgoing routing
        '''
        router_out = dict(
            BASE = dict(),
            init = dict( controllers = ['default', 'ctr'], ),
            app = dict(),
        )
        load(rdict=router_out)
        self.assertEqual(filter_url('https://domain.com/app/ctr/fcn', out=True), "/app/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/init/ctr/fcn', out=True), "/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/init/ctr/fcn', out=True), "/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/init/static/file', out=True), "/init/static/file")
        self.assertEqual(filter_url('https://domain.com/init/static/index', out=True), "/init/static/index")
        self.assertEqual(filter_url('https://domain.com/init/default/index', out=True), "/")
        self.assertEqual(filter_url('https://domain.com/init/ctr/index', out=True), "/ctr")
        self.assertEqual(filter_url('http://domain.com/init/default/fcn?query', out=True), "/fcn?query")
        self.assertEqual(filter_url('http://domain.com/init/default/fcn#anchor', out=True), "/fcn#anchor")
        self.assertEqual(filter_url('http://domain.com/init/default/fcn?query#anchor', out=True), 
            "/fcn?query#anchor")

        router_out['BASE']['map_static'] = True
        load(rdict=router_out)
        self.assertEqual(filter_url('https://domain.com/init/static/file', out=True), "/static/file")
        self.assertEqual(filter_url('https://domain.com/init/static/index', out=True), "/static/index")

        router_out['init']['map_static'] = False
        load(rdict=router_out)
        self.assertEqual(filter_url('https://domain.com/init/static/file', out=True), "/init/static/file")
        self.assertEqual(filter_url('https://domain.com/init/static/index', out=True), "/init/static/index")

    def test_router_functions(self):
        '''
        Test function-omission with functions=[something]
        '''
        router_functions = dict(
            BASE = dict(
                applications = ['init', 'app', 'app2'],
                default_application = 'app',
            ),
            init = dict(
                controllers = ['default'],
            ),
            app = dict(
                controllers = ['default', 'ctr'],
                functions = ['index', 'user', 'help'],
            ),
            app2 = dict(
                controllers = ['default', 'ctr'],
                functions = ['index', 'user', 'help'],
            ),
        )
        load(rdict=router_functions)
        self.assertEqual(str(URL(a='init', c='default', f='f', args=['arg1'])), "/init/f/arg1")
        self.assertEqual(str(URL(a='init', c='default', f='index', args=['arg1'])), "/init/index/arg1")
        self.assertEqual(str(URL(a='app', c='default', f='index', args=['arg1'])), "/arg1")
        self.assertEqual(str(URL(a='app', c='default', f='user', args=['arg1'])), "/user/arg1")
        self.assertEqual(str(URL(a='app', c='default', f='user', args=['index'])), "/user/index")
        self.assertEqual(str(URL(a='app', c='default', f='index', args=['index'])), "/index/index")
        self.assertEqual(str(URL(a='app', c='default', f='index', args=['init'])), "/index/init")
        self.assertEqual(str(URL(a='app', c='default', f='index', args=['ctr'])), "/index/ctr")
        self.assertEqual(str(URL(a='app', c='ctr', f='index', args=['arg'])), "/ctr/index/arg")

        self.assertEqual(str(URL(a='app2', c='default', f='index', args=['arg1'])), "/app2/arg1")
        self.assertEqual(str(URL(a='app2', c='default', f='user', args=['arg1'])), "/app2/user/arg1")
        self.assertEqual(str(URL(a='app2', c='default', f='user', args=['index'])), "/app2/user/index")
        self.assertEqual(str(URL(a='app2', c='default', f='index', args=['index'])), "/app2/index/index")
        self.assertEqual(str(URL(a='app2', c='default', f='index', args=['init'])), "/app2/index/init")
        self.assertEqual(str(URL(a='app2', c='default', f='index', args=['ctr'])), "/app2/index/ctr")

        self.assertEqual(filter_url('http://d.com/arg'), "/app/default/index ['arg']")
        self.assertEqual(filter_url('http://d.com/user'), "/app/default/user")
        self.assertEqual(filter_url('http://d.com/user/arg'), "/app/default/user ['arg']")
        self.assertEqual(filter_url('http://d.com/ctr'), "/app/ctr/index")
        self.assertEqual(filter_url('http://d.com/ctr/index/arg'), "/app/ctr/index ['arg']")
        self.assertEqual(filter_url('http://d.com/ctr/arg'), "/app/ctr/arg")

        self.assertEqual(filter_url('http://d.com/app2/arg'), "/app2/default/index ['arg']")
        self.assertEqual(filter_url('http://d.com/app2/user'), "/app2/default/user")
        self.assertEqual(filter_url('http://d.com/app2/user/arg'), "/app2/default/user ['arg']")
        self.assertEqual(filter_url('http://d.com/app2/ctr'), "/app2/ctr/index")
        self.assertEqual(filter_url('http://d.com/app2/ctr/index/arg'), "/app2/ctr/index ['arg']")
        self.assertEqual(filter_url('http://d.com/app2/ctr/arg'), "/app2/ctr/arg")

    def test_router_hyphen(self):
        '''
        Test hyphen conversion
        '''
        router_hyphen = dict(
            BASE = dict(
                applications = ['init', 'app1', 'app2'],
            ),
            init = dict(
                controllers = ['default'],
            ),
            app1 = dict(
                controllers = ['default'],
                map_hyphen = True,
            ),
            app2 = dict(
                controllers = ['default'],
                map_hyphen = False,
            ),
        )
        load(rdict=router_hyphen)
        self.assertEqual(filter_url('http://domain.com/init/default/fcn_1', out=True), "/fcn_1")
        self.assertEqual(filter_url('http://domain.com/static/filename-with_underscore'), 
            "%s/applications/init/static/filename-with_underscore" % root)
        self.assertEqual(filter_url('http://domain.com/init/static/filename-with_underscore', out=True), 
            "/init/static/filename-with_underscore")

        self.assertEqual(filter_url('http://domain.com/app2/fcn_1'), 
            "/app2/default/fcn_1")
        self.assertEqual(filter_url('http://domain.com/app2/ctr/fcn_1', domain=('app2',None), out=True), 
            "/ctr/fcn_1")
        self.assertEqual(filter_url('http://domain.com/app2/static/filename-with_underscore', domain=('app2',None), out=True), 
            "/app2/static/filename-with_underscore")
        self.assertEqual(filter_url('http://domain.com/app2/static/filename-with_underscore'), 
            "%s/applications/app2/static/filename-with_underscore" % root)

        self.assertEqual(str(URL(a='init', c='default', f='a_b')), "/a_b")
        self.assertEqual(str(URL(a='app1', c='default', f='a_b')), "/app1/a-b")
        self.assertEqual(str(URL(a='app2', c='default', f='a_b')), "/app2/a_b")
        self.assertEqual(str(URL(a='app1', c='static', f='a/b_c')), "/app1/static/a/b_c")
        self.assertEqual(str(URL(a='app1', c='static/a', f='b_c')), "/app1/static/a/b_c")
        self.assertEqual(str(URL(a='app2', c='static', f='a/b_c')), "/app2/static/a/b_c")
        self.assertEqual(str(URL(a='app2', c='static/a', f='b_c')), "/app2/static/a/b_c")


    def test_router_lang(self):
        '''
        Test language specifications
        '''
        router_lang = dict(
            BASE = dict(default_application = 'admin'),
            welcome = dict(),
            admin = dict(
                controllers = ['default', 'ctr'],
                languages = ['en', 'it', 'it-it'], default_language = 'en',
            ),
            examples = dict(
                languages = ['en', 'it', 'it-it'], default_language = 'en',
            ),
        )
        load(rdict=router_lang)
        self.assertEqual(filter_url('http://domain.com/index/abc'), "/admin/default/index ['abc'] (en)")
        self.assertEqual(filter_url('http://domain.com/en/abc/def'), "/admin/default/abc ['def'] (en)")
        self.assertEqual(filter_url('http://domain.com/it/abc/def'), "/admin/default/abc ['def'] (it)")
        self.assertEqual(filter_url('http://domain.com/it-it/abc/def'), "/admin/default/abc ['def'] (it-it)")
        self.assertEqual(filter_url('http://domain.com/index/a%20bc'), "/admin/default/index ['a bc'] (en)")
        self.assertEqual(filter_url('http://domain.com/static/file'), "%s/applications/admin/static/file" % root)
        self.assertEqual(filter_url('http://domain.com/en/static/file'), "%s/applications/admin/static/file" % root)
        self.assertEqual(filter_url('http://domain.com/examples/en/static/file'), "%s/applications/examples/static/en/file" % root)
        self.assertEqual(filter_url('http://domain.com/examples/static/file'), "%s/applications/examples/static/en/file" % root)
        self.assertEqual(filter_url('http://domain.com/examples/it/static/file'), "%s/applications/examples/static/it/file" % root)
        self.assertEqual(filter_url('http://domain.com/examples/it-it/static/file'), "%s/applications/examples/static/file" % root)

        self.assertEqual(filter_url('https://domain.com/admin/ctr/fcn', lang='en', out=True), "/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/admin/ctr/fcn', lang='it', out=True), "/it/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/admin/ctr/fcn', lang='it-it', out=True), "/it-it/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/admin/static/file', lang='en', out=True), "/admin/en/static/file")
        self.assertEqual(filter_url('https://domain.com/admin/static/file', lang='it', out=True), "/admin/it/static/file")
        self.assertEqual(filter_url('https://domain.com/admin/static/file', lang='it-it', out=True), "/admin/it-it/static/file")
        self.assertEqual(filter_url('https://domain.com/welcome/ctr/fcn', lang='it', out=True), "/welcome/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/welcome/ctr/fcn', lang='es', out=True), "/welcome/ctr/fcn")        

        router_lang['admin']['map_static'] = True
        load(rdict=router_lang)
        self.assertEqual(filter_url('https://domain.com/admin/ctr/fcn', lang='en', out=True), "/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/admin/ctr/fcn', lang='it', out=True), "/it/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/admin/ctr/fcn', lang='it-it', out=True), "/it-it/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/admin/static/file', lang='en', out=True), "/static/file")
        self.assertEqual(filter_url('https://domain.com/admin/static/file', lang='it', out=True), "/it/static/file")
        self.assertEqual(filter_url('https://domain.com/admin/static/file', lang='it-it', out=True), "/it-it/static/file")
        self.assertEqual(filter_url('https://domain.com/welcome/ctr/fcn', lang='it', out=True), "/welcome/ctr/fcn")
        self.assertEqual(filter_url('https://domain.com/welcome/ctr/fcn', lang='es', out=True), "/welcome/ctr/fcn")        

    def test_router_get_effective(self):
        '''
        Test get_effective_router
        '''
        router_get_effective = dict(
            BASE = dict(
                default_application = 'a1',
                applications = ['a1', 'a2'],
            ),
            a1 = dict(
                controllers = ['c1a', 'c1b', 'default'],
            ),
            a2 = dict(
                default_controller = 'c2',
                controllers = [],
            ),
            a3 = dict(
                default_controller = 'c2',
                controllers = ['c1'],
            ),
            a4 = dict(
                default_function = 'f1',
                functions = ['f2'],
            ),
        )
        load(rdict=router_get_effective)
        self.assertEqual(get_effective_router('BASE').applications, set(['a1','a2']))
        self.assertEqual(get_effective_router('BASE').default_application, 'a1')
        self.assertEqual(get_effective_router('BASE').domains, {})
        self.assertEqual(get_effective_router('a1').applications, None)
        self.assertEqual(get_effective_router('a1').default_application, None)
        self.assertEqual(get_effective_router('a1').domains, None)
        self.assertEqual(get_effective_router('a1').default_controller, "default")
        self.assertEqual(get_effective_router('a2').default_application, None)
        self.assertEqual(get_effective_router('a2').default_controller, "c2")
        self.assertEqual(get_effective_router('a1').controllers, set(['c1a', 'c1b', 'default', 'static']))
        self.assertEqual(get_effective_router('a2').controllers, set())
        self.assertEqual(get_effective_router('a3').controllers, set(['c1', 'c2', 'static']))
        self.assertEqual(get_effective_router('a4').functions, set(['f1', 'f2']))
        self.assertEqual(get_effective_router('xx'), None)

    def test_router_error(self):
        '''
        Test rewrite of HTTP errors
        '''
        router_err = dict()
        load(rdict=router_err)
        self.assertEqual(filter_err(200), 200)
        self.assertEqual(filter_err(399), 399)
        self.assertEqual(filter_err(400), 400)

    def test_router_args(self):
        '''
        Test URL args parsing/generation
        '''
        load(rdict=dict())
        self.assertEqual(filter_url('http://domain.com/init/default/f/arg1'), 
            "/init/default/f ['arg1']")
        self.assertEqual(filter_url('http://domain.com/init/default/f/arg1/'), 
            "/init/default/f ['arg1']")
        self.assertEqual(filter_url('http://domain.com/init/default/f/arg1//'), 
            "/init/default/f ['arg1', '']")
        self.assertEqual(filter_url('http://domain.com/init/default/f//arg1'), 
            "/init/default/f ['', 'arg1']")
        self.assertEqual(filter_url('http://domain.com/init/default/f/arg1/arg2'), 
            "/init/default/f ['arg1', 'arg2']")

        self.assertEqual(filter_url('http://domain.com/init/default/f', out=True), "/f")
        self.assertEqual(map_url_out(None, None, 'init', 'default', 'f', None, None, None, None, None), "/f")
        self.assertEqual(map_url_out(None, None, 'init', 'default', 'f', [], None, None, None, None), "/f")
        self.assertEqual(map_url_out(None, None, 'init', 'default', 'f', ['arg1'], None, None, None, None), "/f")
        self.assertEqual(map_url_out(None, None, 'init', 'default', 'f', ['arg1', ''], None, None, None, None), "/f")
        self.assertEqual(str(URL(a='init', c='default', f='f', args=None)), "/f")
        self.assertEqual(str(URL(a='init', c='default', f='f', args=['arg1'])), "/f/arg1")
        self.assertEqual(str(URL(a='init', c='default', f='f', args=['arg1', ''])), "/f/arg1//")
        self.assertEqual(str(URL(a='init', c='default', f='f', args=['arg1', '', 'arg3'])), "/f/arg1//arg3")
        self.assertEqual(str(URL(a='init', c='default', f='f', args=['ar g'])), "/f/ar%20g")
        self.assertEqual(str(URL(a='init', c='default', f='f', args=['årg'])), "/f/%C3%A5rg")
        self.assertEqual(str(URL(a='init', c='default', f='fünc')), "/f\xc3\xbcnc")

    def test_routes_anchor(self):
        '''
        Test URL with anchor
        '''
        self.assertEqual(str(URL(a='a', c='c', f='f', anchor='anchor')), "/a/c/f#anchor")
        load(rdict=dict())
        self.assertEqual(str(URL(a='a', c='c', f='f', anchor='anchor')), "/a/c/f#anchor")
        args = ['a1', 'a2']
        self.assertEqual(str(URL(a='a', c='c', f='f', args=args, anchor='anchor')), 
            "/a/c/f/a1/a2#anchor")
        vars = dict(v1=1, v2=2)
        self.assertEqual(str(URL(a='a', c='c', f='f', vars=vars, anchor='anchor')), 
            "/a/c/f?v1=1&v2=2#anchor")
        self.assertEqual(str(URL(a='a', c='c', f='f', args=args, vars=vars, anchor='anchor')), 
            "/a/c/f/a1/a2?v1=1&v2=2#anchor")
        self.assertEqual(str(URL(a='init', c='default', f='index')),
            "/")
        self.assertEqual(str(URL(a='init', c='default', f='f')),
            "/f")
        self.assertEqual(str(URL(a='init', c='default', f='index', anchor='anchor')),
            "/#anchor")
        self.assertEqual(str(URL(a='init', c='default', f='f', anchor='anchor')),
            "/f#anchor")

    def test_router_prefix(self):
        '''
        Test path_prefix
        '''
        router_path_prefix = dict(
            BASE = dict(
                default_application = 'a1',
                applications = ['a1', 'a2'],
                path_prefix = '/path/to/apps',
            ),
            a1 = dict(
                controllers = ['c1a', 'c1b', 'default'],
            ),
            a2 = dict(
                default_controller = 'c2',
                controllers = [],
            ),
        )
        load(rdict=router_path_prefix)
        self.assertEqual(str(URL(a='a1', c='c1a', f='f')), 
            "/path/to/apps/c1a/f")
        self.assertEqual(str(URL(a='a2', c='c', f='f')), 
            "/path/to/apps/a2/c/f")
        self.assertEqual(str(URL(a='a2', c='c2', f='f')), 
            "/path/to/apps/a2/c2/f")
        self.assertEqual(filter_url('http://domain.com/a1/'), "/a1/default/index")
        self.assertEqual(filter_url('http://domain.com/path/to/apps/a1/'), "/a1/default/index")
        self.assertEqual(filter_url('http://domain.com/path/to/a1/'), "/a1/default/path ['to', 'a1']")

    def test_router_absolute(self):
        '''
        Test absolute URL
        '''
        load(rdict=dict())
        r = Storage()
        r.env = Storage()
        r.env.http_host = 'domain.com'
        r.env.WSGI_URL_SCHEME = 'httpx' # distinguish incoming scheme
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f')), "/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', host=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', host='host.com')), 
            "httpx://host.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=False)), 
            "/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='https')), 
            "https://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='wss')), 
            "wss://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True, host=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='https', host=True)), 
            "https://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=False, host=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True, host='host.com')), 
            "httpx://host.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=False, host='host.com')), 
            "httpx://host.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', port=1234)), 
            "httpx://domain.com:1234/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True, port=1234)), 
            "httpx://domain.com:1234/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', host='host.com', port=1234)), 
            "httpx://host.com:1234/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='wss', host='host.com', port=1234)), 
            "wss://host.com:1234/a/c/f")

    def test_request_uri(self):
        '''
        Test REQUEST_URI in env
        '''
        load(rdict=dict())
        self.assertEqual(filter_url('http://domain.com/abc', env=True).request_uri, 
            '/init/default/abc')
        self.assertEqual(filter_url('http://domain.com/abc?def', env=True).request_uri, 
            '/init/default/abc?def')
        self.assertEqual(filter_url('http://domain.com/index/abc', env=True).request_uri, 
            "/init/default/index/abc")
        self.assertEqual(filter_url('http://domain.com/abc/def', env=True).request_uri, 
            "/init/default/abc/def")
        self.assertEqual(filter_url('http://domain.com/index/a%20bc', env=True).request_uri, 
            "/init/default/index/a%20bc")

if __name__ == '__main__':
    setUpModule()       # pre-2.7
    unittest.main()
    tearDownModule()

Added gluon/tests/test_routes.py version [b83cc3adf9].












































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Unit tests for rewrite.py regex routing option"""

import sys
import os
import unittest
import tempfile
import logging

if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon')) # running from web2py base
else:
    sys.path.append(os.path.realpath('../')) # running from gluon/tests/

from rewrite import load, filter_url, filter_err, get_effective_router, regex_filter_out, regex_select
from html import URL
from fileutils import abspath
from settings import global_settings
from http import HTTP
from storage import Storage

logger = None
oldcwd = None
root = None

def setUpModule():
    def make_apptree():
        "build a temporary applications tree"
        #  applications/
        os.mkdir(abspath('applications'))
        #  applications/app/
        for app in ('admin', 'examples', 'welcome'):
            os.mkdir(abspath('applications', app))
            #  applications/app/(controllers, static)
            for subdir in ('controllers', 'static'):
                os.mkdir(abspath('applications', app, subdir))
        #  applications/admin/controllers/*.py
        for ctr in ('appadmin', 'default', 'gae', 'mercurial', 'shell', 'wizard'):
            open(abspath('applications', 'admin', 'controllers', '%s.py' % ctr), 'w').close()
        #  applications/examples/controllers/*.py
        for ctr in ('ajax_examples', 'appadmin', 'default', 'global', 'spreadsheet'):
            open(abspath('applications', 'examples', 'controllers', '%s.py' % ctr), 'w').close()
        #  applications/welcome/controllers/*.py
        for ctr in ('appadmin', 'default'):
            open(abspath('applications', 'welcome', 'controllers', '%s.py' % ctr), 'w').close()
        #  create an app-specific routes.py for examples app
        routes = open(abspath('applications', 'examples', 'routes.py'), 'w')
        routes.write("default_function='exdef'\n")
        routes.close()

    global oldcwd
    if oldcwd is None:  # do this only once
        oldcwd = os.getcwd()
        if not os.path.isdir('gluon'):
            os.chdir(os.path.realpath('../../'))    # run from web2py base directory
        import main   # for initialization after chdir
        global logger
        logger = logging.getLogger('web2py.rewrite')
        global_settings.applications_parent = tempfile.mkdtemp()
        global root
        root = global_settings.applications_parent
        make_apptree()

def tearDownModule():
    global oldcwd
    if oldcwd is not None:
        os.chdir(oldcwd)
        oldcwd = None


class TestRoutes(unittest.TestCase):
    """ Tests the regex routing logic from gluon.rewrite """

    def test_routes_null(self):
        """ Tests a null routes table """
        load(data='')
        # incoming
        self.assertEqual(filter_url('http://domain.com'), '/init/default/index')
        self.assertEqual(filter_url('http://domain.com/'), '/init/default/index')
        self.assertEqual(filter_url('http://domain.com/abc'), '/abc/default/index')
        self.assertEqual(filter_url('http://domain.com/abc/'), '/abc/default/index')
        self.assertEqual(filter_url('http://domain.com/abc/def'), "/abc/def/index")
        self.assertEqual(filter_url('http://domain.com/abc/def/'), "/abc/def/index")
        self.assertEqual(filter_url('http://domain.com/abc/def/ghi'), "/abc/def/ghi")
        self.assertEqual(filter_url('http://domain.com/abc/def/ghi/'), "/abc/def/ghi")
        self.assertEqual(filter_url('http://domain.com/abc/def/ghi/jkl'), "/abc/def/ghi ['jkl']")
        self.assertEqual(filter_url('http://domain.com/abc/def/ghi/j%20kl'), "/abc/def/ghi ['j_kl']")
        self.assertEqual(filter_url('http://domain.com/welcome/static/path/to/static'), "%s/applications/welcome/static/path/to/static" % root)
        self.assertRaises(HTTP, filter_url, 'http://domain.com/welcome/static/bad/path/to/st~tic')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, "400.*BAD REQUEST \[invalid path\]", filter_url, 'http://domain.com/welcome/static/bad/path/to/st~tic')
        except AttributeError:
            pass
        # outgoing
        self.assertEqual(filter_url('http://domain.com/init/default/index', out=True), '/init/default/index')
        self.assertEqual(filter_url('http://domain.com/init/default/index/arg1', out=True), '/init/default/index/arg1')
        self.assertEqual(filter_url('http://domain.com/init/default/abc', out=True), '/init/default/abc')

    def test_routes_query(self):
        """ Test query appending """
        data = r'''
routes_in = (
 ('/service/$model/create', '/app/default/call/json/create?model=$model'),
)
'''
        load(data=data)
        self.assertEqual(filter_url('http://localhost:8000/service/person/create'), "/app/default/call ['json', 'create'] ?model=person")
        self.assertEqual(filter_url('http://localhost:8000/service/person/create?var1=val1'), "/app/default/call ['json', 'create'] ?model=person&var1=val1")

    def test_routes_specific(self):
        """ 
        Test app-specific routes.py 
        
        Note that make_apptree above created applications/examples/routes.py with a default_function.
        """
        data = r'''
routes_app = [
    (r'/(?P<app>welcome|admin|examples)\b.*', r'\g<app>'),
    (r'$anything', r'welcome'),
    (r'/?$anything', r'welcome'),
]
'''
        load(data=data)
        self.assertEqual(filter_url('http://domain.com/welcome'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/examples'), '/examples/default/exdef')

    def test_routes_defapp(self):
        """ Test the default-application function """
        data = r'''
default_application = 'defapp'
'''
        load(data=data)
        # incoming
        self.assertEqual(filter_url('http://domain.com'), '/defapp/default/index')
        self.assertEqual(filter_url('http://domain.com/'), '/defapp/default/index')
        self.assertEqual(filter_url('http://domain.com/welcome'), '/welcome/default/index')
        self.assertEqual(filter_url('http://domain.com/app'), '/app/default/index')
        self.assertEqual(filter_url('http://domain.com/welcome/default/index/abc'), "/welcome/default/index ['abc']")
        self.assertEqual(filter_url('http://domain.com/welcome/static/abc'), '%s/applications/welcome/static/abc' % root)
        self.assertEqual(filter_url('http://domain.com/defapp/static/path/to/static'), "%s/applications/defapp/static/path/to/static" % root)

    def test_routes_raise(self):
        '''
        Test URLs that raise exceptions
        '''
        # test non-exception variants
        load(data='')
        self.assertEqual(filter_url('http://domain.com/init'),  "/init/default/index")
        self.assertEqual(filter_url('http://domain.com/init/default'),  "/init/default/index")
        self.assertEqual(filter_url('http://domain.com/init/default/fcn.ext'),  "/init/default/fcn.ext")
        self.assertEqual(filter_url('http://domain.com/init/default/fcn/arg'),  "/init/default/fcn ['arg']")
        # now raise-HTTP variants
        self.assertRaises(HTTP, filter_url, 'http://domain.com/bad!ctl')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/ctl/bad!fcn')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/ctl/fcn.bad!ext')
        self.assertRaises(HTTP, filter_url, 'http://domain.com/ctl/fcn/bad!arg')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, '400 BAD REQUEST \[invalid path\]', filter_url, 'http://domain.com/init/bad!ctl')
            self.assertRaisesRegexp(HTTP, '400 BAD REQUEST \[invalid path\]', filter_url, 'http://domain.com/init/ctlr/bad!fcn')
            self.assertRaisesRegexp(HTTP, '400 BAD REQUEST \[invalid path\]', filter_url, 'http://domain.com/init/ctlr/fcn.bad!ext')
            self.assertRaisesRegexp(HTTP, '400 BAD REQUEST \[invalid path \(args\)\]', filter_url, 'http://domain.com/appc/init/fcn/bad!arg')
        except AttributeError:
            pass

        self.assertEqual(filter_url('http://domain.com/welcome/default/fcn_1'),  "/welcome/default/fcn_1")
        self.assertRaises(HTTP, filter_url, 'http://domain.com/welcome/default/fcn-1')
        try:
            # 2.7+ only
            self.assertRaisesRegexp(HTTP, '400 BAD REQUEST \[invalid path\]', filter_url, 'http://domain.com/welcome/default/fcn-1')
        except AttributeError:
            pass

    def test_routes_error(self):
        '''
        Test rewrite of HTTP errors
        '''
        router_err = dict()
        load(rdict=router_err)
        self.assertEqual(filter_err(200), 200)
        self.assertEqual(filter_err(399), 399)
        self.assertEqual(filter_err(400), 400)

    def test_routes_args(self):
        '''
        Test URL args parsing/generation
        '''
        data = r'''routes_in = [
    ('/robots.txt', '/welcome/static/robots.txt'), 
    ('/favicon.ico', '/welcome/static/favicon.ico'), 
    ('/admin$anything', '/admin$anything'), 
    ('.*:https?://(.*\\.)?domain1.com:$method /', '/app1/default'), 
    ('.*:https?://(.*\\.)?domain1.com:$method /static/$anything', '/app1/static/$anything'), 
    ('.*:https?://(.*\\.)?domain1.com:$method /appadmin/$anything', '/app1/appadmin/$anything'), 
    ('.*:https?://(.*\\.)?domain1.com:$method /$anything', '/app1/default/$anything'), 
    ('.*:https?://(.*\\.)?domain2.com:$method /', '/app2/default'), 
    ('.*:https?://(.*\\.)?domain2.com:$method /static/$anything', '/app2/static/$anything'), 
    ('.*:https?://(.*\\.)?domain2.com:$method /appadmin/$anything', '/app2/appadmin/$anything'), 
    ('.*:https?://(.*\\.)?domain2.com:$method /$anything', '/app2/default/$anything'), 
    ('.*:https?://(.*\\.)?domain3.com:$method /', '/app3/defcon3'), 
    ('.*:https?://(.*\\.)?domain3.com:$method /static/$anything', '/app3/static/$anything'), 
    ('.*:https?://(.*\\.)?domain3.com:$method /appadmin/$anything', '/app3/appadmin/$anything'), 
    ('.*:https?://(.*\\.)?domain3.com:$method /$anything', '/app3/defcon3/$anything'),
    ('/', '/welcome/default'), 
    ('/welcome/default/$anything', '/welcome/default/$anything'), 
    ('/welcome/$anything', '/welcome/default/$anything'), 
    ('/static/$anything', '/welcome/static/$anything'), 
    ('/appadmin/$anything', '/welcome/appadmin/$anything'), 
    ('/$anything', '/welcome/default/$anything'), 
    ]
routes_out = [
    ('/welcome/static/$anything', '/static/$anything'), 
    ('/welcome/appadmin/$anything', '/appadmin/$anything'), 
    ('/welcome/default/$anything', '/$anything'), 
    ('/app1/static/$anything', '/static/$anything'), 
    ('/app1/appadmin/$anything', '/appadmin/$anything'), 
    ('/app1/default/$anything', '/$anything'), 
    ('/app2/static/$anything', '/static/$anything'), 
    ('/app2/appadmin/$anything', '/appadmin/$anything'), 
    ('/app2/default/$anything', '/$anything'), 
    ('/app3/static/$anything', '/static/$anything'), 
    ('/app3/appadmin/$anything', '/appadmin/$anything'), 
    ('/app3/defcon3/$anything', '/$anything')
    ]
'''
        load(data=data)
        self.assertEqual(filter_url('http://domain.com/welcome/default/f/arg1'), 
            "/welcome/default/f ['arg1']")
        self.assertEqual(filter_url('http://domain.com/welcome/default/f/arg1/'), 
            "/welcome/default/f ['arg1']")
        self.assertEqual(filter_url('http://domain.com/welcome/default/f/arg1//'), 
            "/welcome/default/f ['arg1', '']")
        self.assertEqual(filter_url('http://domain.com/welcome/default/f//arg1'), 
            "/welcome/default/f ['', 'arg1']")
        self.assertEqual(filter_url('http://domain.com/welcome/default/f/arg1/arg2'), 
            "/welcome/default/f ['arg1', 'arg2']")

        self.assertEqual(filter_url('http://domain.com/welcome/default/f', out=True), "/f")
        self.assertEqual(regex_filter_out('/welcome/default/f'), "/f")
        self.assertEqual(str(URL(a='welcome', c='default', f='f', args=None)), "/f")
        self.assertEqual(str(URL(a='welcome', c='default', f='f', args=['arg1'])), "/f/arg1")
        self.assertEqual(str(URL(a='welcome', c='default', f='f', args=['arg1', ''])), "/f/arg1//")
        self.assertEqual(str(URL(a='welcome', c='default', f='f', args=['arg1', '', 'arg3'])), "/f/arg1//arg3")
        self.assertEqual(str(URL(a='welcome', c='default', f='f', args=['ar g'])), "/f/ar%20g")
        self.assertEqual(str(URL(a='welcome', c='default', f='f', args=['årg'])), "/f/%C3%A5rg")
        self.assertEqual(str(URL(a='welcome', c='default', f='fünc')), "/f\xc3\xbcnc")

    def test_routes_anchor(self):
        '''
        Test URL with anchor
        '''
        self.assertEqual(str(URL(a='a', c='c', f='f', anchor='anchor')), "/a/c/f#anchor")
        load(data='')
        self.assertEqual(str(URL(a='a', c='c', f='f', anchor='anchor')), "/a/c/f#anchor")
        args = ['a1', 'a2']
        self.assertEqual(str(URL(a='a', c='c', f='f', args=args, anchor='anchor')), 
            "/a/c/f/a1/a2#anchor")
        vars = dict(v1=1, v2=2)
        self.assertEqual(str(URL(a='a', c='c', f='f', vars=vars, anchor='anchor')), 
            "/a/c/f?v1=1&v2=2#anchor")
        self.assertEqual(str(URL(a='a', c='c', f='f', args=args, vars=vars, anchor='anchor')), 
            "/a/c/f/a1/a2?v1=1&v2=2#anchor")

        data = r'''routes_out = [
            ('/init/default/index', '/'), 
        ]'''
        load(data=data)
        self.assertEqual(str(URL(a='init', c='default', f='index')),
            "/")
        self.assertEqual(str(URL(a='init', c='default', f='index', anchor='anchor')),
            "/init/default/index#anchor")

        data = r'''routes_out = [
            (r'/init/default/index(?P<anchor>(#.*)?)', r'/\g<anchor>'), 
        ]'''
        load(data=data)
        self.assertEqual(str(URL(a='init', c='default', f='index')),
            "/")
        self.assertEqual(str(URL(a='init', c='default', f='index', anchor='anchor')),
            "/#anchor")

        data = r'''routes_out = [
            (r'/init/default/index(?P<qa>([?#].*)?)', r'/\g<qa>'), 
        ]'''
        load(data=data)
        self.assertEqual(str(URL(a='init', c='default', f='index')),
            "/")
        self.assertEqual(str(URL(a='init', c='default', f='index', anchor='anchor')),
            "/#anchor")
        query = dict(var='abc')
        self.assertEqual(str(URL(a='init', c='default', f='index', vars=query)),
            "/?var=abc")
        self.assertEqual(str(URL(a='init', c='default', f='index', vars=query, anchor='anchor')),
            "/?var=abc#anchor")

    def test_routes_absolute(self):
        '''
        Test absolute URL
        '''
        load(data='')
        r = Storage()
        r.env = Storage()
        r.env.http_host = 'domain.com'
        r.env.WSGI_URL_SCHEME = 'httpx' # distinguish incoming scheme
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f')), "/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', host=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', host='host.com')), 
            "httpx://host.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=False)), 
            "/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='https')), 
            "https://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='wss')), 
            "wss://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True, host=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='https', host=True)), 
            "https://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=False, host=True)), 
            "httpx://domain.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True, host='host.com')), 
            "httpx://host.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=False, host='host.com')), 
            "httpx://host.com/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', port=1234)), 
            "httpx://domain.com:1234/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme=True, port=1234)), 
            "httpx://domain.com:1234/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', host='host.com', port=1234)), 
            "httpx://host.com:1234/a/c/f")
        self.assertEqual(str(URL(r=r, a='a', c='c', f='f', scheme='wss', host='host.com', port=1234)), 
            "wss://host.com:1234/a/c/f")

    def test_request_uri(self):
        '''
        Test REQUEST_URI in env
        '''
        data = r'''routes_in = [
    ('/abc', '/init/default/abc'), 
    ('/index/$anything', '/init/default/index/$anything'), 
    ]
'''
        load(data=data)
        self.assertEqual(filter_url('http://domain.com/abc', env=True).request_uri, 
            '/init/default/abc')
        self.assertEqual(filter_url('http://domain.com/abc?def', env=True).request_uri, 
            '/init/default/abc?def')
        self.assertEqual(filter_url('http://domain.com/index/abc', env=True).request_uri, 
            "/init/default/index/abc")
        self.assertEqual(filter_url('http://domain.com/index/a%20bc', env=True).request_uri, 
            "/init/default/index/a bc")


if __name__ == '__main__':
    setUpModule()       # pre-2.7
    unittest.main()
    tearDownModule()

Added gluon/tests/test_template.py version [d46f518e57].





























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    Unit tests for gluon.template
"""

import sys
import os
if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon'))
else:
    sys.path.append(os.path.realpath('../'))

import unittest
from template import render

class TestVirtualFields(unittest.TestCase):

    def testRun(self):
        self.assertEqual(render(content='{{for i in range(n):}}{{=i}}{{pass}}',
                      context=dict(n=3)), '012')
        self.assertEqual(render(content='{{if n>2:}}ok{{pass}}',
                      context=dict(n=3)), 'ok')
        self.assertEqual(render(content='{{try:}}{{n/0}}{{except:}}fail{{pass}}',
                      context=dict(n=3)), 'fail')
        self.assertEqual(render(content='{{="<&>"}}'), '&lt;&amp;&gt;')
        self.assertEqual(render(content='"abc"'), '"abc"')
        self.assertEqual(render(content='"a\'bc"'), '"a\'bc"')
        self.assertEqual(render(content='"a\"bc"'), '"a\"bc"')
        self.assertEqual(render(content=r'''"a\"bc"'''), r'"a\"bc"')
        self.assertEqual(render(content=r'''"""abc\""""'''), r'"""abc\""""')

    def testEqualWrite(self):
        "test generation of response.write from ="
        self.assertEqual(render(content='{{="abc"}}'), 'abc')
        # whitespace is stripped
        self.assertEqual(render(content='{{ ="abc"}}'), 'abc')
        self.assertEqual(render(content='{{ ="abc" }}'), 'abc')
        self.assertEqual(render(content='{{pass\n="abc" }}'), 'abc')
        # = recognized only at the beginning of a physical line
        self.assertEqual(render(content='{{xyz = "xyz"\n="abc"\n="def"\n=xyz }}'), 'abcdefxyz')
        # = in python blocks
        self.assertEqual(render(content='{{if True:\n="abc"\npass }}'), 'abc')
        self.assertEqual(render(content='{{if True:\n="abc"\npass\n="def" }}'), 'abcdef')
        self.assertEqual(render(content='{{if False:\n="abc"\npass\n="def" }}'), 'def')
        self.assertEqual(render(content='{{if True:\n="abc"\nelse:\n="def"\npass }}'), 'abc')
        self.assertEqual(render(content='{{if False:\n="abc"\nelse:\n="def"\npass }}'), 'def')
        # codeblock-leading = handles internal newlines, escaped or not
        self.assertEqual(render(content='{{=list((1,2,3))}}'), '[1, 2, 3]')
        self.assertEqual(render(content='{{=list((1,2,\\\n3))}}'), '[1, 2, 3]')
        self.assertEqual(render(content='{{=list((1,2,\n3))}}'), '[1, 2, 3]')
        # ...but that means no more = operators in the codeblock
        self.assertRaises(SyntaxError, render, content='{{="abc"\n="def" }}')
        # = embedded in codeblock won't handle newlines in its argument
        self.assertEqual(render(content='{{pass\n=list((1,2,\\\n3))}}'), '[1, 2, 3]')
        self.assertRaises(SyntaxError, render, content='{{pass\n=list((1,2,\n3))}}')


if __name__ == '__main__':
    unittest.main()

Added gluon/tests/test_utils.py version [6bfc7477cb].




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

""" Unit tests for utils.py """

import sys
import os
import unittest
if os.path.isdir('gluon'):
    sys.path.append(os.path.realpath('gluon'))
else:
    sys.path.append(os.path.realpath('../'))

from utils import md5_hash


class TestUtils(unittest.TestCase):
    """ Tests the utils.py module """

    def test_md5_hash(self):
        """ Tests the md5_hash function """

        data = md5_hash("web2py rocks")
        self.assertEqual(data, '79509f3246a2824dee64635303e99204')

if __name__ == '__main__':
    unittest.main()

Added gluon/tools.py version [af2a86f800].




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

import base64
import cPickle
import datetime
import thread
import logging
import sys
import os
import re
import time
import copy
import smtplib
import urllib
import urllib2
import Cookie
import cStringIO
from email import MIMEBase, MIMEMultipart, MIMEText, Encoders, Header, message_from_string

from contenttype import contenttype
from storage import Storage, StorageList, Settings, Messages
from utils import web2py_uuid
from gluon import *
from fileutils import read_file

import serializers
import contrib.simplejson as simplejson


__all__ = ['Mail', 'Auth', 'Recaptcha', 'Crud', 'Service', 'PluginManager', 'fetch', 'geocode', 'prettydate']

logger = logging.getLogger("web2py")

DEFAULT = lambda: None

def callback(actions,form,tablename=None):
    if actions:
        if tablename and isinstance(actions,dict):
            actions = actions.get(tablename, [])
        if not isinstance(actions,(list, tuple)):
            actions = [actions]
        [action(form) for action in actions]

def validators(*a):
    b = []
    for item in a:
        if isinstance(item, (list, tuple)):
            b = b + list(item)
        else:
            b.append(item)
    return b

def call_or_redirect(f,*args):
    if callable(f):
        redirect(f(*args))
    else:
        redirect(f)

class Mail(object):
    """
    Class for configuring and sending emails with alternative text / html
    body, multiple attachments and encryption support

    Works with SMTP and Google App Engine.
    """

    class Attachment(MIMEBase.MIMEBase):
        """
        Email attachment

        Arguments::

            payload: path to file or file-like object with read() method
            filename: name of the attachment stored in message; if set to
                      None, it will be fetched from payload path; file-like
                      object payload must have explicit filename specified
            content_id: id of the attachment; automatically contained within
                        < and >
            content_type: content type of the attachment; if set to None,
                          it will be fetched from filename using gluon.contenttype
                          module
            encoding: encoding of all strings passed to this function (except
                      attachment body)

        Content ID is used to identify attachments within the html body;
        in example, attached image with content ID 'photo' may be used in
        html message as a source of img tag <img src="cid:photo" />.

        Examples::

            #Create attachment from text file:
            attachment = Mail.Attachment('/path/to/file.txt')

            Content-Type: text/plain
            MIME-Version: 1.0
            Content-Disposition: attachment; filename="file.txt"
            Content-Transfer-Encoding: base64

            SOMEBASE64CONTENT=

            #Create attachment from image file with custom filename and cid:
            attachment = Mail.Attachment('/path/to/file.png',
                                             filename='photo.png',
                                             content_id='photo')

            Content-Type: image/png
            MIME-Version: 1.0
            Content-Disposition: attachment; filename="photo.png"
            Content-Id: <photo>
            Content-Transfer-Encoding: base64

            SOMEOTHERBASE64CONTENT=
        """

        def __init__(
            self,
            payload,
            filename=None,
            content_id=None,
            content_type=None,
            encoding='utf-8'):
            if isinstance(payload, str):
                if filename == None:
                    filename = os.path.basename(payload)
                payload = read_file(payload, 'rb')
            else:
                if filename == None:
                    raise Exception('Missing attachment name')
                payload = payload.read()
            filename = filename.encode(encoding)
            if content_type == None:
                content_type = contenttype(filename)
            self.my_filename = filename
            self.my_payload = payload
            MIMEBase.MIMEBase.__init__(self, *content_type.split('/', 1))
            self.set_payload(payload)
            self['Content-Disposition'] = 'attachment; filename="%s"' % filename
            if content_id != None:
                self['Content-Id'] = '<%s>' % content_id.encode(encoding)
            Encoders.encode_base64(self)

    def __init__(self, server=None, sender=None, login=None, tls=True):
        """
        Main Mail object

        Arguments::

            server: SMTP server address in address:port notation
            sender: sender email address
            login: sender login name and password in login:password notation
                   or None if no authentication is required
            tls: enables/disables encryption (True by default)

        In Google App Engine use::

            server='gae'

        For sake of backward compatibility all fields are optional and default
        to None, however, to be able to send emails at least server and sender
        must be specified. They are available under following fields:

            mail.settings.server
            mail.settings.sender
            mail.settings.login

        When server is 'logging', email is logged but not sent (debug mode)

        Optionally you can use PGP encryption or X509:

            mail.settings.cipher_type = None
            mail.settings.sign = True
            mail.settings.sign_passphrase = None
            mail.settings.encrypt = True
            mail.settings.x509_sign_keyfile = None
            mail.settings.x509_sign_certfile = None
            mail.settings.x509_crypt_certfiles = None

            cipher_type       : None
                                gpg - need a python-pyme package and gpgme lib
                                x509 - smime
            sign              : sign the message (True or False)
            sign_passphrase   : passphrase for key signing
            encrypt           : encrypt the message
                             ... x509 only ...
            x509_sign_keyfile : the signers private key filename (PEM format)
            x509_sign_certfile: the signers certificate filename (PEM format)
            x509_crypt_certfiles: the certificates file to encrypt the messages
                                  with can be a file name or a list of
                                  file names (PEM format)

        Examples::

            #Create Mail object with authentication data for remote server:
            mail = Mail('example.com:25', 'me@example.com', 'me:password')
        """

        settings = self.settings = Settings()
        settings.server = server
        settings.sender = sender
        settings.login = login
        settings.tls = tls
        settings.ssl = False
        settings.cipher_type = None
        settings.sign = True
        settings.sign_passphrase = None
        settings.encrypt = True
        settings.x509_sign_keyfile = None
        settings.x509_sign_certfile = None
        settings.x509_crypt_certfiles = None
        settings.debug = False
        settings.lock_keys = True
        self.result = {}
        self.error = None

    def send(
        self,
        to,
        subject='None',
        message='None',
        attachments=None,
        cc=None,
        bcc=None,
        reply_to=None,
        encoding='utf-8',
        ):
        """
        Sends an email using data specified in constructor

        Arguments::

            to: list or tuple of receiver addresses; will also accept single
                object
            subject: subject of the email
            message: email body text; depends on type of passed object:
                     if 2-list or 2-tuple is passed: first element will be
                     source of plain text while second of html text;
                     otherwise: object will be the only source of plain text
                     and html source will be set to None;
                     If text or html source is:
                     None: content part will be ignored,
                     string: content part will be set to it,
                     file-like object: content part will be fetched from
                                       it using it's read() method
            attachments: list or tuple of Mail.Attachment objects; will also
                         accept single object
            cc: list or tuple of carbon copy receiver addresses; will also
                accept single object
            bcc: list or tuple of blind carbon copy receiver addresses; will
                also accept single object
            reply_to: address to which reply should be composed
            encoding: encoding of all strings passed to this method (including
                      message bodies)

        Examples::

            #Send plain text message to single address:
            mail.send('you@example.com',
                      'Message subject',
                      'Plain text body of the message')

            #Send html message to single address:
            mail.send('you@example.com',
                      'Message subject',
                      '<html>Plain text body of the message</html>')

            #Send text and html message to three addresses (two in cc):
            mail.send('you@example.com',
                      'Message subject',
                      ('Plain text body', '<html>html body</html>'),
                      cc=['other1@example.com', 'other2@example.com'])

            #Send html only message with image attachment available from
            the message by 'photo' content id:
            mail.send('you@example.com',
                      'Message subject',
                      (None, '<html><img src="cid:photo" /></html>'),
                      Mail.Attachment('/path/to/photo.jpg'
                                      content_id='photo'))

            #Send email with two attachments and no body text
            mail.send('you@example.com,
                      'Message subject',
                      None,
                      [Mail.Attachment('/path/to/fist.file'),
                       Mail.Attachment('/path/to/second.file')])

        Returns True on success, False on failure.

        Before return, method updates two object's fields:
        self.result: return value of smtplib.SMTP.sendmail() or GAE's
                     mail.send_mail() method
        self.error: Exception message or None if above was successful
        """

        def encode_header(key):
            if [c for c in key if 32>ord(c) or ord(c)>127]:
                return Header.Header(key.encode('utf-8'),'utf-8')
            else:
                return key

        if not isinstance(self.settings.server, str):
            raise Exception('Server address not specified')
        if not isinstance(self.settings.sender, str):
            raise Exception('Sender address not specified')
        payload_in = MIMEMultipart.MIMEMultipart('mixed')
        if to:
            if not isinstance(to, (list,tuple)):
                to = [to]
        else:
            raise Exception('Target receiver address not specified')
        if cc:
            if not isinstance(cc, (list, tuple)):
                cc = [cc]
        if bcc:
            if not isinstance(bcc, (list, tuple)):
                bcc = [bcc]
        if message == None:
            text = html = None
        elif isinstance(message, (list, tuple)):
            text, html = message
        elif message.strip().startswith('<html') and message.strip().endswith('</html>'):
            text = self.settings.server=='gae' and message or None
            html = message
        else:
            text = message
            html = None
        if text != None or html != None:
            attachment = MIMEMultipart.MIMEMultipart('alternative')
            if text != None:
                if isinstance(text, basestring):
                    text = text.decode(encoding).encode('utf-8')
                else:
                    text = text.read().decode(encoding).encode('utf-8')
                attachment.attach(MIMEText.MIMEText(text,_charset='utf-8'))
            if html != None:
                if isinstance(html, basestring):
                    html = html.decode(encoding).encode('utf-8')
                else:
                    html = html.read().decode(encoding).encode('utf-8')
                attachment.attach(MIMEText.MIMEText(html, 'html',_charset='utf-8'))
            payload_in.attach(attachment)
        if attachments == None:
            pass
        elif isinstance(attachments, (list, tuple)):
            for attachment in attachments:
                payload_in.attach(attachment)
        else:
            payload_in.attach(attachments)


        #######################################################
        #                      CIPHER                         #
        #######################################################
        cipher_type = self.settings.cipher_type
        sign = self.settings.sign
        sign_passphrase = self.settings.sign_passphrase
        encrypt = self.settings.encrypt
        #######################################################
        #                       GPGME                         #
        #######################################################
        if cipher_type == 'gpg':
            if not sign and not encrypt:
                self.error="No sign and no encrypt is set but cipher type to gpg"
                return False

            # need a python-pyme package and gpgme lib
            from pyme import core, errors
            from pyme.constants.sig import mode
            ############################################
            #                   sign                   #
            ############################################
            if sign:
                import string
                core.check_version(None)
                pin=string.replace(payload_in.as_string(),'\n','\r\n')
                plain = core.Data(pin)
                sig = core.Data()
                c = core.Context()
                c.set_armor(1)
                c.signers_clear()
                # search for signing key for From:
                for sigkey in c.op_keylist_all(self.settings.sender, 1):
                    if sigkey.can_sign:
                        c.signers_add(sigkey)
                if not c.signers_enum(0):
                    self.error='No key for signing [%s]' % self.settings.sender
                    return False
                c.set_passphrase_cb(lambda x,y,z: sign_passphrase)
                try:
                    # make a signature
                    c.op_sign(plain,sig,mode.DETACH)
                    sig.seek(0,0)
                    # make it part of the email
                    payload=MIMEMultipart.MIMEMultipart('signed',
                                                        boundary=None,
                                                        _subparts=None,
                                                        **dict(micalg="pgp-sha1",
                                                               protocol="application/pgp-signature"))
                    # insert the origin payload
                    payload.attach(payload_in)
                    # insert the detached signature
                    p=MIMEBase.MIMEBase("application",'pgp-signature')
                    p.set_payload(sig.read())
                    payload.attach(p)
                    # it's just a trick to handle the no encryption case
                    payload_in=payload
                except errors.GPGMEError, ex:
                    self.error="GPG error: %s" % ex.getstring()
                    return False
            ############################################
            #                  encrypt                 #
            ############################################
            if encrypt:
                core.check_version(None)
                plain = core.Data(payload_in.as_string())
                cipher = core.Data()
                c = core.Context()
                c.set_armor(1)
                # collect the public keys for encryption
                recipients=[]
                rec=to[:]
                if cc:
                    rec.extend(cc)
                if bcc:
                    rec.extend(bcc)
                for addr in rec:
                    c.op_keylist_start(addr,0)
                    r = c.op_keylist_next()
                    if r == None:
                        self.error='No key for [%s]' % addr
                        return False
                    recipients.append(r)
                try:
                    # make the encryption
                    c.op_encrypt(recipients, 1, plain, cipher)
                    cipher.seek(0,0)
                    # make it a part of the email
                    payload=MIMEMultipart.MIMEMultipart('encrypted',
                                                        boundary=None,
                                                        _subparts=None,
                                                        **dict(protocol="application/pgp-encrypted"))
                    p=MIMEBase.MIMEBase("application",'pgp-encrypted')
                    p.set_payload("Version: 1\r\n")
                    payload.attach(p)
                    p=MIMEBase.MIMEBase("application",'octet-stream')
                    p.set_payload(cipher.read())
                    payload.attach(p)
                except errors.GPGMEError, ex:
                    self.error="GPG error: %s" % ex.getstring()
                    return False
        #######################################################
        #                       X.509                         #
        #######################################################
        elif cipher_type == 'x509':
            if not sign and not encrypt:
                self.error="No sign and no encrypt is set but cipher type to x509"
                return False
            x509_sign_keyfile=self.settings.x509_sign_keyfile
            if self.settings.x509_sign_certfile:
                x509_sign_certfile=self.settings.x509_sign_certfile
            else:
                # if there is no sign certfile we'll assume the
                # cert is in keyfile
                x509_sign_certfile=self.settings.x509_sign_keyfile
            # crypt certfiles could be a string or a list
            x509_crypt_certfiles=self.settings.x509_crypt_certfiles


            # need m2crypto
            from M2Crypto import BIO, SMIME, X509
            msg_bio = BIO.MemoryBuffer(payload_in.as_string())
            s = SMIME.SMIME()

            #                   SIGN
            if sign:
                #key for signing
                try:
                    s.load_key(x509_sign_keyfile, x509_sign_certfile, callback=lambda x: sign_passphrase)
                    if encrypt:
                        p7 = s.sign(msg_bio)
                    else:
                        p7 = s.sign(msg_bio,flags=SMIME.PKCS7_DETACHED)
                    msg_bio = BIO.MemoryBuffer(payload_in.as_string()) # Recreate coz sign() has consumed it.
                except Exception,e:
                    self.error="Something went wrong on signing: <%s>" %str(e)
                    return False

            #                   ENCRYPT
            if encrypt:
                try:
                    sk = X509.X509_Stack()
                    if not isinstance(x509_crypt_certfiles, (list, tuple)):
                        x509_crypt_certfiles = [x509_crypt_certfiles]

                    # make an encryption cert's stack
                    for x in x509_crypt_certfiles:
                        sk.push(X509.load_cert(x))
                    s.set_x509_stack(sk)

                    s.set_cipher(SMIME.Cipher('des_ede3_cbc'))
                    tmp_bio = BIO.MemoryBuffer()
                    if sign:
                        s.write(tmp_bio, p7)
                    else:
                        tmp_bio.write(payload_in.as_string())
                    p7 = s.encrypt(tmp_bio)
                except Exception,e:
                    self.error="Something went wrong on encrypting: <%s>" %str(e)
                    return False

            #                 Final stage in sign and encryption
            out = BIO.MemoryBuffer()
            if encrypt:
                s.write(out, p7)
            else:
                if sign:
                    s.write(out, p7, msg_bio, SMIME.PKCS7_DETACHED)
                else:
                    out.write('\r\n')
                    out.write(payload_in.as_string())
            out.close()
            st=str(out.read())
            payload=message_from_string(st)
        else:
            # no cryptography process as usual
            payload=payload_in
        payload['From'] = encode_header(self.settings.sender.decode(encoding))
        origTo = to[:]
        if to:
            payload['To'] = encode_header(', '.join(to).decode(encoding))
        if reply_to:
            payload['Reply-To'] = encode_header(reply_to.decode(encoding))
        if cc:
            payload['Cc'] = encode_header(', '.join(cc).decode(encoding))
            to.extend(cc)
        if bcc:
            to.extend(bcc)
        payload['Subject'] = encode_header(subject.decode(encoding))
        payload['Date'] = time.strftime("%a, %d %b %Y %H:%M:%S +0000",
                                        time.gmtime())
        result = {}
        try:
            if self.settings.server == 'logging':
                logger.warn('email not sent\n%s\nFrom: %s\nTo: %s\n\n%s\n%s\n' % \
                                 ('-'*40,self.settings.sender,
                                  ', '.join(to),text or html,'-'*40))
            elif self.settings.server == 'gae':
                xcc = dict()
                if cc:
                    xcc['cc'] = cc
                if bcc:
                    xcc['bcc'] = bcc
                from google.appengine.api import mail
                attachments = attachments and [(a.my_filename,a.my_payload) for a in attachments]
                if attachments:
                    result = mail.send_mail(sender=self.settings.sender, to=origTo,
                                            subject=subject, body=text, html=html,
                                            attachments=attachments, **xcc)
                elif html:
                    result = mail.send_mail(sender=self.settings.sender, to=origTo,
                                            subject=subject, body=text, html=html, **xcc)
                else:
                    result = mail.send_mail(sender=self.settings.sender, to=origTo,
                                            subject=subject, body=text, **xcc)
            else:
                smtp_args = self.settings.server.split(':')
                if self.settings.ssl: 
                    server = smtplib.SMTP_SSL(*smtp_args)
                else: 
                    server = smtplib.SMTP(*smtp_args)
                if self.settings.tls and not self.settings.ssl:                
                    server.ehlo()
                    server.starttls()
                    server.ehlo()
                if self.settings.login != None:
                    server.login(*self.settings.login.split(':',1))
                result = server.sendmail(self.settings.sender, to, payload.as_string())
                server.quit()
        except Exception, e:
            logger.warn('Mail.send failure:%s' % e)
            self.result = result
            self.error = e
            return False
        self.result = result
        self.error = None
        return True


class Recaptcha(DIV):

    API_SSL_SERVER = 'https://www.google.com/recaptcha/api'
    API_SERVER = 'http://www.google.com/recaptcha/api'
    VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify'

    def __init__(
        self,
        request,
        public_key='',
        private_key='',
        use_ssl=False,
        error=None,
        error_message='invalid',
        label = 'Verify:',
        options = ''
        ):
        self.remote_addr = request.env.remote_addr
        self.public_key = public_key
        self.private_key = private_key
        self.use_ssl = use_ssl
        self.error = error
        self.errors = Storage()
        self.error_message = error_message
        self.components = []
        self.attributes = {}
        self.label = label
        self.options = options
        self.comment = ''

    def _validate(self):

        # for local testing:

        recaptcha_challenge_field = \
            self.request_vars.recaptcha_challenge_field
        recaptcha_response_field = \
            self.request_vars.recaptcha_response_field
        private_key = self.private_key
        remoteip = self.remote_addr
        if not (recaptcha_response_field and recaptcha_challenge_field
                 and len(recaptcha_response_field)
                 and len(recaptcha_challenge_field)):
            self.errors['captcha'] = self.error_message
            return False
        params = urllib.urlencode({
            'privatekey': private_key,
            'remoteip': remoteip,
            'challenge': recaptcha_challenge_field,
            'response': recaptcha_response_field,
            })
        request = urllib2.Request(
            url=self.VERIFY_SERVER,
            data=params,
            headers={'Content-type': 'application/x-www-form-urlencoded',
                        'User-agent': 'reCAPTCHA Python'})
        httpresp = urllib2.urlopen(request)
        return_values = httpresp.read().splitlines()
        httpresp.close()
        return_code = return_values[0]
        if return_code == 'true':
            del self.request_vars.recaptcha_challenge_field
            del self.request_vars.recaptcha_response_field
            self.request_vars.captcha = ''
            return True
        self.errors['captcha'] = self.error_message
        return False

    def xml(self):
        public_key = self.public_key
        use_ssl = self.use_ssl
        error_param = ''
        if self.error:
            error_param = '&error=%s' % self.error
        if use_ssl:
            server = self.API_SSL_SERVER
        else:
            server = self.API_SERVER
        captcha = DIV(
            SCRIPT("var RecaptchaOptions = {%s};" % self.options),
            SCRIPT(_type="text/javascript",
                   _src="%s/challenge?k=%s%s" % (server,public_key,error_param)),
            TAG.noscript(IFRAME(_src="%s/noscript?k=%s%s" % (server,public_key,error_param),
                                _height="300",_width="500",_frameborder="0"), BR(),
                         INPUT(_type='hidden', _name='recaptcha_response_field',
                               _value='manual_challenge')), _id='recaptcha')
        if not self.errors.captcha:
            return XML(captcha).xml()
        else:
            captcha.append(DIV(self.errors['captcha'], _class='error'))
            return XML(captcha).xml()


def addrow(form,a,b,c,style,_id,position=-1):
    if style == "divs":
        form[0].insert(position, DIV(DIV(LABEL(a),_class='w2p_fl'),
                                     DIV(b, _class='w2p_fw'),
                                     DIV(c, _class='w2p_fc'),
                                     _id = _id))
    elif style == "table2cols":
        form[0].insert(position, TR(LABEL(a),''))
        form[0].insert(position+1, TR(b, _colspan=2, _id = _id))
    elif style == "ul":
        form[0].insert(position, LI(DIV(LABEL(a),_class='w2p_fl'),
                                    DIV(b, _class='w2p_fw'),
                                    DIV(c, _class='w2p_fc'),
                                    _id = _id))
    else:
        form[0].insert(position, TR(LABEL(a),b,c,_id = _id))


class Auth(object):
    """
    Class for authentication, authorization, role based access control.

    Includes:

    - registration and profile
    - login and logout
    - username and password retrieval
    - event logging
    - role creation and assignment
    - user defined group/role based permission

    Authentication Example::

        from contrib.utils import *
        mail=Mail()
        mail.settings.server='smtp.gmail.com:587'
        mail.settings.sender='you@somewhere.com'
        mail.settings.login='username:password'
        auth=Auth(globals(), db)
        auth.settings.mailer=mail
        # auth.settings....=...
        auth.define_tables()
        def authentication():
            return dict(form=auth())

    exposes:

    - http://.../{application}/{controller}/authentication/login
    - http://.../{application}/{controller}/authentication/logout
    - http://.../{application}/{controller}/authentication/register
    - http://.../{application}/{controller}/authentication/verify_email
    - http://.../{application}/{controller}/authentication/retrieve_username
    - http://.../{application}/{controller}/authentication/retrieve_password
    - http://.../{application}/{controller}/authentication/reset_password
    - http://.../{application}/{controller}/authentication/profile
    - http://.../{application}/{controller}/authentication/change_password

    On registration a group with role=new_user.id is created
    and user is given membership of this group.

    You can create a group with::

        group_id=auth.add_group('Manager', 'can access the manage action')
        auth.add_permission(group_id, 'access to manage')

    Here \"access to manage\" is just a user defined string.
    You can give access to a user::

        auth.add_membership(group_id, user_id)

    If user id is omitted, the logged in user is assumed

    Then you can decorate any action::

        @auth.requires_permission('access to manage')
        def manage():
            return dict()

    You can restrict a permission to a specific table::

        auth.add_permission(group_id, 'edit', db.sometable)
        @auth.requires_permission('edit', db.sometable)

    Or to a specific record::

        auth.add_permission(group_id, 'edit', db.sometable, 45)
        @auth.requires_permission('edit', db.sometable, 45)

    If authorization is not granted calls::

        auth.settings.on_failed_authorization

    Other options::

        auth.settings.mailer=None
        auth.settings.expiration=3600 # seconds

        ...

        ### these are messages that can be customized
        ...
    """


    def url(self, f=None, args=[], vars={}):
        return URL(c=self.settings.controller,f=f,args=args,vars=vars)

    def __init__(self, environment=None, db=None,
                 controller='default', cas_provider = None):
        """
        auth=Auth(globals(), db)

        - environment is there for legacy but unused (awful)
        - db has to be the database where to create tables for authentication

        """
        ## next two lines for backward compatibility
        if not db and environment and isinstance(environment,DAL):
            db = environment
        self.db = db
        self.environment = current
        request = current.request
        session = current.session
        auth = session.auth
        if auth and auth.last_visit and auth.last_visit + \
                datetime.timedelta(days=0, seconds=auth.expiration) > request.now:
            self.user = auth.user
            # this is a trick to speed up sessions
            if (request.now - auth.last_visit).seconds > (auth.expiration/10):
                auth.last_visit = request.now
        else:
            self.user = None
            session.auth = None
        settings = self.settings = Settings()

        # ## what happens after login?

        # ## what happens after registration?

        settings.hideerror = False
        settings.cas_domains = [request.env.http_host]
        settings.cas_provider = cas_provider
        settings.extra_fields = {}
        settings.actions_disabled = []
        settings.reset_password_requires_verification = False
        settings.registration_requires_verification = False
        settings.registration_requires_approval = False
        settings.alternate_requires_registration = False
        settings.create_user_groups = True

        settings.controller = controller
        settings.login_url = self.url('user', args='login')
        settings.logged_url = self.url('user', args='profile')
        settings.download_url = self.url('download')
        settings.mailer = None
        settings.login_captcha = None
        settings.register_captcha = None
        settings.retrieve_username_captcha = None
        settings.retrieve_password_captcha = None
        settings.captcha = None
        settings.expiration = 3600            # one hour
        settings.long_expiration = 3600*30*24 # one month
        settings.remember_me_form = True
        settings.allow_basic_login = False
        settings.allow_basic_login_only = False
        settings.on_failed_authorization = \
            self.url('user',args='not_authorized')

        settings.on_failed_authentication = lambda x: redirect(x)

        settings.formstyle = 'table3cols'
        settings.label_separator = ': '

        # ## table names to be used

        settings.password_field = 'password'
        settings.table_user_name = 'auth_user'
        settings.table_group_name = 'auth_group'
        settings.table_membership_name = 'auth_membership'
        settings.table_permission_name = 'auth_permission'
        settings.table_event_name = 'auth_event'
        settings.table_cas_name = 'auth_cas'

        # ## if none, they will be created

        settings.table_user = None
        settings.table_group = None
        settings.table_membership = None
        settings.table_permission = None
        settings.table_event = None
        settings.table_cas = None

        # ##

        settings.showid = False

        # ## these should be functions or lambdas

        settings.login_next = self.url('index')
        settings.login_onvalidation = []
        settings.login_onaccept = []
        settings.login_methods = [self]
        settings.login_form = self
        settings.login_email_validate = True
        settings.login_userfield = None

        settings.logout_next = self.url('index')
        settings.logout_onlogout = None

        settings.register_next = self.url('index')
        settings.register_onvalidation = []
        settings.register_onaccept = []
        settings.register_fields = None

        settings.verify_email_next = self.url('user', args='login')
        settings.verify_email_onaccept = []

        settings.profile_next = self.url('index')
        settings.profile_onvalidation = []
        settings.profile_onaccept = []
        settings.profile_fields = None
        settings.retrieve_username_next = self.url('index')
        settings.retrieve_password_next = self.url('index')
        settings.request_reset_password_next = self.url('user', args='login')
        settings.reset_password_next = self.url('user', args='login')

        settings.change_password_next = self.url('index')
        settings.change_password_onvalidation = []
        settings.change_password_onaccept = []

        settings.retrieve_password_onvalidation = []
        settings.reset_password_onvalidation = []

        settings.hmac_key = None
        settings.lock_keys = True


        # ## these are messages that can be customized
        messages = self.messages = Messages(current.T)
        messages.login_button = 'Login'
        messages.register_button = 'Register'
        messages.password_reset_button = 'Request reset password'
        messages.password_change_button = 'Change password'
        messages.profile_save_button = 'Save profile'
        messages.submit_button = 'Submit'
        messages.verify_password = 'Verify Password'
        messages.delete_label = 'Check to delete:'
        messages.function_disabled = 'Function disabled'
        messages.access_denied = 'Insufficient privileges'
        messages.registration_verifying = 'Registration needs verification'
        messages.registration_pending = 'Registration is pending approval'
        messages.login_disabled = 'Login disabled by administrator'
        messages.logged_in = 'Logged in'
        messages.email_sent = 'Email sent'
        messages.unable_to_send_email = 'Unable to send email'
        messages.email_verified = 'Email verified'
        messages.logged_out = 'Logged out'
        messages.registration_successful = 'Registration successful'
        messages.invalid_email = 'Invalid email'
        messages.unable_send_email = 'Unable to send email'
        messages.invalid_login = 'Invalid login'
        messages.invalid_user = 'Invalid user'
        messages.invalid_password = 'Invalid password'
        messages.is_empty = "Cannot be empty"
        messages.mismatched_password = "Password fields don't match"
        messages.verify_email = \
            'Click on the link http://...verify_email/%(key)s to verify your email'
        messages.verify_email_subject = 'Email verification'
        messages.username_sent = 'Your username was emailed to you'
        messages.new_password_sent = 'A new password was emailed to you'
        messages.password_changed = 'Password changed'
        messages.retrieve_username = 'Your username is: %(username)s'
        messages.retrieve_username_subject = 'Username retrieve'
        messages.retrieve_password = 'Your password is: %(password)s'
        messages.retrieve_password_subject = 'Password retrieve'
        messages.reset_password = \
            'Click on the link http://...reset_password/%(key)s to reset your password'
        messages.reset_password_subject = 'Password reset'
        messages.invalid_reset_password = 'Invalid reset password'
        messages.profile_updated = 'Profile updated'
        messages.new_password = 'New password'
        messages.old_password = 'Old password'
        messages.group_description = \
            'Group uniquely assigned to user %(id)s'

        messages.register_log = 'User %(id)s Registered'
        messages.login_log = 'User %(id)s Logged-in'
        messages.login_failed_log = None
        messages.logout_log = 'User %(id)s Logged-out'
        messages.profile_log = 'User %(id)s Profile updated'
        messages.verify_email_log = 'User %(id)s Verification email sent'
        messages.retrieve_username_log = 'User %(id)s Username retrieved'
        messages.retrieve_password_log = 'User %(id)s Password retrieved'
        messages.reset_password_log = 'User %(id)s Password reset'
        messages.change_password_log = 'User %(id)s Password changed'
        messages.add_group_log = 'Group %(group_id)s created'
        messages.del_group_log = 'Group %(group_id)s deleted'
        messages.add_membership_log = None
        messages.del_membership_log = None
        messages.has_membership_log = None
        messages.add_permission_log = None
        messages.del_permission_log = None
        messages.has_permission_log = None
        messages.impersonate_log = 'User %(id)s is impersonating %(other_id)s'

        messages.label_first_name = 'First name'
        messages.label_last_name = 'Last name'
        messages.label_username = 'Username'
        messages.label_email = 'E-mail'
        messages.label_password = 'Password'
        messages.label_registration_key = 'Registration key'
        messages.label_reset_password_key = 'Reset Password key'
        messages.label_registration_id = 'Registration identifier'
        messages.label_role = 'Role'
        messages.label_description = 'Description'
        messages.label_user_id = 'User ID'
        messages.label_group_id = 'Group ID'
        messages.label_name = 'Name'
        messages.label_table_name = 'Table name'
        messages.label_record_id = 'Record ID'
        messages.label_time_stamp = 'Timestamp'
        messages.label_client_ip = 'Client IP'
        messages.label_origin = 'Origin'
        messages.label_remember_me = "Remember me (for 30 days)"
        messages['T'] = current.T
        messages.verify_password_comment = 'please input your password again'
        messages.lock_keys = True

        # for "remember me" option
        response = current.response
        if auth  and  auth.remember: #when user wants to be logged in for longer
            response.cookies[response.session_id_name]["expires"] = \
                auth.expiration

        def lazy_user (auth = self): return auth.user_id
        reference_user = 'reference %s' % settings.table_user_name
        def represent(id,record=None,s=settings):
            try:
                user = s.table_user(id)
                return '%(first_name)s %(last_name)s' % user
            except: return id
        self.signature = db.Table(self.db,'auth_signature',
                                  Field('is_active','boolean',default=True),
                                  Field('created_on','datetime',
                                        default=request.now,
                                        writable=False,readable=False),
                                  Field('created_by',
                                        reference_user,
                                        default=lazy_user,represent=represent,
                                        writable=False,readable=False,
                                        ),
                                  Field('modified_on','datetime',
                                        update=request.now,default=request.now,
                                        writable=False,readable=False),
                                  Field('modified_by',
                                        reference_user,represent=represent,
                                        default=lazy_user,update=lazy_user,
                                        writable=False,readable=False))



    def _get_user_id(self):
       "accessor for auth.user_id"
       return self.user and self.user.id or None
    user_id = property(_get_user_id, doc="user.id or None")

    def _HTTP(self, *a, **b):
        """
        only used in lambda: self._HTTP(404)
        """

        raise HTTP(*a, **b)

    def __call__(self):
        """
        usage:

        def authentication(): return dict(form=auth())
        """

        request = current.request
        args = request.args
        if not args:
            redirect(self.url(args='login',vars=request.vars))
        elif args[0] in self.settings.actions_disabled:
            raise HTTP(404)
        if args[0] in ('login','logout','register','verify_email',
                       'retrieve_username','retrieve_password',
                       'reset_password','request_reset_password',
                       'change_password','profile','groups',
                       'impersonate','not_authorized'):
            return getattr(self,args[0])()
        elif args[0]=='cas' and not self.settings.cas_provider:
            if args(1) == 'login': return self.cas_login(version=2)
            if args(1) == 'validate': return self.cas_validate(version=2)
            if args(1) == 'logout': return self.logout()
        else:
            raise HTTP(404)

    def navbar(self,prefix='Welcome',action=None):
        request = current.request
        T = current.T
        if isinstance(prefix,str):
            prefix = T(prefix)
        if not action:
            action=URL(request.application,request.controller,'user')
        if prefix:
            prefix = prefix.strip()+' '
        if self.user_id:
            logout=A(T('logout'),_href=action+'/logout')
            profile=A(T('profile'),_href=action+'/profile')
            password=A(T('password'),_href=action+'/change_password')
            bar = SPAN(prefix,self.user.first_name,' [ ', logout, ']',_class='auth_navbar')
            if not 'profile' in self.settings.actions_disabled:
                bar.insert(4, ' | ')
                bar.insert(5, profile)
            if not 'change_password' in self.settings.actions_disabled:
                bar.insert(-1, ' | ')
                bar.insert(-1, password)
        else:
            login=A(T('login'),_href=action+'/login')
            register=A(T('register'),_href=action+'/register')
            retrieve_username=A(T('forgot username?'),
                            _href=action+'/retrieve_username')
            lost_password=A(T('lost password?'),
                            _href=action+'/request_reset_password')
            bar = SPAN('[ ',login,' ]',_class='auth_navbar')

            if not 'register' in self.settings.actions_disabled:
                bar.insert(2, ' | ')
                bar.insert(3, register)
            if 'username' in self.settings.table_user.fields() and \
                    not 'retrieve_username' in self.settings.actions_disabled:
                bar.insert(-1, ' | ')
                bar.insert(-1, retrieve_username)
            if not 'request_reset_password' in self.settings.actions_disabled:
                bar.insert(-1, ' | ')
                bar.insert(-1, lost_password)
        return bar

    def __get_migrate(self, tablename, migrate=True):

        if type(migrate).__name__ == 'str':
            return (migrate + tablename + '.table')
        elif migrate == False:
            return False
        else:
            return True

    def define_tables(self, username=False, migrate=True, fake_migrate=False):
        """
        to be called unless tables are defined manually

        usages::

            # defines all needed tables and table files
            # 'myprefix_auth_user.table', ...
            auth.define_tables(migrate='myprefix_')

            # defines all needed tables without migration/table files
            auth.define_tables(migrate=False)

        """

        db = self.db
        settings = self.settings
        if not settings.table_user_name in db.tables:
            passfield = settings.password_field
            if username or settings.cas_provider:
                table = db.define_table(
                    settings.table_user_name,
                    Field('first_name', length=128, default='',
                          label=self.messages.label_first_name),
                    Field('last_name', length=128, default='',
                          label=self.messages.label_last_name),
                    Field('username', length=128, default='',
                          label=self.messages.label_username),
                    Field('email', length=512, default='',
                          label=self.messages.label_email),
                    Field(passfield, 'password', length=512,
                          readable=False, label=self.messages.label_password),
                    Field('registration_key', length=512,
                          writable=False, readable=False, default='',
                          label=self.messages.label_registration_key),
                    Field('reset_password_key', length=512,
                          writable=False, readable=False, default='',
                          label=self.messages.label_reset_password_key),
                    Field('registration_id', length=512,
                          writable=False, readable=False, default='',
                          label=self.messages.label_registration_id),
                    *settings.extra_fields.get(settings.table_user_name,[]),
                    **dict(
                        migrate=self.__get_migrate(settings.table_user_name,
                                                   migrate),
                        fake_migrate=fake_migrate,
                        format='%(username)s'))
                table.username.requires = (IS_MATCH('[\w\.\-]+'),
                                           IS_NOT_IN_DB(db, table.username))
            else:
                table = db.define_table(
                    settings.table_user_name,
                    Field('first_name', length=128, default='',
                          label=self.messages.label_first_name),
                    Field('last_name', length=128, default='',
                          label=self.messages.label_last_name),
                    Field('email', length=512, default='',
                          label=self.messages.label_email),
                    Field(passfield, 'password', length=512,
                          readable=False, label=self.messages.label_password),
                    Field('registration_key', length=512,
                          writable=False, readable=False, default='',
                          label=self.messages.label_registration_key),
                    Field('reset_password_key', length=512,
                          writable=False, readable=False, default='',
                          label=self.messages.label_reset_password_key),
                    *settings.extra_fields.get(settings.table_user_name,[]),
                    **dict(
                        migrate=self.__get_migrate(settings.table_user_name,
                                                   migrate),
                        fake_migrate=fake_migrate,
                        format='%(first_name)s %(last_name)s (%(id)s)'))
            table.first_name.requires = \
                IS_NOT_EMPTY(error_message=self.messages.is_empty)
            table.last_name.requires = \
                IS_NOT_EMPTY(error_message=self.messages.is_empty)
            table[passfield].requires = [CRYPT(key=settings.hmac_key)]
            table.email.requires = \
                [IS_EMAIL(error_message=self.messages.invalid_email),
                 IS_NOT_IN_DB(db, table.email)]
            table.registration_key.default = ''
        settings.table_user = db[settings.table_user_name]
        if not settings.table_group_name in db.tables:
            table = db.define_table(
                settings.table_group_name,
                Field('role', length=512, default='',
                        label=self.messages.label_role),
                Field('description', 'text',
                        label=self.messages.label_description),
                *settings.extra_fields.get(settings.table_group_name,[]),
                **dict(
                    migrate=self.__get_migrate(
                        settings.table_group_name, migrate),
                    fake_migrate=fake_migrate,
                    format = '%(role)s (%(id)s)'))
            table.role.requires = IS_NOT_IN_DB(db, '%s.role'
                 % settings.table_group_name)
        settings.table_group = db[settings.table_group_name]
        if not settings.table_membership_name in db.tables:
            table = db.define_table(
                settings.table_membership_name,
                Field('user_id', settings.table_user,
                        label=self.messages.label_user_id),
                Field('group_id', settings.table_group,
                        label=self.messages.label_group_id),
                *settings.extra_fields.get(settings.table_membership_name,[]),
                **dict(
                    migrate=self.__get_migrate(
                        settings.table_membership_name, migrate),
                    fake_migrate=fake_migrate))
            table.user_id.requires = IS_IN_DB(db, '%s.id' %
                    settings.table_user_name,
                    '%(first_name)s %(last_name)s (%(id)s)')
            table.group_id.requires = IS_IN_DB(db, '%s.id' %
                    settings.table_group_name,
                    '%(role)s (%(id)s)')
        settings.table_membership = db[settings.table_membership_name]
        if not settings.table_permission_name in db.tables:
            table = db.define_table(
                settings.table_permission_name,
                Field('group_id', settings.table_group,
                        label=self.messages.label_group_id),
                Field('name', default='default', length=512,
                        label=self.messages.label_name),
                Field('table_name', length=512,
                        label=self.messages.label_table_name),
                Field('record_id', 'integer',default=0,
                        label=self.messages.label_record_id),
                *settings.extra_fields.get(settings.table_permission_name,[]),
                **dict(
                    migrate=self.__get_migrate(
                        settings.table_permission_name, migrate),
                    fake_migrate=fake_migrate))
            table.group_id.requires = IS_IN_DB(db, '%s.id' %
                    settings.table_group_name,
                    '%(role)s (%(id)s)')
            table.name.requires = IS_NOT_EMPTY(error_message=self.messages.is_empty)
            table.table_name.requires = IS_EMPTY_OR(IS_IN_SET(self.db.tables))
            table.record_id.requires = IS_INT_IN_RANGE(0, 10 ** 9)
        settings.table_permission = db[settings.table_permission_name]
        if not settings.table_event_name in db.tables:
            table  = db.define_table(
                settings.table_event_name,
                Field('time_stamp', 'datetime',
                        default=current.request.now,
                        label=self.messages.label_time_stamp),
                Field('client_ip',
                        default=current.request.client,
                        label=self.messages.label_client_ip),
                Field('user_id', settings.table_user, default=None,
                        label=self.messages.label_user_id),
                Field('origin', default='auth', length=512,
                        label=self.messages.label_origin),
                Field('description', 'text', default='',
                        label=self.messages.label_description),
                *settings.extra_fields.get(settings.table_event_name,[]),
                **dict(
                    migrate=self.__get_migrate(
                        settings.table_event_name, migrate),
                    fake_migrate=fake_migrate))
            table.user_id.requires = IS_IN_DB(db, '%s.id' %
                    settings.table_user_name,
                    '%(first_name)s %(last_name)s (%(id)s)')
            table.origin.requires = IS_NOT_EMPTY(error_message=self.messages.is_empty)
            table.description.requires = IS_NOT_EMPTY(error_message=self.messages.is_empty)
        settings.table_event = db[settings.table_event_name]
        now = current.request.now
        if settings.cas_domains:
            if not settings.table_cas_name in db.tables:
                table  = db.define_table(
                    settings.table_cas_name,
                    Field('user_id', settings.table_user, default=None,
                          label=self.messages.label_user_id),
                    Field('created_on','datetime',default=now),
                    Field('url',requires=IS_URL()),
                    Field('uuid'),
                    *settings.extra_fields.get(settings.table_cas_name,[]),
                    **dict(
                        migrate=self.__get_migrate(
                            settings.table_event_name, migrate),
                        fake_migrate=fake_migrate))
                table.user_id.requires = IS_IN_DB(db, '%s.id' % \
                    settings.table_user_name,
                    '%(first_name)s %(last_name)s (%(id)s)')
            settings.table_cas = db[settings.table_cas_name]
        if settings.cas_provider:
            settings.actions_disabled = \
                ['profile','register','change_password','request_reset_password']
            from gluon.contrib.login_methods.cas_auth import CasAuth
            maps = dict((name,lambda v,n=name:v.get(n,None)) for name in \
                            settings.table_user.fields if name!='id' \
                            and settings.table_user[name].readable)
            maps['registration_id'] = \
                lambda v,p=settings.cas_provider:'%s/%s' % (p,v['user'])
            settings.login_form = CasAuth(
                casversion = 2,
                urlbase = settings.cas_provider,
                actions=['login','validate','logout'],
                maps=maps)


    def log_event(self, description, origin='auth'):
        """
        usage::

            auth.log_event(description='this happened', origin='auth')
        """

        if self.is_logged_in():
            user_id = self.user.id
        else:
            user_id = None  # user unknown
        self.settings.table_event.insert(description=description,
                                         origin=origin, user_id=user_id)

    def get_or_create_user(self, keys):
        """
        Used for alternate login methods:
            If the user exists already then password is updated.
            If the user doesn't yet exist, then they are created.
        """
        table_user = self.settings.table_user
        if 'registration_id' in table_user.fields() and \
                'registration_id' in keys:
            username = 'registration_id'
        elif 'username' in table_user.fields():
            username = 'username'
        elif 'email' in table_user.fields():
            username = 'email'
        else:
            raise SyntaxError, "user must have username or email"
        passfield = self.settings.password_field
        user = self.db(table_user[username] == keys[username]).select().first()
        keys['registration_key']=''
        if user:
            user.update_record(**table_user._filter_fields(keys))
        else:
            if not 'first_name' in keys and 'first_name' in table_user.fields:
                keys['first_name'] = keys[username]
            user_id = table_user.insert(**table_user._filter_fields(keys))
            user =  self.user = table_user[user_id]
            if self.settings.create_user_groups:
                group_id = self.add_group("user_%s" % user_id)
                self.add_membership(group_id, user_id)
        return user

    def basic(self):
        if not self.settings.allow_basic_login:
            return False
        basic = current.request.env.http_authorization
        if not basic or not basic[:6].lower() == 'basic ':
            return False
        (username, password) = base64.b64decode(basic[6:]).split(':')
        return self.login_bare(username, password)

    def login_bare(self, username, password):
        """
        logins user
        """

        request = current.request
        session = current.session
        table_user = self.settings.table_user
        if self.settings.login_userfield:
            userfield = self.settings.login_userfield
        elif 'username' in table_user.fields:
            userfield = 'username'
        else:
            userfield = 'email'
        passfield = self.settings.password_field
        user = self.db(table_user[userfield] == username).select().first()
        password = table_user[passfield].validate(password)[0]
        if user:
            if not user.registration_key and user[passfield] == password:
                user = Storage(table_user._filter_fields(user, id=True))
                session.auth = Storage(user=user, last_visit=request.now,
                                       expiration=self.settings.expiration,
                                       hmac_key = web2py_uuid())
                self.user = user
                return user
        return False

    def cas_login(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        version=2,
        ):
        request, session = current.request, current.session
        db, table = self.db, self.settings.table_cas
        session._cas_service = request.vars.service or session._cas_service
        if not request.env.http_host in self.settings.cas_domains or \
                not session._cas_service:
            raise HTTP(403,'not authorized')
        def allow_access():
            row = table(url=session._cas_service,user_id=self.user.id)
            if row:
                row.update_record(created_on=request.now)
                uuid = row.uuid
            else:
                uuid = web2py_uuid()
                table.insert(url=session._cas_service, user_id=self.user.id,
                             uuid=uuid, created_on=request.now)
            url = session._cas_service
            del session._cas_service
            redirect(url+"?ticket="+uuid)
        if self.is_logged_in():
            allow_access()
        def cas_onaccept(form, onaccept=onaccept):
            if onaccept!=DEFAULT: onaccept(form)
            allow_access()
        return self.login(next,onvalidation,cas_onaccept,log)


    def cas_validate(self,version=2):
        request = current.request
        db, table = self.db, self.settings.table_cas
        current.response.headers['Content-Type']='text'
        ticket = table(uuid=request.vars.ticket)
        url = request.env.path_info.rsplit('/',1)[0]
        if ticket: # and ticket.created_on>request.now-datetime.timedelta(60):
            user = self.settings.table_user(ticket.user_id)
            fullname = user.first_name+' '+user.last_name
            if version==1:
                raise HTTP(200,'yes\n%s:%s:%s'%(user.id,user.email,fullname))
            # assume version 2
            username = user.get('username',user.email)
            raise HTTP(200,'<?xml version="1.0" encoding="UTF-8"?>\n'+\
                           TAG['cas:serviceResponse'](
                    TAG['cas:authenticationSuccess'](
                        TAG['cas:user'](username),
                        *[TAG['cas:'+field.name](user[field.name]) \
                              for field in self.settings.table_user \
                              if field.readable]),
                    **{'_xmlns:cas':'http://www.yale.edu/tp/cas'}).xml())
        if version==1:
            raise HTTP(200,'no\n')
        # assume version 2
        raise HTTP(200,'<?xml version="1.0" encoding="UTF-8"?>\n'+\
                       TAG['cas:serviceResponse'](
                TAG['cas:authenticationFailure'](
                    'Ticket %s not recognized' % ticket,
                    _code='INVALID TICKET'),
                **{'_xmlns:cas':'http://www.yale.edu/tp/cas'}).xml())


    def login(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a login form

        .. method:: Auth.login([next=DEFAULT [, onvalidation=DEFAULT
            [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        if self.settings.login_userfield:
            username = self.settings.login_userfield
        elif 'username' in table_user.fields:
            username = 'username'
        else:
            username = 'email'
        if 'username' in table_user.fields or not self.settings.login_email_validate:
            tmpvalidator = IS_NOT_EMPTY(error_message=self.messages.is_empty)
        else:
            tmpvalidator = IS_EMAIL(error_message=self.messages.invalid_email)
        old_requires = table_user[username].requires
        table_user[username].requires = tmpvalidator

        request = current.request
        response = current.response
        session = current.session

        passfield = self.settings.password_field
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.login_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.login_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.login_onaccept
        if log == DEFAULT:
            log = self.messages.login_log

        user = None # default

        # do we use our own login form, or from a central source?
        if self.settings.login_form == self:
            form = SQLFORM(
                table_user,
                fields=[username, passfield],
                hidden=dict(_next=next),
                showid=self.settings.showid,
                submit_button=self.messages.login_button,
                delete_label=self.messages.delete_label,
                formstyle=self.settings.formstyle,
                separator=self.settings.label_separator
                )

            if self.settings.remember_me_form:
                ## adds a new input checkbox "remember me for longer"
                addrow(form,XML("&nbsp;"),
                       DIV(XML("&nbsp;"),
                           INPUT(_type='checkbox',
                                 _class='checkbox',
                                 _id="auth_user_remember",
                                 _name="remember",
                                 ),
                           XML("&nbsp;&nbsp;"),
                           LABEL(
                            self.messages.label_remember_me,
                            _for="auth_user_remember",
                            )),"",
                       self.settings.formstyle,
                       'auth_user_remember__row')

            captcha = self.settings.login_captcha or \
                (self.settings.login_captcha!=False and self.settings.captcha)
            if captcha:
                addrow(form, captcha.label, captcha, captcha.comment, self.settings.formstyle,'captcha__row')
            accepted_form = False

            if form.accepts(request, session,
                            formname='login', dbio=False,
                            onvalidation=onvalidation,
                            hideerror=self.settings.hideerror):

                accepted_form = True
                # check for username in db
                user = self.db(table_user[username] == form.vars[username]).select().first()
                if user:
                    # user in db, check if registration pending or disabled
                    temp_user = user
                    if temp_user.registration_key == 'pending':
                        response.flash = self.messages.registration_pending
                        return form
                    elif temp_user.registration_key in ('disabled','blocked'):
                        response.flash = self.messages.login_disabled
                        return form
                    elif temp_user.registration_key!=None and \
                            temp_user.registration_key.strip():
                        response.flash = \
                            self.messages.registration_verifying
                        return form
                    # try alternate logins 1st as these have the
                    # current version of the password
                    user = None
                    for login_method in self.settings.login_methods:
                        if login_method != self and \
                                login_method(request.vars[username],
                                             request.vars[passfield]):
                            if not self in self.settings.login_methods:
                                # do not store password in db
                                form.vars[passfield] = None
                            user = self.get_or_create_user(form.vars)
                            break
                    if not user:
                        # alternates have failed, maybe because service inaccessible
                        if self.settings.login_methods[0] == self:
                            # try logging in locally using cached credentials
                            if temp_user[passfield] == form.vars.get(passfield, ''):
                                # success
                                user = temp_user
                else:
                    # user not in db
                    if not self.settings.alternate_requires_registration:
                        # we're allowed to auto-register users from external systems
                        for login_method in self.settings.login_methods:
                            if login_method != self and \
                                    login_method(request.vars[username],
                                                 request.vars[passfield]):
                                if not self in self.settings.login_methods:
                                    # do not store password in db
                                    form.vars[passfield] = None
                                user = self.get_or_create_user(form.vars)
                                break
                if not user:
                    if self.settings.login_failed_log:
                        self.log_event(self.settings.login_failed_log % request.post_vars)
                    # invalid login
                    session.flash = self.messages.invalid_login
                    redirect(self.url(args=request.args,vars=request.get_vars))

        else:
            # use a central authentication server
            cas = self.settings.login_form
            cas_user = cas.get_user()

            if cas_user:
                cas_user[passfield] = None
                user = self.get_or_create_user(table_user._filter_fields(cas_user))
            elif hasattr(cas,'login_form'):
                return cas.login_form()
            else:
                # we need to pass through login again before going on
                next = self.url('user',args='login',vars=dict(_next=next))
                redirect(cas.login_url(next))


        # process authenticated users
        if user:
            user = Storage(table_user._filter_fields(user, id=True))

            if log:
                self.log_event(log % user)

        # process authenticated users
            # user wants to be logged in for longer
            session.auth = Storage(
                user = user,
                last_visit = request.now,
                expiration = self.settings.long_expiration,
                remember = request.vars.has_key("remember"),
                hmac_key = web2py_uuid()
                )

            self.user = user
            session.flash = self.messages.logged_in

        # how to continue
        if self.settings.login_form == self:
            if accepted_form:
                callback(onaccept,form)
                if isinstance(next, (list, tuple)):
                    # fix issue with 2.6
                    next = next[0]
                if next and not next[0] == '/' and next[:4] != 'http':
                    next = self.url(next.replace('[id]', str(form.vars.id)))
                redirect(next)
            table_user[username].requires = old_requires
            return form
        elif user:
            callback(onaccept,None)
        redirect(next)

    def logout(self, next=DEFAULT, onlogout=DEFAULT, log=DEFAULT):
        """
        logout and redirects to login

        .. method:: Auth.logout ([next=DEFAULT[, onlogout=DEFAULT[,
            log=DEFAULT]]])

        """

        if next == DEFAULT:
            next = self.settings.logout_next
        if onlogout == DEFAULT:
            onlogout = self.settings.logout_onlogout
        if onlogout:
            onlogout(self.user)
        if log == DEFAULT:
            log = self.messages.logout_log
        if log and self.user:
            self.log_event(log % self.user)

        if self.settings.login_form != self:
            cas = self.settings.login_form
            cas_user = cas.get_user()
            if cas_user:
                next = cas.logout_url(next)

        current.session.auth = None
        current.session.flash = self.messages.logged_out
        if next:
            redirect(next)

    def register(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a registration form

        .. method:: Auth.register([next=DEFAULT [, onvalidation=DEFAULT
            [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        request = current.request
        response = current.response
        session = current.session
        if self.is_logged_in():
            redirect(self.settings.logged_url)
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.register_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.register_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.register_onaccept
        if log == DEFAULT:
            log = self.messages.register_log

        passfield = self.settings.password_field
        formstyle = self.settings.formstyle
        form = SQLFORM(table_user,
                       fields = self.settings.register_fields,
                       hidden=dict(_next=next),
                       showid=self.settings.showid,
                       submit_button=self.messages.register_button,
                       delete_label=self.messages.delete_label,
                       formstyle=formstyle,
                       separator=self.settings.label_separator
                       )
        for i, row in enumerate(form[0].components):
            item = row.element('input',_name=passfield)
            if item:
                form.custom.widget.password_two = \
                    INPUT(_name="password_two",  _type="password",
                          requires=IS_EXPR('value==%s' % \
                          repr(request.vars.get(passfield, None)),
                          error_message=self.messages.mismatched_password))

                addrow(form, self.messages.verify_password + ':',
                       form.custom.widget.password_two,
                       self.messages.verify_password_comment,
                       formstyle,
                       '%s_%s__row' % (table_user, 'password_two'),
                       position=i+1)
                break
        captcha = self.settings.register_captcha or self.settings.captcha
        if captcha:
            addrow(form, captcha.label, captcha, captcha.comment,self.settings.formstyle, 'captcha__row')

        table_user.registration_key.default = key = web2py_uuid()
        if form.accepts(request, session, formname='register',
                        onvalidation=onvalidation,hideerror=self.settings.hideerror):
            description = self.messages.group_description % form.vars
            if self.settings.create_user_groups:
                group_id = self.add_group("user_%s" % form.vars.id, description)
                self.add_membership(group_id, form.vars.id)
            if self.settings.registration_requires_verification:
                if not self.settings.mailer or \
                   not self.settings.mailer.send(to=form.vars.email,
                        subject=self.messages.verify_email_subject,
                        message=self.messages.verify_email
                         % dict(key=key)):
                    self.db.rollback()
                    response.flash = self.messages.unable_send_email
                    return form
                session.flash = self.messages.email_sent
            elif self.settings.registration_requires_approval:
                table_user[form.vars.id] = dict(registration_key='pending')
                session.flash = self.messages.registration_pending
            else:
                table_user[form.vars.id] = dict(registration_key='')
                session.flash = self.messages.registration_successful
                table_user = self.settings.table_user
                if 'username' in table_user.fields:
                    username = 'username'
                else:
                    username = 'email'
                user = self.db(table_user[username] == form.vars[username]).select().first()
                user = Storage(table_user._filter_fields(user, id=True))
                session.auth = Storage(user=user, last_visit=request.now,
                                       expiration=self.settings.expiration,
                                       hmac_key = web2py_uuid())
                self.user = user
                session.flash = self.messages.logged_in
            if log:
                self.log_event(log % form.vars)
            callback(onaccept,form)
            if not next:
                next = self.url(args = request.args)
            elif isinstance(next, (list, tuple)): ### fix issue with 2.6
                next = next[0]
            elif next and not next[0] == '/' and next[:4] != 'http':
                next = self.url(next.replace('[id]', str(form.vars.id)))
            redirect(next)
        return form

    def is_logged_in(self):
        """
        checks if the user is logged in and returns True/False.
        if so user is in auth.user as well as in session.auth.user
        """

        if self.user:
            return True
        return False

    def verify_email(
        self,
        next=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        action user to verify the registration email, XXXXXXXXXXXXXXXX

        .. method:: Auth.verify_email([next=DEFAULT [, onvalidation=DEFAULT
            [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        key = current.request.args[-1]
        table_user = self.settings.table_user
        user = self.db(table_user.registration_key == key).select().first()
        if not user:
            redirect(self.settings.login_url)
        if self.settings.registration_requires_approval:
            user.update_record(registration_key = 'pending')
            current.session.flash = self.messages.registration_pending
        else:
            user.update_record(registration_key = '')
            current.session.flash = self.messages.email_verified
        if log == DEFAULT:
            log = self.messages.verify_email_log
        if next == DEFAULT:
            next = self.settings.verify_email_next
        if onaccept == DEFAULT:
            onaccept = self.settings.verify_email_onaccept
        if log:
            self.log_event(log % user)
        callback(onaccept,user)
        redirect(next)

    def retrieve_username(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a form to retrieve the user username
        (only if there is a username field)

        .. method:: Auth.retrieve_username([next=DEFAULT
            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        if not 'username' in table_user.fields:
            raise HTTP(404)
        request = current.request
        response = current.response
        session = current.session
        captcha = self.settings.retrieve_username_captcha or \
                (self.settings.retrieve_username_captcha!=False and self.settings.captcha)
        if not self.settings.mailer:
            response.flash = self.messages.function_disabled
            return ''
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.retrieve_username_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.retrieve_username_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.retrieve_username_onaccept
        if log == DEFAULT:
            log = self.messages.retrieve_username_log
        old_requires = table_user.email.requires
        table_user.email.requires = [IS_IN_DB(self.db, table_user.email,
            error_message=self.messages.invalid_email)]
        form = SQLFORM(table_user,
                       fields=['email'],
                       hidden=dict(_next=next),
                       showid=self.settings.showid,
                       submit_button=self.messages.submit_button,
                       delete_label=self.messages.delete_label,
                       formstyle=self.settings.formstyle,
                       separator=self.settings.label_separator
                       )
        if captcha:
            addrow(form, captcha.label, captcha, captcha.comment,self.settings.formstyle, 'captcha__row')

        if form.accepts(request, session,
                        formname='retrieve_username', dbio=False,
                        onvalidation=onvalidation,hideerror=self.settings.hideerror):
            user = self.db(table_user.email == form.vars.email).select().first()
            if not user:
                current.session.flash = \
                    self.messages.invalid_email
                redirect(self.url(args=request.args))
            username = user.username
            self.settings.mailer.send(to=form.vars.email,
                    subject=self.messages.retrieve_username_subject,
                    message=self.messages.retrieve_username
                     % dict(username=username))
            session.flash = self.messages.email_sent
            if log:
                self.log_event(log % user)
            callback(onaccept,form)
            if not next:
                next = self.url(args = request.args)
            elif isinstance(next, (list, tuple)): ### fix issue with 2.6
                next = next[0]
            elif next and not next[0] == '/' and next[:4] != 'http':
                next = self.url(next.replace('[id]', str(form.vars.id)))
            redirect(next)
        table_user.email.requires = old_requires
        return form

    def random_password(self):
        import string
        import random
        password = ''
        specials=r'!#$*'
        for i in range(0,3):
            password += random.choice(string.lowercase)
            password += random.choice(string.uppercase)
            password += random.choice(string.digits)
            password += random.choice(specials)
        return ''.join(random.sample(password,len(password)))

    def reset_password_deprecated(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a form to reset the user password (deprecated)

        .. method:: Auth.reset_password_deprecated([next=DEFAULT
            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        request = current.request
        response = current.response
        session = current.session
        if not self.settings.mailer:
            response.flash = self.messages.function_disabled
            return ''
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.retrieve_password_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.retrieve_password_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.retrieve_password_onaccept
        if log == DEFAULT:
            log = self.messages.retrieve_password_log
        old_requires = table_user.email.requires
        table_user.email.requires = [IS_IN_DB(self.db, table_user.email,
            error_message=self.messages.invalid_email)]
        form = SQLFORM(table_user,
                       fields=['email'],
                       hidden=dict(_next=next),
                       showid=self.settings.showid,
                       submit_button=self.messages.submit_button,
                       delete_label=self.messages.delete_label,
                       formstyle=self.settings.formstyle,
                       separator=self.settings.label_separator
                       )
        if form.accepts(request, session,
                        formname='retrieve_password', dbio=False,
                        onvalidation=onvalidation,hideerror=self.settings.hideerror):
            user = self.db(table_user.email == form.vars.email).select().first()
            if not user:
                current.session.flash = \
                    self.messages.invalid_email
                redirect(self.url(args=request.args))
            elif user.registration_key in ('pending','disabled','blocked'):
                current.session.flash = \
                    self.messages.registration_pending
                redirect(self.url(args=request.args))
            password = self.random_password()
            passfield = self.settings.password_field
            d = {passfield: table_user[passfield].validate(password)[0],
                 'registration_key': ''}
            user.update_record(**d)
            if self.settings.mailer and \
               self.settings.mailer.send(to=form.vars.email,
                        subject=self.messages.retrieve_password_subject,
                        message=self.messages.retrieve_password \
                        % dict(password=password)):
                session.flash = self.messages.email_sent
            else:
                session.flash = self.messages.unable_to_send_email
            if log:
                self.log_event(log % user)
            callback(onaccept,form)
            if not next:
                next = self.url(args = request.args)
            elif isinstance(next, (list, tuple)): ### fix issue with 2.6
                next = next[0]
            elif next and not next[0] == '/' and next[:4] != 'http':
                next = self.url(next.replace('[id]', str(form.vars.id)))
            redirect(next)
        table_user.email.requires = old_requires
        return form

    def reset_password(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a form to reset the user password

        .. method:: Auth.reset_password([next=DEFAULT
            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        request = current.request
        # response = current.response
        session = current.session

        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.reset_password_next

        try:
            key = request.vars.key or request.args[-1]
            t0 = int(key.split('-')[0])
            if time.time()-t0 > 60*60*24: raise Exception
            user = self.db(table_user.reset_password_key == key).select().first()
            if not user: raise Exception
        except Exception:
            session.flash = self.messages.invalid_reset_password
            redirect(next)
        passfield = self.settings.password_field
        form = SQLFORM.factory(
            Field('new_password', 'password',
                  label=self.messages.new_password,
                  requires=self.settings.table_user[passfield].requires),
            Field('new_password2', 'password',
                  label=self.messages.verify_password,
                  requires=[IS_EXPR('value==%s' % repr(request.vars.new_password),
                                    self.messages.mismatched_password)]),
            submit_button=self.messages.password_reset_button,
            formstyle=self.settings.formstyle,
            separator=self.settings.label_separator
        )
        if form.accepts(request,session,hideerror=self.settings.hideerror):
            user.update_record(**{passfield:form.vars.new_password,
                                  'registration_key':'',
                                  'reset_password_key':''})
            session.flash = self.messages.password_changed
            redirect(next)
        return form

    def request_reset_password(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a form to reset the user password

        .. method:: Auth.reset_password([next=DEFAULT
            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        request = current.request
        response = current.response
        session = current.session
        captcha = self.settings.retrieve_password_captcha or \
                (self.settings.retrieve_password_captcha!=False and self.settings.captcha)

        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.request_reset_password_next

        if not self.settings.mailer:
            response.flash = self.messages.function_disabled
            return ''
        if onvalidation == DEFAULT:
            onvalidation = self.settings.reset_password_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.reset_password_onaccept
        if log == DEFAULT:
            log = self.messages.reset_password_log
        # old_requires = table_user.email.requires <<< perhaps should be restored
        table_user.email.requires = [
            IS_EMAIL(error_message=self.messages.invalid_email),
            IS_IN_DB(self.db, table_user.email,
                     error_message=self.messages.invalid_email)]
        form = SQLFORM(table_user,
                       fields=['email'],
                       hidden=dict(_next=next),
                       showid=self.settings.showid,
                       submit_button=self.messages.password_reset_button,
                       delete_label=self.messages.delete_label,
                       formstyle=self.settings.formstyle,
                       separator=self.settings.label_separator
                       )
        if captcha:
            addrow(form, captcha.label, captcha, captcha.comment, self.settings.formstyle,'captcha__row')
        if form.accepts(request, session,
                        formname='reset_password', dbio=False,
                        onvalidation=onvalidation,
                        hideerror=self.settings.hideerror):
            user = self.db(table_user.email == form.vars.email).select().first()
            if not user:
                session.flash = self.messages.invalid_email
                redirect(self.url(args=request.args))
            elif user.registration_key in ('pending','disabled','blocked'):
                session.flash = self.messages.registration_pending
                redirect(self.url(args=request.args))
            reset_password_key = str(int(time.time()))+'-' + web2py_uuid()

            if self.settings.mailer.send(to=form.vars.email,
                                         subject=self.messages.reset_password_subject,
                                         message=self.messages.reset_password % \
                                             dict(key=reset_password_key)):
                session.flash = self.messages.email_sent
                user.update_record(reset_password_key=reset_password_key)
            else:
                session.flash = self.messages.unable_to_send_email
            if log:
                self.log_event(log % user)
            callback(onaccept,form)
            if not next:
                next = self.url(args = request.args)
            elif isinstance(next, (list, tuple)): ### fix issue with 2.6
                next = next[0]
            elif next and not next[0] == '/' and next[:4] != 'http':
                next = self.url(next.replace('[id]', str(form.vars.id)))
            redirect(next)
        # old_requires = table_user.email.requires
        return form

    def retrieve_password(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        if self.settings.reset_password_requires_verification:
            return self.request_reset_password(next,onvalidation,onaccept,log)
        else:
            return self.reset_password_deprecated(next,onvalidation,onaccept,log)

    def change_password(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a form that lets the user change password

        .. method:: Auth.change_password([next=DEFAULT[, onvalidation=DEFAULT[,
            onaccept=DEFAULT[, log=DEFAULT]]]])
        """

        if not self.is_logged_in():
            redirect(self.settings.login_url)
        db = self.db
        table_user = self.settings.table_user
        usern = self.settings.table_user_name
        s = db(table_user.id == self.user.id)

        request = current.request
        session = current.session
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.change_password_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.change_password_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.change_password_onaccept
        if log == DEFAULT:
            log = self.messages.change_password_log
        passfield = self.settings.password_field
        form = SQLFORM.factory(
            Field('old_password', 'password',
                label=self.messages.old_password,
                requires=validators(
                     table_user[passfield].requires,
                     IS_IN_DB(s, '%s.%s' % (usern, passfield),
                              error_message=self.messages.invalid_password))),
            Field('new_password', 'password',
                label=self.messages.new_password,
                requires=table_user[passfield].requires),
            Field('new_password2', 'password',
                label=self.messages.verify_password,
                requires=[IS_EXPR('value==%s' % repr(request.vars.new_password),
                              self.messages.mismatched_password)]),
            submit_button=self.messages.password_change_button,
            formstyle = self.settings.formstyle,
            separator=self.settings.label_separator
        )
        if form.accepts(request, session,
                        formname='change_password',
                        onvalidation=onvalidation,
                        hideerror=self.settings.hideerror):
            d = {passfield: form.vars.new_password}
            s.update(**d)
            session.flash = self.messages.password_changed
            if log:
                self.log_event(log % self.user)
            callback(onaccept,form)
            if not next:
                next = self.url(args=request.args)
            elif isinstance(next, (list, tuple)): ### fix issue with 2.6
                next = next[0]
            elif next and not next[0] == '/' and next[:4] != 'http':
                next = self.url(next.replace('[id]', str(form.vars.id)))
            redirect(next)
        return form

    def profile(
        self,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        ):
        """
        returns a form that lets the user change his/her profile

        .. method:: Auth.profile([next=DEFAULT [, onvalidation=DEFAULT
            [, onaccept=DEFAULT [, log=DEFAULT]]]])

        """

        table_user = self.settings.table_user
        if not self.is_logged_in():
            redirect(self.settings.login_url)
        passfield = self.settings.password_field
        self.settings.table_user[passfield].writable = False
        request = current.request
        session = current.session
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.profile_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.profile_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.profile_onaccept
        if log == DEFAULT:
            log = self.messages.profile_log
        form = SQLFORM(
            table_user,
            self.user.id,
            fields = self.settings.profile_fields,
            hidden = dict(_next=next),
            showid = self.settings.showid,
            submit_button = self.messages.profile_save_button,
            delete_label = self.messages.delete_label,
            upload = self.settings.download_url,
            formstyle = self.settings.formstyle,
            separator=self.settings.label_separator
            )
        if form.accepts(request, session,
                        formname='profile',
                        onvalidation=onvalidation,hideerror=self.settings.hideerror):
            self.user.update(table_user._filter_fields(form.vars))
            session.flash = self.messages.profile_updated
            if log:
                self.log_event(log % self.user)
            callback(onaccept,form)
            if not next:
                next = self.url(args=request.args)
            elif isinstance(next, (list, tuple)): ### fix issue with 2.6
                next = next[0]
            elif next and not next[0] == '/' and next[:4] != 'http':
                next = self.url(next.replace('[id]', str(form.vars.id)))
            redirect(next)
        return form

    def is_impersonating(self):
        return current.session.auth.impersonator

    def impersonate(self, user_id=DEFAULT):
        """
        usage: POST TO http://..../impersonate request.post_vars.user_id=<id>
        set request.post_vars.user_id to 0 to restore original user.

        requires impersonator is logged in and
        has_permission('impersonate', 'auth_user', user_id)
        """
        request = current.request
        session = current.session
        auth = session.auth
        if not self.is_logged_in():
            raise HTTP(401, "Not Authorized")
        current_id = auth.user.id
        requested_id = user_id
        if user_id == DEFAULT:
            user_id = current.request.post_vars.user_id
        if user_id and user_id != self.user.id and user_id != '0':
            if not self.has_permission('impersonate',
                                       self.settings.table_user_name,
                                       user_id):
                raise HTTP(403, "Forbidden")
            user = self.settings.table_user(user_id)
            if not user:
                raise HTTP(401, "Not Authorized")
            auth.impersonator = cPickle.dumps(session)
            auth.user.update(
                self.settings.table_user._filter_fields(user, True))
            self.user = auth.user
            if self.settings.login_onaccept:
                form = Storage(dict(vars=self.user))
                self.settings.login_onaccept(form)
            log = self.messages.impersonate_log
            if log:
                self.log_event(log % dict(id=current_id,other_id=auth.user.id))
        elif user_id in (0, '0') and self.is_impersonating():
            session.clear()
            session.update(cPickle.loads(auth.impersonator))
            self.user = session.auth.user
        if requested_id == DEFAULT and not request.post_vars:
            return SQLFORM.factory(Field('user_id','integer'))
        return self.user

    def groups(self):
        """
        displays the groups and their roles for the logged in user
        """

        if not self.is_logged_in():
            redirect(self.settings.login_url)
        memberships = self.db(self.settings.table_membership.user_id
                               == self.user.id).select()
        table = TABLE()
        for membership in memberships:
            groups = self.db(self.settings.table_group.id
                              == membership.group_id).select()
            if groups:
                group = groups[0]
                table.append(TR(H3(group.role, '(%s)' % group.id)))
                table.append(TR(P(group.description)))
        if not memberships:
            return None
        return table

    def not_authorized(self):
        """
        you can change the view for this page to make it look as you like
        """

        return 'ACCESS DENIED'

    def requires(self, condition):
        """
        decorator that prevents access to action if not logged in
        """

        def decorator(action):

            def f(*a, **b):

                if self.settings.allow_basic_login_only and not self.basic():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    return call_or_redirect(self.settings.on_failed_authorization)

                if not condition:
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    if not self.basic() and not self.is_logged_in():
                        request = current.request
                        next = URL(r=request,args=request.args,
                                   vars=request.get_vars)
                        current.session.flash = current.response.flash
                        return call_or_redirect(
                            self.settings.on_failed_authentication,
                            self.settings.login_url + '?_next='+urllib.quote(next))
                    else:
                        current.session.flash = self.messages.access_denied
                        return call_or_redirect(self.settings.on_failed_authorization)
                return action(*a, **b)
            f.__doc__ = action.__doc__
            f.__name__ = action.__name__
            f.__dict__.update(action.__dict__)
            return f

        return decorator

    def requires_login(self):
        """
        decorator that prevents access to action if not logged in
        """

        def decorator(action):

            def f(*a, **b):

                if self.settings.allow_basic_login_only and not self.basic():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    return call_or_redirect(self.settings.on_failed_authorization)

                if not self.basic() and not self.is_logged_in():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    request = current.request
                    next = URL(r=request,args=request.args,
                               vars=request.get_vars)
                    current.session.flash = current.response.flash
                    return call_or_redirect(
                        self.settings.on_failed_authentication,
                        self.settings.login_url + '?_next='+urllib.quote(next)
                        )
                return action(*a, **b)
            f.__doc__ = action.__doc__
            f.__name__ = action.__name__
            f.__dict__.update(action.__dict__)
            return f

        return decorator

    def requires_membership(self, role=None, group_id=None):
        """
        decorator that prevents access to action if not logged in or
        if user logged in is not a member of group_id.
        If role is provided instead of group_id then the
        group_id is calculated.
        """

        def decorator(action):
            def f(*a, **b):
                if self.settings.allow_basic_login_only and not self.basic():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    return call_or_redirect(self.settings.on_failed_authorization)

                if not self.basic() and not self.is_logged_in():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    request = current.request
                    next = URL(r=request,args=request.args,
                               vars=request.get_vars)
                    current.session.flash = current.response.flash
                    return call_or_redirect(
                        self.settings.on_failed_authentication,
                        self.settings.login_url + '?_next='+urllib.quote(next)
                        )
                if not self.has_membership(group_id=group_id, role=role):
                    current.session.flash = self.messages.access_denied
                    return call_or_redirect(self.settings.on_failed_authorization)
                return action(*a, **b)
            f.__doc__ = action.__doc__
            f.__name__ = action.__name__
            f.__dict__.update(action.__dict__)
            return f

        return decorator


    def requires_permission(
        self,
        name,
        table_name='',
        record_id=0,
        ):
        """
        decorator that prevents access to action if not logged in or
        if user logged in is not a member of any group (role) that
        has 'name' access to 'table_name', 'record_id'.
        """

        def decorator(action):

            def f(*a, **b):
                if self.settings.allow_basic_login_only and not self.basic():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    return call_or_redirect(self.settings.on_failed_authorization)

                if not self.basic() and not self.is_logged_in():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    request = current.request
                    next = URL(r=request,args=request.args,
                               vars=request.get_vars)
                    current.session.flash = current.response.flash
                    return call_or_redirect(
                        self.settings.on_failed_authentication,
                        self.settings.login_url + '?_next='+urllib.quote(next)
                        )
                if not self.has_permission(name, table_name, record_id):
                    current.session.flash = self.messages.access_denied
                    return call_or_redirect(self.settings.on_failed_authorization)
                return action(*a, **b)
            f.__doc__ = action.__doc__
            f.__name__ = action.__name__
            f.__dict__.update(action.__dict__)
            return f

        return decorator

    def requires_signature(self):
        """
        decorator that prevents access to action if not logged in or
        if user logged in is not a member of group_id.
        If role is provided instead of group_id then the
        group_id is calculated.
        """

        def decorator(action):
            def f(*a, **b):
                if self.settings.allow_basic_login_only and not self.basic():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    return call_or_redirect(self.settings.on_failed_authorization)

                if not self.basic() and not self.is_logged_in():
                    if current.request.is_restful:
                        raise HTTP(403,"Not authorized")
                    request = current.request
                    next = URL(r=request,args=request.args,
                               vars=request.get_vars)
                    current.session.flash = current.response.flash
                    return call_or_redirect(
                        self.settings.on_failed_authentication,
                        self.settings.login_url + '?_next='+urllib.quote(next)
                        )
                if not URL.verify(current.request,user_signature=True):
                    current.session.flash = self.messages.access_denied
                    return call_or_redirect(self.settings.on_failed_authorization)
                return action(*a, **b)
            f.__doc__ = action.__doc__
            f.__name__ = action.__name__
            f.__dict__.update(action.__dict__)
            return f

        return decorator

    def add_group(self, role, description=''):
        """
        creates a group associated to a role
        """

        group_id = self.settings.table_group.insert(role=role,
                description=description)
        log = self.messages.add_group_log
        if log:
            self.log_event(log % dict(group_id=group_id, role=role))
        return group_id

    def del_group(self, group_id):
        """
        deletes a group
        """

        self.db(self.settings.table_group.id == group_id).delete()
        self.db(self.settings.table_membership.group_id
                 == group_id).delete()
        self.db(self.settings.table_permission.group_id
                 == group_id).delete()
        log = self.messages.del_group_log
        if log:
            self.log_event(log % dict(group_id=group_id))

    def id_group(self, role):
        """
        returns the group_id of the group specified by the role
        """
        rows = self.db(self.settings.table_group.role == role).select()
        if not rows:
            return None
        return rows[0].id

    def user_group(self, user_id = None):
        """
        returns the group_id of the group uniquely associated to this user
        i.e. role=user:[user_id]
        """
        if not user_id and self.user:
            user_id = self.user.id
        role = 'user_%s' % user_id
        return self.id_group(role)

    def has_membership(self, group_id=None, user_id=None, role=None):
        """
        checks if user is member of group_id or role
        """

        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.settings.table_membership
        if self.db((membership.user_id == user_id)
                    & (membership.group_id == group_id)).select():
            r = True
        else:
            r = False
        log = self.messages.has_membership_log
        if log:
            self.log_event(log % dict(user_id=user_id,
                                      group_id=group_id, check=r))
        return r

    def add_membership(self, group_id=None, user_id=None, role=None):
        """
        gives user_id membership of group_id or role
        if user_id==None than user_id is that of current logged in user
        """

        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.settings.table_membership
        record = membership(user_id = user_id,group_id = group_id)
        if record:
            return record.id
        else:
            id = membership.insert(group_id=group_id, user_id=user_id)
        log = self.messages.add_membership_log
        if log:
            self.log_event(log % dict(user_id=user_id,
                                      group_id=group_id))
        return id

    def del_membership(self, group_id, user_id=None, role=None):
        """
        revokes membership from group_id to user_id
        if user_id==None than user_id is that of current logged in user
        """

        group_id = group_id or self.id_group(role)
        if not user_id and self.user:
            user_id = self.user.id
        membership = self.settings.table_membership
        log = self.messages.del_membership_log
        if log:
            self.log_event(log % dict(user_id=user_id,
                                      group_id=group_id))
        return self.db(membership.user_id
                       == user_id)(membership.group_id
                                   == group_id).delete()

    def has_permission(
        self,
        name='any',
        table_name='',
        record_id=0,
        user_id=None,
        group_id=None,
        ):
        """
        checks if user_id or current logged in user is member of a group
        that has 'name' permission on 'table_name' and 'record_id'
        if group_id is passed, it checks whether the group has the permission
        """

        if not user_id and not group_id and self.user:
            user_id = self.user.id
        if user_id:
            membership = self.settings.table_membership
            rows = self.db(membership.user_id
                           == user_id).select(membership.group_id)
            groups = set([row.group_id for row in rows])
            if group_id and not group_id in groups:
                return False
        else:
            groups = set([group_id])
        permission = self.settings.table_permission
        rows = self.db(permission.name == name)(permission.table_name
                 == str(table_name))(permission.record_id
                 == record_id).select(permission.group_id)
        groups_required = set([row.group_id for row in rows])
        if record_id:
            rows = self.db(permission.name
                            == name)(permission.table_name
                     == str(table_name))(permission.record_id
                     == 0).select(permission.group_id)
            groups_required = groups_required.union(set([row.group_id
                    for row in rows]))
        if groups.intersection(groups_required):
            r = True
        else:
            r = False
        log = self.messages.has_permission_log
        if log and user_id:
            self.log_event(log % dict(user_id=user_id, name=name,
                           table_name=table_name, record_id=record_id))
        return r

    def add_permission(
        self,
        group_id,
        name='any',
        table_name='',
        record_id=0,
        ):
        """
        gives group_id 'name' access to 'table_name' and 'record_id'
        """

        permission = self.settings.table_permission
        if group_id == 0:
            group_id = self.user_group()
        id = permission.insert(group_id=group_id, name=name,
                               table_name=str(table_name),
                               record_id=long(record_id))
        log = self.messages.add_permission_log
        if log:
            self.log_event(log % dict(permission_id=id, group_id=group_id,
                           name=name, table_name=table_name,
                           record_id=record_id))
        return id

    def del_permission(
        self,
        group_id,
        name='any',
        table_name='',
        record_id=0,
        ):
        """
        revokes group_id 'name' access to 'table_name' and 'record_id'
        """

        permission = self.settings.table_permission
        log = self.messages.del_permission_log
        if log:
            self.log_event(log % dict(group_id=group_id, name=name,
                           table_name=table_name, record_id=record_id))
        return self.db(permission.group_id == group_id)(permission.name
                 == name)(permission.table_name
                           == str(table_name))(permission.record_id
                 == long(record_id)).delete()

    def accessible_query(self, name, table, user_id=None):
        """
        returns a query with all accessible records for user_id or
        the current logged in user
        this method does not work on GAE because uses JOIN and IN

        example::

           db(auth.accessible_query('read', db.mytable)).select(db.mytable.ALL)

        """
        if not user_id:
            user_id = self.user.id
        if self.has_permission(name, table, 0, user_id):
            return table.id > 0
        db = self.db
        membership = self.settings.table_membership
        permission = self.settings.table_permission
        return table.id.belongs(db(membership.user_id == user_id)\
                           (membership.group_id == permission.group_id)\
                           (permission.name == name)\
                           (permission.table_name == table)\
                           ._select(permission.record_id))


class Crud(object):

    def url(self, f=None, args=[], vars={}):
        """
        this should point to the controller that exposes
        download and crud
        """
        return URL(c=self.settings.controller,f=f,args=args,vars=vars)

    def __init__(self, environment, db=None, controller='default'):
        self.db = db
        if not db and environment and isinstance(environment,DAL):
            self.db = environment
        elif not db:
            raise SyntaxError, "must pass db as first or second argument"
        self.environment = current
        settings = self.settings = Settings()
        settings.auth = None
        settings.logger = None

        settings.create_next = None
        settings.update_next = None
        settings.controller = controller
        settings.delete_next = self.url()
        settings.download_url = self.url('download')
        settings.create_onvalidation = StorageList()
        settings.update_onvalidation = StorageList()
        settings.delete_onvalidation = StorageList()
        settings.create_onaccept = StorageList()
        settings.update_onaccept = StorageList()
        settings.update_ondelete = StorageList()
        settings.delete_onaccept = StorageList()
        settings.update_deletable = True
        settings.showid = False
        settings.keepvalues = False
        settings.create_captcha = None
        settings.update_captcha = None
        settings.captcha = None
        settings.formstyle = 'table3cols'
        settings.label_separator = ': '
        settings.hideerror = False
        settings.detect_record_change = True
        settings.hmac_key = None
        settings.lock_keys = True

        messages = self.messages = Messages(current.T)
        messages.submit_button = 'Submit'
        messages.delete_label = 'Check to delete:'
        messages.record_created = 'Record Created'
        messages.record_updated = 'Record Updated'
        messages.record_deleted = 'Record Deleted'

        messages.update_log = 'Record %(id)s updated'
        messages.create_log = 'Record %(id)s created'
        messages.read_log = 'Record %(id)s read'
        messages.delete_log = 'Record %(id)s deleted'

        messages.lock_keys = True

    def __call__(self):
        args = current.request.args
        if len(args) < 1:
            raise HTTP(404)
        elif args[0] == 'tables':
            return self.tables()
        elif len(args) > 1 and not args(1) in self.db.tables:
            raise HTTP(404)
        table = self.db[args(1)]
        if args[0] == 'create':
            return self.create(table)
        elif args[0] == 'select':
            return self.select(table,linkto=self.url(args='read'))
        elif args[0] == 'search':
            form, rows = self.search(table,linkto=self.url(args='read'))
            return DIV(form,SQLTABLE(rows))
        elif args[0] == 'read':
            return self.read(table, args(2))
        elif args[0] == 'update':
            return self.update(table, args(2))
        elif args[0] == 'delete':
            return self.delete(table, args(2))
        else:
            raise HTTP(404)

    def log_event(self, message):
        if self.settings.logger:
            self.settings.logger.log_event(message, 'crud')

    def has_permission(self, name, table, record=0):
        if not self.settings.auth:
            return True
        try:
            record_id = record.id
        except:
            record_id = record
        return self.settings.auth.has_permission(name, str(table), record_id)

    def tables(self):
        return TABLE(*[TR(A(name,
                            _href=self.url(args=('select',name)))) \
                           for name in self.db.tables])


    @staticmethod
    def archive(form,archive_table=None,current_record='current_record'):
        """
        If you have a table (db.mytable) that needs full revision history you can just do::

            form=crud.update(db.mytable,myrecord,onaccept=crud.archive)

        crud.archive will define a new table "mytable_archive" and store the
        previous record in the newly created table including a reference
        to the current record.

        If you want to access such table you need to define it yourself in a model::

            db.define_table('mytable_archive',
                Field('current_record',db.mytable),
                db.mytable)

        Notice such table includes all fields of db.mytable plus one: current_record.
        crud.archive does not timestamp the stored record unless your original table
        has a fields like::

            db.define_table(...,
                Field('saved_on','datetime',
                     default=request.now,update=request.now,writable=False),
                Field('saved_by',auth.user,
                     default=auth.user_id,update=auth.user_id,writable=False),

        there is nothing special about these fields since they are filled before
        the record is archived.

        If you want to change the archive table name and the name of the reference field
        you can do, for example::

            db.define_table('myhistory',
                Field('parent_record',db.mytable),
                db.mytable)

        and use it as::

            form=crud.update(db.mytable,myrecord,
                             onaccept=lambda form:crud.archive(form,
                             archive_table=db.myhistory,
                             current_record='parent_record'))

        """
        old_record = form.record
        if not old_record:
            return None
        table = form.table
        if not archive_table:
            archive_table_name = '%s_archive' % table
            if archive_table_name in table._db:
                archive_table = table._db[archive_table_name]
            else:
                archive_table = table._db.define_table(archive_table_name,
                                                       Field(current_record,table),
                                                       table)
        new_record = {current_record:old_record.id}
        for fieldname in archive_table.fields:
            if not fieldname in ['id',current_record] and fieldname in old_record:
                new_record[fieldname]=old_record[fieldname]
        id = archive_table.insert(**new_record)
        return id

    def update(
        self,
        table,
        record,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        ondelete=DEFAULT,
        log=DEFAULT,
        message=DEFAULT,
        deletable=DEFAULT,
        formname=DEFAULT,
        ):
        """
        .. method:: Crud.update(table, record, [next=DEFAULT
            [, onvalidation=DEFAULT [, onaccept=DEFAULT [, log=DEFAULT
            [, message=DEFAULT[, deletable=DEFAULT]]]]]])

        """
        if not (isinstance(table, self.db.Table) or table in self.db.tables) \
                or (isinstance(record, str) and not str(record).isdigit()):
            raise HTTP(404)
        if not isinstance(table, self.db.Table):
            table = self.db[table]
        try:
            record_id = record.id
        except:
            record_id = record or 0
        if record_id and not self.has_permission('update', table, record_id):
            redirect(self.settings.auth.settings.on_failed_authorization)
        if not record_id \
                and not self.has_permission('create', table, record_id):
            redirect(self.settings.auth.settings.on_failed_authorization)

        request = current.request
        response = current.response
        session = current.session
        if request.extension == 'json' and request.vars.json:
            request.vars.update(simplejson.loads(request.vars.json))
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.update_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.update_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.update_onaccept
        if ondelete == DEFAULT:
            ondelete = self.settings.update_ondelete
        if log == DEFAULT:
            log = self.messages.update_log
        if deletable == DEFAULT:
            deletable = self.settings.update_deletable
        if message == DEFAULT:
            message = self.messages.record_updated
        form = SQLFORM(
            table,
            record,
            hidden=dict(_next=next),
            showid=self.settings.showid,
            submit_button=self.messages.submit_button,
            delete_label=self.messages.delete_label,
            deletable=deletable,
            upload=self.settings.download_url,
            formstyle=self.settings.formstyle,
            separator=self.settings.label_separator
            )
        self.accepted = False
        self.deleted = False
        captcha = self.settings.update_captcha or \
                  self.settings.captcha
        if record and captcha:
            addrow(form, captcha.label, captcha, captcha.comment,
                         self.settings.formstyle,'captcha__row')
        captcha = self.settings.create_captcha or \
                  self.settings.captcha
        if not record and captcha:
            addrow(form, captcha.label, captcha, captcha.comment,
                         self.settings.formstyle,'captcha__row')
        if not request.extension in ('html','load'):
            (_session, _formname) = (None, None)
        else:
            (_session, _formname) = \
                (session, '%s/%s' % (table._tablename, form.record_id))
        if formname!=DEFAULT:
            _formname = formname
        keepvalues = self.settings.keepvalues
        if request.vars.delete_this_record:
            keepvalues = False
        if isinstance(onvalidation,StorageList):
            onvalidation=onvalidation.get(table._tablename, [])
        if form.accepts(request, _session, formname=_formname,
                        onvalidation=onvalidation, keepvalues=keepvalues,
                        hideerror=self.settings.hideerror,
                        detect_record_change = self.settings.detect_record_change):
            self.accepted = True
            response.flash = message
            if log:
                self.log_event(log % form.vars)
            if request.vars.delete_this_record:
                self.deleted = True
                message = self.messages.record_deleted
                callback(ondelete,form,table._tablename)
            response.flash = message
            callback(onaccept,form,table._tablename)
            if not request.extension in ('html','load'):
                raise HTTP(200, 'RECORD CREATED/UPDATED')
            if isinstance(next, (list, tuple)): ### fix issue with 2.6
               next = next[0]
            if next: # Only redirect when explicit
                if next[0] != '/' and next[:4] != 'http':
                    next = URL(r=request,
                               f=next.replace('[id]', str(form.vars.id)))
                session.flash = response.flash
                redirect(next)
        elif not request.extension in ('html','load'):
            raise HTTP(401)
        return form

    def create(
        self,
        table,
        next=DEFAULT,
        onvalidation=DEFAULT,
        onaccept=DEFAULT,
        log=DEFAULT,
        message=DEFAULT,
        formname=DEFAULT,
        ):
        """
        .. method:: Crud.create(table, [next=DEFAULT [, onvalidation=DEFAULT
            [, onaccept=DEFAULT [, log=DEFAULT[, message=DEFAULT]]]]])
        """

        if next == DEFAULT:
            next = self.settings.create_next
        if onvalidation == DEFAULT:
            onvalidation = self.settings.create_onvalidation
        if onaccept == DEFAULT:
            onaccept = self.settings.create_onaccept
        if log == DEFAULT:
            log = self.messages.create_log
        if message == DEFAULT:
            message = self.messages.record_created
        return self.update(
            table,
            None,
            next=next,
            onvalidation=onvalidation,
            onaccept=onaccept,
            log=log,
            message=message,
            deletable=False,
            formname=formname,
            )

    def read(self, table, record):
        if not (isinstance(table, self.db.Table) or table in self.db.tables) \
                or (isinstance(record, str) and not str(record).isdigit()):
            raise HTTP(404)
        if not isinstance(table, self.db.Table):
            table = self.db[table]
        if not self.has_permission('read', table, record):
            redirect(self.settings.auth.settings.on_failed_authorization)
        form = SQLFORM(
            table,
            record,
            readonly=True,
            comments=False,
            upload=self.settings.download_url,
            showid=self.settings.showid,
            formstyle=self.settings.formstyle,
            separator=self.settings.label_separator
            )
        if not current.request.extension in ('html','load'):
            return table._filter_fields(form.record, id=True)
        return form

    def delete(
        self,
        table,
        record_id,
        next=DEFAULT,
        message=DEFAULT,
        ):
        """
        .. method:: Crud.delete(table, record_id, [next=DEFAULT
            [, message=DEFAULT]])
        """
        if not (isinstance(table, self.db.Table) or table in self.db.tables) \
                or not str(record_id).isdigit():
            raise HTTP(404)
        if not isinstance(table, self.db.Table):
            table = self.db[table]
        if not self.has_permission('delete', table, record_id):
            redirect(self.settings.auth.settings.on_failed_authorization)
        request = current.request
        session = current.session
        if next == DEFAULT:
            next = request.get_vars._next \
                or request.post_vars._next \
                or self.settings.delete_next
        if message == DEFAULT:
            message = self.messages.record_deleted
        record = table[record_id]
        if record:
            callback(self.settings.delete_onvalidation,record)
            del table[record_id]
            callback(self.settings.delete_onaccept,record,table._tablename)
            session.flash = message
        if next: # Only redirect when explicit
            redirect(next)

    def rows(
        self,
        table,
        query=None,
        fields=None,
        orderby=None,
        limitby=None,
        ):
        request = current.request
        if not (isinstance(table, self.db.Table) or table in self.db.tables):
            raise HTTP(404)
        if not self.has_permission('select', table):
            redirect(self.settings.auth.settings.on_failed_authorization)
        #if record_id and not self.has_permission('select', table):
        #    redirect(self.settings.auth.settings.on_failed_authorization)
        if not isinstance(table, self.db.Table):
            table = self.db[table]
        if not query:
            query = table.id > 0
        if not fields:
            fields = [field for field in table if field.readable]
        rows = self.db(query).select(*fields,**dict(orderby=orderby,
                                                    limitby=limitby))
        return rows

    def select(
        self,
        table,
        query=None,
        fields=None,
        orderby=None,
        limitby=None,
        headers={},
        **attr
        ):
        rows = self.rows(table,query,fields,orderby,limitby)
        if not rows:
            return None # Nicer than an empty table.
        if not 'upload' in attr:
            attr['upload'] = self.url('download')
        if not current.request.extension in ('html','load'):
            return rows.as_list()
        if not headers:
            if isinstance(table,str):
                table = self.db[table]
            headers = dict((str(k),k.label) for k in table)
        return SQLTABLE(rows,headers=headers,**attr)

    def get_format(self, field):
        rtable = field._db[field.type[10:]]
        format = rtable.get('_format', None)
        if format and isinstance(format, str):
            return format[2:-2]
        return field.name

    def get_query(self, field, op, value, refsearch=False):
        try:
            if refsearch: format = self.get_format(field)
            if op == 'equals':
                if not refsearch:
                    return field == value
                else:
                    return lambda row: row[field.name][format] == value
            elif op == 'not equal':
                if not refsearch:
                    return field != value
                else:
                    return lambda row: row[field.name][format] != value
            elif op == 'greater than':
                if not refsearch:
                    return field > value
                else:
                    return lambda row: row[field.name][format] > value
            elif op == 'less than':
                if not refsearch:
                    return field < value
                else:
                    return lambda row: row[field.name][format] < value
            elif op == 'starts with':
                if not refsearch:
                    return field.like(value+'%')
                else:
                    return lambda row: str(row[field.name][format]).startswith(value)
            elif op == 'ends with':
                if not refsearch:
                    return field.like('%'+value)
                else:
                    return lambda row: str(row[field.name][format]).endswith(value)
            elif op == 'contains':
                if not refsearch:
                    return field.like('%'+value+'%')
                else:
                    return lambda row: value in row[field.name][format]
        except:
            return None


    def search(self, *tables, **args):
        """
        Creates a search form and its results for a table
        Example usage:
        form, results = crud.search(db.test,
                               queries = ['equals', 'not equal', 'contains'],
                               query_labels={'equals':'Equals',
                                             'not equal':'Not equal'},
                               fields = ['id','children'],
                               field_labels = {'id':'ID','children':'Children'},
                               zero='Please choose',
                               query = (db.test.id > 0)&(db.test.id != 3) )
        """
        table = tables[0]
        fields = args.get('fields', table.fields)
        request = current.request
        db = self.db
        if not (isinstance(table, db.Table) or table in db.tables):
            raise HTTP(404)
        attributes = {}
        for key in ('orderby','groupby','left','distinct','limitby','cache'):
            if key in args: attributes[key]=args[key]
        tbl = TABLE()
        selected = []; refsearch = []; results = []
        ops = args.get('queries', [])
        zero = args.get('zero', '')
        if not ops:
            ops = ['equals', 'not equal', 'greater than',
                   'less than', 'starts with',
                   'ends with', 'contains']
        ops.insert(0,zero)
        query_labels = args.get('query_labels', {})
        query = args.get('query',table.id > 0)
        field_labels = args.get('field_labels',{})
        for field in fields:
            field = table[field]
            if not field.readable: continue
            fieldname = field.name
            chkval = request.vars.get('chk' + fieldname, None)
            txtval = request.vars.get('txt' + fieldname, None)
            opval = request.vars.get('op' + fieldname, None)
            row = TR(TD(INPUT(_type = "checkbox", _name = "chk" + fieldname,
                              _disabled = (field.type == 'id'),
                              value = (field.type == 'id' or chkval == 'on'))),
                     TD(field_labels.get(fieldname,field.label)),
                     TD(SELECT([OPTION(query_labels.get(op,op),
                                       _value=op) for op in ops],
                               _name = "op" + fieldname,
                               value = opval)),
                     TD(INPUT(_type = "text", _name = "txt" + fieldname,
                              _value = txtval, _id='txt' + fieldname,
                              _class = str(field.type))))
            tbl.append(row)
            if request.post_vars and (chkval or field.type=='id'):
                if txtval and opval != '':
                    if field.type[0:10] == 'reference ':
                        refsearch.append(self.get_query(field,
                                    opval, txtval, refsearch=True))
                    else:
                        value, error = field.validate(txtval)
                        if not error:
                            ### TODO deal with 'starts with', 'ends with', 'contains' on GAE
                            query &= self.get_query(field, opval, value)
                        else:
                            row[3].append(DIV(error,_class='error'))
                selected.append(field)
        form = FORM(tbl,INPUT(_type="submit"))
        if selected:
            try:
                results = db(query).select(*selected,**attributes)
                for r in refsearch:
                    results = results.find(r)
            except: # hmmm, we should do better here
                results = None
        return form, results


urllib2.install_opener(urllib2.build_opener(urllib2.HTTPCookieProcessor()))

def fetch(url, data=None, headers={},
          cookie=Cookie.SimpleCookie(),
          user_agent='Mozilla/5.0'):
    if data != None:
        data = urllib.urlencode(data)
    if user_agent: headers['User-agent'] = user_agent
    headers['Cookie'] = ' '.join(['%s=%s;'%(c.key,c.value) for c in cookie.values()])
    try:
        from google.appengine.api import urlfetch
    except ImportError:
        req = urllib2.Request(url, data, headers)
        html = urllib2.urlopen(req).read()
    else:
        method = ((data==None) and urlfetch.GET) or urlfetch.POST
        while url is not None:
            response = urlfetch.fetch(url=url, payload=data,
                                      method=method, headers=headers,
                                      allow_truncated=False,follow_redirects=False,
                                      deadline=10)
            # next request will be a get, so no need to send the data again
            data = None
            method = urlfetch.GET
            # load cookies from the response
            cookie.load(response.headers.get('set-cookie', ''))
            url = response.headers.get('location')
        html = response.content
    return html

regex_geocode = \
    re.compile('\<coordinates\>(?P<la>[^,]*),(?P<lo>[^,]*).*?\</coordinates\>')


def geocode(address):
    try:
        a = urllib.quote(address)
        txt = fetch('http://maps.google.com/maps/geo?q=%s&output=xml'
                     % a)
        item = regex_geocode.search(txt)
        (la, lo) = (float(item.group('la')), float(item.group('lo')))
        return (la, lo)
    except:
        return (0.0, 0.0)


def universal_caller(f, *a, **b):
    c = f.func_code.co_argcount
    n = f.func_code.co_varnames[:c]

    defaults = f.func_defaults or []
    pos_args = n[0:-len(defaults)]
    named_args = n[-len(defaults):]

    arg_dict = {}

    # Fill the arg_dict with name and value for the submitted, positional values
    for pos_index, pos_val in enumerate(a[:c]):
        arg_dict[n[pos_index]] = pos_val    # n[pos_index] is the name of the argument

    # There might be pos_args left, that are sent as named_values. Gather them as well.
    # If a argument already is populated with values we simply replaces them.
    for arg_name in pos_args[len(arg_dict):]:
        if b.has_key(arg_name):
            arg_dict[arg_name] = b[arg_name]

    if len(arg_dict) >= len(pos_args):
        # All the positional arguments is found. The function may now be called.
        # However, we need to update the arg_dict with the values from the named arguments as well.
        for arg_name in named_args:
            if b.has_key(arg_name):
                arg_dict[arg_name] = b[arg_name]

        return f(**arg_dict)

    # Raise an error, the function cannot be called.
    raise HTTP(404, "Object does not exist")


class Service(object):

    def __init__(self, environment=None):
        self.run_procedures = {}
        self.csv_procedures = {}
        self.xml_procedures = {}
        self.rss_procedures = {}
        self.json_procedures = {}
        self.jsonrpc_procedures = {}
        self.xmlrpc_procedures = {}
        self.amfrpc_procedures = {}
        self.amfrpc3_procedures = {}
        self.soap_procedures = {}

    def run(self, f):
        """
        example::

            service = Service(globals())
            @service.run
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        Then call it with::

            wget http://..../app/default/call/run/myfunction?a=3&b=4

        """
        self.run_procedures[f.__name__] = f
        return f

    def csv(self, f):
        """
        example::

            service = Service(globals())
            @service.csv
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        Then call it with::

            wget http://..../app/default/call/csv/myfunction?a=3&b=4

        """
        self.run_procedures[f.__name__] = f
        return f

    def xml(self, f):
        """
        example::

            service = Service(globals())
            @service.xml
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        Then call it with::

            wget http://..../app/default/call/xml/myfunction?a=3&b=4

        """
        self.run_procedures[f.__name__] = f
        return f

    def rss(self, f):
        """
        example::

            service = Service(globals())
            @service.rss
            def myfunction():
                return dict(title=..., link=..., description=...,
                    created_on=..., entries=[dict(title=..., link=...,
                        description=..., created_on=...])
            def call():
                return service()

        Then call it with::

            wget http://..../app/default/call/rss/myfunction

        """
        self.rss_procedures[f.__name__] = f
        return f

    def json(self, f):
        """
        example::

            service = Service(globals())
            @service.json
            def myfunction(a, b):
                return [{a: b}]
            def call():
                return service()

        Then call it with::

            wget http://..../app/default/call/json/myfunction?a=hello&b=world

        """
        self.json_procedures[f.__name__] = f
        return f

    def jsonrpc(self, f):
        """
        example::

            service = Service(globals())
            @service.jsonrpc
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        Then call it with::

            wget http://..../app/default/call/jsonrpc/myfunction?a=hello&b=world

        """
        self.jsonrpc_procedures[f.__name__] = f
        return f

    def xmlrpc(self, f):
        """
        example::

            service = Service(globals())
            @service.xmlrpc
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        The call it with::

            wget http://..../app/default/call/xmlrpc/myfunction?a=hello&b=world

        """
        self.xmlrpc_procedures[f.__name__] = f
        return f

    def amfrpc(self, f):
        """
        example::

            service = Service(globals())
            @service.amfrpc
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        The call it with::

            wget http://..../app/default/call/amfrpc/myfunction?a=hello&b=world

        """
        self.amfrpc_procedures[f.__name__] = f
        return f

    def amfrpc3(self, domain='default'):
        """
        example::

            service = Service(globals())
            @service.amfrpc3('domain')
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        The call it with::

            wget http://..../app/default/call/amfrpc3/myfunction?a=hello&b=world

        """
        if not isinstance(domain, str):
            raise SyntaxError, "AMF3 requires a domain for function"

        def _amfrpc3(f):
            if domain:
                self.amfrpc3_procedures[domain+'.'+f.__name__] = f
            else:
                self.amfrpc3_procedures[f.__name__] = f
            return f
        return _amfrpc3

    def soap(self, name=None, returns=None, args=None,doc=None):
        """
        example::

            service = Service(globals())
            @service.soap('MyFunction',returns={'result':int},args={'a':int,'b':int,})
            def myfunction(a, b):
                return a + b
            def call():
                return service()

        The call it with::

            from gluon.contrib.pysimplesoap.client import SoapClient
            client = SoapClient(wsdl="http://..../app/default/call/soap?WSDL")
            response = client.MyFunction(a=1,b=2)
            return response['result']

        Exposes online generated documentation and xml example messages at:
        - http://..../app/default/call/soap
        """

        def _soap(f):
            self.soap_procedures[name or f.__name__] = f, returns, args, doc
            return f
        return _soap

    def serve_run(self, args=None):
        request = current.request
        if not args:
            args = request.args
        if args and args[0] in self.run_procedures:
            return str(universal_caller(self.run_procedures[args[0]],
                                        *args[1:], **dict(request.vars)))
        self.error()

    def serve_csv(self, args=None):
        request = current.request
        response = current.response
        response.headers['Content-Type'] = 'text/x-csv'
        if not args:
            args = request.args

        def none_exception(value):
            if isinstance(value, unicode):
                return value.encode('utf8')
            if hasattr(value, 'isoformat'):
                return value.isoformat()[:19].replace('T', ' ')
            if value == None:
                return '<NULL>'
            return value
        if args and args[0] in self.run_procedures:
            r = universal_caller(self.run_procedures[args[0]],
                                 *args[1:], **dict(request.vars))
            s = cStringIO.StringIO()
            if hasattr(r, 'export_to_csv_file'):
                r.export_to_csv_file(s)
            elif r and isinstance(r[0], (dict, Storage)):
                import csv
                writer = csv.writer(s)
                writer.writerow(r[0].keys())
                for line in r:
                    writer.writerow([none_exception(v) \
                                     for v in line.values()])
            else:
                import csv
                writer = csv.writer(s)
                for line in r:
                    writer.writerow(line)
            return s.getvalue()
        self.error()

    def serve_xml(self, args=None):
        request = current.request
        response = current.response
        response.headers['Content-Type'] = 'text/xml'
        if not args:
            args = request.args
        if args and args[0] in self.run_procedures:
            s = universal_caller(self.run_procedures[args[0]],
                                 *args[1:], **dict(request.vars))
            if hasattr(s, 'as_list'):
                s = s.as_list()
            return serializers.xml(s)
        self.error()

    def serve_rss(self, args=None):
        request = current.request
        response = current.response
        if not args:
            args = request.args
        if args and args[0] in self.rss_procedures:
            feed = universal_caller(self.rss_procedures[args[0]],
                                    *args[1:], **dict(request.vars))
        else:
            self.error()
        response.headers['Content-Type'] = 'application/rss+xml'
        return serializers.rss(feed)

    def serve_json(self, args=None):
        request = current.request
        response = current.response
        response.headers['Content-Type'] = 'text/x-json'
        if not args:
            args = request.args
        d = dict(request.vars)
        if args and args[0] in self.json_procedures:
            s = universal_caller(self.json_procedures[args[0]],*args[1:],**d)
            if hasattr(s, 'as_list'):
                s = s.as_list()
            return response.json(s)
        self.error()

    class JsonRpcException(Exception):
        def __init__(self,code,info):
            self.code,self.info = code,info

    def serve_jsonrpc(self):
        import contrib.simplejson as simplejson
        def return_response(id, result):
            return serializers.json({'version': '1.1',
                'id': id, 'result': result, 'error': None})

        def return_error(id, code, message):
            return serializers.json({'id': id,
                                     'version': '1.1',
                                     'error': {'name': 'JSONRPCError',
                                        'code': code, 'message': message}
                                     })

        request = current.request
        methods = self.jsonrpc_procedures
        data = simplejson.loads(request.body.read())
        id, method, params = data['id'], data['method'], data.get('params','')
        if not method in methods:
            return return_error(id, 100, 'method "%s" does not exist' % method)
        try:
            s = methods[method](*params)
            if hasattr(s, 'as_list'):
                s = s.as_list()
            return return_response(id, s)
        except Service.JsonRpcException, e:
            return return_error(id, e.code, e.info)
        except BaseException:
            etype, eval, etb = sys.exc_info()
            return return_error(id, 100, '%s: %s' % (etype.__name__, eval))
        except:
            etype, eval, etb = sys.exc_info()
            return return_error(id, 100, 'Exception %s: %s' % (etype, eval))

    def serve_xmlrpc(self):
        request = current.request
        response = current.response
        services = self.xmlrpc_procedures.values()
        return response.xmlrpc(request, services)

    def serve_amfrpc(self, version=0):
        try:
            import pyamf
            import pyamf.remoting.gateway
        except:
            return "pyamf not installed or not in Python sys.path"
        request = current.request
        response = current.response
        if version == 3:
            services = self.amfrpc3_procedures
            base_gateway = pyamf.remoting.gateway.BaseGateway(services)
            pyamf_request = pyamf.remoting.decode(request.body)
        else:
            services = self.amfrpc_procedures
            base_gateway = pyamf.remoting.gateway.BaseGateway(services)
            context = pyamf.get_context(pyamf.AMF0)
            pyamf_request = pyamf.remoting.decode(request.body, context)
        pyamf_response = pyamf.remoting.Envelope(pyamf_request.amfVersion)
        for name, message in pyamf_request:
            pyamf_response[name] = base_gateway.getProcessor(message)(message)
        response.headers['Content-Type'] = pyamf.remoting.CONTENT_TYPE
        if version==3:
            return pyamf.remoting.encode(pyamf_response).getvalue()
        else:
            return pyamf.remoting.encode(pyamf_response, context).getvalue()

    def serve_soap(self, version="1.1"):
        try:
            from contrib.pysimplesoap.server import SoapDispatcher
        except:
            return "pysimplesoap not installed in contrib"
        request = current.request
        response = current.response
        procedures = self.soap_procedures

        location = "%s://%s%s" % (
                        request.env.wsgi_url_scheme,
                        request.env.http_host,
                        URL(r=request,f="call/soap",vars={}))
        namespace = 'namespace' in response and response.namespace or location
        documentation = response.description or ''
        dispatcher = SoapDispatcher(
            name = response.title,
            location = location,
            action = location, # SOAPAction
            namespace = namespace,
            prefix='pys',
            documentation = documentation,
            ns = True)
        for method, (function, returns, args, doc) in procedures.items():
            dispatcher.register_function(method, function, returns, args, doc)
        if request.env.request_method == 'POST':
            # Process normal Soap Operation
            response.headers['Content-Type'] = 'text/xml'
            return dispatcher.dispatch(request.body.read())
        elif 'WSDL' in request.vars:
            # Return Web Service Description
            response.headers['Content-Type'] = 'text/xml'
            return dispatcher.wsdl()
        elif 'op' in request.vars:
            # Return method help webpage
            response.headers['Content-Type'] = 'text/html'
            method  = request.vars['op']
            sample_req_xml, sample_res_xml, doc = dispatcher.help(method)
            body = [H1("Welcome to Web2Py SOAP webservice gateway"),
                    A("See all webservice operations",
                      _href=URL(r=request,f="call/soap",vars={})),
                    H2(method),
                    P(doc),
                    UL(LI("Location: %s" % dispatcher.location),
                       LI("Namespace: %s" % dispatcher.namespace),
                       LI("SoapAction: %s" % dispatcher.action),
                    ),
                    H3("Sample SOAP XML Request Message:"),
                    CODE(sample_req_xml,language="xml"),
                    H3("Sample SOAP XML Response Message:"),
                    CODE(sample_res_xml,language="xml"),
                    ]
            return {'body': body}
        else:
            # Return general help and method list webpage
            response.headers['Content-Type'] = 'text/html'
            body = [H1("Welcome to Web2Py SOAP webservice gateway"),
                    P(response.description),
                    P("The following operations are available"),
                    A("See WSDL for webservice description",
                      _href=URL(r=request,f="call/soap",vars={"WSDL":None})),
                    UL([LI(A("%s: %s" % (method, doc or ''),
                             _href=URL(r=request,f="call/soap",vars={'op': method})))
                        for method, doc in dispatcher.list_methods()]),
                    ]
            return {'body': body}

    def __call__(self):
        """
        register services with:
        service = Service(globals())
        @service.run
        @service.rss
        @service.json
        @service.jsonrpc
        @service.xmlrpc
        @service.jsonrpc
        @service.amfrpc
        @service.amfrpc3('domain')
        @service.soap('Method', returns={'Result':int}, args={'a':int,'b':int,})

        expose services with

        def call(): return service()

        call services with
        http://..../app/default/call/run?[parameters]
        http://..../app/default/call/rss?[parameters]
        http://..../app/default/call/json?[parameters]
        http://..../app/default/call/jsonrpc
        http://..../app/default/call/xmlrpc
        http://..../app/default/call/amfrpc
        http://..../app/default/call/amfrpc3
        http://..../app/default/call/soap
        """

        request = current.request
        if len(request.args) < 1:
            raise HTTP(404, "Not Found")
        arg0 = request.args(0)
        if arg0 == 'run':
            return self.serve_run(request.args[1:])
        elif arg0 == 'rss':
            return self.serve_rss(request.args[1:])
        elif arg0 == 'csv':
            return self.serve_csv(request.args[1:])
        elif arg0 == 'xml':
            return self.serve_xml(request.args[1:])
        elif arg0 == 'json':
            return self.serve_json(request.args[1:])
        elif arg0 == 'jsonrpc':
            return self.serve_jsonrpc()
        elif arg0 == 'xmlrpc':
            return self.serve_xmlrpc()
        elif arg0 == 'amfrpc':
            return self.serve_amfrpc()
        elif arg0 == 'amfrpc3':
            return self.serve_amfrpc(3)
        elif arg0 == 'soap':
            return self.serve_soap()
        else:
            self.error()

    def error(self):
        raise HTTP(404, "Object does not exist")


def completion(callback):
    """
    Executes a task on completion of the called action. For example:

        from gluon.tools import completion
        @completion(lambda d: logging.info(repr(d)))
        def index():
            return dict(message='hello')

    It logs the output of the function every time input is called.
    The argument of completion is executed in a new thread.
    """
    def _completion(f):
        def __completion(*a,**b):
            d = None
            try:
                d = f(*a,**b)
                return d
            finally:
                thread.start_new_thread(callback,(d,))
        return __completion
    return _completion

def prettydate(d,T=lambda x:x):
    try:
        dt = datetime.datetime.now() - d
    except:
        return ''
    if dt.days >= 2*365:
        return T('%d years ago') % int(dt.days / 365)
    elif dt.days >= 365:
        return T('1 year ago')
    elif dt.days >= 60:
        return T('%d months ago') % int(dt.days / 30)
    elif dt.days > 21:
        return T('1 month ago')
    elif dt.days >= 14:
        return T('%d weeks ago') % int(dt.days / 7)
    elif dt.days >= 7:
        return T('1 week ago')
    elif dt.days > 1:
        return T('%d days ago') % dt.days
    elif dt.days == 1:
        return T('1 day ago')
    elif dt.seconds >= 2*60*60:
        return T('%d hours ago') % int(dt.seconds / 3600)
    elif dt.seconds >= 60*60:
        return T('1 hour ago')
    elif dt.seconds >= 2*60:
        return T('%d minutes ago') % int(dt.seconds / 60)
    elif dt.seconds >= 60:
        return T('1 minute ago')
    elif dt.seconds > 1:
        return T('%d seconds ago') % dt.seconds
    elif dt.seconds == 1:
        return T('1 second ago')
    else:
        return T('now')

def test_thread_separation():
    def f():
        c=PluginManager()
        lock1.acquire()
        lock2.acquire()
        c.x=7
        lock1.release()
        lock2.release()
    lock1=thread.allocate_lock()
    lock2=thread.allocate_lock()
    lock1.acquire()
    thread.start_new_thread(f,())
    a=PluginManager()
    a.x=5
    lock1.release()
    lock2.acquire()
    return a.x

class PluginManager(object):
    """

    Plugin Manager is similar to a storage object but it is a single level singleton
    this means that multiple instances within the same thread share the same attributes
    Its constructor is also special. The first argument is the name of the plugin you are defining.
    The named arguments are parameters needed by the plugin with default values.
    If the parameters were previous defined, the old values are used.

    For example:

    ### in some general configuration file:
    >>> plugins = PluginManager()
    >>> plugins.me.param1=3

    ### within the plugin model
    >>> _ = PluginManager('me',param1=5,param2=6,param3=7)

    ### where the plugin is used
    >>> print plugins.me.param1
    3
    >>> print plugins.me.param2
    6
    >>> plugins.me.param3 = 8
    >>> print plugins.me.param3
    8

    Here are some tests:

    >>> a=PluginManager()
    >>> a.x=6
    >>> b=PluginManager('check')
    >>> print b.x
    6
    >>> b=PluginManager() # reset settings
    >>> print b.x
    <Storage {}>
    >>> b.x=7
    >>> print a.x
    7
    >>> a.y.z=8
    >>> print b.y.z
    8
    >>> test_thread_separation()
    5
    >>> plugins=PluginManager('me',db='mydb')
    >>> print plugins.me.db
    mydb
    >>> print 'me' in plugins
    True
    >>> print plugins.me.installed
    True
    """
    instances = {}
    def __new__(cls,*a,**b):
        id = thread.get_ident()
        lock = thread.allocate_lock()
        try:
            lock.acquire()
            try:
                return cls.instances[id]
            except KeyError:
                instance = object.__new__(cls,*a,**b)
                cls.instances[id] = instance
                return instance
        finally:
            lock.release()
    def __init__(self,plugin=None,**defaults):
        if not plugin:
            self.__dict__.clear()
        settings = self.__getattr__(plugin)
        settings.installed = True
        [settings.update({key:value}) for key,value in defaults.items() if not key in settings]
    def __getattr__(self, key):
        if not key in self.__dict__:
            self.__dict__[key] = Storage()
        return self.__dict__[key]
    def keys(self):
        return self.__dict__.keys()
    def __contains__(self,key):
        return key in self.__dict__

if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/utils.py version [c924bf11cb].
































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

This file specifically includes utilities for security.
"""

import hashlib
import hmac
import uuid
import random
import time
import os
import logging

logger = logging.getLogger("web2py")

def md5_hash(text):
    """ Generate a md5 hash with the given text """
    return hashlib.md5(text).hexdigest()

def simple_hash(text, digest_alg = 'md5'):
    """
    Generates hash with the given text using the specified
    digest hashing algorithm
    """
    if not digest_alg:
        raise RuntimeError, "simple_hash with digest_alg=None"
    elif not isinstance(digest_alg,str):
        h = digest_alg(text)
    else:
        h = hashlib.new(digest_alg)
        h.update(text)
    return h.hexdigest()

def get_digest(value):
    """
    Returns a hashlib digest algorithm from a string
    """
    if not isinstance(value,str):
        return value
    value = value.lower()
    if value == "md5":
        return hashlib.md5
    elif value == "sha1":
        return hashlib.sha1
    elif value == "sha224":
        return hashlib.sha224
    elif value == "sha256":
        return hashlib.sha256
    elif value == "sha384":
        return hashlib.sha384
    elif value == "sha512":
        return hashlib.sha512
    else:
        raise ValueError("Invalid digest algorithm")

def hmac_hash(value, key, digest_alg='md5', salt=None):
    if ':' in key:
        digest_alg, key = key.split(':')
    digest_alg = get_digest(digest_alg)
    d = hmac.new(key,value,digest_alg)
    if salt:
        d.update(str(salt))
    return d.hexdigest()


### compute constant ctokens
def initialize_urandom():
    """
    This function and the web2py_uuid follow from the following discussion:
    http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09

    At startup web2py compute a unique ID that identifies the machine by adding
    uuid.getnode() + int(time.time() * 1e3)

    This is a 48-bit number. It converts the number into 16 8-bit tokens.
    It uses this value to initialize the entropy source ('/dev/urandom') and to seed random.

    If os.random() is not supported, it falls back to using random and issues a warning.
    """
    node_id = uuid.getnode()
    microseconds = int(time.time() * 1e6)
    ctokens = [((node_id + microseconds) >> ((i%6)*8)) % 256 for i in range(16)]
    random.seed(node_id + microseconds)
    try:
        os.urandom(1)
        try:
            # try to add process-specific entropy
            frandom = open('/dev/urandom','wb')
            try:
                frandom.write(''.join(chr(t) for t in ctokens))
            finally:
                frandom.close()
        except IOError:
            # works anyway
            pass
    except NotImplementedError:
        logger.warning(
"""Cryptographically secure session management is not possible on your system because
your system does not provide a cryptographically secure entropy source.
This is not specific to web2py; consider deploying on a different operating system.""")
    return ctokens
ctokens = initialize_urandom()

def web2py_uuid():
    """
    This function follows from the following discussion:
    http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09

    It works like uuid.uuid4 except that tries to use os.urandom() if possible
    and it XORs the output with the tokens uniquely associated with this machine.
    """
    bytes = [random.randrange(256) for i in range(16)]
    try:
        ubytes = [ord(c) for c in os.urandom(16)] # use /dev/urandom if possible
        bytes = [bytes[i] ^ ubytes[i] for i in range(16)]
    except NotImplementedError:
        pass
    ## xor bytes with constant ctokens
    bytes = ''.join(chr(c ^ ctokens[i]) for i,c in enumerate(bytes))
    return str(uuid.UUID(bytes=bytes, version=4))

Added gluon/validators.py version [0b976e1d6d].























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE
"""

import os
import re
import datetime
import time
import cgi
import urllib
import struct
import decimal
import unicodedata
from cStringIO import StringIO
from utils import simple_hash, hmac_hash

__all__ = [
    'CLEANUP',
    'CRYPT',
    'IS_ALPHANUMERIC',
    'IS_DATE_IN_RANGE',
    'IS_DATE',
    'IS_DATETIME_IN_RANGE',
    'IS_DATETIME',
    'IS_DECIMAL_IN_RANGE',
    'IS_EMAIL',
    'IS_EMPTY_OR',
    'IS_EXPR',
    'IS_FLOAT_IN_RANGE',
    'IS_IMAGE',
    'IS_IN_DB',
    'IS_IN_SET',
    'IS_INT_IN_RANGE',
    'IS_IPV4',
    'IS_LENGTH',
    'IS_LIST_OF',
    'IS_LOWER',
    'IS_MATCH',
    'IS_EQUAL_TO',
    'IS_NOT_EMPTY',
    'IS_NOT_IN_DB',
    'IS_NULL_OR',
    'IS_SLUG',
    'IS_STRONG',
    'IS_TIME',
    'IS_UPLOAD_FILENAME',
    'IS_UPPER',
    'IS_URL',
    ]

def translate(text):
    if isinstance(text,(str,unicode)):
        from globals import current
        if hasattr(current,'T'):
            return current.T(text)
    return text

def options_sorter(x,y):
    return (str(x[1]).upper()>str(y[1]).upper() and 1) or -1

class Validator(object):
    """
    Root for all validators, mainly for documentation purposes.

    Validators are classes used to validate input fields (including forms
    generated from database tables).

    Here is an example of using a validator with a FORM::

        INPUT(_name='a', requires=IS_INT_IN_RANGE(0, 10))

    Here is an example of how to require a validator for a table field::

        db.define_table('person', SQLField('name'))
        db.person.name.requires=IS_NOT_EMPTY()

    Validators are always assigned using the requires attribute of a field. A
    field can have a single validator or multiple validators. Multiple
    validators are made part of a list::

        db.person.name.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'person.id')]

    Validators are called by the function accepts on a FORM or other HTML
    helper object that contains a form. They are always called in the order in
    which they are listed.

    Built-in validators have constructors that take the optional argument error
    message which allows you to change the default error message.
    Here is an example of a validator on a database table::

        db.person.name.requires=IS_NOT_EMPTY(error_message=T('fill this'))

    where we have used the translation operator T to allow for
    internationalization.

    Notice that default error messages are not translated.
    """

    def formatter(self, value):
        """
        For some validators returns a formatted version (matching the validator)
        of value. Otherwise just returns the value.
        """
        return value


class IS_MATCH(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_MATCH('.+'))

    the argument of IS_MATCH is a regular expression::

        >>> IS_MATCH('.+')('hello')
        ('hello', None)

        >>> IS_MATCH('.+')('')
        ('', 'invalid expression')
    """

    def __init__(self, expression, error_message='invalid expression', strict=True):
        if strict:
            if not expression.endswith('$'):
                expression = '(%s)$' % expression
        self.regex = re.compile(expression)
        self.error_message = error_message

    def __call__(self, value):
        match = self.regex.match(value)
        if match:
            return (match.group(), None)
        return (value, translate(self.error_message))


class IS_EQUAL_TO(Validator):
    """
    example::

        INPUT(_type='text', _name='password')
        INPUT(_type='text', _name='password2',
              requires=IS_EQUAL_TO(request.vars.password))

    the argument of IS_EQUAL_TO is a string

        >>> IS_EQUAL_TO('aaa')('aaa')
        ('aaa', None)

        >>> IS_EQUAL_TO('aaa')('aab')
        ('aab', 'no match')
    """

    def __init__(self, expression, error_message='no match'):
        self.expression = expression
        self.error_message = error_message

    def __call__(self, value):
        if value == self.expression:
            return (value, None)
        return (value, translate(self.error_message))


class IS_EXPR(Validator):
    """
    example::

        INPUT(_type='text', _name='name',
            requires=IS_EXPR('5 < int(value) < 10'))

    the argument of IS_EXPR must be python condition::

        >>> IS_EXPR('int(value) < 2')('1')
        ('1', None)

        >>> IS_EXPR('int(value) < 2')('2')
        ('2', 'invalid expression')
    """

    def __init__(self, expression, error_message='invalid expression'):
        self.expression = expression
        self.error_message = error_message

    def __call__(self, value):
        environment = {'value': value}
        exec '__ret__=' + self.expression in environment
        if environment['__ret__']:
            return (value, None)
        return (value, translate(self.error_message))


class IS_LENGTH(Validator):
    """
    Checks if length of field's value fits between given boundaries. Works
    for both text and file inputs.

    Arguments:

    maxsize: maximum allowed length / size
    minsize: minimum allowed length / size

    Examples::

        #Check if text string is shorter than 33 characters:
        INPUT(_type='text', _name='name', requires=IS_LENGTH(32))

        #Check if password string is longer than 5 characters:
        INPUT(_type='password', _name='name', requires=IS_LENGTH(minsize=6))

        #Check if uploaded file has size between 1KB and 1MB:
        INPUT(_type='file', _name='name', requires=IS_LENGTH(1048576, 1024))

        >>> IS_LENGTH()('')
        ('', None)
        >>> IS_LENGTH()('1234567890')
        ('1234567890', None)
        >>> IS_LENGTH(maxsize=5, minsize=0)('1234567890')  # too long
        ('1234567890', 'enter from 0 to 5 characters')
        >>> IS_LENGTH(maxsize=50, minsize=20)('1234567890')  # too short
        ('1234567890', 'enter from 20 to 50 characters')
    """

    def __init__(self, maxsize=255, minsize=0,
                 error_message='enter from %(min)g to %(max)g characters'):
        self.maxsize = maxsize
        self.minsize = minsize
        self.error_message = error_message

    def __call__(self, value):
        if isinstance(value, cgi.FieldStorage):
            if value.file:
                value.file.seek(0, os.SEEK_END)
                length = value.file.tell()
                value.file.seek(0, os.SEEK_SET)
            else:
                val = value.value
                if val:
                    length = len(val)
                else:
                    length = 0
            if self.minsize <= length <= self.maxsize:
                return (value, None)
        elif isinstance(value, (str, unicode, list)):
            if self.minsize <= len(value) <= self.maxsize:
                return (value, None)
        elif self.minsize <= len(str(value)) <= self.maxsize:
            try:
                value.decode('utf8')
                return (value, None)
            except:
                pass
        return (value, translate(self.error_message) \
                    % dict(min=self.minsize, max=self.maxsize))


class IS_IN_SET(Validator):
    """
    example::

        INPUT(_type='text', _name='name',
              requires=IS_IN_SET(['max', 'john'],zero=''))

    the argument of IS_IN_SET must be a list or set

        >>> IS_IN_SET(['max', 'john'])('max')
        ('max', None)
        >>> IS_IN_SET(['max', 'john'])('massimo')
        ('massimo', 'value not allowed')
        >>> IS_IN_SET(['max', 'john'], multiple=True)(('max', 'john'))
        (('max', 'john'), None)
        >>> IS_IN_SET(['max', 'john'], multiple=True)(('bill', 'john'))
        (('bill', 'john'), 'value not allowed')
        >>> IS_IN_SET(('id1','id2'), ['first label','second label'])('id1') # Traditional way
        ('id1', None)
        >>> IS_IN_SET({'id1':'first label', 'id2':'second label'})('id1')
        ('id1', None)
        >>> import itertools
        >>> IS_IN_SET(itertools.chain(['1','3','5'],['2','4','6']))('1')
        ('1', None)
        >>> IS_IN_SET([('id1','first label'), ('id2','second label')])('id1') # Redundant way
        ('id1', None)
    """

    def __init__(
        self,
        theset,
        labels=None,
        error_message='value not allowed',
        multiple=False,
        zero='',
        sort=False,
        ):
        self.multiple = multiple
        if isinstance(theset, dict):
            self.theset = [str(item) for item in theset]
            self.labels = theset.values()
        elif theset and isinstance(theset, (tuple,list)) \
            and isinstance(theset[0], (tuple,list)) and len(theset[0])==2:
            self.theset = [str(item) for item,label in theset]
            self.labels = [str(label) for item,label in theset]
        else:
            self.theset = [str(item) for item in theset]
            self.labels = labels
        self.error_message = error_message
        self.zero = zero
        self.sort = sort

    def options(self,zero=True):
        if not self.labels:
            items = [(k, k) for (i, k) in enumerate(self.theset)]
        else:
            items = [(k, self.labels[i]) for (i, k) in enumerate(self.theset)]
        if self.sort:
            items.sort(options_sorter)
        if zero and self.zero != None and not self.multiple:
            items.insert(0,('',self.zero))
        return items

    def __call__(self, value):
        if self.multiple:
            ### if below was values = re.compile("[\w\-:]+").findall(str(value))
            if isinstance(value, (str,unicode)):
                values = [value]
            elif isinstance(value, (tuple, list)):
                values = value
            elif not value:
                values = []
        else:
            values = [value]
        failures = [x for x in values if not x in self.theset]
        if failures and self.theset:
            if self.multiple and (value == None or value == ''):
                return ([], None)
            return (value, translate(self.error_message))
        if self.multiple:
            if isinstance(self.multiple,(tuple,list)) and \
                    not self.multiple[0]<=len(values)<self.multiple[1]:
                return (values, translate(self.error_message))
            return (values, None)
        return (value, None)


regex1 = re.compile('[\w_]+\.[\w_]+')
regex2 = re.compile('%\((?P<name>[^\)]+)\)s')


class IS_IN_DB(Validator):
    """
    example::

        INPUT(_type='text', _name='name',
              requires=IS_IN_DB(db, db.mytable.myfield, zero=''))

    used for reference fields, rendered as a dropbox
    """

    def __init__(
        self,
        dbset,
        field,
        label=None,
        error_message='value not in database',
        orderby=None,
        groupby=None,
        cache=None,
        multiple=False,
        zero='',
        sort=False,
        _and=None,
        ):
        from dal import Table
        if isinstance(field,Table): field = field._id

        if hasattr(dbset, 'define_table'):
            self.dbset = dbset()
        else:
            self.dbset = dbset
        self.field = field
        (ktable, kfield) = str(self.field).split('.')
        if not label:
            label = '%%(%s)s' % kfield
        if isinstance(label,str):
            if regex1.match(str(label)):
                label = '%%(%s)s' % str(label).split('.')[-1]
            ks = regex2.findall(label)
            if not kfield in ks:
                ks += [kfield]
            fields = ks
        else:
            ks = [kfield]
            fields = 'all'
        self.fields = fields
        self.label = label
        self.ktable = ktable
        self.kfield = kfield
        self.ks = ks
        self.error_message = error_message
        self.theset = None
        self.orderby = orderby
        self.groupby = groupby
        self.cache = cache
        self.multiple = multiple
        self.zero = zero
        self.sort = sort
        self._and = _and

    def set_self_id(self, id):
        if self._and:
            self._and.record_id = id

    def build_set(self):
        if self.fields == 'all':
            fields = [f for f in self.dbset.db[self.ktable]]
        else:
            fields = [self.dbset.db[self.ktable][k] for k in self.fields]
        if self.dbset.db._dbname != 'gae':
            orderby = self.orderby or reduce(lambda a,b:a|b,fields)
            groupby = self.groupby
            dd = dict(orderby=orderby, groupby=groupby, cache=self.cache)
            records = self.dbset.select(*fields, **dd)
        else:
            orderby = self.orderby or reduce(lambda a,b:a|b,(f for f in fields if not f.name=='id'))
            dd = dict(orderby=orderby, cache=self.cache)
            records = self.dbset.select(self.dbset.db[self.ktable].ALL, **dd)
        self.theset = [str(r[self.kfield]) for r in records]
        if isinstance(self.label,str):
            self.labels = [self.label % dict(r) for r in records]
        else:
            self.labels = [self.label(r) for r in records]

    def options(self, zero=True):
        self.build_set()
        items = [(k, self.labels[i]) for (i, k) in enumerate(self.theset)]
        if self.sort:
            items.sort(options_sorter)
        if zero and self.zero != None and not self.multiple:
            items.insert(0,('',self.zero))
        return items

    def __call__(self, value):
        if self.multiple:
            if isinstance(value,list):
                values=value
            elif value:
                values = [value]
            else:
                values = []
            if isinstance(self.multiple,(tuple,list)) and \
                    not self.multiple[0]<=len(values)<self.multiple[1]:
                return (values, translate(self.error_message))
            if not [x for x in values if not x in self.theset]:
                return (values, None)
        elif self.theset:
            if value in self.theset:
                if self._and:
                    return self._and(value)
                else:
                    return (value, None)
        else:
            (ktable, kfield) = str(self.field).split('.')
            field = self.dbset.db[ktable][kfield]
            if self.dbset(field == value).count():
                if self._and:
                    return self._and(value)
                else:
                    return (value, None)
        return (value, translate(self.error_message))


class IS_NOT_IN_DB(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_NOT_IN_DB(db, db.table))

    makes the field unique
    """

    def __init__(
        self,
        dbset,
        field,
        error_message='value already in database or empty',
        allowed_override=[],
        ):

        from dal import Table
        if isinstance(field,Table): field = field._id

        if hasattr(dbset, 'define_table'):
            self.dbset = dbset()
        else:
            self.dbset = dbset
        self.field = field
        self.error_message = error_message
        self.record_id = 0
        self.allowed_override = allowed_override

    def set_self_id(self, id):
        self.record_id = id

    def __call__(self, value):
        value=str(value)
        if not value.strip():
            return (value, translate(self.error_message))
        if value in self.allowed_override:
            return (value, None)
        (tablename, fieldname) = str(self.field).split('.')
        field = self.dbset.db[tablename][fieldname]
        rows = self.dbset(field == value).select(limitby=(0, 1))
        if len(rows) > 0:
            if isinstance(self.record_id, dict):
                for f in self.record_id:
                    if str(getattr(rows[0], f)) != str(self.record_id[f]):
                        return (value, translate(self.error_message))
            elif str(rows[0].id) != str(self.record_id):
                return (value, translate(self.error_message))
        return (value, None)


class IS_INT_IN_RANGE(Validator):
    """
    Determine that the argument is (or can be represented as) an int,
    and that it falls within the specified range. The range is interpreted
    in the Pythonic way, so the test is: min <= value < max.

    The minimum and maximum limits can be None, meaning no lower or upper limit,
    respectively.

    example::

        INPUT(_type='text', _name='name', requires=IS_INT_IN_RANGE(0, 10))

        >>> IS_INT_IN_RANGE(1,5)('4')
        (4, None)
        >>> IS_INT_IN_RANGE(1,5)(4)
        (4, None)
        >>> IS_INT_IN_RANGE(1,5)(1)
        (1, None)
        >>> IS_INT_IN_RANGE(1,5)(5)
        (5, 'enter an integer between 1 and 4')
        >>> IS_INT_IN_RANGE(1,5)(5)
        (5, 'enter an integer between 1 and 4')
        >>> IS_INT_IN_RANGE(1,5)(3.5)
        (3, 'enter an integer between 1 and 4')
        >>> IS_INT_IN_RANGE(None,5)('4')
        (4, None)
        >>> IS_INT_IN_RANGE(None,5)('6')
        (6, 'enter an integer less than or equal to 4')
        >>> IS_INT_IN_RANGE(1,None)('4')
        (4, None)
        >>> IS_INT_IN_RANGE(1,None)('0')
        (0, 'enter an integer greater than or equal to 1')
        >>> IS_INT_IN_RANGE()(6)
        (6, None)
        >>> IS_INT_IN_RANGE()('abc')
        ('abc', 'enter an integer')
    """

    def __init__(
        self,
        minimum=None,
        maximum=None,
        error_message=None,
        ):
        self.minimum = self.maximum = None
        if minimum is None:
            if maximum is None:
                self.error_message = error_message or 'enter an integer'
            else:
                self.maximum = int(maximum)
                if error_message is None:
                    error_message = 'enter an integer less than or equal to %(max)g'
                self.error_message = translate(error_message) % dict(max=self.maximum-1)
        elif maximum is None:
            self.minimum = int(minimum)
            if error_message is None:
                error_message = 'enter an integer greater than or equal to %(min)g'
            self.error_message = translate(error_message) % dict(min=self.minimum)
        else:
            self.minimum = int(minimum)
            self.maximum = int(maximum)
            if error_message is None:
                error_message = 'enter an integer between %(min)g and %(max)g'
            self.error_message = translate(error_message) \
                % dict(min=self.minimum, max=self.maximum-1)

    def __call__(self, value):
        try:
            fvalue = float(value)
            value = int(value)
            if value != fvalue:
                return (value, self.error_message)
            if self.minimum is None:
                if self.maximum is None or value < self.maximum:
                    return (value, None)
            elif self.maximum is None:
                if value >= self.minimum:
                    return (value, None)
            elif self.minimum <= value < self.maximum:
                    return (value, None)
        except ValueError:
            pass
        return (value, self.error_message)


class IS_FLOAT_IN_RANGE(Validator):
    """
    Determine that the argument is (or can be represented as) a float,
    and that it falls within the specified inclusive range.
    The comparison is made with native arithmetic.

    The minimum and maximum limits can be None, meaning no lower or upper limit,
    respectively.

    example::

        INPUT(_type='text', _name='name', requires=IS_FLOAT_IN_RANGE(0, 10))

        >>> IS_FLOAT_IN_RANGE(1,5)('4')
        (4.0, None)
        >>> IS_FLOAT_IN_RANGE(1,5)(4)
        (4.0, None)
        >>> IS_FLOAT_IN_RANGE(1,5)(1)
        (1.0, None)
        >>> IS_FLOAT_IN_RANGE(1,5)(5.25)
        (5.25, 'enter a number between 1 and 5')
        >>> IS_FLOAT_IN_RANGE(1,5)(6.0)
        (6.0, 'enter a number between 1 and 5')
        >>> IS_FLOAT_IN_RANGE(1,5)(3.5)
        (3.5, None)
        >>> IS_FLOAT_IN_RANGE(1,None)(3.5)
        (3.5, None)
        >>> IS_FLOAT_IN_RANGE(None,5)(3.5)
        (3.5, None)
        >>> IS_FLOAT_IN_RANGE(1,None)(0.5)
        (0.5, 'enter a number greater than or equal to 1')
        >>> IS_FLOAT_IN_RANGE(None,5)(6.5)
        (6.5, 'enter a number less than or equal to 5')
        >>> IS_FLOAT_IN_RANGE()(6.5)
        (6.5, None)
        >>> IS_FLOAT_IN_RANGE()('abc')
        ('abc', 'enter a number')
    """

    def __init__(
        self,
        minimum=None,
        maximum=None,
        error_message=None,
        dot='.'
        ):
        self.minimum = self.maximum = None
        self.dot = dot
        if minimum is None:
            if maximum is None:
                if error_message is None:
                    error_message = 'enter a number'
            else:
                self.maximum = float(maximum)
                if error_message is None:
                    error_message = 'enter a number less than or equal to %(max)g'
        elif maximum is None:
            self.minimum = float(minimum)
            if error_message is None:
                error_message = 'enter a number greater than or equal to %(min)g'
        else:
            self.minimum = float(minimum)
            self.maximum = float(maximum)
            if error_message is None:
                error_message = 'enter a number between %(min)g and %(max)g'
        self.error_message = translate(error_message) \
            % dict(min=self.minimum, max=self.maximum)

    def __call__(self, value):
        try:
            if self.dot=='.':
                fvalue = float(value)
            else:
                fvalue = float(str(value).replace(self.dot,'.'))
            if self.minimum is None:
                if self.maximum is None or fvalue <= self.maximum:
                    return (fvalue, None)
            elif self.maximum is None:
                if fvalue >= self.minimum:
                    return (fvalue, None)
            elif self.minimum <= fvalue <= self.maximum:
                    return (fvalue, None)
        except (ValueError, TypeError):
            pass
        return (value, self.error_message)

    def formatter(self,value):
        if self.dot=='.':
            return str(value)
        else:
            return str(value).replace('.',self.dot)


class IS_DECIMAL_IN_RANGE(Validator):
    """
    Determine that the argument is (or can be represented as) a Python Decimal,
    and that it falls within the specified inclusive range.
    The comparison is made with Python Decimal arithmetic.

    The minimum and maximum limits can be None, meaning no lower or upper limit,
    respectively.

    example::

        INPUT(_type='text', _name='name', requires=IS_DECIMAL_IN_RANGE(0, 10))

        >>> IS_DECIMAL_IN_RANGE(1,5)('4')
        (Decimal('4'), None)
        >>> IS_DECIMAL_IN_RANGE(1,5)(4)
        (Decimal('4'), None)
        >>> IS_DECIMAL_IN_RANGE(1,5)(1)
        (Decimal('1'), None)
        >>> IS_DECIMAL_IN_RANGE(1,5)(5.25)
        (5.25, 'enter a number between 1 and 5')
        >>> IS_DECIMAL_IN_RANGE(5.25,6)(5.25)
        (Decimal('5.25'), None)
        >>> IS_DECIMAL_IN_RANGE(5.25,6)('5.25')
        (Decimal('5.25'), None)
        >>> IS_DECIMAL_IN_RANGE(1,5)(6.0)
        (6.0, 'enter a number between 1 and 5')
        >>> IS_DECIMAL_IN_RANGE(1,5)(3.5)
        (Decimal('3.5'), None)
        >>> IS_DECIMAL_IN_RANGE(1.5,5.5)(3.5)
        (Decimal('3.5'), None)
        >>> IS_DECIMAL_IN_RANGE(1.5,5.5)(6.5)
        (6.5, 'enter a number between 1.5 and 5.5')
        >>> IS_DECIMAL_IN_RANGE(1.5,None)(6.5)
        (Decimal('6.5'), None)
        >>> IS_DECIMAL_IN_RANGE(1.5,None)(0.5)
        (0.5, 'enter a number greater than or equal to 1.5')
        >>> IS_DECIMAL_IN_RANGE(None,5.5)(4.5)
        (Decimal('4.5'), None)
        >>> IS_DECIMAL_IN_RANGE(None,5.5)(6.5)
        (6.5, 'enter a number less than or equal to 5.5')
        >>> IS_DECIMAL_IN_RANGE()(6.5)
        (Decimal('6.5'), None)
        >>> IS_DECIMAL_IN_RANGE(0,99)(123.123)
        (123.123, 'enter a number between 0 and 99')
        >>> IS_DECIMAL_IN_RANGE(0,99)('123.123')
        ('123.123', 'enter a number between 0 and 99')
        >>> IS_DECIMAL_IN_RANGE(0,99)('12.34')
        (Decimal('12.34'), None)
        >>> IS_DECIMAL_IN_RANGE()('abc')
        ('abc', 'enter a decimal number')
    """

    def __init__(
        self,
        minimum=None,
        maximum=None,
        error_message=None,
        dot='.'
        ):
        self.minimum = self.maximum = None
        self.dot = dot
        if minimum is None:
            if maximum is None:
                if error_message is None:
                    error_message = 'enter a decimal number'
            else:
                self.maximum = decimal.Decimal(str(maximum))
                if error_message is None:
                    error_message = 'enter a number less than or equal to %(max)g'
        elif maximum is None:
            self.minimum = decimal.Decimal(str(minimum))
            if error_message is None:
                error_message = 'enter a number greater than or equal to %(min)g'
        else:
            self.minimum = decimal.Decimal(str(minimum))
            self.maximum = decimal.Decimal(str(maximum))
            if error_message is None:
                error_message = 'enter a number between %(min)g and %(max)g'
        self.error_message = translate(error_message) \
            % dict(min=self.minimum, max=self.maximum)

    def __call__(self, value):
        try:
            if isinstance(value,decimal.Decimal):
                v = value
            else:
                v = decimal.Decimal(str(value).replace(self.dot,'.'))
            if self.minimum is None:
                if self.maximum is None or v <= self.maximum:
                    return (v, None)
            elif self.maximum is None:
                if v >= self.minimum:
                    return (v, None)
            elif self.minimum <= v <= self.maximum:
                    return (v, None)
        except (ValueError, TypeError, decimal.InvalidOperation):
            pass
        return (value, self.error_message)

    def formatter(self, value):
        return str(value).replace('.',self.dot)

def is_empty(value, empty_regex=None):
    "test empty field"
    if isinstance(value, (str, unicode)):
        value = value.strip()
        if empty_regex is not None and empty_regex.match(value):
            value = ''
    if value == None or value == '' or value == []:
        return (value, True)
    return (value, False)

class IS_NOT_EMPTY(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_NOT_EMPTY())

        >>> IS_NOT_EMPTY()(1)
        (1, None)
        >>> IS_NOT_EMPTY()(0)
        (0, None)
        >>> IS_NOT_EMPTY()('x')
        ('x', None)
        >>> IS_NOT_EMPTY()(' x ')
        ('x', None)
        >>> IS_NOT_EMPTY()(None)
        (None, 'enter a value')
        >>> IS_NOT_EMPTY()('')
        ('', 'enter a value')
        >>> IS_NOT_EMPTY()('  ')
        ('', 'enter a value')
        >>> IS_NOT_EMPTY()(' \\n\\t')
        ('', 'enter a value')
        >>> IS_NOT_EMPTY()([])
        ([], 'enter a value')
        >>> IS_NOT_EMPTY(empty_regex='def')('def')
        ('', 'enter a value')
        >>> IS_NOT_EMPTY(empty_regex='de[fg]')('deg')
        ('', 'enter a value')
        >>> IS_NOT_EMPTY(empty_regex='def')('abc')
        ('abc', None)
    """

    def __init__(self, error_message='enter a value', empty_regex=None):
        self.error_message = error_message
        if empty_regex is not None:
            self.empty_regex = re.compile(empty_regex)
        else:
            self.empty_regex = None

    def __call__(self, value):
        value, empty = is_empty(value, empty_regex=self.empty_regex)
        if empty:
            return (value, translate(self.error_message))
        return (value, None)


class IS_ALPHANUMERIC(IS_MATCH):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_ALPHANUMERIC())

        >>> IS_ALPHANUMERIC()('1')
        ('1', None)
        >>> IS_ALPHANUMERIC()('')
        ('', None)
        >>> IS_ALPHANUMERIC()('A_a')
        ('A_a', None)
        >>> IS_ALPHANUMERIC()('!')
        ('!', 'enter only letters, numbers, and underscore')
    """

    def __init__(self, error_message='enter only letters, numbers, and underscore'):
        IS_MATCH.__init__(self, '^[\w]*$', error_message)


class IS_EMAIL(Validator):
    """
    Checks if field's value is a valid email address. Can be set to disallow
    or force addresses from certain domain(s).

    Email regex adapted from
    http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx,
    generally following the RFCs, except that we disallow quoted strings
    and permit underscores and leading numerics in subdomain labels

    Arguments:

    - banned: regex text for disallowed address domains
    - forced: regex text for required address domains

    Both arguments can also be custom objects with a match(value) method.

    Examples::

        #Check for valid email address:
        INPUT(_type='text', _name='name',
            requires=IS_EMAIL())

        #Check for valid email address that can't be from a .com domain:
        INPUT(_type='text', _name='name',
            requires=IS_EMAIL(banned='^.*\.com(|\..*)$'))

        #Check for valid email address that must be from a .edu domain:
        INPUT(_type='text', _name='name',
            requires=IS_EMAIL(forced='^.*\.edu(|\..*)$'))

        >>> IS_EMAIL()('a@b.com')
        ('a@b.com', None)
        >>> IS_EMAIL()('abc@def.com')
        ('abc@def.com', None)
        >>> IS_EMAIL()('abc@3def.com')
        ('abc@3def.com', None)
        >>> IS_EMAIL()('abc@def.us')
        ('abc@def.us', None)
        >>> IS_EMAIL()('abc@d_-f.us')
        ('abc@d_-f.us', None)
        >>> IS_EMAIL()('@def.com')           # missing name
        ('@def.com', 'enter a valid email address')
        >>> IS_EMAIL()('"abc@def".com')      # quoted name
        ('"abc@def".com', 'enter a valid email address')
        >>> IS_EMAIL()('abc+def.com')        # no @
        ('abc+def.com', 'enter a valid email address')
        >>> IS_EMAIL()('abc@def.x')          # one-char TLD
        ('abc@def.x', 'enter a valid email address')
        >>> IS_EMAIL()('abc@def.12')         # numeric TLD
        ('abc@def.12', 'enter a valid email address')
        >>> IS_EMAIL()('abc@def..com')       # double-dot in domain
        ('abc@def..com', 'enter a valid email address')
        >>> IS_EMAIL()('abc@.def.com')       # dot starts domain
        ('abc@.def.com', 'enter a valid email address')
        >>> IS_EMAIL()('abc@def.c_m')        # underscore in TLD
        ('abc@def.c_m', 'enter a valid email address')
        >>> IS_EMAIL()('NotAnEmail')         # missing @
        ('NotAnEmail', 'enter a valid email address')
        >>> IS_EMAIL()('abc@NotAnEmail')     # missing TLD
        ('abc@NotAnEmail', 'enter a valid email address')
        >>> IS_EMAIL()('customer/department@example.com')
        ('customer/department@example.com', None)
        >>> IS_EMAIL()('$A12345@example.com')
        ('$A12345@example.com', None)
        >>> IS_EMAIL()('!def!xyz%abc@example.com')
        ('!def!xyz%abc@example.com', None)
        >>> IS_EMAIL()('_Yosemite.Sam@example.com')
        ('_Yosemite.Sam@example.com', None)
        >>> IS_EMAIL()('~@example.com')
        ('~@example.com', None)
        >>> IS_EMAIL()('.wooly@example.com')       # dot starts name
        ('.wooly@example.com', 'enter a valid email address')
        >>> IS_EMAIL()('wo..oly@example.com')      # adjacent dots in name
        ('wo..oly@example.com', 'enter a valid email address')
        >>> IS_EMAIL()('pootietang.@example.com')  # dot ends name
        ('pootietang.@example.com', 'enter a valid email address')
        >>> IS_EMAIL()('.@example.com')            # name is bare dot
        ('.@example.com', 'enter a valid email address')
        >>> IS_EMAIL()('Ima.Fool@example.com')
        ('Ima.Fool@example.com', None)
        >>> IS_EMAIL()('Ima Fool@example.com')     # space in name
        ('Ima Fool@example.com', 'enter a valid email address')
        >>> IS_EMAIL()('localguy@localhost')       # localhost as domain
        ('localguy@localhost', None)

    """

    regex = re.compile('''
        ^(?!\.)                            # name may not begin with a dot
        (
          [-a-z0-9!\#$%&'*+/=?^_`{|}~]     # all legal characters except dot
          |
          (?<!\.)\.                        # single dots only
        )+
        (?<!\.)                            # name may not end with a dot
        @
        (
          localhost
          |
          (
            [a-z0-9]                         # [sub]domain begins with alphanumeric
            (
              [-\w]*                         # alphanumeric, underscore, dot, hyphen
              [a-z0-9]                       # ending alphanumeric
            )?
          \.                               # ending dot
          )+
          [a-z]{2,}                        # TLD alpha-only
       )$
    ''', re.VERBOSE|re.IGNORECASE)

    regex_proposed_but_failed = re.compile('^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$',re.VERBOSE|re.IGNORECASE)

    def __init__(self,
                 banned=None,
                 forced=None,
                 error_message='enter a valid email address'):
        if isinstance(banned, str):
            banned = re.compile(banned)
        if isinstance(forced, str):
            forced = re.compile(forced)
        self.banned = banned
        self.forced = forced
        self.error_message = error_message

    def __call__(self, value):
        match = self.regex.match(value)
        if match:
            domain = value.split('@')[1]
            if (not self.banned or not self.banned.match(domain)) \
                    and (not self.forced or self.forced.match(domain)):
                return (value, None)
        return (value, translate(self.error_message))


# URL scheme source:
# <http://en.wikipedia.org/wiki/URI_scheme> obtained on 2008-Nov-10

official_url_schemes = [
    'aaa',
    'aaas',
    'acap',
    'cap',
    'cid',
    'crid',
    'data',
    'dav',
    'dict',
    'dns',
    'fax',
    'file',
    'ftp',
    'go',
    'gopher',
    'h323',
    'http',
    'https',
    'icap',
    'im',
    'imap',
    'info',
    'ipp',
    'iris',
    'iris.beep',
    'iris.xpc',
    'iris.xpcs',
    'iris.lws',
    'ldap',
    'mailto',
    'mid',
    'modem',
    'msrp',
    'msrps',
    'mtqp',
    'mupdate',
    'news',
    'nfs',
    'nntp',
    'opaquelocktoken',
    'pop',
    'pres',
    'prospero',
    'rtsp',
    'service',
    'shttp',
    'sip',
    'sips',
    'snmp',
    'soap.beep',
    'soap.beeps',
    'tag',
    'tel',
    'telnet',
    'tftp',
    'thismessage',
    'tip',
    'tv',
    'urn',
    'vemmi',
    'wais',
    'xmlrpc.beep',
    'xmlrpc.beep',
    'xmpp',
    'z39.50r',
    'z39.50s',
    ]
unofficial_url_schemes = [
    'about',
    'adiumxtra',
    'aim',
    'afp',
    'aw',
    'callto',
    'chrome',
    'cvs',
    'ed2k',
    'feed',
    'fish',
    'gg',
    'gizmoproject',
    'iax2',
    'irc',
    'ircs',
    'itms',
    'jar',
    'javascript',
    'keyparc',
    'lastfm',
    'ldaps',
    'magnet',
    'mms',
    'msnim',
    'mvn',
    'notes',
    'nsfw',
    'psyc',
    'paparazzi:http',
    'rmi',
    'rsync',
    'secondlife',
    'sgn',
    'skype',
    'ssh',
    'sftp',
    'smb',
    'sms',
    'soldat',
    'steam',
    'svn',
    'teamspeak',
    'unreal',
    'ut2004',
    'ventrilo',
    'view-source',
    'webcal',
    'wyciwyg',
    'xfire',
    'xri',
    'ymsgr',
    ]
all_url_schemes = [None] + official_url_schemes + unofficial_url_schemes
http_schemes = [None, 'http', 'https']


# This regex comes from RFC 2396, Appendix B. It's used to split a URL into
# its component parts
# Here are the regex groups that it extracts:
#    scheme = group(2)
#    authority = group(4)
#    path = group(5)
#    query = group(7)
#    fragment = group(9)

url_split_regex = \
    re.compile('^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?')

# Defined in RFC 3490, Section 3.1, Requirement #1
# Use this regex to split the authority component of a unicode URL into
# its component labels
label_split_regex = re.compile(u'[\u002e\u3002\uff0e\uff61]')


def escape_unicode(string):
    '''
    Converts a unicode string into US-ASCII, using a simple conversion scheme.
    Each unicode character that does not have a US-ASCII equivalent is
    converted into a URL escaped form based on its hexadecimal value.
    For example, the unicode character '\u4e86' will become the string '%4e%86'

    :param string: unicode string, the unicode string to convert into an
        escaped US-ASCII form
    :returns: the US-ASCII escaped form of the inputted string
    :rtype: string

    @author: Jonathan Benn
    '''
    returnValue = StringIO()

    for character in string:
        code = ord(character)
        if code > 0x7F:
            hexCode = hex(code)
            returnValue.write('%' + hexCode[2:4] + '%' + hexCode[4:6])
        else:
            returnValue.write(character)

    return returnValue.getvalue()


def unicode_to_ascii_authority(authority):
    '''
    Follows the steps in RFC 3490, Section 4 to convert a unicode authority
    string into its ASCII equivalent.
    For example, u'www.Alliancefran\xe7aise.nu' will be converted into
    'www.xn--alliancefranaise-npb.nu'

    :param authority: unicode string, the URL authority component to convert,
                      e.g. u'www.Alliancefran\xe7aise.nu'
    :returns: the US-ASCII character equivalent to the inputed authority,
             e.g. 'www.xn--alliancefranaise-npb.nu'
    :rtype: string
    :raises Exception: if the function is not able to convert the inputed
        authority

    @author: Jonathan Benn
    '''
    #RFC 3490, Section 4, Step 1
    #The encodings.idna Python module assumes that AllowUnassigned == True

    #RFC 3490, Section 4, Step 2
    labels = label_split_regex.split(authority)

    #RFC 3490, Section 4, Step 3
    #The encodings.idna Python module assumes that UseSTD3ASCIIRules == False

    #RFC 3490, Section 4, Step 4
    #We use the ToASCII operation because we are about to put the authority
    #into an IDN-unaware slot
    asciiLabels = []
    try:
        import encodings.idna
        for label in labels:
            if label:
                asciiLabels.append(encodings.idna.ToASCII(label))
            else:
                 #encodings.idna.ToASCII does not accept an empty string, but
                 #it is necessary for us to allow for empty labels so that we
                 #don't modify the URL
                asciiLabels.append('')
    except:
        asciiLabels=[str(label) for label in labels]
    #RFC 3490, Section 4, Step 5
    return str(reduce(lambda x, y: x + unichr(0x002E) + y, asciiLabels))


def unicode_to_ascii_url(url, prepend_scheme):
    '''
    Converts the inputed unicode url into a US-ASCII equivalent. This function
    goes a little beyond RFC 3490, which is limited in scope to the domain name
    (authority) only. Here, the functionality is expanded to what was observed
    on Wikipedia on 2009-Jan-22:

       Component    Can Use Unicode?
       ---------    ----------------
       scheme       No
       authority    Yes
       path         Yes
       query        Yes
       fragment     No

    The authority component gets converted to punycode, but occurrences of
    unicode in other components get converted into a pair of URI escapes (we
    assume 4-byte unicode). E.g. the unicode character U+4E2D will be
    converted into '%4E%2D'. Testing with Firefox v3.0.5 has shown that it can
    understand this kind of URI encoding.

    :param url: unicode string, the URL to convert from unicode into US-ASCII
    :param prepend_scheme: string, a protocol scheme to prepend to the URL if
        we're having trouble parsing it.
        e.g. "http". Input None to disable this functionality
    :returns: a US-ASCII equivalent of the inputed url
    :rtype: string

    @author: Jonathan Benn
    '''
    #convert the authority component of the URL into an ASCII punycode string,
    #but encode the rest using the regular URI character encoding

    groups = url_split_regex.match(url).groups()
    #If no authority was found
    if not groups[3]:
        #Try appending a scheme to see if that fixes the problem
        scheme_to_prepend = prepend_scheme or 'http'
        groups = url_split_regex.match(
            unicode(scheme_to_prepend) + u'://' + url).groups()
    #if we still can't find the authority
    if not groups[3]:
        raise Exception('No authority component found, '+ \
            'could not decode unicode to US-ASCII')

    #We're here if we found an authority, let's rebuild the URL
    scheme = groups[1]
    authority = groups[3]
    path = groups[4] or ''
    query = groups[5] or ''
    fragment = groups[7] or ''

    if prepend_scheme:
        scheme = str(scheme) + '://'
    else:
        scheme = ''
    return scheme + unicode_to_ascii_authority(authority) +\
        escape_unicode(path) + escape_unicode(query) + str(fragment)


class IS_GENERIC_URL(Validator):
    """
    Rejects a URL string if any of the following is true:
       * The string is empty or None
       * The string uses characters that are not allowed in a URL
       * The URL scheme specified (if one is specified) is not valid

    Based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html

    This function only checks the URL's syntax. It does not check that the URL
    points to a real document, for example, or that it otherwise makes sense
    semantically. This function does automatically prepend 'http://' in front
    of a URL if and only if that's necessary to successfully parse the URL.
    Please note that a scheme will be prepended only for rare cases
    (e.g. 'google.ca:80')

    The list of allowed schemes is customizable with the allowed_schemes
    parameter. If you exclude None from the list, then abbreviated URLs
    (lacking a scheme such as 'http') will be rejected.

    The default prepended scheme is customizable with the prepend_scheme
    parameter. If you set prepend_scheme to None then prepending will be
    disabled. URLs that require prepending to parse will still be accepted,
    but the return value will not be modified.

    @author: Jonathan Benn

    >>> IS_GENERIC_URL()('http://user@abc.com')
    ('http://user@abc.com', None)

    """

    def __init__(
        self,
        error_message='enter a valid URL',
        allowed_schemes=None,
        prepend_scheme=None,
        ):
        """
        :param error_message: a string, the error message to give the end user
            if the URL does not validate
        :param allowed_schemes: a list containing strings or None. Each element
            is a scheme the inputed URL is allowed to use
        :param prepend_scheme: a string, this scheme is prepended if it's
            necessary to make the URL valid
        """

        self.error_message = error_message
        if allowed_schemes == None:
            self.allowed_schemes = all_url_schemes
        else:
            self.allowed_schemes = allowed_schemes
        self.prepend_scheme = prepend_scheme
        if self.prepend_scheme not in self.allowed_schemes:
            raise SyntaxError, \
                "prepend_scheme='%s' is not in allowed_schemes=%s" \
                % (self.prepend_scheme, self.allowed_schemes)

    def __call__(self, value):
        """
        :param value: a string, the URL to validate
        :returns: a tuple, where tuple[0] is the inputed value (possible
            prepended with prepend_scheme), and tuple[1] is either
            None (success!) or the string error_message
        """
        try:
            # if the URL does not misuse the '%' character
            if not re.compile(
                r"%[^0-9A-Fa-f]{2}|%[^0-9A-Fa-f][0-9A-Fa-f]|%[0-9A-Fa-f][^0-9A-Fa-f]|%$|%[0-9A-Fa-f]$|%[^0-9A-Fa-f]$"
                              ).search(value):
                # if the URL is only composed of valid characters
                if re.compile(
                    r"[A-Za-z0-9;/?:@&=+$,\-_\.!~*'\(\)%#]+$").match(value):
                    # Then split up the URL into its components and check on
                    # the scheme
                    scheme = url_split_regex.match(value).group(2)
                    # Clean up the scheme before we check it
                    if scheme != None:
                        scheme = urllib.unquote(scheme).lower()
                    # If the scheme really exists
                    if scheme in self.allowed_schemes:
                        # Then the URL is valid
                        return (value, None)
                    else:
                        # else, for the possible case of abbreviated URLs with
                        # ports, check to see if adding a valid scheme fixes
                        # the problem (but only do this if it doesn't have
                        # one already!)
                        if not re.compile('://').search(value) and None\
                             in self.allowed_schemes:
                            schemeToUse = self.prepend_scheme or 'http'
                            prependTest = self.__call__(schemeToUse
                                     + '://' + value)
                            # if the prepend test succeeded
                            if prependTest[1] == None:
                                # if prepending in the output is enabled
                                if self.prepend_scheme:
                                    return prependTest
                                else:
                                    # else return the original,
                                    #  non-prepended value
                                    return (value, None)
        except:
            pass
        # else the URL is not valid
        return (value, translate(self.error_message))

# Sources (obtained 2008-Nov-11):
#    http://en.wikipedia.org/wiki/Top-level_domain
#    http://www.iana.org/domains/root/db/

official_top_level_domains = [
    'ac',
    'ad',
    'ae',
    'aero',
    'af',
    'ag',
    'ai',
    'al',
    'am',
    'an',
    'ao',
    'aq',
    'ar',
    'arpa',
    'as',
    'asia',
    'at',
    'au',
    'aw',
    'ax',
    'az',
    'ba',
    'bb',
    'bd',
    'be',
    'bf',
    'bg',
    'bh',
    'bi',
    'biz',
    'bj',
    'bl',
    'bm',
    'bn',
    'bo',
    'br',
    'bs',
    'bt',
    'bv',
    'bw',
    'by',
    'bz',
    'ca',
    'cat',
    'cc',
    'cd',
    'cf',
    'cg',
    'ch',
    'ci',
    'ck',
    'cl',
    'cm',
    'cn',
    'co',
    'com',
    'coop',
    'cr',
    'cu',
    'cv',
    'cx',
    'cy',
    'cz',
    'de',
    'dj',
    'dk',
    'dm',
    'do',
    'dz',
    'ec',
    'edu',
    'ee',
    'eg',
    'eh',
    'er',
    'es',
    'et',
    'eu',
    'example',
    'fi',
    'fj',
    'fk',
    'fm',
    'fo',
    'fr',
    'ga',
    'gb',
    'gd',
    'ge',
    'gf',
    'gg',
    'gh',
    'gi',
    'gl',
    'gm',
    'gn',
    'gov',
    'gp',
    'gq',
    'gr',
    'gs',
    'gt',
    'gu',
    'gw',
    'gy',
    'hk',
    'hm',
    'hn',
    'hr',
    'ht',
    'hu',
    'id',
    'ie',
    'il',
    'im',
    'in',
    'info',
    'int',
    'invalid',
    'io',
    'iq',
    'ir',
    'is',
    'it',
    'je',
    'jm',
    'jo',
    'jobs',
    'jp',
    'ke',
    'kg',
    'kh',
    'ki',
    'km',
    'kn',
    'kp',
    'kr',
    'kw',
    'ky',
    'kz',
    'la',
    'lb',
    'lc',
    'li',
    'lk',
    'localhost',
    'lr',
    'ls',
    'lt',
    'lu',
    'lv',
    'ly',
    'ma',
    'mc',
    'md',
    'me',
    'mf',
    'mg',
    'mh',
    'mil',
    'mk',
    'ml',
    'mm',
    'mn',
    'mo',
    'mobi',
    'mp',
    'mq',
    'mr',
    'ms',
    'mt',
    'mu',
    'museum',
    'mv',
    'mw',
    'mx',
    'my',
    'mz',
    'na',
    'name',
    'nc',
    'ne',
    'net',
    'nf',
    'ng',
    'ni',
    'nl',
    'no',
    'np',
    'nr',
    'nu',
    'nz',
    'om',
    'org',
    'pa',
    'pe',
    'pf',
    'pg',
    'ph',
    'pk',
    'pl',
    'pm',
    'pn',
    'pr',
    'pro',
    'ps',
    'pt',
    'pw',
    'py',
    'qa',
    're',
    'ro',
    'rs',
    'ru',
    'rw',
    'sa',
    'sb',
    'sc',
    'sd',
    'se',
    'sg',
    'sh',
    'si',
    'sj',
    'sk',
    'sl',
    'sm',
    'sn',
    'so',
    'sr',
    'st',
    'su',
    'sv',
    'sy',
    'sz',
    'tc',
    'td',
    'tel',
    'test',
    'tf',
    'tg',
    'th',
    'tj',
    'tk',
    'tl',
    'tm',
    'tn',
    'to',
    'tp',
    'tr',
    'travel',
    'tt',
    'tv',
    'tw',
    'tz',
    'ua',
    'ug',
    'uk',
    'um',
    'us',
    'uy',
    'uz',
    'va',
    'vc',
    've',
    'vg',
    'vi',
    'vn',
    'vu',
    'wf',
    'ws',
    'xn--0zwm56d',
    'xn--11b5bs3a9aj6g',
    'xn--80akhbyknj4f',
    'xn--9t4b11yi5a',
    'xn--deba0ad',
    'xn--g6w251d',
    'xn--hgbk6aj7f53bba',
    'xn--hlcj6aya9esc7a',
    'xn--jxalpdlp',
    'xn--kgbechtv',
    'xn--zckzah',
    'ye',
    'yt',
    'yu',
    'za',
    'zm',
    'zw',
    ]


class IS_HTTP_URL(Validator):
    """
    Rejects a URL string if any of the following is true:
       * The string is empty or None
       * The string uses characters that are not allowed in a URL
       * The string breaks any of the HTTP syntactic rules
       * The URL scheme specified (if one is specified) is not 'http' or 'https'
       * The top-level domain (if a host name is specified) does not exist

    Based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html

    This function only checks the URL's syntax. It does not check that the URL
    points to a real document, for example, or that it otherwise makes sense
    semantically. This function does automatically prepend 'http://' in front
    of a URL in the case of an abbreviated URL (e.g. 'google.ca').

    The list of allowed schemes is customizable with the allowed_schemes
    parameter. If you exclude None from the list, then abbreviated URLs
    (lacking a scheme such as 'http') will be rejected.

    The default prepended scheme is customizable with the prepend_scheme
    parameter. If you set prepend_scheme to None then prepending will be
    disabled. URLs that require prepending to parse will still be accepted,
    but the return value will not be modified.

    @author: Jonathan Benn

    >>> IS_HTTP_URL()('http://1.2.3.4')
    ('http://1.2.3.4', None)
    >>> IS_HTTP_URL()('http://abc.com')
    ('http://abc.com', None)
    >>> IS_HTTP_URL()('https://abc.com')
    ('https://abc.com', None)
    >>> IS_HTTP_URL()('httpx://abc.com')
    ('httpx://abc.com', 'enter a valid URL')
    >>> IS_HTTP_URL()('http://abc.com:80')
    ('http://abc.com:80', None)
    >>> IS_HTTP_URL()('http://user@abc.com')
    ('http://user@abc.com', None)
    >>> IS_HTTP_URL()('http://user@1.2.3.4')
    ('http://user@1.2.3.4', None)

    """

    def __init__(
        self,
        error_message='enter a valid URL',
        allowed_schemes=None,
        prepend_scheme='http',
        ):
        """
        :param error_message: a string, the error message to give the end user
            if the URL does not validate
        :param allowed_schemes: a list containing strings or None. Each element
            is a scheme the inputed URL is allowed to use
        :param prepend_scheme: a string, this scheme is prepended if it's
            necessary to make the URL valid
        """

        self.error_message = error_message
        if allowed_schemes == None:
            self.allowed_schemes = http_schemes
        else:
            self.allowed_schemes = allowed_schemes
        self.prepend_scheme = prepend_scheme

        for i in self.allowed_schemes:
            if i not in http_schemes:
                raise SyntaxError, \
                    "allowed_scheme value '%s' is not in %s" % \
                    (i, http_schemes)

        if self.prepend_scheme not in self.allowed_schemes:
            raise SyntaxError, \
                "prepend_scheme='%s' is not in allowed_schemes=%s" % \
                (self.prepend_scheme, self.allowed_schemes)

    def __call__(self, value):
        """
        :param value: a string, the URL to validate
        :returns: a tuple, where tuple[0] is the inputed value
            (possible prepended with prepend_scheme), and tuple[1] is either
            None (success!) or the string error_message
        """

        try:
            # if the URL passes generic validation
            x = IS_GENERIC_URL(error_message=self.error_message,
                               allowed_schemes=self.allowed_schemes,
                               prepend_scheme=self.prepend_scheme)
            if x(value)[1] == None:
                componentsMatch = url_split_regex.match(value)
                authority = componentsMatch.group(4)
                # if there is an authority component
                if authority:
                    # if authority is a valid IP address
                    if re.compile(
                        "([\w.!~*'|;:&=+$,-]+@)?\d+\.\d+\.\d+\.\d+(:\d*)*$").match(authority):
                        # Then this HTTP URL is valid
                        return (value, None)
                    else:
                        # else if authority is a valid domain name
                        domainMatch = \
                            re.compile(
                                "([\w.!~*'|;:&=+$,-]+@)?(([A-Za-z0-9]+[A-Za-z0-9\-]*[A-Za-z0-9]+\.)*([A-Za-z0-9]+\.)*)*([A-Za-z]+[A-Za-z0-9\-]*[A-Za-z0-9]+)\.?(:\d*)*$"
                                ).match(authority)
                        if domainMatch:
                            # if the top-level domain really exists
                            if domainMatch.group(5).lower()\
                                 in official_top_level_domains:
                                # Then this HTTP URL is valid
                                return (value, None)
                else:
                    # else this is a relative/abbreviated URL, which will parse
                    # into the URL's path component
                    path = componentsMatch.group(5)
                    # relative case: if this is a valid path (if it starts with
                    # a slash)
                    if re.compile('/').match(path):
                        # Then this HTTP URL is valid
                        return (value, None)
                    else:
                        # abbreviated case: if we haven't already, prepend a
                        # scheme and see if it fixes the problem
                        if not re.compile('://').search(value):
                            schemeToUse = self.prepend_scheme or 'http'
                            prependTest = self.__call__(schemeToUse
                                     + '://' + value)
                            # if the prepend test succeeded
                            if prependTest[1] == None:
                                # if prepending in the output is enabled
                                if self.prepend_scheme:
                                    return prependTest
                                else:
                                    # else return the original, non-prepended
                                    # value
                                    return (value, None)
        except:
            pass
        # else the HTTP URL is not valid
        return (value, translate(self.error_message))


class IS_URL(Validator):
    """
    Rejects a URL string if any of the following is true:
       * The string is empty or None
       * The string uses characters that are not allowed in a URL
       * The string breaks any of the HTTP syntactic rules
       * The URL scheme specified (if one is specified) is not 'http' or 'https'
       * The top-level domain (if a host name is specified) does not exist

    (These rules are based on RFC 2616: http://www.faqs.org/rfcs/rfc2616.html)

    This function only checks the URL's syntax. It does not check that the URL
    points to a real document, for example, or that it otherwise makes sense
    semantically. This function does automatically prepend 'http://' in front
    of a URL in the case of an abbreviated URL (e.g. 'google.ca').

    If the parameter mode='generic' is used, then this function's behavior
    changes. It then rejects a URL string if any of the following is true:
       * The string is empty or None
       * The string uses characters that are not allowed in a URL
       * The URL scheme specified (if one is specified) is not valid

    (These rules are based on RFC 2396: http://www.faqs.org/rfcs/rfc2396.html)

    The list of allowed schemes is customizable with the allowed_schemes
    parameter. If you exclude None from the list, then abbreviated URLs
    (lacking a scheme such as 'http') will be rejected.

    The default prepended scheme is customizable with the prepend_scheme
    parameter. If you set prepend_scheme to None then prepending will be
    disabled. URLs that require prepending to parse will still be accepted,
    but the return value will not be modified.

    IS_URL is compatible with the Internationalized Domain Name (IDN) standard
    specified in RFC 3490 (http://tools.ietf.org/html/rfc3490). As a result,
    URLs can be regular strings or unicode strings.
    If the URL's domain component (e.g. google.ca) contains non-US-ASCII
    letters, then the domain will be converted into Punycode (defined in
    RFC 3492, http://tools.ietf.org/html/rfc3492). IS_URL goes a bit beyond
    the standards, and allows non-US-ASCII characters to be present in the path
    and query components of the URL as well. These non-US-ASCII characters will
    be escaped using the standard '%20' type syntax. e.g. the unicode
    character with hex code 0x4e86 will become '%4e%86'

    Code Examples::

        INPUT(_type='text', _name='name', requires=IS_URL())
        >>> IS_URL()('abc.com')
        ('http://abc.com', None)

        INPUT(_type='text', _name='name', requires=IS_URL(mode='generic'))
        >>> IS_URL(mode='generic')('abc.com')
        ('abc.com', None)

        INPUT(_type='text', _name='name',
            requires=IS_URL(allowed_schemes=['https'], prepend_scheme='https'))
        >>> IS_URL(allowed_schemes=['https'], prepend_scheme='https')('https://abc.com')
        ('https://abc.com', None)

        INPUT(_type='text', _name='name',
            requires=IS_URL(prepend_scheme='https'))
        >>> IS_URL(prepend_scheme='https')('abc.com')
        ('https://abc.com', None)

        INPUT(_type='text', _name='name',
            requires=IS_URL(mode='generic', allowed_schemes=['ftps', 'https'],
                prepend_scheme='https'))
        >>> IS_URL(mode='generic', allowed_schemes=['ftps', 'https'], prepend_scheme='https')('https://abc.com')
        ('https://abc.com', None)
        >>> IS_URL(mode='generic', allowed_schemes=['ftps', 'https', None], prepend_scheme='https')('abc.com')
        ('abc.com', None)

    @author: Jonathan Benn
    """

    def __init__(
        self,
        error_message='enter a valid URL',
        mode='http',
        allowed_schemes=None,
        prepend_scheme='http',
        ):
        """
        :param error_message: a string, the error message to give the end user
            if the URL does not validate
        :param allowed_schemes: a list containing strings or None. Each element
            is a scheme the inputed URL is allowed to use
        :param prepend_scheme: a string, this scheme is prepended if it's
            necessary to make the URL valid
        """

        self.error_message = error_message
        self.mode = mode.lower()
        if not self.mode in ['generic', 'http']:
            raise SyntaxError, "invalid mode '%s' in IS_URL" % self.mode
        self.allowed_schemes = allowed_schemes

        if self.allowed_schemes:
            if prepend_scheme not in self.allowed_schemes:
                raise SyntaxError, \
                    "prepend_scheme='%s' is not in allowed_schemes=%s" \
                    % (prepend_scheme, self.allowed_schemes)

        # if allowed_schemes is None, then we will defer testing
        # prepend_scheme's validity to a sub-method

        self.prepend_scheme = prepend_scheme

    def __call__(self, value):
        """
        :param value: a unicode or regular string, the URL to validate
        :returns: a (string, string) tuple, where tuple[0] is the modified
            input value and tuple[1] is either None (success!) or the
            string error_message. The input value will never be modified in the
            case of an error. However, if there is success then the input URL
            may be modified to (1) prepend a scheme, and/or (2) convert a
            non-compliant unicode URL into a compliant US-ASCII version.
        """

        if self.mode == 'generic':
            subMethod = IS_GENERIC_URL(error_message=self.error_message,
                                       allowed_schemes=self.allowed_schemes,
                                       prepend_scheme=self.prepend_scheme)
        elif self.mode == 'http':
            subMethod = IS_HTTP_URL(error_message=self.error_message,
                                    allowed_schemes=self.allowed_schemes,
                                    prepend_scheme=self.prepend_scheme)
        else:
            raise SyntaxError, "invalid mode '%s' in IS_URL" % self.mode

        if type(value) != unicode:
            return subMethod(value)
        else:
            try:
                asciiValue = unicode_to_ascii_url(value, self.prepend_scheme)
            except Exception:
                #If we are not able to convert the unicode url into a
                # US-ASCII URL, then the URL is not valid
                return (value, translate(self.error_message))

            methodResult = subMethod(asciiValue)
            #if the validation of the US-ASCII version of the value failed
            if methodResult[1] != None:
                # then return the original input value, not the US-ASCII version
                return (value, methodResult[1])
            else:
                return methodResult


regex_time = re.compile(
    '((?P<h>[0-9]+))([^0-9 ]+(?P<m>[0-9 ]+))?([^0-9ap ]+(?P<s>[0-9]*))?((?P<d>[ap]m))?')


class IS_TIME(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_TIME())

    understands the following formats
    hh:mm:ss [am/pm]
    hh:mm [am/pm]
    hh [am/pm]

    [am/pm] is optional, ':' can be replaced by any other non-space non-digit

        >>> IS_TIME()('21:30')
        (datetime.time(21, 30), None)
        >>> IS_TIME()('21-30')
        (datetime.time(21, 30), None)
        >>> IS_TIME()('21.30')
        (datetime.time(21, 30), None)
        >>> IS_TIME()('21:30:59')
        (datetime.time(21, 30, 59), None)
        >>> IS_TIME()('5:30')
        (datetime.time(5, 30), None)
        >>> IS_TIME()('5:30 am')
        (datetime.time(5, 30), None)
        >>> IS_TIME()('5:30 pm')
        (datetime.time(17, 30), None)
        >>> IS_TIME()('5:30 whatever')
        ('5:30 whatever', 'enter time as hh:mm:ss (seconds, am, pm optional)')
        >>> IS_TIME()('5:30 20')
        ('5:30 20', 'enter time as hh:mm:ss (seconds, am, pm optional)')
        >>> IS_TIME()('24:30')
        ('24:30', 'enter time as hh:mm:ss (seconds, am, pm optional)')
        >>> IS_TIME()('21:60')
        ('21:60', 'enter time as hh:mm:ss (seconds, am, pm optional)')
        >>> IS_TIME()('21:30::')
        ('21:30::', 'enter time as hh:mm:ss (seconds, am, pm optional)')
        >>> IS_TIME()('')
        ('', 'enter time as hh:mm:ss (seconds, am, pm optional)')
    """

    def __init__(self, error_message='enter time as hh:mm:ss (seconds, am, pm optional)'):
        self.error_message = error_message

    def __call__(self, value):
        try:
            ivalue = value
            value = regex_time.match(value.lower())
            (h, m, s) = (int(value.group('h')), 0, 0)
            if value.group('m') != None:
                m = int(value.group('m'))
            if value.group('s') != None:
                s = int(value.group('s'))
            if value.group('d') == 'pm' and 0 < h < 12:
                h = h + 12
            if not (h in range(24) and m in range(60) and s
                     in range(60)):
                raise ValueError\
                    ('Hours or minutes or seconds are outside of allowed range')
            value = datetime.time(h, m, s)
            return (value, None)
        except AttributeError:
            pass
        except ValueError:
            pass
        return (ivalue, translate(self.error_message))


class IS_DATE(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_DATE())

    date has to be in the ISO8960 format YYYY-MM-DD
    """

    def __init__(self, format='%Y-%m-%d',
                 error_message='enter date as %(format)s'):
        self.format = str(format)
        self.error_message = str(error_message)

    def __call__(self, value):
        if isinstance(value,datetime.date):
            return (value,None)
        try:
            (y, m, d, hh, mm, ss, t0, t1, t2) = \
                time.strptime(value, str(self.format))
            value = datetime.date(y, m, d)
            return (value, None)
        except:
            return (value, translate(self.error_message) % IS_DATETIME.nice(self.format))

    def formatter(self, value):
        format = self.format
        year = value.year
        y = '%.4i' % year
        format = format.replace('%y',y[-2:])
        format = format.replace('%Y',y)
        if year<1900:
            year = 2000
        d = datetime.date(year,value.month,value.day)
        return d.strftime(format)


class IS_DATETIME(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=IS_DATETIME())

    datetime has to be in the ISO8960 format YYYY-MM-DD hh:mm:ss
    """

    isodatetime = '%Y-%m-%d %H:%M:%S'

    @staticmethod
    def nice(format):
        code=(('%Y','1963'),
              ('%y','63'),
              ('%d','28'),
              ('%m','08'),
              ('%b','Aug'),
              ('%b','August'),
              ('%H','14'),
              ('%I','02'),
              ('%p','PM'),
              ('%M','30'),
              ('%S','59'))
        for (a,b) in code:
            format=format.replace(a,b)
        return dict(format=format)

    def __init__(self, format='%Y-%m-%d %H:%M:%S',
                 error_message='enter date and time as %(format)s'):
        self.format = str(format)
        self.error_message = str(error_message)

    def __call__(self, value):
        if isinstance(value,datetime.datetime):
            return (value,None)
        try:
            (y, m, d, hh, mm, ss, t0, t1, t2) = \
                time.strptime(value, str(self.format))
            value = datetime.datetime(y, m, d, hh, mm, ss)
            return (value, None)
        except:
            return (value, translate(self.error_message) % IS_DATETIME.nice(self.format))

    def formatter(self, value):
        format = self.format
        year = value.year
        y = '%.4i' % year
        format = format.replace('%y',y[-2:])
        format = format.replace('%Y',y)
        if year<1900:
            year = 2000
        d = datetime.datetime(year,value.month,value.day,value.hour,value.minute,value.second)
        return d.strftime(format)

class IS_DATE_IN_RANGE(IS_DATE):
    """
    example::

        >>> v = IS_DATE_IN_RANGE(minimum=datetime.date(2008,1,1), \
                                 maximum=datetime.date(2009,12,31), \
                                 format="%m/%d/%Y",error_message="oops")

        >>> v('03/03/2008')
        (datetime.date(2008, 3, 3), None)

        >>> v('03/03/2010')
        (datetime.date(2010, 3, 3), 'oops')

        >>> v(datetime.date(2008,3,3))
        (datetime.date(2008, 3, 3), None)

        >>> v(datetime.date(2010,3,3))
        (datetime.date(2010, 3, 3), 'oops')

    """
    def __init__(self,
                 minimum = None,
                 maximum = None,
                 format='%Y-%m-%d',
                 error_message = None):
        self.minimum = minimum
        self.maximum = maximum
        if error_message is None:
            if minimum is None:
                error_message = "enter date on or before %(max)s"
            elif maximum is None:
                error_message = "enter date on or after %(min)s"
            else:
                error_message = "enter date in range %(min)s %(max)s"
        d = dict(min=minimum, max=maximum)
        IS_DATE.__init__(self,
                         format = format,
                         error_message = error_message % d)

    def __call__(self, value):
        (value, msg) = IS_DATE.__call__(self,value)
        if msg is not None:
            return (value, msg)
        if self.minimum and self.minimum > value:
            return (value, translate(self.error_message))
        if self.maximum and value > self.maximum:
            return (value, translate(self.error_message))
        return (value, None)


class IS_DATETIME_IN_RANGE(IS_DATETIME):
    """
    example::

        >>> v = IS_DATETIME_IN_RANGE(\
                minimum=datetime.datetime(2008,1,1,12,20), \
                maximum=datetime.datetime(2009,12,31,12,20), \
                format="%m/%d/%Y %H:%M",error_message="oops")
        >>> v('03/03/2008 12:40')
        (datetime.datetime(2008, 3, 3, 12, 40), None)

        >>> v('03/03/2010 10:34')
        (datetime.datetime(2010, 3, 3, 10, 34), 'oops')

        >>> v(datetime.datetime(2008,3,3,0,0))
        (datetime.datetime(2008, 3, 3, 0, 0), None)

        >>> v(datetime.datetime(2010,3,3,0,0))
        (datetime.datetime(2010, 3, 3, 0, 0), 'oops')
    """
    def __init__(self,
                 minimum = None,
                 maximum = None,
                 format = '%Y-%m-%d %H:%M:%S',
                 error_message = None):
        self.minimum = minimum
        self.maximum = maximum
        if error_message is None:
            if minimum is None:
                error_message = "enter date and time on or before %(max)s"
            elif maximum is None:
                error_message = "enter date and time on or after %(min)s"
            else:
                error_message = "enter date and time in range %(min)s %(max)s"
        d = dict(min = minimum, max = maximum)
        IS_DATETIME.__init__(self,
                         format = format,
                         error_message = error_message % d)

    def __call__(self, value):
        (value, msg) = IS_DATETIME.__call__(self, value)
        if msg is not None:
            return (value, msg)
        if self.minimum and self.minimum > value:
            return (value, translate(self.error_message))
        if self.maximum and value > self.maximum:
            return (value, translate(self.error_message))
        return (value, None)


class IS_LIST_OF(Validator):

    def __init__(self, other):
        self.other = other

    def __call__(self, value):
        ivalue = value
        if not isinstance(value, list):
            ivalue = [ivalue]
        new_value = []
        for item in ivalue:
            (v, e) = self.other(item)
            if e:
                return (value, e)
            else:
                new_value.append(v)
        return (new_value, None)


class IS_LOWER(Validator):
    """
    convert to lower case

    >>> IS_LOWER()('ABC')
    ('abc', None)
    >>> IS_LOWER()('Ñ')
    ('\\xc3\\xb1', None)
    """

    def __call__(self, value):
        return (value.decode('utf8').lower().encode('utf8'), None)


class IS_UPPER(Validator):
    """
    convert to upper case

    >>> IS_UPPER()('abc')
    ('ABC', None)
    >>> IS_UPPER()('ñ')
    ('\\xc3\\x91', None)
    """

    def __call__(self, value):
        return (value.decode('utf8').upper().encode('utf8'), None)


def urlify(value, maxlen=80, keep_underscores=False):
    """
    Convert incoming string to a simplified ASCII subset.
    if (keep_underscores): underscores are retained in the string
    else: underscores are translated to hyphens (default)
    """
    s = value.lower()                     # to lowercase
    s = s.decode('utf-8')                 # to utf-8
    s = unicodedata.normalize('NFKD', s)  # normalize eg è => e, ñ => n
    s = s.encode('ASCII', 'ignore')       # encode as ASCII
    s = re.sub('&\w+;', '', s)            # strip html entities
    if keep_underscores:
        s = re.sub('\s+', '-', s)         # whitespace to hyphens
        s = re.sub('[^\w\-]', '', s)      # strip all but alphanumeric/underscore/hyphen
    else:
        s = re.sub('[\s_]+', '-', s)      # whitespace & underscores to hyphens
        s = re.sub('[^a-z0-9\-]', '', s)  # strip all but alphanumeric/hyphen
    s = re.sub('[-_][-_]+', '-', s)       # collapse strings of hyphens
    s = s.strip('-')                      # remove leading and trailing hyphens
    return s[:maxlen]                     # enforce maximum length


class IS_SLUG(Validator):
    """
    convert arbitrary text string to a slug

    >>> IS_SLUG()('abc123')
    ('abc123', None)
    >>> IS_SLUG()('ABC123')
    ('abc123', None)
    >>> IS_SLUG()('abc-123')
    ('abc-123', None)
    >>> IS_SLUG()('abc--123')
    ('abc-123', None)
    >>> IS_SLUG()('abc 123')
    ('abc-123', None)
    >>> IS_SLUG()('abc\t_123')
    ('abc-123', None)
    >>> IS_SLUG()('-abc-')
    ('abc', None)
    >>> IS_SLUG()('--a--b--_ -c--')
    ('a-b-c', None)
    >>> IS_SLUG()('abc&amp;123')
    ('abc123', None)
    >>> IS_SLUG()('abc&amp;123&amp;def')
    ('abc123def', None)
    >>> IS_SLUG()('ñ')
    ('n', None)
    >>> IS_SLUG(maxlen=4)('abc123')
    ('abc1', None)
    >>> IS_SLUG()('abc_123')
    ('abc-123', None)
    >>> IS_SLUG(keep_underscores=False)('abc_123')
    ('abc-123', None)
    >>> IS_SLUG(keep_underscores=True)('abc_123')
    ('abc_123', None)
    >>> IS_SLUG(check=False)('abc')
    ('abc', None)
    >>> IS_SLUG(check=True)('abc')
    ('abc', None)
    >>> IS_SLUG(check=False)('a bc')
    ('a-bc', None)
    >>> IS_SLUG(check=True)('a bc')
    ('a bc', 'must be slug')
    """

    @staticmethod
    def urlify(value, maxlen=80, keep_underscores=False):
        return urlify(value, maxlen, keep_underscores)

    def __init__(self, maxlen=80, check=False, error_message='must be slug', keep_underscores=False):
        self.maxlen = maxlen
        self.check = check
        self.error_message = error_message
        self.keep_underscores = keep_underscores

    def __call__(self, value):
        if self.check and value != urlify(value, self.maxlen, self.keep_underscores):
            return (value, translate(self.error_message))
        return (urlify(value,self.maxlen, self.keep_underscores), None)

class IS_EMPTY_OR(Validator):
    """
    dummy class for testing IS_EMPTY_OR

    >>> IS_EMPTY_OR(IS_EMAIL())('abc@def.com')
    ('abc@def.com', None)
    >>> IS_EMPTY_OR(IS_EMAIL())('   ')
    (None, None)
    >>> IS_EMPTY_OR(IS_EMAIL(), null='abc')('   ')
    ('abc', None)
    >>> IS_EMPTY_OR(IS_EMAIL(), null='abc', empty_regex='def')('def')
    ('abc', None)
    >>> IS_EMPTY_OR(IS_EMAIL())('abc')
    ('abc', 'enter a valid email address')
    >>> IS_EMPTY_OR(IS_EMAIL())(' abc ')
    ('abc', 'enter a valid email address')
    """

    def __init__(self, other, null=None, empty_regex=None):
        (self.other, self.null) = (other, null)
        if empty_regex is not None:
            self.empty_regex = re.compile(empty_regex)
        else:
            self.empty_regex = None
        if hasattr(other, 'multiple'):
            self.multiple = other.multiple
        if hasattr(other, 'options'):
            self.options=self._options

    def _options(self):
        options = self.other.options()
        if (not options or options[0][0]!='') and not self.multiple:
            options.insert(0,('',''))
        return options

    def set_self_id(self, id):
        if isinstance(self.other, (list, tuple)):
            for item in self.other:
                if hasattr(item, 'set_self_id'):
                    item.set_self_id(id)
        else:
            if hasattr(self.other, 'set_self_id'):
                self.other.set_self_id(id)

    def __call__(self, value):
        value, empty = is_empty(value, empty_regex=self.empty_regex)
        if empty:
            return (self.null, None)
        if isinstance(self.other, (list, tuple)):
            for item in self.other:
                value, error = item(value)
                if error: break
            return value, error
        else:
            return self.other(value)

    def formatter(self, value):
        if hasattr(self.other, 'formatter'):
            return self.other.formatter(value)
        return value

IS_NULL_OR = IS_EMPTY_OR    # for backward compatibility


class CLEANUP(Validator):
    """
    example::

        INPUT(_type='text', _name='name', requires=CLEANUP())

    removes special characters on validation
    """

    def __init__(self, regex='[^\x09\x0a\x0d\x20-\x7e]'):
        self.regex = re.compile(regex)

    def __call__(self, value):
        v = self.regex.sub('',str(value).strip())
        return (v, None)


class CRYPT(object):
    """
    example::

        INPUT(_type='text', _name='name', requires=CRYPT())

    encodes the value on validation with a digest.

    If no arguments are provided CRYPT uses the MD5 algorithm.
    If the key argument is provided the HMAC+MD5 algorithm is used.
    If the digest_alg is specified this is used to replace the
    MD5 with, for example, SHA512. The digest_alg can be
    the name of a hashlib algorithm as a string or the algorithm itself.
    """

    def __init__(self, key=None, digest_alg='md5'):
        self.key = key
        self.digest_alg = digest_alg

    def __call__(self, value):
        if self.key:
            return (hmac_hash(value, self.key, self.digest_alg), None)
        else:
            return (simple_hash(value, self.digest_alg), None)


class IS_STRONG(object):
    """
    example::

        INPUT(_type='password', _name='passwd',
            requires=IS_STRONG(min=10, special=2, upper=2))

    enforces complexity requirements on a field
    """

    def __init__(self, min=8, max=20, upper=1, lower=1, number=1,
                 special=1, specials=r'~!@#$%^&*()_+-=?<>,.:;{}[]|',
                 invalid=' "', error_message=None):
        self.min = min
        self.max = max
        self.upper = upper
        self.lower = lower
        self.number = number
        self.special = special
        self.specials = specials
        self.invalid = invalid
        self.error_message = error_message

    def __call__(self, value):
        failures = []
        if type(self.min) == int and self.min > 0:
            if not len(value) >= self.min:
                failures.append("Minimum length is %s" % self.min)
        if type(self.max) == int and self.max > 0:
            if not len(value) <= self.max:
                failures.append("Maximum length is %s" % self.max)
        if type(self.special) == int:
            all_special = [ch in value for ch in self.specials]
            if self.special > 0:
                if not all_special.count(True) >= self.special:
                    failures.append("Must include at least %s of the following : %s" % (self.special, self.specials))
        if self.invalid:
            all_invalid = [ch in value for ch in self.invalid]
            if all_invalid.count(True) > 0:
                failures.append("May not contain any of the following: %s" \
                    % self.invalid)
        if type(self.upper) == int:
            all_upper = re.findall("[A-Z]", value)
            if self.upper > 0:
                if not len(all_upper) >= self.upper:
                    failures.append("Must include at least %s upper case" \
                        % str(self.upper))
            else:
                if len(all_upper) > 0:
                    failures.append("May not include any upper case letters")
        if type(self.lower) == int:
            all_lower = re.findall("[a-z]", value)
            if self.lower > 0:
                if not len(all_lower) >= self.lower:
                    failures.append("Must include at least %s lower case" \
                        % str(self.lower))
            else:
                if len(all_lower) > 0:
                    failures.append("May not include any lower case letters")
        if type(self.number) == int:
            all_number = re.findall("[0-9]", value)
            if self.number > 0:
                numbers = "number"
                if self.number > 1:
                    numbers = "numbers"
                if not len(all_number) >= self.number:
                    failures.append("Must include at least %s %s" \
                        % (str(self.number), numbers))
            else:
                if len(all_number) > 0:
                    failures.append("May not include any numbers")
        if len(failures) == 0:
            return (value, None)
        if not translate(self.error_message):
            from html import XML
            return (value, XML('<br />'.join(failures)))
        else:
            return (value, translate(self.error_message))


class IS_IN_SUBSET(IS_IN_SET):

    def __init__(self, *a, **b):
        IS_IN_SET.__init__(self, *a, **b)

    def __call__(self, value):
        values = re.compile("\w+").findall(str(value))
        failures = [x for x in values if IS_IN_SET.__call__(self, x)[1]]
        if failures:
            return (value, translate(self.error_message))
        return (value, None)


class IS_IMAGE(Validator):
    """
    Checks if file uploaded through file input was saved in one of selected
    image formats and has dimensions (width and height) within given boundaries.

    Does *not* check for maximum file size (use IS_LENGTH for that). Returns
    validation failure if no data was uploaded.

    Supported file formats: BMP, GIF, JPEG, PNG.

    Code parts taken from
    http://mail.python.org/pipermail/python-list/2007-June/617126.html

    Arguments:

    extensions: iterable containing allowed *lowercase* image file extensions
    ('jpg' extension of uploaded file counts as 'jpeg')
    maxsize: iterable containing maximum width and height of the image
    minsize: iterable containing minimum width and height of the image

    Use (-1, -1) as minsize to pass image size check.

    Examples::

        #Check if uploaded file is in any of supported image formats:
        INPUT(_type='file', _name='name', requires=IS_IMAGE())

        #Check if uploaded file is either JPEG or PNG:
        INPUT(_type='file', _name='name',
            requires=IS_IMAGE(extensions=('jpeg', 'png')))

        #Check if uploaded file is PNG with maximum size of 200x200 pixels:
        INPUT(_type='file', _name='name',
            requires=IS_IMAGE(extensions=('png'), maxsize=(200, 200)))
    """

    def __init__(self,
                 extensions=('bmp', 'gif', 'jpeg', 'png'),
                 maxsize=(10000, 10000),
                 minsize=(0, 0),
                 error_message='invalid image'):

        self.extensions = extensions
        self.maxsize = maxsize
        self.minsize = minsize
        self.error_message = error_message

    def __call__(self, value):
        try:
            extension = value.filename.rfind('.')
            assert extension >= 0
            extension = value.filename[extension + 1:].lower()
            if extension == 'jpg':
                extension = 'jpeg'
            assert extension in self.extensions
            if extension == 'bmp':
                width, height = self.__bmp(value.file)
            elif extension == 'gif':
                width, height = self.__gif(value.file)
            elif extension == 'jpeg':
                width, height = self.__jpeg(value.file)
            elif extension == 'png':
                width, height = self.__png(value.file)
            else:
                width = -1
                height = -1
            assert self.minsize[0] <= width <= self.maxsize[0] \
                and self.minsize[1] <= height <= self.maxsize[1]
            value.file.seek(0)
            return (value, None)
        except:
            return (value, translate(self.error_message))

    def __bmp(self, stream):
        if stream.read(2) == 'BM':
            stream.read(16)
            return struct.unpack("<LL", stream.read(8))
        return (-1, -1)

    def __gif(self, stream):
        if stream.read(6) in ('GIF87a', 'GIF89a'):
            stream = stream.read(5)
            if len(stream) == 5:
                return tuple(struct.unpack("<HHB", stream)[:-1])
        return (-1, -1)

    def __jpeg(self, stream):
        if stream.read(2) == '\xFF\xD8':
            while True:
                (marker, code, length) = struct.unpack("!BBH", stream.read(4))
                if marker != 0xFF:
                    break
                elif code >= 0xC0 and code <= 0xC3:
                    return tuple(reversed(
                        struct.unpack("!xHH", stream.read(5))))
                else:
                    stream.read(length - 2)
        return (-1, -1)

    def __png(self, stream):
        if stream.read(8) == '\211PNG\r\n\032\n':
            stream.read(4)
            if stream.read(4) == "IHDR":
                return struct.unpack("!LL", stream.read(8))
        return (-1, -1)


class IS_UPLOAD_FILENAME(Validator):
    """
    Checks if name and extension of file uploaded through file input matches
    given criteria.

    Does *not* ensure the file type in any way. Returns validation failure
    if no data was uploaded.

    Arguments::

    filename: filename (before dot) regex
    extension: extension (after dot) regex
    lastdot: which dot should be used as a filename / extension separator:
             True means last dot, eg. file.png -> file / png
             False means first dot, eg. file.tar.gz -> file / tar.gz
    case: 0 - keep the case, 1 - transform the string into lowercase (default),
          2 - transform the string into uppercase

    If there is no dot present, extension checks will be done against empty
    string and filename checks against whole value.

    Examples::

        #Check if file has a pdf extension (case insensitive):
        INPUT(_type='file', _name='name',
            requires=IS_UPLOAD_FILENAME(extension='pdf'))

        #Check if file has a tar.gz extension and name starting with backup:
        INPUT(_type='file', _name='name',
            requires=IS_UPLOAD_FILENAME(filename='backup.*',
                extension='tar.gz', lastdot=False))

        #Check if file has no extension and name matching README
        #(case sensitive):
        INPUT(_type='file', _name='name',
            requires=IS_UPLOAD_FILENAME(filename='^README$',
                extension='^$', case=0))
    """

    def __init__(self, filename=None, extension=None, lastdot=True, case=1,
            error_message='enter valid filename'):
        if isinstance(filename, str):
            filename = re.compile(filename)
        if isinstance(extension, str):
            extension = re.compile(extension)
        self.filename = filename
        self.extension = extension
        self.lastdot = lastdot
        self.case = case
        self.error_message = error_message

    def __call__(self, value):
        try:
            string = value.filename
        except:
            return (value, translate(self.error_message))
        if self.case == 1:
            string = string.lower()
        elif self.case == 2:
            string = string.upper()
        if self.lastdot:
            dot = string.rfind('.')
        else:
            dot = string.find('.')
        if dot == -1:
            dot = len(string)
        if self.filename and not self.filename.match(string[:dot]):
            return (value, translate(self.error_message))
        elif self.extension and not self.extension.match(string[dot + 1:]):
            return (value, translate(self.error_message))
        else:
            return (value, None)


class IS_IPV4(Validator):
    """
    Checks if field's value is an IP version 4 address in decimal form. Can
    be set to force addresses from certain range.

    IPv4 regex taken from: http://regexlib.com/REDetails.aspx?regexp_id=1411

    Arguments:

    minip: lowest allowed address; accepts:
           str, eg. 192.168.0.1
           list or tuple of octets, eg. [192, 168, 0, 1]
    maxip: highest allowed address; same as above
    invert: True to allow addresses only from outside of given range; note
            that range boundaries are not matched this way
    is_localhost: localhost address treatment:
                  None (default): indifferent
                  True (enforce): query address must match localhost address
                                  (127.0.0.1)
                  False (forbid): query address must not match localhost
                                  address
    is_private: same as above, except that query address is checked against
                two address ranges: 172.16.0.0 - 172.31.255.255 and
                192.168.0.0 - 192.168.255.255
    is_automatic: same as above, except that query address is checked against
                  one address range: 169.254.0.0 - 169.254.255.255

    Minip and maxip may also be lists or tuples of addresses in all above
    forms (str, int, list / tuple), allowing setup of multiple address ranges:

        minip = (minip1, minip2, ... minipN)
                   |       |           |
                   |       |           |
        maxip = (maxip1, maxip2, ... maxipN)

    Longer iterable will be truncated to match length of shorter one.

    Examples::

        #Check for valid IPv4 address:
        INPUT(_type='text', _name='name', requires=IS_IPV4())

        #Check for valid IPv4 address belonging to specific range:
        INPUT(_type='text', _name='name',
            requires=IS_IPV4(minip='100.200.0.0', maxip='100.200.255.255'))

        #Check for valid IPv4 address belonging to either 100.110.0.0 -
        #100.110.255.255 or 200.50.0.0 - 200.50.0.255 address range:
        INPUT(_type='text', _name='name',
            requires=IS_IPV4(minip=('100.110.0.0', '200.50.0.0'),
                             maxip=('100.110.255.255', '200.50.0.255')))

        #Check for valid IPv4 address belonging to private address space:
        INPUT(_type='text', _name='name', requires=IS_IPV4(is_private=True))

        #Check for valid IPv4 address that is not a localhost address:
        INPUT(_type='text', _name='name', requires=IS_IPV4(is_localhost=False))

    >>> IS_IPV4()('1.2.3.4')
    ('1.2.3.4', None)
    >>> IS_IPV4()('255.255.255.255')
    ('255.255.255.255', None)
    >>> IS_IPV4()('1.2.3.4 ')
    ('1.2.3.4 ', 'enter valid IPv4 address')
    >>> IS_IPV4()('1.2.3.4.5')
    ('1.2.3.4.5', 'enter valid IPv4 address')
    >>> IS_IPV4()('123.123')
    ('123.123', 'enter valid IPv4 address')
    >>> IS_IPV4()('1111.2.3.4')
    ('1111.2.3.4', 'enter valid IPv4 address')
    >>> IS_IPV4()('0111.2.3.4')
    ('0111.2.3.4', 'enter valid IPv4 address')
    >>> IS_IPV4()('256.2.3.4')
    ('256.2.3.4', 'enter valid IPv4 address')
    >>> IS_IPV4()('300.2.3.4')
    ('300.2.3.4', 'enter valid IPv4 address')
    >>> IS_IPV4(minip='1.2.3.4', maxip='1.2.3.4')('1.2.3.4')
    ('1.2.3.4', None)
    >>> IS_IPV4(minip='1.2.3.5', maxip='1.2.3.9', error_message='bad ip')('1.2.3.4')
    ('1.2.3.4', 'bad ip')
    >>> IS_IPV4(maxip='1.2.3.4', invert=True)('127.0.0.1')
    ('127.0.0.1', None)
    >>> IS_IPV4(maxip='1.2.3.4', invert=True)('1.2.3.4')
    ('1.2.3.4', 'enter valid IPv4 address')
    >>> IS_IPV4(is_localhost=True)('127.0.0.1')
    ('127.0.0.1', None)
    >>> IS_IPV4(is_localhost=True)('1.2.3.4')
    ('1.2.3.4', 'enter valid IPv4 address')
    >>> IS_IPV4(is_localhost=False)('127.0.0.1')
    ('127.0.0.1', 'enter valid IPv4 address')
    >>> IS_IPV4(maxip='100.0.0.0', is_localhost=True)('127.0.0.1')
    ('127.0.0.1', 'enter valid IPv4 address')
    """

    regex = re.compile(
        '^(([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])$')
    numbers = (16777216, 65536, 256, 1)
    localhost = 2130706433
    private = ((2886729728L, 2886795263L), (3232235520L, 3232301055L))
    automatic = (2851995648L, 2852061183L)

    def __init__(
        self,
        minip='0.0.0.0',
        maxip='255.255.255.255',
        invert=False,
        is_localhost=None,
        is_private=None,
        is_automatic=None,
        error_message='enter valid IPv4 address'):
        for n, value in enumerate((minip, maxip)):
            temp = []
            if isinstance(value, str):
                temp.append(value.split('.'))
            elif isinstance(value, (list, tuple)):
                if len(value) == len(filter(lambda item: isinstance(item, int), value)) == 4:
                    temp.append(value)
                else:
                    for item in value:
                        if isinstance(item, str):
                            temp.append(item.split('.'))
                        elif isinstance(item, (list, tuple)):
                            temp.append(item)
            numbers = []
            for item in temp:
                number = 0
                for i, j in zip(self.numbers, item):
                    number += i * int(j)
                numbers.append(number)
            if n == 0:
                self.minip = numbers
            else:
                self.maxip = numbers
        self.invert = invert
        self.is_localhost = is_localhost
        self.is_private = is_private
        self.is_automatic = is_automatic
        self.error_message = error_message

    def __call__(self, value):
        if self.regex.match(value):
            number = 0
            for i, j in zip(self.numbers, value.split('.')):
                number += i * int(j)
            ok = False
            for bottom, top in zip(self.minip, self.maxip):
                if self.invert != (bottom <= number <= top):
                    ok = True
            if not (self.is_localhost == None or self.is_localhost == \
                (number == self.localhost)):
                    ok = False
            if not (self.is_private == None or self.is_private == \
                (sum([number[0] <= number <= number[1] for number in self.private]) > 0)):
                    ok = False
            if not (self.is_automatic == None or self.is_automatic == \
                (self.automatic[0] <= number <= self.automatic[1])):
                    ok = False
            if ok:
                return (value, None)
        return (value, translate(self.error_message))

if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added gluon/widget.py version [1adeccc7f3].



























































































































































































































































































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

The widget is called from web2py.
"""

import sys
import cStringIO
import time
import thread
import re
import os
import socket
import signal
import math
import logging

import newcron
import main

from fileutils import w2p_pack, read_file, write_file
from shell import run, test
from settings import global_settings

try:
    import Tkinter, tkMessageBox
    import contrib.taskbar_widget
    from winservice import web2py_windows_service_handler
except:
    pass


try:
    BaseException
except NameError:
    BaseException = Exception

ProgramName = 'web2py Web Framework'
ProgramAuthor = 'Created by Massimo Di Pierro, Copyright 2007-2011'
ProgramVersion = read_file('VERSION').strip()

ProgramInfo = '''%s
                 %s
                 %s''' % (ProgramName, ProgramAuthor, ProgramVersion)

if not sys.version[:3] in ['2.4', '2.5', '2.6', '2.7']:
    msg = 'Warning: web2py requires Python 2.4, 2.5 (recommended), 2.6 or 2.7 but you are running:\n%s'
    msg = msg % sys.version
    sys.stderr.write(msg)

logger = logging.getLogger("web2py")

class IO(object):
    """   """

    def __init__(self):
        """   """

        self.buffer = cStringIO.StringIO()

    def write(self, data):
        """   """

        sys.__stdout__.write(data)
        if hasattr(self, 'callback'):
            self.callback(data)
        else:
            self.buffer.write(data)


def try_start_browser(url):
    """ Try to start the default browser """

    try:
        import webbrowser
        webbrowser.open(url)
    except:
        print 'warning: unable to detect your browser'


def start_browser(ip, port):
    """ Starts the default browser """
    print 'please visit:'
    print '\thttp://%s:%s' % (ip, port)
    print 'starting browser...'
    try_start_browser('http://%s:%s' % (ip, port))


def presentation(root):
    """ Draw the splash screen """

    root.withdraw()

    dx = root.winfo_screenwidth()
    dy = root.winfo_screenheight()

    dialog = Tkinter.Toplevel(root, bg='white')
    dialog.geometry('%ix%i+%i+%i' % (500, 300, dx / 2 - 200, dy / 2 - 150))

    dialog.overrideredirect(1)
    dialog.focus_force()

    canvas = Tkinter.Canvas(dialog,
                            background='white',
                            width=500,
                            height=300)
    canvas.pack()
    root.update()

    img = Tkinter.PhotoImage(file='splashlogo.gif')
    pnl = Tkinter.Label(canvas, image=img, background='white', bd=0)
    pnl.pack(side='top', fill='both', expand='yes')
    # Prevent garbage collection of img
    pnl.image=img

    def add_label(text='Change Me', font_size=12, foreground='#195866', height=1):
        return Tkinter.Label(
            master=canvas,
            width=250,
            height=height,
            text=text,
            font=('Helvetica', font_size),
            anchor=Tkinter.CENTER,
            foreground=foreground,
            background='white'
            )

    add_label('Welcome to...').pack(side='top')
    add_label(ProgramName, 18, '#FF5C1F', 2).pack()
    add_label(ProgramAuthor).pack()
    add_label(ProgramVersion).pack()

    root.update()
    time.sleep(5)
    dialog.destroy()
    return


class web2pyDialog(object):
    """ Main window dialog """

    def __init__(self, root, options):
        """ web2pyDialog constructor  """

        root.title('web2py server')
        self.root = Tkinter.Toplevel(root)
        self.options = options
        self.menu = Tkinter.Menu(self.root)
        servermenu = Tkinter.Menu(self.menu, tearoff=0)
        httplog = os.path.join(self.options.folder, 'httpserver.log')

        # Building the Menu
        item = lambda: try_start_browser(httplog)
        servermenu.add_command(label='View httpserver.log',
                               command=item)

        servermenu.add_command(label='Quit (pid:%i)' % os.getpid(),
                               command=self.quit)

        self.menu.add_cascade(label='Server', menu=servermenu)

        self.pagesmenu = Tkinter.Menu(self.menu, tearoff=0)
        self.menu.add_cascade(label='Pages', menu=self.pagesmenu)

        helpmenu = Tkinter.Menu(self.menu, tearoff=0)

        # Home Page
        item = lambda: try_start_browser('http://www.web2py.com')
        helpmenu.add_command(label='Home Page',
                             command=item)

        # About
        item = lambda: tkMessageBox.showinfo('About web2py', ProgramInfo)
        helpmenu.add_command(label='About',
                             command=item)

        self.menu.add_cascade(label='Info', menu=helpmenu)

        self.root.config(menu=self.menu)

        if options.taskbar:
            self.root.protocol('WM_DELETE_WINDOW',
                               lambda: self.quit(True))
        else:
            self.root.protocol('WM_DELETE_WINDOW', self.quit)

        sticky = Tkinter.NW

        # IP
        Tkinter.Label(self.root,
                      text='Server IP:',
                      justify=Tkinter.LEFT).grid(row=0,
                                                 column=0,
                                                 sticky=sticky)
        self.ip = Tkinter.Entry(self.root)
        self.ip.insert(Tkinter.END, self.options.ip)
        self.ip.grid(row=0, column=1, sticky=sticky)

        # Port
        Tkinter.Label(self.root,
                      text='Server Port:',
                      justify=Tkinter.LEFT).grid(row=1,
                                                 column=0,
                                                 sticky=sticky)

        self.port_number = Tkinter.Entry(self.root)
        self.port_number.insert(Tkinter.END, self.options.port)
        self.port_number.grid(row=1, column=1, sticky=sticky)

        # Password
        Tkinter.Label(self.root,
                      text='Choose Password:',
                      justify=Tkinter.LEFT).grid(row=2,
                                                 column=0,
                                                 sticky=sticky)

        self.password = Tkinter.Entry(self.root, show='*')
        self.password.bind('<Return>', lambda e: self.start())
        self.password.focus_force()
        self.password.grid(row=2, column=1, sticky=sticky)

        # Prepare the canvas
        self.canvas = Tkinter.Canvas(self.root,
                                     width=300,
                                     height=100,
                                     bg='black')
        self.canvas.grid(row=3, column=0, columnspan=2)
        self.canvas.after(1000, self.update_canvas)

        # Prepare the frame
        frame = Tkinter.Frame(self.root)
        frame.grid(row=4, column=0, columnspan=2)

        # Start button
        self.button_start = Tkinter.Button(frame,
                                           text='start server',
                                           command=self.start)

        self.button_start.grid(row=0, column=0)

        # Stop button
        self.button_stop = Tkinter.Button(frame,
                                          text='stop server',
                                          command=self.stop)

        self.button_stop.grid(row=0, column=1)
        self.button_stop.configure(state='disabled')

        if options.taskbar:
            self.tb = contrib.taskbar_widget.TaskBarIcon()
            self.checkTaskBar()

            if options.password != '<ask>':
                self.password.insert(0, options.password)
                self.start()
                self.root.withdraw()
        else:
            self.tb = None

    def checkTaskBar(self):
        """ Check taskbar status """

        if self.tb.status:
            if self.tb.status[0] == self.tb.EnumStatus.QUIT:
                self.quit()
            elif self.tb.status[0] == self.tb.EnumStatus.TOGGLE:
                if self.root.state() == 'withdrawn':
                    self.root.deiconify()
                else:
                    self.root.withdraw()
            elif self.tb.status[0] == self.tb.EnumStatus.STOP:
                self.stop()
            elif self.tb.status[0] == self.tb.EnumStatus.START:
                self.start()
            elif self.tb.status[0] == self.tb.EnumStatus.RESTART:
                self.stop()
                self.start()
            del self.tb.status[0]

        self.root.after(1000, self.checkTaskBar)

    def update(self, text):
        """ Update app text """

        try:
            self.text.configure(state='normal')
            self.text.insert('end', text)
            self.text.configure(state='disabled')
        except:
            pass  # ## this should only happen in case app is destroyed

    def connect_pages(self):
        """ Connect pages """

        for arq in os.listdir('applications/'):
            if os.path.exists('applications/%s/__init__.py' % arq):
                url = self.url + '/' + arq
                start_browser = lambda u = url: try_start_browser(u)
                self.pagesmenu.add_command(label=url,
                                           command=start_browser)

    def quit(self, justHide=False):
        """ Finish the program execution """

        if justHide:
            self.root.withdraw()
        else:
            try:
                self.server.stop()
            except:
                pass

            try:
                self.tb.Destroy()
            except:
                pass

            self.root.destroy()
            sys.exit()

    def error(self, message):
        """ Show error message """

        tkMessageBox.showerror('web2py start server', message)

    def start(self):
        """ Start web2py server """

        password = self.password.get()

        if not password:
            self.error('no password, no web admin interface')

        ip = self.ip.get()

        regexp = '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
        if ip and not re.compile(regexp).match(ip):
            return self.error('invalid host ip address')

        try:
            port = int(self.port_number.get())
        except:
            return self.error('invalid port number')

        self.url = 'http://%s:%s' % (ip, port)
        self.connect_pages()
        self.button_start.configure(state='disabled')

        try:
            options = self.options
            req_queue_size = options.request_queue_size
            self.server = main.HttpServer(
                ip,
                port,
                password,
                pid_filename=options.pid_filename,
                log_filename=options.log_filename,
                profiler_filename=options.profiler_filename,
                ssl_certificate=options.ssl_certificate,
                ssl_private_key=options.ssl_private_key,
                min_threads=options.minthreads,
                max_threads=options.maxthreads,
                server_name=options.server_name,
                request_queue_size=req_queue_size,
                timeout=options.timeout,
                shutdown_timeout=options.shutdown_timeout,
                path=options.folder,
                interfaces=options.interfaces)

            thread.start_new_thread(self.server.start, ())
        except Exception, e:
            self.button_start.configure(state='normal')
            return self.error(str(e))

        self.button_stop.configure(state='normal')

        if not options.taskbar:
            thread.start_new_thread(start_browser, (ip, port))

        self.password.configure(state='readonly')
        self.ip.configure(state='readonly')
        self.port_number.configure(state='readonly')

        if self.tb:
            self.tb.SetServerRunning()

    def stop(self):
        """ Stop web2py server """

        self.button_start.configure(state='normal')
        self.button_stop.configure(state='disabled')
        self.password.configure(state='normal')
        self.ip.configure(state='normal')
        self.port_number.configure(state='normal')
        self.server.stop()

        if self.tb:
            self.tb.SetServerStopped()

    def update_canvas(self):
        """ Update canvas """

        try:
            t1 = os.path.getsize('httpserver.log')
        except:
            self.canvas.after(1000, self.update_canvas)
            return

        try:
            fp = open('httpserver.log', 'r')
            fp.seek(self.t0)
            data = fp.read(t1 - self.t0)
            fp.close()
            value = self.p0[1:] + [10 + 90.0 / math.sqrt(1 + data.count('\n'))]
            self.p0 = value

            for i in xrange(len(self.p0) - 1):
                c = self.canvas.coords(self.q0[i])
                self.canvas.coords(self.q0[i],
                                   (c[0],
                                    self.p0[i],
                                    c[2],
                                    self.p0[i + 1]))
            self.t0 = t1
        except BaseException:
            self.t0 = time.time()
            self.t0 = t1
            self.p0 = [100] * 300
            self.q0 = [self.canvas.create_line(i, 100, i + 1, 100,
                       fill='green') for i in xrange(len(self.p0) - 1)]

        self.canvas.after(1000, self.update_canvas)


def console():
    """ Defines the behavior of the console web2py execution """
    import optparse
    import textwrap

    usage = "python web2py.py"

    description = """\
    web2py Web Framework startup script.
    ATTENTION: unless a password is specified (-a 'passwd') web2py will
    attempt to run a GUI. In this case command line options are ignored."""

    description = textwrap.dedent(description)

    parser = optparse.OptionParser(usage, None, optparse.Option, ProgramVersion)

    parser.description = description

    parser.add_option('-i',
                      '--ip',
                      default='127.0.0.1',
                      dest='ip',
                      help='ip address of the server (127.0.0.1)')

    parser.add_option('-p',
                      '--port',
                      default='8000',
                      dest='port',
                      type='int',
                      help='port of server (8000)')

    msg = 'password to be used for administration'
    msg += ' (use -a "<recycle>" to reuse the last password))'
    parser.add_option('-a',
                      '--password',
                      default='<ask>',
                      dest='password',
                      help=msg)

    parser.add_option('-c',
                      '--ssl_certificate',
                      default='',
                      dest='ssl_certificate',
                      help='file that contains ssl certificate')

    parser.add_option('-k',
                      '--ssl_private_key',
                      default='',
                      dest='ssl_private_key',
                      help='file that contains ssl private key')

    parser.add_option('-d',
                      '--pid_filename',
                      default='httpserver.pid',
                      dest='pid_filename',
                      help='file to store the pid of the server')

    parser.add_option('-l',
                      '--log_filename',
                      default='httpserver.log',
                      dest='log_filename',
                      help='file to log connections')

    parser.add_option('-n',
                      '--numthreads',
                      default=None,
                      type='int',
                      dest='numthreads',
                      help='number of threads (deprecated)')

    parser.add_option('--minthreads',
                      default=None,
                      type='int',
                      dest='minthreads',
                      help='minimum number of server threads')

    parser.add_option('--maxthreads',
                      default=None,
                      type='int',
                      dest='maxthreads',
                      help='maximum number of server threads')

    parser.add_option('-s',
                      '--server_name',
                      default=socket.gethostname(),
                      dest='server_name',
                      help='server name for the web server')

    msg = 'max number of queued requests when server unavailable'
    parser.add_option('-q',
                      '--request_queue_size',
                      default='5',
                      type='int',
                      dest='request_queue_size',
                      help=msg)

    parser.add_option('-o',
                      '--timeout',
                      default='10',
                      type='int',
                      dest='timeout',
                      help='timeout for individual request (10 seconds)')

    parser.add_option('-z',
                      '--shutdown_timeout',
                      default='5',
                      type='int',
                      dest='shutdown_timeout',
                      help='timeout on shutdown of server (5 seconds)')
    parser.add_option('-f',
                      '--folder',
                      default=os.getcwd(),
                      dest='folder',
                      help='folder from which to run web2py')

    parser.add_option('-v',
                      '--verbose',
                      action='store_true',
                      dest='verbose',
                      default=False,
                      help='increase --test verbosity')

    parser.add_option('-Q',
                      '--quiet',
                      action='store_true',
                      dest='quiet',
                      default=False,
                      help='disable all output')

    msg = 'set debug output level (0-100, 0 means all, 100 means none;'
    msg += ' default is 30)'
    parser.add_option('-D',
                      '--debug',
                      dest='debuglevel',
                      default=30,
                      type='int',
                      help=msg)

    msg = 'run web2py in interactive shell or IPython (if installed) with'
    msg += ' specified appname (if app does not exist it will be created).'
    msg += ' APPNAME like a/c/f (c,f optional)'
    parser.add_option('-S',
                      '--shell',
                      dest='shell',
                      metavar='APPNAME',
                      help=msg)

    msg = 'run web2py in interactive shell or bpython (if installed) with'
    msg += ' specified appname (if app does not exist it will be created).'
    msg += '\n Use combined with --shell'
    parser.add_option('-B',
                      '--bpython',
                      action='store_true',
                      default=False,
                      dest='bpython',
                      help=msg)

    msg = 'only use plain python shell; should be used with --shell option'
    parser.add_option('-P',
                      '--plain',
                      action='store_true',
                      default=False,
                      dest='plain',
                      help=msg)

    msg = 'auto import model files; default is False; should be used'
    msg += ' with --shell option'
    parser.add_option('-M',
                      '--import_models',
                      action='store_true',
                      default=False,
                      dest='import_models',
                      help=msg)

    msg = 'run PYTHON_FILE in web2py environment;'
    msg += ' should be used with --shell option'
    parser.add_option('-R',
                      '--run',
                      dest='run',
                      metavar='PYTHON_FILE',
                      default='',
                      help=msg)

    msg = 'run doctests in web2py environment; ' +\
        'TEST_PATH like a/c/f (c,f optional)'
    parser.add_option('-T',
                      '--test',
                      dest='test',
                      metavar='TEST_PATH',
                      default=None,
                      help=msg)

    parser.add_option('-W',
                      '--winservice',
                      dest='winservice',
                      default='',
                      help='-W install|start|stop as Windows service')

    msg = 'trigger a cron run manually; usually invoked from a system crontab'
    parser.add_option('-C',
                      '--cron',
                      action='store_true',
                      dest='extcron',
                      default=False,
                      help=msg)

    msg = 'triggers the use of softcron'
    parser.add_option('--softcron',
                      action='store_true',
                      dest='softcron',
                      default=False,
                      help=msg)

    parser.add_option('-N',
                      '--no-cron',
                      action='store_true',
                      dest='nocron',
                      default=False,
                      help='do not start cron automatically')

    parser.add_option('-J',
                      '--cronjob',
                      action='store_true',
                      dest='cronjob',
                      default=False,
                      help='identify cron-initiated command')

    parser.add_option('-L',
                      '--config',
                      dest='config',
                      default='',
                      help='config file')

    parser.add_option('-F',
                      '--profiler',
                      dest='profiler_filename',
                      default=None,
                      help='profiler filename')

    parser.add_option('-t',
                      '--taskbar',
                      action='store_true',
                      dest='taskbar',
                      default=False,
                      help='use web2py gui and run in taskbar (system tray)')

    parser.add_option('',
                      '--nogui',
                      action='store_true',
                      default=False,
                      dest='nogui',
                      help='text-only, no GUI')

    parser.add_option('-A',
                      '--args',
                      action='store',
                      dest='args',
                      default=None,
                      help='should be followed by a list of arguments to be passed to script, to be used with -S, -A must be the last option')

    parser.add_option('--no-banner',
                      action='store_true',
                      default=False,
                      dest='nobanner',
                      help='Do not print header banner')

    msg = 'listen on multiple addresses: "ip:port:cert:key;ip2:port2:cert2:key2;..." (:cert:key optional; no spaces)'
    parser.add_option('--interfaces',
                      action='store',
                      dest='interfaces',
                      default=None,
                      help=msg)

    if '-A' in sys.argv: k = sys.argv.index('-A')
    elif '--args' in sys.argv: k = sys.argv.index('--args')
    else: k=len(sys.argv)
    sys.argv, other_args = sys.argv[:k], sys.argv[k+1:]
    (options, args) = parser.parse_args()
    options.args = [options.run] + other_args
    global_settings.cmd_options = options
    global_settings.cmd_args = args

    if options.quiet:
        capture = cStringIO.StringIO()
        sys.stdout = capture
        logger.setLevel(logging.CRITICAL + 1)
    else:
        logger.setLevel(options.debuglevel)

    if options.config[-3:] == '.py':
        options.config = options.config[:-3]

    if options.cronjob:
        global_settings.cronjob = True  # tell the world
        options.nocron = True   # don't start cron jobs
        options.plain = True    # cronjobs use a plain shell

    options.folder = os.path.abspath(options.folder)

    #  accept --interfaces in the form "ip:port:cert:key;ip2:port2;ip3:port3:cert3:key3"
    #  (no spaces; optional cert:key indicate SSL)
    #
    if isinstance(options.interfaces, str):
        options.interfaces = [interface.split(':') for interface in options.interfaces.split(';')]
        for interface in options.interfaces:
            interface[1] = int(interface[1])    # numeric port
        options.interfaces = [tuple(interface) for interface in options.interfaces]

    if options.numthreads is not None and options.minthreads is None:
        options.minthreads = options.numthreads  # legacy

    if not options.cronjob:
        # If we have the applications package or if we should upgrade
        if not os.path.exists('applications/__init__.py'):
            write_file('applications/__init__.py', '')

        if not os.path.exists('welcome.w2p') or os.path.exists('NEWINSTALL'):
            try:
                w2p_pack('welcome.w2p','applications/welcome')
                os.unlink('NEWINSTALL')
            except:
                msg = "New installation: unable to create welcome.w2p file"
                sys.stderr.write(msg)

    return (options, args)


def start(cron=True):
    """ Start server  """

    # ## get command line arguments

    (options, args) = console()

    if not options.nobanner:
        print ProgramName
        print ProgramAuthor
        print ProgramVersion

    from dal import drivers
    if not options.nobanner:
        print 'Database drivers available: %s' % ', '.join(drivers)


    # ## if -L load options from options.config file
    if options.config:
        try:
            options2 = __import__(options.config, {}, {}, '')
        except Exception:
            try:
                # Jython doesn't like the extra stuff
                options2 = __import__(options.config)
            except Exception:
                print 'Cannot import config file [%s]' % options.config
                sys.exit(1)
        for key in dir(options2):
            if hasattr(options,key):
                setattr(options,key,getattr(options2,key))

    # ## if -T run doctests (no cron)
    if hasattr(options,'test') and options.test:
        test(options.test, verbose=options.verbose)
        return

    # ## if -S start interactive shell (also no cron)
    if options.shell:
        if options.args!=None:
            sys.argv[:] = options.args
        run(options.shell, plain=options.plain, bpython=options.bpython,
            import_models=options.import_models, startfile=options.run)
        return

    # ## if -C start cron run (extcron) and exit
    # ## if -N or not cron disable cron in this *process*
    # ## if --softcron use softcron
    # ## use hardcron in all other cases
    if options.extcron:
        print 'Starting extcron...'
        global_settings.web2py_crontype = 'external'
        extcron = newcron.extcron(options.folder)
        extcron.start()
        extcron.join()
        return
    elif cron and not options.nocron and options.softcron:
        print 'Using softcron (but this is not very efficient)'
        global_settings.web2py_crontype = 'soft'
    elif cron and not options.nocron:
        print 'Starting hardcron...'
        global_settings.web2py_crontype = 'hard'
        newcron.hardcron(options.folder).start()

    # ## if -W install/start/stop web2py as service
    if options.winservice:
        if os.name == 'nt':
            web2py_windows_service_handler(['', options.winservice],
                    options.config)
        else:
            print 'Error: Windows services not supported on this platform'
            sys.exit(1)
        return

    # ## if no password provided and havetk start Tk interface
    # ## or start interface if we want to put in taskbar (system tray)

    try:
        options.taskbar
    except:
        options.taskbar = False

    if options.taskbar and os.name != 'nt':
        print 'Error: taskbar not supported on this platform'
        sys.exit(1)

    root = None

    if not options.nogui:
        try:
            import Tkinter
            havetk = True
        except ImportError:
            logger.warn('GUI not available because Tk library is not installed')
            havetk = False

        if options.password == '<ask>' and havetk or options.taskbar and havetk:
            try:
                root = Tkinter.Tk()
            except:
                pass

    if root:
        root.focus_force()
        if not options.quiet:
            presentation(root)
        master = web2pyDialog(root, options)
        signal.signal(signal.SIGTERM, lambda a, b: master.quit())

        try:
            root.mainloop()
        except:
            master.quit()

        sys.exit()

    # ## if no tk and no password, ask for a password

    if not root and options.password == '<ask>':
        options.password = raw_input('choose a password:')

    if not options.password and not options.nobanner:
        print 'no password, no admin interface'

    # ## start server

    (ip, port) = (options.ip, int(options.port))

    if not options.nobanner:
        print 'please visit:'
        print '\thttp://%s:%s' % (ip, port)
        print 'use "kill -SIGTERM %i" to shutdown the web2py server' % os.getpid()

    server = main.HttpServer(ip=ip,
                             port=port,
                             password=options.password,
                             pid_filename=options.pid_filename,
                             log_filename=options.log_filename,
                             profiler_filename=options.profiler_filename,
                             ssl_certificate=options.ssl_certificate,
                             ssl_private_key=options.ssl_private_key,
                             min_threads=options.minthreads,
                             max_threads=options.maxthreads,
                             server_name=options.server_name,
                             request_queue_size=options.request_queue_size,
                             timeout=options.timeout,
                             shutdown_timeout=options.shutdown_timeout,
                             path=options.folder,
                             interfaces=options.interfaces)

    try:
        server.start()
    except KeyboardInterrupt:
        server.stop()
    logging.shutdown()

Added gluon/winservice.py version [e1ec3d2e01].





































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu> and
Limodou <limodou@gmail.com>.
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

This makes uses of the pywin32 package
(http://sourceforge.net/projects/pywin32/).
You do not need to install this package to use web2py.


"""

import time
import os
import sys
import traceback
try:
    import win32serviceutil
    import win32service
    import win32event
except:
    if os.name == 'nt':
        print "Warning, winservice is unable to install the Mark Hammond Win32 extensions"
import servicemanager
import _winreg
from fileutils import up

__all__ = ['web2py_windows_service_handler']

class Service(win32serviceutil.ServiceFramework):

    _svc_name_ = '_unNamed'
    _svc_display_name_ = '_Service Template'

    def __init__(self, *args):
        win32serviceutil.ServiceFramework.__init__(self, *args)
        self.stop_event = win32event.CreateEvent(None, 0, 0, None)

    def log(self, msg):
        servicemanager.LogInfoMsg(str(msg))

    def SvcDoRun(self):
        self.ReportServiceStatus(win32service.SERVICE_START_PENDING)
        try:
            self.ReportServiceStatus(win32service.SERVICE_RUNNING)
            self.start()
            win32event.WaitForSingleObject(self.stop_event,
                    win32event.INFINITE)
        except:
            self.log(traceback.format_exc(sys.exc_info))
            self.SvcStop()
        self.ReportServiceStatus(win32service.SERVICE_STOPPED)

    def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        try:
            self.stop()
        except:
            self.log(traceback.format_exc(sys.exc_info))
        win32event.SetEvent(self.stop_event)
        self.ReportServiceStatus(win32service.SERVICE_STOPPED)

    # to be overridden

    def start(self):
        pass

    # to be overridden

    def stop(self):
        pass


class Web2pyService(Service):

    _svc_name_ = 'web2py'
    _svc_display_name_ = 'web2py Service'
    _exe_args_ = 'options'
    server = None

    def chdir(self):
        try:
            h = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
                                r'SYSTEM\CurrentControlSet\Services\%s'
                                 % self._svc_name_)
            try:
                cls = _winreg.QueryValue(h, 'PythonClass')
            finally:
                _winreg.CloseKey(h)
            dir = os.path.dirname(cls)
            os.chdir(dir)
            return True
        except:
            self.log("Can't change to web2py working path; server is stopped")
            return False

    def start(self):
        self.log('web2py server starting')
        if not self.chdir():
            return
        if len(sys.argv) == 2:
            opt_mod = sys.argv[1]
        else:
            opt_mod = self._exe_args_
        options = __import__(opt_mod, [], [], '')
        if True: # legacy support for old options files, which have only (deprecated) numthreads
            if hasattr(options, 'numthreads') and not hasattr(options, 'minthreads'):
                options.minthreads = options.numthreads
            if not hasattr(options, 'minthreads'): options.minthreads = None
            if not hasattr(options, 'maxthreads'): options.maxthreads = None
        import main
        self.server = main.HttpServer(
            ip=options.ip,
            port=options.port,
            password=options.password,
            pid_filename=options.pid_filename,
            log_filename=options.log_filename,
            profiler_filename=options.profiler_filename,
            ssl_certificate=options.ssl_certificate,
            ssl_private_key=options.ssl_private_key,
            min_threads=options.minthreads,
            max_threads=options.maxthreads,
            server_name=options.server_name,
            request_queue_size=options.request_queue_size,
            timeout=options.timeout,
            shutdown_timeout=options.shutdown_timeout,
            path=options.folder
            )
        try:
            self.server.start()
        except:

            # self.server.stop()

            self.server = None
            raise

    def stop(self):
        self.log('web2py server stopping')
        if not self.chdir():
            return
        if self.server:
            self.server.stop()
        time.sleep(1)


def web2py_windows_service_handler(argv=None, opt_file='options'):
    path = os.path.dirname(__file__)
    classstring = os.path.normpath(os.path.join(up(path),
                                   'gluon.winservice.Web2pyService'))
    if opt_file:
        Web2pyService._exe_args_ = opt_file
        win32serviceutil.HandleCommandLine(Web2pyService,
                serviceClassString=classstring, argv=['', 'install'])
    win32serviceutil.HandleCommandLine(Web2pyService,
            serviceClassString=classstring, argv=argv)


if __name__ == '__main__':
    web2py_windows_service_handler()

Added gluon/xmlrpc.py version [ae09470e68].























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""

from SimpleXMLRPCServer import SimpleXMLRPCDispatcher


def handler(request, response, methods):
    response.session_id = None  # no sessions for xmlrpc
    dispatcher = SimpleXMLRPCDispatcher(allow_none=True, encoding=None)
    for method in methods:
        dispatcher.register_function(method)
    dispatcher.register_introspection_functions()
    response.headers['Content-Type'] = 'text/xml'
    dispatch = getattr(dispatcher, '_dispatch', None)
    return dispatcher._marshaled_dispatch(request.body.read(), dispatch)

Added logging.example.conf version [ac55438bc1].

































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[loggers]
keys=root,rocket,markdown,web2py,rewrite,app,welcome

# the default configuration is console-based (stdout) for backward compatibility
#
# note that file-based handlers are thread-safe but not mp-safe;
# for mp-safe logging, configure the appropriate syslog handler

[handlers]
keys=consoleHandler
#keys=consoleHandler,rotatingFileHandler
#keys=osxSysLogHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=WARNING
handlers=consoleHandler

[logger_web2py]
level=WARNING
handlers=consoleHandler
qualname=web2py
propagate=0

[logger_rewrite]
level=WARNING
qualname=web2py.rewrite
handlers=consoleHandler
propagate=0

# generic app handler
[logger_app]
level=WARNING
qualname=web2py.app
handlers=consoleHandler
propagate=0

# welcome app handler
[logger_welcome]
level=WARNING
qualname=web2py.app.welcome
handlers=consoleHandler
propagate=0

# loggers for legacy getLogger calls: Rocket and markdown
[logger_rocket]
level=WARNING
handlers=consoleHandler
qualname=Rocket
propagate=0

[logger_markdown]
level=WARNING
handlers=consoleHandler
qualname=markdown
propagate=0

[handler_consoleHandler]
class=StreamHandler
level=WARNING
formatter=simpleFormatter
args=(sys.stdout,)

# Rotating file handler
#   mkdir logs in the web2py base directory if not already present
#   args: (filename[, mode[, maxBytes[, backupCount[, encoding[, delay]]]]])
#
[handler_rotatingFileHandler]
class=handlers.RotatingFileHandler
level=INFO
formatter=simpleFormatter
args=("logs/web2py.log", "a", 1000000, 5)

[handler_osxSysLogHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=simpleFormatter
args=("/var/run/syslog", handlers.SysLogHandler.LOG_DAEMON)

[handler_linuxSysLogHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=simpleFormatter
args=("/dev/log", handlers.SysLogHandler.LOG_DAEMON)

[handler_remoteSysLogHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=simpleFormatter
args=(('sysloghost.domain.com', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_DAEMON)

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=

Added modpythonhandler.py version [72691ad73a].

































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

WSGI wrapper for mod_python. Requires Python 2.2 or greater.
Part of CherryPy mut modified by Massimo Di Pierro (2008) for web2py

<Location /myapp>
    SetHandler python-program
    PythonHandler modpythonhandler
    PythonPath \"['/path/to/web2py/'] + sys.path\"
    PythonOption SCRIPT_NAME /myapp
</Location>

Some WSGI implementations assume that the SCRIPT_NAME environ variable will
always be equal to 'the root URL of the app'; Apache probably won't act as
you expect in that case. You can add another PythonOption directive to tell
modpython_gateway to force that behavior:

    PythonOption SCRIPT_NAME /mcontrol

The module.function will be called with no arguments on server shutdown,
once for each child process or thread.
"""

import traceback
import sys
import os
from mod_python import apache

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]

import gluon.main


class InputWrapper(object):
    """ Input wrapper for the wsgi handler  """

    def __init__(self, req):
        """ InputWrapper constructor  """

        self.req = req

    def close(self):
        """ """

        pass

    def read(self, size=-1):
        """ Wrapper for req.read  """

        return self.req.read(size)

    def readline(self, size=-1):
        """ Wrapper for req.readline  """

        return self.req.readline(size)

    def readlines(self, hint=-1):
        """ Wrapper for req.readlines  """

        return self.req.readlines(hint)

    def __iter__(self):
        """ Defines a generator with the req data  """

        line = self.readline()
        while line:
            yield line

            # Notice this won't prefetch the next line; it only
            # gets called if the generator is resumed.
            line = self.readline()


class ErrorWrapper(object):
    """ Error wrapper for the wsgi handler  """

    def __init__(self, req):
        """ ErrorWrapper constructor """

        self.req = req

    def flush(self):
        """   """

        pass

    def write(self, msg):
        """ Logs the given msg in the log file """

        self.req.log_error(msg)

    def writelines(self, seq):
        """ Writes various lines in the log file """

        self.write(''.join(seq))


bad_value = "You must provide a PythonOption '%s', either 'on' or 'off', when running a version of mod_python < 3.1"


class Handler:
    """ Defines the handler  """

    def __init__(self, req):
        """ Handler constructor  """

        self.started = False
        options = req.get_options()

        # Threading and forking
        try:
            q = apache.mpm_query
            threaded = q(apache.AP_MPMQ_IS_THREADED)
            forked = q(apache.AP_MPMQ_IS_FORKED)
        except AttributeError:
            threaded = options.get('multithread', '').lower()

            if threaded == 'on':
                threaded = True
            elif threaded == 'off':
                threaded = False
            else:
                raise ValueError(bad_value % 'multithread')

            forked = options.get('multiprocess', '').lower()

            if forked == 'on':
                forked = True
            elif forked == 'off':
                forked = False
            else:
                raise ValueError(bad_value % 'multiprocess')

        env = self.environ = dict(apache.build_cgi_env(req))

        if 'SCRIPT_NAME' in options:
            # Override SCRIPT_NAME and PATH_INFO if requested.
            env['SCRIPT_NAME'] = options['SCRIPT_NAME']
            env['PATH_INFO'] = req.uri[len(options['SCRIPT_NAME']):]

        env['wsgi.input'] = InputWrapper(req)
        env['wsgi.errors'] = ErrorWrapper(req)
        env['wsgi.version'] = (1, 0)
        env['wsgi.run_once'] = False

        if env.get('HTTPS') in ('yes', 'on', '1'):
            env['wsgi.url_scheme'] = 'https'
        else:
            env['wsgi.url_scheme'] = 'http'

        env['wsgi.multithread'] = threaded
        env['wsgi.multiprocess'] = forked

        self.request = req

    def run(self, application):
        """ Run the application  """

        try:
            result = application(self.environ, self.start_response)

            for data in result:
                self.write(data)

            if not self.started:
                self.request.set_content_length(0)

            if hasattr(result, 'close'):
                result.close()
        except:
            traceback.print_exc(None, self.environ['wsgi.errors'])

            if not self.started:
                self.request.status = 500
                self.request.content_type = 'text/plain'
                data = 'A server error occurred. Please contact the ' + \
                       'administrator.'
                self.request.set_content_length(len(data))
                self.request.write(data)

    def start_response(self, status, headers, exc_info=None):
        """ Defines the request data  """

        if exc_info:
            try:
                if self.started:
                    raise exc_info[0], exc_info[1], exc_info[2]
            finally:
                exc_info = None

        self.request.status = int(status[:3])

        for (key, val) in headers:
            if key.lower() == 'content-length':
                self.request.set_content_length(int(val))
            elif key.lower() == 'content-type':
                self.request.content_type = val
            else:
                self.request.headers_out.add(key, val)

        return self.write

    def write(self, data):
        """ Write the request data  """

        if not self.started:
            self.started = True

        self.request.write(data)


def handler(req):
    """ Execute the gluon app  """

    Handler(req).run(gluon.main.wsgibase)
    return apache.OK

Added options_std.py version [2c6b93cdaf].


































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: utf-8 -*-

# when web2py is run as a windows service (web2py.exe -W)
# it does not load the command line options but it
# expects to find conifguration settings in a file called
#
#   web2py/options.py
#
# this file is an example for options.py

import socket
import os

ip = '0.0.0.0'
port = 80
interfaces=[('0.0.0.0',80),('0.0.0.0',443,'ssl_private_key.pem','ssl_certificate.pem')]
password = '<recycle>'  # ## <recycle> means use the previous password
pid_filename = 'httpserver.pid'
log_filename = 'httpserver.log'
profiler_filename = None
#ssl_certificate = 'ssl_certificate.pem'  # ## path to certificate file
#ssl_private_key = 'ssl_private_key.pem'  # ## path to private key file
#numthreads = 50 # ## deprecated; remove
minthreads = None
maxthreads = None
server_name = socket.gethostname()
request_queue_size = 5
timeout = 30
shutdown_timeout = 5
folder = os.getcwd()
extcron = None
nocron = None

Added queue.example.yaml version [7f0c07b6cd].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
#  To configure Google App Engine task queues, copy this file to queue.yaml
#  and edit as required
#  See http://code.google.com/appengine/docs/python/config/queue.html

queue:
- name: default
  rate: 20/m
  bucket_size: 1

Added router.example.py version [c5219c298b].







































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: utf-8 -*-

#  routers are dictionaries of URL routing parameters.
#
#  For each request, the effective router is:
#    the built-in default base router (shown below),
#    updated by the BASE router in routes.py routers,
#    updated by the app-specific router in routes.py routers (if any),
#    updated by the app-specific router from applications/app/routes.py routers (if any)
#
#
#  Router members:
#
#  default_application: default application name
#  applications: list of all recognized applications, or 'ALL' to use all currently installed applications
#      Names in applications are always treated as an application names when they appear first in an incoming URL.
#      Set applications=None to disable the removal of application names from outgoing URLs.
#  domains: optional dict mapping domain names to application names
#      The domain name can include a port number: domain.com:8080
#      The application name can include a controller:  appx/ctlrx
#      Example:
#      domains = {   "domain.com" : "app",
#                  "x.domain.com" : "appx",
#                },
#  path_prefix: a path fragment that is prefixed to all outgoing URLs and stripped from all incoming URLs
#
#  Note: default_application, applications, domains & path_prefix are permitted only in the BASE router,
#        and domain makes sense only in an application-specific router.
#        The remaining members can appear in the BASE router (as defaults for all applications)
#        or in application-specific routers.
#
#  default_controller: name of default controller
#  default_function: name of default function (in all controllers)
#  controllers: list of valid controllers in selected app
#       or "DEFAULT" to use all controllers in the selected app plus 'static'
#       or None to disable controller-name removal.
#      Names in controllers are always treated as controller names when they appear in an incoming URL after
#      the (optional) application and language names. 
#  functions: list of valid functions in the default controller (default None)
#      If present, the default function name will be omitted when the controller is the default controller
#      and the first arg does not create an ambiguity.
#  languages: list of all supported languages
#      Names in languages are always treated as language names when they appear in an incoming URL after
#      the (optional) application name. 
#  default_language
#       The language code (for example: en, it-it) optionally appears in the URL following
#       the application (which may be omitted). For incoming URLs, the code is copied to
#       request.language; for outgoing URLs it is taken from request.language.
#       If languages=None, language support is disabled.
#       The default_language, if any, is omitted from the URL.
#  root_static: list of static files accessed from root (by default, favicon.ico & robots.txt)
#       (mapped to the default application's static/ directory)
#       Each default (including domain-mapped) application has its own root-static files.
#  domain: the domain that maps to this application (alternative to using domains in the BASE router)
#  exclusive_domain: If True (default is False), an exception is raised if an attempt is made to generate
#                    an outgoing URL with a different application without providing an explicit host.
#  map_hyphen: If True (default is False), hyphens in incoming /a/c/f fields are converted 
#              to underscores, and back to hyphens in outgoing URLs.
#              Language, args and the query string are not affected.
#  map_static: By default, the default application is not stripped from static URLs. 
#       Set map_static=True to override this policy.
#  acfe_match: regex for valid application, controller, function, extension /a/c/f.e
#  file_match: regex for valid file (used for static file names)
#  args_match: regex for valid args
#       This validation provides a measure of security. 
#       If it is changed, the application perform its own validation.
#
#
#  The built-in default router supplies default values (undefined members are None):
#
#     default_router = dict(
#         default_application = 'init',
#             applications = 'ALL',
#         default_controller = 'default',
#             controllers = 'DEFAULT',
#         default_function = 'index',
#             functions = None,
#         default_language = None,
#             languages = None,
#         root_static = ['favicon.ico', 'robots.txt'],
#         domains = None,
#         map_hyphen = False,
#         acfe_match = r'\w+$',              # legal app/ctlr/fcn/ext
#         file_match = r'(\w+[-=./]?)+$',    # legal file (path) name
#         args_match = r'([\w@ -]+[=.]?)+$', # legal arg in args
#     )
#
#  See rewrite.map_url_in() and rewrite.map_url_out() for implementation details.


#  This simple router set overrides only the default application name,
#  but provides full rewrite functionality.

routers = dict(

    # base router
    BASE = dict(
        default_application = 'welcome',
    ),
)


# Error-handling redirects all HTTP errors (status codes >= 400) to a specified
# path.  If you wish to use error-handling redirects, uncomment the tuple
# below.  You can customize responses by adding a tuple entry with the first
# value in 'appName/HTTPstatusCode' format. ( Only HTTP codes >= 400 are
# routed. ) and the value as a path to redirect the user to.  You may also use
# '*' as a wildcard.
#
# The error handling page is also passed the error code and ticket as
# variables.  Traceback information will be stored in the ticket.
#
# routes_onerror = [
#     (r'init/400', r'/init/default/login')
#    ,(r'init/*', r'/init/static/fail.html')
#    ,(r'*/404', r'/init/static/cantfind.html')
#    ,(r'*/*', r'/init/error/index')
# ]

# specify action in charge of error handling
#
# error_handler = dict(application='error',
#                      controller='default',
#                      function='index')

# In the event that the error-handling page itself returns an error, web2py will
# fall back to its old static responses.  You can customize them here.
# ErrorMessageTicket takes a string format dictionary containing (only) the
# "ticket" key.

# error_message = '<html><body><h1>%s</h1></body></html>'
# error_message_ticket = '<html><body><h1>Internal error</h1>Ticket issued: <a href="/admin/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a></body></html>'

def __routes_doctest():
    '''
    Dummy function for doctesting routes.py.

    Use filter_url() to test incoming or outgoing routes;
    filter_err() for error redirection.

    filter_url() accepts overrides for method and remote host:
        filter_url(url, method='get', remote='0.0.0.0', out=False)

    filter_err() accepts overrides for application and ticket:
        filter_err(status, application='app', ticket='tkt')

    >>> import os
    >>> import gluon.main
    >>> from gluon.rewrite import load, filter_url, filter_err, get_effective_router
    >>> load(routes=os.path.basename(__file__))

    >>> filter_url('http://domain.com/abc', app=True)
    'welcome'
    >>> filter_url('http://domain.com/welcome', app=True)
    'welcome'
    >>> os.path.relpath(filter_url('http://domain.com/favicon.ico'))
    'applications/welcome/static/favicon.ico'
    >>> filter_url('http://domain.com/abc')
    '/welcome/default/abc'
    >>> filter_url('http://domain.com/index/abc')
    "/welcome/default/index ['abc']"
    >>> filter_url('http://domain.com/default/abc.css')
    '/welcome/default/abc.css'
    >>> filter_url('http://domain.com/default/index/abc')
    "/welcome/default/index ['abc']"
    >>> filter_url('http://domain.com/default/index/a bc')
    "/welcome/default/index ['a bc']"

    >>> filter_url('https://domain.com/app/ctr/fcn', out=True)
    '/app/ctr/fcn'
    >>> filter_url('https://domain.com/welcome/ctr/fcn', out=True)
    '/ctr/fcn'
    >>> filter_url('https://domain.com/welcome/default/fcn', out=True)
    '/fcn'
    >>> filter_url('https://domain.com/welcome/default/index', out=True)
    '/'
    >>> filter_url('https://domain.com/welcome/appadmin/index', out=True)
    '/appadmin'
    >>> filter_url('http://domain.com/welcome/default/fcn?query', out=True)
    '/fcn?query'
    >>> filter_url('http://domain.com/welcome/default/fcn#anchor', out=True)
    '/fcn#anchor'
    >>> filter_url('http://domain.com/welcome/default/fcn?query#anchor', out=True)
    '/fcn?query#anchor'
    
    >>> filter_err(200)
    200
    >>> filter_err(399)
    399
    >>> filter_err(400)
    400
    '''
    pass

if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added routes.example.py version [1f6aac3108].






































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: utf-8 -*-

# default_application, default_controller, default_function
# are used when the respective element is missing from the
# (possibly rewritten) incoming URL
#
default_application = 'init'    # ordinarily set in base routes.py
default_controller = 'default'  # ordinarily set in app-specific routes.py
default_function = 'index'      # ordinarily set in app-specific routes.py

# routes_app is a tuple of tuples.  The first item in each is a regexp that will
# be used to match the incoming request URL. The second item in the tuple is
# an applicationname.  This mechanism allows you to specify the use of an
# app-specific routes.py. This entry is meaningful only in the base routes.py.
#
# Example: support welcome, admin, app and myapp, with myapp the default:


routes_app = ((r'/(?P<app>welcome|admin|app)\b.*', r'\g<app>'),
              (r'(.*)', r'myapp'),
              (r'/?(.*)', r'myapp'))

# routes_in is a tuple of tuples.  The first item in each is a regexp that will
# be used to match the incoming request URL. The second item in the tuple is
# what it will be replaced with.  This mechanism allows you to redirect incoming
# routes to different web2py locations
#
# Example: If you wish for your entire website to use init's static directory:
#
#   routes_in=( (r'/static/(?P<file>[\w./-]+)', r'/init/static/\g<file>') )
#

routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
             (r'.*:/robots.txt', r'/examples/static/robots.txt'),
             ((r'.*http://otherdomain.com.* (?P<any>.*)', r'/app/ctr\g<any>')))

# routes_out, like routes_in translates URL paths created with the web2py URL()
# function in the same manner that route_in translates inbound URL paths.
#

routes_out = ((r'.*http://otherdomain.com.* /app/ctr(?P<any>.*)', r'\g<any>'),
              (r'/app(?P<any>.*)', r'\g<any>'))

# Error-handling redirects all HTTP errors (status codes >= 400) to a specified
# path.  If you wish to use error-handling redirects, uncomment the tuple
# below.  You can customize responses by adding a tuple entry with the first
# value in 'appName/HTTPstatusCode' format. ( Only HTTP codes >= 400 are
# routed. ) and the value as a path to redirect the user to.  You may also use
# '*' as a wildcard.
#
# The error handling page is also passed the error code and ticket as
# variables.  Traceback information will be stored in the ticket.
#
# routes_onerror = [
#     (r'init/400', r'/init/default/login')
#    ,(r'init/*', r'/init/static/fail.html')
#    ,(r'*/404', r'/init/static/cantfind.html')
#    ,(r'*/*', r'/init/error/index')
# ]

# specify action in charge of error handling
#
# error_handler = dict(application='error',
#                      controller='default',
#                      function='index')

# In the event that the error-handling page itself returns an error, web2py will
# fall back to its old static responses.  You can customize them here.
# ErrorMessageTicket takes a string format dictionary containing (only) the
# "ticket" key.

# error_message = '<html><body><h1>%s</h1></body></html>'
# error_message_ticket = '<html><body><h1>Internal error</h1>Ticket issued: <a href="/admin/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a></body></html>'

# specify a list of apps that bypass args-checking and use request.raw_args
#
#routes_apps_raw=['myapp']
#routes_apps_raw=['myapp', 'myotherapp']

def __routes_doctest():
    '''
    Dummy function for doctesting routes.py.

    Use filter_url() to test incoming or outgoing routes;
    filter_err() for error redirection.

    filter_url() accepts overrides for method and remote host:
        filter_url(url, method='get', remote='0.0.0.0', out=False)

    filter_err() accepts overrides for application and ticket:
        filter_err(status, application='app', ticket='tkt')

    >>> import os
    >>> import gluon.main
    >>> from gluon.rewrite import regex_select, load, filter_url, regex_filter_out, filter_err, compile_regex
    >>> regex_select()
    >>> load(routes=os.path.basename(__file__))

    >>> os.path.relpath(filter_url('http://domain.com/favicon.ico'))
    'applications/examples/static/favicon.ico'
    >>> os.path.relpath(filter_url('http://domain.com/robots.txt'))
    'applications/examples/static/robots.txt'
    >>> filter_url('http://domain.com')
    '/init/default/index'
    >>> filter_url('http://domain.com/')
    '/init/default/index'
    >>> filter_url('http://domain.com/init/default/fcn')
    '/init/default/fcn'
    >>> filter_url('http://domain.com/init/default/fcn/')
    '/init/default/fcn'
    >>> filter_url('http://domain.com/app/ctr/fcn')
    '/app/ctr/fcn'
    >>> filter_url('http://domain.com/app/ctr/fcn/arg1')
    "/app/ctr/fcn ['arg1']"
    >>> filter_url('http://domain.com/app/ctr/fcn/arg1/')
    "/app/ctr/fcn ['arg1']"
    >>> filter_url('http://domain.com/app/ctr/fcn/arg1//')
    "/app/ctr/fcn ['arg1', '']"
    >>> filter_url('http://domain.com/app/ctr/fcn//arg1')
    "/app/ctr/fcn ['', 'arg1']"
    >>> filter_url('HTTP://DOMAIN.COM/app/ctr/fcn')
    '/app/ctr/fcn'
    >>> filter_url('http://domain.com/app/ctr/fcn?query')
    '/app/ctr/fcn ?query'
    >>> filter_url('http://otherdomain.com/fcn')
    '/app/ctr/fcn'
    >>> regex_filter_out('/app/ctr/fcn')
    '/ctr/fcn'
    >>> filter_url('https://otherdomain.com/app/ctr/fcn', out=True)
    '/ctr/fcn'
    >>> filter_url('https://otherdomain.com/app/ctr/fcn/arg1//', out=True)
    '/ctr/fcn/arg1//'
    >>> filter_url('http://otherdomain.com/app/ctr/fcn', out=True)
    '/fcn'
    >>> filter_url('http://otherdomain.com/app/ctr/fcn?query', out=True)
    '/fcn?query'
    >>> filter_url('http://otherdomain.com/app/ctr/fcn#anchor', out=True)
    '/fcn#anchor'
    >>> filter_err(200)
    200
    >>> filter_err(399)
    399
    >>> filter_err(400)
    400
    >>> filter_url('http://domain.com/welcome', app=True)
    'welcome'
    >>> filter_url('http://domain.com/', app=True)
    'myapp'
    >>> filter_url('http://domain.com', app=True)
    'myapp'
    >>> compile_regex('.*http://otherdomain.com.* (?P<any>.*)', '/app/ctr\g<any>')[0].pattern
    '^.*http://otherdomain.com.* (?P<any>.*)$'
    >>> compile_regex('.*http://otherdomain.com.* (?P<any>.*)', '/app/ctr\g<any>')[1]
    '/app/ctr\\\\g<any>'
    >>> compile_regex('/$c/$f', '/init/$c/$f')[0].pattern
    '^.*?:https?://[^:/]+:[a-z]+ /(?P<c>\\\\w+)/(?P<f>\\\\w+)$'
    >>> compile_regex('/$c/$f', '/init/$c/$f')[1]
    '/init/\\\\g<c>/\\\\g<f>'
    '''
    pass

if __name__ == '__main__':
    import doctest
    doctest.testmod()

Added scgihandler.py version [4e7a23db5a].








































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
scgihandler.py - handler for SCGI protocol

Modified by Michele Comitini <michele.comitini@glisco.it>
from fcgihandler.py to support SCGI

fcgihandler has the following copyright:
" This file is part of the web2py Web Framework
  Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
  License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) 
"
                                                                            
This is a handler for lighttpd+scgi
This file has to be in the PYTHONPATH
Put something like this in the lighttpd.conf file:

server.document-root="/var/www/web2py/"
# for >= linux-2.6
server.event-handler = "linux-sysepoll"

url.rewrite-once = (
      "^(/.+?/static/.+)$" => "/applications$1",
      "(^|/.*)$" => "/handler_web2py.scgi$1",
)
scgi.server = ( "/handler_web2py.scgi" =>
                  ("handler_web2py" =>
                      ( "host" => "127.0.0.1",
                        "port" => "4000",
                        "check-local" => "disable", # don't forget to set "disable"!
                      )
    )
)




"""

LOGGING = False
SOFTCRON = False

import sys
import os

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]

import gluon.main

# uncomment one of the two imports below depending on the SCGIWSGI server installed
#import paste.util.scgiserver as scgi
from wsgitools.scgi.forkpool import SCGIServer

if LOGGING:
    application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
                                        logfilename='httpserver.log',
                                        profilerfilename=None)
else:
    application = gluon.main.wsgibase

if SOFTCRON:
    from gluon.settings import global_settings
    global_settings.web2py_crontype = 'soft'

# uncomment one of the two rows below depending on the SCGIWSGI server installed
#scgi.serve_application(application, '', 4000).run()
SCGIServer(application, port=4000).run()

Added scripts/autoroutes.py version [6bf50cb4ff].














































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
autoroutes writes routes for you based on a simpler routing
configuration file called routes.conf. Example:

----- BEGIN routes.conf-------
127.0.0.1   /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/default
----- END ----------

It maps a domain (the left-hand side) to an app (one app per domain),
and shortens the URLs for the app by removing the listed path prefix. That means:

http://domain1.com/index is mapped to /app1/default/index
http://domain2.com/index is mapped to /app2/default/index

It preserves admin, appadmin, static files, favicon.ico and robots.txt:

http://domain1.com/favicon.ico  /welcome/static/favicon.ico
http://domain1.com/robots.txt   /welcome/static/robots.txt
http://domain1.com/admin/...    /admin/...
http://domain1.com/appadmin/... /app1/appadmin/...
http://domain1.com/static/...   /app1/static/...

and vice-versa.

To use, cp scripts/autoroutes.py routes.py

and either edit the config string below, or set config = "" and edit routes.conf
'''

config = '''
127.0.0.1   /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/defcon3
'''
if not config.strip():
    try:
        config_file = open('routes.conf','r')
        try:
            config = config_file.read()
        finally:
            config_file.close()
    except:
        config=''

def auto_in(apps):
    routes = [
        ('/robots.txt','/welcome/static/robots.txt'),
        ('/favicon.ico','/welcome/static/favicon.ico'),
        ('/admin$anything','/admin$anything'),
        ]
    for domain,path in [x.strip().split() for x in apps.split('\n') if x.strip() and not x.strip().startswith('#')]:
        if not path.startswith('/'): path = '/'+path
        if path.endswith('/'): path = path[:-1]
        app = path.split('/')[1]
        routes += [
            ('.*:https?://(.*\.)?%s:$method /' % domain,'%s' % path),
            ('.*:https?://(.*\.)?%s:$method /static/$anything' % domain,'/%s/static/$anything' % app),
            ('.*:https?://(.*\.)?%s:$method /appadmin/$anything' % domain,'/%s/appadmin/$anything' % app),
            ('.*:https?://(.*\.)?%s:$method /$anything' % domain,'%s/$anything' % path),
            ]
    return routes

def auto_out(apps):
    routes = []
    for domain,path in [x.strip().split() for x in apps.split('\n') if x.strip() and not x.strip().startswith('#')]:
        if not path.startswith('/'): path = '/'+path
        if path.endswith('/'): path = path[:-1]
        app = path.split('/')[1]
        routes += [
            ('/%s/static/$anything' % app,'/static/$anything'),
            ('/%s/appadmin/$anything' % app, '/appadmin/$anything'),
            ('%s/$anything' % path, '/$anything'),
            ]
    return routes

routes_in = auto_in(config)
routes_out = auto_out(config)

def __routes_doctest():
    '''
    Dummy function for doctesting autoroutes.py.

    Use filter_url() to test incoming or outgoing routes;
    filter_err() for error redirection.

    filter_url() accepts overrides for method and remote host:
        filter_url(url, method='get', remote='0.0.0.0', out=False)

    filter_err() accepts overrides for application and ticket:
        filter_err(status, application='app', ticket='tkt')

    >>> filter_url('http://domain1.com/favicon.ico')
    'http://domain1.com/welcome/static/favicon.ico'
    >>> filter_url('https://domain2.com/robots.txt')
    'https://domain2.com/welcome/static/robots.txt'
    >>> filter_url('http://domain3.com/fcn')
    'http://domain3.com/app3/defcon3/fcn'
    >>> filter_url('http://127.0.0.1/fcn')
    'http://127.0.0.1/examples/default/fcn'
    >>> filter_url('HTTP://DOMAIN.COM/app/ctr/fcn')
    'http://domain.com/app/ctr/fcn'
    >>> filter_url('http://domain.com/app/ctr/fcn?query')
    'http://domain.com/app/ctr/fcn?query'
    >>> filter_url('http://otherdomain.com/fcn')
    'http://otherdomain.com/fcn'
    >>> regex_filter_out('/app/ctr/fcn')
    '/app/ctr/fcn'
    >>> regex_filter_out('/app1/ctr/fcn')
    '/app1/ctr/fcn'
    >>> filter_url('https://otherdomain.com/app1/default/fcn', out=True)
    '/fcn'
    >>> filter_url('http://otherdomain.com/app2/ctr/fcn', out=True)
    '/app2/ctr/fcn'
    >>> filter_url('http://domain1.com/app1/default/fcn?query', out=True)
    '/fcn?query'
    >>> filter_url('http://domain2.com/app3/defcon3/fcn#anchor', out=True)
    '/fcn#anchor'
    '''
    pass

if __name__ == '__main__':
    try:
        import gluon.main
    except ImportError:
        import sys, os
        os.chdir(os.path.dirname(os.path.dirname(__file__)))
        sys.path.append(os.path.dirname(os.path.dirname(__file__)))
        import gluon.main
    from gluon.rewrite import regex_select, load, filter_url, regex_filter_out
    regex_select()          # use base routing parameters
    load(routes=__file__)   # load this file

    import doctest
    doctest.testmod()

Added scripts/cleancss.py version [16ecfeb3d2].





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import re

filename = sys.argv[1]

datafile = open(filename, 'r')
try:
    data = datafile.read()
finally:
    datafile.close()
data = re.compile('\s*{\s*').sub(' { ', data)
data = re.compile('\s*;\s*').sub('; ', data)
data = re.compile('\s*}\s*').sub(' }\n', data)
data = re.compile('[ ]+').sub(' ', data)

print data

Added scripts/cleanhtml.py version [d53694d182].






























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import sys
import re

def cleancss(text):
    text=re.compile('\s+').sub(' ', text)
    text=re.compile('\s*(?P<a>,|:)\s*').sub('\g<a> ', text)
    text=re.compile('\s*;\s*').sub(';\n    ', text)
    text=re.compile('\s*\{\s*').sub(' {\n    ', text)
    text=re.compile('\s*\}\s*').sub('\n}\n\n', text)
    return text

def cleanhtml(text):
    text=text.lower()
    r=re.compile('\<script.+?/script\>', re.DOTALL)
    scripts=r.findall(text)
    text=r.sub('<script />', text)
    r=re.compile('\<style.+?/style\>', re.DOTALL)
    styles=r.findall(text)
    text=r.sub('<style />', text)
    text=re.compile(
        '<(?P<tag>(input|meta|link|hr|br|img|param))(?P<any>[^\>]*)\s*(?<!/)>')\
        .sub('<\g<tag>\g<any> />', text)
    text=text.replace('\n', ' ')
    text=text.replace('>', '>\n')
    text=text.replace('<', '\n<')
    text=re.compile('\s*\n\s*').sub('\n', text)
    lines=text.split('\n')
    (indent, newlines)=(0, [])
    for line in lines:
        if line[:2]=='</': indent=indent-1
        newlines.append(indent*'  '+line)
        if not line[:2]=='</' and line[-1:]=='>' and \
                not line[-2:] in ['/>', '->']: indent=indent+1
    text='\n'.join(newlines)
    text=re.compile('\<div(?P<a>( .+)?)\>\s+\</div\>').sub('<div\g<a>></div>',text)
    text=re.compile('\<a(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</a\>').sub('<a\g<a>>\g<b></a>',text)
    text=re.compile('\<b(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</b\>').sub('<b\g<a>>\g<b></b>',text)
    text=re.compile('\<i(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</i\>').sub('<i\g<a>>\g<b></i>',text)
    text=re.compile('\<span(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</span\>').sub('<span\g<a>>\g<b></span>',text)
    text=re.compile('\s+\<br(?P<a>.*?)\/\>').sub('<br\g<a>/>',text)
    text=re.compile('\>(?P<a>\s+)(?P<b>[\.\,\:\;])').sub('>\g<b>\g<a>',text)
    text=re.compile('\n\s*\n').sub('\n',text)
    for script in scripts:
        text=text.replace('<script />', script, 1)
    for style in styles:
        text=text.replace('<style />', cleancss(style), 1)
    return text

def read_file(filename):
    f = open(filename, 'r')
    try:
        return f.read()
    finally:
        f.close()

file=sys.argv[1]
if file[-4:]=='.css':
    print cleancss(read_file(file))
if file[-5:]=='.html':
    print cleanhtml(read_file(file))

Added scripts/contentparser.py version [5a36086abd].





































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import cStringIO
import re
import sys
import tarfile
import urllib
import xml.parsers.expat as expat

"""
Update script for contenttype.py module.

Usage: python contentupdate.py /path/to/contenttype.py

If no path is specified, script will look for contenttype.py in current
working directory.

Internet connection is required to perform the update.
"""

OVERRIDE = [
    ('.pdb', 'chemical/x-pdb'),
    ('.xyz', 'chemical/x-pdb')
    ]


class MIMEParser(dict):

    def __start_element_handler(self, name, attrs):
        if name == 'mime-type':
            if self.type:
                for extension in self.extensions:
                    self[extension] = self.type
            self.type = attrs['type'].lower()
            self.extensions = []
        elif name == 'glob':
            pattern = attrs['pattern']
            if pattern.startswith('*.'):
                self.extensions.append(pattern[1:].lower())

    def __init__(self, fileobj):
        dict.__init__(self)
        self.type = ''
        self.extensions = ''
        parser = expat.ParserCreate()
        parser.StartElementHandler = self.__start_element_handler
        parser.ParseFile(fileobj)
        for extension, contenttype in OVERRIDE:
            self[extension] = contenttype


if __name__ == '__main__':
    try:
        path = sys.argv[1]
    except:
        path = 'contenttype.py'
    vregex = re.compile('database version (?P<version>.+?)\.?\n')
    sys.stdout.write('Checking contenttype.py database version:')
    sys.stdout.flush()
    try:
        pathfile = open(path)
        try:
            current = pathfile.read()
        finally:
            pathfile.close()
        cversion = re.search(vregex, current).group('version')
        sys.stdout.write('\t[OK] version %s\n' % cversion)
    except Exception, e:
        sys.stdout.write('\t[ERROR] %s\n' % e)
        exit()
    sys.stdout.write('Checking freedesktop.org database version:')
    sys.stdout.flush()
    try:
        search = re.search('(?P<url>http://freedesktop.org/.+?/shared-mime-info-(?P<version>.+?)\.tar\.(?P<type>[gb]z2?))',
            urllib.urlopen('http://www.freedesktop.org/wiki/Software/shared-mime-info').read())
        url = search.group('url')
        assert url != None
        nversion = search.group('version')
        assert nversion != None
        ftype = search.group('type')
        assert ftype != None
        sys.stdout.write('\t[OK] version %s\n' % nversion)
    except:
        sys.stdout.write('\t[ERROR] unknown version\n')
        exit()
    if cversion == nversion:
        sys.stdout.write('\nContenttype.py database is up to date\n')
        exit()
    try:
        raw_input('\nContenttype.py database updates are available from:\n%s (approx. 0.5MB)\nPress enter to continue or CTRL-C to quit now\nWARNING: this will replace contenttype.py file content IN PLACE' % url)
    except:
        exit()
    sys.stdout.write('\nDownloading new database:')
    sys.stdout.flush()
    fregex = re.compile('^.*/freedesktop\.org\.xml$')
    try:
        io = cStringIO.StringIO()
        io.write(urllib.urlopen(url).read())
        sys.stdout.write('\t[OK] done\n')
    except Exception, e:
        sys.stdout.write('\t[ERROR] %s\n' % e)
        exit()
    sys.stdout.write('Installing new database:')
    sys.stdout.flush()
    try:
        tar = tarfile.TarFile.open(fileobj=io, mode='r:%s' % ftype)
        try:
            for content in tar.getnames():
                if fregex.match(content):
                    xml = tar.extractfile(content)
                    break
        finally:
            tar.close()
        data = MIMEParser(xml)
        io = cStringIO.StringIO()
        io.write('CONTENT_TYPE = {\n')
        for key in sorted(data):
            io.write('    \'%s\': \'%s\',\n' % (key, data[key]))
        io.write('    }')
        io.seek(0)
        contenttype = open('contenttype.py', 'w')
        try:
            contenttype.write(re.sub(vregex, 'database version %s.\n' % nversion, re.sub('CONTENT_TYPE = \{(.|\n)+?\}', io.getvalue(), current)))
        finally:
            contenttype.close()
        if not current.closed:
            current.close()
        sys.stdout.write('\t\t\t[OK] done\n')
    except Exception, e:
        sys.stdout.write('\t\t\t[ERROR] %s\n' % e)

Added scripts/cpdb.py version [2846508ed4].











































































































































































































































































































































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

import os,sys
from collections import deque                                                      
import string                                                      
import argparse
import cStringIO,operator
import cPickle as pickle
from collections import deque
import math
import re
import cmd
import readline
try:    
    from gluon import DAL
except ImportError as err:
    print('gluon path not found')    

class refTable(object):
    def __init__(self):
        self.columns = None
        self.rows = None
    
    def getcolHeader(self,colHeader):
        return "{0}".format(' | '.join([string.join(string.strip('**{0}**'.format(item)),
                                                        '') for item in colHeader]))
            
        
    def wrapTable(self,rows, hasHeader=False, headerChar='-', delim=' | ', justify='left',
               separateRows=False, prefix='', postfix='', wrapfunc=lambda x:x):
        
        def rowWrapper(row):
            
            '''---
                    newRows is returned like 
                            [['w'], ['x'], ['y'], ['z']]
                                                                    ---'''                    
            newRows = [wrapfunc(item).split('\n') for item in row]
            self.rows = newRows
            '''---
                        rowList gives like newRows but 
                            formatted like [[w, x, y, z]]
                                                                ---'''
            rowList = [[substr or '' for substr in item] for item in map(None,*newRows)] 
            return rowList
        
        logicalRows = [rowWrapper(row) for row in rows]
        
        columns = map(None,*reduce(operator.add,logicalRows))
        self.columns = columns 
        
        maxWidths = [max(\
                          [len(str\
                                  (item)) for \
                                               item in column]\
                                  ) for column \
                                               in columns]
        
        rowSeparator = headerChar * (len(prefix) + len(postfix) + sum(maxWidths) + \
                           len(delim)*(len(maxWidths)-1))
        
        justify = {'center'\
                            :str\
                                .center, 
                   'right'\
                           :str\
                               .rjust, 
                   'left'\
                          :str.\
                                ljust\
                                      }[justify\
                                               .lower(\
                                                       )]
                   
        output=cStringIO.StringIO()
        
        if separateRows: 
            print >> output, rowSeparator
        
        for physicalRows in logicalRows:
            for row in physicalRows:
                print >> output,\
             prefix + delim.join([\
     justify(str(item),width) for (\
  item,width) in zip(row,maxWidths)]\
                            ) + postfix
                            
            if separateRows or hasHeader: 
                print >> output, rowSeparator; hasHeader=False
        return output.getvalue()
    
    def wrap_onspace(self,text,width):
        return reduce(lambda line, word, width=width: '{0}{1}{2}'\
                      .format(line\
                       ,' \n'[(len(\
                line[line.rfind('\n'\
                      ) + 1:]) + len(\
             word.split('\n',1)[0]) >=\
          width)],word),text.split(' '))
        
    def wrap_onspace_strict(self,text,width):
        wordRegex = re.compile(r'\S{'+str(width)+r',}')
        return self.wrap_onspace(\
                                  wordRegex.sub(\
                                  lambda m: self.\
                                      wrap_always(\
                              m.group(),width),text\
                                             ),width)
    
    def wrap_always(self,text,width):
        return '\n'.join(\
 [ text[width*i:width*(i+1\
        )] for i in xrange(\
       int(math.ceil(1.*len(\
             text)/width))) ])

class tableHelper():
    def __init__(self):  
        self.oTable = refTable()
          
    def getAsRows(self,data):
        return [row.strip().split(',')  for row in data.splitlines()]
    
    def getTable_noWrap(self,data,header=None):
        rows = self.getAsRows(data)
        if header is not None:hRows = [header]+rows
        else:hRows = rows        
        table = self.oTable.wrapTable(hRows, hasHeader=True)
        return table
    
    def getTable_Wrap(self,data,wrapStyle,header=None,width=65): 
        wrapper = None        
        if len(wrapStyle) > 1:            
            rows = self.getAsRows(data)
            if header is not None:hRows = [header]+rows
            else:hRows = rows
            
            for wrapper in (self.oTable.wrap_always,
                                    self.oTable.wrap_onspace,
                                            self.oTable.wrap_onspace_strict):
                return self.oTable.wrapTable(hRows\
                                    ,hasHeader=True\
                                  ,separateRows=True\
                                         ,prefix='| '\
                                         ,postfix=' |'\
                                              ,wrapfunc\
                                              =lambda x:\
                                         wrapper(x,width))                         
        else:
            return self.getTable_noWrap(data,header)
        
    def getAsErrorTable(self,err):
        return self.getTable_Wrap(err,None)


class console:
    def __init__(self,prompt,banner=None):
        self.prompt=prompt
        self.banner=banner
        self.commands={}
        self.commandSort=[]
        self.db=None

        for i in dir(self):
            if "cmd_"==i[:4]:
                cmd=i.split("cmd_")[1].lower()
                self.commands[cmd]=getattr(self,i)
                try:self.commandSort.append((int(self\
                            .commands[cmd].__doc__.split(\
                                        "|")[0]),cmd))
                except:pass
        
        self.commandSort.sort()
        self.commandSort=[i[1] for i in self.commandSort]
        
        self.var_DEBUG=False
        self.var_tableStyle=''

        self.configvars={}
        for i in dir(self):
            if "var_"==i[:4]:
                var=i.split("var_")[1]
                self.configvars[var]=i

    def setBanner(self,banner):
        self.banner=banner

    def execCmd(self,db):
        self.db=db
        print self.banner        
        while True:
            try:
                command=raw_input(self.prompt)
                try:
                    self.execCommand(command)
                except:
                    self.execute(command)
            except KeyboardInterrupt:break
            except EOFError:break
            except Exception,a:self.printError (a)
        print ("\r\n\r\nBye!...")
        sys.exit(0)

    def printError(self,err):
        sys.stderr.write("Error: {0}\r\n".format(str(err),))
        if self.var_DEBUG:pass

    def execute(self,cmd):
        try:
            if not '-table ' in cmd:
                exec '{0}'.format(cmd)
            else:                
                file=None
                table=None

                fields=[]
                items=string.split(cmd,' ')
                invalidParams=[]                
                table=self.getTable(items[1])
                allowedParams=['fields','file']
                for i in items:
                    if '=' in i and not string.split(i,'=')[0] in allowedParams:
                        try:
                            invalidParams.append(i)
                        except Exception, err:
                            raise Exception, 'invalid parameter\n{0}'.format(i)
                    else:
                        if 'file=' in i:
                            file=os.path.abspath(string.strip(string.split(i,'=')[1]))                            
                        if 'fields=' in i:
                            for field in string.split(string.split(i,'=')[1],','):
                                if field in self.db[table].fields:
                                    fields.append(string.strip(field))
                                        
                if len(invalidParams)>0:
                    print('the following parameter(s) is not valid\n{0}'.format(\
                                                    string.join(invalidParams,',')))
                else:
                    try:
                        self.cmd_table(table,file,fields)
                    except Exception, err:
                        print('could not generate table for table {0}\n{1}'\
                                                        .format(table,err))                                            
        except Exception, err:
            print('sorry, can not do that!\n{0}'.format(err))
        
    def getTable(self,tbl):
        for mTbl in db.tables:
            if tbl in mTbl:
                if mTbl.startswith(tbl):
                    return mTbl                            
        
    def execCommand(self,cmd):
        words=cmd.split(" ")
        words=[i for i in words if i]
        if not words:return
        cmd,parameters=words[0].lower(),words[1:]

        if not cmd in self.commands:
            raise Exception("Command {0} not found. Try 'help'\r\n".format(cmd))

        self.commands[cmd](*parameters)
      
    '''---
             DEFAULT COMMANDS (begins with cmd_)
                                                     ---'''
    def cmd_clear(self,numlines=100):
        """-5|clear|clear the screen"""
        if os.name == "posix":
            '''---
                        Unix/Linux/MacOS/BSD/etc
                                                    ---'''
            os.system('clear')
        elif os.name in ("nt", "dos", "ce"):
            '''---
                        Windows
                                        ---'''
            os.system('CLS')
        else:
            '''---
                     Fallback for other operating systems.
                                                             ---'''
            print '\n'*numlines                                                     

    def cmd_table(self,tbl,file=None,fields=[]):
        """-4|-table [TABLENAME] optional[file=None] [fields=None]|\
the default tableStyle is no_wrap - use the 'set x y' command to change the style\n\
style choices:
\twrap_always 
\twrap_onspace
\twrap_onspace_strict
\tno_wrap (value '')\n
\t the 2nd optional param is a path to a file where the table will be written
\t the 3rd optional param is a list of fields you want displayed\n"""
        table=None
        for mTbl in db.tables:
            if tbl in mTbl:
                if mTbl.startswith(tbl):
                    table=mTbl
                    break                
        oTable=tableHelper()
        '''--- 
                tablestyle:
                        wrap_always 
                            wrap_onspace 
                                wrap_onspace_strict 
                    or set set to "" for no wrapping                                        
                                                                                    ---'''
        tableStyle=self.var_tableStyle
        filedNotFound=[]
        table_fields=None
        if len(fields)==0:
            table_fields=self.db[table].fields
        else:
            table_fields=fields
        
        for field in fields:
            if not field in self.db[table].fields:
                filedNotFound.append(field)
        if len(filedNotFound)==0:
            rows=self.db(self.db[table].id>0).select()
            rows_data=[]
            for row in rows:
                rowdata=[]
                for f in table_fields:
                    rowdata.append('{0}'.format(row[f]))
                rows_data.append(string.join(rowdata,','))
            data=string.join(rows_data,'\n')
            dataTable=oTable.getTable_Wrap(data,tableStyle,table_fields)        
            print('TABLE {0}\n{1}'.format(table,dataTable))
            if file!=None:
                try:
                    tail,head=os.path.split(file)
                    try:
                        os.makedirs(tail)
                    except:'do nothing, folders exist'
                    oFile=open(file,'w')
                    oFile.write('TABLE: {0}\n{1}'.format(table,dataTable))
                    oFile.close()
                    print('{0} has been created and populated with all available data from table {1}\n'.format(file,table))
                except Exception, err:
                    print("EXCEPTION: could not create table {0}\n{1}".format(table,err))
        else:
            print('the following fields are not valid [{0}]'.format(string.join(filedNotFound,',')))
                                                            
    def cmd_help(self,*args):
        '''-3|help|Show's help'''
        alldata=[]
        lengths=[]

        for i in self.commandSort:alldata.append(\
                                self.commands[i].__doc__.split("|")[1:])

        for i in alldata:
            if len(i) > len(lengths):
                for j in range(len(i)\
                               -len(lengths)):
                    lengths.append(0)

            j=0
            while j<len(i):
                if len(i[j])>lengths[j]:
                    lengths[j]=len(i[j])
                j+=1
                                
        print ("-"*(lengths[0]+lengths[1]+4))         
        for i in alldata:            
            print (("%-"+str(lengths[0])+"s  - %-"+str(lengths[1])+"s") % (i[0],i[1]))
            if len(i)>2:
                for j in i[2:]:print (("%"+str(lengths[0]+9)+"s* %s") % (" ",j))
        print

    def cmd_vars(self,*args):
        '''-2|vars|Show variables'''
        print ("variables\r\n"+"-"*79)
        for i,j in self.configvars.items():
            value=self.parfmt(repr(getattr(self,j)),52)
            print ("| %20s | %52s |" % (i,value[0]))
            for k in value[1:]:print ("| %20s | %52s |" % ("",k))
            if len(value)>1:print("| %20s | %52s |" % ("",""))
        print ("-"*79)
        
    def parfmt(self,txt,width):
        res=[]
        pos=0
        while True:
            a=txt[pos:pos+width]
            if not a:break
            res.append(a)
            pos+=width
        return res
    
    def cmd_set(self,*args):
        '''-1|set [variable_name] [value]|Set configuration variable value|Values are an expressions (100 | string.lower('ABC') | etc.'''
        value=" ".join(args[1:])
        if args[0] not in self.configvars:
            setattr(self,"var_{0}".format(args[0]),eval(value))
        setattr(self,"var_{0}".format(args[0]),eval(value))
        
    def cmd_clearscreen(self,numlines=50):
        '''---Clear the console.
                                    ---'''
        if os.name == "posix":
            '''---
                        Unix/Linux/MacOS/BSD/etc
                                                    ---'''
            os.system('clear')
        elif os.name in ("nt", "dos", "ce"):
            '''---
                        Windows
                                        ---'''
            os.system('CLS')
        else:
            '''---
                     Fallback for other operating systems.
                                                             ---'''
            print '\n'*numlines

class dalShell(console):
    def __init__(self):
        pass
    
    def shell(self,db):        
        console.__init__(self,prompt=">>> ",banner='dal interactive shell')                
        self.execCmd(db)

class setCopyDB():
    def __init__(self):
        '''---
                non source or target specific vars
                                                        ---'''          
        self.strModel=None
        self.dalPath=None
        self.db=None        
        '''---
                    source vars
                                    ---'''        
        self.sourceModel=None
        self.sourceFolder=None
        self.sourceConnectionString=None
        self.sourcedbType=None
        self.sourcedbName=None     
        '''---
                    target vars
                                    ---'''
        self.targetdbType=None
        self.targetdbName=None 
        self.targetModel=None
        self.targetFolder=None
        self.targetConnectionString=None       
        self.truncate=False                    

    def _getDal(self):
        mDal=None
        if self.dalPath is not None:
            global DAL
            sys.path.append(self.dalPath)            
            mDal=__import__('dal',globals={},locals={},fromlist=['DAL'],level=0)
            DAL=mDal.DAL
            return mDal            
        
    def instDB(self,storageFolder,storageConnectionString,autoImport):                
        self.db=DAL(storageConnectionString,folder=os.path.abspath(storageFolder),auto_import=autoImport)
        return self.db
            
    def delete_DB_tables(self,storageFolder,storageType):  
        print 'delete_DB_tablesn\n\t{0}\n\t{1}'.format(storageFolder,storageType)              
        dataFiles=[storageType,"sql.log"]    
        try:
            for f in os.listdir(storageFolder):
                if ".table" in f:                    
                    fTable="{0}/{1}".format(storageFolder,f)
                    os.remove(fTable)                       
                    print('deleted {0}'.format(fTable))        
            for dFile in dataFiles:                
                os.remove("{0}/{1}".format(storageFolder,dFile))
                print('deleted {0}'.format("{0}/{1}".format(storageFolder,dFile)))  
        except Exception, errObj:
            print(str(errObj))                   
            
    def truncatetables(self,tables=[]):
        if len(tables)!=0:
            try:
                print 'table value: {0}'.format(tables)                
                for tbl in self.db.tables:            
                    for mTbl in tables:
                        if mTbl.startswith(tbl):
                            self.db[mTbl].truncate()
            except Exception, err:
                print('EXCEPTION: {0}'.format(err))
        else:
            try:
                for tbl in self.db.tables:
                    self.db[tbl].truncate()        
            except Exception, err:
                print('EXCEPTION: {0}'.format(err))                                                  
    
    def copyDB(self):
        other_db=DAL("{0}://{1}".format(self.targetdbType,self.targetdbName),folder=self.targetFolder)
        
        print 'creating tables...'
        
        for table in self.db:
            other_db.define_table(table._tablename,*[field for field in table])
            '''
            should there be an option to truncAte target DB?
            if yes, then change args to allow for choice
            and set self.trancate to the art value
            
            if self.truncate==True:
                other_db[table._tablename].truncate()
            '''
                
        print 'exporting data...'
        self.db.export_to_csv_file(open('tmp.sql','wb'))
        
        print 'importing data...'
        other_db.import_from_csv_file(open('tmp.sql','rb'))
        other_db.commit()
        print 'done!'
        print 'Attention: do not run this program again or you end up with duplicate records'

    def createfolderPath(self,folder):
        try:
            if folder!=None:os.makedirs(folder)
        except Exception, err:
            pass                        

if __name__ == '__main__':
    oCopy=setCopyDB()
    db=None
    targetDB=None
    dbfolder=None
    clean=False
    model=None
    truncate=False

    parser=argparse.ArgumentParser(description='\
samplecmd line:\n\
-f ./blueLite/db_storage -i -y sqlite://storage.sqlite -Y sqlite://storage2.sqlite -d ./blueLite/pyUtils/sql/blueSQL -t True',
                                   epilog = '')
    reqGroup=parser.add_argument_group('Required arguments')
    reqGroup.add_argument('-f','--sourceFolder'\
                         ,required=True\
                         ,help="path to the 'source' folder of the 'source' DB")  
    reqGroup.add_argument('-F','--targetFolder'\
                         ,required=False\
                         ,help="path to the 'target' folder of the 'target' DB")             
    reqGroup.add_argument('-y','--sourceConnectionString'\
                         ,required=True\
                         ,help="source db connection string ()\n\
------------------------------------------------\n\
\
sqlite://storage.db\n\
mysql://username:password@localhost/test\n\
postgres://username:password@localhost/test\n\
mssql://username:password@localhost/test\n\
firebird://username:password@localhost/test\n\
oracle://username/password@test\n\
db2://username:password@test\n\
ingres://username:password@localhost/test\n\
informix://username:password@test\n\
\
------------------------------------------------")
    reqGroup.add_argument('-Y','--targetConnectionString'\
                         ,required=True\
                         ,help="target db type (sqlite,mySql,etc.)")             
    autoImpGroup=parser.add_argument_group('optional args (auto_import)')
    autoImpGroup.add_argument('-a','--autoimport'\
                        ,required=False\
                        ,help='set to True to bypass loading of the model')   
    
    """
    
    *** removing -m/-M options for now --> i need a 
            better regex to match db.define('bla')...with optional db.commit()
    
    modelGroup=parser.add_argument_group('optional args (create model)')
    modelGroup.add_argument('-m','--sourcemodel'\
                         ,required=False\
                         ,help='to create a model from an existing model, point to the source model')
    modelGroup.add_argument('-M','--targetmodel'\
                         ,required=False\
                         ,help='to create a model from an existing model, point to the target model')
                         
    """

        
    miscGroup=parser.add_argument_group('optional args/tasks')    
    miscGroup.add_argument('-i','--interactive'\
                            ,required=False\
                            ,action='store_true'\
                            ,help='run in interactive mode')    
    miscGroup.add_argument('-d','--dal'\
                         ,required=False\
                         ,help='path to dal.py')
    miscGroup.add_argument('-t','--truncate'\
                         ,choices=['True','False']\
                         ,help='delete the records but *not* the table of the SOURCE DB')
    miscGroup.add_argument('-b','--tables'\
                         ,required=False\
                         ,type=list\
                         ,help='optional list (comma delimited) of SOURCE tables to truncate, defaults to all')
    miscGroup.add_argument('-c','--clean'\
                         ,required=False\
                         ,help='delete the DB,tables and the log file, WARNING: this is unrecoverable')
                
    args=parser.parse_args()  
    db=None
    mDal=None

    try:
        oCopy.sourceFolder=args.sourceFolder 
        oCopy.targetFolder=args.sourceFolder        
        sourceItems=string.split(args.sourceConnectionString,'://')    
        oCopy.sourcedbType=sourceItems[0]
        oCopy.sourcedbName=sourceItems[1]
        targetItems=string.split(args.targetConnectionString,'://')    
        oCopy.targetdbType=sourceItems[0]
        oCopy.targetdbName=sourceItems[1]
    except Exception, err:
        print('EXCEPTION: {0}'.format(err))

    if args.dal:
        try:            
            autoImport=True
            if args.autoimport:autoImport=args.autoimport
            #sif not DAL in globals:
            #if not sys.path.__contains__():
            oCopy.dalPath=args.dal
            mDal=oCopy._getDal()
            db=oCopy.instDB(args.sourceFolder,args.sourceConnectionString,autoImport)         
        except Exception, err:
            print('EXCEPTION: could not set DAL\n{0}'.format(err))    
    if args.truncate:
        try:
            if args.truncate:
                if args.tables:tables=string.split(string.strip(args.tables),',') 
                else:oCopy.truncatetables([])
        except Exception, err:
            print('EXCEPTION: could not truncate tables\n{0}'.format(err))
    try:
        if args.clean:oCopy.delete_DB_tables(oCopy.targetFolder,oCopy.targetType)
    except Exception, err:
        print('EXCEPTION: could not clean db\n{0}'.format(err))


    """
    *** goes with -m/-M options... removed for now
    
    if args.sourcemodel:
        try:
            oCopy.sourceModel=args.sourcemodel
            oCopy.targetModel=args.sourcemodel
            oCopy.createModel()
        except Exception, err:
            print('EXCEPTION: could not create model\n\
source model: {0}\n\
target model: {1}\n\
{2}'.format(args.sourcemodel,args.targetmodel,err))
    """
    
    if args.sourceFolder:
        try:
            oCopy.sourceFolder=os.path.abspath(args.sourceFolder)
            oCopy.createfolderPath(oCopy.sourceFolder)
        except Exception, err:
            print('EXCEPTION: could not create folder path\n{0}'.format(err))        
    else:oCopy.dbStorageFolder=os.path.abspath(os.getcwd())
    if args.targetFolder:
        try:
            oCopy.targetFolder=os.path.abspath(args.targetFolder)
            oCopy.createfolderPath(oCopy.targetFolder)
        except Exception, err:
            print('EXCEPTION: could not create folder path\n{0}'.format(err))  
    if not args.interactive:
        try:    
            oCopy.copyDB()
        except Exception, err:
            print('EXCEPTION: could not make a copy of the database\n{0}'.format(err)) 
    else:
        s=dalShell()
        s.shell(db)

Added scripts/cpplugin.py version [6843c12feb].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import sys, glob, os, shutil
name=sys.argv[1]
app=sys.argv[2]
dest=sys.argv[3]
a=glob.glob('applications/%(app)s/*/plugin_%(name)s.*' % dict(app=app,name=name))
b=glob.glob('applications/%(app)s/*/plugin_%(name)s/*' % dict(app=app,name=name))

for f in a:
    print 'cp %s ...' % f,
    shutil.copyfile(f,os.path.join('applications',dest,*f.split('/')[2:]))
    print 'done'

for f in b:
    print 'cp %s ...' % f,
    path = f.split('/')
    for i in range(3,len(path)):
        try: os.mkdir(os.path.join('applications',dest,*path[2:i]))
        except: pass
    path = os.path.join('applications',dest,*f.split('/')[2:])
    if os.path.isdir(f):
        if not os.path.exists(path):
            shutil.copytree(f,path)
    else:
        shutil.copyfile(f,path)
    print 'done'

Added scripts/dict_diff.py version [aa97c1e32b].


























































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
@author: Pierre Thibault (pierre.thibault1 -at- gmail.com)
@license: MIT
@since: 2011-06-17

Usage: dict_diff [OPTION]... dict1 dict2         
Show the differences for two dictionaries.

  -h,  --help          Display this help message.
  
dict1 and dict2 are two web2py dictionary files to compare. These are the files
located in the "languages" directory of a web2py app. The tools show the
differences between the two files.
'''

__docformat__ = "epytext en"

import getopt
import os.path
import sys

def main(argv):
    """Parse the arguments and start the main process."""
    try:                                
        opts, args = getopt.getopt(argv, "h", ["help"])
    except getopt.GetoptError:
        exit_with_parsing_error()
    for opt, arg in opts:
        arg = arg  # To avoid a warning from Pydev
        if opt in ("-h", "--help"):
            usage()                     
            sys.exit()
    if len(args) == 2:
        params = list(get_dicts(*args))
        params.extend(get_dict_names(*args))
        compare_dicts(*params)
    else:
        exit_with_parsing_error()       

def exit_with_parsing_error():              
    """Report invalid arguments and usage."""
    print("Invalid argument(s).")
    usage()
    sys.exit(2)

def usage():
    """Display the documentation"""
    print(__doc__)

def get_dicts(dict_path1, dict_path2):
    """
    Parse the dictionaries.
    @param dict_path1: The path to the first dictionary.
    @param dict_path2: The path to the second dictionary.
    @return: The two dictionaries as a sequence.
    """

    return eval(open(dict_path1).read()), eval(open(dict_path2).read()) 

def get_dict_names(dict1_path, dict2_path):
    """
    Get the name of the dictionaries for the end user. Use the base name of the
    files. If the two base names are identical, returns "dict1" and "dict2."
    @param dict1_path: The path to the first dictionary.
    @param dict2_path: The path to the second dictionary.
    @return: The two dictionary names as a sequence.
    """

    dict1_name = os.path.basename(dict1_path)
    dict2_name = os.path.basename(dict2_path)
    if dict1_name == dict2_name:
        dict1_name = "dict1"
        dict2_name = "dict2"
    return dict1_name, dict2_name
    
def compare_dicts(dict1, dict2, dict1_name, dict2_name):
    """
    Compare the two dictionaries. Print out the result.
    @param dict1: The first dictionary.
    @param dict1: The second dictionary.
    @param dict1_name: The name of the first dictionary.
    @param dict2_name: The name of the second dictionary.
    """

    dict1_keyset = set(dict1.keys())
    dict2_keyset = set(dict2.keys())
    print_key_diff(dict1_keyset - dict2_keyset, dict1_name, dict2_name)
    print_key_diff(dict2_keyset - dict1_keyset, dict2_name, dict1_name)
    print "Value differences:"
    has_value_differences = False
    for key in dict1_keyset & dict2_keyset:
        if dict1[key] != dict2[key]:
            print "  %s:" % (key,)
            print "    %s: %s" % (dict1_name, dict1[key],)
            print "    %s: %s" % (dict2_name, dict2[key],)
            print
            has_value_differences = True
    if not has_value_differences:
        print "  None"
        
def print_key_diff(key_diff, dict1_name, dict2_name):
    """
    Prints the keys in the first dictionary and are in the second dictionary.
    @param key_diff: Keys in dictionary 1 not in dictionary 2.
    @param dict1_name: Name used for the first dictionary.
    @param dict2_name: Name used for the second dictionary.
    """

    print "Keys in %s not in %s:" % (dict1_name, dict2_name)
    if len(key_diff):
        for key in key_diff:
            print "  %s" % (key,)
    else:
        print "  None"
    print
            
if __name__ == "__main__":
    main(sys.argv[1:])  # Start the process (without the application name)

Added scripts/extract_mysql_models.py version [f502020063].












































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
'''
Create the web2py code needed to access your mysql legacy db.

To make this work all the legacy tables you want to access need to have an "id" field.

This plugin needs:
mysql
mysqldump
installed and globally available.

Under Windows you will probably need to add the mysql executable directory to the PATH variable,
you will also need to modify mysql to mysql.exe and mysqldump to mysqldump.exe below.
Just guessing here :)

Access your tables with:
legacy_db(legacy_db.mytable.id>0).select()

If the script crashes this is might be due to that fact that the data_type_map dictionary below is incomplete.
Please complete it, improve it and continue.

Created by Falko Krause, minor modifications by Massimo Di Pierro and Ron McOuat
'''
import subprocess
import re
import sys
data_type_map = dict(
        varchar = 'string',
        int = 'integer',
        integer = 'integer',
        tinyint = 'integer',
        smallint = 'integer',
        mediumint = 'integer',
        bigint = 'integer',
        float = 'double',
        double = 'double',
        char = 'string',
        decimal = 'integer',
        date = 'date',
        #year = 'date',
        time = 'time',
        timestamp = 'datetime',
        datetime = 'datetime',
        binary = 'blob',
        blob = 'blob',
        tinyblob = 'blob',
        mediumblob = 'blob',
        longblob = 'blob',
        text = 'text',
        tinytext = 'text',
        mediumtext = 'text',
        longtext = 'text',
        )

def mysql(database_name, username, password):
    p = subprocess.Popen(['mysql',
                          '--user=%s' % username,
                          '--password=%s'% password,
                          '--execute=show tables;',
                          database_name],
                         stdin=subprocess.PIPE,
                         stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE)
    sql_showtables, stderr = p.communicate()
    tables = [re.sub('\|\s+([^\|*])\s+.*', '\1', x) for x in sql_showtables.split()[1:]]
    connection_string = "legacy_db = DAL('mysql://%s:%s@localhost/%s')"%(username, password, database_name)
    legacy_db_table_web2py_code = []
    for table_name in tables:
        #get the sql create statement
        p = subprocess.Popen(['mysqldump',
                              '--user=%s' % username,
                              '--password=%s' % password,
                              '--skip-add-drop-table',
                              '--no-data', database_name,
                              table_name], stdin=subprocess.PIPE, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
        sql_create_stmnt,stderr = p.communicate()
        if 'CREATE' in sql_create_stmnt:#check if the table exists
            #remove garbage lines from sql statement
            sql_lines = sql_create_stmnt.split('\n')
            sql_lines = [x for x in sql_lines if not(x.startswith('--') or x.startswith('/*') or x =='')]
            #generate the web2py code from the create statement
            web2py_table_code = ''
            table_name = re.search('CREATE TABLE .(\S+). \(', sql_lines[0]).group(1)
            fields = []
            for line in sql_lines[1:-1]:
                if re.search('KEY', line) or re.search('PRIMARY', line) or re.search(' ID', line) or line.startswith(')'):
                    continue
                hit = re.search('(\S+)\s+(\S+)(,| )( .*)?', line)
                if hit!=None:
                    name, d_type = hit.group(1), hit.group(2)
                    d_type = re.sub(r'(\w+)\(.*',r'\1',d_type)
                    name = re.sub('`','',name)
                    web2py_table_code += "\n    Field('%s','%s'),"%(name,data_type_map[d_type])
            web2py_table_code = "legacy_db.define_table('%s',%s\n    migrate=False)"%(table_name,web2py_table_code)
            legacy_db_table_web2py_code.append(web2py_table_code)
    #----------------------------------------
    #write the legacy db to file
    legacy_db_web2py_code = connection_string+"\n\n"
    legacy_db_web2py_code += "\n\n#--------\n".join(legacy_db_table_web2py_code)
    return legacy_db_web2py_code

regex = re.compile('(.*?):(.*?)@(.*)')
if len(sys.argv)<2 or not regex.match(sys.argv[1]):
    print 'USAGE:\n\n    extract_mysql_models.py username:password@data_basename\n\n'
else:
    m = regex.match(sys.argv[1])
    print mysql(m.group(3),m.group(1),m.group(2))

Added scripts/extract_pgsql_models.py version [a248a45b9e].





























































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Create web2py model (python code) to represent PostgreSQL tables.

Features:

* Uses ANSI Standard INFORMATION_SCHEMA (might work with other RDBMS)
* Detects legacy "keyed" tables (not having an "id" PK)
* Connects directly to running databases, no need to do a SQL dump
* Handles notnull, unique and referential constraints
* Detects most common datatypes and default values
* Support PostgreSQL columns comments (ie. for documentation)

Requeriments:

* Needs PostgreSQL pyscopg2 python connector (same as web2py)
* If used against other RDBMS, import and use proper connector (remove pg_ code)


Created by Mariano Reingart, based on a script to "generate schemas from dbs"
(mysql) by Alexandre Andrade

"""

_author__ = "Mariano Reingart <reingart@gmail.com>"

HELP = """
USAGE: extract_pgsql_models db host port user passwd

Call with PostgreSQL database connection parameters,
web2py model will be printed on standard output.

EXAMPLE: python extract_pgsql_models.py mydb localhost 5432 reingart saraza
"""

# Config options
DEBUG = False       # print debug messages to STDERR
SCHEMA = 'public'   # change if not using default PostgreSQL schema

# Constant for Field keyword parameter order (and filter):
KWARGS = ('type', 'length', 'default', 'required', 'ondelete',
          'notnull', 'unique', 'label', 'comment')


import sys


def query(conn, sql,*args):
    "Execute a SQL query and return rows as a list of dicts"
    cur = conn.cursor()
    ret = []
    try:
        if DEBUG: print >> sys.stderr, "QUERY: ", sql % args
        cur.execute(sql, args)
        for row in cur:
            dic = {}
            for i, value in enumerate(row):
                field = cur.description[i][0]
                dic[field] = value
            if DEBUG: print >> sys.stderr, "RET: ", dic
            ret.append(dic)
        return ret
    finally:
        cur.close()


def get_tables(conn, schema=SCHEMA):
    "List table names in a given schema"
    rows = query(conn, """SELECT table_name FROM information_schema.tables
        WHERE table_schema = %s
        ORDER BY table_name""", schema)
    return [row['table_name'] for row in rows]


def get_fields(conn, table):
    "Retrieve field list for a given table"
    if DEBUG: print >> sys.stderr, "Processing TABLE", table
    rows = query(conn, """
        SELECT column_name, data_type,
            is_nullable,
            character_maximum_length,
            numeric_precision, numeric_precision_radix, numeric_scale,
            column_default
        FROM information_schema.columns
        WHERE table_name=%s
        ORDER BY ordinal_position""", table)
    return rows


def define_field(conn, table, field, pks):
    "Determine field type, default value, references, etc."
    f={}
    ref = references(conn, table, field['column_name'])
    if ref:
        f.update(ref)
    elif field['column_default'] and \
         field['column_default'].startswith("nextval") and \
         field['column_name'] in pks:
        # postgresql sequence (SERIAL) and primary key!
        f['type'] = "'id'"
    elif field['data_type'].startswith('character'):
        f['type'] = "'string'"
        if field['character_maximum_length']:
            f['length'] = field['character_maximum_length']
    elif field['data_type'] in ('text', ):
        f['type'] = "'text'"
    elif field['data_type'] in ('boolean', 'bit'):
        f['type'] = "'boolean'"
    elif field['data_type'] in ('integer', 'smallint', 'bigint'):
        f['type'] = "'integer'"
    elif field['data_type'] in ('double precision', 'real' ):
        f['type'] = "'double'"
    elif field['data_type'] in ('timestamp', 'timestamp without time zone'):
        f['type'] = "'datetime'"
    elif field['data_type'] in ('date', ):
        f['type'] = "'date'"
    elif field['data_type'] in ('time', 'time without time zone'):
        f['type'] = "'time'"
    elif field['data_type'] in ('numeric', 'currency'):
        f['type'] = "'decimal'"
        f['precision'] = field['numeric_precision']
        f['scale'] = field['numeric_scale'] or 0
    elif field['data_type'] in ('bytea', ):
        f['type'] = "'blob'"
    elif field['data_type'] in ('point', 'lseg', 'polygon', 'unknown', 'USER-DEFINED'):
        f['type'] = "" # unsupported?
    else:
        raise RuntimeError("Data Type not supported: %s " % str(field))

    try:
        if field['column_default']:
            if field['column_default']=="now()":
                d = "request.now"
            elif field['column_default']=="true":
                d = "True"
            elif field['column_default']=="false":
                d = "False"
            else:
                d = repr(eval(field['column_default']))
            f['default'] = str(d)
    except (ValueError, SyntaxError):
        pass
    except Exception, e:
        raise RuntimeError("Default unsupported '%s'" % field['column_default'])

    if not field['is_nullable']:
        f['notnull'] = "True"

    comment = get_comment(conn, table, field)
    if comment is not None:
        f['comment'] = repr(comment)
    return f


def is_unique(conn, table, field):
    "Find unique columns (incomplete support)"
    rows = query(conn, """
        SELECT information_schema.constraint_column_usage.column_name
        FROM information_schema.table_constraints
        NATURAL JOIN information_schema.constraint_column_usage
        WHERE information_schema.table_constraints.table_name=%s
          AND information_schema.constraint_column_usage.column_name=%s
          AND information_schema.table_constraints.constraint_type='UNIQUE'
        ;""", table, field['column_name'])
    return rows and True or False


def get_comment(conn, table, field):
    "Find the column comment (postgres specific)"
    rows = query(conn, """
        SELECT d.description AS comment
        FROM pg_class c
        JOIN pg_description d ON c.oid=d.objoid
        JOIN pg_attribute a ON c.oid = a.attrelid
        WHERE c.relname=%s AND a.attname=%s
        AND a.attnum = d.objsubid
        ;""", table, field['column_name'])
    return rows and rows[0]['comment'] or None


def primarykeys(conn, table):
    "Find primary keys"
    rows = query(conn, """
        SELECT information_schema.constraint_column_usage.column_name
        FROM information_schema.table_constraints
        NATURAL JOIN information_schema.constraint_column_usage
        WHERE information_schema.table_constraints.table_name=%s
          AND information_schema.table_constraints.constraint_type='PRIMARY KEY'
        ;""", table)
    return [row['column_name'] for row in rows]


def references(conn, table, field):
    "Find a FK (fails if multiple)"
    rows1 = query(conn, """
        SELECT table_name, column_name, constraint_name,
               update_rule, delete_rule, ordinal_position
        FROM information_schema.key_column_usage
        NATURAL JOIN information_schema.referential_constraints
        NATURAL JOIN information_schema.table_constraints
        WHERE information_schema.key_column_usage.table_name=%s
          AND information_schema.key_column_usage.column_name=%s
          AND information_schema.table_constraints.constraint_type='FOREIGN KEY'
          ;""", table, field)
    if len(rows1)==1:
        rows2 = query(conn, """
            SELECT table_name, column_name, *
            FROM information_schema.constraint_column_usage
            WHERE constraint_name=%s
            """, rows1[0]['constraint_name'])
        row = None
        if len(rows2)>1:
            row = rows2[int(rows1[0]['ordinal_position'])-1]
            keyed = True
        if len(rows2)==1:
            row = rows2[0]
            keyed = False
        if row:
            if keyed: # THIS IS BAD, DON'T MIX "id" and primarykey!!!
                ref = {'type': "'reference %s.%s'" % (row['table_name'],
                                                      row['column_name'])}
            else:
                ref = {'type': "'reference %s'" % (row['table_name'],)}
            if rows1[0]['delete_rule']!="NO ACTION":
                ref['ondelete'] = repr(rows1[0]['delete_rule'])
            return ref
        elif rows2:
            raise RuntimeError("Unsupported foreign key reference: %s" %
                                str(rows2))

    elif rows1:
        raise RuntimeError("Unsupported referential constraint: %s" %
                             str(rows1))


def define_table(conn, table):
    "Output single table definition"
    fields =  get_fields(conn, table)
    pks = primarykeys(conn, table)
    print "db.define_table('%s'," % (table, )
    for field in fields:
        fname = field['column_name']
        fdef = define_field(conn, table, field, pks)
        if fname not in pks and is_unique(conn, table, field):
            fdef['unique'] = "True"
        if fdef['type']=="'id'" and fname in pks:
            pks.pop(pks.index(fname))
        print "    Field('%s', %s)," % (fname,
                    ', '.join(["%s=%s" % (k, fdef[k]) for k in KWARGS
                                            if k in fdef and fdef[k]]))
    if pks:
        print "    primarykey=[%s]," % ", ".join(["'%s'" % pk for pk in pks])
    print     "    migrate=migrate)"
    print


def define_db(conn, db, host, port, user, passwd):
    "Output database definition (model)"
    dal = 'db = DAL("postgres://%s:%s@%s:%s/%s", pool_size=10)'
    print dal % (user, passwd, host, port, db)
    print
    print "migrate = False"
    print
    for table in get_tables(conn):
        define_table(conn, table)


if __name__ == "__main__":
    if len(sys.argv) < 6:
        print HELP
    else:
        # Parse arguments from command line:
        db, host, port, user, passwd = sys.argv[1:6]

        # Make the database connection (change driver if required)
        import psycopg2
        cnn = psycopg2.connect(database=db, host=host, port=port,
                               user=user, password=passwd,
                               )
        # Start model code generation:
        define_db(cnn, db, host, port, user, passwd)


Added scripts/fixws.py version [5a7fce32f0].

























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import sys, glob

def read_fileb(filename, mode='rb'):
    f = open(filename, mode)
    try:
        return f.read()
    finally:
        f.close()

def write_fileb(filename, value, mode='wb'):
    f = open(filename, mode)
    try:
        f.write(value)
    finally:
        f.close()

for filename in glob.glob(sys.argv[1]):
    data1 = read_fileb(filename)
    write_fileb(filename + '.bak2', data1)
    data2lines = read_fileb(filename).split('\n')
    data2 = '\n'.join([line.rstrip() for line in data2lines])+'\n'
    write_fileb(filename, data2)
    print filename, len(data1)-len(data2)

Added scripts/layout_make.py version [b66593a7d1].




































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import glob
import os
import zipfile
import sys
import re
from BeautifulSoup import BeautifulSoup as BS

def head(styles):
    title = '<title>{{=response.title or request.application}}</title>'
    items = '\n'.join(["{{response.files.append(URL(request.application,'static','%s'))}}" % (style) for style in styles])
    loc="""<style>
div.flash {
    position: absolute;
    float: right;
    padding: 10px;
    top: 0px;
    right: 0px;
    opacity: 0.75;
    margin: 10px 10px 10px 10px;
    text-align: center;
    clear: both;
    color: #fff;
    font-size: 11pt;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background: black;
    border: 2px solid #fff;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    z-index: 2;
}
div.error {
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background-color: red;
    color: white;
    padding: 3px;
    border: 1px solid #666;
}
</style>"""
    return "\n%s\n%s\n{{include 'web2py_ajax.html'}}\n%s" % (title,items,loc)

def content():
    return """<div class="flash">{{=response.flash or ''}}</div>{{include}}"""

def process(folder):
    indexfile = open(os.path.join(folder,'index.html'),'rb')
    try:
        soup = BS(indexfile.read())
    finally:
        indexfile.close()
    styles = [x['href'] for x in soup.findAll('link')]
    soup.find('head').contents=BS(head(styles))
    try:
        soup.find('h1').contents=BS('{{=response.title or request.application}}')
        soup.find('h2').contents=BS("{{=response.subtitle or '=response.subtitle'}}")
    except:
        pass
    for match in (soup.find('div',id='menu'),
              soup.find('div',{'class':'menu'}),
              soup.find('div',id='nav'),
              soup.find('div',{'class':'nav'})):
        if match:
            match.contents=BS('{{=MENU(response.menu)}}')
            break
    done=False
    for match in (soup.find('div',id='content'),
              soup.find('div',{'class':'content'}),
              soup.find('div',id='main'),
              soup.find('div',{'class':'main'})):
        if match:
            match.contents=BS(content())
            done=True
            break
    if done:
        page = soup.prettify()
        page = re.compile("\s*\{\{=response\.flash or ''\}\}\s*",re.MULTILINE)\
            .sub("{{=response.flash or ''}}",page)
        print page
    else:
        raise Exception, "Unable to convert"

if __name__=='__main__':
    if len(sys.argv)<2:
        print """USAGE:
1) start a new web2py application
2) Download a sample free layout from the web into the static/ folder of
   your web2py application (make sure a sample index.html is there)
3) run this script with

   python layout_make.py /path/to/web2py/applications/app/static/
     > /path/to/web2py/applications/app/views/layout.html
"""
    elif not os.path.exists(sys.argv[1]):
        print 'Folder %s does not exist' % sys.argv[1]
    else:
        process(sys.argv[1])

Added scripts/setup-shared-hosting-2.4.sh version [df079f62a1].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
# install virtualenv
easy_install virtualenv
python virtualenv.py w2env
# install missing modules
w2env/bin/easy_install -U pysqlite hashlib
# donwload web2py and unpack
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
cd web2py
# start web2py using command-line script
w2env/bin/python web2py.py -i 0.0.0.0 -p 8123 -a 'adminpasswd'

Added scripts/setup-virtualenv-web2py.sh version [bb12e4de53].






































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#
# Author:			Christopher Steel
# Organization:	Voice of Access
# Date:				2010-11-24
# License:			Same as Web2py, MIT / GNU
# Email:			Christopher DOT Steel AT Voice of Access DOT org
#
# This script will :
#	download and install virtualenv
#	start a virtual environment
#	move into the virtual environment
#	download and install latest stable version of web2py
#	start web2py in the virtual environment
#
# To disactivate the virtual environment, shut down web2py
# and type 'disactivate' at the command line.
#
# Testing:
#	OS X
#	should work on POSIX systems
#
# Usage:
#	create a directory to hold your virtual environments, for example
#		/home/user_name/virtual_environments
#	place this script in the directory and make it executable
#		chmod +x web2py-install-virtualenv.sh
	customize the variables below to meet your needs
#	execute from terminal
#		./web2py-install-virtualenv.sh
#	relax...

################ VARIABLES
# Change to reflect version changes etc.
#
# name for your virtual environment
ENV=VIRTUAL_ENV
# version to install
APP_NAME=virtualenv
VER=1.5.1
DIR=${APP_NAME}-${VER}
EXT=tar.gz
ARCHIVE=${APP_NAME}-${VER}.${EXT}
# md5 sum, see end of url from pypi
MD5_SUM=3daa1f449d5d2ee03099484cecb1c2b7
################
#
echo 'downloading' ${ARCHIVE}
echo '================================'
echo `wget http://pypi.python.org/packages/source/v/virtualenv/${ARCHIVE}`
md5 ${ARCHIVE}
echo 'MD5 ('${ARCHIVE}') =' ${MD5_SUM}
echo 'unarchive' ${ARCHIVE}
echo '================================='
tar xvfz ${ARCHIVE}

echo ' comparing md5 sums'
echo '================================='
md5 ${ARCHIVE}
echo 'MD5 ('${ARCHIVE}') =' ${MD5_SUM}

#echo 'installing compatibility modules'
#echo '================================'
#virtualenv/bin/easy_install -U pysqlite hashlib

#echo 'Installing distribute'
#echo '====================='
#echo 'Creating Environment'
#echo '====================='
#echo `python ./${DIRAPP_NAME}-${VER}/virtualenv.py --distribute ${ENV}`

echo 'Start virtual environment'
echo '========================='
virtualenv --no-site-packages ${ENV}

RUN_THIS='source ${ENV}/bin/activate'
`echo source ${ENV}/bin/activate`

echo 'Moving into virtual environment directory'
echo '========================================='
cd ${ENV}

echo 'downloading web2py'
echo '=================='
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
cd web2py

echo 'to deactivate your virtual environment'
echo 'shutdown web2py and then type "deactivate"'
echo '=========================================='
read -p "Press any key to start web2py…"


echo 'starting web2py'
echo '==============='
../bin/python2.5  web2py.py





Added scripts/setup-web2py-fedora.sh version [551a72a7ff].


























































































































































































































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
echo "This script will:
1) Install modules needed to run web2py on Fedora and CentOS/RHEL
2) Install Python 2.6 to /opt and recompile wsgi if not provided
2) Install web2py in /opt/web-apps/
3) Configure SELinux and iptables
5) Create a self signed ssl certificate
6) Setup web2py with mod_wsgi
7) Create virtualhost entries so that web2py responds for '/'
8) Restart Apache.

You should probably read this script before running it.

Although SELinux permissions changes have been made,
further SELinux changes will be required for your personal
apps. (There may also be additional changes required for the
bundled apps.)  As a last resort, SELinux can be disabled.

A simple iptables configuration has been applied.  You may
want to review it to verify that it meets your needs.

Finally, if you require a proxy to access the Internet, please
set up your machine to do so before running this script.

(author: berubejd)

Press ENTER to continue...[ctrl+C to abort]"

read CONFIRM

#!/bin/bash

###
###  Phase 0 - This may get messy.  Lets work from a temporary directory
###

current_dir=`pwd`

if [ -d /tmp/setup-web2py/ ]; then
    mv /tmp/setup-web2py/ /tmp/setup-web2py.old/
fi

mkdir -p /tmp/setup-web2py
cd /tmp/setup-web2py

###
###  Phase 1 - Requirements installation
###

echo
echo " - Installing packages"
echo

# Verify packages are up to date
yum update

# Install required packages
yum install httpd mod_ssl mod_wsgi wget python

# Verify we have at least Python 2.5
typeset -i version_major
typeset -i version_minor

version=`rpm --qf %{Version} -q python`
version_major=`echo ${version} | awk '{split($0, parts, "."); print parts[1]}'`
version_minor=`echo ${version} | awk '{split($0, parts, "."); print parts[2]}'`

if [ ! ${version_major} -ge 2 -o ! ${version_minor} -ge 5 ]; then
    # Setup 2.6 in /opt - based upon
    # http://markkoberlein.com/getting-python-26-with-django-11-together-on

    # Check for earlier Python 2.6 install
    if [ -e /opt/python2.6 ]; then
        # Is Python already installed?
        RETV=`/opt/python2.6/bin/python -V > /dev/null 2>&1; echo $?`
        if [ ${RETV} -eq 0 ]; then
            python_installed='True'
        else
            mv /opt/python2.6 /opt/python2.6-old
        fi
    fi

    # Install Python 2.6 if it doesn't exist already
    if [ ! "${python_installed}" == "True" ]; then
        # Install requirements for the Python build
        yum install sqlite-devel zlib-devel

        mkdir -p /opt/python2.6

        # Download and install
        wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz
        tar -xzf Python-2.6.4.tgz
        cd Python-2.6.4
        ./configure --prefix=/opt/python2.6 --with-threads --enable-shared --with-zlib=/usr/include
        make && make install

        cd /tmp/setup-web2py
    fi

    # Create links for Python 2.6
    # even if it was previously installed just to be sure
    ln -s /opt/python2.6/lib/libpython2.6.so /usr/lib
    ln -s /opt/python2.6/lib/libpython2.6.so.1.0 /usr/lib
    ln -s /opt/python2.6/bin/python /usr/local/bin/python
    ln -s /opt/python2.6/bin/python /usr/bin/python2.6
    ln -s /opt/python2.6/lib/python2.6.so /opt/python2.6/lib/python2.6/config/

    # Update linker for new libraries
    /sbin/ldconfig

    # Rebuild wsgi to take advantage of Python 2.6
    yum install httpd-devel

    cd /tmp/setup-web2py

    wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
    tar -xzf mod_wsgi-3.3.tar.gz
    cd mod_wsgi-3.3
    ./configure --with-python=/usr/local/bin/python
    make &&  make install

    echo "LoadModule wsgi_module modules/mod_wsgi.so" > /etc/httpd/conf.d/wsgi.conf

    cd /tmp/setup-web2py
fi

### MySQL install untested!
# Install mysql packages (optional)
#yum install mysql mysql-server

# Enable mysql to start at boot (optional)
#chkconfig --levels 235 mysqld on
#service mysqld start

# Configure mysql security settings (not really optional if mysql installed)
#/usr/bin/mysql_secure_installation

###
### Phase 2 - Install web2py
###

echo
echo " - Downloading, installing, and starting web2py"
echo

# Create web-apps directory, if required
if [ ! -d "/opt/web-apps" ]; then
    mkdir -p /opt/web-apps

    chmod 755 /opt
    chmod 755 /opt/web-apps
fi

cd /opt/web-apps

# Download web2py
if [ -e web2py_src.zip* ]; then
    rm web2py_src.zip*
fi

wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
chown -R apache:apache web2py

###
### Phase 3 - Setup SELinux context
###

# Set context for Python libraries if Python 2.6 installed
if [ -d /opt/python2.6 ]; then
    cd /opt/python2.6
    chcon -R -t lib_t lib/
fi

# Allow http_tmp_exec required for wsgi
RETV=`setsebool -P httpd_tmp_exec on > /dev/null 2>&1; echo $?`
if [ ! ${RETV} -eq 0 ]; then
    # CentOS doesn't support httpd_tmp_exec
    cd /tmp/setup-web2py

    # Create the SELinux policy
cat > httpd.te <<EOF
 EOF

module httpd 1.0;

require {
    type httpd_t;
    class process execmem;
}

#============= httpd_t ==============
allow httpd_t self:process execmem;
EOF

    checkmodule -M -m -o httpd.mod httpd.te
    semodule_package -o httpd.pp -m httpd.mod
    semodule -i httpd.pp

fi

# Setup the overall web2py SELinux context
cd /opt
chcon -R -t httpd_user_content_t web-apps/

cd /opt/web-apps/web2py/applications

# Setup the proper context on the writable application directories
for app in `ls`
do
    for dir in databases cache errors sessions private uploads
    do
        mkdir ${app}/${dir}
        chown apache:apache ${app}/${dir}
        chcon -R -t tmp_t ${app}/${dir}
    done
done


###
### Phase 4 - Configure iptables
###

cd /tmp/setup-web2py

# Create rules file - based upon
# http://articles.slicehost.com/assets/2007/9/4/iptables.txt
cat > iptables.rules <<EOF
 EOF
*filter

#  Allows all loopback (lo0) traffic
#  drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT

#  Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

#  Allows all outbound traffic
-A OUTPUT -j ACCEPT

# Allows SSH, HTTP, and HTTPS
# Consider changing the SSH port and/or using rate limiting
# see http://blog.andrew.net.au/2005/02/16#ipt_recent_and_ssh_attacks
-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT

# Allow ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT

# log iptables denied calls
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

# Reject all other inbound - default deny unless explicitly allowed policy
-A INPUT -j REJECT
-A FORWARD -j REJECT

COMMIT
EOF

/sbin/iptables -F
cat iptables.rules | /sbin/iptables-restore
/sbin/service iptables save

###
### Phase 5 - Setup SSL
###

echo
echo " - Creating a self signed certificate"
echo

# Verify ssl directory exists
if [ ! -d "/etc/httpd/ssl" ]; then
    mkdir -p /etc/httpd/ssl
fi

# Generate and protect certificate
openssl genrsa 1024 > /etc/httpd/ssl/self_signed.key
openssl req -new -x509 -nodes -sha1 -days 365 -key /etc/httpd/ssl/self_signed.key > /etc/httpd/ssl/self_signed.cert
openssl x509 -noout -fingerprint -text < /etc/httpd/ssl/self_signed.cert > /etc/httpd/ssl/self_signed.info

chmod 400 /etc/httpd/ssl/self_signed.*

###
### Phase 6 - Configure Apache
###

echo
echo " - Configure Apache to use mod_wsgi"
echo

# Create config
if [ -e /etc/httpd/conf.d/welcome.conf ]; then
    mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.disabled
fi

cat  > /etc/httpd/conf.d/default.conf <<EOF
 EOF

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
  WSGIDaemonProcess web2py user=apache group=apache
  WSGIProcessGroup web2py
  WSGIScriptAlias / /opt/web-apps/web2py/wsgihandler.py

  <Directory /opt/web-apps/web2py>
    AllowOverride None
    Order Allow,Deny
    Deny from all
    <Files wsgihandler.py>
      Allow from all
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(.*) /opt/web-apps/web2py/applications/\$1/static/\$2

  <Directory /opt/web-apps/web2py/applications/*/static>
    Options -Indexes
    Order Allow,Deny
    Allow from all
  </Directory>

  <Location /admin>
    Deny from all
  </Location>

  <LocationMatch ^/([^/]+)/appadmin>
    Deny from all
  </LocationMatch>

  CustomLog /var/log/httpd/access_log common
  ErrorLog /var/log/httpd/error_log
</VirtualHost>

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/httpd/ssl/self_signed.cert
  SSLCertificateKeyFile /etc/httpd/ssl/self_signed.key

  WSGIProcessGroup web2py

  WSGIScriptAlias / /opt/web-apps/web2py/wsgihandler.py

  <Directory /opt/web-apps/web2py>
    AllowOverride None
    Order Allow,Deny
    Deny from all
    <Files wsgihandler.py>
      Allow from all
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(.*) /opt/web-apps/web2py/applications/\$1/static/\$2

  <Directory /opt/web-apps/web2py/applications/*/static>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Order Allow,Deny
    Allow from all
  </Directory>

  CustomLog /var/log/httpd/access_log common
  ErrorLog /var/log/httpd/error_log
</VirtualHost>

EOF

# Fix wsgi socket locations
echo "WSGISocketPrefix run/wsgi" >> /etc/httpd/conf.d/wsgi.conf

# Restart Apache to pick up changes
service httpd restart

###
### Phase 7 - Setup web2py admin password
###

echo
echo " - Setup web2py admin password"
echo

cd /opt/web-apps/web2py
sudo -u apache python -c "from gluon.main import save_password; save_password(raw_input('admin password: '),443)"

###
### Phase 8 - Verify that required services start at boot
###

/sbin/chkconfig iptables on
/sbin/chkconfig httpd on

###
### Phase 999 - Done!
###

# Change back to original directory
cd ${current_directory}

echo " - Complete!"
echo

EOF
EOF
EOF

Added scripts/setup-web2py-nginx-uwsgi-ubuntu.sh version [63e64dcf2e].


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/bash

echo 'setup-web2py-nginx-uwsgi-ubuntu.sh'
echo 'Requires Ubuntu 10.04 (LTS) and installs Nginx + uWSGI + Web2py'

# Get Web2py Admin Password
echo -e "Web2py Admin Password: \c "
read  PW

# Upgrade and install needed software
apt-get update
apt-get -y upgrade
apt-get install python-software-properties
add-apt-repository ppa:nginx/stable
add-apt-repository  ppa:uwsgi/release
apt-get update
apt-get -y install nginx-full
apt-get -y install uwsgi-python

# Create configuration file /etc/nginx/sites-available/web2py
echo 'server {
        listen          80;
        server_name     $hostname;
        location ~* /(\w+)/static/ {
           root /home/www-data/web2py/applications/;
        }
         location / {
                uwsgi_pass      127.0.0.1:9001;
                include         uwsgi_params;
                uwsgi_param     UWSGI_SCHEME $scheme;
                uwsgi_param     SERVER_SOFTWARE    nginx/$nginx_version;
        }
}

server {
        listen          443;
        server_name     $hostname;
        ssl                     on;
        ssl_certificate         /etc/nginx/ssl/web2py.crt;
        ssl_certificate_key     /etc/nginx/ssl/web2py.key;
        location / {
                uwsgi_pass      127.0.0.1:9001;
                include         uwsgi_params;
                uwsgi_param     UWSGI_SCHEME $scheme;
                uwsgi_param     SERVER_SOFTWARE    nginx/$nginx_version;
        }

}' >/etc/nginx/sites-available/web2py

ln -s /etc/nginx/sites-available/web2py /etc/nginx/sites-enabled/web2py
rm /etc/nginx/sites-enabled/default
rm /etc/nginx/sites-available/default
mkdir /etc/nginx/ssl
cd /etc/nginx/ssl
openssl genrsa -out web2py.key 1024
openssl req -batch -new -key web2py.key -out web2py.csr
openssl x509 -req -days 1780 -in web2py.csr -signkey web2py.key -out web2py.crt

# Create configuration file /etc/uwsgi-python/apps-available/web2py.xml
echo '<uwsgi>
    <socket>127.0.0.1:9001</socket>
    <pythonpath>/home/www-data/web2py/</pythonpath>
    <app mountpoint="/">
        <script>wsgihandler</script>
    </app>
</uwsgi>' >/etc/uwsgi-python/apps-available/web2py.xml
ln -s /etc/uwsgi-python/apps-available/web2py.xml /etc/uwsgi-python/apps-enabled/web2py.xml

# Install Web2py
apt-get -y install unzip
cd /home
mkdir www-data
cd www-data
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
rm web2py_src.zip
chown -R www-data:www-data web2py
cd /home/www-data/web2py
sudo -u www-data python -c "from gluon.main import save_password; save_password('$PW',443)"
/etc/init.d/uwsgi-python restart
/etc/init.d/nginx restart

Added scripts/setup-web2py-ubuntu.sh version [739de38ac8].










































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
echo "This script will:
1) install all modules need to run web2py on Ubuntu/Debian
2) install web2py in /home/www-data/
3) create a self signed sll certificate
4) setup web2py with mod_wsgi
5) overwrite /etc/apache2/sites-available/default
6) restart apache.

You may want to read this cript before running it.

Press a key to continue...[ctrl+C to abort]"

read CONFIRM

#!/bin/bash
# optional
# dpkg-reconfigure console-setup
# dpkg-reconfigure timezoneconf
# nano /etc/hostname
# nano /etc/network/interfaces
# nano /etc/resolv.conf
# reboot now
# ifconfig eth0

echo "installing useful packages"
echo "=========================="
apt-get update
apt-get -y install ssh
apt-get -y install zip unzip
apt-get -y install tar
apt-get -y install openssh-server
apt-get -y install build-essential
apt-get -y install python2.5
apt-get -y install ipython
apt-get -y install python-dev
apt-get -y install postgresql
apt-get -y install apache2
apt-get -y install libapache2-mod-wsgi
apt-get -y install python2.5-psycopg2
apt-get -y install postfix
apt-get -y install wget
apt-get -y install python-matplotlib
apt-get -y install python-reportlab
apt-get -y install mercurial
/etc/init.d/postgresql restart

# optional, uncomment for emacs
# apt-get -y install emacs

# optional, uncomment for backups using samba
# apt-get -y install samba
# apt-get -y install smbfs

echo "downloading, installing and starting web2py"
echo "==========================================="
cd /home
mkdir www-data
cd www-data
rm web2py_src.zip*
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
chown -R www-data:www-data web2py

echo "setting up apache modules"
echo "========================="
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod headers
a2enmod expires
mkdir /etc/apache2/ssl

echo "creating a self signed certificate"
echo "=================================="
openssl genrsa 1024 > /etc/apache2/ssl/self_signed.key
chmod 400 /etc/apache2/ssl/self_signed.key
openssl req -new -x509 -nodes -sha1 -days 365 -key /etc/apache2/ssl/self_signed.key > /etc/apache2/ssl/self_signed.cert
openssl x509 -noout -fingerprint -text < /etc/apache2/ssl/self_signed.cert > /etc/apache2/ssl/self_signed.info

echo "rewriting your apache config file to use mod_wsgi"
echo "================================================="
echo '
NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
  WSGIDaemonProcess web2py user=www-data group=www-data
  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py

  <Directory /home/www-data/web2py>
    AllowOverride None
    Order Allow,Deny
    Deny from all
    <Files wsgihandler.py>
      Allow from all
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(.*) \
           /home/www-data/web2py/applications/$1/static/$2
  <Directory /home/www-data/web2py/applications/*/static/>
    Options -Indexes
    Order Allow,Deny
    Allow from all
  </Directory>

  <Location /admin>
  Deny from all
  </Location>

  <LocationMatch ^/([^/]+)/appadmin>
  Deny from all
  </LocationMatch>

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log
</VirtualHost>

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/self_signed.cert
  SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key

  WSGIProcessGroup web2py

  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py

  <Directory /home/www-data/web2py>
    AllowOverride None
    Order Allow,Deny
    Deny from all
    <Files wsgihandler.py>
      Allow from all
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(.*) \
        /home/www-data/web2py/applications/$1/static/$2

  <Directory /home/www-data/web2py/applications/*/static/>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Order Allow,Deny
    Allow from all
  </Directory>

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log
</VirtualHost>
' > /etc/apache2/sites-available/default

# echo "setting up PAM"
# echo "================"
# sudo apt-get install pwauth
# sudo ln -s /etc/apache2/mods-available/authnz_external.load /etc/apache2/mods-enabled
# ln -s /etc/pam.d/apache2 /etc/pam.d/httpd
# usermod -a -G shadow www-data

echo "restarting apage"
echo "================"

/etc/init.d/apache2 restart
cd /home/www-data/web2py
sudo -u www-data python -c "from gluon.widget import console; console();"
sudo -u www-data python -c "from gluon.main import save_password; save_password(raw_input('admin password: '),443)"
echo "done!"

Added scripts/sync_languages.py version [13cd0ed642].
















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# TODO: Comment this code

import sys
import shutil
import os

from gluon.languages import findT

sys.path.insert(0, '.')

file = sys.argv[1]
apps = sys.argv[2:]

d = {}
for app in apps:
    path = 'applications/%s/' % app
    findT(path, file)
    langfile = open(os.path.join(path, 'languages', '%s.py' % file))
    try:
        data = eval(langfile.read())
    finally:
        langfile.close()
    d.update(data)

path = 'applications/%s/' % apps[-1]
file1 = os.path.join(path, 'languages', '%s.py' % file)

f = open(file1, 'w')
try:
    f.write('{\n')
    keys = d.keys()
    keys.sort()
    for key in keys:
        f.write('%s:%s,\n' % (repr(key), repr(str(d[key]))))
    f.write('}\n')
finally:
    f.close()

oapps = reversed(apps[:-1])
for app in oapps:
    path2 = 'applications/%s/' % app
    file2 = os.path.join(path2, 'languages', '%s.py' % file)
    shutil.copyfile(file1, file2)

Added scripts/tickets2db.py version [355ab45967].





























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os
import time
import stat
import datetime

from gluon.utils import md5_hash
from gluon.restricted import RestrictedError

SLEEP_MINUTES = 5
DB_URI = 'sqlite://tickets.db'
ALLOW_DUPLICATES = True

path = os.path.join(request.folder, 'errors')

db = SQLDB(DB_URI)
db.define_table('ticket', SQLField('app'), SQLField('name'),
                SQLField('date_saved', 'datetime'), SQLField('layer'),
                SQLField('traceback', 'text'), SQLField('code', 'text'))

hashes = {}

while 1:
    for file in os.listdir(path):
        filename = os.path.join(path, file)

        if not ALLOW_DUPLICATES:
            fileobj = open(filename, 'r')
            try:
                file_data = fileobj.read()
            finally:
                fileobj.close()
            key = md5_hash(file_data)

            if key in hashes:
                continue

            hashes[key] = 1

        error = RestrictedError()
        error.load(request, request.application, filename)

        modified_time = os.stat(filename)[stat.ST_MTIME]
        modified_time = datetime.datetime.fromtimestamp(modified_time)

        db.ticket.insert(app=request.application,
                         date_saved=modified_time,
                         name=file,
                         layer=error.layer,
                         traceback=error.traceback,
                         code=error.code)

        os.unlink(filename)

    db.commit()
    time.sleep(SLEEP_MINUTES * 60)

Added scripts/tickets2email.py version [edc5ca2488].




















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os
import time
import stat
import datetime

from gluon.utils import md5_hash
from gluon.restricted import RestrictedError
from gluon.tools import Mail


path = os.path.join(request.folder, 'errors')
hashes = {}
mail = Mail()

### CONFIGURE HERE
SLEEP_MINUTES = 5
ALLOW_DUPLICATES = True
mail.settings.server = 'localhost:25'
mail.settings.sender = 'you@localhost'
administrator_email = 'you@localhost'
### END CONFIGURATION

while 1:
    for file in os.listdir(path):
        filename = os.path.join(path, file)

        if not ALLOW_DUPLICATES:
            fileobj = open(filename, 'r')
            try:
                file_data = fileobj.read()
            finally:
                fileobj.close()
            key = md5_hash(file_data)

            if key in hashes:
                continue

            hashes[key] = 1

        error = RestrictedError()
        error.load(request, request.application, filename)

        mail.send(to=administrator_email, subject='new web2py ticket', message=error.traceback)

        os.unlink(filename)
    time.sleep(SLEEP_MINUTES * 60)

Added scripts/update-web2py.sh version [908ab1f586].




























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/bash
#
#  update-web2py.sh
#  2009-12-16
#
#  install in web2py/.. or web2py/ or web2py/scripts as update-web2py.sh
#  make executable: chmod +x web2py.sh
#
#  save a snapshot of current web2py/ as web2py/../web2py-version.zip
#  download the current stable version of web2py
#  unzip downloaded version over web2py/
#
TARGET=web2py

if [ ! -d $TARGET ]; then
	# in case we're in web2py/
	if [ -f ../$TARGET/VERSION ]; then
		cd ..
	# in case we're in web2py/scripts
	elif [ -f ../../$TARGET/VERSION ]; then
		cd ../..
	fi
fi
read a VERSION c < $TARGET/VERSION
SAVE=$TARGET-$VERSION
URL=http://www.web2py.com/examples/static/web2py_src.zip

ZIP=`basename $URL`
SAVED=""

#  Save a zip archive of the current version,
#  but don't overwrite a previous save of the same version.
#
if [ -f $SAVE.zip ]; then
	echo "Remove or rename $SAVE.zip first" >&2
	exit 1
fi
if [ -d $TARGET ]; then
	echo -n ">>Save old version: " >&2
	cat $TARGET/VERSION >&2
	zip -q -r $SAVE.zip $TARGET
	SAVED=$SAVE.zip
fi
#
#  Download the new version.
#
echo ">>Download latest web2py release:" >&2
curl -O $URL
#
#  Unzip into web2py/
#
unzip -q -o $ZIP
rm $ZIP
echo -n ">>New version: " >&2
cat $TARGET/VERSION >&2
if [ "$SAVED" != "" ]; then
	echo ">>Old version saved as $SAVED"
fi

Added scripts/web2py-lock.sh version [6258f828fb].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
chown -R nobody:nobody *.py
chown -R nobody:nobody gluon
chown -R nobody:nobody scripts
chown -R nobody:nobody applications/*/modules/
chown -R nobody:nobody applications/*/models/
chown -R nobody:nobody applications/*/controllers/
chown -R nobody:nobody applications/*/views/
chown -R nobody:nobody applications/*/static/
chown -R nobody:nobody applications/*/cron/

echo "unlock with chown -R www-data:www-data ./"

Added scripts/web2py.archlinux.sh version [e934181075].













































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/bash
# the script should be run
# from WEB2PY root directory

prog=`basename $0`

cd `pwd`
chmod +x $prog

function web2py_start {
  nohup ./$prog -a "<recycle>" 2>/dev/null &
  pid=`pgrep $prog | tail -1`
  if [ $pid -ne $$ ]
  then
    echo "WEB2PY has been started."
  fi
}
function web2py_stop {
  kill -15 `pgrep $prog | grep -v $$` 2>/dev/null
  pid=`pgrep $prog | head -1`
  if [ $pid -ne $$ ]
  then
    echo "WEB2PY has been stopped."
  fi
}

case "$1" in
  start)
    web2py_start
  ;;
  stop)
    web2py_stop
  ;;
  restart)
    web2py_stop
    web2py_start
  ;;
  *)
    echo "Usage: $prog [start|stop|restart]"
  ;;
esac

exit 0

Added scripts/web2py.fedora.sh version [f5d343a911].


























































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/bin/bash
#
#       /etc/rc.d/init.d/web2pyd
#
# Starts the Web2py Daemon on Fedora (Red Hat Linux)
#
# To execute automatically at startup
#
#    sudo chkconfig --add web2pyd
#
# chkconfig: 2345 90 10
# description: Web2py Daemon
# processname: web2pyd
# pidfile: /var/lock/subsys/web2pyd

source /etc/rc.d/init.d/functions

RETVAL=0
NAME=web2pyd
DESC="Web2py Daemon"
DAEMON_DIR="/usr/lib/web2py"
ADMINPASS="admin"
#ADMINPASS="\<recycle\>"
PIDFILE=/var/run/$NAME.pid
PORT=8001
PYTHON=python

cd $DAEMON_DIR

start() {
	echo -n $"Starting $DESC ($NAME): "
	daemon --check $NAME $PYTHON $DAEMON_DIR/web2py.py -Q --nogui -a $ADMINPASS -d $PIDFILE -p $PORT &
	RETVAL=$?
	if [ $RETVAL -eq 0 ]; then
		touch /var/lock/subsys/$NAME
	fi
	echo
	return $RETVAL
}

stop() {
	echo -n $"Shutting down $DESC ($NAME): "
	if [ -r "$PIDFILE" ]; then
		pid=`cat $PIDFILE`
		kill -TERM $pid
		RETVAL=$?
	else
		RETVAL=1
	fi
	[ $RETVAL -eq 0 ] && success || failure
	echo
	if [ $RETVAL -eq 0 ]; then
		rm -f /var/lock/subsys/$NAME
		rm -f $PIDFILE
	fi
	return $RETVAL
}

restart() {
	stop
	start
}

status() {
	if [ -r "$PIDFILE" ]; then
		pid=`cat $PIDFILE`
	fi
	if [ $pid ]; then
		echo "$NAME (pid $pid) is running..."
	else
		echo "$NAME is stopped"
	fi
}

case "$1" in
	start)              start;;
	stop)               stop;;
	status)             status;;
	restart)            restart;;
	condrestart)        [ -e /var/lock/subsys/$NAME ] && restart
	                    RETVAL=$?
	                    ;;
	*)                  echo $"Usage: $0 {start|stop|restart|condrestart|status}"
	                    RETVAL=1
	                    ;;
esac

exit $RETVAL

Added scripts/web2py.ubuntu.sh version [8a04dd574f].
































































































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/sh
### BEGIN INIT INFO
# startup script for Ubuntu and Debian Linux servers
#
# To use this file
# cp ubuntu.sh /etc/init.d/web2py
#
# To automatitcally start at reboot
# sudo update-rc.d web2py defaults
#
# Provides:          web2py
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: web2py initscript
# Description:       This file starts up the web2py server.
### END INIT INFO

# Author: Mark Moore <mark.moore@fonjax.com>

PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Web Framework"
NAME=web2py
PIDDIR=/var/run/$NAME
PIDFILE=$PIDDIR/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DAEMON=/usr/bin/python
DAEMON_DIR=/usr/lib/$NAME
DAEMON_ARGS="web2py.py --password=<recycle> --pid_filename=$PIDFILE"
DAEMON_USER=web2py

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
	# Return
	#   0 if daemon has been started
	#   1 if daemon was already running
	#   2 if daemon could not be started

	# The PIDDIR should normally be created during installation. This
	# fixes things just in case.
	[ -d $PIDDIR ] || mkdir -p $PIDDIR
        [ -n "$DAEMON_USER" ] && chown --recursive $DAEMON_USER $PIDDIR

	# Check to see if the daemon is already running.
	start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
		&& return 1

	start-stop-daemon --start --quiet --pidfile $PIDFILE \
		${DAEMON_USER:+--chuid $DAEMON_USER} --chdir $DAEMON_DIR \
		--background --exec $DAEMON -- $DAEMON_ARGS \
		|| return 2

	return 0;
}

#
# Function that stops the daemon/service
#
do_stop()
{
	# Return
	#   0 if daemon has been stopped
	#   1 if daemon was already stopped
	#   2 if daemon could not be stopped
	#   other if a failure occurred

	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
	RETVAL=$?
	# Many daemons don't delete their pidfiles when they exit.
	rm -f $PIDFILE
	return "$RETVAL"
}

#
# Function that restarts the daemon/service
#
do_restart()
{
	# Return
	#   0 if daemon was (re-)started
	#   1 if daemon was not strated or re-started

	do_stop
	case "$?" in
		0|1)
			do_start
			case "$?" in
				0) RETVAL=0 ;;
				1) RETVAL=1 ;; # Old process is still running
				*) RETVAL=1 ;; # Failed to start
			esac
			;;
		*) RETVAL=1 ;; # Failed to stop
	esac

	return "$RETVAL"
}

#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
	#
	# If the daemon can reload its configuration without
	# restarting (for example, when it is sent a SIGHUP),
	# then implement that here.
	#
	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE
	return 0
}

#
# Function that queries the status of the daemon/service
#
do_status()
{
	# Return
	#   0 if daemon is responding and OK
	#   1 if daemon is not responding, but PIDFILE exists
	#   2 if daemon is not responding, but LOCKFILE exists
	#   3 if deamon is not running
	#   4 if daemon status is unknown

	# Check to see if the daemon is already running.
	start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
		&& return 0
	[ -f $PIDFILE ] && return 1
	return 3
}

case "$1" in
  start)
	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
	do_start
	RETVAL=$?
	[ "$VERBOSE" != no ] &&
	case "$RETVAL" in
		0|1) log_end_msg 0 ;;
		*)   log_end_msg 1 ;;
	esac
	exit "$RETVAL"
	;;
  stop)
	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
	do_stop
	RETVAL=$?
	[ "$VERBOSE" != no ] &&
	case "$RETVAL" in
		0|1) log_end_msg 0 ;;
		*)   log_end_msg 1 ;;
	esac
	exit "$RETVAL"
	;;
  #reload|force-reload)
	#
	# If do_reload() is not implemented then leave this commented out
	# and leave 'force-reload' as an alias for 'restart'.
	#
	#[ "$VERBOSE" != no ] && log_daemon_msg "Reloading $DESC" "$NAME"
	#do_reload
	#RETVAL=$?
	#[ "$VERBOSE" != no ] && log_end_msg $?
	#exit "$RETVAL"
	#;;
  restart|force-reload)
	#
	# If the "reload" option is implemented then remove the
	# 'force-reload' alias
	#
	[ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
	do_restart
	RETVAL=$?
	[ "$VERBOSE" != no ] && log_end_msg "$RETVAL"
	exit "$RETVAL"
	;;
  status)
    do_status
	RETVAL=$?
    [ "$VERBOSE" != no ] &&
	case "$RETVAL" in
	  0) log_success_msg "$NAME is running" ;;
	  *) log_failure_msg "$NAME is not running" ;;
	esac
    exit "$RETVAL"
	;;
  *)
	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
	exit 3
	;;
esac

:

# This was based off /etc/init.d/skeleton from the Ubuntu 8.04 Hardy release.
# (md5sum: da0162012b6a916bdbd4e2580282af78).  If we notice that changes, we
# should re-examine things.

# The configuration at the very top seems to be documented as part of the
# Linux Standard Base (LSB) Specification.  See section 20.6 Facility Names
# in particular.  This is also where I got the spec for the status parm.

# References:
# http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic.pdf
# Debian Policy SysV init: http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# Examine files in /usr/share/doc/sysv-rc/

Added setup.py version [e143c2d3be].

















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python

from distutils.core import setup
from gluon.fileutils import tar, untar, read_file, write_file
import tarfile
import sys

def tar(file, filelist, expression='^.+$'):
    """
    tars dir/files into file, only tars file that match expression
    """

    tar = tarfile.TarFile(file, 'w')
    try:
        for element in filelist:
            try:
                for file in listdir(element, expression, add_dirs=True):
                    tar.add(os.path.join(element, file), file, False)
            except:
                tar.add(element)
    finally:
        tar.close()

def start():
    if 'sdist' in sys.argv:
        tar('gluon/env.tar',['applications','VERSION','splashlogo.gif'])

    setup(name='web2py',
          version=read_file("VERSION").split()[1],
          description="""full-stack framework for rapid development and prototyping
        of secure database-driven web-based applications, written and
        programmable in Python.""",
          long_description="""
        Everything in one package with no dependencies. Development, deployment,
        debugging, testing, database administration and maintenance of applications can
        be done via the provided web interface. web2py has no configuration files,
        requires no installation, can run off a USB drive. web2py uses Python for the
        Model, the Views and the Controllers, has a built-in ticketing system to manage
        errors, an internationalization engine, works with SQLite, PostgreSQL, MySQL,
        MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, sybase and Google App Engine via a
        Database Abstraction Layer. web2py includes libraries to handle
        HTML/XML, RSS, ATOM, CSV, RTF, JSON, AJAX, XMLRPC, WIKI markup. Production
        ready, capable of upload/download streaming of very large files, and always
        backward compatible.
        """,
          author='Massimo Di Pierro',
          author_email='mdipierro@cs.depaul.edu',
          license = 'http://web2py.com/examples/default/license',
          classifiers = ["Development Status :: 5 - Production/Stable"],
          url='http://web2py.com',
          platforms ='Windows, Linux, Mac, Unix,Windows Mobile',
          packages=['gluon',
                    'gluon/contrib',
                    'gluon/contrib/gateways',
                    'gluon/contrib/login_methods',
                    'gluon/contrib/markdown',
                    'gluon/contrib/markmin',
                    'gluon/contrib/memcache',
                    'gluon/contrib/pyfpdf',
                    'gluon/contrib/pymysql',
                    'gluon/contrib/pyrtf',
                    'gluon/contrib/pysimplesoap',
                    'gluon/contrib/simplejson',
                    'gluon/tests',
                    ],
          package_data = {'gluon':['env.tar']},
          scripts = ['mkweb2pyenv','runweb2py'],
          )
    
if __name__ == '__main__':
    print "web2py does not require installation and"
    print "you should just start it with:"
    print 
    print "$ python web2py.py"
    print 
    print "are you sure you want to install it anyway (y/n)?"
    s = raw_input('>')
    if s.lower()[:1]=='y':
        start()
        

Added setup_app.py version [f5b77e5447].























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup
from gluon.import_all import base_modules, contributed_modules
import os
import fnmatch

class reglob:
    def __init__(self, directory, pattern="*"):
        self.stack = [directory]
        self.pattern = pattern
        self.files = []
        self.index = 0
    def __getitem__(self, index):
        while 1:
            try:
                file = self.files[self.index]
                self.index = self.index + 1
            except IndexError:
                self.index = 0
                self.directory = self.stack.pop()
                self.files = os.listdir(self.directory)
            else:
                fullname = os.path.join(self.directory, file)
                if os.path.isdir(fullname) and not os.path.islink(fullname):
                    self.stack.append(fullname)
                if not (file.startswith('.') or file.startswith('#') or file.endswith('~')) \
                        and fnmatch.fnmatch(file, self.pattern):
                    return fullname

setup(app=['web2py.py'],
      data_files=[
        'NEWINSTALL',
        'ABOUT',
        'LICENSE',
        'VERSION',
        ] + \
          [x for x in reglob('applications/examples')] + \
          [x for x in reglob('applications/welcome')] + \
          [x for x in reglob('applications/admin')],
      options={'py2app': {
            'argv_emulation': True,
            'includes': base_modules,
            'packages': contributed_modules,
            }},
      setup_requires=['py2app'])

Added setup_exe.py version [cc0ba04b6a].

























































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Usage:
    Install py2exe: http://sourceforge.net/projects/py2exe/files/
    Copy script to the web2py directory
    c:\bin\python26\python build_windows_exe.py py2exe

Adapted from http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/view/head:/static/scripts/tools/standalone_exe.py
"""

from distutils.core import setup
import py2exe
from gluon.import_all import base_modules, contributed_modules
from gluon.fileutils import readlines_file
from glob import glob
import fnmatch
import os
import shutil
import sys
import re
import zipfile

#read web2py version from VERSION file
web2py_version_line = readlines_file('VERSION')[0]
#use regular expression to get just the version number
v_re = re.compile('[0-9]+\.[0-9]+\.[0-9]+')
web2py_version = v_re.search(web2py_version_line).group(0)

#pull in preferences from config file
import ConfigParser
Config = ConfigParser.ConfigParser()
Config.read('setup_exe.conf')
remove_msft_dlls = Config.getboolean("Setup", "remove_microsoft_dlls")
copy_apps = Config.getboolean("Setup", "copy_apps")
copy_site_packages = Config.getboolean("Setup", "copy_site_packages")
copy_scripts = Config.getboolean("Setup", "copy_scripts")
make_zip = Config.getboolean("Setup", "make_zip")
zip_filename = Config.get("Setup", "zip_filename")
remove_build_files = Config.getboolean("Setup", "remove_build_files")


# Python base version
python_version = sys.version[:3]

# List of modules deprecated in python2.6 that are in the above set
py26_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']

if python_version == '2.6':
    base_modules += ['json', 'multiprocessing']
    base_modules = list(set(base_modules).difference(set(py26_deprecated)))


#I don't know if this is even necessary
if python_version == '2.6':
    # Python26 compatibility: http://www.py2exe.org/index.cgi/Tutorial#Step52
    try:
        shutil.copytree('C:\Bin\Microsoft.VC90.CRT', 'dist/')
    except:
        print "You MUST copy Microsoft.VC90.CRT folder into the dist directory"


setup(
  console=['web2py.py'],
  windows=[{'script':'web2py.py',
    'dest_base':'web2py_no_console' # MUST NOT be just 'web2py' otherwise it overrides the standard web2py.exe
    }],
  name="web2py",
  version=web2py_version,
  description="web2py web framework",
  author="Massimo DiPierro",
  license = "LGPL v3",
  data_files=[
        'ABOUT',
        'LICENSE',
        'VERSION',
        'splashlogo.gif',
        'logging.example.conf',
        'options_std.py',
        'app.example.yaml',
        'queue.example.yaml'
        ],
  options={'py2exe': {
    'packages': contributed_modules,
    'includes': base_modules,
    }},
  )

print "web2py binary successfully built"

def copy_folders(source, destination):
    """Copy files & folders from source to destination (within dist/)"""
    if os.path.exists(os.path.join('dist',destination)):
        shutil.rmtree(os.path.join('dist',destination))
    shutil.copytree(os.path.join(source), os.path.join('dist',destination))

#should we remove Windows OS dlls user is unlikely to be able to distribute

if remove_msft_dlls:
    print "Deleted Microsoft files not licensed for open source distribution"
    print "You are still responsible for making sure you have the rights to distribute any other included files!"
    #delete the API-MS-Win-Core DLLs
    for f in glob ('dist/API-MS-Win-*.dll'):
        os.unlink (f)
    #then delete some other files belonging to Microsoft
    other_ms_files = ['KERNELBASE.dll', 'MPR.dll', 'MSWSOCK.dll', 'POWRPROF.dll']
    for f in other_ms_files:
        try:
            os.unlink(os.path.join('dist',f))
        except:
            print "unable to delete dist/"+f
            sys.exit(1)


#Should we include applications?
if copy_apps:
    copy_folders('applications', 'applications')
    print "Your application(s) have been added"
else:
    #only copy web2py's default applications
    copy_folders('applications/admin', 'applications/admin')
    copy_folders('applications/welcome', 'applications/welcome')
    copy_folders('applications/examples', 'applications/examples')
    print "Only web2py's admin, examples & welcome applications have been added"


#should we copy project's site-packages into dist/site-packages
if copy_site_packages:
    #copy site-packages
    copy_folders('site-packages', 'site-packages')
else:
    #no worries, web2py will create the (empty) folder first run
    print "Skipping site-packages"
    pass

#should we copy project's scripts into dist/scripts
if copy_scripts:
    #copy scripts
    copy_folders('scripts', 'scripts')
else:
    #no worries, web2py will create the (empty) folder first run
    print "Skipping scripts"
    pass



#borrowed from http://bytes.com/topic/python/answers/851018-how-zip-directory-python-using-zipfile
def recursive_zip(zipf, directory, folder = ""):
   for item in os.listdir(directory):
      if os.path.isfile(os.path.join(directory, item)):
         zipf.write(os.path.join(directory, item), folder + os.sep + item)
      elif os.path.isdir(os.path.join(directory, item)):
         recursive_zip(zipf, os.path.join(directory, item), folder + os.sep + item)

#should we create a zip file of the build?

if make_zip:
    #to keep consistent with how official web2py windows zip file is setup,
    #create a web2py folder & copy dist's files into it
    shutil.copytree('dist','zip_temp/web2py')
    #create zip file
    #use filename specified via command line
    zipf = zipfile.ZipFile(zip_filename+".zip", "w", compression=zipfile.ZIP_DEFLATED )
    path = 'zip_temp' #just temp so the web2py directory is included in our zip file
    recursive_zip(zipf, path) #leave the first folder as None, as path is root.
    zipf.close()
    shutil.rmtree('zip_temp')
    print "Your Windows binary version of web2py can be found in "+zip_filename+".zip"
    print "You may extract the archive anywhere and then run web2py/web2py.exe"

#should py2exe build files be removed?
if remove_build_files:
    shutil.rmtree('build')
    shutil.rmtree('deposit')
    shutil.rmtree('dist')
    print "py2exe build files removed"

#final info
if not make_zip and not remove_build_files:
    print "Your Windows binary & associated files can also be found in /dist"

print "Finished!"
print "Enjoy web2py " +web2py_version_line

Added setup_exe_2.6.py version [8ed272e097].







































































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Usage:
    Install py2exe: http://sourceforge.net/projects/py2exe/files/
    Copy script to the web2py directory
    c:\bin\python26\python build_windows_exe.py py2exe
    
Adapted from http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/view/head:/static/scripts/tools/standalone_exe.py
"""

from distutils.core import setup
import py2exe
from gluon.import_all import base_modules, contributed_modules
from glob import glob
import fnmatch
import os
import shutil
import sys
import re
import zipfile

# Python base version
python_version = sys.version[:3]

# List of modules deprecated in python2.6 that are in the above set
py26_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']

if python_version == '2.6':
    base_modules += ['json', 'multiprocessing']
    base_modules = list(set(base_modules).difference(set(py26_deprecated)))


#I don't know if this is even necessary
if python_version == '2.6':
    # Python26 compatibility: http://www.py2exe.org/index.cgi/Tutorial#Step52
    try:
        shutil.copytree('C:\Bin\Microsoft.VC90.CRT', 'dist/')
    except:
        print "You MUST copy Microsoft.VC90.CRT folder into the dist directory"
        
#read web2py version from VERSION file
web2py_version_line = readlines_file('VERSION')[0]
#use regular expression to get just the version number
v_re = re.compile('[0-9]+\.[0-9]+\.[0-9]+')
web2py_version = v_re.search(web2py_version_line).group(0)

setup(
  console=['web2py.py'],
  windows=[{'script':'web2py.py',
    'dest_base':'web2py_no_console' # MUST NOT be just 'web2py' otherwise it overrides the standard web2py.exe
    }],
  name="web2py",
  version=web2py_version,
  description="web2py web framework",
  author="Massimo DiPierro",
  license = "LGPL v3",
  data_files=[
        'ABOUT',
        'LICENSE',
        'VERSION',
        'splashlogo.gif',
        'logging.example.conf',
        'options_std.py',
        'app.example.yaml',
        'queue.example.yaml'
        ],
  options={'py2exe': {
    'packages': contributed_modules,
    'includes': base_modules,
    }},
  )

print "web2py binary successfully built"

#offer to remove Windows OS dlls user is unlikely to be able to distribute
print "The process of building a windows executable often includes copying files that belong to Windows."
delete_ms_files = raw_input("Delete API-MS-Win-* files that are probably unsafe for distribution? (Y/n) ")
if delete_ms_files.lower().startswith("y"):
    print "Deleted Microsoft files not licensed for open source distribution"
    print "You are still responsible for making sure you have the rights to distribute any other included files!"
    #delete the API-MS-Win-Core DLLs
    for f in glob ('dist/API-MS-Win-*.dll'):
        os.unlink (f)
    #then delete some other files belonging to Microsoft    
    other_ms_files = ['KERNELBASE.dll', 'MPR.dll', 'MSWSOCK.dll', 'POWRPROF.dll']
    for f in other_ms_files:
        try:
            os.unlink(os.path.join('dist',f))
        except:
            print "unable to delete dist/"+f
            sys.exit(1)

#Offer to include applications
copy_apps = raw_input("Include your web2py application(s)? (Y/n) ")
if os.path.exists('dist/applications'):
    shutil.rmtree('dist/applications')
if copy_apps.lower().startswith("y"):
    shutil.copytree('applications', 'dist/applications')
    print "Your application(s) have been added"
else:
    shutil.copytree('applications/admin', 'dist/applications/admin')
    shutil.copytree('applications/welcome', 'dist/applications/welcome')
    shutil.copytree('applications/examples', 'dist/applications/examples')
    print "Only web2py's admin/welcome/examples applications have been added"
print ""

#Offer to copy project's site-packages into dist/site-packages
copy_apps = raw_input("Include your web2py site-packages & scripts folders? (Y/n) ")
if copy_apps.lower().startswith("y"):
    #copy site-packages
    if os.path.exists('dist/site-packages')
        shutil.rmtree('dist/site-packages')
    shutil.copytree('site-packages', 'dist/site-packages')
    #copy scripts 
    if os.path.exists('dist/scripts'):
        shutil.rmtree('dist/scripts')
    shutil.copytree('scripts', 'dist/scripts')
else:
    #no worries, web2py will create the (empty) folder first run
    print "Skipping site-packages & scripts"
    pass
    

print ""

#borrowed from http://bytes.com/topic/python/answers/851018-how-zip-directory-python-using-zipfile
def recursive_zip(zipf, directory, folder = ""):
   for item in os.listdir(directory):
      if os.path.isfile(os.path.join(directory, item)):
         zipf.write(os.path.join(directory, item), folder + os.sep + item)
      elif os.path.isdir(os.path.join(directory, item)):
         recursive_zip(zipf, os.path.join(directory, item), folder + os.sep + item)

create_zip = raw_input("Create a zip file of web2py for Windows (Y/n)? ")
if create_zip.lower().startswith("y"):
    #to keep consistent with how official web2py windows zip file is setup,
    #create a web2py folder & copy dist's files into it
    shutil.copytree('dist','zip_temp/web2py')
    #create zip file
    zipf = zipfile.ZipFile("web2py_win.zip", "w", compression=zipfile.ZIP_DEFLATED )
    path = 'zip_temp' #just temp so the web2py directory is included in our zip file
    recursive_zip(zipf, path) #leave the first folder as None, as path is root.
    zipf.close()
    shutil.rmtree('zip_temp')
    print "Your Windows binary version of web2py can be found in web2py_win.zip"
    print "You may extract the archive anywhere and then run web2py/web2py.exe"
    
    # offer to clear up
    print "Since you created a zip file you likely do not need the build, deposit and dist folders used while building binary."
    clean_up_files = raw_input("Delete these un-necessary folders/files? (Y/n) ")
    if clean_up_files.lower().startswith("y"):
        shutil.rmtree('build')
        shutil.rmtree('deposit')
        shutil.rmtree('dist')
    else:
        print "Your Windows binary & associated files can also be found in /dist"
else:
    #Didn't want zip file created
    print ""
    print "Creation of web2py Windows binary completed."
    print "You should copy the /dist directory and its contents." 
    print "To run use web2py.exe"
print "Finished!"
print "Enjoy web2py " +web2py_version_line

Added site-packages/__init__.py version [adc83b19e7].


1
+

Added splashlogo.gif version [72e7534e82].

cannot compute difference between binary files

Added web2py.py version [a779743757].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

if '__file__' in globals():
    path = os.path.dirname(os.path.abspath(__file__))
    os.chdir(path)
else:
    path = os.getcwd() # Seems necessary for py2exe

sys.path = [path]+[p for p in sys.path if not p==path]

# import gluon.import_all ##### This should be uncommented for py2exe.py
import gluon.widget

# Start Web2py and Web2py cron service!
gluon.widget.start(cron=True)

Added web2py_src.zip version [b21e798e47].

cannot compute difference between binary files

Added wsgihandler.py version [7a279d863a].













































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)


This is a WSGI handler for Apache
Requires apache+mod_wsgi.

In httpd.conf put something like:

    LoadModule wsgi_module modules/mod_wsgi.so
    WSGIScriptAlias / /path/to/wsgihandler.py

"""

# change these parameters as required
LOGGING = False
SOFTCRON = False

import sys
import os

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]

sys.stdout=sys.stderr

import gluon.main

if LOGGING:
    application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
                                        logfilename='httpserver.log',
                                        profilerfilename=None)
else:
    application = gluon.main.wsgibase

if SOFTCRON:
    from gluon.settings import global_settings
    global_settings.web2py_crontype = 'soft'